/* StudyBalance — stile di base. Mobile first: si parte da 360 px. */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1c2030;
  --text-muted: #5b6275;
  --border: #dfe3ec;
  --accent: #3b5bdb;
  --accent-soft: #e7ecff;
  --review: #0f9d7a;
  --radius: 14px;
  --nav-height: 64px;
  --side-width: 220px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141c;
    --surface: #1b1e2a;
    --text: #eceef5;
    --text-muted: #a3aabd;
    --border: #2c3142;
    --accent: #8da2fb;
    --accent-soft: #252b47;
    --review: #4fd1ae;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}

a { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { top: 8px; }

/* Intestazione */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}
.brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}
.header-action {
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
}
.header-action[aria-current="page"] { background: var(--accent-soft); }

/* Contenuto */
main {
  padding: 4px 16px 24px;
  max-width: 720px;
  margin: 0 auto;
}
main:focus { outline: none; }

h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 8px 0 4px;
}
.subtitle {
  color: var(--text-muted);
  margin: 0 0 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.card h2 {
  font-size: 1rem;
  margin: 0 0 4px;
}
.card p {
  margin: 0;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 8px;
}

.noscript { padding: 16px; }

/* Barra di navigazione in basso */
.app-nav {
  position: fixed;
  inset: auto 0 0 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.app-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--nav-height);
  padding: 6px 2px;
  font-size: 0.6875rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--text-muted);
}
.app-nav svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

/* Schermi larghi: la barra diventa una colonna laterale */
@media (min-width: 900px) {
  body {
    padding-bottom: 0;
    padding-left: var(--side-width);
  }
  .app-nav {
    inset: 0 auto 0 0;
    width: var(--side-width);
    grid-template-columns: 1fr;
    align-content: start;
    gap: 4px;
    padding: 72px 12px 12px;
    border-top: 0;
    border-right: 1px solid var(--border);
  }
  .app-nav a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.9375rem;
    border-radius: 10px;
  }
  .app-nav a[aria-current="page"] { background: var(--accent-soft); }
}

/* ------------------------------------------------------------------ */
/* Moduli, pulsanti e componenti (da T1)                               */
/* ------------------------------------------------------------------ */

:root {
  --danger: #c92a2a;
  --danger-soft: #fdecec;
  --field-bg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --danger: #ff8787;
    --danger-soft: #3a2024;
    --field-bg: #12141c;
  }
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hint, .count, .empty, .eyebrow {
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.eyebrow {
  margin: 8px 0 0;
  font-weight: 600;
  color: var(--accent);
}
.card .hint { margin-bottom: 12px; }
.card .count { margin-top: 12px; }
.card .empty { margin: 8px 0 16px; }

/* Pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .btn-primary { color: #12141c; }
}
.btn-danger {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}
.btn-quiet-danger {
  border-color: transparent;
  background: transparent;
  color: var(--danger);
}
.btn-small {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 0.875rem;
}

/* Campi */
label, legend {
  display: block;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 4px;
}
input[type="text"], input[type="time"], select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
}
input[type="color"] {
  width: 56px;
  height: 44px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--field-bg);
}
/* Doppio attributo: deve prevalere sulle regole dei singoli tipi di campo. */
[aria-invalid="true"][aria-invalid] { border-color: var(--danger); }
.field { margin-bottom: 12px; }
.field-grow { flex: 1; min-width: 0; }
.field-error {
  margin: 4px 0 12px;
  color: var(--danger);
  font-size: 0.875rem;
  font-weight: 600;
}
.card p.field-error { color: var(--danger); }

