/* ==========================================================
   Wishvibe — дизайн-система
   ========================================================== */
:root {
  --a: #7c5cff;
  --b: #ff5fb2;
  --grad: linear-gradient(135deg, var(--a), var(--b));
  --bg: #f5f3ff;
  --surface: #ffffff;
  --surface-2: #f0edff;
  --surface-3: #e8e4fb;
  --text: #17152b;
  --muted: #6a6987;
  --line: rgba(23, 21, 43, 0.09);
  --line-strong: rgba(23, 21, 43, 0.16);
  --ok: #0fb87f;
  --warn: #f5a524;
  --danger: #ee3f5f;
  --shadow-sm: 0 1px 2px rgba(40, 30, 90, 0.06), 0 2px 8px rgba(40, 30, 90, 0.05);
  --shadow: 0 8px 30px rgba(60, 40, 140, 0.10);
  --shadow-lg: 0 24px 60px rgba(60, 40, 140, 0.20);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-d: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --header-h: 68px;
  --glass: rgba(255, 255, 255, 0.72);
  color-scheme: light;
}
[data-mode='dark'] {
  --bg: #0e0d1a;
  --surface: #181730;
  --surface-2: #211f3f;
  --surface-3: #2b2950;
  --text: #f3f1ff;
  --muted: #a3a1c4;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.6);
  --glass: rgba(24, 23, 48, 0.74);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
#app { flex: 1; outline: none; position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: var(--a); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
.ic { flex-shrink: 0; vertical-align: middle; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--a) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 999; }
.skip-link:focus { left: 8px; }
.hide { display: none !important; }
.muted { color: var(--muted); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }

