:root {
  --bg: #0e1117;
  --panel: #161b24;
  --panel-2: #1c222e;
  --line: #2a3140;
  --text: #e6ebf2;
  --muted: #8b95a7;
  --accent: #f0a44a;
  --good: #4ec77f;
  --bad: #e4616f;
  --cell: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* The artifact host injects this; a standalone page has no such reset. Without
   it `.overlay { display: grid }` outranks [hidden] (equal specificity, later
   in the sheet) and the celebration overlay covers the page invisibly,
   swallowing every pointer event. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

.app {
  max-width: 1080px; margin: 0 auto;
  padding-block: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.muted { color: var(--muted); }
.small { font-size: 12px; }
h1 { font-size: 20px; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
h2:first-child { margin-top: 0; }

/* ---- HUD ---- */
.hud {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 16px; margin-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-mark { font-size: 28px; }
.stat { min-width: 120px; }
.stat-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat-row strong { font-size: 18px; }
.bar { height: 7px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin: 5px 0 3px; }
.bar i { display: block; height: 100%; border-radius: 99px; transition: width .25s ease; }
.bar.districts i { background: linear-gradient(90deg, #f0a44a, #ffd081); }
.bar.energy i { background: linear-gradient(90deg, #d9a300, #ffd34d); }

/* ---- layout ---- */
/* Desktop: the city spans the top; board left, panels down the right. */
.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-areas:
    "city      city"
    "board     objective"
    "board     orders"
    "board     inspect";
  grid-template-rows: auto auto auto 1fr;
  gap: 16px;
  align-items: start;
}
.layout > * { min-width: 0; }
.city-panel { grid-area: city; }
.board-wrap { grid-area: board; }
.objective-panel { grid-area: objective; }
.orders-panel { grid-area: orders; }
.inspect-panel { grid-area: inspect; }

/* ---- city panorama ---- */
.city-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 0; overflow: hidden;
}
.city-banner { display: block; line-height: 0; color: var(--muted); }
/* The 3D city needs a real height: its canvas is sized to the host box,
   unlike the SVG, which carries its own aspect ratio. */
.city-banner.city-gl { aspect-ratio: 32 / 9; width: 100%; cursor: grab; touch-action: none; }
.city-banner.city-gl:active { cursor: grabbing; }
.celebrate-city.city-gl { aspect-ratio: 16 / 9; }
.city-gl canvas { display: block; width: 100%; height: 100%; }
.city-svg { display: block; width: 100%; height: auto; }

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
.district--new .bld { animation: rise .62s cubic-bezier(.2,.9,.3,1) backwards; }
@keyframes beacon { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.beacon { animation: beacon 1.8s ease-in-out infinite; }
.plot text { font-family: inherit; letter-spacing: .04em; }

/* ---- objective ---- */
.objective-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.eyebrow {
  display: block; font-size: 10px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted);
}
.objective-head strong { font-size: 17px; letter-spacing: -0.01em; }
.objective-count {
  font-size: 13px; font-weight: 700; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-radius: 99px; padding: 3px 9px; white-space: nowrap;
}
.objective-blurb { font-size: 12.5px; margin: 7px 0 11px; }
.needs { display: grid; gap: 8px; }
.need {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel-2); padding: 8px 9px;
}
.need-done { border-color: color-mix(in srgb, var(--good) 55%, transparent); }
.need-glyph {
  font-size: 22px; width: 38px; height: 38px; border-radius: 9px;
  display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 18%, transparent);
}
.need-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.need-info strong { font-size: 13.5px; }
.need-info .muted { font-size: 11.5px; }
.need-tick { color: var(--good); font-weight: 700; font-size: 17px; padding-right: 6px; }
.objective-reward { font-size: 11.5px; margin-top: 10px; }
.objective-done { display: flex; flex-direction: column; gap: 5px; }

/* ---- tooltips ---- */
.info-dot {
  display: inline-grid; place-items: center;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--line); color: var(--text);
  font-size: 9px; font-weight: 700; font-style: normal;
  line-height: 1; flex: none;
}
.need-glyph .info-dot { position: absolute; right: -3px; bottom: -3px; border: 1.5px solid var(--panel-2); }
.need-explain {
  display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0;
  background: none; border: 0; padding: 0; margin: 0;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  border-radius: 9px;
}
.need-explain:hover .need-glyph { filter: brightness(1.25); }
.need-glyph { position: relative; }
.objective-name {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  color: var(--text); font: inherit; font-size: 17px; font-weight: 700;
  letter-spacing: -0.01em;
}
.objective-name:hover { color: var(--accent); }

.popover {
  position: fixed; z-index: 110;
  width: min(300px, calc(100vw - 20px));
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 13px; padding: 13px;
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease;
}
.popover.show { opacity: 1; transform: none; }
.popover-close {
  position: absolute; top: 6px; right: 7px;
  background: none; border: 0; cursor: pointer;
  color: var(--muted); font-size: 17px; line-height: 1; padding: 3px 5px;
}
.popover-close:hover { color: var(--text); }
.pop-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; padding-right: 18px; }
.pop-glyph {
  font-size: 23px; width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 20%, transparent);
}
.pop-head strong { display: block; font-size: 14px; }
.pop-head .muted { font-size: 11.5px; }
.pop-line { margin: 0 0 9px; font-size: 12.5px; line-height: 1.5; }
.pop-label {
  display: block; font-size: 9.5px; text-transform: uppercase;
  letter-spacing: .09em; color: var(--muted); margin-bottom: 2px;
}
.pop-path {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  background: var(--bg); border-radius: 9px; padding: 7px 8px; margin-bottom: 7px;
}
.pop-step { font-size: 15px; line-height: 1.3; opacity: .65; }
.pop-step.is-target {
  opacity: 1; background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 6px; padding: 1px 3px;
}
.pop-path i { color: var(--muted); font-style: normal; font-size: 11px; }
.pop-note { font-size: 11px; margin: 0 0 9px; }
.pop-cost {
  margin: 0; font-size: 11.5px; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 9px;
}

/* ---- celebration ---- */
.overlay {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-left, 0px));
  background: rgba(6, 9, 15, .82);
  opacity: 0; transition: opacity .26s ease;
}
.overlay.show { opacity: 1; }
.celebrate {
  width: min(620px, 100%);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  transform: translateY(14px) scale(.98);
  transition: transform .3s cubic-bezier(.2,1,.3,1);
  max-height: 100%; overflow-y: auto;
}
.overlay.show .celebrate { transform: none; }
.celebrate-eyebrow {
  display: block; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .14em; color: var(--accent); font-weight: 700;
}
.celebrate h2 {
  font-size: 25px; margin: 5px 0 6px; color: var(--text);
  text-transform: none; letter-spacing: -0.02em;
}
.celebrate p { margin: 0 0 14px; font-size: 13.5px; }
.celebrate-city {
  border-radius: 12px; overflow: hidden; line-height: 0;
  border: 1px solid var(--line); color: var(--muted);
}
.celebrate-reward {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px;
}
.celebrate-reward span {
  font-size: 12.5px; font-weight: 600;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 99px; padding: 6px 12px;
}
.celebrate .btn.primary { width: 100%; padding: 11px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .district--new .bld, .beacon { animation: none; }
  .overlay, .celebrate { transition: none; }
}
.board-wrap {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px;
}
.hint { margin: 14px 2px 0; font-size: 12.5px; text-align: center; }
.side { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }

/* ---- board ---- */
.board.board-gl {
  display: block;
  line-height: 0;
  touch-action: none;
  user-select: none;
}
.board.board-gl canvas { border-radius: 4px; }

