/* shayyanmalik.com: "a pocket universe that notices you" */

:root {
  color-scheme: dark;
  --bg: #05060b;
  --ink: #eef0fb;
  --ink-2: #a6abc6;
  --ink-3: #6c7192;
  --line: rgba(190, 200, 255, 0.12);
  --line-2: rgba(190, 200, 255, 0.22);
  --glass: rgba(14, 16, 30, 0.5);
  --glass-hi: rgba(28, 31, 54, 0.62);
  --accent: #8f9cff;
  --accent-2: #5ce1e6;
  --accent-ink: #090a14;
  --glow: rgba(143, 156, 255, 0.42);
  --ok: #5be49b;
  --warn: #ffc56b;
  --bad: #ff6b7a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gutter: clamp(16px, 4vw, 36px);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f3f1ec;
  --ink: #15141d;
  --ink-2: #4b4959;
  --ink-3: #8a8797;
  --line: rgba(21, 20, 29, 0.1);
  --line-2: rgba(21, 20, 29, 0.2);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-hi: rgba(255, 255, 255, 0.78);
  --accent: #5a46ff;
  --accent-2: #0a8fa0;
  --accent-ink: #ffffff;
  --glow: rgba(90, 70, 255, 0.22);
  --ok: #12915a;
  --warn: #b06a00;
  --bad: #d6334a;
  --shadow: 0 30px 70px rgba(40, 30, 80, 0.14);
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; } /* never let a layout rule un-hide something */
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 999px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

#cosmos { position: fixed; inset: 0; width: 100vw; height: 100dvh; display: block; z-index: 0; touch-action: none; }
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(42% 38% at 30% 34%, var(--neb-1), transparent 70%),
    radial-gradient(38% 34% at 74% 66%, var(--neb-2), transparent 70%),
    radial-gradient(130% 95% at 50% 45%, transparent 55%, color-mix(in srgb, var(--bg) 70%, transparent) 100%);
}
/* static on purpose: an animated, blended full-screen layer costs a lot of GPU on every frame */
:root { --neb-1: rgba(120, 96, 255, 0.1); --neb-2: rgba(40, 170, 210, 0.06); }
:root[data-theme='light'] { --neb-1: rgba(90, 70, 255, 0.06); --neb-2: rgba(10, 143, 160, 0.05); }
.flash { position: fixed; inset: 0; z-index: 50; pointer-events: none; background: #fff; opacity: 0; }
.flash.go { animation: flash 0.9s var(--ease); }
@keyframes flash { 0% { opacity: 0.55; } 100% { opacity: 0; } }

/* ---------- top bar ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.mark {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px;
  font: 500 12px/1 var(--mono); letter-spacing: 0.12em; text-decoration: none; color: var(--ink);
}
.mark svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.mark .ring-track { fill: none; stroke: var(--line); stroke-width: 1.5; }
.mark .ring-arc {
  fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round;
  transition: stroke-dashoffset 1s var(--ease), stroke 0.4s; opacity: 0;
}
.mark.live .ring-arc { opacity: 1; }
.mark.warn .ring-arc { stroke: var(--warn); }
.mark.warn { animation: breathe 2.4s ease-in-out infinite; }
.mark .ring-label {
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translate(-6px, -50%);
  font: 500 11px/1 var(--mono); letter-spacing: 0.08em; color: var(--ink-2); white-space: nowrap;
  opacity: 0; transition: 0.35s var(--ease); pointer-events: none;
}
.mark:hover .ring-label, .mark:focus-visible .ring-label { opacity: 1; transform: translate(0, -50%); }
@keyframes breathe { 50% { filter: drop-shadow(0 0 10px var(--warn)); } }

.actions { display: flex; gap: 8px; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass); color: var(--ink-2);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: color 0.3s, border-color 0.3s, background 0.3s, transform 0.4s var(--spring), box-shadow 0.4s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); box-shadow: 0 0 24px var(--glow); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .i-sun, :root[data-theme='light'] .icon-btn .i-moon { display: none; }
:root[data-theme='light'] .icon-btn .i-sun { display: block; }
.icon-btn[aria-pressed='true'] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.icon-btn .i-wave { opacity: 0.35; transition: opacity 0.3s; }
.icon-btn[aria-pressed='true'] .i-wave { opacity: 1; }
.text-btn {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass);
  font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: 0.3s var(--ease);
}
.text-btn:hover { color: var(--ink); border-color: var(--line-2); }

/* ---------- type ---------- */
.label { font: 500 11px/1.2 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }
.display { font: italic 400 clamp(44px, 8.5vw, 112px)/0.95 var(--serif); letter-spacing: -0.01em; }
.title { font: 400 clamp(30px, 4.6vw, 52px)/1.05 var(--serif); letter-spacing: -0.005em; }
.title em { font-style: italic; color: var(--accent); }
.sub { color: var(--ink-2); font-size: 14px; }

/* ---------- landing ---------- */
.stage {
  position: relative; z-index: 2; height: 100dvh; display: grid; place-items: center; text-align: center;
  padding: 0 var(--gutter); pointer-events: none;
}
.stage-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; transform: translateY(min(24vh, 210px)); }
.stage .label { opacity: 0; filter: blur(8px); transition: 1.2s var(--ease) 1.6s; }
.ready .stage .label { opacity: 1; filter: none; }
.pill {
  pointer-events: auto; position: relative; display: inline-flex; align-items: center; gap: 12px;
  height: 54px; padding: 0 30px 0 34px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line-2); background: var(--glass); color: var(--ink);
  font: 500 12px/1 var(--mono); letter-spacing: 0.28em; text-transform: uppercase;
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
  transition: transform 0.5s var(--spring), box-shadow 0.5s var(--ease), border-color 0.4s, letter-spacing 0.5s var(--ease);
  opacity: 0; translate: 0 12px;
}
.ready .stage .pill { animation: rise 1s var(--ease) 2s forwards; }
.pill::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--spin, 0deg), transparent 0 60%, var(--accent) 75%, var(--accent-2) 85%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 4s linear infinite; opacity: 0.85;
}
.pill:hover { box-shadow: 0 0 0 1px var(--glow), 0 10px 50px var(--glow); letter-spacing: 0.34em; }
.pill .arrow { transition: transform 0.5s var(--spring); }
.pill:hover .arrow { transform: translateX(4px); }
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
@keyframes rise { to { opacity: 1; translate: 0 0; } }

