/* Realmora preview: the shared stylesheet.
   Implements the approved "Lantern-lit storybook" kit (docs/design/mockups/KIT.md, Q2-34): tokens with
   measured contrast, light and dark, the three typefaces, the components and the game shell. Patterns
   follow docs/design/prototype (01-css.html). Every color comes from a token below; never hard-code a hex
   in a page. Sections: 1 fonts, 2 tokens, 3 base, 4 preview bar and site chrome, 5 game shell,
   6 components, 7 page layouts, 8 phones, then a section for each page from 9 on (13 holds the pieces the
   fight, quests, bag, items, home, market, guild and console pages share). */

/* ---------- 1. Self-hosted typefaces (SIL Open Font License 1.1; licences in /fonts/) [GC-07] ---------- */
@font-face { font-family: 'Alegreya'; src: url('/fonts/Alegreya-VF.ttf') format('truetype'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url('/fonts/Alegreya-Italic-VF.ttf') format('truetype'); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('/fonts/AlegreyaSans-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('/fonts/AlegreyaSans-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('/fonts/AlegreyaSans-ExtraBold.ttf') format('truetype'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/Fraunces-VF.ttf') format('truetype'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/Fraunces-Italic-VF.ttf') format('truetype'); font-weight: 100 900; font-style: italic; font-display: swap; }

/* ---------- 2. Tokens (KIT section 2; exact values) ---------- */
:root {
  --page: #E9DDC4; --paper: #FCF7EC; --vellum: #F4E9D0; --ink: #2A1A12; --ink-soft: #5E4A38;
  --brass: #A0712A; --red: #8E2A20; --honey: #D9A23A; --dusk: #2E5A66;
  --on-honey: #2A1A12;                       /* ink on a honey fill, 7.3:1 */
  --primary-bg: var(--red); --primary-fg: #FCF7EC; --primary-edge: var(--ink); --primary-lift: var(--ink); --primary-hover: #7A2219;
  --edge: var(--ink); --edge-w: 2px; --lift: var(--ink);
  --link: var(--red); --link-hover: var(--ink); --focus: var(--dusk);
  --health: var(--red); --energy: var(--honey); --xp: var(--dusk);
  --initial-fg: var(--red); --initial-bg: var(--honey);
  --bar-bg: var(--ink); --bar-fg: var(--paper);
  --current-bar: var(--red);
  --wordmark: var(--ink);                    /* honey on dark pages (the dark-surface logo, KIT section 6) */
  --grid-line: color-mix(in srgb, var(--ink-soft) 38%, transparent);
  --fog-line: color-mix(in srgb, var(--ink-soft) 30%, transparent);
  --night-tint: rgba(46, 90, 102, .33);       /* dusk multiply over place pictures at night (Q2-12) */
  --logo-ink: #2A1A12; --logo-wood: #7B4F2E; --logo-brass: #B5832F; --logo-flame: #F2C55C; --logo-ember: #C8502A;
  --logo-stone: #A8916F; --logo-sand: #C9B393; --logo-red: #8E2A20; --logo-honey: #D9A23A; --logo-plate: transparent;
  --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-body: 'Alegreya', Georgia, 'Times New Roman', serif;
  --f-ui: 'Alegreya Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --tabbar-h: 4.25rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #15100C; --paper: #201812; --vellum: #2B2018; --ink: #F4E7CE; --ink-soft: #CDB89A;
    --brass: #C99A45; --red: #E07A62; --honey: #E8B54D; --dusk: #8FB7C2; --on-honey: #15100C;
    --primary-bg: var(--honey); --primary-fg: #15100C; --primary-edge: var(--honey); --primary-lift: var(--brass); --primary-hover: #F0C46A;
    --edge: var(--brass); --edge-w: 1.5px; --lift: var(--brass);
    --link: var(--honey); --link-hover: var(--ink); --initial-fg: var(--honey); --initial-bg: var(--vellum);
    --bar-bg: var(--vellum); --bar-fg: var(--ink); --current-bar: var(--honey); --logo-plate: #FCF7EC; --wordmark: var(--honey);
    --night-tint: rgba(21, 16, 12, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #15100C; --paper: #201812; --vellum: #2B2018; --ink: #F4E7CE; --ink-soft: #CDB89A;
  --brass: #C99A45; --red: #E07A62; --honey: #E8B54D; --dusk: #8FB7C2; --on-honey: #15100C;
  --primary-bg: var(--honey); --primary-fg: #15100C; --primary-edge: var(--honey); --primary-lift: var(--brass); --primary-hover: #F0C46A;
  --edge: var(--brass); --edge-w: 1.5px; --lift: var(--brass);
  --link: var(--honey); --link-hover: var(--ink); --initial-fg: var(--honey); --initial-bg: var(--vellum);
  --bar-bg: var(--vellum); --bar-fg: var(--ink); --current-bar: var(--honey); --logo-plate: #FCF7EC; --wordmark: var(--honey);
  --night-tint: rgba(21, 16, 12, .35);
  color-scheme: dark;
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--f-body); font-size: 1.1875rem; line-height: 1.6;
  font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 600; font-variation-settings: 'SOFT' 100, 'WONK' 1; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(1.5rem, 1.05rem + 1.5vw, 2.375rem); line-height: 1.08; }
h2 { font-size: clamp(1.3125rem, 1.1rem + .6vw, 1.5rem); line-height: 1.2; }
h3 { font-size: 1.25rem; line-height: 1.25; }
h4 { font-size: 1.0625rem; line-height: 1.3; }
a { color: var(--link); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
::placeholder { color: var(--ink-soft); opacity: 1; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }
svg { overflow: visible; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: .75rem; top: -10rem; z-index: 100; padding: .7rem 1rem; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; font: 800 1rem var(--f-ui); }
.skip:focus { top: .75rem; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

.ic { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.22em; }
.ui { font-family: var(--f-ui); }
.muted { color: var(--ink-soft); }
.small { font-size: .9375rem; line-height: 1.45; }
.eyebrow { font: 800 .75rem/1.3 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.caption { font: italic .9375rem/1.45 var(--f-body); color: var(--ink-soft); }
.art-cap { font: 500 .8125rem/1.35 var(--f-ui); color: var(--ink-soft); }
.num { font-variant-numeric: lining-nums tabular-nums; }
.lede { font-size: 1.1875rem; line-height: 1.55; max-width: 62ch; }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: .9rem; }
.prose ul { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.stack { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.stack-lg { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; }
.initial::first-letter { float: left; font-family: var(--f-display); font-weight: 800; font-variation-settings: 'SOFT' 100, 'WONK' 1; font-size: 3.6em; line-height: .86;
  padding: .12em .14em .1em; margin: .1em .6rem 0 0; color: var(--initial-fg); background: var(--initial-bg); border: 2px solid var(--ink); border-radius: 3px; }
.dots { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.dots > li { position: relative; padding-left: 1.15rem; }
.dots > li::before { content: ""; position: absolute; left: .1rem; top: .62em; width: 6px; height: 6px; background: var(--honey); border: 1px solid var(--ink); transform: rotate(45deg); }

/* ---------- 4. Preview bar, site header and footer ---------- */
.preview-bar { background: var(--bar-bg); color: var(--bar-fg); font: 500 .9375rem/1.4 var(--f-ui); }
.preview-bar .in { max-width: 1440px; margin: 0 auto; padding: .45rem clamp(16px, 2vw, 24px); display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; }
.preview-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .6rem; border: 1.5px solid var(--bar-fg); border-radius: 999px; font: 800 .8125rem/1.3 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; }
.preview-bar p { flex: 1 1 18rem; }
.preview-bar a { color: var(--bar-fg); }
.preview-bar :focus-visible { outline-color: var(--bar-fg); }
.barbtn { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: .25rem .9rem; border: 1.5px solid var(--bar-fg); border-radius: 999px;
  background: transparent; color: var(--bar-fg); font: 700 .9375rem/1.2 var(--f-ui); white-space: nowrap; }
.barbtn:hover { text-decoration: underline; }

.wrap { max-width: 1440px; margin: 0 auto; padding-inline: clamp(16px, 2vw, 24px); }
.site-head { padding-block: 1rem .25rem; }
.site-head .in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; }
.rule { height: 2px; border-top: 1px solid var(--brass); border-bottom: 1px solid var(--brass); margin-top: .9rem; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem .4rem; }
.site-nav a { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: .3rem .75rem; border-radius: 6px; color: var(--ink); text-decoration: none; font: 700 1.0625rem/1.2 var(--f-ui); }
.site-nav a:hover { background: var(--vellum); text-decoration: underline; }
.site-nav a[aria-current="page"] { background: var(--vellum); box-shadow: inset 0 0 0 1.5px var(--ink); }
.site-main { padding-block: 1.25rem 2.5rem; display: flex; flex-direction: column; gap: 1.5rem; }

.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; }
a.brand:hover { color: var(--ink); }
a.brand:hover .wordmark { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.logo { display: block; flex: none; background: var(--logo-plate); border-radius: 10px; padding: 2px; }
.wordmark { display: block; font: 800 2rem/1 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 1; color: var(--wordmark); }
.tagline { display: flex; align-items: center; gap: .45rem; margin-top: .25rem; font: italic 500 .9375rem/1.2 var(--f-display); color: var(--red); }
.tagline::before { content: ""; width: 16px; height: 1.5px; background: var(--red); }
.brand-lg .wordmark { font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); }
.brand-lg .tagline { font-size: clamp(1.05rem, .9rem + .6vw, 1.4rem); }

.site-foot { margin-top: 1rem; border-top: 3px double var(--brass); padding-block: 1.25rem 2rem; font: 500 1rem/1.5 var(--f-ui); }
.site-foot .in { display: flex; flex-direction: column; gap: .9rem; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: .1rem 1.1rem; }
.foot-links a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; }
.foot-brand .wordmark { font-size: 1.3rem; }
.foot-brand .tagline { font-size: .875rem; margin-top: 0; }
.foot-note { color: var(--ink-soft); max-width: 80ch; }

/* ---------- 5. The game shell (KIT section 5) ---------- */
.shell { max-width: 1440px; margin: 0 auto; padding: 1rem 1.5rem 1.5rem; display: grid; grid-template-columns: 18.75rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.panel { background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--brass);
  padding: var(--pad, clamp(1rem, 1.8vw, 1.75rem)); min-width: 0; }
.inset { background: var(--vellum); border: 1.5px solid var(--ink); border-radius: 6px; padding: .75rem .9rem; min-width: 0; }
.game-main { display: flex; flex-direction: column; gap: 1.5rem; min-height: 40rem; }

.side { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem; }
.side-brand { padding-bottom: .9rem; position: relative; border-bottom: 1.5px solid var(--brass); }
.side-brand::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: var(--honey); border: 1.5px solid var(--ink); transform: rotate(45deg); }
.menu-head { display: none; }
.who { display: flex; gap: .85rem; align-items: center; }
.portrait { flex: none; width: 96px; height: 112px; padding: 3px; background: var(--honey); border: 2px solid var(--ink); border-radius: 48px 48px 8px 8px; }
.portrait > span { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 45px 45px 5px 5px; background: var(--vellum); }
.portrait img { display: block; width: 141.6%; max-width: none; height: auto; margin-left: -20.8%; margin-top: 2px; }
.who-t { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.who-name { font: 600 1.875rem/1.05 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 0; }
.lvl { align-self: flex-start; display: inline-flex; align-items: center; height: 1.6rem; padding: 0 .8rem; background: var(--honey); color: var(--on-honey);
  border: 1.5px solid var(--ink); clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%, 7px 50%); font: 800 .9375rem/1 var(--f-ui); white-space: nowrap; }
.coin { display: inline-flex; align-items: center; gap: .4rem; font: 500 1rem var(--f-ui); }
.coin b { font-weight: 800; }
.ic-coin { fill: var(--honey); color: var(--ink); }
.ic-health { fill: var(--health); color: var(--ink); }
.ic-energy { fill: var(--energy); color: var(--ink); }
.ic-xp { fill: var(--xp); color: var(--ink); }
.ic-pin { fill: var(--red); color: var(--ink); }
.ic-time { fill: var(--dusk); color: var(--ink); }
.ic-fill { fill: currentColor; }

.meters { display: flex; flex-direction: column; gap: .8rem; }
.mtr { display: flex; flex-direction: column; gap: .3rem; }
.mtr-top { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; font: 700 1rem/1.2 var(--f-ui); }
.mtr-n { margin-left: auto; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.mtr-track { display: block; height: 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--vellum); overflow: hidden; }
.mtr-fill { display: block; height: 100%; border-right: 1.5px solid var(--ink); }
.fill-health { background: var(--health); }
.fill-energy { background: var(--energy); }
.fill-xp { background: var(--xp); }
.mtr-note { font: 500 .875rem/1.35 var(--f-ui); color: var(--ink-soft); }

.where { display: flex; gap: .55rem; align-items: flex-start; }
.where.inset { border-color: var(--brass); border-radius: 8px; }
.side-brand .wordmark { font-size: 2.125rem; }
.where p:last-child { font-size: 1.0625rem; line-height: 1.35; }
.quiet { list-style: none; display: flex; flex-direction: column; }
.quiet a { display: flex; align-items: center; gap: .6rem; min-height: 2.4rem; padding: .25rem .4rem; border-radius: 6px; color: var(--ink); text-decoration: none; font: 700 1rem/1.2 var(--f-ui); }
.quiet a:hover { background: var(--vellum); }
.quiet a:hover .ql { text-decoration: underline; }
.quiet .qn { margin-left: auto; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.goto-h { display: flex; align-items: center; gap: .6rem; }
.goto-h::after { content: ""; flex: 1; height: 1.5px; background: var(--brass); }
.goto { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px .4rem; }
.goto a { display: flex; align-items: center; gap: .45rem; min-height: 2.1rem; padding: .2rem .55rem; border-radius: 6px; color: var(--ink); text-decoration: none; font: 500 1.0625rem/1.2 var(--f-body); }
.goto a:hover { background: var(--vellum); text-decoration: underline; }
.goto a[aria-current] { background: var(--vellum); box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 700; }
.quiet a[aria-current] { background: var(--vellum); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* phone top bar, title row and tab bar (KIT section 5; drawn dark, built for both themes) */
.topbar, .tabbar, .titlebar { display: none; }
.topbar { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 3px double var(--brass); }
.topbar .in { display: flex; align-items: center; gap: .65rem; padding: .5rem 1rem; max-width: 900px; margin: 0 auto; }
.tb-face { flex: none; width: 46px; height: 50px; padding: 2px; background: var(--honey); border: 1.5px solid var(--ink); border-radius: 23px 23px 6px 6px; }
.tb-face > span { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 21px 21px 4px 4px; background: var(--vellum); }
.tb-face img { display: block; width: 145%; max-width: none; margin-left: -22.5%; }
.tb-who { display: flex; flex-direction: column; min-width: 0; }
.tb-name { font: 600 1.375rem/1.05 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 0; }
.tb-lvl { font: 700 .875rem/1.2 var(--f-ui); color: var(--ink-soft); }
.tb-meters { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; max-width: 15rem; margin-left: auto; }
.tb-m { display: grid; grid-template-columns: 1rem minmax(0, 1fr) auto; gap: .35rem; align-items: center; font: 800 .8125rem/1 var(--f-ui); }
.tb-m .mtr-track { height: 9px; }
.tb-m .ic { width: 1rem; height: 1rem; }
.iconbtn { flex: none; display: inline-grid; place-items: center; width: 2.9rem; height: 2.9rem; border: var(--edge-w) solid var(--edge); border-radius: 10px; background: var(--paper); color: var(--ink); }
.iconbtn:hover { background: var(--vellum); }
.iconbtn .ic { width: 1.5rem; height: 1.5rem; }
.titlebar { align-items: center; gap: .6rem; padding: .35rem 1rem .1rem; max-width: 900px; margin: 0 auto; }
.titlebar .back { display: inline-flex; align-items: center; gap: .2rem; min-height: 2.75rem; padding: 0 .55rem 0 .2rem; border: 0; background: none; color: var(--link);
  font: 800 1rem var(--f-ui); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.titlebar .sep { width: 1.5px; height: 1.6rem; background: var(--brass); }
.titlebar .ttl { font: 600 1.375rem/1.15 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: 3px double var(--brass); padding-bottom: env(safe-area-inset-bottom, 0); }
.tabbar ul { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 900px; margin: 0 auto; }
.tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; width: 100%; min-height: var(--tabbar-h);
  padding: .35rem .1rem; border: 0; background: none; color: var(--ink-soft); text-decoration: none; font: 700 .875rem/1.1 var(--f-ui); }
.tabbar .ic { width: 1.5rem; height: 1.5rem; }
.tabbar a:hover, .tabbar button:hover { color: var(--ink); text-decoration: underline; }
.tabbar [aria-current] { color: var(--current-bar); }
.tabbar [aria-current]::before { content: ""; position: absolute; top: -3px; left: 22%; right: 22%; height: 4px; border-radius: 0 0 3px 3px; background: var(--current-bar); }
.tabbar [aria-current] .ic { color: var(--current-bar); }

/* ---------- 6. Components ---------- */
.sec-h { display: flex; align-items: center; gap: .8rem; }
.sec-h::after { content: ""; flex: 1; min-width: 1.5rem; height: 2px; border-top: 1px solid var(--brass); border-bottom: 1px solid var(--brass); }
.sec-h .sec-n { order: 2; flex: none; font: 800 .75rem/1.2 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.sec-h .sec-n + * { order: 3; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; padding-bottom: 1rem; border-bottom: 1.5px solid var(--brass); }
.page-head .stack { gap: .35rem; }
.time { display: inline-flex; align-items: center; gap: .4rem; font: 700 1rem/1.3 var(--f-ui); color: var(--dusk); }

/* choices are buttons; getting around is links (Q2-01) */
.choices { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
.choice { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; width: 100%; min-height: 3.1rem; padding: .55rem 1rem; text-align: left;
  background: var(--paper); color: var(--ink); border: var(--edge-w) solid var(--edge); border-radius: 8px; box-shadow: 0 3px 0 var(--lift); font: 800 1.125rem/1.25 var(--f-ui); }
.choice:hover { background: var(--vellum); }
.choice:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lift); }
.choice > .ic { width: 1.35rem; height: 1.35rem; }
.choice-t { display: flex; flex-direction: column; gap: .1rem; flex: 1 1 10rem; min-width: 0; }
.choice-sub { font-weight: 500; font-size: .9375rem; line-height: 1.35; color: var(--ink-soft); }
.choice-end { margin-left: auto; flex: 0 1 auto; min-width: 0; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .3rem .6rem; font-weight: 700; font-size: .9375rem; }
.cost { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.free { font-weight: 500; }
.choice.primary { background: var(--primary-bg); color: var(--primary-fg); border: 2px solid var(--primary-edge); box-shadow: 0 3px 0 var(--primary-lift); }
.choice.primary:hover { background: var(--primary-hover); }
.choice.primary .choice-sub { color: var(--primary-fg); }
.choice.primary .ic-energy { fill: var(--primary-fg); color: var(--primary-fg); }
.choice[aria-disabled="true"] { background: var(--vellum); color: var(--ink-soft); border: 2px dashed var(--ink-soft); box-shadow: none; cursor: not-allowed; transform: none; }
.choice[aria-disabled="true"] .choice-sub { color: var(--ink-soft); }
.choice .lock-why { font-weight: 500; }
.choice .lock-why b { font-weight: 800; }
.choice-sm { width: auto; min-height: 2.75rem; padding: .35rem .9rem; font-size: 1rem; box-shadow: 0 2px 0 var(--lift); }
.choice-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .7rem; }
.choice-note { font: 500 1rem/1.45 var(--f-ui); color: var(--ink-soft); }
.choice-note:empty { display: none; }
.choice-note:not(:empty) { padding: .55rem .8rem; border: 1.5px dashed var(--ink-soft); border-radius: 8px; background: var(--vellum); color: var(--ink); }

/* text links used for getting around */
.go { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem 1.6rem; }
.go a, a.go-link { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.25rem; font: 500 1.0625rem/1.3 var(--f-body); }
.go .ic, a.go-link .ic { color: var(--ink-soft); }

/* chips (KIT section 4) */
.chip { display: inline-flex; align-items: center; gap: .35rem; min-height: 1.75rem; padding: .1rem .65rem; border: 1.5px solid var(--ink-soft); border-radius: 999px;
  font: 800 .8125rem/1.2 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.chip-quest { border-color: var(--red); color: var(--red); }
.chip-quest .ic { fill: currentColor; stroke: currentColor; }
.chip-locked { border-style: dashed; }
.chip-plain { text-transform: none; letter-spacing: 0; font-weight: 700; }
.chip-ink { border-color: var(--ink); color: var(--ink); }

/* picture frame: vellum mat, inked box, honey corners; caption on every AI picture (KIT section 4) */
.frame { position: relative; margin: 0; padding: 6px; background: var(--vellum); border: 2px solid var(--ink); border-radius: 4px; min-width: 0; }
.frame-in { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1.5px solid var(--ink); background: var(--paper); }
.frame-in::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, var(--honey) 0 11px, transparent 11px) top left / 22px 22px no-repeat,
              linear-gradient(225deg, var(--honey) 0 11px, transparent 11px) top right / 22px 22px no-repeat,
              linear-gradient(45deg, var(--honey) 0 11px, transparent 11px) bottom left / 22px 22px no-repeat,
              linear-gradient(315deg, var(--honey) 0 11px, transparent 11px) bottom right / 22px 22px no-repeat; }
.frame-in.scene img { display: block; width: 100%; height: 100%; object-fit: cover; }
.frame-in.is-night::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: var(--night-tint); mix-blend-mode: multiply; }
.frame figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .15rem 1rem; padding: .4rem .2rem .1rem; }
.ph { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: .4rem; padding: 1rem; text-align: center; color: var(--ink-soft);
  font: 700 .9375rem/1.3 var(--f-ui); background: repeating-linear-gradient(135deg, var(--fog-line) 0 1px, transparent 1px 9px), var(--vellum); }
.ph .ic { width: 2.4rem; height: 2.4rem; }

/* picture of a place, with its name under it (Q2-01 picture banner) */
.place { display: flex; flex-direction: column; gap: 0; }
.place .frame-in { aspect-ratio: 16 / 6; }
.place-name { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .3rem 1rem; padding: .7rem .4rem .2rem; }
.place-name h1, .place-name h2 { font-size: clamp(1.5rem, 1.05rem + 1.5vw, 2.375rem); }

/* item card and icon well (KIT: the Tile's item card) */
.items { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .8rem; }
.item { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: .75rem; align-items: start; padding: .75rem; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); min-width: 0; }
.well { position: relative; width: 62px; height: 62px; display: grid; place-items: center; background: var(--vellum); border: 1.5px solid var(--ink); border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--vellum), inset 0 0 0 4px var(--brass); }
.well img { max-width: 80%; max-height: 80%; width: auto; height: auto; }
.iname { font: 600 1.1875rem/1.2 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 0; }
.iline { font: 800 .75rem/1.35 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.itext { font-size: 1rem; line-height: 1.45; }

/* small framed cards (fact cards, screen cards, people around here) */
.cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.card { position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--brass); min-width: 0; }
.card.flat { background: var(--vellum); border-width: 1.5px; box-shadow: none; border-radius: 8px; }
.card-top { display: flex; align-items: center; gap: .6rem; }
.card-top::after { content: ""; order: 2; flex: 1; height: 2px; border-top: 1px solid var(--brass); border-bottom: 1px solid var(--brass); }
.card-top > .badge-ic { order: 3; }
.numdisc { flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--honey); color: var(--on-honey); border: 1.5px solid var(--ink); font: 800 1rem/1 var(--f-display); }
.badge-ic { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--vellum); box-shadow: inset 0 0 0 3px var(--vellum), inset 0 0 0 4px var(--brass); }
.badge-ic .ic { width: 1.4rem; height: 1.4rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.card h3 a:hover { text-decoration: underline; }
.card:has(h3 a:hover) { background: var(--vellum); }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.card h3 a:focus-visible { outline: none; }
.card .card-foot { margin-top: auto; padding-top: .5rem; border-top: 1.5px solid var(--brass); display: flex; flex-wrap: wrap; gap: .3rem 1rem; font: 700 .9375rem/1.3 var(--f-ui); }
.card p { font-size: 1.0625rem; line-height: 1.5; }
.fact { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: .3rem 1rem; align-items: start; }
.fact .disc { width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); display: grid; place-items: center; box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--brass); }
.fact .disc svg { width: 2rem; height: 2rem; }

