:root {
  --bg: #140a12;
  --bg-2: #1d0f1b;
  --surface: #251322;
  --surface-2: #2f1a2c;
  --line: rgba(233, 184, 114, 0.18);
  --text: #f7eaef;
  --muted: #b99aab;
  --faint: #7d6272;
  --rose: #e8667e;
  --rose-deep: #b8405d;
  --gold: #e9b872;
  --gold-soft: #f3d7a8;
  --plum: #6b2f57;
  --radius: 22px;
  --display: 'Cormorant Garamond', Georgia, serif;
  --ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

/* Telegram to‘liq ekran: telegram-web-app.js beradigan xavfsiz chegaralar (tizim paneli + Telegram tugmalari) */
.in-telegram {
  --safe-t: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
}
.in-telegram, .in-telegram body { overscroll-behavior: none; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(232, 102, 126, 0.22), transparent 60%),
    radial-gradient(80% 50% at 100% 100%, rgba(107, 47, 87, 0.35), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100%;
  padding: calc(14px + var(--safe-t)) 16px calc(96px + var(--safe-b));
  transition: filter 0.6s ease, transform 0.6s ease;
}
body.locked .shell { filter: blur(16px) saturate(0.7); transform: scale(0.98); pointer-events: none; user-select: none; }
body.locked .tabs { filter: blur(8px); opacity: 0.5; pointer-events: none; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; }
.brand b { display: block; font: 700 26px/1 var(--display); letter-spacing: 0.02em; }
.brand small { display: block; color: var(--muted); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.pill.premium { background: linear-gradient(135deg, #e9b872, #c98a4a); color: #2a1424; border-color: transparent; }
.pill .dots { display: inline-flex; gap: 3px; }
.pill .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); }
.pill .dots i.used { background: var(--faint); opacity: 0.5; }
.icon-link {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--gold);
}
.icon-link svg { width: 18px; height: 18px; }
.brand small { white-space: nowrap; }

/* ---------- wheel view ---------- */
.hero { text-align: center; margin: 4px 0 14px; }
.hero h1 { font: 600 30px/1.1 var(--display); margin: 0 0 6px; }
.hero h1 em { color: var(--gold); font-style: italic; }
.hero p { margin: 0; color: var(--muted); font-size: 13.5px; }

.turn {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin: 0 auto 18px; max-width: 300px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.turn button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 0; border-radius: 999px; font-weight: 600; color: var(--muted);
  transition: background 0.25s, color 0.25s;
}
.turn button svg { width: 18px; height: 18px; }
.turn button[aria-pressed='true'] { background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff; box-shadow: 0 6px 18px -6px rgba(232, 102, 126, 0.7); }

.wheel-wrap { position: relative; width: min(86vw, 360px); aspect-ratio: 1; margin: 0 auto; }
.wheel-glow { position: absolute; inset: -8%; border-radius: 50%; background: radial-gradient(circle, rgba(232, 102, 126, 0.35), transparent 65%); filter: blur(10px); }
.wheel { position: absolute; inset: 0; transition: transform 5.4s cubic-bezier(0.12, 0.7, 0.08, 1); will-change: transform; }
.wheel svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5)); }
.wheel .bulb { fill: var(--gold-soft); opacity: 0.5; }
.wheel-wrap.spinning .bulb { animation: blink 0.5s infinite alternate; }
.wheel-wrap.spinning .bulb:nth-of-type(odd) { animation-delay: 0.25s; }
@keyframes blink { to { opacity: 1; } }

.pointer {
  position: absolute; z-index: 3; left: 50%; top: -14px; width: 34px; height: 44px; transform: translateX(-50%);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}
.hub {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1dc, var(--gold) 45%, #b4793c);
  color: #3a1830; font-weight: 800; font-size: clamp(12px, 3.4vw, 14px); letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 0 0 6px rgba(20, 10, 18, 0.65), 0 10px 26px rgba(0, 0, 0, 0.55), inset 0 -4px 10px rgba(120, 60, 20, 0.45);
  transition: transform 0.2s;
}
.hub:active { transform: translate(-50%, -50%) scale(0.94); }
.hub:disabled { cursor: default; }
.hub span { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; opacity: 0.75; text-transform: none; margin-top: 2px; }

.hint { text-align: center; color: var(--muted); font-size: 13px; margin: 20px 0 0; min-height: 20px; }

.section-title { font: 600 20px/1.2 var(--display); margin: 28px 2px 12px; display: flex; align-items: baseline; justify-content: space-between; }
.section-title small { font: 500 12px var(--ui); color: var(--faint); }

