:root {
    color-scheme: dark;
    --bg: #0b1018;
    --surface: #111823;
    --raised: #161e2b;
    --text: #edf0f5;
    --muted: #a4afc1;
    --dim: #8f9bad;
    --line: #263140;
    --gold: #e8b86a;
    --gold-light: #f5ca83;
    --green: #7aca9e;
    --red: #f39b99;
    --radius: 11px;
    --serif: Georgia, 'Times New Roman', serif;
    --sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.reference-filters.filters { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.lesson-list, .reference-list { display: grid; margin: 0; }
.lesson-list { padding: 0 18px 0 47px; }
.lesson-list li::marker { color: var(--gold); font-weight: 700; }
.lesson-list a { display: grid; gap: 2px; padding: 12px 5px; }
.lesson-list a:hover strong { color: var(--gold-light); }
.lesson-list a span, .reference-list small { color: var(--muted); font-size: .89rem; }
.lesson-list li + li, .reference-list li + li { border-top: 1px solid var(--line); }
.reference-list { list-style: none; padding: 0 15px; }
.reference-list li { display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; padding: 12px 0; }
.reference-list li > div:first-child { display: grid; gap: 3px; }
.reference-list .form-actions { margin-left: auto; }
.lesson-navigation { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 185px),1fr)); gap: 10px; margin-top: 20px; padding: 12px; }
.lesson-navigation > div, .lesson-navigation > a { display: grid; align-content: start; gap: 4px; padding: 7px; }
.lesson-navigation > a { border: 1px solid var(--line); border-radius: 7px; }
.lesson-navigation > a:hover { border-color: #766044; color: var(--gold-light); }
.lesson-navigation small, .lesson-navigation .muted { color: var(--muted); }
@media (max-width: 760px) {
    .reference-filters.filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reference-filters .filter-search { grid-column: 1/-1; }
    .reference-list .form-actions { margin-left: 0; }
}
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
svg { flex: 0 0 auto; vertical-align: middle; }
h1, h2, h3, p, figure { margin: 0; }
a, button, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
::selection { color: #1a1207; background: var(--gold-light); }
.wrap { width: min(1250px, calc(100% - 88px)); margin-inline: auto; }
.narrow { max-width: 740px; }
.muted { color: var(--muted); }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip:focus { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 12px; color: #191307; background: var(--gold); border-radius: 7px; }

.site-header { position: relative; z-index: 5; background: #0b1018; border-bottom: 1px solid #ffffff14; }
.header-row { position: relative; display: flex; gap: 44px; align-items: center; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #f1eee8; font-size: 1.6rem; line-height: 1; font-weight: 750; letter-spacing: -.065em; white-space: nowrap; }
.brand i { display: inline-flex; color: var(--gold); filter: drop-shadow(0 0 10px #de9c4e28); }
.brand b { color: var(--gold); font-weight: 750; }
.site-nav, .header-actions { display: flex; align-items: center; }
.site-nav { height: 70px; gap: 28px; }
.site-nav a { position: relative; display: flex; align-items: center; height: 100%; color: var(--muted); font-size: .91rem; font-weight: 600; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--gold-light); }
.site-nav a[aria-current]::after { content: ''; position: absolute; inset: auto 0 0; height: 2px; background: var(--gold); }
.header-actions { margin-left: auto; gap: 17px; color: var(--muted); font-size: .89rem; }
.header-actions > * { white-space: nowrap; }
.nav-ad { display: inline-flex; align-items: center; gap: 7px; }
.nav-ad:hover, .header-actions > a:not(.button):hover { color: var(--gold-light); }
.icon-button { display: inline-grid; place-items: center; min-width: 38px; min-height: 38px; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 7px; }
.icon-button:hover { color: var(--gold-light); border-color: #6c553b; }
.mobile-toggle { display: none; }
.button { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 43px; padding: 8px 17px; border: 1px solid transparent; border-radius: 7px; white-space: nowrap; font-weight: 650; line-height: 1.3; transition: background .16s, border-color .16s, color .16s; }
.button.small { min-height: 37px; padding: 7px 12px; font-size: .88rem; }
.button.gold { color: #20180c; background: var(--gold); border-color: #ffeeaf26; }
.button.gold:hover { background: #f2ca88; }
.button.outline { color: #e8ecf3; background: #ffffff05; border-color: var(--line); }
.button.outline:hover, .button[aria-pressed="true"] { color: var(--gold-light); border-color: #766044; background: #e8b86a0d; }
.button.danger { color: var(--red); border-color: #6b3a43; background: #8a30301c; }
.button.danger:hover { background: #a52e3938; }
.button:disabled { cursor: wait; opacity: .66; }

.hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: 514px; background: #141721 url('/assets/hero.webp') center 47% / cover no-repeat; }
.hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #0b1018ed 0%, #0b1018b8 27%, #0b10182e 57%, transparent 82%), linear-gradient(0deg, var(--bg) 0%, #0b101800 30%, #0b101800 88%, #0b101848 100%); }
.hero-content { padding-block: 47px 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font-weight: 730; font-size: .76rem; }
.eyebrow > span { display: inline-block; width: 24px; height: 1px; background: currentColor; }
.hero h1 { margin-top: 17px; max-width: 650px; font: 700 clamp(3.2rem, 5.1vw, 5rem)/1.01 var(--serif); letter-spacing: -.049em; color: #f7f3eb; text-wrap: balance; }
.hero h1 em { color: var(--gold-light); font-style: normal; }
.hero-content > p { max-width: 490px; color: #c0c8d4; margin: 19px 0 24px; font-size: clamp(1rem, 1.5vw, 1.13rem); line-height: 1.6; }
.search-form { position: relative; display: flex; gap: 11px; align-items: center; width: min(100%, 527px); padding: 6px 6px 6px 15px; border: 1px solid #3b444f; border-radius: 9px; color: var(--gold); background: #101620ec; box-shadow: 0 12px 28px #0002; }
.search-form input { min-width: 0; flex: 1; width: 100%; padding: 6px 0; background: transparent; border: 0; color: var(--text); font-size: .97rem; outline: none; }
.search-form:focus-within { border-color: #947046; }
.search-form .button { padding-inline: 16px; min-height: 38px; font-size: .87rem; }
.search-suggestions { position: absolute; z-index: 4; inset: calc(100% + 8px) 0 auto; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; color: var(--text); background: #131c27; box-shadow: 0 14px 25px #0007; }
.search-suggestions a { display: flex; align-items: center; justify-content: space-between; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: .89rem; }
.search-suggestions a:last-child { border-bottom: 0; }
.search-suggestions a:hover, .search-suggestions a:focus { background: var(--raised); }
.search-suggestions small { color: var(--gold); }
.hero-links { display: flex; flex-wrap: wrap; gap: 18px 25px; margin-top: 19px; }
.hero-links a { display: inline-flex; gap: 6px; align-items: center; color: #ccd6e2; font-size: .88rem; }
.hero-links a svg { color: var(--gold); }
.hero-links a:hover { color: var(--gold-light); }

.home-content { padding: 8px 0 70px; }
.home-section { margin-top: 36px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 22px; margin-bottom: 16px; }
.section-head h2 { display: flex; align-items: center; gap: 9px; font-size: clamp(1.22rem, 2.2vw, 1.65rem); line-height: 1.25; font-weight: 700; letter-spacing: -.025em; }
.section-head p { margin-top: 5px; color: var(--muted); font-size: .92rem; }
.section-icon { display: inline-flex; color: var(--gold); }
.section-link { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-size: .88rem; font-weight: 620; }
.section-link:hover, .article-link:hover { color: #f5d9a8; }
.season-strip { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 9px; }
.season-chip { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 10px 5px; min-height: 44px; background: var(--surface); color: #c6cfdd; border: 1px solid var(--line); border-radius: 7px; font-weight: 650; font-size: .91rem; white-space: nowrap; }
.season-chip:hover, .season-chip.current-season { color: var(--gold-light); border-color: #80603a; background: #211b17; }
.season-chip.current-season { box-shadow: inset 0 0 20px #e4a8560a; }
.category-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.category-grid.full { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.category-card { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-height: 130px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(150deg, #141c29, #101620); transition: border-color .18s, transform .18s; }
.category-card:hover { border-color: var(--tone, var(--gold)); transform: translateY(-2px); }
.category-card strong { margin-top: 4px; font-size: .91rem; line-height: 1.23; }
.category-summary { color: var(--muted); font-size: .81rem; line-height: 1.45; }
.tone-gold { --tone: #e8bd75; --tone-bg: #a9773625; }
.tone-violet { --tone: #bca9f5; --tone-bg: #8761cc28; }
.tone-cyan { --tone: #79c6e7; --tone-bg: #397da52b; }
.tone-green { --tone: #79caa9; --tone-bg: #387b602c; }
.tone-red { --tone: #ef9b86; --tone-bg: #af4b3c29; }
.tone-blue { --tone: #97aff0; --tone-bg: #5269b52e; }
.category-icon { display: inline-grid; place-items: center; width: 41px; height: 41px; background: var(--tone-bg, #a9773625); color: var(--tone, var(--gold)); border: 1px solid currentColor; border-color: color-mix(in srgb, var(--tone, var(--gold)) 22%, transparent); border-radius: 8px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.guide-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.guide-card:hover { border-color: #5e523f; }
.card-cover { position: relative; display: block; height: 155px; background-color: #1d2938; overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.art-warrior, .art-forge, .art-ruins { background-image: linear-gradient(0deg, #0b10187d, transparent 58%), url('/assets/guide-art.webp'); background-size: 100% 100%, 300% auto; }
.art-warrior { background-position: 0 0, left 44%; }
.art-forge { background-position: 0 0, center 43%; }
.art-ruins { background-position: 0 0, right 43%; }
.difficulty { position: absolute; left: 12px; top: 12px; padding: 3px 9px; font-size: .75rem; font-weight: 700; color: #d5f6e2; border-radius: 5px; background: #122b23e8; border: 1px solid #4b8b6d88; }
.difficulty.experienced { color: #ffe5b9; background: #312516ea; border-color: #b88c4588; }
.card-body { padding: 15px 16px 13px; }
.card-category { color: var(--gold); font-size: .73rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 690; }
.card-body h3 { font-size: 1.08rem; margin-top: 4px; line-height: 1.33; }
.card-body h3 a:hover { color: var(--gold-light); }
.card-body p { margin-block: 6px 12px; min-height: 2.8em; color: var(--muted); font-size: .9rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: 9px 15px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--dim); font-size: .79rem; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.home-lists { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.list-panel { padding: 16px; }
.list-panel h2 { display: flex; gap: 7px; align-items: center; font-size: 1.08rem; margin-bottom: 7px; }
.list-panel h2 svg { color: var(--gold); }
.list-panel p { padding-block: 8px; color: var(--muted); font-size: .9rem; }
.list-panel a { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 41px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.list-panel a:hover, .list-panel a.list-all { color: var(--gold-light); }
.list-panel a.list-all { border: 0; }
.news .panel { padding: 19px; }
.news p { color: var(--muted); margin-block: 4px 8px; }
.ad-band { display: grid; justify-items: center; gap: 6px; margin-block: 25px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ad-band img, .campaign-preview img { max-width: 100%; height: auto; }
.ad-band > span { color: var(--dim); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.house-ad { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 15px; padding: 15px 17px; border: 1px solid #4f4636; border-radius: var(--radius); background: linear-gradient(110deg, #231d16, #121923 68%); }
.house-ad > svg { color: var(--gold); }
.house-ad p { color: var(--muted); font-size: .9rem; }
.house-ad .button { margin-left: auto; }
.site-footer { padding: 28px 0 16px; background: #0e141e; border-top: 1px solid var(--line); }
.footer-top, .footer-end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 22px; align-items: center; }
.footer-top p { margin-top: 8px; color: var(--muted); font-size: .91rem; }
.footer-top nav { display: flex; flex-wrap: wrap; gap: 18px; font-size: .9rem; }
.footer-end { margin-top: 20px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: .83rem; }
.site-footer a:hover { color: var(--gold-light); }

.inner-page { min-height: 52vh; padding-block: 26px 52px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; margin-bottom: 23px; }
.breadcrumb span { color: #d4dce9; }
.breadcrumb a:hover { color: var(--gold-light); }
.page-head { margin-bottom: 23px; }
.page-head h1, .article-head h1, .auth-card h1, .error-page h1 { font: 700 clamp(2.35rem, 4.5vw, 3.7rem)/1.08 var(--serif); letter-spacing: -.035em; }
.page-head .eyebrow, .article-head .eyebrow { margin-bottom: 10px; }
.page-head p, .article-head > p { margin: 9px 0 0; color: var(--muted); max-width: 740px; }
.page-head .section-link, .page-head .pill { margin-top: 9px; }
.subsection { margin-top: 30px; }
.subsection > h2 { margin-bottom: 12px; font-size: 1.28rem; }
.season-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.season-tile { padding: 17px; }
.season-tile:hover { border-color: #896843; }
.season-tile h2 { margin: 7px 0 4px; font-size: 1.22rem; }
.season-tile p { color: var(--muted); font-size: .9rem; }
.change-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; padding: 17px; }
.change-list strong { display: block; margin-top: 5px; }
.change-list strong a:hover { color: var(--gold-light); }
.change-list p, .article-changes p { margin: 4px 0; font-size: .91rem; color: var(--muted); }
.change-tag { display: inline-block; padding: 2px 8px; border: 1px solid #675633; border-radius: 5px; color: var(--gold-light); font-size: .77rem; background: #a87b3620; }
.change-tag.introduced { color: #9be2bb; background: #61b78a15; border-color: #4a7664; }
.change-tag.removed { color: #f9b0ae; border-color: #74404d; background: #b13c4924; }
.filters { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr .95fr 1fr auto; gap: 12px; align-items: end; padding: 15px; }
.filters > * { min-width: 0; }
.result-count { margin: 21px 0 11px; color: var(--muted); font-size: .92rem; }
.pagination { display: flex; justify-content: center; gap: 7px; margin-top: 22px; }
.pill { display: inline-flex; align-items: center; justify-content: center; padding: 3px 8px; min-height: 26px; width: fit-content; color: #c9d4e4; border: 1px solid #354257; border-radius: 5px; background: #1a2433; font-size: .8rem; line-height: 1.3; }
a.pill:hover, .pill[aria-current] { color: var(--gold-light); border-color: #8b693d; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.empty { display: grid; gap: 3px; padding: 19px; color: var(--muted); border: 1px dashed #354257; border-radius: 9px; background: #121a2470; }
.empty strong { color: var(--text); }
.article-head { margin-bottom: 23px; max-width: 960px; }
.article-head > p { font-size: 1.05rem; }
.article-meta, .article-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 17px; color: var(--muted); font-size: .88rem; margin-top: 14px; }
.article-meta > span { display: inline-flex; gap: 6px; align-items: center; }
.article-meta svg { color: var(--gold); }
.article-cover { overflow: hidden; max-height: 240px; min-height: 140px; aspect-ratio: 6/1; margin-bottom: 17px; background-color: #1d2938; border: 1px solid var(--line); border-radius: var(--radius); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-cover.art-warrior, .article-cover.art-forge, .article-cover.art-ruins { background-size: 100% 100%, 300% auto; }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); align-items: start; gap: 19px; }
.article-body { padding: clamp(17px, 3.5vw, 34px); overflow: hidden; line-height: 1.7; }
.article-body h2 { margin: 24px 0 8px; line-height: 1.3; font-size: 1.45rem; scroll-margin-top: 15px; }
.article-body > h2:first-child { margin-top: 0; }
.article-body > p + p { margin-top: 11px; }
.article-body > p, .article-body li { color: #d0d7e2; }
.article-body li + li { margin-top: 6px; }
.article-body ul, .article-body ol { padding-left: 25px; }
.article-link { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); }
.article-body figure { margin-block: 15px; }
.article-body figure img { border-radius: 7px; width: auto; }
.official-images { margin-block: 18px; scroll-margin-top: 90px; }
.article-body .official-figure img { display: block; max-width: 100%; height: auto; }
.official-image-list { display: grid; gap: 12px; padding-block: 8px; }
.official-image-list .official-figure { margin-block: 0; }
.article-body figcaption { color: var(--muted); margin-top: 4px; font-size: .87rem; }
.article-body .gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.article-body .gallery img { width: 100%; }
.article-body .gallery figcaption { grid-column: 1/-1; }
.video { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 7px; background: #090d13; margin-block: 16px; }
.article-index { margin-bottom: 12px; padding: 15px; }
.article-index h2 { margin-bottom: 7px; font-size: .99rem; }
.article-index > a { display: block; padding: 4px 0; color: var(--muted); font-size: .89rem; }
.article-index > a:hover { color: var(--gold-light); }
.article-disclosure { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; margin-block: 13px; }
.article-disclosure summary { cursor: pointer; font-weight: 650; }
.article-disclosure p { color: var(--muted); margin-top: 7px; }
.article-changes > div { padding-block: 9px; border-bottom: 1px solid var(--line); }
.article-changes > div > a:first-child { font-weight: 650; margin-right: 7px; }
.vote-panel { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 17px; }
.vote-panel > span { color: var(--muted); font-size: .83rem; }
.article-comments { max-width: 850px; padding: 18px; }
.article-comments > div { padding-block: 10px; border-bottom: 1px solid var(--line); }
.article-comments small { color: var(--muted); margin-left: 9px; }
.article-comments form { margin-top: 13px; display: grid; gap: 9px; justify-items: start; }
.article-comments form label { width: 100%; }
.callout { display: flex; align-items: flex-start; gap: 10px; margin-block: 13px; padding: 12px; background: #95703f14; border: 1px solid #6c5636; border-left: 3px solid #b48a4b; border-radius: 7px; color: var(--gold-light); }
.callout > svg { margin-top: 3px; }
.callout p { color: #d4dbe6; font-size: .94rem; }
.callout.info { color: #a7c9fc; border-color: #3e5a82; background: #5e8bcc15; }
.callout.warning { color: #ffc09d; border-color: #8a5036; background: #b7734f15; }
.callout.note { color: #c4b7e9; border-color: #6c5c8c; background: #8568b719; }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.library-grid > .empty { grid-column: 1/-1; }
.library-item { padding: 14px; }
.library-item a { color: var(--gold-light); font-weight: 650; }
.library-item p { color: var(--muted); font-size: .85rem; margin-bottom: 7px; }
.clear-history { margin-top: 13px; }

label { display: grid; gap: 5px; color: #d2dbe7; font-size: .88rem; font-weight: 620; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
    min-width: 0;
    width: 100%;
    min-height: 41px;
    padding: 8px 10px;
    border: 1px solid #344154;
    border-radius: 7px;
    background: #0f1621;
    color: var(--text);
    font-size: .94rem;
    font-weight: 400;
}
.search-form input[type=search] { min-height: 36px; padding: 0; background: transparent; border: 0; }
input::placeholder, textarea::placeholder { color: #8996a9; }
select { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23a4afc1' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--gold); width: 16px; height: 16px; }
input[type=file]::file-selector-button { margin-right: 8px; border: 0; border-radius: 4px; background: var(--raised); color: var(--text); padding: 3px 8px; font: inherit; cursor: pointer; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 7px; padding: 10px; margin: 0; }
legend { color: var(--muted); font-size: .88rem; padding-inline: 5px; }
.form-stack, .form-panel { display: grid; gap: 13px; }
.form-panel { padding: clamp(14px, 3vw, 23px); }
.form-panel h2 { font-size: 1.2rem; }
.form-panel > p { color: var(--muted); }
.form-panel > .button { justify-self: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-actions, .inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.page-head .form-actions, .advertiser-page > .form-actions { margin-top: 14px; }
.check { display: flex; align-items: flex-start; gap: 6px; font-weight: 500; }
.check input { flex: 0 0 auto; }
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 11px; }
.flash { margin-block: 13px; padding: 11px 14px; border: 1px solid #527761; background: #18332a; color: #c8eed6; border-radius: 7px; font-size: .92rem; }
.flash.error { border-color: #81555c; background: #382127; color: #ffcbce; }
.flash a { text-decoration: underline; }
.error-page { justify-items: start; }
.auth-page { display: grid; place-items: center; padding: 45px 0; min-height: 64vh; }
.auth-card { width: min(100%, 455px); padding: clamp(16px, 4vw, 32px); }
.auth-card h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-top: 10px; }
.auth-card > p { color: var(--muted); margin: 10px 0 17px; }
.auth-card .auth-other { margin-bottom: 0; font-size: .88rem; }
.auth-other a { color: var(--gold-light); }
.ad-market-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.placement-card { display: flex; flex-direction: column; align-items: start; gap: 8px; padding: 15px; }
.placement-card h3 { font-size: 1.1rem; line-height: 1.3; }
.placement-card p { color: var(--muted); font-size: .88rem; }
.placement-card .slot-price { color: var(--gold-light); font-size: 1.36rem; font-weight: 730; }
.slot-price span { color: var(--muted); font-weight: 400; font-size: .83rem; }
.placement-card .button { margin-top: auto; }
.placement-card dl { width: 100%; margin: 1px 0; font-size: .86rem; }
.placement-card dl div { display: flex; justify-content: space-between; gap: 6px; border-top: 1px solid var(--line); padding-block: 5px; }
.placement-card dt { color: var(--muted); }
.placement-card dd { margin: 0; text-align: right; }
.campaign-form { max-width: 795px; }
.campaign-metrics { margin-top: 14px; }
.campaign-preview > img { border: 1px solid var(--line); border-radius: 7px; }

.manager .header-row { gap: 15px; }
.manager-label { border-left: 1px solid var(--line); padding-left: 15px; color: var(--gold); font-size: .9rem; font-weight: 650; }
.manager-grid { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 22px; align-items: start; min-height: calc(100vh - 72px); padding-block: 23px 35px; }
.manager-menu { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.manager-profile { display: grid; gap: 2px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.manager-profile span { color: var(--muted); font-size: .84rem; }
.manager-menu nav { display: grid; gap: 4px; padding: 7px; }
.manager-menu nav a { display: flex; gap: 8px; align-items: center; padding: 8px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); font-size: .89rem; line-height: 1.25; }
.manager-menu nav a:hover, .manager-menu nav a[aria-current] { color: var(--gold-light); background: #d8a45316; border-color: #6b5437; }
.manager-head { display: flex; justify-content: space-between; gap: 12px 20px; align-items: end; }
.manager-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.manager-main > .flash { width: 100%; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 9px; }
.metric { padding: 13px; display: grid; gap: 5px; }
.metric span { color: var(--muted); font-size: .87rem; }
.metric strong { color: var(--gold-light); font-size: 1.7rem; line-height: 1.2; }
.table-scroll { overflow: auto; }
.table-scroll table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
.table-scroll th, .table-scroll td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.table-scroll th { background: #192332; color: #d8e2f0; font-weight: 650; white-space: nowrap; }
.table-scroll td a { color: var(--gold-light); }
.table-scroll tbody tr:last-child td { border-bottom: 0; }
.article-body .table-scroll { margin-block: 16px; border: 1px solid var(--line); border-radius: 8px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; }
.compact { padding: 12px; margin-block: 9px 13px; }
.delete-form { margin-top: 11px; }
td .delete-form { margin: 0; }
.editor-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.editor-toolbar input[type=file] { max-width: 340px; }
.editor-toolbar [role=status], .editor-status { color: var(--muted); font-size: .87rem; }
.editor-status.error { color: var(--red); }
.block-list { display: grid; gap: 9px; }
.editor-block { display: grid; gap: 8px; border: 1px solid var(--line); background: #0e1520; border-radius: 8px; padding: 10px; }
.editor-block-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.editor-block .editor-block-head strong { color: var(--gold-light); font-size: .88rem; }
.format-bar { display: flex; gap: 5px; flex-wrap: wrap; }
.format-bar .button.small, .editor-block-head .button.small { min-height: 30px; padding: 4px 7px; }
.season-admin-list { display: grid; gap: 5px; margin-top: 9px; }
.season-admin-item { border: 1px solid var(--line); border-radius: 6px; }
.season-admin-item summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; cursor: pointer; font-size: .89rem; }
.season-admin-item summary > span:first-child::before { content: '›'; display: inline-block; color: var(--gold-light); margin-right: 6px; }
.season-admin-item[open] summary > span:first-child::before { transform: rotate(90deg); }
.season-admin-item > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 7px; }
.editor-block .table-scroll input { min-width: 105px; }
.role-list dt { color: var(--gold-light); font-weight: 650; }
.role-list dd { margin: 1px 0 8px; color: var(--muted); }

@media (max-width: 1080px) {
    .wrap { width: calc(100% - 52px); }
    .header-row { gap: 23px; }
    .site-nav { gap: 20px; }
    .header-actions { gap: 11px; }
    .hero { min-height: 475px; }
    .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ad-market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .manager-grid { grid-template-columns: 190px minmax(0, 1fr); gap: 14px; }
}

@media (max-width: 760px) {
    .wrap { width: calc(100% - 32px); }
    .header-row { min-height: 61px; gap: 10px; }
    .brand { font-size: 1.35rem; }
    .brand svg { width: 27px; height: 27px; }
    .mobile-toggle { display: inline-grid; order: 3; }
    .site-nav { display: none; height: auto; position: absolute; right: 0; top: 100%; left: 0; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: 4px 9px; }
    .site-nav.open { display: grid; gap: 0; }
    .site-nav a { padding: 9px 6px; }
    .site-nav a[aria-current]::after { left: 6px; right: auto; width: 22px; }
    .header-actions { gap: 7px; }
    .header-actions .nav-ad { display: none; }
    .hero { min-height: 420px; background-position: 62% center; }
    .hero::before { background: linear-gradient(90deg, #0b1018f5 0%, #0b1018b9 42%, #0b101849 100%), linear-gradient(0deg, var(--bg), transparent 36%); }
    .hero-content { padding-block: 35px 41px; }
    .hero h1 { font-size: clamp(2.8rem, 9vw, 4.2rem); }
    .hero-content > p { max-width: 400px; }
    .home-section { margin-top: 28px; }
    .season-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .section-head { align-items: start; }
    .section-link { font-size: .83rem; }
    .category-grid, .category-grid.full, .guide-grid, .season-grid, .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-lists, .change-list { grid-template-columns: 1fr; }
    .article-grid { grid-template-columns: 1fr; }
    .article-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .article-head h1 { font-size: clamp(2.25rem, 7vw, 3.5rem); }
    .card-cover { height: 130px; }
    .manager-grid { grid-template-columns: 1fr; gap: 12px; padding-top: 12px; }
    .manager-profile { display: none; }
    .manager-menu nav { display: flex; overflow-x: auto; }
    .manager-menu nav a { white-space: nowrap; }
    .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 445px) {
    .hero { min-height: 396px; }
    .hero-content > p { margin-block: 13px 17px; }
    .hero-links { gap: 10px 15px; }
    .hero-search { gap: 7px; padding-left: 8px; }
    .hero-search svg { width: 17px; }
    .hero-search .button { padding-inline: 8px; font-size: .78rem; }
    .hero-search input[type=search] { font-size: .8rem; }
    .section-head { flex-wrap: wrap; }
    .section-head p { font-size: .86rem; }
    .category-card { min-height: 119px; padding: 10px; }
    .season-chip { font-size: .8rem; }
    .guide-grid, .library-grid, .ad-market-grid, .form-grid, .season-admin-item > div { grid-template-columns: 1fr; }
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-search { grid-column: 1/-1; }
    .article-sidebar { grid-template-columns: 1fr; }
    .header-actions .button { max-width: 110px; overflow: hidden; }
    .article-head .pill { font-size: .75rem; }
    .manager-head { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
