:root {
  --bg:#12100E; --bg-soft:#1B1815;
  --text:#F2EAE0; --muted:#BFB4A8; --muted-dim:#A29689;
  --gold:#E7C083; --gold-strong:#F0CE96; --gold-deep:#D9A24B; --on-gold:#1A140F;
  --surface:rgba(255,255,255,.05); --surface-2:rgba(255,255,255,.045);
  --line:rgba(255,255,255,.08); --line-strong:rgba(255,255,255,.16);
  --tabs-bg:rgba(18,16,14,.92); --tabs-fg:#948A80; --tabs-fg-on:#F2EAE0;
  --gold-tint:rgba(217,162,75,.13); --gold-tint-2:rgba(217,162,75,.07); --gold-line:rgba(217,162,75,.30);
  --green-tint:rgba(143,160,122,.10); --green-line:rgba(143,160,122,.30); --green-text:#B9C7A6;
  --glyph-bg:rgba(0,0,0,.28);
  --warm-a:rgba(217,162,75,.20); --warm-b:rgba(143,160,122,.13); --warm-fade:rgba(18,16,14,0);
  --sticky-from:rgba(28,24,20,.94); --sticky-to:rgba(20,17,14,.96);
  --btn-from:#F0CE96; --btn-to:#D9A24B;
}

[data-theme="light"] {
  --bg:#F7F2E8; --bg-soft:#FFFFFF;
  --text:#2B241C; --muted:#6F6459; --muted-dim:#857A6E;
  --gold:#8B5A15; --gold-strong:#A06A18; --gold-deep:#C6892B; --on-gold:#FFF9F0;
  --surface:#FFFFFF; --surface-2:#FFFFFF;
  --line:#E4D9C7; --line-strong:#D6C7B0;
  --tabs-bg:rgba(250,246,238,.96); --tabs-fg:#6F6459; --tabs-fg-on:#2B241C;
  --gold-tint:rgba(160,106,24,.14); --gold-tint-2:rgba(160,106,24,.10); --gold-line:rgba(160,106,24,.35);
  --green-tint:rgba(94,116,66,.12); --green-line:rgba(94,116,66,.32); --green-text:#4F6236;
  --glyph-bg:#F1E7D6;
  --warm-a:rgba(217,162,75,.16); --warm-b:rgba(143,160,122,.10); --warm-fade:rgba(247,242,232,0);
  --sticky-from:rgba(250,246,238,.96); --sticky-to:rgba(247,242,232,.97);
  --btn-from:#F2D49B; --btn-to:#DCA94F;
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-font-smoothing:antialiased; }
body { background:var(--bg); color:var(--text); font-size:18px; line-height:1.55;
  font-family:-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  max-width:430px; margin:0 auto; min-height:100vh; position:relative;
  transition:background .18s ease, color .18s ease; }
.warm { position:fixed; inset:0; pointer-events:none; max-width:430px; margin:0 auto;
  background: radial-gradient(110% 45% at 85% -5%, var(--warm-a) 0%, var(--warm-fade) 62%),
              radial-gradient(80% 40% at 0% 20%, var(--warm-b) 0%, var(--warm-fade) 60%); }
.screen { position:relative; z-index:2; padding-bottom:128px; }
.top { display:flex; align-items:center; gap:11px; padding:14px 18px 10px; }
.ava { width:40px; height:40px; border-radius:50%; flex:none; object-fit:cover;
  box-shadow:0 0 0 1.5px rgba(217,162,75,.55), 0 0 16px rgba(217,162,75,.25); }
.theme { margin-left:auto; width:38px; height:38px; border-radius:50%; flex:none; cursor:pointer; padding:0;
  background:var(--surface); border:1px solid var(--line-strong); color:var(--gold); line-height:0;
  display:flex; align-items:center; justify-content:center; }
