/* «Втайне» — iPhone-вайб как в видео с картами: небо и облака, стеклянные карты с розово-персиковым свечением, одна тёмная кнопка.
   Всё лёгкое: без рамок и тяжёлых теней; движение — мягкие пружины. */
:root {
  --bg: #BFDDEF; --ink: #1B1F26; --ink2: #3F4955; --ink3: #434D59;
  --glass: rgba(255,255,255,.66); --glass-strong: rgba(255,255,255,.86); --glass-line: rgba(255,255,255,.75);
  --line: rgba(27,27,31,.07); --chip: rgba(27,27,31,.06);
  --btn: #2A2F35; --btn-ink: #fff;
  --dot: #F08BA8; --good: #2A8F5E; --danger: #A52C1B;
  --sky-top: #94C8E6; --sky-mid: #C9E1F0; --sky-low: #EAF1F5; --cloud: rgba(255,255,255,.92);
  --card-a: #F6A5C0; --card-b: #FFC9A3; --card-line: rgba(236,140,165,.42);
  --blush: rgba(255,196,178,.55); --sky: rgba(176,208,236,.55);
  --shadow: 0 24px 48px -14px rgba(40,80,120,.28), 0 2px 6px rgba(40,80,120,.08);
  --r: 24px; --r-sm: 16px;
  --spring: cubic-bezier(.2,.8,.2,1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light;
}
:root[data-scheme="dark"] {
  --bg: #10151F; --ink: #F3F4F8; --ink2: #B8BCC8; --ink3: #9AA0AE;
  --glass: rgba(255,255,255,.07); --glass-strong: rgba(255,255,255,.12); --glass-line: rgba(255,255,255,.10);
  --line: rgba(255,255,255,.08); --chip: rgba(255,255,255,.09);
  --btn: #F3F4F8; --btn-ink: #14161C;
  --dot: #F59BB4; --good: #4CC48A; --danger: #FF7A6A;
  --sky-top: #1A2440; --sky-mid: #141B2E; --sky-low: #0F1420; --cloud: rgba(120,110,200,.22);
  --card-a: #C0689A; --card-b: #E39A7E; --card-line: rgba(255,170,200,.30);
  --blush: rgba(255,120,100,.16); --sky: rgba(90,130,200,.18);
  --shadow: 0 24px 48px -12px rgba(0,0,0,.55);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font: 16px/1.4 var(--font); color: var(--ink); background: var(--bg);
  font-variant-numeric: lining-nums tabular-nums; min-height: 100vh; overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
/* небо за стеклом: градиент и мягкие облака, как в видео */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 12% at 18% 14%, var(--cloud), transparent 72%),
    radial-gradient(34% 10% at 86% 30%, var(--cloud), transparent 72%),
    radial-gradient(46% 12% at 8% 62%, var(--cloud), transparent 72%),
    radial-gradient(40% 12% at 92% 88%, var(--cloud), transparent 72%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 52%, var(--sky-low) 100%); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
.hidden { display: none !important; }

#app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding: 0 20px calc(110px + env(safe-area-inset-bottom)); }
.screen { animation: rise .55s var(--spring) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* шапка */
.top { padding: calc(env(safe-area-inset-top) + 18px) 0 8px; display: flex; align-items: center; gap: 10px; min-height: 64px; }
.brand { font-size: 15px; font-weight: 600; letter-spacing: -.1px; color: var(--ink2); }
.brand i { color: var(--dot); font-style: normal; }
.back { width: 36px; height: 36px; margin-left: -8px; display: grid; place-items: center; border-radius: 50%; color: var(--ink2); }
.back svg { width: 22px; height: 22px; }
h1 { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.7px; margin: 10px 0 4px; }
.sub { color: var(--ink2); font-size: 15px; margin-bottom: 18px; }
h2 { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--ink3); text-transform: uppercase; margin: 26px 4px 10px; }

/* стекло */
.glass { background: var(--glass); backdrop-filter: blur(26px) saturate(1.25); -webkit-backdrop-filter: blur(26px) saturate(1.25);
  border: 1px solid var(--glass-line); border-radius: var(--r); box-shadow: var(--shadow); }
.card { padding: 18px; }
.list { overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; text-align: left; position: relative; }
.row + .row::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: 1px; background: var(--line); }
.row .t { flex: 1; min-width: 0; }
.row .t b { display: block; font-weight: 500; font-size: 16px; overflow-wrap: anywhere; }
.row .t small { display: block; color: var(--ink3); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.row .go { color: var(--ink3); width: 18px; height: 18px; flex: none; }
.row:active { background: var(--chip); }
.stagger > * { animation: rise .55s var(--spring) both; }
.stagger > *:nth-child(2) { animation-delay: .05s } .stagger > *:nth-child(3) { animation-delay: .1s } .stagger > *:nth-child(4) { animation-delay: .15s }
.stagger > *:nth-child(5) { animation-delay: .2s } .stagger > *:nth-child(n+6) { animation-delay: .25s }

/* кнопки */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: 16px; width: 100%; transition: transform .2s var(--spring), opacity .2s; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn.soft { background: var(--glass-strong); color: var(--ink); border: 1px solid var(--glass-line); }
.btn.quiet { background: none; color: var(--ink2); height: 44px; font-weight: 500; }
.btn.danger { background: none; color: var(--danger); }
.btn.small { height: 38px; width: auto; font-size: 14px; padding: 0 16px; }
.btn svg, .ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.actions { display: grid; gap: 10px; margin-top: 18px; }
.actions.two { grid-template-columns: 1fr auto; }

/* значки, метки */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--chip); font-size: 13px; color: var(--ink2); white-space: nowrap; }
.chip svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chip.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 15px; background: var(--glass-strong); border: 1px solid var(--glass-line); color: var(--ink); flex: none; }
.avatars { display: flex; }
.avatars .avatar { width: 34px; height: 34px; font-size: 13px; margin-left: -8px; }
.avatars .avatar:first-child { margin-left: 0; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }

/* пустое состояние */
.empty { text-align: center; padding: 34px 22px 26px; }
.empty .art { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; background: var(--glass-strong); border: 1px solid var(--glass-line); color: var(--ink2); }
.empty .art svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty p { color: var(--ink2); font-size: 15px; margin: 4px auto 18px; max-width: 28ch; }
.empty b { font-size: 19px; font-weight: 600; letter-spacing: -.2px; }

/* подсказка про «сюрприз» */
.note { display: flex; gap: 10px; align-items: flex-start; color: var(--ink2); font-size: 13px; padding: 12px 6px 0; }
.note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* «Вы дарите» — главный момент игры */
.reveal { text-align: center; padding: 28px 18px 24px; }
.reveal small { color: var(--ink3); font-size: 13px; letter-spacing: .02em; text-transform: uppercase; }
.reveal .who { font-size: 38px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; margin: 10px 0 6px; overflow-wrap: anywhere; animation: unblur 1.1s var(--spring) both; }
.reveal .who i { font-style: normal; color: var(--dot); }
@keyframes unblur { from { filter: blur(14px); opacity: 0; transform: scale(.94); } to { filter: none; opacity: 1; transform: none; } }

/* нижняя панель */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; padding: 0 16px calc(10px + env(safe-area-inset-bottom)); pointer-events: none; }
.tabbar nav { pointer-events: auto; display: flex; gap: 4px; padding: 6px; border-radius: 999px; width: 100%; max-width: 420px; }
.tabbar button { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 7px 0 6px; border-radius: 999px; font-size: 11px; color: var(--ink3); transition: background .25s, color .25s; }
.tabbar button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.on { color: var(--ink); background: var(--glass-strong); }

/* шторка */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.28); animation: fade .3s both; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; display: flex; justify-content: center; animation: slide .5s var(--spring) both; }
.sheet > div { width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: var(--bg); background-image: linear-gradient(var(--glass), var(--glass)); box-shadow: 0 -20px 50px rgba(0,0,0,.18); }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 6px auto 14px; }
.sheet h3 { font-size: 22px; font-weight: 700; letter-spacing: -.4px; margin-bottom: 4px; }
.sheet .sub { margin-bottom: 14px; }
@keyframes fade { from { opacity: 0 } } @keyframes slide { from { transform: translateY(60%); opacity: 0; } }

/* поля */
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: var(--ink2); margin: 0 4px 6px; }
.field input, .field textarea, .field select { width: 100%; font: inherit; font-size: 17px; color: var(--ink); padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--glass-strong); outline: none; transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink3); box-shadow: 0 0 0 4px var(--chip); }
.field textarea { resize: none; min-height: 84px; }
.field span.opt { display: inline; margin: 0; color: var(--ink3); }

.toast { position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60; padding: 12px 18px; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-size: 14px; font-weight: 500; animation: rise .4s var(--spring) both; max-width: 88vw; text-align: center; }

.pulse { animation: pulse .5s var(--spring); }
@keyframes pulse { 40% { transform: scale(1.04); } }
.link { color: var(--ink2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.center { text-align: center; }
.spacer { height: 12px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* стеклянная «карта» — главный предмет экрана; розово-персиковое свечение и тонкие линии, как у Apple Card */
.gcard { position: relative; overflow: hidden; height: 186px; margin-bottom: 14px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(255,255,255,.5)); }
.gcard::before { content: ""; position: absolute; width: 230px; height: 230px; right: -64px; top: -70px; border-radius: 50%; filter: blur(6px); opacity: .85;
  background: radial-gradient(circle at 40% 40%, var(--card-a), var(--card-b) 55%, transparent 72%); }
.gcard::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-radial-gradient(circle at 100% 100%, transparent 0 9px, var(--card-line) 9px 10px);
  -webkit-mask-image: radial-gradient(circle at 100% 100%, #000 0, transparent 62%); mask-image: radial-gradient(circle at 100% 100%, #000 0, transparent 62%); }
.gcard > * { position: relative; z-index: 1; }
.gcard .k { font-size: 13px; font-weight: 600; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
.gcard .k svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gcard .big { font-size: 34px; font-weight: 700; letter-spacing: -.9px; line-height: 1.05; overflow-wrap: anywhere; }
.gcard .low { font-size: 13px; color: var(--ink2); margin-top: 4px; }
.gcard.reveal { height: auto; min-height: 186px; text-align: left; padding: 18px 20px; }
.gcard.reveal .who { margin: 6px 0 4px; }
.ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--glass-strong); border: 1px solid var(--glass-line); color: var(--ink2); }
.ico svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gcard { margin-top: 14px; }
:root[data-scheme="dark"] .gcard { background: linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.04)); }
:root[data-scheme="dark"] .gcard::before { opacity: .6; }