.hint {
  position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); left: 0; right: 0; z-index: 3; text-align: center;
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3);
  opacity: 0; transition: opacity 1.2s var(--ease); pointer-events: none;
}
.ready .hint { opacity: 1; transition-delay: 3s; }
.hint.gone { opacity: 0 !important; transition-delay: 0s; }
.hint b { color: var(--ink-2); font-weight: 500; }

/* ---------- panels + forms ---------- */
.center {
  position: relative; z-index: 2; min-height: 100dvh; display: grid; place-items: center;
  padding: 90px var(--gutter) 40px;
}
.panel {
  position: relative; width: min(100%, 400px); padding: 36px 32px 30px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--glass); box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  opacity: 0; translate: 0 16px; scale: 0.98;
}
.ready .panel { animation: panel-in 1s var(--ease) 0.35s forwards; }
@keyframes panel-in { to { opacity: 1; translate: 0 0; scale: 1; } }
.panel .title { text-align: center; }
.panel .sub { text-align: center; margin-top: 10px; }
.step { display: grid; gap: 0; }
.step[hidden] { display: none; }
.step.enter { animation: step-in 0.6s var(--ease); }
@keyframes step-in { from { opacity: 0; translate: 24px 0; filter: blur(6px); } }

.field { position: relative; margin-top: 28px; }
.field input {
  width: 100%; height: 54px; padding: 22px 18px 8px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: color-mix(in srgb, var(--glass-hi) 60%, transparent);
  color: var(--ink); font: 400 15px/1 var(--sans); outline: none; transition: 0.35s var(--ease);
}
.field label {
  position: absolute; left: 18px; top: 50%; translate: 0 -50%; color: var(--ink-3); font-size: 14px;
  pointer-events: none; transition: 0.3s var(--ease); transform-origin: left center;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: 16px; scale: 0.78; color: var(--ink-2); }
