/* Kydanet Black Friday 2026. Dark by default; light on the toggle.
   Kydanet Blue is the only interactive colour; the harvest tones mark what's live. */

:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --blue: #2563FF;
  --blue-hi: #4D7BFF;
  --amber: #F5A524;
  --orange: #F08A24;
  --ember: #E8483F;
  --gold: #E9A21B;
  --cranberry: #B4233C;
  --warm: linear-gradient(180deg, #FFCB6B 0%, #F5A524 38%, #F08A24 62%, #E8483F 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.22, 1.2, .36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06080F;
  --bg2: #0A0E21;
  --ink: #F4F1EA;
  --ink2: rgba(244, 241, 234, .70);
  --ink3: rgba(244, 241, 234, .46);
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .14);
  --glass: rgba(16, 21, 38, .58);
  --chip: rgba(255, 255, 255, .045);
  --chip2: rgba(255, 255, 255, .07);
  --thumb: rgba(255, 255, 255, .12);
  --bar: rgba(255, 255, 255, .075);
  --shadow: 0 40px 100px -40px rgba(0, 0, 0, .85);
  --live-ink: #FFC15E;
  --live-wash: rgba(245, 165, 36, .13);
  --table: rgba(255, 190, 110, .42);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #F4EEE3;
  --bg2: #ECE6DA;
  --ink: #11182B;
  --ink2: rgba(17, 24, 43, .72);
  --ink3: rgba(17, 24, 43, .50);
  --line: rgba(17, 24, 43, .09);
  --line2: rgba(17, 24, 43, .16);
  --glass: rgba(255, 252, 246, .66);
  --chip: rgba(17, 24, 43, .04);
  --chip2: rgba(17, 24, 43, .065);
  --thumb: #FFFFFF;
  --bar: rgba(17, 24, 43, .08);
  --shadow: 0 40px 90px -45px rgba(80, 50, 20, .35);
  --live-ink: #B8560B;
  --live-wash: rgba(240, 138, 36, .14);
  --table: rgba(184, 86, 11, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { background: rgba(37, 99, 255, .35); }

/* ---------- Sky ---------- */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .9; transition: opacity .6s var(--ease); }
.g1 { width: 60vmax; height: 46vmax; right: -14vmax; top: -22vmax; background: radial-gradient(closest-side, rgba(37, 99, 255, .30), transparent); animation: drift1 26s ease-in-out infinite alternate; }
.g2 { width: 64vmax; height: 40vmax; left: -18vmax; bottom: -20vmax; background: radial-gradient(closest-side, rgba(240, 138, 36, .26), transparent); animation: drift2 30s ease-in-out infinite alternate; }
.g3 { width: 44vmax; height: 30vmax; right: 6vmax; bottom: -18vmax; background: radial-gradient(closest-side, rgba(232, 72, 63, .20), transparent); animation: drift1 34s ease-in-out infinite alternate-reverse; }
html[data-theme="light"] .g1 { background: radial-gradient(closest-side, rgba(37, 99, 255, .16), transparent); }
html[data-theme="light"] .g2 { background: radial-gradient(closest-side, rgba(240, 138, 36, .24), transparent); }
html[data-theme="light"] .g3 { background: radial-gradient(closest-side, rgba(232, 72, 63, .14), transparent); }
.grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .16; mix-blend-mode: overlay;
}
html[data-theme="light"] .grain { opacity: .22; mix-blend-mode: multiply; }
@keyframes drift1 { to { transform: translate3d(-6vmax, 4vmax, 0) scale(1.08); } }
@keyframes drift2 { to { transform: translate3d(7vmax, -3vmax, 0) scale(1.1); } }

