/* SYNTHAZY PWA: дизайн-кит приложения (тёмная тема), токены совпадают с apps/android ui/theme/Tokens.kt */
@font-face { font-family: Inter; font-weight: 400; src: url(/fonts/inter_regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: Inter; font-weight: 500; src: url(/fonts/inter_medium.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: Inter; font-weight: 600; src: url(/fonts/inter_semibold.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Inter Display"; font-weight: 600; src: url(/fonts/inter_display_semibold.ttf) format("truetype"); font-display: swap; }

:root {
  --bg: #050505; --s1: #0c0c0c; --s2: #131211; --s3: #1b1917; --s4: #262320; --line: #2b2722;
  --g100: #f6ebd3; --g300: #e6d2a3; --g500: #cdae76; --g700: #8f7547;
  --text: #f4eedf; --text2: #b8ae98; --text3: #8a8273; --ink: #1a1306;
  --ok: #7fd1a0; --bad: #ff6b6b; --warn: #e6c46a; --line-gold: rgba(214, 186, 130, .28);
  --gold: linear-gradient(135deg, #f3e4c3, #d8bc85 55%, #a98d58);
  --tabh: 68px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 400 15px/1.45 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }

#app { max-width: 560px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 18px calc(var(--tabh) + 28px + env(safe-area-inset-bottom)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.screen { display: flex; flex-direction: column; gap: 14px; }

.screenhead { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--g500); font-weight: 600; }
.title { font: 600 28px/1.15 "Inter Display", Inter, sans-serif; letter-spacing: -.01em; }
.back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; background: none; border: 0; color: var(--g300); padding: 8px 0; cursor: pointer; font-weight: 500; }
.back svg { transform: rotate(180deg); }

.caption { font-size: 13px; color: var(--text2); }
.caption.error { color: var(--bad); } .caption.ok { color: var(--ok); } .caption.dim { color: var(--text3); }

.card { background: var(--s2); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.kv { display: flex; justify-content: space-between; gap: 16px; }
.kv .k { color: var(--text3); font-size: 13px; flex: none; } .kv .v { text-align: right; overflow-wrap: anywhere; }

.tile { flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--s3); border: 1px solid var(--line); display: grid; place-items: center; color: var(--g500); }
.listcard { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; background: var(--s2); border: 1px solid var(--line); border-radius: 20px; padding: 12px 14px; }
.listcard.tap { cursor: pointer; transition: border-color .2s; } .listcard.tap:hover, .listcard.tap:focus-visible { border-color: var(--line-gold); outline: 0; }
.lc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .lc-body strong { font-weight: 500; }
.lc-trail { flex: none; }

.badge { align-self: center; display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.badge.ok { color: var(--ok); } .badge.warn { color: var(--warn); } .badge.bad { color: var(--bad); } .badge.muted { color: var(--text3); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--s2); border: 1px solid var(--line); color: var(--text2); cursor: pointer; }
.chip.on { background: var(--gold); border-color: transparent; color: var(--ink); font-weight: 600; }
.segs { display: flex; background: var(--s2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg { flex: 1; padding: 9px 8px; border: 0; background: none; border-radius: 999px; color: var(--text2); cursor: pointer; }
.seg.on { background: var(--s4); color: var(--g100); font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; cursor: pointer; width: 100%; }
.btn.primary { background: var(--gold); color: var(--ink); box-shadow: 0 8px 28px rgba(205, 174, 118, .22); }
.btn.secondary { background: var(--s3); border-color: var(--line-gold); color: var(--text); }
.btn.danger { background: transparent; border-color: rgba(255, 107, 107, .5); color: var(--bad); }
.btn.ghost { background: none; color: var(--g300); }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, .chip:focus-visible, .seg:focus-visible, .tab:focus-visible, .input:focus-visible { outline: 2px solid var(--g300); outline-offset: 2px; }
.row { display: flex; gap: 8px; } .row > * { flex: 1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.input { width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); resize: vertical; }
textarea.input { min-height: 110px; }

.bubble { max-width: 86%; padding: 10px 14px; border-radius: 14px; background: var(--s2); display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.mine { align-self: flex-end; background: var(--s3); } .bubble.note { background: rgba(230, 210, 163, .08); border: 1px solid var(--line-gold); }
.bubble .micro { font-size: 10px; letter-spacing: .14em; color: var(--g500); font-weight: 600; } .bubble .meta { font-size: 12px; color: var(--text3); } .bubble .meta.bad { color: var(--bad); }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: rgba(12, 12, 12, .96); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(10px); }
.tabbar nav { max-width: 560px; margin: 0 auto; display: flex; }
.tab { flex: 1; min-height: var(--tabh); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: none; border: 0; color: var(--text3); font-size: 11px; font-weight: 500; cursor: pointer; position: relative; }
.tab.on { color: var(--g300); } .tab .dot { position: absolute; top: 10px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--bad); }

.or { display: flex; align-items: center; gap: 12px; color: var(--text3); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login { min-height: 100dvh; max-width: 560px; margin: 0 auto; padding: 24px 20px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }

.dlg { background: var(--s2); color: var(--text); border: 1px solid var(--line-gold); border-radius: 24px; padding: 22px; max-width: min(92vw, 420px); }
.dlg::backdrop { background: rgba(0, 0, 0, .7); }
.dlg-title { font: 600 20px/1.2 "Inter Display", Inter, sans-serif; margin-bottom: 8px; } .dlg-text { color: var(--text2); white-space: pre-wrap; margin-bottom: 16px; overflow-wrap: anywhere; }
.dlg-actions { display: flex; gap: 8px; } .dlg-actions .btn { min-height: 48px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabh) + 24px + env(safe-area-inset-bottom)); background: var(--s4); border: 1px solid var(--line-gold); border-radius: 999px; padding: 10px 18px; z-index: 20; }
.switch { position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; background: var(--s4); border: 1px solid var(--line); cursor: pointer; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text3); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--g700); } .switch[aria-checked="true"]::after { transform: translateX(22px); background: var(--g100); }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 30; background: var(--s4); border-bottom: 1px solid var(--line-gold); text-align: center; padding: calc(6px + env(safe-area-inset-top)) 12px 6px; font-size: 13px; color: var(--g300); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.row.head { align-items: center; flex: none; gap: 12px; } .row.head > * { flex: none; }
.kv.mid { align-items: center; }
.big { font-size: 20px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.noscript { padding: 24px; }