.field input:focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), 0 0 30px var(--glow); }

.btn {
  position: relative; overflow: hidden; width: 100%; height: 52px; margin-top: 14px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--accent-2)));
  color: var(--accent-ink); font: 500 12px/1 var(--mono); letter-spacing: 0.22em; text-transform: uppercase;
  transition: transform 0.4s var(--spring), box-shadow 0.4s, opacity 0.3s;
}
.btn:hover { box-shadow: 0 10px 40px var(--glow); transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  translate: -120% 0; transition: none;
}
.btn.busy::after { animation: sheen 1.1s linear infinite; }
@keyframes sheen { to { translate: 120% 0; } }
.link-btn { color: var(--ink-2); font-size: 13px; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; transition: 0.3s; }
.link-btn:hover { color: var(--ink); text-decoration-color: var(--ink-2); }
.link-btn[disabled] { opacity: 0.5; pointer-events: none; text-decoration: none; }
.fine { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--ink-3); }
.row { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 12px; }

/* code input: one real input under six visual slots */
.otp { position: relative; margin-top: 26px; }
.otp input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.001; font-size: 16px;
  letter-spacing: 2em; caret-color: transparent; border: 0; outline: none; background: transparent; color: transparent;
}
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; pointer-events: none; }
.slot {
  height: 58px; border-radius: var(--r-sm); border: 1px solid var(--line); display: grid; place-items: center;
  font: 500 24px/1 var(--mono); background: color-mix(in srgb, var(--glass-hi) 60%, transparent);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.35s var(--spring), color 0.25s;
}
.slot.filled { transform: translateY(-2px); border-color: var(--line-2); }
.slot.cursor { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.slot.cursor::after { content: ''; width: 1.5px; height: 24px; background: var(--accent); animation: blink 1s steps(2) infinite; }
.otp.bad .slot { border-color: var(--bad); color: var(--bad); }
.otp.good .slot { border-color: var(--ok); color: var(--ok); box-shadow: 0 0 22px color-mix(in srgb, var(--ok) 35%, transparent); }
@keyframes blink { 50% { opacity: 0; } }

.constellation { display: block; width: 100%; height: 56px; margin-top: 4px; overflow: visible; }
.constellation line { stroke: var(--accent); stroke-width: 1; opacity: 0; stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset 0.6s var(--ease), opacity 0.3s, stroke 0.3s; }
.constellation line.on { opacity: 0.6; stroke-dashoffset: 0; }
.constellation circle { fill: var(--ink-3); transition: fill 0.3s, r 0.5s var(--spring); }
.constellation circle.on { fill: var(--accent); r: 3.6px; filter: drop-shadow(0 0 6px var(--accent)); }
.constellation.bad line { stroke: var(--bad); opacity: 0.8; stroke-dashoffset: 40; }
.constellation.good circle { fill: var(--ok); filter: drop-shadow(0 0 8px var(--ok)); }
.status { min-height: 20px; margin-top: 14px; text-align: center; font-size: 13px; color: var(--ink-2); transition: color 0.3s; }
.status.bad { color: var(--bad); }
.status.ok { color: var(--ok); }
.tries { display: inline-flex; gap: 5px; vertical-align: middle; margin-left: 8px; }
.tries i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.tries i.left { background: var(--ink-2); }

.remember { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); cursor: pointer; transition: border-color 0.3s; }
.remember:hover { border-color: var(--line-2); }
.remember input { position: absolute; opacity: 0; pointer-events: none; }
.remember .switch { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); transition: background 0.3s; }
.remember .switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: translate 0.35s var(--spring); }
.remember input:checked + .switch { background: var(--accent); box-shadow: 0 0 16px var(--glow); }
.remember input:checked + .switch::after { translate: 16px 0; background: var(--accent-ink); }
.remember input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 3px; }
.remember-text { font-size: 13.5px; color: var(--ink); }
.remember-text small { display: block; margin-top: 2px; font: 500 10.5px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

.timer { display: inline-flex; align-items: center; gap: 8px; }
.timer svg { width: 16px; height: 16px; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 2; }
.timer .t-track { stroke: var(--line); }
.timer .t-arc { stroke: var(--ink-2); stroke-dasharray: 37.7; transition: stroke-dashoffset 1s linear; }

.back {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  text-decoration: none; color: var(--ink-2); font: 500 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: 0.3s;
}
.back:hover { color: var(--ink); border-color: var(--line-2); }

/* ---------- home: orbit launcher ---------- */
.home {
  position: relative; z-index: 2; height: 100dvh; display: grid; grid-template-rows: auto 1fr; place-items: center;
  padding: 104px var(--gutter) 24px;
}
.greet { text-align: center; }
.greet .label { display: block; margin-bottom: 12px; }
.greet .title span { display: inline-block; opacity: 0; translate: 0 0.35em; filter: blur(10px); }
.ready .greet .title span { animation: letter 0.9s var(--ease) forwards; animation-delay: calc(0.25s + var(--i) * 0.035s); }
@keyframes letter { to { opacity: 1; translate: 0 0; filter: none; } }

.orbit { position: relative; width: min(92vw, 720px); aspect-ratio: 1.75; align-self: center; }
.orbit svg.paths { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit svg.paths ellipse { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 6; }
.core {
  position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, var(--accent) 45%, transparent 72%);
  box-shadow: 0 0 40px 10px var(--glow); animation: core 4s ease-in-out infinite;
}
:root[data-theme='light'] .core { background: radial-gradient(circle, var(--accent) 0 35%, transparent 72%); }
@keyframes core { 50% { scale: 1.25; } }
.planet {
  position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink); border: 1px solid var(--line-2);
  background: radial-gradient(circle at 32% 28%, var(--glass-hi), color-mix(in srgb, var(--bg) 82%, transparent) 70%);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transition: box-shadow 0.4s, border-color 0.4s, scale 0.5s var(--spring); will-change: transform;
  opacity: 0;
}
.ready .planet { animation: pop 0.9s var(--spring) forwards; animation-delay: calc(0.7s + var(--i) * 0.09s); }
@keyframes pop { from { opacity: 0; scale: 0.3; } to { opacity: 1; scale: 1; } }
.planet svg { width: 24px; height: 24px; }
.planet:hover, .planet:focus-visible { scale: 1.16; border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent), 0 0 44px var(--glow); }
.planet .name {
  position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% -4px; white-space: nowrap;
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2);
  opacity: 0; transition: 0.3s var(--ease); pointer-events: none;
}
.planet:hover .name, .planet:focus-visible .name { opacity: 1; translate: -50% 0; }
.planet kbd { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; font: 500 10px/1 var(--mono); color: var(--ink-3); background: var(--bg); border: 1px solid var(--line); opacity: 0; transition: 0.3s; }
.planet:hover kbd { opacity: 1; }
.planet[data-tone='azka'] { color: #ff8fbf; }
:root[data-theme='light'] .planet[data-tone='azka'] { color: #c23a74; }

.sheet-scrim { position: fixed; inset: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 40%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.4s var(--ease); }
.sheet-scrim.on { opacity: 1; }
.sheet {
  position: fixed; z-index: 21; left: 50%; top: 50%; width: min(calc(100vw - 32px), 420px); translate: -50% -50%;
  padding: 30px 28px 26px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--glass-hi);
  backdrop-filter: blur(26px) saturate(150%); -webkit-backdrop-filter: blur(26px) saturate(150%); box-shadow: var(--shadow);
  transform-origin: center;
}
.sheet .icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--glass); }
.sheet .icon svg { width: 22px; height: 22px; }
.sheet h2 { margin-top: 18px; font: 400 34px/1 var(--serif); }
.sheet p { margin-top: 10px; color: var(--ink-2); }
.sheet .chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font: 500 10.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.sheet .chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.sheet .go { margin-top: 18px; text-decoration: none; display: grid; place-items: center; }
.sheet .x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); transition: 0.3s; }
.sheet .x:hover { color: var(--ink); background: var(--glass); }
.sheet-body > * { opacity: 0; translate: 0 8px; }
.sheet.open .sheet-body > * { animation: rise 0.5s var(--ease) forwards; }
.sheet.open .sheet-body > *:nth-child(2) { animation-delay: 0.05s; }
.sheet.open .sheet-body > *:nth-child(3) { animation-delay: 0.1s; }
.sheet.open .sheet-body > *:nth-child(4) { animation-delay: 0.15s; }
.sheet.open .sheet-body > *:nth-child(5) { animation-delay: 0.2s; }

