/* Homepage directory and closing panels; isolated from the other archives. */
body.home-page .section-title,
body.home-page .portal-grid,
body.home-page .info-block,
body.home-page .quote-box {
    box-sizing: border-box;
    width: min(1280px, calc(100% - 48px));
    max-width: 1280px;
    margin-inline: auto;
}
body.home-page .section-title { display: flex; flex-direction: column; align-items: center; padding: 0; margin-top: 90px; text-align: center; gap: 0; }
body.home-page .section-title .home-directory-label { display: block; }
body.home-page .home-directory-label { color: #e35060; font: 700 10px/1.6 Arial, sans-serif; letter-spacing: .19em; text-transform: uppercase; }
body.home-page .section-title h2 { margin: 12px 0 16px; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.08; text-shadow: none; }
body.home-page .section-title h2::after { display: none; }
body.home-page .section-title p { color: #b4aca6; font-style: normal; }
body.home-page .portal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding: 0; margin-top: 32px; margin-bottom: 80px; perspective: none; counter-reset: portal; }
body.home-page .portal-grid::before,
body.home-page .portal-grid::after,
body.home-page .info-block::before,
body.home-page .info-block::after { display: none; }
body.home-page .portal-card {
    min-width: 0; min-height: 330px; display: flex; align-items: flex-end;
    clip-path: none; border-radius: 16px !important; border: 1px solid #393132 !important;
    transform: none !important; transform-style: flat; isolation: isolate;
    background-color: #101012 !important; background-size: cover !important; background-position: center !important;
    box-shadow: 0 16px 40px #0005 !important; counter-increment: portal;
    transition: border-color .25s, box-shadow .25s;
}
body.home-page .portal-card[href="characters.html"] { background-image: url('images/characters.jpg') !important; }
body.home-page .portal-card[href="artifacts.html"] { background-image: url('images/weapons.jpg') !important; }
body.home-page .portal-card[href="lore.html"] { background-image: url('images/lore.jpg') !important; }
body.home-page .portal-card[href="timeline.html"] { background-image: url('images/timeline.jpg') !important; }
body.home-page .portal-card[href="gallery.html"] { background-image: url('images/gallery.jpg') !important; }
body.home-page .portal-card[href="map.html"] { background-image: url('images/map.jpg') !important; }
body.home-page .portal-card[href="anime.html"] { background-image: url('images/anime.png') !important; }
body.home-page .portal-card[href="quiz.html"] { background-image: url('images/quiz-card.png') !important; }
/* Explicit image declarations beat the shared !important background shorthand. */
body.home-page .portal-grid .portal-card[href="community.html"] { background-image:url('images/home-trials/community.webp') !important; background-position:center 30% !important; }
body.home-page .portal-grid .portal-card[href="struggler.html"] { background-image:url('images/home-trials/journey.webp') !important; background-position:58% center !important; }
body.home-page .portal-grid .portal-card[href="reviews.html"] { background-image:url('images/home-trials/chronicle.webp') !important; background-position:center 20% !important; }
body.home-page .portal-card::before { z-index: 0; transform: none; background: linear-gradient(180deg, #06060808 10%, #07070965 44%, #070709f5 78%, #070709 100%) !important; }
body.home-page .portal-card::after { content: counter(portal, decimal-leading-zero) ' / АРХІВ'; position: absolute; top: 20px; left: 22px; color: #f0d6a4; background: #090909b8; border: 1px solid #ffffff24; border-radius: 6px; padding: 7px 9px; font: 700 9px/1 Arial, sans-serif; letter-spacing: .13em; }
body.home-page .portal-group-title { grid-column: 1 / -1; margin: 26px 0 2px; padding: 0 0 16px; border-bottom: 1px solid #79603d66; color: #e7c184; font-size: 26px; text-align: left; }
body.home-page .portal-group-title:first-child { margin-top: 0; }
body.home-page .portal-card > div:not(.js-tilt-glare) { position: relative; bottom: auto; width: 100%; box-sizing: border-box; padding: 24px; transform: none; z-index: 1; }
body.home-page .portal-card h3 { font-size: 25px; margin: 0 0 10px; color: #f6f0e9; text-shadow: none; }
body.home-page .portal-card p { min-height: 64px; color: #c0b8b1; font-size: 14px; line-height: 1.55; }
body.home-page .portal-card > div:not(.js-tilt-glare)::after { content: 'ВІДКРИТИ РОЗДІЛ ↗'; display: block; margin-top: 20px; color: #efc16f; font: 700 10px/1.4 Arial, sans-serif; letter-spacing: .08em; }
body.home-page .portal-card .js-tilt-glare { display: none !important; }
body.home-page .portal-card:hover,
body.home-page .portal-card:focus-visible { border-color: #c44150 !important; box-shadow: 0 18px 48px #0008, 0 0 24px #9f162321 !important; outline: 2px solid #d7556540; outline-offset: 4px; }
body.home-page .info-block { padding: 0; margin-bottom: 26px; gap: 24px; grid-template-columns: 1.15fr 1fr; align-items: stretch; }
body.home-page .about-box,
body.home-page .character-day { clip-path: none; min-width: 0; padding: 36px; border: 1px solid #443336; border-radius: 18px; background: radial-gradient(ellipse at top left, #6a172325, transparent 65%), linear-gradient(130deg, #171315f5, #09090af5); box-shadow: 0 20px 55px #0005; }
body.home-page .about-box::after,
body.home-page .character-day::after { display: none; }
body.home-page .about-box h2 { margin-top: 12px; }
body.home-page .info-block h2 { font-size: clamp(25px, 2.4vw, 34px); margin-bottom: 22px; line-height: 1.2; }
body.home-page .info-block p { font-size: 15px; line-height: 1.8; color: #bdb4af; }
body.home-page .home-about-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 28px; padding-top: 22px; border-top: 1px solid #ffffff16; }
body.home-page .home-about-links a { color: #efc16f; text-decoration: none; font-size: 14px; }
body.home-page .home-about-links a:hover { text-decoration: underline; }
body.home-page .character-day { display: grid; grid-template-columns: 145px minmax(0, 1fr); column-gap: 26px; align-content: center; }
body.home-page .character-day h2 { grid-column: 1 / -1; }
body.home-page .character-day img { grid-column: 1; grid-row: 2 / 4; width: 145px; height: 205px; object-fit: cover; object-position: center 20%; border: 1px solid #695046; border-radius: 10px; margin: 0; }
body.home-page .character-day h3 { grid-column: 2; align-self: end; margin: 0 0 10px; color: #edc77e; font-size: 24px; line-height: 1.25; }
body.home-page .character-day p { grid-column: 2; margin: 0; }
body.home-page .quote-box { position: relative; padding: 38px 62px; margin-bottom: 80px; border: 1px solid #ffffff18; border-radius: 14px; background: linear-gradient(100deg, #34141ae6, #0d0c0ee6 70%); text-align: center; color: #e4d9cb; font-size: clamp(19px, 2vw, 25px); text-wrap: balance; box-shadow: none; }
body.home-page .quote-box::before { content: '“'; position: absolute; left: 24px; top: 8px; color: #c4515a80; font: 80px/1 Georgia, serif; }
@media (max-width: 1100px) {
    body.home-page .portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.home-page .info-block { grid-template-columns: 1fr; }
    body.home-page .character-day { grid-template-columns: 180px minmax(0, 1fr); }
    body.home-page .character-day img { width: 180px; }
}
@media (max-width: 560px) {
    body.home-page .section-title, body.home-page .portal-grid, body.home-page .info-block, body.home-page .quote-box { width: calc(100% - 32px); }
    body.home-page .portal-grid { grid-template-columns: 1fr; gap: 16px; }
    body.home-page .portal-card { min-height: 350px; }
    body.home-page .about-box, body.home-page .character-day { padding: 24px; }
    body.home-page .character-day { grid-template-columns: 100px minmax(0, 1fr); gap: 12px 18px; }
    body.home-page .character-day img { width: 100px; height: 155px; }
    body.home-page .character-day h3 { font-size: 21px; }
    body.home-page .character-day p { font-size: 13px; line-height: 1.6; }
    body.home-page .quote-box { padding: 32px; }
}
@media (prefers-reduced-motion: reduce) { body.home-page .portal-card { transition: none; } }

/* A dedicated invitation rather than an unstyled archive-section text block. */
body.home-page .home-community-invite {
    box-sizing:border-box; position:relative; isolation:isolate; overflow:hidden;
    display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);
    width:min(1280px,calc(100% - 48px)); max-width:1280px; margin:0 auto 40px; padding:0;
    border:1px solid #75514680; border-radius:20px;
    background:radial-gradient(ellipse at 0 0,#71253635,transparent 65%),#151014;
    box-shadow:0 18px 45px #0004;
}
body.home-page .home-community-invite::before { content:''; position:absolute; top:0; left:36px; width:72px; height:2px; background:#d3ad75; z-index:2; }
body.home-page .home-community-invite__content { position:relative; z-index:1; min-width:0; padding:40px 44px; }
body.home-page .home-community-invite h2 { margin:16px 0 18px; color:#f2e7d8; font:500 clamp(30px,3.1vw,43px)/1.13 Georgia,serif; letter-spacing:-.025em; text-align:left; text-shadow:none; }
body.home-page .home-community-invite h2::after,body.home-page .home-community-invite h2::before { content:none; }
body.home-page .home-community-invite h2 em { color:#dc7885; font-weight:400; }
body.home-page .home-community-invite__content>p { max-width:490px; margin:0 0 22px; color:#bdafa7; font:14px/1.8 Arial,sans-serif; }
body.home-page .home-community-invite__topics { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 26px; }
body.home-page .home-community-invite__topics a { display:inline-flex; gap:12px; align-items:center; padding:8px 11px; border:1px solid #b18b533d; border-radius:7px; background:#0e0c0f66; color:#dcc4a5; text-decoration:none; font:11px/1.5 Arial,sans-serif; transition:background-color .18s,border-color .18s; }
body.home-page .home-community-invite__topics a span { color:#bb9367; }
body.home-page .home-community-invite__topics a:hover { background:#44212d; border-color:#bb8367; }
body.home-page a.home-community-invite__button { display:inline-flex; align-items:center; justify-content:space-between; gap:28px; min-height:48px; padding:13px 20px; border:1px solid #cf6c7a80; border-radius:9px; background:linear-gradient(110deg,#922d46,#652437); color:#fff0d9; text-decoration:none; font:600 13px/1.5 Arial,sans-serif; letter-spacing:0; text-transform:none; transition:background-color .18s,border-color .18s; }
body.home-page a.home-community-invite__button span { font-size:20px; line-height:1; }
body.home-page a.home-community-invite__button:hover { background:#a63b53; border-color:#e59a9d; }
body.home-page .home-community-invite__note { display:block; margin-top:13px; color:#9c8b80; font:10px/1.6 Arial,sans-serif; }
body.home-page .home-community-invite__art { position:relative; min-width:0; min-height:360px; overflow:hidden; }
body.home-page .home-community-invite__art img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 35%; filter:saturate(.65); }
body.home-page .home-community-invite__art::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,#151014,transparent 40%),linear-gradient(0deg,#151014f2,transparent 55%); }
body.home-page .home-community-invite__art>span { position:absolute; bottom:28px; right:26px; left:36px; z-index:1; text-align:right; color:#e4c59c; font:italic 15px/1.6 Georgia,serif; }
body.home-page .home-community-invite a:focus-visible { outline:2px solid #eaca93; outline-offset:4px; }
@media(max-width:900px) {
    body.home-page .home-community-invite { grid-template-columns:minmax(0,1.4fr) minmax(0,.6fr); }
    body.home-page .home-community-invite__content { padding:32px; }
    body.home-page .home-community-invite__art>span { display:none; }
}
@media(max-width:620px) {
    body.home-page .home-community-invite { grid-template-columns:1fr; width:calc(100% - 32px); margin-bottom:26px; }
    body.home-page .home-community-invite__art { grid-row:1; min-height:160px; }
    body.home-page .home-community-invite__art img { object-position:center 42%; }
    body.home-page .home-community-invite__art::after { background:linear-gradient(0deg,#151014,transparent 85%); }
    body.home-page .home-community-invite__content { padding:8px 24px 27px; }
    body.home-page .home-community-invite h2 { font-size:34px; }
    body.home-page .home-community-invite__content>p { font-size:13px; }
    body.home-page .home-community-invite__topics { gap:7px; margin-bottom:22px; }
    body.home-page a.home-community-invite__button { width:100%; box-sizing:border-box; }
}
@media(prefers-reduced-motion:reduce) { body.home-page .home-community-invite a { transition:none; } }

/* Quote mini-game: opaque answers and a separate, readable result. */
body.home-page .mini-game-card--quote { justify-content:flex-start; }
body.home-page .mini-game-card--quote::before { background:linear-gradient(180deg,#09090ba8,#09090bf2 58%,#09090b); }
body.home-page .mini-game-card--quote [data-mini-quote] { color:#f3e9db; font-size:16px; line-height:1.65; margin:0 0 18px; min-height:80px; text-shadow:0 2px 8px #000; }
body.home-page .mini-game-card--quote .mini-game-options { margin-top:auto; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
body.home-page .mini-game-card--quote .mini-game-options button { min-width:0; min-height:44px; padding:10px 5px; font:600 13px/1.3 Arial,sans-serif; border-radius:9px; background:#211b20; color:#f2e5d4; overflow-wrap:anywhere; }
body.home-page .mini-game-card--quote .mini-game-options button:disabled { opacity:1; cursor:default; }
body.home-page .mini-game-card--quote .mini-game-options button.correct { background:#193b2b; border-color:#6db98b; color:#d9ffe7; }
body.home-page .mini-game-card--quote .mini-game-options button.wrong { background:#4a2029; border-color:#d67a87; color:#ffe1e4; }
body.home-page .mini-game-card--quote .mini-quote-result { color:#f0dec0; font:14px/1.5 Arial,sans-serif; margin:12px 0; min-height:42px; }
body.home-page .mini-quote-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; font:13px/1.4 Arial,sans-serif; color:#dcc5a1; }
body.home-page .mini-quote-footer button { border:1px solid #93744c; border-radius:8px; background:#2b2024; padding:10px; min-height:44px; color:#f4dfb9; font:600 12px/1.4 Arial,sans-serif; cursor:pointer; }
body.home-page .mini-quote-footer button[hidden] { display:none; }
body.home-page .mini-game-card--quote .mini-quote-note { font:11px/1.4 Arial,sans-serif; color:#c0b6ad; margin-top:12px; min-height:0; }
body.home-page .mini-game-card--quote button:focus-visible { outline:2px solid #f1cc84; outline-offset:3px; }
