/* «Горы · беж» — перенесено из макеты/главная.html (этап 3) */

@font-face { font-family: "Lora"; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url("../fonts/lora-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Lora"; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url("../fonts/lora-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

html {
  --bg: #202925; --card: #2b3530; --text: #f3ecdf; --muted: #a9b3a9; --line: #3a463f;
  --chip: #35403a; --header: rgba(32, 41, 37, .72); --danger: #f08f72;
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 10px 28px rgba(0,0,0,.22); --card-border: rgba(255,255,255,.05);
  --radius: 22px; --head: "Lora", Georgia, serif;
  --b1: linear-gradient(145deg, #e9a25e, #a65a22); --b2: linear-gradient(145deg, #3f8c6d, #1a4636);
  --b3: linear-gradient(145deg, #5f655f, #2a2e2b); --b4: linear-gradient(145deg, #c4935f, #6e4624);
  --b0: linear-gradient(145deg, #77837a, #3d4741); --badge-line: #fff4e2;
  /* Беж: кнопки и выделения сливочно-бежевые, проценты песочно-золотые, рыжий — для подсказок */
  --ink: #ecdcc0; --on-ink: #23201a; --accent: #e9c48f; --accent2: #f09a5b;
  background: var(--bg);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: .6; cursor: default; }
a { color: inherit; text-decoration: none; }
input { font: inherit; color: inherit; }
h1, h2, h3, .title, .page-h { font-family: var(--head); }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* Фон «Горы»: звёздное небо стоит на месте, горы уезжают при прокрутке */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(#17212d 0%, #1c282b 40%, #202925 75%); }
.sky svg { width: 100%; height: 100%; display: block; }
.scene { position: absolute; top: 0; left: 0; right: 0; height: 300px; z-index: 0; overflow: hidden; pointer-events: none; }
.scene svg { width: 100%; height: 100%; display: block; }
.scene::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(transparent, var(--bg)); }

.phone { max-width: 440px; margin: 0 auto; padding: 0 16px 40px; position: relative; z-index: 1; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; margin: 0 -16px; padding: 12px 16px; display: flex; align-items: center; gap: 12px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--header); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--text); margin: 4px 0; transition: .25s; }
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.title { flex: 1; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.me { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: 15px; }
.date { color: var(--muted); font-size: 14px; font-weight: 500; margin: 2px 4px 96px; }

/* Выпадающие панели */
.shade { position: fixed; inset: 0; z-index: 8; background: rgba(15, 12, 8, .3); animation: fade .2s; }
.drop { position: absolute; z-index: 9; top: 66px; background: var(--card); border-radius: 18px; border: 1px solid var(--card-border);
  box-shadow: 0 20px 50px rgba(20,15,10,.22); overflow: hidden; animation: pop .22s ease-out; }
.drop.left { left: 16px; right: 16px; }
.drop.right { right: 16px; min-width: 250px; }
.drop-item { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 11px 16px; }
.drop-item + .drop-item { border-top: 1px solid var(--line); }
.drop-item .grow { flex: 1; }
.drop .who { padding: 12px 16px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.drop .danger { color: var(--danger); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translate(-50%, 100%); } }

/* Иконки разделов */
.badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; color: var(--badge-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 8px rgba(20,15,10,.18); }
.badge.sm { width: 34px; height: 34px; border-radius: 11px; }
.badge.sm svg.i { width: 19px; height: 19px; }
.t-0 { background: var(--b0); } .t-1 { background: var(--b1); } .t-2 { background: var(--b2); }
.t-3 { background: var(--b3); } .t-4 { background: var(--b4); }

/* Секции и карточки */
.sec-h { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 4px 10px; }
.sec-h h2 { font-size: 21px; margin: 0; font-weight: 600; }
.link { color: var(--accent); font-size: 14px; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 15%, transparent); }
.muted { color: var(--muted); font-size: 14px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--card-border);
  padding: 16px; margin-bottom: 12px; }
.rows-card { padding: 4px 16px; }

/* Строки разделов */
.row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 0; }
.row + .row { border-top: 1px solid var(--line); }
.row .grow { flex: 1; }
.arrow { color: var(--muted); font-size: 22px; line-height: 1; }

/* Экран раздела */
.back { color: var(--accent); font-size: 17px; font-weight: 600; padding: 6px 4px; }
.page-h { display: flex; align-items: center; gap: 12px; font-size: 28px; font-weight: 700; margin: 8px 4px 16px; }
.stub { text-align: center; padding: 36px 16px; color: var(--muted); }
.stub.small { padding: 22px 16px; font-size: 15px; }
.note { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; }
.primary { display: block; width: 100%; padding: 15px; border-radius: 16px; background: var(--ink); color: var(--on-ink);
  font-weight: 700; font-size: 17px; margin-top: 8px; }

/* Формы */
.field { display: block; width: 100%; padding: 13px 14px; border-radius: 13px; border: 1.5px solid transparent; background: var(--chip); outline: none; }
.field:focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.field::placeholder { color: var(--muted); }
.lbl { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin: 14px 2px 6px; }
.err { color: var(--danger); font-size: 14px; font-weight: 600; margin: 12px 2px 0; min-height: 1em; }
.err:empty { display: none; }

/* Экран входа */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 140px 0 40px; }
.auth .brand-big { font-family: var(--head); font-size: 34px; font-weight: 700; text-align: center; margin: 0 0 6px; }
.auth .sub { text-align: center; color: var(--muted); margin: 0 0 22px; }
.auth .card { padding: 20px 18px 22px; }
.auth .card .lbl:first-child { margin-top: 0; }

/* Нижняя шторка (на компьютере — окно по центру) */
.sheet { position: fixed; z-index: 20; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 440px;
  background: var(--card); border-radius: 24px 24px 0 0; padding: 8px 16px 24px; max-height: 88vh; overflow-y: auto;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(15,10,5,.25); animation: up .25s ease-out; }
.sheet .grip { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h3 { margin: 0 0 4px; font-size: 19px; }
.shade.top-layer { z-index: 19; }

.toast { position: fixed; z-index: 30; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink); color: var(--on-ink);
  padding: 12px 18px; border-radius: 14px; font-size: 15px; animation: fade .2s; white-space: nowrap; }

/* Боковое меню — только на широком экране */
.side { display: none; position: sticky; top: 16px; height: calc(100vh - 32px); z-index: 12; flex-direction: column; gap: 4px;
  padding: 20px 12px 14px; margin: 16px 0; border-radius: 24px; border: 1px solid var(--card-border);
  background: rgba(32, 41, 37, .58); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { font-family: var(--head); font-size: 24px; font-weight: 700; padding: 4px 10px 20px; }
.side nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.side-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: 14px; text-align: left;
  font-weight: 600; color: var(--muted); }
.side-item:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.side-item.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.side-me { position: relative; }
.side-me .me { width: 34px; height: 34px; display: grid; place-items: center; flex: none; }
.side-me .dots-s { margin-left: auto; letter-spacing: 1px; }
.drop.side-menu { top: auto; bottom: 54px; left: 0; right: 0; }

/* ===== Широкий экран (компьютер): меню слева, кешбеки | покупки, разделы на всю ширину ===== */
@media (min-width: 960px) {
  .phone.app { max-width: 1400px; display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 36px; padding: 0 32px 48px; }
  .side { display: flex; }
  .top, .mob-only { display: none !important; }
  .main { padding-top: 30px; }
  .date { font-size: 15px; margin-bottom: 130px; }
  .scene { height: 340px; }
  .home-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .home-grid > section > .sec-h:first-child { margin-top: 0; }
  .col-all { grid-column: 1 / -1; }
  .col-all .sec-h { margin-top: 26px !important; }
  .rows-card { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); column-gap: 28px; }
  .rows-card .row { border-top: 0; }
  .page-h { font-size: 32px; margin-top: 0; }
  .sheet { max-width: 520px; top: 50%; bottom: auto; transform: translate(-50%, -50%); border-radius: 24px; animation: fade .2s; }
  .sheet .grip { display: none; }
}