/* ---------- azka ---------- */
.azka-stage .stage-inner { transform: translateY(20vh); }
.love {
  pointer-events: auto; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  color: #ff8fbf; border: 1px solid color-mix(in srgb, #ff8fbf 40%, transparent); background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform 0.5s var(--spring), box-shadow 0.4s;
  opacity: 0; translate: 0 12px;
}
:root[data-theme='light'] .love { color: #c23a74; }
.ready .love { animation: rise 1s var(--ease) 1.6s forwards; }
.love:hover { box-shadow: 0 0 40px rgba(255, 143, 191, 0.45); }
.love:active { transform: scale(0.88); }
.love svg { width: 26px; height: 26px; }
.note { min-height: 2.6em; max-width: 30ch; font: italic 400 22px/1.3 var(--serif); color: var(--ink-2); transition: opacity 0.4s; }

/* ---------- toast, cursor, comets ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 60; translate: -50% 20px;
  padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--glass-hi);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow);
  font: 500 12px/1 var(--mono); letter-spacing: 0.08em; color: var(--ink); opacity: 0; pointer-events: none;
  transition: opacity 0.4s var(--ease), translate 0.6s var(--spring); white-space: nowrap; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; translate: -50% 0; }
.toast[data-tone='gold'] { color: #ffcf70; border-color: rgba(255, 207, 112, 0.4); }

.has-cursor, .has-cursor * { cursor: none !important; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.cursor-on .cursor-dot, .cursor-on .cursor-ring { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--ink); }
.cursor-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.cursor-ring::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--ink-2);
  transition: scale 0.45s var(--spring), border-color 0.3s, background 0.3s;
}
.cursor-ring.hot::after { scale: 1.6; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.cursor-ring.down::after { scale: 0.7; }

.comet { position: fixed; left: 0; top: 0; z-index: 5; width: 150px; height: 26px; margin: -13px 0 0 -140px; display: block; }
.comet::before {
  content: ''; position: absolute; right: 8px; top: 50%; width: 140px; height: 2px; translate: 0 -50%; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-2) 70%, #fff);
}
.comet::after { content: ''; position: absolute; right: 4px; top: 50%; width: 8px; height: 8px; translate: 0 -50%; border-radius: 50%; background: #fff; box-shadow: 0 0 14px 4px var(--accent-2); }
:root[data-theme='light'] .comet::after { background: var(--accent); }
.comet.caught::after { animation: caught 0.6s var(--ease) forwards; }
.comet.caught::before { opacity: 0; transition: opacity 0.2s; }
@keyframes caught { to { scale: 6; opacity: 0; } }

.leaving .top, .leaving main, .leaving .hint { opacity: 0; filter: blur(8px); transition: 0.45s var(--ease); }

/* theme switch uses a circular reveal instead of the default crossfade */
.vt-theme::view-transition-old(root), .vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.45s; }

/* ---------- phone ---------- */
@media (max-width: 560px) {
  .panel { padding: 30px 22px 24px; }
  .slot { height: 52px; font-size: 21px; }
  .slots { gap: 6px; }
  .orbit { width: 82vw; aspect-ratio: 0.9; }
  .planet { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .planet .name { opacity: 1; translate: -50% 0; font-size: 9.5px; }
  .planet kbd { display: none; }
  .stage-inner { transform: translateY(14vh); }
  .mark .ring-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .stage .label, .pill, .panel, .planet, .love, .greet .title span { opacity: 1 !important; translate: none !important; filter: none !important; scale: 1 !important; }
}
