/* Blabla web — Glass UI for phones (iPhone first). Tokens match the landing page and the Android app. */
:root {
  --bg: #EEF0FA; --ink: #15132B; --ink-2: rgba(21,19,43,.74); --ink-3: rgba(21,19,43,.55);
  --glass: rgba(255,255,255,.56); --glass-strong: rgba(255,255,255,.86); --edge: rgba(255,255,255,.92); --edge-low: rgba(255,255,255,.5);
  --line: rgba(21,19,43,.10); --input: rgba(255,255,255,.7);
  --indigo: #5B4BF5; --violet: #A855F7; --pink: #EC4899; --accent-ink: #3E2FC4; --accent-soft: rgba(91,75,245,.12);
  --rec: #EF4444; --live: #22C55E; --ok-bg: rgba(34,197,94,.14); --ok-ink: #15803D; --err-bg: rgba(239,68,68,.12); --err-ink: #B91C1C;
  --shadow: 0 16px 40px rgba(60,50,140,.13); --blob-a: 1; --scrim: rgba(21,19,43,.32);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0D1C; --ink: #F3F2FB; --ink-2: rgba(243,242,251,.76); --ink-3: rgba(243,242,251,.55);
    --glass: rgba(255,255,255,.06); --glass-strong: rgba(30,28,52,.95); --edge: rgba(255,255,255,.14); --edge-low: rgba(255,255,255,.04);
    --line: rgba(255,255,255,.10); --input: rgba(255,255,255,.07); --accent-ink: #BDB3FF; --accent-soft: rgba(139,124,255,.18);
    --ok-bg: rgba(34,197,94,.16); --ok-ink: #86EFAC; --err-bg: rgba(239,68,68,.16); --err-ink: #FCA5A5;
    --shadow: 0 16px 40px rgba(0,0,0,.4); --blob-a: .4; --scrim: rgba(0,0,0,.55); color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
a { color: var(--accent-ink); }

.blobs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: var(--blob-a); }
.blobs i { position: absolute; border-radius: 50%; filter: blur(2px); }
.blobs i:nth-child(1) { left: -140px; top: -110px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(129,140,248,.85), transparent 70%); }
.blobs i:nth-child(2) { right: -160px; top: 30%; width: 380px; height: 380px; background: radial-gradient(circle, rgba(244,114,182,.5), transparent 70%); }
.blobs i:nth-child(3) { left: -150px; bottom: -120px; width: 380px; height: 380px; background: radial-gradient(circle, rgba(56,220,240,.5), transparent 70%); }

#app { position: relative; z-index: 1; height: 100%; }
.screen { height: 100%; display: flex; flex-direction: column; padding: calc(var(--st) + 12px) 16px calc(var(--sb) + 14px); gap: 12px; max-width: 640px; margin: 0 auto; }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen.scroll { display: block; }
.screen.scroll > * + * { margin-top: 14px; }

.glass { background: var(--glass); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 var(--edge), var(--shadow); -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%); }
.card { border-radius: 28px; padding: 18px 18px; }
.strong { background: var(--glass-strong); }

