/*
 * Owo Street — interface.
 *
 * Game chrome, not a form. One chunky display face (Lilita One) for anything
 * you read at a glance; dark cards with cream square icon tiles; danfo gold
 * for whatever you can press; every target at least 44px. In a round the
 * phone keeps one slim bar at the top and leaves the street, the stick and
 * the USE button alone.
 */
@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/lilita-one-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/lilita-one-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --gold: #ffd21f;
  --gold-deep: #e09c00;
  --gold-shadow: #8a5f00;
  --ink: #15110b;
  --cream: #fff4dc;
  --tile: #fbe9c4;
  --muted: #b5a68c;
  --thief: #ff5a45;
  --police: #5aa0ff;
  --green: #44d07f;
  --card: #221b12;
  --card-2: #2c2317;
  --card-line: rgba(255, 228, 160, 0.13);
  --glass: rgba(20, 16, 11, 0.86);
  --glass-line: rgba(255, 228, 160, 0.16);
  --display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #0e0b07;
  color: var(--cream);
  font-family: var(--body);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.ic { width: 1.2em; height: 1.2em; flex: 0 0 auto; display: inline-block; vertical-align: -0.2em; }

/* the cream square icon tile: the menu's one recurring motif */
.tile {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--tile);
  color: var(--ink);
  box-shadow: inset 0 -3px 0 rgba(120, 80, 20, 0.22);
}
.tile .ic { width: 24px; height: 24px; }
.tile.thief { color: #c8321f; }
.tile.police { color: #2a64c8; }

/* ------------------------------------------------------------- game layer */

/* the backdrop while the title's city is built (or for good, without WebGL):
   a 4 KB blurred still of that city, under a dusk wash */
#game {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, rgba(14,11,7,0.15), rgba(14,11,7,0.55)), url(assets/backdrop.jpg) center / cover, #3a2c1c;
}
#canvas { display: block; width: 100%; height: 100%; transition: opacity 0.6s ease; }
body.city-wait #canvas { opacity: 0; }
#city-load {
  position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 5;
  pointer-events: none; opacity: 0; transition: opacity 0.4s ease;
}
body.city-wait #city-load { opacity: 1; }
#city-load span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transition: width 0.3s ease;
}

#webgl-fail {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 30px; text-align: center; font-weight: 700;
}

#hud {
  position: absolute; inset: 0;
  pointer-events: none;
  padding: calc(12px + var(--safe-top)) 12px 12px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
}

.hud-top { display: flex; gap: 8px; align-items: center; width: 100%; }

/* the one bar: clock · heat · money; the crew stash is the strip along its foot */
.hud-bar {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  min-height: 46px;
  padding: 6px 16px 9px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hb-clock {
  font-family: var(--display);
  font-size: 22px; line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  min-width: 46px;
}
.hb-clock.urgent { color: #ff6a52; animation: throb 0.9s ease-in-out infinite; }
@keyframes throb { 50% { transform: scale(1.1); } }
.hb-heat { display: inline-flex; gap: 1px; color: var(--gold); }
.hb-heat .ic { width: 16px; height: 16px; }
.hb-heat .off { color: rgba(255,244,220,0.22); }
.hb-heat.hot .ic:not(.off) { color: #ff5f49; filter: drop-shadow(0 0 4px rgba(255,80,50,0.8)); }
.hb-loot {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 17px; line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hb-loot .ic { width: 17px; height: 17px; margin-right: 3px; vertical-align: -3px; }
.hb-loot .carried { color: var(--gold); }
.hb-loot .banked { color: var(--green); }
.hb-loot .strikes { color: var(--thief); letter-spacing: 1px; font-size: 14px; }
.hb-loot .cop { color: #a9cbff; }
.hb-stash {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px; background: rgba(255,255,255,0.08);
}
.hb-stash span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transition: width 0.3s ease;
}
.hud-bar.ready .hb-stash span { background: var(--green); box-shadow: 0 0 10px var(--green); }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  color: var(--cream);
  border-radius: 14px;
  padding: 7px 14px;
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.4px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
#hud-role.thief { color: var(--thief); }
#hud-role.police { color: var(--police); }
#hud-code { color: var(--gold); letter-spacing: 2px; }
.btn-quit { pointer-events: auto; cursor: pointer; margin-left: auto; color: var(--muted); }
.btn-quit:hover { color: var(--cream); }

/* the guided next step (Lagos Life style): one short line, fades once read */
.step-chip {
  display: inline-flex; align-items: center; gap: 9px;
  max-width: min(440px, calc(100vw - 150px));
  padding: 5px 14px 5px 5px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: var(--ink);
  border-radius: 999px;
  font-family: var(--display);
  font-size: 16px; line-height: 1.1;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 0 var(--gold-shadow), 0 8px 18px rgba(0,0,0,0.35);
  transition: opacity 0.4s ease, transform 0.4s ease;
  animation: stepIn 0.35s cubic-bezier(.2,1.5,.4,1);
}
.step-chip.faded { opacity: 0; transform: translateY(-8px); }
.step-chip.alert { background: linear-gradient(180deg, #ff6a52, #d12d1a); color: #fff; box-shadow: 0 4px 0 #7a1608, 0 8px 18px rgba(0,0,0,0.35); }
.step-chip.alert .step-ic { color: #c8321f; }
.step-chip.safe { background: linear-gradient(180deg, #7cf0a8, #22b45c); color: #06301a; box-shadow: 0 4px 0 #136b35, 0 0 0 3px rgba(47,220,106,0.35), 0 8px 18px rgba(0,0,0,0.35); }
.step-chip.safe .step-ic { color: #1f8f4a; }
.step-chip.go { background: linear-gradient(180deg, #6ee39b, #2fa55a); box-shadow: 0 4px 0 #1b6a37, 0 8px 18px rgba(0,0,0,0.35); }
.step-ic {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--tile); color: var(--ink);
}
.step-ic .ic { width: 18px; height: 18px; }
#hud-step-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes stepIn { from { opacity: 0; transform: translateY(-10px) scale(0.9); } }

/* blending into a crowd: a quiet cue under the step, never a banner */
.cover-cue {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px 3px 9px;
  border-radius: 999px;
  background: rgba(16, 26, 28, 0.55);
  border: 1px solid rgba(170, 232, 220, 0.38);
  color: #d6f3ec;
  font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  animation: coverPulse 2.4s ease-in-out infinite;
}
.cover-cue::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: #8fe6d4; box-shadow: 0 0 8px #8fe6d4;
}
@keyframes coverPulse { 0%, 100% { opacity: 0.72; } 50% { opacity: 1; } }

/* behind the wheel: the vehicle's name (red when it is hot) and an EXIT */
.ride-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 12px;
  border-radius: 999px;
  background: rgba(24, 20, 10, 0.68);
  border: 1px solid rgba(240, 189, 18, 0.55);
  color: #fbe7a6;
  font: inherit; font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  pointer-events: auto; cursor: pointer;
}
.ride-chip b {
  padding: 3px 10px; border-radius: 999px;
  background: #f0bd12; color: #1b1406; letter-spacing: 1px;
}
.ride-chip.hot { border-color: rgba(255, 90, 60, 0.75); color: #ffc2b4; }
.ride-chip.hot span::before {
  content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%;
  background: #ff5a3c; box-shadow: 0 0 8px #ff5a3c; vertical-align: 1px;
  animation: coverPulse 1.2s ease-in-out infinite;
}

/* the feed: one or two lines that expire on their own, under the bar */
#feed {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 13px;
  max-width: min(440px, calc(100vw - 150px));
}
#feed div {
  background: var(--glass);
  border-left: 3px solid var(--gold);
  border-radius: 9px;
  padding: 5px 10px;
  font-weight: 650;
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  animation: slideIn 0.3s ease;
}
#feed div.old { opacity: 0; transition: opacity 0.5s; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-14px); } }

#minimap {
  position: absolute;
  right: 12px; top: calc(70px + var(--safe-top));
  width: 200px; height: 150px;
  background: rgba(20,16,11,0.92);
  border: 2px solid rgba(255,228,160,0.28);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
  pointer-events: auto; cursor: pointer;
}

/* details: crew stash, the long objective, quit. A column at desktop. */
.hud-panel {
  display: flex; flex-direction: column; gap: 8px;
  width: min(340px, 40vw);
}
#hud-progress {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  padding: 8px 12px 10px;
}
#hud-progress .label {
  display: flex; justify-content: space-between;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 6px;
}
#hud-progress .label b { color: var(--gold); font-family: var(--display); font-size: 14px; letter-spacing: 0.5px; font-weight: 400; }
.bar { height: 9px; background: rgba(255,255,255,0.1); border-radius: 999px; overflow: hidden; }
.bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  border-radius: 999px;
  transition: width 0.25s ease;
}
#hud-progress.ready .bar span { background: linear-gradient(90deg, #2fa55a, var(--green)); }
#hud-objective {
  font-size: 13px; font-weight: 650; line-height: 1.4;
  color: #e9dcc2;
  background: var(--glass);
  border-radius: 12px;
  padding: 8px 12px;
}
.btn-panel-quit { display: none; }

#power-slot {
  position: absolute;
  left: 12px; bottom: 12px;
  display: flex; align-items: center; gap: 11px;
  background: var(--glass);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 9px 15px 9px 9px;
  box-shadow: 0 0 26px rgba(255,210,31,0.3);
}
#power-slot.empty { border-color: rgba(255,255,255,0.12); box-shadow: none; opacity: 0.55; }
#power-icon { width: 42px; height: 42px; background: rgba(255,255,255,0.07); border-radius: 12px; }
.power-text { font-family: var(--display); font-size: 16px; letter-spacing: 0.3px; }
.power-key { font-size: 10px; color: var(--ink); background: var(--gold); border-radius: 5px; padding: 2px 6px; font-weight: 900; }

#banner {
  position: absolute; left: 50%; top: 30%;
  transform: translate(-50%, -50%);
  width: max-content; max-width: 92vw;
  font-family: var(--display);
  font-size: clamp(28px, 8vw, 54px);
  line-height: 1.05;
  letter-spacing: 1px;
  text-align: center;
  color: var(--gold);
  -webkit-text-stroke: 5px #15110b;
  paint-order: stroke fill;
  text-shadow: 0 6px 0 #15110b, 0 10px 26px rgba(0,0,0,0.6);
  pointer-events: none;
  animation: pop 0.3s cubic-bezier(.2,1.6,.4,1);
}
@keyframes pop { from { transform: translate(-50%,-50%) scale(0.7); opacity: 0; } }

/* --------------------------------------------------------------- touch */

#touch { position: absolute; inset: 0; pointer-events: none; }
#stick {
  position: absolute; left: 18px; bottom: calc(64px + var(--safe-bottom));
  width: 136px; height: 136px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,16,11,0.45), rgba(20,16,11,0.2));
  border: 2px solid rgba(255,228,160,0.3);
  pointer-events: auto;
  touch-action: none;
}
#stick-knob {
  position: absolute; left: 50%; top: 50%;
  width: 56px; height: 56px; margin: -31px 0 0 -28px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  box-shadow: 0 5px 0 var(--gold-shadow), 0 0 22px rgba(255,210,31,0.45);
}
/* USE carries the item it will spend; grey and quiet when there is none */
#touch-power {
  position: absolute; right: 20px; bottom: calc(80px + var(--safe-bottom));
  width: 96px; height: 96px;
  padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  border-radius: 50%;
  border: none;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px; letter-spacing: 1px;
  pointer-events: auto;
  touch-action: none;
  box-shadow: 0 7px 0 var(--gold-shadow), 0 0 28px rgba(255,210,31,0.45);
  transition: filter 0.2s, opacity 0.2s;
}
#use-icon { width: 52px; height: 52px; margin-top: -4px; }
#touch-power span { margin-top: -2px; }
#touch-power.empty {
  background: rgba(40,33,24,0.72);
  color: rgba(255,244,220,0.55);
  box-shadow: 0 5px 0 rgba(0,0,0,0.35);
  border: 2px solid rgba(255,228,160,0.18);
}
#touch-power.empty #use-icon { display: none; }
/* a crowd act (PICKPOCKET / QUESTION): the word is the button */
#touch-power.act #use-icon { display: none; }
#touch-power.act span { margin: 0; font-size: 12.5px; letter-spacing: 0.2px; }
#touch-power.empty span { margin: 0; font-size: 17px; }
/* swipe controls (public/controls.js): no stick, USE stays */
.swipe-mode #stick { display: none; }
body:not(.touch-ui) .touch-only { display: none; }
#touch-power:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--gold-shadow); }