/* boxes of plain information */
.note-box { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; background: var(--vellum); border: 1.5px solid var(--ink); border-radius: 8px; font: 500 1rem/1.5 var(--f-ui); }
.note-box .ic { width: 1.4rem; height: 1.4rem; margin-top: .1rem; }
.note-box.dashed { border-style: dashed; border-color: var(--ink-soft); }

/* definition rows */
.facts { display: grid; grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr); gap: .55rem 1.2rem; }
.facts dt { display: flex; align-items: center; gap: .45rem; font: 800 .75rem/1.6 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.facts dd { font-size: 1.0625rem; line-height: 1.45; min-width: 0; }

/* tabs: panels become tabs on phones (Q2-09). The tab list shows only where JS marks it active. */
.ptabs-list { display: none; }
.ptabs-list [role="tab"] { position: relative; flex: 1 1 auto; min-height: 2.9rem; padding: .4rem .9rem; border: 1.5px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0;
  background: none; color: var(--ink-soft); font: 700 1rem/1.2 var(--f-ui); white-space: nowrap; }
.ptabs-list [role="tab"]:hover { color: var(--ink); text-decoration: underline; }
.ptabs-list [role="tab"][aria-selected="true"] { color: var(--current-bar); background: var(--paper); border-color: var(--brass); }
.ptabs-list [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 3px; height: 3px; border-radius: 2px; background: var(--current-bar); }
.ptabs-list { gap: .2rem; border-bottom: 1.5px solid var(--brass); overflow-x: auto; scrollbar-width: none; align-self: stretch; max-width: 100%; min-width: 0; }
/* access-05: these controls sit in a box that clips, so their focus ring is drawn inside them (the one exception to the
   kit's 3 px outside offset) */
.ptabs-list [role="tab"]:focus-visible, .seg a:focus-visible { outline-offset: -5px; }
.tabs-on .ptabs-list { display: flex; }
.tabs-on [role="tabpanel"][hidden] { display: none !important; }
.ptabs-list.always { display: flex; }

/* segmented links (map tabs, profile tabs): links between pages, styled as a row */
.seg { list-style: none; display: inline-flex; flex-wrap: wrap; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--paper); box-shadow: 0 3px 0 var(--lift); }
.seg li + li { border-left: 1.5px solid var(--ink); }
.seg a, .seg span { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .3rem 1rem; color: var(--ink); text-decoration: none; font: 700 1rem/1.2 var(--f-ui); }
.seg a:hover { background: var(--vellum); text-decoration: underline; }
.seg [aria-current] { background: var(--vellum); box-shadow: inset 0 -4px 0 var(--current-bar); font-weight: 800; }
.seg .later { color: var(--ink-soft); background: repeating-linear-gradient(135deg, var(--fog-line) 0 1px, transparent 1px 7px); }
.seg .later small { font: 700 .8125rem var(--f-ui); }