.history { display: grid; gap: 8px; }
.history-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.history-item .who { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.history-item b { font-weight: 600; }
.empty { color: var(--faint); font-size: 13px; text-align: center; padding: 14px; border: 1px dashed var(--line); border-radius: 16px; }

/* ---------- pose pictograms ---------- */
.pose { display: block; width: 100%; height: auto; overflow: visible; }
.pose, .pose-nested { --fig-m: #3a1830; --fig-w: #e3a63f; --fig-line: #fbf3ec; --fig-prop: #ead9d6; }
.pose.on-dark, .pose-nested.on-dark { --fig-m: #fff1e6; --fig-w: #f2bd5c; --fig-line: #2a1424; --fig-prop: rgba(255, 255, 255, 0.13); }
.pg-m { stroke: var(--fig-m); }
.pg-w { stroke: var(--fig-w); }
.pg-m-fill { fill: var(--fig-m); }
.pg-w-fill { fill: var(--fig-w); }
.pg-o { stroke: var(--fig-line); }
.pg-of { fill: var(--fig-line); }
.pg-far { opacity: 0.75; }
.pg-prop { fill: var(--fig-prop); }
.pose-nested .pg-prop { display: none; }
.pose-card { background: #fbf3ec; border-radius: 16px; display: grid; place-items: center; overflow: hidden; }
.thumb { display: grid; place-items: center; flex: none; aspect-ratio: 3 / 2; padding: 4px; background: #fbf3ec; border-radius: 12px; overflow: hidden; }
.thumb .pose { width: 100%; height: 100%; }
.hub-preview .pose { width: 80%; height: 56%; }
.art.pose-art { background: radial-gradient(circle at 50% 40%, #fffaf5, #f4e6df); }
/* Piktogramma karta ichida aniq o‘lchamda: viewBox (xMidYMid meet) uni markazda to‘liq sig‘diradi */
.art.pose-art .pose { position: absolute; left: 5%; top: 6%; width: 90%; height: 88%; }

.hub-preview {
  position: absolute; z-index: 4; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fbf3ec; display: grid; place-items: center; overflow: hidden; padding: 0 0 12%;
  box-shadow: 0 0 0 5px var(--gold), 0 0 0 9px rgba(20, 10, 18, 0.65), 0 12px 28px rgba(0, 0, 0, 0.55);
}
.hub-preview b {
  position: absolute; left: 0; right: 0; bottom: 13%; text-align: center;
  font: 700 clamp(11px, 3.2vw, 13px)/1 var(--display); color: #3a1830; letter-spacing: 0.02em;
}

/* ---------- catalog ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card {
  position: relative; overflow: hidden; text-align: left;
  padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  min-height: 150px; display: flex; flex-direction: column; gap: 10px;
}
.card h3 { margin: 0; font: 600 19px/1.1 var(--display); }
.card p { margin: 0; color: var(--muted); font-size: 11.5px; }
.card .meta { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.card.locked > *:not(.lock) { filter: blur(6px); opacity: 0.6; }
.card .lock { position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); }
.card .lock svg { width: 26px; height: 26px; }
.chip { font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }

/* ---------- adab ---------- */
.adab { display: grid; gap: 10px; }
.adab article { padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.adab h3 { margin: 0 0 6px; font: 600 19px/1.2 var(--display); color: var(--gold-soft); }
.adab p { margin: 0; color: var(--muted); font-size: 13.5px; }
.adab .nikah { border-color: rgba(233, 184, 114, 0.45); background: linear-gradient(160deg, rgba(233, 184, 114, 0.1), transparent 60%), var(--surface); }
.adab .nikah p + p { margin-top: 8px; }
.gate-note { margin-top: 16px; padding: 12px; border-radius: 14px; background: rgba(233, 184, 114, 0.08); border: 1px solid rgba(233, 184, 114, 0.25); }
.gate-note p { margin: 0; color: var(--muted); font-size: 13px; }
.halal-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 22px 0 0; color: var(--faint); font-size: 12px; text-align: center; }
.halal-note svg { width: 14px; height: 14px; flex: none; color: var(--rose); }

/* ---------- tabs ---------- */
.tabs {
  position: fixed; z-index: 5; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 5px; border-radius: 22px;
  width: min(calc(100vw - 32px), 440px);
  background: rgba(37, 19, 34, 0.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.tabs button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; border-radius: 17px; color: var(--muted); font-weight: 600; font-size: 10.5px; min-width: 0; }
.tabs button svg { width: 19px; height: 19px; }
.tabs button[aria-selected='true'] { background: var(--surface-2); color: var(--gold-soft); }

.tabs .tab-invite em {
  position: absolute; top: 2px; right: calc(50% - 22px); padding: 1px 5px; border-radius: 999px;
  background: var(--rose); color: #fff; font: 700 9px/1.4 var(--ui); font-style: normal;
}

/* ---------- invite ---------- */
.ref-alert {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; padding: 14px 16px; border-radius: 16px;
  background: rgba(232, 102, 126, 0.12); border: 1px solid rgba(232, 102, 126, 0.35);
}
.ref-alert svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--rose); }
.ref-alert b { display: block; font-size: 14px; }
.ref-alert span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.ref-hero { text-align: center; margin: 6px 0 18px; }
.eyebrow { display: inline-block; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.ref-hero h1 { margin: 6px auto 16px; max-width: 300px; font: 600 28px/1.15 var(--display); text-wrap: balance; }
.ref-rewards { display: flex; align-items: center; justify-content: center; gap: 10px; }
.reward {
  width: 112px; padding: 12px 8px; border-radius: 18px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
}
.reward b { display: block; font: 700 30px/1 var(--ui); font-variant-numeric: lining-nums tabular-nums; }
.reward span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.reward.you b { color: var(--gold-soft); }
.reward.friend b { color: #f4a3b2; }
.reward-join { color: var(--rose); }
.reward-join svg { width: 20px; height: 20px; fill: currentColor; }
.ref-sub { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

.ref-card {
  display: grid; gap: 12px; margin-bottom: 12px; padding: 18px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(233, 184, 114, 0.14), rgba(232, 102, 126, 0.08)), var(--surface);
  border: 1px solid rgba(233, 184, 114, 0.38);
}
.ref-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.code-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--bg-2); border: 1px dashed rgba(233, 184, 114, 0.5);
}
.code { font: 700 28px/1 var(--ui); letter-spacing: 0.16em; color: var(--gold-soft); font-variant-numeric: lining-nums tabular-nums; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 8px 12px; border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 600; transition: background 0.2s, color 0.2s;
}
.chip-btn svg { width: 16px; height: 16px; }
.chip-btn.ghost { background: transparent; color: var(--muted); padding: 6px 8px; }
.chip-btn.done { background: rgba(127, 209, 163, 0.16); color: #7fd1a3; }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.link-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 12.5px; }

.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.panel-head h3 { margin: 0; }
.panel-meta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.meter-bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--gold), var(--rose)); }
.ref-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.ref-metrics b { display: block; font: 700 24px/1.1 var(--ui); font-variant-numeric: lining-nums tabular-nums; }
.ref-metrics span { color: var(--muted); font-size: 12.5px; }

.ref-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ref-steps li { display: flex; gap: 12px; align-items: flex-start; }
.ref-steps i {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--gold-soft); font: 700 13px var(--ui); font-style: normal;
}
.ref-steps b { display: block; font-size: 14px; }
.ref-steps span { display: block; margin-top: 1px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.code-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.code-field { display: flex; gap: 8px; }
.code-field input {
  flex: 1 1 0; width: 100%; min-width: 0; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--text); font: 700 18px var(--ui); letter-spacing: 0.16em; text-transform: uppercase;
}
.code-field input::placeholder { color: var(--faint); opacity: 0.6; }
.code-field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.code-field input[aria-invalid='true'] { border-color: var(--rose); }
.code-field .btn { flex: none; width: auto; padding: 13px 18px; }
.field-msg { margin: 2px 0 0; color: var(--faint); font-size: 12.5px; }
.ref-metrics + .field-msg { margin-top: 12px; }
.field-msg.error { color: #f4a3b2; }
.applied { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 14px; line-height: 1.45; }
.applied svg { flex: none; width: 20px; height: 20px; color: #7fd1a3; margin-top: 1px; }

/* ---------- actions ---------- */
.actions-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.actions-row .btn { padding: 13px 10px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }

/* ---------- timer ---------- */
.timer {
  position: fixed; inset: 0; z-index: 25; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: calc(18px + var(--safe-t)) 16px calc(20px + var(--safe-b));
  background: radial-gradient(70% 50% at 50% 35%, rgba(232, 102, 126, 0.16), transparent 70%), #0d060b;
  animation: fade 0.35s ease;
}
.timer > * { width: 100%; max-width: 400px; }
.timer-top { display: flex; justify-content: space-between; align-items: center; }
.timer-cancel { color: var(--faint); font-size: 13px; padding: 8px 4px; }
.timer-ring { position: relative; width: min(72vw, 280px); aspect-ratio: 1; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.06); stroke-width: 6; }
.ring-fg { fill: none; stroke: var(--rose); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray 0.9s linear; }
.timer-ring::before {
  content: ''; position: absolute; inset: 12%; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 102, 126, 0.22), transparent 70%);
  animation: breathe 5s ease-in-out infinite;
}
.timer-ring.paused::before { animation-play-state: paused; opacity: 0.3; }
.timer-ring.paused .ring-fg { stroke: var(--faint); }
@keyframes breathe { 50% { transform: scale(1.18); opacity: 0.55; } }
.timer-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.timer-time { font: 600 clamp(48px, 15vw, 64px)/1 var(--display); font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0.02em; }
.timer-sub { margin-top: 6px; color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.timer-pose { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.timer-pose b { display: block; font: 600 20px/1.1 var(--display); }
.timer-pose small { color: var(--faint); font-size: 12px; }
.timer .note { margin: 0; }
.timer-done { text-align: center; }
.timer-done .emblem { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; }
.timer-done .emblem svg { width: 30px; height: 30px; }
.timer-done h2 { margin: 0 0 4px; font: 700 30px/1.1 var(--display); }
.timer-done p { margin: 0 0 18px; color: var(--muted); }
.rate { display: flex; justify-content: center; gap: 6px; margin-bottom: 22px; }
.rate button { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--faint); }
.rate button svg { width: 30px; height: 30px; }
.rate button.on { color: var(--rose); }
.rate button.on svg { fill: currentColor; }

/* ---------- stats ---------- */
.stat-hero {
  padding: 20px; border-radius: var(--radius); text-align: center; margin-bottom: 12px;
  background: linear-gradient(160deg, rgba(232, 102, 126, 0.18), rgba(107, 47, 87, 0.15)), var(--surface);
  border: 1px solid var(--line);
}
.stat-hero small { color: var(--muted); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.stat-hero .big { font: 700 44px/1.1 var(--display); margin: 6px 0; font-variant-numeric: lining-nums; }
.stat-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.delta { font-weight: 700; }
.delta.up { color: #7fd1a3; }
.delta.down { color: var(--rose); }

.panel { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.panel h3 { margin: 0 0 14px; font: 600 20px/1.2 var(--display); display: flex; justify-content: space-between; align-items: baseline; }
.panel h3 small { font: 500 12px var(--ui); color: var(--faint); }
.panel-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.panel .empty { margin: 0; }

.chart { position: relative; height: 170px; padding-left: 26px; }
.chart-grid { position: absolute; inset: 0 0 22px 26px; }
.chart-grid span { position: absolute; left: 0; right: 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.chart-grid i { position: absolute; left: -26px; top: -7px; width: 20px; text-align: right; font-style: normal; font-size: 10px; color: var(--faint); }
.bars { position: relative; height: 100%; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.bar-col { display: flex; flex-direction: column; align-items: center; height: 100%; padding: 0; border-radius: 8px; }
.bar-col:hover .bar, .bar-col:focus-visible .bar { filter: brightness(1.15); }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar { position: relative; width: 60%; max-width: 26px; border-radius: 4px 4px 0 0; background: #e05f78; }
.bar-val { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 3px; font-size: 11px; color: var(--text); }
.bar-label { height: 22px; line-height: 22px; font-size: 11px; color: var(--faint); }
.bar-label.today { color: var(--text); font-weight: 700; }
.chart-tip {
  position: absolute; top: -6px; transform: translate(-50%, -100%); white-space: nowrap; pointer-events: none;
  padding: 6px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; color: var(--text);
}

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.tile { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.tile small { display: block; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.tile b { display: block; font: 700 26px/1.15 var(--display); margin-top: 4px; font-variant-numeric: lining-nums; }
.tile span { color: var(--muted); font-size: 12px; }

.split-row + .split-row { margin-top: 14px; }
.split-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.split-legend { display: flex; gap: 12px; color: var(--text); }
.split-legend b { margin-left: 2px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.dot.er, .seg.er { background: #9478e6; }
.dot.xo, .seg.xo { background: #b98530; }
.split { display: flex; gap: 2px; height: 12px; }
.split.empty { background: var(--surface-2); border-radius: 4px; }
.seg { border-radius: 4px; }

.pos-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 6px 0; }
.pos-row + .pos-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.pos-txt b { display: block; font-weight: 600; }
.pos-txt small { color: var(--muted); font-size: 12px; }
.hearts-txt { color: var(--rose); letter-spacing: 1px; margin-right: 4px; }

.badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.badge { padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid rgba(255, 255, 255, 0.05); display: flex; flex-direction: column; gap: 3px; }
.badge b { font-size: 13px; }
.badge small { color: var(--faint); font-size: 11px; }
.badge-ico { font-size: 18px; color: var(--faint); }
.badge.done { border-color: rgba(233, 184, 114, 0.4); background: rgba(233, 184, 114, 0.08); }
.badge.done .badge-ico { color: var(--gold); }
.progress { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.progress i { display: block; height: 100%; background: var(--gold); border-radius: 4px; }

/* ---------- sheet ---------- */
.backdrop { position: fixed; inset: 0; z-index: 10; background: rgba(8, 3, 7, 0.6); animation: fade 0.25s ease; }
.sheet {
  position: fixed; z-index: 11; left: 50%; bottom: 0; width: 100%; max-width: 480px; transform: translateX(-50%);
  max-height: calc(92vh - var(--safe-t)); overflow-y: auto;
  padding: 10px 20px calc(22px + var(--safe-b));
  border-radius: 28px 28px 0 0; background: var(--bg-2); border: 1px solid var(--line); border-bottom: 0;
  animation: rise 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.sheet::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--faint); margin: 0 auto 14px; opacity: 0.6; }
@keyframes rise { from { transform: translate(-50%, 100%); } }
@keyframes fade { from { opacity: 0; } }

.art {
  position: relative; aspect-ratio: 16 / 10; max-height: 250px; width: 100%; border-radius: 22px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 50%), linear-gradient(140deg, var(--g1), var(--g2));
}
.art img { width: 100%; height: 100%; object-fit: cover; }
.hearts { position: absolute; inset: 0; pointer-events: none; }
.hearts i { position: absolute; bottom: -20px; width: 14px; height: 14px; color: rgba(232, 102, 126, 0.75); animation: float 2.6s ease-out forwards; }
@keyframes float { to { transform: translateY(-240px) scale(1.4); opacity: 0; } }

.who-picked { margin: 16px 0 2px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.sheet h2 { margin: 0; font: 700 34px/1.05 var(--display); }
.sheet .orig { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.stat { padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.stat small { display: block; color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat b { display: block; margin-top: 3px; font-size: 14px; }
.stat .meter { display: inline-flex; gap: 3px; margin-top: 6px; }
.stat .meter i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-2); }
.stat .meter i.on { background: var(--rose); }
.desc { margin: 0 0 12px; font-size: 15px; }
.tip { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(233, 184, 114, 0.1); color: var(--gold-soft); font-size: 13.5px; }
.tip svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.note { margin: 12px 0 0; text-align: center; color: var(--faint); font-size: 12px; }
.actions { display: grid; gap: 8px; margin-top: 16px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 15px 18px; border-radius: 16px; font-weight: 700; font-size: 15px; text-decoration: none;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep)); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(232, 102, 126, 0.8);
}
.btn.gold { background: linear-gradient(135deg, #f3d7a8, var(--gold) 50%, #c98a4a); color: #2a1424; box-shadow: 0 10px 24px -10px rgba(233, 184, 114, 0.8); }
.btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn:disabled { opacity: 0.6; }

/* ---------- paywall & gate ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  background: rgba(10, 4, 9, 0.35); animation: fade 0.4s ease;
}
.modal {
  position: relative; width: 100%; max-width: 400px; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 26px 22px 22px; border-radius: 28px; text-align: center;
  background: linear-gradient(180deg, #2c1729, #1a0d18); border: 1px solid rgba(233, 184, 114, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: pop 0.45s cubic-bezier(0.2, 0.9, 0.2, 1.1);
}
@keyframes pop { from { transform: scale(0.9); opacity: 0; } }
.modal .close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.modal .close svg { width: 18px; height: 18px; }
.modal .emblem { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), #c98a4a); color: #2a1424; }
.modal .emblem svg { width: 32px; height: 32px; }
.modal h2 { margin: 0 0 6px; font: 700 28px/1.1 var(--display); }
.modal > p { margin: 0 auto; color: var(--muted); font-size: 14px; max-width: 300px; }
.price { margin: 18px 0 4px; font: 700 44px/1 var(--display); color: var(--gold-soft); }
.price small { font: 500 14px var(--ui); color: var(--muted); }
.perks { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 8px; text-align: left; }
.perks li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); font-size: 14px; }
.perks svg { flex: none; width: 18px; height: 18px; color: var(--gold); }
.fine { margin: 12px 0 0; color: var(--faint); font-size: 11.5px; }

.toast {
  position: fixed; z-index: 30; left: 50%; top: calc(16px + var(--safe-t)); transform: translateX(-50%);
  padding: 10px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; animation: fade 0.2s ease; max-width: calc(100vw - 32px);
}

@media (min-width: 720px) {
  .shell { padding-top: 28px; }
  .hero h1 { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .wheel { transition-duration: 1.2s; }
  }
