/* ===== Темы ===== */
:root, [data-theme="dark"] {
  --bg: #16121F; --surface: #1F1A2B; --nav: #130F1B; --line: #2E2740;
  --text: #F3EFF7; --soft: #D6CFE1; --muted: #ABA3BC;
  --gold: #E3C27A; --gold-line: #6E5A35; --cta: #E3C27A; --cta-text: #1A1424;
  --ok: #9FE0B8; --ok-bg: #1E3A2C; --accent-panel: #211B30; --tab-on: #2E2740;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45); --danger: #FF9A9A;
  --orn: #E3C27A; --glow: rgba(120, 88, 190, .28); --stars-opacity: .32;
}
[data-theme="light"] {
  --bg: #F7F2E9; --surface: #FFFDF8; --nav: #FFFDF8; --line: #E6DCC8;
  --text: #2A2036; --soft: #4E4459; --muted: #6E6479;
  --gold: #8A6420; --gold-line: #D2B77E; --cta: #3A2550; --cta-text: #FFFDF8;
  --ok: #2E7D4F; --ok-bg: #DDEFE3; --accent-panel: #FBF4E6; --tab-on: #EFE6D6;
  --shadow: 0 18px 40px rgba(58, 37, 80, .18); --danger: #B3261E;
  --orn: #A57F33; --glow: rgba(214, 178, 110, .30); --stars-opacity: .38;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { background: radial-gradient(120% 60% at 50% -8%, var(--glow), transparent 62%) fixed, var(--bg); font: 15px/1.5 Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; transition: background .3s, color .3s; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
button { font: inherit; color: inherit; }
.hidden, [hidden] { display: none !important; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.gold { color: var(--gold); }
.display { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 28px; line-height: 1.1; margin: 0; }
.display.sm { font-size: 24px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

/* ===== Экраны ===== */
.screen {
  display: none; max-width: 520px; margin: 0 auto;
  padding: 0 20px calc(110px + env(safe-area-inset-bottom));
  flex-direction: column; gap: 18px; min-height: 100vh;
}
.screen.active { display: flex; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 16px; min-height: 56px; }
.brand { font-size: 13px; font-weight: 700; letter-spacing: .32em; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.pill { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--gold); }
.pill svg { width: 15px; height: 15px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.square { width: 50px; height: 50px; border-radius: 14px; }
.back { width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: flex-start; padding: 0; cursor: pointer; }

.btn { min-height: 50px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; }
.btn.primary { border: 0; background: var(--cta); color: var(--cta-text); }
.btn:disabled, .icon-btn:disabled { opacity: .45; cursor: default; }
.link { border: 0; background: none; color: var(--gold); font-weight: 700; font-size: 13px; cursor: pointer; padding: 6px 0; }
.row-actions { display: flex; gap: 10px; width: 100%; }
.panel { padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.panel.accent { background: var(--accent-panel); border-color: var(--gold-line); }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.block { display: flex; flex-direction: column; gap: 12px; }
textarea, input { width: 100%; resize: none; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 500 15px Manrope, sans-serif; outline: none; }
textarea:focus, input:focus { border-color: var(--gold); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.tag { font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag.ok { color: var(--ok); }
.tag.gold { color: var(--gold); }

/* ===== Карта дня ===== */
.daily { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding-top: 6px; }
.daily h1 { font-size: 38px; }
.daily p { margin: 0; max-width: 300px; }
.daily-card { width: 200px; height: 300px; border: 0; background: none; padding: 0; perspective: 1000px; cursor: pointer; margin: 6px 0; }
.flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, .7, .2, 1); }
.daily-card.open .flip { transform: rotateY(180deg); }
.flip-back, .flip-front { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 14px; overflow: hidden; border: 1px solid var(--gold-line); box-shadow: var(--shadow); }
.flip-front { transform: rotateY(180deg); }
.flip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flip-front.reversed img { transform: rotate(180deg); }
.daily-card:not(.open) .flip-back { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 10px rgba(227, 194, 122, .2); } 50% { box-shadow: 0 0 30px rgba(227, 194, 122, .55); } }

/* ===== Ритуал ===== */
.ritual-step { display: flex; align-items: center; gap: 12px; min-height: 36px; text-align: left; }
.ritual-step.as-button { border: 0; background: none; padding: 0; cursor: pointer; font-weight: 600; }
.check { width: 28px; height: 28px; border-radius: 50%; border: 1px dashed var(--muted); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.ritual-step.current .check { border: 2px solid var(--gold); }
.ritual-step.done .check { border: 0; background: var(--ok-bg); color: var(--ok); }
.ritual-step.done .check::after { content: ""; width: 10px; height: 5px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg) translate(1px, -1px); }
.ritual-step.done .grow { color: var(--muted); text-decoration: line-through; }
.outcome-row { display: flex; gap: 8px; padding-left: 40px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip.selected { background: var(--tab-on); border-color: var(--gold-line); }

/* ===== Вкладки и список раскладов ===== */
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.tab { min-height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.tab.active { background: var(--tab-on); color: var(--text); }
.spread-list { display: flex; flex-direction: column; }
.spread-item { min-height: 62px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.spread-item svg { width: 18px; height: 18px; color: var(--gold); }
.spread-item .grow { display: flex; flex-direction: column; }
.spread-item b { font-size: 16px; }
.spread-item small { font-size: 12px; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { min-height: 150px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; text-align: left; cursor: pointer; }
.tile.dashed { border-style: dashed; border-color: var(--gold-line); background: transparent; }
.tile > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.tile b { font-size: 16px; }
.tile small { font-size: 12px; color: var(--muted); }
.tile svg { width: 28px; height: 28px; stroke-width: 1.5; }
.tile-cards { display: flex; }
.tile-cards img { width: 36px; height: 54px; object-fit: cover; border-radius: 6px; transform: rotate(-6deg); }
.tile-cards img + img { transform: rotate(6deg); margin-left: -8px; }

/* ===== Колода и раскладка ===== */
.question-pill { text-align: center; color: var(--muted); font-style: italic; font-size: 14px; padding: 0 8px; }
.question-pill:empty { display: none; }
.slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 10px; align-content: flex-start; padding-top: 4px; --cw: 110px; }
.slot { width: var(--cw); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.slot-frame { width: var(--cw); aspect-ratio: 2 / 3; border-radius: 10px; border: 1px dashed var(--line); position: relative; }
.slot-label { font-size: 11px; color: var(--gold); text-align: center; line-height: 1.2; min-height: 14px; }
.slot-orient { font-size: 10px; color: var(--muted); min-height: 12px; }
.card { position: absolute; inset: 0; perspective: 900px; transition: transform .6s cubic-bezier(.2, .8, .2, 1); z-index: 5; }
.card-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, .7, .2, 1); }
.card.flipped .card-inner { transform: rotateY(180deg); }
.card-face, .card-backface { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; overflow: hidden; border: 1px solid var(--gold-line); }
.card-face { transform: rotateY(180deg); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-face.reversed img { transform: rotate(180deg); }

.deck-area { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; }
.deck { position: relative; width: 104px; height: 156px; border: 0; background: none; padding: 0; cursor: pointer; }
.deck img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--gold-line); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.deck img:nth-child(1) { transform: translate(-6px, 6px) rotate(-4deg); }
.deck img:nth-child(2) { transform: translate(5px, 4px) rotate(3deg); }
.deck img:nth-child(3) { transform: translate(-2px, 2px) rotate(-1deg); }
.deck img.top { animation: glow 2.4s ease-in-out infinite; }
.deck:active img.top { transform: scale(.96); }
.deck.busy { pointer-events: none; opacity: .7; }
.deck.empty { visibility: hidden; }
.deck.shuffle img:nth-child(1) { animation: shuffleL .5s ease 2; }
.deck.shuffle img:nth-child(2) { animation: shuffleR .5s ease 2; }
@keyframes shuffleL { 50% { transform: translate(-40px, 0) rotate(-12deg); } }
@keyframes shuffleR { 50% { transform: translate(40px, 0) rotate(12deg); } }

/* ===== Толкование ===== */
.mini-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-top: 4px; }
.mini-cards .slot { --cw: 64px; }
.mini-cards .slot-frame { border: 0; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 0; }
.orb { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6d8, #E3C27A 40%, #6b4ea8 100%); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(.9); opacity: .7; } 50% { transform: scale(1.05); opacity: 1; } }
.reading { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; line-height: 1.65; }
.reading h3 { color: var(--gold); font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 21px; margin: 18px 0 6px; }
.reading h3:first-child { margin-top: 0; }
.reading p { margin: 0 0 10px; }
.reading ul { margin: 0 0 10px; padding-left: 20px; }
.error { text-align: center; color: var(--danger); display: flex; flex-direction: column; gap: 10px; }

/* ===== Дневник и профиль ===== */
.diary-item { width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); background: none; display: flex; gap: 12px; align-items: center; text-align: left; cursor: pointer; }
.diary-item img { width: 36px; height: 54px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.diary-item .grow { display: flex; flex-direction: column; }
.diary-item b { font-weight: 600; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 32px; }
.kv span { color: var(--soft); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch span { display: flex; flex-direction: column; }
.switch input { width: 48px; height: 28px; appearance: none; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; padding: 0; border: 0; flex-shrink: 0; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); transition: transform .2s; }
.switch input:checked { background: var(--gold); }
.switch input:checked::after { transform: translateX(20px); }

/* ===== Меню, шторка, уведомления ===== */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--nav); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { min-height: 62px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabbar button.active { color: var(--gold); }
.tabbar.hidden-bar { display: none; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 40; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 85vh; overflow-y: auto; background: var(--bg); border-top: 1px solid var(--gold-line); border-radius: 22px 22px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; max-width: 520px; margin: 0 auto; animation: up .3s ease; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 4px; }
.sheet p { margin: 0 0 10px; line-height: 1.65; }
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--surface); border: 1px solid var(--gold-line); padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: 90vw; z-index: 50; box-shadow: var(--shadow); }

/* ===== Кристаллы и магазин ===== */
.pill.as-button { background: transparent; cursor: pointer; font-family: inherit; }
.balance-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 4px; text-align: center; }
.balance-big { display: flex; align-items: center; gap: 10px; font-size: 44px; font-weight: 800; color: var(--gold); line-height: 1; }
.balance-big svg { width: 36px; height: 36px; }
.plan { padding: 18px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.plan.premium { border-color: var(--gold-line); background: var(--accent-panel); }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.plan-price { display: flex; align-items: center; gap: 4px; font-weight: 800; color: var(--gold); white-space: nowrap; }
.plan-price svg, .tag svg, .cost svg { width: 14px; height: 14px; }
.plan ul { margin: 0; padding-left: 18px; color: var(--soft); font-size: 14px; }
.pack { width: 100%; min-height: 64px; padding: 0 16px; margin-bottom: 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.pack .grow { display: flex; flex-direction: column; }
.pack b { display: flex; align-items: center; gap: 6px; font-size: 17px; }
.pack b svg { width: 16px; height: 16px; color: var(--gold); }
.pack .rub { font-weight: 800; white-space: nowrap; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--tab-on); color: var(--gold); }
.cost { display: inline-flex; align-items: center; gap: 3px; }
.tag { display: inline-flex; align-items: center; gap: 3px; }

/* ===== Астропрофиль и согласие ===== */
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--soft); cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--gold); padding: 0; }
.check-row a, .doc-link { color: var(--gold); }
.city-box { position: relative; margin-top: -6px; }
.city-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 10; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.city-list:empty { display: none; }
.city-list button { width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.city-list button:last-child { border-bottom: 0; }
#astro-hint, #astro-line { align-self: center; }

/* ===== Логотип и орнамент ===== */
.screen { position: relative; z-index: 1; }
.hero-head { position: relative; display: flex; justify-content: center; align-items: center; padding-top: 22px; min-height: 96px; }
.wordmark { position: relative; width: 190px; aspect-ratio: 859 / 278; background: var(--gold);
  -webkit-mask: url(brand/wordmark-mask.png) center / contain no-repeat; mask: url(brand/wordmark-mask.png) center / contain no-repeat; }
.ornament-top { position: absolute; left: 50%; top: 4px; width: min(430px, 112%); aspect-ratio: 900 / 207; transform: translateX(-50%);
  background: var(--orn); opacity: .22;
  -webkit-mask: url(brand/ornament-top.png) center / contain no-repeat; mask: url(brand/ornament-top.png) center / contain no-repeat; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: -6px; }
.head-left { display: flex; gap: 8px; align-items: center; }
.bg-ornament { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-ornament .stars { position: absolute; inset: 0; background: var(--orn); opacity: var(--stars-opacity);
  -webkit-mask: url(brand/stars.png) 0 0 / 360px repeat; mask: url(brand/stars.png) 0 0 / 360px repeat; }
.bg-ornament .corner { position: absolute; bottom: calc(66px + env(safe-area-inset-bottom)); width: 120px; aspect-ratio: 300 / 494;
  background: var(--orn); opacity: .13;
  -webkit-mask: url(brand/ornament-corner.png) center / contain no-repeat; mask: url(brand/ornament-corner.png) center / contain no-repeat; }
.bg-ornament .corner.left { left: -14px; }
.bg-ornament .corner.right { right: -14px; transform: scaleX(-1); }
.panel, .tile, .spread-item, .reading, .plan, .pack { position: relative; }

/* ===== Структура: шапка, разделители, кнопки ===== */
.sky-line { text-align: center; color: var(--muted); font-size: 13px; margin-top: -6px; }
.sky-line::first-letter { text-transform: uppercase; }
.head-row.center { justify-content: center; margin-top: 0; }
.display.center, .center { text-align: center; }
.daily .eyebrow { margin-top: 4px; }
.actions-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; width: 100%; margin-top: 6px; }
.actions-2-1 .btn { min-width: 0; padding: 0 10px; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions-2-1 .btn svg { width: 17px; height: 17px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 6px 24px; color: var(--gold-line); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-line), transparent); }
.divider span { width: 9px; height: 9px; background: var(--gold); opacity: .55; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.topbar .spacer { width: 44px; }
.topbar.center-title { justify-content: center; }
.link.left { align-self: flex-start; padding: 0; margin-top: -4px; }

/* ===== Профиль ===== */
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-top: 4px; }
.avatar { position: relative; width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--gold-line); background: var(--surface); padding: 0; cursor: pointer; overflow: visible; display: flex; align-items: center; justify-content: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar #avatar-initials { font-family: "Cormorant Garamond", serif; font-size: 40px; font-weight: 600; color: var(--gold); }
.avatar img:not([hidden]) + #avatar-initials { display: none; }
.avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--cta); color: var(--cta-text); display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.avatar-edit svg { width: 16px; height: 16px; }
.with-info { display: inline-flex; align-items: center; gap: 6px; }
.info-btn { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--gold-line); background: transparent; color: var(--gold); font: italic 700 12px Georgia, serif; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.kv-right { display: inline-flex; align-items: center; gap: 10px; }
.btn.small-btn { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.readonly { min-height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: 14px; border: 1px dashed var(--line); color: var(--soft); font-size: 15px; }
#astro-rows .kv { border-bottom: 1px solid var(--line); padding: 6px 0; }
#astro-rows .kv:last-child { border-bottom: 0; }
#astro-rows .kv b { text-align: right; }
.premium-item { display: flex; gap: 12px; align-items: center; padding: 14px 16px; margin-bottom: 10px; border-radius: 16px; border: 1px solid var(--gold-line); background: var(--accent-panel); }
.premium-item p { margin: 2px 0 0; }
.premium-item .btn { flex-shrink: 0; }
.center-row { justify-content: center; padding-left: 0; }
.actions-2-1 .btn { font-size: 14px; padding: 0 6px; gap: 5px; }
.actions-2-1 .btn svg { width: 15px; height: 15px; }
@media (max-width: 420px) { .actions-2-1 #daily-share svg { display: none; } }
@media (max-width: 340px) { .actions-2-1 .btn { font-size: 12px; padding: 0 4px; } }

/* ===== Структура v3 ===== */
.tabbar { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tabbar button { font-size: 10px; letter-spacing: -.01em; padding: 0 1px; white-space: nowrap; }
.tabbar button svg { width: 22px; height: 22px; }
@media (max-width: 360px) { .tabbar button { font-size: 9px; } }

.tiles.single { grid-template-columns: 1fr; }
.tiles.single .tile { min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px; }
.invite-block { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.invite-btn, .topup-wide { display: flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; }
.invite-btn svg, .topup-wide svg { width: 20px; height: 20px; flex-shrink: 0; }
.invite-note { display: block; text-align: center; font-size: 12px; color: var(--muted); opacity: .75; }
#profile-invite + .invite-note { margin-top: -4px; }

.profile-head { flex-direction: row; align-items: center; justify-content: flex-start; gap: 16px; text-align: left; }
.avatar { width: 64px; height: 64px; flex-shrink: 0; }
.avatar #avatar-initials { font-size: 28px; }
.avatar-edit { width: 24px; height: 24px; right: -4px; bottom: -4px; }
.avatar-edit svg { width: 12px; height: 12px; }
.profile-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-who h1 { margin: 0; font-size: 26px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topup-wide { width: 100%; }
.gem-ico { display: inline-flex; }
.info-btn { width: 17px; height: 17px; font-size: 10px; }
.gold-num { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); }
.gold-num svg { width: 15px; height: 15px; }

#astro-rows .kv { padding: 10px 0; align-items: flex-start; }
#astro-rows .kv > span:first-child { flex-shrink: 0; }
.astro-val { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; text-align: right;
  color: var(--gold) !important; font-weight: 400; font-size: 15px; line-height: 1.35; letter-spacing: .01em; }
svg.zodiac { width: 18px; height: 18px; fill: currentColor; stroke: none; flex-shrink: 0; }
.sign-badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 6px; border-radius: 999px;
  border: 1px solid var(--gold-line); color: var(--gold); font-size: 13px; font-weight: 600; }
.sign-badge svg.zodiac { width: 22px; height: 22px; padding: 3px; border-radius: 50%; border: 1px solid var(--gold-line); }

.gate { display: flex; flex-direction: column; gap: 18px; padding: 6px 0 4px; }
.gate h2 { margin: 0; text-align: center; }
.gate p { margin: 0; line-height: 1.6; }
.gate .check-row { padding: 2px 0; line-height: 1.5; }
.gate #gate-ok { align-self: center; min-width: 220px; margin-top: 4px; }
.kv-link { padding: 0; font-size: 14px; text-align: right; }
.kv-link.muted-link { color: var(--soft); font-weight: 600; }

/* ===== Шторки: единые отступы, кнопки одной ширины ===== */
.sheet { gap: 16px; padding-top: 12px; }
#sheet-body { display: flex; flex-direction: column; gap: 16px; }
#sheet-body:empty { display: none; }
#sheet-body > h2, #sheet-body .gate > h2 { margin: 0; text-align: center; }
#sheet-body > .eyebrow { text-align: center; margin-bottom: -10px; }
#sheet-body > p, #sheet-body .gate p { margin: 0; line-height: 1.6; }
#sheet-body .btn, .sheet > #sheet-close, .gate #gate-ok { width: 100%; min-width: 0; align-self: stretch; margin: 0; }
#sheet-body textarea { width: 100%; }
.center-link { align-self: center; padding: 4px 8px; }

/* ===== Оценка ===== */
.stars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; }
.star { aspect-ratio: 1; border: 0; background: none; padding: 2px; color: var(--gold-line); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.star svg { width: 100%; height: 100%; max-width: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.star.on { color: var(--gold); }
.star.on svg { fill: currentColor; }
.stars-scale { display: flex; justify-content: space-between; margin-top: -10px; }
#stars-value { color: var(--gold); font-weight: 700; }

/* ===== Поддержка ===== */
.profile-end { display: flex; flex-direction: column; gap: 10px; }
.profile-end .btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.profile-end .btn svg { width: 20px; height: 20px; }
.ticket { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ticket p { margin: 0; white-space: pre-wrap; }
.ticket-answer { color: var(--soft); border-left: 2px solid var(--gold-line); padding-left: 10px; white-space: pre-wrap; }
.ticket textarea { min-height: 60px; }

/* ===== Аналитика ===== */
#admin-period { grid-template-columns: repeat(4, 1fr); margin: 0 16px 8px; }
#admin-body .block { margin-bottom: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.kpi { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--surface); }
.kpi-value { font-size: 20px; font-weight: 800; color: var(--gold); line-height: 1.2; }
.kpi-label { font-size: 12px; color: var(--soft); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 70px; padding: 4px 0; }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar span { display: block; width: 100%; min-height: 2px; background: var(--gold); opacity: .8; border-radius: 3px 3px 0 0; }
.funnel { position: relative; display: flex; justify-content: space-between; padding: 9px 12px; margin-bottom: 6px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.funnel span, .funnel b { position: relative; z-index: 1; }
.funnel i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--tab-on); }
.atable { width: 100%; border-collapse: collapse; font-size: 14px; }
.atable td { padding: 7px 4px; border-bottom: 1px solid var(--line); color: var(--soft); }
.atable td.num { text-align: right; white-space: nowrap; color: var(--text); }
.kpi-value { font-size: 18px; white-space: nowrap; }
.kpi .muted.small { font-size: 11px; }

/* ===== Совет дня для знака ===== */
.sign-day { margin-top: 16px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--gold-line); background: var(--accent-panel); text-align: left; position: relative; overflow: hidden; }
.sign-day-head { display: flex; align-items: center; gap: 8px; color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.sign-day p { margin: 8px 0 0; line-height: 1.55; }
.sign-day.locked p { filter: blur(5px); user-select: none; opacity: .7; }
.sign-day .link { margin-top: 6px; }
/* ===== Заполненность профиля ===== */
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 10px 0 6px; }
.progress span { display: block; height: 100%; background: var(--gold); border-radius: 3px; transition: width .4s; }
.step { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.step:last-child { border-bottom: 0; }
.step .gold svg, .gold.small svg { width: 13px; height: 13px; vertical-align: -2px; }
.step-check { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--gold-line); display: inline-flex; align-items: center; justify-content: center; color: var(--cta-text); font-size: 12px; flex-shrink: 0; }
.step.done { color: var(--muted); cursor: default; }
.step.done .step-check { background: var(--gold); border-color: var(--gold); }
.reward-line { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--gold); font-weight: 700; }
.reward-line svg { width: 16px; height: 16px; }
.astro-cta { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.astro-cta p { margin: 0; }
#onb-date { width: 100%; }
.spread-badge { display: inline-block; margin: 2px 0 1px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.spread-item .grow { display: flex; flex-direction: column; align-items: flex-start; }

/* ===== Подписка v2 ===== */
.tabbar { display: flex; }
.tabbar button { flex: 1 1 0; min-width: 0; }
.tabbar button[hidden] { display: none !important; }
.subs-title { margin: 4px 0 6px; }
.plan { display: flex; flex-direction: column; gap: 12px; }
.plan.free { background: var(--surface); }
.plan-head { display: flex; align-items: flex-start; gap: 10px; }
.plan-head .grow { display: flex; flex-direction: column; }
.plan-head .eyebrow { font-size: 10px; margin-bottom: 2px; }
.plan.premium { border: 1.5px solid var(--gold); box-shadow: var(--shadow); }
.features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.features li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.features li > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.features li b { font-weight: 700; }
.features small { font-size: 13px; }
.f-ico { width: 18px; flex-shrink: 0; display: inline-flex; justify-content: center; margin-top: 1px; }
.f-ico svg { width: 17px; height: 17px; }
.soon { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; background: var(--tab-on); color: var(--gold); vertical-align: 1px; }
.lock-tag { border: 1px solid var(--gold-line); border-radius: 999px; padding: 3px 9px; font-size: 12px; }
.lock-tag svg { width: 12px; height: 12px; }
.premium-ready { display: flex; flex-direction: column; margin-bottom: 18px; }
button.premium-item { width: 100%; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
button.premium-item .gold { font-size: 22px; }
#screen-premium .eyebrow { margin: 6px 0 10px; }
.f-title { display: block; }

/* ===== Лунный календарь ===== */
.lunar-today { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.moon-line { width: 100%; margin-bottom: 2px; }
.lunar-today.locked { filter: blur(3px); opacity: .6; pointer-events: none; }
.lunar-lock { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.lunar-lock p { margin: 0; }
.moon-chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); }
.moon-chip.good { border-color: var(--gold); color: var(--gold); background: var(--accent-panel); }
.moon-chip.bad { text-decoration: line-through; opacity: .6; }
#lunar-months { margin-bottom: 12px; }
.lunar-spheres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.lunar-week, .lunar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.lunar-week { margin-bottom: 4px; }
.lday { aspect-ratio: 1; border-radius: 10px; border: 1px solid transparent; background: var(--surface); color: var(--text); font: 600 14px inherit; font-family: inherit; cursor: pointer; padding: 0; }
.lday.good { background: var(--accent-panel); border-color: var(--gold); color: var(--gold); font-weight: 800; }
.lday.bad { color: var(--muted); opacity: .55; }
.lday.today { box-shadow: inset 0 0 0 2px var(--text); }
.lday.selected { outline: 2px solid var(--gold); outline-offset: 1px; }
.lunar-legend { display: flex; justify-content: center; gap: 16px; margin: 10px 0 14px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg.good { background: var(--gold); }
.lg.bad { background: var(--line); }
.lunar-day { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.lunar-day p { margin: 0; }
.lunar-day-title { font-size: 16px; }
.lunar-row { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.lunar-row.current b { color: var(--gold); }
.moon-status { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.moon-status.good { color: var(--gold); }
.moon-status.bad { color: var(--soft); opacity: .7; }
.admin-plan { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.tabs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tabs.three .tab { font-size: 13px; padding: 0 4px; }

/* ===== Колоды ===== */
.deck-group { margin-bottom: 18px; }
.deck-group .eyebrow { margin-bottom: 10px; }
.deck-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.deck-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 8px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: center; }
.deck-item b { font-size: 15px; margin-top: 4px; }
.deck-item small { font-size: 12px; line-height: 1.3; min-height: 16px; }
.deck-item .tag, .deck-item .soon { margin-top: 6px; }
.deck-item.locked .deck-fan img { filter: saturate(.55) brightness(.8); }
.deck-fan { position: relative; display: block; width: 120px; height: 92px; }
.deck-fan img { position: absolute; bottom: 0; left: 50%; width: 52px; height: 78px; object-fit: cover; border-radius: 6px; border: 1px solid var(--gold-line); box-shadow: 0 6px 14px rgba(0,0,0,.35); transform-origin: 50% 100%; }
.deck-fan img:nth-child(1) { transform: translateX(-50%) translateX(-26px) rotate(-14deg); }
.deck-fan img:nth-child(2) { transform: translateX(-50%) translateY(-6px); z-index: 2; }
.deck-fan img:nth-child(3) { transform: translateX(-50%) translateX(26px) rotate(14deg); }
.deck-fan.big { width: 240px; height: 180px; align-self: center; }
.deck-fan.big img { width: 100px; height: 150px; border-radius: 10px; }
.deck-fan.big img:nth-child(1) { transform: translateX(-50%) translateX(-56px) rotate(-12deg); }
.deck-fan.big img:nth-child(3) { transform: translateX(-50%) translateX(56px) rotate(12deg); }
.deck-fan.big img:nth-child(2) { transform: translateX(-50%) translateY(-10px); }
.spread-info { margin-left: 8px; vertical-align: 2px; width: 18px; height: 18px; font-size: 10px; display: inline-flex; }
.hour-select { appearance: none; min-height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--gold-line); background: var(--surface); color: var(--gold); font: 700 14px inherit; font-family: inherit; }

/* ===== Заголовок «Карта дня» с орнаментом ===== */
.daily-title { display: flex; align-items: center; gap: 14px; width: 100%; margin: 4px 0 0; font: 600 25px/1 "Cormorant Garamond", serif;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.daily-title span { padding-left: .2em; white-space: nowrap; }
.daily-title::before, .daily-title::after { content: ""; flex: 1; height: 18px; background: var(--gold);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 18'><defs><linearGradient id='g'><stop offset='0' stop-opacity='0'/><stop offset='1' stop-opacity='1'/></linearGradient></defs><rect x='0' y='8.4' width='96' height='1.2' fill='url(%23g)'/><path d='M99 9l3.2-2.4L105.4 9l-3.2 2.4z'/><circle cx='109.5' cy='9' r='1.1'/><path d='M120 1.5l1.7 5.6 5.6 1.9-5.6 1.9-1.7 5.6-1.7-5.6-5.6-1.9 5.6-1.9z'/><path d='M112.5 5.5c2.5-3.6 5-3.4 6.2-1.6M112.5 12.5c2.5 3.6 5 3.4 6.2 1.6' fill='none' stroke='black' stroke-width='.9'/></svg>") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 18'><defs><linearGradient id='g'><stop offset='0' stop-opacity='0'/><stop offset='1' stop-opacity='1'/></linearGradient></defs><rect x='0' y='8.4' width='96' height='1.2' fill='url(%23g)'/><path d='M99 9l3.2-2.4L105.4 9l-3.2 2.4z'/><circle cx='109.5' cy='9' r='1.1'/><path d='M120 1.5l1.7 5.6 5.6 1.9-5.6 1.9-1.7 5.6-1.7-5.6-5.6-1.9 5.6-1.9z'/><path d='M112.5 5.5c2.5-3.6 5-3.4 6.2-1.6M112.5 12.5c2.5 3.6 5 3.4 6.2 1.6' fill='none' stroke='black' stroke-width='.9'/></svg>") center / 100% 100% no-repeat; }
.daily-title::after { transform: scaleX(-1); }

/* Совет дня — на всю ширину, как остальные блоки */
.daily .sign-day { align-self: stretch; width: 100%; }
.daily .sign-day p { max-width: none; }

/* ===== Праздничный расклад дня ===== */
.event-banner { width: 100%; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; padding: 18px; margin: 4px 0;
  border-radius: 20px; border: 1px solid var(--gold); background: var(--accent-panel); color: var(--text); cursor: pointer;
  box-shadow: 0 0 24px rgba(227, 194, 122, .18); }
.event-banner small { line-height: 1.5; }
.event-cta { margin-top: 6px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.event-cta svg { width: 14px; height: 14px; }
#event-home { display: flex; flex-direction: column; gap: 6px; }

/* ===== Бонус первой покупки ===== */
.first-bonus { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--gold); background: var(--accent-panel); }
.first-bonus svg { width: 26px; height: 26px; stroke: var(--gold); fill: none; flex-shrink: 0; }
.first-bonus span { display: flex; flex-direction: column; gap: 2px; }
.first-bonus b { color: var(--gold); }

/* ===== Коллекция ===== */
.collection-entry { width: 100%; text-align: left; color: var(--text); cursor: pointer; margin-top: 12px; }
.coll-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.coll-grid img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; border: 1px solid var(--gold-line); }
.coll-grid img.unseen { opacity: .28; filter: grayscale(1); }
.ach { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); opacity: .55; }
.ach.on { opacity: 1; }
.ach .grow { display: flex; flex-direction: column; gap: 2px; }
.ach-ico svg { width: 22px; height: 22px; stroke: var(--gold); fill: none; stroke-width: 1.6; }
.ach.on .ach-ico svg { fill: var(--gold); }

/* ===== Заглянуть глубже ===== */
.teaser { margin-top: 16px; text-align: left; }
.teaser-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.teaser-lines li { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.teaser-lines .blur { filter: blur(4px); user-select: none; opacity: .75; }
.teaser .btn svg { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }

/* ===== Статистика дневника ===== */
.stats .eyebrow { margin: 14px 0 6px; }
.stat-bar { display: grid; grid-template-columns: 1fr 90px 28px; align-items: center; gap: 10px; font-size: 13px; padding: 4px 0; }
.stat-bar i { display: block; height: 6px; border-radius: 3px; background: var(--gold); min-width: 4px; }
.stat-bar b { text-align: right; }
.stats-lock { text-align: left; }

/* ===== Прочее ===== */
.danger-link { color: #d47a7a; margin-top: 8px; }
.tz-select { max-width: 170px; }
.hour-select.wide { width: 100%; min-height: 46px; color: var(--text); border-color: var(--line); }
.nowrap { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.nowrap svg { width: 14px; height: 14px; }
#streak-pill { cursor: pointer; }
#reading-share svg { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }
.admin-open { width: 100%; margin-bottom: 12px; }

/* Кнопка лунного календаря на главной */
.lunar-entry { gap: 8px; }
.lunar-btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-color: var(--gold-line); color: var(--gold); }
.lunar-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.lunar-btn.locked { opacity: .55; filter: saturate(.4); }
#lunar-note { line-height: 1.4; }

/* значения справа в строках профиля */
.kv > b, .kv > .gold-num { text-align: right; margin-left: auto; }