/* toggle buttons (view as, map or list) */
.toggles { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr)); gap: .6rem; }
.toggle { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; width: 100%; min-height: 3.1rem; height: 100%; padding: .55rem .8rem; text-align: left;
  background: var(--paper); color: var(--ink); border: var(--edge-w) solid var(--edge); border-radius: 8px; box-shadow: 0 3px 0 var(--lift); font: 800 1rem/1.25 var(--f-ui); }
.toggle:hover { background: var(--vellum); }
.toggle .t-top { display: flex; align-items: center; gap: .45rem; }
.toggle .t-sub { font-weight: 500; font-size: .875rem; line-height: 1.35; color: var(--ink-soft); }
.toggle[aria-pressed="true"] { background: var(--vellum); border-width: 3px; box-shadow: 0 3px 0 var(--lift), inset 0 0 0 1px var(--ink); }
.toggle .t-check { display: none; }
.toggle[aria-pressed="true"] .t-check { display: inline-block; }

/* a picture of a form: switched off, sends nothing (P2-01) */
.form-pic { position: relative; display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem; border: 2px dashed var(--ink-soft); border-radius: 10px; background: var(--paper); }
.form-pic .off-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .7rem; border-radius: 999px; background: var(--bar-bg); color: var(--bar-fg); font: 800 .8125rem/1.3 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; }
.pf { display: flex; flex-direction: column; gap: .3rem; }
.pf-label { font: 800 1rem/1.3 var(--f-ui); }
.pf-hint { font: 500 .875rem/1.4 var(--f-ui); color: var(--ink-soft); }
.pf-row { display: flex; gap: .5rem; align-items: stretch; flex-wrap: wrap; }
.pf-box { flex: 1 1 8rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 2.75rem; padding: .35rem .75rem; border: 1.5px solid var(--ink-soft);
  border-radius: 6px; background: var(--vellum); color: var(--ink-soft); font: 500 1rem var(--f-ui); }
.pf-box.short { flex: 0 1 7rem; }
.pf-btn { flex: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; padding: .3rem .8rem; border: 1.5px solid var(--ink-soft); border-radius: 6px; background: var(--vellum); color: var(--ink-soft); font: 700 .9375rem var(--f-ui); }
.pf-check { display: flex; gap: .55rem; align-items: flex-start; font: 600 1rem/1.4 var(--f-ui); color: var(--ink-soft); }
.pf-check .boxmark { flex: none; width: 1.3rem; height: 1.3rem; margin-top: .1rem; border: 1.5px solid var(--ink-soft); border-radius: 3px; background: var(--vellum); }
.pf-submit { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3.1rem; padding: .5rem 1rem; border: 2px dashed var(--ink-soft); border-radius: 8px;
  background: var(--vellum); color: var(--ink-soft); font: 800 1.125rem var(--f-ui); }
.pf-list { list-style: none; display: flex; flex-direction: column; gap: .15rem; font: 500 .875rem/1.4 var(--f-ui); color: var(--ink-soft); }
.pf-list li::before { content: "\25C6"; color: var(--brass); font-size: .7em; margin-right: .45rem; vertical-align: .1em; }
.ribbon { display: inline-flex; align-items: center; height: 1.7rem; padding: 0 .9rem; background: var(--honey); color: var(--on-honey); border: 1.5px solid var(--ink);
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 50%, 100% 100%, 0 100%, 7px 50%); font: 800 .875rem/1 var(--f-ui); white-space: nowrap; }

/* sketch maps (inline SVG, colors from tokens) */
.sketch svg { display: block; width: 100%; height: auto; }
.map-key { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .6rem 1.2rem; font: 500 .9375rem/1.35 var(--f-ui); }
.map-key li { display: flex; gap: .6rem; align-items: center; }
.map-key svg { flex: none; width: 2.5rem; height: auto; }
.map-key b { font-weight: 800; }

/* placeholders for pages still to build */
.coming { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; padding: 1.25rem; border: 2px dashed var(--ink-soft); border-radius: 10px;
  background: repeating-linear-gradient(135deg, var(--fog-line) 0 1px, transparent 1px 10px), var(--vellum); }
.coming .chip { background: var(--paper); }

/* ---------- 7. Page layouts ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.cols-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.col { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.aside-box { padding: 1rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px; box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--brass); }
.people { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.person { position: relative; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto; gap: .2rem .75rem; align-items: center; padding: .6rem .75rem; border: 1.5px solid var(--brass); border-radius: 8px; background: var(--paper); }
.person:hover { background: var(--vellum); }
.person:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.person a { font: 800 1.0625rem/1.25 var(--f-ui); }
.person a::after { content: ""; position: absolute; inset: 0; }
.person a:focus-visible { outline: none; }
.person p { grid-column: 2 / -1; font: 500 .9375rem/1.35 var(--f-ui); color: var(--ink-soft); }
.person .face { grid-row: 1 / span 2; width: 3.25rem; height: 3.25rem; border-radius: 50%; overflow: hidden; border: 1.5px solid var(--ink); background: var(--vellum); display: grid; place-items: center;
  outline: 2px solid var(--honey); outline-offset: -3.5px; }
.person .face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.person .face img.face-crop { object-position: 52% 0; transform: scale(2.4); transform-origin: 52% 16%; }
.person .face .ic { width: 1.5rem; height: 1.5rem; }
.paper-box { padding: 1rem 1.15rem; background: var(--vellum); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 0 3px 0 var(--lift); }
.paper-box h2, .paper-box h3 { display: flex; align-items: center; gap: .5rem; padding-bottom: .5rem; margin-bottom: .6rem; border-bottom: 3px double var(--ink); }

/* home */
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.5rem 2.25rem; align-items: center; }
.home-hero .frame-in { aspect-ratio: 16 / 9; }
.home-cta { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; }
.btnlink { display: inline-flex; align-items: center; gap: .55rem; min-height: 3.1rem; padding: .55rem 1.15rem; border: var(--edge-w) solid var(--edge); border-radius: 8px;
  background: var(--paper); color: var(--ink); box-shadow: 0 3px 0 var(--lift); text-decoration: none; font: 800 1.125rem/1.2 var(--f-ui); }
.btnlink:hover { background: var(--vellum); color: var(--ink); text-decoration: underline; }
.btnlink.primary { background: var(--primary-bg); color: var(--primary-fg); border: 2px solid var(--primary-edge); box-shadow: 0 3px 0 var(--primary-lift); }
.btnlink.primary:hover { background: var(--primary-hover); color: var(--primary-fg); }
.btnlink .ic { width: 1.35rem; height: 1.35rem; }

/* account pages */
.account { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }

/* profile */
.prof-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); gap: 1.5rem; align-items: start; }
.pcard { display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr); gap: 1.25rem 1.5rem; align-items: start; }
.full-portrait { position: relative; margin-top: 1rem; }
.full-portrait .frame-in { aspect-ratio: 220 / 544; align-items: flex-end; background: var(--vellum); }
.full-portrait .backdrop { position: absolute; inset: 0; width: 100%; height: 100%; }
.full-portrait img { position: relative; display: block; width: 86%; height: auto; margin: 0 auto 4%; }
.full-portrait .hanger { position: absolute; z-index: 2; top: -19px; left: 50%; width: 24px; margin-left: -12px; }
.motto { position: relative; padding: .8rem .9rem .6rem 3rem; background: var(--vellum); border: 1.5px solid var(--ink); border-radius: 6px; }
.motto svg { position: absolute; top: .8rem; left: .8rem; width: 26px; }
.motto p { font: italic 1.125rem/1.4 var(--f-body); }
.badges { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .9rem 1.2rem; }
.badges li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .1rem .7rem; align-items: start; }
.badges .bdisc { grid-row: 1 / span 2; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--honey); border: 1.5px solid var(--ink); color: var(--ink); }
.badges .bdisc svg { width: 1.6rem; height: 1.6rem; }
.badges b { font: 800 1rem/1.3 var(--f-ui); }
.badges span { font: 500 .9375rem/1.4 var(--f-ui); color: var(--ink-soft); }
.favs { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .6rem; }
.favs li { padding: .55rem .7rem; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--vellum); }
.favs .fv { font: 600 1.1875rem/1.2 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 0; }
/* "view as": hide what that viewer doesn't see; never set a display, so each element keeps its own */
[data-view="blocked"] .hide-blocked { display: none !important; }
[data-view]:not([data-view="friends"]) .only-friends { display: none !important; }
[data-view]:not([data-view="blocked"]) .only-blocked { display: none !important; }
[data-view="friends"] .not-friends { display: none !important; }

