:root {
  --bg: #0e100d; --panel: #151812; --panel2: #1c2019; --line: #2c3227; --text: #efe9da; --muted: #9c9a87;
  --gold: #f2c14e; --gold2: #ffdf7e; --brand: #8b6914; --brand2: #6b4f10; --red: #ef6a5a; --blue: #5fc8ff; --green: #7fb069;
  --font: Montserrat, system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; }
/* It's a game: long presses shouldn't select text or pop the copy/lookup menu. Typing fields stay selectable. */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
button { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--panel2); color: var(--text); padding: 8px 12px; border-radius: 10px; font-weight: 700; transition: background .15s, border-color .15s, transform .1s; touch-action: manipulation; }
button:hover:not(:disabled) { border-color: #4f5a43; background: #252a20; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .38; cursor: not-allowed; }
button.primary { background: linear-gradient(180deg, #f6cf62, #d39b22); color: #2a1c02; border-color: #a97a17; }
button.primary:hover:not(:disabled) { background: linear-gradient(180deg, #ffd96e, #dea62b); border-color: #c08a1d; }
button.ghost { background: transparent; }
button.big { padding: 12px 20px; font-size: 15px; border-radius: 12px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.5; }
.small { font-size: 12px; }
.hidden { display: none !important; }
h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 800; }

/* ---------- layout */
#app { display: flex; flex-direction: column; height: 100%; }
#topbar { display: flex; align-items: center; gap: 18px; padding: 10px 16px; background: #090a08; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand img { height: 22px; }
.brand span { font-family: Rye, serif; font-size: 20px; color: var(--gold); letter-spacing: .5px; }
.hud { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; line-height: 1.15; }
.stat label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.stat span { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.stat.gold span { color: var(--gold); }
.stat.empty span { color: var(--red); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
#mapwrap { flex: 1; display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
#mapstage { position: relative; min-height: 0; overflow: hidden; background: #080907; }
#map { display: block; touch-action: none; cursor: crosshair; }
#maptip { position: absolute; pointer-events: none; background: rgba(9,10,8,.88); border: 1px solid var(--line); padding: 5px 9px; border-radius: 7px; font-size: 12px; font-weight: 600; white-space: nowrap; display: none; }
.zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.zoom button { width: 38px; height: 38px; padding: 0; font-size: 18px; background: rgba(20,23,18,.85); }
.lidar-tag { position: absolute; left: 12px; top: 12px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; background: rgba(9,10,8,.75); border: 1px solid var(--line); padding: 5px 9px; border-radius: 6px; color: var(--muted); font-weight: 700; pointer-events: none; }
#side { overflow-y: auto; background: var(--panel); border-left: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
#side section { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.seg { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.seg button { flex: 1; padding: 7px 8px; font-size: 12px; }
.seg button.on { background: #3a3019; border-color: var(--gold); color: var(--gold2); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin: 3px 12px 3px 0; font-weight: 500; cursor: pointer; }
.chk input { accent-color: var(--gold); }
.legend { display: flex; gap: 12px; margin-top: 10px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.lg { display: inline-block; width: 16px; height: 6px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.lg.reef { background: repeating-linear-gradient(90deg, #fff4d6 0 4px, #222 4px 6px); }
.lg.basalt { background: #7a50aa; }
.lg.creek { background: #50c8ff; }
.readings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.readings div { background: #11140f; border-radius: 9px; padding: 7px 9px; }
.readings label { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.readings b { font-size: 16px; }
.obs { list-style: none; padding: 0; margin: 0 0 12px; font-size: 13px; line-height: 1.8; }
.obs .warn { color: #e8b26a; font-size: 12px; line-height: 1.4; margin-top: 4px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dot.g { background: #a2794e; } .dot.q { background: #f0ead8; } .dot.i { background: #7a3a1c; } .dot.w { background: #50c8ff; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; background: linear-gradient(180deg, #2c3324, #20251b); border-color: #4b5940; }
.act span { font-size: 16px; font-weight: 800; color: var(--gold2); }
.act small { font-size: 11px; color: var(--muted); font-weight: 600; }
.act:hover:not(:disabled) { border-color: var(--gold); }
.gear-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; opacity: .55; }
.gear-item.on { opacity: 1; }
.gear-item b { display: block; font-size: 13px; }
.gear-item small { color: var(--muted); font-size: 11.5px; line-height: 1.35; display: block; }
.gi { width: 18px; text-align: center; color: var(--gold); font-weight: 800; }
.prog { margin-top: 10px; }
.prog small { color: var(--muted); font-size: 11px; }
.bar { height: 8px; background: #0c0e0a; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #d39b22, #ffdf7e); border-radius: 6px; transition: width .1s; }

/* ---------- Chip guide */
.chip-guide { position: absolute; left: 10px; bottom: 50px; display: flex; align-items: flex-end; pointer-events: none; z-index: 5; max-width: min(560px, 92%); }
.chip-fig { width: 116px; flex: 0 0 116px; pointer-events: auto; cursor: pointer; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); order: 0; }
.chip-fig svg { width: 100%; display: block; }
.chip-bubble { order: 1; position: relative; background: #fbf6e8; color: #2a2414; border-radius: 16px; padding: 10px 30px 12px 14px; font-size: 13.5px; line-height: 1.45; margin-left: 4px; margin-bottom: 120px; box-shadow: 0 10px 30px rgba(0,0,0,.45); pointer-events: auto; transition: opacity .2s, transform .2s; }
.chip-bubble::before { content: ''; position: absolute; left: -9px; bottom: 16px; border: 10px solid transparent; border-right-color: #fbf6e8; border-left: 0; }
.chip-bubble.hide { opacity: 0; transform: translateY(6px); pointer-events: none; }
.chip-bubble b { color: #7a5a0e; }
.chip-name { font-family: Rye, serif; color: var(--brand); font-size: 13px; margin-bottom: 2px; }
.chip-x { position: absolute; right: 6px; top: 4px; background: none; border: 0; color: #8a7f60; padding: 2px 6px; font-size: 16px; }
.chip-guide.bounce .chip-fig { animation: bounce .5s ease; }
@keyframes bounce { 0% { transform: translateY(0); } 35% { transform: translateY(-14px); } 65% { transform: translateY(0); } 80% { transform: translateY(-4px); } 100% { transform: translateY(0); } }

/* ---------- minigames */
.mg { position: fixed; inset: 0; z-index: 50; background: #0a0c09; display: flex; flex-direction: column; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.mg-head { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #090a08; flex-wrap: wrap; }
.mg-head h2 { margin: 0; font-family: Rye, serif; font-weight: 400; color: var(--gold); font-size: 22px; }
.mg-head .sub { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.mg-head > div:first-child { flex: 0 0 auto; }
.mg-stats { display: flex; gap: 18px; flex: 1; justify-content: center; flex-wrap: wrap; }
.mg-stats label, .det-ctl label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.mg-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.mg-stats .bad b { color: var(--red); }
.mg-actions { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.mg-actions .seg { margin: 0; }
.mg-body { flex: 1; position: relative; min-height: 0; overflow: hidden; }
.mg-body canvas { display: block; touch-action: none; }
.mg-chip { position: absolute; right: 12px; bottom: 6px; width: 120px; pointer-events: none; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.mg-help { position: absolute; left: 12px; top: 12px; max-width: 360px; background: rgba(9,10,8,.8); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; color: #d9d3c2; pointer-events: none; }
.mg-help b { color: var(--gold2); }
.mg-help.fade { opacity: 0; transition: opacity .8s; }
.mg-controls { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); background: #090a08; flex-wrap: wrap; justify-content: center; }
.shake.on { background: #3a3019; border-color: var(--gold); color: var(--gold2); }
.tiltmeter { min-width: 200px; }
.tiltmeter label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
.tiltmeter .bar { height: 12px; }
.tiltmeter .bar i { background: linear-gradient(90deg, #3e8fb0, #7fd0f0); transition: none; }
.tiltmeter .bar i.hot { background: linear-gradient(90deg, #d0602a, #ff6b5b); }
.tiltmeter .zone { position: absolute; left: 80%; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(45deg, rgba(239,106,90,.25) 0 4px, transparent 4px 8px); }
.finish.pulse { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242,193,78,.6); } 50% { box-shadow: 0 0 0 10px rgba(242,193,78,0); } }

.result, .reveal { position: absolute; inset: 0; background: rgba(5,6,4,.72); display: flex; align-items: flex-start; justify-content: center; padding: 16px; backdrop-filter: blur(3px); animation: fadein .25s; z-index: 4; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
/* margin:auto centres the card when it fits, and lets a tall haul scroll from the top instead of being cut off */
.result > *, .reveal > * { margin: auto; flex-shrink: 0; }
/* the keep button stays on screen however many finds there are */
.res-main .bank { position: sticky; bottom: 0; z-index: 1; box-shadow: 0 -10px 18px 6px #151812; }
.res-card { display: flex; gap: 18px; background: linear-gradient(180deg, #1f2419, #151812); border: 1px solid #4b5940; border-radius: 20px; padding: 22px; max-width: 640px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.res-chip { width: 170px; flex: 0 0 170px; }
.res-chip.small { width: 120px; flex: none; margin: 0 auto; }
.res-main { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.res-say { font-family: Rye, serif; color: var(--gold2); font-size: 18px; line-height: 1.3; }
.res-big { font-size: 40px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgba(242,193,78,.35); }
.res-rows { font-size: 14px; line-height: 1.6; }
.res-rows .gold { color: var(--gold2); font-weight: 700; }
.res-rows .gem { color: #9fc4ff; font-weight: 700; }
.res-rows .bad { color: var(--red); }
.res-items { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.rev-card { background: linear-gradient(180deg, #1f2419, #151812); border: 1px solid #4b5940; border-radius: 20px; padding: 22px 26px; max-width: 420px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: pop .35s cubic-bezier(.2,1.4,.4,1); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.rev-card.gold { border-color: var(--gold); box-shadow: 0 0 60px rgba(242,193,78,.25), 0 20px 60px rgba(0,0,0,.6); }
.rev-card h3 { font-size: 22px; text-transform: none; letter-spacing: 0; margin: 4px 0 0; color: var(--text); }
.rev-card.gold h3 { color: var(--gold); }
.rev-card p { margin: 0; color: #cfc8b4; font-size: 14px; }
.rev-card .say { font-style: italic; color: var(--gold2); margin: 6px 0 10px; }
.rev-art { min-height: 130px; display: flex; align-items: center; justify-content: center; }

.det-ctl .meter { min-width: 140px; }
.det-ctl .bar { height: 12px; }
.det-ctl .bar i { transition: none; }
.det-ctl .bar i.sig { background: linear-gradient(90deg, #7fb069, #ffe066); }
.det-ctl .bar i.sig.fer { background: linear-gradient(90deg, #a03a2a, #ef6a5a); }
.det-ctl .bar i.chat { background: linear-gradient(90deg, #6b5a8a, #b98ae0); }
.vdi { text-align: center; min-width: 90px; }
.vdi b { display: block; font-family: 'Courier New', monospace; font-size: 26px; font-weight: 700; background: #0a1a10; color: #8affb0; border-radius: 8px; padding: 2px 10px; border: 1px solid #1f3a28; }
.vdi b.fer { color: #ff8a7a; } .vdi b.non { color: #ffe27a; }
.vdi.off b { color: #557; }
.gb { min-width: 180px; }
.gb input { width: 100%; accent-color: var(--gold); }
.digs { text-align: center; }
.digs b { font-size: 22px; color: var(--gold); }

/* ---------- splash */
#splash { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; transition: opacity .6s; }
#splash.out { opacity: 0; pointer-events: none; }
.splash-bg { position: fixed; inset: 0; background:
  radial-gradient(ellipse at 30% 20%, rgba(242,193,78,.18), transparent 50%),
  radial-gradient(ellipse at 80% 90%, rgba(139,105,20,.25), transparent 55%),
  repeating-radial-gradient(circle at 70% 40%, rgba(255,255,255,.025) 0 2px, transparent 2px 22px),
  linear-gradient(160deg, #1b1f16, #0b0c09 70%); }
.splash-in { position: relative; display: flex; gap: 30px; align-items: center; max-width: 900px; width: 100%; }
.splash-chip { width: 300px; flex: 0 0 300px; filter: drop-shadow(0 20px 30px rgba(0,0,0,.6)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.splash-logo { height: 34px; display: block; }
.splash-copy h1 { font-family: Rye, serif; font-weight: 400; font-size: clamp(42px, 7vw, 72px); margin: 4px 0 6px; color: var(--gold); text-shadow: 0 4px 0 #6b4f10, 0 10px 30px rgba(242,193,78,.25); line-height: 1; }
.tag { font-size: 17px; line-height: 1.5; margin: 0 0 14px; }
.tag b { color: var(--gold2); }
.splash-copy ul { margin: 0 0 20px; padding-left: 18px; color: #cfc8b4; font-size: 14px; line-height: 1.8; }
.splash-copy li b { color: var(--text); }
.splash-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.splash-save { margin-top: 12px; }

/* ---------- night, modal, toasts */
#night { position: fixed; inset: 0; z-index: 90; background: radial-gradient(circle at 50% 60%, #2a1a0a, #050403 70%); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .5s; }
#night.show { opacity: 1; pointer-events: auto; }
.night-in { text-align: center; }
.night-in .fire { font-size: 64px; animation: flick .3s infinite alternate; }
@keyframes flick { to { transform: scale(1.08) rotate(2deg); filter: brightness(1.2); } }
.night-in h2 { font-family: Rye, serif; font-weight: 400; color: var(--gold); font-size: 44px; margin: 6px 0; }
.night-in p { color: #d8ccb0; max-width: 420px; margin: 0 auto; }
#modal { position: fixed; inset: 0; z-index: 110; background: rgba(5,6,4,.7); display: none; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(3px); }
#modal.show { display: flex; animation: fadein .2s; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; width: min(860px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-family: Rye, serif; font-weight: 400; color: var(--gold); font-size: 24px; }
.modal-body { padding: 16px 18px 22px; overflow-y: auto; }
.modal-body h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.cab-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cab-stats div { background: var(--panel2); border-radius: 10px; padding: 10px; }
.cab-stats label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: block; }
.cab-stats b { font-size: 18px; } .cab-stats b.gold { color: var(--gold); }
.cab-row { margin-top: 14px; }
.vial { display: flex; gap: 16px; align-items: center; background: var(--panel2); border-radius: 12px; padding: 12px; }
.vial h4 { margin: 0 0 4px; }
.vial p { margin: 0 0 4px; font-size: 14px; }
.vial-glass { width: 46px; height: 120px; border: 3px solid rgba(220,240,255,.5); border-top-width: 8px; border-radius: 6px 6px 20px 20px; position: relative; overflow: hidden; background: rgba(160,200,220,.08); }
.vial-water { position: absolute; inset: 20% 0 0 0; background: rgba(140,190,220,.15); }
.vial-gold { position: absolute; left: 0; right: 0; bottom: 0; background: repeating-radial-gradient(circle at 30% 30%, #ffe27a 0 2px, #d6a02a 2px 4px); box-shadow: 0 0 12px rgba(242,193,78,.6); }
.cab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.cab-item { background: radial-gradient(circle at 50% 35%, #2a2f22, #171a13); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.cab-item b { color: var(--gold); font-size: 15px; }
.cab-item.gem b { color: #9fc4ff; }
.cab-item span { font-size: 12px; font-weight: 600; }
.cab-item small { font-size: 10.5px; color: var(--muted); }
.cab-item .tier { position: absolute; top: 6px; left: 6px; font-style: normal; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; padding: 2px 6px; border-radius: 6px; background: #2a2f22; color: var(--muted); }
.cab-item.t-nugget { border-color: #8b6914; } .cab-item.t-nugget .tier { background: #8b6914; color: #fff3c4; }
.cab-item.t-slug { border-color: var(--gold); box-shadow: 0 0 18px rgba(242,193,78,.25); } .cab-item.t-slug .tier { background: var(--gold); color: #2a1c02; }
.cab-item.t-monster { border-color: #ff9f3f; box-shadow: 0 0 28px rgba(255,159,63,.4); } .cab-item.t-monster .tier { background: #ff9f3f; color: #2a1c02; }
.notes-intro { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.notes-intro svg { width: 90px; flex: 0 0 90px; }
.note { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.note h4 { margin: 0 0 4px; }
.note p { margin: 0; font-size: 14px; line-height: 1.55; color: #d9d3c2; }
.note.locked { opacity: .45; }
.howto { padding-left: 20px; line-height: 1.6; font-size: 14px; }
.howto li { margin-bottom: 8px; }
#toasts { position: fixed; bottom: 18px; right: 16px; z-index: 120; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
/* phones: toasts drop in from the top, over the HUD, not over Chip, the map or the camp buttons */
@media (max-width: 900px) { #toasts { top: max(10px, env(safe-area-inset-top)); bottom: auto; left: 12px; right: 12px; align-items: center; } #toasts .toast.out { transform: translateY(-20px); } }
.toast { background: #1f2419; border: 1px solid #4b5940; border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 10px; font-size: 13px; max-width: 340px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: slidein .3s ease; transition: opacity .5s, transform .5s; }
.toast.out { opacity: 0; transform: translateX(30px); }
.toast.bad { border-left-color: var(--red); }
.toast.gear { border-left-color: #7fd0f0; }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } }


#btn-music.off { opacity: .45; text-decoration: line-through; }
/* ---------- loot & yippee */
.res-chip, .rev-card { position: relative; }
.burst { position: absolute; top: -18px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-family: Rye, serif; font-size: 26px; color: #c0262d; background: #ffe066; padding: 18px 26px; white-space: nowrap; z-index: 2;
  clip-path: polygon(50% 0%, 61% 18%, 82% 6%, 78% 30%, 100% 34%, 84% 52%, 98% 72%, 74% 72%, 72% 96%, 54% 80%, 36% 100%, 30% 76%, 6% 82%, 16% 58%, 0% 40%, 20% 30%, 14% 8%, 38% 18%);
  text-shadow: 0 2px 0 #fff3b0; animation: burst .55s cubic-bezier(.2,1.6,.4,1); filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.rev-card .burst { top: -30px; }
@keyframes burst { from { transform: translateX(-50%) rotate(-30deg) scale(0); } to { transform: translateX(-50%) rotate(-8deg) scale(1); } }
.res-big .val { display: block; font-size: 18px; color: var(--gold2); font-weight: 800; text-shadow: none; }
.loot { position: fixed; left: 0; top: 0; width: 90px; height: 90px; z-index: 150; pointer-events: none; filter: drop-shadow(0 0 18px rgba(255,210,63,.8)); }
.loot-vial { width: 34px; height: 76px; margin: 7px auto; border: 3px solid rgba(220,240,255,.7); border-top-width: 7px; border-radius: 5px 5px 16px 16px; background: linear-gradient(transparent 40%, #ffd23f 40%); }
.plus { position: fixed; transform: translateX(-50%); z-index: 151; pointer-events: none; font-weight: 900; font-size: 18px; color: var(--gold2); text-shadow: 0 2px 8px rgba(0,0,0,.8); animation: plus 1.6s ease-out forwards; }
@keyframes plus { from { opacity: 0; margin-top: 10px; } 15% { opacity: 1; } to { opacity: 0; margin-top: -30px; } }
#btn-cabinet.bump { animation: bump .5s cubic-bezier(.2,1.8,.4,1); border-color: var(--gold); }
@keyframes bump { 40% { transform: scale(1.25) rotate(-4deg); } 100% { transform: scale(1); } }
.cab-item .v { font-style: normal; font-size: 12px; font-weight: 700; color: var(--gold2); }
.cab-item.gem .v { color: #b9d4ff; }
.price-note { margin-top: 14px; }

/* ---------- responsive */
@media (max-width: 1180px) {
  .hud { order: 3; flex-basis: 100%; gap: 22px; }
  .actions { margin-left: auto; }
  .stat { flex-direction: row; align-items: baseline; gap: 6px; }
}
@media (max-width: 900px) {
  html, body { overflow: auto; }
  #app { height: auto; min-height: 100%; }
  #mapwrap { grid-template-columns: 1fr; }
  #mapstage { height: 62vh; }
  #side { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  #topbar { gap: 10px; padding: 8px 12px; }
  .hud { gap: 12px; order: 3; flex-basis: 100%; }
  .actions { margin-left: auto; }
  .actions button { padding: 6px 9px; font-size: 12px; }
  .chip-fig { width: 80px; flex-basis: 80px; }
  .chip-bubble { font-size: 12.5px; margin-bottom: 80px; }
  .splash-in { flex-direction: column; text-align: center; gap: 10px; }
  .splash-chip { width: 190px; flex-basis: auto; }
  .splash-logo { margin: 0 auto; }
  .splash-copy ul { text-align: left; }
  .splash-btns { justify-content: center; }
  .cab-stats { grid-template-columns: 1fr 1fr; }
  .res-card { flex-direction: column; align-items: center; text-align: center; }
  .res-chip { width: 120px; flex-basis: auto; }
  .mg-help { max-width: calc(100% - 24px); font-size: 11.5px; }
  .mg-chip { width: 80px; }
  .mg-head { gap: 6px 10px; padding: 8px 12px; } .mg-head .sub { display: none; } .mg-head h2 { font-size: 18px; }
  .mg-stats { order: 3; flex-basis: 100%; justify-content: space-between; gap: 8px; } .mg-stats b { font-size: 15px; } .mg-stats label { font-size: 9px; }
  .mg-actions { margin-left: auto; }
  .mg-controls { gap: 10px; padding: 10px; }
  .det-ctl .meter, .gb { min-width: 120px; }
}

/* ---------- law, claims, licence */
.stat.lic { cursor: pointer; }
.stat.lic span { text-decoration: underline dotted rgba(255,255,255,.3); text-underline-offset: 3px; }
.stat.warn span { color: #ffb347; }
.stat.score.neg span { color: var(--red); }
.lg.lease { background: repeating-linear-gradient(90deg, #ff6b52 0 5px, transparent 5px 8px); }
.tenure { border-radius: 10px; padding: 9px 11px; margin: 0 0 10px; font-size: 12.5px; line-height: 1.45; }
.tenure b { display: block; font-size: 13px; margin-bottom: 2px; }
.tenure.bad { background: rgba(239,90,70,.12); border: 1px solid rgba(239,90,70,.45); color: #ffc9bf; }
.tenure.mine { background: rgba(255,214,64,.1); border: 1px solid rgba(255,214,64,.4); color: #ffe9a6; }
.tenure.pete { background: rgba(95,150,230,.12); border: 1px solid rgba(95,150,230,.45); color: #cfe0ff; }
.tenure a { color: var(--gold); font-weight: 700; }
button.peg { width: 100%; margin: 0 0 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: #2a2614; border-color: #6b5a1c; }
button.peg small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.fine { display: inline-block; margin-top: 8px; color: #ff8a76; font-weight: 800; font-size: 18px; }
.bad { color: var(--red); }
.licard { border-radius: 16px; padding: 14px 16px; background: linear-gradient(135deg, #f5ecd2, #e2cf9c); color: #2d2410; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: 440px; margin: 0 auto 14px; position: relative; overflow: hidden; }
.licard.expired::after { content: 'EXPIRED'; position: absolute; right: 14px; top: 46px; font-family: Rye, serif; font-size: 34px; color: rgba(200,30,30,.75); border: 4px solid rgba(200,30,30,.75); padding: 0 10px; border-radius: 8px; transform: rotate(-14deg); }
.lic-top { display: flex; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: #6b4f10; border-bottom: 2px solid #b8963f; padding-bottom: 6px; margin-bottom: 10px; }
.lic-mid { display: flex; gap: 14px; align-items: center; }
.lic-photo { width: 92px; height: 110px; background: #cbb57a; border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
.lic-photo svg { width: 150%; margin: -6px 0 0 -25%; }
.lic-mid label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #7a6a44; font-weight: 700; margin-top: 4px; }
.lic-mid b { font-size: 15px; } .lic-mid b.ok { color: #2f7d3a; } .lic-mid b.bad { color: #b3261e; }
.lic-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.modal-card .lic-btns + * { margin-top: 0; }

/* ---------- character scene card (daytime inspector) */
#modal.scene .modal-card { width: min(640px, 100%); flex-direction: row; align-items: stretch; overflow: hidden; }
.scene-who { flex: 0 0 210px; background: radial-gradient(circle at 50% 80%, #3c4630, #1a1f15); display: flex; align-items: flex-end; justify-content: center; padding: 10px 0 0; }
.scene-who .who { width: 200px; }
#modal.scene.bad .scene-who { background: radial-gradient(circle at 50% 80%, #5a2a22, #1f1210); }
.scene-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.scene-name { font-family: Rye, serif; color: var(--gold); font-size: 22px; }
.scene-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.scene-text { font-size: 15px; line-height: 1.55; margin: 8px 0 12px; }
.scene-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
@media (max-width: 600px) { #modal.scene .modal-card { flex-direction: column; } .scene-who { flex: 0 0 auto; height: 190px; overflow: hidden; align-items: flex-start; } .scene-who .who { width: 170px; } }

/* ---------- camp */
.camp { position: fixed; inset: 0; z-index: 85; background: #050816; opacity: 0; transition: opacity .7s; display: flex; flex-direction: column; overflow: hidden; }
.camp.show { opacity: 1; } .camp.out { opacity: 0; pointer-events: none; }
.camp-top { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.camp { background: #0e0a07; }
.camp-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.camp-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.camp .tw { animation: twinkle 3.5s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .15; } }
.camp .shim { animation: shim 2.4s ease-in-out infinite; opacity: .5; }
@keyframes shim { 50% { opacity: .1; transform: translateX(14px); } }
.camp .glow { animation: glow 1.6s ease-in-out infinite alternate; }
@keyframes glow { to { opacity: .2; } }
.camp .lanterns { opacity: 0; transition: opacity 1.2s; }
.camp.jumpers .lanterns { opacity: 1; }
.camp .lamp { animation: lamp .5s ease-in-out infinite alternate; }
@keyframes lamp { to { opacity: .55; } }
.camp-title { position: relative; z-index: 4; text-align: center; padding: 16px 12px 0; font-family: Rye, serif; color: var(--gold); font-size: 26px; text-shadow: 0 3px 0 #3d2c08; }
.camp-title b { display: block; font-family: var(--font); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #ffb3a6; margin-top: 2px; text-shadow: none; }
.camp-stage { position: relative; z-index: 2; flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 0; min-height: 0; padding-bottom: 2.5%; }
.camp-chip, .camp-visitor .who { width: clamp(130px, 22vh, 240px); filter: drop-shadow(10px 0 18px rgba(255,120,30,.35)); }
.camp-chip { margin-right: -10px; transition: transform .3s; }
.camp-chip.mirror { transform: scaleX(-1); }
.camp-visitor { display: flex; align-items: flex-end; min-width: clamp(130px, 22vh, 240px); }
.camp-visitor .who { filter: drop-shadow(-10px 0 18px rgba(255,120,30,.35)); }
.camp-visitor.in .who { animation: walkin .9s cubic-bezier(.3,.8,.4,1) both; }
@keyframes walkin { from { transform: translateX(160px); opacity: 0; } }
.camp-fire { position: relative; width: clamp(130px, 20vh, 220px); margin: 0 4px; }
.fire-svg { width: 100%; display: block; position: relative; }
.fire-glow { position: absolute; left: 50%; top: 62%; width: 340%; aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255,150,50,.38), rgba(255,110,30,.12) 35%, transparent 65%); animation: glow 1.3s ease-in-out infinite alternate; pointer-events: none; }
.fire-svg .fl { transform-origin: 100px 150px; transform-box: view-box; }
.fire-svg .f1 { animation: fl1 .7s ease-in-out infinite alternate; }
.fire-svg .f2 { animation: fl2 .5s ease-in-out infinite alternate; }
.fire-svg .f3 { animation: fl1 .4s ease-in-out infinite alternate-reverse; }
@keyframes fl1 { from { transform: scale(1, 1) skewX(-3deg); } to { transform: scale(.94, 1.12) skewX(4deg); } }
@keyframes fl2 { from { transform: scale(1.04, .94) skewX(3deg); } to { transform: scale(.96, 1.1) skewX(-4deg); } }
.fire-svg .steam { animation: steam 2.4s ease-in-out infinite; }
@keyframes steam { 0% { opacity: 0; transform: translateY(4px); } 50% { opacity: .55; } 100% { opacity: 0; transform: translateY(-10px); } }
.camp-found { position: absolute; left: 50%; bottom: 55%; transform: translateX(-50%); filter: drop-shadow(0 0 24px rgba(255,210,63,.9)); animation: found 3.2s ease both; z-index: 5; }
@keyframes found { 0% { opacity: 0; transform: translate(-50%, 40px) scale(.4); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 80% { opacity: 1; transform: translate(-50%, -10px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -40px) scale(.8); } }
.camp-dialog { position: relative; z-index: 4; margin: 0 auto 16px; width: min(760px, calc(100% - 24px)); background: rgba(16,14,10,.9); border: 1px solid #4a3a22; border-radius: 16px; padding: 14px 18px 16px; box-shadow: 0 -10px 40px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,200,120,.08); backdrop-filter: blur(4px); }
.camp-dialog.pop { animation: fadein .3s; }
.camp-dialog.hide { display: none; }
.cd-name { font-family: Rye, serif; color: var(--gold); font-size: 20px; }
.cd-sub { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.cd-text { font-size: 15px; line-height: 1.55; margin: 8px 0 12px; }
.cd-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cd-btns button { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.cd-btns button small { font-weight: 500; font-size: 11px; opacity: .8; }
@media (max-width: 600px) {
  .camp-title { font-size: 20px; padding-top: 10px; }
  .camp-chip, .camp-visitor .who, .camp-visitor { width: 30vw; min-width: 0; }
  .camp-fire { width: 26vw; }
  .cd-text { font-size: 14px; } .cd-btns button { flex: 1 1 auto; }
}

/* ---------- cons mini game */
.cons { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(3,4,8,.55); animation: fadein .3s; }
.cons-card { background: rgba(18,16,12,.95); border: 1px solid #4a3a22; border-radius: 18px; padding: 14px; width: min(470px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 8px; position: relative; }
.cons-head { display: flex; align-items: center; gap: 12px; } .cons-head h3 { margin: 0; white-space: nowrap; }
.cons-time { flex: 1; height: 8px; background: #2a2418; border-radius: 4px; overflow: hidden; }
.cons-time i { display: block; height: 100%; background: linear-gradient(90deg, #ff7a1a, #ffd23f); }
.cons canvas { width: 100%; max-height: 56vh; aspect-ratio: 1; object-fit: contain; touch-action: none; cursor: grab; }
.cons-help { margin: 0; font-size: 12.5px; color: #cfc8b4; line-height: 1.45; }
.cons-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cons-got { font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.cons-res { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; background: rgba(10,9,6,.85); border-radius: 18px; font-size: 16px; animation: fadein .3s; text-align: center; padding: 20px; }
.cons-res b { font-size: 34px; color: var(--gold); font-family: Rye, serif; }

/* ---------- season end + honour board + save */
.season-top { display: grid; grid-template-columns: 140px 1fr 140px; align-items: end; gap: 10px; margin-bottom: 14px; }
.season-score { text-align: center; padding-bottom: 14px; }
.season-score label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.season-score b { display: block; font-family: Rye, serif; font-size: clamp(40px, 8vw, 64px); color: var(--gold); text-shadow: 0 4px 0 #6b4f10; line-height: 1.1; }
.submit-row { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.submit-row input { flex: 1 1 160px; min-width: 0; background: #0e100c; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; font-weight: 700; }
.season-next { text-align: center; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.board-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.board-head .who { width: 110px; flex: 0 0 110px; }
.board-head p { font-style: italic; color: #d9d2bd; line-height: 1.5; }
table.board { width: 100%; border-collapse: collapse; font-size: 14px; }
table.board th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.board td { padding: 8px; border-bottom: 1px solid #22271e; }
table.board td.rk { width: 38px; font-weight: 800; text-align: center; }
table.board td.nm { font-weight: 700; }
table.board td.sc { font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
table.board td.mut { color: var(--muted); font-size: 12px; }
table.board tr.me td { background: rgba(242,193,78,.12); }
.save-box { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.save-box.ok b { color: var(--green); }
.save-box .code { font-family: ui-monospace, Menlo, monospace; font-size: 26px; font-weight: 800; letter-spacing: .12em; color: var(--gold); margin: 6px 0 10px; }
.toast.save { border-left-color: var(--green); }
@media (max-width: 600px) { .season-top { grid-template-columns: 80px 1fr 80px; } .board-head .who { width: 80px; flex-basis: 80px; } }

/* ---- menu, daily dig, regions, badges, walkthrough */
.brand { cursor: pointer; }
.splash-btns .daily { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; border-color: #4a7a9a; background: #16222a; }
.splash-btns .daily small { font-size: 11px; font-weight: 600; color: #9fd3f0; margin-top: 3px; }
body.daily #topbar { box-shadow: inset 0 -3px 0 #3f8fc0; }
.lidar-tag b { color: #9fd3f0; }
.regions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; margin-top: 10px; }
.region { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; text-align: left; }
.region b { font-size: 15px; color: var(--gold2); }
.region small { font-weight: 500; font-size: 12px; line-height: 1.45; color: #cfc8b4; }
.region:hover:not(:disabled) { border-color: var(--gold); }
.toast.badge { border-left-color: #c07cf0; }
.toast .bdg-i { font-size: 18px; vertical-align: -3px; }
.toast small { color: var(--muted); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bdg { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; display: flex; flex-direction: column; gap: 3px; opacity: .55; }
.bdg.on { opacity: 1; border-color: #6b5520; background: linear-gradient(180deg, #2a2412, #1c2019); }
.bdg .bdg-i { font-size: 30px; line-height: 1.2; }
.bdg b { font-size: 13px; } .bdg small { font-size: 11px; color: var(--muted); line-height: 1.4; } .bdg em { font-size: 10px; color: var(--gold); font-style: normal; }
.earned { margin: 12px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.earned label { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); width: 100%; }
.earned span { background: #2a2412; border: 1px solid #6b5520; border-radius: 99px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.board-day { margin: 0 0 8px; }
#tutbar { position: absolute; left: 50%; top: 46px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px; background: rgba(20,16,6,.92); border: 1px solid #a97a17; border-radius: 99px; padding: 5px 6px 5px 14px; font-size: 12px; white-space: nowrap; max-width: calc(100% - 20px); box-shadow: 0 6px 20px rgba(0,0,0,.5); }
#tutbar span { overflow: hidden; text-overflow: ellipsis; } #tutbar b { color: var(--gold2); }
#tutbar button { padding: 4px 10px; font-size: 11px; border-radius: 99px; }
#tutbar { pointer-events: none; } #tutbar button { pointer-events: auto; } /* taps on the bar reach the map, except Skip */
.tut-pulse { animation: tutpulse 1s ease-in-out infinite; border-color: var(--gold) !important; }
@keyframes tutpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,214,64,.7); } 50% { box-shadow: 0 0 0 8px rgba(255,214,64,0); } }
@media (max-width: 600px) { .regions { grid-template-columns: 1fr; } #tutbar { font-size: 11px; top: 40px; } }
/* phones: blur over an animated scene is expensive, a solid panel looks the same */
@media (max-width: 900px) { .camp-dialog { backdrop-filter: none; background: rgba(16,14,10,.95); } }
.about ul { padding-left: 18px; margin: 10px 0 0; }
.about li { margin-bottom: 10px; font-size: 14px; line-height: 1.55; color: #d9d3c2; }
.about a, .splash-legal a, .about-link { color: var(--gold2); }
.splash-legal { margin-top: 14px; opacity: .8; }
.real-thing { text-align: center; margin: 14px 0 0; } .real-thing a { color: var(--gold2); font-weight: 700; }
/* ---- loading a goldfield */
#loading { position: fixed; inset: 0; z-index: 95; background: radial-gradient(circle at 50% 40%, #1d2216, #0b0d09 70%); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .35s; }
#loading.show { opacity: 1; pointer-events: auto; transition: none; }
.loading-in { text-align: center; max-width: 440px; }
.loading-chip { width: 150px; margin: 0 auto 6px; animation: bob 1.6s ease-in-out infinite; }
.loading-in h2 { font-family: Rye, serif; color: var(--gold); font-weight: 400; margin: 6px 0; font-size: 24px; }
.loading-in p { margin: 6px 0; }
.dots i { font-style: normal; animation: dot 1.2s infinite; } .dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.streak { color: #ffb257; font-weight: 800; }
.splash-btns .daily .streak { font-size: 13px; margin-left: 4px; }
.share-row { text-align: center; margin: 10px 0 4px; }
.share-row button { border-color: #4a7a9a; background: #16222a; }
.daily-next { text-align: center; font-size: 14px; margin: 0 0 6px; }
.daily-next b { color: var(--gold2); }
/* ---- free account to post a score */
.join { background: var(--panel2); border: 1px solid #6b5520; border-radius: 12px; padding: 14px 16px; margin: 12px 0; text-align: center; }
.join h4 { margin: 0 0 4px; color: var(--gold2); font-size: 16px; }
.join p { margin: 4px 0; }
.join-grid { display: grid; gap: 8px; max-width: 360px; margin: 10px auto; }
.join-grid input, .submit-row input { background: #0e100d; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; }
.join a { color: var(--gold2); }
.join-msg { min-height: 1.2em; color: #ffb3a6; }
.center { text-align: center; }
button.danger { border-color: #8a3a30; color: #ffb3a6; }
/* ---- notches and home bars (phones, and the iOS/Android game apps) */
#topbar, .mg-head { padding-top: max(10px, env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.mg-controls { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
#splash { padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.camp { padding-top: env(safe-area-inset-top); }
.camp-dialog { margin-bottom: max(16px, env(safe-area-inset-bottom)); }
#side { padding-bottom: env(safe-area-inset-bottom); }
#modal { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
/* tall splash on short screens: start at the top (below the notch) instead of spilling off it */
#splash { align-items: flex-start; }
#splash .splash-in { margin: auto 0; }
/* ---- phones: Pan / Detect docked to the bottom of the screen when a spot is picked */
#quickbar { display: none; }
@media (max-width: 900px) {
  #quickbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
    padding: 10px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: rgba(12,14,10,.97); border-top: 1px solid #6b5520; box-shadow: 0 -10px 30px rgba(0,0,0,.5);
    transform: translateY(110%); transition: transform .22s ease; }
  #quickbar.show { transform: none; }
  .qb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .qb-info b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .qb-info small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .qb-warn { font-size: 11px; font-weight: 700; color: #ffb3a6; } .qb-ok { font-size: 11px; font-weight: 700; color: var(--gold2); }
  .qb-btns { display: flex; gap: 6px; align-items: center; }
  .qb-btns .primary { padding: 12px 16px; font-size: 15px; border-radius: 12px; }
  .qb-btns .ghost { padding: 8px 9px; }
  body:has(#quickbar.show) #side { padding-bottom: 96px; }
}
@media (max-width: 420px) { .qb-btns .primary { padding: 12px 12px; font-size: 14px; } .qb-btns #qb-more { display: none; } }
/* ---- delete account: full warning */
.del-warn ul { padding-left: 20px; margin: 8px 0; } .del-warn li { margin: 6px 0; line-height: 1.5; }
.del-big { font-size: 16px; font-weight: 800; color: #ffb3a6; margin: 6px 0; }
.del-keep { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
button.danger:not(:disabled) { background: #5a1f19; color: #fff; }
/* ---- honour board: report / block */
.board td.fl { width: 30px; text-align: right; }
.board .flag { padding: 2px 7px; font-size: 13px; color: var(--muted); border-color: transparent; }
.board .flag:hover { color: #ffb3a6; }
.report .seg { margin: 6px 0 10px; } .report .chk { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.rep-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