/* ---------------------------------------------------------------- menus */

#ui {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background: radial-gradient(120% 90% at 50% 10%, rgba(10,8,5,0.2), rgba(8,6,4,0.8));
  transition: opacity 0.35s ease;
}
#ui.hidden { display: none; }
/* audit 11: the menu stays out of sight until the boot screen has gone,
   so the two titles never show at once mid-fade */
body.booting #ui { opacity: 0; pointer-events: none; }

.screen {
  position: relative;
  width: 100%; max-width: 460px;
  background: rgba(22, 17, 11, 0.94);
  border: 1px solid var(--glass-line);
  border-radius: 26px;
  padding: 16px 18px 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: rise 0.28s cubic-bezier(.2,.9,.3,1);
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

h1, h2, .big, .kicker, .field, .tile-btn b, .set-row b, .choice strong, .code, .badge, .tips .n, .hero-stats b {
  font-family: var(--display);
  font-weight: 400;
}

h1 {
  margin: 0;
  font-size: clamp(50px, 15vw, 68px);
  line-height: 0.9;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--gold);
  -webkit-text-stroke: 7px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink), 0 12px 24px rgba(0,0,0,0.55);
}
h1 span { color: #fff4dc; }
h2 { margin: 0; font-size: 26px; line-height: 1.05; letter-spacing: 0.3px; }

.badge {
  display: inline-block;
  margin-top: 12px;
  background: var(--ink);
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 6px 14px 5px;
  border-radius: 999px;
  border: 2px solid var(--gold);
}

.tag { color: var(--muted); margin: 10px 0 14px; font-size: 14px; line-height: 1.5; }
.small-tag { font-size: 12.5px; margin: 14px 2px 0; }

/* sheet header: a back button and the title */
.sheet-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; min-height: 44px; }
.sheet-head h2 { flex: 1; }
.sheet-foot {
  position: sticky; bottom: -18px;
  margin: 16px -18px -18px;
  padding: 14px 18px 18px;
  background: linear-gradient(180deg, rgba(22,17,11,0), rgba(22,17,11,0.96) 30%);
  z-index: 2;
}
.sheet-foot.stack.row { margin-top: 16px; }
.sheet-foot > .big { width: 100%; }

.stack { display: flex; flex-direction: column; gap: 10px; }
.stack.row { flex-direction: row; align-items: stretch; margin-top: 14px; flex-wrap: wrap; }
.stack.row > .big { flex: 1; }
.stack.row > .big { white-space: nowrap; font-size: 19px; padding-left: 12px; padding-right: 12px; }

button {
  cursor: pointer;
  font-family: inherit;
  font-weight: 750;
  border-radius: 15px;
  border: 1px solid var(--card-line);
  background: var(--card-2);
  color: var(--cream);
  min-height: 44px;
  padding: 11px 15px;
  font-size: 15px;
  transition: transform 0.06s, box-shadow 0.06s, background 0.15s;
}
button:hover { background: #352a1c; }
button:active { transform: translateY(3px); }

.icon-btn {
  width: 46px; height: 46px; min-height: 46px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--card-line);
  color: var(--cream);
  box-shadow: 0 4px 0 rgba(0,0,0,0.4);
}
.icon-btn .ic { width: 24px; height: 24px; }