/* map */
.map-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.5rem; align-items: start; }
.area-pic .frame-in { aspect-ratio: 3 / 1; }
.area-pic svg.fill { position: absolute; inset: 0; width: 100%; height: 100%; }
.walk { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .6rem; }
.walk-pick { display: flex; flex-wrap: wrap; gap: .6rem; align-items: stretch; }
.select-pic { flex: 1 1 14rem; min-height: 2.9rem; padding: .4rem .7rem; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper); color: var(--ink); font: 500 1.0625rem var(--f-ui); max-width: 100%; }
.districts { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.district { border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); overflow: hidden; }
.district > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .1rem .8rem; align-items: center; min-height: 3.1rem; padding: .55rem .9rem; cursor: pointer; }
.district > summary::-webkit-details-marker { display: none; }
.district > summary:hover { background: var(--vellum); }
.district .dname { font: 600 1.375rem/1.15 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.district .dsub { grid-column: 1; font: 500 .9375rem/1.35 var(--f-ui); color: var(--ink-soft); }
.district .dcount { grid-row: 1; grid-column: 2; font: 800 .75rem var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.district .chev { grid-row: 1 / span 2; grid-column: 3; width: 1.4rem; height: 1.4rem; transition: transform .15s; }
.district[open] .chev { transform: rotate(180deg); }
.places { list-style: none; border-top: 1.5px solid var(--brass); }
.places li + li { border-top: 1px solid var(--grid-line); }
.places a, .places .pl { display: flex; align-items: center; gap: .6rem; min-height: 3.1rem; padding: .5rem .9rem; }
.places a { text-decoration: none; color: var(--ink); }
.places a:hover { background: var(--vellum); }
.places a .pn { color: var(--link); font: 700 1.125rem/1.25 var(--f-body); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.places .pd { display: block; font: 500 .9375rem/1.35 var(--f-ui); color: var(--ink-soft); }
.places .ic { margin-left: auto; color: var(--ink-soft); }
.places .pl { color: var(--ink-soft); font: 500 .9375rem/1.35 var(--f-ui); }
.find { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.find label { font: 800 1rem var(--f-ui); }
.find .box { flex: 1 1 14rem; display: flex; align-items: center; gap: .5rem; min-height: 2.9rem; padding: 0 .7rem; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper); }
.find input { flex: 1; min-width: 0; min-height: 2.75rem; border: 0; background: transparent; font: 500 1.0625rem var(--f-ui); }
.find input:focus-visible { outline: none; }
.find .box:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }

/* text pages (How money works, How the art is made) */
.doc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem); gap: 2rem; align-items: start; }
.doc-body { display: flex; flex-direction: column; gap: 1.75rem; }
.doc-body section { display: flex; flex-direction: column; gap: .75rem; }
.doc-body p, .doc-body li { max-width: 68ch; }
.toc { position: sticky; top: 1rem; }
.toc ol { list-style: none; display: flex; flex-direction: column; gap: .1rem; counter-reset: toc; }
.toc a { display: flex; align-items: center; min-height: 2.25rem; font: 500 1rem/1.3 var(--f-ui); }
.quote-lines { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.quote-lines li { padding: .6rem .9rem; border-left: 4px solid var(--brass); background: var(--vellum); border-radius: 0 6px 6px 0; }

/* ---------- 8. Narrow screens and phones ---------- */
@media (max-width: 1180px) {
  .cols, .cols-even, .map-cols, .prof-cols, .account { grid-template-columns: minmax(0, 1fr); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
}
@media (max-width: 899.98px) {
  body.game { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  .shell { grid-template-columns: minmax(0, 1fr); padding: .75rem 1rem 1.25rem; }
  .topbar, .tabbar { display: block; }
  .titlebar { display: flex; }
  .side { display: none; }
  .game-main { min-height: 0; }
  /* the phone menu: the sidebar opens as a sheet over the page */
  body.menu-open { overflow: hidden; }
  body.menu-open .side { display: flex; position: fixed; z-index: 50; inset: 0; top: 0; overflow-y: auto; border-radius: 0; border: 0; box-shadow: none; padding: 1rem max(1rem, calc((100vw - 900px) / 2)); }
  .menu-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .side-brand { display: none; }
  .goto a { min-height: 2.75rem; }
  .quiet a { min-height: 2.75rem; }
  /* every link that stands on its own is a 44 px target under 900 px (KIT section 4) */
  .go a, a.go-link, .toc a, a.brand, .foot-links a { min-height: 2.75rem; }
}
@media (max-width: 560px) {
  body { font-size: 1.0625rem; line-height: 1.55; }
  .lede { font-size: 1.0625rem; }
  h1 { font-size: 1.6rem; }
  .panel { --pad: 1rem; }
  .shell { padding-inline: .6rem; }
  .wrap { padding-inline: 1rem; }
  .preview-bar .in { padding-inline: 1rem; }
  .pcard { grid-template-columns: minmax(0, 1fr); }
  .full-portrait { max-width: 13rem; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .facts dd { margin-bottom: .5rem; }
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .tb-meters { max-width: 9.5rem; }
  .tb-name { font-size: 1.2rem; }
  .go a, a.go-link { min-height: 2.75rem; }
  .card h3 { font-size: 1.15rem; }
  .seg { display: flex; }
  .seg li { flex: 1 1 auto; }
  .seg a, .seg span { justify-content: center; padding-inline: .6rem; }
}
@media (max-width: 899.98px) and (min-width: 561px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .tb-meters { max-width: 7.5rem; }
  .tb-face { width: 40px; height: 46px; }
  .topbar .in { gap: .5rem; padding-inline: .6rem; }
}

/* ---------- 9. Page: dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.dash .face .ic { width: 1.6rem; height: 1.6rem; }
@media (max-width: 1180px) { .dash { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899.98px) {
  .dash { display: flex; flex-direction: column; gap: 1.25rem; }
  .dash > .col { display: contents; }
  .dash-story { order: 1; }
  .dash-tabs { order: 2; }
  .dash-things, .dash-around, .dash-map, .dash-news { order: 3; }
  .dash-ways { order: 4; }
}

/* ---------- 10. Page: profile ---------- */
.prof { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem); gap: 1.5rem; align-items: start; }
.full-portrait { max-width: 15rem; width: 100%; margin: 12px auto 0; }
.full-portrait .frame-in { aspect-ratio: 220 / 544; height: auto; }
.full-portrait .frame-in img { position: absolute; left: 6%; bottom: 2%; width: 88%; max-width: none; margin: 0; }
.full-portrait .hanger svg { display: block; width: 24px; height: 34px; }
.full-portrait .frame-in > svg.backdrop { position: absolute; inset: 0; width: 100%; height: 100%; }
.pcard { grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr); }
@media (max-width: 1180px) { .prof { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899.98px) {
  .prof { display: flex; flex-direction: column; gap: 1.25rem; }
  .prof > .col { display: contents; }
  .prof-viewas { order: 1; }
  .prof-tabs { order: 2; }
  .prof-card, .prof-keep, .prof-favs, .prof-edit { order: 3; }
}
@media (max-width: 560px) {
  .pcard { grid-template-columns: minmax(0, 1fr); }
  .full-portrait { max-width: 12.5rem; }
  .ptabs-list [role="tab"] { padding-inline: .55rem; }
}

/* ---------- 11. Text pages ---------- */
.doc-body .frame { max-width: 18rem; }
.doc-body .frame .frame-in img { max-height: 22rem; width: auto; }

/* ---------- 12. Refinements after the first audit ---------- */
.pb-short { display: none; }
.pf > .pf-box { flex: none; }
.choice-sm { flex-wrap: nowrap; }
.choice-sm .choice-t { flex: 0 1 auto; }
.pcard { grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr); }
.pcard .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
.pcard .facts dd { margin-bottom: .6rem; }
.district > summary { grid-template-columns: minmax(0, 1fr) auto; }
.district .dname { grid-column: 1; grid-row: 1; }
.district .dcount { grid-column: 1; grid-row: 2; }
.district .dsub { grid-column: 1; grid-row: 3; }
.district .chev { grid-column: 2; grid-row: 1 / span 3; }
@media (max-width: 899.98px) {
  /* screens reached through More name themselves in the title row, so their <h1> is for screen readers only */
  body.more-screen .page-head h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
@media (max-width: 560px) {
  .pb-long { display: none; }
  .pb-short { display: inline; }
  .preview-bar p { flex: 1 1 8rem; }
  .preview-bar .barbtn { padding-inline: .7rem; }
  .seg .ic { display: none; }
  .seg li { flex: 1 1 auto; }
  .seg a, .seg span { padding-inline: .5rem; font-size: .9375rem; white-space: nowrap; }
  .seg small { font-size: .75rem; }
}
.motto p.eyebrow { font: 800 .75rem/1.3 var(--f-ui); margin-top: .3rem; }
@media (max-width: 560px) { .pcard { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 13. Shared by the fight, quests, bag, items, home, market, guild and console pages ---------- */
/* .night: the kit's dark tokens on one element, for the Unknown tier's panels and chips in either theme */
.night { --page: #15100C; --paper: #201812; --vellum: #2B2018; --ink: #F4E7CE; --ink-soft: #CDB89A; --brass: #C99A45; --red: #E07A62;
  --honey: #E8B54D; --dusk: #8FB7C2; --on-honey: #15100C; --edge: var(--brass); --edge-w: 1.5px; --lift: var(--brass); --link: var(--honey);
  --link-hover: #F4E7CE; --focus: #8FB7C2; --initial-fg: var(--honey); --initial-bg: var(--vellum); --fog-line: rgba(205, 184, 154, .3);
  --grid-line: rgba(205, 184, 154, .38); --bar-bg: var(--vellum); --bar-fg: var(--ink);
  --primary-bg: var(--honey); --primary-fg: #15100C; --primary-edge: var(--honey); --primary-lift: var(--brass); --primary-hover: #F0C46A;
  color-scheme: dark; color: var(--ink); }
/* .day: the light tokens on one element, for marks drawn over a picture, which stays light in either theme */
.day { --page: #E9DDC4; --paper: #FCF7EC; --vellum: #F4E9D0; --ink: #2A1A12; --ink-soft: #5E4A38; --brass: #A0712A; --honey: #D9A23A; --on-honey: #2A1A12;
  --primary-hover: #7A2219; --focus: #2E5A66; color-scheme: light; }
.panel.night { border-color: var(--brass); }
:root[data-theme="dark"] .panel.night { border-color: var(--honey); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .panel.night { border-color: var(--honey); } }
/* rarity (Q4-28) and difficulty (Q4-21): words plus pips, never color alone */
.rar, .band { display: inline-flex; align-items: center; gap: .45rem; min-height: 1.75rem; padding: .1rem .65rem; border: 1.5px solid var(--dusk); border-radius: 999px;
  background: var(--paper); color: var(--dusk); font: 800 .8125rem/1.2 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; vertical-align: middle;
  flex-wrap: wrap; max-width: 100%; }
.rar .ic { width: 1.05rem; height: 1.05rem; }
.rar-unk { border-color: var(--honey); color: var(--honey); background: var(--paper); }
.rar-plain { border: 0; padding: 0; min-height: 0; background: none; }
.pips { display: inline-flex; gap: 3px; padding-inline: 1px; }
.pips i { display: block; width: 7px; height: 7px; border: 1.4px solid currentColor; transform: rotate(45deg); }
.pips i.on { background: currentColor; }
.band { border-color: var(--ink); color: var(--ink); letter-spacing: 0; text-transform: none; font-size: .9375rem; }
.band .pips { color: var(--red); }
/* an icon well for a sample picture or a stand-in icon */
.well { overflow: hidden; }
.well:has(> img) { display: flex; align-items: center; justify-content: center; }
.well .well-none { display: grid; place-items: center; gap: .1rem; color: var(--ink-soft); font: italic .75rem/1.1 var(--f-body); text-align: center; }
.well .well-none .ic { width: 1.6rem; height: 1.6rem; }
.well .qty { position: absolute; top: 3px; right: 3px; padding: 0 .35rem; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font: 800 .75rem/1.35 var(--f-ui); }
/* a button that looks like a text link (it opens nothing in the preview) */
.linkbtn { display: inline; padding: 0; border: 0; background: none; color: var(--link); font: inherit; text-align: left; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--link-hover); text-decoration-thickness: 2.5px; }
/* a plain button (the kit's secondary choice, smaller) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.75rem; padding: .35rem 1rem; border: var(--edge-w) solid var(--edge); border-radius: 8px;
  background: var(--paper); color: var(--ink); box-shadow: 0 3px 0 var(--lift); font: 800 1rem/1.2 var(--f-ui); text-align: left; }
.btn:hover { background: var(--vellum); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lift); }
.btn.primary { background: var(--primary-bg); color: var(--primary-fg); border: 2px solid var(--primary-edge); box-shadow: 0 3px 0 var(--primary-lift); }
.btn.primary:hover { background: var(--primary-hover); }
.btn[aria-disabled="true"] { background: var(--vellum); color: var(--ink-soft); border: 2px dashed var(--ink-soft); box-shadow: none; cursor: not-allowed; transform: none; }
.btn .ic { width: 1.25rem; height: 1.25rem; }
.btn-sub { display: block; font-weight: 500; font-size: .875rem; }
.seg-wrap { flex-wrap: wrap; }
/* number-and-label rows in a box (moderation, economy, faction points) */
.rows { list-style: none; display: flex; flex-direction: column; }
.rows > li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem 1rem; padding: .45rem 0; border-bottom: 1px solid var(--grid-line); font: 500 1rem/1.35 var(--f-ui); }
.rows > li:last-child { border-bottom: 0; }
.rows > li > b, .rows .n { font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.boxh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .8rem; padding-bottom: .5rem; border-bottom: 3px double var(--ink); }
.boxh h2, .boxh h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.25rem; }
.pane { padding: 1rem 1.1rem; background: var(--vellum); border: 2px solid var(--ink); border-radius: 8px; min-width: 0; }

/* ---------- 14. Page: the item collection ---------- */
.cat-h { gap: .6rem; flex-wrap: nowrap; align-items: center; }
.cat-h .badge-ic { border-radius: 50%; }
.ladder { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: .8rem; }
.ladder li { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; padding: .8rem .9rem; background: var(--vellum); border: 1.5px solid var(--ink); border-radius: 8px; }
.ladder li p { font-size: 1.0625rem; line-height: 1.45; }
.ladder .ladder-unk { background: var(--paper); border: 2px solid var(--honey); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--brass); }
.pyr { list-style: none; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .55rem 1rem; align-items: center; }
.pyr li { display: contents; }
.pyr-k { grid-column: 1; }
.pyr-bar { grid-column: 2; display: block; height: 1.35rem; width: var(--w); border: 1.5px solid var(--ink); border-radius: 2px; background: var(--dusk); }
.pyr-bar.night { background: var(--page); border-color: var(--honey); }
.pyr li > b { grid-column: 2; margin-top: -.45rem; font: 800 1rem var(--f-ui); }
@media (min-width: 700px) {
  .pyr { grid-template-columns: max-content minmax(0, 1fr) max-content; }
  .pyr li > b { grid-column: 3; margin-top: 0; }
}
.ucards { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); gap: 1rem; }
.ucard { display: flex; flex-direction: column; gap: .8rem; height: 100%; padding: .6rem .6rem .9rem; border: 1.5px solid var(--brass); border-radius: 8px; background: var(--paper); scroll-margin-top: 1rem; }
.ucard-pic { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: .5rem; border: 1.5px solid var(--honey); border-radius: 4px;
  background: radial-gradient(circle at 50% 50%, rgba(232, 181, 77, .22), transparent 65%), var(--page); }
.ucard-pic::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, var(--honey) 0 9px, transparent 9px) top left / 18px 18px no-repeat, linear-gradient(225deg, var(--honey) 0 9px, transparent 9px) top right / 18px 18px no-repeat,
              linear-gradient(45deg, var(--honey) 0 9px, transparent 9px) bottom left / 18px 18px no-repeat, linear-gradient(315deg, var(--honey) 0 9px, transparent 9px) bottom right / 18px 18px no-repeat; }
