/* Jonesy: 16-bit pixel look. Colours come from the board art (tools/pix/draw5.py). */
@font-face { font-family: "Press Start 2P"; src: url(fonts/press-start-2p.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "VT323"; src: url(fonts/vt323.woff2) format("woff2"); font-display: swap; }
:root {
  --ink: #1d1a17; --hud0: #1f1c19; --hud1: #2c2823; --hud2: #3a342d; --hud3: #544a3f; --hud4: #6e6253;
  --cream: #f3e8c6; --cream2: #e9dfc6; --paper: #ebdcb0; --paper0: #cbb88a;
  --amber: #f0cf86; --amber1: #d9a648; --amber0: #a67a2e; --hi: #fff4cf;
  --red: #b5452f; --red0: #7a2a20; --green: #679a48; --green0: #3c5b2b; --green1: #86b860;
  --teal: #45958c; --teal0: #2f6b66; --lcd: #a9b48f; --lcd0: #5d6a4e; --mute: #b3a68e; --sky: #7ec8e3;
  --pix: "Press Start 2P", ui-monospace, monospace; --body: "VT323", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--hud1); color: var(--cream2); font: 21px/1.15 var(--body); -webkit-tap-highlight-color: transparent; }
body { overflow-x: hidden; background: var(--hud1) repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 2px, transparent 2px 4px); }
#app { min-height: 100%; max-width: 560px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.pix { font-family: var(--pix); letter-spacing: 0; line-height: 1.35; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }
img { image-rendering: pixelated; }
button { font-family: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.screen { flex: 1; display: flex; flex-direction: column; gap: 16px; animation: in .2s steps(4); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- pixel kit ---------- */
.panel, .seat, .login, .level, .sheet.info .kv { background: var(--hud2); box-shadow: inset 2px 2px 0 var(--hud4), inset -2px -2px 0 var(--hud0), 0 0 0 2px var(--ink), 4px 4px 0 2px rgba(0,0,0,.35); }
.pbtn, .btn { appearance: none; border: 0; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center;
  font: 12px/1.3 var(--pix); color: var(--ink); background: var(--amber); padding: 12px 14px; min-height: 48px;
  box-shadow: 0 0 0 2px var(--ink), inset 3px 3px 0 var(--hi), inset -3px -4px 0 var(--amber0), 0 4px 0 2px var(--ink); transform: translateY(0); transition: transform .05s, box-shadow .05s; margin-bottom: 4px; }
.pbtn:active:not([disabled]), .btn:active:not([disabled]), .pbtn.press { transform: translateY(4px); box-shadow: 0 0 0 2px var(--ink), inset 3px 3px 0 var(--amber0), inset -3px -3px 0 var(--hi), 0 0 0 2px var(--ink); }
.pbtn small, .btn small { font: 18px/1 var(--body); opacity: .85; }
.pbtn[disabled], .btn[disabled] { filter: grayscale(.8) brightness(.7); cursor: not-allowed; }
.pbtn.wide, .btn { width: 100%; }
.pbtn.small { padding: 6px 8px; min-height: 34px; font-size: 9px; box-shadow: 0 0 0 2px var(--ink), inset 2px 2px 0 var(--hi), inset -2px -3px 0 var(--amber0), 0 3px 0 2px var(--ink); }
.pbtn.green { background: var(--green); color: var(--cream); box-shadow: 0 0 0 2px var(--ink), inset 3px 3px 0 var(--green1), inset -3px -4px 0 var(--green0), 0 4px 0 2px var(--ink); }
.pbtn.green small { color: var(--amber); opacity: 1; }
.pbtn.teal { background: var(--teal); color: var(--cream); box-shadow: 0 0 0 2px var(--ink), inset 3px 3px 0 #6fc0b5, inset -3px -4px 0 var(--teal0), 0 4px 0 2px var(--ink); }
.pbtn.red { background: var(--red); color: var(--cream); box-shadow: 0 0 0 2px var(--ink), inset 3px 3px 0 #d8735a, inset -3px -4px 0 var(--red0), 0 4px 0 2px var(--ink); }
.pbtn.grey, .btn.ghost { background: var(--hud3); color: var(--cream2); box-shadow: 0 0 0 2px var(--ink), inset 3px 3px 0 var(--hud4), inset -3px -4px 0 var(--hud0), 0 4px 0 2px var(--ink); }
.btn.google { background: var(--cream); flex-direction: row; gap: 10px; }
.btn.google .g { font: 16px var(--pix); color: #3c6f86; }
.ibtn { appearance: none; border: 0; background: var(--hud3); min-width: 40px; min-height: 40px; display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 2px var(--ink), inset 2px 2px 0 var(--hud4), inset -2px -2px 0 var(--hud0); }
.ibtn:active { transform: translateY(2px); }
.ico { display: inline-grid; place-items: center; line-height: 0; flex: none; }
.ibtn .ico svg rect[fill="#1d1a17"] { fill: var(--cream2); }
.shake { animation: shake .3s steps(6); }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
#toast { position: fixed; z-index: 90; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--amber); padding: 10px 16px; font: 22px var(--body); max-width: 90vw; box-shadow: 0 0 0 2px var(--amber), 4px 4px 0 2px rgba(0,0,0,.5); text-align: center; }
.floater { position: fixed; z-index: 95; transform: translate(-50%, -100%); font: 24px var(--body); color: #ff9b85; text-shadow: 2px 2px 0 var(--ink), -1px -1px 0 var(--ink); pointer-events: none; white-space: nowrap; animation: floatup 1.2s steps(12) forwards; }
.floater.up { color: var(--green1); }
@keyframes floatup { from { opacity: 1; margin-top: 0; } 70% { opacity: 1; } to { opacity: 0; margin-top: -48px; } }

/* ---------- menu screens ---------- */
.splash { justify-content: center; text-align: center; gap: 18px; }
.splash .sky { box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--amber0), 6px 6px 0 6px rgba(0,0,0,.4); overflow: hidden; aspect-ratio: 320 / 220; background: var(--green); }
.splash .sky img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.logo { font-family: var(--pix); font-size: clamp(36px, 12vw, 58px); line-height: 1.1; color: var(--amber); text-shadow: 4px 4px 0 var(--red), 8px 8px 0 var(--ink); margin: 6px 0 0; letter-spacing: 2px; }
.tag { color: var(--mute); margin: 6px 0 0; font-size: 22px; }
.blink { animation: blink 1.2s steps(2) infinite; color: var(--hud4); font: 9px var(--pix); }
@keyframes blink { 50% { opacity: .2; } }
.authbox { display: grid; gap: 14px; text-align: left; }
.login { display: grid; gap: 10px; padding: 16px; }
.login h2 { font: 12px var(--pix); color: var(--amber); }
input { font: 22px var(--body); padding: 10px 12px; border: 0; background: var(--hud0); color: var(--cream); min-height: 48px; width: 100%; box-shadow: inset 2px 2px 0 var(--ink), inset -2px -2px 0 var(--hud3); border-radius: 0; }
input::placeholder { color: var(--hud4); }
textarea { font: 22px var(--body); padding: 10px 12px; border: 0; background: var(--hud0); color: var(--cream); width: 100%; min-height: 160px; resize: vertical; box-shadow: inset 2px 2px 0 var(--ink), inset -2px -2px 0 var(--hud3); border-radius: 0; }
textarea::placeholder { color: var(--hud4); }
.show { color: var(--mute); display: flex; align-items: center; gap: 8px; }
.show input { width: 20px; min-height: 20px; height: 20px; accent-color: var(--amber); }
.err { color: #ff9b85; margin: 0; } .err:empty { display: none; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.link { appearance: none; background: none; border: 0; color: var(--amber); font: 21px var(--body); padding: 6px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; min-height: 40px; }
.center { text-align: center; justify-self: center; }
.or { display: flex; align-items: center; gap: 10px; color: var(--hud4); font: 10px var(--pix); }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--hud3); }
.signed { color: var(--mute); text-align: center; } .signed b { color: var(--amber); }
.rooms { display: grid; gap: 10px; }
.btn.room { flex-direction: row; justify-content: space-between; text-align: left; }
.room-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.top { display: flex; align-items: center; gap: 10px; }
.back { appearance: none; background: none; border: 0; color: var(--mute); font: 22px var(--body); padding: 8px 4px; min-height: 44px; cursor: pointer; }
.step { font: 9px var(--pix); color: var(--hud4); margin-left: auto; }
.title { font: 14px/1.4 var(--pix); color: var(--amber); }
.sub { color: var(--mute); margin: 4px 0 0; }
.hint { color: var(--mute); font-size: 19px; line-height: 1.15; }
label.lbl { font: 9px var(--pix); color: var(--amber1); }
.level { overflow: hidden; }
.level .art { aspect-ratio: 320 / 200; background: var(--green); box-shadow: inset 0 -2px 0 var(--ink); }
.level .art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.level .body { padding: 14px; display: grid; gap: 10px; }
.level h2 { font: 16px var(--pix); color: var(--amber); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { font: 8px var(--pix); background: var(--green); color: var(--cream); padding: 5px 7px; box-shadow: 0 0 0 2px var(--ink); }
.level p { margin: 0; line-height: 1.1; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 19px var(--body); background: var(--hud1); color: var(--mute); padding: 2px 8px; box-shadow: 0 0 0 2px var(--ink); }
.seat { padding: 14px; display: grid; gap: 10px; }
.seat.empty { opacity: .6; }
.seat h3 { font: 10px var(--pix); color: var(--amber); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; box-shadow: 0 0 0 2px var(--ink); background: var(--hud0); }
.seg button { appearance: none; border: 0; background: transparent; color: var(--mute); font: 10px var(--pix); padding: 12px 4px; min-height: 44px; cursor: pointer; box-shadow: inset -2px 0 0 var(--ink); }
.seg button:last-child { box-shadow: none; }
.seg button[aria-pressed="true"] { background: var(--amber); color: var(--ink); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -3px 0 var(--amber0); }
.seg button[disabled] { opacity: .35; }
.picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pick { appearance: none; border: 0; background: var(--hud1); padding: 4px 4px 6px; cursor: pointer; display: grid; gap: 4px; justify-items: center; color: var(--cream2); font: 9px var(--pix); box-shadow: 0 0 0 2px var(--ink); }
.pick img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.pick[aria-pressed="true"] { background: var(--amber); color: var(--ink); box-shadow: 0 0 0 2px var(--ink), 0 0 0 5px var(--amber); }
.pick[disabled] { opacity: .3; cursor: not-allowed; }
.perk { color: var(--mute); }
.presets .seg { grid-template-columns: repeat(4, 1fr); grid-auto-flow: row; }
.sticky { position: sticky; bottom: 0; padding: 12px 0 4px; background: linear-gradient(transparent, var(--hud1) 30%); }
.code-in { font: 30px var(--pix); text-align: center; letter-spacing: .3em; text-transform: uppercase; }
.bigcode { font-size: 38px; color: var(--amber); letter-spacing: .15em; text-shadow: 4px 4px 0 var(--red), 7px 7px 0 var(--ink); margin: 8px 0 12px; }
.lobby-seats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lobby-seats li { display: grid; grid-template-columns: 44px auto 1fr; gap: 10px; align-items: center; }
.lobby-seats img { width: 44px; height: 44px; object-fit: cover; box-shadow: 0 0 0 2px var(--ink); }
.lobby-seats b { font: 10px var(--pix); color: var(--amber); }
.lobby-seats span { color: var(--mute); text-align: right; }

/* ---------- game screen ---------- */
body.in-game #app { max-width: none; padding: 0; }
.gamehost { gap: 0; animation: none; }
.game { display: flex; flex-direction: column; min-height: 100dvh; }
.gtop { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 10px 10px; background: var(--hud1); box-shadow: 0 2px 0 var(--ink), 0 4px 0 var(--hud3); }
.wkbox { display: grid; gap: 2px; } .wkbox b { font-size: 12px; color: var(--amber); white-space: nowrap; }
.wkbox small { font: 7px var(--pix); color: var(--mute); white-space: nowrap; } .wkbox small.up { color: #ff9b85; } .wkbox small.down { color: var(--green1); }
.mag { display: flex; align-items: center; gap: 4px; font: 7px var(--pix); color: var(--amber); background: var(--ink); padding: 4px 6px; animation: blink 1.6s steps(2) infinite; }
.spacer { flex: 1; }
.tchip { display: flex; align-items: center; gap: 4px; background: var(--hud0); padding: 4px 7px; box-shadow: inset 2px 2px 0 var(--ink), inset -2px -2px 0 var(--hud3); font-size: 22px; white-space: nowrap; }
.tchip.lcd { background: var(--lcd); color: var(--ink); box-shadow: inset 2px 2px 0 var(--lcd0), inset -2px -2px 0 #c9d2b0; }
.gmain { display: flex; flex-direction: column; gap: 14px; padding: 12px 10px max(18px, env(safe-area-inset-bottom)); }
.board-wrap { width: 100%; max-width: 640px; margin: 0 auto; }
.board { position: relative; width: 100%; aspect-ratio: 320 / 336; overflow: hidden; background: var(--green); box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--hud3), 6px 6px 0 6px rgba(0,0,0,.4); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.board-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tile { position: absolute; width: 20%; height: 16.667%; background: transparent; border: 0; padding: 0; cursor: pointer; }
.tile::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.tile:hover::after { background: rgba(255, 244, 207, .12); }
.tile.pressed::after { animation: press .35s steps(3); }
@keyframes press { 0% { background: rgba(255, 244, 207, .55); } 100% { background: transparent; } }
.tile.here::after { box-shadow: inset 0 0 0 3px var(--amber); animation: here 1s steps(2) infinite; }
@keyframes here { 50% { box-shadow: inset 0 0 0 3px transparent; } }
.tile.dest::after { background: rgba(240, 207, 134, .25); box-shadow: inset 0 0 0 3px var(--amber); outline: 3px dashed var(--ink); outline-offset: -6px; }
.board.locked .tile { cursor: default; }
.tokens, .caps { position: absolute; inset: 0; pointer-events: none; }
.token { position: absolute; width: 7.5%; aspect-ratio: 1; transform: translate(-50%, -78%); transition-property: left, top; transition-timing-function: linear; transition-duration: .3s; z-index: 1; }
.token img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; border-radius: 50%; box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--c), 0 0 0 6px var(--ink); background: #000; display: block; }
.token::after { content: ""; position: absolute; left: 15%; right: 15%; bottom: -22%; height: 14%; background: rgba(0,0,0,.35); border-radius: 50%; }
.token.active { z-index: 3; }
.token.active img { animation: bob .8s steps(2) infinite; }
.token.moving { z-index: 4; }
.token.moving img { animation: hop .3s steps(2) infinite; }
.token.bus img { animation: none; }
.token.bus::before { content: ""; position: absolute; inset: -20% -40%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='16' height='8' fill='%231d1a17'/%3E%3Crect x='1' y='1' width='14' height='6' fill='%23f0cf86'/%3E%3Crect x='2' y='2' width='3' height='2' fill='%235590a8'/%3E%3Crect x='6' y='2' width='3' height='2' fill='%235590a8'/%3E%3Crect x='10' y='2' width='3' height='2' fill='%235590a8'/%3E%3Crect x='1' y='5' width='14' height='1' fill='%23b5452f'/%3E%3Crect x='2' y='8' width='3' height='2' fill='%231d1a17'/%3E%3Crect x='11' y='8' width='3' height='2' fill='%231d1a17'/%3E%3C/svg%3E") center / contain no-repeat; z-index: 2; image-rendering: pixelated; }
@keyframes bob { 50% { transform: translateY(-8%); } }
@keyframes hop { 50% { transform: translateY(-14%); } }
.cap { position: absolute; transform: translate(-50%, calc(-100% - 7vw)); max-width: 46%; background: var(--cream); color: var(--ink); font: 19px/1 var(--body); padding: 5px 8px; box-shadow: 0 0 0 2px var(--ink), 3px 3px 0 2px rgba(0,0,0,.35); z-index: 6; text-align: center; animation: pop .15s steps(3); }
@media (min-width: 900px) { .cap { transform: translate(-50%, calc(-100% - 46px)); } }
.cap::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -4px; border: 4px solid transparent; border-top-color: var(--ink); }
.cap.evt { background: var(--red); color: var(--cream); } .cap.act { background: var(--amber); }
@keyframes pop { from { transform: translate(-50%, calc(-100% - 7vw)) scale(.6); } }
.banner { position: absolute; left: 50%; top: 19%; transform: translate(-50%, 0); background: var(--ink); color: var(--amber); padding: 8px 10px; font: 20px/1 var(--body); width: max-content; max-width: 54%; text-align: center; z-index: 5; box-shadow: 0 0 0 2px var(--amber), 4px 4px 0 2px rgba(0,0,0,.45); display: grid; gap: 8px; justify-items: center; }
.banner.hurry { color: var(--cream); background: var(--red0); box-shadow: 0 0 0 2px var(--cream), 4px 4px 0 2px rgba(0,0,0,.45); animation: blink 1s steps(2) infinite; }
.banner .skip { appearance: none; border: 0; background: var(--amber); color: var(--ink); font-size: 9px; padding: 8px 10px; cursor: pointer; box-shadow: 0 0 0 2px var(--hi); pointer-events: auto; }
.hud { display: grid; gap: 14px; align-content: start; max-width: 640px; width: 100%; margin: 0 auto; grid-template-columns: 1fr 1fr; }
.hud .panel { padding: 10px 12px; }
.hud .who, .hud .goals, .hud .players, .hud .news { grid-column: 1 / -1; }
.who { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; }
.who img { width: 72px; height: 72px; object-fit: cover; background: #000; box-shadow: 0 0 0 2px var(--ink); border-bottom: 4px solid; }
.who h2 { font-size: 14px; color: var(--amber); margin-bottom: 6px; }
.who .l { font-size: 21px; line-height: 1.05; } .who .l.dim { color: var(--mute); }
.clockrow { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; }
.clock { width: 52px; height: 52px; border-radius: 50%; flex: none; background: conic-gradient(var(--red) 0 var(--a), var(--cream) 0); box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--hud4); position: relative; }
.clock i { position: absolute; inset: 40%; background: var(--ink); border-radius: 50%; }
.hl { display: grid; } .hl b { font-size: 22px; color: var(--amber); } .hl small { font: 7px var(--pix); color: var(--mute); margin-top: 4px; }
.clockrow .pbtn { margin-left: auto; width: auto; }
.lcdrow { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; background: var(--lcd) !important; color: var(--ink); box-shadow: inset 3px 3px 0 var(--lcd0), inset -3px -3px 0 #c9d2b0, 0 0 0 2px var(--ink) !important; }
.lcdrow span { font: 9px var(--pix); color: var(--lcd0); } .lcdrow b { font-size: 22px; }
.hud > .panel:nth-child(4) { grid-column: 1 / -1; }
.sbar { display: grid; grid-template-columns: 70px 1fr 44px; gap: 8px; align-items: center; margin: 5px 0; }
.sbar .bl { font: 8px var(--pix); color: var(--mute); } .sbar .bv { text-align: right; font-size: 21px; }
.segs { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; background: var(--ink); padding: 2px; }
.segs i { height: 10px; background: var(--hud1); }
.sbar.ok .segs i.on { background: var(--green1); } .sbar.warn .segs i.on { background: var(--red); } .sbar.sun .segs i.on { background: var(--amber); }
.sbar.warn .bl { color: #ff9b85; animation: blink 1s steps(2) infinite; }
.ph { display: flex; justify-content: space-between; margin-bottom: 8px; } .ph b { font-size: 10px; color: var(--amber); } .ph span { font-size: 8px; color: var(--mute); }
.g4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.gb { display: grid; gap: 3px; font: 7px var(--pix); color: var(--mute); }
.gt { display: block; height: 8px; background: var(--ink); padding: 2px; } .gt i { display: block; height: 100%; background: var(--amber); }
.gb.done { color: var(--green1); } .gb.done .gt i { background: var(--green1); }
.checks { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 2px; color: var(--mute); font-size: 20px; }
.checks li { display: grid; grid-template-columns: 18px 1fr; } .checks li.ok { color: var(--green1); }
.players { display: grid; gap: 6px; }
.pl { appearance: none; display: grid; grid-template-columns: 36px 1fr auto; grid-template-areas: "f n v" "f m m"; gap: 2px 10px; align-items: center; background: transparent; border: 0; padding: 6px; color: var(--cream2); cursor: pointer; text-align: left; }
.pl img { grid-area: f; width: 36px; height: 36px; object-fit: cover; border-bottom: 3px solid; box-shadow: 0 0 0 2px var(--ink); }
.pl .pn { grid-area: n; display: flex; gap: 8px; align-items: baseline; } .pl .pn b { font-weight: 400; font-size: 22px; } .pl small { font: 7px var(--pix); color: var(--mute); }
.pl .pv { grid-area: v; font-size: 21px; }
.pl .mini { grid-area: m; display: block; height: 6px; background: var(--ink); padding: 1px; } .pl .mini i { display: block; height: 100%; }
.pl.turn { background: rgba(240, 207, 134, .12); box-shadow: inset 0 0 0 2px var(--amber); }
.news b { font-size: 9px; color: var(--amber); }
.news ul { margin: 8px 0 0; padding: 0 0 0 4px; list-style: none; display: grid; gap: 2px; color: var(--cream2); font-size: 20px; }
.news li::before { content: "› "; color: var(--amber1); }
@media (min-width: 900px) {
  .gmain { flex-direction: row; align-items: flex-start; justify-content: center; gap: 24px; padding: 16px; }
  .board-wrap { width: min(calc((100dvh - 104px) * 320 / 336), calc(100vw - 440px)); max-width: none; margin: 0; }
  .hud { width: 370px; max-height: calc(100dvh - 92px); overflow: auto; margin: 0; padding: 4px 8px 8px 4px; }
}
@media (max-width: 420px) {
  .gtop { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .wkbox b { font-size: 10px; } .mag span { display: none; }
  .tchip { font-size: 20px; padding: 3px 5px; }
  .ibtn { min-width: 36px; min-height: 36px; }
}

/* ---------- popups and sheets ---------- */
#layer { position: relative; z-index: 50; }
.scrim { position: fixed; inset: 0; background: rgba(15, 12, 10, .55); display: flex; justify-content: center; padding: 14px; z-index: 50; animation: fade .12s steps(3); }
.scrim.bottom { align-items: flex-end; padding: 14px 0 0; }
.scrim.center { align-items: center; }
.scrim.solid { background: rgba(15, 12, 10, .95); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); } }
.sheet, .pop { background: var(--cream); color: var(--ink); width: 100%; max-width: 560px; animation: rise .15s steps(3); font-size: 21px;
  box-shadow: 0 0 0 3px var(--ink), inset 3px 3px 0 #fffaea, inset -3px -3px 0 var(--paper0), 8px 8px 0 3px rgba(0,0,0,.4); }
.sheet { max-height: 88dvh; overflow: auto; padding: 14px 14px max(18px, env(safe-area-inset-bottom)); display: grid; gap: 14px; align-content: start; }
.pop { padding: 0 14px 14px; display: grid; gap: 12px; max-width: 420px; max-height: 88dvh; overflow: auto; }
.pop p, .sheet p { margin: 0; line-height: 1.1; }
.popbar, .sbar-title { margin: 0 -14px; padding: 10px 14px; background: var(--red); color: var(--cream); display: flex; align-items: center; gap: 10px; box-shadow: inset 0 3px 0 #d8735a, inset 0 -3px 0 var(--red0), 0 3px 0 var(--ink); }
.popbar b, .sbar-title { font: 11px/1.4 var(--pix); }
.sheet .sbar-title { margin: -14px -14px 0; }
.k-good .popbar { background: var(--green); box-shadow: inset 0 3px 0 var(--green1), inset 0 -3px 0 var(--green0), 0 3px 0 var(--ink); }
.k-pay .popbar, .k-gag .popbar, .k-rent .popbar { background: var(--amber1); color: var(--ink); box-shadow: inset 0 3px 0 var(--amber), inset 0 -3px 0 var(--amber0), 0 3px 0 var(--ink); }
.k-info .popbar, .k-event .popbar { background: var(--teal); box-shadow: inset 0 3px 0 #6fc0b5, inset 0 -3px 0 var(--teal0), 0 3px 0 var(--ink); }
.k-magpie .popbar { background: var(--ink); color: var(--cream); }
.headline { font: 13px/1.5 var(--pix); text-align: center; border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); padding: 8px 0; }
.fx { font: 22px var(--body); background: var(--ink); color: var(--amber); padding: 4px 10px; justify-self: start; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .two .pbtn { width: 100%; }
.pop.sign { background: var(--ink); max-width: 340px; padding: 14px; justify-items: center; }
.pop.sign img { width: 100%; max-width: 300px; box-shadow: 0 0 0 2px #000; }
.masthead { margin: 0 -14px; padding: 10px 14px 8px; display: grid; justify-items: center; gap: 4px; border-bottom: 3px double var(--ink); background: var(--paper); }
.masthead b { font-size: 16px; } .masthead small { font: 7px var(--pix); color: var(--hud3); }
.wk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wk-list li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; border-bottom: 2px dashed var(--paper0); padding-bottom: 10px; }
.wk-list .wl { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.wk-list b { font-weight: 400; font-size: 23px; } .wk-list p { color: var(--hud3); margin-top: 2px; }
.wk-list em { font-style: normal; font-size: 21px; white-space: nowrap; background: var(--ink); color: var(--amber); padding: 0 6px; }
.wk-list .k-pay em { color: var(--green1); } .wk-list .k-bad em, .wk-list .k-rent em { color: #ff9b85; }
.pop.handover, .pop.win { justify-items: center; text-align: center; }
.pop.handover img, .pop.win > img { width: 128px; height: 128px; object-fit: cover; box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--amber1); margin-top: 6px; }
.pop.handover .popbar, .pop.win .masthead { width: calc(100% + 28px); justify-content: center; }
.pop.handover h2, .pop.win h2 { font-size: 16px; color: var(--red0); }
.rank { list-style: none; width: 100%; padding: 0; margin: 0; display: grid; gap: 8px; text-align: left; counter-reset: r; }
.rank li { display: grid; grid-template-columns: 26px 34px 1fr auto; gap: 8px; align-items: center; counter-increment: r; }
.rank li::before { content: counter(r); font: 11px var(--pix); color: var(--red0); }
.rank img { width: 34px; height: 34px; object-fit: cover; border-bottom: 3px solid; box-shadow: 0 0 0 2px var(--ink); }
.rank b { font-weight: 400; } .rank span { color: var(--hud3); }
.aih { display: flex; gap: 12px; align-items: center; }
.aih img { width: 60px; height: 60px; object-fit: cover; box-shadow: 0 0 0 2px var(--ink); border-bottom: 4px solid var(--amber1); }
.aih b { display: block; font-weight: 400; font-size: 24px; } .aih small { color: var(--hud3); font-size: 19px; }
.ailines { margin: 0; padding-left: 20px; display: grid; gap: 2px; }
.ailines li::marker { content: "› "; color: var(--red); } .ailines .k-bad, .ailines .k-hospital, .ailines .k-magpie { color: var(--red0); } .ailines .k-good { color: var(--green0); }
.travel .opts { display: grid; gap: 12px; }
.opt { appearance: none; border: 0; background: #fff8e0; color: var(--ink); padding: 10px 14px; text-align: left; cursor: pointer; min-height: 64px; display: flex; align-items: center; gap: 14px; font: 23px var(--body);
  box-shadow: 0 0 0 2px var(--ink), inset -3px -3px 0 var(--paper0), 0 4px 0 2px var(--ink); margin-bottom: 4px; }
.opt:active:not([disabled]) { transform: translateY(4px); box-shadow: 0 0 0 2px var(--ink), inset 3px 3px 0 var(--paper0); }
.opt span { display: grid; } .opt b { font-weight: 400; } .opt small { color: var(--hud3); font-size: 20px; }
.opt.park { background: #dff0c8; } .opt.park small { color: var(--green0); }
.opt[disabled] { opacity: .45; cursor: not-allowed; }
.phead { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.face { display: grid; gap: 0; }
.face img { width: 96px; height: 96px; object-fit: cover; background: var(--hud2); box-shadow: 0 0 0 3px var(--ink); }
.face b { font-size: 7px; background: var(--ink); color: var(--amber); text-align: center; padding: 5px 2px; margin-top: 3px; }
.ptitle h3 { font: 11px/1.4 var(--pix); background: var(--red); color: var(--cream); padding: 9px 10px; box-shadow: 0 0 0 3px var(--ink), inset 0 3px 0 #d8735a, inset 0 -3px 0 var(--red0); }
.say { position: relative; margin-top: 14px !important; background: #fff; padding: 8px 10px; min-height: 52px; font-size: 21px; line-height: 1.05; box-shadow: 0 0 0 2px var(--ink); }
.say::before { content: ""; position: absolute; left: -10px; top: 12px; border: 5px solid transparent; border-right: 6px solid var(--ink); }
.pstat { display: flex; gap: 14px; flex-wrap: wrap; font-size: 21px; background: var(--paper); padding: 6px 10px; box-shadow: inset 2px 2px 0 var(--paper0); }
.pstat span { display: flex; align-items: center; gap: 5px; }
.pbody { display: grid; gap: 16px; }
.psec h4 { margin: 0 0 8px; font-size: 9px; color: var(--red0); }
.psec h5 { margin: 10px 0 6px; font: 8px var(--pix); color: var(--hud3); }
.psec .hint { color: var(--hud3); margin-top: 6px; } .psec .hint.top { margin: 0 0 8px; }
.row-btn { appearance: none; border: 0; display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; text-align: left; background: #fff8e0; padding: 8px 12px; margin-bottom: 10px; cursor: pointer; color: var(--ink); min-height: 54px; font: 22px/1 var(--body);
  box-shadow: 0 0 0 2px var(--ink), inset -3px -3px 0 var(--paper0), 0 4px 0 2px var(--ink); }
.row-btn:hover:not([disabled]) { background: #fff1bf; }
.row-btn:active:not([disabled]) { transform: translateY(4px); box-shadow: 0 0 0 2px var(--ink), inset 3px 3px 0 var(--paper0); background: var(--amber); }
.row-btn .rl { display: grid; gap: 3px; } .row-btn b { font-weight: 400; } .row-btn small { color: var(--hud3); font-size: 19px; line-height: 1; }
.row-btn .rp { font: 11px var(--pix); white-space: nowrap; }
.row-btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: 0 0 0 2px var(--ink), inset -3px -3px 0 var(--paper0); margin-top: 0; }
.row-btn.passed { background: #dff0c8; opacity: 1; } .row-btn.passed .rp { color: var(--green0); }
.row-btn.ok { background: #f2f9e2; }
.prog { display: inline-grid; grid-auto-flow: column; gap: 2px; background: var(--ink); padding: 2px; }
.prog i { width: 7px; height: 12px; background: var(--paper); } .prog i.on { background: var(--teal); }
.workbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.workbar .pbtn { width: 100%; padding: 10px 4px; font-size: 10px; }
.stuff { margin: 6px 0 0; padding-left: 20px; } .stuff li.broken { color: var(--red0); }
.sheet.info .kv { list-style: none; margin: 0; padding: 10px 12px; display: grid; gap: 4px; color: var(--cream2); }
.kv li { display: grid; grid-template-columns: 120px 1fr; gap: 8px; } .kv span { color: var(--mute); } .kv b { font-weight: 400; }
.sheet.info .checks { color: var(--hud3); } .sheet.info .checks li.ok { color: var(--green0); }
.sheet .aih img { border-bottom-width: 4px; border-bottom-style: solid; }
.menu-btns { display: grid; gap: 12px; }
.help p { line-height: 1.1; } .help b { font-weight: 400; color: var(--red0); }

/* landscape phones: board on the left at full height, HUD scrolls on the right */
@media (orientation: landscape) and (max-height: 620px) {
  .gtop { padding-top: max(4px, env(safe-area-inset-top)); padding-bottom: 6px; }
  .gmain { flex-direction: row; align-items: flex-start; gap: 16px; padding: 8px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); }
  .board-wrap { width: calc((100dvh - 78px) * 320 / 336); flex: none; margin: 0; }
  .hud { flex: 1; max-width: none; max-height: calc(100dvh - 70px); overflow: auto; margin: 0; padding: 4px 8px 8px 4px; }
  .cap { transform: translate(-50%, calc(-100% - 4vh)); }
  .sheet { max-width: 640px; max-height: 94dvh; }
  .scrim.bottom { align-items: center; padding: 8px; }
  .pop { max-height: 94dvh; }
}
.banner { top: 50%; transform: translate(-50%, -50%); font-size: 16px; padding: 6px 8px; gap: 6px; max-width: 46%; opacity: .92; }
.banner .skip { padding: 6px 8px; font-size: 8px; }
@media (orientation: landscape) and (max-height: 620px) { .banner { font-size: 16px; } .token { width: 8.5%; } }
.banner { pointer-events: none; } .banner .skip { pointer-events: auto; }
/* the turn banner sits under the board (portrait) or atop the stats (sideways), never over the board */
.side > .banner { position: static; transform: none; width: auto; max-width: none; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; pointer-events: auto; }
.side > .banner > span { flex: 1; }
@media (orientation: landscape) and (max-height: 620px) { .side > .banner { margin: 0 0 8px; font-size: 16px; } }

/* ---------- inside a place: fixed header (owner, voice, stats), scrolling list, leave button ---------- */
.board-wrap, .side { position: relative; }
.pview { position: absolute; left: 0; right: 0; top: 0; height: calc(100dvh - 78px); z-index: 30; display: flex; flex-direction: column; background: var(--cream); color: var(--ink); font-size: 21px;
  box-shadow: 0 0 0 3px var(--ink), inset 3px 3px 0 #fffaea, inset -3px -3px 0 var(--paper0), 6px 6px 0 3px rgba(0,0,0,.4); animation: rise .15s steps(3); }
.pview[hidden] { display: none; }
body.in-place { overflow: hidden; }
.pv-head { flex: none; display: grid; gap: 8px; padding: 0 10px 8px; background: var(--paper); box-shadow: 0 3px 0 var(--ink); position: relative; z-index: 1; }
.pv-head .ptitle { margin: 0 -10px; padding: 8px 10px; background: var(--red); color: var(--cream); font-size: 11px; box-shadow: inset 0 3px 0 #d8735a, inset 0 -3px 0 var(--red0), 0 3px 0 var(--ink); }
.pview .phead { display: grid; grid-template-columns: 68px 1fr; gap: 12px; align-items: start; margin-top: 4px; }
.pview .face img { width: 68px; height: 68px; }
.pview .face b { font-size: 6px; padding: 4px 1px; }
.pview .say { margin: 0 !important; min-height: 68px; font-size: 20px; display: flex; align-items: center; }
.pview .say::before { top: 26px; }
.pview .pstat { gap: 10px; font-size: 20px; padding: 4px 8px; background: var(--cream); }
.pv-body { flex: 1; overflow: auto; padding: 12px 10px 4px; display: grid; gap: 16px; align-content: start; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.pv-foot { flex: none; padding: 10px 10px 6px; background: var(--paper); box-shadow: 0 -3px 0 var(--ink); }
.pv-foot .pbtn { margin-bottom: 4px; }
@media (min-width: 900px) { .pview { height: 100%; } }

/* settings */
.setrow { display: grid; gap: 6px; }
.settings .seg button { color: var(--hud3); }
.settings .seg { background: var(--paper); }
.settings label.lbl { color: var(--red0); }

/* ---------- sideways phones: the board fills the height, compact stats beside it ---------- */
@media (orientation: landscape) and (max-height: 620px) {
  .gtop { padding: max(4px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left)); }
  .gmain { flex-direction: row; align-items: stretch; gap: 12px; height: calc(100dvh - 52px); padding: 8px max(8px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); }
  .board-wrap { width: calc((100dvh - 70px) * 320 / 336); max-width: none; flex: none; margin: 0; }
  .side { flex: 1; min-width: 0; height: calc(100dvh - 70px); }
  .side > .pview { height: 100%; }
  .hud { height: 100%; max-height: none; overflow: auto; margin: 0; padding: 2px 6px 6px 2px; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 18px; }
  .hud .panel { padding: 7px 9px; }
  .hud .clockrow, .hud .lcdrow { display: none; }
  .hud .who { grid-column: 1; grid-template-columns: 44px 1fr; gap: 8px; }
  .who img { width: 44px; height: 44px; } .who h2 { font-size: 10px; margin-bottom: 2px; } .who .l { font-size: 18px; }
  .hud > .panel:nth-child(4) { grid-column: 2; grid-row: 1; }
  .sbar { grid-template-columns: 50px 1fr 34px; margin: 2px 0; } .sbar .bl { font-size: 6px; } .sbar .bv { font-size: 18px; } .segs i { height: 7px; }
  .hud .goals { grid-column: 1; } .hud .players { grid-column: 2; } .hud .news { grid-column: 1 / -1; }
  .checks { font-size: 17px; margin-top: 6px; } .g4 { gap: 5px 10px; }
  .pl { padding: 3px; grid-template-columns: 28px 1fr auto; } .pl img { width: 28px; height: 28px; } .pl .pn b { font-size: 19px; } .pl .pv { font-size: 18px; }
  .news ul { font-size: 17px; }
  .pview .phead { grid-template-columns: 54px 1fr; } .pview .face img { width: 54px; height: 54px; } .pview .say { min-height: 54px; font-size: 18px; }
  .pv-head { gap: 5px; } .pview .pstat { font-size: 18px; }
  .row-btn { min-height: 46px; font-size: 20px; padding: 6px 10px; } .row-btn small { font-size: 17px; }
  .token { width: 8%; }
  .scrim.bottom { align-items: center; padding: 8px; } .sheet { max-width: 640px; max-height: 94dvh; } .pop { max-height: 94dvh; }
}
@media (orientation: landscape) and (max-height: 620px) {
  .side > .pview { display: grid; grid-template-columns: minmax(170px, 34%) 1fr; grid-template-rows: 1fr auto; }
  .side > .pview .pv-head { grid-column: 1; grid-row: 1; align-content: start; box-shadow: 3px 0 0 var(--ink); overflow: auto; }
  .side > .pview .pv-foot { grid-column: 1; grid-row: 2; box-shadow: 3px 0 0 var(--ink); padding: 6px 8px 4px; }
  .side > .pview .pv-foot .pbtn { min-height: 38px; padding: 8px; }
  .side > .pview .pv-body { grid-column: 2; grid-row: 1 / span 2; padding-top: 10px; }
  .side > .pview .phead { grid-template-columns: 1fr; justify-items: center; gap: 8px; }
  .side > .pview .face img { width: 64px; height: 64px; }
  .side > .pview .say { min-height: 0; font-size: 17px; width: 100%; }
  .side > .pview .say::before { display: none; }
  .side > .pview .pstat { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; font-size: 17px; }
  .side > .pview .ptitle { font-size: 9px; }
}
/* author display rules beat the hidden attribute; keep hidden things hidden */
[hidden] { display: none !important; }
.tile.parktile { left: 22%; top: 19.5%; width: 56%; height: 61%; border-radius: 0; }
.tile.parktile:hover::after { background: rgba(255, 244, 207, .07); }

/* speech bubbles stay on the board */
.cap.below { transform: translate(-50%, 4.5vw); animation: none; }
.cap.below::after { bottom: auto; top: -8px; border-top-color: transparent; border-bottom-color: var(--ink); }
.cap.edge-l { transform: translate(-12%, calc(-100% - 7vw)); } .cap.edge-l::after { left: 12%; }
.cap.edge-r { transform: translate(-88%, calc(-100% - 7vw)); } .cap.edge-r::after { left: 88%; }
.cap.below.edge-l { transform: translate(-12%, 4.5vw); } .cap.below.edge-r { transform: translate(-88%, 4.5vw); }
@media (min-width: 900px) { .cap.below, .cap.below.edge-l, .cap.below.edge-r { transform: translate(-50%, 30px); } .cap.edge-l { transform: translate(-12%, calc(-100% - 46px)); } .cap.edge-r { transform: translate(-88%, calc(-100% - 46px)); } }
@media (orientation: landscape) and (max-height: 620px) { .cap { transform: translate(-50%, calc(-100% - 4vh)); } .cap.below { transform: translate(-50%, 3vh); } .cap.edge-l { transform: translate(-12%, calc(-100% - 4vh)); } .cap.edge-r { transform: translate(-88%, calc(-100% - 4vh)); } }

/* bus stops */
.stop { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; z-index: 0; }
.stop b { font: 5px var(--pix); background: var(--ink); color: var(--amber); padding: 1px 2px; margin-top: 1px; }
@media (min-width: 600px) { .stop b { font-size: 7px; } }

/* Quick Buck haggle rows */
.hrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; }
.hrow .hag { width: 74px; min-height: 54px; font-size: 8px; margin-top: 0; }
.hrow .hag.won { background: var(--green1); } .hrow .hag.lost { background: #e0a090; }

/* sideways phones: board takes the full height, top bar and stats share the right column */
@media (orientation: landscape) and (max-height: 620px) {
  .game { display: grid; grid-template-columns: calc((100dvh - 16px) * 320 / 336) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100dvh; min-height: 0; column-gap: 12px; padding: 8px max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left)); }
  .gmain { display: contents; }
  .board-wrap { grid-column: 1; grid-row: 1 / 3; width: 100%; height: auto; }
  .gtop { grid-column: 2; grid-row: 1; position: static; padding: 0 0 8px; box-shadow: none; background: transparent; }
  .side { grid-column: 2; grid-row: 2; height: auto; min-height: 0; display: flex; flex-direction: column; }
  .side > .hud { flex: 1; min-height: 0; height: auto; }
  .side > .pview { height: 100%; }
  .side > .pview .pv-head > .ptitle { order: 0; } .side > .pview .pv-head > .pstat { order: 1; } .side > .pview .pv-head > .phead { order: 2; }
  .side > .pview .pstat { grid-template-columns: 1fr 1fr 1fr; }
}
.pview .hint, .pview .hint.top { color: var(--hud3); }
.frow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; min-height: 44px; }
.frow b { font-weight: 400; font-size: 23px; color: var(--cream); }
.frow .pbtn { min-width: 80px; }
.btn.invite { background: var(--green); color: var(--cream); box-shadow: 0 0 0 2px var(--ink), inset 3px 3px 0 var(--green1), inset -3px -4px 0 var(--green0), 0 4px 0 2px var(--ink); animation: blink 1.4s steps(2) 3; }
/* room chat */
.chatbar { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(94vw, 520px); display: grid; gap: 8px; z-index: 85; pointer-events: none; }
.chatmsg { display: flex; align-items: center; gap: 8px; background: var(--cream); color: var(--ink); padding: 6px 10px 6px 6px; font: 21px/1.05 var(--body); box-shadow: 0 0 0 2px var(--ink), 4px 4px 0 2px rgba(0,0,0,.4); animation: rise .2s steps(3); transition: opacity .3s; }
.chatmsg img { width: 34px; height: 34px; object-fit: cover; border-bottom: 3px solid; box-shadow: 0 0 0 2px var(--ink); flex: none; }
.chatmsg b { font-weight: 400; color: var(--red0); }
.chatmsg.big span { font-size: 34px; } .chatmsg.out { opacity: 0; }
.chatcats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chatcats .pbtn { flex-direction: row; justify-content: flex-start; gap: 8px; font-size: 9px; text-align: left; min-height: 46px; }
.chatcats .em { font-size: 20px; }
.chatemoji { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.chatemoji .em { appearance: none; border: 0; background: var(--paper); font-size: 24px; min-height: 44px; cursor: pointer; box-shadow: 0 0 0 2px var(--ink); }
.chatemoji .em:active { background: var(--amber); } .chatemoji .em[disabled] { opacity: .4; }
.sheet.chat .pbtn.grey { color: var(--cream); }

/* Feedback inbox (Tim) and replies */
.fb-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-tab { appearance: none; border: 0; cursor: pointer; font: 20px var(--body); padding: 6px 12px; min-height: 40px; background: var(--hud2); color: var(--cream2); box-shadow: 0 0 0 2px var(--ink); }
.fb-tab.on { background: var(--amber); color: var(--ink); }
.seat.fb { padding: 10px; display: grid; gap: 10px; }
.fb-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; background: var(--hud2); padding: 4px 0 8px; border-bottom: 2px solid var(--ink); }
.fb-bulk .pbtn { margin-bottom: 0; }
.fb-count { flex: 1; color: var(--amber); font: 18px var(--body); }
.fb-check { display: inline-flex; align-items: center; gap: 6px; font: 20px var(--body); color: var(--cream2); cursor: pointer; min-height: 40px; }
.fb-check input { width: 22px; height: 22px; min-height: 22px; accent-color: var(--amber); margin: 0; }
.fb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fb-item { background: var(--hud0); box-shadow: 0 0 0 2px var(--ink); padding: 8px 10px; display: grid; gap: 8px; color: var(--cream2); }
.fb-item.unread { box-shadow: 0 0 0 2px var(--ink), inset 4px 0 0 var(--amber); }
.fb-item.unread .fb-top b { color: var(--amber); }
.fb-item.picked { background: var(--hud3); }
.fb-row { display: flex; gap: 8px; align-items: flex-start; }
.fb-sum { appearance: none; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; flex: 1; min-width: 0; padding: 0; display: grid; gap: 2px; font: 20px/1.1 var(--body); }
.fb-top { display: flex; gap: 8px; align-items: baseline; }
.fb-top b { font-weight: normal; color: var(--cream); }
.fb-top time { margin-left: auto; color: var(--mute); font-size: 18px; white-space: nowrap; }
.fb-tag { font: 9px var(--pix); font-style: normal; color: var(--green1); }
.fb-text { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.fb-item.open .fb-text { display: block; white-space: pre-wrap; }
.fb-detail { display: grid; gap: 8px; }
.fb-detail textarea { min-height: 100px; }
.fb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-actions .pbtn { margin-bottom: 0; }
.fb-reply { background: var(--hud2); padding: 6px 10px; box-shadow: inset 4px 0 0 var(--teal); }
.fb-reply small, .fb-idea { color: var(--mute); font: 18px var(--body); }
.fb-reply p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-list.mine .pbtn { justify-self: start; margin-bottom: 0; }

/* ---------- custom board (a town with no pre-rendered board art) ---------- */
.town-base { background: var(--grass, #6f9e57); overflow: hidden; }
.bb-road, .bb-park { position: absolute; border-radius: 50%; }
.bb-road { left: 19.5%; top: 17%; width: 61%; height: 66%; background: var(--road, #8d8478); }
.bb-park { left: 22%; top: 19.5%; width: 56%; height: 61%; background: var(--park, #4f7f43); }
.tile-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tile.named { display: flex; align-items: center; justify-content: center; }
.tile-name { position: relative; z-index: 1; max-width: 96%; padding: 2px 3px; background: rgba(21, 18, 15, .72); color: var(--cream); font-size: 6px; line-height: 1.25; text-align: center; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 600px) { .tile-name { font-size: 8px; } }
.tile.parktile .parkname { font-size: 8px; }
@media (min-width: 600px) { .tile.parktile .parkname { font-size: 11px; } }

/* ---------- level editor ---------- */
.editorhost { display: flex; flex-direction: column; }
.editor { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.etop { display: flex; gap: 8px; align-items: center; }
.etop .back { appearance: none; border: 0; background: var(--hud3); color: var(--cream); font: 9px var(--pix); padding: 10px; cursor: pointer; box-shadow: 0 0 0 2px var(--ink); flex: none; }
.etitle { flex: 1; min-width: 0; font: 11px var(--pix); background: var(--hud0); color: var(--amber); border: 0; padding: 12px 10px; box-shadow: inset 0 0 0 2px var(--ink); }
.esave { width: auto; flex: none; min-width: 76px; }
.esave.unsaved { background: var(--green1); }
.etabs { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 2px; }
.etab { appearance: none; border: 0; background: var(--hud3); color: var(--mute); font: 8px var(--pix); padding: 10px 9px; cursor: pointer; white-space: nowrap; box-shadow: 0 0 0 2px var(--ink); }
.etab.on { background: var(--amber); color: var(--ink); }
.epanel { flex: 1; }
.estack { display: grid; gap: 12px; }
.estack.tight { gap: 6px; }
.ecard { background: var(--hud2); padding: 12px; display: grid; gap: 10px; box-shadow: inset 2px 2px 0 var(--hud4), inset -2px -2px 0 var(--hud0), 0 0 0 2px var(--ink); }
.ecard > h3, .ecard > summary { font: 9px var(--pix); color: var(--amber); margin: 0; cursor: default; }
.ecard > summary { cursor: pointer; }
.efield { display: grid; gap: 4px; }
.efield > span { font: 7px var(--pix); color: var(--amber); letter-spacing: 0; }
.efield input, .efield textarea, .efield select, .ecell input, .ecell select, .erow select {
  width: 100%; font: 20px/1.1 var(--body); padding: 7px 8px; background: var(--cream); color: var(--ink);
  border: 0; box-shadow: 0 0 0 2px var(--ink); min-height: 40px;
}
.efield textarea { resize: vertical; }
.efield small, .ecard .hint small { font: 15px/1.1 var(--body); color: var(--mute); }
.egrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.egroup { display: grid; gap: 8px; }
.egroup > summary { font: 8px var(--pix); color: var(--cream2); cursor: pointer; }
.erow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.erow .btn, .ecard > .btn { width: auto; }
.artrow { align-items: flex-start; }
.ering { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ering li { display: flex; align-items: center; gap: 6px; background: var(--hud1); padding: 4px 6px; min-height: 38px; }
.ering b { font-weight: 400; font-size: 19px; }
.ering .btn { min-height: 30px; padding: 4px 9px; }
.egrow { flex: 1; }
.enum { font: 8px var(--pix); color: var(--hud4); min-width: 18px; }
.echecks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.echeck { display: flex; align-items: center; gap: 5px; font-size: 17px; background: var(--hud1); padding: 3px 5px; }
.echeck input { width: 18px; height: 18px; min-height: 0; accent-color: var(--amber1); }
.eswatches { display: flex; gap: 10px; flex-wrap: wrap; }
.eswatch { display: grid; gap: 3px; justify-items: center; font: 7px var(--pix); color: var(--mute); }
.eswatch input { width: 44px; height: 34px; min-height: 0; padding: 0; border: 0; background: none; }
.ethumb { width: 66px; height: 58px; object-fit: cover; image-rendering: pixelated; box-shadow: 0 0 0 2px var(--ink); flex: none; }
.ethumb.wide { width: 100%; height: auto; max-width: 340px; }
.ethumb.empty { display: flex; align-items: center; justify-content: center; background: var(--hud1); color: var(--mute); font: 6px var(--pix); text-align: center; padding: 3px; }
.eartgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.eartcell { display: grid; gap: 4px; justify-items: center; }
.eartcell img { width: 100%; aspect-ratio: 128 / 112; object-fit: cover; image-rendering: pixelated; box-shadow: 0 0 0 2px var(--ink); }
.eartcell .btn { font-size: 8px; min-height: 30px; padding: 4px 8px; }
.etable { display: grid; gap: 7px; }
.itemrow { display: grid; grid-template-columns: 58px 1fr 1fr auto; gap: 6px; align-items: end; background: var(--hud1); padding: 5px; }
.itemrow code { font: 6px var(--pix); color: var(--mute); overflow-wrap: anywhere; }
.ecell { display: grid; gap: 2px; }
.ecell > span { font: 6px var(--pix); color: var(--mute); }
.egaglist { display: grid; gap: 5px; max-height: 46vh; overflow: auto; padding-right: 3px; }
.gagrow { display: grid; grid-template-columns: 18px 1fr 88px auto; gap: 5px; align-items: center; }
.gagrow input { font: 17px var(--body); padding: 6px; border: 0; background: var(--cream); color: var(--ink); box-shadow: 0 0 0 2px var(--ink); min-width: 0; }
.eevent { background: var(--hud1); padding: 6px; display: grid; gap: 7px; }
.eevent > summary { font-size: 17px; cursor: pointer; }
.epreview { width: 100%; max-width: 340px; margin: 0 auto; }
.efoot { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--hud1); padding: 8px 0; z-index: 5; }
.efoot .btn { width: auto; flex: none; }
.efoot .btn:first-child { flex: 1; }
.efoot .hint { margin: 0; }
.eerrors { background: var(--red0); padding: 10px; display: grid; gap: 3px; box-shadow: 0 0 0 2px var(--ink); }
.eerrors p { margin: 0; }
.eerrors .warn { color: var(--amber); }
.good { color: var(--green1); }
.level-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.level-actions .btn { width: auto; flex: 1 1 42%; }
.level.create .body { gap: 12px; }
@media (max-width: 430px) { .egrid { grid-template-columns: 1fr; } .itemrow { grid-template-columns: 1fr 1fr; } .echecks { grid-template-columns: 1fr; } }

/* Friends: second line under a name (asked 2h ago, nudged you) */
.frow b small.fr-sub { display: block; font: 17px var(--body); color: var(--mute); }
/* lobby seat buttons (add mate, kick) and public-room phrase chat */
.seatbtns { display: flex; gap: 6px; }
.phrasechat { display: grid; gap: 10px; margin-top: 8px; }
.phrasechat .chatcats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.phrasechat .chatcats .pbtn { min-width: 0; font-size: 7px; padding-left: 8px; padding-right: 6px; gap: 6px; }
.phrasechat .chatemoji { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.phrasechat .chatemoji .em { min-width: 0; font-size: 20px; }
.phrasechat .chatcats .em { font-size: 16px; }
.menu-links { display: flex; justify-content: center; gap: 28px; }
.menu-links a.link { text-decoration: underline; }
.hint.small { font-size: 15px; opacity: .8; overflow-wrap: anywhere; }
.searching { display: flex; align-items: center; justify-content: center; gap: 6px; }
.searching .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); animation: blink 1s steps(2) infinite; }

/* watching a mate's turn: same shop screen, read-only */
.pview.spect .pv-body button { pointer-events: none; }
.pv-foot .watching { text-align: center; font-size: 10px; padding: 14px 6px 10px; color: var(--ink); opacity: .75; letter-spacing: 1px; }
.pview.spect .pv-body button.pressed { animation: spect-tap .9s steps(4); }
@keyframes spect-tap { 0%, 50% { outline: 3px solid var(--ink); outline-offset: -3px; filter: brightness(1.15); } 100% { outline: 0 solid transparent; } }
/* Quick Play: everyone else's week */
.pop.town { max-height: 86vh; overflow-y: auto; }
.town-sec { border-top: 3px solid var(--ink); padding-top: 8px; margin-top: 8px; display: grid; gap: 6px; }
.town-sec h4 { display: flex; align-items: center; gap: 8px; margin: 0; }
.town-sec h4 img { width: 28px; height: 28px; border: 2px solid; border-radius: 4px; image-rendering: pixelated; }
.pop.weekend .aih { margin-bottom: 6px; }
/* Newspapers spin in from nothing, like the old cartoon front pages, then land flat. */
.pop.paper { animation: paperspin 1s cubic-bezier(.15, .7, .25, 1) both; transform-origin: 50% 50%; }
@keyframes paperspin { 0% { transform: scale(.03) rotate(0deg); opacity: 0; } 6% { opacity: 1; } 82% { transform: scale(1.06) rotate(1080deg); } 100% { transform: scale(1) rotate(1080deg); } }
.pop.paper-art { gap: 10px; }
.pop.paper-art article { display: grid; gap: 6px; }
.pop.paper-art .headline { font-size: 14px; }
.pop.paper-art .col { column-count: 2; column-gap: 14px; column-rule: 1px solid var(--paper0); text-align: justify; hyphens: auto; font-size: 19px; line-height: 1.15; margin: 0; }
@media (max-width: 340px) { .pop.paper-art .col { column-count: 1; } }
.pop.paper-art .lede { text-align: center; font-size: 20px; line-height: 1.15; margin: 0; }

/* ---------- trophies: Tim's gold sculptures (img/trophies/<id>.webp) with a name plate ---------- */
.trophy { position: relative; display: grid; justify-items: center; align-content: end; gap: 0; width: 92px; min-height: 128px; padding: 4px 2px 0; background: none; border: 0; color: var(--cream); cursor: pointer; font: inherit; }
.trophy .t-art { display: grid; place-items: end center; height: 96px; width: 100%; }
.trophy .t-img { display: block; max-width: 88px; max-height: 96px; filter: drop-shadow(2px 3px 2px rgba(0,0,0,.45)); }
.trophy .t-emoji, .trophy .t-secret { font-size: 40px; line-height: 1; padding-bottom: 6px; }
.trophy .t-secret { font: 28px var(--pix); color: #2a2520; text-shadow: 0 0 0 #000; opacity: .7; }
.trophy .t-plate { margin-top: 4px; font: 7px/1.35 var(--pix); text-align: center; color: var(--ink); background: #f2c94c; box-shadow: 0 0 0 2px var(--ink); padding: 3px 4px; max-width: 90px; display: flex; align-items: center; gap: 4px; }
.trophy .t-face { width: 16px; height: 16px; flex: none; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 1px var(--ink); }
.trophy.tint-silver .t-img { filter: grayscale(1) brightness(1.15) contrast(1.05) drop-shadow(2px 3px 2px rgba(0,0,0,.45)); }
.trophy.tint-silver .t-plate { background: #cfd6dc; }
.trophy.tint-bronze .t-img { filter: sepia(.6) saturate(1.6) hue-rotate(-18deg) brightness(.78) drop-shadow(2px 3px 2px rgba(0,0,0,.45)); }
.trophy.tint-bronze .t-plate { background: #cd8b4e; }
.trophy.big { width: 170px; min-height: 200px; margin: 6px auto 0; }
.trophy.big .t-art { height: 170px; } .trophy.big .t-img { max-width: 170px; max-height: 170px; }
.trophy.big .t-emoji { font-size: 72px; } .trophy.big .t-plate { font-size: 9px; max-width: 170px; } .trophy.big .t-face { width: 22px; height: 22px; }
.trophy.locked .t-img, .trophy.locked .t-emoji { filter: brightness(0) opacity(.5); }
.trophy.locked .t-plate { background: #6f675c; color: #2a2520; } .trophy.locked .t-face { filter: grayscale(1) brightness(.5); }

/* ---------- profile ---------- */
.prof-head { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; }
.prof-head img { width: 84px; height: 84px; object-fit: cover; box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--amber1, #e9b44c); }
.prof-head h2 { font-size: 14px; margin: 0 0 6px; } .prof-head p { margin: 2px 0; }
.trophy-count { font-size: 9px; color: var(--amber, #f2c94c); margin-top: 6px !important; }
.cabinet { background: linear-gradient(#5b3a24, #3d2616); padding: 10px 10px 14px; box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 6px #7a5133, inset 0 0 0 9px var(--ink); display: grid; gap: 4px; }
.cab-top, .cork-top { text-align: center; font-size: 11px; color: #f2c94c; padding: 6px 0 8px; text-shadow: 2px 2px 0 var(--ink); }
.shelf { background: linear-gradient(rgba(190,230,255,.10), rgba(190,230,255,.04)); box-shadow: inset 0 0 0 2px rgba(190,230,255,.25); padding: 6px 4px 0; }
.shelf h4 { font-size: 7px; color: #e9d3b0; margin: 0 4px 2px; letter-spacing: 1px; }
.shelf-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 2px; padding-bottom: 6px; border-bottom: 8px solid #a8d8ee; box-shadow: 0 3px 0 var(--ink); }
.corkboard { margin-top: 14px; background: #b98a55; background-image: radial-gradient(#9d6f3d 1.5px, transparent 1.5px), radial-gradient(#cfa06a 1px, transparent 1px); background-size: 9px 9px, 13px 13px; padding: 10px; box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 7px #6b4423, inset 0 0 0 10px var(--ink); }
.cork-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 10px; padding: 6px; }
.note { position: relative; background: #fffbe8; color: var(--ink); padding: 14px 8px 8px; transform: rotate(var(--tilt, 0deg)); box-shadow: 3px 4px 0 rgba(0,0,0,.35); display: grid; gap: 4px; font-size: 17px; line-height: 1.1; }
.note .pin { position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #d93b3b; box-shadow: 0 0 0 2px var(--ink), inset -2px -2px 0 #8c1f1f; }
.note img { width: 34px; height: 34px; object-fit: cover; float: right; box-shadow: 0 0 0 2px var(--ink); }
.note b { font-size: 18px; } .note small { color: #5a4f45; font-size: 15px; } .note .when { font: 6px/1.4 var(--pix); color: #7a6a58; }
.trophy-sheet { justify-items: center; text-align: center; }

/* ---------- the Gazette awards in the final paper, and the badge popup ---------- */
.gazette { width: 100%; border-top: 3px double var(--ink); padding-top: 8px; display: grid; gap: 8px; text-align: left; }
.gazette .g-head { text-align: center; font-size: 9px; }
.cert { display: grid; grid-template-columns: 38px 1fr; gap: 8px; align-items: center; background: #fffbe8; padding: 6px; box-shadow: 0 0 0 2px var(--ink); }
.cert .c-face { width: 38px; height: 38px; object-fit: cover; box-shadow: 0 0 0 2px var(--ink); }
.cert .c-none { display: grid; place-items: center; font-size: 24px; background: var(--paper); }
.cert b { display: block; font-size: 18px; line-height: 1.1; } .cert small { color: #5a4f45; font-size: 15px; line-height: 1.1; }
.pop.badge-pop { justify-items: center; text-align: center; }
.pop.badge-pop .masthead { width: calc(100% + 28px); }
/* four to a shelf on a phone */
.shelf-row .trophy { width: 78px; min-height: 112px; } .shelf-row .trophy .t-art { height: 80px; } .shelf-row .trophy .t-img { max-width: 76px; max-height: 80px; } .shelf-row .trophy .t-emoji { font-size: 30px; } .shelf-row .trophy .t-plate { font-size: 6px; max-width: 76px; } .shelf-row .trophy .t-face { width: 12px; height: 12px; }
.note.empty { max-width: 260px; justify-self: center; text-align: center; }