.theme svg { display:block; }
.who .n { font-size:17px; font-weight:650; }
.who .s { font-size:14px; color:var(--muted); }
.top .r { margin-left:auto; font-size:14px; color:var(--muted); }
.body { padding:6px 18px 112px; }
h1 { font-family:Georgia,serif; font-size:24px; font-weight:600; }
h2 { font-family:Georgia,serif; font-size:22px; font-weight:600; }
.muted { color:var(--muted); } .small { font-size:16px; } .amber { color:var(--gold); }
.card { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:15px 16px; }
.bubble { background:var(--surface-2); border:1px solid var(--line); border-radius:6px 18px 18px 18px; padding:13px 15px; }
.bubble .meta { font-size:13.5px; color:var(--muted-dim); margin-bottom:9px; letter-spacing:.04em; }
.btn { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; padding:16px; border-radius:15px;
  font-size:17px; font-weight:650; color:var(--on-gold); background:linear-gradient(135deg,var(--btn-from),var(--btn-to));
  border:none; cursor:pointer; box-shadow:0 10px 26px rgba(217,162,75,.22); }
.btn.alt { background:var(--surface); color:var(--text); border:1px solid var(--line-strong); box-shadow:none; }
.btn.ghost { background:transparent; border:1px solid var(--line-strong); color:var(--text); box-shadow:none; }
.field { background:var(--surface-2); border:1px solid var(--line); border-radius:14px; padding:13px 14px; }
.field input, .field textarea { width:100%; background:transparent; border:none; color:var(--text); font-size:17.5px; font-family:inherit; outline:none; resize:none; }
.lab { font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted-dim); margin-bottom:6px; }
.chip { display:inline-flex; align-items:center; gap:6px; padding:8px 13px; border-radius:999px;
  background:var(--gold-tint); border:1px solid var(--gold-line); font-size:14.5px; color:var(--gold); }
.sph { display:flex; align-items:center; gap:12px; padding:13px 14px; border-radius:15px; margin-bottom:9px; width:100%;
  background:var(--surface-2); border:1px solid var(--line); color:var(--text); text-align:left; cursor:pointer; }
.sph .ico { width:36px; height:36px; border-radius:10px; background:var(--surface); display:flex; align-items:center; justify-content:center; font-size:18px; flex:none; }
.sph .t { font-size:17px; font-weight:600; } .sph .d { font-size:15px; color:var(--muted); }
.tabs { position:fixed; bottom:0; left:0; right:0; max-width:430px; margin:0 auto; display:flex;
  padding:10px 8px calc(12px + env(safe-area-inset-bottom)); border-top:1px solid var(--line);
  background:var(--tabs-bg); backdrop-filter:blur(12px); z-index:9;
  box-shadow:0 -6px 18px rgba(43,36,28,.05); }
.tabs button { flex:1; background:none; border:none; color:var(--tabs-fg); font-size:13px; font-family:inherit; padding-top:3px; cursor:pointer; }
.tabs button.on { color:var(--tabs-fg-on); }
.tabs i { display:block; font-size:21px; font-style:normal; margin-bottom:3px; }
.price { font-weight:700; color:var(--gold); white-space:nowrap; font-size:17.5px; }
.old { color:var(--tabs-fg); text-decoration:line-through; font-size:15px; margin-right:6px; }
.disc { display:inline-flex; padding:3px 9px; border-radius:999px; background:var(--green-tint); color:var(--green-text); font-size:13.5px; font-weight:650; }
.prod { display:flex; gap:12px; padding:13px; border-radius:16px; background:var(--surface-2);
  border:1px solid var(--line); margin-bottom:10px; width:100%; text-align:left; color:inherit; cursor:pointer; }
.prod.hot { border-color:var(--gold-line); background:var(--gold-tint-2); }
.prod .ph { width:54px; height:54px; border-radius:12px; flex:none; display:flex; align-items:center; justify-content:center; font-size:22px; }
.hist { display:flex; align-items:center; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); }
.hist:last-child { border-bottom:none; }
.st { font-size:12px; padding:4px 9px; border-radius:999px; }
.st.ok { background:var(--green-tint); color:var(--green-text); } .st.work { background:var(--gold-tint); color:var(--gold); }
.runes { display:flex; gap:10px; justify-content:center; margin:40px 0 20px; }
.runes span { width:58px; height:74px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  font-size:26px; font-family:Georgia,serif; color:var(--gold); background:var(--surface); border:1px solid var(--line); }
.runes span.win { border-color:var(--gold-line); box-shadow:0 0 24px rgba(217,162,75,.35); background:var(--gold-tint); }
.center { text-align:center; }
.hide { display:none; }