.ucard-pic img { width: auto; height: auto; max-width: 88%; max-height: 88%; object-fit: contain; }
.ucard-t { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.ucard-t .eyebrow { display: flex; align-items: center; gap: .35rem; }
.ucard h3 { font-size: 1.3125rem; }
.ucard-big { display: grid; grid-template-columns: minmax(10rem, 20rem) minmax(0, 1fr); gap: 1.25rem 2rem; align-items: center; padding: 1rem; }
@media (max-width: 640px) { .ucard-big { grid-template-columns: minmax(0, 1fr); } .ucard-big .ucard-pic { max-width: 16rem; } }
.iline { font: 800 .75rem/1.35 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.iflavor { font: italic 1rem/1.45 var(--f-body); color: var(--ink-soft); }
.ieffect { font: 500 .9375rem/1.4 var(--f-ui); }
.ieffect b { font-weight: 800; }
.ibind { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; padding-top: .55rem; border-top: 1px solid var(--brass); font: 700 .9375rem/1.3 var(--f-ui); }
.every { display: flex; flex-direction: column; gap: 1rem; }
.every-cats { display: none; }
.every-row { display: flex; flex-direction: column; gap: .5rem; }
.every-t { font-size: 1rem; }
.every-row ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr)); gap: .6rem; }
.etile { display: flex; flex-direction: column; gap: .35rem; height: 100%; min-height: 2.75rem; color: var(--ink); text-decoration: none; border-radius: 6px; }
.etile-pic { display: flex; align-items: center; justify-content: center; height: 5.6rem; padding: 4px; background: var(--vellum); border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: inset 0 0 0 3px var(--vellum), inset 0 0 0 4px var(--brass); }
.etile-pic.night { background: var(--page); border-color: var(--honey); box-shadow: none; }
.etile-pic img { max-height: 100%; max-width: 92%; width: auto; height: auto; object-fit: contain; }
.etile-n { font: 600 1rem/1.25 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 0; color: var(--link); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.etile:hover .etile-n { color: var(--link-hover); text-decoration-thickness: 2.5px; }
.etile:hover .etile-pic { filter: brightness(1.04); }
@media (min-width: 1000px) {
  .every { gap: .7rem; }
  .every-cats, .every-row { display: grid; grid-template-columns: 9.5rem repeat(5, minmax(0, 1fr)); gap: .8rem; align-items: center; }
  .every-cats { list-style: none; font: 800 .75rem/1.3 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
  .every-cats li { display: flex; align-items: center; gap: .35rem; }
  .every-row ul { display: contents; }
  .every-row { align-items: start; }
  .every-t { align-self: center; }
  .every-row li { min-width: 0; }
}
.items-filter .find { max-width: 34rem; }
.tierpick { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; }
.tp { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: .3rem .85rem; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 1rem/1.2 var(--f-ui); }
.tp:hover { background: var(--vellum); text-decoration: underline; }
.tp .num { font-weight: 500; color: var(--ink-soft); }
.tp[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tp[aria-pressed="true"] .num { color: var(--paper); }
.tier-h { flex-wrap: wrap; gap: .5rem .8rem; }
.tier-h::after { min-width: 2rem; }
.tier-n { font: 700 1rem var(--f-ui); color: var(--ink-soft); }
.icards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.icard { display: flex; flex-direction: column; gap: .45rem; height: 100%; padding: .5rem .5rem .85rem; background: var(--paper); border: 1.5px solid var(--brass); border-radius: 8px; scroll-margin-top: 1rem; }
.icard:target, .ucard:target { outline: 3px solid var(--focus); outline-offset: 3px; }
.icard-pic { display: flex; align-items: center; justify-content: center; height: 10.6rem; padding: 4px; margin-bottom: .3rem; background: var(--vellum); border: 1.5px solid var(--ink); border-radius: 6px; box-shadow: inset 0 0 0 3px var(--vellum), inset 0 0 0 4px var(--brass); }
.icard-pic img { max-height: 92%; max-width: 92%; width: auto; height: auto; object-fit: contain; }
.icard h3, .icard .iline, .icard .iflavor { padding-inline: .25rem; }
.icard h3 { font-size: 1.125rem; }
.icard .ieffect { margin-top: auto; padding: .5rem .25rem 0; border-top: 1px solid var(--brass); }
.seg-wrap a { min-width: 2.75rem; justify-content: center; }

/* ---------- 15. Page: a fight ---------- */
.fight-views { margin-bottom: 1.25rem; }
.fight .ptabs-list [role="tab"] { flex: 0 1 auto; }
.offer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.5rem 2rem; align-items: start; }
.offer-pic .frame-in { aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 60%, var(--vellum), var(--paper)); }
.offer-pic .frame-in img { width: 82%; height: auto; }
.earn { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); border: 1.5px solid var(--brass); border-radius: 8px; overflow: hidden; }
.earn > div { padding: .6rem .8rem; background: var(--vellum); }
.earn > div + div { border-left: 1.5px solid var(--brass); }
.earn dt { font: 800 .75rem/1.3 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.earn dd { font: 700 1rem/1.35 var(--f-ui); margin-top: .2rem; }
details.why { border: 1.5px solid var(--brass); border-radius: 8px; background: var(--paper); }
details.why > summary { display: flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .3rem .8rem; cursor: pointer; list-style: none; font: 700 1rem/1.3 var(--f-ui); color: var(--link); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
details.why > summary::-webkit-details-marker { display: none; }
details.why > summary .ic { transition: transform .15s; color: var(--ink-soft); }
details.why[open] > summary .ic { transform: rotate(180deg); }
details.why > :not(summary) { padding: 0 .9rem .8rem; }
.turnbar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding: .6rem .9rem; margin-bottom: 1.25rem; background: var(--vellum); border: 1.5px solid var(--ink); border-radius: 8px; }
.turn-pill { display: inline-flex; align-items: center; min-height: 2rem; padding: .1rem .85rem; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--honey); color: var(--on-honey); font: 800 1rem/1 var(--f-ui); white-space: nowrap; }
.turnbar h2 { font-size: 1.375rem; }
.turnbar h2:focus { outline: none; }
.tb-bits { display: inline-flex; flex-wrap: wrap; gap: .3rem 1rem; font: 700 .9375rem/1.3 var(--f-ui); }
.tb-bits > span { display: inline-flex; align-items: center; gap: .35rem; }
.tb-note { margin-left: auto; font: 500 .9375rem/1.35 var(--f-ui); color: var(--ink-soft); }
.fighters { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1rem; align-items: center; }
.fighter { display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr); gap: 1rem; align-items: start; padding: .75rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 8px;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--brass); min-width: 0; height: 100%; }
.fighter.foe { grid-template-columns: minmax(0, 1fr) minmax(7rem, 11rem); }
.ftext { display: flex; flex-direction: column; gap: .45rem; min-width: 0; padding-top: .2rem; }
.ftext h3 { font-size: 1.5rem; line-height: 1.1; }
.ftext .ic { width: 1rem; height: 1rem; vertical-align: -.15em; margin-right: .3rem; }
.fpic { position: relative; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--vellum); aspect-ratio: 4 / 5; }
.fpic::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, var(--honey) 0 9px, transparent 9px) top left / 18px 18px no-repeat, linear-gradient(225deg, var(--honey) 0 9px, transparent 9px) top right / 18px 18px no-repeat,
              linear-gradient(45deg, var(--honey) 0 9px, transparent 9px) bottom left / 18px 18px no-repeat, linear-gradient(315deg, var(--honey) 0 9px, transparent 9px) bottom right / 18px 18px no-repeat; }