.board {
  display: grid;
  grid-template-columns: repeat(var(--cols, 7), 1fr);
  gap: 7px;
  touch-action: none;
  user-select: none;
}
.cell {
  aspect-ratio: 1;
  border-radius: 11px;
  background: var(--panel-2);
  border: 1px solid #222a37;
  display: grid; place-items: center;
  position: relative;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
/* Tier as colour depth, matching the Pixi board. */
.cell.filled {
  --mix: 7%; --edge: 28%; --bw: 1px;   /* set per tile from its tier depth */
  background: color-mix(in srgb, var(--c) var(--mix), var(--panel-2));
  border-color: color-mix(in srgb, var(--c) var(--edge), var(--panel-2));
  border-width: var(--bw);
  cursor: grab;
}
.cell.top-tier { box-shadow: inset 0 0 0 2px rgba(255, 210, 122, .85); }
.cell.selected { outline: 2px solid var(--accent); outline-offset: 1px; }
.cell.dragging { opacity: .32; }
.cell.target { border-color: #5a6b86; background: #212a38; }
.cell.target-merge {
  border-color: var(--good);
  background: color-mix(in srgb, var(--good) 22%, var(--panel-2));
  transform: scale(1.06);
}

.tile { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.glyph { font-size: 30px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
/* (tile tier numbers removed: tier reads as colour depth) */
.charges {
  position: absolute; top: 2px; left: 4px;
  font-size: 10px; font-weight: 700; color: #ffd34d;
  background: rgba(0,0,0,.45); border-radius: 6px; padding: 0 4px;
}
.charges.empty { color: var(--muted); }
.chargebar {
  position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px;
  background: rgba(0,0,0,.4); border-radius: 99px; overflow: hidden;
}
.chargebar i { display: block; height: 100%; background: #ffd34d; }

@keyframes pop { 0% { transform: scale(.55); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes popMerge {
  0% { transform: scale(.7); filter: brightness(2.2); }
  55% { transform: scale(1.22); filter: brightness(1.5); }
  100% { transform: scale(1); filter: brightness(1); }
}
.cell.pop { animation: pop .26s ease-out; }
.cell.pop-merge { animation: popMerge .38s cubic-bezier(.2,1.4,.4,1); z-index: 2; }

.drag-ghost {
  position: fixed; top: 0; left: 0; z-index: 90;
  width: 64px; height: 64px; border-radius: 12px;
  display: grid; place-items: center; font-size: 32px;
  background: color-mix(in srgb, var(--c) 30%, #1c222e);
  border: 1px solid color-mix(in srgb, var(--c) 70%, transparent);
  box-shadow: 0 10px 26px rgba(0,0,0,.5);
  pointer-events: none; opacity: .95;
}

/* ---- orders ---- */
.orders { display: grid; gap: 10px; }
.order {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-2); padding: 10px;
}
.order.ready { border-color: color-mix(in srgb, var(--good) 60%, transparent); }
.order-main { display: flex; align-items: center; gap: 10px; }
.order-glyph {
  font-size: 26px; width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 18%, transparent);
}
.order-info { display: flex; flex-direction: column; }
.order-info strong { font-size: 14px; }
.order-progress { font-size: 12px; color: var(--muted); }
.order-reward { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin: 8px 0 8px 52px; }
.order-actions { display: flex; gap: 6px; }

/* ---- inspect ---- */
.inspect p { margin: 8px 0; font-size: 13px; }
.inspect-head { display: flex; align-items: center; gap: 10px; }
.inspect-glyph {
  font-size: 28px; width: 46px; height: 46px; border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 20%, transparent);
}
.inspect-head strong { display: block; }
.inspect-head .muted { font-size: 12px; }

/* ---- buttons ---- */
.btn {
  font: inherit; font-size: 13px; font-weight: 600;
  border-radius: 9px; padding: 7px 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  transition: filter .12s ease, opacity .12s ease;
}
.btn:hover:not(:disabled) { filter: brightness(1.25); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--good); border-color: var(--good); color: #09240f; flex: 1; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #2a070c; }

/* ---- toasts ---- */
.toasts {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  z-index: 100; pointer-events: none;
}
.toast {
  background: #222a38; border: 1px solid var(--line);
  padding: 9px 15px; border-radius: 99px; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  animation: toastIn .22s ease-out;
}
.toast.good { border-color: color-mix(in srgb, var(--good) 60%, transparent); }
.toast.bad { border-color: color-mix(in srgb, var(--bad) 60%, transparent); }
.toast.level { border-color: var(--accent); color: var(--accent); }
.toast.out { opacity: 0; transform: translateY(6px); transition: all .4s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* Phone: orders ride above the board as a swipeable strip, so your goals
   stay on screen while you play instead of sitting below the fold. */
@media (max-width: 860px) {
  .city-banner.city-gl { aspect-ratio: 2 / 1; }
  .layout {
    grid-template-columns: 1fr;
    grid-template-areas: "city" "objective" "board" "orders" "inspect";
    grid-template-rows: auto auto auto auto auto;
  }
  /* Compact objective: two requirement cards side by side keeps the board
     within a short scroll of the city banner. */
  .objective-panel { padding: 12px; }
  .objective-panel h2 { margin-bottom: 6px; }
  .objective-head strong, .objective-name { font-size: 15px; }
  .objective-blurb, .objective-reward { display: none; }
  .needs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .need { padding: 6px 7px; gap: 7px; }
  .need-glyph { width: 28px; height: 28px; font-size: 17px; border-radius: 8px; }
  .need-info strong { font-size: 12px; }
  .need-info .muted { font-size: 10.5px; line-height: 1.25; }
  .need .btn { padding: 4px 8px; font-size: 11px; }
  .need-have { display: none; }
  .btn-label { display: none; }
  #refillBtn { padding: 5px 9px; font-size: 12px; }
  .need-tick { font-size: 15px; padding-right: 3px; }
  .celebrate { padding: 16px; border-radius: 16px; }
  .celebrate h2 { font-size: 21px; }
  .hud { gap: 8px 14px; padding: 8px 12px; }
  .hud .bar { margin: 4px 0 2px; }
  .brand { gap: 7px; }
  .brand h1 { font-size: 16px; }
  .brand .muted { display: none; }
  .brand-mark { font-size: 20px; }
  .stat { min-width: 86px; }
  .stat-label { font-size: 10px; }
  .stat-row strong { font-size: 15px; }
  .stat-energy { flex: 1; min-width: 110px; }
  #energyText { font-size: 11px; }
  #resetBtn { padding: 5px 10px; font-size: 12px; margin-left: auto; }
  .glyph { font-size: 25px; }

  /* Compact order cards: one row each, so the board still fits on screen. */
  .orders-panel { padding: 12px; min-width: 0; }
  .orders-panel h2 { margin-bottom: 6px; }
  .order { padding: 8px; }
  .order-glyph { width: 34px; height: 34px; font-size: 20px; border-radius: 8px; }
  .order-info strong { font-size: 13px; }
  .order-reward { margin: 5px 0 6px 44px; font-size: 11px; gap: 10px; }
  .order-actions .btn { padding: 5px 9px; font-size: 12px; }
  .orders {
    min-width: 0;
    grid-auto-flow: column;
    grid-auto-columns: minmax(196px, 1fr);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    margin: 0 -12px;
    padding-inline: 12px;
  }
  .order { scroll-snap-align: start; }
  .order-reward { margin-left: 52px; }
  .board-wrap { padding: 12px; }
  .board { gap: 6px; }
  .hint { font-size: 12px; }
}

@media (max-width: 430px) {
  .brand h1 { display: none; }
  .stat { min-width: 76px; }
}

/* =====================================================================
   SKINS -- the two looks. Everything above is structure; this layer is
   presentation, keyed off <html data-skin>. Both are deliberately single
   visual worlds (a sunny day; a neon night), so each sets every colour.
   ===================================================================== */
[data-skin] {
  --radius: 20px;
  --radius-sm: 14px;
}
[data-skin="sunny"] {
  --bg: #fde7c4; --bg-2: #f8d29c;
  --panel: #fffaf0; --panel-2: #f5e5c6; --line: #e9cf9f;
  --text: #4a2c16; --muted: #94714f;
  --accent: #ff8a3d; --good: #43bf63; --bad: #ef5a4f;
  --panel-edge: #e6c590; --panel-lip: #d9ad6c;
  --panel-shadow: 0 6px 0 var(--panel-lip), 0 14px 26px rgba(120, 72, 24, .18);
  --btn-bg: #fff3dc; --btn-ink: #6a4524; --btn-lip: #d9b27a;
  --btn-primary: #4fc96d; --btn-primary-ink: #ffffff; --btn-primary-lip: #2f9a4c;
  --pill: #fff3dc; --pill-edge: #ecd09d;
  --font-display: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, sans-serif;
  color-scheme: light;
}
[data-skin="synth"] {
  --bg: #0d0221; --bg-2: #2a0a4a;
  --panel: rgba(28, 8, 56, .88); --panel-2: #2a1252; --line: #4b2088;
  --text: #f6eaff; --muted: #b99ae0;
  --accent: #ff3cac; --good: #3dffb0; --bad: #ff4d6d;
  --neon-a: #ff3cac; --neon-b: #22e1ff; --neon-c: #ffd84d;
  --panel-edge: rgba(255, 60, 172, .55); --panel-lip: rgba(34, 225, 255, .0);
  --panel-shadow: 0 0 0 1px rgba(34, 225, 255, .12), 0 0 22px rgba(255, 60, 172, .28), 0 14px 30px rgba(0, 0, 0, .45);
  --btn-bg: rgba(42, 18, 82, .9); --btn-ink: #f6eaff; --btn-lip: #ff3cac;
  --btn-primary: #ff3cac; --btn-primary-ink: #1a0433; --btn-primary-lip: #b3157a;
  --pill: rgba(42, 18, 82, .9); --pill-edge: rgba(34, 225, 255, .45);
  --font-display: "Audiowide", "Exo 2", system-ui, sans-serif;
  --font-body: "Exo 2", system-ui, sans-serif;
  color-scheme: dark;
}

/* ---- page ---- */
[data-skin] body { font-family: var(--font-body); font-weight: 600; color: var(--text); }
[data-skin="sunny"] body {
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .55) 1.5px, transparent 2px) 0 0 / 22px 22px,
    linear-gradient(180deg, var(--bg), var(--bg-2)) fixed;
}
[data-skin="synth"] body {
  background:
    linear-gradient(180deg, rgba(13, 2, 33, 0) 55%, rgba(255, 60, 172, .10) 100%) fixed,
    linear-gradient(rgba(255, 60, 172, .07) 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, rgba(34, 225, 255, .05) 1px, transparent 1px) 0 0 / 34px 100%,
    linear-gradient(180deg, var(--bg), var(--bg-2)) fixed;
}
[data-skin] h1, [data-skin] .objective-name, [data-skin] .objective-head strong,
[data-skin] .celebrate h2, [data-skin] .stat-row strong, [data-skin] .order-info strong {
  font-family: var(--font-display);
}
[data-skin] h1 { font-size: 22px; font-weight: 700; letter-spacing: 0; }
[data-skin="synth"] h1 {
  font-weight: 400; letter-spacing: .04em;
  background: linear-gradient(180deg, #fff 10%, #ffd84d 45%, #ff3cac 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 8px rgba(255, 60, 172, .55));
}

/* ---- panels: chunky, rounded, lifted ---- */
[data-skin] .hud, [data-skin] .board-wrap, [data-skin] .side, [data-skin] .city-panel {
  background: var(--panel);
  border: 2px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: var(--panel-shadow);
}
[data-skin="synth"] .hud, [data-skin="synth"] .board-wrap,
[data-skin="synth"] .side, [data-skin="synth"] .city-panel {
  border-width: 1.5px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
[data-skin] .city-panel { padding: 0; overflow: hidden; }

/* Section labels become ribbons. */
[data-skin] .side h2 {
  display: inline-block; margin: 0 0 12px;
  font-family: var(--font-display); font-size: 13px; letter-spacing: .06em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 99px;
}
[data-skin="sunny"] .side h2 { background: #ffe2b8; color: #a2541a; box-shadow: inset 0 -2px 0 #f6c98e; }
[data-skin="synth"] .side h2 {
  color: var(--neon-b); border: 1px solid rgba(34, 225, 255, .5);
  text-shadow: 0 0 8px rgba(34, 225, 255, .7); font-weight: 400;
}

/* ---- HUD: stats as pills ---- */
[data-skin] .stat {
  background: var(--pill); border: 2px solid var(--pill-edge); border-radius: 16px;
  padding: 6px 12px 7px;
}
[data-skin] .stat-label { font-size: 10.5px; color: var(--muted); font-weight: 800; }
[data-skin] .stat-row strong { font-size: 19px; }
[data-skin] .bar { height: 9px; background: rgba(0, 0, 0, .08); }
[data-skin="sunny"] .bar.energy i { background: linear-gradient(90deg, #ffb703, #ffd84d); box-shadow: inset 0 -2px 0 rgba(0,0,0,.1); }
[data-skin="sunny"] .bar.districts i { background: linear-gradient(90deg, #ff8a3d, #ffb36b); }
[data-skin="synth"] .bar { background: rgba(255, 255, 255, .08); }
[data-skin="synth"] .bar.energy i { background: linear-gradient(90deg, #22e1ff, #3dffb0); box-shadow: 0 0 10px rgba(34, 225, 255, .8); }
[data-skin="synth"] .bar.districts i { background: linear-gradient(90deg, #ff3cac, #ffd84d); box-shadow: 0 0 10px rgba(255, 60, 172, .8); }

/* ---- buttons: pressable ---- */
[data-skin] .btn {
  font-family: var(--font-display); font-weight: 600; letter-spacing: .01em;
  background: var(--btn-bg); color: var(--btn-ink);
  border: 2px solid var(--btn-lip); border-radius: 14px;
  box-shadow: 0 4px 0 var(--btn-lip);
  transform: translateY(0); transition: transform .08s ease, box-shadow .08s ease, filter .12s ease;
}
[data-skin] .btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn-lip); }
[data-skin] .btn.primary {
  background: var(--btn-primary); color: var(--btn-primary-ink);
  border-color: var(--btn-primary-lip); box-shadow: 0 4px 0 var(--btn-primary-lip);
}
[data-skin] .btn:disabled { box-shadow: 0 2px 0 var(--btn-lip); }
[data-skin] .btn.ghost { background: transparent; box-shadow: none; border-color: var(--pill-edge); color: var(--muted); }
[data-skin="synth"] .btn { box-shadow: 0 0 0 0 transparent, 0 0 12px rgba(255, 60, 172, .25); }
[data-skin="synth"] .btn.primary { box-shadow: 0 0 16px rgba(255, 60, 172, .65); text-shadow: none; }
[data-skin="synth"] .btn:active:not(:disabled) { transform: translateY(1px); }

/* ---- cards: orders, needs ---- */
[data-skin] .order, [data-skin] .need, [data-skin] .person {
  background: var(--panel-2); border: 2px solid var(--line); border-radius: var(--radius-sm);
}
[data-skin="sunny"] .order, [data-skin="sunny"] .need { background: #fff; box-shadow: 0 3px 0 #efd9b0; }
[data-skin] .order.ready, [data-skin] .need-done { border-color: var(--good); }
[data-skin="synth"] .order.ready, [data-skin="synth"] .need-done { box-shadow: 0 0 14px rgba(61, 255, 176, .35); }
[data-skin] .order-glyph, [data-skin] .need-glyph, [data-skin] .pop-glyph, [data-skin] .inspect-glyph {
  border-radius: 12px; border: 2px solid color-mix(in srgb, var(--c) 45%, transparent);
}
[data-skin] .objective-count {
  font-family: var(--font-display); background: var(--accent); color: #fff; padding: 4px 11px;
}
[data-skin="synth"] .objective-count { color: #1a0433; box-shadow: 0 0 12px rgba(255, 60, 172, .7); }

/* ---- host character ---- */
.host { display: flex; gap: 10px; align-items: flex-end; margin: 0 0 12px; }
.host-avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-size: 28px; line-height: 1;
  background: var(--panel-2); border: 2px solid var(--line);
}
.host-bubble {
  position: relative; flex: 1; min-width: 0;
  background: var(--panel-2); border: 2px solid var(--line); border-radius: 14px 14px 14px 4px;
  padding: 7px 11px 8px; font-size: 13px; line-height: 1.4;
}
.host-bubble b { display: block; font-family: var(--font-display); font-size: 12px; color: var(--accent); margin-bottom: 1px; }
[data-skin="sunny"] .host-avatar { background: #ffe7c2; border-color: #f2c68a; box-shadow: 0 3px 0 #e8b36f; }
[data-skin="sunny"] .host-bubble { background: #fff; border-color: #f0d6a8; }
[data-skin="synth"] .host-avatar { border-color: var(--neon-b); box-shadow: 0 0 12px rgba(34, 225, 255, .5); }
[data-skin="synth"] .host-bubble { border-color: rgba(34, 225, 255, .5); }
[data-skin="synth"] .host-bubble b { color: var(--neon-b); text-shadow: 0 0 8px rgba(34, 225, 255, .6); font-weight: 400; }
.celebrate .host { margin: 2px 0 14px; }
@keyframes host-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.host-avatar { animation: host-bob 2.6s ease-in-out infinite; }

/* ---- celebration ---- */
[data-skin] .celebrate { border-radius: 26px; border: 2px solid var(--panel-edge); box-shadow: var(--panel-shadow); background: var(--panel); }
[data-skin="sunny"] .celebrate { background: #fffaf0; }
[data-skin="synth"] .celebrate { background: rgba(22, 6, 46, .96); }
[data-skin] .celebrate-eyebrow { font-family: var(--font-display); }
[data-skin="synth"] .celebrate-eyebrow { color: var(--neon-c); text-shadow: 0 0 10px rgba(255, 216, 77, .7); }
[data-skin="sunny"] .celebrate-eyebrow { color: #e46a1c; }
[data-skin] .celebrate-reward span { background: var(--pill); border: 2px solid var(--pill-edge); font-family: var(--font-display); }

/* ---- skin + sound switch ---- */
.skin-btn, .sound-btn { padding: 6px 10px; font-size: 15px; line-height: 1; }

/* ---- reward particles (coins and stars flying to the HUD) ---- */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 140; }
.fx-coin {
  position: fixed; left: 0; top: 0; font-size: 22px; line-height: 1;
  will-change: transform, opacity; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25));
}
@keyframes hud-bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.bump { animation: hud-bump .32s ease-out; }

/* ---- toasts in skin ---- */
[data-skin] .toast { font-family: var(--font-display); border-width: 2px; }
[data-skin="sunny"] .toast { background: #fffaf0; color: #4a2c16; border-color: #f0d6a8; box-shadow: 0 4px 0 #e8c58f, 0 10px 20px rgba(120,72,24,.18); }
[data-skin="synth"] .toast { background: rgba(22, 6, 46, .96); color: #f6eaff; border-color: rgba(255,60,172,.6); box-shadow: 0 0 16px rgba(255,60,172,.35); }

@media (prefers-reduced-motion: reduce) {
  .host-avatar { animation: none; }
  .bump { animation: none; }
}

/* ---- skins on phones: keep the board within a short scroll ---- */
@media (max-width: 860px) {
  /* Two rows: the three stats, then the four buttons. */
  [data-skin] .hud {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
    padding: 8px 10px; gap: 7px;
  }
  [data-skin] .hud .brand { display: none; }
  [data-skin] .hud .stat { grid-column: span 4; min-width: 0; }
  [data-skin] .hud .btn { grid-column: span 3; margin-left: 0; justify-content: center; text-align: center; }
  /* Five buttons on one row: refill is the wide one, the rest are icons. */
  [data-skin] .hud .btn { grid-column: span 2; padding-left: 4px; padding-right: 4px; }
  [data-skin] .hud #refillBtn { grid-column: span 4; }
  [data-skin] .stat { padding: 4px 9px 5px; border-radius: 12px; }
  [data-skin] .stat-label { font-size: 9.5px; }
  [data-skin] .stat-row strong { font-size: 15px; }
  [data-skin] .bar { height: 7px; margin: 3px 0 2px; }
  [data-skin] .hud .stat-energy { min-width: 0; }
  [data-skin] .btn.ghost { padding: 4px 9px; font-size: 13px; box-shadow: none; }
  [data-skin] .side h2 { margin-bottom: 8px; font-size: 11.5px; padding: 4px 10px; }
  [data-skin] .city-banner.city-gl { aspect-ratio: 5 / 2; }
  .host { gap: 8px; margin-bottom: 8px; align-items: center; }
  .host-avatar { width: 34px; height: 34px; font-size: 20px; }
  .host-bubble { font-size: 12px; padding: 5px 9px 6px; line-height: 1.35; }
  /* Clamp the text, not the padded bubble, so no third line can peek out. */
  .host-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .host-bubble b { display: inline; margin-right: 4px; font-size: 11px; }
  .celebrate .host-text { -webkit-line-clamp: 4; }
}
/* On wider screens the name sits on its own line above the text. */
.host-text b { display: block; }
@media (max-width: 860px) { .host-text b { display: inline; } }
@media (max-width: 860px) {
  [data-skin] .city-banner.city-gl { aspect-ratio: 3 / 1; }
  [data-skin] .objective-head .eyebrow { display: none; }
}

/* --- generator shop --------------------------------------------------- */
.shop-list { display: grid; gap: 8px; margin-top: 8px; }
.shop-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px; background: var(--card-2, rgba(255, 255, 255, .55));
  border: 1.5px solid var(--line, rgba(0, 0, 0, .08));
}
.shop-row.is-locked { opacity: .55; }
.shop-glyph {
  width: 38px; height: 38px; display: grid; place-items: center; font-size: 22px; border-radius: 10px;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent);
}
.shop-info { display: grid; min-width: 0; }
.shop-info strong { font-size: 14px; }
.shop-info .muted { font-size: 11.5px; line-height: 1.3; }
.shop-row .btn { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
.shop-row .btn[disabled] { cursor: not-allowed; }

/* --- city view: the player's own camera ------------------------------- */
.city-panel { position: relative; }
.city-reset {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  padding: 5px 11px; font-size: 12.5px; line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.city-reset[hidden] { display: none; }
.city-banner.city-gl { cursor: grab; }

/* =====================================================================
   PHONE -- one screen, nothing scrolls. Pills and a gear on top; a glimpse
   of the city with floating buttons; the objective; the board sized to
   what is left. Orders, details, settings and progress open as windows.
   (Applied by phone.js through html.phone, below 700px wide.)
   ===================================================================== */
.phone-hud, .city-tap, .city-fabs, .city-hint, .selbar, .win-close,
.settings-panel, .progress-panel, .scrim, .city-win { display: none; }

html.phone, html.phone body { height: 100%; overflow: hidden; }
html.phone .app {
  height: 100dvh; display: flex; flex-direction: column; gap: 8px;
  padding: max(8px, env(safe-area-inset-top, 0px)) 8px max(8px, env(safe-area-inset-bottom, 0px));
}
html.phone .layout { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
html.phone .layout > * { width: 100%; min-width: 0; }
html.phone .city-panel { order: 1; }
html.phone .objective-panel { order: 2; }
html.phone .board-wrap { order: 3; }

/* -- top: two pills and a gear -- */
html.phone .hud {
  display: block; padding: 0; margin: 0; background: none; border: 0; box-shadow: none;
}
html.phone .hud > :not(.phone-hud) { display: none; }
html.phone .phone-hud { display: flex; align-items: center; gap: 7px; }
.grow { flex: 1; }
.ppill {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 11px;
  border-radius: 999px; background: var(--pill, #fff8ea); border: 2px solid var(--pill-edge, #ecd3a6);
  font: 700 15px var(--font-display, sans-serif); color: var(--text); cursor: pointer;
}
.ppill .plus {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--good); color: #fff; font-size: 15px; line-height: 1;
}
.pbar { width: 46px; height: 8px; border-radius: 9px; background: rgba(0,0,0,.1); overflow: hidden; }
.pbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ffb703, #ffd84d); transition: width .25s; }
[data-skin="synth"] .pbar i { background: linear-gradient(90deg, #22e1ff, #3dffb0); }
.picon {
  width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; font-size: 19px;
  background: var(--pill, #fff8ea); border: 2px solid var(--pill-edge, #ecd3a6); cursor: pointer; padding: 0;
}

/* -- the city glimpse, with floating buttons -- */
html.phone .city-panel {
  flex: 1 1 auto; min-height: 0; position: relative; padding: 0; overflow: hidden;
}
html.phone .city-banner, html.phone[data-skin] .city-banner.city-gl {
  aspect-ratio: auto; height: 100%; width: 100%;
}
html.phone .city-banner .city-svg { height: 100%; }
html.phone .city-reset { display: none !important; }
html.phone .city-tap {
  display: block; position: absolute; inset: 0; z-index: 1; background: none; border: 0; cursor: zoom-in;
}
html.phone .city-fabs {
  display: flex; justify-content: space-between; align-items: flex-start;
  position: absolute; inset: 8px 8px auto; z-index: 2; pointer-events: none;
}
.fab-col { display: flex; flex-direction: column; gap: 8px; }
.fab {
  pointer-events: auto; position: relative; width: 44px; height: 44px; border-radius: 14px; padding: 0;
  display: grid; place-items: center; font-size: 22px; cursor: pointer;
  background: color-mix(in srgb, var(--pill, #fff8ea) 92%, transparent); border: 2px solid var(--pill-edge, #ecd3a6);
  box-shadow: 0 3px 0 var(--pill-edge, #ecd3a6);
}
.fab.has-ready { border-color: var(--good); box-shadow: 0 3px 0 var(--good); }
.fab-badge {
  position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--good); color: #fff; font: 700 11.5px/16px var(--font-display, sans-serif); font-style: normal;
  border: 2px solid #fff; text-align: center;
}
.fab-badge.blue { background: #3b82f6; }
html.phone .city-hint {
  display: block; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 2;
  pointer-events: none; padding: 3px 10px; border-radius: 99px; font: 600 11.5px var(--font-body, sans-serif);
  background: rgba(255, 255, 255, .78); color: #5b4532; white-space: nowrap;
}
[data-skin="synth"] .city-hint { background: rgba(22, 6, 46, .75); color: #f6eaff; }

/* -- the objective, compact -- */
html.phone .objective-panel {
  flex: none; padding: 8px 10px; display: block;
}
html.phone .objective-panel h2 { display: none; }
html.phone .objective {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto;
  column-gap: 9px; row-gap: 6px; align-items: center;
}
html.phone .objective .host { grid-row: 1 / span 2; margin: 0; align-self: center; }
html.phone .objective .host-bubble { display: none; }
html.phone .objective .host-avatar { width: 40px; height: 40px; font-size: 22px; cursor: pointer; }
html.phone .objective-head { align-items: center; }
html.phone .objective-head .eyebrow { display: none; }
html.phone .objective-name { font-size: 16px; }
html.phone .objective-count { font-size: 12px; padding: 2px 9px; }
html.phone .objective-blurb, html.phone .objective-reward { display: none; }
html.phone .needs {
  grid-column: 2; display: flex; gap: 6px; flex-wrap: nowrap;
}
html.phone .need { flex: 1 1 0; min-width: 0; padding: 4px 5px; gap: 4px; }
html.phone .need-explain { gap: 5px; min-width: 0; }
html.phone .need-glyph { width: 28px; height: 28px; font-size: 17px; border-radius: 8px; }
html.phone .need-glyph .info-dot { display: none; }
html.phone .need-info strong, html.phone .need-have { display: none; }
html.phone .need-info .muted { font-size: 12.5px; font-weight: 800; }
html.phone .need .btn { padding: 4px 8px; font-size: 12px; margin-left: auto; }
html.phone .need-tick { margin-left: auto; }

/* -- the board, on a tray -- */
html.phone .board-wrap { flex: none; padding: 8px 10px 10px; display: flex; flex-direction: column; align-items: center; }
html.phone .board-wrap .hint { display: none; }
html.phone .board { margin: 0 auto; }
html.phone .selbar {
  display: flex; align-items: center; gap: 6px; width: 100%; height: 30px; margin-bottom: 6px;
  font: 600 12.5px var(--font-body, sans-serif); color: var(--muted); white-space: nowrap; overflow: hidden;
}
.selbar b { font-family: var(--font-display, sans-serif); color: var(--text); font-size: 14px; }
.sel-glyph { font-size: 19px; }
.sel-sub { overflow: hidden; text-overflow: ellipsis; }
.sel-hint { overflow: hidden; text-overflow: ellipsis; width: 100%; text-align: center; }
.sel-btn {
  flex: none; height: 28px; min-width: 28px; padding: 0 8px; border-radius: 10px; cursor: pointer;
  background: var(--pill, #fff8ea); border: 2px solid var(--pill-edge, #ecd3a6);
  font: 700 12.5px var(--font-display, sans-serif); color: var(--text);
}
.sel-btn.sell { color: #a2541a; }

/* -- windows: bottom sheets over the game -- */
html.phone .scrim { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(40, 25, 10, .4); }
html.phone .scrim[hidden] { display: none; }
html.phone .win {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-height: 78dvh; overflow-y: auto; margin: 0;
  border-radius: 22px 22px 0 0 !important; padding: 16px 14px max(18px, env(safe-area-inset-bottom, 0px)) !important;
  box-shadow: 0 -8px 26px rgba(0, 0, 0, .25) !important;
  animation: sheetUp .22s cubic-bezier(.2, .9, .3, 1);
}
@keyframes sheetUp { from { transform: translateY(40%); opacity: .4; } }
html.phone body[data-win="orders"] .orders-panel,
html.phone body[data-win="inspect"] .inspect-panel,
html.phone body[data-win="settings"] .settings-panel,
html.phone body[data-win="progress"] .progress-panel { display: block; }
html.phone .win-close {
  display: grid; place-items: center; position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
  border-radius: 50%; border: 0; background: rgba(0, 0, 0, .07); font-size: 16px; color: var(--muted); cursor: pointer;
}
html.phone .win h2 { margin-bottom: 12px; }
/* Orders stack vertically in their window. */
html.phone .orders { display: grid; grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; gap: 8px; }
html.phone .order { scroll-snap-align: none; }

.settings-body { display: grid; gap: 10px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; font: 600 15px var(--font-body, sans-serif); }
.settings-row .btn { min-width: 64px; }

.progress-list { display: grid; gap: 6px; }
.prog-map { width: 100%; margin-bottom: 6px; }
.prog-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; }
.prog-row b { display: block; font-family: var(--font-display, sans-serif); font-size: 14px; }
.prog-row .muted { font-size: 12px; }
.prog-n {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font: 700 13px var(--font-display, sans-serif); background: rgba(0,0,0,.07); color: var(--muted);
}
.prog-row.done .prog-n { background: var(--good); color: #fff; }
.prog-row.now { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.prog-row.now .prog-n { background: var(--accent); color: #fff; }
.prog-row:not(.done):not(.now) { opacity: .6; }

/* -- the city map window -- */
html.phone .city-win { display: block; position: fixed; inset: 0; z-index: 70; background: var(--bg); }
html.phone .city-win[hidden] { display: none; }
.city-win-host { position: absolute; inset: 0; }
.city-win-host.city-gl { touch-action: none; }
.city-win-bar {
  position: absolute; left: 10px; right: 10px; top: max(10px, env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 8px; z-index: 2;
}
.city-win-foot {
  position: absolute; left: 10px; right: 10px; bottom: max(12px, env(safe-area-inset-bottom, 0px)); z-index: 2;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px;
  background: color-mix(in srgb, var(--pill, #fff8ea) 92%, transparent); border: 2px solid var(--pill-edge, #ecd3a6);
  font-size: 12px;
}
.city-win-foot .muted { flex: 1; }

/* Toasts sit under the pills on phones, clear of the board. */
html.phone .toasts { top: 54px; bottom: auto; }

/* Phone windows: one-row order cards, a tight progress list. */
html.phone .order { display: flex; align-items: center; gap: 8px; padding: 7px 8px; }
html.phone .order-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
html.phone .order-reward { margin: 0 !important; font-size: 12.5px; white-space: nowrap; }
html.phone .order-actions { display: flex; gap: 6px; margin: 0; }
html.phone .order-actions .btn { padding: 6px 10px; font-size: 12.5px; width: auto; }
html.phone .order-glyph { width: 36px; height: 36px; font-size: 21px; flex: none; }
html.phone .prog-row { padding: 3px 8px; }
html.phone .prog-n { width: 24px; height: 24px; font-size: 12px; }
html.phone .prog-row b { font-size: 13.5px; line-height: 1.2; }
html.phone .prog-row .muted { font-size: 11.5px; }
html.phone .progress-list { gap: 2px; }
/* Floating buttons side by side, so a short glimpse never clips them. */
html.phone .fab-col { flex-direction: row; }
html.phone .city-panel.short .city-hint { display: none; }

/* ---- city perks ---- */
.objective-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.perk-chip {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  font: 700 11.5px var(--font-body, sans-serif); color: var(--text);
  padding: 3px 9px; border-radius: 99px;
  background: color-mix(in srgb, var(--good) 16%, transparent);
  border: 1.5px dashed color-mix(in srgb, var(--good) 60%, transparent);
}
.perk-chip-name { white-space: nowrap; }
html.phone .objective-side { flex-direction: row-reverse; align-items: center; }
html.phone .perk-chip-name { display: none; }
html.phone .perk-chip { padding: 2px 7px; font-size: 12px; }

.stat-perks { cursor: pointer; }
.stat-perks:hover { filter: brightness(1.04); }
.perks { display: grid; gap: 4px; margin-top: 8px; max-height: min(60vh, 460px); overflow-y: auto; }
.perk-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 4px; }
.perk-sum > div {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 6px 4px; border-radius: 12px; background: color-mix(in srgb, var(--good) 12%, transparent);
}
.perk-sum b { font: 700 15px var(--font-display, sans-serif); }
.perk-sum span { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.perk-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; opacity: .55; }
.perk-row.got { opacity: 1; background: color-mix(in srgb, var(--good) 8%, transparent); }
.perk-row > div { flex: 1; min-width: 0; }
.perk-row b { display: block; font-size: 12.5px; }
.perk-row .muted { font-size: 11px; }
.perk-ico { font-size: 19px; width: 26px; text-align: center; flex: none; }
.perk-from { font-size: 10.5px; text-align: right; max-width: 92px; line-height: 1.2; }
.popover:has(.perks) { width: min(340px, calc(100vw - 20px)); }

.prog-row > div { flex: 1; min-width: 0; }
.prog-perk {
  flex: none; display: flex; align-items: center; gap: 3px; font-size: 16px;
  padding: 2px 7px; border-radius: 99px; background: color-mix(in srgb, var(--good) 12%, transparent);
}
.prog-perk i { font: 700 11px var(--font-body, sans-serif); font-style: normal; color: var(--muted); }
.prog-row.done .prog-perk { background: color-mix(in srgb, var(--good) 26%, transparent); }
.prog-row.done .prog-perk i { color: var(--text); }
.celebrate-reward .perk-won {
  width: 100%; text-align: center;
  background: color-mix(in srgb, var(--good) 18%, var(--panel-2)) !important;
  border-color: color-mix(in srgb, var(--good) 55%, transparent) !important;
}

/* ---- orders: energy reward, customers, trade crate ---- */
.order-energy { color: color-mix(in srgb, #e0a100 80%, var(--text)); font-weight: 700; }
.trade-crate {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 8px 10px; border-radius: 14px; font: inherit; color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, var(--panel-2, #fff));
  border: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent);
}
.crate-ico { font-size: 24px; flex: none; }
.crate-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.crate-info b { font-size: 13px; }
.crate-pips { display: flex; gap: 4px; }
.crate-pips i { width: 18px; height: 7px; border-radius: 4px; background: rgba(0,0,0,.1); }
.crate-pips i.on { background: var(--accent); }
.crate-next { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
/* The tablet strip of order cards scrolls sideways: the crate sits in it too. */
@media (max-width: 860px) { html:not(.phone) .trade-crate { flex-direction: column; align-items: flex-start; gap: 4px; } }
/* Phone order card: glyph | name, who, reward | deliver over skip. */
html.phone .order { display: grid; grid-template-columns: auto 1fr auto; column-gap: 10px; row-gap: 2px; align-items: center; }
html.phone .order-main { display: contents; }
html.phone .order-glyph { grid-row: 1 / span 2; }
html.phone .order-info { grid-column: 2; grid-row: 1; min-width: 0; }
html.phone .order-reward { grid-column: 2; grid-row: 2; display: flex; gap: 10px; }
html.phone .order-actions { grid-column: 3; grid-row: 1 / span 2; flex-direction: column; align-items: stretch; gap: 4px; }
html.phone .order-actions .btn { padding: 5px 12px; }
html.phone .order-actions .btn.ghost { padding: 3px 10px; font-size: 11.5px; }
html.phone .order-progress { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- arrange mode ---- */
.city-arrange {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  padding: 5px 11px; font-size: 12.5px; line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.city-arrange[hidden], .arrange-bar[hidden] { display: none; }
.arrange-bar {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border-radius: 16px; font-size: 12.5px;
  background: color-mix(in srgb, var(--pill, #fff8ea) 94%, transparent);
  border: 2px solid var(--accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.arrange-hint { flex: 1; min-width: 160px; }
.arrange-btns { display: flex; gap: 6px; }
.arrange-btns .btn { padding: 6px 11px; font-size: 12.5px; }
html.arranging .city-reset { bottom: 64px; }
html.arranging .city-banner.city-gl { cursor: default; }
html.phone .city-arrange { display: none; }
html.phone .city-win .arrange-bar { bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
html.phone.arranging .city-win-foot { display: none; }
html.phone .arrange-btns { width: 100%; }
html.phone .arrange-btns .btn { flex: 1; }
/* Desktop: a taller view while arranging, the bar below it, not over it. */
html.arranging:not(.phone) .city-banner.city-gl,
html.arranging:not(.phone)[data-skin] .city-banner.city-gl { aspect-ratio: 16 / 8; }
html:not(.phone) .arrange-bar { position: static; margin: 8px 10px 10px; }
html.arranging:not(.phone) .city-reset { bottom: 76px; }
.perk-sum { grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); }
.perk-sec { font: 700 12.5px var(--font-display, sans-serif); margin: 8px 2px 2px; }
.perk-sec .muted { font: 500 11px var(--font-body, sans-serif); }
.arrange-bonus {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap; cursor: pointer;
  border: 0; background: none; font: inherit; color: inherit; padding: 0;
}
.nb-chip {
  font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 99px;
  background: rgba(0,0,0,.06); opacity: .55;
}
.nb-chip.on { opacity: 1; }
.nb-fountain.on { background: #2f9bff33; } .nb-postbox.on { background: #ff6a3d33; }
.nb-market.on { background: #ffb40040; } .nb-townhall.on { background: #9b5cff33; } .nb-lamp.on { background: #f2d43a55; }
.nb-total { font-size: 12px; font-weight: 700; color: var(--good); margin-left: 4px; }
html.phone .arrange-hint { min-width: 0; flex-basis: 100%; }

/* ---- decorations shop ---- */
.decor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; margin-top: 6px; }
.decor-tile {
  display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer;
  padding: 7px 4px 6px; border-radius: 12px; font: inherit; color: var(--text);
  background: color-mix(in srgb, #ff6fb5 10%, var(--panel-2, #fff));
  border: 2px solid color-mix(in srgb, #ff6fb5 35%, transparent);
}
.decor-tile:hover { filter: brightness(1.04); }
.decor-tile.is-poor { opacity: .55; }
.decor-glyph { font-size: 22px; line-height: 1.2; }
.decor-tile b { font-size: 11.5px; }
.decor-price { font-size: 11px; font-weight: 700; color: var(--muted); }
.popover:has(.decor-grid) { width: min(380px, calc(100vw - 20px)); max-height: calc(100vh - 20px); overflow-y: auto; }
.nb-decor.on, .nb-statue.on { background: #ff6fb533; }
.arrange-btns .btn[hidden] { display: none; }
/* DOM board fallback: the item a graduating top tier becomes, in a corner badge. */
.cell.graduates { position: relative; }
.cell.graduates::after {
  content: attr(data-next); position: absolute; top: 2px; right: 2px; z-index: 2;
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
  background: #fff; border: 2px solid var(--good);
}

/* ---- upgrading homes ---- */
.up-ladder { display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; font-size: 26px; }
.up-ladder i { font-style: normal; font-size: 16px; color: var(--muted); }
.up-ladder b { font-size: 15px; font-family: var(--font-display, sans-serif); }
.up-need {
  display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 12px;
  background: rgba(0,0,0,.05); border: 2px solid transparent;
}
.up-need.ok { border-color: var(--good); }
.up-need > div { flex: 1; display: flex; flex-direction: column; }
.up-need .muted { font-size: 12px; }
.up-need .need-glyph { --c: var(--accent); }
.up-tick { font-weight: 800; font-size: 17px; color: var(--muted); }
.up-need.ok .up-tick { color: var(--good); }
.up-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.up-btns .btn { flex: 1; }
.pin-card { border-style: dashed; }
.up-noroom { color: var(--bad, #d9534f); font-weight: 600; }

/* =====================================================================
   TWO SCREENS. The city is home: the island full screen, pills on top,
   the objective as a chip, tools and a big Merge button at the bottom.
   Merge slides the board sheet up over it (a centred column when wide).
   ===================================================================== */
html.phone body { background: var(--bg); }
.city-page { position: fixed; inset: 0; z-index: 1; overflow: hidden; }
.city-page .city-banner,
html.phone[data-skin] .city-page .city-banner.city-gl {
  position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto;
}
.city-page .city-banner .city-svg { width: 100%; height: 100%; }
.city-top {
  position: absolute; z-index: 3; left: 10px; right: 10px; top: max(10px, env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 7px;
}
.city-goal {
  position: absolute; z-index: 3; left: 10px; right: 10px; top: calc(max(10px, env(safe-area-inset-top, 0px)) + 48px);
  margin: 0 auto; max-width: 440px; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 7px 12px; border-radius: 16px; cursor: pointer; font: inherit; color: var(--text);
  background: color-mix(in srgb, var(--pill, #fff8ea) 94%, transparent); border: 2px solid var(--pill-edge, #ecd3a6);
  box-shadow: 0 3px 0 var(--pill-edge, #ecd3a6);
}
.goal-avatar { font-size: 26px; }
.goal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.goal-text b { font: 700 15px var(--font-display, sans-serif); }
.goal-text span { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-count { font: 700 13px var(--font-display, sans-serif); background: var(--accent); color: #fff; padding: 2px 9px; border-radius: 99px; }
.city-foot {
  position: absolute; z-index: 3; left: 10px; right: 10px; bottom: max(14px, env(safe-area-inset-bottom, 0px));
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; pointer-events: none;
}
.city-tools { display: flex; gap: 8px; pointer-events: auto; }
.ctool {
  position: relative; width: 48px; height: 48px; border-radius: 15px; padding: 0; font-size: 22px; cursor: pointer;
  background: color-mix(in srgb, var(--pill, #fff8ea) 94%, transparent); border: 2px solid var(--pill-edge, #ecd3a6);
  box-shadow: 0 3px 0 var(--pill-edge, #ecd3a6);
}
.ctool[hidden] { display: none; }
.merge-btn {
  pointer-events: auto; position: relative; padding: 14px 26px; border-radius: 22px; border: 0; cursor: pointer;
  font: 700 21px var(--font-display, sans-serif); color: #fff; background: var(--good);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--good) 60%, #000);
}
.merge-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--good) 60%, #000); }
.merge-btn .fab-badge { top: -9px; right: -9px; background: var(--accent); }
.merge-btn.has-ready { animation: mergePulse 1.8s ease-in-out infinite; }
@keyframes mergePulse { 50% { transform: scale(1.05); } }
html.arranging .city-foot, html.arranging .city-goal { display: none; }
.city-page .arrange-bar { bottom: max(14px, env(safe-area-inset-bottom, 0px)); }

/* the board sheet */
html.phone .app {
  position: fixed; z-index: 20; left: 0; right: 0; top: 100%; height: 100dvh;
  background: var(--bg); transition: top .32s cubic-bezier(.2, .9, .3, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .25);
}
body.sheet-open .app { top: 0; }
@media (prefers-reduced-motion: reduce) { html.phone .app { transition: none; } }
.city-back { font-size: 20px; }
@media (min-width: 700px) {
  html.phone .app { left: calc(50% - 280px); right: calc(50% - 280px); }
  body.sheet-open .city-page::after { content: ''; position: absolute; inset: 0; z-index: 4; background: rgba(30, 20, 10, .35); }
}

/* resident orders: faces with speech bubbles */
html.phone .orders-strip { order: 0; flex: none; }
html.phone .orders {
  display: flex; gap: 8px; overflow-x: auto; overflow-y: visible; margin: 0; padding: 24px 2px 4px; scrollbar-width: none;
}
html.phone .orders::-webkit-scrollbar { display: none; }
.rcard {
  flex: none; position: relative; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 3px 5px; border-radius: 16px; cursor: pointer; font: inherit; color: var(--text);
  background: var(--panel, #fff); border: 2px solid var(--pill-edge, #ecd3a6);
}
.r-bubble {
  position: absolute; top: -19px; left: 50%; transform: translateX(-50%); z-index: 1;
  display: flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 14px; white-space: nowrap;
  background: #fff; border: 2px solid var(--pill-edge, #ecd3a6); font-size: 18px; line-height: 1.25;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
}
.r-bubble::after {
  content: ''; position: absolute; bottom: -7px; left: 50%; margin-left: -5px;
  border: 5px solid transparent; border-top-color: var(--pill-edge, #ecd3a6); border-bottom: 0;
}
.r-bubble small { font: 700 10.5px var(--font-display, sans-serif); color: var(--muted); margin-left: 2px; }
.r-qty { font: 700 11px var(--font-display, sans-serif); }
.r-ok { color: var(--good) !important; font-size: 13px !important; }
[data-skin="synth"] .r-bubble { background: #1d0a3a; }
.r-face {
  position: relative; margin-top: 13px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-size: 26px; background: color-mix(in srgb, var(--c, var(--accent)) 18%, #fff);
}
[data-skin="synth"] .r-face { background: color-mix(in srgb, var(--c, var(--accent)) 25%, #1d0a3a); }
.r-name { font: 700 10.5px var(--font-body, sans-serif); max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-reward { font: 700 10px var(--font-body, sans-serif); color: var(--muted); white-space: nowrap; }
.r-pin { position: absolute; top: -5px; right: -7px; font-size: 13px; font-style: normal; }
.rcard.ready { border-color: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 30%, transparent); }
.rcard.ready .r-bubble { border-color: var(--good); }
.rcard.ready .r-bubble::after { border-top-color: var(--good); }
.rcard.ready .r-face { animation: rBob 1.2s ease-in-out infinite; }
@keyframes rBob { 50% { transform: translateY(-3px); } }
.crate-card .r-face {
  background: radial-gradient(circle, var(--panel, #fff) 56%, transparent 58%),
              conic-gradient(var(--accent) var(--fill), rgba(0, 0, 0, .1) 0);
}
.rcard.ghost { opacity: .6; border-style: dashed; background: transparent; }
.rcard.ghost .r-face { background: rgba(0, 0, 0, .06); }
html.phone .layout { justify-content: flex-end; }
.progress-list .perks { max-height: none; overflow: visible; }

/* The board gets the room: no card around it, nearly edge to edge. */
html.phone .board-wrap, html.phone[data-skin] .board-wrap {
  background: none !important; border: 0 !important; box-shadow: none !important;
  padding: 0 !important; border-radius: 0 !important;
}
html.phone .app { padding-left: 4px; padding-right: 4px; }
html.phone .selbar { padding: 0 6px; margin-bottom: 4px; }

/* ---- combo banner ---- */
.combo-banner {
  position: fixed; z-index: 105; transform: translate(-50%, -50%); pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 18px; border-radius: 18px;
  background: rgba(255, 255, 255, .94); border: 3px solid #ffd27a; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  animation: comboPop 1.7s cubic-bezier(.2, .9, .3, 1) forwards; white-space: nowrap;
}
.combo-banner b { font: 700 30px var(--font-display, sans-serif); letter-spacing: .02em; color: #f0a020;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.combo-banner span { font: 700 13px var(--font-body, sans-serif); color: #5b4532; }
.combo-banner i { font: 700 12px var(--font-display, sans-serif); font-style: normal; color: #fff;
  background: #ff4d8d; padding: 1px 9px; border-radius: 99px; margin-top: 2px; }
.combo-banner.c3 { border-color: #ffb347; } .combo-banner.c3 b { color: #ff8a1f; font-size: 34px; }
.combo-banner.c4 { border-color: #ff7a45; } .combo-banner.c4 b { color: #ff5a2a; font-size: 38px; }
.combo-banner.c5 { border-color: #ff4d8d; background: #fff4fa; } .combo-banner.c5 b { color: #e8307a; font-size: 42px; }
[data-skin="synth"] .combo-banner { background: rgba(22, 6, 46, .94); }
[data-skin="synth"] .combo-banner span { color: #f6eaff; }
@keyframes comboPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  24% { transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; transform: translate(-50%, -58%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -75%) scale(.95); }
}
@media (prefers-reduced-motion: reduce) { .combo-banner { animation: none; } }

/* ---- undo ---- */
.selrow { display: flex; align-items: center; gap: 6px; width: 100%; }
.selrow .selbar { flex: 1; min-width: 0; }
.undo-btn {
  flex: none; width: 34px; height: 30px; margin-bottom: 4px; border-radius: 10px; cursor: pointer; padding: 0;
  background: var(--pill, #fff8ea); border: 2px solid var(--pill-edge, #ecd3a6);
  font: 700 18px/1 var(--font-display, sans-serif); color: var(--text);
}
.undo-btn:disabled { opacity: .35; cursor: default; }

/* ---- the objective: a window opened from the mayor's order card ---- */
html.phone .objective-panel.win { display: none; }
html.phone body[data-win="objective"] .objective-panel.win { display: block; }
html.phone body .objective-panel.win .objective { display: block; }
html.phone body .objective-panel.win .host { margin: 0 0 10px; }
html.phone body .objective-panel.win .host-bubble { display: block; }
html.phone body .objective-panel.win .objective-blurb,
html.phone body .objective-panel.win .objective-reward { display: block; }
html.phone body .objective-panel.win .needs { display: grid; gap: 8px; }
html.phone body .objective-panel.win .need { padding: 8px; }
html.phone body .objective-panel.win .need-glyph { width: 40px; height: 40px; font-size: 22px; }
html.phone body .objective-panel.win .need-info strong,
html.phone body .objective-panel.win .need-have { display: inline; }
html.phone body .objective-panel.win .need .btn { padding: 7px 14px; font-size: 14px; }
.mayor-card { border-color: #ff8a3d; background: #fff4e8; width: 80px; }
.mayor-card .r-bubble { border-color: #ff8a3d; }
.mayor-card .r-bubble::after { border-top-color: #ff8a3d; }
.mayor-card .r-face {
  background: radial-gradient(circle, #fff4e8 56%, transparent 58%), conic-gradient(#ff8a3d var(--fill), rgba(0, 0, 0, .1) 0);
}
.mayor-card.ready { border-color: var(--good); animation: mayorPing 1.4s ease-in-out infinite; }
@keyframes mayorPing { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--good) 35%, transparent); } }
[data-skin="synth"] .mayor-card { background: #2a0f4a; }
html.phone body .objective-panel.win { padding-top: 54px !important; }
html.phone body .objective-panel.win h2 { display: block; position: absolute; top: 16px; left: 16px; margin: 0; }
html.phone body .objective-panel.win .needs { grid-template-columns: 1fr; grid-column: auto; }
html.phone body .objective-panel.win .need { display: flex; align-items: center; flex: none; width: 100%; }
html.phone body .objective-panel.win .need-explain { flex: 1; }
html.phone body .objective-panel.win .need-info { flex-direction: column; }
html.phone body .objective-panel.win .host-text { -webkit-line-clamp: unset; display: block; overflow: visible; }

/* ---- room for the board: everything above it compact and top-aligned ---- */
html.phone .layout { justify-content: flex-start; gap: 4px; }
html.phone .app { gap: 4px; padding-left: 3px; padding-right: 3px; }
html.phone .orders { padding: 19px 2px 2px; gap: 6px; }
html.phone .rcard { width: 64px; padding: 4px 3px 3px; border-radius: 14px; }
html.phone .rcard .r-face { width: 34px; height: 34px; font-size: 21px; margin-top: 10px; }
html.phone .rcard .r-bubble { top: -16px; font-size: 16px; padding: 1px 7px; }
html.phone .mayor-card { width: 76px; }
html.phone .selbar { height: 26px; margin-bottom: 0; }
html.phone .phone-hud .undo-btn { width: 38px; height: 38px; margin: 0; border-radius: 13px; font-size: 20px; }

/* ---- the selected-tile bar floats over the orders row ---- */
html.phone .orders-strip { position: relative; }
html.phone .orders-strip .selrow {
  position: absolute; left: 4px; right: 4px; bottom: 2px; z-index: 3; display: none;
  padding: 4px 6px; border-radius: 14px;
  background: color-mix(in srgb, var(--pill, #fff8ea) 97%, transparent); border: 2px solid var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
html.phone .orders-strip .selrow.on { display: flex; }
html.phone .orders-strip .selbar { height: 30px; }

/* ---- the selected-tile bar: under the board again, always shown ---- */
html.phone .board-wrap .selrow {
  position: static; display: flex; margin-top: 6px; padding: 3px 8px; border-radius: 14px; width: 100%;
  background: color-mix(in srgb, var(--accent) 14%, var(--pill, #fff8ea)); border: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: none;
}
html.phone .board-wrap .selbar { height: 30px; }
html.phone .board-wrap .sel-hint { text-align: center; color: #a0662e; font-weight: 700; }

/* ---- item icons in the interface (rendered, js/icons.js) ---- */
img.ico { width: 1.25em; height: 1.25em; vertical-align: -0.28em; object-fit: contain; }
.r-bubble img.ico { width: 22px; height: 22px; }
.need-glyph img.ico, .inspect-glyph img.ico, .pop-glyph img.ico, .shop-glyph img.ico { width: 80%; height: 80%; }
.pop-step img.ico { width: 26px; height: 26px; }
.sel-glyph img.ico { width: 24px; height: 24px; }
.up-ladder img.ico { width: 34px; height: 34px; }
