/* ALL-TIME HIGH · styles
   Light = morning over the city. Dark = the same street at night. */

:root {
  --bg1: #EAF2FF; --bg2: #F6F3FF; --bg3: #FFF4EA;
  --ink: #1B2033; --ink2: #394058; --muted: #5F6780; --soft: #7F879E;
  --card: #FFFFFF; --card2: #F3F5FA; --line: #E1E6F0;
  --btn: #1B2033; --btnink: #FFFFFF; --focus: #6C7CF5;
  --sky1: #BFE0FF; --sky2: #DCD8FF; --sky3: #FFE2CC;
  --city1: #C2CDEA; --city2: #A9B7DE; --win: #8FA0CE; --cloud: #FFFFFF;
  --frame: #1E2336; --dim: #2A3048; --dimtext: #8A93AD; --dimsub: #5E6784;
  --walk: #C9D1E4; --curb: #AEB8D0; --tree1: #3CC9A0; --tree2: #2BB673;
  --good: #1F9E78; --bad: #D8453A;
  --shadow: 0 10px 30px rgba(27, 32, 51, 0.07);
  --shadow2: 0 20px 50px rgba(27, 32, 51, 0.13);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg1: #0C1021; --bg2: #121330; --bg3: #1B1428;
    --ink: #EDEFF7; --ink2: #C7CCDE; --muted: #9BA3BC; --soft: #858DA8;
    --card: #161B2F; --card2: #1D2339; --line: #2A3150;
    --btn: #EDEFF7; --btnink: #12162A; --focus: #9AA6FF;
    --sky1: #0B1536; --sky2: #241B4D; --sky3: #452847;
    --city1: #1A2346; --city2: #232D57; --win: #FFD47A; --cloud: #C9D2FF;
    --frame: #0D1122; --dim: #1B2137; --dimtext: #7C84A2; --dimsub: #555D7B;
    --walk: #262D4A; --curb: #313A5E; --tree1: #1E8C6E; --tree2: #177A5A;
    --good: #47C79B; --bad: #FF7468;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --shadow2: 0 20px 50px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg1: #0C1021; --bg2: #121330; --bg3: #1B1428;
  --ink: #EDEFF7; --ink2: #C7CCDE; --muted: #9BA3BC; --soft: #858DA8;
  --card: #161B2F; --card2: #1D2339; --line: #2A3150;
  --btn: #EDEFF7; --btnink: #12162A; --focus: #9AA6FF;
  --sky1: #0B1536; --sky2: #241B4D; --sky3: #452847;
  --city1: #1A2346; --city2: #232D57; --win: #FFD47A; --cloud: #C9D2FF;
  --frame: #0D1122; --dim: #1B2137; --dimtext: #7C84A2; --dimsub: #555D7B;
  --walk: #262D4A; --curb: #313A5E; --tree1: #1E8C6E; --tree2: #177A5A;
  --good: #47C79B; --bad: #FF7468;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow2: 0 20px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  background: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 50%, var(--bg3) 100%) fixed;
  background-color: var(--bg2);
  color: var(--ink);
  font: 15px/1.5 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace; }
.num { font-variant-numeric: tabular-nums; }

.app { max-width: 1180px; margin: 0 auto; padding-inline: 18px; padding-block: 0 28px; }

/* ---------------- header ---------------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding-block: 12px; margin-inline: -18px; padding-inline: 18px;
  background: color-mix(in srgb, var(--bg1) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; background: none; border: 0; padding: 0; text-align: left; }
.brand svg { flex-shrink: 0; }
.brand .name { display: block; font-size: 19px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; white-space: nowrap; }
.brand .day { display: block; font-family: 'DM Mono', monospace; font-size: 11px; color: var(--soft); line-height: 1.3; white-space: nowrap; }
.navbtn {
  height: 38px; min-width: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink2);
  display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600;
}
.navbtn svg { flex-shrink: 0; }
.navbtn:hover { border-color: var(--soft); }
.pill {
  display: flex; align-items: center; gap: 9px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 13px 5px 6px; box-shadow: var(--shadow);
}
.pill .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--fc, #F7B538); transition: background .5s; flex-shrink: 0; }
.pill .t { font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill .p { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 9px; white-space: nowrap; }

/* ---------------- layout ---------------- */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 20px; padding-top: 18px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }

/* ---------------- prompt + guess ---------------- */
.prompt { padding: 20px 22px 22px; }
.callrow { display: flex; align-items: center; gap: 12px; font-family: 'DM Mono', monospace; font-size: 11.5px; letter-spacing: 0.09em; color: var(--soft); }
.calls { display: flex; gap: 5px; }
.calls i { display: block; width: 22px; height: 6px; border-radius: 3px; background: var(--line); transition: background .4s; }
.calls i.now { background: var(--ink); }
.pmeta { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .08em; color: var(--soft); }
.diff { padding: 3px 8px; border-radius: 999px; font-weight: 500; color: #fff; background: var(--soft); }
.diff.easy { background: #1FA882; } .diff.medium { background: #E39A10; } .diff.hard { background: #D8453A; }
.prompt h1 { margin: 12px 0 0; font-size: clamp(22px, 2.9vw, 31px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.16; text-wrap: balance; }

.guess { display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 20px; }
.guess:focus-within { border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 22%, transparent), var(--shadow); }
.guess.shake { animation: shake .4s; border-color: var(--bad); }
@keyframes shake { 10%, 90% { transform: translateX(-2px) } 30%, 70% { transform: translateX(4px) } 50% { transform: translateX(-6px) } }
.guess input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; font-size: clamp(17px, 2vw, 20px); font-weight: 700; padding: 12px 0; }
.guess input::placeholder { color: var(--soft); font-weight: 500; opacity: .8; }
.guess input:disabled { color: var(--soft); }
.go { flex-shrink: 0; height: 50px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--btn); color: var(--btnink); font-weight: 700; font-size: 15px; }
.go:disabled { opacity: .35; cursor: default; }