/* header */
.hdr { display: flex; align-items: center; gap: 12px; flex: none; }
.hdr h1 { margin: 0; font-size: 30px; line-height: 1.05; font-weight: 800; letter-spacing: -.6px; flex: 1; min-width: 0; }
.brand { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.brand img { width: 46px; height: 46px; border-radius: 14px; box-shadow: 0 8px 20px rgba(124,58,237,.35); }
.brand b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.4px; line-height: 1.1; }
.status { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.live { background: var(--live); box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.dot.recdot { background: var(--rec); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.round { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.round svg { width: 23px; height: 23px; }

/* key banner */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; color: #fff; text-align: left; width: 100%;
  background: linear-gradient(120deg, var(--indigo), var(--violet)); box-shadow: 0 12px 28px rgba(91,75,245,.35); flex: none; }
.banner .ic { width: 42px; height: 42px; border-radius: 14px; background: rgba(255,255,255,.22); display: grid; place-items: center; flex: none; }
.banner b { display: block; font-size: 16px; } .banner span { font-size: 13.5px; opacity: .9; }
.banner svg { width: 22px; height: 22px; }

/* live panels */
.panel { border-radius: 26px; padding: 14px 16px; display: flex; flex-direction: column; min-height: 0; flex: 1; }
.panel.tr { flex: 1.25; background: linear-gradient(160deg, var(--glass-strong), var(--glass)); }
.ph { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--input); border: 1px solid var(--line); }
.chip.acc { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.cap { font-size: 13px; color: var(--ink-3); } .tr .cap { color: var(--accent-ink); }
.txt { overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; mask-image: linear-gradient(to bottom, transparent 0, #000 18px); -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px); padding-top: 10px; }
.txt p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.45; }
.txt p.part { color: var(--ink-3); }
.tr .txt p { color: var(--ink); font-size: 21px; line-height: 1.32; font-weight: 600; letter-spacing: -.2px; }
.tr .txt p.part { color: var(--ink-3); }
.txt .hint { margin: auto 0; color: var(--ink-3); font-size: 16px; }
.tr .txt .hint { font-size: 22px; font-weight: 600; line-height: 1.3; }
.txt-spacer { flex: 1; }

.pill { align-self: center; display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; flex: none; }
.pill .lang { display: flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 999px; font-size: 15px; color: var(--ink-2); }
.pill .lang b { color: var(--ink); font-size: 16px; font-weight: 800; }
.pill .lang svg { width: 14px; height: 14px; align-self: center; opacity: .6; }
.pill .swap { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--indigo), var(--violet)); box-shadow: 0 8px 18px rgba(91,75,245,.35); }
.pill .swap svg { width: 20px; height: 20px; }
.pill[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* control bar */
.ctrl { border-radius: 28px; padding: 12px 18px 14px; flex: none; }
.wave { display: flex; align-items: center; gap: 3px; height: 22px; margin-bottom: 8px; }
.wave span { flex: 1; height: 4px; border-radius: 3px; background: var(--ink-3); opacity: .35; transition: height .12s; }
.ctrl-row { display: flex; align-items: center; gap: 12px; }
.time { flex: 1; min-width: 0; }
.time b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1; }
.time span { font-size: 14px; color: var(--ink-2); }
.rec { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; color: #fff; position: relative; flex: none;
  background: linear-gradient(135deg, var(--indigo), var(--violet)); box-shadow: 0 0 0 9px var(--accent-soft), 0 14px 30px rgba(91,75,245,.42); }
.rec svg { width: 32px; height: 32px; }
.rec.on { background: var(--rec); box-shadow: 0 0 0 9px rgba(239,68,68,.16), 0 14px 30px rgba(239,68,68,.4); }
.rec.on::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid rgba(239,68,68,.45); animation: ring 1.6s infinite; }
.rec[disabled] { opacity: .6; }
@keyframes ring { from { transform: scale(1); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.voice { flex: 1; display: flex; justify-content: flex-end; }
.voice button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.voice .round { width: 50px; height: 50px; }
.voice .on .round { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.voice .on { color: var(--accent-ink); font-weight: 600; }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--sb) + 16px); z-index: 30; max-width: 600px; margin: 0 auto; padding: 12px 16px; border-radius: 18px;
  background: var(--err-bg); color: var(--err-ink); font-size: 14.5px; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--edge); }
.note { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.4; }
.note.err { background: var(--err-bg); color: var(--err-ink); }
.note.ok { background: var(--ok-bg); color: var(--ok-ink); }
.note.info { background: var(--accent-soft); color: var(--accent-ink); }

