/* Garnet Автор: Mini App. Палитра Garnet (красный, эспрессо), шрифт Montserrat. */
:root {
  --bg: #F6F5F2;
  --card: #FFFFFF;
  --ink: #16130F;
  --soft: #6B655E;
  --line: rgba(22, 19, 15, 0.10);
  --accent: #BE1E22;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(190, 30, 34, 0.09);
  --ok: #2F8F5B;
  --warn: #B7791F;
  --radius: 18px;
  --nav-h: 66px;
}
:root[data-theme="dark"] {
  --bg: #17110C;
  --card: #221913;
  --ink: #F4EEE4;
  --soft: #A99F92;
  --line: rgba(255, 240, 198, 0.14);
  --accent: #D6383C;
  --accent-soft: rgba(214, 56, 60, 0.16);
  --ok: #4CB37E;
  --warn: #E4B54E;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.45; }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px); }

/* шапка */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--bg); }
.logo { font-weight: 800; font-size: 24px; letter-spacing: -0.5px; }
.logo i { color: var(--accent); font-style: normal; }
.top-right { display: flex; gap: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 9px 14px; font: 600 13px "Montserrat", sans-serif; box-shadow: 0 0 0 1px var(--line) inset; cursor: pointer; }
.icon-btn { width: 38px; height: 38px; padding: 0; justify-content: center; }

/* страница */
main { padding: 4px 16px 16px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--soft); margin: 18px 4px 6px; }
h1 { font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -0.6px; margin: 2px 4px 14px; }
h2 { font-size: 18px; font-weight: 700; margin: 0 0 10px; }
p { margin: 0 0 10px; }
.muted { color: var(--soft); }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 0 0 1px var(--line) inset; }
.notice { background: var(--accent-soft); box-shadow: none; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* кнопки */
.btn { display: block; width: 100%; border: 0; border-radius: 14px; padding: 15px 18px; font: 700 15px "Montserrat", sans-serif;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; text-align: center; }
.btn.secondary { background: var(--bg); color: var(--ink); box-shadow: 0 0 0 1px var(--line) inset; }
.btn:disabled { opacity: .45; cursor: default; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.badge.ok { background: rgba(47,143,91,.14); color: var(--ok); }

/* карточки «Что делаем» */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.tile { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: 0 0 0 1px var(--line) inset; border: 0;
  text-align: left; color: var(--ink); font-family: inherit; cursor: pointer; position: relative; }
.tile.off { opacity: .55; cursor: default; }
.tile .art { height: 92px; border-radius: 12px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.art.car { background: linear-gradient(135deg, #BE1E22, #8E1414); }
.art.reel { background: linear-gradient(135deg, #3a2a1c, #17110C); }
.tile b { display: block; font-size: 16px; }
.tile span.s { color: var(--soft); font-size: 12.5px; }
.tile .badge { position: absolute; top: 20px; right: 20px; background: var(--card); }
.tile .art { color: #FFFFFF; }

/* список */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 13px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.list li:first-child { border-top: 0; }
.list .k { color: var(--soft); }
.list .v { font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* счётчики */
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 8px 0 14px; }
.meter > div { height: 100%; background: var(--accent); border-radius: 99px; }
.big { font-size: 40px; font-weight: 800; letter-spacing: -1px; }

/* тарифы */
.plan { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; background: var(--card); box-shadow: 0 0 0 1px var(--line) inset; }
.plan.cur { box-shadow: 0 0 0 2px var(--accent) inset; }
.plan .price { font-size: 20px; font-weight: 800; }
.plan .old { color: var(--soft); text-decoration: line-through; font-weight: 600; font-size: 15px; }
.plan .promo-price { color: var(--accent); }
.plan .promo { color: var(--accent); font-size: 12.5px; font-weight: 700; margin-top: 4px; }

/* фирменный стиль */
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 8px 0 10px; }
.sw { aspect-ratio: 1; border-radius: 12px; border: 0; box-shadow: 0 0 0 1px var(--line) inset; cursor: pointer; position: relative; }
.sw.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--accent); }
.hex { width: 100%; border: 0; border-radius: 12px; padding: 12px 14px; font: 600 15px "Montserrat", sans-serif; background: var(--bg);
  color: var(--ink); box-shadow: 0 0 0 1px var(--line) inset; text-transform: uppercase; }
.hex.bad { box-shadow: 0 0 0 2px var(--accent) inset; }
.seg { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; margin: 6px 0 10px; box-shadow: 0 0 0 1px var(--line) inset; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 9px 6px; font: 600 13px "Montserrat", sans-serif; color: var(--soft); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.fonts { display: flex; flex-direction: column; gap: 8px; }
.font { border: 0; text-align: left; background: var(--bg); border-radius: 12px; padding: 11px 14px; box-shadow: 0 0 0 1px var(--line) inset; color: var(--ink); cursor: pointer; }
.font.on { box-shadow: 0 0 0 2px var(--accent) inset; }
.font small { display: block; font-family: "Montserrat", sans-serif; color: var(--soft); font-size: 11px; margin-bottom: 2px; }
.font span { font-size: 18px; }
.slide { border-radius: 16px; padding: 22px 20px; aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 0 0 1px var(--line) inset; overflow: hidden; }
.slide .bar { width: 54px; height: 8px; border-radius: 99px; }
.slide .h { font-size: 27px; line-height: 1.1; font-weight: 800; }
.slide .t { font-size: 15px; line-height: 1.4; }
.slide .chip { align-self: flex-start; padding: 8px 14px; border-radius: 99px; font-weight: 700; font-size: 13px; }
.slide .cta { padding: 13px 16px; border-radius: 12px; font-weight: 700; text-align: center; }

/* нижняя панель */
nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
nav .in { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
nav button { border: 0; background: transparent; color: var(--soft); font: 600 11px "Montserrat", sans-serif; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; cursor: pointer; position: relative; }
nav button svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
nav button.on { color: var(--ink); }
nav button.on::after { content: ""; position: absolute; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 24px); transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; z-index: 20; max-width: 90%; text-align: center; }
.center { text-align: center; padding: 40px 12px; }
