:root {
    --ink: #080d1c;
    --ink-2: #0d1630;
    --panel: #111b36;
    --panel-2: #162342;
    --line: #2e4167;
    --line-bright: #5978aa;
    --ice: #80c8ff;
    --ice-bright: #c7eaff;
    --blue: #2379d8;
    --blue-dark: #15519b;
    --gold: #d4b266;
    --paper: #edf5ff;
    --muted: #9aaac3;
    --success: #77d89b;
    --danger: #ff8a8a;
    --shadow: 0 16px 40px rgba(0, 4, 15, .34);
    --serif: Georgia, "Times New Roman", serif;
    --ui: Tahoma, Verdana, Arial, sans-serif;
}

/* ========================================================================== */
/* Avalis cinematic art direction                                             */
/* ========================================================================== */

:root {
    --avalis-night: #040814;
    --avalis-deep: #071126;
    --avalis-glass: rgba(5, 12, 27, .76);
    --avalis-cyan: #70d8ff;
    --avalis-gold: #e7bd62;
}

body.public-page { background: var(--avalis-night); }
.public-page main { overflow: clip; }
.site-header { background: linear-gradient(180deg, rgba(4,8,18,.98), rgba(4,8,18,.9)); border-bottom-color: rgba(135,201,255,.18); }
.realm-bar { background: #03060d; }
.site-header nav a { text-transform: uppercase; letter-spacing: .095em; font-size: 10px; }
.site-header nav a.active::after { box-shadow: 0 0 16px rgba(112,216,255,.75); }
.play-link, .button { position: relative; border: 0; border-radius: 0; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%); transition: transform .18s ease, filter .18s ease, background .18s ease; }
.play-link, .button.primary { background: linear-gradient(180deg, #a8e7ff 0%, #58bdea 100%); box-shadow: inset 0 1px rgba(255,255,255,.7); }
.button.ghost, .button.secondary { border: 0; background: linear-gradient(180deg, rgba(31,55,84,.88), rgba(9,19,37,.9)); box-shadow: inset 0 0 0 1px rgba(154,206,255,.35); }
.button:hover, .play-link:hover { filter: brightness(1.12); transform: translateY(-2px); }

.home-hero-v2 { min-height: calc(100vh - 114px); max-height: none; padding-top: 9vh; padding-bottom: 12vh; background-image: linear-gradient(90deg, rgba(2,6,15,.8) 0%, rgba(2,6,15,.5) 31%, rgba(3,8,18,.04) 60%), linear-gradient(0deg, #040814 0%, transparent 28%), url("brand/avalis-hero-v2.png"); background-position: center; }
.home-hero-v2::before { background: radial-gradient(circle at 72% 47%, rgba(66,181,255,.08), transparent 29%), linear-gradient(180deg, rgba(2,5,12,.16), transparent 45%, rgba(2,6,15,.8)); }
.home-hero-v2 .hero-copy { max-width: 680px; padding: 0; }
.home-hero-v2 .hero-copy h1 { font-size: clamp(76px, 9.2vw, 148px); line-height: .82; letter-spacing: -.075em; text-shadow: 0 18px 70px #000; }
.home-hero-v2 .hero-lede { max-width: 500px; color: #d2dbea; font-size: 19px; text-shadow: 0 2px 20px #000; }
.home-hero-v2 .hero-live { align-self: end; margin: 0 0 55px auto; padding: 18px 0 0 26px; border: 0; border-top: 1px solid rgba(170,221,255,.65); background: linear-gradient(90deg, rgba(3,8,17,.72), transparent); }
.home-hero-v2 .hero-live h2 { font-size: 30px; }
.world-strip-v2 { position: relative; z-index: 3; min-height: 88px; margin-top: -44px; border: 0; border-top: 1px solid rgba(123,196,247,.35); border-bottom: 1px solid rgba(123,196,247,.16); background: linear-gradient(90deg, rgba(5,12,26,.96), rgba(8,22,43,.82), rgba(5,12,26,.96)); backdrop-filter: blur(18px); }
.world-strip-v2 > div, .world-strip-v2 > a { padding-block: 16px; background: transparent; border-color: rgba(132,194,238,.13); }

.cinematic-section { position: relative; width: 100%; min-height: 760px; display: flex; align-items: center; isolation: isolate; background-size: cover; background-position: center; }
.cinematic-section::before, .cinematic-section::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cinematic-section::after { background: linear-gradient(180deg, var(--avalis-night) 0, transparent 19%, transparent 79%, var(--avalis-night) 100%); }
.raid-showcase { background-image: url("brand/avalis-raids-v2.png"); }
.raid-showcase::before { background: linear-gradient(90deg, rgba(3,7,15,.96) 0%, rgba(3,8,18,.74) 30%, rgba(3,8,18,.08) 65%); }
.community-showcase { background-image: url("brand/avalis-community-v2.png"); background-position: center; }
.community-showcase::before { background: linear-gradient(90deg, rgba(3,7,15,.05) 25%, rgba(3,8,18,.7) 67%, rgba(3,7,15,.96) 100%); }
.champions-showcase { background-image: url("brand/avalis-champions-v2.png"); }
.champions-showcase::before { background: linear-gradient(90deg, rgba(3,7,15,.96) 0%, rgba(3,8,18,.78) 30%, rgba(3,8,18,.04) 68%); }
.arena-showcase { background-image: url("brand/avalis-arena-store-v2.png"); }
.arena-showcase::before { background: linear-gradient(90deg, rgba(3,7,15,.16) 15%, rgba(3,8,18,.48) 48%, rgba(3,7,15,.96) 100%); }
.cinematic-copy { width: min(580px, calc(100% - 48px)); margin-left: max(48px, calc((100vw - 1180px) / 2)); position: relative; z-index: 2; text-shadow: 0 3px 28px rgba(0,0,0,.9); }
.cinematic-copy.align-right { margin-right: max(48px, calc((100vw - 1180px) / 2)); margin-left: auto; }
.cinematic-copy h2 { margin: 0 0 22px; font-size: clamp(56px, 6.5vw, 92px); line-height: .91; letter-spacing: -.055em; }
.cinematic-copy > p:not(.eyebrow) { max-width: 500px; color: #c5d0de; font-size: 17px; line-height: 1.75; }
.scene-link { display: inline-flex; align-items: center; gap: 15px; margin-top: 17px; color: #e7f6ff; font-size: 12px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.scene-link span { color: var(--avalis-cyan); font-size: 20px; transition: transform .18s ease; }
.scene-link:hover span { transform: translateX(5px); }
.scene-actions { margin-top: 28px; display: flex; align-items: center; gap: 22px; }
.scene-number { position: absolute; right: max(32px, calc((100vw - 1280px) / 2)); bottom: 70px; color: rgba(219,238,255,.15); font-size: 100px; font-weight: 900; line-height: 1; letter-spacing: -.08em; }
.community-showcase .scene-number, .arena-showcase .scene-number { right: auto; left: max(32px, calc((100vw - 1280px) / 2)); }

.discussion-ribbon, .ranking-ribbon { position: absolute; z-index: 3; right: max(48px, calc((100vw - 1180px) / 2)); bottom: 63px; width: min(520px, calc(100% - 48px)); padding: 17px 0 0; border-top: 1px solid rgba(176,218,255,.55); background: linear-gradient(180deg, rgba(3,8,18,.78), rgba(3,8,18,.22)); backdrop-filter: blur(8px); }
.discussion-ribbon { right: auto; left: max(48px, calc((100vw - 1180px) / 2)); width: min(450px, calc(100% - 48px)); }
.discussion-ribbon > small, .ranking-ribbon > header { display: flex; justify-content: space-between; padding: 0 15px 10px; color: var(--avalis-cyan); font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.discussion-ribbon > a { min-height: 48px; padding: 7px 15px; display: grid; grid-template-columns: 105px 1fr auto; align-items: center; gap: 12px; border-top: 1px solid rgba(138,188,228,.16); }
.discussion-ribbon a span, .discussion-ribbon time { color: #8294ab; font-size: 8px; text-transform: uppercase; }
.discussion-ribbon a b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ranking-ribbon > header { padding-inline: 17px; }
.ranking-ribbon > a { min-height: 55px; padding: 8px 17px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 13px; border-top: 1px solid rgba(138,188,228,.16); }
.ranking-ribbon em { color: var(--avalis-gold); font-size: 11px; font-style: normal; font-weight: 900; }
.ranking-ribbon a > span { display: grid; }
.ranking-ribbon a > span b { font-size: 12px; }
.ranking-ribbon small { color: #7f91a8; font-size: 8px; }
.ranking-ribbon strong { color: #e8f6ff; font-size: 12px; }
.ranking-ribbon > p { padding: 16px; color: #9ba9ba; font-size: 11px; }

.final-cta-v2 { min-height: 620px; padding: 110px 24px; justify-content: center; background: radial-gradient(circle at 50% 12%, rgba(49,143,213,.22), transparent 32%), linear-gradient(180deg, var(--avalis-night), #02040a); }
.final-cta-v2 img { max-width: 390px; max-height: 180px; }
.final-cta-v2 h2 { margin: 25px 0 10px; font-size: clamp(52px, 6vw, 86px); }
.final-cta-v2 p { max-width: 520px; }

/* Page-specific artwork replaces the repeated generic masthead. */
.forum-mast, .page-mast, .store-mast, .events-mast, .info-hero { position: relative; width: 100%; min-height: 420px; margin-left: 0; margin-bottom: 54px; padding: 72px 40px; border: 0; border-bottom: 1px solid rgba(130,193,240,.22); border-radius: 0; background-size: cover; background-position: center; box-shadow: none; isolation: isolate; }
.forum-mast::after, .page-mast::after, .store-mast::after, .events-mast::after, .info-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(3,7,15,.08), transparent 55%, var(--avalis-night)); }
.forum-mast { grid-template-columns: 1fr 410px; background-image: linear-gradient(90deg, rgba(3,7,15,.9), rgba(3,8,18,.2) 55%, rgba(3,7,15,.78)), url("brand/avalis-community-v2.png"); }
.hiscores-page .page-mast { background-image: linear-gradient(90deg, rgba(3,7,15,.94), rgba(3,8,18,.16) 58%), url("brand/avalis-champions-v2.png"); }
.store-page .store-mast, .events-page .events-mast { background-image: linear-gradient(90deg, rgba(3,7,15,.92), rgba(3,8,18,.12) 58%), url("brand/avalis-arena-store-v2.png"); }
.rules-page .info-hero, .guide-page .info-hero { background-image: linear-gradient(90deg, rgba(3,7,15,.94), rgba(3,8,18,.18) 60%), url("brand/avalis-raids-v2.png"); }
.play-page .info-hero { background-image: linear-gradient(90deg, rgba(3,7,15,.94), rgba(3,8,18,.12) 62%), url("brand/avalis-hero-v2.png"); }
.membership-page .info-hero, .vote-page .info-hero { background-image: linear-gradient(90deg, rgba(3,7,15,.94), rgba(3,8,18,.15) 60%), url("brand/avalis-champions-v2.png"); }
.media-page .info-hero { background-image: linear-gradient(90deg, rgba(3,7,15,.94), rgba(3,8,18,.18) 60%), url("brand/avalis-community-v2.png"); }
.info-hero:not(.rules-page *):not(.guide-page *):not(.play-page *):not(.membership-page *):not(.vote-page *):not(.media-page *) { background-image: linear-gradient(90deg, rgba(3,7,15,.94), rgba(3,8,18,.14) 60%), url("brand/avalis-hero-v2.png"); }
.forum-mast h1, .page-mast h1, .store-mast h1, .events-mast h1, .info-hero h1 { text-shadow: 0 10px 50px rgba(0,0,0,.8); }
.forum-search { align-self: end; margin-bottom: 10px; padding: 15px 0 0; border: 0; border-top: 1px solid rgba(181,221,255,.58); background: linear-gradient(180deg, rgba(4,10,22,.5), transparent); }

/* Functional content remains readable without looking like a stack of cards. */
.board-list, .topic-list, .ranking-table, .hunt-table, .events-columns, .store-grid, .info-grid { background: transparent; }
.board-row, .topic-row, .ranking-table > a, .hunt-table > a, .event-board, .info-card, .profile-activity > section { background: linear-gradient(90deg, rgba(12,25,46,.68), rgba(7,14,27,.2)); border-color: rgba(128,185,230,.16); }
.board-row:hover, .topic-row:hover, .ranking-table > a:hover, .hunt-table > a:hover { background: linear-gradient(90deg, rgba(25,53,87,.7), rgba(8,17,32,.22)); }
.forum-sidebar > section, .search-panel > section { border: 0; border-top: 1px solid rgba(148,204,248,.38); background: linear-gradient(180deg, rgba(11,24,44,.55), transparent); }
.board-mark, .topic-state, .avatar { clip-path: polygon(50% 0, 92% 24%, 92% 76%, 50% 100%, 8% 76%, 8% 24%); border: 0; background: linear-gradient(145deg, #244c76, #0a1930); }
.info-grid { gap: 0; border: 0; }
.info-card, .info-card.full { border: 0; border-top: 1px solid rgba(128,190,235,.24); background: linear-gradient(90deg, rgba(12,25,46,.7), rgba(7,14,27,.22)); }
.product-card { border: 0; background: linear-gradient(145deg, rgba(17,35,61,.82), rgba(6,13,26,.8)); clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px); }
.credit-package { border: 0; border-top: 1px solid rgba(146,203,247,.28); background: radial-gradient(circle at 50% 35%, rgba(64,134,191,.16), transparent 52%); clip-path: none; }
.product-card:hover, .credit-package:hover { background: linear-gradient(145deg, rgba(27,55,91,.9), rgba(8,18,34,.86)); transform: translateY(-3px); }
.product-icon { background: radial-gradient(circle, rgba(86,177,238,.18), transparent 65%); }
.store-filters { border: 0; border-top: 1px solid rgba(148,204,248,.4); background: linear-gradient(180deg, rgba(10,22,41,.7), transparent); }
.event-board > header, .live-feed-card > header, .board-card > header { background: linear-gradient(90deg, rgba(28,57,91,.58), rgba(8,17,32,.15)); }
.auth-shell { min-height: calc(100vh - 114px); background-image: linear-gradient(90deg, rgba(3,7,15,.95), rgba(3,8,18,.42)), url("brand/avalis-community-v2.png"); }
.registration-page .auth-shell { background-image: linear-gradient(90deg, rgba(3,7,15,.95), rgba(3,8,18,.38)), url("brand/avalis-hero-v2.png"); }
.auth-card { border: 0; border-top: 1px solid rgba(170,220,255,.6); background: linear-gradient(180deg, rgba(6,14,29,.9), rgba(4,9,19,.78)); clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); }

@media (max-width: 920px) {
    .cinematic-section { min-height: 720px; }
    .cinematic-copy, .cinematic-copy.align-right { width: min(560px, calc(100% - 48px)); margin-right: auto; margin-left: 32px; align-self: start; margin-top: 110px; }
    .community-showcase::before, .arena-showcase::before { background: linear-gradient(90deg, rgba(3,7,15,.92), rgba(3,8,18,.52), rgba(3,7,15,.35)); }
    .discussion-ribbon, .ranking-ribbon { right: 30px; left: 30px; bottom: 60px; width: auto; }
    .scene-number { display: none; }
    .forum-mast { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .home-hero-v2 { min-height: 760px; background-position: 62% center; }
    .home-hero-v2::before { background: linear-gradient(90deg, rgba(2,6,15,.88), rgba(2,6,15,.38)), linear-gradient(0deg, #040814, transparent 48%); }
    .home-hero-v2 .hero-copy h1 { font-size: clamp(63px, 20vw, 92px); }
    .world-strip-v2 { margin-top: 0; }
    .cinematic-section { min-height: 700px; background-position: 58% center; }
    .community-showcase, .arena-showcase { background-position: 42% center; }
    .cinematic-copy, .cinematic-copy.align-right { width: calc(100% - 40px); margin: 78px 20px 0; }
    .cinematic-copy h2 { font-size: clamp(48px, 15vw, 68px); }
    .cinematic-copy > p:not(.eyebrow) { font-size: 14px; }
    .discussion-ribbon, .ranking-ribbon { right: 16px; left: 16px; bottom: 38px; }
    .discussion-ribbon > a { grid-template-columns: 78px 1fr; }
    .discussion-ribbon time { display: none; }
    .ranking-ribbon strong { font-size: 10px; }
    .scene-actions { align-items: stretch; flex-direction: column; gap: 10px; }
    .scene-actions .button { width: 100%; }
    .forum-mast, .page-mast, .store-mast, .events-mast, .info-hero { min-height: 380px; padding: 52px 22px; }
    .final-cta-v2 { min-height: 540px; }
}

/* Absolute final UI refinement: normal controls are not decorative diamonds. */
.play-link, .button, .danger-button, .moderator-actions button, .forum-search button, .search button { border-radius: 8px; clip-path: none; }
.button.primary, .play-link { border: 1px solid rgba(174,229,255,.72); background: linear-gradient(180deg,#8bd8fb,#4caee0); }
.button.secondary, .button.ghost { border: 1px solid rgba(127,169,213,.32); border-radius: 8px; background: rgba(12,26,46,.78); }
.events-columns { gap: 24px; background: transparent; }
.event-board, .live-feed-card, .board-card { overflow: hidden; border: 1px solid rgba(124,183,229,.18); border-radius: 14px; background: linear-gradient(145deg,rgba(13,29,51,.82),rgba(5,13,27,.58)); box-shadow: 0 22px 55px rgba(0,0,0,.18); }
.event-board > header, .live-feed-card > header, .board-card > header { background: linear-gradient(90deg,rgba(32,69,107,.52),rgba(9,22,40,.18)); }
.category-panel, .ranking-panel, .search-panel > section, .profile-card { overflow: hidden; border: 1px solid rgba(132,187,231,.2); border-radius: 12px; background: linear-gradient(145deg,rgba(15,33,58,.84),rgba(6,15,29,.72)); box-shadow: 0 18px 45px rgba(0,0,0,.16); }
.board-list, .topic-list { display: grid; gap: 12px; background: transparent; }
.board-row, .topic-row { border: 1px solid rgba(127,183,226,.16); border-radius: 13px; background: linear-gradient(100deg,rgba(14,31,54,.76),rgba(6,15,29,.42)); box-shadow: 0 14px 35px rgba(0,0,0,.12); }
.board-row:hover, .topic-row:hover { border-color: rgba(129,198,247,.34); background: linear-gradient(100deg,rgba(25,54,88,.76),rgba(7,18,33,.48)); }
.board-mark, .topic-state, .avatar { border: 1px solid rgba(128,194,239,.2); border-radius: 11px; background: radial-gradient(circle at 40% 30%,rgba(61,146,206,.32),rgba(9,25,46,.82)); clip-path: none; }
.credit-package { border: 1px solid rgba(136,190,232,.16); border-radius: 14px; background: radial-gradient(circle at 50% 26%,rgba(51,119,178,.18),transparent 42%),rgba(7,17,32,.5); box-shadow: 0 18px 42px rgba(0,0,0,.14); }
.product-card { border-radius: 13px; clip-path: none; }
.auth-card { border-radius: 14px; clip-path: none; }

/* Refined controls and community tools. This cascade intentionally removes
   the clipped/diamond treatment from ordinary UI and gives content room. */
.play-link,
.button,
.danger-button,
.moderator-actions button,
.forum-search button,
.search button {
    border-radius: 8px;
    clip-path: none;
}
.button.primary,
.play-link {
    border: 1px solid rgba(174, 229, 255, .72);
    background: linear-gradient(180deg, #8bd8fb, #4caee0);
    box-shadow: 0 8px 22px rgba(29, 130, 187, .16), inset 0 1px rgba(255,255,255,.4);
}
.button.secondary,
.button.ghost {
    border: 1px solid rgba(127, 169, 213, .32);
    background: rgba(12, 26, 46, .78);
    box-shadow: none;
}
input,
select,
textarea { border-radius: 7px; }

.events-columns { gap: 24px; background: transparent; }
.event-board,
.live-feed-card,
.board-card {
    overflow: hidden;
    border: 1px solid rgba(124, 183, 229, .18);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(13, 29, 51, .82), rgba(5, 13, 27, .58));
    box-shadow: 0 22px 55px rgba(0,0,0,.18);
}
.event-board > header,
.live-feed-card > header,
.board-card > header {
    background: linear-gradient(90deg, rgba(32, 69, 107, .52), rgba(9, 22, 40, .18));
}

.hiscores-grid { gap: 22px; }
.category-panel,
.ranking-panel,
.search-panel > section,
.profile-card {
    overflow: hidden;
    border: 1px solid rgba(132, 187, 231, .2);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(15, 33, 58, .84), rgba(6, 15, 29, .72));
    box-shadow: 0 18px 45px rgba(0,0,0,.16);
}
.category-panel nav a { margin: 2px 0; border: 0; border-radius: 7px; }
.category-panel nav a.active { box-shadow: inset 3px 0 #72caf5; }

.board-list,
.topic-list { display: grid; gap: 12px; background: transparent; }
.board-row,
.topic-row {
    border: 1px solid rgba(127, 183, 226, .16);
    border-radius: 13px;
    background: linear-gradient(100deg, rgba(14, 31, 54, .76), rgba(6, 15, 29, .42));
    box-shadow: 0 14px 35px rgba(0,0,0,.12);
}
.board-row:hover,
.topic-row:hover {
    border-color: rgba(129, 198, 247, .34);
    background: linear-gradient(100deg, rgba(25, 54, 88, .76), rgba(7, 18, 33, .48));
}
.board-mark,
.topic-state,
.avatar {
    border: 1px solid rgba(128, 194, 239, .2);
    border-radius: 11px;
    background: radial-gradient(circle at 40% 30%, rgba(61, 146, 206, .32), rgba(9, 25, 46, .82));
    clip-path: none;
}
.board-mark { color: #98dcff; }
.forum-icon { width: 31px; height: 31px; display: block; color: currentColor; }
.forum-icon.small { width: 21px; height: 21px; }
.subforum-list { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.subforum-list a { min-width: 180px; padding: 8px 10px; display: flex; align-items: center; gap: 9px; border: 1px solid rgba(119,175,220,.14); border-radius: 9px; background: rgba(6,16,31,.46); }
.subforum-list a:hover { border-color: rgba(128,203,255,.38); background: rgba(18,42,71,.55); }
.subforum-list span { min-width: 0; display: grid; }
.subforum-list b { font-size: 10px; }
.subforum-list small { max-width: 240px; overflow: hidden; color: #71849c; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.latest-author { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.latest-author > a { font-weight: 750; }

.identity-badges { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.identity-badge { min-height: 20px; padding: 3px 7px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid rgba(125,175,216,.22); border-radius: 999px; background: rgba(10,23,42,.74); color: #aebfd2; font: 800 8px var(--ui); letter-spacing: .035em; line-height: 1; text-transform: uppercase; white-space: nowrap; }
.identity-badge b { color: #83d5ff; font-size: 10px; }
.identity-badge.staff { border-color: rgba(255,205,96,.3); color: #f3d88b; background: rgba(62,43,10,.34); }
.identity-badge.staff b { color: #ffd666; }
.identity-badge.donor { border-color: rgba(115,172,255,.34); color: #a9cfff; background: rgba(22,51,91,.42); }
.identity-badge.donor b { color: #70b7ff; }
.identity-badge.mode-standard-iron-man,
.identity-badge.mode-group-iron-man { color: #d3dbe5; }
.identity-badge.mode-hardcore-iron-man,
.identity-badge.mode-group-hardcore-iron-man { border-color: rgba(226,97,89,.42); color: #ffaaa4; background: rgba(74,20,22,.38); }
.identity-badge.mode-ultimate-iron-man { border-color: rgba(226,183,84,.42); color: #f5d78d; }
.topic-author { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.topic-author .identity-badge { transform: translateY(-1px); }
.forum-account .identity-badges { margin: 4px 0 8px; }
.forum-post aside .identity-badges { margin-top: 5px; }

.credit-package { min-height: 330px; border: 1px solid rgba(136, 190, 232, .16); border-radius: 14px; background: radial-gradient(circle at 50% 26%, rgba(51,119,178,.18), transparent 42%), rgba(7,17,32,.5); box-shadow: 0 18px 42px rgba(0,0,0,.14); }
.credit-package-icon { width: auto; height: auto; max-width: 105px; max-height: 82px; min-height: 26px; margin: 5px auto 17px; display: block; object-fit: contain; image-rendering: pixelated; }
.credit-package .credit-total { margin-top: auto; }
.credit-package.featured { border-color: rgba(117, 197, 249, .55); background: radial-gradient(circle at 50% 24%, rgba(52,135,201,.27), transparent 44%), rgba(9,23,42,.64); }
.product-card { border-radius: 13px; clip-path: none; }
.auth-card { border-radius: 14px; clip-path: none; }

.forum-admin-shell { width: min(100% - 48px, 1400px); margin: 0 auto; padding: 42px 0 90px; }
.forum-admin-heading { margin-bottom: 30px; padding: 12px 4px 30px; display: flex; align-items: end; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(128,185,230,.2); }
.forum-admin-heading h1 { margin: 4px 0 8px; font-size: clamp(38px, 5vw, 58px); }
.forum-admin-heading p:last-child { max-width: 760px; margin: 0; color: var(--muted); }
.forum-admin-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); align-items: start; gap: 28px; }
.icon-library { position: sticky; top: 96px; padding: 24px; border: 1px solid rgba(129,186,231,.18); border-radius: 14px; background: linear-gradient(155deg, rgba(14,31,55,.86), rgba(6,14,28,.78)); }
.icon-library h2 { margin: 4px 0 19px; font-size: 24px; }
.icon-library > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.icon-library > div > span { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(125,178,220,.12); border-radius: 10px; color: #8ed7ff; background: rgba(5,15,29,.5); cursor: help; }
.icon-library .forum-icon { width: 26px; height: 26px; }
.icon-library small { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.category-manager { display: grid; gap: 13px; }
.category-editor { overflow: hidden; border: 1px solid rgba(128,184,226,.17); border-radius: 13px; background: linear-gradient(145deg, rgba(13,30,52,.82), rgba(6,15,29,.72)); box-shadow: 0 15px 36px rgba(0,0,0,.13); }
.category-editor.is-child { margin-left: 36px; border-left-color: rgba(107,191,245,.5); }
.category-editor > summary { min-height: 76px; padding: 15px 19px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 13px; list-style: none; cursor: pointer; }
.category-editor > summary::-webkit-details-marker { display: none; }
.category-editor > summary > span:nth-child(2) { display: grid; font-weight: 800; }
.category-editor > summary small { color: #6fcaff; font-size: 8px; letter-spacing: .12em; }
.category-editor > summary em { color: #72849a; font-size: 9px; font-style: normal; text-transform: uppercase; }
.category-summary-icon,
.category-icon-preview { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; color: #91d9ff; background: rgba(22,55,88,.55); }
.category-summary-icon .forum-icon,
.category-icon-preview .forum-icon { width: 25px; height: 25px; }
.category-editor > form { padding: 24px; display: grid; gap: 17px; border-top: 1px solid rgba(126,180,224,.14); }
.category-editor-main { display: grid; grid-template-columns: 52px 1fr; align-items: end; gap: 13px; }
.category-editor label { display: grid; gap: 7px; color: #b8c7d9; font-size: 10px; font-weight: 800; }
.category-editor input,
.category-editor select,
.category-editor textarea { width: 100%; }
.category-flags { display: flex; flex-wrap: wrap; gap: 12px; }
.category-flags label { padding: 10px 13px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(125,177,219,.14); border-radius: 8px; background: rgba(5,14,27,.44); }
.category-flags input { width: auto; }
.category-editor-actions { display: flex; justify-content: flex-end; }
.delete-category-form { padding-top: 0 !important; display: flex !important; align-items: center; border-top: 0 !important; }
.delete-category-form .danger-button { margin-left: auto; }

@media (max-width: 950px) {
    .forum-admin-layout { grid-template-columns: 1fr; }
    .icon-library { position: static; }
    .icon-library > div { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 620px) {
    .forum-admin-shell { width: min(100% - 24px, 1400px); padding-top: 24px; }
    .forum-admin-heading { align-items: start; flex-direction: column; }
    .icon-library > div { grid-template-columns: repeat(4, 1fr); }
    .category-editor.is-child { margin-left: 14px; }
    .category-editor > summary { grid-template-columns: 38px 1fr; }
    .category-editor > summary em { display: none; }
    .category-editor > form { padding: 18px 15px; }
    .category-editor-main { grid-template-columns: 42px 1fr; }
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--ink); color-scheme: dark; }

body {
    margin: 0;
    color: var(--paper);
    background:
        linear-gradient(rgba(105, 149, 210, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(105, 149, 210, .035) 1px, transparent 1px),
        var(--ink);
    background-size: 48px 48px;
    font: 14px/1.55 var(--ui);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 72% 5%, rgba(53, 115, 218, .12), transparent 34rem);
    z-index: -1;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: #f6fbff; font-family: var(--serif); line-height: 1.08; }
h1 { font-size: clamp(42px, 5vw, 72px); }
h2 { font-size: clamp(30px, 3.2vw, 46px); }
h3 { font-size: 22px; }

.eyebrow {
    margin: 0 0 8px;
    color: var(--ice);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 92px;
    padding: 0 max(24px, calc((100vw - 1180px) / 2));
    display: grid;
    grid-template-columns: 220px 1fr auto auto;
    align-items: center;
    gap: 26px;
    border-bottom: 1px solid #33486f;
    background: rgba(7, 12, 27, .94);
    box-shadow: 0 6px 22px rgba(0, 0, 0, .24);
    backdrop-filter: blur(12px);
}

.site-brand { width: 200px; height: 88px; display: flex; align-items: center; overflow: visible; }
.site-brand img { width: auto; height: auto; max-width: 190px; max-height: 78px; object-fit: contain; }

.site-header nav { align-self: stretch; display: flex; align-items: stretch; justify-content: center; }
.site-header nav a {
    position: relative;
    padding: 0 18px;
    display: flex;
    align-items: center;
    color: #b4c1d4;
    font-size: 13px;
    font-weight: 700;
}
.site-header nav a:hover, .site-header nav a.active { color: #fff; }
.site-header nav a.active::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 3px;
    background: var(--ice);
}

.world-pill { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.world-pill i, .server-state i, .presence, .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px rgba(119, 216, 155, .85);
}
.world-pill strong { color: #fff; }

.play-link, .button {
    min-height: 42px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 800;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.play-link, .button.primary {
    color: #061122;
    border-color: #a7dcff;
    background: linear-gradient(#a9dcff, #66b8f5);
    box-shadow: inset 0 1px rgba(255,255,255,.65), 0 5px 16px rgba(20, 103, 185, .22);
}
.play-link:hover, .button.primary:hover { background: #c6ebff; transform: translateY(-1px); }
.button.secondary, .button.ghost {
    color: var(--ice-bright);
    border-color: #46618e;
    background: #111c36;
}
.button.secondary:hover, .button.ghost:hover { border-color: var(--ice); background: #182a4d; }
.button.large { min-height: 48px; padding: 12px 22px; }
.button.full { width: 100%; }

.home-hero {
    position: relative;
    min-height: 650px;
    padding: 92px max(24px, calc((100vw - 1180px) / 2));
    display: grid;
    grid-template-columns: minmax(0, 680px);
    align-items: center;
    gap: 74px;
    overflow: hidden;
    border-bottom: 1px solid #33496f;
    background-image:
        linear-gradient(90deg, rgba(5, 10, 24, .97) 0%, rgba(5, 10, 24, .80) 38%, rgba(5, 10, 24, .2) 70%),
        linear-gradient(0deg, var(--ink) 0%, transparent 28%),
        url("brand/ice-fortress.png");
    background-position: center;
    background-size: cover;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 100% 5px;
    opacity: .18;
}

.hero-inner { position: relative; z-index: 1; }
.hero-inner { max-width: 640px; }
.hero-inner h1 { margin: 0 0 20px; text-shadow: 0 3px 20px rgba(0,0,0,.55); }
.hero-inner h1 em { color: var(--ice-bright); font-style: normal; }
.hero-lede { max-width: 580px; margin-bottom: 28px; color: #b9c7da; font-size: 17px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { margin: 44px 0 0; display: flex; gap: 38px; }
.hero-stats div { padding-left: 13px; border-left: 2px solid #507ab8; }
.hero-stats dt { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.hero-stats dd { margin: 3px 0 0; color: #fff; font: 700 22px var(--serif); }

.content-section, .hiscores-shell, .info-page { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.content-section { padding: 80px 0; }
.content-section.compact-top { padding-top: 68px; }
.section-heading { margin-bottom: 24px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin: 0; }
.text-link { color: var(--ice); font-weight: 700; }
.text-link:hover { color: #fff; }

.leader-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.board-card { border: 1px solid var(--line); background: #0e172e; box-shadow: 0 10px 30px rgba(0,0,0,.16); }
.board-card > header { padding: 18px 20px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); background: #13203c; }
.board-card > header img { width: auto; height: auto; max-width: 36px; max-height: 32px; object-fit: contain; image-rendering: pixelated; }
.board-card header small { color: var(--ice); font-size: 9px; letter-spacing: .12em; }
.board-card h3 { margin: 2px 0 0; font-size: 21px; }
.mini-board { margin: 0; padding: 0; list-style: none; }
.mini-board li { min-height: 65px; padding: 10px 18px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid rgba(70, 91, 130, .35); }
.mini-board li:last-child { border: 0; }
.mini-board li:hover { background: rgba(84, 135, 203, .08); }
.mini-board a { min-width: 0; display: grid; }
.mini-board a b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-board small { color: var(--muted); font-size: 10px; }
.mini-board strong { color: var(--ice-bright); text-align: right; font-family: var(--serif); font-size: 18px; }
.mini-board strong small { display: block; font: 8px var(--ui); letter-spacing: .1em; }
.rank-medal { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #4e6590; background: #111d37; font-size: 11px; font-weight: 800; }
.rank-1 { color: #1a1305; border-color: #e8cb79; background: #d5b45c; }
.rank-2 { color: #111; border-color: #d6e3ed; background: #aabcc8; }
.rank-3 { color: #150d06; border-color: #d99f74; background: #a96d47; }
.activity-mini { width: 30px; height: 30px; display: grid; place-items: center; }
.activity-mini img { max-width: 28px; max-height: 28px; object-fit: contain; image-rendering: pixelated; }

.feature-band {
    position: relative;
    border-block: 1px solid #344d79;
    background-image: linear-gradient(90deg, rgba(8,14,31,.96), rgba(8,14,31,.72)), url("brand/frozen-pass.png");
    background-position: center;
    background-size: cover;
}
.feature-grid { padding-block: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.feature-grid article { min-height: 230px; padding: 12px 34px; border-right: 1px solid rgba(134, 176, 228, .28); }
.feature-grid article:first-child { padding-left: 0; }
.feature-grid article:last-child { padding-right: 0; border-right: 0; }
.feature-grid article > span { color: var(--ice); font: 700 12px var(--ui); letter-spacing: .14em; }
.feature-grid h3 { margin: 20px 0 12px; font-size: 27px; }
.feature-grid p { color: #b9c6d8; }
.feature-grid a { color: var(--ice-bright); font-weight: 700; }

.mastery { padding-block: 65px 84px; }
.skill-ribbon { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-ribbon a { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #2d4267; background: #0f192f; }
.skill-ribbon a:hover { border-color: var(--ice); background: #17294a; }
.skill-ribbon img { width: auto; height: auto; max-width: 28px; max-height: 28px; object-fit: contain; image-rendering: pixelated; }

.site-footer {
    min-height: 150px;
    padding: 34px max(24px, calc((100vw - 1180px) / 2));
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 18px 40px;
    border-top: 1px solid #2d4267;
    background: #070c19;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: auto; height: auto; max-width: 42px; max-height: 42px; object-fit: contain; }
.footer-brand span { display: grid; }
.footer-brand b { font: 700 20px var(--serif); }
.footer-brand small, .site-footer p { color: #7788a3; font-size: 11px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer nav a { color: #a9b7ca; font-size: 12px; font-weight: 700; }
.site-footer nav a:hover { color: var(--ice); }
.site-footer p { grid-column: 1 / -1; margin: 0; padding-top: 16px; border-top: 1px solid #17233a; }

.alert { width: 100%; padding: 13px 15px; border: 1px solid #785b27; background: #2a2112; color: #f4d694; }
.alert.error { border-color: #873f4d; background: #32171e; color: #ffb3b9; }
.alert.success { border-color: #347253; background: #102b21; color: #a6ebc2; }
.public-alert { width: min(1180px, calc(100% - 40px)); margin: 22px auto 0; }

.info-page { min-height: 620px; padding: 56px 0 90px; }
.info-hero {
    position: relative;
    min-height: 280px;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    border: 1px solid #415d8b;
    background-image: linear-gradient(90deg, rgba(7,13,29,.96), rgba(7,13,29,.45)), url("brand/frozen-pass.png");
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}
.info-hero::before { content: ""; position: absolute; inset: 0; border: 6px solid rgba(128,200,255,.06); pointer-events: none; }
.info-hero > * { position: relative; z-index: 1; }
.info-hero h1 { margin: 0 0 12px; font-size: clamp(42px, 5vw, 64px); }
.info-hero > p:last-child { max-width: 680px; margin: 0; color: #c0ccdc; font-size: 16px; }
.info-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.info-card { min-height: 190px; padding: 28px; border: 1px solid var(--line); background: #0f182e; }
.info-card.full { grid-column: 1 / -1; }
.info-card h2 { margin-bottom: 12px; font-size: 25px; }
.info-card p, .info-card li { color: #afbdd0; }
.info-card ul { padding-left: 20px; }
.info-card .button { margin-top: 10px; }
.tier-list { border-top: 1px solid var(--line); }
.tier-row { padding: 15px 4px; display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; border-bottom: 1px solid var(--line); }
.tier-row span { color: var(--muted); }
.tier-row strong { color: var(--ice); }

.hiscores-shell { padding: 42px 0 80px; }
.page-mast { min-height: 150px; margin-bottom: 20px; padding: 28px 32px; display: flex; align-items: end; justify-content: space-between; gap: 30px; border: 1px solid #3d5988; background-image: linear-gradient(90deg, rgba(11,19,41,.98), rgba(11,19,41,.55)), url("brand/login-scene.png"); background-size: cover; background-position: center 35%; }
.page-mast h1 { margin: 0 0 7px; font-size: 46px; }
.page-mast p:last-child { margin: 0; color: var(--muted); }
.mast-stat { min-width: 135px; padding: 14px 16px; border-left: 2px solid var(--ice); background: rgba(7,13,28,.72); }
.mast-stat span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.mast-stat b { font: 700 25px var(--serif); }

.hiscores-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr) 240px; align-items: start; gap: 16px; }
.category-panel, .ranking-panel, .search-panel > section, .profile-card { border: 1px solid var(--line); background: #0e172c; }
.category-heading, .ranking-title { border-bottom: 1px solid var(--line); background: #15213c; }
.category-heading { padding: 14px; display: flex; align-items: center; gap: 10px; }
.category-heading img { width: auto; height: auto; max-width: 28px; max-height: 28px; object-fit: contain; image-rendering: pixelated; }
.category-panel nav { max-height: 840px; padding: 8px; overflow-y: auto; scrollbar-color: #48658f #0b1428; }
.category-panel nav h3 { margin: 14px 9px 6px; color: #7184a2; font: 800 9px var(--ui); letter-spacing: .14em; text-transform: uppercase; }
.category-panel nav a { min-height: 36px; padding: 6px 8px; display: flex; align-items: center; gap: 9px; color: #aebcd0; border-left: 2px solid transparent; font-size: 12px; }
.category-panel nav a:hover { color: #fff; background: #14213c; }
.category-panel nav a.active { color: #fff; border-left-color: var(--ice); background: #1a2b4d; }
.category-panel nav img { width: auto; height: auto; max-width: 25px; max-height: 25px; flex: 0 0 auto; object-fit: contain; image-rendering: pixelated; }

.ranking-title { min-height: 90px; padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.ranking-title > img { width: auto; height: auto; max-width: 36px; max-height: 32px; flex: 0 0 auto; object-fit: contain; image-rendering: pixelated; }
.ranking-title h2 { margin: 0 0 3px; font-size: 29px; }
.ranking-title span { color: var(--muted); font-size: 11px; }
.table-scroll { overflow-x: auto; }
.classic-table { width: 100%; border-collapse: collapse; }
.classic-table th { padding: 11px 14px; color: #89a1c0; border-bottom: 1px solid #41577f; background: #0b1326; font-size: 9px; letter-spacing: .11em; text-align: left; text-transform: uppercase; }
.classic-table td { padding: 12px 14px; border-bottom: 1px solid rgba(57,76,111,.52); color: #c6d0de; }
.classic-table tbody tr:nth-child(even) { background: rgba(83,108,150,.045); }
.classic-table tbody tr:hover { background: rgba(72,132,204,.11); }
.classic-table th:not(:nth-child(2)), .classic-table td:not(:nth-child(2)) { text-align: right; }
.classic-table th:first-child, .classic-table td:first-child { width: 68px; text-align: center; color: var(--ice-bright); font-weight: 700; }
.rank-player { display: flex; align-items: center; gap: 9px; color: #fff; }
.status-dot { flex: 0 0 auto; background: #536076; box-shadow: none; }
.status-dot.online { background: var(--success); box-shadow: 0 0 8px rgba(119,216,155,.65); }

.search-panel { display: grid; gap: 12px; }
.search-panel > section { padding: 16px; }
.search-panel h3 { margin-bottom: 13px; font: 700 16px var(--serif); }
.search-panel form { display: grid; gap: 9px; }
.search-panel label, .settings-form label, .skill-card label, .login-card label { color: #b8c4d5; font-size: 11px; font-weight: 700; }
input, select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    color: #eef6ff;
    border: 1px solid #384e74;
    border-radius: 3px;
    outline: 0;
    background: #091224;
}
input:focus, select:focus { border-color: var(--ice); box-shadow: 0 0 0 2px rgba(128,200,255,.10); }
.world-summary dl { margin: 0; }
.world-summary dl div { padding: 8px 0; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.world-summary dt { color: var(--muted); }
.world-summary dd { margin: 0; color: var(--ice-bright); font-weight: 700; }

.profile-card { overflow: hidden; }
.profile-hero { padding: 30px; display: flex; align-items: end; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg, #152343, #101a31); }
.profile-hero h2 { margin: 5px 0 11px; font-size: 43px; }
.back-to-ranks { display: inline-block; margin-bottom: 20px; color: var(--ice); font-size: 12px; font-weight: 700; }
.badges { display: flex; gap: 7px; flex-wrap: wrap; }
.badges span { padding: 5px 8px; color: #b9c8db; border: 1px solid #405779; background: #0b1427; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.badges .gold { color: #ead28e; border-color: #79622f; }
.badges .green { color: #9ce5b6; border-color: #377554; }
.profile-summary { margin: 0; display: grid; grid-template-columns: repeat(2, 130px); }
.profile-summary div { padding: 12px 14px; border: 1px solid var(--line); margin: -1px 0 0 -1px; }
.profile-summary dt { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.profile-summary dd { margin: 3px 0 0; color: #fff; font: 700 20px var(--serif); }
.profile-facts { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.profile-facts div { padding: 16px; border-right: 1px solid var(--line); }
.profile-facts div:last-child { border-right: 0; }
.profile-facts span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.profile-facts b { display: block; margin-top: 4px; font-size: 12px; }
.profile-block { border-bottom: 1px solid var(--line); }
.profile-block > header { padding: 18px 22px; border-bottom: 1px solid var(--line); background: #121e37; }
.profile-block h3 { margin: 0; }
.skill-ledger td:first-child { text-align: left; }
.skill-ledger td:first-child a { display: flex; align-items: center; gap: 10px; }
.skill-ledger img { width: auto; height: auto; max-width: 27px; max-height: 27px; object-fit: contain; image-rendering: pixelated; }
.record-columns { display: grid; grid-template-columns: 1fr 1fr; }
.record-columns .profile-block:first-child { border-right: 1px solid var(--line); }
.record-list a { min-height: 58px; padding: 10px 17px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; border-bottom: 1px solid rgba(58,79,116,.5); }
.record-list a:hover { background: rgba(75,129,196,.10); }
.record-list img { width: auto; height: auto; max-width: 30px; max-height: 30px; object-fit: contain; image-rendering: pixelated; }
.record-list span { display: grid; }
.record-list small { color: var(--muted); font-size: 10px; }
.record-list strong { color: var(--ice-bright); font: 700 18px var(--serif); }
.empty-row { padding: 22px !important; color: var(--muted) !important; text-align: center !important; }

/* Live world activity */
.live-now { padding-bottom: 0; }
.live-feed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.live-feed-card, .event-board { border: 1px solid var(--line); background: #0e172c; box-shadow: 0 10px 30px rgba(0,0,0,.16); }
.live-feed-card > header, .event-board > header { min-height: 82px; padding: 17px 19px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); background: #13203c; }
.live-feed-card header small { color: var(--ice); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.live-feed-card h3 { margin: 3px 0 0; font-size: 21px; }
.feed-mark { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border: 1px solid #506b98; background: #0b152d; font: 800 17px var(--serif); }
.tournament-mark { color: #f4d27f; border-color: #826d3a; }
.boost-mark { color: var(--ice-bright); }
.feed-list > div { min-height: 63px; padding: 11px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid rgba(70,91,130,.38); }
.feed-list > div:last-child { border-bottom: 0; }
.feed-list span { display: grid; }
.feed-list small { color: var(--muted); font-size: 10px; }
.feed-list strong { color: var(--ice-bright); white-space: nowrap; font: 700 16px var(--serif); }
.feed-list > p { min-height: 82px; margin: 0; padding: 24px 18px; color: var(--muted); }
.hall-of-fame { padding-top: 64px; }

/* Store */
.store-shell, .events-shell { width: min(1180px, calc(100% - 40px)); min-height: 700px; margin-inline: auto; padding: 44px 0 90px; }
.store-mast, .events-mast { min-height: 240px; margin-bottom: 20px; padding: 38px 42px; display: flex; align-items: end; justify-content: space-between; gap: 30px; overflow: hidden; border: 1px solid #415d8b; background-image: linear-gradient(90deg, rgba(7,13,29,.97), rgba(7,13,29,.42)), url("brand/frozen-pass.png"); background-size: cover; background-position: center; box-shadow: var(--shadow); }
.store-mast > div:first-child { max-width: 680px; }
.store-mast h1, .events-mast h1 { margin: 0 0 12px; font-size: clamp(42px, 5vw, 62px); }
.store-mast p:last-child, .events-mast > p:last-child { margin: 0; color: #bdcadd; font-size: 16px; }
.store-count { min-width: 140px; padding: 16px 18px; border-left: 2px solid var(--ice); background: rgba(7,13,28,.78); }
.store-count span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.store-count b { font: 700 28px var(--serif); }
.store-filters { margin: 18px 0; padding: 16px; display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; align-items: end; gap: 12px; border: 1px solid var(--line); background: #0d172c; }
.store-filters label { display: grid; gap: 6px; }
.store-filters label span { color: #b8c4d5; font-size: 10px; font-weight: 700; }
.store-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-card { min-height: 270px; padding: 22px; display: flex; flex-direction: column; border: 1px solid var(--line); background: #0e172c; transition: border-color .15s ease, transform .15s ease; }
.product-card:hover { border-color: #5273a7; transform: translateY(-2px); }
.product-icon { width: 64px; height: 58px; margin-bottom: 16px; display: grid; place-items: center; border: 1px solid #30496f; background: #091327; }
.product-icon img { width: auto; height: auto; max-width: 36px; max-height: 32px; image-rendering: pixelated; object-fit: contain; }
.product-category { margin: 0 0 5px; color: var(--ice); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.product-copy h2 { margin: 0 0 8px; font-size: 21px; }
.product-copy > p:last-child { color: var(--muted); font-size: 11px; }
.product-footer { margin-top: auto; padding-top: 16px; display: flex; align-items: end; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(64,84,122,.56); }
.product-footer > strong { display: grid; color: var(--ice-bright); text-align: right; font: 700 20px var(--serif); }
.product-footer strong small { color: var(--muted); font: 9px var(--ui); text-transform: uppercase; }
.product-footer del { color: #75859f; font: 10px var(--ui); }
.product-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.product-tags small { padding: 4px 6px; color: #aebbd0; border: 1px solid #344b70; font-size: 8px; text-transform: uppercase; }
.catalogue-empty { grid-column: 1 / -1; min-height: 260px; padding: 48px; display: grid; place-content: center; text-align: center; border: 1px solid var(--line); background: #0e172c; }
.catalogue-empty h2 { margin-bottom: 8px; }
.catalogue-empty p { color: var(--muted); }
.store-note { margin-top: 24px; padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border: 1px solid #3c5987; background: #111d37; }
.store-note h2 { margin: 0 0 8px; font-size: 28px; }
.store-note p:last-child { max-width: 720px; margin: 0; color: var(--muted); }

/* Events */
.events-mast { min-height: 260px; flex-direction: column; align-items: start; justify-content: end; }
.events-mast > p:last-child { max-width: 700px; }
.events-columns { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 18px; }
.event-board > header h2 { margin: 0; font-size: 27px; }
.event-board > header .eyebrow { margin-bottom: 4px; }
.event-rows article { min-height: 96px; padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 20px; border-bottom: 1px solid rgba(70,91,130,.38); }
.event-rows article:last-child { border-bottom: 0; }
.event-rows h3 { margin: 0 0 5px; font-size: 19px; }
.event-rows p { margin: 0; color: var(--muted); font-size: 10px; }
.event-rows dl { margin: 0; display: flex; gap: 16px; }
.event-rows dl div { display: grid; }
.event-rows dt { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.event-rows dd { margin: 2px 0 0; font-weight: 700; }
.event-rows article > strong { color: var(--ice-bright); white-space: nowrap; font: 700 16px var(--serif); }
.event-rows .boost-row { grid-template-columns: 1fr auto; }
.event-empty { min-height: 180px; padding: 34px; display: grid; place-content: center; text-align: center; }
.event-empty h3 { margin-bottom: 7px; }
.event-empty p { margin: 0; color: var(--muted); }

/* Staff area */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 72px 20px; background-image: linear-gradient(90deg, rgba(6,10,24,.8), rgba(6,10,24,.45)), url("brand/ice-fortress.png"); background-size: cover; background-position: center; }
.back-link { position: fixed; top: 24px; left: 26px; color: #c0cee1; font-weight: 700; }
.login-card { width: min(430px, 100%); padding: 32px; border: 1px solid #6385b7; background: rgba(8,15,33,.94); box-shadow: var(--shadow); }
.login-logo { width: auto; height: auto; max-width: 300px; max-height: 140px; margin: -8px auto 18px; object-fit: contain; }
.login-card h1 { margin: 0 0 12px; text-align: center; font-size: 38px; }
.login-card .eyebrow, .login-card .lede, .login-card .fine-print { text-align: center; }
.login-card .lede { color: var(--muted); }
.login-card form { display: grid; gap: 15px; margin-top: 23px; }
.login-card label { display: grid; gap: 6px; }
.fine-print { margin: 20px 0 0; color: #71819a; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }

.topbar { position: sticky; top: 0; z-index: 40; min-height: 70px; padding: 0 24px; display: grid; grid-template-columns: 250px 1fr auto auto; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); background: #080e1d; }
.wordmark { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 18px; }
.wordmark img { width: auto; height: auto; max-width: 34px; max-height: 34px; object-fit: contain; }
.admin-nav { height: 70px; display: flex; justify-content: center; }
.admin-nav a { padding: 0 16px; display: flex; align-items: center; color: var(--muted); font-size: 12px; font-weight: 700; border-bottom: 2px solid transparent; }
.admin-nav a.active, .admin-nav a:hover { color: #fff; border-bottom-color: var(--ice); }
.server-state { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.server-state.offline i { background: var(--danger); box-shadow: 0 0 8px rgba(255,138,138,.7); }
.logout { color: #9eacc1; font-size: 11px; }

.app-shell { min-height: calc(100vh - 70px); display: grid; grid-template-columns: 290px minmax(0, 1fr); }
.sidebar { position: sticky; top: 70px; height: calc(100vh - 70px); padding: 23px 16px; overflow-y: auto; border-right: 1px solid var(--line); background: #0a1122; }
.search { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.search button { padding: 0 12px; color: var(--ice-bright); border: 1px solid #3e577f; border-radius: 3px; background: #121e37; cursor: pointer; }
.player-list { margin-top: 16px; display: grid; gap: 5px; }
.player-list > a { min-height: 58px; padding: 8px 10px; display: grid; grid-template-columns: 36px 1fr 8px; align-items: center; gap: 10px; border: 1px solid transparent; }
.player-list > a:hover { background: #121e36; }
.player-list > a.active { border-color: #3d5780; background: #172641; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ice-bright); border: 1px solid #36537d; background: #12213d; font-weight: 800; }
.player-list span:nth-child(2) { min-width: 0; display: grid; }
.player-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-list small { color: var(--muted); font-size: 10px; }
.presence { background: #526077; box-shadow: none; }
.presence.online { background: var(--success); box-shadow: 0 0 8px var(--success); }
.empty-list { padding: 18px 8px; color: var(--muted); }
.content { min-width: 0; padding: 34px; }
.content > * { width: min(1320px, 100%); margin-inline: auto; }
.empty-state { min-height: 620px; display: grid; place-content: center; text-align: center; }
.empty-state .rune { margin: 0 auto 20px; color: var(--ice); font-size: 58px; }
.empty-state h1 { margin: 8px 0 12px; }
.empty-state > p:last-child { max-width: 480px; color: var(--muted); }
.player-heading { margin-bottom: 22px; padding: 5px 0 22px; display: flex; align-items: end; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); }
.player-heading h1 { margin: 0 0 12px; font-size: 48px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); }
.summary-grid div { padding: 13px 16px; border-left: 1px solid var(--line); }
.summary-grid small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.summary-grid strong { font: 700 18px var(--serif); }
.panel { margin-bottom: 20px; border: 1px solid var(--line); background: #0e172c; }
.panel-title { min-height: 82px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: #121e37; }
.panel-title h2 { margin: 0; font-size: 27px; }
.panel-title > p { margin: 0; color: var(--muted); font-size: 11px; }
.settings-form { padding: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-form label { display: grid; gap: 7px; }
.settings-form label span { color: var(--muted); font-weight: 400; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.skill-card { min-height: 84px; padding: 13px 16px; display: grid; grid-template-columns: 42px minmax(100px, 1fr) 82px minmax(130px, 1.3fr); align-items: end; gap: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.skill-card:nth-child(2n) { border-right: 0; }
.skill-icon { width: 38px; height: 38px; align-self: center; display: grid; place-items: center; border: 1px solid #3d5780; background: #14213a; }
.skill-icon img { width: auto; height: auto; max-width: 28px; max-height: 28px; object-fit: contain; image-rendering: pixelated; }
.skill-name { align-self: center; display: grid; }
.skill-name small { color: var(--muted); font-size: 9px; }
.skill-card label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.skill-card input { min-height: 36px; }
.form-actions.sticky { position: sticky; bottom: 0; min-height: 70px; padding: 13px 20px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-bright); background: rgba(10,17,34,.96); backdrop-filter: blur(8px); }
.form-actions.sticky span { color: var(--muted); font-size: 10px; }

@media (min-width: 1500px) {
    .skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .skill-card:nth-child(2n) { border-right: 1px solid var(--line); }
    .skill-card:nth-child(3n) { border-right: 0; }
}

@media (max-width: 1050px) {
    .site-header { grid-template-columns: 190px 1fr auto; }
    .site-header nav { justify-content: flex-start; overflow-x: auto; }
    .world-pill { display: none; }
    .home-hero { grid-template-columns: minmax(0, 680px); gap: 0; }
    .store-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .store-filters { grid-template-columns: 1fr 1fr; }
    .hiscores-grid { grid-template-columns: 210px minmax(0, 1fr); }
    .search-panel { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
    .profile-facts { grid-template-columns: repeat(3, 1fr); }
    .profile-facts div:nth-child(3) { border-right: 0; }
    .app-shell { grid-template-columns: 250px minmax(0, 1fr); }
    .skill-card { grid-template-columns: 38px 1fr 72px; }
    .skill-card label:last-child { grid-column: 2 / -1; }
}

@media (max-width: 760px) {
    .site-header { position: relative; min-height: auto; padding: 8px 16px 0; grid-template-columns: 1fr auto; gap: 4px 12px; }
    .site-brand { width: 138px; height: 66px; }
    .site-brand img { width: auto; height: auto; max-width: 132px; max-height: 60px; }
    .play-link { min-height: 38px; padding: 8px 13px; }
    .site-header nav { grid-column: 1 / -1; order: 3; height: 42px; justify-content: flex-start; border-top: 1px solid #1f2d49; }
    .site-header nav a { padding-inline: 14px; }
    .site-header nav a.active::after { left: 14px; right: 14px; }
    .home-hero { min-height: 670px; padding: 66px 20px 54px; grid-template-columns: 1fr; align-content: center; background-image: linear-gradient(90deg, rgba(5,10,24,.94), rgba(5,10,24,.64)), linear-gradient(0deg, var(--ink), transparent 32%), url("brand/ice-fortress.png"); background-position: 65% center; }
    .hero-stats { gap: 18px; flex-wrap: wrap; }
    .hero-stats div { min-width: 92px; }
    .content-section, .hiscores-shell, .info-page { width: min(100% - 28px, 1180px); }
    .content-section { padding-block: 55px; }
    .leader-grid, .feature-grid, .info-grid, .record-columns { grid-template-columns: 1fr; }
    .live-feed-grid, .events-columns { grid-template-columns: 1fr; }
    .store-shell, .events-shell { width: min(100% - 28px, 1180px); padding-top: 28px; }
    .store-mast, .events-mast { min-height: 260px; padding: 28px; }
    .store-count { display: none; }
    .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .store-note { align-items: start; flex-direction: column; }
    .feature-grid { padding-block: 45px; }
    .feature-grid article, .feature-grid article:first-child, .feature-grid article:last-child { min-height: auto; padding: 24px 0; border-right: 0; border-bottom: 1px solid rgba(134,176,228,.25); }
    .feature-grid article:last-child { border-bottom: 0; }
    .site-footer { grid-template-columns: 1fr; }
    .site-footer nav { flex-wrap: wrap; gap: 12px 18px; }
    .info-page { padding-top: 28px; }
    .info-hero { min-height: 260px; padding: 28px; }
    .info-card.full { grid-column: auto; }
    .tier-row { grid-template-columns: 1fr; gap: 3px; }
    .page-mast { min-height: 140px; padding: 24px; align-items: start; }
    .mast-stat { display: none; }
    .hiscores-grid { grid-template-columns: 1fr; }
    .category-panel nav { max-height: 280px; }
    .search-panel { grid-column: auto; grid-template-columns: 1fr; }
    .profile-hero { align-items: start; flex-direction: column; }
    .profile-summary { width: 100%; grid-template-columns: repeat(2, 1fr); }
    .profile-facts { grid-template-columns: repeat(2, 1fr); }
    .profile-facts div { border-right: 1px solid var(--line) !important; }
    .profile-facts div:nth-child(2n) { border-right: 0 !important; }
    .record-columns .profile-block:first-child { border-right: 0; }
    .topbar { min-height: 62px; padding-inline: 14px; grid-template-columns: 1fr auto; }
    .admin-nav, .server-state { display: none; }
    .app-shell { display: block; }
    .sidebar { position: relative; top: auto; width: 100%; height: auto; max-height: 350px; border-right: 0; border-bottom: 1px solid var(--line); }
    .content { padding: 22px 14px; }
    .player-heading { align-items: start; flex-direction: column; }
    .summary-grid { width: 100%; grid-template-columns: repeat(3, 1fr); }
    .summary-grid div { padding-inline: 9px; }
    .settings-form, .skills-grid { grid-template-columns: 1fr; }
    .skill-card, .skill-card:nth-child(2n), .skill-card:nth-child(3n) { border-right: 0; }
    .panel-title { align-items: flex-start; flex-direction: column; }
    .form-actions.sticky { position: static; }
}

@media (max-width: 440px) {
    h1 { font-size: 40px; }
    .hero-actions .button { width: 100%; }
    .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
    .hero-stats div { min-width: 0; }
    .hero-stats dd { font-size: 17px; }
    .section-heading { align-items: start; flex-direction: column; }
    .mini-board li { padding-inline: 12px; grid-template-columns: 30px 1fr auto; }
    .classic-table th, .classic-table td { padding-inline: 9px; }
    .skill-card { grid-template-columns: 38px 1fr 70px; }
    .store-grid, .store-filters { grid-template-columns: 1fr; }
    .product-card { min-height: 240px; }
    .event-rows article { grid-template-columns: 1fr auto; }
    .event-rows dl { grid-column: 1 / -1; }
}

/* Cohesive Avalis refinement */
.play-link, .button { border-radius: 9px; }
input, select { border-radius: 9px; }
.alert { border-radius: 10px; }

.info-hero,
.page-mast,
.store-mast,
.events-mast {
    position: relative;
    min-height: 230px;
    margin-bottom: 28px;
    padding: 42px 46px;
    align-items: end;
    overflow: hidden;
    border: 1px solid rgba(99, 137, 191, .62);
    border-radius: 18px;
    background-image:
        linear-gradient(90deg, rgba(6, 12, 28, .97) 0%, rgba(7, 16, 35, .78) 48%, rgba(9, 22, 47, .28) 100%),
        url("brand/frozen-pass.png");
    background-position: center;
    background-size: cover;
    box-shadow: 0 22px 54px rgba(0, 4, 15, .30);
}
.info-hero::before,
.page-mast::before,
.store-mast::before,
.events-mast::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(154, 215, 255, .06), transparent 45%);
    pointer-events: none;
}
.info-hero > *, .page-mast > *, .store-mast > *, .events-mast > * { position: relative; z-index: 1; }
.info-hero h1, .page-mast h1, .store-mast h1, .events-mast h1 {
    margin: 0 0 11px;
    font-size: clamp(42px, 5vw, 62px);
}
.info-hero > p:last-child, .page-mast p:last-child, .store-mast p:last-child, .events-mast > p:last-child {
    max-width: 720px;
    margin: 0;
    color: #c2cede;
    font-size: 16px;
}
.events-mast { flex-direction: column; align-items: flex-start; justify-content: end; }
.mast-stat, .store-count { border: 0; border-radius: 12px; background: rgba(8, 17, 36, .72); box-shadow: inset 0 0 0 1px rgba(128, 200, 255, .22); }

.board-card,
.live-feed-card,
.event-board,
.info-card,
.product-card,
.category-panel,
.ranking-panel,
.search-panel > section,
.profile-card,
.panel {
    overflow: hidden;
    border-color: rgba(75, 104, 151, .62);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(18, 31, 58, .96), rgba(11, 20, 39, .98));
    box-shadow: 0 16px 40px rgba(0, 4, 15, .18);
}
.board-card > header,
.live-feed-card > header,
.event-board > header,
.category-heading,
.ranking-title,
.panel-title {
    background: rgba(25, 42, 75, .66);
    border-bottom-color: rgba(79, 107, 153, .48);
}
.live-feed-grid, .leader-grid { gap: 24px; }
.live-feed-card > header { min-height: 92px; padding: 21px 23px; }
.feed-list > div { padding: 17px 22px; }
.feed-list > p { padding: 25px 22px; }
.board-card > header { padding: 21px 23px; }
.mini-board li { min-height: 70px; padding: 12px 22px; border-bottom-color: rgba(70, 91, 130, .28); }
.rank-medal, .skill-ribbon a, .activity-mini { border-radius: 9px; }
.section-heading { margin-bottom: 27px; }

.info-grid { gap: 22px; }
.info-card { min-height: 180px; padding: 31px; }
.info-card p:last-child { margin-bottom: 0; }
.store-filters {
    padding: 18px;
    border-color: rgba(75, 104, 151, .58);
    border-radius: 14px;
    background: rgba(13, 24, 46, .82);
    box-shadow: 0 12px 30px rgba(0, 4, 15, .12);
}
.product-card { min-height: 270px; padding: 23px; }
.product-icon { border-radius: 12px; }
.product-tags small, .badges span { border-radius: 999px; }
.store-note { border-radius: 16px; background: linear-gradient(135deg, #132342, #0e1a33); }
.catalogue-empty { border-radius: 15px; }
.event-rows article { border-bottom-color: rgba(70, 91, 130, .28); }
.classic-table tbody tr:last-child td { border-bottom: 0; }

.credit-shop { margin: 48px 0 64px; }
.credit-shop .section-heading p:last-child, .catalogue-heading > p { margin: 7px 0 0; color: var(--muted); }
.coming-pill { padding: 7px 12px; color: var(--ice-bright); border: 1px solid rgba(128, 200, 255, .35); border-radius: 999px; background: rgba(33, 83, 137, .18); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.credit-package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.credit-package {
    position: relative;
    min-height: 285px;
    padding: 27px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(78, 108, 157, .62);
    border-radius: 17px;
    background: radial-gradient(circle at 50% 5%, rgba(56, 119, 205, .20), transparent 42%), linear-gradient(160deg, #152543, #0c172c);
    box-shadow: 0 16px 36px rgba(0, 4, 15, .18);
    text-align: center;
}
.credit-package.featured { border-color: rgba(128, 200, 255, .85); box-shadow: 0 18px 44px rgba(20, 99, 179, .18); }
.popular-tag { position: absolute; top: 14px; right: 14px; padding: 5px 9px; color: #09203a; border-radius: 999px; background: var(--ice); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.credit-coin { position: relative; width: 58px; height: 58px; margin: 5px 0 17px; display: grid; place-items: center; border: 2px solid #f2d27a; border-radius: 50%; background: linear-gradient(145deg, #f1cb62, #a96a16); box-shadow: inset 0 0 0 4px rgba(91, 48, 5, .23), 0 9px 20px rgba(0,0,0,.26); color: #65400d; font: 900 25px var(--serif); }
.credit-coin i { position: absolute; width: 45px; height: 45px; top: -8px; left: -11px; z-index: -1; border: 2px solid #e6bd55; border-radius: 50%; background: #a86a18; }
.credit-total { margin: 0; display: grid; }
.credit-total strong { color: #fff; font: 700 34px var(--serif); line-height: 1; }
.credit-total span { margin-top: 4px; color: var(--ice); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.credit-bonus { min-height: 22px; margin: 12px 0 6px; color: #c5d3e6; }
.credit-price { margin: 0 0 18px; color: #fff; font: 700 22px var(--serif); }
.credit-package .button { margin-top: auto; }
.credit-package .button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.catalogue-heading { margin: 0 0 17px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.catalogue-heading h2 { margin: 0; }

.registration-page { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; background-position: 62% center; }
.registration-card { width: calc(100vw - 40px); max-width: 570px; min-width: 0; justify-self: center; padding: 36px 40px; border-radius: 18px; border-color: rgba(121, 167, 224, .72); backdrop-filter: blur(13px); }
.registration-card .login-logo { max-width: 320px; }
.registration-card h1 { max-width: 100%; font-size: 42px; overflow-wrap: anywhere; }
.registration-card label > span { color: var(--muted); font-size: 9px; font-weight: 400; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-pair > *, .registration-card input { min-width: 0; }
.check-label { grid-template-columns: 18px 1fr !important; align-items: start; gap: 10px !important; color: #b9c7d9 !important; font-weight: 400 !important; }
.check-label input { width: 17px; min-height: 17px; margin: 2px 0 0; }
.check-label a { color: var(--ice); text-decoration: underline; }
.honeypot { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.registration-actions { margin-top: 24px; display: grid; gap: 10px; }

@media (max-width: 900px) {
    .credit-package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .site-header { width: 100%; max-width: 100vw; overflow: hidden; }
    .site-header > *, .site-header nav { min-width: 0; }
    .info-hero, .page-mast, .store-mast, .events-mast { min-height: 235px; padding: 30px; border-radius: 14px; }
    .live-feed-grid, .leader-grid, .info-grid { gap: 16px; }
    .credit-shop { margin-block: 38px 52px; }
    .credit-package-grid { gap: 13px; }
    .catalogue-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
    .credit-package-grid, .form-pair { grid-template-columns: 1fr; }
    .credit-package { min-height: 265px; }
    .registration-card { padding: 30px 22px; }
    .registration-card .login-logo { width: 100%; max-width: 300px; }
    .registration-card h1 { font-size: 32px; }
    .coming-pill { display: none; }
}

/* Staff store catalogue */
.admin-store-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 90px; }
.store-admin-heading { margin-bottom: 24px; padding: 28px 4px; display: flex; align-items: end; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); }
.store-admin-heading h1 { margin: 4px 0 8px; font-size: clamp(38px, 5vw, 55px); }
.store-admin-heading p:last-child { margin: 0; color: var(--muted); }
.catalogue-total { min-width: 120px; padding: 13px 17px; border: 1px solid var(--line); border-radius: 12px; background: #101b33; }
.catalogue-total span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.catalogue-total strong { display: block; margin-top: 2px; font: 700 25px var(--serif); }
.add-product { margin-bottom: 24px; }
.add-product summary { min-height: 82px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; border-bottom: 1px solid transparent; background: rgba(25,42,75,.66); }
.add-product[open] summary { border-bottom-color: var(--line); }
.add-product summary::-webkit-details-marker { display: none; }
.add-product summary span { display: grid; font: 700 25px var(--serif); }
.add-product summary small { color: var(--ice); font: 800 9px var(--ui); letter-spacing: .13em; }
.add-product summary b { color: var(--ice); font-size: 26px; }
.admin-product-list { display: grid; gap: 20px; }
.admin-product-card { overflow: hidden; border: 1px solid rgba(75,104,151,.62); border-radius: 15px; background: linear-gradient(145deg, rgba(18,31,58,.96), rgba(11,20,39,.98)); box-shadow: 0 16px 40px rgba(0,4,15,.18); }
.admin-product-card > header { min-height: 104px; padding: 20px 24px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); background: rgba(25,42,75,.66); }
.admin-product-card h2 { margin: 3px 0 4px; font-size: 26px; }
.admin-product-card header p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.admin-item-icon { width: 62px; height: 62px; flex: 0 0 62px; display: grid; place-items: center; border: 1px solid #405b86; border-radius: 12px; background: #091326; }
.admin-item-icon img { width: auto; height: auto; max-width: 48px; max-height: 48px; object-fit: contain; image-rendering: pixelated; }
.product-editor { padding: 22px 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.product-editor > label { display: grid; gap: 7px; color: #b8c4d5; font-size: 11px; font-weight: 700; }
.product-editor label > span { color: var(--muted); font-weight: 400; }
.product-editor fieldset { min-width: 0; margin: 0; padding: 13px 15px 15px; border: 1px solid #31486d; border-radius: 11px; grid-column: span 2; }
.product-editor fieldset:nth-of-type(2) { grid-column: span 1; }
.product-editor legend { padding: 0 7px; color: #b8c4d5; font-size: 10px; font-weight: 800; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choice-grid.compact { grid-template-columns: 1fr; }
.choice { min-width: 0; padding: 7px 9px; display: flex !important; grid-template-columns: none !important; align-items: center; gap: 7px !important; border: 1px solid #2e4366; border-radius: 8px; background: #0a1428; cursor: pointer; }
.choice input { width: 15px; min-height: 15px; margin: 0; flex: 0 0 auto; }
.choice span { overflow: hidden; color: #b9c8da !important; font-size: 9px; font-weight: 700 !important; text-overflow: ellipsis; white-space: nowrap; }
.product-editor-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.delete-product-form { padding: 0 24px 20px; display: flex; justify-content: flex-end; }
.danger-button { padding: 8px 0; color: #ff9c9c; border: 0; border-bottom: 1px solid rgba(255,126,126,.42); background: transparent; cursor: pointer; font-size: 10px; }
.danger-button:hover { color: #ffd0d0; border-color: #ff9c9c; }

@media (max-width: 900px) {
    .product-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-editor fieldset, .product-editor fieldset:nth-of-type(2) { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
    .admin-store-shell { width: min(100% - 26px, 1240px); padding-top: 25px; }
    .store-admin-heading { align-items: start; flex-direction: column; }
    .catalogue-total { display: none; }
    .product-editor { padding: 18px; grid-template-columns: 1fr; }
    .product-editor fieldset, .product-editor fieldset:nth-of-type(2) { grid-column: auto; }
    .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-product-card > header { padding: 17px; }
}

/* ========================================================================== */
/* Avalis realm redesign                                                      */
/* ========================================================================== */
:root {
    --realm: #070b15;
    --realm-soft: #0b1221;
    --realm-panel: #10192b;
    --realm-panel-2: #142038;
    --realm-line: rgba(132, 166, 215, .22);
    --realm-line-strong: rgba(146, 190, 246, .48);
    --realm-blue: #65baf2;
    --realm-blue-pale: #c9eaff;
    --realm-gold: #d8b866;
    --realm-text: #f5f8fd;
    --realm-muted: #9aa9bf;
    --display: "Segoe UI", Arial, sans-serif;
}

html { scroll-behavior: smooth; background: var(--realm); }
body {
    color: var(--realm-text);
    background: var(--realm);
    background-image: none;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}
body::before { display: none; }
h1, h2, h3 { color: var(--realm-text); font-family: var(--display); font-weight: 800; letter-spacing: -.035em; }
.eyebrow { margin-bottom: 13px; color: var(--realm-blue); font-size: 10px; letter-spacing: .22em; }
.public-page main { overflow: hidden; }
.realm-bar { position: relative; z-index: 60; height: 32px; border-bottom: 1px solid rgba(117,161,216,.13); background: #050810; color: #8795aa; font-size: 11px; }
.realm-bar > div { width: min(1280px, calc(100% - 48px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.realm-bar span { display: flex; align-items: center; gap: 7px; }
.realm-bar i, .hero-note i, .world-strip i { width: 6px; height: 6px; border-radius: 50%; background: #6ee7a5; box-shadow: 0 0 10px rgba(110,231,165,.6); }
.realm-bar a { color: #b4c3d8; }
.realm-bar a:hover { color: #fff; }

.site-header { position: sticky; top: 0; z-index: 55; min-height: 82px; padding: 0; display: block; border-bottom: 1px solid var(--realm-line); background: rgba(6,10,19,.94); box-shadow: none; backdrop-filter: blur(18px); }
.header-inner { width: min(1280px, calc(100% - 48px)); min-height: 82px; margin: auto; display: grid; grid-template-columns: 190px 1fr auto; align-items: center; gap: 34px; }
.site-brand { width: 174px; height: 70px; overflow: visible; }
.site-brand img { width: auto; height: auto; max-width: 170px; max-height: 66px; object-fit: contain; }
.site-header nav { height: 82px; align-self: auto; justify-content: center; gap: 3px; }
.site-header nav a { padding: 0 17px; color: #a6b2c4; font-size: 12px; font-weight: 750; letter-spacing: .025em; }
.site-header nav a.active, .site-header nav a:hover { color: #fff; }
.site-header nav a.active::after { left: 17px; right: 17px; height: 2px; background: var(--realm-blue); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.account-link { color: #c8d3e3; font-size: 12px; font-weight: 750; white-space: nowrap; }
.account-link:hover { color: #fff; }
.play-link, .button { min-height: 44px; padding: 10px 19px; border-radius: 2px; box-shadow: none; font-size: 12px; font-weight: 800; letter-spacing: .015em; }
.play-link, .button.primary { color: #04101d; border: 1px solid #9ddcff; background: #76c8f8; }
.play-link:hover, .button.primary:hover { color: #02080e; background: #a6dfff; transform: translateY(-1px); }
.button.ghost, .button.secondary { color: #d8e3f0; border: 1px solid rgba(153,185,225,.42); background: rgba(9,16,29,.56); }
.button.ghost:hover, .button.secondary:hover { color: #fff; border-color: rgba(179,215,255,.75); background: #111d31; }
.nav-toggle { display: none; }
.user-chip { display: flex; align-items: center; gap: 8px; color: #e9f1fb; font-size: 12px; }
.user-chip span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #4c6e9b; background: #14243b; color: var(--realm-blue-pale); font-weight: 900; }
.logout-form { margin: 0; }
.logout-form button { padding: 0; color: #7f8da1; border: 0; background: transparent; cursor: pointer; font-size: 11px; }
.logout-form button:hover { color: #fff; }

.home-hero { position: relative; min-height: calc(100vh - 114px); max-height: 880px; padding: 70px max(48px, calc((100vw - 1280px) / 2)); display: grid; grid-template-columns: minmax(0, 610px) minmax(240px, 1fr); align-items: center; gap: 70px; isolation: isolate; border: 0; background-image: linear-gradient(90deg, rgba(3,7,15,.9) 0%, rgba(3,7,15,.7) 31%, rgba(4,9,20,.14) 66%), linear-gradient(0deg, #070b15 0%, transparent 26%), url("brand/avalis-realm-hero.png"); background-position: center; background-size: cover; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(3,7,14,.05), transparent 52%, rgba(4,8,17,.78)); }
.home-hero::after { display: none; }
.hero-copy { position: relative; z-index: 1; padding-bottom: 40px; }
.hero-copy h1 { margin: 0 0 24px; font-size: clamp(74px, 8.5vw, 132px); font-weight: 900; letter-spacing: -.075em; line-height: .79; text-transform: uppercase; text-shadow: 0 14px 42px rgba(0,0,0,.35); }
.hero-lede { max-width: 560px; margin-bottom: 30px; color: #bcc8d7; font-size: 18px; line-height: 1.7; }
.hero-actions { gap: 11px; }
.hero-button { min-height: 54px; padding-inline: 27px; font-size: 13px; }
.hero-note { margin: 29px 0 0; display: flex; align-items: center; gap: 7px; color: #91a0b5; font-size: 11px; }
.hero-note b { color: #fff; }
.hero-live { position: relative; z-index: 1; width: min(330px, 100%); margin: 210px 0 0 auto; padding: 23px 0 0 25px; border-top: 1px solid rgba(170,208,255,.5); border-left: 1px solid rgba(170,208,255,.5); background: linear-gradient(135deg, rgba(5,11,22,.75), rgba(5,11,22,.1) 75%); }
.hero-live > span { color: var(--realm-blue); font-size: 9px; font-weight: 900; letter-spacing: .2em; }
.hero-live h2 { margin: 6px 0 4px; font-size: 27px; letter-spacing: -.03em; }
.hero-live p { margin: 0; color: #97a9c0; font-size: 11px; }
.hero-live strong { display: block; margin-top: 12px; color: #fff; font-size: 22px; }
.hero-live a { display: inline-block; margin-top: 12px; color: var(--realm-blue-pale); font-size: 11px; font-weight: 700; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; display: grid; justify-items: center; gap: 7px; transform: translateX(-50%); color: #8695a9; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.scroll-cue span { color: var(--realm-blue); font-size: 21px; }

.world-strip { width: min(1280px, calc(100% - 48px)); min-height: 108px; margin: -1px auto 0; display: grid; grid-template-columns: repeat(4, 1fr) 1.25fr; align-items: stretch; border-top: 1px solid var(--realm-line); border-bottom: 1px solid var(--realm-line); background: #090f1c; }
.world-strip > div, .world-strip > a { padding: 22px 24px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--realm-line); }
.world-strip small { color: #718198; font-size: 8px; font-weight: 850; letter-spacing: .17em; }
.world-strip strong { margin-top: 5px; display: flex; align-items: center; gap: 8px; color: #eef5ff; font-size: 17px; }
.world-strip > a { flex-direction: row; align-items: center; justify-content: space-between; color: var(--realm-blue-pale); border-right: 0; font-size: 12px; font-weight: 750; }
.world-strip > a span { font-size: 20px; }
.public-alert { width: min(1280px, calc(100% - 48px)); margin: 20px auto; }
.alert { border-radius: 2px; }
.content-section { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 105px 0; }
.home-intro { display: grid; grid-template-columns: 1.15fr .85fr; align-items: end; gap: 100px; }
.home-intro h2 { margin: 0; font-size: clamp(43px, 5vw, 68px); line-height: 1.02; }
.intro-copy { padding-bottom: 7px; }
.intro-copy p { color: #a9b5c6; font-size: 17px; line-height: 1.8; }
.intro-copy a, .split-heading > a { color: var(--realm-blue-pale); font-size: 12px; font-weight: 800; }
.intro-copy a span { margin-left: 8px; color: var(--realm-blue); }
.world-features { width: min(1280px, calc(100% - 48px)); margin: 0 auto 30px; display: grid; grid-template-columns: 1.4fr .8fr .8fr; border-top: 1px solid var(--realm-line-strong); border-bottom: 1px solid var(--realm-line); }
.world-features article { min-height: 385px; padding: 42px 36px; display: flex; flex-direction: column; border-right: 1px solid var(--realm-line); background: #0a101c; }
.world-features article:last-child { border-right: 0; }
.world-features article > span { color: #53647d; font-size: 11px; font-weight: 850; }
.world-features .feature-main { justify-content: flex-end; background: linear-gradient(90deg, rgba(6,11,21,.96), rgba(7,14,27,.52)), url("brand/frozen-pass.png") center/cover; }
.feature-main > div { max-width: 480px; }
.world-features h2 { margin: 0 0 14px; font-size: 46px; }
.world-features h3 { margin: auto 0 13px; font-size: 29px; }
.world-features p:not(.eyebrow) { color: #9eacbf; }
.world-features a { margin-top: auto; color: var(--realm-blue-pale); font-size: 11px; font-weight: 800; }
.feature-main a { margin-top: 17px; }

.split-heading { margin-bottom: 33px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.split-heading h2 { margin: 0; font-size: clamp(43px, 5vw, 66px); }
.rankings-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1px; background: var(--realm-line); }
.ranking-table, .hunt-table { background: #0b1220; }
.ranking-table > header, .hunt-table > header { min-height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--realm-line); color: #7f8fa5; font-size: 9px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.ranking-table > a, .hunt-table > a { min-height: 74px; padding: 12px 20px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 14px; border-bottom: 1px solid rgba(124,156,199,.12); transition: background .15s ease; }
.ranking-table > a:hover, .hunt-table > a:hover { background: #101b2e; }
.ranking-table em { color: #5b718f; font-style: normal; font-size: 11px; font-weight: 850; }
.ranking-table a > span, .hunt-table a > span { display: grid; }
.ranking-table a > span b, .hunt-table a > span b { color: #edf4fe; }
.ranking-table small, .hunt-table small { color: #718198; font-size: 9px; font-weight: 650; }
.ranking-table a > strong, .hunt-table a > strong { display: grid; justify-items: end; color: #dcecff; font-size: 14px; }
.hunt-table > a { grid-template-columns: 36px 1fr auto; }
.hunt-table img { width: auto; height: auto; max-width: 31px; max-height: 31px; margin: auto; object-fit: contain; image-rendering: pixelated; }
.quiet { margin: 0; padding: 28px 20px; color: #7f8ca0; }

.community-band { width: min(1280px, calc(100% - 48px)); min-height: 530px; margin: 15px auto 100px; padding: 78px max(40px, calc((1280px - 1110px) / 2)); display: grid; grid-template-columns: 1fr 430px; align-items: center; gap: 100px; background: linear-gradient(90deg, rgba(6,11,22,.96), rgba(7,14,28,.74)), url("brand/login-scene.png") center/cover; border-top: 1px solid var(--realm-line-strong); border-bottom: 1px solid var(--realm-line); }
.community-band > div { max-width: 560px; }
.community-band h2 { margin: 0 0 19px; font-size: clamp(45px, 5vw, 67px); }
.community-band > div > p:not(.eyebrow) { color: #aebacd; font-size: 16px; }
.community-band aside { padding: 8px 0; border-top: 1px solid rgba(160,198,245,.46); }
.community-band aside > small { display: block; padding: 14px 0 12px; color: var(--realm-blue); font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.community-band aside > a { padding: 13px 0; display: grid; border-top: 1px solid rgba(132,166,215,.18); }
.community-band aside > a span { color: #70829a; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.community-band aside > a b { margin: 2px 0; font-size: 13px; }
.community-band aside time { color: #78889e; font-size: 9px; }
.community-band aside h3 { margin: 9px 0; font-size: 27px; }
.community-band aside p { color: #93a2b6; }
.community-band aside > a:last-child { color: var(--realm-blue-pale); font-size: 11px; }
.final-cta { padding: 30px 24px 115px; display: grid; justify-items: center; text-align: center; }
.final-cta img { width: auto; height: auto; max-width: 300px; max-height: 145px; object-fit: contain; }
.final-cta p { margin: 8px 0 25px; color: #a9b6c8; font-size: 18px; }
.final-cta > div { display: flex; gap: 10px; }

.site-footer { width: 100%; padding: 0; display: block; border: 0; border-top: 1px solid var(--realm-line); background: #050810; }
.footer-main { width: min(1160px, calc(100% - 48px)); margin: auto; padding: 62px 0; display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 60px; }
.footer-main > div { display: grid; align-content: start; gap: 8px; }
.footer-main > div > b { margin-bottom: 9px; color: #e6edf7; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.footer-main a { color: #8391a5; font-size: 12px; }
.footer-main a:hover { color: #fff; }
.footer-brand img { width: auto; height: auto; max-width: 190px; max-height: 90px; object-fit: contain; }
.footer-brand p { max-width: 340px; margin: 9px 0 0; color: #7f8ca0; font-size: 12px; }
.footer-bottom { min-height: 58px; padding: 0 max(24px, calc((100vw - 1160px) / 2)); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(132,166,215,.13); color: #5f6b7d; font-size: 10px; }

/* Shared public pages */
.info-page, .hiscores-shell, .store-shell, .events-shell { width: min(1180px, calc(100% - 48px)); padding: 48px 0 100px; }
.info-hero, .page-mast, .store-mast, .events-mast { min-height: 285px; margin: 0 0 48px; padding: 46px 50px; align-items: end; border: 0; border-radius: 0; border-top: 1px solid var(--realm-line-strong); border-bottom: 1px solid var(--realm-line); background-image: linear-gradient(90deg, rgba(5,10,20,.96), rgba(6,13,27,.55)), url("brand/avalis-realm-hero.png"); background-position: center; background-size: cover; box-shadow: none; }
.info-hero::before, .page-mast::before, .store-mast::before, .events-mast::before { display: none; }
.info-hero h1, .page-mast h1, .store-mast h1, .events-mast h1 { font-size: clamp(50px, 6vw, 78px); }
.info-grid { gap: 0; border-top: 1px solid var(--realm-line); }
.info-card, .info-card.full { min-height: 210px; padding: 34px; border: 0; border-right: 1px solid var(--realm-line); border-bottom: 1px solid var(--realm-line); border-radius: 0; background: #0a111e; box-shadow: none; }
.info-card:nth-child(2n), .info-card.full { border-right: 0; }
.info-card h2 { font-size: 26px; }
.info-card p, .info-card li { color: #9eabbe; }
.info-card a:not(.button) { color: var(--realm-blue-pale); }
.tier-row { border-color: var(--realm-line); }
.store-mast, .events-mast { border-radius: 0; }
.store-filters { padding: 15px; border: 1px solid var(--realm-line); border-radius: 0; background: #0a111e; box-shadow: none; }
.store-grid { gap: 1px; background: var(--realm-line); }
.product-card { min-height: 275px; border: 0; border-radius: 0; background: #0c1423; box-shadow: none; }
.product-card:hover { background: #101b2e; }
.product-icon { border-radius: 0; }
.store-note { border-radius: 0; }
.credit-package { border-radius: 0; box-shadow: none; }
.events-columns { gap: 1px; background: var(--realm-line); }
.event-board, .live-feed-card, .board-card { border: 0; border-radius: 0; background: #0b1322; box-shadow: none; }
.event-board > header, .live-feed-card > header, .board-card > header { background: #101a2d; }
.category-panel, .ranking-panel, .search-panel > section, .profile-card { border-radius: 0; box-shadow: none; }
.classic-table tbody tr:hover { background: #101b2e; }

/* Authentication */
.auth-page main { overflow: visible; }
.auth-shell { min-height: 720px; padding: 70px max(48px, calc((100vw - 1160px) / 2)); display: grid; grid-template-columns: 1fr 430px; align-items: center; gap: 110px; background: linear-gradient(90deg, rgba(5,9,18,.94), rgba(5,10,20,.58)), url("brand/avalis-realm-hero.png") center/cover; }
.auth-intro { max-width: 610px; }
.auth-intro h1 { margin: 0 0 24px; font-size: clamp(55px, 7vw, 86px); line-height: .96; }
.auth-intro > p:not(.eyebrow) { color: #aab7c8; font-size: 17px; }
.auth-intro ul { margin: 28px 0 0; padding: 0; list-style: none; }
.auth-intro li { padding: 9px 0; color: #c4cedb; border-top: 1px solid rgba(141,176,221,.2); font-size: 12px; }
.auth-card { padding: 34px; border-top: 1px solid rgba(156,202,255,.62); border-bottom: 1px solid rgba(132,166,215,.25); background: rgba(7,13,25,.9); backdrop-filter: blur(16px); }
.auth-card > img { width: auto; height: auto; max-width: 230px; max-height: 105px; margin: -7px auto 22px; object-fit: contain; }
.auth-card h2 { margin: 0 0 22px; font-size: 37px; }
.auth-card form { display: grid; gap: 17px; }
.auth-card label, .composer-card label { display: grid; gap: 7px; color: #bec9d8; font-size: 11px; font-weight: 750; }
input, select, textarea { width: 100%; min-width: 0; padding: 12px 13px; color: #f4f7fb; border: 1px solid rgba(125,158,203,.36); border-radius: 1px; outline: none; background: #080f1c; font: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--realm-blue); box-shadow: 0 0 0 2px rgba(101,186,242,.13); }
textarea { resize: vertical; line-height: 1.65; }
.auth-foot { margin: 20px 0 0; color: #7f8da0; font-size: 11px; text-align: center; }
.auth-foot a { color: var(--realm-blue-pale); }

/* Forums */
.forum-shell, .topic-shell, .composer-shell, .profile-shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 100px; overflow: visible !important; }
.forum-mast { min-height: 240px; padding: 40px 46px; display: grid; grid-template-columns: 1fr 360px; align-items: end; gap: 70px; border-top: 1px solid var(--realm-line-strong); border-bottom: 1px solid var(--realm-line); background: linear-gradient(90deg, rgba(5,10,20,.98), rgba(5,11,23,.66)), url("brand/frozen-pass.png") center/cover; }
.forum-mast h1 { margin: 0 0 8px; font-size: clamp(62px, 7vw, 90px); }
.forum-mast p:last-child { margin: 0; color: #a7b4c5; }
.forum-search { padding: 18px 0 0 20px; border-top: 1px solid rgba(155,198,248,.4); border-left: 1px solid rgba(155,198,248,.4); }
.forum-search label { display: block; margin-bottom: 7px; color: #8f9eb1; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.forum-search > div { display: grid; grid-template-columns: 1fr auto; }
.forum-search button { padding: 0 16px; color: #08111d; border: 0; background: var(--realm-blue); cursor: pointer; font-weight: 800; }
.forum-toolbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 30px; border-bottom: 1px solid var(--realm-line); }
.forum-toolbar nav, .breadcrumbs { display: flex; align-items: center; gap: 10px; color: #748399; font-size: 11px; }
.forum-toolbar nav a, .breadcrumbs a { color: var(--realm-blue-pale); }
.forum-toolbar nav b, .breadcrumbs b { max-width: 480px; overflow: hidden; color: #c6d1df; text-overflow: ellipsis; white-space: nowrap; }
.forum-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 36px; padding-top: 35px; }
.forum-section-title { min-height: 78px; padding-bottom: 19px; display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--realm-line-strong); }
.forum-section-title small, .forum-sidebar section header small, .forum-account > small { color: var(--realm-blue); font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.forum-section-title h2 { margin: 2px 0 0; font-size: 32px; }
.forum-section-title p { margin: 5px 0 0; color: #8795a9; font-size: 11px; }
.forum-section-title > b { color: #68788e; font-size: 10px; text-transform: uppercase; }
.board-list, .topic-list { background: #0b1220; }
.board-row { min-height: 118px; padding: 20px 22px; display: grid; grid-template-columns: 54px minmax(200px, 1fr) 135px 220px; align-items: center; gap: 20px; border-bottom: 1px solid var(--realm-line); }
.board-row:hover, .topic-row:hover { background: #0e1829; }
.board-mark { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #405d83; background: #101d32; color: var(--realm-blue-pale); font-size: 18px; font-weight: 900; }
.board-row h3, .topic-row h3 { margin: 0 0 5px; font-size: 17px; letter-spacing: -.015em; }
.board-row p, .topic-row p { margin: 0; color: #7f8fa5; font-size: 10px; }
.board-row dl, .topic-row dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.board-row dl div, .topic-row dl div { display: grid; }
.board-row dt, .topic-row dt { color: #65758c; font-size: 8px; text-transform: uppercase; }
.board-row dd, .topic-row dd { margin: 1px 0 0; color: #dbe6f3; font-size: 14px; font-weight: 750; }
.board-latest, .topic-latest { min-width: 0; display: grid; }
.board-latest small, .topic-latest small { color: #64758b; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.board-latest a, .topic-latest b { overflow: hidden; color: #c9d7e7; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.board-latest span, .topic-latest span { color: #748399; font-size: 9px; }
.topic-row { min-height: 105px; padding: 18px 20px; display: grid; grid-template-columns: 32px minmax(220px, 1fr) 135px 145px; align-items: center; gap: 18px; border-bottom: 1px solid var(--realm-line); }
.topic-row.pinned { background: linear-gradient(90deg, rgba(43,75,116,.26), transparent); }
.topic-state { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #334d70; color: var(--realm-blue); font-weight: 900; }
.topic-kicker { margin-bottom: 3px; color: #60738e; font-size: 8px; font-weight: 850; letter-spacing: .12em; }
.forum-sidebar { display: grid; align-content: start; gap: 24px; }
.forum-sidebar > section { padding: 21px; border-top: 1px solid var(--realm-line-strong); background: #0b1220; }
.forum-sidebar section header h3 { margin: 4px 0 13px; font-size: 20px; }
.forum-account { display: grid; justify-items: start; }
.forum-account h3 { margin: 6px 0 8px; font-size: 21px; }
.forum-account p { color: #8998ad; font-size: 11px; }
.forum-account .button { margin: 16px 0 9px; }
.forum-account > a:not(.button) { color: var(--realm-blue-pale); font-size: 10px; }
.avatar { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid #4b6e99; background: linear-gradient(145deg, #1c3355, #0d182b); color: #dff2ff; font-size: 22px; font-weight: 900; }
.avatar.large { margin-bottom: 17px; }
.role-badge { width: max-content; padding: 3px 7px; color: #9db0c8; border: 1px solid #344a69; background: #0b1525; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.role-true-developer, .role-developer, .role-administrator, .role-hidden-administrator { color: #87d2ff; border-color: #3b79a4; }
.role-moderator, .role-senior-moderator, .role-forum-moderator, .role-support { color: #88dfac; border-color: #397557; }
.role-member, .role-youtuber { color: #e4c879; border-color: #786733; }
.forum-stats { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.forum-stats div { display: grid; border-right: 1px solid var(--realm-line); }
.forum-stats div:last-child { border: 0; padding-left: 10px; }
.forum-stats dt { color: #66778e; font-size: 8px; text-transform: uppercase; }
.forum-stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 800; }
.latest-list { margin: 0; padding: 0; list-style: none; }
.latest-list li { padding: 10px 0; display: grid; border-top: 1px solid rgba(125,158,203,.15); }
.latest-list a { overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.latest-list span { color: #708198; font-size: 8px; }
.forum-empty { min-height: 300px; display: grid; place-content: center; justify-items: center; text-align: center; }
.forum-empty > span { color: #4d698f; font-size: 36px; }
.forum-empty h3, .forum-empty h1 { margin: 7px 0; }
.forum-empty p { color: #7f8da0; }
.forum-empty.standalone { min-height: 560px; }

.breadcrumbs { min-height: 62px; border-bottom: 1px solid var(--realm-line); }
.topic-heading { min-height: 160px; padding: 30px 0; display: flex; align-items: end; justify-content: space-between; gap: 30px; border-bottom: 1px solid var(--realm-line-strong); }
.topic-heading h1 { max-width: 860px; margin: 2px 0 8px; font-size: clamp(37px, 5vw, 58px); overflow-wrap: anywhere; }
.topic-heading p:last-child { margin: 0; color: #76879d; font-size: 10px; }
.moderator-actions form { display: flex; gap: 5px; }
.moderator-actions button { padding: 7px 10px; color: #b5c3d4; border: 1px solid #304865; background: #0a1321; cursor: pointer; font-size: 9px; }
.moderator-actions button.danger { color: #ffaaa8; border-color: #74403e; }
.post-list { margin-top: 30px; display: grid; gap: 14px; }
.forum-post { min-height: 245px; display: grid; grid-template-columns: 180px minmax(0, 1fr); border-top: 1px solid var(--realm-line); border-bottom: 1px solid var(--realm-line); background: #0b1220; }
.forum-post.original { border-top-color: var(--realm-line-strong); }
.forum-post > aside { padding: 25px 22px; border-right: 1px solid var(--realm-line); background: #0a111e; }
.forum-post aside h3 { margin: 13px 0 6px; font-size: 16px; }
.forum-post aside dl { margin: 20px 0 0; display: grid; gap: 6px; }
.forum-post aside dl div { display: flex; justify-content: space-between; color: #697a91; font-size: 8px; text-transform: uppercase; }
.forum-post aside dd { margin: 0; color: #aebed2; }
.post-content { min-width: 0; padding: 0 28px 32px; }
.post-content > header { min-height: 50px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid rgba(125,158,203,.13); color: #728299; font-size: 9px; }
.post-content > header > a, .post-content > header > span { color: var(--realm-blue); font-weight: 800; }
.post-content > header form { margin-left: auto; }
.text-danger { color: #e58f8d; border: 0; background: transparent; cursor: pointer; font-size: 9px; }
.post-body { padding-top: 25px; color: #c4cedc; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.reply-box { margin-top: 28px; padding: 27px; border-top: 1px solid var(--realm-line-strong); background: #0b1220; }
.reply-box > div { margin-bottom: 17px; display: flex; align-items: center; gap: 12px; color: #8494aa; font-size: 11px; }
.reply-box .avatar { width: 36px; height: 36px; font-size: 14px; }
.reply-box form { display: grid; justify-items: end; gap: 12px; }
.reply-box h2 { margin: 0 0 7px; }
.reply-box p { color: #8796a9; }

.composer-shell { max-width: 920px; }
.composer-card { margin-top: 34px; padding: 42px; border-top: 1px solid var(--realm-line-strong); background: #0b1220; }
.composer-card header { margin-bottom: 30px; }
.composer-card h1 { margin: 0 0 9px; font-size: 50px; }
.composer-card header p:last-child { color: #8998aa; }
.composer-card form { display: grid; gap: 20px; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; }
.composer-actions > a { color: #8391a4; font-size: 11px; }

.community-profile { min-height: 260px; padding: 40px; display: grid; grid-template-columns: 90px 1fr auto auto; align-items: center; gap: 28px; border-top: 1px solid var(--realm-line-strong); border-bottom: 1px solid var(--realm-line); background: linear-gradient(90deg, #0b1322, rgba(10,18,32,.58)), url("brand/frozen-pass.png") center/cover; }
.hero-avatar { width: 80px; height: 80px; font-size: 30px; }
.community-profile h1 { margin: 0 0 10px; font-size: 48px; }
.community-profile > dl { margin: 0; display: grid; grid-template-columns: repeat(2, 125px); }
.community-profile > dl div { padding: 10px 14px; border-left: 1px solid var(--realm-line); }
.community-profile dt { color: #708198; font-size: 8px; text-transform: uppercase; }
.community-profile dd { margin: 2px 0 0; font-size: 16px; font-weight: 800; }
.profile-activity { margin-top: 35px; display: grid; grid-template-columns: 1fr 1fr; gap: 35px; }
.profile-activity > section { border-top: 1px solid var(--realm-line-strong); background: #0b1220; }
.profile-activity section > header { padding: 22px; }
.profile-activity h2 { margin: 0; font-size: 28px; }
.activity-row { min-height: 69px; padding: 13px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--realm-line); }
.activity-row span { min-width: 0; display: grid; }
.activity-row b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.activity-row small, .activity-row time { color: #718197; font-size: 8px; }

/* Keep the existing staff tools aligned with the new public shell. */
.topbar { border-bottom-color: var(--realm-line); background: #070c16; }
.app-shell, .sidebar, .content { background-color: var(--realm); }
.panel, .admin-product-card { border-radius: 0; box-shadow: none; }
.panel-title, .admin-product-card > header { background: #101a2d; }
.registration-page { background-image: linear-gradient(90deg, rgba(5,9,18,.9), rgba(5,10,20,.55)), url("brand/avalis-realm-hero.png"); }
.registration-card, .login-card { border-radius: 0; }

@media (max-width: 1080px) {
    .header-inner { grid-template-columns: 160px 1fr auto; gap: 15px; }
    .site-brand { width: 150px; }
    .site-brand img { max-width: 148px; }
    .site-header nav a { padding-inline: 10px; }
    .home-hero { grid-template-columns: minmax(0, 560px) 1fr; }
    .world-features { grid-template-columns: 1.2fr 1fr; }
    .world-features article:last-child { grid-column: 1 / -1; min-height: 270px; border-top: 1px solid var(--realm-line); }
    .community-band { grid-template-columns: 1fr 360px; gap: 60px; }
    .forum-layout { grid-template-columns: 1fr; }
    .forum-sidebar { grid-template-columns: repeat(3, 1fr); }
    .board-row { grid-template-columns: 54px 1fr 120px 190px; }
    .auth-shell { gap: 60px; }
    .community-profile { grid-template-columns: 80px 1fr auto; }
    .community-profile > .button { grid-column: 2; width: max-content; }
}

@media (max-width: 820px) {
    .realm-bar > div { width: min(100% - 30px, 1280px); }
    .realm-bar a { display: none; }
    .site-header { position: relative; }
    .header-inner { width: min(100% - 30px, 1280px); grid-template-columns: 1fr auto auto; }
    .site-brand { width: 145px; }
    .nav-toggle { width: 42px; height: 42px; display: grid; place-content: center; gap: 4px; border: 1px solid #344c6d; background: transparent; cursor: pointer; }
    .nav-toggle span { width: 17px; height: 1px; background: #d9e5f3; }
    .nav-toggle b { position: absolute; width: 1px; height: 1px; overflow: hidden; }
    .site-header nav { position: absolute; top: 82px; left: 0; right: 0; height: auto; padding: 12px 15px 17px; display: none; align-items: stretch; flex-direction: column; border-bottom: 1px solid var(--realm-line); background: #070c16; }
    .site-header nav.open { display: flex; }
    .site-header nav a { min-height: 44px; padding: 0 10px; }
    .site-header nav a.active::after { left: 10px; right: auto; bottom: 7px; width: 30px; }
    .account-link, .user-chip b, .logout-form { display: none; }
    .home-hero { min-height: 720px; max-height: none; padding-inline: 30px; grid-template-columns: 1fr; align-content: center; background-position: 64% center; }
    .hero-copy { max-width: 550px; padding-bottom: 0; }
    .hero-live { width: 270px; margin: 10px 0 50px; }
    .scroll-cue { display: none; }
    .world-strip { grid-template-columns: repeat(2, 1fr); }
    .world-strip > div:nth-child(2) { border-right: 0; }
    .world-strip > a { grid-column: 1 / -1; min-height: 64px; border-top: 1px solid var(--realm-line); }
    .home-intro { grid-template-columns: 1fr; gap: 35px; }
    .world-features, .rankings-layout { grid-template-columns: 1fr; }
    .world-features article { min-height: 280px; border-right: 0; border-bottom: 1px solid var(--realm-line); }
    .community-band { grid-template-columns: 1fr; gap: 45px; }
    .footer-main { grid-template-columns: 1.5fr 1fr 1fr; }
    .footer-main > div:last-child { display: none; }
    .forum-mast { grid-template-columns: 1fr; align-items: end; gap: 28px; }
    .board-row { grid-template-columns: 48px 1fr 125px; }
    .board-latest { grid-column: 2 / -1; padding-top: 10px; border-top: 1px solid rgba(125,158,203,.14); }
    .topic-row { grid-template-columns: 28px 1fr 115px; }
    .topic-latest { display: none; }
    .forum-sidebar { grid-template-columns: 1fr 1fr; }
    .forum-sidebar > section:last-child { grid-column: 1 / -1; }
    .auth-shell { grid-template-columns: 1fr; gap: 40px; padding-block: 65px; }
    .auth-intro { max-width: 630px; }
    .auth-card { width: min(430px, 100%); }
    .forum-post { grid-template-columns: 140px 1fr; }
    .community-profile { grid-template-columns: 70px 1fr; }
    .community-profile > dl, .community-profile > .button { grid-column: 1 / -1; }
    .profile-activity { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .header-inner, .realm-bar > div { width: min(100% - 24px, 1280px); }
    .header-inner { grid-template-columns: 1fr auto; }
    .header-actions { display: none; }
    .site-brand { width: 128px; }
    .site-brand img { max-width: 126px; max-height: 58px; }
    .play-link { min-height: 38px; padding: 7px 11px; }
    .home-hero { min-height: 680px; padding: 50px 22px; background-position: 68% center; }
    .hero-copy h1 { font-size: clamp(65px, 22vw, 96px); }
    .hero-lede { font-size: 15px; }
    .hero-actions .hero-button { width: 100%; }
    .hero-live { display: none; }
    .world-strip, .content-section, .world-features, .community-band, .forum-shell, .topic-shell, .composer-shell, .profile-shell, .info-page, .hiscores-shell, .store-shell, .events-shell { width: min(100% - 24px, 1280px); }
    .world-strip > div { padding: 17px; }
    .content-section { padding-block: 70px; }
    .home-intro h2, .split-heading h2, .community-band h2 { font-size: 42px; }
    .world-features article { padding: 30px 24px; }
    .world-features h2 { font-size: 37px; }
    .rankings-section { padding-bottom: 70px; }
    .split-heading { align-items: start; flex-direction: column; }
    .ranking-table > a, .hunt-table > a { padding-inline: 13px; }
    .ranking-table > a { grid-template-columns: 26px 1fr auto; }
    .community-band { margin-bottom: 70px; padding: 55px 24px; }
    .final-cta > div { width: 100%; flex-direction: column; }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 35px; padding-block: 45px; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom { padding-block: 16px; align-items: start; flex-direction: column; justify-content: center; gap: 4px; }
    .info-hero, .page-mast, .store-mast, .events-mast { min-height: 240px; padding: 28px 24px; }
    .info-hero h1, .page-mast h1, .store-mast h1, .events-mast h1 { font-size: 44px; }
    .info-grid { grid-template-columns: 1fr; }
    .info-card { border-right: 0; }
    .forum-shell { padding-top: 20px; }
    .forum-mast { min-height: 280px; padding: 30px 22px; }
    .forum-mast h1 { font-size: 60px; }
    .forum-toolbar { align-items: start; padding-block: 16px; flex-direction: column; }
    .forum-layout { padding-top: 22px; }
    .board-row, .topic-row { padding: 16px 12px; grid-template-columns: 40px 1fr; gap: 12px; }
    .board-mark { width: 38px; height: 38px; }
    .board-row dl, .topic-row dl { grid-column: 2; width: 140px; }
    .board-latest { grid-column: 2; }
    .topic-latest { display: none; }
    .forum-sidebar { grid-template-columns: 1fr; }
    .forum-sidebar > section:last-child { grid-column: auto; }
    .auth-shell { padding: 45px 20px; }
    .auth-intro h1 { font-size: 51px; }
    .auth-card { padding: 26px 20px; }
    .topic-heading { align-items: start; flex-direction: column; }
    .topic-heading h1 { font-size: 38px; }
    .forum-post { grid-template-columns: 1fr; }
    .forum-post > aside { padding: 17px; display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 0 12px; border-right: 0; border-bottom: 1px solid var(--realm-line); }
    .forum-post aside .avatar { width: 46px; height: 46px; grid-row: span 2; }
    .forum-post aside h3 { margin: 0; }
    .forum-post aside .role-badge { margin-top: 3px; }
    .forum-post aside dl { display: none; }
    .post-content { padding-inline: 18px; }
    .composer-card { padding: 27px 19px; }
    .composer-card h1 { font-size: 39px; }
    .composer-actions { align-items: stretch; flex-direction: column-reverse; }
    .community-profile { padding: 25px 20px; grid-template-columns: 58px 1fr; }
    .hero-avatar { width: 56px; height: 56px; font-size: 21px; }
    .community-profile h1 { font-size: 35px; }
    .community-profile > dl { grid-template-columns: 1fr 1fr; }
}

/* Final cinematic cascade: deliberately last so legacy page rules cannot
   flatten the artwork-led direction above. */
.site-header { background: linear-gradient(180deg, rgba(4,8,18,.98), rgba(4,8,18,.9)); border-bottom-color: rgba(135,201,255,.18); }
.realm-bar { background: #03060d; }
.site-header nav a { text-transform: uppercase; letter-spacing: .095em; font-size: 10px; }
.play-link, .button { border: 0; border-radius: 0; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%); }
.play-link, .button.primary { background: linear-gradient(180deg, #a8e7ff 0%, #58bdea 100%); }
.button.ghost, .button.secondary { border: 0; background: linear-gradient(180deg, rgba(31,55,84,.88), rgba(9,19,37,.9)); box-shadow: inset 0 0 0 1px rgba(154,206,255,.35); }

.home-hero-v2 { min-height: calc(100vh - 114px); max-height: none; padding-top: 9vh; padding-bottom: 12vh; background-image: linear-gradient(90deg, rgba(2,6,15,.8) 0%, rgba(2,6,15,.5) 31%, rgba(3,8,18,.04) 60%), linear-gradient(0deg, #040814 0%, transparent 28%), url("brand/avalis-hero-v2.png"); background-position: center; background-size: cover; }
.home-hero-v2::before { background: radial-gradient(circle at 72% 47%, rgba(66,181,255,.08), transparent 29%), linear-gradient(180deg, rgba(2,5,12,.16), transparent 45%, rgba(2,6,15,.8)); }
.home-hero-v2 .hero-live { margin: 0 0 55px auto; border: 0; border-top: 1px solid rgba(170,221,255,.65); background: linear-gradient(90deg, rgba(3,8,17,.72), transparent); }
.world-strip-v2 { position: relative; z-index: 3; min-height: 88px; margin-top: -44px; border: 0; border-top: 1px solid rgba(123,196,247,.35); border-bottom: 1px solid rgba(123,196,247,.16); background: linear-gradient(90deg, rgba(5,12,26,.96), rgba(8,22,43,.82), rgba(5,12,26,.96)); backdrop-filter: blur(18px); }
.world-strip-v2 > div, .world-strip-v2 > a { padding-block: 16px; background: transparent; border-color: rgba(132,194,238,.13); }
.final-cta-v2 { min-height: 620px; padding: 110px 24px; justify-content: center; background: radial-gradient(circle at 50% 12%, rgba(49,143,213,.22), transparent 32%), linear-gradient(180deg, var(--avalis-night), #02040a); }
.final-cta-v2 img { max-width: 390px; max-height: 180px; }
.final-cta-v2 h2 { margin: 25px 0 10px; font-size: clamp(52px, 6vw, 86px); }

.forum-mast, .page-mast, .store-mast, .events-mast, .info-hero { position: relative; width: 100%; min-height: 420px; margin-left: 0; margin-bottom: 54px; padding: 72px 40px; border: 0; border-bottom: 1px solid rgba(130,193,240,.22); border-radius: 0; background-size: cover; background-position: center; box-shadow: none; isolation: isolate; }
.forum-mast { grid-template-columns: 1fr 410px; background-image: linear-gradient(90deg, rgba(3,7,15,.9), rgba(3,8,18,.2) 55%, rgba(3,7,15,.78)), url("brand/avalis-community-v2.png"); }
.hiscores-page .page-mast { background-image: linear-gradient(90deg, rgba(3,7,15,.94), rgba(3,8,18,.16) 58%), url("brand/avalis-champions-v2.png"); }
.store-page .store-mast, .events-page .events-mast { background-image: linear-gradient(90deg, rgba(3,7,15,.92), rgba(3,8,18,.12) 58%), url("brand/avalis-arena-store-v2.png"); }
.rules-page .info-hero, .guide-page .info-hero { background-image: linear-gradient(90deg, rgba(3,7,15,.94), rgba(3,8,18,.18) 60%), url("brand/avalis-raids-v2.png"); }
.play-page .info-hero { background-image: linear-gradient(90deg, rgba(3,7,15,.94), rgba(3,8,18,.12) 62%), url("brand/avalis-hero-v2.png"); }
.membership-page .info-hero, .vote-page .info-hero { background-image: linear-gradient(90deg, rgba(3,7,15,.94), rgba(3,8,18,.15) 60%), url("brand/avalis-champions-v2.png"); }
.media-page .info-hero { background-image: linear-gradient(90deg, rgba(3,7,15,.94), rgba(3,8,18,.18) 60%), url("brand/avalis-community-v2.png"); }
.forum-search { align-self: end; margin-bottom: 10px; padding: 15px 0 0; border: 0; border-top: 1px solid rgba(181,221,255,.58); background: linear-gradient(180deg, rgba(4,10,22,.5), transparent); }

.board-list, .topic-list, .ranking-table, .hunt-table, .events-columns, .store-grid, .info-grid { background: transparent; }
.board-row, .topic-row, .ranking-table > a, .hunt-table > a, .event-board, .info-card, .profile-activity > section { background: linear-gradient(90deg, rgba(12,25,46,.68), rgba(7,14,27,.2)); border-color: rgba(128,185,230,.16); }
.board-row:hover, .topic-row:hover, .ranking-table > a:hover, .hunt-table > a:hover { background: linear-gradient(90deg, rgba(25,53,87,.7), rgba(8,17,32,.22)); }
.forum-sidebar > section, .search-panel > section { border: 0; border-top: 1px solid rgba(148,204,248,.38); background: linear-gradient(180deg, rgba(11,24,44,.55), transparent); }
.board-mark, .topic-state, .avatar { border: 0; background: linear-gradient(145deg, #244c76, #0a1930); clip-path: polygon(50% 0, 92% 24%, 92% 76%, 50% 100%, 8% 76%, 8% 24%); }
.info-card, .info-card.full { border: 0; border-top: 1px solid rgba(128,190,235,.24); background: linear-gradient(90deg, rgba(12,25,46,.7), rgba(7,14,27,.22)); }
.product-card { border: 0; background: linear-gradient(145deg, rgba(17,35,61,.82), rgba(6,13,26,.8)); clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px); }
.credit-package { border: 0; border-top: 1px solid rgba(146,203,247,.28); background: radial-gradient(circle at 50% 35%, rgba(64,134,191,.16), transparent 52%); clip-path: none; }
.store-filters { border: 0; border-top: 1px solid rgba(148,204,248,.4); background: linear-gradient(180deg, rgba(10,22,41,.7), transparent); }
.event-board > header, .live-feed-card > header, .board-card > header { background: linear-gradient(90deg, rgba(28,57,91,.58), rgba(8,17,32,.15)); }
.auth-shell { min-height: calc(100vh - 114px); background-image: linear-gradient(90deg, rgba(3,7,15,.95), rgba(3,8,18,.42)), url("brand/avalis-community-v2.png"); }
.registration-page .auth-shell { background-image: linear-gradient(90deg, rgba(3,7,15,.95), rgba(3,8,18,.38)), url("brand/avalis-hero-v2.png"); }
.auth-card { border: 0; border-top: 1px solid rgba(170,220,255,.6); background: linear-gradient(180deg, rgba(6,14,29,.9), rgba(4,9,19,.78)); clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); }

@media (max-width: 920px) {
    .cinematic-section { min-height: 720px; }
    .cinematic-copy, .cinematic-copy.align-right { width: min(560px, calc(100% - 48px)); margin: 110px auto 0 32px; align-self: start; }
    .discussion-ribbon, .ranking-ribbon { right: 30px; left: 30px; bottom: 60px; width: auto; }
    .scene-number { display: none; }
    .forum-mast { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .home-hero-v2 { min-height: 760px; padding: 50px 22px; grid-template-columns: minmax(0, 1fr); background-position: 62% center; }
    .home-hero-v2::before { background: linear-gradient(90deg, rgba(2,6,15,.88), rgba(2,6,15,.38)), linear-gradient(0deg, #040814, transparent 48%); }
    .home-hero-v2 .hero-copy { min-width: 0; width: 100%; }
    .home-hero-v2 .hero-copy h1 { font-size: clamp(54px, 15vw, 68px); }
    .world-strip-v2 { margin-top: 0; }
    .cinematic-section { min-height: 700px; background-position: 58% center; }
    .community-showcase, .arena-showcase { background-position: 42% center; }
    .cinematic-copy, .cinematic-copy.align-right { width: calc(100% - 40px); margin: 78px 20px 0; }
    .cinematic-copy h2 { font-size: clamp(48px, 15vw, 68px); }
    .discussion-ribbon, .ranking-ribbon { right: 16px; left: 16px; bottom: 38px; }
    .discussion-ribbon > a { grid-template-columns: 78px 1fr; }
    .discussion-ribbon time { display: none; }
    .scene-actions { align-items: stretch; flex-direction: column; gap: 10px; }
    .scene-actions .button { width: 100%; }
    .forum-mast, .page-mast, .store-mast, .events-mast, .info-hero { min-height: 380px; padding: 52px 22px; }
    .final-cta-v2 { min-height: 540px; }
}
