:root {
  --bg: #120a20;
  --bg-2: #1b1030;
  --card: rgba(255, 255, 255, 0.055);
  --card-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.1);
  --ink: #fbf3f6;
  --muted: #b8a8c9;
  --rose: #ff7a9e;
  --rose-2: #ff9db4;
  --peach: #ffd2bd;
  --lilac: #cbaaff;
  --gold: #ffd08a;
  --green: #7ee0b0;
  --danger: #ff6b81;
  --hand: 'Caveat', 'Segoe Script', cursive;
  --sans: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 22px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  background:
    radial-gradient(120% 80% at 15% -10%, #3a1c4f 0%, transparent 55%),
    radial-gradient(100% 70% at 95% 8%, #4a1d3a 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 45%, #0d0718 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--peach); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.hand { font-family: var(--hand); font-weight: 700; letter-spacing: 0.2px; }
.hidden, [hidden] { display: none !important; }

/* ---------- фон ---------- */
.aurora { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora i {
  position: absolute; display: block; border-radius: 50%; filter: blur(70px); opacity: 0.5;
  animation: drift 18s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { width: 260px; height: 260px; background: #ff5f8f; top: -60px; left: -70px; }
.aurora i:nth-child(2) { width: 220px; height: 220px; background: #7b4bff; bottom: 18%; right: -90px; animation-delay: -6s; }
.aurora i:nth-child(3) { width: 200px; height: 200px; background: #ff9f6e; bottom: -80px; left: 20%; opacity: 0.28; animation-delay: -11s; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(18px, 26px, 0) scale(1.12); } }

.app {
  position: relative; z-index: 1;
  width: 100%; max-width: 560px; margin: 0 auto;
  min-height: 100dvh;
}

/* ---------- загрузка ---------- */
.splash {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(180deg, #1b1030, #0d0718);
  transition: opacity 0.45s ease, visibility 0.45s;
}
.splash.out { opacity: 0; visibility: hidden; }
.splash-heart { width: 74px; height: 74px; color: var(--rose); animation: beat 1.4s ease-in-out infinite; filter: drop-shadow(0 8px 30px rgba(255, 107, 143, 0.5)); }
.splash-heart svg { width: 100%; height: 100%; fill: currentColor; }
.splash-name { font-size: 40px; margin: 0; color: var(--peach); }
.splash-hint { color: var(--muted); font-size: 13px; margin: 0; }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.14); } 24% { transform: scale(1); } 36% { transform: scale(1.08); } 48% { transform: scale(1); } }

/* ---------- вход / онбординг ---------- */
.gate, .onboard {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.gate-card, .onboard-card {
  width: 100%; max-width: 420px; text-align: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line); border-radius: 28px; padding: 30px 24px 26px;
  backdrop-filter: blur(18px); box-shadow: var(--shadow);
}
.gate-heart { width: 58px; height: 58px; fill: var(--rose); filter: drop-shadow(0 6px 18px rgba(255, 122, 158, 0.45)); }
.gate-card h1, .onboard-card h1 { font-size: 42px; margin: 6px 0 10px; color: var(--peach); }
.gate-card p, .onboard-lead { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.onboard-lead { line-height: 1.55; }
.tiny { color: #8f7fa4; font-size: 12px; margin: 16px 0 0; }

/* ---------- кнопки ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 12px 18px;
  border: 0; border-radius: 16px;
  background: linear-gradient(135deg, var(--rose), #ff9a6f);
  color: #2a0f1c; font-weight: 700; font-size: 15.5px;
  box-shadow: 0 10px 26px rgba(255, 107, 143, 0.28);
  transition: transform 0.12s ease, filter 0.2s ease, opacity 0.2s;
}
.btn:active { transform: scale(0.975); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn.ghost {
  background: rgba(255, 255, 255, 0.06); color: var(--ink);
  border: 1px solid var(--line); box-shadow: none; font-weight: 600;
}
.btn.danger { background: linear-gradient(135deg, #ff556f, #d92e4d); color: #fff; box-shadow: 0 10px 26px rgba(255, 85, 111, 0.25); }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 13.5px; border-radius: 12px; width: auto; }
.btn + .btn { margin-top: 10px; }

/* ---------- основное ---------- */
.main { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: linear-gradient(180deg, rgba(18, 10, 32, 0.94), rgba(18, 10, 32, 0.55) 70%, transparent);
  backdrop-filter: blur(14px);
}
.pair { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, #5b2f6e, #3a1f4f);
  display: grid; place-items: center; overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  font-weight: 700; color: var(--peach);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .dot {
  position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); border: 2.5px solid #170d27;
}
.avatar .dot.off { background: #6b5c7e; }
.pair-txt { min-width: 0; }
.pair-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.days-pill {
  flex: none; text-align: center; padding: 7px 13px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
}
.days-pill b { display: block; font-size: 17px; font-family: var(--hand); color: var(--peach); line-height: 1; }
.days-pill span { font-size: 10px; color: var(--muted); }

.view { padding: 6px 16px 24px; outline: none; }
.view.is-chat { display: flex; flex-direction: column; min-height: calc(100dvh - 164px); }
.view.is-chat .chat { flex: 1 1 auto; }
.view.is-chat .chat-form { margin-top: auto; }

/* ---------- карточки ---------- */
.card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; margin-bottom: 14px;
}
.card.tight { padding: 13px; }

.hello { margin: 2px 0 16px; }
.hello h1 { font-size: 34px; margin: 0 0 2px; color: var(--peach); line-height: 1.05; }
.hello h1 .hi-heart { font-size: 0.62em; }
.hello p { color: var(--muted); margin: 0; font-size: 13.5px; }

.hero {
  display: flex; align-items: center; gap: 14px;
  background:
    radial-gradient(120% 140% at 85% 10%, rgba(255, 122, 158, 0.28), transparent 55%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 180, 200, 0.22); border-radius: 24px;
  padding: 16px; margin-bottom: 14px;
}
.hero .avatar { width: 56px; height: 56px; font-size: 18px; }
.hero-txt { flex: 1; min-width: 0; }
.hero-txt .n { font-family: var(--hand); font-size: 24px; line-height: 1.1; }
.hero-txt .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.hero-heart { width: 40px; height: 40px; fill: var(--rose); opacity: 0.85; filter: drop-shadow(0 4px 14px rgba(255, 122, 158, 0.5)); flex: none; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 14px; }
.action {
  position: relative; overflow: hidden; text-align: left;
  min-height: 104px; padding: 14px;
  border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  color: var(--ink); display: flex; flex-direction: column; justify-content: space-between;
  transition: transform 0.12s ease, border-color 0.2s;
}
.action:active { transform: scale(0.97); }
.action .ico { font-size: 23px; line-height: 1; }
.action .t { font-family: var(--hand); font-size: 21px; line-height: 1.05; margin-top: auto; }
.action .s { font-size: 11px; color: var(--muted); margin-top: 1px; }
.action::after {
  content: ''; position: absolute; width: 90px; height: 90px; right: -30px; top: -34px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 122, 158, 0.35), transparent 70%);
}
.action.wide { grid-column: span 2; min-height: 84px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 13px; }
.action.wide > span:last-child { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.action.wide .t { margin: 0; font-size: 21px; display: block; }
.action.wide .s { margin: 0; display: block; }
.action.wide .ico { font-size: 26px; }

.hug {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 60px; margin-bottom: 14px;
  border: 0; border-radius: 20px;
  background: linear-gradient(120deg, #ff6f95, #ffa774 60%, #ffd09a);
  color: #3a1020; font-weight: 700; font-size: 17px; font-family: var(--hand);
  box-shadow: 0 14px 30px rgba(255, 111, 149, 0.28);
  transition: transform 0.12s;
}
.hug:active { transform: scale(0.975); }
.hug svg { width: 24px; height: 24px; fill: currentColor; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 20px 2px 10px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #9b8aae;
}
.section-title button { background: none; border: 0; color: var(--peach); font-size: 12px; }

/* ---------- лента ---------- */
.feed { display: flex; flex-direction: column; gap: 10px; }
.event {
  display: flex; gap: 12px; padding: 13px 14px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.022));
  border: 1px solid var(--line); border-radius: 18px;
}
.event.unseen { border-color: rgba(255, 150, 180, 0.42); box-shadow: 0 0 0 1px rgba(255, 150, 180, 0.08) inset; }
.event .ico { font-size: 22px; line-height: 1.2; width: 26px; text-align: center; flex: none; }
.event .txt { min-width: 0; flex: 1; }
.event .who { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: baseline; }
.event .who b { color: var(--peach); font-weight: 600; }
.event .ttl { font-size: 14.5px; margin: 2px 0 0; overflow-wrap: anywhere; }
.event .sub { font-size: 12.5px; color: #cdbdd9; margin-top: 3px; overflow-wrap: anywhere; }
.event .time { font-size: 11px; color: #8f7fa4; flex: none; }
.event .chip-inline {
  display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.07); margin: 4px 4px 0 0;
}
.day-sep { text-align: center; font-size: 11px; color: #8f7fa4; margin: 8px 0; letter-spacing: 0.06em; }

.empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.empty p { margin: 4px 0; font-size: 13.5px; }

/* ---------- чат ---------- */
.chat { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble {
  max-width: 82%; padding: 9px 13px; border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line);
  font-size: 14.5px; overflow-wrap: anywhere; white-space: pre-wrap;
}
.bubble-row.mine .bubble {
  background: linear-gradient(135deg, #ff7a9e, #ff9a74); color: #2b0d1b; border: 0;
  border-radius: 18px 18px 6px 18px; font-weight: 500;
}
.bubble .bt { display: block; font-size: 10px; opacity: 0.6; margin-top: 3px; text-align: right; }
.chat-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0; }

.chat-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 0 calc(6px); }
.chat-form textarea {
  flex: 1; min-height: 44px; max-height: 120px; resize: none;
  padding: 11px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); color: var(--ink);
  outline: none; font-size: 15px;
}
.chat-form textarea:focus { border-color: rgba(255, 122, 158, 0.6); }
.send-btn {
  width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), #ff9a6f); display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(255, 107, 143, 0.3);
}
.send-btn svg { width: 20px; height: 20px; fill: #2a0f1c; }
.send-btn:active { transform: scale(0.94); }

/* ---------- «Мы» ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.stat {
  text-align: center; padding: 13px 6px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
}
.stat b { display: block; font-family: var(--hand); font-size: 26px; color: var(--peach); line-height: 1; }
.stat span { font-size: 10.5px; color: var(--muted); }

.list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06); background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%; text-align: left; color: var(--ink);
}
.list-row:last-child { border-bottom: 0; }
.list-row .lr-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); font-size: 16px; flex: none; }
.list-row .lr-t { flex: 1; min-width: 0; }
.list-row .lr-t b { display: block; font-weight: 500; font-size: 14.5px; }
.list-row .lr-t span { display: block; font-size: 12px; color: var(--muted); }
.list-row .chev { color: #8f7fa4; font-size: 18px; }
.list-row.danger .lr-t b { color: var(--danger); }

.reminder { display: flex; gap: 10px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.reminder:last-child { border-bottom: 0; }
.reminder .rt { flex: 1; }
.reminder .rt b { font-weight: 500; font-size: 14px; }
.reminder .rt span { display: block; font-size: 12px; color: var(--muted); }
.reminder .del { background: none; border: 0; color: #8f7fa4; font-size: 18px; padding: 2px 6px; }

/* ---------- шторка ---------- */
.sheet-host { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 3, 16, 0.66); backdrop-filter: blur(3px); animation: fade 0.2s ease; }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 92dvh;
  background: linear-gradient(180deg, #241537, #170d28 55%, #140b23);
  border-radius: 26px 26px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column;
  animation: up 0.26s cubic-bezier(0.2, 0.9, 0.2, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@keyframes up { from { transform: translateY(40px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.2); margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 6px; padding: 8px 16px 4px; }
.sheet-back { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); font-size: 24px; line-height: 1; color: var(--ink); }
.sheet-head h2 { font-size: 27px; margin: 0; color: var(--peach); }
.sheet-body { padding: 8px 16px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ---------- формы ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--ink);
  outline: none; font-size: 15px; transition: border-color 0.18s;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(255, 122, 158, 0.65); }
.field input[type="date"], .field input[type="time"], .field input[type="datetime-local"] { color-scheme: dark; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 8px 13px; border-radius: 12px; font-size: 13px;
  background: rgba(255, 255, 255, 0.055); border: 1px solid var(--line); color: var(--ink);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip[aria-pressed="true"] { background: rgba(255, 122, 158, 0.22); border-color: rgba(255, 122, 158, 0.7); color: #ffdbe4; }
.seg { display: flex; background: rgba(255, 255, 255, 0.05); border-radius: 13px; padding: 3px; border: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { flex: 1; text-align: center; padding: 8px 4px; border-radius: 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.seg input:checked + label { background: rgba(255, 122, 158, 0.22); color: #ffdbe4; font-weight: 600; }
.range-row { display: flex; align-items: center; gap: 12px; }
input[type="range"] { width: 100%; accent-color: var(--rose); }
.out { font-family: var(--hand); font-size: 26px; color: var(--peach); min-width: 34px; text-align: center; }
.err { color: #ff9db0; font-size: 12.5px; margin: 4px 0 10px; }
.hint { color: #8f7fa4; font-size: 11.5px; margin: 6px 0 0; }
.sheet-actions { display: flex; gap: 9px; margin-top: 6px; }
.sheet-actions .btn { flex: 1; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.toggle-row:last-of-type { border-bottom: 0; }
.toggle-row .tl b { display: block; font-size: 14px; font-weight: 500; }
.toggle-row .tl span { display: block; font-size: 11.5px; color: var(--muted); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch i {
  position: absolute; inset: 0; border-radius: 20px; background: rgba(255, 255, 255, 0.13);
  transition: background 0.2s; pointer-events: none;
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform 0.2s;
}
.switch input:checked + i { background: linear-gradient(135deg, var(--rose), #ff9a6f); }
.switch input:checked + i::after { transform: translateX(20px); }

/* ---------- код приглашения ---------- */
.code-box {
  text-align: center; padding: 20px 14px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.05); border: 1px dashed rgba(255, 210, 189, 0.35); margin-bottom: 14px;
}
.code-box b { display: block; font-family: var(--hand); font-size: 44px; letter-spacing: 6px; color: var(--peach); line-height: 1; }
.code-box span { font-size: 11.5px; color: var(--muted); }
.invite-link {
  font-size: 12px; word-break: break-all; color: var(--muted);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 12px;
}

/* ---------- письмо / билет / колесо ---------- */
.letter {
  position: relative; padding: 20px 18px; border-radius: 20px; margin-bottom: 14px;
  background: linear-gradient(160deg, #fff3e9, #ffe0d2);
  color: #3a1a28; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
}
.letter::before {
  content: ''; position: absolute; inset: 7px; border: 1px solid rgba(58, 26, 40, 0.16); border-radius: 14px; pointer-events: none;
}
.letter .lt { position: relative; font-family: var(--hand); font-size: 23px; line-height: 1.3; }
.letter .ltag { position: relative; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: #a4546a; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.letter .ltag svg { width: 18px; height: 18px; fill: #c25b74; }
.waiting { text-align: center; color: var(--muted); padding: 26px 0; font-family: var(--hand); font-size: 24px; }
.dots::after { content: ''; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

.wheel-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 0 4px; }
.wheel {
  position: relative; width: 250px; height: 250px; border-radius: 50%;
  background: conic-gradient(#ff7a9e 0 30deg, #cbaaff 30deg 60deg, #ffd08a 60deg 90deg, #7ee0b0 90deg 120deg,
    #ff9a6f 120deg 150deg, #8f7fe0 150deg 180deg, #ff7a9e 180deg 210deg, #cbaaff 210deg 240deg,
    #ffd08a 240deg 270deg, #7ee0b0 270deg 300deg, #ff9a6f 300deg 330deg, #8f7fe0 330deg 360deg);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.1), 0 18px 40px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(0, 0, 0, 0.25);
  transition: transform 3.4s cubic-bezier(0.15, 0.6, 0.2, 1);
}
.wheel-labels { position: absolute; inset: 0; }
.wheel-labels span {
  position: absolute; left: 50%; top: 50%; width: 72px; margin-left: -36px; margin-top: -7px;
  text-align: center; font-size: 9.5px; font-weight: 600; line-height: 1.1;
  color: #2a1020; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.wheel::after {
  content: ''; position: absolute; inset: 34%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a2350, #1b1030);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.14);
}
.wheel-pointer {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-top: 20px solid var(--peach); filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.4)); z-index: 2;
}
.wheel-stage { position: relative; padding-top: 12px; }
.wheel-result { font-family: var(--hand); font-size: 28px; color: var(--peach); text-align: center; min-height: 34px; }

.ticket {
  border-radius: 18px; overflow: hidden; margin-bottom: 12px;
  background: linear-gradient(155deg, #2d1b4e, #1a102e);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.tk-top { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; background: rgba(255, 255, 255, 0.05); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--peach); }
.tk-top svg { width: 18px; height: 18px; fill: var(--rose); }
.tk-body { padding: 16px; }
.tk-lbl { font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #9b8aae; margin-bottom: 3px; }
.tk-place { font-family: var(--hand); font-size: 30px; color: #fff; line-height: 1.05; margin-bottom: 12px; overflow-wrap: anywhere; }
.tk-when { display: flex; gap: 20px; }
.tk-val { font-size: 14px; color: #f0e4ef; }
.tk-extra { margin-top: 9px; font-size: 12.5px; color: #d9c9e4; }
.tk-extra b { color: #9b8aae; font-weight: 500; display: block; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.tk-stub { border-top: 1px dashed rgba(255, 255, 255, 0.2); padding: 11px 16px; display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); }
.tk-stamp { color: var(--green); font-family: var(--hand); font-size: 19px; display: flex; align-items: center; gap: 6px; }
.tk-stamp svg { width: 18px; height: 18px; }

/* ---------- таббар ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 30;
  width: 100%; max-width: 560px; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(20, 11, 35, 0.75), rgba(16, 9, 28, 0.97));
  backdrop-filter: blur(18px); border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 4px; border: 0; background: none; color: #8f7fa4; font-size: 10px;
  border-radius: 13px; transition: color 0.18s;
}
.tab svg { width: 23px; height: 23px; fill: currentColor; opacity: 0.9; }
.tab[aria-current="page"] { color: var(--peach); }
.tab[aria-current="page"] svg { filter: drop-shadow(0 3px 9px rgba(255, 160, 180, 0.4)); }
.badge {
  position: absolute; top: 4px; right: calc(50% - 20px); min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--rose); color: #2a0f1c; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; font-style: normal;
}

/* ---------- тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(10px);
  z-index: 80; max-width: 88%; padding: 11px 18px; border-radius: 14px;
  background: rgba(40, 24, 58, 0.97); border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink); font-size: 13.5px; box-shadow: var(--shadow);
  opacity: 0; transition: opacity 0.22s, transform 0.22s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: var(--peach); animation: spin 0.7s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 620px) {
  .app { border-left: 1px solid rgba(255, 255, 255, 0.05); border-right: 1px solid rgba(255, 255, 255, 0.05); }
}

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