/* Алкомаркет — Telegram Mini App. Light, airy, follows the Telegram theme. */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/static/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-weight: 200 800; font-display: swap;
  src: url('/static/fonts/manrope-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/static/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; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/static/fonts/jetbrains-mono-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/static/fonts/jetbrains-mono-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/static/fonts/jetbrains-mono-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; }
/* real narrow-nbsp glyph for «1 250 ₸» */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/static/fonts/alco-nnbsp.ttf') format('truetype'); unicode-range: U+202F; }

:root {
  --accent: #F2A93B; --accent-2: #f6bd62; --accent-ink: #2b1b00;
  --brick: #C4552B;
  --ok: #2f9e5b; --warn: #d98a12; --bad: #d64545;
  --fb-page: #f4f2ee; --fb-card: #ffffff; --fb-text: #1d1b18; --fb-hint: #8a857c;
  --page: var(--tg-theme-secondary-bg-color, var(--fb-page));
  --card: var(--tg-theme-bg-color, var(--fb-card));
  --text: var(--tg-theme-text-color, var(--fb-text));
  --hint: var(--tg-theme-hint-color, var(--fb-hint));
  --line: color-mix(in srgb, var(--text) 9%, transparent);
  --soft: color-mix(in srgb, var(--text) 5%, transparent);
  --shadow: 0 1px 2px rgba(60, 40, 10, .05), 0 6px 20px rgba(60, 40, 10, .07);
  --shadow-up: 0 -8px 30px rgba(40, 25, 5, .18);
  --tile-s: 60%; --tile-l: 94%;
  --r: 16px;
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --safe-t: max(env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  --mono: 'Manrope', system-ui, sans-serif; /* tabular figures */
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme='dark'] {
  --fb-page: #121110; --fb-card: #1e1c1a; --fb-text: #f3efe9; --fb-hint: #9a948a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  --tile-s: 22%; --tile-l: 21%;
  --brick: #e8714a;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html.sheet-open, html.sheet-open body { overflow: hidden; }
body {
  margin: 0; background: var(--page); color: var(--text);
  font: 500 15px/1.4 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
.hint { color: var(--hint); font-size: 13px; }
.num, .price { font-family: var(--mono); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; letter-spacing: -.01em; }
.ico { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

#app { min-height: 100vh; min-height: var(--tg-vh, 100vh); }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.screen { animation: enter .22s var(--ease) both; padding-bottom: calc(24px + var(--safe-b)); }
.screen.has-bar { padding-bottom: calc(96px + var(--safe-b)); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.boot { display: grid; place-items: center; height: 100vh; }
.boot-logo { width: 54px; height: 54px; border-radius: 16px; background: var(--accent); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); opacity: .6; } }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px;
  transition: transform .12s var(--ease), opacity .15s, background .15s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--soft); color: var(--text); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--text); box-shadow: var(--shadow); position: relative; flex: none; }
.icon-btn:active { transform: scale(.94); }
.badge-dot { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--brick); color: #fff; font: 800 11px/19px 'Manrope'; text-align: center; }

/* ---------- catalog header */
.top { padding-top: calc(14px + var(--safe-t)); }
.top-row { display: flex; align-items: center; gap: 10px; }
.brand { flex: 1; min-width: 0; }
.brand h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.brand .hint { margin-top: 2px; }
.search { display: block; position: relative; margin: 14px 0 4px; }
.search input { width: 100%; height: 46px; border-radius: 14px; border: 0; background: var(--card); padding: 0 40px 0 44px; box-shadow: var(--shadow); font-size: 15px; outline: none; }
.search input:focus { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.search .ico { position: absolute; left: 14px; top: 12px; pointer-events: none; color: var(--hint); }
.search .clear { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; display: grid; place-items: center; color: var(--hint); }
.chips-bar { position: sticky; top: 0; z-index: 20; padding: 8px 0 8px; margin: 0 -16px; background: color-mix(in srgb, var(--page) 90%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); padding-top: calc(8px + var(--safe-t)); }
.chips { scroll-padding-left: 16px; display: flex; gap: 8px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 15px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font-weight: 700; font-size: 14px; white-space: nowrap; scroll-snap-align: start; transition: background .15s, color .15s, transform .12s; }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--accent); color: var(--accent-ink); }
.chip.vol { min-width: 64px; height: 42px; border-radius: 14px; }
.sect { margin: 20px 0 10px; display: flex; align-items: baseline; gap: 8px; }
.sect h2 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.sect .hint { font-weight: 600; }

