:root {
  color-scheme: dark;
  --bg: #110e13;
  --bg-soft: #18131a;
  --card: rgba(34, 26, 38, 0.86);
  --card-solid: #221a26;
  --card-2: #2a2030;
  --text: #fbf3f7;
  --muted: #b9a8b6;
  --subtle: #8e7d8c;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #ff7fa2;
  --accent-soft: rgba(255, 127, 162, 0.16);
  --accent-2: #ffc48f;
  --mint: #9fe3c8;
  --danger: #ff7d84;
  --success: #9fe3c8;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #fbf6f7;
  --bg-soft: #f4edf0;
  --card: rgba(255, 255, 255, 0.88);
  --card-solid: #ffffff;
  --card-2: #f7eff2;
  --text: #2b2028;
  --muted: #756572;
  --subtle: #9a8996;
  --line: rgba(43, 32, 40, 0.09);
  --line-strong: rgba(43, 32, 40, 0.16);
  --accent: #e2557d;
  --accent-soft: rgba(226, 85, 125, 0.12);
  --accent-2: #c98245;
  --danger: #c53d46;
  --success: #21835f;
  --shadow: 0 18px 45px rgba(80, 40, 60, 0.14);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--bg); }
body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(120% 70% at 15% -10%, rgba(255, 127, 162, 0.18), transparent 55%),
    radial-gradient(90% 60% at 95% 0%, rgba(255, 196, 143, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: var(--accent); }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
img { display: block; max-width: 100%; }

.ambient { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.orb { position: absolute; border-radius: 50%; filter: blur(52px); opacity: 0.5; }
.orb-a { width: 260px; height: 260px; background: #ff6f9c; top: -120px; left: -80px; animation: drift 17s ease-in-out infinite alternate; }
.orb-b { width: 220px; height: 220px; background: #ffc37d; bottom: 8%; right: -100px; animation: drift 21s ease-in-out infinite alternate-reverse; }
[data-theme="light"] .orb { opacity: 0.18; }
.grain { position: absolute; inset: 0; opacity: 0.045; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E"); }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(30px, 26px, 0) scale(1.12); } }

.app { position: relative; z-index: 1; width: min(760px, 100%); margin: 0 auto; padding: calc(14px + var(--safe-top)) 16px calc(100px + var(--safe-bottom)); }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 2px 16px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px; color: #ffd9e4; background: linear-gradient(140deg, rgba(255, 127, 162, 0.9), rgba(255, 196, 143, 0.7)); box-shadow: 0 10px 24px rgba(255, 127, 162, 0.24); }
.brand-mark svg { width: 21px; height: 21px; fill: rgba(35, 20, 28, 0.72); stroke: none; }
.brand strong { display: block; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 2px; }
.icon-button { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; color: var(--muted); background: var(--card); border: 1px solid var(--line); }
.icon-button:active { transform: scale(0.96); }
.top-note { padding: 7px 10px; border-radius: 999px; color: var(--subtle); background: var(--card); border: 1px solid var(--line); font-size: 0.68rem; letter-spacing: 0.04em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.view { min-height: 62vh; }
.tabbar { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-bottom)); width: min(560px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 7px; border-radius: 23px; background: rgba(24, 19, 26, 0.78); border: 1px solid var(--line-strong); backdrop-filter: blur(22px) saturate(1.4); box-shadow: var(--shadow); }
[data-theme="light"] .tabbar { background: rgba(255, 255, 255, 0.82); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 7px; border-radius: 17px; color: var(--subtle); font-size: 0.68rem; letter-spacing: 0.01em; transition: color 0.2s, background 0.2s; }
.tab svg { width: 21px; height: 21px; }
.tab.active { color: var(--text); background: var(--accent-soft); }
.tab.active::after { content: ""; position: absolute; top: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

.hero { position: relative; overflow: hidden; padding: 22px; border-radius: 26px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(255, 127, 162, 0.17), rgba(255, 196, 143, 0.07) 55%, rgba(255, 255, 255, 0.02)); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; width: 180px; height: 180px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 196, 143, 0.28), transparent 68%); }
.hero-kicker { display: flex; align-items: center; gap: 8px; color: var(--accent-2); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.hero h1 { margin: 9px 0 6px; font-size: clamp(1.55rem, 6vw, 2.2rem); letter-spacing: -0.035em; line-height: 1.05; }
.hero p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; max-width: 46ch; }
.hero-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.stat-pill { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); font-size: 0.78rem; color: var(--text); }
.stat-pill b { font-weight: 650; }
.stat-pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 22px 2px 12px; }
.section-head h2 { margin: 0; font-size: 1.12rem; letter-spacing: -0.02em; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 0.8rem; }
.ghost-button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; }
.ghost-button:active { transform: scale(0.97); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 15px; background: var(--card); border: 1px solid var(--line); }
.segmented button { padding: 9px 8px; border-radius: 11px; color: var(--muted); font-size: 0.8rem; transition: 0.2s; }
.segmented button.active { background: var(--card-2); color: var(--text); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16); }

.chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; transition: 0.2s; }
.chip.active { color: var(--text); background: var(--card-2); border-color: var(--line-strong); }

.cta-card { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(120deg, rgba(255, 127, 162, 0.16), rgba(255, 255, 255, 0.03)); }
.cta-card strong { display: block; font-size: 0.92rem; }
.cta-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 0.76rem; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 15px; border-radius: 14px; color: #2a1420; background: linear-gradient(135deg, #ffc2d0, #ffd3a5); font-weight: 650; font-size: 0.83rem; white-space: nowrap; box-shadow: 0 8px 20px rgba(255, 127, 162, 0.2); transition: transform 0.15s, opacity 0.2s; }
.primary-button:active { transform: scale(0.97); }
.primary-button:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); font-size: 0.82rem; }
.danger-button { color: var(--danger); border-color: rgba(255, 125, 132, 0.28); }

.group { margin-top: 18px; }
.group-title { display: flex; align-items: center; gap: 10px; margin: 0 2px 9px; color: var(--muted); font-size: 0.76rem; letter-spacing: 0.04em; text-transform: uppercase; }
.group-title::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); background: var(--card); aspect-ratio: 4 / 5; isolation: isolate; animation: rise 0.35s ease both; }
.card.video { aspect-ratio: 1 / 1; }
.card-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity 0.35s, transform 0.5s; }
.card-media.loaded { opacity: 1; transform: scale(1); }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(10, 6, 12, 0.82)); z-index: 1; pointer-events: none; }
.card.locked::before { content: ""; position: absolute; inset: 0; z-index: 2; background: rgba(15, 10, 17, 0.2); backdrop-filter: blur(1px); }
.card-meta { position: absolute; z-index: 3; left: 11px; right: 11px; bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 7px; color: #fff; font-size: 0.72rem; }
.card-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; background: rgba(15, 10, 17, 0.55); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.14); }
.card-badge.good { color: #d8ffe9; }
.card-lock { position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: rgba(255, 255, 255, 0.85); }
.card-lock svg { width: 30px; height: 30px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4)); }
.card-lock span { font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.play-badge { position: absolute; z-index: 3; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: rgba(255,255,255,0.92); background: rgba(15, 10, 17, 0.45); border: 1px solid rgba(255,255,255,0.24); backdrop-filter: blur(8px); }
.play-badge svg { width: 18px; height: 18px; fill: currentColor; stroke: none; margin-left: 2px; }

.skeleton { position: relative; overflow: hidden; background: var(--card); border-radius: 20px; min-height: 160px; border: 1px solid var(--line); }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,0.06) 50%, transparent 80%); animation: shimmer 1.2s infinite; }
.skeleton-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.empty { padding: 32px 18px; text-align: center; border-radius: 24px; border: 1px dashed var(--line-strong); background: rgba(255, 255, 255, 0.02); }
.empty-icon { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty h3 { margin: 0 0 6px; font-size: 1rem; }
.empty p { margin: 0 auto; max-width: 34ch; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }

.error-box { margin-top: 14px; padding: 16px; border-radius: 18px; border: 1px solid rgba(255, 125, 132, 0.28); background: rgba(255, 125, 132, 0.08); color: var(--text); font-size: 0.84rem; line-height: 1.5; }
.error-box button { margin-top: 10px; }

/* Wishlist */
.wishlist { display: grid; gap: 10px; margin-top: 14px; }
.wish-card { display: flex; gap: 12px; padding: 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); animation: rise 0.3s ease both; }
.wish-photo { width: 86px; height: 86px; flex: 0 0 auto; border-radius: 15px; overflow: hidden; background: var(--card-2); display: grid; place-items: center; color: var(--subtle); }
.wish-photo img { width: 100%; height: 100%; object-fit: cover; }
.wish-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.wish-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.wish-title { margin: 0; font-size: 0.92rem; line-height: 1.3; }
.wish-link { color: var(--muted); font-size: 0.72rem; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.wish-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.status { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 999px; font-size: 0.68rem; border: 1px solid var(--line); color: var(--muted); }
.status.bought { color: var(--success); border-color: rgba(159, 227, 200, 0.25); background: rgba(159, 227, 200, 0.08); }
.status.secret { color: var(--accent-2); border-color: rgba(255, 196, 143, 0.24); background: rgba(255, 196, 143, 0.08); }
.mini-button { padding: 6px 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-size: 0.7rem; }
.mini-button.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.icon-mini { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); background: var(--card-2); border: 1px solid var(--line); }
.icon-mini svg { width: 17px; height: 17px; }
.mini-button { min-height: 38px; }