.fpic-hero img { display: block; width: 112%; max-width: none; margin: 4% 0 0 -6%; }
.fpic-crab { display: flex; align-items: center; justify-content: center; }
.fpic-crab img { width: 96%; height: auto; }
.vs { display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--honey); color: var(--on-honey); border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 3px var(--honey), inset 0 0 0 4px var(--ink); font: italic 800 1.1rem/1 var(--f-display); }
.hands { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .2rem; }
.hands li { display: flex; align-items: center; gap: .5rem; flex: 1 1 9rem; padding: .35rem .5rem; background: var(--vellum); border: 1.5px solid var(--ink); border-radius: 6px; font: 600 1rem/1.2 var(--f-display); }
.hands li > span:last-child { display: flex; flex-direction: column; gap: .1rem; }
.hands .eyebrow { font-size: .6875rem; }
.well-sm { width: 40px; height: 40px; flex: none; box-shadow: none; }
.intent .chip .ic { width: 1rem; height: 1rem; margin: 0; }
.fight-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; margin-top: 1.25rem; }
.moves h4.goto-h { margin-top: .35rem; }
.whatjust { padding: .7rem .9rem; border: 2px solid var(--dusk); border-radius: 8px; background: var(--paper); }
.whatjust h4 { display: flex; align-items: center; gap: .4rem; margin-bottom: .3rem; }
.whatjust p { font: 600 1.0625rem/1.45 var(--f-ui); }
.moves .choice-sub { overflow-wrap: anywhere; }
.blog { padding: 1rem; background: var(--vellum); border: 1.5px solid var(--ink); border-radius: 8px; }
.log { list-style: none; display: flex; flex-direction: column; }
.log > li + li { margin-top: .7rem; padding-top: .7rem; border-top: 1.5px solid var(--brass); }
.log-r { margin-bottom: .35rem; font: 800 .75rem/1.3 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.log .dots { gap: .45rem; font-size: 1.0625rem; line-height: 1.5; }
.ends { margin-top: 1.5rem; }
.ends h3 { font-size: 1.25rem; padding-bottom: .5rem; border-bottom: 3px double var(--ink); }
.fight-end h4 { font-size: 1.25rem; }
@media (max-width: 1180px) {
  .fight-cols { grid-template-columns: minmax(0, 1fr); }
  .fighters { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .vs { justify-self: center; margin-block: -.4rem; }
}
@media (max-width: 760px) {
  .offer-grid { grid-template-columns: minmax(0, 1fr); }
  .offer-pic { max-width: 26rem; }
  .tb-note { margin-left: 0; }
}
@media (max-width: 560px) {
  .fighter, .fighter.foe { grid-template-columns: 6.5rem minmax(0, 1fr); gap: .75rem; }
  .fighter.foe .fpic { order: -1; }
  .ftext h3 { font-size: 1.3rem; }
  .earn > div + div { border-left: 0; border-top: 1.5px solid var(--brass); }
}

/* ---------- 16. Page: quests ---------- */
.quest { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(16rem, 1fr); gap: 1.5rem 2rem; align-items: start; }
.quest-head { gap: .5rem; padding-bottom: 1rem; border-bottom: 1.5px solid var(--brass); }
.quest-meta { gap: .4rem 1.1rem; }
.quest-meta .time { margin-left: auto; }
.qsteps { list-style: none; display: flex; align-items: center; }
.qsteps li { display: flex; align-items: center; }
.qsteps li + li::before { content: ""; width: .7rem; height: 1.5px; background: var(--ink); }
.qsteps li > span:first-child { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 1.5px dashed var(--ink); border-radius: 50%; background: var(--paper); font: 800 .8125rem/1 var(--f-ui); }
.qsteps .done > span:first-child { background: var(--honey); color: var(--on-honey); border-style: solid; }
.qsteps .done .ic { width: .95rem; height: .95rem; }
.qsteps .now > span:first-child { background: var(--red); color: var(--paper); border-style: solid; }
:root[data-theme="dark"] .qsteps .now > span:first-child { color: var(--page); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qsteps .now > span:first-child { color: var(--page); } }
.quest-tags { font-size: 1rem; }
.quest-tags .eyebrow { margin-right: .4rem; }
.story { display: grid; grid-template-columns: minmax(9rem, 13.5rem) minmax(0, 1fr); gap: 1rem 1.75rem; align-items: start; }
.qgiver { display: flex; flex-direction: column; align-items: center; gap: .3rem; margin: 0; }
.arch { width: 100%; aspect-ratio: 13 / 16; overflow: hidden; border: 2px solid var(--ink); border-radius: 50% 50% 8px 8px / 36% 36% 8px 8px; background: var(--vellum);
  box-shadow: inset 0 0 0 5px var(--honey), inset 0 0 0 6.5px var(--ink); padding: 6px; }
.arch img { display: block; width: 104%; max-width: none; margin: 4% 0 0 -2%; border-radius: 50% 50% 4px 4px / 32% 32% 4px 4px; }
.qgiver figcaption { display: flex; flex-direction: column; align-items: center; gap: .1rem; text-align: center; }
.qg-name { font: 600 1.25rem/1.2 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 0; }
.story-t { font-size: 1.1875rem; line-height: 1.6; }
.chip-lasting { text-transform: uppercase; vertical-align: middle; margin-right: .2rem; }
.chip-lasting .ic { width: 1rem; height: 1rem; }
.quest .choice-sub b { font-weight: 800; color: var(--ink); }
.quest .choice.primary .choice-sub b { color: var(--primary-fg); }
.quest .go li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .6rem; }
.journal h3.eyebrow { margin-top: .2rem; }
.qlist { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.qlist > li { position: relative; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .75rem; align-items: center; padding: .65rem .75rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; }
.qlist > li.now { background: var(--vellum); border-width: 2px; box-shadow: 0 3px 0 var(--lift); }
.qlist > li:hover { background: var(--vellum); }
.qlist > li:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.qlist a { font: 700 1.0625rem/1.25 var(--f-body); }
.qlist a::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.qlist a:focus-visible { outline: none; }
.qlist p { font: 500 .9375rem/1.35 var(--f-ui); }
.qlist p .ic { width: 1rem; height: 1rem; margin-right: .2rem; }
.qthumb { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--vellum); box-shadow: inset 0 0 0 2px var(--honey); }
.qthumb img { width: 170%; max-width: none; height: auto; margin: 22% 0 0 -6%; }
.qthumb-crab img { width: 120%; margin: 6% 0 0 0; }
.qthumb-ic .ic { width: 1.7rem; height: 1.7rem; }
.legend h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.25rem; padding-bottom: .5rem; border-bottom: 3px double var(--ink); }
.legend-l { display: flex; flex-direction: column; gap: .2rem; }
.legend-l dt { display: flex; align-items: center; gap: .35rem; margin-top: .6rem; font: 800 1rem/1.3 var(--f-ui); }
.legend-l dd { font: 500 .9375rem/1.45 var(--f-ui); color: var(--ink-soft); }
.legend-foot { display: flex; gap: .55rem; align-items: flex-start; padding-top: .7rem; border-top: 1.5px solid var(--brass); font-size: 1.0625rem; }
.legend-foot .ic { flex: none; margin-top: .25rem; color: var(--ink-soft); }
@media (max-width: 1180px) { .quest { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899.98px) {
  .quest { display: flex; flex-direction: column; gap: 1.25rem; }
  .quest > .col { display: contents; }
  .quest-head { order: 1; }
  .quest-tabs { order: 2; }
  .quest-step, .journal, .legend { order: 3; }
}
@media (max-width: 560px) {
  .story { display: block; }
  .story::after { content: ""; display: block; clear: both; }
  .qgiver { float: left; width: 7.25rem; margin: .3rem 1rem .4rem 0; }
  .story-t { font-size: 1.0625rem; }
  .qg-name { font-size: 1rem; }
  .quest-meta .time { margin-left: 0; }
}

/* ---------- 17. Page: bag & gear ---------- */
.bagpage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.75rem 2rem; align-items: start; }
.bagpage > .bag { grid-column: 1 / -1; }
.wr-grid { display: grid; grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr); gap: 1rem 1.25rem; align-items: start; }
.wr-pic .frame-in { aspect-ratio: 220 / 470; align-items: flex-end; background: var(--vellum); }
.wr-pic .frame-in > span { display: flex; justify-content: center; width: 100%; height: 100%; align-items: flex-end; }
.wr-pic .frame-in img { width: 86%; height: auto; margin-bottom: 3%; }
.wr-cap { font: 600 1.125rem/1.2 var(--f-display); }
.outfits { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.outfit { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: .7rem; width: 100%; padding: .55rem; text-align: left; background: var(--paper); color: var(--ink);
  border: var(--edge-w) solid var(--edge); border-radius: 8px; box-shadow: 0 3px 0 var(--lift); font: 500 1rem/1.35 var(--f-ui); }
.outfit:hover { background: var(--vellum); }
.outfit[aria-pressed="true"] { background: var(--vellum); border-width: 3px; box-shadow: 0 3px 0 var(--lift), inset 0 0 0 1px var(--ink); }
.of-thumb { height: 5.2rem; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--vellum); display: flex; justify-content: center; align-items: flex-end; }
.of-thumb img { width: 92%; height: auto; }
.of-t { display: flex; flex-direction: column; gap: .2rem; }
.of-n { font: 800 1.0625rem/1.2 var(--f-ui); }
.of-wear { display: none; align-self: flex-start; align-items: center; gap: .3rem; margin-top: .2rem; padding: .05rem .55rem; border: 1.5px solid var(--ink); border-radius: 999px; font: 800 .75rem/1.4 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; }
.outfit[aria-pressed="true"] .of-wear { display: inline-flex; }
.of-wear .ic { width: .9rem; height: .9rem; }
.slots { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: .7rem; }
.slot { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: .75rem; align-items: center; padding: .6rem .7rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; }
.slot.wide { grid-column: 1 / -1; }
.slot.empty { background: var(--vellum); border-style: dashed; border-color: var(--ink-soft); }
.slot-ic .ic { width: 1.6rem; height: 1.6rem; color: var(--ink-soft); }
.slot-t { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.slot-n { font: 600 1.1875rem/1.2 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 0; }
.slot-e { font: italic 1.0625rem var(--f-body); color: var(--ink-soft); }
.guard-from { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.guard-from b { display: inline-flex; align-items: center; gap: .3rem; }
.bag-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 2rem; }
.bag-top .sec-h { flex: 1 1 16rem; }
.bagspace { flex: 0 1 17rem; min-width: 12rem; }
.bagtiles { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: .8rem; }
.bagtile { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; width: 100%; height: 100%; padding: .55rem .6rem .7rem; text-align: left; background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 8px; font: 500 .9375rem/1.3 var(--f-ui); }
.bagtile:hover { background: var(--vellum); }
.bagtile[aria-pressed="true"] { border-width: 3px; padding: calc(.55rem - 1.5px) calc(.6rem - 1.5px) calc(.7rem - 1.5px); background: var(--vellum); box-shadow: 0 3px 0 var(--lift); }
.well-lg { width: 100%; height: 6.4rem; display: flex; align-items: center; justify-content: center; }
.well-lg img { max-height: 84%; }
.bt-n { font: 600 1.1875rem/1.2 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 0; margin-top: .3rem; }
.bt-l { color: var(--ink-soft); }
.bt-l .chip { margin-bottom: .2rem; }
.bag-detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.25rem 1.75rem; padding: 1.1rem; background: var(--vellum); border: 2px solid var(--ink); border-radius: 10px; scroll-margin-top: 5rem; }
.bd-main { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.bd-head { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; align-items: center; }
.bd-head .well-lg { height: 6.5rem; }
.bd-head h3 { font-size: 1.5rem; }
.bd-act .choice { box-sizing: border-box; }
.bd-act .choice-sub .ic { width: 1rem; height: 1rem; vertical-align: -.15em; }
.bd-give { grid-column: 1 / -1; background: var(--paper); }
.bd-give h4 { font-size: 1.1875rem; }
.notes { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; }
.bag-details { min-width: 0; }
@media (max-width: 1180px) {
  .bagpage { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899.98px) {
  .bag-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .wr-grid { grid-template-columns: minmax(0, 1fr); }
  .wr-pic { max-width: 12rem; margin-inline: auto; }
  .bagtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .bt-n { font-size: 1.0625rem; }
  .bd-head { grid-template-columns: 5rem minmax(0, 1fr); }
  .bd-head .well-lg { height: 5rem; }
}

/* ---------- 18. Page: home (housing) ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); gap: 1.5rem; align-items: start; }
.home-pic .frame-in.room { aspect-ratio: 1200 / 896; }
.home-story { padding: .6rem .4rem .3rem; }
.spot-marks { list-style: none; position: absolute; inset: 0; z-index: 2; }
.spot-marks li { position: absolute; transform: translate(-50%, -50%); }
.mark { position: relative; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
  font: 800 1.2rem/1 var(--f-display); text-decoration: none; box-shadow: 0 2px 0 var(--ink); }
.mark::after { content: "+"; position: absolute; top: -.35rem; right: -.35rem; display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--ink); color: var(--paper); font: 800 .9rem/1 var(--f-ui); }
.mark.filled { background: var(--honey); color: var(--on-honey); }
.mark.filled::after { display: none; }
a.mark:hover { background: var(--vellum); }
a.mark.filled:hover { background: var(--paper); }
.spot-key { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-weight: 700; }
.spot-key > span { display: inline-flex; align-items: center; gap: .45rem; }
.mark.sm { width: 1.3rem; height: 1.3rem; box-shadow: none; border-width: 1.5px; }
.mark.sm::after { width: .7rem; height: .7rem; top: -.3rem; right: -.3rem; font-size: .6rem; }
.spots { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.spots > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; padding: .6rem .8rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; scroll-margin-top: 5rem; }
.spots > li:target, .spots > li:focus { outline: 3px solid var(--focus); outline-offset: 3px; }
.spots .mark { box-shadow: none; }
.spot-t { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.spot-n { font: 800 1.0625rem/1.25 var(--f-ui); }
.spot-has { display: flex; align-items: center; gap: .5rem; font: 500 1rem/1.3 var(--f-body); }
.spot-has i { color: var(--ink-soft); }
.well-xs { width: 2.4rem; height: 2.4rem; flex: none; box-shadow: none; }
.home-note p { font-size: 1.0625rem; }
.job { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: .5rem .9rem; align-items: center; padding: .8rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; }
.job > :nth-child(n+3) { grid-column: 1 / -1; }
.job h3 { font-size: 1.25rem; }
.chest { list-style: none; display: flex; flex-wrap: wrap; gap: .8rem; }
.chest li { display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 5.6rem; text-align: center; font: 700 .875rem/1.25 var(--f-ui); }
.chest .free-sp .well { background: var(--paper); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--brass); }
.home-rooms .btn, .home-chest .btn { align-self: flex-start; }
@media (max-width: 1180px) { .home { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899.98px) {
  .home { display: flex; flex-direction: column; gap: 1.25rem; }
  .home > .col { display: contents; }
  .home-pic { order: 1; }
  .home-note { order: 2; }
  .home-tabs { order: 3; }
  .home-spots, .home-bench, .home-chest { order: 4; }
  .home-rooms { order: 5; }
  .home-ways { order: 6; }
  /* screens reached through More name themselves in the title row (as the profile does) */
  body.more-screen h1.ph1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
@media (max-width: 560px) {
  .mark { width: 2.75rem; height: 2.75rem; font-size: 1.05rem; }
  .spots > li { grid-template-columns: auto minmax(0, 1fr); }
  .spots > li .btn { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- 19. Page: market ---------- */
.mk-pic .frame-in img { object-fit: cover; }
.mk-intro { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(15rem, 1fr); gap: 1rem 1.5rem; align-items: start; }
.mk-facts { list-style: none; display: flex; flex-direction: column; gap: .5rem; font: 500 1rem/1.4 var(--f-ui); }
.mk-facts li { display: flex; gap: .5rem; align-items: flex-start; }
.mk-facts .ic { margin-top: .1rem; }
.mk-facts b { font-weight: 800; }
.mk { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(15rem, 1fr); gap: 1.75rem 1.5rem; align-items: start; }
.mk-browse, .mk-sell, .mk-mine { grid-column: 1 / -1; }
.mk-sel .select-pic, .pf .select-pic { flex: none; }
.pf .num-in { flex: none; width: 7.5rem; }
.l-rar { margin-top: .15rem; }
.mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.mk-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem 1rem; align-items: start; background: var(--vellum); }
.mk-find { grid-column: 1 / -1; }
.mk-find label { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.mk-find .small { font-weight: 500; }
.mk-sel { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.mk-sel label, .mk-range legend { font: 800 1rem/1.3 var(--f-ui); }
.mk-sel .select-pic { width: 100%; }
.mk-range { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.mk-range legend { padding: 0; margin-bottom: .3rem; }
.mk-range .row { flex-wrap: nowrap; gap: .4rem; font: 500 .9375rem var(--f-ui); color: var(--ink-soft); }
.num-in { flex: 1 1 4rem; min-width: 0; width: 100%; min-height: 2.75rem; }
.mk-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(15rem, 1fr); gap: 1.25rem 1.5rem; align-items: start; }
.lhead { display: grid; grid-template-columns: minmax(0, 1fr) 2.5rem minmax(5.5rem, auto) 5.5rem; gap: .75rem; padding: 0 .8rem .3rem; font: 800 .75rem/1.3 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); border-bottom: 1.5px solid var(--ink); }
.listings { list-style: none; display: flex; flex-direction: column; border: 1.5px solid var(--ink); border-top: 0; border-radius: 0 0 8px 8px; overflow: hidden; background: var(--paper); }
.lrow { display: grid; grid-template-columns: minmax(0, 1fr) 2.5rem minmax(5.5rem, auto) 5.5rem; gap: .75rem; align-items: center; padding: .6rem .8rem; border-top: 1px solid var(--grid-line); }
.lrow:first-child { border-top: 0; }
.lrow.sel { background: var(--vellum); box-shadow: inset 4px 0 0 var(--red); }
.l-item { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.well-md { width: 3.1rem; height: 3.1rem; flex: none; }
.well-md .well-none span { display: none; }
.l-n { font: 600 1.125rem/1.2 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 0; }
.l-sel { display: inline-flex; align-items: center; gap: .25rem; font: 800 .75rem/1.3 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.l-sel .ic { width: .9rem; height: .9rem; }
.l-qty { font: 500 1rem var(--f-ui); }
.l-lab { display: none; }
.l-price { display: flex; flex-direction: column; align-items: flex-start; gap: .05rem; font-family: var(--f-ui); }
.coinamt { display: inline-flex; align-items: center; gap: .3rem; font: 800 1rem var(--f-ui); white-space: nowrap; }
.coinamt .ic { width: 1.05rem; height: 1.05rem; }
.l-buy { justify-self: end; }
.l-buy .btn { min-width: 4.2rem; }
.mk-check { position: sticky; top: 1rem; border-width: 2px; }
.mk-check h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.25rem; padding-bottom: .5rem; border-bottom: 3px double var(--ink); }
.mk-check h3:focus { outline: none; }
.mk-pick { display: grid; grid-template-columns: 3.9rem minmax(0, 1fr); gap: .75rem; align-items: center; padding: .6rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 6px; }
.mk-pick .well { width: 3.9rem; height: 3.9rem; }
.mk-q { font: 600 1.375rem/1.2 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 1; }
.mk-check .ic { vertical-align: -.2em; }
.sell-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem 1.5rem; align-items: start; background: var(--vellum); }
.sell-grid h3 { font-size: 1.25rem; }
.sellpick { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.sp { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: .6rem; align-items: center; width: 100%; min-height: 3.1rem; padding: .4rem .6rem; text-align: left; background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 8px; font: 500 .9375rem/1.3 var(--f-ui); }
.sp:hover { background: var(--paper); text-decoration: underline; }
.sp[aria-pressed="true"] { border-width: 3px; padding: calc(.4rem - 1.5px) calc(.6rem - 1.5px); box-shadow: 0 3px 0 var(--lift); }
.sp-off { background: var(--vellum); border: 2px dashed var(--ink-soft); color: var(--ink-soft); cursor: not-allowed; }
.sp-off:hover { text-decoration: none; }
.sp-t { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.sp-n { font: 600 1.0625rem/1.2 var(--f-display); font-variation-settings: 'SOFT' 100, 'WONK' 0; }
.sp-n .chip { margin-left: .3rem; font-size: .6875rem; min-height: 1.4rem; }
.sp-ok { display: none; align-self: flex-start; align-items: center; margin-top: .15rem; gap: .25rem; font: 800 .75rem var(--f-ui); letter-spacing: .08em; text-transform: uppercase; }
.sp[aria-pressed="true"] .sp-ok { display: inline-flex; }
.sp-ok .ic { width: .9rem; height: .9rem; }
.sell-sum { display: flex; flex-direction: column; gap: .6rem; padding: .9rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; }
.sell-sum .rows .you { border-top: 1.5px solid var(--ink); font-weight: 800; }
.sell-sum .rows .you b, .sell-sum .rows .you span { font-size: 1.0625rem; }
[data-sell-warn]:empty { display: none; }
[data-sell-warn] { padding: .4rem .6rem; border-left: 4px solid var(--red); background: var(--paper); font-weight: 700; }
.mine { list-style: none; gap: .7rem; }
.mine > li { display: grid; grid-template-columns: 3.1rem minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: .4rem .75rem; align-items: center; padding: .7rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; }
.mine .well { grid-row: span 2; }
.mine .btn { grid-column: 2 / -1; justify-self: start; }
@media (max-width: 1180px) {
  .mk-cols { grid-template-columns: minmax(0, 1fr); }
  .mk-check { position: static; }
  .mk { grid-template-columns: minmax(0, 1fr); }
  .sell-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sell-grid > :first-child { grid-row: span 2; }
}
@media (max-width: 899.98px) {
  .mk-intro { grid-template-columns: minmax(0, 1fr); }
  .mk-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lhead { display: none; }
  .listings { border-top: 1.5px solid var(--ink); border-radius: 8px; }
  .lrow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; }
  .l-item { flex: 1 1 100%; }
  .l-price { margin-left: auto; align-items: flex-end; }
  .l-lab { display: inline; }
  body.more-screen h1.ph1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
@media (max-width: 760px) {
  .sell-grid { grid-template-columns: minmax(0, 1fr); }
  .sell-grid > :first-child { grid-row: auto; }
}
@media (max-width: 560px) {
  .mk-filters { grid-template-columns: minmax(0, 1fr); }
  .mk-pic .frame-in { aspect-ratio: 16 / 7 !important; }
}

/* ---------- 20. Page: guild ---------- */
.gh-in { display: block; aspect-ratio: 1376 / 590; }
.gh-box { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1376 / 768; transform: translateY(-6.5%); }
.gh-box img { display: block; width: 100%; height: 100%; }
.wall-emblem { position: absolute; left: 44.404%; top: 11.719%; width: 11.265%; height: 24.74%; }
.wall-emblem svg { display: block; width: 100%; height: 100%; }
.guild { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 1fr); gap: 1.5rem; align-items: start; }
.guild-story { font-size: 1.1875rem; }
.board-top { justify-content: space-between; flex-wrap: nowrap; gap: .75rem 1.25rem; }
.board-top .btn { flex: none; }
.threads { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.threads > li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; gap: .4rem .9rem; align-items: center; padding: .65rem .8rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; }
.th-ic { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--vellum); }
.th-t { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.th-n { font: 700 1.0625rem/1.3 var(--f-ui); min-height: 2.75rem; }
.th-t .chip { min-height: 1.4rem; font-size: .6875rem; margin-right: .2rem; }
.th-m { display: flex; flex-direction: column; align-items: flex-end; text-align: right; color: var(--ink-soft); }
.th-m b { color: var(--ink); }
.members { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0 1.5rem; }
.members > li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto; gap: .2rem .75rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--grid-line); }
.mface { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--honey); color: var(--on-honey); font: 800 .875rem/1 var(--f-ui); }
.mface img { width: 150%; max-width: none; margin: 30% 0 0 0; }
.m-t { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.m-n, .m-t a { font: 700 1.0625rem/1.25 var(--f-body); }
.m-f { display: flex; flex-direction: column; align-items: flex-end; text-align: right; color: var(--dusk); font-weight: 700; }
.m-f .ic { width: 1rem; height: 1rem; }
.m-f span { font-weight: 500; }
.gbox-h { font-size: 1.25rem; padding-bottom: .5rem; border-bottom: 3px double var(--ink); }
.about-em { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: .9rem; align-items: center; padding-bottom: .7rem; border-bottom: 1px solid var(--brass); }
.emb { display: block; padding: .3rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 4px; }
.emb svg { display: block; width: 100%; height: auto; }
.gfacts { grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr); }
.gdesc { margin: 0; padding: .7rem .9rem; background: var(--paper); border-left: 4px solid var(--brass); border-radius: 0 6px 6px 0; }
.gdesc p:first-child { font: italic 1.0625rem/1.45 var(--f-body); }
.fbig { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; }
.fbig b { font: 600 2.4rem/1 var(--f-display); }
.fbig span { font: 500 1rem var(--f-ui); }
.fmine { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .75rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 6px; font: 500 .9375rem/1.35 var(--f-ui); }
.fmine b { font-weight: 800; font-size: 1rem; }
.faction .rows .ic { width: 1rem; height: 1rem; margin-right: .3rem; vertical-align: -.15em; }
.exp-n { font-size: 1.375rem; }
@media (max-width: 1180px) { .guild { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 899.98px) {
  .guild { display: flex; flex-direction: column; gap: 1.25rem; }
  .guild > .col { display: contents; }
  .guild-story { order: 1; }
  .guild-tabs { order: 2; }
  .guild-board, .guild-members, .guild-hall, .guild-exp { order: 3; }
  .guild-ways { order: 4; }
  .board-top { flex-wrap: wrap; }
  body.more-screen h1.ph1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
@media (max-width: 560px) {
  .threads > li { grid-template-columns: minmax(0, 1fr); }
  .th-ic { display: none; }
  .th-m { flex-direction: row; flex-wrap: wrap; gap: 0 .5rem; align-items: baseline; text-align: left; }
  .guild-story { font-size: 1.0625rem; }
}
.m-f { grid-column: 2 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 0 .35rem; text-align: left; }
.members > li { grid-template-columns: 2.6rem minmax(0, 1fr); }
.mface { grid-row: span 2; }
.guild-exp .gfacts { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
.guild-exp .gfacts dd { margin-bottom: .45rem; }
@media (max-width: 899.98px) { .linkbtn { display: inline-flex; align-items: center; min-height: 2.75rem; } }

/* ---------- 21. Page: the staff console (a sample) ---------- */
.con-chip { align-self: flex-start; }
.console { display: flex; flex-direction: column; gap: .9rem; }
.con-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .6rem 1rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--brass); }
.con-brand { display: inline-flex; align-items: center; gap: .5rem; font: 600 1.25rem/1.2 var(--f-display); }
.con-brand b { font-weight: 600; }
.con-who { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.con-acts { gap: .4rem 1rem; }
.con-body { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.con-nav { position: sticky; top: 1rem; padding: .7rem; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--brass); }
.con-nav ul { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.con-nav a { display: flex; align-items: center; gap: .5rem; min-height: 2.1rem; padding: .2rem .5rem; border-radius: 6px; color: var(--ink); text-decoration: none; font: 500 1rem/1.2 var(--f-ui); }
.con-nav a:hover { background: var(--vellum); text-decoration: underline; }
.con-nav a[aria-current] { background: var(--vellum); box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 800; }
.con-nav .ic { width: 1.1rem; height: 1.1rem; color: var(--ink-soft); }
.con-dot { width: 1.1rem; flex: none; }
.con-n { margin-left: auto; font-size: .875rem; color: var(--ink-soft); white-space: nowrap; }
.con-g { padding: .6rem .5rem .15rem; border-top: 1.5px solid var(--brass); margin-top: .35rem; }
.con-g:empty { padding: 0; }
.con-main { min-width: 0; padding: var(--pad, clamp(1rem, 1.8vw, 1.5rem)); background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px var(--brass); }
.con-views { margin-bottom: 1.1rem; }
.con-main .ptabs-list [role="tab"] { flex: 0 1 auto; }
.con-h2 { font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); }
.con-start { display: flex; flex-direction: column; gap: .5rem; }
.con-plus { list-style: none; display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; }
.con-plus .linkbtn { display: inline-flex; align-items: center; gap: .25rem; min-height: 2.25rem; font: 700 1rem var(--f-ui); }
.con-plus .ic { width: 1rem; height: 1rem; }
.con-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; align-items: start; }
.con-card h4, .con-main .pane h4 { font-size: 1.1875rem; }
.con-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; font: 500 1rem var(--f-ui); }
.con-big b { font: 600 2.2rem/1 var(--f-display); }
.con-facts { grid-template-columns: minmax(5.5rem, max-content) minmax(0, 1fr); gap: .35rem .9rem; }
.con-facts dd { font: 500 .9375rem/1.4 var(--f-ui); }
.con-warn { display: flex; gap: .6rem; padding: .7rem .8rem; border: 2px solid var(--red); border-radius: 8px; background: var(--paper); font: 500 .9375rem/1.4 var(--f-ui); }
.con-warn > .ic { flex: none; color: var(--red); width: 1.3rem; height: 1.3rem; }
.qapp { list-style: none; display: flex; flex-direction: column; }
.qapp > li { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.6fr) minmax(9rem, .8fr); gap: .8rem 1.2rem; padding: .9rem 0; border-top: 1.5px solid var(--brass); }
.qapp > li:first-child { border-top: 0; }
.qa-q { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .75rem; align-items: start; }
.qa-n { font: 700 1.0625rem/1.25 var(--f-body); }
.qa-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.qa-meta dt { font: 800 .6875rem/1.3 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .2rem; }
.qa-meta .chip { min-height: 1.4rem; font-size: .6875rem; }
.qa-ok, .qa-no { display: inline-flex; align-items: center; gap: .2rem; font-weight: 800; }
.qa-ok { color: var(--dusk); }
.qa-no { color: var(--red); }
.qa-ok .ic, .qa-no .ic { width: 1rem; height: 1rem; }
.qa-call { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.con-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.packs { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.packs > li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .6rem .75rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 6px; }
.packs > li > .small { flex: 1 1 100%; }
.packs .held { border-style: dashed; }
.packs .chip { min-height: 1.4rem; font-size: .6875rem; }
.waiting { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: .5rem; }
.waiting li { display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem; border: 1.5px dashed var(--ink-soft); border-radius: 6px; background: var(--paper); font: 500 .9375rem/1.25 var(--f-ui); }
.waiting li > span:last-child { display: flex; flex-direction: column; }
.waiting .well-xs { display: grid; place-items: center; }
.waiting .well-xs .ic { width: 1.1rem; height: 1.1rem; color: var(--ink-soft); }
.last-icon { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: .75rem; align-items: center; padding-top: .7rem; border-top: 1px solid var(--brass); }
.sw { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--grid-line); }
.sw:first-of-type { border-top: 0; padding-top: 0; }
.sw-col { flex-direction: column; }
.sw-t { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.switch { flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding: .3rem .8rem .3rem .5rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font: 800 .9375rem var(--f-ui); }
.switch .sw-k { position: relative; width: 2.4rem; height: 1.3rem; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--vellum); }
.switch .sw-k::after { content: ""; position: absolute; top: 1.5px; left: 2px; width: .95rem; height: .95rem; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--ink); transition: left .15s; }
.switch[aria-checked="true"] .sw-k { background: var(--dusk); }
.switch[aria-checked="true"] .sw-k::after { left: calc(100% - 1.1rem); }
.switch[aria-disabled="true"] { border-style: dashed; border-color: var(--ink-soft); color: var(--ink-soft); background: var(--vellum); cursor: not-allowed; }
.switch .ic { width: 1rem; height: 1rem; }
.audit { list-style: none; display: flex; flex-direction: column; }
.audit li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--grid-line); font: 500 .9375rem/1.35 var(--f-ui); }
.audit li:first-child { border-top: 0; }
.audit li > span:last-child { display: flex; flex-direction: column; gap: .1rem; }
.au-t { font-weight: 800; white-space: nowrap; }
.phone-card { max-width: 25rem; margin: 0 auto; padding: 1.1rem; background: var(--vellum); border: 2px solid var(--ink); border-radius: 18px; box-shadow: inset 0 0 0 5px var(--vellum), inset 0 0 0 6px var(--brass); }
.al-eb { display: flex; align-items: center; gap: .4rem; color: var(--red); }
.al-timers { list-style: none; display: flex; flex-direction: column; padding: .3rem .9rem; border: 1.5px solid var(--brass); border-radius: 8px; background: var(--paper); }
.al-timers li { display: flex; align-items: center; gap: .55rem; padding: .5rem 0; font: 700 1rem var(--f-ui); }
.al-timers li + li { border-top: 1px solid var(--grid-line); }
.al-timers b { margin-left: auto; white-space: nowrap; }
.phone-card h3 { font-size: 1.3125rem; }
@media (max-width: 1180px) {
  .qapp > li { grid-template-columns: minmax(0, 1fr); }
  .con-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899.98px) {
  .con-body { grid-template-columns: minmax(0, 1fr); }
  .con-nav { position: static; }
  .con-nav ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 2px .5rem; }
  .con-nav a { min-height: 2.75rem; }
  .con-g { grid-column: 1 / -1; }
  .con-who { margin-left: 0; }
  .con-plus .linkbtn { min-height: 2.75rem; }
}
@media (max-width: 560px) {
  .qa-meta { grid-template-columns: minmax(0, 1fr); }
  .con-main { --pad: .8rem; }
  .phone-card { padding: .9rem; }
}
@media (max-width: 899.98px) { .con-nav li:has(.con-dot) { display: none; } }