.talism { display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:18px;
  background:linear-gradient(150deg, var(--gold-tint), var(--surface-2));
  border:1px solid var(--gold-line); }
.talism .glyph { width:52px; height:62px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  font-size:28px; font-family:Georgia,serif; color:var(--gold-strong); background:var(--glyph-bg);
  box-shadow:inset 0 0 22px rgba(217,162,75,.22), 0 0 18px rgba(217,162,75,.16); flex:none; }
.talism .rn { font-family:Georgia,serif; font-size:20px; font-weight:600; }
.talism .rl { font-size:14px; color:var(--muted); letter-spacing:.06em; text-transform:uppercase; }
.action { background:var(--green-tint); border:1px solid var(--green-line); border-radius:16px; padding:11px 14px; }
.action .h { font-size:11.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--green-text); margin-bottom:5px; }

.talism.sticky { position:sticky; top:0; z-index:6; backdrop-filter:blur(10px);
  background:linear-gradient(150deg, var(--sticky-from), var(--sticky-to));
  margin:0 -18px 10px; border-radius:0 0 16px 16px; border-left:none; border-right:none; border-top:none; }

/* Деревянные руны-кружки: текстура из Vertex, знак рисуется точно */
.coin { position:relative; border-radius:50%; display:flex; align-items:center; justify-content:center;
  flex:none; transform-style:preserve-3d;
  background:none; overflow:hidden;
  box-shadow:0 6px 14px rgba(0,0,0,.45); }
.coin img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  border-radius:50%; display:block; }
.coin .g { position:relative; z-index:1; font-family:Georgia,serif; line-height:1; color:#FFD08A;
  text-shadow:0 1px 0 rgba(255,240,205,.45), 0 2px 3px rgba(46,20,0,.85), 0 0 3px rgba(46,20,0,.55),
              0 0 12px rgba(255,170,60,.35); }
[data-theme="light"] .coin { box-shadow:0 5px 12px rgba(70,45,20,.30); }

.runes .coin.spin { animation: coinsway 1.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.12s); }
.runes .coin.win { border-color: rgba(245,176,74,.75);
  box-shadow: 0 0 0 2px rgba(245,176,74,.35), 0 0 24px rgba(245,176,74,.45), 0 6px 16px rgba(0,0,0,.45); }
@keyframes coinsway { 0%,100% { transform: rotateY(-20deg) translateY(0); } 50% { transform: rotateY(20deg) translateY(-4px); } }

/* Частые вопросы */
.faq { border:1px solid var(--line); border-radius:14px; background:var(--surface); margin-bottom:9px; }
.faq summary { cursor:pointer; list-style:none; padding:13px 40px 13px 15px; position:relative;
  font-size:16px; font-weight:600; line-height:1.35; }
.faq summary::-webkit-details-marker { display:none; }
.faq summary::after { content:"+"; position:absolute; right:15px; top:50%; transform:translateY(-50%);
  color:var(--gold); font-size:20px; line-height:1; }
.faq[open] summary::after { content:"–"; }
.faq > div { padding:0 15px 14px; font-size:15.5px; color:var(--muted); line-height:1.5; }

/* Переключатель внутри вкладки: отзывы / вопросы */
.seg { display:flex; gap:6px; background:var(--surface-2); border:1px solid var(--line);
  border-radius:14px; padding:5px; margin:8px 0 14px; }
.seg button { flex:1; border:none; background:none; font-family:inherit; font-size:15.5px; font-weight:600;
  color:var(--muted); padding:10px 8px; border-radius:10px; cursor:pointer; }
.seg button.on { background:var(--gold-tint-2); color:var(--gold); box-shadow:0 1px 0 rgba(0,0,0,.04); }