.under { display: flex; align-items: flex-start; gap: 12px; min-height: 22px; padding: 0 6px; margin-top: -4px; }
.feedback { font-size: 14px; color: var(--ink2); line-height: 1.45; }
.feedback.bad { color: var(--bad); }
.skip { margin-left: auto; flex-shrink: 0; background: none; border: 0; font-size: 13px; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.skip.armed { color: var(--bad); font-weight: 700; }
.feedback strong { color: var(--ink); }
.feedback .yes { margin-left: 6px; height: 30px; padding: 0 12px; border-radius: 9px; border: 0; background: var(--btn); color: var(--btnink); font-size: 13px; font-weight: 700; vertical-align: middle; }

/* ---------------- result ---------------- */
.result { padding: 20px 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; animation: rise .45s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }
.result .co { font-size: clamp(23px, 2.8vw, 31px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.tag { display: inline-flex; align-items: center; gap: 7px; margin-top: 9px; font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.05em; color: var(--ink2); background: var(--card2); border-radius: 999px; padding: 5px 11px; }
.tag i, .kdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tc); flex-shrink: 0; }
.result .quip { margin-top: 9px; font-size: 15.5px; color: var(--ink2); }
.result .est { margin-top: 2px; font-size: 13px; color: var(--soft); }
.gain { text-align: right; align-self: start; }
.gain .n { font-size: clamp(36px, 4.4vw, 50px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--tc); }
.gain .l { font-family: 'DM Mono', monospace; font-size: 10.5px; letter-spacing: 0.12em; color: var(--soft); margin-top: 4px; }
.next { grid-column: 1 / -1; height: 52px; margin-top: 10px; border: 0; border-radius: 13px; background: var(--btn); color: var(--btnink); font-weight: 700; font-size: 15px; }

/* ---------------- log ---------------- */
.log { padding: 16px 20px; }
.h { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.12em; color: var(--soft); }
.empty { font-size: 14px; color: var(--soft); margin-top: 10px; }
.lg { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 46px; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lg:last-child { border-bottom: 0; }
.lg .i { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--soft); }
.lg .c { font-size: 15px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg .c small { font-weight: 500; color: var(--soft); font-size: 12.5px; margin-left: 6px; }
.lg .b { display: flex; align-items: center; gap: 6px; font-family: 'DM Mono', monospace; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.lg .p { font-family: 'DM Mono', monospace; font-size: 13px; text-align: right; color: var(--tc); }

/* ---------------- tower ---------------- */
.towercard {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + 78px);
  height: clamp(560px, calc(100vh - 110px), 760px);
  border-radius: 24px; overflow: hidden;
  background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 55%, var(--sky3) 100%);
  border: 1px solid var(--line); box-shadow: var(--shadow2);
  display: flex; flex-direction: column;
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sky .cloud { fill: var(--cloud); }
.sky .star { fill: var(--win); opacity: 0; }
:root[data-theme="dark"] .sky .star { opacity: .8; }
:root[data-theme="dark"] .sky .cloud { opacity: .12; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sky .star { opacity: .8; }
  :root:not([data-theme="light"]) .sky .cloud { opacity: .12; }
}
.skyline { position: absolute; left: 0; right: 0; bottom: 22px; height: 62%; pointer-events: none; }
.skyline svg { width: 100%; height: 100%; display: block; }
.skyline .far { fill: var(--city1); }
.skyline .near { fill: var(--city2); }
.skyline .w { fill: var(--win); opacity: .55; }

.prog { position: relative; z-index: 3; margin: 14px 14px 0; background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-radius: 14px; padding: 11px 14px; }
.prog .row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.prog .now { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.prog .to { font-size: 12px; color: var(--muted); text-align: right; }
.prog .bar { margin-top: 8px; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.prog .bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--fc, #F7B538); transition: width .9s cubic-bezier(.3, .9, .3, 1), background .5s; }

.building { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; width: calc(100% - 96px); max-width: 286px; margin: 10px auto 0; display: flex; flex-direction: column; }
.roof { flex: 0 0 58px; position: relative; }
.roof .slab { position: absolute; left: 4px; right: 4px; bottom: 0; height: 9px; background: var(--frame); border-radius: 5px 5px 0 0; }
.roof .blink { position: absolute; left: 12px; bottom: 9px; width: 6px; height: 6px; border-radius: 50%; background: #FF6F61; box-shadow: 0 0 9px #FF6F61; animation: blink 1.6s infinite; z-index: 3; }
@keyframes blink { 0%, 50% { opacity: 1 } 60%, 100% { opacity: .2 } }
.pad { position: absolute; left: 8px; right: 6px; bottom: 9px; height: 46px; z-index: 2; display: flex; align-items: flex-end; justify-content: flex-end; filter: grayscale(1) brightness(.7); opacity: .45; transition: filter .7s, opacity .7s; }
.pad.lit { filter: none; opacity: 1; }
.pad.pop { animation: hop .7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes hop { 45% { transform: translateY(-5px) } }
.pad svg { height: 46px; width: auto; display: block; }
.padchip { position: absolute; left: 0; bottom: 4px; z-index: 3; font-family: 'DM Mono', monospace; font-size: 8.5px; letter-spacing: 0.14em; background: rgba(24, 29, 48, .78); color: #A5B0CC; padding: 3px 7px; border-radius: 4px; white-space: nowrap; transition: background .6s, color .6s; }
.pad.lit .padchip { background: #19C6E6; color: #04303A; }
.rotor { transform-origin: 104px 11px; }
.pad.lit .rotor { animation: rotor 1.05s linear infinite; }
@keyframes rotor { 50% { transform: scaleX(.12) } }

.floors { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: var(--frame); border-radius: 14px 14px 0 0; padding: 7px; display: flex; flex-direction: column; gap: 5px; }
.floor { position: relative; flex: 1 1 0; min-height: 34px; width: calc(100% - 52px); border-radius: 10px; overflow: hidden; background: var(--dim); display: flex; align-items: center; padding: 0 12px; transition: background .6s, box-shadow .5s; }
.floor .lab { position: relative; z-index: 2; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.floor .nm { font-size: 13px; font-weight: 800; letter-spacing: -0.01em; color: var(--dimtext); transition: color .5s; white-space: nowrap; }
.floor .th { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--dimsub); transition: color .5s; }
.floor .vig { position: absolute; right: 6px; bottom: 0; height: 88%; max-width: 58%; opacity: .16; filter: grayscale(1); transition: opacity .6s, filter .6s; z-index: 1; }
.floor.lit { background: linear-gradient(100deg, var(--fc) 0%, var(--fc2) 100%); }
.floor.lit .nm, .floor.lit .th { color: var(--fi); }
.floor.lit .th { opacity: .75; }
.floor.lit .vig { opacity: 1; filter: none; }
.floor.cur { box-shadow: 0 0 0 3px #FFFFFF, 0 0 26px rgba(255, 255, 255, .45); }
.floor.pop { animation: pulse .6s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes pulse { 40% { transform: scale(1.04) } }
.v1 { fill: var(--v1); } .v2 { fill: var(--v2); } .v3 { fill: var(--v3); } .scr { fill: #1E2336; }

.shaft { position: absolute; right: 8px; top: 7px; bottom: 7px; width: 44px; border-radius: 10px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.shaft::before { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 2px; transform: translateX(-50%); background: rgba(255, 255, 255, .12); }
.car { position: absolute; left: 5px; right: 5px; height: 34px; top: 0; border-radius: 8px; background: #FFFFFF; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); transition: top 1.05s cubic-bezier(.45, .05, .2, 1); overflow: hidden; }
.car .lamp { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--fc, #F7B538); transition: background .5s; }
.car svg { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); }

.ground { position: relative; z-index: 3; flex: 0 0 22px; }
.ground .trees { position: absolute; left: 0; right: 0; bottom: 14px; width: 100%; height: 44px; }
.ground .trees .t1 { fill: var(--tree1); } .ground .trees .t2 { fill: var(--tree2); } .ground .trees .tr { fill: #7A5A3A; }
.ground .curb { position: absolute; left: 0; right: 0; bottom: 18px; height: 4px; background: var(--curb); }
.ground .walk { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: var(--walk); }

.promo { position: absolute; z-index: 6; left: 14px; right: 14px; top: 86px; background: var(--fc); color: var(--fi); border-radius: 16px; padding: 14px 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .28); animation: drop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.promo.out { animation: lift .35s ease-in both; }
@keyframes drop { from { opacity: 0; transform: translateY(-16px) scale(.96) } }
@keyframes lift { to { opacity: 0; transform: translateY(-10px) } }
.promo .k { font-family: 'DM Mono', monospace; font-size: 10.5px; letter-spacing: 0.14em; opacity: .85; }
.promo .t { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-top: 3px; }
.promo .s { font-size: 13.5px; margin-top: 2px; opacity: .92; }

/* ---------------- end of day ---------------- */
.verdict { padding: 24px 24px 22px; }
.verdict h2 { margin: 10px 0 0; font-size: clamp(32px, 4.8vw, 52px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; text-wrap: balance; }
.verdict h2 span { color: var(--vc); }
.verdict .s { margin-top: 12px; font-size: 16px; color: var(--ink2); }
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 15px 16px; }
.stat .k { font-family: 'DM Mono', monospace; font-size: 10.5px; letter-spacing: 0.1em; color: var(--soft); }
.stat .v { font-size: clamp(19px, 2.6vw, 27px); font-weight: 800; letter-spacing: -0.03em; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat .v.wrap { font-size: 17px; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }

.post { padding: 18px; }
.pbox { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--card2); }
.who { display: flex; align-items: center; gap: 11px; }
.av { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #6C7CF5, #A874F5); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.who .nm { font-size: 14.5px; font-weight: 800; }
.who .sub { font-size: 12px; color: var(--soft); }
.ptxt { margin-top: 12px; font-size: 15px; line-height: 1.55; }
.emo { margin-top: 10px; font-size: 20px; letter-spacing: 2px; }
.pbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 9px; margin-top: 14px; }
.pbtns > * { height: 50px; border-radius: 12px; font-size: 14.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.b1 { background: var(--btn); color: var(--btnink); border: 0; }
.b2 { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.copied { margin-top: 10px; font-size: 13px; color: var(--good); min-height: 18px; }
.fallback { width: 100%; margin-top: 10px; min-height: 120px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--card); font: 13px/1.5 'DM Mono', monospace; }

.keys { padding: 16px 20px; }
.keys details { border-top: 1px solid var(--line); padding: 12px 0; }
.keys details:first-of-type { border-top: 0; }
.keys summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; font-size: 14.5px; font-weight: 700; }
.keys summary::-webkit-details-marker { display: none; }
.keys summary .ar { color: var(--soft); font-size: 11px; transition: transform .2s; display: inline-block; }
.keys details[open] summary .ar { transform: rotate(90deg); }
.keys summary .cnt { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--soft); font-weight: 400; white-space: nowrap; }
.keys .gl { font-family: 'DM Mono', monospace; font-size: 10.5px; letter-spacing: 0.08em; color: var(--muted); margin: 14px 0 4px 24px; display: flex; align-items: center; gap: 7px; }
.keys .item { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 3px 0 3px 24px; font-size: 14px; }
.keys .item .mk { color: var(--good); font-size: 12px; font-weight: 800; }
.keys .item .nm small { color: var(--soft); font-size: 12px; margin-left: 6px; }
.keys .item.you .nm { font-weight: 800; }
.keys .item .cp { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--muted); }

.missing { padding: 16px 20px; }
.missing p { margin: 8px 0 0; font-size: 14px; color: var(--ink2); }
.missing ul { margin: 10px 0 0; padding-left: 18px; font-size: 14px; }

.nextday { padding: 18px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nextday .t { font-size: 14px; color: var(--ink2); }
.nextday .clock { font-family: 'DM Mono', monospace; font-size: 22px; font-weight: 500; letter-spacing: 0.02em; }
.nextday button { margin-left: auto; }

/* ---------------- modal ---------------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(12, 16, 33, .55); display: flex; align-items: center; justify-content: center; padding: 18px; padding-block: calc(env(safe-area-inset-top, 0px) + 18px) calc(env(safe-area-inset-bottom, 0px) + 18px); }
.modal { width: min(560px, 100%); max-height: 100%; overflow-y: auto; background: var(--card); border-radius: 22px; box-shadow: var(--shadow2); padding: 24px; position: relative; }
.modal h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.modal p { margin: 10px 0 0; color: var(--ink2); line-height: 1.6; }
.modal .x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: flex; align-items: center; justify-content: center; }
.tiers { margin-top: 14px; display: grid; gap: 6px; }
.trow { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--card2); font-size: 13.5px; }
.trow .mono { font-size: 12px; color: var(--muted); }
.trow b { font-family: 'DM Mono', monospace; font-weight: 500; width: 44px; text-align: right; }
.example { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); font-size: 14px; color: var(--ink2); }
.modal .b1 { width: 100%; height: 52px; border-radius: 13px; margin-top: 18px; font-weight: 700; font-size: 15px; }
.fine { margin-top: 12px !important; font-size: 12.5px; color: var(--soft) !important; }

.days { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.dayb { text-align: left; border: 1px solid var(--line); background: var(--card2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.dayb:hover { border-color: var(--soft); }
.dayb.cur { border-color: var(--ink); }
.dayb .d { font-weight: 800; font-size: 15px; }
.dayb .dt { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--soft); }
.dayb .st { font-size: 12.5px; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
.dayb .st i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc, var(--line)); display: inline-block; }

.s4 { margin-top: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.s4 div { background: var(--card2); border-radius: 12px; padding: 12px; text-align: center; }
.s4 b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.s4 span { font-size: 11.5px; color: var(--muted); }
.dist { margin-top: 18px; display: grid; gap: 6px; }
.drow { display: grid; grid-template-columns: 118px minmax(0, 1fr) 26px; gap: 10px; align-items: center; font-size: 13px; }
.drow .bar { height: 18px; border-radius: 5px; background: var(--card2); overflow: hidden; }
.drow .bar i { display: block; height: 100%; border-radius: 5px; background: var(--fc); min-width: 3px; }
.drow .c { font-family: 'DM Mono', monospace; font-size: 12px; text-align: right; color: var(--muted); }

.flash { position: fixed; z-index: 60; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 72px); transform: translateX(-50%); width: min(420px, calc(100% - 32px)); background: var(--fc); color: var(--fi); border-radius: 16px; padding: 13px 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); animation: drop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.flash.out { animation: lift .35s ease-in both; }
.flash .k { font-family: 'DM Mono', monospace; font-size: 10.5px; letter-spacing: .14em; opacity: .85; }
.flash .t { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.flash .s { font-size: 13px; opacity: .92; }

footer { margin-top: 26px; text-align: center; font-size: 12.5px; color: var(--soft); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
footer a { color: var(--soft); text-decoration: underline; text-underline-offset: 3px; font-size: 12.5px; }
footer button { background: none; border: 0; padding: 0; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; font-size: 12.5px; }


/* ---------------- landing ---------------- */
.land { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 22px 36px; padding-top: 40px; align-items: start; }
.hero { padding-top: 8px; }
.kick { display: inline-flex; align-items: center; gap: 9px; font-family: 'DM Mono', monospace; font-size: 11.5px; letter-spacing: 0.12em; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px 7px 11px; }
.kick .live { width: 8px; height: 8px; border-radius: 50%; background: #3CC9A0; box-shadow: 0 0 0 0 rgba(60, 201, 160, .6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(60, 201, 160, 0) } 100% { box-shadow: 0 0 0 0 rgba(60, 201, 160, 0) } }
.hero h1 { margin: 22px 0 0; font-size: clamp(44px, 6.6vw, 82px); font-weight: 800; letter-spacing: -0.05em; line-height: .98; text-wrap: balance; }
.grad { background: linear-gradient(90deg, #FF6F61, #A874F5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 22px 0 0; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--ink2); max-width: 540px; }
.howto { margin-top: 24px; display: grid; gap: 12px; max-width: 540px; }
.howto div { display: flex; gap: 13px; align-items: flex-start; font-size: 15.5px; color: var(--ink2); line-height: 1.5; }
.howto b { flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; background: var(--btn); color: var(--btnink); font-size: 13px; display: flex; align-items: center; justify-content: center; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta { height: 60px; padding: 0 34px; border: 0; border-radius: 15px; background: var(--btn); color: var(--btnink); font-size: 16px; font-weight: 800; box-shadow: 0 14px 34px rgba(27, 32, 51, .25); transition: transform .12s; }
.cta:hover { transform: translateY(-2px); }
.cta2 { height: 60px; padding: 0 26px; border-radius: 15px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 15px; font-weight: 700; }
.landsub { margin-top: 14px; font-size: 13.5px; color: var(--soft); }
.legend { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: var(--shadow2); }
.legend .lh { display: flex; justify-content: space-between; font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.12em; color: var(--soft); margin: 2px 4px 10px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--fc); color: var(--fi); margin-top: 6px; }
.lrow.roof { background: linear-gradient(90deg, #19C6E6, #6C7CF5); color: #fff; }
.lrow .n { font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; }
.lrow .j { font-size: 12.5px; opacity: .85; }
.lrow .th { margin-left: auto; font-family: 'DM Mono', monospace; font-size: 12px; opacity: .9; white-space: nowrap; }
.sample, .postcard { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px 22px; box-shadow: var(--shadow); }
.sh { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.12em; color: var(--soft); }
.sq { margin-top: 10px; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.sa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.sx { background: var(--card2); border-radius: 14px; padding: 13px 14px; display: grid; gap: 3px; border-top: 4px solid var(--tc); }
.sx .nm { font-weight: 800; font-size: 16px; }
.sx .tg { font-family: 'DM Mono', monospace; font-size: 10.5px; letter-spacing: .06em; color: var(--muted); }
.sx b { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--tc); margin-top: 4px; }
.sx em { font-style: normal; font-size: 12.5px; color: var(--soft); }
.pc { margin-top: 12px; background: var(--card2); border-radius: 14px; padding: 16px; }
.pc p { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink2); }
@media (max-width: 920px) {
  .land { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
}
@media (max-width: 560px) {
  .sa { grid-template-columns: minmax(0, 1fr); }
  .sx { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
  .sx b { grid-row: 1 / span 2; grid-column: 2; margin: 0; }
  .sx em { grid-column: 1 / -1; }
  .cta, .cta2 { flex: 1 1 100%; }
}


/* ---------------- "Play now" QR code, laptops only ---------------- */
.qr { position: fixed; z-index: 30; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px; width: 112px;
  background: #FFFFFF; color: #1B2033; border-radius: 16px; padding: 10px 10px 8px; text-align: center;
  box-shadow: 0 14px 36px rgba(20, 24, 42, .22); border: 1px solid #E1E6F0; }
.qrk { font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: .14em; margin-bottom: 6px; }
.qrimg { display: block; width: 92px; height: 92px; margin: 0 auto; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 4px; }
.qrimg svg { display: block; width: 92px; height: 92px; }
.qrimg svg rect[fill="white"], .qrimg svg rect[fill="#ffffff"] { fill: #FFFFFF; }
.qrurl { margin-top: 5px; font-size: 9.5px; color: #5F6780; line-height: 1.25; overflow-wrap: anywhere; }
.qrx { position: absolute; top: 3px; right: 5px; width: 20px; height: 20px; border: 0; background: none; color: #7F879E; font-size: 15px; line-height: 1; padding: 0; }
.qrx:hover { color: #1B2033; }
.qrbig { margin-top: 6px; width: 100%; height: 24px; border-radius: 7px; border: 1px solid #E1E6F0; background: #F4F6FA; color: #1B2033;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-family: 'DM Mono', monospace; font-size: 10.5px; letter-spacing: .08em; padding: 0; cursor: zoom-in; }
.qrbig:hover { background: #E9EDF5; }
/* full screen QR for the back rows: always black on white, whatever the theme */
.qrfull { position: fixed; inset: 0; z-index: 60; background: #FFFFFF; color: #10131F; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2vh; padding: 3vh 16px; cursor: zoom-out; }
.qrfk { font-family: 'DM Mono', monospace; font-weight: 500; font-size: clamp(14px, 2.6vh, 30px); letter-spacing: .18em; text-align: center; }
.qrfimg svg { display: block; width: min(74vh, 92vw); height: min(74vh, 92vw); }
.qrfimg svg rect[fill="white"], .qrfimg svg rect[fill="#ffffff"] { fill: #FFFFFF; }
.qrfurl { font-weight: 800; font-size: clamp(20px, 5vh, 56px); letter-spacing: -0.02em; text-align: center; overflow-wrap: anywhere; }
.qrfhint { font-size: 12px; color: #7F879E; }
.qrfx { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 16px; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid #E1E6F0; background: #FFFFFF; color: #1B2033; font-size: 24px; line-height: 1; padding: 0; }
.qrmini { position: fixed; z-index: 30; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 12px; height: 30px; padding: 0 10px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--ink2); font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .1em; }
@media (min-width: 1000px) and (max-width: 1440px) {
  body.has-qr .app { padding-right: 140px; }
}
@media (max-width: 999px) {
  .qr, .qrmini { display: none !important; }
}


/* ---------------- hints ---------------- */
.ubtns { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.ubtns .skip { margin-left: 0; }
.hintbtn { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.hintbtn::before { content: "💡 "; }
.hintbtn:hover { border-color: var(--soft); }
.hints { padding: 16px 20px; display: grid; gap: 12px; border-color: color-mix(in srgb, #E39A10 45%, var(--line)); }
.hh { display: flex; justify-content: space-between; font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .12em; color: var(--soft); }
.hcost { color: var(--bad); font-weight: 500; }
.hrow { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 15px; line-height: 1.5; color: var(--ink2); }
.hrow > b { width: 24px; height: 24px; border-radius: 7px; background: #FFF1D6; color: #8A5A00; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.mask { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: 'DM Mono', monospace; font-size: 19px; font-weight: 500; color: var(--ink); }
.mask .mw { display: inline-flex; gap: 3px; }
.mask i { font-style: normal; display: inline-block; min-width: .9em; text-align: center; }
.mask i.u { border-bottom: 2px solid var(--soft); }
.hlink { margin-top: 4px; background: none; border: 0; padding: 0; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }
.hq { font-size: 13px; color: var(--soft); margin-bottom: 6px; }
.mc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mco { text-align: left; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--card2); color: var(--ink); font-size: 14px; font-weight: 700; }
.mco:hover:not(:disabled) { border-color: var(--focus); }
.mco.off { opacity: .45; text-decoration: line-through; }
.hfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.hnext { height: 38px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--btn); color: var(--btnink); font-size: 13px; font-weight: 700; }
.hnote { font-size: 12px; color: var(--soft); }
.lg .p .hl { font-size: 11px; margin-left: 3px; }
:root[data-theme="dark"] .hrow > b { background: #3A2D12; color: #FFD27A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hrow > b { background: #3A2D12; color: #FFD27A; } }
@media (max-width: 560px) {
  .mc { grid-template-columns: minmax(0, 1fr); }
  .mask { font-size: 16px; gap: 6px 12px; }
}

/* ---------------- phones and tablets ---------------- */
@media (max-width: 920px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .towercard { position: relative; top: 0; height: 440px; }
  .navbtn .lbl { display: none; }
  .navbtn { padding: 0; width: 38px; justify-content: center; }
}
@media (max-width: 560px) {
  .app { padding-inline: 16px; }
  .top { margin-inline: -16px; padding-inline: 16px; gap: 8px; }
  .brand .name { font-size: 17px; }
  .brand svg { width: 28px; height: 28px; }
  .top { position: relative; top: 0; flex-wrap: wrap; row-gap: 10px; padding-block: 10px 12px; }
  .brand { flex: 1 1 auto; overflow: hidden; }
  .pill { order: 5; flex: 1 1 100%; padding: 4px 14px 4px 5px; box-shadow: none; }
  .pill .dot { width: 22px; height: 22px; }
  .pill .p { margin-left: auto; }
  .flash { top: calc(env(safe-area-inset-top, 0px) + 14px); }
  .result { gap: 4px 14px; }
  .result > div:first-child { display: contents; }
  .result .co { grid-column: 1; grid-row: 1; align-self: center; }
  .result .gain { grid-column: 2; grid-row: 1; }
  .result .tag, .result .quip, .result .est { grid-column: 1 / -1; justify-self: start; }
  .result .tag { margin-top: 6px; }
  .result .quip { margin-top: 6px; }
  .gain .n { font-size: 34px; }
  .navbtn.hide-sm { display: none; }
  .prompt { padding: 16px 18px 18px; }
  .guess { padding-left: 16px; }
  .go { padding: 0 16px; }
  .result { padding: 18px; }
  .stats3 { gap: 8px; }
  .stat { padding: 12px; }
  .stat .v.wrap { font-size: 15px; }
  .floor .vig { max-width: 46%; }
  .s4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drow { grid-template-columns: 96px minmax(0, 1fr) 22px; }
  .lg { grid-template-columns: 16px minmax(0, 1fr) 42px; }
  .lg .b { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* keep "DAY 14 · OCT 26" on one line */
.nw { white-space: nowrap; }
