/* ============ tokens ============ */
:root {
  --bg: var(--tg-theme-secondary-bg-color, #f1f2f6);
  --card: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --text: var(--tg-theme-text-color, #0f1419);
  --hint: var(--tg-theme-hint-color, #8a8f98);
  --sub: var(--tg-theme-subtitle-text-color, var(--hint));
  --link: var(--tg-theme-link-color, #2b7de9);
  --accent: var(--tg-theme-button-color, #2b7de9);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --header: var(--tg-theme-section-header-text-color, var(--hint));
  --danger: var(--tg-theme-destructive-text-color, #e5484d);
  --sep: color-mix(in srgb, var(--hint) 20%, transparent);
  --soft: color-mix(in srgb, var(--hint) 10%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);

  --ok: #2fb768;
  --ok-soft: color-mix(in srgb, #2fb768 15%, transparent);
  --warn: #f59f0b;
  --warn-soft: color-mix(in srgb, #f59f0b 16%, transparent);
  --bad: #e5484d;
  --bad-soft: color-mix(in srgb, #e5484d 14%, transparent);
  --info: #3b82f6;
  --info-soft: color-mix(in srgb, #3b82f6 15%, transparent);

  --gold: #e9c46a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 4px 18px rgb(0 0 0 / 5%);
  --tabbar-h: 64px;
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--link); text-decoration: none; }
.ic { width: 20px; height: 20px; flex: none; display: block; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 28px; height: 28px; }

/* ============ boot ============ */
.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.boot-logo {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  font: 800 30px/1 -apple-system, system-ui, sans-serif; color: var(--gold);
  background: linear-gradient(145deg, #121826, #243246); box-shadow: 0 10px 30px rgb(0 0 0 / 20%);
  animation: pulse 1.4s var(--ease) infinite;
}
@keyframes pulse { 50% { transform: scale(.92); opacity: .75; } }

/* ============ layout ============ */
.screen {
  padding: 12px 16px calc(var(--tabbar-h) + var(--safe-b) + 28px);
  max-width: 640px; margin: 0 auto;
  animation: enter .32s var(--ease);
}
.screen.no-tabs { padding-bottom: calc(var(--safe-b) + 32px); }
.screen-wrap.back .screen { animation-name: enter-back; }
@keyframes enter { from { opacity: 0; transform: translateX(18px); } }
@keyframes enter-back { from { opacity: 0; transform: translateX(-18px); } }
.screen.fade { animation-name: fade; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 4px 16px; }
.large-title { font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.title-sub { color: var(--hint); font-size: 14px; margin-top: 4px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); color: var(--accent); box-shadow: var(--shadow);
  transition: transform .15s var(--ease);
}
.icon-btn:active { transform: scale(.9); }
.icon-btn.spin .ic { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ hero ============ */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 18px 18px 16px; margin-bottom: 18px;
  color: #f4f1e8; background:
    radial-gradient(120% 140% at 100% 0%, rgb(233 196 106 / 28%) 0%, transparent 52%),
    radial-gradient(90% 120% at 0% 100%, rgb(59 130 246 / 22%) 0%, transparent 60%),
    linear-gradient(150deg, #101624 0%, #1a2436 55%, #1f2c40 100%);
  box-shadow: 0 12px 34px rgb(16 22 36 / 28%);
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  border: 1px solid rgb(233 196 106 / 25%); box-shadow: 0 0 0 22px rgb(233 196 106 / 5%), 0 0 0 46px rgb(233 196 106 / 3%);
}
.hero-brand { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .18em; font-weight: 700; color: var(--gold); text-transform: uppercase; }
.hero-brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.hero-title { font-size: 21px; font-weight: 700; margin: 10px 0 2px; letter-spacing: -.01em; }
.hero-sub { font-size: 14px; color: rgb(244 241 232 / 70%); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.hero-stat { background: rgb(255 255 255 / 7%); border: 1px solid rgb(255 255 255 / 8%); border-radius: 14px; padding: 9px 10px; backdrop-filter: blur(6px); }
.hero-stat b { display: block; font-size: 19px; font-weight: 700; color: #fff; }
.hero-stat span { font-size: 11.5px; color: rgb(244 241 232 / 65%); }
.hero-cta { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--gold); position: relative; z-index: 1; }

/* ============ sections & rows ============ */
.section { margin-bottom: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 8px; }
.section-title { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--header); }
.section-action { font-size: 14px; font-weight: 600; color: var(--link); display: inline-flex; align-items: center; gap: 4px; }
.section-foot { font-size: 13px; color: var(--hint); margin: 8px 4px 0; line-height: 1.45; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 10px; }
.card.pad { padding: 14px 16px; }

.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; width: 100%; text-align: left;
  position: relative; background: transparent; transition: background .15s;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; height: 1px; background: var(--sep); }
.row.no-icon + .row::before, .row.no-icon::before { left: 16px; }
button.row:active, .row.tap:active { background: var(--soft); }
.row-icon {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none;
  color: #fff; background: var(--accent);
}
.row-icon .ic { width: 18px; height: 18px; }
.row-body { flex: 1; min-width: 0; }
.row-title { font-size: 15.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--hint); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub.wrap { white-space: normal; }
.row-right { color: var(--hint); font-size: 14.5px; display: flex; align-items: center; gap: 6px; flex: none; max-width: 50%; }
.row-right .val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: color-mix(in srgb, var(--hint) 70%, transparent); width: 18px; height: 18px; }
.row.danger .row-title { color: var(--danger); }

/* icon tints */
.t-blue { background: linear-gradient(145deg, #4f9bff, #2b6fe0); }
.t-gold { background: linear-gradient(145deg, #f5c75a, #e09b1c); }
.t-green { background: linear-gradient(145deg, #42d27f, #22a35a); }
.t-red { background: linear-gradient(145deg, #ff6b6b, #e0393e); }
.t-purple { background: linear-gradient(145deg, #a98bff, #7650f0); }
.t-teal { background: linear-gradient(145deg, #3fd0c9, #1f9ea0); }
.t-gray { background: linear-gradient(145deg, #a3a9b4, #7b818c); }
.t-pink { background: linear-gradient(145deg, #ff86b4, #e2508b); }

/* ============ fields ============ */
.field { padding: 10px 16px 11px; position: relative; display: block; }
.field + .field::before, .row + .field::before, .field + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
.field-label { font-size: 12.5px; color: var(--hint); font-weight: 500; display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.field-input {
  width: 100%; border: 0; outline: 0; background: transparent; padding: 2px 0; font-size: 16px; min-height: 26px;
  appearance: none; -webkit-appearance: none;
}
.field-input::placeholder { color: color-mix(in srgb, var(--hint) 75%, transparent); }
.field-input:disabled { opacity: 1; -webkit-text-fill-color: var(--text); }
textarea.field-input { resize: none; }
select.field-input { padding-right: 20px; background: no-repeat right center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f98' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.field-hint { font-size: 12.5px; color: var(--hint); margin-top: 4px; }
.field-error { font-size: 12.5px; color: var(--danger); margin-top: 4px; }
.field.invalid .field-label { color: var(--danger); }
.field-row { display: flex; gap: 10px; align-items: center; }
.field-row .field-input { flex: 1; }

.inline-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; flex: none;
  background: var(--accent-soft); color: var(--accent); font-size: 13.5px; font-weight: 600; transition: transform .15s var(--ease), opacity .15s;
}
.inline-btn:active { transform: scale(.95); }
.inline-btn.danger { background: var(--bad-soft); color: var(--danger); }
.inline-btn.ghost { background: var(--soft); color: var(--text); }
.inline-btn[disabled] { opacity: .45; pointer-events: none; }

/* ============ buttons ============ */
.btn {
  width: 100%; height: 50px; border-radius: 14px; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-text); transition: transform .15s var(--ease), opacity .2s, filter .2s;
}
.btn:active { transform: scale(.98); filter: brightness(.95); }
.btn.secondary { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }
.btn.danger { background: var(--card); color: var(--danger); box-shadow: var(--shadow); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.btn-grid.two { grid-template-columns: repeat(2, 1fr); }
.action-tile {
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.2; transition: transform .15s var(--ease);
}
.action-tile:active { transform: scale(.95); }
.action-tile .row-icon { width: 38px; height: 38px; border-radius: 12px; }
.action-tile[disabled] { opacity: .5; pointer-events: none; }

/* ============ segmented / chips ============ */
.segmented { display: flex; background: var(--soft); border-radius: 12px; padding: 3px; margin-bottom: 14px; position: relative; }
.segmented button { flex: 1; height: 32px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--hint); transition: all .2s var(--ease); position: relative; z-index: 1; }
.segmented button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgb(0 0 0 / 10%); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 34px; min-width: 44px; padding: 0 12px; border-radius: 10px; background: var(--soft); font-size: 14px; font-weight: 600; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: all .15s var(--ease);
}
.chip.on { background: var(--accent); color: var(--accent-text); }
.chip:active { transform: scale(.94); }
.hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 4px 16px 14px; }
.hours .chip { min-width: 0; padding: 0; }

/* ============ badges / status ============ */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: #d08300; }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-info { background: var(--info-soft); color: var(--info); }
.b-mute { background: var(--soft); color: var(--hint); }
.b-gold { background: rgb(233 196 106 / 18%); color: #c08a12; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.d-ok { background: var(--ok); } .d-bad { background: var(--bad); } .d-warn { background: var(--warn); } .d-mute { background: color-mix(in srgb, var(--hint) 45%, transparent); }
.d-info { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .45; } }

/* ============ lesson cards ============ */
.lesson-card { display: flex; gap: 14px; padding: 14px; align-items: stretch; width: 100%; text-align: left; transition: transform .15s var(--ease); }
.lesson-card:active { transform: scale(.985); }
.date-tile {
  width: 54px; flex: none; border-radius: 14px; background: var(--accent-soft); color: var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 0;
}
.date-tile b { font-size: 22px; line-height: 1; font-weight: 750; letter-spacing: -.02em; }
.date-tile span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.date-tile.today { background: linear-gradient(150deg, #1a2436, #2a3a54); color: var(--gold); }
.date-tile.past { background: var(--soft); color: var(--hint); }
.lesson-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.lesson-title { font-size: 16px; font-weight: 650; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lesson-meta { display: flex; align-items: center; gap: 8px; color: var(--hint); font-size: 13px; flex-wrap: wrap; }
.lesson-meta .sepdot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.steps-mini { display: flex; gap: 6px; }
.step-mini { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 6px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--hint); }
.step-mini .ic { width: 14px; height: 14px; }
.step-mini.ok { background: var(--ok-soft); color: var(--ok); }
.step-mini.bad { background: var(--bad-soft); color: var(--bad); }
.step-mini.run { background: var(--info-soft); color: var(--info); }
.step-mini.warn { background: var(--warn-soft); color: #d08300; }

.group-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.gchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--sub); background: var(--soft); border-radius: 7px; padding: 2px 7px; max-width: 100%; }
.gchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.list-gap > * + * { margin-top: 10px; }
.month-label { font-size: 13px; font-weight: 700; color: var(--header); text-transform: uppercase; letter-spacing: .05em; margin: 18px 4px 8px; }
.month-label:first-child { margin-top: 2px; }

/* ============ lesson detail ============ */
.detail-head { margin: 4px 4px 18px; }
.detail-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.detail-title { font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; margin: 10px 0 6px; }
.detail-sub { color: var(--hint); font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.detail-sub > span { display: inline-flex; align-items: center; gap: 5px; }

.timeline { padding: 6px 16px 8px; }
.tl-step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; position: relative; padding: 10px 0; }
.tl-step:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 46px; bottom: -8px; width: 2px; border-radius: 2px; background: var(--sep); }
.tl-step.done:not(:last-child)::after { background: linear-gradient(var(--ok), color-mix(in srgb, var(--ok) 30%, transparent)); }
.tl-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--hint); position: relative; z-index: 1; }
.tl-icon .ic { width: 17px; height: 17px; }
.tl-step.done .tl-icon { background: var(--ok); color: #fff; box-shadow: 0 0 0 4px var(--ok-soft); }
.tl-step.run .tl-icon { background: var(--info); color: #fff; box-shadow: 0 0 0 4px var(--info-soft); }
.tl-step.bad .tl-icon { background: var(--bad); color: #fff; box-shadow: 0 0 0 4px var(--bad-soft); }
.tl-step.warn .tl-icon { background: var(--warn); color: #fff; box-shadow: 0 0 0 4px var(--warn-soft); }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tl-title { font-weight: 650; font-size: 15.5px; }
.tl-time { font-size: 13px; color: var(--hint); white-space: nowrap; }
.tl-note { font-size: 13px; color: var(--hint); margin-top: 2px; }
.tl-note.err { color: var(--bad); }
.tl-groups { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.tl-group { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tl-group .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sub); }

.target { display: flex; align-items: center; gap: 12px; padding: 12px 16px; position: relative; }
.target + .target::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; height: 1px; background: var(--sep); }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; position: relative; }
.file-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
.file-thumb { width: 38px; height: 44px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; font-weight: 800; letter-spacing: .03em; flex: none; color: #fff; background: linear-gradient(160deg, #ff6b6b, #d6363b); box-shadow: inset 0 -10px 0 rgb(0 0 0 / 8%); }
.file-thumb.none { background: var(--soft); color: var(--hint); box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--hint) 45%, transparent); }

/* ============ people ============ */
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .02em; text-transform: uppercase;
}
.avatar.sm { width: 32px; height: 32px; font-size: 12.5px; }
.av0 { background: linear-gradient(145deg, #ff885e, #ff516a); }
.av1 { background: linear-gradient(145deg, #ffcd6a, #ffa85c); }
.av2 { background: linear-gradient(145deg, #82b1ff, #665fff); }
.av3 { background: linear-gradient(145deg, #a0de7e, #54cb68); }
.av4 { background: linear-gradient(145deg, #53edd6, #28c9b7); }
.av5 { background: linear-gradient(145deg, #72d5fd, #2a9ef1); }
.av6 { background: linear-gradient(145deg, #e0a2f3, #d669ed); }
.stack { display: flex; }
.stack .avatar { width: 26px; height: 26px; font-size: 10.5px; border: 2px solid var(--card); margin-left: -8px; }
.stack .avatar:first-child { margin-left: 0; }

/* ============ unread ============ */
.wait { font-size: 12.5px; font-weight: 600; padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.count-pill { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--accent); color: var(--accent-text); font-size: 12.5px; font-weight: 700; display: grid; place-items: center; }
.big-num { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }

/* ============ checks ============ */
.check-row { display: flex; gap: 12px; padding: 11px 16px; align-items: flex-start; position: relative; }
.check-row + .check-row::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; height: 1px; background: var(--sep); }
.check-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.check-mark .ic { width: 14px; height: 14px; stroke-width: 3; }
.check-mark.ok { background: var(--ok-soft); color: var(--ok); }
.check-mark.bad { background: var(--bad-soft); color: var(--bad); }
.check-mark.mute { background: var(--soft); color: var(--hint); }
.callout { display: flex; gap: 12px; padding: 13px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; margin-bottom: 14px; }
.callout .ic { margin-top: 1px; }
.callout.warn { background: var(--warn-soft); color: color-mix(in srgb, #9a5d00 80%, var(--text)); }
.callout.info { background: var(--info-soft); color: color-mix(in srgb, #1d4ed8 70%, var(--text)); }
.callout.bad { background: var(--bad-soft); color: color-mix(in srgb, #b4232a 75%, var(--text)); }

/* ============ toggle / stepper ============ */
.toggle { width: 51px; height: 31px; border-radius: 16px; background: color-mix(in srgb, var(--hint) 35%, transparent); position: relative; transition: background .2s var(--ease); flex: none; }
.toggle::after { content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 22%); transition: transform .22s var(--ease); }
.toggle.on { background: var(--ok); }
.toggle.on::after { transform: translateX(20px); }
.stepper { display: inline-flex; align-items: center; background: var(--soft); border-radius: 10px; overflow: hidden; flex: none; }
.stepper button { width: 36px; height: 32px; font-size: 20px; color: var(--accent); display: grid; place-items: center; }
.stepper button:active { background: var(--sep); }
.stepper span { min-width: 40px; text-align: center; font-weight: 650; font-size: 15px; font-variant-numeric: tabular-nums; }

/* ============ tabbar ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 6px 8px calc(var(--safe-b) + 6px);
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--sep);
  display: flex; justify-content: space-around;
}
.tab { flex: 1; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0; color: var(--hint); font-size: 10.5px; font-weight: 600; position: relative; transition: color .2s; }
.tab .ic { width: 24px; height: 24px; transition: transform .25s var(--ease); }
.tab.on { color: var(--accent); }
.tab.on .ic { transform: translateY(-1px) scale(1.06); }
.tab .tab-badge { position: absolute; top: 0; left: 50%; margin-left: 6px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--card); }

/* ============ FAB ============ */
.fab {
  position: fixed; right: 18px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px); z-index: 19;
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-text);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 6px rgb(0 0 0 / 12%);
  transition: transform .2s var(--ease); animation: pop .35s var(--ease);
}
.fab:active { transform: scale(.9); }
.fab .ic { width: 26px; height: 26px; stroke-width: 2.4; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* ============ sheet ============ */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / 38%); animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88vh; overflow: auto;
  background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px 16px calc(var(--safe-b) + 20px);
  animation: slideup .32s var(--ease); max-width: 640px; margin: 0 auto;
}
@keyframes slideup { from { transform: translateY(100%); } }
.sheet-grip { width: 38px; height: 5px; border-radius: 3px; background: var(--sep); margin: 2px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 4px 14px; }
.sheet-title { font-size: 19px; font-weight: 700; }
.sheet-close { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--hint); display: grid; place-items: center; }
.sheet-close .ic { width: 16px; height: 16px; stroke-width: 2.6; }

/* ============ empty / skeleton / toast ============ */
.empty { text-align: center; padding: 42px 24px 30px; }
.empty-art { width: 84px; height: 84px; border-radius: 28px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); position: relative; }
.empty-art::after { content: ""; position: absolute; inset: -10px; border-radius: 34px; border: 1.5px dashed color-mix(in srgb, var(--accent) 30%, transparent); }
.empty-art .ic { width: 36px; height: 36px; }
.empty-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.empty-text { color: var(--hint); font-size: 14.5px; line-height: 1.45; max-width: 320px; margin: 0 auto; }
.empty .btn { margin-top: 18px; width: auto; display: inline-flex; padding: 0 22px; height: 44px; }
.empty.success .empty-art { background: var(--ok-soft); color: var(--ok); }
.empty.success .empty-art::after { border-color: color-mix(in srgb, var(--ok) 35%, transparent); }

.sk { background: linear-gradient(90deg, var(--soft) 0%, color-mix(in srgb, var(--hint) 18%, transparent) 50%, var(--soft) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-card { height: 86px; border-radius: var(--radius); margin-bottom: 10px; }
.sk-line { height: 12px; margin: 8px 0; }

.toast-wrap { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 10px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; max-width: 520px;
  background: color-mix(in srgb, #1b2233 94%, transparent); color: #fff; font-size: 14px; font-weight: 500;
  box-shadow: 0 10px 30px rgb(0 0 0 / 25%); backdrop-filter: blur(12px); animation: toastin .35s var(--ease);
}
.toast .ic { width: 18px; height: 18px; }
.toast.ok .ic { color: #4ade80; } .toast.err .ic { color: #ff7b7b; }
@keyframes toastin { from { transform: translateY(-16px) scale(.96); opacity: 0; } }

.error-box { text-align: center; padding: 60px 24px; }
.muted { color: var(--hint); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.spacer { height: 12px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.save-bar { position: sticky; bottom: calc(var(--safe-b) + 10px); margin-top: 18px; z-index: 5; }
.save-bar .btn { box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 40%, transparent); }

.web-back { display: inline-flex; align-items: center; gap: 2px; margin: 12px 0 0 10px; height: 32px; padding: 0 12px 0 6px; border-radius: 999px; color: var(--link); font-size: 15px; font-weight: 600; }
.web-back .ic { transform: rotate(180deg); }
.web-back + .screen-wrap .screen { padding-top: 4px; }
.chev.sel { color: var(--accent); width: 20px; height: 20px; stroke-width: 2.6; }

/* ============ message editor ============ */
.fmt-bar { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.fmt-btn { min-width: 34px; height: 30px; padding: 0 9px; border-radius: 8px; background: var(--soft); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.fmt-btn:active { background: var(--sep); transform: scale(.95); }
.fmt-b { font-weight: 800; } .fmt-i { font-style: italic; font-family: Georgia, serif; } .fmt-u { text-decoration: underline; } .fmt-s { text-decoration: line-through; }
.fmt-code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.fmt-spoiler { font-size: 12.5px; background: repeating-linear-gradient(135deg, var(--soft) 0 4px, color-mix(in srgb, var(--hint) 18%, transparent) 4px 8px); }
.msg-text { min-height: 128px; line-height: 1.45; font-size: 15.5px; }
.char-count { text-align: right; font-size: 12px; color: var(--hint); font-variant-numeric: tabular-nums; }
.char-count.over { color: var(--danger); font-weight: 700; }
.media-thumb { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-thumb.none { background: var(--soft); color: var(--hint); border: 1.5px dashed color-mix(in srgb, var(--hint) 45%, transparent); }
.btn-edit { display: flex; align-items: center; gap: 10px; padding: 8px 16px; position: relative; }
.btn-edit::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
.btn-edit-fields { flex: 1; min-width: 0; background: var(--soft); border-radius: 12px; padding: 6px 12px; }
.btn-edit-fields .field-input { font-size: 15px; min-height: 24px; }
.btn-edit-fields .url { font-size: 13px; color: var(--link); border-top: 1px solid var(--sep); margin-top: 4px; padding-top: 6px; }
.add-row::before { left: 60px !important; }

/* telegram-like preview */
.tg-chat {
  border-radius: var(--radius); padding: 18px 14px 14px; box-shadow: var(--shadow); overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgb(255 255 255 / 25%) 0 2px, transparent 3px) 0 0 / 34px 34px,
    radial-gradient(circle at 70% 60%, rgb(255 255 255 / 18%) 0 1.5px, transparent 2.5px) 0 0 / 26px 26px,
    linear-gradient(160deg, #a9c99a 0%, #c8d79a 45%, #8fb98a 100%);
}
.dark .tg-chat { background: radial-gradient(circle at 20% 20%, rgb(255 255 255 / 6%) 0 2px, transparent 3px) 0 0 / 34px 34px, linear-gradient(160deg, #0f1b26 0%, #182a35 50%, #10202a 100%); }
.tg-bubble {
  max-width: 88%; background: var(--card); color: var(--text); border-radius: 16px 16px 16px 4px; overflow: hidden;
  box-shadow: 0 1px 1.5px rgb(0 0 0 / 14%); position: relative; animation: fade .3s var(--ease);
}
.tg-media { background: #1f2a36; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.tg-media img, .tg-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tg-media.doc { aspect-ratio: auto; background: transparent; padding: 10px 12px 0; justify-items: start; }
.tg-media-ph { display: flex; flex-direction: column; align-items: center; gap: 6px; color: rgb(255 255 255 / 75%); font-size: 13px; font-weight: 600; }
.tg-media.doc .tg-media-ph { flex-direction: row; color: var(--link); }
.tg-media-ph .ic { width: 30px; height: 30px; }
.tg-media.doc .tg-media-ph .ic { width: 22px; height: 22px; }
.tg-text { padding: 8px 12px 18px; font-size: 15px; line-height: 1.38; word-wrap: break-word; overflow-wrap: anywhere; }
.tg-text a { color: var(--link); }
.tg-text code, .tg-text pre { font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; background: var(--soft); border-radius: 4px; padding: 0 3px; }
.tg-text pre { display: block; padding: 6px 8px; white-space: pre-wrap; }
.tg-text blockquote { margin: 4px 0; padding: 2px 8px; border-left: 3px solid var(--link); background: var(--accent-soft); border-radius: 4px; }
.tg-text .tg-spoiler { background: color-mix(in srgb, var(--hint) 55%, transparent); color: transparent; border-radius: 4px; }
.tg-time { position: absolute; right: 10px; bottom: 5px; font-size: 11px; color: var(--hint); }
.tg-buttons { max-width: 88%; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.tg-btn {
  height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px;
  background: rgb(0 0 0 / 20%); color: #fff; font-size: 14.5px; font-weight: 600; backdrop-filter: blur(6px); text-align: center;
}
.tg-btn .ic { width: 13px; height: 13px; opacity: .8; }

/* ============ funnels ============ */
.mini-stats { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--hint); }
.mini-stats b { color: var(--text); font-weight: 700; }
.funnel-stats { display: flex; flex-direction: column; gap: 10px; }
.funnel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.funnel-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; color: var(--hint); }
.funnel-side b { color: var(--text); }
.funnel-side .bad, .funnel-side .bad b { color: var(--bad); }
.fbar-top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 4px; }
.fbar-top b { font-variant-numeric: tabular-nums; }
.fbar-track { height: 10px; border-radius: 5px; background: var(--soft); overflow: hidden; }
.fbar-fill { height: 100%; border-radius: 5px; transition: width .6s var(--ease); }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--hint) 55%, transparent); flex: none; position: relative; transition: border-color .2s; }
.radio.on { border-color: var(--accent); }
.radio.on::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); animation: pop .25s var(--ease); }
.steps { display: flex; flex-direction: column; gap: 10px; }
.step-card { display: flex; align-items: stretch; transition: opacity .2s; }
.step-card.off { opacity: .55; }
.step-main { flex: 1; min-width: 0; display: flex; gap: 12px; padding: 13px 4px 13px 14px; text-align: left; align-items: flex-start; }
.step-main:active { background: var(--soft); }
.step-num { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; color: #fff; background: linear-gradient(145deg, #ff86b4, #e2508b); }
.step-delay { font-size: 12.5px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 4px; }
.step-text { font-size: 14.5px; margin-top: 3px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.step-meta { display: flex; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--hint); flex-wrap: wrap; }
.step-meta span { display: inline-flex; align-items: center; gap: 3px; }
.step-meta .ok { color: var(--ok); } .step-meta .bad { color: var(--bad); }
.step-order { display: flex; flex-direction: column; border-left: 1px solid var(--sep); }
.step-order button { flex: 1; width: 42px; display: grid; place-items: center; color: var(--accent); }
.step-order button:active { background: var(--soft); }
.step-order button[disabled] { color: var(--sep); }
.step-order .up { transform: rotate(-90deg); } .step-order .down { transform: rotate(90deg); }
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-tile { padding: 12px; text-align: center; }
.stat-tile b { display: block; font-size: 22px; font-weight: 750; }
.stat-tile b.ok { color: var(--ok); } .stat-tile b.bad { color: var(--bad); }
.stat-tile span { font-size: 12px; color: var(--hint); }

/* ============ broadcasts ============ */
.progress { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.progress-track { flex: 1; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; display: flex; }
.progress.big .progress-track { height: 12px; border-radius: 6px; margin: 10px 0 12px; }
.progress-seg { height: 100%; transition: width .6s var(--ease); }
.progress-seg.ok { background: var(--ok); } .progress-seg.bad { background: var(--bad); } .progress-seg.mute { background: color-mix(in srgb, var(--hint) 55%, transparent); }
.progress-label { font-size: 12px; color: var(--hint); font-variant-numeric: tabular-nums; }
.deliv-head { display: flex; align-items: baseline; gap: 10px; }
.deliv-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--sub); }
.deliv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.btn-stack { display: flex; flex-direction: column; gap: 10px; }

/* ============ premium emoji ============ */
.emoji-img { display: block; object-fit: contain; flex: none; }
.emoji-char { display: inline-grid; place-items: center; line-height: 1; flex: none; }
.emoji-tile { width: 38px; height: 38px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; flex: none; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.emoji-cell { aspect-ratio: 1; border-radius: 14px; background: var(--soft); display: grid; place-items: center; position: relative; transition: transform .15s var(--ease), box-shadow .15s; }
.emoji-cell:active { transform: scale(.9); }
.emoji-cell.on { box-shadow: 0 0 0 2.5px var(--accent); background: var(--accent-soft); }
.emoji-del { position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; border-radius: 50%; background: var(--bad); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgb(0 0 0 / 25%); animation: pop .2s var(--ease); }
.emoji-del .ic { width: 12px; height: 12px; stroke-width: 3; }
.emoji-hero { display: flex; align-items: center; gap: 16px; padding: 16px; }
.emoji-hero-big { width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 30% 25%, rgb(233 196 106 / 30%), transparent 60%), var(--soft); }
.fmt-emoji { gap: 5px; font-size: 12.5px; color: var(--accent); background: var(--accent-soft); }
.tg-emoji { width: 1.25em; height: 1.25em; vertical-align: -0.28em; object-fit: contain; display: inline-block; }

/* ============ pushes ============ */
.push-hero { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; }
.push-hero-icon { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(145deg, #f5c75a, #e09b1c); box-shadow: 0 6px 16px rgb(224 155 28 / 30%); }
.push-hero-num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.push-card { display: flex; align-items: stretch; transition: opacity .2s; }
.push-card.off .push-main { opacity: .55; }
.push-main { flex: 1; min-width: 0; display: flex; gap: 12px; padding: 13px 4px 13px 14px; text-align: left; align-items: flex-start; }
.push-main:active { background: var(--soft); }
.push-main .lesson-meta { gap: 5px; margin-top: 3px; }
.push-toggle { display: flex; align-items: center; padding: 0 14px 0 6px; }
.push-last { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; margin-top: 6px; }
.run-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; color: var(--hint); margin-top: 3px; }
.run-stats.compact { margin-top: 0; font-size: 12px; }
.run-stats span { display: inline-flex; align-items: center; gap: 3px; }
.run-stats .ok { color: var(--ok); font-weight: 600; } .run-stats .bad { color: var(--bad); } .run-stats .info { color: var(--info); }
.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; }
.weekdays .chip { min-width: 0; padding: 0; }
.ph-chip { width: 96px; text-align: center; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; padding: 4px 6px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); flex: none; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.when-line { line-height: 1.35; }
.when-line .ic { display: inline-block; vertical-align: -3px; margin-right: 4px; }

/* ============ ratings ============ */
.tg-btn-row { display: flex; gap: 4px; }
.tg-btn-row .tg-btn { flex: 1; padding: 0 4px; font-size: 13.5px; }
.stars { position: relative; display: inline-block; line-height: 1; letter-spacing: 1px; white-space: nowrap; }
.stars-bg { color: color-mix(in srgb, var(--hint) 35%, transparent); }
.stars-fg { position: absolute; left: 0; top: 0; overflow: hidden; color: #f5b301; }
.rating-card { display: flex; gap: 18px; padding: 16px; align-items: center; }
.rating-main { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 96px; }
.rating-avg { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.rating-avg.great, .score-chip.great, .rating-badge.great b { color: var(--ok); }
.rating-avg.good, .score-chip.good, .rating-badge.good b { color: #3aa36a; }
.rating-avg.mid, .score-chip.mid, .rating-badge.mid b { color: #d08300; }
.rating-avg.bad, .score-chip.bad, .rating-badge.bad b { color: var(--bad); }
.rating-count { font-size: 12.5px; }
.hist { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hist-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.hist-label { width: 22px; font-weight: 600; color: var(--sub); display: inline-flex; gap: 1px; }
.hist-star { color: #f5b301; font-size: 11px; }
.hist-track { flex: 1; height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.hist-fill { height: 100%; border-radius: 4px; transition: width .6s var(--ease); }
.s5 { background: #2fb768; } .s4 { background: #7ccf5a; } .s3 { background: #f5b301; } .s2 { background: #ff8a3d; } .s1 { background: #e5484d; }
.hist-count { width: 26px; text-align: right; color: var(--hint); font-variant-numeric: tabular-nums; }
.rating-empty { text-align: center; padding: 22px 20px; }
.rating-empty-stars { font-size: 26px; letter-spacing: 4px; color: color-mix(in srgb, var(--hint) 45%, transparent); margin-bottom: 8px; }
.rating-comments-head { font-size: 12.5px; font-weight: 600; color: var(--hint); padding: 10px 16px 4px; border-top: 1px solid var(--sep); }
.rating-comments { display: flex; flex-direction: column; }
.rating-comment { padding: 10px 16px; position: relative; }
.rating-comment + .rating-comment::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--sep); }
.rating-comment-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.rating-comment-text { font-size: 14.5px; margin-top: 4px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.rating-hero-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; position: relative; z-index: 1; }
.rating-hero .stars-bg { color: rgb(255 255 255 / 22%); }
.rank-wrap { position: relative; flex: none; }
.medal { position: absolute; right: -4px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; color: #fff; border: 2px solid var(--card); }
.medal.m1 { background: linear-gradient(145deg, #f7d154, #e0a100); } .medal.m2 { background: linear-gradient(145deg, #cfd6df, #9aa4b1); } .medal.m3 { background: linear-gradient(145deg, #e6a26f, #b86b35); }
.score-chip { font-weight: 750; font-size: 15px; font-variant-numeric: tabular-nums; }
.rating-lesson { display: flex; gap: 14px; padding: 14px; width: 100%; text-align: left; align-items: center; transition: transform .15s var(--ease); }
.rating-lesson:active { transform: scale(.985); }
.rating-badge { width: 54px; height: 54px; border-radius: 15px; background: var(--soft); flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rating-badge b { font-size: 19px; font-weight: 800; line-height: 1; }
.rating-badge span { color: #f5b301; font-size: 12px; margin-top: 2px; }
.dist-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 8px; background: var(--soft); }
.dist-bar span { height: 100%; }