/* Profile */
.profile-hero { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); }
.avatar { width: 62px; height: 62px; border-radius: 22px; display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; color: #2a1420; background: linear-gradient(140deg, #ffc2d0, #ffd3a5); }
.profile-hero h2 { margin: 0; font-size: 1.2rem; }
.profile-hero p { margin: 4px 0 0; color: var(--muted); font-size: 0.8rem; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.stat-card { padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.stat-card small { display: block; color: var(--muted); font-size: 0.72rem; }
.stat-card strong { display: block; margin-top: 5px; font-size: 1.35rem; letter-spacing: -0.03em; }
.stat-card span { display: block; margin-top: 2px; color: var(--subtle); font-size: 0.7rem; }
.limits { display: grid; gap: 11px; margin-top: 12px; padding: 16px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); }
.limit-row { display: grid; gap: 5px; }
.limit-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.76rem; }
.limit-top b { color: var(--text); font-weight: 600; }
.bar { height: 7px; border-radius: 999px; background: var(--card-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.settings-list { display: grid; gap: 8px; margin-top: 12px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 17px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.setting-row .setting-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.setting-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.setting-row strong { display: block; font-size: 0.84rem; }
.setting-row small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.setting-row .chevron { color: var(--subtle); }
.note { margin-top: 14px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); color: var(--muted); font-size: 0.76rem; line-height: 1.55; }

/* Modal / sheets */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(7, 4, 9, 0.62); backdrop-filter: blur(10px); display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fadeIn 0.2s ease; }
.modal { width: min(620px, 100%); max-height: 92dvh; overflow: auto; border-radius: 26px 26px 0 0; background: var(--card-solid); border: 1px solid var(--line-strong); box-shadow: 0 -20px 60px rgba(0,0,0,0.42); padding: 20px 18px calc(20px + var(--safe-bottom)); animation: sheetUp 0.3s cubic-bezier(0.2, 0.9, 0.25, 1); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 1.1rem; letter-spacing: -0.02em; }
.modal-head p { margin: 5px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.modal-close { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); background: var(--card-2); }
.modal-body { margin-top: 16px; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }
.modal-actions button { flex: 1; }
.form { display: grid; gap: 10px; }
.field { display: grid; gap: 5px; }
.field label { color: var(--muted); font-size: 0.74rem; }
.field input, .field textarea, .field select { width: 100%; padding: 12px 13px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--bg-soft); color: var(--text); outline: none; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { min-height: 90px; resize: vertical; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border-radius: 15px; border: 1px solid var(--line); background: var(--bg-soft); }
.toggle small { color: var(--muted); display: block; margin-top: 3px; font-size: 0.72rem; }
.switch { width: 46px; height: 28px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); position: relative; flex: 0 0 auto; transition: 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: 0.2s; }
.switch.on { background: var(--accent-soft); border-color: transparent; }
.switch.on::after { left: 21px; background: var(--accent); }
.consent-text { color: var(--muted); font-size: 0.88rem; line-height: 1.6; white-space: pre-line; }
.consent-timer { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; margin-top: 6px; border-radius: 999px; background: var(--card-2); color: var(--muted); font-size: 0.76rem; }
.countdown { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.consent-accepted { display: flex; gap: 9px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(159, 227, 200, 0.09); color: var(--success); font-size: 0.8rem; }

/* Viewer */
.viewer { position: fixed; inset: 0; z-index: 80; background: #070509; color: #fff; display: flex; flex-direction: column; animation: fadeIn 0.22s ease; }
.viewer-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(12px + var(--safe-top)) 14px 8px; }
.viewer-top .viewer-label { color: rgba(255,255,255,0.72); font-size: 0.76rem; }
.viewer-actions { display: flex; align-items: center; gap: 6px; }
.viewer-button { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: rgba(255,255,255,0.86); background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); }
.viewer-stage { flex: 1; display: grid; place-items: center; position: relative; overflow: hidden; touch-action: pan-y; }
.viewer-media { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.viewer-media.photo { width: 100%; height: 100%; object-fit: contain; }
.viewer-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: rgba(255,255,255,0.75); background: rgba(10,8,12,0.38); border: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(8px); }
.viewer-nav.prev { left: 10px; }
.viewer-nav.next { right: 10px; }
.viewer-nav:disabled { opacity: 0.25; }
.viewer-bottom { padding: 8px 16px calc(18px + var(--safe-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.viewer-caption { min-width: 0; }
.viewer-caption strong { display: block; font-size: 0.86rem; }
.viewer-caption small { display: block; margin-top: 2px; color: rgba(255,255,255,0.55); font-size: 0.7rem; }
.viewer-dots { display: flex; gap: 5px; justify-content: center; padding: 0 0 8px; flex-wrap: wrap; }
.viewer-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.28); }
.viewer-dot.active { background: var(--accent); width: 16px; border-radius: 999px; }
.viewer-menu { position: fixed; top: calc(58px + var(--safe-top)); right: 14px; z-index: 95; min-width: 210px; padding: 7px; border-radius: 16px; background: rgba(30,23,33,0.96); border: 1px solid rgba(255,255,255,0.13); box-shadow: 0 16px 40px rgba(0,0,0,0.45); animation: rise 0.18s ease; }
.viewer-menu button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px 10px; border-radius: 10px; color: #fff; font-size: 0.8rem; text-align: left; }
.viewer-menu button:hover { background: rgba(255,255,255,0.07); }
.viewer-menu .danger { color: #ff9aa0; }

/* Toast */
.toast-root { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(92px + var(--safe-bottom)); width: min(420px, calc(100% - 32px)); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 12px 14px; border-radius: 14px; background: rgba(32, 24, 36, 0.95); color: #fdf6fa; font-size: 0.8rem; line-height: 1.4; border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 14px 30px rgba(0,0,0,0.35); animation: toastIn 0.25s ease; }
.toast.error { border-color: rgba(255, 125, 132, 0.35); }
.toast.success { border-color: rgba(159, 227, 200, 0.3); }

.loading-line { height: 3px; border-radius: 999px; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 200% 100%; animation: loading 1.1s linear infinite; margin: 16px 2px; }
@keyframes loading { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(26px); opacity: 0.4; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.no-telegram { min-height: 70dvh; display: grid; place-items: center; text-align: center; padding: 24px; }
.no-telegram .card { padding: 28px; border-radius: 24px; aspect-ratio: auto; animation: none; }
.no-telegram h1 { margin: 0 0 8px; font-size: 1.3rem; }
.no-telegram p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.55; }

@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app { padding-left: 24px; padding-right: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