/* buttons */
.btn { height: 54px; border-radius: 18px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; font-size: 16.5px; white-space: nowrap; }
.btn svg { width: 20px; height: 20px; }
.btn.grad { color: #fff; background: linear-gradient(120deg, var(--indigo), var(--violet)); box-shadow: 0 12px 26px rgba(91,75,245,.35); }
.btn.soft { background: var(--input); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; min-width: 0; }
.row > .btn { padding: 0 12px; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; }

/* welcome */
.welcome { text-align: center; justify-content: center; }
.logo-big { width: 112px; height: 112px; border-radius: 34px; margin: 0 auto; box-shadow: 0 20px 44px rgba(124,58,237,.38); display: block; }
.welcome h1 { font-size: 46px; margin: 18px 0 6px; font-weight: 800; letter-spacing: -1.4px; }
.welcome .lead { font-size: 18px; color: var(--ink-2); margin: 0 auto 6px; max-width: 320px; }
.lbl { font-size: 14px; font-weight: 600; color: var(--ink-3); margin: 6px 0; }
.langsel { display: flex; gap: 4px; padding: 5px; border-radius: 999px; }
.langsel button { flex: 1; border-radius: 999px; padding: 8px 0; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.langsel b { font-size: 16px; font-weight: 800; } .langsel span { font-size: 11.5px; color: var(--ink-3); }
.langsel button[aria-pressed="true"] { background: linear-gradient(120deg, var(--indigo), var(--violet)); color: #fff; box-shadow: 0 8px 18px rgba(91,75,245,.35); }
.langsel button[aria-pressed="true"] span { color: rgba(255,255,255,.85); }
.feats { text-align: left; border-radius: 26px; padding: 6px 16px; }
.feat { display: flex; gap: 14px; align-items: center; padding: 12px 0; }
.feat + .feat { border-top: 1px solid var(--line); }
.tile { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; flex: none; background: linear-gradient(135deg, var(--indigo), var(--violet)); }
.tile.p { background: linear-gradient(135deg, var(--violet), var(--pink)); } .tile.c { background: linear-gradient(135deg, #22D3EE, var(--indigo)); }
.tile svg { width: 22px; height: 22px; }
.feat b { display: block; font-size: 16.5px; } .feat span { font-size: 14px; color: var(--ink-2); }
.foot { font-size: 13px; color: var(--ink-3); text-align: center; }

/* history */
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 22px; text-align: left; width: 100%; }
.badge { width: 50px; height: 50px; border-radius: 16px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; line-height: 1.1; flex: none; background: linear-gradient(135deg, var(--indigo), var(--violet)); }
.mrow .t { flex: 1; min-width: 0; }
.mrow b { display: block; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow span { font-size: 13.5px; color: var(--ink-3); }
.mrow .sub { display: block; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.group { font-size: 13px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .6px; margin: 8px 4px 0; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.empty .tile { margin: 0 auto 14px; width: 60px; height: 60px; border-radius: 20px; }
.empty b { display: block; font-size: 19px; color: var(--ink); margin-bottom: 6px; }

/* detail */
.meta { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; padding: 5px; border-radius: 999px; }
.tabs button { flex: 1; padding: 9px 0; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--glass-strong); color: var(--ink); box-shadow: 0 4px 12px rgba(60,50,140,.12); }
.sum { white-space: pre-wrap; font-size: 16.5px; line-height: 1.55; }
.sum .h { display: block; font-weight: 800; font-size: 17px; margin-top: 14px; }
.sum .h:first-child { margin-top: 0; }
.lines p { margin: 0 0 10px; font-size: 16.5px; line-height: 1.5; }
.lines time { display: block; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.center { text-align: center; padding: 26px 8px; color: var(--ink-2); }
.center .tile { margin: 0 auto 12px; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--indigo); animation: spin 1s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* settings */
.sec h2 { margin: 0 0 12px; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.sec h2 .tile { width: 36px; height: 36px; border-radius: 12px; } .sec h2 .tile svg { width: 18px; height: 18px; }
.field { display: flex; align-items: center; gap: 8px; border-radius: 16px; background: var(--input); border: 1px solid var(--line); padding: 0 6px 0 14px; height: 54px; }
.field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; }
.field button { font-size: 14px; font-weight: 600; color: var(--accent-ink); padding: 8px 10px; }
.small { font-size: 13.5px; color: var(--ink-3); margin: 8px 2px 0; }
.sw { display: flex; gap: 14px; align-items: center; padding: 6px 0; text-align: left; width: 100%; }
.sw .t { flex: 1; } .sw b { display: block; font-size: 16px; font-weight: 600; } .sw span { font-size: 13.5px; color: var(--ink-2); }
.tog { width: 52px; height: 32px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.tog::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s; }
.on > .tog { background: linear-gradient(120deg, var(--indigo), var(--violet)); } .on > .tog::after { transform: translateX(20px); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--input); border: 1px solid var(--line); }
.seg button { flex: 1; padding: 10px 4px; border-radius: 12px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: linear-gradient(120deg, var(--indigo), var(--violet)); color: #fff; }
.divider { height: 1px; background: var(--line); margin: 10px 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.sec p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.sec p + p { margin-top: 8px; }

/* sheets */
.scrim { position: fixed; inset: 0; z-index: 20; background: var(--scrim); animation: fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 640px; margin: 0 auto; border-radius: 30px 30px 0 0; padding: 10px 18px calc(var(--sb) + 18px); animation: up .25s cubic-bezier(.2,.8,.2,1); }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 6px; font-size: 21px; } .sheet > p { margin: 0 0 14px; color: var(--ink-2); }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 10px; border-radius: 16px; font-size: 18px; text-align: left; }
.opt b { width: 46px; font-weight: 800; } .opt[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.check { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; font-size: 15px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; accent-color: var(--indigo); }
@keyframes up { from { transform: translateY(100%); } } @keyframes fade { from { opacity: 0; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (min-height: 760px) { .tr .txt p { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { *, *::after { animation: none !important; transition: none !important; } }
