:root {
  --ink: #13202e;
  --ink-2: #4a5868;
  --panel: #ffffff;
  --panel-2: #f2f5f8;
  --line: #dde3ea;
  --teal: #1aa39a;
  --gold: #ffc828;
  --gold-ink: #3a2a00;
  --blue: #2f7de1;
  --red: #e04b3f;
  --green: #2fa866;
  --chrome: rgba(16, 28, 42, 0.86);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #1f6c94; color: var(--ink); font: 14px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible { outline: 3px solid #7fe3ff; outline-offset: 2px; }
.ico { width: 1.05em; height: 1.05em; vertical-align: -0.17em; margin-right: 0.18em; flex: none; }

#game { position: fixed; inset: 0; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
#map { position: absolute; inset: 0; display: block; }
#overlay { position: absolute; inset: 0; pointer-events: none; }
#overlay > * { position: absolute; left: 0; top: 0; will-change: transform; }
#overlay > button { pointer-events: auto; }

/* ---------- HUD ---------- */
.hud-top { position: absolute; top: calc(8px + var(--safe-t)); left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-left { display: flex; flex-direction: column; gap: 6px; max-width: min(380px, 58vw); pointer-events: none; }
.stagechip { margin-left: 2px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-size: 11px; font-weight: 600; }
.brand { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: #fff; font-weight: 700; letter-spacing: 0.2px; background: var(--chrome); padding: 5px 10px 5px 6px; border-radius: 999px; font-size: 13px; }
.logo { width: 18px; height: 18px; border-radius: 5px; background: url(icon.svg) center/cover; }
.hint { background: rgba(255, 255, 255, 0.95); color: var(--ink); padding: 8px 11px; border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); font-size: 13px; border-left: 4px solid var(--teal); }
.wallet { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.pill { display: inline-flex; align-items: center; gap: 2px; border: 0; background: var(--chrome); color: #fff; font-weight: 800; font-size: 16px; padding: 6px 12px; border-radius: 999px; min-width: 92px; justify-content: flex-end; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); font-variant-numeric: tabular-nums; }
.pill.gems { font-size: 15px; }
.pill.boost { background: #7b3fe4; font-size: 13px; min-width: 0; }
.pill.boost span { margin-left: 5px; font-variant-numeric: tabular-nums; }

.hud-bottom { position: absolute; left: calc((100% - var(--map-right, 0px)) / 2); transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); display: flex; gap: 6px; padding: 5px; background: var(--chrome); border-radius: 16px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); max-width: calc(100vw - 16px); }
.nb { border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; font-weight: 700; padding: 9px 12px; border-radius: 11px; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; gap: 4px; }
.nb:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); }
.nb:disabled { opacity: 0.55; }
.nb.gold { background: var(--gold); color: var(--gold-ink); }
.nb.icon { width: 40px; justify-content: center; font-size: 17px; opacity: 0.6; }
.nb.icon.on { opacity: 1; background: rgba(255, 255, 255, 0.22); }
.nb.glow { box-shadow: 0 0 0 2px var(--gold) inset; }
.badge:empty { display: none; }
.badge { background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 6px; min-width: 18px; text-align: center; }

#toasts { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(70px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; width: min(440px, calc(100vw - 24px)); }
.toast { background: var(--chrome); color: #fff; padding: 8px 13px; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25); transition: opacity 0.4s, transform 0.4s; text-align: center; }
.toast.good { background: #136f55; }
.toast.bad { background: #9c2a22; }
.toast.warn { background: #8a5a00; }
.toast.gem { background: #146b7e; }
.toast.cash { background: #6f5200; }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- Map overlay: aircraft tags ---------- */
.ptag { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; border: 0; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700; background: rgba(16, 28, 42, 0.78); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); pointer-events: none; line-height: 1.2; }
.ptag .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1.5px #fff; }
.ptag .svc { font-size: 12px; }
.ptag .short { display: none; }
.ptag.sched { background: rgba(255, 255, 255, 0.5); color: #1d3346; font-size: 10px; padding: 2px 7px; box-shadow: none; font-weight: 600; }
.ptag.sched .eta { opacity: 0.85; }
.ptag.req { pointer-events: auto; background: #fff; color: var(--ink); border: 2px solid var(--teal); font-size: 13px; padding: 4px 6px 4px 9px; min-height: 34px; outline: 3px solid rgba(26, 163, 154, 0.9); outline-offset: 2px; animation: glow-teal 1.4s ease-in-out infinite; }
.ptag.req b { background: var(--teal); color: #fff; border-radius: 999px; padding: 3px 9px; }
.ptag.hold { background: #fff; color: var(--ink); border: 2px solid #8fa0b0; font-size: 11px; padding: 3px 5px 3px 8px; }
.ptag.warn { border-color: var(--red); outline-color: rgba(255, 90, 78, 0.95); animation: flash 0.6s ease-in-out infinite; }
.ptag.warn.req b { background: var(--red); }
.tring { --u: 1; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 10.5px; font-weight: 800; background: conic-gradient(var(--teal) calc(var(--u) * 360deg), #dfe6ec 0); position: relative; color: var(--ink); }
.tring::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #fff; }
.tring { isolation: isolate; }
.tring::before { z-index: -1; }
.warn .tring { background: conic-gradient(var(--red) calc(var(--u) * 360deg), #f6d8d5 0); }
.ptag.due { pointer-events: auto; background: var(--gold); color: var(--gold-ink); font-size: 13px; padding: 6px 11px; min-height: 34px; border: 2px solid #fff; outline: 3px solid rgba(255, 200, 40, 0.95); outline-offset: 2px; animation: glow 1.2s ease-in-out infinite; }
.ptag.paid { pointer-events: auto; background: var(--blue); color: #fff; font-size: 13px; padding: 6px 12px; min-height: 34px; border: 2px solid #fff; }
.ptag.urgent { box-shadow: 0 0 0 3px var(--red), 0 2px 6px rgba(0, 0, 0, 0.3); }
.ptag .urg { background: var(--red); color: #fff; border-radius: 999px; padding: 1px 6px; font-size: 11px; }
.ptag .x { background: #7b3fe4; color: #fff; border-radius: 6px; padding: 0 4px; font-size: 10px; }
.ptag.info.wait { background: rgba(70, 82, 96, 0.85); }
.ptag.svcing { background: rgba(19, 111, 85, 0.88); }
.ptag.bad { background: var(--red); }

.ptag.mini { background: rgba(255, 255, 255, 0.9); color: var(--ink); font-size: 10.5px; padding: 2px 7px; }
.ptag.mini.warn { background: #ffe2df; }

/* ---------- Arrivals strip ---------- */
.links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.links line { stroke-width: 3; stroke-dasharray: 6 4; opacity: 0.95; stroke-linecap: round; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }
.links line.held { opacity: 0.35; }
.links line.off { display: none; }
.arrivals { position: absolute; top: calc(8px + var(--safe-t)); left: calc((100% - var(--map-right, 0px)) / 2); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: calc(100vw - 460px - var(--map-right, 0px)); z-index: 3; }
.arrivals.bottom { top: auto; bottom: calc(64px + var(--safe-b)); left: calc(6px + var(--safe-l)); right: calc(6px + var(--safe-r)); transform: none; flex-wrap: nowrap; justify-content: flex-start; max-width: none; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; }
.arrivals.bottom::-webkit-scrollbar { display: none; }
.arrivals.bottom .arr { flex: none; }
.arr { display: inline-flex; align-items: center; gap: 5px; border: 2px solid var(--teal); background: #fff; color: var(--ink); border-radius: 12px; padding: 4px 5px 4px 0; min-height: 42px; font-weight: 700; font-size: 13px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25); overflow: hidden; white-space: nowrap; }
.arr .stripe { align-self: stretch; width: 6px; margin: -4px 2px -4px 0; }
.arr b { background: var(--teal); color: #fff; border-radius: 8px; padding: 5px 10px; }
.arr .st { font-size: 11px; color: var(--ink-2); padding: 0 4px; }
.arr .urg { background: var(--red); color: #fff; border-radius: 999px; padding: 1px 5px; font-size: 11px; }
.arr.held { border-color: #9aa8b5; background: #f1f4f7; opacity: 0.9; }
.arr.warn { border-color: var(--red); animation: flash 0.6s ease-in-out infinite; }
.arr.warn b { background: var(--red); }
.arr:hover:not(:disabled) { transform: translateY(-1px); }

/* ---------- Pause ---------- */
.pausebar { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 14px; background: var(--chrome); color: #fff; padding: 14px 18px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); z-index: 6; font-size: 18px; }

/* ---------- Map overlay: buildings and signs ---------- */
.maplabel { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; border: 0; background: rgba(255, 255, 255, 0.93); color: var(--ink); border-radius: 9px; padding: 4px 6px 4px 9px; font-size: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); white-space: nowrap; }
.maplabel.stack { flex-direction: column; gap: 2px; padding: 4px 7px; }
.maplabel .lv { color: var(--ink-2); font-weight: 700; font-size: 11px; }
.chip { background: #e9edf1; color: var(--ink-2); border-radius: 6px; padding: 2px 6px; font-weight: 800; font-size: 11px; }
.chip.ok { background: var(--green); color: #fff; }
.chip.max { background: #ddd2f7; color: #4c2a9a; }
.maplabel.fac.vip { background: rgba(38, 50, 79, 0.95); color: #f5e6c0; }
.maplabel.fac.vip .lv { color: #d9b45a; }
.plotsign { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 2px solid #a07a3a; background: #fbecc9; color: #4b3510; border-radius: 10px; padding: 5px 10px; font-size: 12px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22); white-space: nowrap; }
.plotsign .price { font-weight: 800; font-size: 13px; }
.plotsign small { font-size: 10.5px; opacity: 0.85; }
.plotsign .svc { font-size: 15px; line-height: 1; }
.plotsign.locked { filter: grayscale(0.7); opacity: 0.8; }
.plotsign.afford { border-color: var(--green); background: #e3f7e9; color: #134a2c; }
.plotsign.airline { flex-direction: column; }
.plotsign.runway { padding: 3px 10px; }
.swatch { display: inline-block; width: 18px; height: 6px; border-radius: 3px; vertical-align: middle; margin-right: 5px; }
.standchip { pointer-events: auto; border: 1.5px dashed #fff; background: rgba(16, 28, 42, 0.55); color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px; padding: 3px 5px; line-height: 1.2; text-align: center; }
.standlock { font-size: 9.5px; font-weight: 700; color: rgba(255, 255, 255, 0.9); background: rgba(16, 28, 42, 0.45); border-radius: 6px; padding: 1px 4px; pointer-events: none; }
.autorow { padding: 8px 0; border-bottom: 1px solid var(--line); }
.autorow small { display: block; color: var(--ink-2); font-size: 11.5px; margin: 2px 0 4px; }
.standchip.afford { background: rgba(47, 168, 102, 0.9); border-style: solid; }
/* The next goal shines in place: a glowing outline, never a moving target. */
.next { outline: 3px solid rgba(255, 200, 40, 0.95); outline-offset: 3px; animation: glow 1.4s ease-in-out infinite; }
.next.afford { box-shadow: 0 0 0 3px rgba(255, 200, 40, 0.95), 0 3px 12px rgba(0, 0, 0, 0.3); }
.coinpop { position: absolute; pointer-events: none; color: #fff; font-weight: 900; font-size: 16px; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); transform: translate(-50%, -50%); animation: rise 1.3s ease-out forwards; white-space: nowrap; }
.shake { animation: shake 0.3s; }

@keyframes glow { 50% { outline-color: rgba(255, 200, 40, 0.2); } }
@keyframes glow-teal { 50% { outline-color: rgba(26, 163, 154, 0.2); } }
@keyframes flash { 0%, 100% { background: #fff; } 50% { background: #ffe2df; } }
@keyframes rise { from { opacity: 1; margin-top: 0; } to { opacity: 0; margin-top: -46px; } }
@keyframes shake { 25% { translate: -4px 0; } 75% { translate: 4px 0; } }

/* ---------- Sheet ---------- */
.sheet { position: absolute; top: calc(100px + var(--safe-t)); right: calc(8px + var(--safe-r)); bottom: calc(70px + var(--safe-b)); width: min(380px, calc(100vw - 16px)); background: var(--panel); border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; overflow: hidden; z-index: 5; }
.sheet[hidden] { display: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet-close { border: 0; background: var(--panel-2); width: 34px; height: 34px; border-radius: 50%; font-size: 15px; }
.sheet-body { overflow-y: auto; padding: 6px 14px 16px; overscroll-behavior: contain; }
.sheet h3 { margin: 16px 0 4px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--ink-2); }
.lead { font-size: 15px; margin: 8px 0; }
.sub { color: var(--ink-2); font-size: 12.5px; margin: 4px 0 8px; }
.note { background: var(--panel-2); border-radius: 8px; padding: 7px 9px; font-size: 12.5px; color: var(--ink-2); margin: 6px 0; }
.btn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 9px 12px; font-weight: 700; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.btn.wide { width: 100%; margin: 4px 0; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.gem:not(:disabled) { background: #e2f6fa; border-color: #8fd4e2; }
.btn.danger { background: #fdecea; border-color: #f2b8b2; color: #9c2a22; }
.btn.small { min-height: 34px; padding: 5px 10px; font-size: 12.5px; }
.btn.due { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn.paid { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn:disabled { opacity: 0.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0; }
.cmp { width: 100%; border-collapse: collapse; margin: 6px 0 8px; font-size: 13px; }
.cmp th { text-align: left; color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.cmp td, .cmp th { padding: 5px 4px; border-bottom: 1px solid var(--line); }
.cmp td:first-child { color: var(--ink-2); }
.cmp td:nth-child(3) { color: var(--green); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; margin: 6px 0; }
.stats > div { background: var(--panel-2); border-radius: 8px; padding: 6px 8px; }
.stats small { display: block; color: var(--ink-2); font-size: 11px; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 4px 0 6px; }
.slot { border: 1.5px dashed var(--line); border-radius: 8px; padding: 5px; font-size: 11.5px; min-height: 48px; }
.slot.on { border-style: solid; border-color: #b9c4cf; background: var(--panel-2); }
.slot small { display: block; color: var(--ink-2); font-size: 10.5px; overflow-wrap: anywhere; }
.owned { padding: 8px 2px; font-weight: 600; color: #13664a; border-bottom: 1px solid var(--line); }
.lockedrow { padding: 8px 2px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.lockedrow small { display: block; font-size: 11.5px; }
.toggle { display: flex; align-items: center; justify-content: space-between; padding: 7px 2px; border-bottom: 1px solid var(--line); font-weight: 600; }
.sw { width: 46px; height: 28px; border-radius: 999px; border: 0; background: #c6ced6; position: relative; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left 0.15s; }
.sw.on { background: var(--teal); }
.sw.on::after { left: 21px; }
.goals { list-style: none; padding: 0; margin: 4px 0; }
.goals li { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.goals li span { margin-left: auto; font-weight: 700; }
.goals li.done { color: #13664a; }
.goals small { color: var(--ink-2); }
.flights { list-style: none; padding: 0; margin: 0; }
.flights li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.flights li > div { flex: 1; min-width: 0; }
.flights li small { color: var(--ink-2); }
.flights .swatch { width: 6px; height: 30px; margin: 0; }

/* ---------- Modal ---------- */
.modal { position: absolute; inset: 0; background: rgba(8, 16, 26, 0.55); display: grid; place-items: center; z-index: 10; padding: 16px; }
.modal[hidden] { display: none; }
.card { background: var(--panel); border-radius: 18px; padding: 18px; width: min(420px, 100%); box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4); }
.card h2 { margin: 0 0 4px; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.choice { border: 2px solid var(--line); background: var(--panel-2); border-radius: 12px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 12.5px; min-height: 100px; }
.choice .ico { width: 28px; height: 28px; margin: 0; }
.choice .x2 { font-size: 22px; font-weight: 900; color: #7b3fe4; }
.choice:hover:not(:disabled) { border-color: var(--teal); }
.choice:disabled { opacity: 0.45; }
.choice small { color: var(--ink-2); font-size: 10.5px; }
.card.ad { text-align: center; }
.adlabel { display: inline-block; background: #fff3c4; color: #6b4e00; font-weight: 800; font-size: 11px; letter-spacing: 0.8px; padding: 3px 8px; border-radius: 6px; margin-bottom: 6px; }
.adart { height: 120px; border-radius: 12px; background: linear-gradient(#3fa4bf, #1f6c94); display: grid; place-items: center; margin: 8px 0; overflow: hidden; }
.adart span { font-size: 54px; color: #fff; animation: fly 2.5s ease-in-out infinite; }
@keyframes fly { 0%, 100% { translate: -30px 6px; } 50% { translate: 30px -6px; } }
.bar { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin: 8px 0; }
.bar i { display: block; height: 100%; background: var(--teal); transition: width 0.1s linear; }

/* ---------- Small screens ---------- */
@media (max-width: 640px), (max-height: 500px) {
  .brand { font-size: 12px; padding: 4px 9px 4px 5px; }
  .hint { font-size: 12px; padding: 6px 9px; }
  .pill { font-size: 14px; padding: 5px 10px; min-width: 76px; }
  .nb { padding: 8px 9px; font-size: 13px; min-height: 40px; }
  .maplabel { font-size: 10.5px; padding: 3px 5px 3px 7px; gap: 4px; }
  .maplabel .lv, .chip { font-size: 10px; }
  .plotsign { font-size: 10.5px; padding: 3px 7px; }
  .plotsign .price { font-size: 11.5px; }
  .plotsign small { font-size: 9.5px; }
  .ptag { font-size: 10px; padding: 2px 6px; }
  .ptag.req, .ptag.due, .ptag.paid { font-size: 11.5px; min-height: 26px; padding-top: 2px; padding-bottom: 2px; }
  .ptag.req { padding: 2px 4px 2px 7px; }
  .tring { width: 21px; height: 21px; font-size: 10px; }
  .ptag .code, .ptag .long, .arr .code { display: none; }
  .arr { min-height: 38px; font-size: 12px; }
  .arr b { padding: 4px 8px; }
  .arrivals:not(.bottom) { max-width: calc(100vw - 200px); }
  .nb .lbl { display: none; }
  .links line { stroke-width: 2; }
  .nb { padding: 8px 11px; font-size: 15px; }
  .standlock { display: none; }
  .ptag .short { display: inline; }
  .ptag.info.move:not(.keep) { display: none; }
  .ptag.req b { padding: 2px 7px; }
  .toast { font-size: 12px; padding: 6px 10px; }
  #toasts { bottom: calc(118px + var(--safe-b)); }
  .sheet { top: auto; left: calc(6px + var(--safe-l)); right: calc(6px + var(--safe-r)); width: auto; max-height: 62vh; bottom: calc(64px + var(--safe-b)); }
  .choices { grid-template-columns: 1fr; }
  .choice { flex-direction: row; min-height: 0; justify-content: flex-start; text-align: left; }
}

@media (max-height: 500px) { .brand { display: none; } }

/* ---------- Reduced motion ---------- */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
.reduce-motion .coinpop { animation: none; opacity: 1; }

/* Daily goals and streak */
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 8px 0; }
.streak .tile { background: rgba(0, 0, 0, 0.05); border-radius: 8px; padding: 5px 2px; text-align: center; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.streak .tile small { font-size: 10px; opacity: 0.7; }
.streak .tile.done { opacity: 0.55; }
.streak .tile.now { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.dgoal { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.dgoal > div { flex: 1; min-width: 0; }
.dgoal.claimed { opacity: 0.6; }
.dgoal .ok { font-weight: 700; color: #2f8a4a; }
.pbar { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.08); margin: 4px 0 2px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--gold); }

/* Stats */
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.chart { width: 100%; height: 80px; display: block; }
.chart rect { fill: var(--gold); }

/* Very narrow phones: all eight bottom-bar buttons must fit */
@media (max-width: 380px) {
  .hud-bottom { gap: 3px; }
  .hud-bottom .nb { padding-left: 8px; padding-right: 8px; }
  .hud-bottom .nb.icon { width: 36px; }
}

/* First-run tutorial coach: never blocks taps except its own Skip link. */
.coach { position: fixed; z-index: 4; max-width: 250px; background: #183a4a; color: #fff; padding: 9px 12px 7px; border-radius: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); font-size: 13.5px; line-height: 1.35; pointer-events: none; }
.coach p { margin: 0; }
.coach .coach-skip { pointer-events: auto; background: none; border: 0; color: #9fe3dc; text-decoration: underline; font-size: 12px; padding: 5px 0 1px; cursor: pointer; }
.coach-ring { position: fixed; z-index: 4; border: 3px solid #ffd84d; border-radius: 14px; pointer-events: none; animation: coachpulse 1.2s ease-in-out infinite; }
@keyframes coachpulse { 50% { opacity: 0.35; } }
.reduce-motion .coach-ring { animation: none; }