/* фон */
.bg-blobs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-blobs i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.45; }
.bg-blobs i:nth-child(1) { width: 520px; height: 520px; background: #b9a6ff; top: -160px; left: -120px; }
.bg-blobs i:nth-child(2) { width: 460px; height: 460px; background: #ffb3dc; top: 30%; right: -160px; }
.bg-blobs i:nth-child(3) { width: 420px; height: 420px; background: #9fe7ff; bottom: -160px; left: 25%; opacity: 0.35; }
[data-mode='dark'] .bg-blobs i { opacity: 0.22; }

/* ---------- кнопки ---------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px;
  border-radius: 999px; border: 1.5px solid transparent;
  background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
  text-decoration: none !important; user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn[disabled], .btn.loading { opacity: 0.6; pointer-events: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--a) 40%, transparent); }
.btn-primary:hover { box-shadow: 0 12px 28px color-mix(in srgb, var(--a) 50%, transparent); }
.btn-ghost { background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: color-mix(in srgb, var(--a) 14%, var(--surface)); color: var(--a); }
.btn-danger { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.btn-white { background: #fff; color: #1d1a3a; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
.btn-glass { background: rgba(255, 255, 255, 0.2); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: rgba(255, 255, 255, 0.35); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.3); }
.btn-lg { --h: 56px; padding: 0 30px; font-size: 17px; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.btn.loading::after { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--glass); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 14px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-d); font-weight: 600; font-size: 18px; color: var(--text); text-decoration: none !important; letter-spacing: -0.03em; }
.logo-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; font-size: 20px; box-shadow: 0 6px 16px color-mix(in srgb, var(--a) 40%, transparent); transform: rotate(-6deg); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 14.5px; text-decoration: none !important; }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface-2); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; transition: background 0.2s, color 0.2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 14px; }
.user-chip:hover { background: var(--surface-2); }
.user-chip .ava { width: 32px; height: 32px; font-size: 17px; }
.user-chip span.name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 8px; z-index: 60; animation: pop 0.18s ease; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 10px; border: 0; background: none; color: var(--text); font-weight: 600; font-size: 14.5px; text-align: left; text-decoration: none !important; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .menu-head { padding: 10px 12px 8px; font-size: 13px; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }

.ava { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; flex-shrink: 0; line-height: 1; }
.ava.grad { background: var(--grad); color: #fff; font-weight: 800; font-size: 15px; }

/* ---------- формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label, .label { font-weight: 700; font-size: 13.5px; color: var(--text); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.label small, .field > label small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.input, .textarea, .select {
  width: 100%; padding: 13px 15px; min-height: 48px; border-radius: 14px;
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s; outline: none; font-size: 16px;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a) 18%, transparent); }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.input.invalid { border-color: var(--danger); }
.hint { font-size: 12.5px; color: var(--muted); }
.hint.err { color: var(--danger); }
.hint.ok { color: var(--ok); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-affix { position: relative; }
.input-affix .input { padding-right: 48px; }
.input-affix .icon-btn { position: absolute; right: 3px; top: 3px; width: 42px; height: 42px; }
.slug-input { display: flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--surface); overflow: hidden; }
.slug-input:focus-within { border-color: var(--a); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a) 18%, transparent); }
.slug-input span { padding: 0 0 0 14px; display: flex; align-items: center; color: var(--muted); font-size: 13.5px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.slug-input input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 13px 14px 13px 2px; outline: none; font-weight: 700; }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); gap: 2px; width: 100%; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.switch { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; margin-bottom: 12px; background: var(--surface); }
.switch:hover { border-color: var(--line-strong); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .tg { width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3); position: relative; flex-shrink: 0; transition: background 0.2s; margin-top: 1px; }
.switch .tg::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.switch input:checked + .tg { background: var(--grad); }
.switch input:checked + .tg::after { transform: translateX(18px); }
.switch input:focus-visible + .tg { outline: 3px solid color-mix(in srgb, var(--a) 55%, transparent); outline-offset: 2px; }
.switch .tx b { display: block; font-size: 14.5px; }
.switch .tx span { font-size: 13px; color: var(--muted); }
.switch.disabled { opacity: 0.5; pointer-events: none; }

.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick button { width: 44px; height: 44px; border-radius: 12px; border: 2px solid transparent; background: var(--surface-2); font-size: 22px; display: grid; place-items: center; }
.pick button.on { border-color: var(--a); background: color-mix(in srgb, var(--a) 14%, var(--surface)); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-opt { border: 2px solid transparent; border-radius: 14px; padding: 6px; background: var(--surface-2); text-align: left; }
.theme-opt i { display: block; height: 34px; border-radius: 9px; }
.theme-opt span { display: block; font-size: 12.5px; font-weight: 700; padding: 6px 4px 2px; }
.theme-opt.on { border-color: var(--a); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 13.5px; color: var(--muted); }
.chip:hover { color: var(--text); border-color: var(--a); }
.chip.on { background: var(--grad); border-color: transparent; color: #fff; }
.chip .n { opacity: 0.7; font-weight: 600; }

/* ---------- модальные окна ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(14, 10, 40, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade 0.2s ease; overflow-y: auto; }
.overlay.closing { opacity: 0; transition: opacity 0.18s; }
.overlay.closing .modal { transform: translateY(16px) scale(0.98); transition: transform 0.18s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); width: 100%; max-width: 520px; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); animation: rise 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1); margin: auto; display: flex; flex-direction: column; max-height: calc(100dvh - 40px); position: relative; }
.modal.wide { max-width: 720px; }
.modal.sm { max-width: 420px; }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 24px 26px 6px; }
.modal-head h2 { font-family: var(--font-d); font-size: 21px; font-weight: 600; flex: 1; letter-spacing: -0.03em; }
.modal-head p { color: var(--muted); font-size: 14.5px; margin-top: 6px; font-family: var(--font); font-weight: 500; letter-spacing: 0; }
.modal-x { margin: -6px -10px 0 0; }
.modal-body { padding: 14px 26px 26px; overflow-y: auto; overscroll-behavior: contain; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; flex-wrap: wrap; }
.modal-foot .grow { margin-right: auto; }
.form-error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.form-info { background: color-mix(in srgb, var(--a) 10%, var(--surface)); color: var(--text); border-radius: 12px; padding: 11px 14px; font-size: 14px; margin-bottom: 14px; }

/* ---------- тосты ---------- */
#toast-root { position: fixed; z-index: 200; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 440px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: #1c1938; color: #fff; padding: 13px 18px; border-radius: 16px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 14.5px; animation: toast-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2); max-width: 100%; }
[data-mode='dark'] .toast { background: #f3f1ff; color: #17152b; }
.toast.err { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transform: translateY(10px); transition: all 0.25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.95); } }

/* ---------- загрузка / пустые состояния ---------- */
.boot { min-height: 60vh; display: grid; place-items: center; }
.boot-gift { font-size: 56px; animation: bounce 1s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-14px) rotate(8deg); } }
.skeleton { background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-3) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 56px 20px; background: var(--surface); border: 2px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty .big { font-size: 56px; margin-bottom: 10px; }
.empty h3 { font-size: 21px; margin-bottom: 8px; font-family: var(--font-d); font-weight: 600; }
.empty p { color: var(--muted); max-width: 440px; margin: 0 auto 20px; }