.big {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px;
  background: linear-gradient(180deg, #ffe04d, var(--gold) 45%, var(--gold-deep));
  color: var(--ink);
  border: none;
  font-size: 21px;
  letter-spacing: 0.6px;
  padding: 12px 18px;
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--gold-shadow), 0 12px 26px rgba(224,156,0,0.25);
}
.big .ic { width: 22px; height: 22px; }
.big:hover { background: linear-gradient(180deg, #ffe874, #ffd83a 45%, var(--gold-deep)); }
.big:active { box-shadow: 0 2px 0 var(--gold-shadow); }
.big.alt {
  background: var(--card-2);
  color: var(--cream);
  border: 1px solid var(--card-line);
  box-shadow: 0 5px 0 rgba(0,0,0,0.45);
  font-size: 18px;
}
.big.alt:hover { background: #352a1c; }
.big.alt:active { box-shadow: 0 1px 0 rgba(0,0,0,0.45); }

.ghost-btn { background: transparent; border-color: transparent; color: var(--muted); width: 100%; margin-top: 8px; }
.ghost-btn:hover { background: rgba(255,255,255,0.05); color: var(--cream); }
.mini {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; min-height: 44px; padding: 6px 14px;
  color: var(--gold); border-radius: 999px;
}
.mini .ic { width: 16px; height: 16px; }

.field {
  display: block;
  margin: 18px 0 8px;
  font-size: 15px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
}
.field .hint { font-family: var(--body); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 12px; opacity: 0.85; margin-left: 4px; }
.field-row { display: flex; align-items: center; justify-content: space-between; }

input {
  width: 100%;
  min-height: 48px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  color: var(--cream);
  padding: 12px 14px;
  font: 700 16px var(--body);
}
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,210,31,0.2); }
input::placeholder { color: #7d705c; font-weight: 600; }
.code-input {
  text-transform: uppercase; letter-spacing: 9px;
  text-align: center; font-family: var(--display); font-weight: 400; font-size: 22px;
  color: var(--gold);
}
.join-row { flex-wrap: nowrap; margin-top: 0; }
.join-row input { flex: 1; min-width: 0; }
.join-row button { padding: 0 24px; }

/* choices: the selected one glows gold */
.choices { display: flex; gap: 9px; flex-wrap: wrap; }
.choice {
  flex: 1 1 130px;
  display: flex; flex-direction: column; gap: 3px;
  text-align: left;
  padding: 12px;
  background: var(--card);
  border: 2px solid var(--card-line);
  border-radius: 16px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.4);
}
.choice strong { font-size: 17px; letter-spacing: 0.3px; display: inline-flex; align-items: center; gap: 7px; }
.choice small { color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.3; }
.choice.selected {
  background: linear-gradient(180deg, rgba(255,210,31,0.2), rgba(224,156,0,0.08));
  border-color: var(--gold);
  box-shadow: 0 4px 0 var(--gold-shadow), 0 0 22px rgba(255,210,31,0.18);
}
.choice.selected small { color: #f0dca0; }
.choices.small .choice { flex: 0 0 52px; text-align: center; align-items: center; padding: 10px 0; }

/* chips: difficulty and crew size, one row */
.chips { flex-wrap: nowrap; gap: 7px; }
.chips .choice { flex: 1 1 0; min-width: 0; align-items: center; text-align: center; padding: 9px 4px 8px; gap: 1px; }
.chips .choice strong { font-size: 17px; }
.chips .choice small { font-size: 11.5px; }

/* thief / police chips */
.sides { flex-wrap: nowrap; }
.sides .choice { flex: 1 1 0; align-items: center; text-align: center; }
.side.thief .ic { color: var(--thief); }
.side.police .ic { color: var(--police); }

/* big role tiles with the character in them */
.roles { flex-wrap: nowrap; gap: 10px; }
.role-tile { flex: 1 1 0; padding: 0 0 12px; overflow: hidden; align-items: center; text-align: center; gap: 2px; }
.role-art {
  position: relative; display: block;
  width: 100%; height: 150px; margin-bottom: 6px;
  background: radial-gradient(70% 70% at 50% 80%, rgba(255,90,69,0.35), rgba(0,0,0,0) 70%), #1a140d;
}
.role-tile.police .role-art { background: radial-gradient(70% 70% at 50% 80%, rgba(90,160,255,0.35), rgba(0,0,0,0) 70%), #10141c; }
.role-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.role-art img:not([src]), .role-art img[src=""] { display: none; }
.role-fallback { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; opacity: 0.85; }
.role-tile.thief .role-fallback { color: var(--thief); }
.role-tile.police .role-fallback { color: var(--police); }
.role-art img[src]:not([src=""]) + .role-fallback { display: none; }
.role-tile strong { font-size: 22px; }
.role-tile.thief strong { color: #ff8a78; }
.role-tile.police strong { color: #8fbfff; }
.role-tile.legit .role-art { background: radial-gradient(70% 70% at 50% 80%, rgba(31,209,192,0.32), rgba(0,0,0,0) 70%), #0d1a19; }
.role-tile.legit .role-fallback { color: #1fd1c0; }
.role-tile.legit strong { color: #8ff0e4; }
#world-side .role-tile strong { font-size: 18px; }
#world-side .role-tile .role-art { height: 110px; }

.rooms { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.rooms em { color: var(--muted); }
.room, .lp {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  padding: 8px 12px;
}
.room button { margin-left: auto; padding: 7px 16px; font-size: 14px; }
.lp .who { font-weight: 800; display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp .who .ic { color: var(--gold); width: 16px; height: 16px; }
.lp .role {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 900; padding: 4px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;
}
.lp .role .ic { width: 14px; height: 14px; }
.lp .role.thief { background: rgba(255,90,69,0.18); color: var(--thief); }
.lp .role.police { background: rgba(90,160,255,0.18); color: var(--police); }
.lp .state { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.lp .state.on { color: var(--green); }
.lp.me { border-color: rgba(255,210,31,0.6); background: linear-gradient(90deg, rgba(255,210,31,0.14), var(--card) 70%); }
.you-tag { font-family: var(--display); font-weight: 400; font-size: 12px; background: var(--gold); color: var(--ink); border-radius: 6px; padding: 2px 6px; letter-spacing: 0.5px; }

.code {
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border-radius: 10px;
  padding: 2px 10px;
  letter-spacing: 5px;
}

#chat { margin-top: 16px; }
#chat-log {
  height: 96px; overflow-y: auto;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-line);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  display: flex; flex-direction: column; gap: 4px;
}
#chat-log .sys { color: var(--muted); font-style: italic; }
#chat-log b { color: var(--gold); }
#chat-input { border-radius: 0 0 14px 14px; }

.net { font-size: 13px; font-weight: 700; color: var(--muted); }
.net.ok { color: var(--green); }
.net.bad { color: var(--thief); }

/* ------------------------------------------------------------ title */

.screen.title {
  background: none; border: none; box-shadow: none;
  padding: calc(4px + var(--safe-top)) 2px 8px;
  max-width: 440px;
  display: flex; flex-direction: column; gap: 12px;
}
/* The title grew (city, governor, event, daily cards): it scrolls as a column
   instead of squashing the cards, and the cards keep their text on one line. */
.screen.title > * { flex-shrink: 0; }
.screen.title .card-body strong,
.screen.title .card-body small,
.screen.title .city-body small,
.screen.title .city-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen.title .kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* scroll without a visible bar: it looked like a web page, not a game */
#ui, .screen { scrollbar-width: none; }
#ui::-webkit-scrollbar, .screen::-webkit-scrollbar { display: none; }
/* short screens: tighten the title so more of it fits before scrolling */
@media (max-height: 780px) {
  .screen.title { gap: 8px; }
  .screen.title .logo h1 { font-size: clamp(40px, 11vw, 58px); }
  .screen.title .big.play { min-height: 60px; }
}
.title-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; }
.logo { text-align: center; margin: 2px 0 4px; }
.big.play {
  min-height: 72px;
  font-size: 34px; letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 22px;
  box-shadow: 0 8px 0 var(--gold-shadow), 0 16px 34px rgba(0,0,0,0.45);
}
.big.play .ic { width: 30px; height: 30px; }

.profile {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px;
  padding: 5px 14px 5px 5px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  box-shadow: 0 4px 0 rgba(0,0,0,0.4);
  min-width: 0;
}
.profile .tile { width: 34px; height: 34px; border-radius: 10px; }
.profile .tile .ic { width: 20px; height: 20px; }
.profile b { color: var(--gold); font-family: var(--display); font-weight: 400; font-size: 16px; }
.profile .sep { opacity: 0.4; }

/* the card: dark, a cream tile on the left, a gold go-button on the right */
.card {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 20px;
  box-shadow: 0 5px 0 rgba(0,0,0,0.45);
}
.card .tile { width: 52px; height: 52px; border-radius: 14px; }
.card .tile .ic { width: 28px; height: 28px; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kicker { font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold); }
.card-body strong { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.1; color: var(--cream); }
.card-body small { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.card-body small b { color: var(--cream); }
.card .go {
  flex: 0 0 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: var(--ink);
  box-shadow: 0 3px 0 var(--gold-shadow);
}
.card .go .ic { width: 20px; height: 20px; margin-left: 2px; }
.daily { border-color: rgba(255,210,31,0.4); background: linear-gradient(135deg, #3a2a10, var(--card) 60%); }

/* last week's champions: two cards side by side */
.champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.champ {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 9px 8px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 18px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.4);
}
.champ .tile { width: 36px; height: 36px; border-radius: 10px; }
.champ .tile .ic { width: 21px; height: 21px; }
.champ .tile.gold { background: var(--gold); }
.champ div { display: flex; flex-direction: column; min-width: 0; }
.champ small { font-size: 10.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.champ b { font-family: var(--display); font-weight: 400; font-size: 15px; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.champ div span { font-size: 12px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.champ .tile { color: var(--ink); }
.champ .tile.police { color: #2a64c8; }

.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile-btn {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 11px 4px 10px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.45);
}
.tile-btn b { font-size: 15px; letter-spacing: 0.3px; white-space: nowrap; }

.tips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tips li {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 9px;
  background: rgba(20,16,11,0.78);
  border: 1px solid var(--card-line);
  border-radius: 14px;
  font-size: 11.5px; font-weight: 700; line-height: 1.25; color: #eadcc0;
}
.tips .n {
  flex: 0 0 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--ink);
  font-size: 15px;
}

.live { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 2px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px;
  padding: 8px 16px;
  font-family: var(--display); font-weight: 400; font-size: 17px; letter-spacing: 0.3px;
  border-radius: 999px;
  background: rgba(20,40,26,0.86);
  border-color: rgba(68,208,127,0.45);
}
.live-dot {
  flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--green);
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(68,208,127,0.6); } 70% { box-shadow: 0 0 0 8px rgba(68,208,127,0); } 100% { box-shadow: 0 0 0 0 rgba(68,208,127,0); } }
.live-pill.quiet { background: rgba(40,32,16,0.86); border-color: rgba(255,210,31,0.35); font-family: var(--body); font-weight: 750; font-size: 14px; }
.live-pill.quiet .live-dot { background: var(--gold); animation: none; }
.live-ticker {
  max-width: 100%;
  font-size: 12.5px; color: #e3d8c2; font-weight: 650;
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  overflow: hidden;
}
.live-line { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: slideIn 0.35s ease; }
.live-line .ic { width: 14px; height: 14px; }
.live-line .ic.thief { color: var(--thief); }
.live-line .ic.police { color: var(--police); }
.live-line small { color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------- settings rows */

.set-rows { display: flex; flex-direction: column; gap: 8px; }
a.set-row { text-decoration: none; color: inherit; }
.set-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 60px;
  text-align: left;
  padding: 8px 14px 8px 8px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.4);
}
.set-row b { flex: 1; font-size: 18px; letter-spacing: 0.3px; }
.set-row .chev { color: var(--muted); width: 20px; height: 20px; }
.set-row .val { font-family: var(--display); font-size: 16px; color: var(--gold); }
.switch {
  position: relative; flex: 0 0 52px; height: 30px; border-radius: 999px;
  background: rgba(255,255,255,0.14);
  transition: background 0.2s;
}
.switch::after {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--cream);
  transition: transform 0.2s;
}
.set-row[aria-pressed="true"] .switch { background: var(--green); }
.set-row[aria-pressed="true"] .switch::after { transform: translateX(22px); }
#board-account { margin-top: 10px; }

.help { display: flex; flex-direction: column; gap: 10px; }
.help-row { display: flex; gap: 12px; align-items: flex-start; }
.help-row p { margin: 0; font-size: 14px; line-height: 1.5; color: #e3d8c2; }
.help-row b { font-family: var(--display); font-weight: 400; font-size: 16px; color: var(--gold); letter-spacing: 0.3px; }

/* district cards: two across, a sky swatch on top */
.districts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.districts .choice { padding: 0 0 10px; overflow: hidden; gap: 2px; }
.districts .choice strong, .districts .choice small { padding: 0 11px; }
.districts .choice strong { font-size: 16px; }
.districts .choice small { font-size: 11.5px; }
.districts .sw {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 38px; margin-bottom: 7px;
  background: repeating-linear-gradient(45deg, var(--gold) 0 8px, var(--gold-deep) 8px 16px);
}
.districts .sw .ic { width: 26px; height: 26px; color: var(--cream); filter: drop-shadow(0 2px 0 rgba(0,0,0,0.35)); }
.districts .choice:disabled { cursor: default; opacity: 0.45; }
.districts .choice.selected:disabled { opacity: 1; }
.districts.readonly .choice:not(.selected) { display: none; }
.districts.readonly { grid-template-columns: 1fr; }

/* the wardrobe */
.look-row {
  width: 100%; display: flex; align-items: center; gap: 10px;
  text-align: left; padding: 10px 13px; border-radius: 14px; min-height: 52px;
  background: var(--card);
}
.look-dot { flex: 0 0 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.5); background: #7d5131; }
.look-sum { flex: 1; font-size: 14px; }
.look-change { font-family: var(--display); color: var(--gold); font-size: 15px; letter-spacing: 0.5px; }
.look-stage {
  position: relative;
  border-radius: 18px; overflow: hidden;
  background: radial-gradient(90% 80% at 50% 70%, rgba(255,210,31,0.18), rgba(0,0,0,0.35));
  border: 1px solid var(--glass-line);
}
#look-preview { display: block; width: 100%; height: 210px; }
#look-side { position: absolute; left: 8px; top: 8px; flex-direction: column; gap: 6px; }
#look-side .choice { flex: 0 0 auto; padding: 6px 12px; }
#look-side .choice strong { font-size: 15px; }
#look-body { position: absolute; right: 8px; top: 8px; flex-direction: column; gap: 6px; }
#look-body .choice { flex: 0 0 auto; padding: 6px 12px; }
#look-body .choice strong { font-size: 15px; }
.hairs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.hair {
  padding: 9px 4px; min-width: 0;
  background: var(--card); border: 2px solid var(--card-line); border-radius: 12px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.4);
  font-size: 13.5px; font-weight: 700; color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hair.selected { border-color: var(--gold); background: linear-gradient(180deg, rgba(255,210,31,0.2), rgba(224,156,0,0.08)); box-shadow: 0 3px 0 var(--gold-shadow); }
.outfits { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.outfits .choice { position: relative; padding: 11px 11px 11px 42px; }
.outfits .chip { position: absolute; left: 11px; top: 13px; width: 22px; height: 22px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.35); }
.tones { display: flex; gap: 12px; justify-content: space-between; max-width: 300px; }
.tone { width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 3px solid rgba(255,255,255,0.18); }
.tone.selected { border-color: var(--gold); box-shadow: 0 0 16px rgba(255,210,31,0.5); }

/* ------------------------------------------------------------ game over */

.screen.over { padding-top: 18px; }
.hero {
  position: relative;
  text-align: center;
  padding: 22px 16px 16px;
  border-radius: 22px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255,210,31,0.28), rgba(0,0,0,0) 65%), var(--card);
  border: 2px solid rgba(255,210,31,0.45);
  overflow: hidden;
}
.hero.lose { background: radial-gradient(120% 90% at 50% 0%, rgba(255,90,69,0.3), rgba(0,0,0,0) 65%), var(--card); border-color: rgba(255,90,69,0.5); }
.hero.police.win { background: radial-gradient(120% 90% at 50% 0%, rgba(90,160,255,0.32), rgba(0,0,0,0) 65%), var(--card); border-color: rgba(90,160,255,0.55); }
.hero-icon {
  width: 76px; height: 76px; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 22px;
  background: var(--tile); color: var(--ink);
  box-shadow: inset 0 -4px 0 rgba(120,80,20,0.25), 0 8px 20px rgba(0,0,0,0.4);
  transform: rotate(-4deg);
  animation: pop2 0.45s cubic-bezier(.2,1.6,.4,1);
}
@keyframes pop2 { from { transform: rotate(-4deg) scale(0.4); opacity: 0; } }
.hero-icon .ic { width: 44px; height: 44px; }
.hero.lose .hero-icon { color: #c8321f; }
.hero.police .hero-icon { color: #2a64c8; }
.hero .kicker { color: var(--muted); }
.hero h2 {
  font-size: 44px; margin: 4px 0 4px; text-transform: uppercase;
  color: var(--gold);
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
}
.hero.lose h2 { color: #ff7a64; }
.hero.police.win h2 { color: #8fbfff; }
.hero-sub { margin: 0 0 12px; font-size: 13.5px; line-height: 1.45; color: #e3d8c2; }
.newbest {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gold); color: var(--ink);
  font-family: var(--display); font-size: 16px; letter-spacing: 0.5px;
  animation: pop2 0.5s 0.2s both cubic-bezier(.2,1.6,.4,1);
}
.newbest .ic { width: 18px; height: 18px; }
.over-tip {
  display: flex; align-items: center; gap: 8px;
  margin: 8px auto 0; max-width: 340px; padding: 8px 12px;
  border-radius: 12px; background: rgba(61,139,255,0.14); color: inherit;
  font-size: 13px; line-height: 1.3; text-align: left;
}
.over-tip .ic { flex: 0 0 18px; width: 18px; height: 18px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-stats.two { grid-template-columns: repeat(2, 1fr); }
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 4px;
  background: rgba(0,0,0,0.3);
  border-radius: 14px;
  min-width: 0;
}
.stat small { font-size: 10.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.stat b { font-size: 22px; color: var(--cream); white-space: nowrap; line-height: 1.1; }
.stat b .ic { width: 15px; height: 15px; color: var(--gold); }
.stat b .ic.off { color: rgba(255,244,220,0.2); }
.stat .sub { font-size: 11px; color: var(--muted); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hero-actions { margin-top: 14px; flex-wrap: nowrap; }
.hero-actions .big { white-space: nowrap; font-size: 20px; padding: 12px; }
.hero-actions .big { flex: 1.4; }
.hero-actions .big.alt { flex: 1; }

/* ------------------------------------------------------------ boot screen */

/* Shown while the title's files download (its bar follows them); the menu
   then goes up over the backdrop and the city fades in behind it. */
#boot {
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(90deg, var(--gold) 0 34px, var(--ink) 34px 50px) top / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, var(--gold) 0 34px, var(--ink) 34px 50px) bottom / 100% 10px no-repeat,
    radial-gradient(120% 90% at 50% 30%, #2e210e, #0e0b07 70%);
  transition: opacity 0.4s ease;
}
#boot.done { opacity: 0; pointer-events: none; }
.boot-inner { text-align: center; padding: 24px; max-width: 420px; }
.boot-bar {
  margin: 30px auto 12px;
  width: 200px; height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
}
.boot-bar span {
  display: block; height: 100%; width: 6%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  transition: width 0.25s ease;
}
#boot-note { color: var(--muted); font-size: 14px; font-weight: 700; margin: 0; }
#boot-retry { margin: 18px auto 0; padding: 10px 28px; }

/* --- social: leaderboard ------------------------------------------------- */
.small-tabs { margin-bottom: 8px; flex-wrap: nowrap; gap: 6px; }
.small-tabs .choice { flex: 1 1 0; min-width: 0; align-items: center; text-align: center; padding: 8px 4px; min-height: 46px; justify-content: center; }
.small-tabs .choice strong { font-size: 15px; }
.board-note { margin: 8px 0; font-size: 12.5px; }
.board-name-row { margin-top: 0; flex-wrap: nowrap; }
.board-name-row input { flex: 1; min-width: 0; }
.board-name-row button { padding: 0 20px; }

/* ----------------------------------------------------------- quick chat */

/* the tray: Pidgin phrases two across, emotes in a row under them. Every
   target is at least 44px tall so it can be hit mid-chase with a thumb. */
.qc-tray { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.qc-phrase {
  display: flex; align-items: center; gap: 6px;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 13.5px;
  text-align: left;
  line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-radius: 13px;
}
.qc-phrase .ic { width: 16px; height: 16px; color: var(--gold); }
.qc-phrase.team { border-color: rgba(255,210,31,0.55); background: linear-gradient(180deg, rgba(255,210,31,0.18), rgba(224,156,0,0.08)); }
.qc-emotes { grid-column: 1 / -1; display: grid; gap: 7px; grid-template-columns: repeat(6, minmax(44px, 1fr)); }
.qc-emote { min-width: 44px; min-height: 44px; padding: 4px 0; font-size: 22px; line-height: 1; border-radius: 13px; }

#qc-toggle {
  position: absolute;
  right: 34px; bottom: calc(198px + var(--safe-bottom));
  width: 52px; height: 52px;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--cream);
  pointer-events: auto;
  touch-action: manipulation;
  background: var(--glass);
  border: 2px solid rgba(255,228,160,0.4);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
#qc-toggle .ic { width: 26px; height: 26px; }
#qc-toggle.open { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 22px rgba(255,210,31,0.45); }

.qc-panel {
  position: absolute;
  right: 12px; bottom: calc(260px + var(--safe-bottom));
  width: min(340px, calc(100vw - 24px));
  max-height: calc(100vh - 360px);
  overflow-y: auto;
  pointer-events: auto;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  animation: rise 0.18s ease;
}
.qc-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--muted);
  margin: 0 2px 8px;
}
.qc-note { color: var(--gold); letter-spacing: 0; text-transform: none; font-size: 12px; }

/* quick chats in the round feed take the speaker's side colour */
#feed div.say { border-left-color: var(--cream); }
#feed div.say.thief { border-left-color: var(--thief); }
#feed div.say.police { border-left-color: var(--police); }
#feed div.say b { color: var(--gold); font-weight: 800; }
#feed div.say.team b { color: #ffe47a; }

/* account (public/account.js): sign in to save progress */
.acct-or { margin: 14px 0 6px; font-size: 12.5px; color: var(--muted); text-align: center; }
.acct-row { margin-top: 6px; flex-wrap: nowrap; }
.acct-row input { flex: 1; min-width: 0; }
.acct-row button { padding: 0 18px; white-space: nowrap; }
#acct-change { margin-top: 8px; }
#screen-account button:disabled { opacity: 0.6; }

/* ------------------------------------------- team chat and pings (team.js) */

/* the chat button's unread count */
#qc-toggle { overflow: visible; }
.qc-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px;
  background: var(--thief); color: #fff;
  font-size: 11px; font-weight: 900; line-height: 20px; text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* my side's channel, over the quick-chat tray */
.tc-log {
  max-height: 128px; min-height: 44px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 3px;
  font-size: 13px; line-height: 1.3;
  padding: 2px 4px 6px;
}
.tc-log:empty::before { content: 'Nothing said yet. Only your side can read this.'; color: var(--muted); font-size: 12px; }
.tc-line { overflow-wrap: anywhere; }
.tc-who {
  display: inline; min-height: 0; padding: 0; margin: 0;
  background: none; border: none; box-shadow: none;
  color: var(--gold); font-weight: 800; font-size: inherit;
  text-decoration: underline dotted rgba(255,210,31,0.45);
}
.tc-who:disabled { text-decoration: none; opacity: 1; }
.tc-line.me .tc-who { color: #ffe9a3; }
.tc-form { display: flex; gap: 6px; margin: 0 0 8px; }
.tc-form input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; font-size: 14px; }
.tc-form button { min-height: 44px; padding: 0 14px; font-size: 14px; }

/* lobby chat: Room or my side's channel */
.chat-row { display: flex; }
.chat-row input { flex: 1; min-width: 0; }
.chat-channel {
  min-width: 84px; min-height: 44px; padding: 0 10px;
  border-radius: 0 0 0 14px;
  font-size: 13px; font-weight: 800; white-space: nowrap;
}
.chat-channel.team { background: linear-gradient(180deg, rgba(255,210,31,0.28), rgba(224,156,0,0.14)); border-color: rgba(255,210,31,0.6); }
#chat-input { border-radius: 0 0 14px 0; }
#chat-log .tc-line.team { color: #ffe9a3; }

/* pings: arm a kind in the details panel, then tap the map */
.ping-row { display: flex; flex-direction: column; gap: 6px; background: var(--glass); border: 1px solid var(--glass-line); border-radius: 16px; padding: 10px; }
.ping-label { font-family: var(--display); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.ping-label small { font-family: inherit; text-transform: none; letter-spacing: 0; font-size: 11px; opacity: 0.85; display: block; }
.ping-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ping-kinds button {
  min-height: 52px; padding: 4px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 12px; font-weight: 800; border-radius: 13px;
}
.ping-kinds button.selected { border-color: var(--gold); background: rgba(255,210,31,0.18); box-shadow: 0 0 14px rgba(255,210,31,0.35); }
.pk {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-style: normal; font-weight: 900; font-size: 13px; color: var(--ink);
}
.pk.go { background: #44d07f; } .pk.danger { background: #ff4a36; }
.pk.target { background: #ffd21f; } .pk.meet { background: #5aa0ff; }
#minimap.armed { cursor: crosshair; border-color: var(--gold); box-shadow: 0 0 18px rgba(255,210,31,0.55); }

/* mute / report a player */
.team-sheet {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.45);
}
.ts-card {
  width: min(420px, 100vw);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 20px 20px 0 0;
  padding: 16px 16px 20px;
  display: flex; flex-direction: column; gap: 8px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.ts-card h3 { margin: 0 0 4px; }
.ts-label { margin: 6px 0 0; font-size: 12px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.ts-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ts-reasons button { min-height: 44px; }
.ts-done { margin: 0; min-height: 1em; font-size: 13px; color: var(--green); }

/* legit (world mode): the job chip and the job picker */
.job-chip { border-color: rgba(31, 209, 192, 0.6); color: #bff5ee; }
.job-chip b { background: #1fd1c0; color: #062421; }
.job-list { display: flex; flex-direction: column; gap: 6px; }
.job-list button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  min-height: 56px; padding: 9px 12px; border-radius: 14px;
  background: rgba(31, 209, 192, 0.08); border: 1px solid rgba(31, 209, 192, 0.35); color: inherit; font: inherit;
}
.job-list button b { font-size: 15px; color: #8ff0e4; }
.job-list button small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.job-list button.selected { background: rgba(31, 209, 192, 0.22); border-color: #1fd1c0; }
#hud-role.legit { color: #8ff0e4; }
/* the city sheet's boards: Richest in the city (Lagos Life's Forbes) and today's wages */
.world-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.world-board { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.world-board .here-row b { color: #8ff0e4; }
.world-board em { color: var(--muted); font-size: 12px; }
.world-wanted { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.world-wanted .world-boards { grid-template-columns: 1fr; }
.world-wanted .here-row span { white-space: normal; }
.world-wanted .world-board .here-row b { color: #ff8a70; }
.mw-head { font-size: 10.5px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); }
.mw-opt { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-weight: 650; }
.mw-opt input { width: 18px; height: 18px; accent-color: var(--gold); }
.here-row .mw-warrant { color: #ff5a3c; font-weight: 800; }
/* ---------------------------------------------------------------- phones */

@media (max-width: 480px) {
  #ui { padding: 10px 12px; align-items: flex-start; }
  #ui > .screen:not(.title) { margin: auto 0; }
  .screen { padding: 14px 14px 16px; border-radius: 22px; max-height: calc(100dvh - 20px); }
  .sheet-foot { margin: 14px -14px -16px; padding: 12px 14px 16px; bottom: -16px; }
  .screen.title { padding-top: calc(2px + var(--safe-top)); gap: 11px; min-height: calc(100dvh - 20px); justify-content: flex-start; }
}

/* Phones in a round: the street needs the screen. One bar at the top, the
   next step and a line or two of news under it, a small map in the corner;
   the rest opens from a tap on the map. Nothing under the stick or USE. */
.touch-ui .desk-only { display: none !important; }
.touch-ui #hud { padding: calc(10px + var(--safe-top)) 10px 10px; gap: 7px; }
.touch-ui .hud-bar {
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 5px 14px 8px;
}
.touch-ui .hb-clock { font-size: 21px; }
.touch-ui .hb-heat .ic { width: 15px; height: 15px; }
.touch-ui .hb-loot { font-size: 16px; gap: 9px; }
.touch-ui #minimap { right: 10px; top: calc(62px + var(--safe-top)); width: 96px; height: 96px; border-radius: 14px; }
.touch-ui .step-chip { max-width: calc(100vw - 132px); font-size: 15px; }
.touch-ui #feed { max-width: calc(100vw - 132px); font-size: 12px; }
.touch-ui .hud-panel { display: none; }
.touch-ui #banner { top: 34%; }
/* tapped open: a big map with the details under it */
.touch-ui.hud-open #minimap { right: 10px; width: calc(100vw - 20px); height: min(62vw, 300px); z-index: 3; }
.touch-ui.hud-open .hud-panel {
  display: flex;
  position: absolute; left: 10px; right: 10px; width: auto;
  top: calc(72px + min(62vw, 300px) + var(--safe-top));
  pointer-events: auto;
  z-index: 3;
}
.touch-ui.hud-open .step-chip, .touch-ui.hud-open #feed { visibility: hidden; }
.touch-ui .btn-panel-quit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 400; font-size: 17px;
  background: var(--glass); color: var(--cream);
}
@media (orientation: landscape) and (max-height: 500px) {
  .touch-ui.hud-open #minimap { left: auto; width: 46vw; height: calc(100vh - 80px); }
  .touch-ui.hud-open .hud-panel { top: calc(62px + var(--safe-top)); left: 10px; right: auto; width: 40vw; }
}
.champs-head { grid-column: 1 / -1; margin: 0 2px -4px; font-family: var(--display); font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); text-shadow: 0 1px 3px rgba(0,0,0,0.9); }
.champs.one { grid-template-columns: 1fr; }

/* ------------------------------------------------ planning board (board.js) */

/* the lobby's way in: a card with a cream tile, like the menu's rows */
.plan-open {
  width: 100%; margin-top: 16px;
  display: flex; align-items: center; gap: 12px;
  text-align: left; padding: 10px 12px;
  background: var(--card); border: 2px solid var(--card-line); border-radius: 16px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.4);
}
.plan-open-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plan-open-text b { font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: 0.3px; }
.plan-open-text small { color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-open .chev { color: var(--muted); }

.plan-screen { max-width: 520px; }
.plan-clock {
  font-family: var(--display); font-size: 20px; color: var(--ink);
  background: var(--tile); border-radius: 12px; padding: 6px 12px;
  box-shadow: inset 0 -3px 0 rgba(120, 80, 20, 0.22);
}
.plan-jobs .choice small, #plan-body .chips .choice small { font-size: 11px; }
#plan-body .chips { flex-wrap: nowrap; }
#plan-body .chips .choice { padding: 9px 6px 8px; min-height: 76px; justify-content: flex-start; }
#plan-body .chips .choice strong { font-size: 15px; flex-direction: column; gap: 3px; }
#plan-body .chips .choice strong .ic { width: 22px; height: 22px; }
.plan-map {
  display: block; width: 100%; aspect-ratio: 67 / 49; margin-top: 10px;
  border-radius: 14px; border: 1px solid var(--card-line); background: #3d362b;
  cursor: pointer; touch-action: manipulation;
}
.plan-intel { margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.plan-intel.ok { color: #c9f2d8; }
.plan-intel b { color: var(--gold); }
.plan-crew { display: flex; flex-direction: column; gap: 8px; }
.plan-member {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 16px; padding: 8px;
}
.plan-member.me { border-color: rgba(255,210,31,0.5); }
.pm-head { display: flex; align-items: center; gap: 6px; margin: 0 2px 6px; font-size: 14px; }
.pm-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-tag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); border: 1px solid var(--card-line); border-radius: 8px; padding: 1px 6px; }
.pm-tag.boss { color: var(--gold); border-color: rgba(255,210,31,0.5); }
.pm-ready { font-size: 11px; font-weight: 800; color: var(--muted); }
.pm-ready.on { color: var(--green); }
.pm-roles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.pm-role {
  min-height: 52px; padding: 5px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 10.5px; font-weight: 800; border-radius: 12px;
}
.pm-role .ic { width: 20px; height: 20px; }
.pm-role.selected { background: var(--tile); color: var(--ink); border-color: var(--tile); box-shadow: inset 0 -3px 0 rgba(120, 80, 20, 0.22); }
.pm-role:disabled { opacity: 0.45; cursor: default; }
.pm-role.selected:disabled { opacity: 1; }
.plan-does { display: flex; gap: 8px; align-items: flex-start; margin: 10px 2px 0; font-size: 13px; color: #e8dcc2; line-height: 1.4; }
.plan-does .ic { color: var(--gold); margin-top: 1px; }
.plan-split { display: flex; flex-direction: column; gap: 6px; }
.ps-row { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; padding: 4px 6px 4px 12px; }
.ps-name { flex: 1; min-width: 0; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-pct { min-width: 52px; text-align: center; font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--gold); }
.ps-step { width: 44px; min-height: 44px; padding: 0; font-size: 22px; line-height: 1; }
.ps-total { font-size: 12.5px; font-weight: 750; margin: 2px 2px 0; }
.ps-total.ok { color: var(--green); }
.ps-total.bad { color: var(--thief); }
.plan-wait { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.plan-wait p { margin: 0; line-height: 1.5; }
#plan-ready.on { background: linear-gradient(180deg, #7ee6a6, var(--green)); box-shadow: 0 6px 0 #1f7a45; }

/* the round chip: the plan in one line, the crew and the role's move on a tap */
.team-chip {
  align-self: flex-start;
  max-width: min(360px, calc(100vw - 132px));
  pointer-events: auto;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  padding: 4px;
  font-size: 13px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tc-chip-head {
  display: flex; align-items: center; gap: 7px; width: 100%;
  min-height: 36px; padding: 4px 8px; background: none; border: none; box-shadow: none;
  font-size: 13px; font-weight: 800; text-align: left;
}
.tc-chip-head .ic { color: var(--gold); }
.tc-warn { font-style: normal; color: #fff; background: var(--thief); border-radius: 8px; padding: 1px 6px; font-size: 11px; }
.tc-acts { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 4px 4px; }
.tc-act { min-height: 44px; padding: 6px 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; background: var(--tile); color: var(--ink); border-color: var(--tile); }
.tc-act.danger { background: rgba(255,90,69,0.18); color: #ffd2c9; border-color: rgba(255,90,69,0.6); }
.tc-live { align-self: center; font-size: 12px; font-weight: 800; color: var(--gold); padding: 0 4px; }
.tc-crew { display: flex; flex-direction: column; gap: 3px; padding: 4px 8px; }
.tc-m { display: flex; justify-content: space-between; gap: 8px; }
.tc-m span { color: var(--muted); }
.tc-m.gone b { text-decoration: line-through; color: var(--thief); }
.team-chip .plan-intel { margin: 2px 8px 6px; }

/* the split on the result card */
.split-card { background: var(--card); border: 1px solid var(--card-line); border-radius: 16px; padding: 10px 12px; margin: 10px 0; }
.split-head { font-family: var(--display); font-size: 15px; letter-spacing: 0.5px; color: var(--gold); margin-bottom: 6px; }
.split-head small { font-family: var(--body); color: var(--muted); font-size: 12px; }
.split-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; font-size: 13.5px; padding: 3px 0; }
.split-row.gone span:first-child { color: var(--thief); }
.split-row .rep { color: var(--green); font-weight: 800; }
.split-row .rep.down { color: var(--thief); }

/* ------------------------------------------------------------ wayfinding */

/* the edge arrow toward an objective out of view */
#guide-arrow {
  position: absolute; left: 0; top: 0;
  width: 46px; height: 46px;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(21,17,11,0.78);
  border: 2px solid #ffc21a;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  will-change: transform;
}
#guide-arrow.police { border-color: #3d8bff; }
#guide-tip { color: #ffc21a; font-size: 22px; line-height: 1; display: block; }
#guide-arrow.police #guide-tip { color: #3d8bff; }
#guide-dist {
  position: absolute; top: 44px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 900; color: var(--cream);
  background: rgba(21,17,11,0.78); border-radius: 8px; padding: 1px 6px;
  white-space: nowrap;
}
.touch-ui #guide-arrow { width: 38px; height: 38px; }
.touch-ui #guide-tip { font-size: 18px; }
.touch-ui #guide-dist { top: 37px; font-size: 10px; }

/* the first-round coach speaks through the step chip: brighter, a slow glow */
.step-chip.coach {
  background: linear-gradient(180deg, #fff3c2, var(--gold));
  animation: coach-glow 1.6s ease-in-out infinite;
}
@keyframes coach-glow { 50% { filter: brightness(1.12); box-shadow: 0 4px 0 #8a5d00, 0 0 26px rgba(255,194,26,0.85); } }

/* ------------------------------------------- police briefing and dispatch */
.plan-sgt { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; font-size: 14px; line-height: 1.45; }
.pm-zones { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.pm-zones .pm-role { font-size: 11px; min-height: 44px; }
.map-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.map-tools .mini.on { background: var(--tile); color: var(--ink); border-color: var(--tile); }
.tc-warn.gold { background: var(--gold); color: var(--ink); }
.tc-act:disabled { opacity: 0.55; }
.tc-calls { display: flex; flex-direction: column; gap: 4px; padding: 2px 4px 4px; max-height: 40vh; overflow-y: auto; }
.tc-call { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--card-line); border-radius: 12px; padding: 4px 4px 4px 6px; }
.tc-call-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--tile); color: var(--ink); flex: 0 0 auto; }
.tc-call.alarm .tc-call-ic, .tc-call.stakeout .tc-call-ic, .tc-call.warrant .tc-call-ic { background: var(--thief); color: #fff; }
.tc-call-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tc-call-text b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-call-text small { color: var(--muted); font-size: 11px; }
.tc-mini { min-height: 44px; min-width: 52px; padding: 4px 10px; font-size: 12.5px; }
.tc-send { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 4px 4px 42px; }
.tc-live.hunt { display: inline-flex; align-items: center; gap: 6px; color: #ffd2c9; }

/* ------------------------------------------------------------ the city */
/* "Enter Lagos": the always-on world, next to quick Play. Night blue, so it
   reads as a different thing from the gold Play button. */
.big.city {
  justify-content: flex-start;
  min-height: 64px;
  background: linear-gradient(135deg, #1b2a52 0%, #2d3f78 55%, #b4603a 120%);
  color: #fff8e7;
  border: 1px solid rgba(255, 210, 31, 0.35);
  box-shadow: 0 6px 0 #0d1530, 0 14px 30px rgba(0, 0, 0, 0.4);
  text-align: left;
}
.big.city:hover { background: linear-gradient(135deg, #22346a 0%, #3a4f92 55%, #c96d42 120%); }
.big.city:active { box-shadow: 0 2px 0 #0d1530; }
.big.city .ic { width: 28px; height: 28px; color: var(--gold); flex: none; }
.city-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.city-name { font-size: 24px; letter-spacing: 1.5px; text-transform: uppercase; }
.city-body small { font-family: var(--body); font-size: 13px; font-weight: 700; letter-spacing: 0; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-live {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.35); font-family: var(--body); font-size: 14px; letter-spacing: 0;
}
.big.city.go { justify-content: center; margin-top: 6px; }
.world-card {
  padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(135deg, #18234a, #2b3a6e);
  border: 1px solid rgba(255, 210, 31, 0.25);
  display: flex; flex-direction: column; gap: 4px;
}
.world-clock { font-size: 26px; font-weight: 800; color: var(--gold); letter-spacing: 0.5px; }
.world-stat { font-size: 14px; font-weight: 700; color: var(--cream); opacity: 0.9; }
#world-side .choice.locked { opacity: 0.45; }
.world-wallet { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 14px; color: var(--cream); }
.world-wallet b { color: var(--gold); }
.world-here { display: flex; flex-direction: column; gap: 6px; }
.here-row {
  display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-line); font-size: 14px; min-width: 0;
}
.here-row b { color: var(--gold); white-space: nowrap; }
.here-row span { color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#world-side .choice.mine::after {
  content: 'YOUR SIDE'; position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 800;
  letter-spacing: 1px; padding: 2px 6px; border-radius: 6px; background: var(--gold); color: var(--ink);
}
#world-side .choice { position: relative; }
.big.city:disabled { opacity: 0.5; }

/* city cards: a district card with the state stamped on the swatch */
.districts.cities .sw { position: relative; }
.districts.cities .sw em {
  position: absolute; left: 9px; bottom: 6px; font-style: normal; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--cream); text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}

/* the civic layer: the governor card, the election sheet, the polling unit chip */
.civic-card, .event-card { flex-shrink: 0; }   /* the title screen scrolls rather than squash them */
.civic-card { border-color: rgba(31, 211, 106, 0.4); background: linear-gradient(135deg, #0f3320, var(--card) 62%); }
.civic-card .tile { background: #dff7e7; color: #0b7a3b; }
.civic-card .kicker { color: #6fe39f; }
.poll-note {
  margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; font-weight: 650;
  background: rgba(16, 155, 76, 0.18); border: 1px solid rgba(31, 211, 106, 0.45); color: #c9f5d9;
}
.gov-card {
  display: flex; gap: 12px; align-items: center; padding: 14px; margin: 4px 0 6px; border-radius: 18px;
  background: linear-gradient(135deg, #3a2a10, #1c160d 70%); border: 1px solid rgba(255, 210, 31, 0.45);
}
.gov-crown {
  flex: 0 0 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #fff1a8, var(--gold) 55%, var(--gold-deep)); color: var(--ink);
  box-shadow: 0 3px 0 var(--gold-shadow);
}
.gov-crown .ic { width: 28px; height: 28px; }
.gov-crown.none { filter: grayscale(1) brightness(0.7); }
.gov-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gov-body small { font-size: 12px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.gov-body strong { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.1; color: var(--cream); }
.gov-plat { font-size: 13px; color: var(--muted); font-weight: 600; }
.gov-plat b { color: var(--cream); }
.gov-body em { font-style: normal; font-size: 12px; color: var(--muted); }
.ballot { display: flex; flex-direction: column; gap: 8px; }
.cand { padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-line); }
.cand.lead { border-color: rgba(255, 210, 31, 0.45); }
.cand.mine { border-color: rgba(31, 211, 106, 0.7); }
.cand-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cand-top b { font-size: 16px; color: var(--cream); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand-plat { font-size: 12.5px; color: var(--muted); font-weight: 650; margin: 2px 0 6px; }
.cand-vote {
  font: inherit; font-weight: 800; font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
  padding: 7px 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #2fe07a, #109b4c); color: #04210f; box-shadow: 0 3px 0 #0a5c2d;
}
.cand-vote:disabled { opacity: 0.5; }
.cand-voted { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #6fe39f; }
.cand-bar { position: relative; height: 18px; border-radius: 9px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.cand-bar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; background: linear-gradient(90deg, #109b4c, #2fe07a); }
.cand-bar em { position: relative; display: block; padding: 0 8px; font-style: normal; font-size: 11.5px; line-height: 18px; font-weight: 800; color: var(--cream); }
.choices.platforms { flex-direction: column; }
.choices.platforms .choice { flex: 0 0 auto; width: 100%; text-align: left; align-items: flex-start; padding: 10px 12px; }
#civic-stand { width: 100%; margin-top: 10px; }
.vote-chip { border-color: rgba(31, 211, 106, 0.7); color: #c9f5d9; }
.vote-chip b { background: #1fd36a; color: #04210f; }

/* the weekend event card: a countdown, and the live global count while it runs */
.event-card { border-color: rgba(176, 76, 255, 0.45); background: linear-gradient(135deg, #2a1240, var(--card) 62%); }
.event-card .tile { background: #f1e3ff; color: #7b2fd0; }
.event-card .kicker { color: #d7a6ff; display: inline-flex; align-items: center; gap: 6px; }
.event-card.on-now { border-color: rgba(255, 79, 216, 0.7); box-shadow: 0 5px 0 rgba(0,0,0,0.45), 0 0 22px rgba(255, 79, 216, 0.18); }
.event-clock {
  flex: 0 0 auto; align-self: center; padding: 6px 10px; border-radius: 12px;
  font-family: var(--display); font-size: 14px; color: var(--cream); background: rgba(255,255,255,0.08);
  max-width: 30%; text-align: center; line-height: 1.15;
}

/* property (Stage 5): the phone's apps and the money chips */
.phone-chip { border-color: rgba(120, 190, 255, 0.6); color: #cfe6ff; }
.phone-chip b { background: #5aa8ff; color: #051a33; }
.money-chip { border-color: rgba(47, 220, 106, 0.6); color: #c8f7d6; }
.money-chip b { background: #2fdc6a; color: #052a12; }
.prop-card-wrap { max-height: 82vh; overflow: hidden; }
.prop-head { display: flex; align-items: center; justify-content: space-between; }
.prop-head .ghost-btn { width: auto; min-height: 36px; padding: 4px 14px; }
.prop-tabs, .prop-filter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.prop-tabs button { padding: 0 2px; }
.prop-plan { display: flex; flex-direction: column; gap: 6px; }
.prop-plan select { min-height: 38px; border-radius: 10px; background: rgba(0,0,0,0.3); color: inherit; border: 1px solid rgba(255,255,255,0.2); font: inherit; padding: 0 8px; }
.prop-filter { grid-template-columns: repeat(3, 1fr); }
.prop-tabs button, .prop-filter button {
  min-height: 40px; border-radius: 12px; font: inherit; font-weight: 800; font-size: 13px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); color: inherit;
}
.prop-tabs button.selected, .prop-filter button.selected { background: rgba(90, 168, 255, 0.25); border-color: #5aa8ff; }
.prop-body { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; min-height: 120px; }
.prop-sub, .prop-empty { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.prop-warn { color: #ffb19c; }
.prop-label { margin: 6px 0 0; font-size: 12px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.prop-list { display: flex; flex-direction: column; gap: 6px; }
.prop-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
}
.prop-row > div { display: flex; flex-direction: column; min-width: 0; }
.prop-row b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prop-row small, .prop-card small, .prop-item small { font-size: 12px; color: var(--muted); }
.prop-row.yours { border-color: #2fdc6a; background: rgba(47, 220, 106, 0.1); }
.prop-row.taken { opacity: 0.55; }
.prop-btns { display: flex; gap: 6px; flex-shrink: 0; }
.prop-btns button, .prop-body button.wide, .prop-out, .prop-stash button {
  min-height: 38px; padding: 4px 10px; border-radius: 10px; font: inherit; font-weight: 800; font-size: 12px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); color: inherit;
}
.prop-body button.buy { background: #2fdc6a; border-color: #2fdc6a; color: #052a12; }
.prop-tag { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.prop-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.06); }
.prop-stash { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.prop-stash input { width: 84px; min-height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.3); color: inherit; padding: 0 8px; font: inherit; }
.prop-out { align-self: flex-start; background: transparent; }
.crew-panel { display: flex; flex-direction: column; gap: 8px; }
.crew-form { display: flex; gap: 6px; }
.crew-input { flex: 1; min-width: 0; min-height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.3); color: inherit; padding: 0 10px; font: inherit; font-size: 14px; }
#crew-new-tag, #crew-join-tag { text-transform: uppercase; }
#crew-new-tag::placeholder, #crew-join-tag::placeholder { text-transform: none; }
#crew-new-tag { flex: 0 0 64px; }
.crew-form button { min-height: 38px; padding: 4px 14px; border-radius: 10px; font: inherit; font-weight: 800; font-size: 12px; flex-shrink: 0; }
.crew-code { white-space: nowrap; color: #cfe6ff; letter-spacing: 1px; font-family: ui-monospace, monospace; }
.crew-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.crew-badge { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,0.1); color: var(--muted); }
.crew-badge.role-boss { background: #f0bd12; color: #2a1f00; }
.crew-badge.role-officer { background: rgba(90, 168, 255, 0.3); color: #cfe6ff; }
.crew-badge.probation { background: rgba(255, 140, 26, 0.25); color: #ffc58a; }
.crew-badge.away { background: rgba(255,255,255,0.06); }
.prop-body button.crew-kick { border-color: rgba(255, 120, 100, 0.5); color: #ffb19c; }
.crew-rules { font-size: 12px; }
.prop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.prop-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; font: inherit;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); color: inherit; min-height: 78px; }
.prop-item b { font-size: 12px; }
.prop-item.owned { border-color: #2fdc6a; opacity: 0.75; }
.fi { width: 28px; height: 22px; border-radius: 6px; background: #8a6a4a; }
.fi-bed { background: linear-gradient(#f2ede0 50%, #c23a1c 50%); }
.fi-tv { background: #0a0a12; box-shadow: inset 0 0 0 3px #333, inset 0 0 8px #6fa8ff; }
.fi-generator { background: linear-gradient(#f0bd12 30%, #c0392b 30%); }
.fi-fan { border-radius: 50%; background: radial-gradient(#e8e8e2 25%, #6fb6d8 26%); }
.fi-rug { background: repeating-linear-gradient(45deg, #c23a1c 0 4px, #f2b53a 4px 8px); }
.fi-art { background: linear-gradient(#f2a65a 55%, #3a3936 55%); box-shadow: inset 0 0 0 3px #4a3020; }
.prop-wallet { margin: 0; font-size: 13px; color: var(--muted); }
.prop-wallet b { color: #8ff0a8; font-size: 15px; }

/* feedback: the once-a-day rating card (result screen, after the city) and Send feedback */
#over-feedback:empty { display: none; }
#over-feedback { margin-top: 14px; }
.fb-card {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 18px;
  padding: 12px 12px 14px;
}
.fb-sheet-card .fb-card { background: transparent; border: none; padding: 0; }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fb-head h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 22px; letter-spacing: 0.4px; }
.fb-q { margin: 0 0 10px; font-family: var(--display); font-size: 19px; letter-spacing: 0.3px; text-align: center; }
.fb-faces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fb-faces button {
  min-height: 54px; padding: 4px; border-radius: 16px; font-size: 30px; line-height: 1;
  background: var(--card-2); filter: grayscale(0.35); transition: transform 0.12s, filter 0.12s;
}
.fb-faces button span { display: block; }
.fb-faces button.on {
  filter: none; background: rgba(255, 210, 31, 0.18); border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 210, 31, 0.35); transform: scale(1.06);
}
.fb-body { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.fb-body.fb-collapsed { display: none; }
.fb-label { font-size: 13px; font-weight: 800; color: var(--cream); }
.fb-label small { color: var(--muted); font-weight: 600; }
.fb-text {
  width: 100%; min-height: 64px; resize: vertical; font: inherit; font-size: 16px; color: var(--cream);
  background: rgba(0,0,0,0.3); border: 1px solid var(--card-line); border-radius: 12px; padding: 10px;
}
.fb-text:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.fb-count { margin-top: -4px; text-align: right; font-size: 11px; color: var(--muted); }
.fb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-tags button { min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 13px; }
.fb-tags button.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.fb-attach { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; min-height: 36px; }
.fb-attach input { width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; flex: 0 0 auto; accent-color: var(--gold); }
.fb-note { margin: -4px 0 0; font-size: 12px; line-height: 1.35; color: var(--muted); }
.fb-err { margin: 0; min-height: 0; font-size: 13px; color: var(--thief); }
.fb-err:empty { display: none; }
.fb-send { min-height: 50px; font-size: 19px; }
.fb-done { margin: 10px 0 0; text-align: center; color: var(--green); font-weight: 800; }
.fb-sheet-card { max-height: 88vh; max-height: 88dvh; overflow-y: auto; }

/* ---- intercity travel: the chip; the rest is injected by public/travel.js, on first use ---- */
.travel-chip { border-color: rgba(255, 210, 31, 0.75); color: #fff0b8; }
.travel-chip b { background: linear-gradient(180deg, #ffe04d, var(--gold-deep)); color: var(--ink); }

/* guidepref.js isNewPlayer: a new player's title is one Play */
.ftue-line{display:none;margin:-6px 0 0;text-align:center;opacity:.8;font-weight:700}
.ftue-new .ftue-line{display:block}
.ftue-new #screen-main>:not(.title-top,.logo,#play-now,.ftue-line),.ftue-early #event-card,.ftue-early #civic-card{display:none!important}
.ftue-new #play-now{margin-top:18vh;padding:26px 12px;font-size:40px}
