:root {
  --bg: #f6f8f7; --card: #ffffff; --ink: #14201d; --muted: #66736f; --line: #e3e8e6;
  --accent: #0f766e; --accent-ink: #ffffff; --soft: #e6f4f2; --red: #c2410c; --red-soft: #fde8df;
  --blue: #1d4ed8; --blue-soft: #e4ebfb; --amber: #b45309; --amber-soft: #fdf1dc; --shadow: 0 1px 2px rgba(20,32,29,.06), 0 6px 20px rgba(20,32,29,.05);
  --nav-h: 62px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1514; --card: #182120; --ink: #eef3f1; --muted: #93a19c; --line: #263331;
    --accent: #2dd4bf; --accent-ink: #042f2e; --soft: #10312e; --red: #fb923c; --red-soft: #3a1d10;
    --blue: #93b4ff; --blue-soft: #16244a; --amber: #fbbf24; --amber-soft: #3a2a08; --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
body { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); min-height: 100vh; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.boot { padding: 40px 16px; text-align: center; color: var(--muted); }
.screen { max-width: 680px; margin: 0 auto; padding: 0 16px 24px; }
.top { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: calc(10px + env(safe-area-inset-top)) 0 8px; }
.top h1 { font-size: 24px; margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.top h1 > span { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.hbtn { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.hbtn svg { width: 20px; height: 20px; }
.top h1 .count { font-size: 13px; color: var(--muted); font-weight: 500; }
.search { display: flex; gap: 8px; margin-top: 10px; }
.search input { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 12px; font-size: 16px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 13px; white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 18px 4px 6px; }
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-top: 1px solid var(--line); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.row:first-child { border-top: 0; }
.row:active { background: var(--soft); }
.ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--soft); color: var(--accent); }
.ic svg { width: 20px; height: 20px; }
.ic.miss { background: var(--red-soft); color: var(--red); }
.ic.vm { background: var(--amber-soft); color: var(--amber); }
.ic.out { background: var(--blue-soft); color: var(--blue); }
.ic.sms { background: var(--blue-soft); color: var(--blue); }
.ic.ai, .badge.ai { background: #ede9fe; color: #6d28d9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ic.ai, :root:not([data-theme="light"]) .badge.ai { background: #2e1065; color: #c4b5fd; } }
.who { flex: 1; min-width: 0; }
.who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who b.miss { color: var(--red); }
.who small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.play { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--accent); display: grid; place-items: center; flex: none; cursor: pointer; }
.play.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.play svg { width: 16px; height: 16px; }
.chev { color: var(--muted); flex: none; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.more { display: block; width: 100%; margin: 14px 0; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line); display: flex; z-index: 6; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.nav a svg { width: 24px; height: 24px; }
.datenav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.datenav a { font-size: 30px; line-height: 1; padding: 0 12px; text-decoration: none; color: var(--accent); }
.rep { margin-top: 10px; }
.rep h4 { margin: 0; font-size: 15.5px; }
.rep .out { color: var(--accent); font-weight: 600; font-size: 13.5px; margin-top: 2px; }
.rep .k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 10px; }
.rep ul { margin: 3px 0 0 18px; padding: 0; font-size: 14.5px; }
.rep li { margin: 2px 0; }
.nav a.on { color: var(--accent); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); text-decoration: none; font-weight: 600; padding: 12px 0; }
.hero { text-align: center; padding: 6px 0 14px; }
.hero .big { font-size: 26px; font-weight: 700; margin: 0; word-break: break-word; }
.hero .sub { color: var(--muted); margin: 4px 0 0; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 11px; font-size: 13px; font-weight: 600; background: var(--soft); color: var(--accent); margin-top: 8px; }
.badge.miss { background: var(--red-soft); color: var(--red); }
.badge.vm { background: var(--amber-soft); color: var(--amber); }
.badge.out, .badge.sms { background: var(--blue-soft); color: var(--blue); }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 6px 0 16px; }
.btn { border: 0; border-radius: 14px; padding: 13px 18px; font-weight: 700; cursor: pointer; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; gap: 8px; }
.btn.sec { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--red); border: 1px solid var(--line); }
.btn.wide { width: 100%; justify-content: center; padding: 15px; font-size: 17px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn svg { width: 18px; height: 18px; }
.sec-title { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 18px 4px 6px; }
.pad { padding: 14px; }
.pre { white-space: pre-wrap; word-break: break-word; margin: 0; font: inherit; }
.muted { color: var(--muted); }
.field { display: block; padding: 12px 14px; border-top: 1px solid var(--line); }
.field:first-child { border-top: 0; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input, .field textarea, .field select { width: 100%; border: 0; background: transparent; padding: 4px 0; font-size: 16px; outline: none; }
.field textarea { min-height: 96px; resize: vertical; }
.field.sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field.sw span { margin: 0; font-size: 16px; color: var(--ink); }
.field.sw small { display: block; color: var(--muted); font-size: 13px; }
.field.sw input { width: 46px; height: 28px; appearance: none; -webkit-appearance: none; background: var(--line); border-radius: 999px; position: relative; flex: none; cursor: pointer; padding: 0; }
.field.sw input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.field.sw input:checked { background: var(--accent); }
.field.sw input:checked::after { left: 21px; }
.msg { margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: var(--soft); color: var(--accent); font-weight: 600; }
.msg.bad { background: var(--red-soft); color: var(--red); }
.audio { width: 100%; margin-top: 4px; }
.login { max-width: 360px; margin: 14vh auto 0; padding: 0 20px; text-align: center; }
.login img { width: 84px; height: 84px; border-radius: 22px; }
.login h1 { font-size: 26px; margin: 14px 0 2px; }
.login p { color: var(--muted); margin: 0 0 18px; }
.login input { width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 13px 14px; font-size: 17px; margin-bottom: 10px; }
.steps { padding-left: 20px; margin: 6px 0; }
.steps li { margin: 6px 0; }
.dialpad { font-size: 28px; text-align: center; letter-spacing: .04em; }
.hint { font-size: 14px; color: var(--muted); margin: 8px 4px; }
.install { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--soft); color: var(--ink); font-size: 14px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.install button { border: 0; background: transparent; color: var(--accent); font-weight: 700; cursor: pointer; }
details summary { cursor: pointer; font-weight: 600; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Questions tab */
.card.q .qt { font-size: 16px; font-weight: 600; line-height: 1.35; }
.card.q .qm { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.card.q .qa { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ink); background: var(--bg); min-height: 72px; resize: vertical; }
.nav a .dot { display: inline-block; min-width: 16px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; line-height: 16px; text-align: center; margin-left: 4px; vertical-align: middle; }