.leaves { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- Top bar ---------- */
.top {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 10px;
  max-width: 1440px; width: 100%; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; border-radius: 8px; outline-offset: 4px; }
.logo { height: 26px; width: auto; }
html[data-theme="dark"] .logo.on-light, html[data-theme="light"] .logo.on-dark { display: none; }
.maker {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 11px 0 9px; border-radius: 99px;
  background: var(--chip); border: 1px solid var(--line);
  color: var(--ink2); font-size: 12px; font-weight: 600; letter-spacing: .01em; text-decoration: none;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.maker img { width: 17px; height: auto; }
.maker:hover { color: var(--ink); border-color: var(--line2); }
.maker-short { display: none; }
.top-actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--chip);
  cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--chip2); border-color: var(--line2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
html[data-theme="dark"] .i-moon, html[data-theme="light"] .i-sun { display: none; }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; }

/* ---------- Stage ---------- */
.stage {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  align-items: center; gap: clamp(28px, 4.5vw, 72px);
  max-width: 1440px; width: 100%; margin: 0 auto;
  padding: 4px clamp(16px, 4vw, 48px) 0;
}

/* ---------- Hero ---------- */
.hero { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-width: 0; }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 28px; }
.live-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px 0 10px; border-radius: 99px;
  background: var(--live-wash); color: var(--live-ink);
  font-size: 12.5px; font-weight: 650; letter-spacing: .01em;
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid var(--amber); opacity: 0; animation: ping 2.2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.4); opacity: .9; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
.next-chip { font-size: 12.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.next-chip b { color: var(--ink2); font-weight: 600; }

.display {
  margin: 2px 0 0;
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(46px, 6.1vw, 96px); line-height: .94; letter-spacing: -.025em;
  text-wrap: balance;
}
.display em {
  font-style: italic; font-weight: 500; padding-right: .06em;
  background: linear-gradient(100deg, #FFD27A 0%, #F5A524 30%, #F08A24 55%, #E8483F 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: sheen 9s ease-in-out infinite alternate;
}
html[data-theme="light"] .display em { background-image: linear-gradient(100deg, #D9822B 0%, #C2410C 45%, #B4233C 90%); }
@keyframes sheen { to { background-position: 100% 0; } }
.lede { margin: 0; max-width: 52ch; color: var(--ink2); font-size: clamp(15px, 1.15vw, 17px); line-height: 1.5; text-wrap: pretty; }

.mine { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.mine-label { font-size: 13px; font-weight: 650; color: var(--ink2); display: flex; align-items: center; gap: 8px; }
.mine-label .tag { height: 20px; padding: 0 8px; border-radius: 99px; display: inline-flex; align-items: center; background: var(--live-wash); color: var(--live-ink); font-size: 11.5px; }
.mine-where { font-size: 12.5px; color: var(--ink3); }

/* Clocks: rolling digits */
.clock { display: flex; align-items: flex-start; gap: .32em; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.clock.big { font-size: clamp(38px, 4.4vw, 60px); }
.clock.sm { font-size: 26px; }
.cg { display: flex; flex-direction: column; align-items: center; gap: 0; }
.cd { display: flex; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.dg { display: inline-block; height: 1em; overflow: hidden; }
.roll { display: flex; flex-direction: column; transition: transform .55s var(--spring); }
.roll i { display: block; height: 1em; font-style: normal; text-align: center; width: .62em; }
.cl { font-family: var(--sans); font-size: max(10.5px, .19em); line-height: 1.1; margin-top: .22em; font-weight: 600; color: var(--ink3); letter-spacing: .02em; }
.sep { font-weight: 300; line-height: 1; color: var(--ink3); transform: translateY(-.05em); opacity: .7; }
.clock.done .roll i { color: var(--live-ink); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  font-size: 15px; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
  -webkit-tap-highlight-color: transparent; overflow: hidden; isolation: isolate;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.btn.primary {
  color: #fff; background: linear-gradient(180deg, #3D78FF, #2563FF 60%, #1F55E0);
  box-shadow: 0 10px 28px -10px rgba(37, 99, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn.primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .32) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -12px rgba(37, 99, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.primary:hover::after { transform: translateX(120%); }
.btn.primary:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--chip); border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { background: var(--chip2); border-color: var(--line2); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.btn.quiet { background: var(--chip2); color: var(--ink2); box-shadow: none; }

.fine { margin: 0; font-size: 12.5px; color: var(--ink3); line-height: 1.5; max-width: 52ch; }
.fine a { color: var(--ink2); text-decoration-color: var(--line2); text-underline-offset: 3px; }
.fine.small { font-size: 12px; }

/* ---------- Panel ---------- */
.panel {
  position: relative; min-width: 0;
  display: flex; flex-direction: column;
  height: clamp(500px, calc(100dvh - 280px), 640px);
  padding: 12px; border-radius: 30px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(150%); backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: background .5s var(--ease), border-color .5s var(--ease);
}
.panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), transparent 30%, transparent 70%, rgba(245, 165, 36, .22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
html[data-theme="light"] .panel::before { background: linear-gradient(160deg, rgba(255, 255, 255, .9), transparent 35%, transparent 70%, rgba(240, 138, 36, .28)); }

.seg {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr);
  height: 42px; padding: 4px; border-radius: 15px; background: var(--chip2); flex: none;
}
.seg button {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer; border-radius: 11px;
  font-size: 13.5px; font-weight: 650; color: var(--ink3); transition: color .25s var(--ease);
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.seg button[aria-selected="true"] { color: var(--ink); }
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3);
  border-radius: 11px; background: var(--thumb);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .45s var(--spring);
}

.views { position: relative; flex: 1; min-height: 0; margin-top: 12px; }
.view {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 12px; padding: 2px 4px 4px;
  scrollbar-width: none; overscroll-behavior: contain;
}
.view::-webkit-scrollbar { display: none; }
.view.is-on { animation: viewIn .5s var(--ease) both; }
.view.from-left.is-on { animation-name: viewInL; }
@keyframes viewIn { from { opacity: 0; transform: translate3d(18px, 0, 0); } }
@keyframes viewInL { from { opacity: 0; transform: translate3d(-18px, 0, 0); } }

/* Where: summary */
.summary {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  min-height: 56px; padding: 10px 12px 10px 10px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--chip); cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.summary:hover { background: var(--chip2); border-color: var(--line2); }
.flagstack { display: flex; flex: none; padding-left: 6px; }
.flagstack .fl { width: 30px; height: 30px; margin-left: -8px; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); border: 2px solid var(--bg2); font-size: 17px; line-height: 1; overflow: hidden; animation: popIn .5s var(--spring) both; }
html[data-theme="light"] .flagstack .fl { background: #fff; border-color: #fff; }
.summary-text { flex: 1; min-width: 0; font-size: 14px; color: var(--ink2); }
.summary-text strong { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 2px; }
.summary-more { display: inline-flex; align-items: center; gap: 2px; color: var(--blue-hi); font-size: 13px; font-weight: 650; }
html[data-theme="light"] .summary-more { color: var(--blue); }
.summary-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } }

/* Where: ribbon */
.ribbon-wrap { padding: 12px 12px 10px; border-radius: 20px; background: var(--chip); border: 1px solid var(--line); }
.ribbon-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink3); margin-bottom: 10px; }
.link-btn { border: 0; background: none; padding: 4px 2px; cursor: pointer; color: var(--blue-hi); font-size: 12.5px; font-weight: 650; white-space: nowrap; }
html[data-theme="light"] .link-btn { color: var(--blue); }
.ribbon {
  position: relative; height: 128px; display: flex; align-items: flex-end; gap: 3px;
  padding-top: 26px; cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  border-radius: 10px; outline-offset: 6px;
}
.bar {
  position: relative; flex: 1 1 0; min-width: 0; height: var(--h, 40%);
  border-radius: 5px; background: var(--bar); overflow: hidden;
  transition: background .6s var(--ease), box-shadow .6s var(--ease), transform .35s var(--spring), opacity .4s var(--ease);
  transform-origin: bottom;
}
.bar.live { background: var(--warm); box-shadow: 0 0 22px -6px rgba(245, 165, 36, .65); }
.bar.ended { background: var(--bar); opacity: .45; }
.bar.next::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--p, 0%);
  background: linear-gradient(180deg, rgba(255, 203, 107, .95), rgba(240, 138, 36, .85));
  animation: breathe 1.8s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .55; } }
.bar.sel { transform: scaleY(1.06); box-shadow: 0 0 0 2px var(--blue-hi), 0 0 24px -4px rgba(77, 123, 255, .6); }
.bar.live.sel { box-shadow: 0 0 0 2px var(--blue-hi), 0 0 26px -4px rgba(245, 165, 36, .8); }
.bar.mine::before { content: ""; position: absolute; left: 50%; top: 5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #fff; opacity: .9; }
.front {
  position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; pointer-events: none;
  background: linear-gradient(180deg, transparent 18px, rgba(255, 210, 122, .95) 26px, rgba(240, 138, 36, .2));
  transition: transform .9s var(--spring), opacity .4s var(--ease);
  filter: drop-shadow(0 0 6px rgba(245, 165, 36, .8));
}
.front span {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  height: 20px; padding: 0 8px; border-radius: 99px; display: inline-flex; align-items: center;
  background: var(--amber); color: #2A1500; font-size: 11px; font-weight: 750; white-space: nowrap; letter-spacing: .01em;
}
.axis { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--ink3); }

/* Where: lane */
.lane { padding: 14px 14px 12px; border-radius: 20px; background: var(--chip); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; }
.lane-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.lane-id { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.zone-pill { align-self: flex-start; height: 24px; padding: 0 9px; border-radius: 8px; display: inline-flex; align-items: center; font-family: var(--mono); font-size: 12px; font-weight: 600; background: var(--chip2); color: var(--ink); }
.lane-cities { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.lane-state { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lane-state .k { font-size: 11.5px; font-weight: 650; color: var(--ink3); }
.lane-state .v { font-size: 13px; color: var(--ink2); }
.lane-state .badge { height: 22px; padding: 0 9px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; background: var(--live-wash); color: var(--live-ink); font-size: 11.5px; font-weight: 700; }
.lane-state .badge.off { background: var(--chip2); color: var(--ink3); }
.chips { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; flex: 1 1 auto; min-height: 36px; max-height: 104px; overflow-y: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); padding-bottom: 6px; }
.chips::-webkit-scrollbar { display: none; }
.chips.short { -webkit-mask-image: none; mask-image: none; }
.chip { height: 28px; padding: 0 10px 0 6px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; background: var(--chip2); font-size: 12.5px; color: var(--ink2); white-space: nowrap; animation: chipIn .4s var(--ease) both; }
.chip small { color: var(--ink3); font-size: 11.5px; }
@keyframes chipIn { from { opacity: 0; transform: translateY(4px); } }
.fl { font-size: 16px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.fl.code { font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .02em; width: 20px; height: 15px; border-radius: 4px; display: inline-grid; place-items: center; background: var(--thumb); color: var(--ink2); }
.flagstack .fl.code { width: 30px; height: 30px; border-radius: 50%; font-size: 9px; }

/* Deals */
.deals-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink2); }
.mini-seg { display: inline-flex; flex: none; padding: 3px; border-radius: 11px; background: var(--chip2); }
.mini-seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ink3); font-size: 12.5px; font-weight: 650; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease); }
.mini-seg button[aria-checked="true"] { background: var(--thumb); color: var(--ink); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .5); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.plan {
  --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 16px 14px 14px; border-radius: 22px; overflow: hidden;
  background: var(--chip); border: 1px solid var(--line);
  transition: transform .4s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
  transform-style: preserve-3d;
}
.plan::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(320px circle at var(--mx) var(--my), rgba(255, 255, 255, .09), transparent 45%); opacity: 0; transition: opacity .3s var(--ease); }
.plan:hover::before { opacity: 1; }
.plan:hover { border-color: var(--line2); }
.plan.best { background: linear-gradient(180deg, rgba(245, 165, 36, .12), var(--chip) 55%); border-color: rgba(245, 165, 36, .35); }
.plan-tag { position: absolute; top: 12px; right: 12px; height: 22px; padding: 0 8px; border-radius: 99px; display: inline-flex; align-items: center; background: var(--amber); color: #2A1500; font-size: 11px; font-weight: 750; }
.plan-name { font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.plan-line { font-size: 12.5px; color: var(--ink3); margin-top: -6px; min-height: 2.9em; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 0; }
.price-was { font-size: 14px; font-weight: 600; color: var(--ink3); text-decoration: line-through; text-decoration-color: var(--ember); text-decoration-thickness: 1.5px; font-variant-numeric: tabular-nums; }
.price-now { font-size: clamp(26px, 2.4vw, 32px); font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.05; white-space: nowrap; }
.price-then { margin-top: 2px; font-size: 12px; color: var(--ink3); }
.facts { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink2); flex: 1; }
.facts li { display: flex; gap: 7px; align-items: flex-start; }
.facts svg { width: 14px; height: 14px; flex: none; margin-top: 2px; fill: none; stroke: var(--live-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.perk { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--chip); border: 1px solid var(--line); }
.perk p { margin: 0; font-size: 13px; color: var(--ink2); line-height: 1.45; }
.perk strong { color: var(--ink); font-weight: 650; }
.perk-ico { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(37, 99, 255, .16); color: var(--blue-hi); }
.perk-ico.warm { background: var(--live-wash); color: var(--live-ink); }
.perk-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Week */
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 2px 9px; border-radius: 16px; border: 1px solid var(--line); background: var(--chip);
  cursor: pointer; transition: background .25s var(--ease), border-color .25s var(--ease), transform .3s var(--spring);
  -webkit-tap-highlight-color: transparent; min-width: 0;
}
.day:hover { background: var(--chip2); }
.day:active { transform: scale(.96); }
.day .wd { font-size: 11.5px; font-weight: 650; color: var(--ink3); }
.day .dn { font-size: 21px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.day .ic { height: 16px; display: grid; place-items: center; color: var(--ink3); }
.day .ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.day.special .ic { color: var(--live-ink); }
.day[aria-selected="true"] { background: var(--thumb); border-color: var(--line2); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .6); }
.day.today::after { content: "Today"; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); height: 16px; padding: 0 6px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; }
.day.past .dn { color: var(--ink3); }
.weekbar { height: 4px; border-radius: 99px; background: var(--bar); overflow: hidden; }
.weekbar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--warm); transition: width 1s var(--ease); }
.note { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: var(--chip); border: 1px solid var(--line); min-height: 108px; }
.note-being { flex: none; width: 76px; height: 76px; display: grid; place-items: center; border-radius: 22px; background: var(--chip2); }
.note-kicker { font-size: 11.5px; font-weight: 650; color: var(--ink3); margin-bottom: 3px; }
.note.is-today .note-kicker { color: var(--live-ink); }
.note-title { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
.note-text { margin: 4px 0 0; font-size: 13.5px; color: var(--ink2); line-height: 1.45; }
.note.swap .note-body { animation: viewIn .45s var(--ease) both; }
.week-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- The table (Beings) ---------- */
.table { position: relative; z-index: 2; height: 186px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 38px; }
.table::before {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 38px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--table) 20%, var(--table) 80%, transparent);
}
.table::after {
  content: ""; position: absolute; left: 50%; bottom: 10px; width: min(900px, 90vw); height: 90px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(245, 165, 36, .14), transparent); pointer-events: none;
}
.beings { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: clamp(8px, 2.6vw, 34px); }
.seat { position: relative; display: grid; place-items: end center; }
.seat::after { content: ""; position: absolute; bottom: -5px; left: 18%; right: 18%; height: 8px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .45), transparent); z-index: -1; }
html[data-theme="light"] .seat::after { background: radial-gradient(closest-side, rgba(70, 40, 10, .22), transparent); }
.being { display: block; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; border-radius: 40%; }
.being:active { cursor: grabbing; }
.being svg { overflow: visible; }
.legal { position: absolute; left: 0; right: 0; bottom: max(10px, env(safe-area-inset-bottom)); text-align: center; font-size: 11.5px; color: var(--ink3); padding: 0 16px; }
.legal a { color: var(--ink3); text-underline-offset: 2px; }
.bubble {
  position: absolute; bottom: 140px; left: 50%; z-index: 4; white-space: normal;
  max-width: min(300px, calc(100vw - 32px)); padding: 9px 13px; border-radius: 16px;
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--line2); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .6);
  font-size: 13px; line-height: 1.4; color: var(--ink);
  transform: translate(-50%, 8px) scale(.94); opacity: 0; pointer-events: none;
  transition: transform .4s var(--spring), opacity .3s var(--ease);
}
.bubble.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.bubble b { font-weight: 650; }