/* Вопрос-ответ под раскладом: тот же вид, что и форма отзыва */
#chat_log { display:flex; flex-direction:column; }
#chat_log .msg { padding:11px 0 0; margin-top:11px; border-top:1px solid var(--line);
  font-size:16px; line-height:1.5; white-space:pre-wrap; }
#chat_log .msg.me { color:var(--muted); font-size:15px; }
#chat_log .msg.her::before { content:"Есения"; display:block; font-size:13px; letter-spacing:.06em;
  text-transform:uppercase; color:var(--gold); margin-bottom:5px; font-weight:650; }

/* Расклад как мессенджер */
.msgr { display:flex; flex-direction:column; height:calc(100dvh - 72px); max-width:430px; margin:0 auto; }
.msgr-top { display:flex; gap:10px; align-items:center; padding:10px 14px; border-bottom:1px solid var(--line);
  background:var(--surface); }
.msgr-name { font-weight:650; font-size:15.5px; }
.msgr-status { font-size:12.5px; color:var(--muted); }
.msgr-top .ava { width:38px; height:38px; border-radius:50%; object-fit:cover; flex:none;
  border:1px solid var(--gold-line); }
.msgr-log { flex:1; overflow-y:auto; padding:12px 12px 8px; display:flex; flex-direction:column; gap:9px; }
.bub { max-width:86%; padding:10px 13px; border-radius:16px; font-size:16px; line-height:1.45; }
.bub.her { align-self:flex-start; background:var(--surface); border:1px solid var(--line); border-bottom-left-radius:6px; }
.bub.me { align-self:flex-end; background:var(--gold-tint-2); border:1px solid var(--gold-line); border-bottom-right-radius:6px; }
.who { font-size:12px; color:var(--gold); margin-bottom:4px; }
.msg-text { white-space:pre-wrap; }
.rune-bub { display:flex; gap:10px; align-items:center; }
.pick { display:flex; flex-direction:column; gap:7px; margin-top:9px; }
.pick-btn { text-align:left; background:var(--gold-tint); border:1.5px solid var(--gold-line); color:var(--text);
  border-radius:12px; padding:12px 14px; font:inherit; font-size:15.5px; font-weight:600; cursor:pointer;
  box-shadow:0 1px 0 rgba(0,0,0,.06); }
.pick-btn:active { transform:scale(.99); }
.pick-btn::after { content:"›"; float:right; color:var(--gold); font-weight:700; margin-left:8px; }
.msgr-bar { display:flex; align-items:flex-end; gap:8px; padding:9px 12px 12px; border-top:1px solid var(--line);
  background:var(--surface); }
.clip { font-size:20px; line-height:1; padding:9px 3px; cursor:pointer; opacity:.85; }
#msgr_in { flex:1; resize:none; max-height:120px; background:var(--surface-2); color:var(--text);
  border:1px solid var(--line); border-radius:16px; padding:10px 13px; font:inherit; font-size:16px; }
.msgr-send { width:42px;height:42px;border-radius:50%;background:var(--gold);color:#241c15;border:none;
  font-size:16px;cursor:pointer;flex:none; }

/* Картинка в стартовом посте */

/* Стартовый пост */
.hero { width:100%; height:170px; object-fit:cover; object-position:center 18%; border-radius:14px;
  display:block; margin-bottom:10px; }
.start-post { font-size:15.5px; line-height:1.45; }
.start-post p { margin:0 0 8px; }
.start-post p:last-child { margin-bottom:0; }
.sp-hello { margin-bottom:8px; font-size:16.5px; }
.sp-accent { background:var(--gold-tint); border:1px solid var(--gold-line); border-radius:12px;
  padding:9px 11px; margin:8px 0 !important; font-size:15px; }
.sp-ask { margin-top:10px !important; color:var(--muted); }
.bub .pick { margin-top:10px; }

/* Регистрация в стартовом посте */
.reg { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.reg input { width:100%; background:var(--surface-2); color:var(--text); border:1px solid var(--line);
  border-radius:12px; padding:12px 13px; font:inherit; font-size:16px; }