.banner { position: relative; z-index: 2; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 13.5px; padding: 8px 20px; text-align: center; color: var(--muted); }
.banner b { color: var(--text); }

/* ==========================================================
   Лендинг
   ========================================================== */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-weight: 700; font-size: 13.5px; margin-bottom: 22px; }
.hero h1 { font-family: var(--font-d); font-weight: 700; font-size: clamp(34px, 5.2vw, 62px); line-height: 1.04; letter-spacing: -0.045em; margin-bottom: 22px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 520px; margin-bottom: 30px; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-proof { display: flex; gap: 22px; margin-top: 30px; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-weight: 600; }
.hero-proof span { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof .ic { color: var(--ok); }

.mock { position: relative; padding: 20px; }
.mock-card { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; transform: rotate(1.8deg); }
.mock-top { padding: 22px; background: linear-gradient(135deg, #7c5cff, #ff5fb2); color: #fff; }
.mock-top .em { font-size: 34px; }
.mock-top h4 { font-family: var(--font-d); font-size: 20px; margin: 6px 0 4px; }
.mock-top small { opacity: 0.9; font-weight: 600; }
.mock-items { padding: 14px; display: grid; gap: 10px; }
.mock-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; background: var(--surface-2); }
.mock-item .th { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(135deg, #e5ddff, #ffe0f1); }
.mock-item b { display: block; font-size: 14px; }
.mock-item small { color: var(--muted); font-size: 12.5px; }
.mock-item .tag { margin-left: auto; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 99px; background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); white-space: nowrap; }
.mock-item .tag.free { background: color-mix(in srgb, var(--a) 14%, var(--surface)); color: var(--a); }
.mock-item.done { opacity: 0.6; }
.float { position: absolute; background: var(--surface); padding: 10px 16px; border-radius: 16px; box-shadow: var(--shadow); font-weight: 800; font-size: 13.5px; display: flex; gap: 8px; align-items: center; animation: float 5s ease-in-out infinite; border: 1px solid var(--line); }
.float.f1 { top: 0; left: -6px; }
.float.f2 { bottom: 24px; right: -4px; animation-delay: -2s; }
@keyframes float { 50% { transform: translateY(-9px); } }

.section { padding: 56px 0; }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-title h2 { font-family: var(--font-d); font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; letter-spacing: -0.04em; margin-bottom: 12px; }
.section-title p { color: var(--muted); font-size: 17px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; transition: transform 0.2s, box-shadow 0.2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .fi { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; margin-bottom: 16px; background: color-mix(in srgb, var(--a) 12%, var(--surface)); }
.feature h3 { font-size: 18px; margin-bottom: 8px; letter-spacing: -0.02em; }
.feature p { color: var(--muted); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; margin-bottom: 14px; font-family: var(--font-d); }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }
.cta-band { margin: 20px 0 64px; padding: 54px 30px; border-radius: var(--r-xl); background: var(--grad); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta-band::before, .cta-band::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.cta-band::before { top: -140px; left: -80px; }
.cta-band::after { bottom: -160px; right: -60px; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-family: var(--font-d); font-size: clamp(24px, 3.4vw, 36px); margin-bottom: 12px; font-weight: 600; letter-spacing: -0.04em; }
.cta-band p { opacity: 0.92; margin-bottom: 26px; font-size: 17px; }
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 20px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; color: var(--a); line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); padding: 0 0 16px; }

.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: var(--muted); font-weight: 600; }
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; }

/* ==========================================================
   Кабинет
   ========================================================== */
.page { padding: 36px 0 70px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-family: var(--font-d); font-size: clamp(26px, 3.4vw, 36px); font-weight: 600; letter-spacing: -0.04em; }
.page-head p { color: var(--muted); margin-top: 6px; }
.tabs { display: inline-flex; gap: 4px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.tabs a { padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--muted); text-decoration: none !important; display: inline-flex; gap: 8px; align-items: center; }
.tabs a.on { background: var(--grad); color: #fff; }
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.list-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; box-shadow: var(--shadow-sm); }
.list-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.list-cover { padding: 22px; color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); position: relative; min-height: 132px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; text-decoration: none !important; }
.list-cover::after { content: attr(data-emoji); position: absolute; right: -6px; top: -14px; font-size: 96px; opacity: 0.28; transform: rotate(12deg); }
.list-cover h3 { font-family: var(--font-d); font-size: 20px; font-weight: 600; position: relative; z-index: 1; letter-spacing: -0.03em; }
.list-cover small { opacity: 0.92; font-weight: 600; position: relative; z-index: 1; margin-top: 4px; }
.list-cover .em { font-size: 30px; position: relative; z-index: 1; margin-bottom: 6px; }
.list-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.list-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.stat b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.stat span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.list-actions { display: flex; gap: 8px; margin-top: auto; }
.list-actions .btn:first-child { flex: 1; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.badge.lock { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: #b97800; }
[data-mode='dark'] .badge.lock { color: var(--warn); }
.new-card { border: 2px dashed var(--line-strong); border-radius: var(--r-lg); display: grid; place-items: center; min-height: 260px; padding: 20px; text-align: center; background: transparent; color: var(--muted); font-weight: 700; transition: all 0.2s; }
.new-card:hover { border-color: var(--a); color: var(--a); background: color-mix(in srgb, var(--a) 6%, transparent); }
.new-card .plus { width: 54px; height: 54px; border-radius: 50%; background: color-mix(in srgb, var(--a) 14%, var(--surface)); color: var(--a); display: grid; place-items: center; margin: 0 auto 10px; }
.templates { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 22px; text-align: left; }
.tpl { border: 1.5px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--surface); display: flex; gap: 12px; align-items: center; font-weight: 800; transition: all 0.2s; text-align: left; }
.tpl:hover { border-color: var(--a); transform: translateY(-2px); box-shadow: var(--shadow); }
.tpl .e { font-size: 30px; }
.tpl small { display: block; color: var(--muted); font-weight: 600; font-size: 12.5px; }

.gift-group { margin-bottom: 30px; }
.gift-group > h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 18px; }
.gift-row { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 10px; }
.gift-row .th { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: 28px; flex-shrink: 0; }
.gift-row .th img { width: 100%; height: 100%; object-fit: cover; }
.gift-row .mid { flex: 1; min-width: 0; }
.gift-row .mid b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gift-row .mid small { color: var(--muted); font-size: 13px; }
.gift-row .acts { display: flex; gap: 8px; }