/* ---------- 22. Pages: the capital's places and districts (/places/..., builder 3) ---------- */
/* where this is: The capital > Riverside > Ferry Stairs */
.plc-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0 .4rem; font: 700 .9375rem/1.3 var(--f-ui); }
.plc-crumbs li { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; }
.plc-crumbs li + li::before { content: "\203A"; color: var(--ink-soft); font-weight: 800; }
.plc-crumbs a { display: inline-flex; align-items: center; min-height: 2.25rem; }
.plc-crumbs [aria-current] { color: var(--ink-soft); font-weight: 500; }
.plc-crumbs + .plc-pic { margin-top: -.75rem; }

.plc-title { gap: .2rem; }
.plc-right { text-align: right; }
.plc-cap-h { justify-content: space-between; font-size: 1.25rem; }

/* the placeholder picture (KIT section 9: a framed, labeled placeholder; sketched in tokens) */
.frame-in.plc-ph { background: repeating-linear-gradient(135deg, var(--fog-line) 0 1px, transparent 1px 9px), var(--vellum); }
.plc-ph svg.fill { position: absolute; inset: 0; width: 100%; height: 100%; }
.plc-ph-chip { position: relative; z-index: 2; background: var(--paper); text-transform: none; letter-spacing: 0; }

/* the place: two columns as on the dashboard; on phones the panels become tabs (Q2-09) */
.plc { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.plc .face .ic, .dst .face .ic { width: 1.6rem; height: 1.6rem; }
.person .pname { font: 700 1.0625rem/1.25 var(--f-body); }
.person-flat:hover { background: var(--paper); }
.person .face-icon img { object-fit: contain; padding: 3px; }
.plc-open { flex-direction: column; gap: .1rem; }
.plc-open a { font-weight: 700; }
.plc-item .item { background: var(--vellum); }
.plc-item .iname a { color: var(--link); }
.plc-item .itext { font-style: italic; }

/* walk to: links, set out as rows (getting around is links, Q2-01) */
.plc-ways { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: .55rem .7rem; }
.plc-ways li { display: flex; min-width: 0; }
.plc-ways a { flex: 1; display: flex; align-items: center; gap: .65rem; min-height: 3.1rem; padding: .45rem .75rem; border: 1.5px solid var(--ink); border-radius: 8px;
  background: var(--paper); color: var(--ink); text-decoration: none; min-width: 0; }
.plc-ways a:hover { background: var(--vellum); }
.plc-ways a:hover .wn { text-decoration-thickness: 2.5px; }
.plc-ways a > span { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.plc-ways .wn { color: var(--link); font: 700 1.0625rem/1.25 var(--f-body); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.plc-ways .wd { font: 500 .875rem/1.35 var(--f-ui); color: var(--ink-soft); }
.plc-ways .ic { width: 1.35rem; height: 1.35rem; color: var(--ink-soft); }
.plc-exits a { border-width: 2px; box-shadow: 0 3px 0 var(--lift); background: var(--vellum); }
.plc-exits a:hover { background: var(--paper); }
.plc-exits .ic { color: var(--ink); }

/* the district: its places, then the sketch */
.dst { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.dst-places .face img { object-position: 50% 50%; }

/* the dashboard's note when Wren last walked somewhere else (site.js, sessionStorage) */
.plc-last { align-items: flex-start; }
.plc-last > span { flex: 1; min-width: 0; }
.plc-last a { font-weight: 800; }

@media (max-width: 1180px) {
  .plc, .dst { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899.98px) {
  .plc { display: flex; flex-direction: column; gap: 1.25rem; }
  .plc > .col { display: contents; }
  .plc .plc-story { order: 1; }
  .plc .plc-tabs { order: 2; }
  .plc .plc-things, .plc .plc-around, .plc .plc-map { order: 3; }
  .plc .plc-walk { order: 4; }
  .plc-crumbs a, .plc-item .iname a { display: inline-flex; align-items: center; min-height: 2.75rem; }
  .plc-crumbs + .plc-pic { margin-top: -.5rem; }
}
@media (max-width: 560px) {
  .plc-ways { grid-template-columns: minmax(0, 1fr); }
  .plc-crumbs ol { font-size: .875rem; }
}

/* ---------- 23. After the review (2026-11-20): focus, reflow, phone fidelity, and the pages' new parts ---------- */
/* the desktop sidebar is taller than many windows: it scrolls inside itself, so every link can be reached and seen */
@media (min-width: 900px) {
  .side { max-height: calc(100vh - 2rem); overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: .75rem; }
}
@media (max-width: 899.98px) {
  /* the fixed tab bar never covers the control that has focus (WCAG 2.4.11) */
  :root:has(body.game) { scroll-padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 1rem); }
  /* stand-alone links are 44 px tall on phones (KIT section 4) */
  .eyebrow a, .dash-news li a, .m-t a, .pcard dd a { display: inline-flex; align-items: center; min-height: 2.75rem; }
  /* phone screens put their content straight on the page, between the bars, as every phone board does (KIT section 5) */
  main.game-main { border: 0; box-shadow: none; background: transparent; padding: 0; border-radius: 0; }
  .shell { padding-inline: 14px; }
  /* phone boards: only the first paragraph above the dashboard's tabs; no banner or intro above the market's; no
     lede above the bag's; the view-as toggles compact, and the Character sheet is a tab instead of a segment */
  .dash-story > p + p { display: none; }
  .mk-pic { padding: 0; border: 0; background: none; }
  .mk-pic .frame-in, .mk-pic .art-cap, .mk-pic .time, .mk-intro > .initial { display: none; }
  .page-head:has(+ .bagpage) .lede { display: none; }
  .prof-seg { display: none; }
  .prof-viewas .t-sub { display: none; }
  .prof-viewas .toggles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
  .prof-viewas .toggle { align-items: center; text-align: center; padding-inline: .4rem; }
  .prof-viewas .toggle .t-top { flex-direction: column; gap: .1rem; }
}
@media (max-width: 560px) {
  .shell { padding-inline: 14px; }
  .con-main { border: 0; box-shadow: none; background: transparent; padding: 0; border-radius: 0; }
  /* the kit's phone type sizes (KIT section 3) */
  body { font-size: 1rem; line-height: 1.5; }
  h1 { font-size: 1.5rem; line-height: 1.1; }
  .lede { font-size: 1rem; }
  /* the Preview label stays on one row: the theme button shows only its icon (its words stay for screen readers) */
  .preview-bar p { flex: 1 1 0; min-width: 0; }
  .preview-bar .barbtn { width: 2.75rem; padding: 0; justify-content: center; }
  .barbtn .bb-t { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* a choice's cost, Free or lock reason sits under its title, the Quest chip beside it (Dashboard-Phone) */
  .choice-end { flex-basis: 100%; margin-left: calc(1.35rem + .75rem); justify-content: flex-start; }
  /* a shorter offer picture (Combat-Phone) */
  .offer-pic .frame-in { aspect-ratio: auto; height: 8.6rem; }
  .offer-pic .frame-in img { width: auto; height: 92%; }
  /* the bag as a list of rows on phones (Inventory-Phone) */
  .bagtiles { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .bagtile { display: grid; grid-template-columns: 3.9rem minmax(0, 1fr); column-gap: .75rem; row-gap: .1rem; align-items: center; }
  .bagtile .well-lg { grid-row: 1 / span 3; width: 3.9rem; height: 3.9rem; }
  .bagtile .bt-n { margin-top: 0; }
}
.choice-chip { flex: none; display: inline-flex; }

/* place banners at the height drawn (Dashboard.dc.html 17.5rem, Market.dc.html 9.5rem at 1440) */
.mk-pic .frame-in { aspect-ratio: 16 / 4; }
@media (min-width: 900px) {
  .dash-pic .frame-in, .plc-pic .frame-in { aspect-ratio: 16 / 4.5; min-height: 10rem; }
  .mk-pic .frame-in { aspect-ratio: 16 / 2.5; min-height: 8rem; }
}

/* the phone title row's extras: Profile's Edit, the Market's coin purse */
.titlebar .tt-end { margin-left: auto; display: inline-flex; align-items: center; }
.tt-edit { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; min-width: 2.75rem; padding: 0 .9rem; border: var(--edge-w) solid var(--edge);
  border-radius: 8px; background: var(--paper); color: var(--ink); box-shadow: 0 2px 0 var(--lift); text-decoration: none; font: 800 1rem var(--f-ui); }
.tt-edit:hover { background: var(--vellum); color: var(--ink); text-decoration: underline; }

/* the district list: links, with the current district boxed, pinned and marked "you are here" (Dashboard.dc.html) */
.dlist { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px .4rem; }
.dlist li:has(> a[aria-current]) { grid-column: 1 / -1; }
.dlist a { display: flex; align-items: center; gap: .45rem; min-height: 2.1rem; padding: .2rem .55rem; border-radius: 6px; color: var(--link); font: 700 1rem/1.2 var(--f-ui);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.dlist a:hover { color: var(--link-hover); text-decoration-thickness: 2.5px; }
.dlist a[aria-current] { color: var(--ink); font-weight: 800; text-decoration: none; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.dlist .here-note { margin-left: auto; font: 500 .875rem/1.2 var(--f-ui); color: var(--ink-soft); }
@media (max-width: 899.98px) { .dlist a { min-height: 2.75rem; } }

/* the map's walk-over cards (links, as Navigation.dc.html draws them) */
.walk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .6rem; }

/* Wren's rooms: the painting cropped as the board crops it, with the glowroot bundle on the sill */
.home-pic .frame-in.room { display: block; aspect-ratio: 1140 / 836; }
.home-pic .frame-in.room > img:first-child { width: 105.263%; max-width: none; height: auto; margin: -2.632% 0 0 -2.632%; object-fit: unset; }
.home-pic .frame-in.room > img.room-glow { position: absolute; left: 58.3%; top: 32.1%; width: 6.2%; height: auto; margin: 0; object-fit: unset; }

/* the gear slots are buttons (Inventory.dc.html) */
.slots > li { display: flex; min-width: 0; }
.slots > li.wide { grid-column: 1 / -1; }
button.slot { width: 100%; text-align: left; color: var(--ink); cursor: pointer; }
button.slot:hover { background: var(--vellum); }
button.slot.empty:hover { background: var(--paper); }

/* the market's table: one set of columns for the head and every row, wide enough for "Your listing"; the check box and
   your listings go beside the table only where it still has room for the usual-price lines */
.lhead, .lrow { grid-template-columns: minmax(0, 1fr) 2.5rem 6.75rem 7.25rem; }
@media (max-width: 1399.98px) { .mk-cols { grid-template-columns: minmax(0, 1fr); } }
.l-usual { color: var(--ink-soft); }
.l-lvl { font-weight: 700; color: var(--red); }
.mk-check { position: static; }
.mk-side { min-width: 0; }
.mk-now label { display: flex; align-items: center; gap: .55rem; min-height: 2.75rem; font: 800 1rem/1.3 var(--f-ui); cursor: pointer; }
.mk-now label .small { font-weight: 500; }
.mk-now input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--red); }

/* the profile: the look as small pictures; keepsakes and favorites inside the card on wide screens; facts in two
   columns where the card's text column has room */
.looks { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.looks li { display: flex; align-items: center; gap: .75rem; font: 500 1rem/1.3 var(--f-ui); }
.looks li > span { display: flex; flex-direction: column; gap: .1rem; }
.looks svg { flex: none; width: 2.5rem; height: 2.5rem; }
.prof-card .prof-keep, .prof-card .prof-favs { padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
[data-view="blocked"] .prof-card .prof-keep, [data-view="blocked"] .prof-card .prof-favs { display: none !important; }
.pcard > .stack { container-type: inline-size; }
@container (min-width: 24rem) {
  .pcard .facts { grid-template-columns: minmax(7rem, max-content) minmax(0, 1fr); gap: .55rem 1.2rem; }
  .pcard .facts dd { margin-bottom: 0; }
}
@media (min-width: 900px) { .prof-sheet { display: none; } }
/* the capital list's districts clip their corners, so their summaries and links draw the focus ring inside */
.district > summary:focus-visible, .places a:focus-visible { outline-offset: -4px; }
/* on phones the guild's intro sits at the top of its Hall tab (Guild-Phone; site.js moves it there) */
[data-tab] > [data-phone-into] { order: -1; }
