/* Town (home page). Ported from the approved design/town.html (design/APPROVALS.md 2026-10-21). */

/* Town launcher draft: the main menu as a walkable top-down 3/4 town. Each building is a menu entry.
   Review shell follows motion-board.html; the 540 x 960 stage is the game screen. */
@font-face { font-family: 'Jacquard 24'; src: url('../assets/fonts/Jacquard24-Regular.ttf') format('truetype'); font-display: block; }
@font-face { font-family: 'DotGothic16'; src: url('../assets/fonts/DotGothic16-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url('../assets/fonts/PixelifySans-Variable.ttf') format('truetype'); font-weight: 400 700; font-display: swap; }
:root {
  --paper: #EEE5D1; --ink: #2A2119; --muted: #6E604D; --line: #D2C3A5; --accent: #6B2B2B; --brass: #87692F; --chip: #E4D8BE;
  --parch: #E6D9BC; --parch-2: #D8C7A2; --g-ink: #2A2119; --ox: #6B2B2B; --ox-2: #4A1C1C; --navy: #24324A; --forest: #2F4A3A;
  --cream: #F3E9CF; --gold: #C9A45A; --gold-lo: #8C6E35; --steel: #7F97A8;
  --f-display: 'Jacquard 24', Georgia, serif;
  --f-jp: 'DotGothic16', 'MS Gothic', monospace;
  --f-ui: 'Pixelify Sans', 'DotGothic16', monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* new, pending approval: rod wood (already used by the motion board's scroll) */
  --wood: #6A4A2C; --wood-lo: #3E2A1A;
  --notch: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #17120E; --ink: #EBE1CB; --muted: #A5967C; --line: #3A3027; --accent: #CC8E7C; --brass: #C7A866; --chip: #241C16; color-scheme: dark; }
}
:root[data-theme="dark"] { --paper: #17120E; --ink: #EBE1CB; --muted: #A5967C; --line: #3A3027; --accent: #CC8E7C; --brass: #C7A866; --chip: #241C16; color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-ui); }
.page { max-width: 1280px; margin: 0 auto; padding: 22px 16px 48px; }
header { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); margin: 0 0 4px; }
h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(38px, 6vw, 58px); line-height: .95; margin: 0; }
.sub { margin: 8px 0 0; color: var(--muted); font-size: 14px; max-width: 76ch; line-height: 1.5; }
.layout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.stage-col { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.stage-box { position: relative; max-width: 100%; }
.hint { margin: 0; font-size: 12px; color: var(--muted); text-align: center; max-width: 60ch; }
.side { min-width: 0; display: grid; gap: 16px; }
.opts { display: grid; gap: 12px; padding: 14px 16px; background: var(--chip); }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); }
.seg button, .btn { font: 600 13px var(--f-ui); color: var(--ink); background: transparent; border: 0; padding: 8px 11px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.btn { border: 1px solid var(--line); }
.btn.primary { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.seg button:focus-visible, .btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.ctl-label { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.notes { padding: 14px 16px; border: 1px dashed var(--line); font-size: 13px; line-height: 1.5; color: var(--muted); }
.notes strong { color: var(--ink); }
.notes h3 { color: var(--ink); font: 600 12px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; margin: 14px 0 6px; }
.notes h3:first-child { margin-top: 0; }
.notes ul { margin: 0; padding-left: 18px; }
.notes .tok { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 3px 12px; list-style: none; padding: 0; }
.sw { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; margin-right: 6px; box-shadow: 0 0 0 1px var(--line); }
code { font: 12px ui-monospace, monospace; }

/* ---------- the stage (game world) ---------- */
.stage, .stage * { -webkit-tap-highlight-color: transparent; }
.stage { position: absolute; left: 0; top: 0; width: 540px; height: 960px; transform-origin: 0 0; overflow: hidden; background: #241D17; color: var(--parch); font-family: var(--f-ui); user-select: none; -webkit-user-select: none; touch-action: none;
  box-shadow: inset 0 0 0 3px var(--g-ink), inset 0 0 0 5px var(--gold-lo), inset 0 0 0 7px var(--g-ink); }
#world { position: absolute; inset: 0; width: 540px; height: 960px; image-rendering: pixelated; image-rendering: crisp-edges; cursor: pointer; outline: none; touch-action: none; -webkit-tap-highlight-color: transparent; }
#world:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.grain { position: absolute; inset: 0; pointer-events: none; z-index: 60; opacity: .45; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .16  0 0 0 0 .12  0 0 0 0 .07  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.vignette { position: absolute; inset: 0; pointer-events: none; z-index: 20; background: radial-gradient(85% 58% at 50% 52%, transparent 52%, rgba(12, 8, 4, .62)); }
.frame-edge { position: absolute; inset: 0; pointer-events: none; z-index: 61; box-shadow: inset 0 0 0 3px var(--g-ink), inset 0 0 0 5px var(--gold-lo), inset 0 0 0 7px var(--g-ink); }

/* HUD: small brass plates */
.hud { position: absolute; left: 16px; right: 16px; top: 16px; z-index: 30; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.plate { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; color: var(--g-ink); font: 600 14px var(--f-ui); font-variant-numeric: tabular-nums;
  background: linear-gradient(#D9BE84, #A8894F); clip-path: var(--notch); box-shadow: inset 0 -3px 0 #6E5427, inset 0 0 0 2px var(--g-ink); }
.plate svg { width: 18px; height: 20px; }
.plate .nm { font: 15px var(--f-jp); max-width: 120px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.plate .yr { min-width: 38px; text-align: center; letter-spacing: .04em; }
.plate .g { font-weight: 700; color: var(--ox-2); }
.coin { width: 10px; height: 10px; background: var(--gold); box-shadow: inset -2px -2px 0 var(--gold-lo), 0 0 0 1px var(--g-ink); }
.arr { all: unset; cursor: pointer; width: 14px; height: 20px; display: grid; place-items: center; }
.arr::before { content: ''; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.arr.l::before { border-right: 6px solid var(--g-ink); }
.arr.r::before { border-left: 6px solid var(--g-ink); }
.arr:focus-visible { outline: 2px solid var(--g-ink); }
.sample { position: absolute; top: 52px; z-index: 30; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: rgba(201,164,90,.85); pointer-events: none; }
.place { position: absolute; left: 50%; top: 76px; translate: -50% 0; z-index: 30; display: grid; justify-items: center; gap: 0; padding: 4px 16px 6px; background: rgba(22,16,11,.86); box-shadow: 0 0 0 1px var(--gold-lo); pointer-events: none; opacity: 0; }
.place b { font: 400 28px/1 var(--f-display); color: var(--cream); }
.place span { font: 12px var(--f-jp); color: var(--gold); }
.place.on { opacity: 1; animation: stepin 249ms steps(3) both; }
@keyframes stepin { from { opacity: 0; } to { opacity: 1; } }
.helpbar { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; z-index: 30; white-space: nowrap; padding: 6px 12px; font-size: 11px; letter-spacing: .06em; color: var(--parch); background: rgba(22,16,11,.82); box-shadow: 0 0 0 1px var(--gold-lo); pointer-events: none; transition: opacity 332ms steps(4); }
.helpbar b { color: var(--gold); font-weight: 600; }
.helpbar.off { opacity: 0; }

/* the stepped fade and the building scroll */
.veil { position: absolute; inset: 0; z-index: 40; background: rgba(18, 13, 9, .72); opacity: 0; pointer-events: none; }
.veil.on { opacity: 1; pointer-events: auto; animation: stepin 332ms steps(4) both; }
.panel { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 45; width: 400px; }
.panel[hidden], .dlg[hidden], .create[hidden] { display: none; }
.rodbar { position: relative; height: 12px; margin: 0 -10px; background: linear-gradient(#6A4A2C, #3E2A1A); box-shadow: 0 0 0 2px var(--g-ink); }
.rodbar::before, .rodbar::after { content: ''; position: absolute; top: -3px; width: 8px; height: 18px; background: var(--gold); box-shadow: 0 0 0 1px var(--g-ink); }
.rodbar::before { left: -6px; } .rodbar::after { right: -6px; }
.sheet { background: linear-gradient(var(--parch), var(--parch-2)); color: var(--g-ink); padding: 16px 22px 18px; box-shadow: inset 0 0 0 2px var(--g-ink), inset 0 0 0 4px rgba(140,110,53,.35); }
.unroll { animation: unroll 300ms var(--ease) both; }
@keyframes unroll { from { clip-path: inset(46% 0 46% 0); } to { clip-path: inset(0 0 0 0); } }
.sheet .ok { font: 10px var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ox); }
.sheet .jp { font: 30px/1.15 var(--f-jp); margin-top: 2px; }
.sheet .en { font: 34px/1 var(--f-display); color: var(--ox); }
.sheet .ds { font-size: 13px; line-height: 1.45; color: #5A4C3A; margin: 8px 0 10px; }
.opens { display: grid; gap: 4px; margin: 0 0 14px; }
.opens button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 8px; font: 600 14px var(--f-ui); color: var(--g-ink); box-shadow: inset 0 0 0 1px rgba(42,33,25,.25); }
.opens button::before { content: ''; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 6px solid transparent; }
.opens button[aria-pressed="true"] { background: rgba(107,43,43,.12); box-shadow: inset 0 0 0 2px var(--ox); }
.opens button[aria-pressed="true"]::before { border-left-color: var(--ox); }
.opens button:focus-visible { outline: 2px solid var(--ox); }
.opens small { font: 12px var(--f-jp); color: #6E604D; font-weight: 400; margin-left: auto; }
.acts { display: flex; gap: 10px; justify-content: flex-end; }
.brass { font: 600 13px var(--f-ui); letter-spacing: .06em; color: var(--g-ink); border: 0; padding: 10px 16px; cursor: pointer; line-height: 1;
  background: linear-gradient(#DCC186, #A8894F); clip-path: var(--notch); box-shadow: inset 0 -3px 0 #6E5427, inset 0 0 0 2px var(--g-ink); }
.brass:active { box-shadow: inset 0 -1px 0 #6E5427, inset 0 0 0 2px var(--g-ink); translate: 0 1px; }
.brass.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--gold-lo); color: var(--g-ink); }
.brass:focus-visible { outline: 2px solid var(--ox); outline-offset: 2px; }
.would { margin: 0 0 14px; padding: 10px 12px; background: rgba(42,33,25,.07); font-size: 13px; line-height: 1.5; box-shadow: inset 3px 0 0 var(--ox); }
.would b { font-family: var(--f-jp); font-weight: 400; }

/* RPG dialogue */
.dlg { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 45; }
.dlg .box { position: relative; min-height: 170px; padding: 26px 22px 16px; background: linear-gradient(var(--parch), var(--parch-2)); color: var(--g-ink); box-shadow: 0 0 0 2px var(--g-ink), 0 0 0 4px var(--gold-lo), 0 0 0 6px var(--g-ink); }
.dlg .rise { animation: rise 250ms var(--ease) both; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.dlg .who { position: absolute; left: 14px; top: -16px; display: inline-flex; align-items: baseline; gap: 8px; padding: 5px 12px; background: var(--g-ink); box-shadow: 0 0 0 2px var(--gold-lo); }
.dlg .who b { font: 400 16px var(--f-jp); color: var(--cream); }
.dlg .who i { font: 600 11px var(--f-ui); font-style: normal; letter-spacing: .1em; color: var(--gold); }
.dlg .txt { font: 20px/1.55 var(--f-jp); min-height: 62px; }
.dlg .ch { display: flex; gap: 18px; margin-top: 10px; }
.dlg .ch button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: 600 15px var(--f-ui); letter-spacing: .04em; padding: 4px 2px; }
.dlg .ch button::before { content: ''; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 7px solid transparent; }
.dlg .ch button[aria-selected="true"]::before { border-left-color: var(--ox); }
.dlg .ch button[aria-selected="true"] { color: var(--ox); }
.dlg .ch button:focus-visible { outline: 2px solid var(--ox); }
.dlg .more { position: absolute; right: 18px; bottom: 12px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 7px solid var(--ox); animation: blink 664ms steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* profile creation */
.create { position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(18, 13, 9, .8); }
.create .card { width: 470px; }
.create .sheet { padding: 18px 22px 20px; }
.create h2 { margin: 0; font: 400 40px/1 var(--f-display); color: var(--ox); }
.create .lead { margin: 4px 0 14px; font-size: 13px; color: #5A4C3A; }
.field { display: grid; gap: 4px; margin-bottom: 14px; }
.field label { font: 10px var(--f-ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ox); }
.field input { font: 20px var(--f-jp); color: var(--g-ink); background: var(--cream); border: 0; padding: 8px 10px; box-shadow: inset 0 0 0 2px var(--g-ink), inset 0 0 0 3px var(--gold-lo); outline: 0; }
.field input:focus { box-shadow: inset 0 0 0 2px var(--ox), inset 0 0 0 3px var(--gold); }
.heroes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.hero { all: unset; cursor: pointer; position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px; background: rgba(42,33,25,.06); box-shadow: inset 0 0 0 1px rgba(42,33,25,.3); transition: box-shadow 160ms var(--ease), background 160ms var(--ease); }
.hero canvas { width: 80px; height: 112px; image-rendering: pixelated; background: #4F483E; box-shadow: 0 0 0 2px var(--g-ink); }
.hero b { display: block; font: 400 17px/1.2 var(--f-jp); }
.hero span { display: block; font-size: 11px; letter-spacing: .06em; color: #6E604D; margin-top: 3px; line-height: 1.35; }
.hero[aria-checked="true"] { background: rgba(107,43,43,.1); box-shadow: inset 0 0 0 2px var(--ox), inset 0 0 0 3px var(--gold); }
.hero[aria-checked="true"]::after { content: 'Chosen'; position: absolute; right: 6px; top: 6px; font: 600 9px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--cream); background: var(--ox); padding: 2px 5px; }
.hero:focus-visible { outline: 2px solid var(--ox); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .veil.on, .place.on, .unroll, .dlg .rise { animation: none; } .dlg .more { animation: none; } }
.rm .veil.on, .rm .place.on, .rm .unroll, .rm .dlg .rise, .rm .dlg .more { animation: none; }

.would .recs { margin: 4px 0 0; padding-left: 18px; font: 12px/1.6 var(--f-jp); }
.would .recs b.w { color: var(--forest); } .would .recs b.l { color: var(--ox); }
.opens.setrow { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }
/* game page: no review shell */
html, body { margin: 0; height: 100%; }
body { background: #120D09; overflow: hidden; }
#app { position: fixed; inset: 0; display: grid; place-items: center; }
.stage-box { position: relative; }
.would .rp { margin: 2px 0 8px; } .would .rp:last-child { margin-bottom: 0; }

/* Approved town-harbour variant A and the items dialogue/combine board. */
.hud > .plate { flex: none; padding-inline: 9px; }
.hud > .plate:first-child { flex: 0 1 auto; min-width: 0; margin-right: auto; }
.hud .nm { min-width: 0; max-width: 98px; }
.hud .plate svg { flex: none; }
#travel-toggle, .travel-panel .plate { border: 0; cursor: pointer; background: linear-gradient(var(--parch-2), var(--gold)); box-shadow: inset 0 0 0 2px var(--gold-lo), inset 0 -4px 0 var(--gold-lo); }
#travel-toggle:hover, .travel-panel .plate:hover { background: var(--parch-2); }
#travel-toggle:focus-visible { outline: 2px solid var(--ox); outline-offset: -4px; }
/* Keep the approved 56 x 32 plate inside a 56 x 44 tap target. */
#travel-toggle.map-toggle { position: relative; width: 56px; height: 44px; margin-top: -6px; padding: 6px 0; justify-content: center; background: transparent; box-shadow: none; clip-path: none; }
#travel-toggle .map-icon { width: 56px; height: 32px; padding: 0 8px; gap: 6px; justify-content: center; flex: none; background: linear-gradient(var(--parch-2), var(--gold)); box-shadow: inset 0 0 0 2px var(--gold-lo), inset 0 -4px 0 var(--gold-lo); pointer-events: none; }
#travel-toggle canvas { display: block; width: 18px; height: 18px; flex: none; image-rendering: pixelated; }
#travel-toggle small { font: 11px/1 var(--f-ui); letter-spacing: 0; }
#travel-toggle:hover:not(:disabled) .map-icon { background: var(--parch-2); box-shadow: inset 0 0 0 2px var(--g-ink), inset 0 -4px 0 var(--gold-lo); }
#travel-toggle:active:not(:disabled) .map-icon { background: var(--gold); box-shadow: inset 0 3px 0 var(--gold-lo), inset 0 0 0 2px var(--g-ink); }
#travel-toggle:active:not(:disabled) .map-icon > * { translate: 0 2px; }
#travel-toggle:disabled { cursor: default; }
#travel-toggle:disabled .map-icon { background: var(--parch-2); box-shadow: inset 0 0 0 2px var(--gold-lo); opacity: .48; }
#travel-toggle.map-toggle:focus-visible { outline: none; }
#travel-toggle.map-toggle:focus-visible .map-icon { outline: 2px solid var(--ox); outline-offset: -4px; }
.luck-status { position: absolute; top: 40px; right: 0; color: var(--cream); font: 15px var(--f-ui); text-align: right; }
[hidden] { display: none !important; }
.veil.travel { background: var(--g-ink); animation: town-travel 664ms steps(4, end) both; pointer-events: auto; }
@keyframes town-travel { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }
.travel-panel { left: 60px; right: 60px; top: 172px; width: auto; translate: none; }
.travel-panel .rodbar { background: linear-gradient(var(--wood), var(--wood-lo)); }
.travel-panel .sheet { padding: 18px 20px; border-inline: 2px solid var(--g-ink); box-shadow: none; }
.travel-panel .label { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.travel-panel h2 { font: 36px/1 var(--f-display); color: var(--ox); margin: 4px 0 2px; }
.travel-panel p { font-size: 14px; margin: 10px 0; }
.destinations { display: grid; gap: 4px; margin: 12px 0; }
.destinations button { display: flex; align-items: center; justify-content: space-between; text-align: left; border: 2px solid var(--gold-lo); background: transparent; color: var(--g-ink); padding: 8px; font: 15px var(--f-ui); border-radius: 0; cursor: pointer; }
.destinations button:hover { background: var(--cream); }
.destinations button:focus-visible, .travel-panel .plate:focus-visible { outline: 2px solid var(--ox); outline-offset: 2px; }
.destinations small { font: 12px var(--f-jp); margin-left: 8px; }
.travel-panel .acts { margin-top: 14px; }
.find-dialog { bottom: 72px; }
.find-dialog .txt { font-family: var(--f-ui); overflow-wrap: anywhere; }
.find-note { font: 13px/1.4 var(--f-ui); margin: 8px 0; }
.find-note:empty { display: none; }
.find-pack { float: left; margin: 0 16px 10px 0; }
.find-pack img { display: block; width: 80px; height: 112px; object-fit: contain; image-rendering: pixelated; background: var(--g-ink); box-shadow: 0 0 0 1px var(--g-ink); }
.find-dialog .ch { clear: both; }
.opening-pack > .hud { pointer-events: none; }
.find-combine { position: relative; display: flex; gap: 18px; align-items: center; min-height: 207px; padding: 14px; margin-top: 10px; background: var(--forest); color: var(--cream); border: 2px solid var(--gold-lo); }
.find-combine .six { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; position: relative; }
.find-combine .piece { background: var(--parch-2); color: var(--g-ink); border: 1px solid var(--gold-lo); text-align: center; font-size: 12px; padding: 12px 2px; }
.find-combine .piece span { display: block; font: 11px var(--f-jp); }
.find-combine .reveal { width: 116px; flex: none; display: grid; justify-items: center; }
/* Scope the shared makeCard frame to the reveal: town scrolls also use panel/plate. */
.find-combine { --c-light: #D6C68C; --c-water: #5D7E95; --c-darkness: #4B4050; --c-fire: #9C4C3A; --c-nature: #5E7A46; }
.find-combine .card { position: relative; width: var(--w); height: calc(var(--w) * 1.4); flex: none; font-size: calc(var(--w) / 10); }
.find-combine .face, .find-combine .back { position: absolute; inset: 0; clip-path: var(--notch); }
.find-combine .face { --bg: var(--civ); background: var(--bg); box-shadow: inset 0 0 0 .2em var(--g-ink); padding: .5em; }
.find-combine .face.multi { --bg: linear-gradient(135deg, var(--civ) 0 50%, var(--civ2) 50% 100%); }
.find-combine .civ-light { --civ: var(--c-light); } .find-combine .civ-water { --civ: var(--c-water); } .find-combine .civ-darkness { --civ: var(--c-darkness); }
.find-combine .civ-fire { --civ: var(--c-fire); } .find-combine .civ-nature { --civ: var(--c-nature); }
.find-combine .panel { position: relative; inset: auto; translate: none; z-index: auto; width: auto; height: 100%; background: var(--parch); box-shadow: inset 0 0 0 .12em var(--g-ink); display: grid; grid-template-rows: 1.8em minmax(0, 1fr) 1.7em; gap: .25em; padding: .3em; color: var(--g-ink); overflow: hidden; }
.find-combine .panel.spell, .find-combine .panel.gear, .find-combine .panel.castle { background: var(--parch-2); }
.find-combine .plate { display: flex; align-items: center; gap: .3em; min-width: 0; height: auto; padding: 0; background: none; box-shadow: none; clip-path: none; font: inherit; }
.find-combine .gem { flex: none; width: 1.9em; height: 1.9em; display: grid; place-items: center; font: 600 1.25em/1 var(--f-ui); color: var(--g-ink); margin: -.2em 0 0 -.2em; background: linear-gradient(var(--parch-2), var(--gold)); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.find-combine .name { font: 1em/1.1 var(--f-jp); white-space: nowrap; overflow: hidden; min-width: 0; }
.find-combine .evo { margin-left: auto; font: .8em/1 var(--f-jp); font-style: normal; background: var(--g-ink); color: var(--gold); padding: .2em .3em; }
.find-combine .art { position: relative; background: var(--g-ink); box-shadow: 0 0 0 .12em var(--g-ink); overflow: hidden; }
.find-combine .art canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.find-combine .spell .art { clip-path: polygon(10% 0, 90% 0, 100% 14%, 100% 100%, 0 100%, 0 14%); }
.find-combine .gear .art { clip-path: polygon(14% 0, 86% 0, 100% 50%, 86% 100%, 14% 100%, 0 50%); }
.find-combine .foot { display: flex; align-items: center; gap: .3em; font: 600 1.15em/1 var(--f-ui); min-width: 0; }
.find-combine .pow { margin-left: auto; font-variant-numeric: tabular-nums; }
.find-combine .kw { font: 600 .8em/1 var(--f-ui); background: var(--g-ink); color: var(--gold); padding: .18em .3em; white-space: nowrap; }
.find-combine .tag { font: .85em/1 var(--f-jp); color: var(--ox); }
.find-combine .back { display: grid; place-items: center; background: var(--ox); box-shadow: inset 0 0 0 3px var(--g-ink), inset 0 0 0 5px var(--gold-lo); }
.find-combine .back i { border: 2px solid var(--gold); padding: 12px; font-style: normal; }
.find-combine .back b { font: 2.1em/1 var(--f-display); color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .veil.travel { animation: none; } }
.rm .veil.travel { animation: none; }

/* Batch 5 draft: fixed stage slots for navigation; long room contents scroll above them. */
.hud { display: grid; grid-template-columns: 142px 130px 156px 56px; }
.hud > .plate { min-width: 0; width: 100%; }
.hud > .plate:first-child { margin-right: 0; }
.hud > .plate:nth-child(2) { justify-content: space-between; }
.hud > .plate:nth-child(3) { gap: 6px; }
.hud .coin, .hud .g, .hud .arr { flex: none; }
.hud #gold { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#panel { left: 60px; right: 60px; top: 144px; bottom: 64px; width: auto; translate: none; display: flex; flex-direction: column; }
#panel > .rodbar, #create .card > .rodbar { flex: 0 0 12px; }
#panel > .sheet, #create .card > .sheet { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 18px 20px 20px; }
#panel .panel-body, #create .panel-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent; }
#panel .panel-heading { min-height: 160px; }
#panel .destinations { margin-top: 0; }
#panel .would { margin: 0; }
#panel .acts, #create .acts { flex: none; height: 44px; margin-top: 14px; gap: 10px; }
#panel .acts > button, #create .acts > button { flex: 0 0 120px; height: 44px; justify-content: center; padding: 8px; }
#panel .acts > button:active, #create .acts > button:active { translate: none; }
#create [data-a="begin"] { margin-right: auto; }
#panel .sheet { border-inline: 0; }
#panel .opens button { min-height: 36px; overflow-wrap: anywhere; }
#panel .opens small { flex: none; }
#dlg { left: 60px; right: 60px; bottom: 76px; }
#dlg .box { padding: 26px 20px 20px; }
#dlg .dialog-content { max-height: 600px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gold-lo) transparent; }
#dlg .ch { height: 44px; margin-top: 14px; gap: 10px; justify-content: flex-end; }
#dlg .ch button { box-sizing: border-box; flex: 0 0 120px; min-width: 0; padding: 4px 2px; }
#dlg .more { bottom: 72px; }
#create .card { position: absolute; left: 60px; right: 60px; top: 144px; bottom: 64px; width: auto; display: flex; flex-direction: column; }