/* ---------- product cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pcard { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; text-align: left; animation: enter .28s var(--ease) both; position: relative; }
.pcard:active { transform: scale(.985); }
.pic { position: relative; aspect-ratio: 1 / 1; background: hsl(var(--h) var(--tile-s) var(--tile-l)); display: grid; place-items: center; overflow: hidden; }
.pic img { position: absolute; left: 0; top: 0; display: block; height: calc(100% + 1px); }
.pic img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.pic img.on { opacity: 1; }
.pic-ph { color: hsl(var(--h) 35% 62%); }
.pcard .tag { position: absolute; top: 8px; left: 8px; padding: 2px 7px; border-radius: 8px; background: rgba(255,255,255,.85); color: var(--brick); font-weight: 800; font-size: 11px; }
:root[data-theme='dark'] .pcard .tag { background: rgba(0,0,0,.45); }
.pcard.out .pic { filter: grayscale(.7); opacity: .65; }
.pcard .out-t { position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 800; color: var(--hint); background: var(--card); padding: 3px 8px; border-radius: 8px; }
.pbody { padding: 10px 12px 13px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pname { font-weight: 700; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.pmeta { color: var(--hint); font-size: 12px; font-weight: 600; }
.price { color: var(--brick); font-weight: 800; font-size: 15px; white-space: nowrap; }
.price small { font-family: 'Manrope'; font-weight: 700; font-size: 12px; color: var(--hint); letter-spacing: 0; }
.addbtn { position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(242, 169, 59, .5); transition: transform .12s var(--ease); }
.addbtn:active { transform: scale(.9); }
.pcard .stepper { position: absolute; right: 8px; bottom: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.14); }

.stepper { display: inline-flex; align-items: center; background: var(--card); border-radius: 22px; height: 40px; padding: 2px; box-shadow: 0 0 0 1px var(--line); }
.stepper.sm { height: 34px; }
.st-btn { width: 36px; height: 100%; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.st-btn:active:not(:disabled) { background: var(--soft); }
.st-btn:disabled { opacity: .3; }
.st-val { min-width: 24px; text-align: center; font-weight: 800; font-size: 15px; }
.stepper.sm .st-btn { width: 32px; }

/* ---------- skeleton */
.skel { background: linear-gradient(90deg, var(--soft) 25%, color-mix(in srgb, var(--text) 10%, transparent) 50%, var(--soft) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-card { background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.skel-card .b { padding: 12px; display: grid; gap: 8px; }

/* ---------- sheet / modal */
.sheet-wrap, .modal-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-dim { position: absolute; inset: 0; background: rgba(15, 10, 0, .45); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92vh; max-height: calc(var(--tg-vh, 100vh) * .94); background: var(--card); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-up); animation: up .28s var(--ease) both; display: flex; flex-direction: column; overflow: hidden; }
@keyframes up { from { transform: translateY(100%); } }
.sheet-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; background: rgba(255,255,255,.8); box-shadow: none; color: #222; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(18px + var(--safe-b)); }
.sheet .pic { aspect-ratio: 5 / 4; max-height: 42vh; }
.sheet .pic img { object-position: 50% 70%; }
.sheet-in { padding: 18px 20px 4px; display: grid; gap: 14px; }
.sheet-in h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; }
.fact { padding: 4px 10px; border-radius: 10px; background: var(--soft); font-size: 12.5px; font-weight: 700; }
.fact.age { background: color-mix(in srgb, var(--brick) 14%, transparent); color: var(--brick); }
.desc { color: var(--hint); font-size: 14px; }
.label { font-weight: 800; font-size: 13px; color: var(--hint); text-transform: uppercase; letter-spacing: .05em; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.note { display: flex; gap: 10px; padding: 11px 13px; border-radius: 13px; background: color-mix(in srgb, var(--accent) 16%, transparent); font-size: 13.5px; font-weight: 600; }
.note.bad { background: color-mix(in srgb, var(--bad) 13%, transparent); }
.note.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.note .ico { margin-top: 1px; color: var(--warn); }
.note.bad .ico { color: var(--bad); }
.note.ok .ico { color: var(--ok); }
.total-line { font-size: 22px; font-weight: 800; }

.modal-wrap { align-items: center; padding: 20px; }
.modal { position: relative; background: var(--card); border-radius: 22px; padding: 22px; width: 100%; max-width: 380px; box-shadow: var(--shadow-up); animation: pop .22s var(--ease) both; display: grid; gap: 10px; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.modal h3 { font-size: 19px; font-weight: 800; }
.modal p { color: var(--hint); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }

/* ---------- page header, cards, lists */
.phead { display: flex; align-items: center; gap: 12px; padding: calc(14px + var(--safe-t)) 0 10px; }
.phead-t { flex: 1; min-width: 0; }
.phead h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; }
.card + .card, .stack > * + * { margin-top: 12px; }
.card h3 { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; }
.kv span:first-child { color: var(--hint); }
.kv.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; font-weight: 800; font-size: 17px; }
.kv.total span:first-child { color: var(--text); }
.kv .neg { color: var(--ok); font-weight: 800; }
.line { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.line + .line { border-top: 1px solid var(--line); }
.line .pic { width: 64px; height: 64px; aspect-ratio: auto; border-radius: 14px; flex: none; }
.line-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.line-name { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.line-sub { color: var(--hint); font-size: 12.5px; font-weight: 600; }
.line-side { display: grid; gap: 8px; justify-items: end; }
.line .del { color: var(--hint); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.line .del:active { background: var(--soft); }
.line.tara { padding: 6px 0 6px 76px; opacity: .85; }
.line.tara .line-name { font-weight: 600; font-size: 13px; }
.problem { color: var(--bad); font-size: 12.5px; font-weight: 700; }

.empty { text-align: center; padding: 70px 24px 30px; display: grid; justify-items: center; gap: 10px; }
.empty h3 { font-size: 19px; font-weight: 800; }
.empty p { color: var(--hint); max-width: 300px; }
.empty .btn { margin-top: 10px; }
.empty-ico { width: 78px; height: 78px; border-radius: 26px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--warn); display: grid; place-items: center; margin-bottom: 6px; }
.empty-ico.warn { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }

/* ---------- segmented, options, inputs */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--soft); border-radius: 14px; }
.seg button { height: 40px; border-radius: 11px; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background .15s; }
.seg button.on { background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.seg button:disabled { opacity: .4; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.slot { height: 40px; padding: 0 14px; border-radius: 12px; background: var(--soft); font-weight: 700; font-family: var(--mono); font-size: 14px; }
.slot.fast { font-family: 'Manrope'; }
.slot.on { background: var(--accent); color: var(--accent-ink); }
.opt { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 13px 14px; border-radius: 14px; background: var(--soft); border: 2px solid transparent; transition: border-color .15s, background .15s; }
.opt + .opt { margin-top: 8px; }
.opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.opt .t { font-weight: 800; }
.opt .s { color: var(--hint); font-size: 12.5px; font-weight: 600; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--hint); flex: none; display: grid; place-items: center; }
.opt.on .radio { border-color: var(--accent); }
.opt.on .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.field { width: 100%; border: 0; border-radius: 13px; background: var(--soft); padding: 12px 14px; min-height: 46px; outline: none; resize: none; font-size: 15px; }
.field:focus { box-shadow: 0 0 0 2px var(--accent); }
.check { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; font-weight: 600; font-size: 14px; }
.box { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--hint); flex: none; display: grid; place-items: center; color: transparent; transition: all .15s; margin-top: 1px; }
.check.on .box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- status */
.pill { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-weight: 800; font-size: 12.5px; background: var(--soft); white-space: nowrap; }
.pill.s-new, .pill.s-awaiting_payment, .pill.s-payment_review { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.s-paid, .pill.s-assembling, .pill.s-ready, .pill.s-delivering, .pill.s-completed { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.s-cancelled { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.steps { display: flex; padding: 6px 0 2px; }
.step { flex: 1; text-align: center; position: relative; font-size: 11.5px; font-weight: 700; color: var(--hint); }
.step::before { content: ''; position: absolute; top: 13px; left: -50%; width: 100%; height: 3px; border-radius: 2px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step.done::before, .step.current::before { background: var(--accent); }
.dot { position: relative; z-index: 1; width: 28px; height: 28px; margin: 0 auto 6px; border-radius: 50%; background: var(--card); border: 3px solid var(--line); display: grid; place-items: center; color: var(--accent-ink); transition: all .3s var(--ease); }
.step.done .dot { background: var(--accent); border-color: var(--accent); }
.step.current .dot { border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 25%, transparent); }
.step.done, .step.current { color: var(--text); }
.step .at { display: block; font-family: var(--mono); font-weight: 600; font-size: 10.5px; color: var(--hint); margin-top: 2px; }
.pay-amount { font-family: var(--mono); font-weight: 800; font-size: 34px; letter-spacing: -.04em; color: var(--brick); text-align: center; margin: 4px 0 2px; }
.res { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: 14px; background: var(--soft); margin-top: 12px; }
.res.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); }
.res.wait { background: color-mix(in srgb, var(--warn) 16%, transparent); }
.res.bad { background: color-mix(in srgb, var(--bad) 13%, transparent); }
.res b { display: block; }
.res .em { font-size: 24px; line-height: 1; }
.progress { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; margin-top: 12px; }
.progress i { display: block; height: 100%; width: 40%; background: var(--accent); border-radius: 3px; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.ocard { display: block; width: 100%; text-align: left; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; }
.ocard + .ocard { margin-top: 12px; }
.ocard:active { transform: scale(.985); }

/* ---------- profile */
.hero { display: flex; gap: 14px; align-items: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--brick)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; flex: none; }
.loyal { border-radius: 20px; padding: 18px; color: #2b1b00; background: linear-gradient(140deg, #f8c971 0%, #F2A93B 55%, #e58e2a 100%); box-shadow: 0 10px 28px rgba(242, 169, 59, .35); position: relative; overflow: hidden; }
.loyal::after { content: ''; position: absolute; right: -40px; top: -50px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.22); }
.loyal .bc { background: #fff; border-radius: 12px; padding: 10px 8px 6px; margin-top: 14px; text-align: center; position: relative; z-index: 1; }
.loyal .bc svg { max-width: 100%; height: 64px; }
.loyal .disc { font-family: var(--mono); font-weight: 800; font-size: 30px; letter-spacing: -.04em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats b { display: block; font-family: var(--mono); font-size: 18px; letter-spacing: -.03em; }
.stats span { color: var(--hint); font-size: 12px; font-weight: 600; }
.fav { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.fav + .fav { border-top: 1px solid var(--line); }
.fav .pic { width: 52px; height: 52px; aspect-ratio: auto; border-radius: 12px; flex: none; }
.link { color: var(--warn); font-weight: 800; }
.privacy { white-space: pre-line; color: var(--hint); font-size: 13px; line-height: 1.5; }
.priv-box { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.priv-box.open { max-height: 800px; }

/* ---------- login */
.login { text-align: center; padding-top: calc(48px + var(--safe-t)); display: grid; justify-items: center; gap: 14px; }
.logo { width: 84px; height: 84px; border-radius: 26px; background: linear-gradient(140deg, var(--accent-2), var(--accent)); display: grid; place-items: center; color: #fff; box-shadow: 0 12px 28px rgba(242,169,59,.45); }
.login h1 { font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.login p.w { color: var(--hint); max-width: 330px; white-space: pre-line; }
.login .card { width: 100%; text-align: left; }
.success { width: 92px; height: 92px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; animation: pop .45s var(--ease) both; }
.success svg { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .25s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- main bar (browser only), toasts */
.mainbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; padding: 10px 16px calc(10px + var(--safe-b)); transform: translateY(110%); transition: transform .25s var(--ease); background: linear-gradient(to top, var(--page) 60%, transparent); pointer-events: none; }
.mainbar.on { transform: none; }
.mainbtn { pointer-events: auto; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 528px; margin: 0 auto; height: 52px; border-radius: 15px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 16px; box-shadow: 0 8px 22px rgba(242,169,59,.45); transition: transform .12s, opacity .2s; }
.mainbtn:active:not(:disabled) { transform: scale(.98); }
.mainbtn:disabled { opacity: .5; box-shadow: none; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(43,27,0,.25); border-top-color: var(--accent-ink); animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.toasts { position: fixed; left: 0; right: 0; top: calc(10px + var(--safe-t)); z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; max-width: 420px; padding: 11px 16px; border-radius: 14px; background: #2a2723; color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: drop .25s var(--ease) both; }
.toast.error { background: var(--bad); }
.toast.ok { background: var(--ok); }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }
.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .skel { animation: none; }
}
@media (max-width: 359px) { .grid { gap: 10px; } .pname { font-size: 13px; } }

.no-tg .sheet-body { padding-bottom: calc(92px + var(--safe-b)); }
.no-tg .sheet-wrap { z-index: 120; }
.no-tg .modal-wrap { z-index: 160; }
.phead h1 { overflow: hidden; text-overflow: ellipsis; }
.phead .hint { line-height: 1.3; }
