:root {
    --bg: #11151c;
    --bg-deep: #0b0e13;
    --surface: #181d25;
    --surface-2: #202630;
    --surface-3: #282f3a;
    --line: rgba(255, 255, 255, .085);
    --line-strong: rgba(255, 255, 255, .15);
    --text: #f3f0ea;
    --muted: #969eaa;
    --muted-2: #6d7581;
    --accent: #dba653;
    --accent-bright: #f4c875;
    --accent-soft: rgba(219, 166, 83, .13);
    --success: #68c99a;
    --danger: #ec7e7e;
    --rail: 78px;
    --drawer: 264px;
    --radius: 18px;
    --shadow: 0 22px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, Avenir, "Segoe UI", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 80% 5%, rgba(72, 95, 116, .09), transparent 35%);
    z-index: 0;
}
img, video { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: #13100b; background: var(--accent-bright); }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 1000; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: #111; transition: top .2s; }
.skip-link:focus { top: 16px; }

.icon-rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: var(--rail);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 15px 10px;
    border-right: 1px solid var(--line);
    background: #151920;
    box-shadow: 12px 0 35px rgba(0, 0, 0, .12);
}
.rail-logo { width: 49px; height: 49px; display: grid; place-items: center; margin-bottom: 13px; border: 1px solid rgba(244, 200, 117, .24); border-radius: 14px; background: linear-gradient(145deg, #242933, #171b22); box-shadow: inset 0 1px rgba(255,255,255,.05); }
.rail-logo img { width: 34px; height: 34px; }
.rail-button { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 13px; background: transparent; color: #77808d; cursor: pointer; transition: .2s ease; }
.rail-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail-button span:not(.admin-orb) { position: absolute; left: 58px; top: 50%; z-index: 80; transform: translate(8px,-50%); padding: 5px 9px; border-radius: 6px; background: #080b0f; color: #ddd; font-size: 12px; opacity: 0; pointer-events: none; transition: .18s; white-space: nowrap; }
.rail-button:hover, .rail-button.is-active { background: var(--accent-soft); color: var(--accent-bright); }
.rail-button:hover span { opacity: 1; transform: translate(0,-50%); }
.rail-button.is-active::before { content: ""; position: absolute; left: -10px; width: 3px; height: 24px; border-radius: 0 4px 4px 0; background: var(--accent); }
.rail-nav { display: flex; flex-direction: column; gap: 8px; }
.rail-bottom { margin-top: auto; }
.admin-orb { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(219,166,83,.35); border-radius: 50%; background: linear-gradient(145deg, #3a3024, #211c17); color: var(--accent-bright); font-size: 13px; font-weight: 800; }

.category-drawer {
    position: fixed;
    inset: 0 auto 0 var(--rail);
    z-index: 50;
    width: var(--drawer);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: #12161d;
    transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.drawer-brand { min-height: 157px; display: flex; flex-direction: column; justify-content: flex-end; padding: 23px 23px 19px; border-bottom: 1px solid var(--line); background: linear-gradient(0deg, rgba(14,17,22,.96), rgba(14,17,22,.23)), url("../images/hero-fantasy.png") 72% center/cover; }
.drawer-brand a { font-family: Georgia, serif; color: #fff8ea; font-size: 23px; line-height: 1.1; }
.drawer-brand small { margin-top: 6px; color: #a3a8ae; font-size: 11px; letter-spacing: .04em; }
.eyebrow { display: block; margin-bottom: 7px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.category-nav { flex: 1; overflow-y: auto; padding: 20px 12px 30px; scrollbar-width: thin; scrollbar-color: #343a44 transparent; }
.nav-label { margin: 0 11px 10px; color: #5e6672; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.category-group { margin-bottom: 3px; }
.category-link { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 9px; color: #b1b6bf; font-size: 13px; font-weight: 650; transition: .18s; }
.category-link:hover { background: rgba(255,255,255,.045); color: var(--text); }
.category-home { margin-bottom: 10px; color: var(--accent-bright); background: rgba(219,166,83,.08); }
.category-icon { width: 23px; color: var(--accent); text-align: center; font-size: 15px; }
.subcategory-list { display: grid; margin: 0 0 6px 45px; border-left: 1px solid var(--line); }
.subcategory-list a { padding: 5px 12px; color: #737c88; font-size: 12px; transition: .18s; }
.subcategory-list a:hover { color: var(--accent-bright); }
.empty-nav { padding: 12px; color: var(--muted-2); font-size: 12px; }
.drawer-footer { padding: 14px 22px; border-top: 1px solid var(--line); color: #747d89; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.status-dot { width: 6px; height: 6px; display: inline-block; margin-right: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 12px var(--success); }

.page-shell { min-height: 100vh; display: flex; flex-direction: column; margin-left: calc(var(--rail) + var(--drawer)); transition: margin-left .28s cubic-bezier(.4,0,.2,1); }
.topbar { position: sticky; top: 0; z-index: 35; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(24px, 4vw, 62px); border-bottom: 1px solid var(--line); background: rgba(17, 21, 28, .88); backdrop-filter: blur(18px); }
.global-search { position: relative; width: min(590px, 56vw); height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: .2s; }
.global-search:focus-within { border-color: rgba(219,166,83,.42); box-shadow: 0 0 0 3px rgba(219,166,83,.08); }
.global-search > svg, .search-page-form svg { width: 18px; flex: 0 0 auto; fill: none; stroke: #7d8591; stroke-width: 1.8; stroke-linecap: round; }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); }
.global-search input::placeholder { color: #69717d; }
.global-search kbd { padding: 2px 7px; border: 1px solid var(--line-strong); border-radius: 5px; color: #777f8a; background: #11151b; font: 10px/1.5 inherit; }
.search-results { position: absolute; top: calc(100% + 9px); left: 0; right: 0; overflow: hidden; padding: 7px; border: 1px solid var(--line-strong); border-radius: 13px; background: #191e26; box-shadow: var(--shadow); }
.search-result-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border-radius: 8px; transition: .15s; }
.search-result-link:hover { background: var(--surface-3); }
.search-result-link strong { display: block; color: #e8e6e1; font-size: 13px; }
.search-result-link small { display: block; color: var(--muted-2); font-size: 11px; }
.search-result-link > small { flex: 0 0 auto; color: var(--accent); text-transform: uppercase; }
.search-empty { margin: 0; padding: 15px; color: var(--muted); text-align: center; font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.language-switcher { position: relative; }
.language-switcher > button { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: #aab0b9; cursor: pointer; font-size: 10px; font-weight: 800; }
.language-switcher > button span { font-size: 15px; }
.language-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; min-width: 205px; display: none; padding: 7px; border: 1px solid var(--line-strong); border-radius: 11px; background: #191e26; box-shadow: var(--shadow); }
.language-switcher:hover .language-menu, .language-switcher:focus-within .language-menu { display: grid; }
.language-menu a { display: grid; grid-template-columns: 25px 1fr; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 7px; color: #aeb4bd; font-size: 11px; }
.language-menu a:hover, .language-menu a.is-active { background: var(--surface-3); color: var(--accent-bright); }
.language-menu a > span:first-child { font-size: 16px; }
.language-menu strong, .language-menu small { display: block; }
.language-menu small { color: var(--muted-2); font-size: 8px; }
.user-chip { display: flex; align-items: center; gap: 9px; color: #c0c4cb; font-size: 12px; font-weight: 650; }
.user-chip span { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-bright); }
.mobile-header { display: none; }
.mobile-language { display: none; color: var(--accent); font-size: 9px; font-weight: 800; }

.main-content { width: 100%; max-width: 1520px; flex: 1; margin: 0 auto; padding: 34px clamp(24px, 4vw, 62px) 80px; }
.message-stack { position: fixed; top: 90px; right: 25px; z-index: 90; width: min(390px, calc(100vw - 30px)); display: grid; gap: 8px; }
.message { padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: 11px; color: #e9e8e4; background: #232933; box-shadow: var(--shadow); }
.message-success { border-color: rgba(104,201,154,.32); }
.message-error { border-color: rgba(236,126,126,.35); }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 750; letter-spacing: .02em; transition: transform .18s, border-color .18s, background .18s; }
.button:hover { transform: translateY(-1px); }
.button-primary { border-color: #e1ae5d; background: linear-gradient(135deg, #efbe70, #c98734); color: #191109; box-shadow: 0 9px 24px rgba(202,133,51,.17); }
.button-primary:hover { background: linear-gradient(135deg, #ffd28b, #db9942); }
.button-ghost { border-color: var(--line-strong); background: rgba(255,255,255,.025); color: #c8cbd0; }
.button-ghost:hover { border-color: rgba(219,166,83,.4); color: var(--accent-bright); }
.button-glass { border-color: rgba(255,255,255,.14); background: rgba(10,12,16,.35); color: #e5e2dc; backdrop-filter: blur(10px); }
.button-block { width: 100%; }

.hero { position: relative; min-height: 510px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(38px, 6vw, 76px); border: 1px solid var(--line); border-radius: 24px; background-image: linear-gradient(90deg, rgba(5,8,12,.93) 0%, rgba(7,10,15,.73) 42%, rgba(7,10,15,.12) 78%), linear-gradient(0deg, rgba(5,8,12,.72), transparent 55%), var(--hero-image); background-position: center; background-size: cover; box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 80px rgba(0,0,0,.2); pointer-events: none; }
.hero-content { position: relative; z-index: 2; max-width: 670px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 9px; color: #c9af83; font-size: 11px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.hero-kicker span { width: 28px; height: 1px; background: var(--accent); }
.hero h1 { margin: 19px 0 17px; color: #f8f4ec; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 5.4vw, 78px); font-weight: 400; line-height: .98; letter-spacing: -.045em; }
.hero h1 em { color: var(--accent-bright); font-weight: 400; }
.hero-content > p { max-width: 560px; color: #adb2b8; font-size: 16px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 29px; }
.hero-stats { position: relative; z-index: 2; display: flex; gap: 42px; margin-top: 42px; }
.hero-stats div { display: grid; }
.hero-stats strong { color: #f3eadb; font-family: Georgia, serif; font-size: 24px; font-weight: 500; line-height: 1; }
.hero-stats span { margin-top: 6px; color: #777f89; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.featured-strip, .section-block { margin-top: 72px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 25px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(28px, 3vw, 40px); font-weight: 400; letter-spacing: -.025em; }
.section-heading > p { max-width: 420px; margin: 0; color: var(--muted); text-align: right; }
.section-heading > a { color: var(--accent); font-size: 12px; font-weight: 700; }
.section-heading.compact h2 { font-size: 30px; }
.featured-card { min-height: 146px; display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 25px; padding: 25px 29px; border: 1px solid rgba(219,166,83,.15); border-radius: var(--radius); background: linear-gradient(105deg, rgba(219,166,83,.08), rgba(255,255,255,.015)); transition: .25s; }
.featured-card:hover { border-color: rgba(219,166,83,.35); transform: translateY(-2px); box-shadow: 0 20px 55px rgba(0,0,0,.15); }
.featured-symbol { width: 74px; height: 74px; display: grid; place-items: center; border: 1px solid rgba(219,166,83,.22); border-radius: 18px; background: #171b20; color: var(--accent-bright); font-size: 30px; }
.card-category { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.featured-copy h3 { margin: 5px 0 4px; color: #eeeae3; font-family: Georgia, serif; font-size: 24px; font-weight: 400; }
.featured-copy p { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; }
.featured-meta { display: flex; align-items: center; gap: 16px; color: var(--muted-2); font-size: 10px; text-transform: uppercase; }
.round-arrow { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); font-size: 18px; font-style: normal; }

.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.category-items { margin-bottom: 10px; border: 1px solid rgba(219,166,83,.12); color: #d3c09e; }
.category-card { position: relative; min-height: 180px; display: flex; flex-direction: column; padding: 23px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, var(--surface), #151a21); transition: .23s; }
.category-card:hover { border-color: rgba(219,166,83,.3); transform: translateY(-3px); background: linear-gradient(145deg, #1f252e, #171b21); }
.category-card-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 18px; border: 1px solid rgba(219,166,83,.2); border-radius: 11px; background: var(--accent-soft); color: var(--accent-bright); font-size: 19px; }
.category-card h3 { margin: 0 0 5px; color: #e9e6df; font-family: Georgia, serif; font-size: 20px; font-weight: 400; }
.category-card p { margin: 0 30px 19px 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.category-count { margin-top: auto; color: #69727e; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.card-arrow { position: absolute; right: 20px; bottom: 17px; color: #69717d; transition: .2s; }
.category-card:hover .card-arrow { color: var(--accent); transform: translateX(3px); }

.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.item-mini-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.item-mini-card { position: relative; min-height: 124px; display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg,var(--surface),#151920); transition: .2s; }
.item-mini-card:hover { border-color: color-mix(in srgb, var(--rarity) 45%, transparent); transform: translateY(-2px); }
.item-mini-icon { width: 50px; height: 50px; display: grid; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb,var(--rarity) 36%,transparent); border-radius: 11px; background: color-mix(in srgb,var(--rarity) 10%,#11161c); color: var(--rarity); font-size: 22px; }
.item-mini-icon img { width: 100%; height: 100%; object-fit: cover; }
.item-mini-card small { color: var(--rarity); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.item-mini-card h3 { margin: 2px 0 4px; color: #e1ded7; font-family: Georgia,serif; font-size: 16px; font-weight: 400; line-height: 1.2; }
.item-mini-card p { margin: 0; color: var(--muted-2); font-size: 9px; line-height: 1.45; }
.item-rarity-dot { position: absolute; top: 12px; right: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--rarity); box-shadow: 0 0 9px var(--rarity); }
.article-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: .22s; }
.article-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.article-card-cover { position: relative; height: 156px; display: flex; align-items: center; justify-content: center; background: center/cover; }
.article-card-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9,11,15,.88), transparent 65%); }
.article-card-cover.no-cover { background: radial-gradient(circle at 50% 35%, rgba(219,166,83,.14), transparent 34%), linear-gradient(145deg,#1d2530,#101419); }
.article-card-cover > span { color: var(--accent-bright); font-size: 36px; }
.article-card-cover small { position: absolute; left: 16px; bottom: 13px; z-index: 2; color: #d9c296; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.article-card-body { padding: 19px; }
.article-card-body h3 { margin: 0 0 8px; font-family: Georgia, serif; font-size: 20px; font-weight: 400; line-height: 1.25; }
.article-card-body h3 a:hover { color: var(--accent-bright); }
.article-card-body p { min-height: 42px; margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.article-card-meta { display: flex; flex-wrap: wrap; gap: 17px; color: #68717d; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.contribute-banner { margin-top: 75px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 35px 39px; border: 1px solid rgba(219,166,83,.17); border-radius: 18px; background: linear-gradient(110deg, rgba(219,166,83,.09), rgba(255,255,255,.015)); }
.contribute-banner h2 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 400; }
.contribute-banner p { margin: 5px 0 0; color: var(--muted); }
.empty-state { grid-column: 1/-1; min-height: 230px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 30px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); text-align: center; }
.empty-state > span { color: var(--accent); font-size: 30px; }
.empty-state h3, .empty-state p { margin: 0; }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 32px; color: #6f7782; font-size: 11px; }
.breadcrumbs a:hover { color: var(--accent); }
.article-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.article-title-wrap { max-width: 980px; }
.article-category-pill, .status-badge { display: inline-flex; align-items: center; min-height: 27px; margin: 0 7px 8px 0; padding: 0 10px; border-radius: 999px; font-size: 9px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.article-category-pill { border: 1px solid rgba(219,166,83,.18); background: var(--accent-soft); color: var(--accent-bright); }
.status-badge { border: 1px solid rgba(104,201,154,.2); background: rgba(104,201,154,.09); color: var(--success); }
.status-badge.draft { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: #a7adb6; }
.article-header h1 { max-width: 1000px; margin: 10px 0 14px; font-family: Georgia, serif; font-size: clamp(42px, 5.4vw, 72px); font-weight: 400; line-height: 1.02; letter-spacing: -.045em; }
.article-lead { max-width: 780px; margin: 0 0 21px; color: #aeb4bd; font-size: 17px; line-height: 1.7; }
.article-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: #727a85; font-size: 10px; }
.article-byline strong { color: #c4c6c8; }
.article-byline i { width: 3px; height: 3px; border-radius: 50%; background: #4e5661; }
.author-avatar { width: 28px; height: 28px; display: grid; place-items: center; margin-right: 2px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.article-cover { max-height: 540px; overflow: hidden; margin: 35px 0 0; border-radius: 18px; background: var(--surface); }
.article-cover img { width: 100%; height: 100%; max-height: 540px; display: block; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: minmax(0, 860px) minmax(190px, 260px); justify-content: space-between; gap: clamp(50px,7vw,110px); margin-top: 46px; }
.article-layout.is-tocless { grid-template-columns: minmax(0, 960px); justify-content: start; }
.article-main { min-width: 0; }
.prose { color: #c6c9ce; font-family: Inter, Avenir, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.82; }
.prose > *:first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { color: #f0ede6; font-family: Georgia, serif; font-weight: 400; line-height: 1.2; letter-spacing: -.018em; }
.prose h2 { margin: 2.2em 0 .65em; padding-bottom: .38em; border-bottom: 1px solid var(--line); font-size: 32px; }
.prose h3 { margin: 1.8em 0 .55em; font-size: 24px; }
.prose h4 { margin: 1.5em 0 .45em; font-size: 19px; color: var(--accent-bright); }
.prose p { margin: 0 0 1.3em; }
.prose a { color: var(--accent-bright); text-decoration: underline; text-decoration-color: rgba(219,166,83,.35); text-underline-offset: 3px; }
.prose strong { color: #ece9e2; }
.prose ul, .prose ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.prose li { margin: .38em 0; padding-left: .35em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin: 1.8em 0; padding: 18px 22px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); color: #d6cfbf; font-family: Georgia, serif; font-size: 18px; font-style: italic; }
.prose code { padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; background: #0d1117; color: #e7b96e; font: 13px Consolas, monospace; }
.prose pre { overflow-x: auto; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #0c1015; }
.prose pre code { padding: 0; border: 0; background: none; }
.prose table { width: 100%; margin: 1.8em 0; border-collapse: collapse; font-size: 13px; }
.prose th, .prose td { padding: 11px 13px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface-2); color: #e4e1da; }
.prose figure { margin: 2em 0; }
.prose figure img, .prose figure video { width: 100%; max-height: 650px; display: block; object-fit: contain; border: 1px solid var(--line); border-radius: 14px; background: #0a0d11; }
.prose figure audio { width: 100%; }
.prose figcaption { margin-top: 8px; color: #707985; font-size: 11px; text-align: center; }
.prose .callout { padding: 18px 20px; border: 1px solid rgba(219,166,83,.2); border-radius: 12px; background: rgba(219,166,83,.07); }
.document-link { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); text-decoration: none !important; }
.article-toc { min-width: 0; }
.toc-card { position: sticky; top: 105px; padding: 21px; border-left: 1px solid var(--line-strong); }
.toc-card nav { display: grid; gap: 3px; }
.toc-card a { padding: 6px 0; color: #747d88; font-size: 11px; line-height: 1.35; transition: .15s; }
.toc-card a[data-level="3"] { padding-left: 13px; font-size: 10px; }
.toc-card a:hover, .toc-card a.is-active { color: var(--accent-bright); }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 45px; padding-top: 24px; border-top: 1px solid var(--line); }
.tag-list a { padding: 5px 9px; border-radius: 6px; background: var(--surface-2); color: #9199a4; font-size: 10px; }
.attachments { margin-top: 52px; }
.attachments h2 { margin: 0 0 17px; font-family: Georgia, serif; font-weight: 400; }
.attachment-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.attachment-card { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.attachment-card > span { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 800; }
.attachment-card strong, .attachment-card small { display: block; }
.attachment-card strong { color: #d9d7d2; font-size: 12px; }
.attachment-card small { color: var(--muted-2); font-size: 9px; }
.related-section { margin-top: 85px; padding-top: 45px; border-top: 1px solid var(--line); }
.related-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.related-grid > a { display: grid; grid-template-columns: 40px 1fr auto; gap: 13px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.related-grid > a > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.related-grid small, .related-grid strong, .related-grid p { display: block; }
.related-grid small { color: var(--accent); font-size: 8px; text-transform: uppercase; }
.related-grid strong { margin: 2px 0 4px; color: #e0ddd6; font-family: Georgia, serif; font-size: 16px; line-height: 1.2; }
.related-grid p { margin: 0; color: var(--muted-2); font-size: 10px; }
.related-grid i { color: var(--accent); font-style: normal; }

.listing-header { min-height: 240px; display: grid; grid-template-columns: 76px 1fr; align-items: center; column-gap: 23px; padding: 25px 0 38px; border-bottom: 1px solid var(--line); }
.listing-header .breadcrumbs { grid-column: 1/-1; align-self: start; margin-bottom: 12px; }
.listing-icon { width: 70px; height: 70px; display: grid; place-items: center; border: 1px solid rgba(219,166,83,.23); border-radius: 17px; background: var(--accent-soft); color: var(--accent-bright); font-size: 29px; }
.listing-header h1, .search-page-header h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(40px, 5vw, 64px); font-weight: 400; line-height: 1.05; letter-spacing: -.04em; }
.listing-header p { max-width: 700px; margin: 9px 0 0; color: var(--muted); }
.subcategory-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 23px 0 0; }
.subcategory-chips a { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: #aeb4bc; background: var(--surface); font-size: 11px; }
.listing-section { margin-top: 38px; }
.listing-toolbar { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 14px; color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.listing-toolbar strong { color: #b9bdc2; }
.result-list { display: grid; gap: 9px; }
.result-card { display: grid; grid-template-columns: 54px 1fr auto; gap: 18px; align-items: center; padding: 20px 22px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); transition: .18s; }
.result-card:hover { border-color: var(--line-strong); transform: translateX(2px); }
.result-symbol { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 21px; }
.result-card h2 { margin: 3px 0 5px; font-family: Georgia, serif; font-size: 21px; font-weight: 400; line-height: 1.2; }
.result-card h2 a:hover { color: var(--accent-bright); }
.result-card p { max-width: 850px; margin: 0 0 9px; color: var(--muted); font-size: 12px; }
.search-page-header { padding: 55px 0 45px; border-bottom: 1px solid var(--line); text-align: center; }
.search-page-form { max-width: 760px; height: 62px; display: flex; align-items: center; gap: 13px; margin: 28px auto 0; padding: 7px 8px 7px 18px; border: 1px solid var(--line-strong); border-radius: 15px; background: var(--surface); }
.search-page-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.search-item-results { margin-bottom: 35px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }

.item-index-hero { position: relative; min-height: 310px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 45px clamp(25px,5vw,65px); border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(circle at 80% 45%,rgba(219,166,83,.12),transparent 25%),linear-gradient(120deg,#181e27,#0d1117); }
.item-index-hero::after { content: "⬡"; position: absolute; right: 7%; top: 50%; transform: translateY(-50%); color: rgba(219,166,83,.075); font-size: clamp(150px,22vw,300px); line-height: 1; }
.item-index-hero .breadcrumbs { position: absolute; top: 24px; left: clamp(25px,5vw,65px); }
.item-index-hero h1 { position: relative; z-index: 2; margin: 0; font-family: Georgia,serif; font-size: clamp(48px,6vw,78px); font-weight: 400; line-height: .95; letter-spacing: -.05em; }
.item-index-hero h1 em { color: var(--accent-bright); font-weight: 400; }
.item-index-hero > p { position: relative; z-index: 2; max-width: 620px; margin: 17px 0 0; color: var(--muted); font-size: 15px; }
.item-filter-bar { position: sticky; top: 77px; z-index: 28; display: grid; grid-template-columns: minmax(210px,1.5fr) repeat(3,minmax(130px,.7fr)) auto auto; gap: 8px; margin-top: 18px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: rgba(24,29,37,.95); backdrop-filter: blur(14px); }
.item-filter-search { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #11161d; color: var(--muted-2); }
.item-filter-search input { min-width: 0; width: 100%; height: 39px; border: 0; outline: 0; background: transparent; color: var(--text); }
.item-filter-bar select { min-width: 0; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #11161d; color: #aeb4bd; font-size: 10px; }
.filter-reset { align-self: center; padding: 0 7px; color: var(--muted-2); font-size: 9px; text-transform: uppercase; }
.item-index-section { margin-top: 34px; }
.item-catalog-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.item-catalog-card { position: relative; display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; align-items: center; min-height: 190px; padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg,var(--surface),#151920); transition: .2s; }
.item-catalog-card:hover { border-color: color-mix(in srgb,var(--rarity) 38%,transparent); transform: translateY(-2px); }
.item-catalog-icon { width: 74px; height: 74px; display: grid; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb,var(--rarity) 35%,transparent); border-radius: 15px; background: radial-gradient(circle,color-mix(in srgb,var(--rarity) 16%,transparent),transparent 70%),#11161c; color: var(--rarity); font-size: 30px; }
.item-catalog-icon img { width: 100%; height: 100%; object-fit: cover; }
.item-card-top { display: flex; align-items: center; gap: 9px; color: #7d8691; font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.item-card-top i { color: var(--rarity); font-style: normal; }
.item-catalog-main h2 { margin: 4px 0 5px; font-family: Georgia,serif; font-size: 21px; font-weight: 400; line-height: 1.2; }
.item-catalog-main h2 a:hover { color: var(--rarity); }
.item-catalog-main > p { margin: 0 0 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.item-card-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.item-card-facts span { padding: 3px 6px; border-radius: 4px; background: rgba(255,255,255,.035); color: #6f7884; font-size: 7px; text-transform: uppercase; }
.item-source-preview { display: grid; gap: 3px; margin-top: 10px; }
.item-source-preview span { overflow: hidden; color: #6d7580; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.item-source-preview b { margin-right: 6px; color: var(--accent); }

.item-detail-header { display: grid; grid-template-columns: 132px 1fr auto; align-items: center; gap: 30px; padding: 20px 0 38px; border-bottom: 1px solid var(--line); }
.item-detail-icon { width: 132px; height: 132px; display: grid; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb,var(--rarity) 42%,transparent); border-radius: 26px; background: radial-gradient(circle,color-mix(in srgb,var(--rarity) 17%,transparent),transparent 68%),#11161c; color: var(--rarity); box-shadow: 0 0 50px color-mix(in srgb,var(--rarity) 9%,transparent); }
.item-detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.item-detail-icon span { font-size: 56px; }
.item-detail-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.item-detail-badges span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px; color: #89919c; background: var(--surface); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.item-detail-badges .rarity-badge { border-color: color-mix(in srgb,var(--rarity) 35%,transparent); color: var(--rarity); background: color-mix(in srgb,var(--rarity) 8%,transparent); }
.item-detail-heading h1 { margin: 9px 0 7px; font-family: Georgia,serif; font-size: clamp(42px,5vw,68px); font-weight: 400; line-height: 1; letter-spacing: -.045em; }
.item-detail-heading p { max-width: 760px; margin: 0; color: var(--muted); font-size: 14px; }
.item-fact-strip { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.item-fact-strip > div { padding: 16px 20px; border-left: 1px solid var(--line); }
.item-fact-strip > div:first-child { border-left: 0; }
.item-fact-strip small, .item-fact-strip strong { display: block; }
.item-fact-strip small { color: var(--muted-2); font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.item-fact-strip strong { margin-top: 3px; color: #ddd9d2; font-size: 12px; }
.item-detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 65px; margin-top: 52px; }
.item-info-section { margin-bottom: 58px; }
.item-info-section h2 { margin: 0 0 18px; font-family: Georgia,serif; font-size: 31px; font-weight: 400; }
.item-utility-copy, .acquisition-note > p { color: #bbc0c7; font-size: 15px; line-height: 1.75; }
.item-effect-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.item-effect-grid > div { min-height: 120px; display: grid; align-content: center; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.item-effect-grid > div > span { color: var(--rarity); font-size: 18px; }
.item-effect-grid small { margin-top: 5px; color: var(--muted-2); font-size: 8px; text-transform: uppercase; }
.item-effect-grid strong { color: #e2ded6; font-family: Georgia,serif; font-size: 20px; font-weight: 400; }
.item-effect-grid p { margin: 4px 0 0; color: #6e7782; font-size: 8px; }
.loot-source-list { display: grid; gap: 9px; }
.loot-source-card { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 15px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.loot-source-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 18px; }
.loot-source-main small { color: var(--accent); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.loot-source-main h3 { margin: 2px 0 5px; color: #dfdcd5; font-family: Georgia,serif; font-size: 18px; font-weight: 400; }
.loot-source-main p { margin: 2px 0; color: #777f8a; font-size: 9px; }
.loot-source-main b { color: #a9afb6; }
.loot-source-rate { min-width: 95px; text-align: right; }
.loot-source-rate small, .loot-source-rate strong, .loot-source-rate span { display: block; }
.loot-source-rate small { color: var(--muted-2); font-size: 7px; text-transform: uppercase; }
.loot-source-rate strong { color: var(--rarity); font-family: Georgia,serif; font-size: 20px; font-weight: 400; }
.loot-source-rate span { color: #747d88; font-size: 8px; }
.item-detail-sidebar { min-width: 0; }
.item-side-card { position: sticky; top: 105px; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.item-side-card dl { margin: 0; }
.item-side-card dl > div { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.item-side-card dl > div:last-child { border: 0; }
.item-side-card dt { color: var(--muted-2); font-size: 9px; }
.item-side-card dd { margin: 0; color: #bdc1c6; font-size: 9px; font-weight: 750; text-align: right; }
.empty-state.compact { min-height: 130px; }
.status-badge.translation-fallback { border-color: rgba(219,166,83,.2); color: var(--accent); background: var(--accent-soft); }

html[dir="rtl"] .category-drawer { direction: rtl; }
html[dir="rtl"] .subcategory-list { margin-left: 0; margin-right: 45px; border-left: 0; border-right: 1px solid var(--line); }

.login-shell { min-height: calc(100vh - 190px); display: grid; grid-template-columns: 1.15fr .85fr; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.login-visual { min-height: 620px; padding: clamp(45px,7vw,90px); background: linear-gradient(90deg,rgba(5,8,12,.88),rgba(5,8,12,.46)), url("../images/hero-fantasy.png") center/cover; }
.login-visual h1 { margin: 18px 0 18px; font-family: Georgia,serif; font-size: clamp(48px,6vw,76px); font-weight: 400; line-height: .98; letter-spacing: -.05em; }
.login-visual p { max-width: 480px; color: #a9afb7; font-size: 16px; }
.login-visual ul { display: grid; gap: 12px; margin: 40px 0 0; padding: 0; list-style: none; color: #c1c3c5; font-size: 12px; }
.login-visual li::before { content: "✓"; margin-right: 10px; color: var(--accent); }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(35px,5vw,70px); }
.login-mark { color: var(--accent); font-size: 34px; }
.login-card h2 { margin: 8px 0 2px; font-family: Georgia,serif; font-size: 34px; font-weight: 400; }
.login-card > p { margin: 0 0 26px; color: var(--muted); }
.login-card form { display: grid; gap: 9px; }
.login-card label { margin-top: 8px; color: #b9bdc3; font-size: 11px; font-weight: 700; }
.login-card input { height: 48px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 9px; outline: 0; background: #11161d; color: var(--text); }
.login-card input:focus { border-color: rgba(219,166,83,.5); }
.login-card .button { margin-top: 14px; }
.form-error { margin-bottom: 12px; padding: 10px 12px; border: 1px solid rgba(236,126,126,.28); border-radius: 8px; background: rgba(236,126,126,.08); color: #f0a2a2; font-size: 11px; }
.back-link { margin-top: 22px; color: var(--muted); font-size: 11px; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; margin: 0 clamp(24px,4vw,62px); padding: 25px 0; border-top: 1px solid var(--line); color: #59616b; font-size: 10px; }
.site-footer p { margin: 0; }
.drawer-scrim { display: none; }

body.drawer-collapsed .category-drawer { transform: translateX(-100%); }
body.drawer-collapsed .page-shell { margin-left: var(--rail); }

@media (max-width: 1199px) {
    .category-drawer { transform: translateX(-100%); box-shadow: 25px 0 70px rgba(0,0,0,.32); }
    .page-shell, body.drawer-collapsed .page-shell { margin-left: var(--rail); }
    body.drawer-open .category-drawer { transform: translateX(0); }
    body.drawer-open .drawer-scrim { position: fixed; inset: 0; z-index: 45; display: block; background: rgba(2,4,7,.64); backdrop-filter: blur(3px); }
    .category-grid, .article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .related-grid { grid-template-columns: 1fr; }
    .item-mini-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .item-filter-bar { grid-template-columns: repeat(3,1fr); top: 77px; }
    .item-filter-search { grid-column: 1/-1; }
}

@media (max-width: 860px) {
    .topbar-actions .button { display: none; }
    .hero { min-height: 480px; }
    .article-layout { grid-template-columns: 1fr; }
    .article-toc { display: none; }
    .item-catalog-grid { grid-template-columns: 1fr; }
    .item-detail-layout { grid-template-columns: 1fr; }
    .item-detail-sidebar { display: none; }
    .article-header { display: block; }
    .article-header > .button { margin-top: 18px; }
    .featured-card { grid-template-columns: 75px 1fr; }
    .featured-meta { grid-column: 2; }
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { min-height: 440px; }
}

@media (max-width: 760px) {
    :root { --rail: 0px; }
    .icon-rail { display: none; }
    .page-shell, body.drawer-collapsed .page-shell { margin-left: 0; }
    .category-drawer { left: 0; width: min(310px, 86vw); }
    .mobile-header { position: sticky; top: 0; z-index: 42; height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 1px solid var(--line); background: rgba(17,21,28,.95); backdrop-filter: blur(15px); }
    .mobile-menu { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 9px; background: var(--surface); color: #aeb4bd; }
    .mobile-menu svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
    .mobile-brand { display: flex; align-items: center; gap: 7px; font-family: Georgia,serif; font-size: 16px; }
    .mobile-brand img { width: 27px; }
    .mobile-language { display: inline; }
    .mobile-admin { color: var(--accent); font-size: 10px; font-weight: 800; text-transform: uppercase; }
    .topbar { top: 60px; min-height: 65px; padding: 9px 15px; }
    .global-search { width: 100%; }
    .global-search kbd, .topbar-actions { display: none; }
    .main-content { padding: 20px 15px 55px; }
    .hero { min-height: 570px; padding: 34px 24px; border-radius: 17px; background-image: linear-gradient(90deg,rgba(5,8,12,.91),rgba(5,8,12,.55)),linear-gradient(0deg,rgba(5,8,12,.8),transparent),var(--hero-image); background-position: 66% center; }
    .hero h1 { font-size: clamp(41px,13vw,62px); }
    .hero-content > p { font-size: 14px; }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .hero-actions .button { width: 100%; }
    .hero-stats { gap: 19px; justify-content: space-between; }
    .hero-stats strong { font-size: 20px; }
    .hero-stats span { font-size: 8px; }
    .featured-strip, .section-block { margin-top: 52px; }
    .section-heading { display: block; }
    .section-heading > p { margin-top: 9px; text-align: left; }
    .section-heading > a { display: inline-block; margin-top: 12px; }
    .featured-card { grid-template-columns: 52px 1fr; gap: 15px; padding: 18px; }
    .featured-symbol { width: 52px; height: 52px; border-radius: 12px; font-size: 21px; }
    .featured-copy h3 { font-size: 19px; }
    .featured-meta { flex-wrap: wrap; gap: 10px; }
    .featured-meta .round-arrow { display: none; }
    .category-grid, .article-grid { grid-template-columns: 1fr; }
    .contribute-banner { align-items: flex-start; flex-direction: column; padding: 27px; }
    .article-header h1 { font-size: 42px; }
    .article-byline { align-items: flex-start; flex-direction: column; gap: 4px; }
    .article-byline i { display: none; }
    .article-layout { margin-top: 32px; }
    .prose { font-size: 15px; }
    .prose h2 { font-size: 27px; }
    .attachment-grid { grid-template-columns: 1fr; }
    .item-mini-grid { grid-template-columns: 1fr; }
    .item-index-hero { min-height: 300px; padding: 45px 24px 30px; }
    .item-index-hero .breadcrumbs { left: 24px; }
    .item-index-hero h1 { font-size: 49px; }
    .item-filter-bar { position: static; grid-template-columns: 1fr; }
    .item-filter-search { grid-column: auto; }
    .item-filter-bar select { height: 41px; }
    .item-catalog-card { grid-template-columns: 57px 1fr; min-height: 175px; padding: 15px; }
    .item-catalog-icon { width: 56px; height: 56px; }
    .item-catalog-card > .round-arrow { display: none; }
    .item-detail-header { grid-template-columns: 82px 1fr; gap: 16px; }
    .item-detail-icon { width: 80px; height: 80px; border-radius: 17px; }
    .item-detail-icon span { font-size: 34px; }
    .item-detail-heading h1 { font-size: 39px; }
    .item-detail-header > .button { grid-column: 1/-1; }
    .item-fact-strip { grid-template-columns: repeat(2,1fr); }
    .item-fact-strip > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
    .item-fact-strip > div:nth-child(4) { border-top: 1px solid var(--line); }
    .item-effect-grid { grid-template-columns: 1fr; }
    .loot-source-card { grid-template-columns: 39px 1fr; }
    .loot-source-rate { grid-column: 2; text-align: left; }
    .listing-header { grid-template-columns: 56px 1fr; column-gap: 15px; }
    .listing-icon { width: 54px; height: 54px; }
    .listing-header h1, .search-page-header h1 { font-size: 40px; }
    .result-card { grid-template-columns: 42px 1fr; gap: 12px; padding: 16px; }
    .result-symbol { width: 42px; height: 42px; }
    .result-card > .round-arrow { display: none; }
    .search-page-header { padding: 35px 0; }
    .search-page-form { height: auto; flex-wrap: wrap; padding: 11px; }
    .search-page-form input { height: 42px; }
    .search-page-form .button { width: 100%; }
    .login-shell { border-radius: 16px; }
    .login-visual { display: none; }
    .login-card { min-height: 520px; padding: 30px; }
    .site-footer { align-items: flex-start; flex-direction: column; margin: 0 15px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Inferno theme — inspired by Rappelz's volcanic fantasy atmosphere */
:root {
    --bg: #100c0b;
    --bg-deep: #070505;
    --surface: #1a1412;
    --surface-2: #241a16;
    --surface-3: #302019;
    --line: rgba(255, 181, 102, .12);
    --line-strong: rgba(255, 154, 65, .24);
    --text: #f7eee5;
    --muted: #b8a9a0;
    --muted-2: #8c7a70;
    --accent: #f06a1a;
    --accent-bright: #ffb452;
    --accent-soft: rgba(240, 92, 21, .14);
    --ember: #ff3d0a;
    --ember-deep: #a9270d;
    --molten: #ff7b1c;
    --success: #74d59e;
    --shadow: 0 24px 76px rgba(0, 0, 0, .42), 0 0 45px rgba(161, 43, 11, .055);
}

html { scrollbar-color: #66311e #0c0908; }
body {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at 82% 8%, rgba(166, 43, 12, .18), transparent 31%),
        radial-gradient(circle at 18% 95%, rgba(255, 91, 16, .08), transparent 27%),
        linear-gradient(145deg, #120d0c 0%, #0c0909 58%, #120a07 100%);
    font-size: 17px;
    line-height: 1.67;
}
body::before {
    z-index: -1;
    background:
        linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.009) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at 50% 30%, black, transparent 76%);
}
.fire-atmosphere {
    position: fixed;
    inset: auto -12vw -30vh 22vw;
    z-index: 31;
    height: 60vh;
    pointer-events: none;
    opacity: .24;
    filter: blur(55px);
    background:
        radial-gradient(ellipse at 22% 100%, rgba(255, 58, 4, .55), transparent 38%),
        radial-gradient(ellipse at 72% 100%, rgba(255, 128, 20, .36), transparent 42%);
    mix-blend-mode: screen;
    animation: inferno-breathe 6s ease-in-out infinite alternate;
}
.ember-canvas {
    position: fixed;
    inset: 0;
    z-index: 34;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .7;
    mix-blend-mode: screen;
}

.icon-rail { background: linear-gradient(180deg, #17100e, #0c0909); border-color: rgba(255,127,45,.16); }
.category-drawer { background: linear-gradient(180deg, #150f0e, #0e0a09 70%); border-color: rgba(255,127,45,.14); }
.drawer-brand {
    background:
        linear-gradient(0deg, rgba(18,10,8,.97), rgba(20,9,5,.3)),
        linear-gradient(110deg, rgba(200,48,8,.26), transparent 55%),
        url("../images/hero-fantasy.png") 72% center/cover;
}
.drawer-brand a { color: #fff1de; font-size: 25px; text-shadow: 0 2px 22px rgba(255,112,31,.2); }
.drawer-brand small { color: #baaaa0; font-size: 12px; }
.rail-logo { position: relative; border-color: rgba(255,137,50,.34); background: linear-gradient(145deg, #382117, #130d0b); box-shadow: inset 0 1px rgba(255,210,155,.09), 0 0 24px rgba(240,73,12,.11); }
.rail-logo::after { content: ""; position: absolute; inset: 7px; z-index: -1; border-radius: 50%; background: rgba(255,86,12,.5); filter: blur(14px); animation: sigil-glow 2.8s ease-in-out infinite alternate; }
.topbar { background: rgba(16, 11, 10, .9); border-color: rgba(255,141,57,.13); }
.global-search, .language-switcher > button, .language-menu, .search-results { background: rgba(29,20,17,.96); }
.global-search:focus-within { border-color: rgba(255,114,31,.55); box-shadow: 0 0 0 3px rgba(239,77,12,.12), 0 0 35px rgba(255,73,8,.07); }
.global-search input { font-size: 15px; }
.global-search input::placeholder { color: #8f7d72; }

.eyebrow, .nav-label { font-size: 11px; }
.category-link { min-height: 46px; color: #c8b9b0; font-size: 14px; }
.subcategory-list a { padding-block: 6px; color: #948177; font-size: 13px; }
.category-link:hover, .category-home { background: linear-gradient(90deg, rgba(240,91,20,.14), rgba(255,155,58,.035)); }
.category-items { border-color: rgba(255,111,28,.22); color: #f0c091; }
.drawer-footer { color: #a18c80; font-size: 11px; }
.status-dot { background: #ff6d27; box-shadow: 0 0 13px #ff5215; animation: status-fire 1.7s ease-in-out infinite alternate; }

.button { min-height: 45px; padding-inline: 19px; font-size: 13px; }
.button-primary {
    border-color: #ff9b3d;
    background: linear-gradient(135deg, #ffb34f, #ef5b13 63%, #bd310c);
    box-shadow: 0 10px 30px rgba(225,65,12,.22), inset 0 1px rgba(255,239,206,.4);
}
.button-primary:hover { background: linear-gradient(135deg, #ffc86d, #ff6b19 62%, #d93d0e); box-shadow: 0 13px 36px rgba(245,74,12,.3); }
.button-ghost:hover { border-color: rgba(255,112,27,.52); box-shadow: inset 0 0 22px rgba(255,81,12,.055); }

.hero {
    --hero-pan-x: 0px;
    --hero-pan-y: 0px;
    border-color: rgba(255,125,34,.17);
    background-image:
        linear-gradient(90deg, rgba(10,5,5,.95) 0%, rgba(22,8,5,.73) 43%, rgba(43,10,4,.12) 80%),
        radial-gradient(circle at 75% 64%, rgba(255,91,10,.32), transparent 34%),
        linear-gradient(0deg, rgba(39,8,4,.72), transparent 62%),
        var(--hero-image);
    background-position: center, center, center, calc(50% + var(--hero-pan-x)) calc(50% + var(--hero-pan-y));
    transition: background-position .35s cubic-bezier(.2,.7,.25,1), border-color .25s, box-shadow .25s;
    box-shadow: var(--shadow), inset 0 -80px 100px rgba(114,24,4,.1);
}
.hero::before {
    content: "";
    position: absolute;
    right: -8%;
    bottom: -45%;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255,101,15,.24), rgba(179,34,4,.08) 35%, transparent 70%);
    filter: blur(12px);
    animation: hero-heat 4.8s ease-in-out infinite alternate;
}
.hero-kicker { color: #e4b079; font-size: 12px; }
.hero h1 { text-shadow: 0 3px 34px rgba(0,0,0,.62); }
.hero h1 em { color: #ffad43; text-shadow: 0 0 28px rgba(255,90,10,.18); }
.hero-content > p { color: #d0c0b7; font-size: 18px; }
.hero-stats strong { color: #fff0dc; font-size: 27px; }
.hero-stats span { color: #a58d7f; font-size: 11px; }

.section-heading h2 { font-size: clamp(32px,3.2vw,44px); }
.section-heading > p { color: #b6a69d; font-size: 15px; }
.section-heading > a { font-size: 13px; }
.card-category { color: #ff8b33; font-size: 10px; }
.featured-copy h3 { font-size: 27px; }
.featured-copy p { color: #b9aaa1; font-size: 15px; }
.featured-meta { font-size: 11px; }
.featured-card, .category-card, .article-card, .item-mini-card, .item-catalog-card, .result-card, .loot-source-card, .item-side-card {
    background: linear-gradient(145deg, rgba(31,22,19,.98), rgba(17,12,11,.98));
    border-color: rgba(255,143,64,.13);
}
.featured-card { border-color: rgba(255,119,32,.22); background: linear-gradient(105deg, rgba(188,55,12,.12), rgba(33,22,18,.96)); }
.category-card:hover, .article-card:hover, .featured-card:hover { border-color: rgba(255,113,30,.38); box-shadow: 0 18px 55px rgba(62,13,4,.26), inset 0 0 45px rgba(255,85,15,.025); }
.category-card h3 { font-size: 23px; }
.category-card p { color: #b2a39a; font-size: 14px; }
.category-count { color: #967f72; font-size: 11px; }
.item-mini-card small { font-size: 10px; }
.item-mini-card h3 { font-size: 19px; }
.item-mini-card p { color: #a18f84; font-size: 12px; }
.article-card-body h3 { font-size: 23px; }
.article-card-body p { color: #b6a79e; font-size: 14px; }
.article-card-meta { color: #947e71; font-size: 10px; }

.breadcrumbs { color: #9b8579; font-size: 13px; }
.article-lead { color: #c8b9b0; font-size: 19px; }
.article-byline { color: #9b867a; font-size: 12px; }
.prose { color: #ddd1c9; font-size: 18px; line-height: 1.86; }
.prose h2 { font-size: 36px; }
.prose h3 { font-size: 27px; }
.prose h4 { font-size: 21px; }
.prose blockquote { font-size: 20px; }
.prose table { font-size: 15px; }

.item-index-hero {
    border-color: rgba(255,117,27,.2);
    background:
        radial-gradient(circle at 78% 54%, rgba(255,102,15,.2), transparent 24%),
        radial-gradient(circle at 68% 85%, rgba(158,31,5,.18), transparent 32%),
        linear-gradient(120deg,#211310,#0d0908 72%);
    box-shadow: inset 0 -55px 80px rgba(115,24,4,.09);
}
.item-index-hero::after { color: rgba(255,112,24,.105); text-shadow: 0 0 60px rgba(255,66,6,.15); animation: sigil-glow 3s ease-in-out infinite alternate; }
.item-index-hero > p { color: #c0afa5; font-size: 17px; }
.item-filter-bar { background: rgba(25,17,14,.96); border-color: rgba(255,133,48,.18); }
.item-filter-search, .item-filter-bar select { background: #130e0c; font-size: 13px; }
.filter-reset { font-size: 11px; }
.item-card-top { font-size: 10px; }
.item-catalog-main h2 { font-size: 25px; }
.item-catalog-main > p { color: #b9aaa1; font-size: 14px; }
.item-card-facts span { color: #9e897c; font-size: 9px; }
.item-source-preview span { color: #9b877a; font-size: 11px; }
.item-detail-heading p { color: #c2b2a9; font-size: 17px; }
.item-detail-badges span { font-size: 10px; }
.item-fact-strip { background: linear-gradient(145deg,#1e1512,#120d0c); }
.item-fact-strip small { font-size: 10px; }
.item-fact-strip strong { font-size: 15px; }
.item-info-section h2 { font-size: 35px; }
.item-utility-copy, .acquisition-note > p { color: #d2c5bd; font-size: 18px; }
.item-effect-grid small { font-size: 10px; }
.item-effect-grid strong { font-size: 23px; }
.item-effect-grid p { color: #a28e82; font-size: 11px; }
.loot-source-main small { font-size: 9px; }
.loot-source-main h3 { font-size: 21px; }
.loot-source-main p { color: #ae9d93; font-size: 12px; }
.loot-source-rate small { font-size: 9px; }
.loot-source-rate strong { font-size: 23px; }
.loot-source-rate span { color: #9e897c; font-size: 11px; }
.item-side-card dt, .item-side-card dd { font-size: 12px; }
.listing-header p { color: #c0b0a7; font-size: 16px; }
.listing-toolbar { font-size: 12px; }
.result-card h2 { font-size: 24px; }
.result-card p { color: #b8a9a0; font-size: 14px; }
.site-footer { color: #8e786c; font-size: 12px; }

/* Scroll reveals and pointer-reactive molten highlights */
.motion-ready .reveal-on-scroll {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(.985);
    filter: blur(3px);
    transition:
        opacity .7s cubic-bezier(.2,.75,.25,1),
        transform .75s cubic-bezier(.2,.75,.25,1),
        filter .65s ease;
    transition-delay: calc(var(--reveal-order, 0) * 55ms);
}
.motion-ready .reveal-on-scroll.is-visible { opacity: 1; transform: none; filter: none; }
.ember-reactive { position: relative; overflow: hidden; isolation: isolate; }
.ember-reactive::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(260px circle at var(--glow-x,50%) var(--glow-y,50%), rgba(255,93,17,.12), transparent 68%);
    transition: opacity .25s;
}
.ember-reactive:hover::before { opacity: 1; }

@keyframes inferno-breathe { from { opacity: .15; transform: translate3d(-2%,2%,0) scale(.96); } to { opacity: .31; transform: translate3d(2%,-2%,0) scale(1.08); } }
@keyframes hero-heat { from { opacity: .55; transform: scale(.94); } to { opacity: 1; transform: scale(1.08); } }
@keyframes sigil-glow { from { opacity: .45; transform: scale(.9); } to { opacity: 1; transform: scale(1.08); } }
@keyframes status-fire { from { opacity: .65; transform: scale(.86); } to { opacity: 1; transform: scale(1.14); } }

@media (max-width: 760px) {
    body { font-size: 16px; }
    .hero-content > p { font-size: 17px; }
    .hero-stats span { font-size: 10px; }
    .prose { font-size: 17px; }
    .prose h2 { font-size: 30px; }
    .item-index-hero > p, .item-detail-heading p { font-size: 16px; }
    .item-catalog-main > p { font-size: 13px; }
    .item-utility-copy, .acquisition-note > p { font-size: 17px; }
    .ember-canvas { opacity: .5; }
}

@media (prefers-reduced-motion: reduce) {
    .fire-atmosphere, .ember-canvas { display: none !important; }
    .motion-ready .reveal-on-scroll { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* Readability pass and optimized cinematic backdrop */
:root {
    --rail: 82px;
    --drawer: 292px;
}
body {
    background: #090605;
    font-size: 18px;
    line-height: 1.72;
}
.site-video-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: #090605 var(--video-poster) center/cover no-repeat;
}
.site-video-background video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: .43;
    filter: saturate(1.08) contrast(1.08) brightness(.82);
    transform: scale(1.015);
}
.site-video-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8,5,5,.78), rgba(12,5,3,.48) 45%, rgba(8,5,4,.64)),
        linear-gradient(0deg, rgba(8,5,4,.84), rgba(17,6,3,.22) 48%, rgba(8,5,4,.66)),
        radial-gradient(circle at 75% 60%, rgba(255,65,5,.11), transparent 32%);
}
.page-shell { position: relative; z-index: 2; }
.studio-page .site-video-background video { opacity: .18; filter: saturate(.85) contrast(1.05) brightness(.58) blur(1px); }
.studio-page .site-video-background::after { background: rgba(8,5,5,.76); }
.hero {
    background-color: rgba(11,6,5,.42);
    background-image:
        linear-gradient(90deg, rgba(8,4,4,.91) 0%, rgba(22,7,4,.6) 44%, rgba(22,6,3,.12) 82%),
        radial-gradient(circle at 75% 64%, rgba(255,91,10,.24), transparent 34%),
        linear-gradient(0deg, rgba(35,7,4,.7), transparent 62%);
    background-position: center;
    backdrop-filter: blur(1px);
}

.drawer-brand a { font-size: 27px; }
.drawer-brand small { font-size: 14px; }
.eyebrow { font-size: 13px; }
.nav-label { font-size: 12px; }
.category-nav { padding-inline: 14px; }
.category-link { min-height: 50px; padding: 10px 13px; font-size: 16px; line-height: 1.3; }
.category-icon { width: 25px; font-size: 17px; }
.subcategory-list { margin-left: 48px; }
.subcategory-list a { padding: 8px 13px; font-size: 15px; line-height: 1.4; }
.drawer-footer { font-size: 13px; }
.rail-button span:not(.admin-orb) { font-size: 14px; }
.global-search input { font-size: 17px; }
.global-search kbd { font-size: 12px; }
.language-switcher > button { font-size: 13px; }
.language-menu a { font-size: 14px; }
.language-menu small { font-size: 12px; }
.user-chip { font-size: 14px; }
.button { min-height: 47px; font-size: 14px; }

.hero-kicker { font-size: 14px; }
.hero-content > p { max-width: 620px; font-size: 20px; line-height: 1.75; }
.hero-stats strong { font-size: 30px; }
.hero-stats span { font-size: 13px; }
.section-heading > p { font-size: 17px; }
.section-heading > a { font-size: 15px; }
.card-category { font-size: 12px; }
.featured-copy p, .category-card p, .article-card-body p { font-size: 16px; }
.featured-meta, .category-count, .article-card-meta { font-size: 12px; }
.item-mini-card small { font-size: 12px; }
.item-mini-card h3 { font-size: 21px; }
.item-mini-card p { font-size: 14px; }
.contribute-banner p { font-size: 17px; }
.empty-state p { font-size: 16px; }

.breadcrumbs { font-size: 15px; }
.article-category-pill, .status-badge { min-height: 31px; font-size: 12px; }
.article-lead { font-size: 21px; }
.article-byline { font-size: 14px; }
.prose { font-size: 20px; line-height: 1.88; }
.prose h2 { font-size: 39px; }
.prose h3 { font-size: 30px; }
.prose h4 { font-size: 23px; }
.prose blockquote { font-size: 22px; }
.prose code { font-size: 15px; }
.prose table { font-size: 17px; }
.article-toc p, .article-toc a { font-size: 14px; }
.related-grid small { font-size: 11px; }
.related-grid strong { font-size: 19px; }
.related-grid p { font-size: 14px; }

.item-index-hero > p { font-size: 19px; }
.item-filter-search input, .item-filter-bar select { font-size: 15px; }
.filter-reset { font-size: 13px; }
.listing-toolbar { font-size: 14px; }
.item-card-top { font-size: 12px; }
.item-catalog-main h2 { font-size: 27px; }
.item-catalog-main > p { font-size: 16px; }
.item-card-facts span { font-size: 11px; }
.item-source-preview span { font-size: 13px; }
.item-detail-badges span { font-size: 12px; }
.item-detail-heading p { font-size: 19px; }
.item-fact-strip small { font-size: 12px; }
.item-fact-strip strong { font-size: 17px; }
.item-info-section h2 { font-size: 38px; }
.item-utility-copy, .acquisition-note > p { font-size: 20px; line-height: 1.82; }
.item-effect-grid small { font-size: 12px; }
.item-effect-grid strong { font-size: 25px; }
.item-effect-grid p { font-size: 13px; }
.loot-source-main small { font-size: 11px; }
.loot-source-main h3 { font-size: 24px; }
.loot-source-main p { font-size: 15px; }
.loot-source-rate small { font-size: 11px; }
.loot-source-rate strong { font-size: 25px; }
.loot-source-rate span { font-size: 13px; }
.item-side-card dt, .item-side-card dd { font-size: 14px; }
.listing-header p { font-size: 18px; }
.subcategory-chips a { font-size: 14px; }
.result-card p { font-size: 16px; }
.site-footer { font-size: 14px; }
.search-result-link strong { font-size: 15px; }
.search-result-link small, .search-empty { font-size: 13px; }

@media (max-width: 760px) {
    :root { --drawer: 0px; }
    body { font-size: 17px; }
    .category-drawer { width: min(340px, 92vw); }
    .category-link { font-size: 16px; }
    .subcategory-list a { font-size: 15px; }
    .site-video-background video { display: none; }
    .site-video-background { background-position: 58% center; }
    .hero-content > p { font-size: 18px; }
    .prose { font-size: 18px; }
    .item-utility-copy, .acquisition-note > p { font-size: 18px; }
    .loot-source-main p { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .site-video-background video { display: none !important; }
}

/* Structured wiki tables */
.wiki-data-table {
    width: 100%;
    max-width: 100%;
    margin: 2.2em 0;
    overflow: hidden;
    border: 1px solid rgba(255,136,49,.24);
    border-radius: 16px;
    background: rgba(17,11,10,.91);
    box-shadow: 0 18px 55px rgba(0,0,0,.2);
}
.wiki-table-controls { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px; border-bottom: 1px solid var(--line); background: rgba(255,91,15,.035); }
.wiki-table-search { position: relative; flex: 1; max-width: 480px; }
.wiki-table-search input, .wiki-table-filter-row input {
    width: 100%;
    min-height: 43px;
    padding: 8px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    outline: 0;
    background: #100b0a;
    color: var(--text);
    font-size: 15px;
}
.wiki-table-search input:focus, .wiki-table-filter-row input:focus { border-color: rgba(255,105,25,.55); box-shadow: 0 0 0 3px rgba(240,71,10,.1); }
.wiki-table-count { flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.wiki-table-scroll { max-width: 100%; overflow: auto; overscroll-behavior-inline: contain; scrollbar-color: #79381d #120c0a; }
.prose .wiki-data-table table { width: 100%; min-width: max(100%,calc(var(--wiki-table-column-count,3) * 142px + var(--wiki-table-number-width,0px))); margin: 0; border: 0; table-layout: auto; font-size: 17px; }
.prose .wiki-data-table caption { padding: 18px 20px; border-bottom: 1px solid var(--line); color: #fff0df; background: rgba(255,255,255,.018); font-family: Georgia,serif; font-size: 23px; text-align: left; }
.prose .wiki-data-table th, .prose .wiki-data-table td { min-width: 0; padding: 13px 15px; border-width: 0 1px 1px 0; border-color: var(--line); overflow-wrap: anywhere; vertical-align: top; }
.prose .wiki-data-table th:last-child, .prose .wiki-data-table td:last-child { border-right: 0; }
.prose .wiki-data-table thead th { background: #211511; color: #f4ded0; }
.prose .wiki-data-table.is-sticky thead { position: sticky; top: 0; z-index: 3; }
.prose .wiki-data-table.is-striped tbody tr:nth-child(even) { background: rgba(255,107,22,.045); }
.prose .wiki-data-table tbody tr:hover { background: rgba(255,124,37,.075); }
.prose .wiki-data-table [data-row-number] { min-width: 55px; width: 55px; color: var(--accent); text-align: center; }
.wiki-table-sort { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; font-weight: 800; text-align: left; }
.wiki-table-sort i { color: var(--accent); font-size: 14px; font-style: normal; }
.wiki-table-filter-row th { padding: 8px !important; background: #170f0d !important; }
.wiki-table-filter-row input { min-width: 0; min-height: 37px; padding: 6px 9px; font-size: 13px; font-weight: 400; }
.wiki-table-pager { display: flex; align-items: center; justify-content: flex-end; gap: 13px; padding: 12px 14px; border-top: 1px solid var(--line); }
.wiki-table-pager button { min-height: 37px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #170f0d; color: #d6c5ba; cursor: pointer; font-size: 13px; }
.wiki-table-pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-bright); }
.wiki-table-pager button:disabled { opacity: .38; cursor: not-allowed; }
.wiki-table-pager span { color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
    .wiki-data-table { margin-inline: -5px; border-radius: 12px; }
    .wiki-table-controls { align-items: stretch; flex-direction: column; }
    .wiki-table-search { width: 100%; max-width: none; }
    .wiki-table-count { align-self: flex-end; }
    .prose .wiki-data-table table { min-width: max(100%,calc(var(--wiki-table-column-count,3) * 118px + var(--wiki-table-number-width,0px))); font-size: 16px; }
    .wiki-table-pager { justify-content: space-between; }
}

/* Rich wiki blocks and configurable media */
.prose .wiki-media-block {
    box-sizing: border-box;
    width: min(var(--media-width,100%),100%);
    max-width: 100%;
    display: block;
    clear: both;
    margin-top: 2.2em;
    margin-bottom: 2.2em;
}
.prose .wiki-media-block.is-align-left { margin-right: auto; margin-left: 0; }
.prose .wiki-media-block.is-align-center { margin-right: auto; margin-left: auto; }
.prose .wiki-media-block.is-align-right { margin-right: 0; margin-left: auto; }
.prose .wiki-media-block > img,
.prose .wiki-media-block > video {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    max-height: var(--media-max-height,none);
    display: block;
    object-fit: var(--media-fit,contain);
}
.prose .wiki-media-block > audio { width: 100%; display: block; }
.prose .wiki-media-block > .document-link { width: 100%; box-sizing: border-box; display: flex; justify-content: center; padding: 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(255,102,22,.055); text-align: center; }
.prose .wiki-media-block figcaption { margin-top: 10px; color: #ad988b; font-size: 14px; line-height: 1.5; text-align: center; }
.prose .wiki-data-table .wiki-media-block {
    width: 100%;
    max-width: 100%;
    clear: none;
    margin: .45rem 0;
}
.prose .wiki-data-table .wiki-media-block > img,
.prose .wiki-data-table .wiki-media-block > video,
.prose .wiki-data-table .wiki-media-block > audio,
.prose .wiki-data-table .wiki-media-block > .document-link {
    width: min(var(--media-width,100%),100%);
    max-width: 100%;
}
.prose .wiki-data-table .wiki-media-block.is-align-left > img,
.prose .wiki-data-table .wiki-media-block.is-align-left > video,
.prose .wiki-data-table .wiki-media-block.is-align-left > audio,
.prose .wiki-data-table .wiki-media-block.is-align-left > .document-link { margin-right: auto; margin-left: 0; }
.prose .wiki-data-table .wiki-media-block.is-align-center > img,
.prose .wiki-data-table .wiki-media-block.is-align-center > video,
.prose .wiki-data-table .wiki-media-block.is-align-center > audio,
.prose .wiki-data-table .wiki-media-block.is-align-center > .document-link { margin-right: auto; margin-left: auto; }
.prose .wiki-data-table .wiki-media-block.is-align-right > img,
.prose .wiki-data-table .wiki-media-block.is-align-right > video,
.prose .wiki-data-table .wiki-media-block.is-align-right > audio,
.prose .wiki-data-table .wiki-media-block.is-align-right > .document-link { margin-right: 0; margin-left: auto; }
.prose .wiki-data-table .wiki-media-block figcaption {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 8px 0 0;
    padding-inline: 4px;
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}
.prose .wiki-data-table .wiki-media-block figcaption[title] { cursor: help; }
.prose .wiki-callout { position: relative; margin: 1.8em 0; padding: 20px 22px 18px 58px; border: 1px solid rgba(86,166,255,.25); border-left: 4px solid #67aef6; border-radius: 12px; background: rgba(40,111,187,.1); }
.prose .wiki-callout::before { content: "i"; position: absolute; top: 19px; left: 20px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #67aef6; color: #07111b; font: 900 15px Georgia,serif; }
.prose .wiki-callout > strong { display: block; margin-bottom: 5px; color: #cce5ff; }
.prose .wiki-callout > p:last-child { margin-bottom: 0; }
.prose .wiki-callout.is-tip { border-color: rgba(78,205,137,.25); border-left-color: #5ed28f; background: rgba(41,155,91,.09); }
.prose .wiki-callout.is-tip::before { content: "✓"; background: #5ed28f; }
.prose .wiki-callout.is-tip > strong { color: #c9f4db; }
.prose .wiki-callout.is-warning { border-color: rgba(255,181,61,.28); border-left-color: #ffb83e; background: rgba(196,119,17,.1); }
.prose .wiki-callout.is-warning::before { content: "!"; background: #ffb83e; }
.prose .wiki-callout.is-warning > strong { color: #ffe2ad; }
.prose .wiki-callout.is-danger { border-color: rgba(245,91,72,.28); border-left-color: #f06454; background: rgba(177,44,28,.1); }
.prose .wiki-callout.is-danger::before { content: "!"; background: #f06454; }
.prose .wiki-callout.is-danger > strong { color: #ffd1ca; }
.prose .wiki-checklist { padding-left: 0; list-style: none; }
.prose .wiki-checklist li { padding-left: 0; }
.prose .wiki-checklist label { display: flex; align-items: flex-start; gap: 10px; }
.prose .wiki-checklist input { margin-top: .42em; accent-color: var(--accent); }
.prose .wiki-footnote { margin-inline: 2px; font-size: .72em; line-height: 0; }
.prose .wiki-footnote a { color: var(--accent-bright); text-decoration: none; }
.prose .wiki-references { margin-top: 3em; padding-top: 1px; border-top: 1px solid var(--line); }
.prose .wiki-references ol { padding-left: 1.45em; color: #bcaea5; font-size: .9em; }
.prose .wiki-references li { padding-left: .3em; }

@media (max-width: 600px) {
    .prose .wiki-media-block { width: 100%; }
    .prose .wiki-callout { padding: 17px 17px 16px 50px; }
    .prose .wiki-callout::before { left: 15px; }
}

/* Navigation globale Defiant : verre sombre, braises et repères accessibles. */
:root { --sitebar-height: 70px; }

.wiki-sitebar {
    --sitebar-hue: 22;
    --sitebar-secondary-hue: 7;
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--sitebar-height);
    display: flex;
    align-items: center;
    gap: clamp(24px,3vw,48px);
    isolation: isolate;
    overflow: visible;
    padding: 0 22px;
    border-bottom: 1px solid hsl(var(--sitebar-hue) 78% 72% / .24);
    background:
        radial-gradient(circle at 18% -120%,hsl(var(--sitebar-hue) 92% 68% / .22),transparent 46%),
        radial-gradient(circle at 82% -140%,hsl(var(--sitebar-secondary-hue) 92% 68% / .17),transparent 42%),
        linear-gradient(180deg,rgba(26,27,34,.68),rgba(12,14,20,.54));
    box-shadow: inset 0 1px rgba(255,255,255,.1),0 16px 44px rgba(0,0,0,.3);
    -webkit-backdrop-filter: blur(24px) saturate(155%);
    backdrop-filter: blur(24px) saturate(155%);
}
.wiki-sitebar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(108deg,transparent 6%,rgba(255,255,255,.075) 29%,transparent 52%);
}
.wiki-sitebar > * { position: relative; z-index: 1; }
.wiki-sitebar::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    pointer-events: none;
    opacity: .78;
    background: linear-gradient(90deg,transparent 0 9%,hsl(var(--sitebar-hue) 76% 58% / .14) 24%,hsl(var(--sitebar-hue) 88% 64% / .78) 38%,hsl(var(--sitebar-secondary-hue) 88% 66% / .32) 48%,transparent 63% 100%);
    background-size: 230% 100%;
    animation: wiki-sitebar-scan 6s linear infinite;
}

.wiki-sitebar-brand {
    position: relative;
    flex: 0 0 auto;
    min-width: 112px;
    display: grid;
    gap: 4px;
    color: #f8f2e9;
    text-transform: uppercase;
}
.wiki-sitebar-brand strong { font: 800 24px/1 Georgia,"Times New Roman",serif; letter-spacing: -.035em; }
.wiki-sitebar-brand strong span { color: #f1603b; text-shadow: 0 0 18px rgba(241,96,59,.45); }
.wiki-sitebar-brand small { color: #b8aaa0; font-size: 10px; font-weight: 850; letter-spacing: .2em; }
.wiki-sitebar-brand::after {
    content: "";
    position: absolute;
    right: -18px;
    top: 2px;
    width: 1px;
    height: 35px;
    background: linear-gradient(transparent,rgba(242,105,55,.55),transparent);
}

.wiki-sitebar-nav { min-width: 0; display: flex; align-items: center; gap: 5px; }
.wiki-sitebar-nav a {
    position: relative;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: rgba(239,234,227,.69);
    font-size: 13px;
    font-weight: 820;
    letter-spacing: .045em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color .2s ease,background .2s ease,border-color .2s ease,transform .2s ease,text-shadow .2s ease;
}
.wiki-sitebar-nav a::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 0;
    border-radius: 50%;
    opacity: 0;
    background: hsl(var(--sitebar-hue) 90% 68%);
    box-shadow: 0 0 10px hsl(var(--sitebar-hue) 90% 60%);
    transform: scale(.5);
    transition: opacity .2s ease,transform .2s ease,margin-right .2s ease;
}
.wiki-sitebar-nav a::after {
    content: "";
    position: absolute;
    right: 9px;
    bottom: 4px;
    left: 9px;
    height: 2px;
    border-radius: 4px;
    background: linear-gradient(90deg,hsl(var(--sitebar-hue) 78% 55%),hsl(var(--sitebar-secondary-hue) 84% 68%));
    box-shadow: 0 0 12px hsl(var(--sitebar-hue) 82% 58% / .52);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .24s ease;
}
.wiki-sitebar-nav a:hover { color:#fff; border-color:hsl(var(--sitebar-hue) 80% 66% / .18); background:linear-gradient(90deg,transparent,hsl(var(--sitebar-hue) 80% 58% / .075),transparent); box-shadow:none; transform:translateY(-1px); text-shadow:0 0 16px hsl(var(--sitebar-hue) 78% 66% / .38); }
.wiki-sitebar-nav a.is-active { color:#fff; border-color:hsl(var(--sitebar-hue) 82% 68% / .22); background:linear-gradient(90deg,transparent,hsl(var(--sitebar-hue) 84% 58% / .1),transparent); box-shadow:none; text-shadow:0 0 18px hsl(var(--sitebar-hue) 82% 66% / .4); }
.wiki-sitebar-nav a:hover::before,.wiki-sitebar-nav a.is-active::before { margin-right: 7px; opacity: 1; transform: scale(1); }
.wiki-sitebar-nav a:hover::after,.wiki-sitebar-nav a.is-active::after { transform: scaleX(1); }

.wiki-sitebar-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.wiki-server-state { display: inline-flex; align-items: center; gap: 8px; color: #aaa8a6; font-size: 12px; }
.wiki-server-state i { width: 8px; height: 8px; border-radius: 50%; background: #66d49a; box-shadow: 0 0 12px rgba(102,212,154,.9); animation: wiki-server-pulse 2.6s ease-in-out infinite; }
.wiki-discord-login,.wiki-sitebar-account {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 7px;
    color: #f4eee8;
    background: transparent;
    box-shadow: none;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .035em;
    text-transform: uppercase;
    transition: transform .2s ease,border-color .2s ease,box-shadow .2s ease,background .2s ease;
}
.wiki-discord-login { border-color: rgba(255,118,68,.55); background: linear-gradient(135deg,#e84a2d,#f26b39); box-shadow: 0 8px 22px rgba(224,68,35,.2); }
.wiki-discord-login:hover,.wiki-sitebar-account:hover { transform: translateY(-1px); border-color: rgba(255,143,83,.72); box-shadow: 0 9px 26px rgba(222,67,33,.27),0 0 18px rgba(244,96,53,.13); }

.wiki-sitebar-menu { position: relative; display: none; margin-left: auto; }
.wiki-sitebar-menu summary {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(243,104,57,.28);
    border-radius: 8px;
    color: #f0ebe5;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    list-style: none;
    transition: border-color .2s ease,background .2s ease,transform .2s ease;
}
.wiki-sitebar-menu[open] summary { border-color: rgba(255,132,73,.65); background: rgba(242,87,45,.18); transform: rotate(90deg); }
.wiki-sitebar-menu summary::-webkit-details-marker { display: none; }
.wiki-sitebar-menu summary svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.wiki-sitebar-menu > nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(320px,calc(100vw - 28px));
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid rgba(243,105,57,.24);
    border-radius: 12px;
    background: var(--bg);
    box-shadow: 0 28px 80px rgba(0,0,0,.58);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    animation: wiki-menu-in .2s ease-out both;
}
.wiki-sitebar-menu nav a { min-height: 46px; display: flex; align-items: center; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; color: #c9c2bc; font-size: 14px; font-weight: 760; }
.wiki-sitebar-menu nav a:hover,.wiki-sitebar-menu nav a.is-active { color: #fff; border-color: rgba(242,97,51,.18); background: rgba(237,89,57,.11); }
.wiki-sitebar-menu nav a.is-login { margin-top: 6px; color: #fff; background: linear-gradient(135deg,#e84a2d,#f26b39); }

.icon-rail,.category-drawer { top: var(--sitebar-height); }
.page-shell { padding-top: var(--sitebar-height); }
.topbar { top: var(--sitebar-height); }
.skip-link:focus { top: calc(var(--sitebar-height) + 12px); }

@keyframes wiki-sitebar-ember { 0%,100% { background-position: 100% 0; opacity: .35; } 50% { background-position: 0 0; opacity: .7; } }
@keyframes wiki-sitebar-scan { from { background-position: 100% 0; } to { background-position: -110% 0; } }
@keyframes wiki-server-pulse { 0%,100% { opacity: .72; transform: scale(.86); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes wiki-menu-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 1439px) {
    .wiki-sitebar { gap: 22px; padding-inline: 17px; }
    .wiki-sitebar-brand { min-width: 99px; }
    .wiki-sitebar-brand::after { right: -12px; }
    .wiki-sitebar-nav a { padding-inline: 8px; font-size: 12px; }
    .wiki-server-state { display: none; }
}
@media (max-width: 1199px) {
    .wiki-sitebar-nav,.wiki-sitebar-tools { display: none; }
    .wiki-sitebar-menu { display: block; }
}
@media (max-width: 760px) {
    :root { --sitebar-height: 60px; }
    .wiki-sitebar { height: var(--sitebar-height); padding: 0 14px; }
    .wiki-sitebar-brand { min-width: auto; gap: 2px; }
    .wiki-sitebar-brand strong { font-size: 21px; }
    .wiki-sitebar-brand small,.wiki-sitebar-brand::after { display: none; }
    .icon-rail { top: 0; }
    .category-drawer { top: var(--sitebar-height); }
    .mobile-header { top: var(--sitebar-height); }
    .topbar { top: calc(var(--sitebar-height) + 60px); }
    .wiki-sitebar-menu summary { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    .wiki-sitebar::before,.wiki-sitebar::after,.wiki-server-state i,.wiki-sitebar-menu > nav { animation: none !important; }
    .wiki-sitebar-nav a:hover,.wiki-discord-login:hover,.wiki-sitebar-account:hover { transform: none; }
}