.inline-form { margin-top: 16px; }
.inline-form-row {
  display: flex;
  gap: 8px;
}
.inline-form-row input { flex: 1; min-width: 0; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.form-title {
  font-size: 0.9375rem;
  margin: 16px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

/* Materie */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.chip {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.chip[aria-pressed="true"]::before { content: "✓ "; }

.dot {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.subject-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 1.0625rem;
}
.subject-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.subject-card .btn-quiet-danger { margin-top: 4px; padding-left: 0; }

fieldset.level-picker {
  border: 0;
  margin: 0;
  padding: 0;
}
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  border-left: 1px solid var(--border);
}
.segmented label:first-of-type { border-left: 0; }
.segmented input:checked + label {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.segmented input:focus-visible + label {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

/* Orario */
.day-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}
.day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 52px;
  padding: 6px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.day-tab[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
}
@media (prefers-color-scheme: dark) {
  .day-tab[aria-pressed="true"] { color: #12141c; }
}
.day-count { font-size: 0.75rem; opacity: 0.8; }

.lesson-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.lesson-row:first-child { border-top: 0; }
.lesson-row.is-editing { display: block; }
.lesson-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.lesson-time { color: var(--text-muted); font-size: 0.875rem; }
.row-actions { display: flex; gap: 2px; }
.lesson-form-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Procedura guidata */
.is-onboarding .app-nav,
.is-onboarding .header-action { display: none; }
body.is-onboarding { padding-bottom: 0; padding-left: 0; }

.wizard-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 12px;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.wizard-progress progress {
  flex: 1;
  height: 8px;
  accent-color: var(--accent);
}
.wizard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.wizard-actions-end { display: flex; gap: 8px; }

/* Impostazioni */
.link-list li { border-top: 1px solid var(--border); }
.link-list li:first-child { border-top: 0; }
.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.link-meta { color: var(--text-muted); font-weight: 400; font-size: 0.875rem; }

/* Schermata Oggi */
:root { --warning: #9a4f00; --warning-soft: #fff4e0; }
@media (prefers-color-scheme: dark) {
  :root { --warning: #ffb454; --warning-soft: #33280f; }
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.timeline-row:first-child { border-top: 0; }
.timeline-time {
  flex: none;
  min-width: 6.5em;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.timeline-title {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.timeline-title strong { font-weight: 600; }
.timeline-detail {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 400;
}
/* Un solo orario (sessioni) occupa meno spazio di un intervallo (lezioni). */
.timeline-time.is-short { min-width: 3.2em; }
.timeline-row .badge { margin: 0; flex: none; }
/* Attenuate con il colore e non con la trasparenza, per restare leggibili. */
.timeline-row.is-past,
.timeline-row.is-past .timeline-title { color: var(--text-muted); font-weight: 400; }
.timeline-row.is-current {
  margin: 0 -8px;
  padding: 10px 8px;
  border-radius: 10px;
  border-top-color: transparent;
  background: var(--accent-soft);
}
.timeline-row.is-current + .timeline-row { border-top-color: transparent; }
.timeline-row.is-next .badge {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.card-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  font-weight: 600;
  text-decoration: none;
}
.card-link::after { content: " →"; white-space: pre; }
.empty-state p { margin: 4px 0 0; }

.card-warning {
  border-color: var(--warning);
  background: var(--warning-soft);
}
.card-warning h2 { color: var(--warning); }

/* Calendario */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.view-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 8px 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.view-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}
.view-tab + .view-tab { border-left: 1px solid var(--border); }
.view-tab[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}
.month-nav .month-title {
  flex: 1;
  margin: 0;
  font-size: 1.0625rem;
  text-align: center;
}
.month-weekdays, .month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
.month-weekdays {
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
}
.day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 48px;
  padding: 4px 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.day-cell.is-outside { color: var(--text-muted); }
.day-cell.is-today .day-number { font-weight: 800; color: var(--accent); }
.day-cell.is-today { border-color: var(--border); }
.day-cell[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  opacity: 1;
}
.day-number { font-variant-numeric: tabular-nums; }
.day-dots {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 10px;
}
.day-dots .dot { width: 7px; height: 7px; }
.day-more { font-size: 0.625rem; color: var(--text-muted); }
.dot-ring {
  background: transparent;
  border: 2px solid var(--text-muted);
}
.day-dots .dot-ring { border-width: 1.5px; }

a.row-link {
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  justify-content: center;
}
a.row-link:hover strong { text-decoration: underline; }

.details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0 0 16px;
}
.details dt { color: var(--text-muted); font-size: 0.875rem; }
.details dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.check-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

input[type="date"], textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; }
form.card { display: block; }

/* Piani di studio */
input[type="number"] {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
}
.field .hint { margin: 4px 0 0; font-size: 0.875rem; }
form.card > .hint { margin: 0 0 12px; font-size: 0.875rem; }
form.card > fieldset { margin-bottom: 12px; }

.badge-completed { background: #dff5ea; color: #0b6b4f; }
.badge-done { background: #dff5ea; color: #0b6b4f; }
.badge-unfeasible, .badge-behind, .badge-skipped {
  background: var(--warning-soft);
  color: var(--warning);
}
@media (prefers-color-scheme: dark) {
  .badge-completed, .badge-done { background: #12352b; color: #4fd1ae; }
}

.progress-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 12px;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.progress-block progress {
  flex: 1;
  height: 10px;
  accent-color: var(--accent);
}

.plan-card-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 1.0625rem;
}
.plan-card-link:hover strong { text-decoration: underline; }
.plan-card-subject {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.plan-card .timeline-detail { margin: 0; }

details.card summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}
details.card .plan-card {
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 12px 0;
  margin: 0;
}

/* Riquadro del piano, nello stile dell'esempio */
.plan-sheet h3 {
  margin: 16px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 1rem;
}
.param-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 12px 0 0;
}
.param-grid dt { color: var(--text-muted); font-size: 0.8125rem; }
.param-grid dd { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.param-grid.totals {
  margin: 16px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.param-grid.totals dd { font-size: 1.25rem; }

.bar-row { padding: 6px 0; }
.bar-head, .bar-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.bar-head span, .bar-foot { color: var(--text-muted); font-size: 0.875rem; }
.bar-track {
  height: 8px;
  margin: 6px 0;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.bar-row.is-review .bar-fill { background: var(--review); }

/* Sessioni con i loro comandi */
.session-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.session-row:first-child { border-top: 0; }
.session-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.session-info strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.session-row.is-done .session-info strong,
.session-row.is-skipped .session-info strong { color: var(--text-muted); font-weight: 400; }
.session-row.is-overdue .session-info strong::after {
  content: "in ritardo";
  margin-left: 4px;
  color: var(--warning);
  font-size: 0.75rem;
  font-weight: 700;
}
.session-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.session-controls .badge { margin: 0; }
.form-actions.wrap { flex-wrap: wrap; margin-top: 4px; }

/* Voti */
.grade-card .plan-card-link strong {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stats-grid {
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 8px;
}
.card p.stats-line {
  margin: 0;
  font-weight: 600;
  color: var(--text-muted);
}
.card p.stats-line.is-reached { color: #0b6b4f; }
.card p.stats-line.is-close { color: var(--warning); }
.card p.stats-line.is-far { color: var(--danger); }
@media (prefers-color-scheme: dark) {
  .card p.stats-line.is-reached { color: #4fd1ae; }
}
.grade-value {
  flex: none;
  min-width: 2.2em;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.trend { margin: 16px 0 4px; }
.trend svg { display: block; width: 100%; max-width: 480px; height: auto; }
.trend-grid { stroke: var(--border); stroke-width: 1; }
.trend-axis { fill: var(--text-muted); font-size: 10px; }
.trend-target { stroke: var(--review); stroke-width: 2; stroke-dasharray: 6 4; }
.trend-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.trend-point { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.trend figcaption {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.legend-line, .legend-target {
  display: inline-block;
  width: 18px;
  height: 0;
  border-top: 3px solid var(--accent);
}
.legend-target { border-top: 3px dashed var(--review); margin-left: 10px; }

/* Uso senza connessione, privacy */
.offline-banner {
  margin: 0;
  padding: 8px 16px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}
.card p.prose { margin: 0 0 8px; color: var(--text); }
.card p.prose:last-child { margin-bottom: 0; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.badge-row .badge { margin: 0; }
.badge-network { background: var(--warning-soft); color: var(--warning); }
.check-list { margin: 8px 0 0; padding: 0; list-style: none; }
.check-list li { padding: 4px 0; }
.check-list li::before { content: "✓ "; color: var(--review); font-weight: 700; }

/* Conferme e messaggi */
.dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.dialog::backdrop { background: rgb(0 0 0 / 0.45); }
.dialog h2 { margin: 0 0 8px; font-size: 1.125rem; }
.dialog p { margin: 0 0 16px; color: var(--text-muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

.status {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height) + 12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.9375rem;
  z-index: 20;
}
.is-onboarding .status { bottom: 16px; }
@media (min-width: 900px) {
  .status { bottom: 24px; }
}