/* ---------- Sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(3, 4, 10, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .3s var(--ease) both; }
.sheet {
  position: fixed; z-index: 21; left: 50%; top: 50%; width: min(560px, calc(100vw - 32px)); max-height: min(78dvh, 720px);
  transform: translate(-50%, -50%); display: flex; flex-direction: column;
  border-radius: 28px; background: var(--glass); border: 1px solid var(--line2);
  -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .8); animation: sheetIn .45s var(--spring) both;
}
html[data-theme="dark"] .sheet { background: rgba(14, 18, 34, .88); }
html[data-theme="light"] .sheet { background: rgba(255, 252, 246, .92); }
@keyframes sheetIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.sheet-grip { display: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px 20px; }
.sheet-head h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.sheet-body { overflow-y: auto; padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; }
.group h3 { margin: 0 0 8px; font-size: 12.5px; font-weight: 650; color: var(--ink3); display: flex; justify-content: space-between; gap: 8px; }
.group h3 span { font-family: var(--mono); font-weight: 500; }
.group .chips { max-height: none; -webkit-mask-image: none; mask-image: none; overflow: visible; }
.sheet-split { font-family: var(--serif); font-size: 18px; font-weight: 600; margin: 4px 0 -4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 30;
  height: 38px; padding: 0 16px; border-radius: 99px; display: inline-flex; align-items: center;
  background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 650;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: transform .4s var(--spring), opacity .3s var(--ease);
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .stage { grid-template-columns: 1fr; gap: 30px; padding-top: 12px; }
  .hero { max-width: 680px; margin: 0 auto; align-items: center; text-align: center; }
  .status, .actions { justify-content: center; }
  .mine { align-items: center; }
  .lede, .fine { margin-inline: auto; }
  .panel { height: auto; width: 100%; max-width: 760px; margin: 0 auto; }
  .views { flex: none; }
  .view { position: relative; inset: auto; overflow: visible; }
  .lane { flex: none; }
  .display { font-size: clamp(46px, 9vw, 84px); }
  .table { height: 180px; margin-top: 8px; }
}
@media (min-width: 961px) and (max-width: 1180px) {
  .stage { gap: 32px; }
  .display { font-size: clamp(44px, 5.6vw, 66px); }
  .plan { padding: 14px 12px 12px; }
  .price-now { font-size: 24px; }
  .facts { font-size: 12px; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .top { gap: 8px; padding-top: max(12px, env(safe-area-inset-top)); }
  .logo { height: 23px; }
  .maker { height: 26px; font-size: 11.5px; padding: 0 9px 0 7px; }
  .icon-btn { width: 34px; height: 34px; border-radius: 11px; }
  .stage { gap: 22px; padding-top: 10px; }
  .hero { gap: 14px; }
  .display { font-size: clamp(40px, 12.4vw, 60px); }
  .lede { font-size: 14.5px; }
  .clock.big { font-size: clamp(34px, 10.5vw, 46px); }
  .actions { width: 100%; }
  .actions .btn { flex: 1 1 auto; }
  .panel { padding: 8px; border-radius: 26px; }
  .seg { height: 40px; }
  .seg button { font-size: 12.5px; }
  .ribbon { height: 112px; gap: 2px; }
  .rh-more { display: none; }
  .hero { align-items: flex-start; text-align: left; }
  .status, .actions { justify-content: flex-start; }
  .mine { align-items: flex-start; }
  .lede, .fine { margin-inline: 0; }
  .summary { gap: 10px; }
  .flagstack .fl:nth-child(n+5) { display: none; }
  .summary-text { display: flex; flex-direction: column; line-height: 1.2; font-size: 12.5px; }
  .summary-more span { display: none; }
  .lane-top { flex-direction: column; gap: 10px; }
  .lane-state { flex-direction: row; align-items: center; text-align: left; gap: 10px; }
  .chips { max-height: 132px; }
  .legal-long { display: none; }
  .bar { border-radius: 3px; }
  .plans { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; margin: 0 -4px; padding-inline: 4px; scrollbar-width: none; }
  .plans::-webkit-scrollbar { display: none; }
  .plan { scroll-snap-align: start; }
  .plan-line { min-height: 0; }
  .perks { grid-template-columns: 1fr; }
  .days { gap: 4px; }
  .day { padding: 9px 0 8px; border-radius: 13px; }
  .day .dn { font-size: 18px; }
  .day .wd { font-size: 10.5px; }
  .note { padding: 12px; gap: 12px; }
  .note-being { width: 62px; height: 62px; border-radius: 18px; }
  .note-title { font-size: 19px; }
  .table { height: 176px; padding-bottom: 40px; }
  .table::before { bottom: 40px; }
  .bubble { font-size: 12.5px; }
  .legal { font-size: 10.5px; }
  .sheet { top: auto; bottom: 0; left: 0; width: 100%; max-height: 86dvh; transform: none; border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom); animation-name: sheetUp; }
  .sheet-grip { display: block; width: 38px; height: 5px; border-radius: 99px; background: var(--line2); margin: 8px auto 0; }
  @keyframes sheetUp { from { transform: translateY(100%); } }
}
@media (max-width: 380px) {
  .maker-long { display: none; }
  .maker-short { display: inline; }
  .seg button { font-size: 12px; }
}

/* Desktop: the week note fills the panel as a stage */
@media (min-width: 961px) {
  .view { padding-bottom: 16px; -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent); }
  .price-was { order: -1; flex-basis: 100%; font-size: 13px; }
  .note { flex: 1 1 auto; flex-direction: column; justify-content: center; text-align: center; gap: 18px; padding: 24px 28px; }
  .note-being { width: 128px; height: 128px; border-radius: 36px; }
  .note-kicker { font-size: 12px; margin-bottom: 6px; }
  .note-title { font-size: 30px; }
  .note-text { max-width: 46ch; margin: 8px auto 0; font-size: 14.5px; }
  .week-actions { justify-content: center; }
}

/* Short desktop windows */
@media (min-width: 961px) and (max-height: 820px) {
  .display { font-size: clamp(42px, 5vw, 70px); }
  .hero { gap: 12px; }
  .clock.big { font-size: clamp(34px, 3.8vw, 50px); }
  .table { height: 160px; padding-bottom: 32px; }
  .table::before { bottom: 32px; }
  .panel { height: clamp(480px, calc(100dvh - 228px), 600px); }
  .ribbon { height: 100px; }
  .summary { min-height: 50px; padding-top: 8px; padding-bottom: 8px; }
  .ribbon-head { margin-bottom: 6px; }
  .note { gap: 12px; padding: 18px 24px; }
  .plan-line { display: none; }
  .note-being { width: 100px; height: 100px; border-radius: 30px; }
  .note-title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