/* ==========================================================
   Страница вишлиста
   ========================================================== */
.wl-hero { position: relative; color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); overflow: hidden; }
.wl-hero::before, .wl-hero::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.wl-hero::before { width: 420px; height: 420px; right: -120px; top: -200px; }
.wl-hero::after { width: 260px; height: 260px; left: -90px; bottom: -150px; }
.wl-hero-inner { position: relative; z-index: 1; padding-top: 46px; padding-bottom: 78px; display: flex; gap: 26px; align-items: flex-start; }
.wl-hero-inner > div { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.wl-emoji { width: 96px; height: 96px; border-radius: 30px; background: rgba(255, 255, 255, 0.22); border: 1px solid rgba(255, 255, 255, 0.4); backdrop-filter: blur(10px); display: grid; place-items: center; font-size: 52px; flex-shrink: 0; transform: rotate(-5deg); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.15); }
.wl-owner { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; background: rgba(255, 255, 255, 0.2); padding: 5px 14px 5px 5px; border-radius: 99px; margin-bottom: 14px; }
.wl-owner .ava { width: 28px; height: 28px; font-size: 16px; background: rgba(255, 255, 255, 0.9); }
.wl-hero h1 { font-family: var(--font-d); font-size: clamp(28px, 4.4vw, 50px); font-weight: 700; letter-spacing: -0.045em; line-height: 1.06; }
.wl-hero .desc { margin-top: 14px; max-width: 640px; font-size: 17px; opacity: 0.95; white-space: pre-line; }
.wl-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.meta-pill { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 99px; background: rgba(255, 255, 255, 0.2); font-weight: 700; font-size: 14px; border: 1px solid rgba(255, 255, 255, 0.25); }
.wl-hero-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }

.wl-body { position: relative; z-index: 2; margin-top: -40px; padding-bottom: 70px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; }
.quick-add { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.quick-add .input { border-radius: 999px; padding-left: 20px; }
.owner-note { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); padding: 12px 14px; border-radius: 14px; background: var(--surface-2); margin-bottom: 14px; }
.owner-note b { color: var(--text); }
.owner-note .ic { color: var(--a); margin-top: 2px; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 20px 0; }
.toolbar .search { flex: 1; min-width: 200px; position: relative; }
.toolbar .search .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search .input { padding-left: 44px; border-radius: 999px; min-height: 46px; }
.toolbar .select { width: auto; border-radius: 999px; min-height: 46px; padding: 0 38px 0 16px; font-weight: 700; font-size: 14.5px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; }
.filters { margin-bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.progress-line { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress-line i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width 0.5s ease; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform 0.25s, box-shadow 0.25s; position: relative; animation: card-in 0.4s ease backwards; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card.flash { animation: flash 1.6s ease; }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes flash { 0%, 100% { box-shadow: var(--shadow-sm); } 20%, 60% { box-shadow: 0 0 0 4px var(--a), 0 18px 40px color-mix(in srgb, var(--a) 40%, transparent); transform: translateY(-6px) scale(1.02); } }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; border: 0; padding: 0; display: block; width: 100%; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.3s; }
.card:hover .card-media img { transform: scale(1.05); }
.ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; background: linear-gradient(135deg, color-mix(in srgb, var(--a) 22%, var(--surface)), color-mix(in srgb, var(--b) 22%, var(--surface))); }
.card-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, 0.92); color: #1b1838; backdrop-filter: blur(6px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); white-space: nowrap; }
.pill.hot { background: linear-gradient(135deg, #ff8a3d, #ff3d77); color: #fff; }
.pill.dream { background: linear-gradient(135deg, #7c5cff, #c35cff); color: #fff; }
.pill.ok { background: var(--ok); color: #fff; }
.pill.mine { background: var(--grad); color: #fff; }
.pill.taken { background: #1c1938; color: #fff; }
.card.is-taken .card-media img { filter: grayscale(0.7) brightness(0.9); }
.card.is-taken .ph { filter: grayscale(0.7); }
.card.is-received { opacity: 0.72; }
.card.is-received .card-media img { filter: grayscale(1); }
.shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 8, 30, 0.55), transparent 55%); display: flex; align-items: flex-end; padding: 14px; color: #fff; font-weight: 800; font-size: 14.5px; gap: 8px; pointer-events: none; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-size: 17px; font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; word-break: break-word; text-align: left; background: none; border: 0; padding: 0; color: var(--text); }
.card-title:hover { color: var(--a); }
.card-desc { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.card-price { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.card-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-link:hover { color: var(--a); }
.card-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.card-foot .note { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.card-foot .note b { color: var(--text); }
.owner-bar { display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.owner-bar .btn { flex: 1 0 auto; --h: 36px; padding: 0 10px; font-size: 13px; }
.owner-bar .btn-icon { flex: 0 0 36px; padding: 0; }
.fund { background: var(--surface-2); border-radius: 14px; padding: 12px 14px; }
.fund-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 8px; gap: 8px; }
.fund-top span { color: var(--muted); font-weight: 600; }
.fund-who { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

.greet { margin-top: 56px; }
.greet h2 { font-family: var(--font-d); font-size: 26px; font-weight: 600; letter-spacing: -0.04em; margin-bottom: 6px; }
.greet-wrap { display: grid; grid-template-columns: 340px 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.greet-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); position: sticky; top: calc(var(--header-h) + 16px); }
.greet-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.note-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; position: relative; box-shadow: var(--shadow-sm); }
.note-card:nth-child(3n+1) { background: color-mix(in srgb, #ffd86b 22%, var(--surface)); transform: rotate(-0.8deg); }
.note-card:nth-child(3n+2) { background: color-mix(in srgb, #ff9ccf 20%, var(--surface)); transform: rotate(0.7deg); }
.note-card:nth-child(3n) { background: color-mix(in srgb, #8fe0ff 20%, var(--surface)); transform: rotate(-0.4deg); }
.note-card p { white-space: pre-line; word-break: break-word; font-size: 15px; }
.note-card .by { margin-top: 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.note-card .del { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; }
.private-box { text-align: center; padding: 70px 20px; }
.private-box .big { font-size: 64px; margin-bottom: 14px; }

/* детальная карточка */
.detail-media { aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; position: relative; background: var(--surface-2); margin-bottom: 18px; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-desc { white-space: pre-line; color: var(--muted); margin: 10px 0 16px; word-break: break-word; }

/* шаринг */
.share-link { display: flex; gap: 8px; align-items: center; background: var(--surface-2); padding: 6px 6px 6px 16px; border-radius: 999px; margin-bottom: 18px; }
.share-link input { flex: 1; min-width: 0; border: 0; background: transparent; font-weight: 700; font-size: 14px; outline: none; text-overflow: ellipsis; }
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 18px; }
.share-btn { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 14px 8px; border-radius: 16px; background: var(--surface-2); font-weight: 700; font-size: 13px; border: 0; color: var(--text); text-decoration: none !important; transition: transform 0.15s; }
.share-btn:hover { transform: translateY(-2px); }
.share-btn i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; }
.qr-box { display: grid; place-items: center; padding: 18px; background: #fff; border-radius: var(--r-lg); width: fit-content; margin: 0 auto 6px; border: 1px solid var(--line); }
.qr-box svg { width: 180px; height: 180px; display: block; }

.success-box { text-align: center; }
.success-box .big { font-size: 64px; margin-bottom: 10px; animation: bounce 1.2s ease-in-out 2; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 300; }

/* ---------- адаптив ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .mock { max-width: 460px; margin: 0 auto; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .greet-wrap { grid-template-columns: 1fr; }
  .greet-form { position: static; }
}
.m-only { display: none; }
@media (max-width: 680px) {
  .d-only { display: none; }
  .m-only { display: inline; }
  .site-header .container { gap: 8px; }
  .logo { font-size: 16px; gap: 8px; }
  .logo-mark { width: 34px; height: 34px; font-size: 18px; }
  .nav { gap: 2px; }
  .nav .btn-ghost { padding: 0 10px; }
  .container { padding: 0 16px; }
  .features, .steps { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 24px; }
  .nav-link .t { display: none; }
  .nav-link { padding: 10px; }
  .user-chip span.name { display: none; }
  .user-chip { padding: 4px; }
  .wl-hero-inner { flex-direction: column; padding-top: 30px; padding-bottom: 64px; gap: 18px; }
  .wl-emoji { width: 72px; height: 72px; font-size: 38px; border-radius: 22px; }
  .row { grid-template-columns: 1fr; }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { max-width: none; border-radius: 28px 28px 0 0; max-height: 94dvh; animation: sheet 0.3s cubic-bezier(0.2, 0.9, 0.3, 1); margin: 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal.sm, .modal.wide { max-width: none; }
  .modal-head { padding: 20px 20px 4px; }
  .modal-body { padding: 12px 20px 22px; }
  .overlay.closing .modal { transform: translateY(100%); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
  .card-body { padding: 12px 12px 14px; gap: 8px; }
  .card-title { font-size: 15px; }
  .card-price { font-size: 16px; }
  .card-desc { display: none; }
  .ph { font-size: 44px; }
  .owner-bar .btn span { display: none; }
  .quick-add { flex-direction: column; align-items: stretch; }
  .gift-row { flex-wrap: wrap; }
  .gift-row .acts { width: 100%; }
  .gift-row .acts .btn { flex: 1; }
  .list-grid { grid-template-columns: 1fr; }
  .float { display: none; }
  .page { padding-top: 26px; }
  .themes { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .grid { grid-template-columns: 1fr; }
  .card-desc { display: -webkit-box; }
}
@keyframes sheet { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .bg-blobs, .owner-bar, .toolbar, .quick-add, .greet-form { display: none !important; }
  body { background: #fff; }
}
