/* Layout: one 16:9 stage scaled to the window; HUD, panels and dice float over the canvas.
   Looks: dark metro chrome for the HUD, a steel-and-rust JRPG command window, a stone D2 inventory, a parchment journal. */
@font-face { font-family: 'Pirata One'; src: url(fonts/PirataOne-normal-400-latin.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Share Tech Mono'; src: url(fonts/ShareTechMono-normal-400-latin.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'IM Fell English'; src: url(fonts/IMFellEnglish-normal-400-latin.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'IM Fell English'; font-style: italic; src: url(fonts/IMFellEnglish-italic-400-latin.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'IM Fell English SC'; src: url(fonts/IMFellEnglishSC-normal-400-latin.woff2) format('woff2'); font-display: swap; }
:root {
  --void: #050404; --ink: #d8ccb4; --dim: #8b7f6c; --faint: #5a5045;
  --f-menu: 'Bahnschrift SemiCondensed', 'Bahnschrift', 'Roboto Condensed', 'Arial Narrow', Impact, sans-serif; --rust: #b5502e; --brass: #c9a050; --blood: #a3231a; --toxic: #9cc640; --frost: #8fb4c8;
  --steel: #1c2228; --steel2: #2a333b;
  --parch: #d9c49a; --parch-ink: #3b2716; --parch-dim: #7a5d3c;
  --stone: #3a3836; --stone-dk: #1c1b1a;
  --f-display: "Pirata One", "Palatino Linotype", serif;
  --f-ui: "Share Tech Mono", ui-monospace, Consolas, monospace;
  --f-book: "IM Fell English", "Palatino Linotype", Georgia, serif;
  --f-booksc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --s: 1;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--void); color: var(--ink); font-family: var(--f-ui); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); overflow: hidden; display: grid; place-items: center; user-select: none; -webkit-user-select: none; }
