:root {
    color-scheme: dark;
    --ink: #edf5ed;
    --muted: #9cafaa;
    --canvas: #09110f;
    --surface: #111d19;
    --surface-raised: #172721;
    --line: #294038;
    --line-strong: #3e5e51;
    --moss: #68ba83;
    --moss-bright: #8cd6a1;
    --gold: #e0b968;
    --gold-soft: #ffe1a0;
    --danger: #f08c7d;
    --focus: #a5d8ff;
    --action: #e7c36f;
    --action-hover: #f3d68e;
    --action-ink: #1c1609;
    --action-secondary: #1b3028;
    --action-secondary-hover: #27443a;
    --action-secondary-ink: #f1f7f3;
    --shadow: 0 18px 52px rgb(0 0 0 / .28);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    min-width: 18rem;
    line-height: 1.55;
}

a { color: var(--moss-bright); text-underline-offset: .2em; }
a:hover { color: var(--gold-soft); }
button, input, select { font: inherit; }
button, .button { cursor: pointer; }

:focus-visible {
    outline: .18rem solid var(--focus);
    outline-offset: .2rem;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: .5rem;
    left: .5rem;
    padding: .65rem .9rem;
    color: #06100c;
    background: var(--focus);
    border-radius: .45rem;
    transform: translateY(-180%);
}

.skip-link:focus { transform: none; }

.site-header {
    position: sticky;
    z-index: 40;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgb(10 18 15 / .94);
    box-shadow: 0 .45rem 1.5rem rgb(0 0 0 / .22);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(88rem, calc(100% - 2rem));
    min-height: 4.4rem;
    margin: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
}

.wordmark {
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    white-space: nowrap;
}

.wordmark:hover { color: var(--ink); }

.wordmark-sigil {
    width: 2.55rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #0b1511;
    background: linear-gradient(145deg, var(--gold-soft), var(--gold));
    border: 1px solid #f6d68f;
    border-radius: .65rem .2rem .65rem .2rem;
    box-shadow: 0 0 0 .2rem rgb(224 185 104 / .1);
    font-family: Georgia, serif;
    font-size: 1.35rem;
    font-weight: 800;
}

.wordmark-sigil img {
    width: 112%;
    height: 112%;
    display: block;
    object-fit: contain;
    transform: translateY(.08rem);
}

.wordmark span:last-child { display: grid; line-height: 1.12; }
.wordmark strong { letter-spacing: .025em; }
.wordmark small { color: var(--muted); font-size: .7rem; letter-spacing: .11em; text-transform: uppercase; }