#stage { position: relative; width: calc(640px * var(--s)); height: calc(360px * var(--s)); overflow: hidden; background: #000; font-size: max(10px, calc(var(--s) * 8.4px)); box-shadow: 0 0 0 1px #1d1612, 0 0 80px rgba(0,0,0,.9); }
#view { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; cursor: none; filter: contrast(1.08) saturate(.9); }
#hurt { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s; background: radial-gradient(ellipse at center, transparent 40%, rgba(150,10,5,.55) 100%); }
#hurt.on { opacity: 1; transition: none; }
[hidden] { display: none !important; }
button { font-family: var(--f-ui); }
.btn { font-size: 1em; color: var(--ink); background: linear-gradient(#2a211a, #140f0c); border: 1px solid #5b4733; padding: .38em .8em; cursor: pointer; text-transform: uppercase; letter-spacing: .06em; line-height: 1.2; }
.btn:hover:not(:disabled) { border-color: var(--brass); color: #fff; box-shadow: 0 0 10px rgba(181,80,46,.45); }
.btn:focus-visible, .cw-cmd:focus-visible, .jtab:focus-visible { outline: 1px solid var(--brass); outline-offset: 2px; }
.btn:disabled { opacity: .35; cursor: default; }
.btn.primary { border-color: var(--brass); color: #f1dfb5; }
.btn.small { font-size: .82em; padding: .2em .5em; }
.btn kbd { font-family: var(--f-ui); color: var(--brass); margin-left: .3em; font-size: .85em; }
.btn small { color: var(--dim); margin-left: .6em; text-transform: none; }
.good { color: #e8cf86; } .bad { color: #ec7a62; } .info { color: var(--frost); } .tox { color: var(--toxic); } .muted { color: var(--dim); } .warn { color: #e3a44f; }
.q-rusty { color: #8f877c; } .q-magic { color: #7fa8e0; } .q-rare { color: #e3c050; } .q-relic { color: #e8892e; } .q-odd { color: #c79ae8; } .flav { color: #b9a98e; font-style: italic; margin: 4px 0; max-width: 260px; } .q-legend { color: #ff5a3c; text-shadow: 0 0 6px rgba(255,90,40,.55); }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#areabox { position: absolute; left: .9em; top: .7em; pointer-events: none; }
#area-depth { font-family: var(--f-display); font-size: 1.7em; color: #cdbb98; text-shadow: 0 0 8px #000; }
#area-sub { color: var(--dim); font-size: .85em; letter-spacing: .12em; text-transform: uppercase; }
#status-chips { display: flex; gap: .35em; margin-top: .4em; flex-wrap: wrap; }
#areabox { pointer-events: auto; }
#vitals { display: block; width: calc(var(--s) * 130px); height: calc(var(--s) * 65px); image-rendering: pixelated; margin-top: .45em; }
#vit-nums { display: flex; flex-direction: column; position: absolute; left: calc(var(--s) * 134px); top: calc(var(--s) * 28px); gap: calc(var(--s) * 7.8px); font-size: .78em; color: #cfc6b4; text-shadow: 0 0 3px #000, 0 0 3px #000; line-height: 1; }
.chip.warn { color: #e3a44f; border-color: #6a4a1c; } .chip.bad { color: #ec7a62; border-color: #6a2a1c; }
.jbar.water i { background: linear-gradient(#3a7ac8, #1a3a70); } .jbar.food i { background: linear-gradient(#3a9a4a, #1a5a24); }
.bslot.use { cursor: pointer; } .bslot.use:hover { box-shadow: inset 0 0 0 1px #c9a050; }
.chip { font-size: .78em; padding: .1em .45em; border: 1px solid var(--edge, #4a3a2a); background: rgba(0,0,0,.6); letter-spacing: .06em; text-transform: uppercase; }
.chip.good { color: #e8cf86; border-color: #6a5524; } .chip.tox { color: var(--toxic); border-color: #3e5520; }
#mapbox { position: absolute; right: .7em; top: .7em; background: rgba(0,0,0,.55); border: 1px solid #2a2019; padding: .25em; cursor: pointer; }
#minimap { display: block; width: calc(var(--s) * 150px); height: calc(var(--s) * 80px); image-rendering: pixelated; }
#mapbox .lbl { font-size: .72em; color: var(--dim); display: flex; justify-content: space-between; letter-spacing: .08em; }
#roster { position: absolute; right: .7em; top: calc(var(--s) * 104px); width: 14em; display: flex; flex-direction: column; gap: .25em; pointer-events: none; }
#roster .rh { font-size: .75em; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; text-align: right; }
#roster .rp { display: flex; gap: .4em; align-items: center; background: rgba(0,0,0,.55); border: 1px solid #241b14; padding: .2em .3em; font-size: .8em; line-height: 1.2; }
#roster .rp.here { border-color: #3a5a7a; }
#roster .rp img { width: 2.2em; height: 2.2em; image-rendering: pixelated; border: 1px solid #3a2f25; }
#roster .rp small { color: var(--dim); }
#bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5.6em; display: flex; align-items: flex-end; gap: .7em; padding: 0 .8em .5em; background: linear-gradient(transparent, rgba(0,0,0,.85) 45%); }
#orbwrap { position: relative; width: 5.4em; height: 5.4em; flex: none; }
#orb { width: 100%; height: 100%; image-rendering: pixelated; }
#orb-txt { position: absolute; left: 0; right: 0; bottom: -.1em; text-align: center; font-size: .78em; color: #f0d6c8; text-shadow: 0 0 3px #000, 0 0 3px #000; }
#bar-mid { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: .5em; flex-wrap: wrap; }
#bar-right { display: flex; flex-direction: column; align-items: flex-end; gap: .3em; flex: none; max-width: 46%; }
.who { display: flex; flex-direction: column; gap: .15em; min-width: 9em; }
.who b { font-family: var(--f-display); font-weight: 400; font-size: 1.35em; color: #e3d2ad; }
.who small { color: var(--dim); font-size: .78em; }
.xpbar { height: .35em; background: #1e1712; border: 1px solid #2a2019; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #7a5b22, var(--brass)); }
.slot { border: 1px solid #4a3a2a; background: rgba(10,8,6,.85); padding: .25em .5em; min-width: 9em; cursor: pointer; text-align: left; color: var(--ink); font-size: 1em; }
.slot.on { border-color: var(--brass); }
.slot .n { color: #e9dcc0; } .slot .a { color: var(--dim); font-size: .85em; } .slot .a b { color: var(--ink); font-weight: 400; }
.quick { display: flex; gap: .25em; }
.qi { border: 1px solid #2a2019; background: rgba(10,8,6,.85); padding: .15em .3em; font-size: .85em; cursor: pointer; color: var(--dim); display: flex; align-items: center; gap: .2em; }
.qi img { width: 1.6em; height: 1.6em; image-rendering: auto; }
.qi b { color: var(--ink); font-weight: 400; } .qi kbd { color: var(--brass); font-family: var(--f-ui); }
.qi:hover { border-color: var(--brass); }
.meta { font-size: .9em; color: var(--dim); display: flex; align-items: center; gap: .3em; } .meta b { color: #e8cf86; font-weight: 400; font-size: 1.1em; }
img.mgr { width: 1.6em; height: 1.6em; image-rendering: auto; vertical-align: middle; }
.btnrow { display: flex; gap: .3em; flex-wrap: wrap; justify-content: flex-end; margin-top: .6em; }
#bar-right .btnrow { margin: 0; }
.btnrow.left { justify-content: flex-start; }
#feed { position: absolute; left: .9em; bottom: 6.3em; display: flex; flex-direction: column; gap: .15em; pointer-events: none; max-width: 55%; }
#feed div { font-size: .88em; color: var(--ink); text-shadow: 0 0 4px #000, 0 0 2px #000; transition: opacity 1s; }
#netstat { position: absolute; left: 50%; top: .6em; transform: translateX(-50%); background: #3a120c; border: 1px solid var(--rust); padding: .3em .8em; z-index: 60; }

/* ---------- battle: initiative, command window, squad bars, log ---------- */
#initiative { position: absolute; top: .5em; left: .7em; right: 40%; display: flex; gap: .25em; flex-wrap: wrap; pointer-events: none; }
#initiative div { font-size: .72em; padding: .1em .45em; border: 1px solid #2a2019; background: rgba(0,0,0,.72); color: var(--dim); white-space: nowrap; }
#initiative div b { color: var(--faint); font-weight: 400; }
#initiative .round { color: var(--brass); border-color: #5a4630; }
#initiative div.pc { color: #cfe0c0; border-color: #33503a; }
#initiative div.dead { opacity: .35; text-decoration: line-through; }
/* the command window: a field set in a battered steel case (top right) */
#cmdwin { position: absolute; right: .6em; top: .6em; width: 19.5em; z-index: 20; filter: drop-shadow(0 8px 16px rgba(0,0,0,.75)); }
.cw-dev { position: relative; padding: 3.7em .95em 1.05em; border-radius: .9em;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,.10), transparent 45%),
    radial-gradient(ellipse at 80% 90%, rgba(0,0,0,.35), transparent 50%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 2px, rgba(0,0,0,.03) 2px 5px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #5a5d5f 0%, #3a3c3e 28%, #2b2c2d 55%, #3d3a37 80%, #24221f 100%);
  border: 1px solid #0b0b0b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -2px 0 rgba(0,0,0,.6), inset 0 0 0 3px #2a2a2a, inset 0 0 0 4px rgba(255,255,255,.07), inset 0 0 22px rgba(0,0,0,.6); }
/* speaker mesh down both sides of the screen */
.cw-dev::before, .cw-dev::after { content: ''; position: absolute; top: 5.2em; bottom: 3.6em; width: .55em; border-radius: .2em;
  background: radial-gradient(circle, #0c0c0c 38%, transparent 42%) 0 0 / 4px 4px, #3a3a3a; box-shadow: inset 0 0 3px #000; }
.cw-dev::before { left: .22em; } .cw-dev::after { right: .22em; }
.cw-rivet { position: absolute; width: .5em; height: .5em; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #c8c8c4, #555 55%, #1a1a1a); box-shadow: 0 1px 1px rgba(0,0,0,.8); }
.cw-rivet.a { left: .45em; top: .45em; } .cw-rivet.b { right: .45em; top: .45em; } .cw-rivet.c { left: .45em; bottom: .45em; } .cw-rivet.d { right: .45em; bottom: .45em; }
.cw-top { position: absolute; left: .7em; right: .7em; top: .5em; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .28em .35em; }
.cw-name { grid-column: 2; grid-row: 1; } .cw-ammo { grid-column: 2; grid-row: 2; justify-self: center; }
.cw-plate { max-width: 13em; padding: .12em .7em; font-family: var(--f-ui); color: #1c1c1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: .25em;
  background: linear-gradient(180deg, #d8d6cf 0%, #a9a7a0 45%, #8e8c86 55%, #b9b7b0 100%); border: 1px solid #262624;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), inset 0 -1px 0 rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.8); text-shadow: 0 1px 0 rgba(255,255,255,.55); }
.cw-name { font-size: 1.02em; } .cw-ammo { font-size: .88em; } .cw-ammo.jam { color: #7a1408; }
.cw-serial { grid-column: 1; grid-row: 2; justify-self: end; font-size: .6em; letter-spacing: .04em; color: #161616; text-shadow: 0 1px 0 rgba(255,255,255,.2); white-space: nowrap; }
.cw-mask { grid-column: 3; grid-row: 1 / span 2; justify-self: end; width: 2.7em; height: 2.7em; color: #1a1a19; filter: drop-shadow(0 1px 0 rgba(255,255,255,.28)) drop-shadow(0 -1px 0 rgba(0,0,0,.7)); }
.cw-mask svg { width: 100%; height: 100%; }
/* the amber screen */
.cw-screen { position: relative; border-radius: .45em; overflow: hidden; color: #1c190d;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.05) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 50% 35%, rgba(255,250,200,.35), transparent 65%),
    linear-gradient(180deg, #e9c75b 0%, #ddc560 38%, #b9bd5c 66%, #7f9a4e 88%, #5d7a3e 100%);
  box-shadow: 0 0 0 2px #121211, 0 0 0 3px #4a4a48, inset 0 0 18px rgba(40,30,0,.55), inset 0 0 3px rgba(0,0,0,.6); }
.cw-list { display: flex; flex-direction: column; padding: .35em .25em .2em; }
.cw-cmd { display: grid; grid-template-columns: 1.5em 1fr auto; align-items: center; gap: .35em; background: none; border: 0; border-radius: .2em; color: #1c190d; text-align: left; padding: .18em .45em; font-size: .95em; font-weight: 700; cursor: pointer; text-shadow: 0 0 5px rgba(255,240,170,.65); }
.cw-cmd i { font-style: normal; color: #1c190d; text-align: center; font-size: 1.05em; }
.cw-cmd img { width: 1.4em; height: 1.4em; image-rendering: auto; }
.cw-cmd small { color: #2a2612; font-size: .8em; font-weight: 400; text-align: right; }
.cw-cmd:hover:not(:disabled), .cw-cmd:focus-visible { background: rgba(40,30,0,.16); outline: none; }
.cw-cmd:disabled { opacity: .38; cursor: default; }
.cw-cmd[data-jam] { background: rgba(150,40,10,.28); box-shadow: inset 0 0 0 1px rgba(120,20,0,.5); }
.cw-cmd[data-jam] i, .cw-cmd[data-jam] span { color: #6a0e04; }
#cw-items { border-top: 1px solid rgba(40,30,0,.35); background: rgba(40,30,0,.08); padding: .15em .25em; }
.cw-foot { display: flex; flex-direction: column; justify-content: flex-end; gap: .15em; padding: .35em 6em .4em .6em; min-height: 3.3em; background: linear-gradient(180deg, rgba(14,18,10,.82), rgba(8,10,6,.92)); color: #e3cf7a; font-size: .86em; border-top: 1px solid rgba(0,0,0,.6); }
.cw-picked { display: flex; flex-direction: column; gap: .1em; color: #e3cf7a; }
.cw-picked em { color: #cdb866; font-style: normal; } .cw-picked b { color: #ffe08a; font-weight: 400; }
.cw-cancel { margin-top: .2em; align-self: flex-start; font-family: var(--f-ui); font-size: .9em; color: #1c190d; background: #d9c25f; border: 1px solid #000; padding: 0 .5em; cursor: pointer; }
#cmd-timer { color: #e3cf7a; font-size: 1.1em; }
.cw-wait { padding: 1.2em .8em; color: #2a2612; text-align: center; font-weight: 700; }
/* the GO button: a heavy rusted push-button set into the case */
#cmdwin .go { position: absolute; right: .55em; bottom: .5em; width: 2.9em; height: 2.3em; clip-path: none; padding: 0; border-radius: .35em; font-family: var(--f-display); font-size: 1.45em; letter-spacing: .02em;
  color: #c79a72; text-shadow: 0 -1px 0 rgba(0,0,0,.8), 0 1px 0 rgba(255,210,170,.25);
  background: radial-gradient(ellipse at 30% 25%, rgba(255,200,150,.18), transparent 55%), repeating-linear-gradient(45deg, rgba(0,0,0,.08) 0 2px, transparent 2px 5px), linear-gradient(160deg, #8a5a3e, #5a3624 50%, #3b2418);
  border: 2px solid #1a1612; box-shadow: 0 0 0 3px #4a4a46, 0 0 0 4px #141414, inset 0 1px 0 rgba(255,220,190,.35), inset 0 -3px 6px rgba(0,0,0,.6), 0 3px 6px rgba(0,0,0,.8); cursor: pointer; }
#cmdwin .go:hover:not(:disabled) { color: #f0c49a; }
#cmdwin .go:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 0 0 3px #4a4a46, 0 0 0 4px #141414, inset 0 2px 6px rgba(0,0,0,.7); }
#cmdwin .go:disabled { filter: grayscale(.7) brightness(.75); opacity: 1; cursor: default; }
.go { font-family: var(--f-display); font-size: 1.4em; color: #fff; background: linear-gradient(#c8402a, #7a1a10); border: 1px solid #ffb090; padding: .05em .9em; clip-path: polygon(10% 0, 100% 0, 92% 100%, 0 100%); cursor: pointer; letter-spacing: .05em; text-shadow: 0 1px 0 #400; }
.go:disabled { filter: grayscale(1); opacity: .4; cursor: default; }
/* the squad along the bottom: small banners, one column per player, their companion stacked on top */
#pbars { position: absolute; left: .5em; right: .5em; bottom: .35em; display: flex; justify-content: center; align-items: flex-end; gap: .3em; z-index: 15; pointer-events: none; }
.pcol { flex: 1 1 0; min-width: 0; max-width: 13.5em; display: flex; flex-direction: column; gap: .15em; }
.pbar { pointer-events: auto; position: relative; display: flex; gap: .3em; align-items: center; border-radius: .45em; padding: .18em .4em .18em .18em; font-size: .82em;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.12), transparent 55%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 2px, rgba(0,0,0,.03) 2px 5px),
    linear-gradient(170deg, #55585a 0%, #353739 40%, #262728 75%, #33302d 100%);
  border: 1px solid #0b0b0b; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 2px #2a2a2a, inset 0 0 10px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.7); }
.pbar { font-size: .98em; }
.pbar::after { content: ''; position: absolute; right: .22em; top: .22em; width: .32em; height: .32em; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #c8c8c4, #555 55%, #1a1a1a); }
.pbar.ally { font-size: .84em; margin-left: .9em; }
.pbar.me { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 2px #2a2a2a, inset 0 0 10px rgba(0,0,0,.5), 0 0 0 1px var(--brass), 0 2px 6px rgba(0,0,0,.7); }
.pbar.down { box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 2px #2a2a2a, 0 0 0 1px #a3231a, 0 2px 6px rgba(0,0,0,.7); } .pbar.dead { opacity: .45; filter: grayscale(1); }
.pbar .por { width: 2.6em; height: 2.6em; border-radius: 50%; overflow: hidden; flex: none; background: #101418; border: 2px solid #1a1a1a; box-shadow: 0 0 0 1px #8e8c86, inset 0 0 4px #000; }
.pbar.me .por { box-shadow: 0 0 0 1px var(--brass), inset 0 0 4px #000; }
.pbar .por img { width: 100%; height: 100%; image-rendering: pixelated; }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1em; padding-right: .3em; }
.pname { display: flex; justify-content: space-between; align-items: baseline; gap: .3em; font-size: .9em; color: #1c1c1a; white-space: nowrap; overflow: hidden; padding: 0 .3em; border-radius: .18em;
  background: linear-gradient(180deg, #d8d6cf 0%, #a9a7a0 50%, #8e8c86 100%); border: 1px solid #262624; text-shadow: 0 1px 0 rgba(255,255,255,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.pstate { color: #4a3e14; font-size: .74em; letter-spacing: .04em; text-shadow: none; } .pstate.r { color: #2f5a12; }
.php { height: .6em; margin: .05em 0; border: 1px solid #121211; background: repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 1px, transparent 1px 3px), linear-gradient(180deg, #e9c75b, #9fae58); box-shadow: 0 0 0 1px #4a4a48; }
.php i { display: block; height: 100%; background: linear-gradient(180deg, #8a1a0c, #5a0e04); transition: width .3s; }
.pnums { display: flex; justify-content: space-between; font-size: .86em; color: #e3cf7a; text-shadow: 0 0 4px rgba(0,0,0,.8); }
.grit { color: #e3a44f; letter-spacing: .05em; } .psi { color: #8fc8ff; }
/* picking who an item is for: the banners light up, and a click picks */
#pbars.picking .pbar.tgt { cursor: pointer; border-color: #ffd76a; animation: tgtpulse 1s ease-in-out infinite; }
#pbars.picking .pbar.tgt:hover { background: linear-gradient(180deg, rgba(90,80,30,.95), rgba(40,34,12,.95)); }
@keyframes tgtpulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(255,215,106,.5), 0 2px 6px rgba(0,0,0,.6); } 50% { box-shadow: 0 0 0 3px rgba(255,215,106,.85), 0 0 12px rgba(255,215,106,.5); } }
#clog { position: absolute; left: .7em; top: 2.4em; width: 36%; display: flex; flex-direction: column; gap: .1em; pointer-events: none; }
#clog div { font-size: .78em; text-shadow: 0 0 3px #000, 0 0 3px #000; color: #c9bda6; }

/* ---------- dice ---------- */
#dice { position: absolute; left: 50%; top: 12%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .1em; pointer-events: none; z-index: 50; transition: opacity .25s; }
#dice.fade { opacity: 0; }
.d20 { position: relative; width: 4.4em; height: 4.4em; }
.d20 svg { width: 100%; height: 100%; overflow: visible; transition: transform .05s; }
.d20 polygon, .d20 line { fill: none; stroke: #c9a050; stroke-width: 3; stroke-linejoin: round; }
.d20 polygon.body { fill: #1a120d; } .d20 polygon.in { stroke-width: 2; opacity: .7; } .d20 line { stroke-width: 1.6; opacity: .5; }
#dice.enemy .d20 polygon, #dice.enemy .d20 line { stroke: #b5502e; }
#dice-n { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: 2em; color: #f3e3bf; padding-top: .15em; }
#dice.nat20 #dice-n { color: #ffd76a; text-shadow: 0 0 10px #ffb200; } #dice.nat1 #dice-n { color: #ff5a3c; }
#dice-who { font-size: .8em; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; text-shadow: 0 0 4px #000; }
#dice-line { font-size: .92em; text-shadow: 0 0 4px #000, 0 0 4px #000; white-space: nowrap; }
#dice-res { font-family: var(--f-display); font-size: 1.45em; letter-spacing: .06em; text-shadow: 0 0 6px #000; }
#dice-res.ok { color: #e8cf86; } #dice-res.no { color: #9a8f80; } #dice-res.crit { color: #ffd76a; } #dice-res.bad { color: #ec6a52; }

#area-title { position: absolute; left: 0; right: 0; top: 26%; text-align: center; pointer-events: none; opacity: 0; }
#area-title.show { animation: areaIn 3.8s ease forwards; }
#area-title b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 3.2em; color: #d9c7a2; letter-spacing: .06em; text-shadow: 0 0 18px #000, 0 2px 0 #3a120c; }
#area-title span { color: var(--dim); letter-spacing: .3em; text-transform: uppercase; font-size: .88em; }
#area-title i { display: block; margin-top: .5em; font-style: normal; color: #c07a5a; letter-spacing: .12em; font-size: .78em; text-shadow: 0 0 8px #000; }
#area-title i:empty { display: none; }
@keyframes areaIn { 0% { opacity: 0; transform: translateY(6px); } 15% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- modals ---------- */
#modal { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.6); z-index: 30; }
.panel { position: relative; max-width: 92%; max-height: 92%; overflow: auto; background: radial-gradient(ellipse at top, rgba(90,40,20,.12), transparent 60%), linear-gradient(#17120e, #0e0b09); border: 1px solid #4a3a2a; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px #22190f, 0 10px 40px #000; padding: 1em 1.3em; min-width: min(28em, 92%); }
.panel.wide { width: 90%; }
.panel h2 { margin: 0 0 .2em; font-family: var(--f-display); font-weight: 400; font-size: 2.2em; color: #e2cfa6; text-wrap: balance; text-shadow: 0 2px 0 #3a120c; }
.panel h3 { margin: .8em 0 .35em; font-family: var(--f-display); font-weight: 400; font-size: 1.3em; color: var(--brass); }
.panel p { margin: .4em 0; line-height: 1.45; max-width: 64ch; }
.panel .sub { color: var(--dim); letter-spacing: .14em; text-transform: uppercase; font-size: .82em; }
.panel .x { position: absolute; right: .6em; top: .5em; }
.lines { display: flex; flex-direction: column; gap: .3em; margin: .6em 0; }
.lines div { line-height: 1.4; }
.choices { display: flex; flex-direction: column; gap: .35em; margin-top: .8em; }
.choices .btn { text-align: left; text-transform: none; letter-spacing: .02em; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(16em, 1fr)); gap: 1.2em; }
.cols > * { min-width: 0; }
.gear { display: flex; flex-direction: column; gap: .25em; }
.gear .row, .quest .row { display: flex; justify-content: space-between; align-items: center; gap: .6em; border: 1px solid #221a13; padding: .2em .45em; background: #0c0a08; }
.gear .row > span { min-width: 0; display: flex; align-items: center; gap: .4em; }
.ico { width: 2.2em; height: 2.2em; object-fit: contain; image-rendering: auto; flex: none; } .ico.s { width: 1.6em; height: 1.6em; }
.shop { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; } .shop > * { min-width: 0; }
.purse { display: flex; align-items: center; gap: .3em; color: #e8cf86; }
.tabs { display: flex; gap: .3em; flex-wrap: wrap; margin: .4em 0; }
.npc-head { display: flex; gap: .8em; align-items: center; } .npc-head img { width: 4em; height: 4em; image-rendering: pixelated; border: 1px solid #4a3a2a; }
.quest { border: 1px solid #3a2f25; background: rgba(0,0,0,.3); padding: .5em .7em; margin-top: .6em; }
.quest h3 { margin-top: 0; }
#bigmap { width: 100%; image-rendering: pixelated; display: block; background: #000; border: 1px solid #2a2019; }
.legend { display: flex; gap: 1em; flex-wrap: wrap; color: var(--dim); font-size: .85em; margin-top: .4em; }
.legend i { display: inline-block; width: .8em; height: .8em; margin-right: .35em; vertical-align: -.1em; }
/* a bunker door's reader: red when it turns you away, green when it lets you in */
.panel h2.bad { color: #e2523a; } .panel h2.good { color: #8fd36e; }
.deathbox { border-color: #6a1a10; text-align: center; } .deathbox h2 { color: #d84a32; } .deathbox .btnrow { justify-content: center; }
.report { border-color: #6a5524; }

/* a survivors' faction: its standing with the seven, and the war room */
.pfcard .prels { display: grid; gap: 4px; margin: 6px 0; }
.fline { margin-top: 10px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.fline h3 { margin: 0 0 4px; }
.fl-row { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 3px; }
.fl-row small { color: #9a8e78; }
.fl-row.chief { color: var(--brass); }
.fl-row.me { background: rgba(227,164,79,.12); }
.fl-row .btn { margin-left: auto; }
.fl-n { width: 1.4em; text-align: center; color: #8a7a5a; }
.pfcard .prel { display: grid; grid-template-columns: 150px 1fr 170px auto; align-items: center; gap: 8px; }
.pfcard .sbar { display: block; height: 6px; background: rgba(255,255,255,.08); }
.pfcard .sbar b { display: block; height: 100%; background: linear-gradient(90deg, #4a6a30, #9fd06a); }
.pfcard .prel small { color: #b0a690; }
.pfcard .fbank { border: 1px solid rgba(227,192,80,.3); background: rgba(60,46,14,.25); padding: 8px 10px; margin: 4px 0 8px; display: grid; gap: 4px; }
.pfcard .fbank-me { display: flex; align-items: center; gap: 8px; }
.pfcard .fband { border: 1px solid rgba(159,208,106,.3); background: rgba(30,50,20,.25); padding: 8px 10px; margin: 0 0 8px; }
.pfcard .fband small { color: #9a9080; }
.pfcard .fbank-me b { color: #e3c050; }


/* achievements */
.achpanel .ach-sum { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; color: #d8c9a0; }
.achpanel .ach-sum b { color: #e3c050; font-size: 18px; }
.achpanel .ach-sum i { flex: 1; height: 6px; background: rgba(255,255,255,.08); display: block; }
.achpanel .ach-sum i b { display: block; height: 100%; background: linear-gradient(90deg, #8a6a20, #e3c050); }
.achs { max-height: 58vh; overflow: auto; padding-right: 6px; display: grid; gap: 10px; }
.ach-g h3 { margin: 6px 0 4px; display: flex; justify-content: space-between; }
.ach-g h3 small { color: #9a9080; font-weight: normal; }
.ach-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 8px; align-content: start; }
.ach-g h3 { grid-column: 1 / -1; }
.ach { display: flex; gap: 8px; align-items: flex-start; padding: 5px 8px; border: 1px solid rgba(255,255,255,.06); background: rgba(0,0,0,.28); }
.ach i { font-style: normal; color: #4a463e; width: 14px; flex: none; }
.ach b { display: block; color: #8a8478; font-weight: normal; }
.ach small { color: #6e685e; font-size: 11px; }
.ach.got { border-color: rgba(227,192,80,.4); background: rgba(70,52,16,.3); }
.ach.got i { color: #e3c050; } .ach.got b { color: #f0dfa8; } .ach.got small { color: #b8a77e; }
#feed .ach { color: #f0d070; border: none; background: none; padding: 0; display: block; }

/* Nemesis board */
.caps { display: grid; grid-template-columns: repeat(auto-fill, minmax(15em, 1fr)); gap: .5em; }
.cap { display: flex; gap: .5em; border: 1px solid #3a2f25; background: linear-gradient(#1a130e, #0c0a08); padding: .45em; }
.cap.warlord { grid-column: 1 / -1; border-color: #8a5a2a; box-shadow: inset 0 0 20px rgba(160,60,20,.25); }
.cap.dead { opacity: .45; filter: grayscale(.8); }
.cap img { width: 4em; height: 4em; image-rendering: pixelated; border: 1px solid #2a2019; flex: none; background: #000; }
.cname { font-family: var(--f-display); font-size: 1.3em; color: #e2cfa6; }
.ctitle { color: var(--dim); font-size: .82em; }
.traits { display: flex; gap: .25em; flex-wrap: wrap; margin-top: .25em; }
.t { font-size: .75em; padding: .05em .4em; border: 1px solid; } .t.str { color: #ec7a62; border-color: #6a2a1c; } .t.weak { color: #9ccf6a; border-color: #3e5520; } .t.unk { color: var(--faint); border-color: #2a2019; }
.kills { font-size: .78em; color: #d86a52; margin-top: .2em; } .hist { font-size: .75em; color: var(--dim); margin-top: .15em; font-style: italic; }
.news div { font-size: .88em; color: #bfb39c; }
/* factions */
.facs { display: flex; flex-direction: column; gap: .3em; }
.fac { display: flex; gap: .6em; align-items: center; border: 1px solid #2a2019; padding: .35em .5em; background: #0c0a08; }
.fac.mine { border-color: var(--brass); }
.fdot { width: 1.2em; height: 1.2em; border-radius: 50%; flex: none; box-shadow: 0 0 6px rgba(0,0,0,.8); }
.finfo { flex: 1; min-width: 0; } .finfo small { color: var(--dim); }
.found { display: flex; gap: .4em; flex-wrap: wrap; align-items: center; }
input[type=text] { font-family: var(--f-ui); font-size: 1em; background: #0b0907; color: var(--ink); border: 1px solid #4a3a2a; padding: .3em .5em; min-width: 0; }
input[type=text]:focus { outline: 1px solid var(--brass); }
input[type=color] { width: 2.4em; height: 2em; border: 1px solid #4a3a2a; background: none; padding: 0; }

/* character creation: class cards like the class sheet */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5em; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.ccard { text-align: left; background: linear-gradient(#141210, #0b0a09); border: 1px solid #2e2924; color: var(--ink); padding: .5em; cursor: pointer; font-size: .9em; display: flex; flex-direction: column; gap: .3em; }
.ccard:hover { border-color: #6a5a44; } .ccard.sel { border-color: var(--brass); box-shadow: 0 0 14px rgba(201,160,80,.25); }
.cc-top { display: flex; gap: .4em; }
.cc-fig { width: 5.5em; height: 5.5em; object-fit: contain; image-rendering: pixelated; flex: none; }
.ccard b { font-family: var(--f-ui); font-size: 1.2em; letter-spacing: .12em; color: #e8e0d0; }
.cc-motto { color: #b8ab92; font-size: .85em; margin: .15em 0 .3em; }
.cc-h { color: var(--dim); font-size: .78em; margin-top: .2em; }
.ccard ul { margin: 0; padding-left: 1em; font-size: .78em; color: #bdb29e; }
.cc-icons { display: flex; gap: .25em; border: 1px solid #2a2622; padding: .2em; background: #0a0908; }
.cc-icons span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .1em; min-width: 0; }
.cc-icons img { height: 2.6em; max-width: 100%; object-fit: contain; image-rendering: auto; }
.cc-icons small { font-size: .65em; color: var(--dim); text-align: center; }
.cc-ab { font-size: .76em; color: #a89c86; } .cc-ab b { font-size: 1em; letter-spacing: 0; color: #e3a44f; }
.cname { display: flex; gap: .6em; align-items: center; margin: .4em 0; } .cname label { color: var(--dim); }
.crow { display: grid; grid-template-columns: 8em auto 2em auto 2.4em 1fr; gap: .35em; align-items: center; padding: .15em 0; border-bottom: 1px solid #1e1813; font-size: .92em; }
.crow b { text-align: center; font-family: var(--f-display); font-size: 1.3em; color: #eadbb8; font-weight: 400; } .crow .cm { color: var(--brass); } .crow small { font-size: .78em; }
.ctotal { margin: .4em 0; }
.cskills { display: grid; grid-template-columns: 1fr 1fr; gap: .15em .6em; }
.csk { display: flex; gap: .3em; align-items: center; font-size: .86em; } .csk span { flex: 1; } .csk.maj span { color: #e3c050; } .csk b { font-weight: 400; color: #eadbb8; min-width: 1.4em; text-align: right; }

/* ---------- D2 inventory: a stone panel, empty slots, a grid ---------- */
#inv { --cell: calc(var(--s) * 15.5px); position: absolute; right: .5em; top: .5em; bottom: .5em; width: calc(var(--cell) * 10 + 2.2em); z-index: 25;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.045' numOctaves='4' seed='3'/><feColorMatrix values='0 0 0 0 .24  0 0 0 0 .23  0 0 0 0 .22  0 0 0 .55 0'/></filter><rect width='100%' height='100%' fill='%23302e2c'/><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  border: 2px solid #121110; box-shadow: inset 0 0 0 2px #5e5a54, inset 0 0 0 4px #1e1d1b, 0 8px 30px #000; padding: .5em 1.1em .6em; display: flex; flex-direction: column; align-items: center; gap: .45em; overflow: auto; }
.inv-top { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.ibtn { width: 1.6em; height: 1.6em; background: linear-gradient(#6a4a20, #3a2a10); color: #f0d090; border: 1px solid #120c04; font-weight: bold; cursor: pointer; padding: 0; line-height: 1; }
.ibtn.x { background: linear-gradient(#a03820, #5a1808); color: #ffd0b0; }
.doll { position: relative; flex: none; }
.doll .fig { position: absolute; left: calc(var(--cell) * 2.6); top: calc(var(--cell) * 1.8); width: calc(var(--cell) * 4.8); height: calc(var(--cell) * 4.8); object-fit: contain; image-rendering: pixelated; opacity: .9; pointer-events: none; }
.islot, .grid { background: #0e0d0c; box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #5a5650, 0 0 0 1px #222; }
.islot { position: absolute; display: grid; place-items: center; cursor: pointer; }
.islot img { image-rendering: auto; pointer-events: none; }
.islot.can { box-shadow: inset 0 0 0 2px rgba(110,200,90,.6); } .islot.cant { opacity: .55; }
.islot.active::after { content: ''; position: absolute; inset: 1px; border: 1px solid rgba(201,160,80,.45); pointer-events: none; }
.dollstats { position: absolute; right: 0; bottom: calc(var(--cell) * 0.2); font-size: .78em; color: #b8b0a2; text-align: right; line-height: 1.3; text-shadow: 0 1px 0 #000; }
.grid { position: relative; flex: none; cursor: pointer; }
.gcell { position: absolute; width: var(--cell); height: var(--cell); box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #3c3934; }
.gitem { position: absolute; display: grid; place-items: center; background: rgba(40,60,90,.18); pointer-events: none; }
.gitem.q-magic { background: rgba(60,90,160,.22); } .gitem.q-rare { background: rgba(160,130,40,.22); } .gitem.q-relic { background: rgba(170,90,20,.26); } .gitem.q-odd { background: rgba(120,70,160,.24); } .gitem.q-legend { background: radial-gradient(ellipse, rgba(255,80,30,.38), rgba(120,20,10,.3)); box-shadow: inset 0 0 6px rgba(255,90,40,.6); } .gitem.q-rusty { background: rgba(80,70,60,.25); }
.gitem img { width: 100%; height: 100%; image-rendering: auto; }
#inv-ghost { position: absolute; pointer-events: none; } #inv-ghost.ok { background: rgba(80,180,80,.25); outline: 1px solid rgba(110,200,90,.7); } #inv-ghost.no { background: rgba(200,60,40,.25); outline: 1px solid rgba(220,80,60,.7); }
.purse2 { align-self: flex-end; color: #e0d4b0; display: flex; align-items: center; gap: .3em; font-size: .95em; text-shadow: 0 1px 0 #000; } .purse2 img { width: 1.6em; height: 1.6em; image-rendering: pixelated; }
.belt { display: flex; gap: .2em; flex-wrap: wrap; width: 100%; }
.bslot { display: flex; align-items: center; gap: .1em; background: #0e0d0c; box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #4a4640; padding: .1em .25em; font-size: .8em; color: #d0c8b8; }
.bslot img { width: 1.5em; height: 1.5em; image-rendering: auto; } .bslot small { color: #8a8478; font-size: .8em; }
#held { position: absolute; pointer-events: none; z-index: 70; filter: drop-shadow(0 0 1px #e8d8a8) drop-shadow(0 0 1px #e8d8a8) drop-shadow(0 3px 4px rgba(0,0,0,.8)); }
.invtabs { display: flex; gap: .3em; }
.ibtn.tab { width: auto; padding: 0 .6em; font-size: .85em; font-weight: normal; background: linear-gradient(#4a4642, #2a2826); color: #d8d0c0; }
.ibtn.tab.on { background: linear-gradient(#7a5a28, #4a3410); color: #ffe0a0; }
.gcell.pack { box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #4a5a3c; background: rgba(60,80,40,.08); }
.allyinfo { width: 100%; font-size: .82em; line-height: 1.4; color: #d0c8b8; background: #0e0d0c; box-shadow: inset 1px 1px 0 #000, inset -1px -1px 0 #4a4640; padding: .4em .5em; }
.allyinfo b { color: #ffe0a0; font-weight: 400; } .allyinfo .muted { color: #8a8478; margin-top: .3em; }
#ally-mini { display: flex; align-items: center; gap: .35em; margin-top: .3em; font-size: .78em; color: #cfe0c0; text-shadow: 0 0 3px #000; }
#ally-mini img { width: 1.9em; height: 1.9em; image-rendering: pixelated; border: 1px solid #3a5a3a; background: #000; }
#ally-mini i { display: block; width: 5em; height: .35em; background: #2a0a08; border: 1px solid #000; margin-top: .1em; }
#ally-mini i b { display: block; height: 100%; background: #6ac04a; }
.cand { display: flex; gap: .8em; align-items: flex-start; border: 1px solid #3a4a32; background: rgba(20,30,16,.5); padding: .5em .7em; margin: .5em 0; }
.cand img { width: 4.5em; height: 4.5em; image-rendering: pixelated; border: 1px solid #3a4a32; background: #000; flex: none; }
.cand .g { font-size: .82em; color: #b8b0a0; } .cand b { color: #e2cfa6; font-weight: 400; font-family: var(--f-display); font-size: 1.3em; }
#held img { image-rendering: auto; display: block; }
#tooltip { position: absolute; z-index: 80; pointer-events: none; max-width: 22em; background: rgba(8,7,6,.95); border: 1px solid #5a4a36; padding: .45em .6em; font-size: .88em; line-height: 1.35; box-shadow: 0 4px 14px #000; }
#tooltip .tname { font-family: var(--f-display); font-size: 1.25em; }
#tooltip .aff { color: #8fb4ff; }

/* ---------- the journal: Oblivion-style parchment ---------- */
#journal { position: absolute; inset: .6em 4% 1.8em; z-index: 26; display: flex; flex-direction: column; }
.jbook { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; color: var(--parch-ink); font-family: var(--f-book);
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='5' seed='8'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .22  0 0 0 0 .08  0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>"),
    radial-gradient(ellipse at center, #e4d0a4 30%, #cdb07c 75%, #9a7444 100%);
  border-radius: .4em; box-shadow: inset 0 0 40px rgba(90,50,10,.55), inset 0 0 0 2px rgba(90,60,30,.4), 0 10px 30px #000; padding: 1.2em 1.6em; overflow: hidden; }
.jbook::before { content: ''; position: absolute; left: 50%; top: 4%; bottom: 4%; width: 2px; background: linear-gradient(transparent, rgba(80,50,20,.45), transparent); }
.jpage { min-width: 0; overflow: auto; padding: 0 1.2em; scrollbar-color: #8a6a40 transparent; }
.jclose { position: absolute; right: .5em; top: .4em; background: none; border: 0; color: var(--parch-ink); font-size: 1.2em; cursor: pointer; z-index: 2; }
.jhead { font-family: var(--f-booksc); font-size: 2em; line-height: 1.1; color: #2a180a; }
.jhead2 { font-family: var(--f-booksc); font-size: 1.4em; border-bottom: 1px solid rgba(80,50,20,.5); margin: .3em 0 .3em; }
.jsub { font-style: italic; color: var(--parch-dim); margin-bottom: .4em; }
.jfig { float: right; width: 8em; height: 8em; object-fit: contain; image-rendering: pixelated; filter: sepia(.35) contrast(1.1); margin: 0 0 .3em .6em; }
.jvit { display: grid; grid-template-columns: 4.5em 1fr 5.5em; gap: .5em; align-items: center; margin: .25em 0; } .jvit b { text-align: right; font-weight: 400; }
.jbar { height: .55em; background: rgba(60,35,10,.25); border: 1px solid rgba(60,35,10,.55); }
.jbar i { display: block; height: 100%; background: linear-gradient(#7a5226, #4a2c10); }
.jbar.hp i { background: linear-gradient(#a0301c, #5a1408); } .jbar.psi i { background: linear-gradient(#3a5a90, #1a2a50); } .jbar.xp i { background: linear-gradient(#9a7a2a, #5a4410); }
.jstats { display: grid; grid-template-columns: 1fr 1fr; gap: .15em 1em; margin-top: .6em; clear: both; } .jstats b { font-weight: 400; float: right; }
.jpoints { background: rgba(120,70,20,.15); border: 1px dashed rgba(90,50,20,.5); padding: .3em .5em; margin: .3em 0; font-style: italic; }
.jlist { display: flex; flex-direction: column; }
.jrow { display: grid; grid-template-columns: 1.6em 1fr 3em 2em 1.6em; gap: .4em; align-items: center; padding: .12em .3em; cursor: pointer; border-bottom: 1px solid rgba(80,50,20,.18); }
.jrow.sk { grid-template-columns: 1fr 5em 2.6em 1.6em; }
.jrow:hover { background: rgba(120,70,20,.12); } .jrow.sel { background: rgba(120,70,20,.25); }
.jrow.major .nm { color: #5a2a08; font-weight: 600; }
.jrow .ico { text-align: center; } .jrow .val { text-align: right; } .jrow .val small { color: var(--parch-dim); font-size: .75em; } .jrow .mod { color: var(--parch-dim); }
.jplus { width: 1.4em; height: 1.4em; border-radius: 50%; border: 1px solid #5a3a18; background: radial-gradient(#e8c880, #a07838); color: #2a1404; font-weight: bold; cursor: pointer; padding: 0; line-height: 1; }
.jplus.off { visibility: hidden; }
.jgrp { font-family: var(--f-booksc); color: var(--parch-dim); margin-top: .5em; border-bottom: 1px solid rgba(80,50,20,.35); }
.jdesc { margin-top: .5em; line-height: 1.45; } .jdesc p { margin: .3em 0; } .jdesc .muted { color: var(--parch-dim); }
.jbig { font-family: var(--f-booksc); font-size: 3em; text-align: center; color: #3a1a06; }
.jsaves { display: flex; gap: .8em; flex-wrap: wrap; } .jsaves .prof { font-weight: 600; text-decoration: underline; }
.jfoot { margin-top: .8em; font-style: italic; color: var(--parch-dim); font-size: .9em; }
.jjob { border-bottom: 1px solid rgba(80,50,20,.3); padding: .4em 0; } .jjob .good { color: #2a6a1a; } .jjob .btn { margin-top: .3em; }
.jdead { padding: .3em 0; border-bottom: 1px solid rgba(80,50,20,.25); }
.jpage .muted { color: var(--parch-dim); }
.jtabs { display: flex; gap: .3em; justify-content: center; margin-top: -.2em; }
.jtab { font-family: var(--f-booksc); font-size: 1.05em; color: var(--parch-ink); background: linear-gradient(#d4bd8e, #a8875a); border: 1px solid #6a4a24; border-top: 0; border-radius: 0 0 .5em .5em; padding: .15em 1em .3em; cursor: pointer; box-shadow: 0 3px 6px rgba(0,0,0,.6); }
.jtab.on { background: linear-gradient(#ead6a8, #c8a670); font-weight: 600; transform: translateY(.15em); }

/* ---------- title ---------- */
/* main menu: the key art full-bleed, plain white condensed items bottom-left, the hovered one in a white bar */
#title { position: absolute; inset: 0; z-index: 20; background: #000 url(art/menu_bg.jpg) center 16% / cover no-repeat; }
#title::before { content: ''; position: absolute; inset: 0; background: linear-gradient(20deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.35) 32%, transparent 55%); pointer-events: none; }
.mm { position: absolute; left: 6.5%; bottom: 11%; display: flex; flex-direction: column; gap: .12em; min-width: 17em; z-index: 1; }
.mm-item { font-family: var(--f-menu); font-size: 2.15em; line-height: 1.2; text-transform: uppercase; color: #f4f1ea; background: transparent; border: 0; padding: .02em .32em; text-align: left; cursor: pointer; letter-spacing: .01em; text-shadow: 0 2px 4px rgba(0,0,0,.85); }
.mm-item:hover, .mm-item:focus-visible, .mm-item.sel { background: #f4f1ea; color: #111; text-shadow: none; outline: none; }
.mm-item:disabled { opacity: .45; cursor: default; }
.mm-status { position: absolute; left: 6.5%; bottom: 4.5%; color: #b9b1a3; font-family: var(--f-ui); font-size: .82em; text-shadow: 0 1px 3px #000; z-index: 1; max-width: 60%; }
.mm-head { font-family: var(--f-menu); font-size: 3em; text-transform: uppercase; color: #f4f1ea; text-shadow: 0 3px 6px #000; margin-bottom: .1em; padding-left: .2em; }
.mm-note { color: #b9b1a3; font-size: .9em; padding-left: .45em; margin-bottom: .6em; max-width: 26em; }
#pause, #options, #farewell { position: absolute; inset: 0; z-index: 40; }
#pause { background: radial-gradient(ellipse at 30% 60%, rgba(0,0,0,.55), rgba(0,0,0,.88)); }
#pause .mm { bottom: 18%; }
#options { background: rgba(0,0,0,.86); display: flex; align-items: flex-start; justify-content: flex-start; padding: 7% 0 0 6.5%; }
.opt-panel { min-width: 30em; }
.opt-sub { font-family: var(--f-menu); text-transform: uppercase; color: #b9b1a3; font-size: 1.15em; letter-spacing: .08em; margin: .4em .3em .5em; }
.opt-row { display: grid; grid-template-columns: 12em 1fr 3.2em; align-items: center; gap: .9em; padding: .32em .4em; color: #f4f1ea; font-family: var(--f-menu); font-size: 1.25em; text-transform: uppercase; }
.opt-row:hover { background: rgba(244,241,234,.08); }
.opt-row output { text-align: right; font-family: var(--f-ui); font-size: .8em; color: #d8ccb4; }
.opt-row input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: .35em; background: linear-gradient(90deg, #f4f1ea var(--v, 100%), #3a332c var(--v, 100%)); border: 1px solid #000; cursor: pointer; }
.opt-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: .9em; height: 1.3em; background: #f4f1ea; border: 2px solid #111; }
.opt-row input[type=range]::-moz-range-thumb { width: .9em; height: 1.3em; background: #f4f1ea; border: 2px solid #111; border-radius: 0; }
.opt-row.master { border-bottom: 1px solid rgba(244,241,234,.18); margin-bottom: .3em; padding-bottom: .5em; }
.opt-back { margin-top: .8em; min-width: 8em; }
.opt-tabs { display: flex; gap: .3em; margin: .3em 0 .6em; border-bottom: 1px solid rgba(244,241,234,.18); }
.opt-tab { font-family: var(--f-menu); text-transform: uppercase; font-size: 1.3em; letter-spacing: .06em; color: #b9b1a3; background: transparent; border: 0; padding: .15em .6em; cursor: pointer; }
.opt-tab.on { color: #111; background: #f4f1ea; }
.opt-tab:hover:not(.on), .opt-tab:focus-visible:not(.on) { color: #f4f1ea; background: rgba(244,241,234,.12); outline: none; }
.opt-tab.on:focus-visible { outline: 1px solid #f4f1ea; outline-offset: 2px; }
#opt-keys { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(10, auto); grid-auto-flow: column; column-gap: 1.6em; width: 44em; }
#opt-keys[hidden] { display: none; }
.key-row { display: grid; grid-template-columns: 1fr 6.5em; align-items: center; gap: .6em; padding: .16em .4em; color: #f4f1ea; font-family: var(--f-menu); font-size: 1.12em; text-transform: uppercase; }
.key-row:hover { background: rgba(244,241,234,.08); }
.opt-key { font-family: var(--f-ui); font-size: .78em; color: #f4f1ea; background: #1d1915; border: 1px solid #5a5045; padding: .25em .4em; cursor: pointer; text-transform: none; min-height: 1.9em; }
.opt-key:hover, .opt-key:focus-visible { border-color: #f4f1ea; outline: none; }
.opt-key.wait { color: #111; background: #e8cf86; border-color: #e8cf86; }
.opt-key.flash { animation: keyflash .6s; }
@keyframes keyflash { from { background: #e8cf86; color: #111; } }
.key-foot { grid-column: 1 / -1; grid-row: 11; display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-top: .6em; padding: .3em .4em 0; border-top: 1px solid rgba(244,241,234,.12); color: #8b7f6c; font-size: .82em; }
.key-foot .opt-key { font-size: .95em; }
#farewell { background: #000; display: flex; align-items: center; justify-content: center; text-align: center; }
#farewell b { display: block; font-family: var(--f-menu); font-size: 2.6em; text-transform: uppercase; color: #f4f1ea; font-weight: 400; }
#farewell span { color: #8b7f6c; font-family: var(--f-ui); }
@media (prefers-reduced-motion: reduce) { #area-title.show { animation: none; opacity: 1; } }

/* conversations: a Baldur's Gate style box along the bottom, the speaker's face in a frame, the words typed out */
#dlg { position: absolute; left: 3%; right: 3%; bottom: 2.5%; z-index: 35; }
.dlg-box { display: flex; gap: 1.1em; padding: .9em 1.2em .8em .9em; background: linear-gradient(180deg, rgba(30,22,16,.96), rgba(12,9,7,.97)); border: 2px solid #6a5238; box-shadow: inset 0 0 0 1px #000, inset 0 0 40px rgba(0,0,0,.6), 0 8px 30px #000; }
.dlg-face { flex: none; }
.dlg-face canvas { width: 7.6em; height: 7.6em; display: block; background: #0b0807; border: 2px solid #9a7840; box-shadow: 0 0 0 2px #000, 0 0 18px rgba(0,0,0,.8); }
.dlg-main { flex: 1; min-width: 0; }
.dlg-who { display: flex; align-items: baseline; gap: .8em; border-bottom: 1px solid rgba(154,120,64,.35); padding-bottom: .15em; }
#dlg-name { font-family: var(--f-display); font-size: 1.7em; color: #e8cf86; text-shadow: 0 2px 0 #000; }
#dlg-role { font-size: .78em; color: var(--dim); text-transform: uppercase; letter-spacing: .16em; }
#dlg-text { font-family: 'IM Fell English', Georgia, serif; font-size: 1.22em; line-height: 1.38; color: #ecdfc4; min-height: 2.8em; margin: .35em 0 .45em; }
#dlg-opts { list-style: none; margin: 0; padding: 0; }
#dlg-opts button { display: block; width: 100%; text-align: left; background: none; border: 0; color: #d9b968; font-family: 'IM Fell English', Georgia, serif; font-size: 1.1em; padding: .1em .35em; cursor: pointer; }
#dlg-opts button b { color: #8a7040; margin-right: .3em; font-weight: 400; }
#dlg-opts button:hover, #dlg-opts button:focus-visible { color: #fff6dc; background: rgba(201,160,80,.13); outline: none; }
#dlg-hint { font-size: .72em; color: var(--faint); text-align: right; margin-top: .2em; }

.jperk { border-left: 2px solid rgba(80,50,20,.3); padding-left: .5em; opacity: .55; } .jperk.on { opacity: 1; border-color: #8a5a20; } .jperk small { color: var(--parch-dim); }

/* the pack's belt and ammo pouches, and anything just picked up glowing */
.pouches { width: 100%; display: flex; flex-direction: column; gap: .2em; }
.phead { display: flex; justify-content: space-between; align-items: center; color: #a89e8c; font-size: .72em; text-transform: uppercase; letter-spacing: .14em; border-bottom: 1px solid rgba(160,150,130,.18); padding-bottom: .1em; margin-top: .15em; }
.phead .purse2 { text-transform: none; letter-spacing: 0; font-size: 1.25em; }
.bslot.big { padding: .15em .35em .15em .2em; gap: .3em; font-size: .78em; }
.bslot.big img { width: 1.9em; height: 1.9em; }
.bslot.big span { display: flex; flex-direction: column; line-height: 1.05; } .bslot.big b { color: #f0e6cc; font-size: 1.1em; } .bslot.big i { font-style: normal; color: #9a9282; font-size: .85em; white-space: nowrap; }
.bslot.new, .gitem.new { animation: newglow 1.2s ease-in-out infinite; }
@keyframes newglow { 0%, 100% { box-shadow: inset 0 0 0 1px #c9a050, 0 0 4px rgba(255,200,90,.3); } 50% { box-shadow: inset 0 0 0 1px #ffe08a, 0 0 12px rgba(255,200,90,.85); } }

/* an item card's damage line, Diablo II style: bigger, in the affix colour when the item raises it */
#tooltip .dmgline { font-size: 1.08em; font-weight: bold; }
/* the menu underneath doesn't show through the options screen */
#title:has(~ #options:not([hidden])) .mm, #title:has(~ #options:not([hidden])) .mm-status, #pause:has(~ #options:not([hidden])) .mm { visibility: hidden; }

/* travel from the map */
.travel { display: flex; align-items: center; gap: .8em; margin: .2em 0 .5em; }
.travel h3 { margin: 0; }
.trips { display: flex; flex-wrap: wrap; gap: .4em; }
.trip { display: grid; text-align: left; gap: .1em; min-width: 11em; padding: .35em .6em; background: #1d1915; border: 1px solid #5a5045; color: #f4f1ea; cursor: pointer; font: inherit; }
.trip b { font-family: var(--f-menu); text-transform: uppercase; font-weight: 400; }
.trip small { color: #b9b1a3; }
.trip span { color: #d8b450; font-size: .85em; }
.trip:hover:not(:disabled), .trip:focus-visible { border-color: #f4f1ea; outline: none; }
.trip:disabled { opacity: .45; cursor: default; }

/* the factions panel: one card per faction */
.ftabs { flex-wrap: wrap; }
.fcard { border: 1px solid #2a2019; border-left: 3px solid var(--fc); background: #0c0a08; padding: .7em .9em; }
.fcard .fhead { display: flex; align-items: center; gap: .6em; }
.fcard .fhead h3 { margin: 0; color: var(--fc); }
.fcard .fmotto { color: #b9ab8e; font-style: italic; margin: .2em 0 .5em; }
.fcard .fstory { line-height: 1.45; margin: .4em 0 .7em; }
.fcard .fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .5em .9em; font-size: .92em; }
.fcard .fgrid b { display: block; color: #d8ccb4; font-size: .85em; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 640px) { .fcard .fgrid { grid-template-columns: 1fr; } }
.chip.hostile { color: #ff7a5a; border-color: #7a2a1c; } .chip.neutral { color: #c9bc9c; border-color: #4a3e2c; }
.chip.friend { color: #9fd27a; border-color: #3e5a24; } .chip.member { color: #e8cf86; border-color: #6a5524; }
.btn.danger { color: #ffb3a0; border-color: #8a2a1c; background: #2a0e0a; }
#dlg-text { white-space: pre-line; }

/* a find: good gear is rare, so finding it takes the screen for a moment */
#findfx { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; cursor: pointer; background: radial-gradient(circle at 50% 50%, rgba(0,0,0,.25), rgba(0,0,0,.7) 70%); animation: ffIn .35s ease-out; --fc: #7fa8e0; --fg: rgba(127,168,224,.5); }
#findfx.r2 { --fc: #e3c050; --fg: rgba(227,192,80,.55); } #findfx.r3 { --fc: #e8892e; --fg: rgba(232,137,46,.6); } #findfx.r4 { --fc: #ff5a3c; --fg: rgba(255,90,60,.7); }
#findfx.out { opacity: 0; transition: opacity .4s; }
#findfx .ff-ray { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, var(--fg) 0deg 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 68%); mask: radial-gradient(circle, #000 0, transparent 68%); animation: ffSpin 9s linear infinite; opacity: .55; }
#findfx.r1 .ff-ray { opacity: .3; } #findfx.r4 .ff-ray { opacity: .85; animation-duration: 5s; }
#findfx .ff-card { position: relative; text-align: center; padding: 1.1em 1.8em 1.2em; background: rgba(12,9,7,.94); border: 1px solid var(--fc); box-shadow: 0 0 28px var(--fg), inset 0 0 18px rgba(0,0,0,.8); animation: ffPop .5s cubic-bezier(.2,1.6,.4,1); min-width: 15em; max-width: 90vw; }
#findfx .ff-label { font-family: 'Pirata One', serif; font-size: 2.1em; letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 0 12px var(--fg); }
#findfx img { display: block; margin: .5em auto .6em; image-rendering: auto; filter: drop-shadow(0 0 10px var(--fg)); }
#findfx .ff-name { font-size: 1.25em; font-weight: bold; }
#findfx .ff-line { margin-top: .35em; color: #b9ab8e; font-style: italic; }
@keyframes ffIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ffPop { 0% { transform: scale(.55); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes ffSpin { to { transform: rotate(360deg); } }
.jfind { display: flex; gap: .6em; align-items: center; padding: .3em 0; border-bottom: 1px solid rgba(90,70,50,.3); }
.jfind img { width: 40px; height: auto; image-rendering: auto; flex: none; }

/* the story of the Last Stop */
.prologue p { font-family: 'IM Fell English', Georgia, serif; font-size: 1.12em; line-height: 1.5; color: #e6d9bd; margin: 0 0 .8em; max-width: 46em; }
.prologue p:last-child { color: #e3a44f; font-style: italic; }
.prologue.short p { font-size: .98em; color: #cdbf9f; }
.prologue.short p:last-child { color: #cdbf9f; font-style: normal; }
.fcard .fties { font-size: .9em; color: #d8ccb4; margin: 0 0 .4em; padding: .25em .5em; border-left: 2px solid var(--fc); background: rgba(255,255,255,.03); }

/* the Greenlight: the story's scenes, its lines in loot and the feed, and the journal's Story and Notes pages */
.event.story { border-color: #3e6a34; box-shadow: 0 0 40px rgba(90,220,110,.14), inset 0 0 30px rgba(0,0,0,.6); }
.event.story .sub { color: #9ff28a; letter-spacing: .12em; }
.event.story h2 { color: #e9f2d8; }
.event.story > p { line-height: 1.5; }
.act { color: #9ff28a; font-weight: 600; letter-spacing: .04em; } .story { color: #a8e898; } .note { color: #d9c9a0; font-style: italic; } .dream { color: #b9acd9; font-style: italic; }
#feed .story { color: #a8e898; }
.jact { font-family: var(--f-booksc); color: #3e5a28; margin: .2em 0 0; letter-spacing: .05em; }
.jstep { margin: .1em 0 .4em; font-family: var(--f-booksc); font-size: 1.3em; }
.jgoal { font-style: italic; border-left: 3px solid #5c7a3a; padding-left: .6em; }
.jend { color: #3e5a28; }
.jhead3 { font-family: var(--f-booksc); font-size: 1.05em; margin: .8em 0 .3em; border-bottom: 1px solid rgba(90,70,50,.35); }
.shards { display: flex; flex-wrap: wrap; gap: .3em; }
.shard { font-size: .82em; padding: .15em .45em; border: 1px dashed rgba(80,60,40,.5); border-radius: .3em; color: rgba(60,45,30,.45); }
.shard.have { border: 1px solid #4b7a34; background: rgba(110,190,90,.22); color: #23401a; font-weight: 600; }
.small { font-size: .85em; }
.asks { margin: .2em 0; padding-left: 1.1em; } .asks li { font-style: italic; margin: .25em 0; }
.road p { margin: .2em 0; font-size: .9em; }
.jnotes { display: flex; flex-direction: column; gap: .15em; overflow-y: auto; max-height: 26em; }
.jnote { text-align: left; background: none; border: 0; border-bottom: 1px solid rgba(90,70,50,.25); padding: .3em .2em; cursor: pointer; color: inherit; font: inherit; display: flex; flex-direction: column; }
.jnote small { opacity: .65; } .jnote.on { background: rgba(120,90,40,.16); }
.notetext { font-family: "IM Fell English", Georgia, serif; font-size: 1.08em; line-height: 1.45; padding: .5em .7em; background: rgba(120,90,50,.08); border: 1px solid rgba(90,70,50,.25); transform: rotate(-.4deg); }
.notetext p { margin: .25em 0; }
.notesig { text-align: right; font-style: italic; opacity: .7; }

/* the Quiet Ward's moods (fq/ward.js): each scene's card dressed for where it happens, over a plain base (no story green) */
.panel.moody { color: #cbbd9f; border-color: #3a2c22; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px #1a120c, 0 10px 40px #000; }
.panel.moody h2 { color: #e2cfa6; }
.panel.moody .sub { color: #8a7c66; }
.panel.mood-ward { background: radial-gradient(ellipse at top, rgba(150,190,210,.10), transparent 65%), linear-gradient(#10161a, #090c0e); border-color: #34444c; box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px #141c20, 0 10px 40px #000; }
.panel.mood-ward h2 { color: #c9d6da; text-shadow: 0 2px 0 #0a1418; }
.panel.mood-ward p { color: #b6c0c2; }
.panel.mood-dark { background: #030202; border-color: #1a0f0c; box-shadow: inset 0 0 90px #000, 0 10px 40px #000; animation: mood-breathe 4.2s ease-in-out infinite; }
.panel.mood-dark h2 { color: #6e1f16; text-shadow: none; }
.panel.mood-dark p, .panel.mood-dark .lines div { color: #6b5a50; }
.panel.mood-dark .lines .bad { color: #a8382a; }
.panel.mood-dark .btn { background: #0a0605; border-color: #2a1510; color: #8a6a5a; }
@keyframes mood-breathe { 0%, 100% { box-shadow: inset 0 0 90px #000, 0 10px 40px #000; } 50% { box-shadow: inset 0 0 140px #000, 0 10px 60px #1a0402; } }
.panel.mood-white { background: linear-gradient(#e2ddd0, #c9c2b2); border-color: #f4f0e6; color: #2a2520; box-shadow: inset 0 0 60px rgba(0,0,0,.25), 0 10px 40px #000; }
.panel.mood-white h2 { color: #3a332a; text-shadow: none; }
.panel.mood-white p, .panel.mood-white .sub, .panel.mood-white .lines div { color: #3a3329; }
.panel.mood-white .lines .bad { color: #8a1d12; }
.panel.mood-white .btn { background: #efe9dc; color: #2a2520; border-color: #a49a86; }
.panel.mood-gore { background: radial-gradient(ellipse at bottom, rgba(110,10,6,.22), transparent 60%), linear-gradient(#120d0c, #0a0706); border-color: #4a1e18; }
.panel.mood-well { background: radial-gradient(circle at 50% 120%, rgba(200,200,180,.10), transparent 55%), linear-gradient(#050505, #0d0c0a); border-color: #2a2622; }
.panel.mood-desk { background: radial-gradient(ellipse at top, rgba(220,180,110,.10), transparent 60%), linear-gradient(#1a1610, #0e0c09); }
.panel.mood-dinner { background: radial-gradient(ellipse at 50% 30%, rgba(255,170,80,.16), transparent 55%), linear-gradient(#140e0a, #080604); border-color: #5a3a1c; }
.panel.mood-stacks { background: radial-gradient(ellipse at top left, rgba(200,150,70,.12), transparent 50%), linear-gradient(#110e0a, #070605); }
.panel.mood-post { background: radial-gradient(ellipse at top, rgba(120,200,120,.08), transparent 60%), linear-gradient(#0e120d, #070906); border-color: #2c3a28; }
.panel.mood-vault { background: radial-gradient(ellipse at top, rgba(170,180,190,.08), transparent 60%), linear-gradient(#111214, #08090a); border-color: #3a3e44; }

/* ---------- the controller (client/gamepad.js): the highlight it moves, its pointer and its keyboard ---------- */
body.pad .pad-focus { outline: 2px solid #ffd76a !important; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(255,215,106,.18), 0 0 14px rgba(255,200,90,.35); }
body.pad .mm-item.pad-focus { background: #f4f1ea; color: #111; text-shadow: none; outline: none !important; box-shadow: none; }
body.pad .cw-cmd.pad-focus, body.pad #dlg-opts button.pad-focus { background: rgba(201,160,80,.24); outline-offset: -2px; }
body.pad .jrow.pad-focus { background: rgba(120,80,20,.16); outline-color: #7a4a10 !important; }
body.pad #view, body.pad #stage { cursor: none; }
#padcursor { position: fixed; left: 0; top: 0; width: 18px; height: 24px; z-index: 9999; pointer-events: none; filter: drop-shadow(0 1px 1px #000) drop-shadow(0 0 3px rgba(255,210,120,.5));
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 16'%3E%3Cpath d='M1 1v12l3-3 2.4 5 2-1-2.4-5H10z' fill='%23ffd76a' stroke='%231a1208' stroke-width='1'/%3E%3C/svg%3E") no-repeat 0 0 / contain; }
#padcursor[hidden] { display: none; }
#padkbd { position: absolute; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(0,0,0,.6); }
#padkbd[hidden] { display: none; }
.pk-box { background: linear-gradient(#1a1510, #0d0b08); border: 1px solid #9a7840; box-shadow: 0 0 0 2px #000, 0 12px 40px rgba(0,0,0,.85); padding: .9em 1.1em; font-family: var(--f-ui); color: var(--ink); }
.pk-label { font-family: var(--f-display); font-size: 1.5em; color: #e3d2ad; }
.pk-text { margin: .3em 0 .6em; padding: .3em .5em; min-height: 1.6em; background: #070605; border: 1px solid #5a4630; font-size: 1.2em; color: #fff3d6; }
.pk-text i { display: inline-block; width: .5em; height: 1em; margin-left: 1px; vertical-align: -.15em; background: #ffd76a; animation: pk-blink 1s steps(1) infinite; }
@keyframes pk-blink { 50% { opacity: 0; } }
.pk-row { display: flex; gap: .3em; justify-content: center; margin: .3em 0; }
.pk-row button { min-width: 2.4em; height: 2.3em; padding: 0 .5em; background: #241c14; color: #e8dcc4; border: 1px solid #5a4630; font-family: inherit; font-size: 1em; cursor: pointer; }
.pk-row button.wide { min-width: 12em; }
.pk-row button.on, .pk-row button.primary { border-color: var(--brass); color: #ffd98a; }
.pk-help { margin-top: .6em; font-size: .8em; color: #9d917c; text-align: center; }
#opt-pad { width: 44em; }
#opt-pad[hidden] { display: none; }
.pad-map { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.6em; }
.pad-map h4 { margin: .2em .4em; font-family: var(--f-menu); text-transform: uppercase; letter-spacing: .05em; color: var(--brass); font-weight: 400; }
.pad-map .key-row { font-size: .95em; padding: .1em .4em; }
.pad-btn { color: #ffd98a; font-weight: 400; text-align: right; font-size: 1.1em; }
.pad-note { margin: .4em .4em 0; font-size: .85em; color: #b8b0a2; text-transform: none; }