.site-icon {
    width: 1.2rem;
    height: 1.2rem;
    display: block;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-navigation {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: .2rem;
}

.site-navigation > a,
.nav-group > summary {
    min-height: 2.75rem;
    padding: .55rem .65rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--muted);
    border-radius: .45rem;
    font-size: .9rem;
    font-weight: 650;
    text-decoration: none;
}
.nav-group { position: relative; }
.nav-group > summary { cursor: pointer; list-style: none; user-select: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group-chevron {
    width: .42rem;
    height: .42rem;
    margin: -.18rem .08rem 0 .12rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: margin .15s ease, transform .15s ease;
}
.nav-group[open] .nav-group-chevron { margin-top: .18rem; transform: rotate(225deg); }
.nav-item-icon { display: grid; place-items: center; color: var(--gold-soft); }
.nav-item-icon .site-icon { width: 1rem; height: 1rem; }
.nav-item-copy { min-width: 0; display: grid; }
.nav-item-copy strong { font: inherit; }
.nav-item-copy small { display: none; color: var(--muted); font-size: .63rem; font-weight: 550; line-height: 1.2; }

.site-navigation > a:hover,
.site-navigation > a[aria-current="page"],
.nav-group > summary:hover,
.nav-group[open] > summary,
.nav-group.is-current > summary { color: var(--ink); background: var(--surface-raised); }
.site-navigation > a[aria-current="page"],
.nav-group.is-current > summary { box-shadow: inset 0 -2px var(--gold); }

.nav-group-menu {
    position: absolute;
    z-index: 60;
    top: calc(100% + .55rem);
    left: 50%;
    width: 22rem;
    padding: .45rem;
    display: none;
    grid-template-columns: 1fr;
    gap: .3rem;
    border: 1px solid var(--line-strong);
    border-radius: .75rem;
    background: #0c1713;
    box-shadow: var(--shadow);
    transform: translateX(-50%);
}
.nav-group[open] > .nav-group-menu { display: grid; animation: header-panel-in .14s ease-out; }
.nav-group-database .nav-group-menu {
    left: 0;
    width: 32rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    transform: none;
}
.nav-group-tools .nav-group-menu { right: 0; left: auto; transform: none; }
.nav-group-menu a {
    min-width: 0;
    min-height: 3.35rem;
    padding: .6rem;
    display: grid;
    grid-template-columns: 1.8rem minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
    color: var(--ink-soft);
    border: 1px solid transparent;
    border-radius: .5rem;
    background: rgb(18 32 27 / .58);
    font-size: .82rem;
    font-weight: 650;
    text-decoration: none;
}
.nav-group-menu a:hover,
.nav-group-menu a[aria-current="page"] { color: var(--ink); border-color: var(--line); background: var(--surface-raised); }
.nav-group-menu a[aria-current="page"] { box-shadow: inset 3px 0 var(--gold); }
.nav-group-menu .nav-item-icon { width: 1.8rem; height: 1.8rem; border-radius: .45rem; background: rgb(224 185 104 / .1); }
.nav-group-menu .nav-item-copy small { margin-top: .08rem; display: block; }

.site-navigation .site-action-link,
.site-account-actions > .site-action-link {
    margin-left: .25rem;
    padding-inline: .8rem;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    background: var(--surface-raised);
}

.site-navigation .site-action-link:hover,
.site-account-actions > .site-action-link:hover { color: var(--ink); background: #21362e; }

.site-account-actions { position: relative; display: inline-flex; align-items: center; }
.site-account-actions > .site-action-link { margin-left: 0; text-decoration: none; }
.site-profile-menu { position: relative; }
.site-profile-menu summary {
    min-height: 2.75rem;
    padding: .3rem .5rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface-raised);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.site-profile-menu summary::-webkit-details-marker { display: none; }
.site-profile-menu summary:hover,
.site-profile-menu[open] summary { background: #21362e; }
.site-profile-avatar {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    display: grid;
    place-items: center;
    color: #09120e;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--gold-soft), var(--gold));
    font-size: .78rem;
    font-weight: 850;
}
.site-profile-copy { min-width: 0; display: grid; line-height: 1.15; }
.site-profile-copy strong { max-width: 9rem; overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.site-profile-copy small { color: var(--muted); font-size: .62rem; }
.site-profile-chevron { color: var(--muted); transition: transform .15s ease; }
.site-profile-menu[open] .site-profile-chevron { transform: rotate(180deg); }
.site-profile-dropdown {
    position: absolute;
    z-index: 60;
    top: calc(100% + .5rem);
    right: 0;
    width: 13rem;
    padding: .4rem;
    border: 1px solid var(--line-strong);
    border-radius: .65rem;
    background: #0c1713;
    box-shadow: var(--shadow);
}
.site-profile-dropdown a,
.site-profile-dropdown button {
    width: 100%;
    min-height: 2.45rem;
    padding: .6rem .7rem;
    display: flex;
    justify-content: flex-start;
    color: var(--ink);
    border: 0;
    border-radius: .4rem;
    background: transparent;
    box-shadow: none;
    font-size: .85rem;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
}
.site-profile-dropdown a:hover,
.site-profile-dropdown button:hover { color: var(--ink); background: var(--surface-raised); filter: none; }
.site-logout-form { margin: .25rem 0 0; padding-top: .25rem; border-top: 1px solid var(--line); }
.site-profile-dropdown .site-logout-link { color: var(--danger); }

.site-navigation .site-play-link {
    color: var(--action-ink);
    border-color: #ffe6a8;
    background: var(--action);
}
.site-navigation .site-play-link .nav-item-icon,
.site-navigation .site-play-link .nav-item-copy small { color: #49370f; }
.site-navigation .site-play-link:hover { color: var(--action-ink); border-color: #fff0c7; background: var(--action-hover); }

.header-actions { display: inline-flex; align-items: center; gap: .45rem; }
.header-icon-button {
    width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    color: var(--ink);
    background: var(--surface-raised);
    border-color: var(--line-strong);
    border-radius: 999px;
}
.header-icon-button:hover,
.header-icon-button[aria-expanded="true"] { color: #07100d; background: var(--gold); border-color: var(--gold-soft); }
.header-icon-button .site-icon { width: 1.25rem; height: 1.25rem; }

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 2.75rem;
    padding: .65rem 1rem;
    color: var(--action-ink);
    background: var(--action);
    border: 1px solid #ffe6a8;
    border-radius: .55rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    box-shadow: inset 0 1px rgb(255 255 255 / .16), 0 .18rem .45rem rgb(0 0 0 / .18);
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.button:hover,
button:hover { color: var(--action-ink); border-color: #fff0c7; background: var(--action-hover); filter: none; }
.button:active,
button:active { box-shadow: inset 0 1px .2rem rgb(66 45 6 / .22); }
.button:disabled,
button:disabled { cursor: not-allowed; opacity: .58; }
.button-small { min-height: 2.25rem; padding: .45rem .75rem !important; color: var(--action-ink) !important; }
.button-secondary { color: var(--action-secondary-ink); background: var(--action-secondary); border-color: #42685a; box-shadow: none; }
.button-secondary.button-small { color: var(--action-secondary-ink) !important; }
.button-secondary:hover { color: #fff; border-color: #5b8575; background: var(--action-secondary-hover); }

.nav-toggle { display: none; min-height: 2.75rem; padding: .45rem .7rem; }
.nav-toggle-icon { width: 1.15rem; display: grid; gap: .22rem; }
.nav-toggle-icon i { width: 100%; height: 2px; display: block; border-radius: 999px; background: currentColor; transition: transform .16s ease, opacity .16s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon i:first-child { transform: translateY(.44rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon i:last-child { transform: translateY(-.44rem) rotate(-45deg); }

.header-search {
    position: relative;
    z-index: 58;
    width: min(58rem, calc(100% - 2rem));
    margin: 0 auto .75rem;
    display: none;
    padding: .75rem;
    border: 1px solid var(--line-strong);
    border-radius: .85rem;
    background: #0c1713;
    box-shadow: var(--shadow);
    overflow: visible;
}
.header-search[data-open="true"] { display: block; }
.header-search-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: .65rem;
    background: var(--surface);
    overflow: hidden;
}
.header-search-bar > .site-icon { margin-left: .85rem; }
.header-search-bar input[type="search"] { min-width: 0; }
.header-search-options { margin-top: .65rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.header-search-options fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.header-search-options legend { margin-bottom: .35rem; color: var(--muted); font-size: .65rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.search-shortcut-hint { flex: 0 0 auto; padding-bottom: .12rem; color: var(--muted); font-size: .68rem; white-space: nowrap; }
kbd { min-width: 1.35rem; padding: .12rem .3rem; display: inline-grid; place-items: center; color: var(--ink-soft); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: .28rem; background: var(--surface-raised); font: 650 .65rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.search-shortcut-hint kbd + kbd { margin-left: .18rem; }

.header-search input[type="search"],
.filters input,
.filters select,
.calculator-card input,
.calculator-card select,
.required-items-controls input,
.required-items-controls select {
    width: 100%;
    min-height: 3rem;
    padding: .7rem .9rem;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: .5rem;
}

.header-search input[type="search"] { border: 0; border-radius: 0; background: transparent; }
.header-search-bar button { min-height: 2.8rem; border: 0; border-radius: 0; padding-inline: 1.2rem; }

main { min-height: 68vh; }

.page-shell {
    width: min(82rem, calc(100% - 2rem));
    margin-inline: auto;
}

.page-shell { padding: 2.75rem 0 4rem; }

.eyebrow {
    display: block;
    margin-bottom: .65rem;
    color: var(--gold);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

h1, h2, h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; line-height: 1.15; }
h1 { max-width: 24ch; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); }
h3 { font-size: 1.2rem; }

.page-intro {
    max-width: 48rem;
    margin: 1rem 0 0;
    color: #c5d3cd;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.card-grid,
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.catalog-card,
.panel,
.calculator-card,
.empty-state,
.notice {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: .45rem;
    box-shadow: none;
}

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading p { max-width: 42rem; margin: .35rem 0 0; color: var(--muted); }

.page-heading { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.page-heading h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.page-count { color: var(--muted); white-space: nowrap; }

.subnav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; }
.subnav a { padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; }
.subnav a:hover, .subnav a[aria-current="page"] { color: var(--ink); border-color: var(--gold); background: var(--surface-raised); }

.filters {
    margin-bottom: 1.25rem;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: .75rem;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: .75rem;
    background: rgb(17 29 25 / .72);
}

.filters label,
.calculator-card label { display: grid; gap: .35rem; color: var(--muted); font-size: .82rem; font-weight: 700; }
.filters button { min-height: 3rem; }
.learnable-filters { grid-template-columns: minmax(16rem, 1fr) auto auto; }
.database-search { grid-template-columns: minmax(16rem, 1fr) auto auto; }
.drop-filters { grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto; }

.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog-card { position: relative; padding: 1.05rem; overflow: hidden; }
.catalog-card::after { content: ""; position: absolute; inset: auto -1.4rem -1.8rem auto; width: 5rem; aspect-ratio: 1; border: 1px solid rgb(224 185 104 / .12); transform: rotate(45deg); }
.catalog-card h2, .catalog-card h3 { font-size: 1.12rem; }
.catalog-card h2 a, .catalog-card h3 a { color: var(--ink); text-decoration: none; }
.catalog-card h2 a:hover, .catalog-card h3 a:hover { color: var(--gold-soft); }
.catalog-card p { margin: .5rem 0 0; color: var(--muted); font-size: .9rem; }

.record-grid { gap: .65rem; }
.catalog-record {
    min-width: 0;
    min-height: 5rem;
    padding: .75rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .7rem;
    align-items: center;
    overflow: visible;
}
.catalog-record.has-record-art { grid-template-columns: 3.25rem minmax(0, 1fr); }
.catalog-record::after { display: none; }
.catalog-record-art {
    width: 3.25rem;
    height: 3.25rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: .35rem;
    background: #08110e;
}
.catalog-record-art .catalog-icon { width: 100%; height: 100%; flex-basis: 100%; border: 0; border-radius: 0; }
.catalog-record-body { min-width: 0; }
.catalog-record-kicker {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: .65rem;
    font-weight: 750;
    letter-spacing: .045em;
    line-height: 1.3;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
.catalog-record h2 { margin-top: .15rem; overflow-wrap: anywhere; }
.catalog-record h2 a::after { content: ""; position: absolute; inset: 0; }
.catalog-record p { margin-top: .25rem; font-size: .75rem; }
.creature-record-art { height: 4rem; background: radial-gradient(circle at 50% 72%, rgb(224 185 104 / .11), transparent 62%), #08110e; }
.creature-art { max-width: 100%; max-height: 100%; display: block; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }

.wiki-home { padding-top: 2rem; }
.wiki-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .55rem 1rem; margin-bottom: 1rem; }
.wiki-heading h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
.wiki-heading p { margin: 0; color: var(--muted); }

.wiki-search { position: relative; margin-bottom: 1rem; padding: .8rem; border: 1px solid var(--line); background: var(--surface); }
.wiki-search > label { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .75rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.wiki-search > div { display: grid; grid-template-columns: 1fr auto; }
.wiki-search input { min-width: 0; min-height: 2.75rem; padding: .55rem .7rem; color: var(--ink); background: #0b1511; border: 1px solid var(--line-strong); border-radius: .25rem 0 0 .25rem; }
.wiki-search button { min-height: 2.75rem; border-radius: 0 .25rem .25rem 0; }

.ovie-welcome {
    min-height: 13.5rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 11rem minmax(0, 1.15fr) minmax(16rem, .85fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
}
.ovie-portrait {
    min-height: 13.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid var(--line);
    background: radial-gradient(circle at 50% 55%, rgb(224 185 104 / .17), transparent 62%), #0b1511;
}
.ovie-portrait img {
    width: 9.6rem;
    height: auto;
    max-height: 14.25rem;
    display: block;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 .55rem .65rem rgb(0 0 0 / .32));
}
.ovie-intro { align-self: center; padding: 1.15rem 1.35rem; }
.ovie-intro .eyebrow { margin-bottom: .35rem; font-size: .65rem; }
.ovie-intro h2 { font-size: 1.55rem; }
.ovie-intro p { max-width: 40rem; margin: .65rem 0 0; color: var(--muted); font-size: .9rem; }
.ovie-intro em { color: var(--gold-soft); }
.ovie-quote {
    align-self: center;
    margin: 1rem 1rem 1rem 0;
    padding: .85rem 1rem;
    border-left: .18rem solid var(--gold);
    background: rgb(8 17 14 / .6);
}
.ovie-quote figcaption { color: var(--gold); font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ovie-quote blockquote { margin: .45rem 0 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; line-height: 1.4; }
.ovie-quote p { margin: .45rem 0 0; color: var(--muted); font-size: .72rem; }

.home-directory { margin-top: 0; }
.home-section-grid { margin-top: .75rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.home-section-card {
    min-width: 0;
    min-height: 16.5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: .35rem;
    background: linear-gradient(145deg, rgb(24 40 34 / .74), rgb(10 20 16 / .78));
}
.home-section-card:hover { border-color: var(--line-strong); background: linear-gradient(145deg, rgb(30 48 40 / .78), rgb(10 20 16 / .82)); }
.home-section-card header { display: flex; align-items: center; gap: .7rem; }
.home-section-card header > span { width: 2.5rem; height: 2.5rem; flex: 0 0 2.5rem; display: grid; place-items: center; color: var(--gold-soft); border: 1px solid var(--line-strong); border-radius: .35rem; background: #09130f; }
.home-section-card header .site-icon { width: 1.3rem; height: 1.3rem; }
.home-section-card header small { display: block; color: var(--muted); font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.home-section-card h3 { margin-top: .1rem; font-family: inherit; font-size: 1.08rem; }
.home-section-card h3 a { color: var(--ink); text-decoration: none; }
.home-section-card h3 a:hover { color: var(--gold-soft); }
.home-section-card > p { margin: .75rem 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.home-section-card nav { display: flex; flex-wrap: wrap; gap: .3rem; }
.home-section-card nav a { padding: .22rem .42rem; color: var(--ink); border: 1px solid var(--line); border-radius: .2rem; background: rgb(8 17 14 / .7); font-size: .7rem; text-decoration: none; }
.home-section-card nav a:hover { color: var(--gold-soft); border-color: var(--gold); }
.home-section-meta { margin-top: auto; padding-top: .85rem; color: var(--gold-soft); font-size: .68rem; font-weight: 750; }

.home-stat-grid { margin-top: .75rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.home-stat-grid a { min-width: 0; min-height: 5.7rem; padding: .8rem; display: grid; align-content: center; text-decoration: none; }
.home-stat-grid a:not(:nth-child(4n + 1)) { border-left: 1px solid var(--line); }
.home-stat-grid a:nth-child(n + 5) { border-top: 1px solid var(--line); }
.home-stat-grid a:hover { background: var(--surface-raised); }
.home-stat-grid strong { color: var(--gold-soft); font-family: Georgia, "Times New Roman", serif; font-size: 1.65rem; font-weight: 600; line-height: 1; }
.home-stat-grid span { margin-top: .35rem; color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }

.home-start-grid { margin-top: .75rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.home-start-grid a { min-width: 0; min-height: 9.5rem; padding: .85rem; display: flex; flex-direction: column; color: var(--ink); border: 1px solid var(--line); border-radius: .35rem; background: rgb(10 21 17 / .6); text-decoration: none; }
.home-start-grid a:hover { border-color: var(--gold); background: var(--surface); }
.home-start-grid small { color: var(--gold); font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.home-start-grid strong { margin-top: .35rem; font-size: .88rem; }
.home-start-grid span { margin-top: .5rem; color: var(--muted); font-size: .75rem; line-height: 1.45; }

.public-world-shouts { width: min(68rem, calc(100% - 2rem)); }
.world-shouts-heading { margin-bottom: 1rem; }
.world-shout-ovie {
    min-height: 5.5rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
}
.world-shout-ovie-art {
    height: 6rem;
    align-self: end;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid var(--line);
    background: radial-gradient(circle at 50% 55%, rgb(224 185 104 / .16), transparent 65%), #0b1511;
}
.world-shout-ovie-art img { width: 4.6rem; height: auto; display: block; object-fit: contain; object-position: center bottom; }
.world-shout-ovie-copy { align-self: center; padding: .65rem .8rem; }
.world-shout-ovie-copy .eyebrow { margin: 0; font-size: .6rem; }
.world-shout-ovie-copy > p { margin: .25rem 0 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: .82rem; }
.world-shout-filters {
    margin-bottom: .85rem;
    padding: .75rem;
    grid-template-columns: minmax(14rem, 1.4fr) minmax(8rem, .7fr) repeat(2, minmax(8rem, .65fr)) auto auto;
    gap: .55rem;
    border-radius: .25rem;
    background: transparent;
}
.world-shout-filters .button { min-height: 3rem; }
.world-shout-feed-heading { margin-bottom: .55rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.world-shout-feed-heading h2 { font-family: inherit; font-size: 1rem; }
.world-shout-feed-heading p { margin: .2rem 0 0; color: var(--muted); font-size: .72rem; }
.world-shout-feed { border: 1px solid var(--line); background: var(--surface); }
.world-shout-entry { padding: .72rem .85rem; display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; border-bottom: 1px solid var(--line); }
.world-shout-entry:last-child { border-bottom: 0; }
.world-shout-entry:hover { background: rgb(23 39 33 / .58); }
.world-shout-entry header { min-width: 0; display: grid; align-content: start; }
.world-shout-entry header a { min-width: 0; text-decoration: none; }
.world-shout-entry strong { overflow: hidden; color: var(--gold-soft); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.world-shout-entry time { color: var(--muted); font-size: .64rem; }
.world-shout-entry p { min-width: 0; margin: 0; color: var(--ink); font-size: .86rem; overflow-wrap: anywhere; }
.world-shout-intent { min-width: 3.2rem; margin: .05rem .55rem .05rem 0; padding: .12rem .3rem; display: inline-block; color: var(--muted); border: 1px solid var(--line); border-radius: .2rem; font-size: .55rem; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; vertical-align: .08rem; }
.world-shout-intent-buy { color: #9ed7ba; border-color: rgb(99 181 139 / .45); background: rgb(55 132 93 / .12); }
.world-shout-intent-sell { color: #efb0a8; border-color: rgb(212 109 97 / .45); background: rgb(153 67 57 / .12); }
.world-shout-intent-trade { color: #b8c9ed; border-color: rgb(113 143 206 / .45); background: rgb(68 95 151 / .12); }
.world-shout-source-note { margin: .65rem 0 0; color: var(--muted); font-size: .68rem; }

.aisling-directory { width: min(76rem, calc(100% - 2rem)); }
.aisling-privacy-note { margin-bottom: .75rem; padding: .65rem .8rem; color: var(--muted); border-left: .2rem solid var(--gold); font-size: .78rem; }
.aisling-privacy-note strong { color: var(--ink); }
.aisling-filters { margin-bottom: .7rem; padding: .6rem; grid-template-columns: minmax(15rem, 1.2fr) repeat(3, minmax(9rem, .65fr)) auto auto; gap: .55rem; border-radius: .25rem; background: transparent; }
.aisling-filters .button { min-height: 3rem; }
.aisling-directory-table { min-width: 62rem; }
.aisling-directory-table td small { margin-top: .12rem; display: block; color: var(--muted); font-size: .64rem; }
.aisling-directory-table td:nth-child(2) { width: 12rem; min-width: 12rem; }
.aisling-directory-table td:nth-child(3),
.aisling-directory-table td:nth-child(4) { width: 13rem; min-width: 13rem; }
.aisling-directory-table td:nth-child(5) { width: 9rem; min-width: 9rem; }
.aisling-profile { width: min(68rem, calc(100% - 2rem)); }
.aisling-profile-header { margin-bottom: 1rem; padding: 1rem; display: grid; grid-template-columns: 4rem minmax(0, 1fr); align-items: center; gap: 1rem; border: 1px solid var(--line); background: radial-gradient(circle at 2rem 2rem, rgb(224 185 104 / .12), transparent 20rem), var(--surface); }
.aisling-profile-sigil { width: 4rem; height: 4rem; display: grid; place-items: center; color: var(--gold-soft); border: 1px solid var(--line-strong); border-radius: 50%; background: #0a1511; }
.aisling-profile-sigil .site-icon { width: 2rem; height: 2rem; }
.aisling-profile-header .eyebrow { margin-bottom: .2rem; font-size: .62rem; }
.aisling-profile-header h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.aisling-profile-header p { margin: .2rem 0 0; color: var(--muted); }
.aisling-profile-layout { margin-bottom: 1.25rem; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(15rem, .6fr); gap: .75rem; }
.aisling-identity-panel, .aisling-profile-boundary { padding: 1rem; }
.aisling-identity-panel h2 { margin-bottom: .75rem; font-family: inherit; font-size: 1rem; }
.aisling-identity-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); }
.aisling-identity-list div { min-width: 0; padding: .65rem .75rem; }
.aisling-identity-list div:nth-child(even) { border-left: 1px solid var(--line); }
.aisling-identity-list div:nth-child(n+3) { border-top: 1px solid var(--line); }
.aisling-identity-list dt { color: var(--muted); font-size: .62rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.aisling-identity-list dd { margin: .18rem 0 0; color: var(--ink); overflow-wrap: anywhere; }
.aisling-observed { margin: .6rem 0 0; color: var(--muted); font-size: .68rem; }
.aisling-profile-boundary p { margin: .4rem 0 0; color: var(--muted); font-size: .8rem; }
.aisling-shout-heading { margin-top: 1.5rem; }

.reference-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1.25rem; border: 1px solid var(--line); background: var(--surface); }
.reference-directory section { padding: .8rem 1rem; }
.reference-directory section + section { border-left: 1px solid var(--line); }
.reference-directory h2 { margin-bottom: .35rem; color: var(--gold-soft); font-family: inherit; font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; }
.reference-directory ul { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem .85rem; list-style: none; }
.reference-directory a { font-size: .9rem; }

.wiki-section { margin-top: 1.25rem; }
.wiki-section-heading { min-height: 2.2rem; padding: 0 0 .45rem; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; border-bottom: 1px solid var(--line); }
.wiki-section-heading h2 { font-family: inherit; font-size: 1rem; font-weight: 800; }
.wiki-section-heading > span, .wiki-section-heading > a { color: var(--muted); font-size: .78rem; }
.wiki-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }

.class-index-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.compact-index { width: 100%; border-collapse: collapse; background: rgb(14 25 21 / .7); }
.compact-index caption { padding: .45rem .6rem; color: var(--gold-soft); background: var(--surface-raised); border: 1px solid var(--line); border-bottom: 0; font-weight: 750; text-align: left; }
.compact-index th, .compact-index td { padding: .35rem .6rem; border: 1px solid var(--line); text-align: left; font-size: .82rem; }
.compact-index th { color: var(--muted); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; }
.compact-index th:last-child, .compact-index td:last-child { width: 5rem; text-align: right; }

.reference-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.reference-title h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
.reference-title p { margin: .25rem 0 0; color: var(--muted); }
.reference-title > span { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.index-switch, .item-group-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; }
.index-switch { margin-bottom: .65rem; border-bottom: 1px solid var(--line); }
.index-switch a { padding: .4rem .7rem; color: var(--muted); border-bottom: 2px solid transparent; text-decoration: none; }
.index-switch a[aria-current="page"] { color: var(--ink); border-color: var(--gold); }
.class-path-form { max-width: 36rem; margin-bottom: .6rem; display: grid; grid-template-columns: minmax(15rem, 1fr) auto; align-items: end; gap: .45rem; }
.learnable-class-controls { max-width: 48rem; grid-template-columns: minmax(15rem, 1fr) minmax(10rem, .55fr) auto; }
.class-path-form label { display: grid; gap: .25rem; color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.class-path-form select { width: 100%; min-height: 2.55rem; padding: .5rem .7rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .35rem; background: var(--surface); }
.class-path-form button { min-height: 2.55rem; padding: .5rem .75rem; white-space: nowrap; }
.class-stage-tabs { margin-bottom: .65rem; display: flex; align-items: flex-end; gap: .12rem; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.class-stage-tabs a { flex: 0 0 auto; margin-bottom: -1px; padding: .43rem .68rem .48rem; color: var(--muted); border: 1px solid transparent; border-bottom: 0; border-radius: .3rem .3rem 0 0; text-decoration: none; white-space: nowrap; }
.class-stage-tabs a:hover { color: var(--ink); background: rgb(20 37 31 / .65); }
.class-stage-tabs a[aria-current="page"] { color: var(--ink); border-color: var(--line-strong); border-top-color: var(--gold); background: var(--surface-raised); box-shadow: inset 0 2px var(--gold); }
.class-stage-tabs small { margin-left: .22rem; color: var(--muted); font-size: .65rem; font-weight: 650; }
.learnable-index .learnable-filters { margin-bottom: .65rem; }
.item-group-tabs a { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .55rem; color: var(--muted); border: 1px solid var(--line); border-radius: .25rem; font-size: .8rem; text-decoration: none; }
.item-group-tabs a:hover, .item-group-tabs a[aria-current="page"] { color: var(--ink); border-color: var(--gold); background: var(--surface-raised); }
.item-group-tabs small { color: var(--muted); font-size: .67rem; }
.item-group-tabs > span { margin-right: .2rem; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.item-group-tabs { margin: -.35rem 0 .65rem; }
.item-search { margin-bottom: .7rem; padding: .55rem; border-radius: .25rem; background: transparent; }

.reference-table-wrap { border-radius: .25rem; }
.reference-table { min-width: 68rem; font-size: .78rem; line-height: 1.35; }
.reference-table th, .reference-table td { padding: .42rem .5rem; }
.reference-table .reference-name { min-width: 10rem; font-size: .88rem; font-weight: 700; }
.reference-table td:nth-child(2) { min-width: 7.5rem; }
.reference-table td:nth-child(4) { min-width: 12rem; }
.reference-table td:nth-child(5) { min-width: 9rem; }
.reference-table td:nth-child(6) { min-width: 12rem; }
.reference-table td small { display: block; margin-top: .12rem; color: var(--muted); font-size: .7rem; }
.level-token { font-variant-numeric: tabular-nums; font-weight: 750; }
.reference-mobile-primary { display: contents; }
.reference-mobile-context,
.reference-mobile-level,
.reference-mobile-details { display: none; }
.compact-reference { min-width: 28rem; font-size: .78rem; }
.compact-reference th, .compact-reference td { padding: .38rem .5rem; }

.item-reference-wrap { border-radius: .25rem; }
.item-reference-table { min-width: 92rem; font-size: .72rem; line-height: 1.32; font-variant-numeric: tabular-nums; }
.item-reference-table th, .item-reference-table td { padding: .42rem .48rem; }
.item-reference-table tbody tr:nth-child(even) { background: rgb(255 255 255 / .018); }
.item-reference-table tbody tr:hover { background: rgb(224 185 104 / .045); }
.item-reference-table th:first-child,
.item-reference-table td:first-child { position: sticky; left: 0; z-index: 1; width: 15rem; min-width: 15rem; background: #0e1915; box-shadow: 1px 0 0 var(--line); }
.item-reference-table th:first-child { z-index: 2; background: var(--surface-raised); }
.item-reference-table .catalog-name { align-items: center; gap: .5rem; }
.item-reference-table .catalog-icon { width: 2.7rem; height: 2.7rem; flex-basis: 2.7rem; padding: .05rem; border-color: var(--line-strong); }
.item-reference-name > small { margin: .15rem 0 0 3.2rem; display: block; color: var(--muted); font-size: .6rem; font-weight: 600; text-transform: uppercase; }
.item-reference-table td:nth-child(2) { width: 10.5rem; min-width: 10.5rem; }
.item-reference-table td:nth-child(3) { width: 4.5rem; min-width: 4.5rem; }
.item-reference-table td:nth-child(4) { width: 9rem; min-width: 9rem; }
.item-reference-table td:nth-child(5),
.item-reference-table td:nth-child(6) { width: 6rem; min-width: 6rem; text-align: right; }
.item-reference-table th:nth-child(5),
.item-reference-table th:nth-child(6) { text-align: right; }
.item-reference-table td:nth-child(7) { width: 3rem; text-align: right; }
.item-reference-table th:nth-child(7) { text-align: right; }
.item-reference-table td:nth-child(8) { width: 14rem; min-width: 14rem; }
.item-reference-table td:nth-child(9) { width: 13rem; min-width: 13rem; }

.monster-filters {
    margin-bottom: .7rem;
    padding: .6rem;
    grid-template-columns: minmax(17rem, 1.5fr) repeat(3, minmax(9rem, .75fr)) auto auto;
    gap: .55rem;
    border-radius: .25rem;
    background: transparent;
}
.monster-reference-wrap { border-radius: .25rem; }
.monster-reference-table { min-width: 76rem; font-size: .75rem; line-height: 1.35; }
.monster-reference-table th,
.monster-reference-table td { padding: .45rem .55rem; vertical-align: middle; }
.monster-reference-table tbody tr:nth-child(even) { background: rgb(255 255 255 / .018); }
.monster-reference-table tbody tr:hover { background: rgb(224 185 104 / .045); }
.monster-reference-table th:first-child,
.monster-reference-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 16rem;
    min-width: 16rem;
    background: #0e1915;
    box-shadow: 1px 0 0 var(--line);
}
.monster-reference-table th:first-child { z-index: 2; background: var(--surface-raised); }
.monster-reference-table td:nth-child(2) { width: 7rem; min-width: 7rem; }
.monster-reference-table td:nth-child(3) { width: 14rem; min-width: 14rem; }
.monster-reference-table td:nth-child(4) { width: 15rem; min-width: 15rem; }
.monster-reference-table td:nth-child(5) { width: 19rem; min-width: 19rem; }
.monster-name-cell { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); align-items: center; gap: .65rem; }
.monster-name-cell > span:last-child { min-width: 0; }
.monster-name-cell > span:last-child > a { font-size: .9rem; font-weight: 750; }
.monster-name-cell small,
.monster-reference-table td > small { display: block; margin-top: .15rem; color: var(--muted); font-size: .65rem; }
.monster-table-art {
    width: 4.25rem;
    height: 4.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: .25rem;
    background: radial-gradient(circle, rgb(224 185 104 / .08), transparent 70%), #0b1511;
}
.monster-table-art .creature-art { width: 100%; height: 100%; padding: .12rem; object-position: center; }
.monster-attributes { white-space: normal; }
.monster-drop-list { margin: 0; padding: 0; display: grid; gap: .18rem; list-style: none; }
.monster-drop-list li { min-width: 0; }
.monster-drop-list .catalog-name { gap: .35rem; }
.monster-drop-list .catalog-icon { width: 1.6rem; height: 1.6rem; flex-basis: 1.6rem; padding: .03rem; }
.monster-more-drops { display: inline-block; margin-top: .22rem; font-size: .7rem; }
.monster-drop-fallback { display: block; color: var(--ink-soft); }
.item-reference-lines > span { display: block; }
.item-reference-lines > span + span { margin-top: .12rem; }
.item-combat small { display: block; color: var(--muted); font-size: .56rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.item-combat span { white-space: nowrap; }
.item-variant-wrap { border-radius: .25rem; }
.item-variant-table { min-width: 72rem; font-size: .72rem; line-height: 1.32; }
.item-variant-table th, .item-variant-table td { padding: .4rem .45rem; }

.catalog-name { display: inline-flex; align-items: center; gap: .38rem; min-width: 0; }
.catalog-name > span { min-width: 0; }
.catalog-icon {
    display: block;
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    padding: .04rem;
    overflow: hidden;
    contain: paint;
    background: #08110e;
    border: 1px solid var(--line);
    border-radius: .3rem;
    image-rendering: pixelated;
}
.catalog-icon image { image-rendering: pixelated; }
.reference-table .catalog-icon {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    flex-basis: 50px;
}
.catalog-card h2 .catalog-icon { width: 1.25rem; height: 1.25rem; flex-basis: 1.25rem; }

.badge-row { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    padding: .16rem .45rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: #c6d5ce;
    background: rgb(7 16 13 / .45);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.badge-gold { color: var(--gold-soft); border-color: #7a6338; }

.detail-header { margin-bottom: 1.25rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.detail-header h1 { font-size: clamp(2rem, 5vw, 4rem); }
.learnable-detail-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.learnable-detail-title { display: flex; align-items: center; gap: 1rem; }
.learnable-detail-title > .catalog-icon { width: 4rem; height: 4rem; flex-basis: 4rem; padding: .2rem; }
.entity-detail-title { min-width: 0; display: flex; align-items: center; gap: 1rem; }
.entity-detail-title > div:last-child { min-width: 0; }
.entity-detail-art {
    width: 5rem;
    height: 5rem;
    flex: 0 0 5rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: .45rem;
    background: radial-gradient(circle at 50% 65%, rgb(224 185 104 / .12), transparent 65%), #08110e;
}
.entity-detail-art .catalog-icon { width: 100%; height: 100%; flex-basis: 100%; padding: .2rem; border: 0; border-radius: 0; }
.creature-detail-art { width: 7rem; height: 7rem; flex-basis: 7rem; }
.detail-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: .5rem; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; color: var(--muted); font-size: .85rem; }
.breadcrumb a { color: var(--muted); }

.detail-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: 1rem; align-items: start; }
.panel { padding: 1.2rem; }
.panel + .panel { margin-top: 1rem; }
.panel h2 { margin-bottom: .8rem; font-size: 1.3rem; }

.fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 0; }
.fact-grid div { min-width: 0; padding: .7rem; border: 1px solid var(--line); border-radius: .55rem; background: rgb(7 16 13 / .35); }
.fact-grid dt { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; }
.fact-grid dd { margin: .15rem 0 0; overflow-wrap: anywhere; font-weight: 700; }

.quest-requirements {
    padding: .85rem .9rem;
    border: 1px solid var(--line);
    border-radius: .45rem;
    background: rgb(7 16 13 / .35);
}
.quest-requirements small,
.quest-sidebar-eyebrow,
.quest-reward-items small {
    display: block;
    color: var(--muted);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.quest-requirements p { margin: .2rem 0 0; color: var(--ink-soft); font-weight: 700; }
.quest-sidebar { position: sticky; top: 5.4rem; }
.quest-reward-card { overflow: hidden; }
.quest-sidebar-eyebrow { margin-bottom: .25rem; color: var(--gold); }
.quest-reward-card h2 { margin-bottom: .45rem; }
.quest-reward-summary { margin: 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; line-height: 1.55; }
.quest-reward-items { margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.quest-reward-items p { margin: .25rem 0 0; line-height: 1.5; }
.quest-reward-caution { margin: .9rem 0 0; padding: .7rem .75rem; color: var(--ink-soft); border-left: 3px solid var(--gold); background: rgb(224 185 104 / .055); font-size: .78rem; line-height: 1.5; }
.quest-reward-caution strong { color: var(--gold-soft); }
.quest-quick-facts { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.quest-quick-facts h3 { margin-bottom: .35rem; font-family: inherit; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.quest-quick-facts dl { margin: 0; }
.quest-quick-facts dl div { padding: .45rem 0; display: grid; grid-template-columns: minmax(5.5rem, .65fr) minmax(0, 1fr); gap: .7rem; border-bottom: 1px solid rgb(68 91 81 / .45); }
.quest-quick-facts dl div:last-child { padding-bottom: 0; border-bottom: 0; }
.quest-quick-facts dt { color: var(--muted); font-size: .68rem; }
.quest-quick-facts dd { margin: 0; color: var(--ink-soft); font-size: .78rem; font-weight: 700; overflow-wrap: anywhere; }

.guide-text-item { color: var(--gold-soft); text-decoration-color: rgb(224 185 104 / .45); text-decoration-style: dotted; text-underline-offset: .18em; }
.guide-inline-item { display: inline-flex; align-items: center; gap: .28rem; color: var(--gold-soft); text-decoration: none; vertical-align: middle; }
.guide-inline-item:hover span:last-child { text-decoration: underline; text-underline-offset: .15em; }
.guide-inline-item .catalog-icon,
.guide-item-fallback { width: 1.35rem; height: 1.35rem; flex: 0 0 1.35rem; }
.guide-item-fallback { display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); border-radius: .25rem; background: #09130f; font-size: .55rem; }
.guide-item-gallery { margin: 1.1rem 0 1.25rem; }
.guide-item-gallery-heading { margin-bottom: .55rem; padding-bottom: .4rem; display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; border-bottom: 1px solid var(--line); }
.guide-item-gallery-heading h2 { font-family: inherit; font-size: .88rem; }
.guide-item-gallery-heading span { color: var(--muted); font-size: .68rem; }
.guide-item-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; }
.guide-item-tile { min-width: 0; min-height: 4.1rem; padding: .5rem .6rem; display: grid; grid-template-columns: 2.8rem minmax(0, 1fr); gap: .55rem; align-items: center; color: var(--ink); border: 1px solid var(--line); border-radius: .45rem; background: rgb(7 16 13 / .48); text-decoration: none; }
.guide-item-tile:hover { border-color: var(--gold); background: var(--surface-raised); }
.guide-item-tile > span:last-child { min-width: 0; }
.guide-item-tile strong, .guide-item-tile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-item-tile strong { color: var(--gold-soft); font-size: .75rem; }
.guide-item-tile small { margin-top: .15rem; color: var(--muted); font-size: .58rem; text-transform: uppercase; }
.guide-item-art { width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: .35rem; background: radial-gradient(circle, rgb(224 185 104 / .1), transparent 70%), #08110e; }
.guide-item-art .catalog-icon { width: 2.5rem; height: 2.5rem; flex-basis: 2.5rem; }
.guide-item-art .guide-item-fallback { border: 0; background: transparent; }
.guide-item-tiles-compact { grid-template-columns: 1fr; }
.guide-item-tiles-compact .guide-item-tile { min-height: 3.5rem; grid-template-columns: 2.35rem minmax(0, 1fr); }
.guide-item-tiles-compact .guide-item-art { width: 2.35rem; height: 2.35rem; }
.guide-item-tiles-compact .guide-item-art .catalog-icon { width: 2.1rem; height: 2.1rem; flex-basis: 2.1rem; }

.guide-steps { margin: .7rem 0 0; padding: 0; display: grid; gap: .55rem; counter-reset: guide-step; list-style: none; }
.guide-steps li { min-width: 0; padding: .8rem .85rem .8rem 3.15rem; position: relative; color: var(--ink-soft); border: 1px solid var(--line); border-radius: .5rem; background: rgb(7 16 13 / .35); line-height: 1.55; counter-increment: guide-step; }
.guide-steps li::before { content: counter(guide-step); width: 1.8rem; height: 1.8rem; position: absolute; top: .72rem; left: .72rem; display: grid; place-items: center; color: #07100d; border-radius: 50%; background: var(--gold); font-size: .7rem; font-weight: 900; }
.guide-steps li strong { color: var(--ink); }

.quest-detail-header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.quest-detail-header > span { padding: .28rem .5rem; color: var(--gold-soft); border: 1px solid var(--line-strong); border-radius: 999px; font-size: .68rem; white-space: nowrap; }
.quest-important-notes { margin-top: 1rem; }
.quest-important-notes ul { margin-bottom: 0; }
.quest-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.quest-index-heading { margin-bottom: .65rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.quest-index-heading h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
.quest-index-heading p { margin: .25rem 0 0; color: var(--muted); }
.quest-index-heading > span { color: var(--gold-soft); font-size: .78rem; white-space: nowrap; }
.quest-stage-links { margin-bottom: .7rem; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: thin; }
.quest-stage-links a { flex: 0 0 auto; padding: .35rem .65rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; font-size: .72rem; text-decoration: none; }
.quest-stage-links a:hover, .quest-stage-links a[aria-current="page"] { color: #07100d; border-color: var(--gold); background: var(--gold); }
.quest-index-card { min-width: 0; padding: .85rem; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: .55rem; background: linear-gradient(145deg, rgb(21 38 31 / .82), rgb(7 16 13 / .76)); }
.quest-index-card-heading { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.quest-index-card-heading span { color: var(--gold); font-size: .61rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.quest-index-card-heading small { color: var(--muted); font-size: .65rem; }
.quest-index-card h2 { margin-top: .35rem; font-size: 1.22rem; }
.quest-index-card h2 a { color: var(--ink); text-decoration: none; }
.quest-index-card h2 a:hover { color: var(--gold-soft); }
.quest-index-card dl { margin: .65rem 0 0; }
.quest-index-card dl div { padding: .4rem 0; display: grid; grid-template-columns: 4.2rem minmax(0, 1fr); gap: .55rem; border-top: 1px solid rgb(68 91 81 / .45); }
.quest-index-card dt { color: var(--muted); font-size: .61rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.quest-index-card dd { margin: 0; color: var(--ink-soft); font-size: .76rem; line-height: 1.45; }
.guide-item-tiles-quest-card { margin-top: .4rem; display: flex; flex-wrap: wrap; }
.guide-item-tiles-quest-card .guide-item-tile { min-height: 2.6rem; max-width: 10rem; padding: .3rem .45rem; grid-template-columns: 1.85rem minmax(0, 1fr); }
.guide-item-tiles-quest-card .guide-item-art { width: 1.85rem; height: 1.85rem; }
.guide-item-tiles-quest-card .guide-item-art .catalog-icon { width: 1.65rem; height: 1.65rem; flex-basis: 1.65rem; }
.guide-item-tiles-quest-card .guide-item-tile strong { font-size: .65rem; }
.guide-item-tiles-quest-card .guide-item-tile small { display: none; }
.quest-index-card footer { margin-top: auto; padding-top: .65rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.quest-index-card footer span { color: var(--muted); font-size: .62rem; }
.quest-index-card footer a { flex: 0 0 auto; font-size: .72rem; font-weight: 800; }

.knowledge-guide-steps li { line-height: 1.65; }
.knowledge-fact-grid dd { line-height: 1.55; }
.knowledge-live-note { margin-top: 1rem; }
.knowledge-detail-notes { margin: .8rem 0 0; color: var(--ink-soft); line-height: 1.55; }
.knowledge-detail-blocks { margin-top: .85rem; display: grid; gap: .6rem; }
.knowledge-detail-block { overflow: hidden; border: 1px solid var(--line); border-radius: .55rem; background: rgb(7 16 13 / .35); }
.knowledge-detail-block summary { min-height: 3rem; padding: .7rem .85rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; cursor: pointer; list-style: none; }
.knowledge-detail-block summary::-webkit-details-marker { display: none; }
.knowledge-detail-block summary strong { color: var(--ink); font-family: Georgia, "Times New Roman", serif; }
.knowledge-detail-block summary span { flex: 0 0 auto; color: var(--muted); font-size: .72rem; }
.knowledge-detail-block[open] summary { border-bottom: 1px solid var(--line); background: var(--surface-raised); }
.knowledge-detail-table-wrap { border: 0; border-radius: 0; }
.knowledge-detail-table { min-width: 34rem; font-size: .8rem; }
.knowledge-detail-table th, .knowledge-detail-table td { padding: .62rem .7rem; }
.knowledge-detail-limit { margin: 0; padding: .65rem .8rem; border-top: 1px solid var(--line); }
.knowledge-related-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.knowledge-related-topics a { min-width: 0; padding: .8rem .85rem; display: grid; gap: .25rem; color: var(--ink); border: 1px solid var(--line); border-radius: .45rem; background: rgb(7 16 13 / .35); text-decoration: none; }
.knowledge-related-topics a:hover { border-color: var(--gold); background: var(--surface-raised); }
.knowledge-related-topics strong { font-family: Georgia, "Times New Roman", serif; }
.knowledge-related-topics span { color: var(--muted); font-size: .75rem; line-height: 1.45; }

.knowledge-hub { width: min(86rem, calc(100% - 2rem)); }
.knowledge-hub-hero { min-height: 9rem; margin-bottom: 1.1rem; padding: 1rem 1.2rem; display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem; gap: 1rem; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: .65rem; background: radial-gradient(circle at 92% 35%, rgb(224 185 104 / .16), transparent 18rem), linear-gradient(135deg, #13251e, #08120e); }
.knowledge-hub-hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.knowledge-hub-hero p { max-width: 52rem; margin: .25rem 0 0; color: var(--ink-soft); }
.knowledge-hub-hero img { width: 7.5rem; height: 8.5rem; align-self: end; object-fit: contain; object-position: center bottom; }
.knowledge-hub-counts { margin-top: .7rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.knowledge-hub-counts span, .knowledge-hub-counts a { color: var(--muted); font-size: .72rem; text-decoration: none; }
.knowledge-hub-counts strong { color: var(--gold-soft); font-size: .92rem; }
.knowledge-core-guides, .knowledge-shelves { margin-bottom: 1.25rem; }
.knowledge-core-guide-grid { margin-top: .65rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.knowledge-core-guide { min-width: 0; min-height: 9rem; padding: .8rem; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: .5rem; background: rgb(7 16 13 / .42); }
.knowledge-core-guide > small { color: var(--gold); font-size: .59rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.knowledge-core-guide h3 { margin-top: .25rem; font-size: 1rem; }
.knowledge-core-guide h3 a { color: var(--ink); text-decoration: none; }
.knowledge-core-guide p { margin: .4rem 0 .65rem; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.knowledge-core-guide-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: .25rem .65rem; }
.knowledge-core-guide-links a { font-size: .67rem; }
.knowledge-shelf-grid { margin-top: .65rem; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.knowledge-shelf { min-width: 0; min-height: 7.3rem; padding: .7rem; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .55rem; align-items: start; color: var(--ink); border: 1px solid var(--line); border-radius: .5rem; background: rgb(9 20 16 / .72); text-align: left; box-shadow: none; }
.knowledge-shelf:hover { border-color: var(--gold); background: var(--surface-raised); transform: none; }
.knowledge-shelf-icon { width: 1.65rem; height: 1.65rem; color: var(--gold); }
.knowledge-shelf > span, .knowledge-shelf > span > span { min-width: 0; display: block; }
.knowledge-shelf strong { display: block; font-size: .76rem; }
.knowledge-shelf small { display: block; margin-top: .08rem; color: var(--gold-soft); font-size: .57rem; }
.knowledge-shelf > span > span { margin-top: .35rem; color: var(--muted); font-size: .63rem; line-height: 1.35; }
.knowledge-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.knowledge-topic-grid [data-directory-row][hidden], [data-directory-table][hidden] { display: none !important; }
.knowledge-topic-card { min-width: 0; min-height: 13rem; padding: .8rem; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: .5rem; background: rgb(7 16 13 / .42); }
.knowledge-topic-card-heading { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.knowledge-topic-card-heading span, .knowledge-topic-card-heading small { font-size: .58rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.knowledge-topic-card-heading span { color: var(--gold); }
.knowledge-topic-card-heading small { color: var(--muted); }
.knowledge-topic-card h3 { margin-top: .35rem; font-size: 1.08rem; }
.knowledge-topic-card h3 a { color: var(--ink); text-decoration: none; }
.knowledge-topic-card > small { margin-top: .55rem; color: var(--muted); font-size: .56rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.knowledge-topic-card p { margin: .2rem 0 .7rem; color: var(--ink-soft); font-size: .74rem; line-height: 1.5; }
.knowledge-topic-card footer { margin-top: auto; padding-top: .55rem; display: flex; flex-wrap: wrap; gap: .25rem .8rem; border-top: 1px solid rgb(68 91 81 / .45); }
.knowledge-topic-card footer a { font-size: .66rem; font-weight: 750; }
.knowledge-article-heading { margin-bottom: .65rem; padding-bottom: 1rem; display: grid; grid-template-columns: minmax(0, 1fr) 3.5rem; gap: 1rem; align-items: center; border-bottom: 1px solid var(--line); }
.knowledge-article-heading h1 { font-size: clamp(2rem, 5vw, 3.75rem); }
.knowledge-article-heading .page-intro { max-width: 64rem; margin-top: .35rem; color: var(--ink-soft); }
.knowledge-article-heading > span { width: 3.5rem; height: 3.5rem; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--line); border-radius: 50%; background: rgb(7 16 13 / .5); }
.knowledge-article-icon { width: 1.8rem; height: 1.8rem; }
.knowledge-article-nav { margin-bottom: .85rem; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: thin; }
.knowledge-article-nav a { flex: 0 0 auto; padding: .32rem .6rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; font-size: .68rem; text-decoration: none; }
.knowledge-article-nav a:hover { color: var(--ink); border-color: var(--gold); }

.plain-list { margin: .4rem 0 0; padding-left: 1.15rem; }
.plain-list li + li { margin-top: .25rem; }
.muted { color: var(--muted); }
.source-note { margin: 1rem 0 0; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }

.data-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: .75rem; }
.data-table { width: 100%; min-width: 42rem; border-collapse: collapse; background: rgb(14 25 21 / .7); }
.data-table th, .data-table td { padding: .75rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { color: var(--muted); background: var(--surface-raised); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }
.database-table td small { display: block; margin-top: .2rem; color: var(--muted); font-size: .68rem; }
.database-table .catalog-icon { width: 2rem; height: 2rem; flex-basis: 2rem; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .35rem; margin-top: 1.5rem; }
.pagination a, .pagination span { min-width: 2.4rem; min-height: 2.4rem; padding: .45rem .65rem; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); border-radius: .45rem; text-decoration: none; }
.pagination a[aria-current="page"] { color: #07100d; background: var(--gold); border-color: var(--gold-soft); }
.pagination a[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.pagination-summary { color: var(--muted); font-size: .8rem; text-align: center; }

.empty-state, .notice { padding: 1.4rem; }
.empty-state { min-height: 12rem; display: grid; align-content: center; justify-items: start; }
.empty-state p, .notice p { max-width: 48rem; color: var(--muted); }

.shared-hunts-page.hunts-page { width: min(78rem, calc(100% - 2rem)); padding-top: 1.65rem; }
.hunts-page-heading { margin-bottom: 1rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.hunts-page-heading h1 { font-size: clamp(1.8rem, 5vw, 2.55rem); }
.hunts-page-heading p { margin: .25rem 0 0; color: var(--muted); font-size: .84rem; }
.hunts-page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.hunts-page-actions .button { min-height: 2.35rem; padding: .5rem .7rem; }
.hunts-empty { min-height: 15rem; border: 1px solid var(--line); border-radius: .65rem; background: rgb(7 16 13 / .4); }

.templates-page { width: min(88rem, calc(100% - 2rem)); padding-top: 1.4rem; }
.templates-page-heading { margin-bottom: .55rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.templates-page-heading h1 { font-size: clamp(1.8rem, 5vw, 2.55rem); }
.templates-page-heading > div > p:last-child { margin: .25rem 0 0; color: var(--muted); font-size: .84rem; }
.templates-page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.templates-page-actions .button { min-height: 2.35rem; padding: .5rem .7rem; }
.template-page-status { min-height: 1.25rem; margin: 0 0 .5rem; color: var(--gold-soft); font-size: .72rem; }
.template-page-status.is-error { color: var(--danger); }
.account-template-workspace { display: grid; grid-template-columns: minmax(14rem, 17rem) minmax(0, 1fr); gap: .7rem; align-items: start; }
.account-template-workspace [hidden] { display: none !important; }
.account-template-characters,
.account-template-editor { min-width: 0; border: 1px solid var(--line-strong); border-radius: .7rem; background: rgb(8 18 14 / .72); box-shadow: 0 .55rem 1.5rem rgb(0 0 0 / .12); }
.account-template-characters { position: sticky; top: 4.8rem; max-height: calc(100dvh - 6rem); padding: .6rem; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: .55rem; }
.account-template-mobile-step,
.account-template-mobile-nav { display: none; }
.account-template-filter { display: grid; gap: .25rem; }
.account-template-filter span,
.account-template-toolbar label > span,
.account-template-search-row label > span,
.account-template-dialog label > span { color: var(--muted); font-size: .62rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.account-template-filter input,
.account-template-toolbar select,
.account-template-search-row input,
.account-template-dialog input[type="text"],
.account-template-dialog input[name="templateName"] { width: 100%; min-width: 0; min-height: 2.45rem; padding: .5rem .6rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .45rem; background: var(--surface); font: inherit; font-size: .76rem; }
.account-template-character-list { min-height: 0; display: grid; align-content: start; gap: .28rem; overflow: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.account-template-character-section { margin-top: .28rem; padding: .22rem .2rem .1rem; display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.account-template-character-section:first-child { margin-top: 0; }
.account-template-character-section strong { color: var(--ink-soft); font-size: .61rem; letter-spacing: .07em; text-transform: uppercase; }
.account-template-character-section:first-child strong { color: #92d3af; }
.account-template-character-section span { font-size: .6rem; font-variant-numeric: tabular-nums; }
.account-template-character { width: 100%; min-width: 0; min-height: 3.2rem; padding: .48rem .55rem; display: grid; gap: .25rem; color: var(--ink); border: 1px solid var(--line); border-radius: .48rem; background: rgb(13 27 21 / .72); font: inherit; text-align: left; cursor: pointer; }
.account-template-character:hover { border-color: rgb(204 166 90 / .42); background: rgb(25 45 37 / .68); }
.account-template-character.is-selected { border-color: rgb(204 166 90 / .7); background: rgb(204 166 90 / .12); box-shadow: inset 3px 0 0 var(--gold); }
.account-template-character-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.account-template-character-heading strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.account-template-presence { flex: 0 0 auto; color: var(--muted); font-size: .56rem; font-weight: 800; text-transform: uppercase; }
.account-template-presence::before { content: ''; width: .42rem; height: .42rem; margin-right: .28rem; display: inline-block; border-radius: 999px; background: #56635d; }
.account-template-presence.is-online { color: #92d3af; }
.account-template-presence.is-online::before { background: #59bd82; box-shadow: 0 0 .4rem rgb(89 189 130 / .55); }
.account-template-character-detail { overflow: hidden; color: var(--muted); font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
.account-template-list-empty { margin: .5rem; color: var(--muted); font-size: .72rem; }
.account-template-editor { overflow: hidden; }
.account-template-editor-heading { padding: .72rem .8rem; display: flex; align-items: end; justify-content: space-between; gap: .8rem; border-bottom: 1px solid var(--line); background: rgb(15 29 24 / .94); }
.account-template-editor-heading h2 { font-size: 1.25rem; }
.account-template-toolbar { min-width: 0; display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: .38rem; }
.account-template-toolbar > label:not(.account-template-default-toggle) { min-width: 10rem; display: grid; gap: .22rem; }
.account-template-toolbar .button { min-height: 2.45rem; padding: .48rem .62rem; white-space: nowrap; }
.account-template-default-toggle { min-height: 2.45rem; padding: .42rem .58rem; display: inline-flex; align-items: center; gap: .45rem; color: var(--ink-soft); border: 1px solid var(--line-strong); border-radius: .45rem; background: var(--surface); font-size: .7rem; font-weight: 750; cursor: pointer; }
.account-template-default-toggle input { width: 1rem; height: 1rem; accent-color: var(--moss-bright); }
.account-template-default-toggle:has(input:checked) { color: var(--gold-soft); border-color: rgb(204 166 90 / .55); background: rgb(204 166 90 / .09); }
.account-template-search-row { padding: .52rem .8rem; display: flex; align-items: end; justify-content: space-between; gap: .7rem; border-bottom: 1px solid var(--line); background: rgb(8 18 14 / .64); }
.account-template-search-row label { width: min(25rem, 100%); display: grid; gap: .22rem; }
.account-template-search-row > div { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .68rem; white-space: nowrap; }
.account-template-search-row .button { min-height: 2.3rem; padding: .4rem .55rem; }
.account-template-tabs { padding: .55rem .8rem 0; display: flex; gap: .35rem; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.account-template-tab { min-height: 2.35rem; margin-bottom: -1px; padding: .42rem .62rem; flex: 0 0 auto; display: inline-flex; align-items: center; gap: .42rem; color: var(--muted); border: 1px solid transparent; border-bottom-color: var(--line); border-radius: .45rem .45rem 0 0; background: transparent; font: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; }
.account-template-tab:hover { color: var(--ink); background: rgb(25 45 37 / .55); }
.account-template-tab.is-active { color: var(--ink); border-color: var(--line-strong); border-bottom-color: #0d1b15; background: rgb(16 31 25 / .98); }
.account-template-tab small { min-width: 1.2rem; padding: .08rem .3rem; color: inherit; border-radius: 999px; background: rgb(255 255 255 / .06); font-size: .56rem; text-align: center; }
.account-template-settings { padding: .7rem .8rem 4.7rem; }
.account-template-settings-empty { padding: 2rem 1rem; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: .55rem; font-size: .76rem; text-align: center; }
.account-template-setting-panel { display: grid; gap: .65rem; }
.account-template-setting-section { overflow: hidden; border: 1px solid var(--line); border-radius: .55rem; background: rgb(12 24 19 / .5); }
.account-template-setting-section-heading { padding: .52rem .62rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--line); background: rgb(18 35 28 / .62); }
.account-template-setting-section-heading strong { color: var(--ink-soft); font-size: .67rem; letter-spacing: .045em; text-transform: uppercase; }
.account-template-setting-section-heading span { color: var(--muted); font-size: .6rem; }
.account-template-setting-section > p { margin: 0; padding: .5rem .62rem 0; color: var(--muted); font-size: .66rem; }
.account-template-setting-grid { padding: .55rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.account-template-setting { min-width: 0; min-height: 4rem; padding: .52rem .58rem; display: grid; align-content: start; gap: .42rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--surface); }
.account-template-setting > span { min-width: 0; display: grid; }
.account-template-setting strong { overflow-wrap: anywhere; font-size: .72rem; }
.account-template-setting small { margin-top: .08rem; overflow: hidden; color: var(--muted); font-size: .52rem; text-overflow: ellipsis; white-space: nowrap; }
.account-template-setting input[type="text"],
.account-template-setting input[type="number"],
.account-template-setting select,
.account-template-setting textarea { width: 100%; min-width: 0; padding: .45rem .52rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .4rem; background: rgb(7 16 13 / .82); font: inherit; font-size: .72rem; }
.account-template-setting textarea { resize: vertical; line-height: 1.45; }
.account-template-setting.is-boolean { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.account-template-setting.is-boolean input { width: 1.15rem; height: 1.15rem; accent-color: var(--moss-bright); }
.account-template-save-bar { position: sticky; bottom: 0; z-index: 3; min-height: 4rem; margin-top: -4rem; padding: .62rem .8rem; display: flex; align-items: center; justify-content: space-between; gap: .7rem; border-top: 1px solid var(--line-strong); background: rgb(10 21 17 / .96); box-shadow: 0 -.7rem 1.4rem rgb(0 0 0 / .18); }
.account-template-save-bar > span { color: var(--muted); font-size: .66rem; }
.account-template-save-bar > span.is-dirty { color: var(--gold-soft); }
.account-template-save-bar > div { display: flex; gap: .4rem; }
.account-template-save-bar .button { min-height: 2.4rem; padding: .46rem .7rem; }
.account-template-workspace button:disabled,
.account-template-workspace select:disabled,
.account-template-workspace input:disabled { cursor: not-allowed; opacity: .5; }
.account-template-dialog { width: min(30rem, calc(100% - 1rem)); padding: 0; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .75rem; background: #0c1713; box-shadow: 0 1.5rem 4rem rgb(0 0 0 / .62); }
.account-template-dialog::backdrop { background: rgb(2 7 5 / .8); backdrop-filter: blur(3px); }
.account-template-dialog-shell { padding: 1rem; display: grid; gap: .85rem; }
.account-template-dialog h2 { font-size: 1.35rem; }
.account-template-dialog p { margin: .18rem 0 0; color: var(--muted); font-size: .72rem; }
.account-template-dialog label:not(.account-template-copy-option) { display: grid; gap: .25rem; }
.account-template-copy-option { padding: .6rem; display: flex; align-items: center; gap: .55rem; border: 1px solid var(--line); border-radius: .45rem; font-size: .74rem; }
.account-template-copy-option input { width: 1.1rem; height: 1.1rem; accent-color: var(--moss-bright); }
.account-template-dialog-actions { display: flex; justify-content: flex-end; gap: .4rem; }
.hunt-directory { min-width: 0; }
.hunt-directory-tabs { margin-bottom: .65rem; display: flex; align-items: stretch; gap: .35rem; border-bottom: 1px solid var(--line); }
.hunt-directory-tab { min-height: 2.75rem; margin-bottom: -1px; padding: .55rem .8rem; flex: 1 1 0; max-width: 16rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; color: var(--muted); border: 1px solid transparent; border-bottom-color: var(--line); border-radius: .55rem .55rem 0 0; background: transparent; font: inherit; font-size: .78rem; font-weight: 700; text-align: left; cursor: pointer; }
.hunt-directory-tab:hover { color: var(--ink); background: rgb(18 35 29 / .55); }
.hunt-directory-tab[aria-selected="true"] { color: var(--ink); border-color: var(--line-strong); border-bottom-color: #101b17; background: rgb(15 29 24 / .96); }
.hunt-directory-tab:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.hunt-directory-tab strong { min-width: 1.55rem; padding: .15rem .42rem; color: var(--gold-soft); border-radius: 999px; background: rgb(204 166 90 / .12); font-size: .68rem; line-height: 1.2; text-align: center; }
.hunt-directory-section { min-width: 0; }
.hunt-directory-section[hidden] { display: none; }
.hunt-directory-description { margin: 0 0 .55rem; padding: 0 .15rem; color: var(--muted); font-size: .7rem; }
.hunt-directory-empty { min-height: 9rem; padding: 1rem; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); border-radius: .65rem; background: rgb(7 16 13 / .4); font-size: .78rem; }
.hunt-list { display: grid; gap: .55rem; }
.hunt-list-section-heading { margin-top: .45rem; padding: .25rem .15rem .1rem; display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; color: var(--muted); }
.hunt-list-section-heading:first-child { margin-top: 0; }
.hunt-list-section-heading strong { font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; }
.hunt-list-section-heading span { font-size: .62rem; }
.hunt-list-section-heading.is-online strong { color: #92d3af; }
.hunt-list-section-heading.is-unavailable strong { color: var(--danger); }
.hunt-workspace { min-width: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: .65rem; background: rgb(7 16 13 / .68); box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .15); }
.hunt-workspace.is-active { border-color: rgb(78 133 100 / .72); }
.hunt-workspace.has-error { border-color: rgb(202 103 90 / .7); }
.hunt-workspace-summary { position: relative; width: 100%; min-height: 4.7rem; padding: .6rem .75rem; display: grid; grid-template-columns: minmax(14rem, 1.25fr) minmax(8rem, 1fr) auto 1rem; align-items: center; gap: .8rem; color: var(--ink); border: 0; border-radius: 0; background: rgb(15 29 24 / .88); text-align: left; cursor: pointer; }
.hunt-workspace-summary:hover { background: rgb(21 39 32 / .94); }
.hunt-workspace-summary:focus-visible { z-index: 2; outline: 2px solid var(--gold-soft); outline-offset: -2px; }
.hunt-workspace.is-expanded .hunt-workspace-summary { background: rgb(18 35 29 / .96); }
.hunt-workspace-title { min-width: 0; display: flex; align-items: center; gap: .65rem; }
.hunt-workspace-copy { min-width: 0; display: grid; }
.hunt-workspace-name { overflow-wrap: anywhere; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 1.05rem; }
.hunt-workspace-copy [data-hunt-workspace-summary] { margin-top: .12rem; overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.hunt-workspace-member-names { margin-top: .08rem; overflow: hidden; color: var(--ink-soft); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.hunt-workspace-state { width: .65rem; height: .65rem; flex: 0 0 .65rem; border: 1px solid var(--line-strong); border-radius: 999px; background: #3d4944; box-shadow: 0 0 0 .2rem rgb(255 255 255 / .025); }
.hunt-workspace-state.is-active { border-color: #8fdeb1; background: #59bd82; box-shadow: 0 0 .7rem rgb(89 189 130 / .55); }
.hunt-summary-members { min-width: 0; min-height: 2.65rem; padding: .08rem .2rem; display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; }
.hunt-summary-members::-webkit-scrollbar { display: none; }
.hunt-summary-members-loading { color: var(--muted); font-size: .68rem; }
.hunt-character-avatar.hunt-summary-avatar { width: 2.55rem; height: 2.55rem; flex: 0 0 2.55rem; border-radius: 999px; font-size: .82rem; box-shadow: 0 0 0 2px #0f1d18; }
.hunt-character-avatar.hunt-summary-avatar + .hunt-summary-avatar { margin-left: -.42rem; }
.hunt-summary-avatar .hunt-character-presence { right: .05rem; bottom: .05rem; width: .48rem; height: .48rem; }
.hunt-summary-exp { min-width: 5.5rem; display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
.hunt-summary-exp strong { color: #a8dfbf; font-size: 1rem; }
.hunt-summary-exp small { margin-top: .05rem; color: var(--muted); font-size: .55rem; text-transform: uppercase; letter-spacing: .04em; }
.hunt-summary-chevron { width: .55rem; height: .55rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-.08rem, -.08rem); transition: transform .16s ease; }
.hunt-workspace.is-expanded .hunt-summary-chevron { transform: rotate(225deg) translate(-.08rem, -.08rem); }
.hunt-workspace-panel { width: min(72rem, calc(100% - 2rem)); max-height: min(52rem, calc(100dvh - 2rem)); padding: 0; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .8rem; background: #0c1713; box-shadow: 0 1.5rem 4rem rgb(0 0 0 / .62); overflow: hidden; }
.hunt-workspace-panel::backdrop { background: rgb(2 7 5 / .8); backdrop-filter: blur(3px); }
.hunt-workspace-dialog-shell { max-height: min(52rem, calc(100dvh - 2rem)); display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.hunt-workspace-dialog-heading { padding: .85rem 1rem .75rem; display: flex; align-items: start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); background: rgb(15 29 24 / .96); }
.hunt-workspace-dialog-heading h2 { font-size: 1.25rem; }
.hunt-workspace-dialog-heading p { margin: .15rem 0 0; color: var(--muted); font-size: .7rem; }
.hunt-workspace-dialog-close { width: 2.1rem; height: 2.1rem; flex: 0 0 2.1rem; display: grid; place-items: center; padding: 0; color: var(--muted); border: 1px solid var(--line); border-radius: .45rem; background: var(--surface); font: 1.25rem/1 Inter, ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
.hunt-workspace-dialog-close:hover { color: var(--ink); border-color: var(--line-strong); }
.hunt-workspace-panel-bar { min-height: 2.9rem; padding: .45rem .85rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: rgb(9 19 15 / .65); }
.hunt-workspace-links { display: flex; flex: 0 0 auto; gap: .35rem; }
.hunt-workspace-links .button,
.hunt-workspace .button { min-height: 2.2rem; padding: .43rem .62rem; font-size: .7rem; white-space: nowrap; }
.hunt-workspace-status { min-height: 0; margin: 0; color: var(--gold-soft); font-size: .72rem; }
.hunt-workspace-status.is-error,
.hunt-workspace-empty.is-error { color: var(--danger); }
.hunt-workspace-content { min-height: 0; padding: .7rem .85rem .85rem; display: grid; align-content: start; gap: .75rem; overflow: auto; }
.hunt-workspace-loading,
.hunt-workspace-empty { padding: .9rem; color: var(--muted); border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); font-size: .78rem; }
.hunt-team-controls { display: grid; gap: .65rem; }
.hunt-team-controls-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.hunt-team-controls-heading > strong { font-size: .78rem; text-transform: uppercase; letter-spacing: .055em; }
.hunt-team-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.hunt-workspace .button-danger { color: #1a0806; border-color: #f2a497; background: var(--danger); }
.hunt-workspace button:disabled,
.hunt-workspace select:disabled { cursor: wait; opacity: .55; }
.hunt-runtime-settings { padding-top: .65rem; display: grid; grid-template-columns: minmax(13rem, .85fr) minmax(16rem, 1.15fr); gap: .55rem; border-top: 1px solid var(--line); }
.hunt-keep-going { min-width: 0; padding: .55rem .65rem; display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface); cursor: pointer; }
.hunt-keep-going input { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; accent-color: var(--moss-bright); }
.hunt-keep-going > span { min-width: 0; display: grid; }
.hunt-keep-going strong { font-size: .76rem; }
.hunt-keep-going small { color: var(--muted); font-size: .62rem; }
.hunt-route-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
.hunt-route-control select,
.hunt-oak-entry input { width: 100%; min-width: 0; min-height: 2.2rem; padding: .43rem .58rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .45rem; background: var(--surface); font-size: .72rem; }
.hunt-roster { min-width: 0; }
.hunt-roster-heading { margin-bottom: .45rem; display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.hunt-roster-heading h3 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .8rem; text-transform: uppercase; letter-spacing: .055em; }
.hunt-roster-heading span { color: var(--muted); font-size: .65rem; }
.hunt-character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: .45rem; }
.hunt-character { min-width: 0; padding: .55rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .65rem; border: 1px solid var(--line); border-radius: .52rem; background: var(--surface); }
.hunt-character-identity { min-width: 0; display: grid; grid-template-columns: 4rem minmax(0, 1fr); align-items: center; gap: .65rem; }
.hunt-character-avatar { position: relative; width: 4rem; height: 4rem; display: grid; place-items: center; overflow: hidden; color: var(--gold-soft); border: 1px solid var(--line-strong); border-radius: .45rem; background: radial-gradient(circle at 50% 35%, #203c31, #0a1410 72%); font-family: Georgia, serif; font-size: 1.25rem; font-weight: 800; }
.hunt-character-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.hunt-character-avatar.has-image .hunt-character-avatar-fallback { visibility: hidden; }
.hunt-character-presence { position: absolute; right: .22rem; bottom: .22rem; z-index: 2; width: .58rem; height: .58rem; border: 2px solid #0b1511; border-radius: 999px; background: #66736d; }
.hunt-character-avatar.is-online .hunt-character-presence,
.hunt-character-avatar.is-running .hunt-character-presence { background: #59bd82; box-shadow: 0 0 .45rem rgb(89 189 130 / .7); }
.hunt-character-avatar.is-busy .hunt-character-presence { background: var(--gold-soft); }
.hunt-character-copy { min-width: 0; }
.hunt-character-name { min-width: 0; display: flex; align-items: center; gap: .4rem; }
.hunt-character-name strong { overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.hunt-character-leader { padding: .12rem .32rem; color: #10170f; border-radius: 999px; background: var(--gold-soft); font-size: .52rem; font-weight: 800; text-transform: uppercase; }
.hunt-character-location { margin-top: .12rem; display: block; overflow: hidden; color: var(--muted); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.hunt-character-facts { margin-top: .32rem; display: flex; flex-wrap: wrap; gap: .2rem .55rem; color: var(--ink-soft); font-size: .62rem; }
.hunt-character-rate { color: #92d3af; }
.hunt-character-side { min-width: 5.2rem; display: grid; justify-items: end; gap: .35rem; }
.hunt-character-status { font-size: .62rem; font-weight: 750; }
.hunt-character-status.is-online,
.hunt-character-status.is-running { color: #92d3af; }
.hunt-character-status.is-busy { color: var(--gold-soft); }
.hunt-character-status.is-offline { color: var(--muted); }
.hunt-character-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.hunt-character-actions .button { min-height: 1.95rem; padding: .35rem .48rem; font-size: .63rem; }
.hunt-manage-dialog {
    width: min(34rem, calc(100% - 1.5rem));
    max-height: min(48rem, calc(100dvh - 1.5rem));
    padding: 0;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: .8rem;
    background: #0c1713;
    box-shadow: 0 1.5rem 4rem rgb(0 0 0 / .58);
    overflow: hidden;
}
.hunt-manage-dialog::backdrop { background: rgb(2 7 5 / .78); backdrop-filter: blur(3px); }
.hunt-manage-shell { max-height: min(48rem, calc(100dvh - 1.5rem)); display: flex; flex-direction: column; }
.hunt-manage-heading {
    padding: 1rem 1rem .85rem;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
}
.hunt-manage-heading h2 { margin-top: .15rem; font-size: clamp(1.3rem, 4vw, 1.7rem); }
.hunt-manage-heading p { margin: .3rem 0 0; color: var(--muted); font-size: .8rem; }
.hunt-manage-close {
    width: 2.35rem;
    min-height: 2.35rem;
    flex: 0 0 2.35rem;
    padding: 0;
    color: var(--ink);
    border-color: var(--line-strong);
    border-radius: 999px;
    background: var(--surface-raised);
    font-size: 1.35rem;
}
.hunt-manage-status { min-height: 1.95rem; margin: 0; padding: .55rem 1rem 0; color: var(--gold-soft); font-size: .78rem; }
.hunt-manage-status.is-error,
.hunt-manage-empty.is-error { color: var(--danger); }
.hunt-manage-content { padding: .35rem 1rem 1rem; display: grid; gap: .85rem; overflow-y: auto; }
.hunt-manage-loading,
.hunt-manage-empty { padding: 1rem; color: var(--muted); border: 1px solid var(--line); border-radius: .6rem; background: rgb(7 16 13 / .4); }
.hunt-manage-dialog .button { min-height: 2.45rem; padding: .55rem .7rem; font-size: .76rem; }
.hunt-manage-dialog button:disabled { cursor: wait; opacity: .58; }
.hunt-oak-entry > label { display: grid; gap: .3rem; color: var(--muted); font-size: .7rem; font-weight: 750; }
.hunt-oak-content { gap: .65rem; }
.hunt-oak-description { margin: 0; color: var(--ink-soft); white-space: pre-wrap; }
.hunt-oak-options { display: grid; gap: .45rem; }
.hunt-oak-options .button { width: 100%; justify-content: flex-start; text-align: left; line-height: 1.25; }
.hunt-oak-entry { display: grid; gap: .65rem; }
.notice { border-left: .25rem solid var(--gold); }
.notice-danger { border-left-color: var(--danger); }
.reference-note { margin-bottom: .75rem; padding: 0; overflow: hidden; }
.reference-note summary { min-height: 3rem; padding: .65rem .85rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; }
.reference-note summary strong,
.reference-note summary span { display: block; }
.reference-note summary span { color: var(--muted); font-size: .72rem; }
.reference-note p { margin: 0; padding: 0 .85rem .8rem; }

.search-page { width: min(72rem, calc(100% - 2rem)); }
.search-page-heading { margin-bottom: 1.2rem; }
.search-workspace { position: relative; z-index: 3; margin-bottom: 2rem; padding: .9rem; }
.search-query-row {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: .65rem;
    background: var(--surface);
}
.search-query-row > .site-icon { margin-left: .9rem; }
.search-query-row input[type="search"] { width: 100%; min-width: 0; min-height: 3.25rem; padding: .75rem; color: var(--ink); border: 0; background: transparent; }
.search-query-row button { min-height: 3.25rem; border: 0; border-radius: 0 .6rem .6rem 0; padding-inline: 1.25rem; }
.search-filter-fieldset { margin: .85rem 0 0; padding: .8rem 0 0; border: 0; border-top: 1px solid var(--line); }
.search-filter-heading { margin-bottom: .65rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.search-filter-heading > strong { color: var(--ink-soft); font-size: .8rem; font-weight: 750; }
.search-filter-heading > div { display: inline-flex; align-items: center; gap: .35rem; }
.search-filter-action { min-height: 1.9rem; padding: .3rem .5rem; color: var(--muted); border-color: var(--line); background: transparent; font-size: .68rem; }
.search-filter-action:hover { color: var(--ink); background: var(--surface-raised); }
.search-types { display: flex; flex-wrap: wrap; gap: .45rem; }
.search-types label { position: relative; display: inline-flex; align-items: center; gap: .35rem; padding: .42rem .62rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: rgb(12 23 19 / .55); cursor: pointer; font-size: .76rem; font-weight: 650; user-select: none; }
.search-types label:hover { color: var(--ink-soft); border-color: var(--line-strong); }
.search-types label:has(input:checked) { color: var(--ink); border-color: rgb(224 185 104 / .55); background: rgb(224 185 104 / .1); }
.search-types input { width: .9rem; height: .9rem; margin: 0; accent-color: var(--gold); }
.search-types .site-icon { width: .9rem; height: .9rem; color: var(--gold-soft); }
.search-types-compact { gap: .3rem; }
.search-types-compact label { padding: .28rem .45rem; font-size: .67rem; }
.search-types-compact input { width: .8rem; height: .8rem; }
.search-types-compact .site-icon { width: .78rem; height: .78rem; }
.search-start { margin-top: 1.5rem; }
.search-start .section-heading > span,
.search-results-heading > span { color: var(--muted); font-size: .75rem; }
.search-start-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.search-start-grid a { min-width: 0; padding: .9rem; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .75rem; color: var(--ink); border: 1px solid var(--line); border-radius: .65rem; background: var(--surface); text-decoration: none; }
.search-start-grid a:hover { color: var(--ink); border-color: var(--gold-soft); background: var(--surface-raised); }
.search-start-grid .nav-item-icon { width: 2.25rem; height: 2.25rem; border-radius: .55rem; background: rgb(224 185 104 / .1); }
.search-start-grid .site-icon { width: 1.2rem; height: 1.2rem; }
.search-start-grid strong,
.search-start-grid small { display: block; }
.search-start-grid small { margin-top: .15rem; color: var(--muted); font-size: .7rem; }
.search-results-section { margin-top: 1rem; }
.search-results-list { padding-block: .15rem; }
.search-result { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .85rem .2rem; border-bottom: 1px solid var(--line); }
.search-result:last-child { border-bottom: 0; }
.search-result-icon { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; color: var(--gold-soft); border: 1px solid var(--line); border-radius: .6rem; background: var(--surface); }
.search-result-icon .site-icon { width: 1.15rem; height: 1.15rem; }
.search-result .badge { margin-bottom: .22rem; padding: 0; color: var(--gold); border: 0; background: transparent; font-size: .6rem; }
.search-result h3 { font-size: 1.08rem; }
.search-result a { color: var(--ink); text-decoration: none; }
.search-result a::after { content: ''; position: absolute; inset: 0; }
.search-result { position: relative; }
.search-result p { margin-top: .18rem; color: var(--muted); font-size: .76rem; }
.search-result-arrow { padding-right: .35rem; color: var(--muted); transition: transform .15s ease, color .15s ease; }
.search-result:hover .search-result-arrow { color: var(--gold); transform: translateX(.2rem); }
.search-suggestions {
    position: absolute;
    z-index: 30;
    top: calc(100% + .2rem);
    left: 0;
    right: 0;
    max-height: min(28rem, 65vh);
    overflow-y: auto;
    color: var(--ink);
    background: #0d1814;
    border: 1px solid var(--line-strong);
    border-radius: .35rem;
    box-shadow: var(--shadow);
}
.search-suggestions[hidden] { display: none; }
.search-suggestions a {
    padding: .55rem .7rem;
    display: grid;
    grid-template-columns: 5.2rem minmax(0, 1fr);
    align-items: center;
    gap: .65rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}
.search-suggestions a:last-child { border-bottom: 0; }
.search-suggestions a:hover,
.search-suggestions a[aria-selected="true"] { color: var(--ink); background: var(--surface-raised); }
.search-suggestion-type { color: var(--gold); font-size: .67rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.search-suggestions strong,
.search-suggestions small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggestions strong { font-size: .9rem; }
.search-suggestions small { margin-top: .05rem; color: var(--muted); font-size: .72rem; }
.search-suggestion-empty { margin: 0; padding: .75rem; color: var(--muted); font-size: .82rem; }
.search-suggestions .search-suggestion-all { padding: .65rem .75rem; display: flex; grid-template-columns: none; justify-content: space-between; gap: 1rem; color: var(--ink-soft); background: rgb(224 185 104 / .07); font-size: .72rem; }
.search-suggestions .search-suggestion-all strong { color: var(--gold-soft); font-family: inherit; font-size: .72rem; white-space: nowrap; }

.map-detail-page {
    width: min(100rem, calc(100% - 2rem));
    padding-top: 1.5rem;
}
.map-detail-page > .breadcrumb { margin-bottom: .65rem; }
.map-heading-grid {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    display: grid;
    grid-template-columns: minmax(34rem, .9fr) minmax(40rem, 1.1fr);
    align-items: stretch;
    gap: 1.25rem;
    border-bottom: 1px solid var(--line);
}
.map-heading-grid .detail-header {
    margin: 0;
    padding: .25rem 0;
    align-self: center;
    border: 0;
}
.map-heading-grid .detail-header h1 { font-size: clamp(2.15rem, 3.5vw, 3.45rem); }
.map-heading-grid .page-intro { margin-top: .6rem; font-size: clamp(.95rem, 1.5vw, 1.12rem); }

.map-picker {
    margin: 0;
    padding: .85rem 1rem;
    display: grid;
    grid-template-columns: minmax(12rem, .7fr) minmax(24rem, 1.3fr);
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--line);
    background: var(--surface);
}
.map-picker h2 { font-family: inherit; font-size: 1rem; }
.map-picker p { margin: .2rem 0 0; color: var(--muted); font-size: .8rem; }
.map-picker form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .4rem .55rem; }
.map-picker label { color: var(--muted); font-size: .7rem; font-weight: 750; }
.map-picker label { grid-column: 1; grid-row: 1; }
.map-picker-status { grid-column: 2; grid-row: 1; color: var(--muted); font-size: .68rem; text-align: right; }
.map-picker input { grid-column: 1; grid-row: 2; }
.map-picker button { grid-column: 2; grid-row: 2; white-space: nowrap; }
.map-picker select { grid-column: 1 / -1; grid-row: 3; height: 8.75rem; }
.map-picker input,
.map-picker select {
    width: 100%;
    min-width: 0;
    min-height: 2.75rem;
    padding: .55rem .7rem;
    color: var(--ink);
    background: #0b1511;
    border: 1px solid var(--line-strong);
    border-radius: .35rem;
}
.map-picker input[aria-invalid="true"] { border-color: var(--danger); }
.map-picker select option { padding: .22rem .35rem; }
.map-picker select option:checked { color: #09110e; background: var(--gold-soft); }
.map-picker select option:disabled { color: var(--gold-soft); }

.map-visual-panel { margin-bottom: 1rem; padding: .8rem; }
.map-visual-panel .section-heading { margin-bottom: .65rem; }
.map-visual-panel .section-heading h2 { font-size: 1.2rem; }
.map-visual-panel .section-heading p { margin-top: .2rem; font-size: .82rem; }
.map-viewer-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.map-viewer-stats span { padding: .3rem .5rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: rgb(7 16 13 / .42); font-size: .65rem; white-space: nowrap; }
.map-viewer-stats strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.map-viewer { position: relative; }
.map-viewer-toolbar {
    position: absolute;
    z-index: 2;
    top: .65rem;
    right: .65rem;
    min-height: 2.75rem;
    padding: .35rem;
    display: flex;
    align-items: center;
    justify-content: end;
    gap: .35rem;
    border: 1px solid var(--line-strong);
    border-radius: .45rem;
    background: rgb(11 21 17 / .94);
    box-shadow: 0 .4rem 1.2rem rgb(0 0 0 / .28);
    backdrop-filter: blur(8px);
}
.map-viewer-toolbar button { min-width: 2.25rem; min-height: 2.15rem; padding: .35rem .6rem; }
.map-viewer-toolbar [data-map-fullscreen] { margin-left: .1rem; }
.map-viewer-toolbar output { min-width: 4.25rem; color: var(--muted); font-size: .75rem; text-align: center; font-variant-numeric: tabular-nums; }
.map-viewport {
    position: relative;
    height: clamp(26rem, calc(100vh - 18.5rem), 52rem);
    overflow: hidden;
    background-color: #050a08;
    background-image: linear-gradient(45deg, rgb(255 255 255 / .025) 25%, transparent 25%), linear-gradient(-45deg, rgb(255 255 255 / .025) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgb(255 255 255 / .025) 75%), linear-gradient(-45deg, transparent 75%, rgb(255 255 255 / .025) 75%);
    background-size: 1.5rem 1.5rem;
    background-position: 0 0, 0 .75rem, .75rem -.75rem, -.75rem 0;
    border: 1px solid var(--line-strong);
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.map-viewport[data-dragging="true"] { cursor: grabbing; }
.map-viewer:fullscreen { width: 100%; height: 100%; padding: .75rem; background: #050a08; }
.map-viewer:fullscreen::backdrop { background: #050a08; }
.map-viewer:fullscreen .map-viewport { height: 100%; min-height: 0; }
.map-stage { position: absolute; top: 0; left: 0; width: max-content; transform-origin: 0 0; will-change: transform; }
.map-render { display: block; max-width: none; height: auto; pointer-events: none; image-rendering: pixelated; }
.map-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.map-overlay .map-point-link { pointer-events: auto; }
.map-overlay .map-exit { stroke-width: 5; }
.map-overlay .map-waypoint { stroke-width: 4; }
.map-arrival { fill: rgb(165 216 255 / .28); stroke: var(--focus); stroke-width: 6; vector-effect: non-scaling-stroke; }
.map-viewer + .map-legend small { margin-left: auto; }

.map-schematic-panel { margin-bottom: 1rem; padding: .9rem; }
.map-render-status { display: inline-flex; margin-bottom: .35rem; padding: .18rem .45rem; color: var(--gold-soft); border: 1px solid #725d35; border-radius: 999px; background: rgb(224 185 104 / .08); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.map-explorer { position: relative; height: clamp(13rem, 42vh, 26rem); overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: .75rem; background: radial-gradient(circle at center, #1f352b, #0b1511 68%); }
.map-canvas { display: block; width: 100%; height: 100%; }
.map-grid-line { stroke: rgb(141 180 155 / .1); stroke-width: .15; vector-effect: non-scaling-stroke; }
.map-boundary { fill: rgb(18 35 28 / .75); stroke: #486c5d; stroke-width: .35; vector-effect: non-scaling-stroke; }
.map-exit { fill: var(--gold); stroke: #fff0c6; stroke-width: .5; vector-effect: non-scaling-stroke; }
.map-waypoint { fill: var(--moss-bright); stroke: #e7fff0; stroke-width: .4; vector-effect: non-scaling-stroke; }
.map-point-link:hover .map-exit, .map-point-link:focus .map-exit { fill: #fff1c9; }
.map-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .75rem; color: var(--muted); font-size: .8rem; }
.map-legend span::before { content: ""; display: inline-block; width: .7rem; aspect-ratio: 1; margin-right: .35rem; background: var(--gold); border-radius: 50%; }
.map-legend .waypoint::before { background: var(--moss-bright); }
.map-legend .arrival::before { background: var(--focus); }
.map-detail-page > .detail-layout { grid-template-columns: minmax(0, 2.4fr) minmax(20rem, 1fr); }

.dress-up-page { width: min(94rem, calc(100% - 2rem)); }
.dress-up-page button { min-height: 2.25rem; padding: .42rem .68rem; border-radius: .42rem; font-size: .78rem; }
.dress-up-hero {
    margin-bottom: 1rem;
    padding: 1.15rem 1.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(25rem, .8fr);
    gap: 1.5rem;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: .8rem;
    background:
        radial-gradient(circle at 82% 25%, rgb(224 185 104 / .1), transparent 32%),
        linear-gradient(135deg, rgb(23 39 33 / .96), rgb(11 21 17 / .96));
    overflow: hidden;
}
.dress-up-hero h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.dress-up-hero p { max-width: 46rem; margin: .45rem 0 0; color: #c5d3cd; font-size: .95rem; }
.dress-up-hero .eyebrow { margin-bottom: .35rem; }
.dress-up-hero-metrics { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-strong); border-radius: .65rem; background: rgb(5 12 9 / .46); overflow: hidden; }
.dress-up-hero-metrics div { min-width: 0; padding: .65rem .45rem; text-align: center; }
.dress-up-hero-metrics div + div { border-left: 1px solid var(--line); }
.dress-up-hero-metrics dt { color: var(--gold-soft); font-size: 1.1rem; font-weight: 850; line-height: 1.15; }
.dress-up-hero-metrics dd { margin: .15rem 0 0; color: var(--muted); font-size: .61rem; letter-spacing: .04em; text-transform: uppercase; }
.dress-up-layout { display: grid; grid-template-columns: minmax(23rem, 29rem) minmax(0, 1fr); gap: 1rem; align-items: start; }
.dress-up-preview,
.dress-up-wardrobe,
.dress-up-note { min-width: 0; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); box-shadow: 0 .7rem 2rem rgb(0 0 0 / .13); }
.dress-up-preview { position: sticky; top: 5.4rem; padding: .85rem; }
.dress-up-preview-heading,
.dress-up-wardrobe-heading { min-height: 2.35rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.dress-up-preview-heading h2,
.dress-up-wardrobe-heading h2 { font-family: inherit; font-size: 1.05rem; }
.dress-up-kicker { display: block; color: var(--gold); font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dress-up-preview-heading output { max-width: 11rem; padding: .24rem .42rem; color: #bdd5c9; border: 1px solid var(--line); border-radius: 999px; background: #09140f; font-size: .64rem; line-height: 1.25; text-align: right; }
.dress-up-wardrobe-heading small { display: block; margin-top: .12rem; color: var(--muted); font-size: .67rem; }
.dress-up-stage {
    --scene-accent: #9bd5a7;
    position: relative;
    height: clamp(18rem, 42vh, 24rem);
    min-height: 0;
    margin-top: .65rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: .65rem;
    background: radial-gradient(circle at 50% 68%, #2c493a, #14271f 46%, #07100d 100%);
    isolation: isolate;
}
.dress-up-stage[data-dress-up-background="moss"] { --scene-accent: #a8e1a9; border-color: #385f4b; background: linear-gradient(rgb(7 16 13 / .12), rgb(7 16 13 / .72)), repeating-linear-gradient(90deg, transparent 0 2.9rem, rgb(208 226 181 / .045) 3rem), radial-gradient(circle at 50% 68%, #355a46, #14271f 48%, #07100d 100%); }
.dress-up-stage[data-dress-up-background="moon"] { --scene-accent: #cbd8ff; border-color: #48577f; background: radial-gradient(circle at 78% 20%, #e4ead5 0 6%, rgb(228 234 213 / .2) 6.5%, transparent 15%), radial-gradient(circle at 14% 18%, #eaf2ff 0 1px, transparent 2px), radial-gradient(circle at 46% 12%, #eaf2ff 0 1px, transparent 2px), radial-gradient(circle at 63% 32%, #eaf2ff 0 1px, transparent 2px), linear-gradient(#111a38, #293455 58%, #0b1424); }
.dress-up-stage[data-dress-up-background="harbor"] { --scene-accent: #9ce0e5; border-color: #3f7180; background: repeating-linear-gradient(0deg, rgb(188 229 232 / .09) 0 1px, transparent 1px 2.7rem), linear-gradient(#173247 0 48%, #41606b 55%, #d2a65e 56%, #173b4c 59%, #071b29 100%); }
.dress-up-stage[data-dress-up-background="ember"] { --scene-accent: #ffb464; border-color: #86503a; background: radial-gradient(circle at 14% 70%, rgb(255 151 67 / .34), transparent 20%), radial-gradient(circle at 82% 25%, rgb(235 95 41 / .2), transparent 18%), repeating-linear-gradient(8deg, transparent 0 3rem, rgb(255 190 113 / .035) 3.05rem 3.1rem), radial-gradient(circle at 50% 66%, #7a4228, #3c261f 42%, #120f12 100%); }
.dress-up-stage[data-dress-up-background="snow"] { --scene-accent: #f0fbff; border-color: #718999; background: radial-gradient(circle at 10% 18%, #f7fdff 0 2px, transparent 3px), radial-gradient(circle at 37% 12%, #f7fdff 0 1px, transparent 2px), radial-gradient(circle at 74% 16%, #f7fdff 0 2px, transparent 3px), radial-gradient(circle at 90% 46%, #f7fdff 0 1px, transparent 2px), linear-gradient(#8194aa, #c0ccd2 62%, #6e8490 100%); }
.dress-up-stage[data-dress-up-background="void"] { --scene-accent: #c19cff; border-color: #624d89; background: repeating-radial-gradient(ellipse at 50% 64%, transparent 0 2.7rem, rgb(177 136 255 / .09) 2.8rem 2.9rem), radial-gradient(circle at 50% 62%, #44336a, #211b3f 42%, #080712 100%); }
.dress-up-stage[data-dress-up-background="festival"] { --scene-accent: #ffda76; border-color: #875673; background: radial-gradient(circle at 12% 22%, #ffd76e 0 1.6%, rgb(255 190 82 / .24) 2%, transparent 8%), radial-gradient(circle at 68% 26%, #ffd76e 0 1.5%, rgb(255 190 82 / .2) 2%, transparent 8%), linear-gradient(#3b244e, #7d3f58 48%, #d7815f 70%, #24182f); }
.dress-up-stage[data-dress-up-background="faerie"] { --scene-accent: #9effed; border-color: #4e7681; background: radial-gradient(circle at 22% 28%, rgb(244 184 255 / .28), transparent 12%), radial-gradient(circle at 78% 22%, rgb(143 255 240 / .25), transparent 13%), radial-gradient(circle at 50% 68%, #275f58, #183c3e 42%, #090f1c 100%); }
.dress-up-stage::before { content: ""; position: absolute; z-index: 0; inset: -12%; pointer-events: none; opacity: .72; transform: translate3d(0, 0, 0); }
.dress-up-stage[data-dress-up-background="moss"]::before { background: radial-gradient(circle at 18% 30%, #dfff9a 0 1px, transparent 2px), radial-gradient(circle at 72% 23%, #fff8a6 0 1px, transparent 2px), radial-gradient(circle at 84% 58%, #c5ff8b 0 1.5px, transparent 2.5px), radial-gradient(circle at 34% 56%, #f6ee8c 0 1px, transparent 2px); animation: dress-up-scene-drift 6s ease-in-out infinite alternate; }
.dress-up-stage[data-dress-up-background="moon"]::before { background: radial-gradient(circle at 18% 23%, #fff 0 1px, transparent 2px), radial-gradient(circle at 39% 14%, #fff 0 1.5px, transparent 2.5px), radial-gradient(circle at 61% 34%, #dce8ff 0 1px, transparent 2px), radial-gradient(circle at 90% 42%, #fff 0 1px, transparent 2px); animation: dress-up-scene-twinkle 2.8s ease-in-out infinite alternate; }
.dress-up-stage[data-dress-up-background="harbor"]::before { inset: 52% -15% -18%; background: repeating-linear-gradient(0deg, transparent 0 1.25rem, rgb(184 237 243 / .16) 1.3rem 1.36rem); animation: dress-up-scene-water 4.5s ease-in-out infinite alternate; }
.dress-up-stage[data-dress-up-background="ember"]::before { background: radial-gradient(circle at 14% 72%, #ffd37b 0 1px, transparent 2px), radial-gradient(circle at 34% 48%, #ff954f 0 1.5px, transparent 2.5px), radial-gradient(circle at 73% 62%, #ffc572 0 1px, transparent 2px), radial-gradient(circle at 88% 36%, #ff8148 0 1px, transparent 2px); animation: dress-up-scene-rise 4s linear infinite; }
.dress-up-stage[data-dress-up-background="snow"]::before { background-image: radial-gradient(circle, rgb(255 255 255 / .9) 0 1px, transparent 1.6px), radial-gradient(circle, rgb(255 255 255 / .65) 0 1.5px, transparent 2px); background-position: 0 0, 2rem 2.7rem; background-size: 4.2rem 4.2rem, 5.4rem 5.4rem; animation: dress-up-scene-snow 8s linear infinite; }
.dress-up-stage[data-dress-up-background="void"]::before { inset: -35%; border-radius: 50%; background: conic-gradient(from 20deg, transparent, rgb(189 143 255 / .16), transparent 25%, rgb(101 190 255 / .12), transparent 52%, rgb(231 135 255 / .13), transparent 78%); animation: dress-up-scene-orbit 18s linear infinite; }
.dress-up-stage[data-dress-up-background="festival"]::before { background: radial-gradient(ellipse at 14% 24%, #ffe79c 0 1.2%, #e45d5d 1.5% 3.3%, transparent 3.7%), radial-gradient(ellipse at 33% 38%, #ffe79c 0 1%, #db596a 1.3% 3%, transparent 3.4%), radial-gradient(ellipse at 69% 27%, #fff0a8 0 1.2%, #e06765 1.5% 3.4%, transparent 3.8%), radial-gradient(ellipse at 87% 42%, #fff0a8 0 1%, #ce5272 1.3% 3%, transparent 3.5%); animation: dress-up-scene-drift 5s ease-in-out infinite alternate; }
.dress-up-stage[data-dress-up-background="faerie"]::before { background: radial-gradient(circle at 15% 25%, #ffc7ff 0 1.2px, transparent 2.5px), radial-gradient(circle at 31% 47%, #a5fff1 0 1.5px, transparent 3px), radial-gradient(circle at 74% 22%, #b7c9ff 0 1.4px, transparent 3px), radial-gradient(circle at 86% 52%, #ffe5a6 0 1px, transparent 2.5px), radial-gradient(circle at 56% 36%, #e8b5ff 0 1px, transparent 2px); animation: dress-up-scene-drift 4.5s ease-in-out infinite alternate-reverse; }
@keyframes dress-up-scene-drift { to { opacity: 1; transform: translate3d(.7rem, -.55rem, 0) scale(1.025); } }
@keyframes dress-up-scene-twinkle { to { opacity: .3; transform: scale(.99); } }
@keyframes dress-up-scene-water { to { transform: translate3d(0, .7rem, 0) skewY(-1deg); } }
@keyframes dress-up-scene-rise { to { opacity: .15; transform: translate3d(.3rem, -28%, 0); } }
@keyframes dress-up-scene-snow { to { background-position: 1.2rem 4.2rem, 3rem 8.1rem; } }
@keyframes dress-up-scene-orbit { to { transform: rotate(1turn) scale(1.04); } }
.dress-up-stage::after { content: ""; position: absolute; z-index: 0; left: 50%; bottom: 19%; width: 35%; height: 7%; background: rgb(0 0 0 / .45); border-radius: 50%; transform: translateX(-50%); filter: blur(.3rem); }
.dress-up-stage canvas { position: relative; z-index: 1; width: min(100%, 30rem); max-height: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
.dress-up-stage-tools { position: absolute; z-index: 2; right: .45rem; bottom: .45rem; left: .45rem; display: flex; gap: .3rem; align-items: end; }
.dress-up-stage-tools label { display: flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .6rem; font-weight: 750; text-transform: uppercase; }
.dress-up-stage-tools label:first-child { margin-right: auto; }
.dress-up-stage-tools select { max-width: 8.5rem; min-height: 2rem; padding: .25rem .35rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .35rem; background: rgb(7 16 13 / .9); }
.dress-up-stage-tools button { min-height: 2rem; padding: .3rem .5rem; color: var(--ink); border-color: var(--line-strong); background: rgb(17 29 25 / .92); }
.dress-up-stage-tools [data-dress-up-random-background] { width: 2.15rem; flex: 0 0 2.15rem; padding: 0; color: var(--scene-accent); border-color: currentColor; font-size: 1rem; }
.dress-up-stage:fullscreen { width: 100%; height: 100%; min-height: 100%; border: 0; border-radius: 0; background-color: #07100d; }
.dress-up-stage:fullscreen canvas { width: min(90vw, 50rem); }
.dress-up-outfit-summary { min-height: 2rem; padding: .5rem 0 .15rem; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: thin; }
.dress-up-outfit-summary span { flex: 0 0 auto; max-width: 9rem; padding: .22rem .42rem; overflow: hidden; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: #0a1511; font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
.dress-up-outfit-summary strong { color: var(--ink); font-weight: 750; }
.dress-up-quick-actions { margin-top: .45rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; }
.dress-up-quick-actions button { min-height: 2.6rem; font-weight: 800; }
.dress-up-quick-actions button:first-child { color: #07100d; border-color: var(--gold-soft); background: var(--gold-soft); }
.dress-up-quick-actions small { grid-column: 1 / -1; min-height: 1rem; color: var(--muted); font-size: .61rem; text-align: center; }
.dress-up-transport { margin-top: .35rem; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr) auto; gap: .4rem; align-items: end; }
.dress-up-transport label,
.dress-up-export-panel > label:not(.dress-up-check) { display: grid; gap: .2rem; color: var(--muted); font-size: .61rem; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.dress-up-transport select,
.dress-up-export select { width: 100%; min-width: 0; min-height: 2.25rem; padding: .36rem .5rem; color: var(--ink); background: #0b1511; border: 1px solid var(--line-strong); border-radius: .4rem; font-size: .74rem; }
.dress-up-transport > button { min-width: 4.7rem; }
.dress-up-action-note { grid-column: 1 / -1; padding: .4rem .5rem; color: #f2d79a; border: 1px solid rgb(224 185 104 / .3); border-radius: .38rem; background: rgb(95 64 26 / .2); font-size: .62rem; line-height: 1.4; }
.dress-up-action-note[hidden] { display: none; }
.dress-up-direction-pad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .32rem; margin-top: .4rem; }
.dress-up-direction-pad button { color: var(--muted); border-color: var(--line-strong); background: #102019; }
.dress-up-direction-pad button[aria-pressed="true"] { color: #08110d; background: var(--gold-soft); border-color: var(--gold-soft); }
.dress-up-frame-tools { margin-top: .32rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .32rem; }
.dress-up-frame-tools button { min-height: 1.95rem; padding: .28rem .5rem; color: var(--muted); border-color: var(--line); background: #0b1712; font-size: .66rem; }
.dress-up-history { display: grid; grid-template-columns: 1.25fr repeat(2, minmax(0, .8fr)); gap: .32rem; margin-top: .4rem; }
.dress-up-history button { color: var(--ink); border-color: var(--line-strong); background: var(--surface-raised); }
.dress-up-history button:first-child { color: var(--action-ink); border-color: #ffe6a8; background: var(--action); }
.dress-up-export { margin-top: .45rem; border: 1px solid var(--line-strong); border-radius: .45rem; background: #09130f; }
.dress-up-export summary { min-height: 2.7rem; padding: .48rem .65rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; cursor: pointer; list-style: none; }
.dress-up-export summary::-webkit-details-marker { display: none; }
.dress-up-export summary strong,
.dress-up-export summary small { display: block; }
.dress-up-export summary strong { font-size: .74rem; }
.dress-up-export summary small { margin-top: .12rem; color: var(--muted); font-size: .59rem; font-weight: 450; }
.dress-up-export[open] summary { border-bottom: 1px solid var(--line); }
.dress-up-export[open] summary > span:last-child { transform: rotate(45deg); }
.dress-up-export-panel { padding: .65rem; display: grid; grid-template-columns: minmax(6rem, .55fr) 1fr; gap: .55rem; align-items: end; }
.dress-up-check { color: var(--muted); font-size: .68rem; }
.dress-up-check input { accent-color: var(--gold); }
.dress-up-export-buttons { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; gap: .32rem; }
.dress-up-export-buttons button { color: var(--ink); border-color: var(--line-strong); background: var(--surface-raised); }
.dress-up-wardrobe { min-width: 0; padding: .9rem; display: block; }
.dress-up-wardrobe-heading .button { min-height: 2.1rem; padding: .35rem .6rem; }
.dress-up-body-picker { min-width: 0; margin: .8rem 0 0; padding: .35rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; border: 1px solid var(--line); border-radius: .55rem; }
.dress-up-body-picker legend { padding: 0 .3rem; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.dress-up-body-picker button { color: var(--muted); border-color: transparent; background: transparent; box-shadow: none; }
.dress-up-body-picker button[aria-pressed="true"] { color: var(--ink); border-color: var(--line-strong); background: var(--surface-raised); box-shadow: inset 0 -2px var(--gold); }
.dress-up-body-icon { color: var(--gold); font-size: .95rem; }
.dress-up-browser-hint { margin: .65rem 0 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.dress-up-browser-hint kbd { padding: .05rem .28rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .25rem; background: #09130f; font: inherit; font-weight: 800; }
.dress-up-archive-toggle { margin-top: .7rem; padding: .62rem .7rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .65rem; align-items: center; color: var(--ink); border: 1px solid #594d78; border-radius: .55rem; background: linear-gradient(110deg, rgb(86 61 122 / .2), rgb(10 21 17 / .82) 62%); cursor: pointer; }
.dress-up-archive-toggle input { width: 2.15rem; height: 1.2rem; margin: 0; appearance: none; position: relative; border: 1px solid #71658d; border-radius: 999px; background: #111b18; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.dress-up-archive-toggle input::after { content: ""; position: absolute; top: .14rem; left: .16rem; width: .78rem; height: .78rem; border-radius: 50%; background: #a8b4ae; transition: transform .15s ease, background .15s ease; }
.dress-up-archive-toggle input:checked { border-color: #b99be8; background: #594078; }
.dress-up-archive-toggle input:checked::after { background: #f0deff; transform: translateX(.95rem); }
.dress-up-archive-toggle input:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.dress-up-archive-toggle span,
.dress-up-archive-toggle strong,
.dress-up-archive-toggle small { min-width: 0; display: block; }
.dress-up-archive-toggle strong { font-size: .72rem; }
.dress-up-archive-toggle small { margin-top: .12rem; color: var(--muted); font-size: .59rem; line-height: 1.35; }
.dress-up-archive-toggle output { padding: .25rem .42rem; color: #e3ccff; border: 1px solid rgb(185 155 232 / .3); border-radius: 999px; background: rgb(89 64 120 / .34); font-size: .62rem; font-weight: 850; white-space: nowrap; }
.dress-up-browser-dock { min-width: 0; }
.dress-up-browser-toolbar { margin-top: .7rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem; }
.dress-up-browser-toolbar input { width: 100%; min-height: 2.4rem; padding: .42rem .7rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .45rem; background: #0b1511; }
.dress-up-browser-toolbar button { min-height: 2.4rem; color: var(--ink); border-color: var(--line-strong); background: var(--surface-raised); }
.dress-up-browser-toolbar button[hidden] { display: none !important; }
.dress-up-categories { margin-top: .65rem; padding-bottom: .35rem; display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: thin; }
.dress-up-category { flex: 0 0 auto; min-height: 2.25rem; color: var(--muted); border-color: var(--line); background: #0b1712; transition: color .14s ease, border-color .14s ease, background .14s ease; }
.dress-up-category span { min-width: 1.25rem; padding: .13rem .3rem; color: var(--muted); border-radius: 999px; background: rgb(255 255 255 / .06); font-size: .58rem; }
.dress-up-category[aria-pressed="true"] { color: #07100d; border-color: var(--gold-soft); background: var(--gold-soft); }
.dress-up-category[aria-pressed="true"] span { color: #07100d; background: rgb(7 16 13 / .13); }
.dress-up-gallery-heading { margin-top: .5rem; padding: .55rem .1rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); }
.dress-up-gallery-heading span,
.dress-up-gallery-heading strong { display: block; }
.dress-up-gallery-heading span { color: var(--muted); font-size: .61rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.dress-up-gallery-heading strong { max-width: 34rem; margin-top: .08rem; overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.dress-up-gallery-heading output { color: var(--muted); font-size: .64rem; white-space: nowrap; }
.dress-up-gallery-tools { display: flex; align-items: center; gap: .45rem; }
.dress-up-style-stepper { display: grid; grid-template-columns: repeat(2, 2rem); gap: .25rem; }
.dress-up-style-stepper button { width: 2rem; min-height: 2rem; padding: 0; color: var(--ink); border-color: var(--line-strong); background: var(--surface-raised); font-size: 1.2rem; line-height: 1; }
.dress-up-gallery { min-height: 16rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); gap: .5rem; align-content: start; }
.dress-up-style-item { min-width: 0; display: block; }
.dress-up-style-card { position: relative; min-width: 0; min-height: 0 !important; padding: 0 !important; display: block !important; overflow: hidden; color: var(--ink) !important; border: 1px solid var(--line) !important; border-radius: .58rem !important; background: #0a1511 !important; text-align: left; transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease; }
.dress-up-style-item .dress-up-style-card { width: 100%; }
.dress-up-style-card:hover { border-color: var(--gold) !important; filter: none; transform: translateY(-1px); }
.dress-up-style-card[aria-pressed="true"] { border-color: var(--gold-soft) !important; box-shadow: 0 0 0 2px rgb(224 185 104 / .15); }
.dress-up-style-card[aria-pressed="true"]::after { content: "✓"; position: absolute; z-index: 2; top: .35rem; right: .35rem; width: 1.35rem; height: 1.35rem; display: grid; place-items: center; color: #07100d; border-radius: 50%; background: var(--gold-soft); font-size: .72rem; }
.dress-up-style-art { position: relative; aspect-ratio: 5 / 4; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 50% 68%, rgb(224 185 104 / .11), transparent 38%), #07100d; }
.dress-up-archive-badge { position: absolute; z-index: 2; top: .38rem; left: .38rem; padding: .17rem .32rem; color: #ecdfff; border: 1px solid rgb(199 169 239 / .38); border-radius: 999px; background: rgb(50 31 74 / .88); font-size: .5rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.dress-up-style-art img { width: 100%; height: 100%; display: block; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; transform: scale(1.45); transform-origin: 50% 72%; transition: transform .14s ease; }
.dress-up-style-card:hover .dress-up-style-art img { transform: scale(1.58); }
.dress-up-style-none { color: var(--muted); font-size: 1.5rem; font-weight: 350; }
.dress-up-style-copy { min-width: 0; padding: .45rem .5rem .52rem; display: block; }
.dress-up-style-copy strong,
.dress-up-style-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dress-up-style-copy strong { font-size: .69rem; line-height: 1.25; }
.dress-up-style-copy small { margin-top: .12rem; color: var(--muted); font-size: .56rem; font-weight: 550; }
.dress-up-gallery-empty { grid-column: 1 / -1; min-height: 12rem; padding: 2rem; display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: .6rem; text-align: center; }
.dress-up-gallery-more { width: 100%; min-height: 2.75rem !important; margin-top: .75rem; color: var(--ink); border-color: var(--line-strong); background: var(--surface-raised); font-weight: 800; }
.dress-up-gallery-more[hidden] { display: none !important; }
.dress-up-card-skeleton { min-height: 10rem; border: 1px solid var(--line); border-radius: .58rem; background: linear-gradient(110deg, #0a1511 30%, #172721 48%, #0a1511 66%); background-size: 250% 100%; animation: dress-up-shimmer 1.35s linear infinite; }
@keyframes dress-up-shimmer { to { background-position-x: -250%; } }

@media (min-width: 48.01rem) {
    .dress-up-browser-dock { position: sticky; z-index: 4; top: 5rem; margin: .6rem -.9rem 0; padding: .05rem .9rem .35rem; border-bottom: 1px solid var(--line); background: #0d1a15; box-shadow: 0 .75rem .9rem rgb(5 12 9 / .72); }
    .dress-up-browser-dock .dress-up-browser-toolbar { margin-top: .2rem; }
}
.dress-up-note { margin-top: 1rem; border-left: .2rem solid var(--gold); }
.dress-up-note summary { padding: .65rem .85rem; cursor: pointer; color: var(--ink); font-size: .75rem; font-weight: 750; }
.dress-up-note > div { padding: 0 .85rem .75rem; }
.dress-up-note p { max-width: 76rem; margin: .35rem 0 0; color: var(--muted); font-size: .75rem; }
.dress-up-page [disabled] { cursor: wait; opacity: .58; }

.calculator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.calculator-card { padding: 1.2rem; }
.calculator-card h2 { margin-bottom: .6rem; font-size: 1.4rem; }
.calculator-card form { display: grid; gap: .75rem; margin-top: 1rem; }
.calculator-result { min-height: 4rem; margin-top: 1rem; padding: .85rem; border: 1px solid var(--line-strong); border-radius: .6rem; background: #09130f; }
.calculator-result strong { display: block; color: var(--gold-soft); font-size: 1.35rem; }
.formula-note { color: var(--muted); font-size: .8rem; }

.directory-index .reference-note { margin-bottom: .65rem; }
.directory-filters {
    margin-bottom: .7rem;
    padding: .6rem;
    grid-template-columns: minmax(18rem, 1fr) minmax(11rem, .45fr) auto auto;
    gap: .55rem;
    border-radius: .25rem;
    background: transparent;
}
.directory-filters [data-directory-count] { min-width: 5.5rem; align-self: center; color: var(--gold-soft); font-size: .75rem; text-align: right; white-space: nowrap; }
.directory-filters button { min-height: 2.75rem; }
.directory-table-wrap { border-radius: .25rem; }
.directory-table { min-width: 76rem; font-size: .76rem; line-height: 1.4; }
.tool-directory-table { min-width: 82rem; }
.directory-table th,
.directory-table td { padding: .5rem .58rem; vertical-align: top; }
.directory-table tbody tr:nth-child(even) { background: rgb(255 255 255 / .018); }
.directory-table tbody tr:hover { background: rgb(224 185 104 / .045); }
.directory-table [data-directory-row][hidden] { display: none !important; }
.directory-table th:first-child,
.directory-table td:first-child { width: 14rem; min-width: 14rem; }
.directory-table td:nth-child(2) { width: 9rem; min-width: 9rem; }
.directory-table td:nth-child(3) { width: 18rem; min-width: 18rem; }
.directory-table td:nth-child(4) { width: 23rem; min-width: 23rem; }
.directory-table td:nth-child(5) { width: 13rem; min-width: 13rem; }
.directory-table .directory-primary > a { color: var(--ink); font-size: .9rem; font-weight: 750; }
.directory-table .directory-primary > small { margin-top: .15rem; display: block; color: var(--muted); font-size: .64rem; }
.directory-link-list { margin: 0; padding: 0; display: grid; gap: .12rem; list-style: none; }
.directory-footnote { margin: .75rem 0 0; color: var(--muted); font-size: .78rem; }
.directory-empty { margin-top: 0; }
.directory-topic-table { min-width: 68rem; }
.directory-topic-table td:first-child { width: 11rem; min-width: 11rem; color: var(--muted); font-weight: 700; }
.directory-topic-table td:nth-child(2) { width: 15rem; min-width: 15rem; }
.directory-topic-table td:nth-child(3) { width: 27rem; min-width: 27rem; }
.directory-topic-table td:nth-child(4) { width: 13rem; min-width: 13rem; }
.knowledge-topic-table { min-width: 70rem; }
.knowledge-topic-table td:first-child { width: 14rem; min-width: 14rem; }
.knowledge-topic-table td:nth-child(2) { width: 11rem; min-width: 11rem; }
.knowledge-topic-table td:nth-child(3) { width: 34rem; min-width: 34rem; }
.knowledge-topic-table td:nth-child(4) { width: 11rem; min-width: 11rem; color: var(--muted); }
.knowledge-article .page-intro { max-width: 64rem; }
.knowledge-related-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.tools-library > .source-note { margin-top: .8rem; }

.tool-workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.calculator-card-wide { max-width: 56rem; }
.calculator-card-narrow { max-width: 34rem; }
.formula-panel { margin-top: 1rem; padding: 1rem 1.15rem; border-left: .2rem solid var(--gold); background: rgb(15 27 23 / .65); }
.formula-panel h2 { font-family: inherit; font-size: 1rem; }
.formula-panel p { max-width: 70rem; margin: .45rem 0 0; color: var(--muted); font-size: .85rem; }

.required-items-tool { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(19rem, .8fr); gap: 1rem; align-items: start; }
.required-items-picker,
.required-items-summary { border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); }
.required-items-controls { padding: .85rem; display: grid; grid-template-columns: minmax(9rem, .5fr) minmax(12rem, 1fr) auto; gap: .65rem; align-items: end; border-bottom: 1px solid var(--line); }
.required-items-controls label { display: grid; gap: .3rem; color: var(--muted); font-size: .75rem; font-weight: 750; }
.required-items-controls > div { white-space: nowrap; }
.learnable-picker-list { max-height: 38rem; padding: .5rem; overflow-y: auto; }
.learnable-picker-row { padding: .55rem .6rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; align-items: start; border-radius: .35rem; cursor: pointer; }
.learnable-picker-row:hover { background: var(--surface-raised); }
.learnable-picker-row input { width: 1.05rem; height: 1.05rem; margin-top: .15rem; accent-color: var(--gold); }
.learnable-picker-row span,
.learnable-picker-row small { display: block; }
.learnable-picker-row small { margin-top: .15rem; color: var(--muted); font-size: .7rem; }
.required-items-summary { position: sticky; top: 1rem; padding: .85rem; }
.required-items-summary > button { width: 100%; }
.shopping-list { margin: .85rem 0 0; padding: 0; list-style: none; }
.shopping-list li { padding: .35rem 0; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.shopping-list li > strong { color: var(--ink); font-family: inherit; font-size: .9rem; }
.requirement-warning { margin: .75rem 0 0; padding: .65rem; color: #f2c3ad; border-left: .2rem solid var(--danger); background: rgb(115 37 27 / .14); font-size: .8rem; }

.subpath-tool { display: grid; grid-template-columns: minmax(19rem, .7fr) minmax(0, 1.7fr); gap: 1rem; align-items: start; }
.subpath-learnables { min-width: 0; padding: 1.1rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); }
.subpath-learnables-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.subpath-learnables-heading h2 { font-size: 1.55rem; }
.subpath-learnables-heading p { max-width: 42rem; margin: .4rem 0 0; color: var(--muted); font-size: .85rem; }
.subpath-progress { min-width: 6rem; padding: .65rem; border: 1px solid var(--line-strong); border-radius: .45rem; text-align: center; background: #09130f; }
.subpath-progress strong,
.subpath-progress span { display: block; }
.subpath-progress strong { color: var(--gold-soft); font-size: 1.05rem; }
.subpath-progress span { margin-top: .15rem; color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.subpath-progress.is-complete { border-color: var(--moss-bright); background: rgb(41 105 69 / .18); }
.subpath-checklist { margin-top: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.subpath-checklist-group { min-width: 0; border: 1px solid var(--line); border-radius: .45rem; overflow: hidden; }
.subpath-checklist-group > div:first-child { padding: .6rem .7rem; display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; background: var(--surface-raised); }
.subpath-checklist-group h3 { font-family: inherit; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.subpath-checklist-group > div:first-child span { color: var(--muted); font-size: .68rem; }
.subpath-checklist-group > div:last-child { max-height: 32rem; padding: .35rem; overflow-y: auto; }
.subpath-checklist-group label { padding: .4rem .45rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .55rem; align-items: start; border-radius: .3rem; cursor: pointer; }
.subpath-checklist-group label:hover { background: var(--surface-raised); }
.subpath-checklist-group input { margin-top: .15rem; accent-color: var(--gold); }
.subpath-checklist-group label > span,
.subpath-checklist-group small { display: block; }
.subpath-checklist-group a { color: var(--ink); font-size: .82rem; font-weight: 700; text-decoration: none; }
.subpath-checklist-group a:hover { color: var(--gold-soft); }
.subpath-checklist-group small { margin-top: .08rem; color: var(--muted); font-size: .65rem; }
.subpath-checklist-actions { margin-top: .75rem; display: flex; flex-wrap: wrap; gap: .45rem; }

/* Community library */
.library-page { width: min(88rem, calc(100% - 2rem)); }
.library-hero {
    position: relative;
    min-height: 31rem;
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(20rem, .82fr);
    overflow: hidden;
    border: 1px solid #5f4a2d;
    border-radius: 1rem;
    background:
        radial-gradient(circle at 76% 18%, rgb(151 92 176 / .2), transparent 30%),
        linear-gradient(135deg, #17251e 0 56%, #241a28 100%);
    box-shadow: 0 1.5rem 4rem rgb(0 0 0 / .3);
}
.library-hero::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1.05rem;
    border-top: 1px solid #725838;
    background: repeating-linear-gradient(90deg, #221912 0 7rem, #35261a 7rem 7.15rem);
}
.library-hero-copy { position: relative; z-index: 2; padding: clamp(2rem, 5vw, 4.25rem); align-self: center; }
.library-hero-copy h1 { max-width: 13ch; color: #fff4d7; font-size: clamp(2.7rem, 6vw, 5.4rem); line-height: .98; }
.library-hero-copy > p { max-width: 39rem; margin: 1.2rem 0 0; color: #d8ded9; font-size: clamp(1rem, 1.8vw, 1.22rem); }
.library-hero-actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .65rem; }
.library-totals { margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem 2rem; }
.library-totals div { display: grid; }
.library-totals dt { color: var(--gold-soft); font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; font-weight: 800; line-height: 1; }
.library-totals dd { margin: .28rem 0 0; color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.library-ovie { position: relative; min-height: 31rem; display: grid; align-items: end; justify-items: center; }
.library-ovie::before { content: ""; position: absolute; inset: 12% 8% 4%; border-radius: 50%; background: radial-gradient(circle, rgb(241 205 128 / .16), transparent 68%); }
.library-ovie img { position: relative; z-index: 1; width: min(23rem, 88%); height: auto; display: block; filter: drop-shadow(0 1rem 1.3rem rgb(0 0 0 / .45)); }
.library-ovie blockquote {
    position: absolute;
    z-index: 3;
    right: 1.1rem;
    bottom: 1.4rem;
    width: min(22rem, calc(100% - 2rem));
    margin: 0;
    padding: .8rem 1rem;
    color: #f7eddb;
    border: 1px solid rgb(255 225 160 / .38);
    border-radius: .55rem;
    background: rgb(17 13 18 / .9);
    box-shadow: 0 .7rem 1.8rem rgb(0 0 0 / .32);
    font-family: Georgia, "Times New Roman", serif;
    font-size: .86rem;
    line-height: 1.45;
}
.library-ovie blockquote span { display: block; margin-top: .3rem; color: var(--gold); font-family: Inter, sans-serif; font-size: .58rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.library-gallery { margin-bottom: 3.5rem; scroll-margin-top: 6rem; }
.library-gallery-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 8.4rem; gap: .65rem; }
.library-gallery-piece { position: relative; min-width: 0; grid-column: span 4; grid-row: span 2; overflow: hidden; color: #fff; border: 1px solid #5d503c; border-radius: .65rem; background: #0a100d; box-shadow: 0 .8rem 2.1rem rgb(0 0 0 / .22); text-decoration: none; }
.library-gallery-piece:nth-child(1) { grid-column: span 5; }
.library-gallery-piece:nth-child(2) { grid-column: span 3; }
.library-gallery-piece:nth-child(3),
.library-gallery-piece:nth-child(4) { grid-column: span 4; grid-row: span 1; }
.library-gallery-piece img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease, filter .35s ease; }
.library-gallery-piece::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 28%, rgb(5 8 7 / .88)); }
.library-gallery-piece > span { position: absolute; z-index: 2; inset: auto .85rem .75rem; display: grid; text-shadow: 0 1px .5rem #000; }
.library-gallery-piece small { color: #f0c978; font-size: .55rem; font-style: normal; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.library-gallery-piece strong { margin-top: .12rem; color: #fff6df; font-family: Georgia, "Times New Roman", serif; font-size: clamp(.95rem, 1.55vw, 1.35rem); line-height: 1.1; }
.library-gallery-piece em { margin-top: .15rem; color: #d8e2dc; font-size: .65rem; font-style: normal; }
.library-gallery-piece:hover { color: #fff; border-color: var(--gold); }
.library-gallery-piece:hover img { filter: saturate(1.08) brightness(1.04); transform: scale(1.035); }
.library-gallery-more { width: fit-content; margin: .8rem 0 0 auto; display: flex; gap: .55rem; font-size: .72rem; font-weight: 800; text-decoration: none; }
.library-shelves { margin-bottom: 3.25rem; }
.library-shelf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.library-shelf {
    min-height: 8.5rem;
    padding: 1rem 1rem 1rem .75rem;
    display: grid;
    grid-template-columns: 2.8rem minmax(0, 1fr) auto;
    gap: .85rem;
    align-items: center;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: .55rem;
    background: linear-gradient(145deg, var(--surface-raised), #0f1916);
    text-decoration: none;
    transition: border-color .16s ease, transform .16s ease, background .16s ease;
}
.library-shelf:hover { color: var(--ink); border-color: var(--gold); background: #1b2b25; transform: translateY(-.15rem); }
.library-shelf-spine { height: 6.4rem; display: grid; place-items: center; color: #fff3d8; border: 1px solid rgb(255 255 255 / .12); border-radius: .18rem .35rem .35rem .18rem; background: #6a3e70; box-shadow: inset .25rem 0 rgb(255 255 255 / .07), .25rem .25rem 0 #09100e; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 800; }
.library-shelf-biography .library-shelf-spine { background: #426b68; }
.library-shelf-history .library-shelf-spine { background: #805a35; }
.library-shelf-literature .library-shelf-spine { background: #6f3545; }
.library-shelf-lore .library-shelf-spine { background: #3e6848; }
.library-shelf-philosophy .library-shelf-spine { background: #3e4f78; }
.library-shelf > span:nth-child(2) { min-width: 0; display: grid; gap: .35rem; }
.library-shelf strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; }
.library-shelf small { color: var(--muted); font-size: .72rem; line-height: 1.42; }
.library-shelf > b { align-self: start; color: var(--gold-soft); font-size: .72rem; }
.library-catalog { scroll-margin-top: 6rem; }
.library-filters {
    margin-bottom: 1.25rem;
    padding: .85rem;
    display: grid;
    grid-template-columns: minmax(15rem, 1.6fr) repeat(4, minmax(8rem, .7fr));
    gap: .65rem;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: .65rem;
    background: rgb(17 29 25 / .74);
}
.library-filters label { min-width: 0; display: grid; gap: .28rem; color: var(--muted); font-size: .7rem; font-weight: 750; }
.library-filters input,
.library-filters select,
.library-author-search input { width: 100%; min-height: 2.85rem; padding: .65rem .75rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .42rem; background: #0c1713; }
.library-filter-actions { grid-column: 1 / -1; display: flex; justify-content: end; gap: .55rem; }
.library-filters button,
.library-filters .button { min-height: 2.85rem; }
.library-work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.library-work {
    min-width: 0;
    min-height: 20rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: .58rem;
    background: linear-gradient(150deg, #14221d, #0e1815);
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.library-work:hover { border-color: #735f3f; transform: translateY(-.14rem); box-shadow: 0 .85rem 1.8rem rgb(0 0 0 / .2); }
.library-work-cover { position: relative; aspect-ratio: 4 / 3; min-height: 8rem; display: block; overflow: hidden; border-bottom: 1px solid var(--line); background: #0a100e; text-decoration: none; }
.library-work-cover > img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .3s ease, filter .3s ease; }
.library-work:hover .library-work-cover > img { filter: saturate(1.08) brightness(1.04); transform: scale(1.035); }
.library-work-cover-pattern { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .65rem; background: radial-gradient(circle at 72% 18%, rgb(224 185 104 / .12), transparent 28%), repeating-linear-gradient(125deg, transparent 0 1.6rem, rgb(255 255 255 / .018) 1.6rem 1.7rem), linear-gradient(145deg, #1c2d26, #0b1511); }
.library-work-cover-pattern::after { content: ""; position: absolute; inset: .7rem; border: 1px solid rgb(224 185 104 / .13); border-radius: .25rem; }
.library-work-cover-pattern small { color: #aebdb6; font-family: Georgia, "Times New Roman", serif; font-size: .65rem; font-style: italic; }
.library-work-mark { width: 2.4rem; height: 3.15rem; display: grid; place-items: center; color: #fff2d9; border-radius: .15rem .28rem .28rem .15rem; background: #67416d; box-shadow: inset .2rem 0 rgb(255 255 255 / .08), .18rem .18rem 0 rgb(0 0 0 / .3); font-family: Georgia, serif; font-weight: 800; }
.library-work-cover-pattern .library-work-mark { width: 3.2rem; height: 4.35rem; font-size: 1.35rem; }
.library-mark-biography { background: #426b68; }
.library-mark-history { background: #805a35; }
.library-mark-literature { background: #6f3545; }
.library-mark-lore { background: #3e6848; }
.library-mark-philosophy { background: #3e4f78; }
.library-work-format { position: absolute; z-index: 2; top: .55rem; right: .55rem; padding: .28rem .48rem; color: #f7eddc; border: 1px solid rgb(255 236 192 / .25); border-radius: 999px; background: rgb(7 13 11 / .82); box-shadow: 0 .25rem .8rem rgb(0 0 0 / .22); font-size: .52rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.library-work-copy { min-width: 0; padding: .8rem; display: flex; flex: 1; flex-direction: column; }
.library-work-category { color: var(--gold); font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.library-work h2 { margin-top: .22rem; font-size: 1.08rem; overflow-wrap: anywhere; }
.library-work h2 a { color: var(--ink); text-decoration: none; }
.library-work h2 a:hover { color: var(--gold-soft); }
.library-work-credit { margin: .38rem 0 .75rem; color: var(--muted); font-size: .72rem; }
.library-work-credit a { font-weight: 750; text-decoration: none; }
.library-work-credit span { font-style: italic; }
.library-work-read { margin-top: auto; min-height: 1.9rem; padding: .3rem .6rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: #d7e7df; border: 1px solid var(--line); border-radius: .35rem; background: #192a24; font-size: .65rem; font-weight: 750; text-decoration: none; }
.library-work-read:hover { color: #0a120f; border-color: var(--moss-bright); background: var(--moss-bright); }
.library-provenance { margin-top: 3.5rem; padding: 1.25rem; display: grid; grid-template-columns: minmax(13rem, .7fr) minmax(20rem, 1.3fr); gap: 1rem 2rem; border: 1px solid #614f34; border-radius: .7rem; background: #171b16; }
.library-provenance h2 { font-size: 1.5rem; }
.library-provenance p { margin: 0 0 .7rem; color: #c2cec8; font-size: .82rem; }
.library-provenance nav { grid-column: 2; display: flex; flex-wrap: wrap; gap: .55rem 1rem; }
.library-provenance nav a { font-size: .72rem; font-weight: 750; }
.library-author-search { margin-bottom: 1.25rem; display: grid; grid-template-columns: minmax(15rem, 1fr) auto auto; gap: .55rem; }
.library-author-search button,
.library-author-search .button { min-height: 2.85rem; }
.library-author-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.library-author-card { min-width: 0; min-height: 5.2rem; padding: .7rem; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; gap: .65rem; align-items: center; color: var(--ink); border: 1px solid var(--line); border-radius: .45rem; background: var(--surface); text-decoration: none; }
.library-author-card:hover { color: var(--ink); border-color: var(--gold); background: var(--surface-raised); }
.library-author-monogram { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; color: #24180b; border: 1px solid var(--gold-soft); border-radius: 50%; background: linear-gradient(145deg, var(--gold-soft), var(--gold)); font-family: Georgia, serif; font-size: 1.05rem; font-weight: 850; }
.library-author-card > span:nth-child(2) { min-width: 0; display: grid; gap: .18rem; }
.library-author-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-author-card small { overflow: hidden; color: var(--muted); font-size: .59rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.library-author-card > b { color: var(--gold-soft); font-size: .65rem; }
.library-uncredited-note,
.library-credit-note { margin-top: 1.5rem; padding: .8rem 1rem; color: var(--muted); border-left: .2rem solid var(--gold); background: rgb(224 185 104 / .06); font-size: .76rem; }
.library-author-hero { margin-bottom: 1rem; padding: 1.2rem; display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 1.1rem; align-items: center; border: 1px solid #5f4a2d; border-radius: .7rem; background: linear-gradient(135deg, #18261f, #211b23); }
.library-author-hero .library-author-monogram { width: 5rem; height: 5rem; font-size: 2rem; }
.library-author-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.library-author-hero p { margin: .35rem 0 0; color: var(--muted); }
.library-author-categories { margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.library-author-categories span { padding: .35rem .6rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .68rem; }
.library-author-categories b { color: var(--gold-soft); }
.library-credit-note strong { color: var(--ink); }
.library-credit-note p { margin: .2rem 0 0; }
.library-reader-page { width: min(96rem, calc(100% - 2rem)); }
.library-reader-heading { margin-bottom: 1rem; padding: 1.1rem; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; border: 1px solid #5f4a2d; border-radius: .7rem; background: linear-gradient(135deg, #18261f, #211b23); }
.library-reader-heading .library-work-mark { width: 3.4rem; height: 4.5rem; font-size: 1.35rem; }
.library-reader-heading h1 { margin-top: .2rem; color: #fff4d7; font-size: clamp(2rem, 5vw, 4rem); overflow-wrap: anywhere; }
.library-reader-heading p { margin: .4rem 0 0; color: var(--muted); }
.library-reader-heading p a { font-weight: 750; }
.library-reader-navigation { margin-bottom: .75rem; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .55rem; align-items: stretch; }
.library-reader-navigation > a,
.library-reader-navigation > span { min-width: 0; min-height: 3.8rem; padding: .55rem .7rem; display: flex; align-items: center; gap: .65rem; color: var(--ink); border: 1px solid var(--line); border-radius: .48rem; background: #111e19; text-decoration: none; }
.library-reader-navigation > :last-child { justify-content: end; text-align: right; }
.library-reader-navigation > a:hover { color: var(--ink); border-color: var(--gold); background: #182821; }
.library-reader-navigation small,
.library-reader-navigation strong { display: block; }
.library-reader-navigation small { color: var(--muted); font-size: .56rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.library-reader-navigation strong { margin-top: .08rem; overflow: hidden; font-family: Georgia, "Times New Roman", serif; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.library-reader-navigation .library-reader-navigation-all { padding-inline: 1rem; justify-content: center; color: var(--gold-soft); font-size: .68rem; font-weight: 800; text-align: center; }
.library-reader-navigation > .is-disabled { opacity: .42; }
.library-reader-toolbar { padding: .75rem .85rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); border-bottom: 0; border-radius: .6rem .6rem 0 0; background: #101c18; }
.library-reader-toolbar p { margin: 0; display: grid; gap: .12rem; color: var(--ink); font-size: .76rem; }
.library-reader-toolbar p span { color: var(--muted); font-size: .68rem; }
.library-reader-toolbar .button { min-height: 2.45rem; flex: 0 0 auto; }
.library-reader-frame { min-height: 38rem; height: min(78vh, 64rem); overflow: auto; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 0 0 .6rem .6rem; background: #080d0b; box-shadow: 0 1rem 2.8rem rgb(0 0 0 / .28); }
.library-reader-frame iframe { width: 100%; height: 100%; display: block; border: 0; background: #fff; }
.library-reader-frame > img,
.library-reader-frame > video { max-width: 100%; max-height: 100%; display: block; object-fit: contain; }
.library-reader-frame > audio { width: min(42rem, calc(100% - 2rem)); }
.library-reader-unavailable { min-height: 24rem; padding: clamp(2rem, 8vw, 6rem); display: grid; align-content: center; justify-items: center; text-align: center; border: 1px solid #614f34; border-radius: .6rem; background: radial-gradient(circle at 50% 25%, rgb(224 185 104 / .09), transparent 45%), #101713; }
.library-reader-unavailable h2 { max-width: 22ch; margin-top: .45rem; font-size: clamp(1.8rem, 5vw, 3rem); }
.library-reader-unavailable p { max-width: 46rem; margin: .7rem 0 0; color: var(--muted); }
.library-reader-credit { margin-top: 1rem; padding: 1rem; display: grid; grid-template-columns: minmax(18rem, 1fr) auto; gap: .8rem 2rem; align-items: center; border: 1px solid #614f34; border-radius: .6rem; background: #171b16; }
.library-reader-credit h2 { font-size: 1.3rem; }
.library-reader-credit p { margin: .35rem 0 0; color: var(--muted); font-size: .76rem; }
.library-reader-credit nav { display: flex; flex-wrap: wrap; justify-content: end; gap: .45rem .8rem; font-size: .7rem; font-weight: 750; }
.library-reader-credit small { grid-column: 1 / -1; color: var(--muted); font-size: .62rem; }
.library-reader:fullscreen { padding: .75rem; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #080d0b; }
.library-reader:fullscreen .library-reader-frame { min-height: 0; height: auto; border-radius: 0 0 .6rem .6rem; box-shadow: none; }
.library-related { margin-top: 3.5rem; }

/* Library publication and reading index */
.library-hero-search { max-width: 41rem; margin-top: 1.7rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.library-hero-search input { width: 100%; min-height: 3.35rem; padding: .75rem 1rem; color: #f5eee0; border: 1px solid #776340; border-right: 0; border-radius: .3rem 0 0 .3rem; background: rgb(6 13 10 / .7); font-size: .9rem; }
.library-hero-search button { min-height: 3.35rem; padding-inline: 1.15rem; border-radius: 0 .3rem .3rem 0; }
.library-home-links { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.35rem; }
.library-home-links a { color: #eed49b; font-size: .76rem; font-weight: 750; text-underline-offset: .2rem; }
.library-preserved-line { margin-top: 1.6rem; color: #aebbb4; font-size: .68rem; letter-spacing: .02em; }
.library-preserved-line strong { color: #f0d59c; font-family: Georgia, "Times New Roman", serif; font-size: .85rem; }
.library-home .library-provenance { border-width: 1px 0; border-radius: 0; background: transparent; }

.library-browse-page { width: min(76rem, calc(100% - 2rem)); }
.library-browse-heading { max-width: 53rem; margin: .75rem 0 2rem; }
.library-browse-heading h1 { margin-top: .22rem; color: #fff2d7; font-size: clamp(2.5rem, 6vw, 4.7rem); line-height: 1; }
.library-browse-heading p { max-width: 46rem; margin: .75rem 0 0; color: var(--muted); font-size: .96rem; }
.library-collection-nav { margin-bottom: 1.25rem; padding: 0 0 .7rem; display: flex; flex-wrap: wrap; gap: .35rem 1.15rem; border-bottom: 1px solid var(--line); }
.library-collection-nav a { padding: .28rem 0; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: .82rem; text-decoration: none; }
.library-collection-nav a:hover,
.library-collection-nav a[aria-current="page"] { color: var(--gold-soft); }
.library-collection-nav a[aria-current="page"] { box-shadow: 0 2px var(--gold); }
.library-browse-search { margin: 0 0 .65rem; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .55rem; align-items: center; }
.library-browse-search input { width: 100%; min-height: 3.2rem; padding: .7rem .85rem; color: var(--ink); border: 1px solid var(--line-strong); border-radius: .3rem; background: #0b1612; font-size: .88rem; }
.library-browse-search button { min-height: 3.2rem; }
.library-browse-search > a { padding: .6rem .25rem; font-size: .68rem; font-weight: 750; }
.library-refine { margin-bottom: 2.3rem; border-block: 1px solid var(--line); }
.library-refine summary { padding: .65rem .1rem; color: var(--muted); cursor: pointer; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.library-refine summary span { margin-left: .35rem; color: var(--gold); }
.library-refine form { padding: .2rem 0 .8rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto; gap: .55rem; align-items: end; }
.library-refine label { min-width: 0; display: grid; gap: .25rem; color: var(--muted); font-size: .65rem; font-weight: 750; }
.library-refine select { width: 100%; min-height: 2.7rem; padding: .55rem .65rem; color: var(--ink); border: 1px solid var(--line); border-radius: .25rem; background: #0c1713; }
.library-refine button { min-height: 2.7rem; }
.library-refine form > a { min-height: 2.7rem; padding: .6rem .15rem; display: flex; align-items: center; font-size: .64rem; font-weight: 750; }
.library-index-heading { margin-bottom: .25rem; display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.library-index-heading h2 { font-size: 1.5rem; }
.library-index-heading p { margin: 0; color: var(--muted); font-size: .72rem; }
.library-index-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; border-top: 1px solid var(--line); }
.library-index-entry { min-width: 0; min-height: 7.4rem; padding: .85rem 0; display: grid; grid-template-columns: 5.25rem minmax(0, 1fr) auto; gap: .8rem; align-items: center; border-bottom: 1px solid var(--line); }
.library-index-entry-visual { width: 5.25rem; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; border: 1px solid #423b2e; border-radius: .2rem; background: #0a100d; }
.library-index-entry-visual img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .2s ease; }
.library-index-entry:hover .library-index-entry-visual img { transform: scale(1.035); }
.library-index-entry-visual .library-work-mark { width: 2.15rem; height: 2.85rem; font-size: .85rem; }
.library-index-entry-copy { min-width: 0; }
.library-index-entry-meta { margin: 0; display: flex; flex-wrap: wrap; gap: .2rem .4rem; color: var(--muted); font-size: .55rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.library-index-entry-meta a { color: var(--gold); text-decoration: none; }
.library-index-entry h2 { margin-top: .2rem; font-size: 1.02rem; line-height: 1.18; overflow-wrap: anywhere; }
.library-index-entry h2 a { color: var(--ink); text-decoration: none; }
.library-index-entry h2 a:hover { color: var(--gold-soft); }
.library-index-entry-credit { margin: .28rem 0 0; color: var(--muted); font-size: .68rem; }
.library-index-entry-credit a { font-weight: 750; text-decoration: none; }
.library-index-entry-credit span { font-style: italic; }
.library-index-entry-arrow { color: #786d59; font-size: .9rem; transition: color .15s ease, transform .15s ease; }
.library-index-entry:hover .library-index-entry-arrow { color: var(--gold); transform: translateX(.15rem); }
.library-author-works { margin-top: 1rem; }

.library-reader-page { width: min(78rem, calc(100% - 2rem)); }
.library-work-heading { max-width: 66rem; margin: .8rem 0 1.7rem; }
.library-work-kicker { margin: 0 0 .45rem; display: flex; flex-wrap: wrap; gap: .25rem .5rem; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.library-work-kicker a { color: var(--gold); text-decoration: none; }
.library-work-heading h1 { max-width: 20ch; color: #fff2d7; font-size: clamp(2.7rem, 7vw, 5.6rem); line-height: .98; overflow-wrap: anywhere; }
.library-work-byline { margin: .7rem 0 0; color: var(--muted); font-family: Georgia, "Times New Roman", serif; font-size: 1rem; }
.library-work-byline a { font-weight: 750; text-decoration: none; }
.library-reader-toolbar { padding: .58rem .7rem; border-color: #3b443e; border-radius: .3rem .3rem 0 0; background: #0c1512; }
.library-reader-toolbar p { font-size: .68rem; }
.library-reader-toolbar p span { font-size: .62rem; }
.library-reader-toolbar button { min-height: 2.2rem; padding: .4rem .65rem; color: var(--muted); border: 1px solid var(--line); border-radius: .2rem; background: transparent; font-size: .62rem; font-weight: 750; }
.library-reader-toolbar button:hover { color: var(--ink); border-color: var(--gold); }
.library-reader-frame { border-radius: 0 0 .3rem .3rem; }
.library-reader-credit { margin-top: 1.3rem; padding: 1rem 0; border-width: 1px 0; border-color: var(--line); border-radius: 0; background: transparent; }
.library-reader-credit h2 { font-size: 1.15rem; }
.library-reader-navigation { margin: 1.5rem 0 0; }
.library-reader-navigation > a,
.library-reader-navigation > span { border-width: 1px 0; border-radius: 0; background: transparent; }
.library-reader-navigation > a:hover { background: rgb(224 185 104 / .035); }
.library-related { margin-top: 3.2rem; }
.library-related .section-heading { margin-bottom: .65rem; }

.library-author-grid { gap: 0 1.4rem; border-top: 1px solid var(--line); }
.library-author-card { min-height: 4.7rem; padding: .65rem 0; border-width: 0 0 1px; border-radius: 0; background: transparent; }
.library-author-card:hover { border-color: var(--line); background: rgb(255 255 255 / .018); }
.library-author-card .library-author-monogram { width: 2rem; height: 2rem; color: var(--gold-soft); border: 0; border-radius: 0; background: transparent; font-size: 1rem; }

.site-footer {
    width: min(92rem, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem 2rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
}
.site-footer p { margin: .25rem 0; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: end; gap: .75rem; }
.ovie-page-note-row {
    width: min(82rem, calc(100% - 2rem));
    margin: .7rem auto -1.25rem;
}
.ovie-page-note {
    width: fit-content;
    max-width: min(36rem, 100%);
    min-width: 0;
    padding: .32rem .5rem;
    display: flex;
    align-items: center;
    gap: .48rem;
    border: 1px solid var(--line);
    border-radius: .4rem;
    background: rgb(8 17 14 / .44);
}
.ovie-page-note img { width: 2.75rem; height: 2.75rem; flex: 0 0 2.75rem; object-fit: contain; }
.ovie-page-note div { min-width: 0; }
.ovie-page-note small { display: block; color: var(--gold); font-size: .56rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ovie-page-note p { min-width: 0; margin-top: .12rem; color: var(--ink-soft); font-family: Georgia, "Times New Roman", serif; font-size: .72rem; line-height: 1.35; }
.ovie-page-note span { color: var(--gold-soft); white-space: nowrap; }
.quest-ovie-plan { margin: 1rem 0 1.15rem; }
.catalog-revision { grid-column: 1 / -1; font-size: .72rem; }

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 78rem) {
    .map-heading-grid { grid-template-columns: 1fr; gap: .8rem; }
    .map-heading-grid .detail-header { padding-bottom: .5rem; }
}

@media (max-width: 72rem) {
    .header-inner { grid-template-columns: 1fr auto; gap: .75rem; }
    .header-actions { grid-column: 2; grid-row: 1; }
    .nav-toggle { display: inline-flex; }
    .site-navigation {
        position: absolute;
        z-index: 55;
        top: calc(100% + .4rem);
        right: max(1rem, calc((100% - 88rem) / 2));
        width: min(38rem, calc(100% - 2rem));
        max-height: calc(100dvh - 5.5rem);
        padding: .7rem;
        display: none;
        grid-template-columns: minmax(0, 1fr);
        gap: .4rem;
        overflow-y: auto;
        border: 1px solid var(--line-strong);
        border-radius: .85rem;
        background: #0c1713;
        box-shadow: var(--shadow);
    }
    .site-navigation[data-open="true"] { display: grid; animation: header-panel-in .14s ease-out; }
    .site-navigation > a,
    .nav-group > summary { min-width: 0; min-height: 3.65rem; padding: .65rem; display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: .6rem; border: 1px solid transparent; background: rgb(18 32 27 / .58); }
    .site-navigation > a { grid-template-columns: 2rem minmax(0, 1fr); }
    .site-navigation > a:hover,
    .site-navigation > a[aria-current="page"],
    .nav-group > summary:hover,
    .nav-group[open] > summary,
    .nav-group.is-current > summary { border-color: var(--line); }
    .site-navigation > a[aria-current="page"],
    .nav-group.is-current > summary { box-shadow: inset 3px 0 var(--gold); }
    .nav-group-menu,
    .nav-group-database .nav-group-menu,
    .nav-group-tools .nav-group-menu {
        position: static;
        width: auto;
        margin-top: .35rem;
        padding: .35rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-color: var(--line);
        border-radius: .6rem;
        background: rgb(7 16 13 / .42);
        box-shadow: none;
        transform: none;
    }
    .nav-group-menu a { min-height: 3.4rem; padding: .55rem; grid-template-columns: 2rem minmax(0, 1fr); }
    .site-navigation .nav-item-icon { width: 2rem; height: 2rem; border-radius: .5rem; background: rgb(224 185 104 / .1); }
    .site-navigation .nav-item-icon .site-icon { width: 1.05rem; height: 1.05rem; }
    .site-navigation .nav-item-copy small { display: block; }
    .site-navigation .site-action-link { margin-left: 0; text-align: left; }
    .site-navigation .site-play-link { grid-template-columns: 2rem minmax(0, 1fr); }
    html[data-navigation-open] { overflow: hidden; }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .library-shelf-grid,
    .library-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .library-author-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .library-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .library-filters label:first-child { grid-column: span 2; }
    .reference-table { min-width: 58rem; }
    .required-items-tool { grid-template-columns: 1fr; }
    .required-items-summary { position: static; }
    .subpath-tool { grid-template-columns: 1fr; }
    .map-detail-page > .detail-layout { grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr); }
}

@keyframes header-panel-in {
    from { opacity: 0; transform: translateY(-.35rem) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 60rem) {
    .dress-up-layout { grid-template-columns: 1fr; }
    .dress-up-preview { position: static; }
    .dress-up-stage { height: min(55vw, 30rem); }
    .dress-up-stage canvas { width: min(100%, 32rem); }
}

@media (max-width: 48rem) {
    .header-inner { width: min(100% - 1rem, 92rem); grid-template-columns: 1fr auto; }
    .site-navigation { top: calc(100% + .35rem); right: .5rem; width: calc(100% - 1rem); }
    .site-header .header-search { position: fixed; top: 4.75rem; left: .5rem; right: .5rem; width: auto; max-height: calc(100dvh - 5.25rem); margin: 0; overflow-y: auto; }
    .site-header .search-suggestions { position: static; margin-top: .65rem; max-height: 38vh; }
    .header-search-options { display: block; }
    .header-search-options .search-shortcut-hint { display: none; }
    .search-types-compact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .search-types-compact label { min-width: 0; }
    html[data-search-open] { overflow: hidden; }
    .page-shell { width: min(100% - 1rem, 82rem); }
    .page-shell { padding-top: 1.75rem; }
    .library-page { width: min(100% - 1rem, 88rem); }
    .library-hero { min-height: 0; margin-bottom: 2rem; grid-template-columns: 1fr; }
    .library-hero-copy { padding: 1.35rem 1.1rem; }
    .library-hero-copy h1 { font-size: clamp(2.5rem, 14vw, 4rem); }
    .library-hero-copy > p { font-size: .9rem; }
    .library-hero-search { margin-top: 1.2rem; }
    .library-home-links { display: grid; gap: .5rem; }
    .library-totals { margin-top: 1.35rem; gap: .7rem 1.25rem; }
    .library-ovie { min-height: 20rem; border-top: 1px solid rgb(255 225 160 / .14); }
    .library-ovie img { width: min(17rem, 72%); }
    .library-ovie blockquote { right: .7rem; bottom: 1.2rem; font-size: .78rem; }
    .library-gallery { margin-bottom: 2.5rem; }
    .library-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 13rem; }
    .library-gallery-piece,
    .library-gallery-piece:nth-child(n) { grid-column: span 1; grid-row: span 1; }
    .library-gallery-piece:first-child { grid-column: 1 / -1; }
    .library-shelves { margin-bottom: 2.4rem; }
    .library-shelf-grid,
    .library-work-grid { grid-template-columns: 1fr; }
    .library-shelf { min-height: 7.5rem; }
    .library-shelf-spine { height: 5.55rem; }
    .library-filters { margin-inline: -.5rem; padding: .7rem .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); border-width: 1px 0; border-radius: 0; }
    .library-filters label:first-child { grid-column: 1 / -1; }
    .library-filters button,
    .library-filters .button { grid-row: auto; }
    .library-work { min-height: 19rem; }
    .library-provenance { margin-top: 2.5rem; padding: 1rem; grid-template-columns: 1fr; gap: .8rem; }
    .library-provenance nav { grid-column: 1; }
    .library-author-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .library-author-hero { grid-template-columns: 4rem minmax(0, 1fr); padding: .85rem; }
    .library-author-hero .library-author-monogram { width: 4rem; height: 4rem; }
    .library-author-hero .button { grid-column: 1 / -1; }
    .library-reader-page { width: min(100% - 1rem, 96rem); }
    .library-reader-heading { grid-template-columns: 3rem minmax(0, 1fr); padding: .85rem; }
    .library-reader-heading .library-work-mark { width: 3rem; height: 4rem; }
    .library-reader-heading .button { grid-column: 1 / -1; }
    .library-reader-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .library-reader-navigation .library-reader-navigation-all { grid-column: 1 / -1; grid-row: 2; min-height: 2.8rem; }
    .library-reader-toolbar { align-items: stretch; flex-direction: column; }
    .library-reader-toolbar .button { width: 100%; }
    .library-reader-frame { min-height: 30rem; height: 72dvh; }
    .library-reader-credit { grid-template-columns: 1fr; }
    .library-reader-credit nav { justify-content: start; }
    .library-browse-page { width: min(100% - 1rem, 76rem); }
    .library-browse-heading { margin-bottom: 1.5rem; }
    .library-collection-nav { gap-inline: .85rem; }
    .library-browse-search { grid-template-columns: minmax(0, 1fr) auto; }
    .library-browse-search > a { grid-column: 1 / -1; padding-top: 0; }
    .library-refine form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .library-refine button,
    .library-refine form > a { min-width: 0; }
    .library-index-list { grid-template-columns: 1fr; column-gap: 0; }
    .library-reader-toolbar button { width: 100%; }
    .library-work-heading { margin-top: .5rem; }
    .library-work-heading h1 { font-size: clamp(2.5rem, 12vw, 4.4rem); }
    .database-page { padding-top: 1rem; padding-bottom: 3rem; }
    .card-grid, .calculator-grid, .tool-workspace-grid { grid-template-columns: 1fr; }
    .filters { margin-bottom: .85rem; padding: .65rem 0; grid-template-columns: 1fr; border-width: 1px 0; border-radius: 0; background: transparent; }
    .page-heading, .detail-layout { grid-template-columns: 1fr; }
    .page-count { white-space: normal; }
    .database-page .page-heading { margin-bottom: .9rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .2rem .7rem; }
    .database-page .page-heading > div { min-width: 0; display: contents; }
    .database-page .page-heading .eyebrow { grid-column: 1 / -1; }
    .database-page .page-heading h1 { grid-column: 1; }
    .database-page .page-heading .page-intro { grid-column: 1 / -1; }
    .database-page .page-heading .page-count { grid-column: 2; grid-row: 2; }
    .database-page .page-heading h1 { font-size: clamp(1.75rem, 9vw, 2.45rem); }
    .database-page .page-heading .eyebrow { margin-bottom: .3rem; }
    .database-page .page-heading .page-intro { margin-top: .35rem; font-size: .84rem; line-height: 1.45; }
    .database-page .page-count { padding-bottom: .2rem; color: var(--gold-soft); font-size: .72rem; white-space: nowrap; }
    .database-page .filters { margin-bottom: .85rem; padding: .65rem 0; border-width: 1px 0; border-radius: 0; background: transparent; }
    .database-search { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: .45rem; }
    .database-search label { grid-column: 1 / -1; }
    .database-search button,
    .database-search .button { min-height: 2.65rem; }
    .database-search button:last-child { grid-column: 1 / -1; }
    .drop-filters { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: .55rem; }
    .drop-filters label:nth-of-type(3) { grid-column: 1 / -1; }
    .drop-filters button,
    .drop-filters .button { min-height: 2.65rem; }
    .site-footer { width: min(100% - 1rem, 92rem); grid-template-columns: 1fr; }
    .site-footer nav { justify-content: start; }
    .ovie-page-note-row { width: min(100% - 1rem, 92rem); margin-bottom: -.85rem; }
    .catalog-revision { grid-column: auto; }
    .public-world-shouts { width: min(100% - 1rem, 68rem); }
    .world-shout-ovie { grid-template-columns: 4.75rem minmax(0, 1fr); }
    .world-shout-ovie-art { height: 5.75rem; }
    .world-shout-ovie-art img { width: 4.35rem; }
    .world-shout-filters,
    .aisling-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .world-shout-filters label:first-child,
    .aisling-filters label:first-child { grid-column: 1 / -1; }
    .world-shout-filters button,
    .world-shout-filters .button,
    .aisling-filters button,
    .aisling-filters .button { min-height: 2.65rem; }
    .world-shout-entry { grid-template-columns: 1fr; gap: .25rem; }
    .world-shout-entry header { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
    .world-shout-entry time { white-space: nowrap; }
    .ovie-welcome { grid-template-columns: 8.5rem minmax(0, 1fr); }
    .ovie-portrait { grid-row: 1 / span 2; min-height: 15rem; }
    .ovie-portrait img { width: 8.25rem; }
    .ovie-intro { padding: .9rem 1rem .5rem; }
    .ovie-quote { grid-column: 2; margin: 0 1rem 1rem; }
    .home-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-stat-grid, .home-start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-stat-grid a:nth-child(odd) { border-left: 0; }
    .home-stat-grid a:nth-child(even) { border-left: 1px solid var(--line); }
    .home-stat-grid a:nth-child(n + 3) { border-top: 1px solid var(--line); }
    .reference-directory { grid-template-columns: 1fr; }
    .reference-directory section + section { border-left: 0; border-top: 1px solid var(--line); }
    .class-index-grid, .wiki-split { grid-template-columns: 1fr; }
    .reference-title { align-items: start; flex-direction: column; }
    .aisling-directory .reference-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .15rem .7rem; }
    .aisling-directory .reference-title > div { min-width: 0; display: contents; }
    .aisling-directory .reference-title h1 { grid-column: 1; font-size: 2rem; }
    .aisling-directory .reference-title p { grid-column: 1 / -1; font-size: .78rem; }
    .aisling-directory .reference-title > span { grid-column: 2; grid-row: 1; color: var(--gold-soft); }
    .aisling-profile-layout { grid-template-columns: 1fr; }
    .learnable-index .reference-title { margin-bottom: .6rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .15rem .7rem; }
    .learnable-index .reference-title > div { min-width: 0; display: contents; }
    .learnable-index .reference-title h1 { grid-column: 1; font-size: 2rem; }
    .learnable-index .reference-title p { grid-column: 1 / -1; margin-top: .2rem; font-size: .78rem; line-height: 1.4; }
    .learnable-index .reference-title > span { grid-column: 2; grid-row: 1; padding-bottom: .15rem; color: var(--gold-soft); }
    .quest-index .reference-title { margin-bottom: .7rem; }
    .quest-index .reference-title h1 { font-size: 2rem; }
    .quest-index .reference-title p { font-size: .9rem; line-height: 1.45; }
    .quest-index .reference-note summary { min-height: 2.75rem; padding: .55rem .7rem; }
    .quest-index .reference-note summary span { font-size: .63rem; }
    .quest-index .reference-note p { padding: 0 .7rem .7rem; font-size: .78rem; }
    .quest-index .data-table-wrap { border-width: 1px 0; border-radius: 0; overflow: visible; }
    .learnable-detail-header { align-items: start; flex-direction: column; }
    .detail-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: start; }
    .detail-actions .button { min-height: 2.5rem; padding: .55rem .65rem; font-size: .72rem; }
    .learnable-detail-title > .catalog-icon { width: 4.5rem; height: 4.5rem; flex-basis: 4.5rem; padding: .12rem; }
    .entity-detail-title { gap: .75rem; align-items: center; }
    .entity-detail-art { width: 4.75rem; height: 4.75rem; flex-basis: 4.75rem; }
    .creature-detail-art { width: 6.25rem; height: 6.25rem; flex-basis: 6.25rem; }
    .entity-detail-title .eyebrow { margin-bottom: .3rem; font-size: .65rem; }
    .entity-detail-title h1 { font-size: clamp(1.75rem, 9vw, 2.5rem); }
    .entity-detail-title .page-intro { margin-top: .35rem; font-size: .86rem; line-height: 1.45; }
    .breadcrumb { margin-bottom: .65rem; padding-bottom: .2rem; flex-wrap: nowrap; overflow-x: auto; font-size: .72rem; scrollbar-width: none; white-space: nowrap; }
    .breadcrumb::-webkit-scrollbar { display: none; }
    .detail-header { margin-bottom: .5rem; padding-bottom: .9rem; }
    .detail-layout { gap: 0; }
    .quest-sidebar { position: static; }
    .quest-detail-layout { display: flex; flex-direction: column; }
    .quest-detail-layout .quest-sidebar { order: -1; margin-bottom: .75rem; }
    .detail-layout.quest-detail-layout .quest-reward-card { padding: .85rem; border: 1px solid var(--line); border-radius: .55rem; background: linear-gradient(145deg, rgb(25 42 35 / .82), rgb(8 18 14 / .82)); }
    .quest-detail-header { align-items: flex-start; flex-direction: column; gap: .5rem; }
    .quest-detail-header > span { white-space: normal; }
    .detail-layout .panel { margin: 0; padding: .9rem 0; border-width: 1px 0 0; border-radius: 0; background: transparent; }
    .detail-layout .panel + .panel { margin-top: 0; }
    .detail-layout .panel h2 { margin-bottom: .55rem; font-family: inherit; font-size: 1rem; }
    .detail-layout .fact-grid { gap: 0 .8rem; }
    .detail-layout .fact-grid div { padding: .55rem .1rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
    .detail-layout .fact-grid dt { font-size: .61rem; }
    .detail-layout .fact-grid dd { margin-top: .1rem; font-size: .85rem; line-height: 1.4; }
    .knowledge-related-topics { grid-template-columns: 1fr; }
    .knowledge-detail-block summary { align-items: flex-start; flex-direction: column; gap: .2rem; }
    .knowledge-detail-table-wrap { margin-inline: 0; overflow: visible; }
    .knowledge-detail-table { min-width: 0; display: block; background: transparent; }
    .knowledge-detail-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .knowledge-detail-table tbody { padding: .45rem; display: grid; gap: .45rem; }
    .knowledge-detail-table tr { padding: .35rem .55rem; display: block; border: 1px solid var(--line); border-radius: .4rem; background: rgb(7 16 13 / .45); }
    .knowledge-detail-table td { width: auto; min-width: 0; padding: .3rem 0; display: grid; grid-template-columns: minmax(6.4rem, .58fr) minmax(0, 1fr); gap: .55rem; border: 0; border-bottom: 1px solid rgb(68 91 81 / .4); overflow-wrap: anywhere; }
    .knowledge-detail-table td:last-child { border-bottom: 0; }
    .knowledge-detail-table td:empty { display: none; }
    .knowledge-detail-table td::before { content: attr(data-label); color: var(--muted); font-size: .57rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
    .guide-item-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .guide-item-tile { min-height: 3.55rem; grid-template-columns: 2.3rem minmax(0, 1fr); }
    .guide-item-art { width: 2.3rem; height: 2.3rem; }
    .guide-item-art .catalog-icon { width: 2.05rem; height: 2.05rem; flex-basis: 2.05rem; }
    .guide-steps { gap: .45rem; }
    .guide-steps li { padding: .7rem .7rem .7rem 2.8rem; font-size: .82rem; }
    .guide-steps li::before { top: .62rem; left: .58rem; width: 1.65rem; height: 1.65rem; }
    .quest-index-heading { align-items: flex-start; flex-direction: column; gap: .3rem; }
    .quest-index-heading > span { white-space: normal; }
    .quest-stage-links { margin-inline: -.5rem; padding-inline: .5rem; }
    .quest-card-grid { grid-template-columns: 1fr; }
    .quest-index-card { padding: .75rem; }
    .quest-index-card footer { align-items: flex-start; flex-direction: column; gap: .35rem; }
    .knowledge-hub { width: min(100% - 1rem, 86rem); }
    .knowledge-hub-hero { min-height: 7.5rem; padding: .8rem; grid-template-columns: minmax(0, 1fr) 5rem; }
    .knowledge-hub-hero h1 { font-size: 2.25rem; }
    .knowledge-hub-hero p { font-size: .78rem; line-height: 1.4; }
    .knowledge-hub-hero img { width: 5rem; height: 6.5rem; }
    .knowledge-hub-counts { gap: .25rem .65rem; }
    .knowledge-core-guide-grid, .knowledge-shelf-grid { margin-inline: -.5rem; padding: 0 .5rem .35rem; display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
    .knowledge-core-guide { min-width: min(16rem, 82vw); min-height: 8.5rem; scroll-snap-align: start; }
    .knowledge-shelf { min-width: min(14rem, 75vw); min-height: 6.7rem; scroll-snap-align: start; }
    .knowledge-topic-grid { grid-template-columns: 1fr; }
    .knowledge-topic-card { min-height: 0; padding: .75rem; }
    .knowledge-topic-card p { margin-bottom: .55rem; }
    .knowledge-article-heading { grid-template-columns: minmax(0, 1fr) 2.8rem; gap: .7rem; }
    .knowledge-article-heading > span { width: 2.8rem; height: 2.8rem; }
    .knowledge-article-icon { width: 1.4rem; height: 1.4rem; }
    .knowledge-article-nav { margin-inline: -.5rem; padding-inline: .5rem; }
    .directory-index .reference-title { margin-bottom: .6rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .15rem .7rem; }
    .directory-index .reference-title > div { min-width: 0; display: contents; }
    .directory-index .reference-title h1 { grid-column: 1; font-size: 2rem; }
    .directory-index .reference-title p { grid-column: 1 / -1; margin-top: .2rem; font-size: .78rem; line-height: 1.4; }
    .directory-index .reference-title > span { grid-column: 2; grid-row: 1; padding-bottom: .15rem; color: var(--gold-soft); }
    .directory-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
    .directory-search-field { grid-column: 1 / -1; }
    .directory-filters [data-directory-count] { min-width: 0; justify-self: start; text-align: left; }
    .directory-filters button { min-height: 2.65rem; }
    .directory-table-wrap { margin-inline: -.5rem; border-width: 1px 0; border-radius: 0; overflow: visible; }
    .directory-table { min-width: 0; display: block; background: transparent; }
    .directory-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .directory-table tbody { display: block; }
    .directory-table tr { padding: .65rem .05rem; display: block; border-bottom: 1px solid var(--line); background: transparent !important; }
    .directory-table tr:last-child { border-bottom: 0; }
    .directory-table td,
    .directory-table td:first-child,
    .directory-table td:nth-child(2),
    .directory-table td:nth-child(3),
    .directory-table td:nth-child(4),
    .directory-table td:nth-child(5) { width: auto; min-width: 0; padding: .22rem 0; display: grid; grid-template-columns: 7.1rem minmax(0, 1fr); gap: .55rem; border: 0; overflow-wrap: anywhere; }
    .directory-table td::before { content: attr(data-label); color: var(--muted); font-size: .58rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
    .directory-table .directory-primary { padding-bottom: .4rem; display: block; border-bottom: 1px solid rgb(41 64 56 / .7); }
    .directory-table .directory-primary::before { display: none; }
    .directory-table .directory-primary > a { font-family: Georgia, "Times New Roman", serif; font-size: 1.02rem; }
    .directory-link-list { display: flex; flex-wrap: wrap; gap: .15rem .65rem; }
    .required-items-controls { grid-template-columns: 1fr; }
    .subpath-checklist { grid-template-columns: 1fr; }
    .subnav { flex-wrap: nowrap; margin-inline: -.5rem; padding: 0 .5rem .35rem; overflow-x: auto; scrollbar-width: thin; }
    .subnav a { flex: 0 0 auto; padding: .38rem .6rem; font-size: .78rem; }
    .item-index .reference-title { margin-bottom: .6rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .15rem .7rem; }
    .item-index .reference-title > div { min-width: 0; display: contents; }
    .item-index .reference-title h1 { grid-column: 1; font-size: 2rem; }
    .item-index .reference-title p { grid-column: 1 / -1; margin-top: .2rem; font-size: .78rem; line-height: 1.4; }
    .item-index .reference-title > span { grid-column: 2; grid-row: 1; padding-bottom: .15rem; color: var(--gold-soft); }
    .item-group-tabs { flex-wrap: nowrap; margin-inline: -.5rem; padding: 0 .5rem .35rem; overflow-x: auto; scrollbar-width: thin; }
    .item-group-tabs a { flex: 0 0 auto; }
    .item-reference-wrap { margin-inline: -.5rem; border-width: 1px 0; border-radius: 0; }
    .item-reference-table th:first-child,
    .item-reference-table td:first-child { width: 12.5rem; min-width: 12.5rem; }
    .monster-index .reference-title { margin-bottom: .6rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .15rem .7rem; }
    .monster-index .reference-title > div { min-width: 0; display: contents; }
    .monster-index .reference-title h1 { grid-column: 1; font-size: 2rem; }
    .monster-index .reference-title p { grid-column: 1 / -1; margin-top: .2rem; font-size: .78rem; line-height: 1.4; }
    .monster-index .reference-title > span { grid-column: 2; grid-row: 1; padding-bottom: .15rem; color: var(--gold-soft); }
    .monster-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
    .monster-search-field { grid-column: 1 / -1; }
    .monster-filters button,
    .monster-filters .button { min-height: 2.65rem; }
    .monster-reference-wrap { margin-inline: -.5rem; border-width: 1px 0; border-radius: 0; }
    .monster-reference-table th:first-child,
    .monster-reference-table td:first-child { width: 13.5rem; min-width: 13.5rem; }
    .monster-name-cell { grid-template-columns: 3.75rem minmax(0, 1fr); gap: .55rem; }
    .monster-table-art { width: 3.75rem; height: 3.75rem; }
    .class-path-form { max-width: none; }
    .learnable-class-controls { grid-template-columns: minmax(0, 1fr); }
    .class-stage-tabs { margin-inline: -.5rem; padding-inline: .5rem; }
    .shared-hunts-page.hunts-page { width: min(100% - 1rem, 78rem); padding-top: 1rem; }
    .hunts-page-heading { align-items: start; flex-direction: column; gap: .65rem; }
    .hunts-page-actions { justify-content: flex-start; }
    .templates-page { width: min(100% - 1rem, 88rem); padding-top: 1rem; }
    .templates-page-heading { align-items: start; flex-direction: column; gap: .65rem; }
    .templates-page-actions { justify-content: flex-start; }
    .account-template-workspace { grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr); }
    .account-template-editor-heading { align-items: start; flex-direction: column; }
    .account-template-toolbar { width: 100%; justify-content: flex-start; }
    .account-template-setting-grid { grid-template-columns: minmax(0, 1fr); }
    .hunt-workspace-summary { grid-template-columns: minmax(12rem, 1fr) minmax(7rem, .8fr) auto 1rem; }
    .hunt-workspace-panel-bar { align-items: start; }
    .hunt-workspace-links { flex: 1 1 auto; justify-content: flex-end; }
    .hunt-workspace-content { padding: .65rem; }
    .hunt-runtime-settings { grid-template-columns: 1fr; }
    .hunt-character-grid { grid-template-columns: minmax(0, 1fr); }
    .hunt-workspace-panel { width: min(100% - .75rem, 72rem); max-height: calc(100dvh - .75rem); }
    .hunt-workspace-dialog-shell { max-height: calc(100dvh - .75rem); }
    .hunt-manage-dialog { width: min(100% - .75rem, 34rem); max-height: calc(100dvh - .75rem); }
    .hunt-manage-shell { max-height: calc(100dvh - .75rem); }
    .hunt-manage-heading { padding: .8rem; }
    .hunt-manage-status { padding-inline: .8rem; }
    .hunt-manage-content { padding: .3rem .8rem .8rem; }
    .index-switch { width: 100%; margin-bottom: .5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
    .index-switch a { min-width: 0; min-height: 2.45rem; display: grid; place-items: center; padding: .35rem .5rem; }
    .record-grid { gap: 0; border-block: 1px solid var(--line); }
    .catalog-record,
    .catalog-record.has-record-art { min-height: 5.5rem; padding: .7rem .15rem; grid-template-columns: minmax(0, 1fr); gap: .75rem; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
    .catalog-record.has-record-art { grid-template-columns: 4rem minmax(0, 1fr); }
    .catalog-record:last-child { border-bottom: 0; }
    .catalog-record-art { width: 4rem; height: 4rem; border-color: var(--line-strong); }
    .creature-record-art { height: 4.75rem; align-self: center; }
    .catalog-record-kicker { font-size: .59rem; }
    .catalog-record h2 { margin-top: .1rem; font-size: 1.05rem; }
    .catalog-record p { margin-top: .18rem; font-size: .72rem; }
    .map-picker { grid-template-columns: 1fr; }
    .map-picker form { grid-template-columns: minmax(0, 1fr) auto; }
    .map-detail-page > .detail-layout { grid-template-columns: 1fr; }
    .map-visual-panel .section-heading { align-items: start; flex-direction: column; }
    .map-viewer-stats { justify-content: flex-start; }
    .map-viewport { height: min(64vh, 34rem); min-height: 22rem; }
    .dress-up-page { width: min(100% - 1rem, 94rem); }
    .dress-up-hero { padding: .9rem; grid-template-columns: 1fr; gap: .85rem; }
    .dress-up-hero p { font-size: .86rem; }
    .dress-up-hero-metrics div { padding: .55rem .25rem; }
    .dress-up-layout { grid-template-columns: 1fr; }
    .dress-up-preview { position: static; }
    .dress-up-stage { height: min(76vw, 25rem); }
    .dress-up-stage canvas { width: min(100%, 29rem); }
    .dress-up-gallery { grid-template-columns: repeat(auto-fill, minmax(7.4rem, 1fr)); }

    .reference-table-wrap { border: 0; overflow: visible; }
    .reference-table { min-width: 0; background: transparent; }
    .reference-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .reference-table, .reference-table tbody, .reference-table tr, .reference-table td { display: block; width: 100%; }
    .reference-table tr { margin: 0; padding: .6rem 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
    .reference-table td,
    .reference-table td:nth-child(2),
    .reference-table td:nth-child(4),
    .reference-table td:nth-child(5),
    .reference-table td:nth-child(6) { min-width: 0; padding: .22rem 0; display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: .5rem; border: 0; }
    .reference-table td::before { content: attr(data-label); color: var(--muted); font-size: .64rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
    .reference-table .reference-name { min-width: 0; padding-bottom: .35rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
    .reference-table .reference-name::before { align-self: center; }

    .learnable-table-wrap { border-block: 1px solid var(--line); }
    .learnable-table tr { padding: .7rem .1rem; content-visibility: auto; contain-intrinsic-size: auto 10rem; }
    .learnable-table tr:last-child { border-bottom: 0; }
    .learnable-table td:not(.reference-name) { display: none !important; }
    .learnable-table .reference-name { padding: 0; display: block; border: 0; }
    .learnable-table .reference-name::before { content: none; display: none; }
    .reference-mobile-primary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; align-items: start; }
    .learnable-table .catalog-name { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: .7rem; align-items: center; }
    .learnable-table .catalog-icon { width: 4rem; min-width: 4rem; max-width: 4rem; height: 4rem; min-height: 4rem; max-height: 4rem; flex-basis: 4rem; padding: .1rem; border-color: var(--line-strong); }
    .learnable-table .catalog-name a { font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; line-height: 1.2; text-decoration-thickness: .06rem; }
    .reference-mobile-context { margin-top: .25rem !important; display: block !important; overflow: hidden; color: var(--muted); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .65rem !important; font-weight: 550; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
    .reference-mobile-level { min-width: 3.3rem; padding-top: .15rem; display: grid; justify-items: end; color: var(--gold-soft); font-size: .74rem; font-variant-numeric: tabular-nums; }
    .reference-mobile-level small { margin: 0 0 .08rem; color: var(--muted); font-size: .55rem; font-weight: 750; letter-spacing: .03em; text-transform: uppercase; }
    .reference-mobile-details { margin: .45rem 0 0 4.7rem; display: block; }
    .reference-mobile-details dl { margin: 0; padding: .2rem 0 .05rem; border-top: 1px solid var(--line); }
    .reference-mobile-details dl div { padding: .35rem 0; display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .55rem; border-bottom: 1px solid var(--line); }
    .reference-mobile-details dl div:last-child { border-bottom: 0; }
    .reference-mobile-details dt { color: var(--muted); font-size: .57rem; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
    .reference-mobile-details dd { margin: 0; overflow-wrap: anywhere; font-size: .72rem; font-weight: 550; }
    .reference-mobile-details dd small { margin-top: .1rem; color: var(--muted); font-size: .62rem; }

    .database-table-wrap { border-width: 1px 0; border-radius: 0; overflow: visible; }
    .database-table { min-width: 0; display: block; background: transparent; }
    .database-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .database-table tbody { display: block; }
    .database-table tr { padding: .65rem 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .8rem; border-bottom: 1px solid var(--line); }
    .database-table tr:last-child { border-bottom: 0; }
    .database-table td { min-width: 0; padding: 0; display: block; border: 0; overflow-wrap: anywhere; font-size: .78rem; }
    .database-table td::before { content: attr(data-label); display: block; margin-bottom: .05rem; color: var(--muted); font-size: .57rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
    .database-table .database-primary { grid-column: 1 / -1; padding-bottom: .35rem; border-bottom: 1px solid rgb(41 64 56 / .7); font-size: .92rem; font-weight: 700; }
    .database-table .database-primary::before { display: none; }
    .database-table .catalog-name { gap: .65rem; }
    .database-table .catalog-icon { width: 3.5rem; height: 3.5rem; flex-basis: 3.5rem; padding: .08rem; border-color: var(--line-strong); }
    .wiki-home .compact-reference { min-width: 0; font-size: .7rem; }
    .wiki-home .compact-reference th,
    .wiki-home .compact-reference td { padding: .35rem .4rem; }
    .wiki-home .compact-reference .catalog-icon { width: 2.5rem; height: 2.5rem; flex-basis: 2.5rem; padding: .06rem; border-color: var(--line-strong); }
    .search-page { width: min(100% - 1rem, 72rem); }
    .search-page-heading { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
    .search-page-heading .page-count { white-space: nowrap; }
    .search-workspace { padding: .7rem; }
    .search-filter-heading { align-items: baseline; }
    .search-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .search-types label { min-width: 0; padding-inline: .5rem; }
    .search-start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search-result { grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: .65rem; }
}

@media (max-width: 40rem) {
    .templates-page { width: min(100% - 1rem, 88rem); padding-top: .8rem; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
    .templates-page-heading { align-items: start; }
    .templates-page-heading > div > p:last-child { font-size: .76rem; }
    .templates-page-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .templates-page-actions .button { min-width: 0; justify-content: center; }
    .account-template-workspace { display: block; }
    .account-template-workspace[data-template-mobile-mode="pick"] .account-template-editor,
    .account-template-workspace[data-template-mobile-mode="edit"] .account-template-characters { display: none; }
    .account-template-characters { position: static; max-height: none; padding: .65rem; grid-template-rows: auto auto minmax(0, 1fr); }
    .account-template-mobile-step { display: grid; gap: .2rem; padding: .1rem .05rem .25rem; }
    .account-template-mobile-step > div,
    .account-template-mobile-nav { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
    .account-template-mobile-step strong { font-size: .9rem; }
    .account-template-mobile-step span,
    .account-template-mobile-nav > span { color: var(--muted); font-size: .58rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
    .account-template-mobile-step small { color: var(--muted); font-size: .68rem; }
    .account-template-character-list { max-height: calc(100dvh - 18rem); min-height: 16rem; -webkit-overflow-scrolling: touch; }
    .account-template-character { min-height: 3.65rem; padding: .58rem .62rem; }
    .account-template-character-heading strong { font-size: .84rem; }
    .account-template-editor { overflow: visible; }
    .account-template-editor-heading { position: static; padding: .65rem; display: grid; gap: .65rem; }
    .account-template-mobile-nav { width: 100%; margin-bottom: .25rem; }
    .account-template-mobile-nav .button { min-height: 2.5rem; }
    .account-template-toolbar { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-template-toolbar > label:not(.account-template-default-toggle) { min-width: 0; grid-column: 1 / -1; }
    .account-template-toolbar .button,
    .account-template-default-toggle { min-width: 0; min-height: 2.75rem; justify-content: center; white-space: normal; }
    .account-template-search-row { padding: .6rem .65rem; align-items: stretch; flex-direction: column; }
    .account-template-search-row label { width: 100%; }
    .account-template-search-row > div { justify-content: space-between; }
    .account-template-search-row input,
    .account-template-toolbar select,
    .account-template-setting :where(input, select, textarea),
    .account-template-filter input { font-size: 1rem; }
    .account-template-tabs { margin-inline: 0; padding: .55rem .65rem 0; gap: .3rem; overscroll-behavior-x: contain; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
    .account-template-tab { min-height: 2.75rem; scroll-snap-align: start; }
    .account-template-settings { padding: .6rem .65rem 6.2rem; }
    .account-template-setting-grid { grid-template-columns: minmax(0, 1fr); }
    .account-template-setting { min-height: 4.4rem; }
    .account-template-setting.is-boolean { min-height: 3.6rem; }
    .account-template-setting.is-boolean input { width: 1.3rem; height: 1.3rem; }
    .account-template-save-bar { position: fixed; right: .45rem; bottom: 0; left: .45rem; z-index: 34; min-height: 0; margin: 0; padding: .48rem .5rem calc(.48rem + env(safe-area-inset-bottom)); align-items: stretch; flex-direction: column; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: .65rem .65rem 0 0; background: rgb(10 21 17 / .96); backdrop-filter: blur(12px); }
    .account-template-save-bar > span { display: none; }
    .account-template-save-bar > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-template-save-bar .button { min-width: 0; min-height: 2.75rem; justify-content: center; }
}

@media (max-width: 34rem) {
    .site-profile-copy,
    .site-profile-chevron { display: none; }
    .site-profile-menu summary { padding: .3rem; }
}

@media (max-width: 36rem) {
    .search-types,
    .search-types-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hunt-workspace-summary { grid-template-columns: minmax(0, 1fr) auto 1rem; gap: .45rem .65rem; }
    .hunt-workspace-member-names { white-space: normal; }
    .hunt-workspace-title { grid-column: 1; }
    .hunt-summary-members { grid-column: 1 / -1; grid-row: 2; }
    .hunt-summary-exp { grid-column: 2; grid-row: 1; }
    .hunt-summary-chevron { grid-column: 3; grid-row: 1; }
    .hunt-workspace-panel-bar { align-items: stretch; flex-direction: column; }
    .hunt-workspace-links { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr)); justify-content: stretch; }
    .hunt-workspace-links .button { min-width: 0; justify-content: center; }
    .hunt-team-controls-heading { align-items: stretch; flex-direction: column; }
    .hunt-team-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hunt-team-actions .button { min-width: 0; justify-content: center; }
    .hunt-character { grid-template-columns: minmax(0, 1fr); }
    .hunt-character-side { width: 100%; display: flex; align-items: center; justify-content: space-between; }
    .search-start .section-heading { align-items: start; flex-direction: column; gap: .25rem; }
    .map-picker form { grid-template-columns: 1fr; }
    .map-picker label,
    .map-picker-status,
    .map-picker input,
    .map-picker select,
    .map-picker button { grid-column: 1; grid-row: auto; }
    .map-picker-status { justify-self: start; text-align: left; }
    .map-viewer-toolbar { top: .4rem; right: .4rem; gap: .2rem; }
    .map-viewer-toolbar button { padding-inline: .45rem; }
    .map-viewer-toolbar output { min-width: 3.4rem; }
}

@media (max-width: 30rem) {
    .wordmark small { display: none; }
    .wordmark { gap: .5rem; }
    .wordmark-sigil { width: 2.3rem; }
    .wordmark strong { font-size: .92rem; }
    .nav-toggle { width: 2.75rem; padding: 0; }
    .nav-toggle span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .fact-grid { grid-template-columns: 1fr; }
    .library-hero-actions { display: grid; }
    .library-hero-actions .button { width: 100%; }
    .library-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem .45rem; }
    .library-totals dt { font-size: 1.15rem; }
    .library-totals dd { font-size: .52rem; }
    .library-ovie { min-height: 17rem; }
    .library-ovie img { width: min(14rem, 72%); }
    .library-gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 12rem; }
    .library-gallery-piece:first-child { grid-column: 1; }
    .library-filters { grid-template-columns: 1fr; }
    .library-filters label:first-child,
    .library-filter-actions { grid-column: 1; }
    .library-filter-actions { display: grid; grid-template-columns: 1fr; }
    .library-hero-search { grid-template-columns: 1fr; gap: .4rem; }
    .library-hero-search input,
    .library-hero-search button { min-height: 3.1rem; border: 1px solid #776340; border-radius: .3rem; }
    .library-refine form { grid-template-columns: 1fr; }
    .library-index-entry { grid-template-columns: 4.4rem minmax(0, 1fr) auto; gap: .65rem; }
    .library-index-entry-visual { width: 4.4rem; }
    .library-author-search { grid-template-columns: 1fr 1fr; }
    .library-author-search label { grid-column: 1 / -1; }
    .library-author-grid { grid-template-columns: 1fr; }
    .detail-layout .fact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search-page-heading { grid-template-columns: 1fr; }
    .search-workspace { margin-inline: -.25rem; padding: .55rem; }
    .search-query-row > .site-icon { display: none; }
    .search-query-row { grid-template-columns: minmax(0, 1fr) auto; }
    .search-query-row button,
    .header-search-bar button { padding-inline: .75rem; }
    .search-filter-heading { align-items: start; flex-direction: column; gap: .5rem; }
    .search-start-grid { grid-template-columns: 1fr; }
    .search-result { grid-template-columns: 2.35rem minmax(0, 1fr); gap: .55rem; }
    .search-result-icon { width: 2.35rem; height: 2.35rem; }
    .search-result-arrow { display: none; }
    .drop-filters label { grid-column: 1 / -1; }
    .world-shout-ovie { grid-template-columns: 4rem minmax(0, 1fr); }
    .world-shout-ovie-art { height: 5.25rem; }
    .world-shout-ovie-art img { width: 3.75rem; }
    .world-shout-ovie-copy { padding: .6rem .65rem; }
    .world-shout-ovie-copy > p { font-size: .76rem; }
    .world-shout-feed-heading { align-items: center; }
    .world-shout-feed-heading p { display: none; }
    .world-shout-entry header { align-items: start; flex-direction: column; gap: 0; }
    .world-shout-filters,
    .aisling-filters { grid-template-columns: 1fr; }
    .world-shout-filters label:first-child,
    .aisling-filters label:first-child { grid-column: 1; }
    .aisling-profile-header { grid-template-columns: 3.25rem minmax(0, 1fr); padding: .75rem; gap: .75rem; }
    .aisling-profile-sigil { width: 3.25rem; height: 3.25rem; }
    .aisling-profile-sigil .site-icon { width: 1.55rem; height: 1.55rem; }
    .aisling-identity-list { grid-template-columns: 1fr; }
    .aisling-identity-list div:nth-child(even) { border-left: 0; }
    .aisling-identity-list div + div { border-top: 1px solid var(--line); }
    .ovie-welcome { grid-template-columns: 6.75rem minmax(0, 1fr); }
    .ovie-portrait { grid-row: 1; min-height: 10.5rem; }
    .ovie-portrait img { width: 6.3rem; }
    .ovie-intro { padding: .75rem; }
    .ovie-intro h2 { font-size: 1.25rem; }
    .ovie-intro p { font-size: .78rem; }
    .ovie-quote { grid-column: 1 / -1; margin: 0; border-top: 1px solid var(--line); border-left: 0; background: #08110e; }
    .home-section-grid, .home-start-grid { grid-template-columns: 1fr; }
    .home-section-card { min-height: 0; }
    .home-start-grid a { min-height: 0; }
    .wiki-search > div { grid-template-columns: 1fr; }
    .wiki-search input, .wiki-search button { border-radius: .2rem; }
    .wiki-search button { margin-top: .35rem; }
    .map-viewport { height: 24rem; }
    .dress-up-hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dress-up-hero-metrics div:nth-child(3) { border-left: 0; }
    .dress-up-hero-metrics div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .dress-up-preview,
    .dress-up-wardrobe { padding: .7rem; }
    .dress-up-stage { height: min(92vw, 22rem); }
    .dress-up-stage-tools { right: .3rem; bottom: .3rem; }
    .dress-up-stage-tools label { font-size: 0; }
    .dress-up-stage-tools select { max-width: 7.5rem; font-size: .68rem; }
    .dress-up-transport { grid-template-columns: minmax(0, 1fr) minmax(0, .72fr) auto; }
    .dress-up-transport > button { min-width: 3.8rem; padding-inline: .45rem; }
    .dress-up-direction-pad button { padding-inline: .25rem; font-size: .68rem; }
    .dress-up-body-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dress-up-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
    .dress-up-export-panel { grid-template-columns: 1fr; }
    .dress-up-export-buttons { grid-column: 1; grid-template-columns: 1fr; }
    .dress-up-gallery-heading { align-items: start; }
    .reference-table td,
    .reference-table td:nth-child(2),
    .reference-table td:nth-child(4),
    .reference-table td:nth-child(5),
    .reference-table td:nth-child(6) { grid-template-columns: 6.3rem minmax(0, 1fr); }
}

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

@media print {
    .site-header, .site-footer, .ovie-page-note-row, .pagination { display: none !important; }
    body { color: #111; background: white; }
    .page-shell { width: 100%; padding: 0; }
    .panel, .catalog-card { color: #111; background: white; border-color: #bbb; box-shadow: none; }
    a { color: #111; }
}
