/* ---------- Thème ---------- */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #121820;
  --muted: #64707d;
  --line: #e2e5ea;
  --accent: #0f766e;
  --accent-strong: #0b5e57;
  --accent-text: #ffffff;
  --accent-soft: #e3f4f1;
  --warn: #a35a00;
  --warn-soft: #fff2d9;
  --danger: #c62828;
  --danger-soft: #fde8e8;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 40px rgba(16, 24, 40, .18);
  --radius: 16px;
  --radius-sm: 10px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1013;
    --surface: #161a1f;
    --surface-2: #1e2329;
    --text: #e9edf1;
    --muted: #96a1ad;
    --line: #272d34;
    --accent: #2dd4bf;
    --accent-strong: #5eead4;
    --accent-text: #032b27;
    --accent-soft: #10302c;
    --warn: #f5b84b;
    --warn-soft: #33270f;
    --danger: #f47c7c;
    --danger-soft: #3a1717;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.ic {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- Barre du haut ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.appbar-inner {
  max-width: 1040px; margin: 0 auto;
  padding: 10px 16px 12px;
  display: grid; gap: 10px 12px; align-items: center;
  grid-template-columns: 1fr auto;
  grid-template-areas: "logo out" "search search";
}
.logo { grid-area: logo; display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 12px rgba(15, 118, 110, .35);
}
.logo-text { font-weight: 750; font-size: 19px; letter-spacing: -.01em; display: flex; flex-direction: column; line-height: 1.1; }
.logo-text small { font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: 0; }
.logout { grid-area: out; }
.top-tabs { display: none; grid-area: tabs; }

.search {
  grid-area: search;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: 12px; padding: 0 12px; height: 44px;
  transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: var(--accent); background: var(--surface); }
.search .ic { color: var(--muted); }
.search input {
  border: none; background: none; outline: none; width: 100%; height: 100%;
  font-size: 16px;
}

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: inline-grid; place-items: center;
  background: transparent; border: none; color: var(--muted); text-decoration: none;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.solid { background: var(--surface-2); color: var(--text); }

/* ---------- Onglets ---------- */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 8px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
}
.bottombar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; padding: 6px 0 4px; border-radius: 12px;
  color: var(--muted); font-size: 12px; font-weight: 600;
}
.bottombar button .ic { width: 22px; height: 22px; transition: transform .15s; }
.bottombar button.active { color: var(--accent); }
.bottombar button.active .ic { transform: translateY(-1px) scale(1.08); }

.top-tabs { gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; }
.top-tabs button {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; padding: 7px 14px; border-radius: 9px;
  color: var(--muted); font-weight: 600; font-size: 15px;
}
.top-tabs button .ic { width: 18px; height: 18px; }
.top-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- Contenu ---------- */
.main {
  max-width: 1040px; margin: 0 auto;
  padding: 16px 16px calc(150px + var(--safe-b));
}
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 26px 2px 12px; }
.section-head:first-child { margin-top: 6px; }
.section-head h2 { font-size: 18px; letter-spacing: -.01em; }
.section-head .count {
  font-size: 13px; font-weight: 700; color: var(--muted);
  background: var(--surface-2); padding: 1px 8px; border-radius: 99px;
}
.section-head .hint { font-size: 14px; color: var(--muted); margin-left: auto; text-align: right; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* Bandeaux */
.banner {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border-radius: 14px; margin-bottom: 14px;
  background: var(--warn-soft); color: var(--warn); font-size: 14px; font-weight: 500;
  border: none; width: 100%; text-align: left;
}
.banner .ic { margin-top: 1px; }
.banner ul { margin: 4px 0 0; padding-left: 18px; }
button.banner:hover { filter: brightness(.98); }

/* Statistiques */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { padding: 14px; }
.stat b { display: block; font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat .bar { height: 5px; border-radius: 9px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

/* ---------- Zones ---------- */
.zone-grid { display: grid; gap: 12px; }
.zone-card {
  --zsoft: color-mix(in srgb, var(--zc) 14%, var(--surface));
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.zone-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--zc); }
.zone-card:hover { border-color: color-mix(in srgb, var(--zc) 50%, var(--line)); }
.zone-card:active { transform: scale(.985); }
.zone-letter {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  background: var(--zc); color: #fff; font-weight: 800; font-size: 24px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--zc) 40%, transparent);
}
.zone-letter.sm { width: 38px; height: 38px; border-radius: 11px; font-size: 18px; }
.zone-letter.lg { width: 60px; height: 60px; border-radius: 16px; font-size: 28px; }
.zc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.zc-name { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zc-meta { font-size: 13px; color: var(--muted); }
.zc-foot { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.meter { flex: 1; height: 6px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--zc); border-radius: inherit; }
.zc-range { font-size: 12px; font-weight: 700; color: var(--zc); white-space: nowrap; }
.zone-card > .ic { color: var(--muted); }
.order {
  position: absolute; top: 8px; right: 10px;
  font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em;
}

/* En-tête d'une zone */
.zone-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; margin-bottom: 14px; border-radius: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--zc) 22%, var(--surface)), var(--surface) 75%);
  border: 1px solid color-mix(in srgb, var(--zc) 30%, var(--line));
}
.zone-hero h1 { font-size: 22px; letter-spacing: -.02em; }
.zone-hero p { margin: 3px 0 0; font-size: 14px; color: var(--muted); }
.zone-hero .grow { flex: 1; min-width: 0; }

.toolbar { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; flex-wrap: wrap; }
.toolbar .hint { font-size: 13px; color: var(--muted); }

/* Étagères */
.shelf { padding: 14px; margin-bottom: 12px; }
.shelf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.shelf-head h3 { font-size: 15px; }
.shelf-head .muted { font-size: 13px; }
.shelf-head .btn { margin-left: auto; }
.cells {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  padding-bottom: 12px;
  border-bottom: 6px solid color-mix(in srgb, var(--zc) 35%, var(--surface-2));
  border-radius: 0 0 4px 4px;
}
.cell {
  position: relative; min-height: 104px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px; border-radius: 12px;
  background: color-mix(in srgb, var(--zc) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--zc) 28%, var(--line));
}
.cell.free { background: transparent; border: 1.5px dashed var(--line); }
.cell-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cell-code { font-size: 12px; font-weight: 800; letter-spacing: .02em; color: var(--zc); }
.cell-del {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  display: grid; place-items: center; background: var(--danger-soft); color: var(--danger);
}
.cell-del .ic { width: 16px; height: 16px; }
.cell-prod {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: none; border: none; padding: 0; text-align: left; width: 100%;
}
.cell-prod .seq { font-size: 13px; }
.cell-prod .name { font-weight: 650; font-size: 15px; line-height: 1.25; }
.cell-prod.secondary .name { font-weight: 500; color: var(--muted); font-size: 13px; }
.cell-add {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: none; border: none; color: var(--muted); font-size: 13px; font-weight: 600; border-radius: 8px;
}
.cell-add:hover { color: var(--accent); }

/* ---------- Listes de produits ---------- */
.list { padding: 4px; }
.row-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 11px 10px; text-align: left;
  background: none; border: none; border-radius: 12px;
  transition: background .12s;
}
.row-item:hover { background: var(--surface-2); }
.row-item + .row-item { box-shadow: 0 -1px 0 var(--line); }
.row-item:hover + .row-item, .row-item + .row-item:hover { box-shadow: none; }
.ri-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ri-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ri-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item > .ic { color: var(--muted); width: 18px; height: 18px; }

.seq {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums; font-weight: 800;
}
.seq-pill {
  min-width: 58px; padding: 5px 8px; border-radius: 9px; text-align: center; flex: none;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 15px;
}
.seq-pill.none { background: var(--warn-soft); color: var(--warn); }

.loc {
  flex: none; font-size: 13px; font-weight: 800; letter-spacing: .02em;
  padding: 4px 8px; border-radius: 8px;
  color: var(--zc); background: color-mix(in srgb, var(--zc) 14%, var(--surface));
}
.tag {
  flex: none; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px;
  background: var(--warn-soft); color: var(--warn);
}

/* Filtres */
.segmented {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 12px;
  background: var(--surface-2); border-radius: 12px; overflow-x: auto;
}
.segmented button {
  flex: 1; white-space: nowrap; border: none; background: none;
  padding: 8px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted);
}
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segmented b { font-weight: 700; opacity: .7; margin-left: 4px; }

/* ---------- Séquence ---------- */
.seq-panel { padding: 16px; margin-bottom: 16px; }
.seq-panel p { margin: 4px 0 14px; font-size: 14px; color: var(--muted); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.seq-zone { margin-bottom: 14px; overflow: hidden; }
.seq-zone-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px;
  background: color-mix(in srgb, var(--zc) 10%, var(--surface));
  border-bottom: 1px solid var(--line);
}
.seq-zone-head .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.seq-zone-head strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seq-zone-head span { font-size: 13px; color: var(--muted); }
.icon-row { display: flex; gap: 2px; }
.seq-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; background: none; border: none; text-align: left; }
.seq-row + .seq-row { border-top: 1px solid var(--line); }
.seq-row:hover { background: var(--surface-2); }
.seq-row .seq { font-size: 18px; min-width: 56px; color: var(--accent-strong); }
.seq-row.todo .seq { color: var(--warn); }
.seq-row.todo { background: color-mix(in srgb, var(--warn-soft) 55%, transparent); }
.seq-row .name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-row { padding: 16px; font-size: 14px; color: var(--muted); }

/* Recherche */
.found {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px; margin-bottom: 10px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.found-loc {
  flex: none; min-width: 74px; padding: 10px 8px; border-radius: 12px; text-align: center;
  background: var(--zc); color: #fff; font-weight: 800; font-size: 19px; letter-spacing: .02em;
}
.found-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.found-body strong { font-size: 17px; }
.found-body span { font-size: 13px; color: var(--muted); }

/* État vide */
.empty {
  text-align: center; padding: 40px 20px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty .ic { width: 44px; height: 44px; stroke-width: 1.5; opacity: .6; }
.empty strong { color: var(--text); font-size: 17px; }
.empty p { margin: 0 0 6px; max-width: 320px; font-size: 14px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font-weight: 650; font-size: 15px; white-space: nowrap;
  transition: background .15s, transform .1s, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.active { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.btn.block { width: 100%; }

.fab {
  position: fixed; z-index: 25; right: 16px; bottom: calc(80px + var(--safe-b));
  display: inline-flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 20px 0 16px; border-radius: 18px; border: none;
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform .12s;
}
.fab:active { transform: scale(.95); }
.fab .ic { width: 22px; height: 22px; stroke-width: 2.5; }

/* ---------- Panneau (dialog) ---------- */
.sheet {
  border: none; padding: 0; color: var(--text); background: var(--surface);
  width: 100%; max-width: 100%; max-height: 92dvh;
  margin: auto 0 0 0; border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg); overflow: auto; overscroll-behavior: contain;
}
.sheet[open] { animation: sheet-up .22s cubic-bezier(.2, .9, .3, 1); }
.sheet::backdrop { background: rgba(8, 12, 16, .45); backdrop-filter: blur(2px); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
#sheet-body { padding: 8px 18px calc(18px + var(--safe-b)); }
.sheet-grip { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.sheet-head h2 { flex: 1; font-size: 20px; letter-spacing: -.01em; }

/* Formulaires */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 6px; }
.field small { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2);
  font-size: 16px; outline: none; transition: border-color .15s, background .15s;
}
.field input:focus, .field select:focus { border-color: var(--accent); background: var(--surface); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.letter-input { text-transform: uppercase; font-weight: 800; text-align: center; font-size: 20px !important; }

.stepper { display: flex; align-items: stretch; }
.stepper button {
  width: 48px; flex: none; border: 1px solid var(--line); background: var(--surface);
  font-size: 22px; font-weight: 600; color: var(--accent);
}
.stepper button:first-child { border-radius: 12px 0 0 12px; }
.stepper button:last-child { border-radius: 0 12px 12px 0; }
.stepper input {
  border-radius: 0 !important; border-left: none !important; border-right: none !important;
  text-align: center; font-weight: 700; min-width: 0; -moz-appearance: textfield;
}
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.sec { border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; margin-bottom: 14px; }
.sec summary { padding: 12px 0; font-size: 14px; font-weight: 650; cursor: pointer; color: var(--muted); list-style: none; display: flex; justify-content: space-between; }
.sec summary::after { content: "+"; font-size: 18px; line-height: 1; }
.sec[open] summary::after { content: "−"; }
.chip-group { margin-bottom: 12px; }
.chip-group > span { display: block; font-size: 12px; font-weight: 700; color: var(--zc); margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 6px 10px; border-radius: 9px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; user-select: none;
}
.chip input:checked + span { background: var(--zc); border-color: var(--zc); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.form-actions .btn.primary { flex: 1; }
.info { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }

/* Toast */
.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(150px + var(--safe-b));
  transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); width: max-content;
  animation: toast-in .2s ease-out;
}
.toast.error { background: var(--danger); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

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

/* ---------- Connexion ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 380px; padding: 28px 22px 22px; }
.login .logo { margin-bottom: 22px; }
.login .banner { margin-bottom: 16px; }

/* ---------- Écrans plus larges ---------- */
@media (min-width: 560px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .zone-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 820px) {
  .appbar-inner {
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas: "logo tabs search out";
    padding: 12px 24px;
  }
  .top-tabs { display: flex; }
  .search { max-width: 360px; justify-self: end; width: 100%; }
  .bottombar { display: none; }
  .main { padding: 24px 24px 120px; }
  .fab { bottom: 28px; right: 28px; }
  .toast { bottom: 100px; }
  .zone-grid { grid-template-columns: repeat(3, 1fr); }
  .sheet { margin: auto; width: 520px; border-radius: 22px; max-height: 86vh; }
  .sheet-grip { display: none; }
  #sheet-body { padding: 20px 24px 24px; }
}
@media (max-width: 380px) {
  .logo-text small { display: none; }
  .cells { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Impression ---------- */
@media print {
  .appbar, .bottombar, .fab, .toast, .btn-row, .icon-row, .banner { display: none !important; }
  body { background: #fff; color: #000; }
  .main { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .seq-row.todo { background: none; }
}

/* ---------- Logo, compte ---------- */
.logo-img { width: 36px; height: 36px; flex: none; border-radius: 10px; box-shadow: 0 4px 12px rgba(15, 118, 110, .3); }
.login .logo-img { width: 44px; height: 44px; border-radius: 12px; }
.account-btn { grid-area: out; background: none; border: none; padding: 3px; border-radius: 99px; }
.avatar {
  --av: var(--accent);
  width: 36px; height: 36px; border-radius: 99px; flex: none;
  display: inline-grid; place-items: center;
  background: color-mix(in srgb, var(--av) 18%, var(--surface)); color: var(--av);
  font-weight: 800; font-size: 15px; text-transform: uppercase;
  border: 1.5px solid color-mix(in srgb, var(--av) 35%, transparent);
}
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.account-head strong { font-size: 18px; display: block; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong);
}
.badge.neutral { background: var(--surface-2); color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: none; }

/* ---------- Admin ---------- */
.version-card { padding: 16px; display: flex; gap: 14px; align-items: flex-start; }
.version-sha {
  flex: none; font-family: ui-monospace, "SF Mono", Consolas, monospace; font-weight: 800; font-size: 17px;
  padding: 10px 12px; border-radius: 12px; background: var(--accent); color: var(--accent-text);
  text-decoration: none;
}
.version-body { flex: 1; min-width: 0; }
.version-body strong { display: block; font-size: 16px; line-height: 1.3; }
.version-body .kv { margin-top: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

.health-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.health { padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.health .label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.health b { font-size: 20px; font-weight: 750; letter-spacing: -.01em; }
.health small { font-size: 12px; color: var(--muted); }
.health .bar { height: 6px; border-radius: 9px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.health .bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.health .bar i.warn { background: var(--warn); }
.health .bar i.bad { background: var(--danger); }
.dot { width: 9px; height: 9px; border-radius: 99px; background: #22c55e; display: inline-block; margin-right: 6px; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18); }
.dot.bad { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }

.user-row .avatar { width: 40px; height: 40px; }
.user-row .ri-title { display: flex; align-items: center; gap: 8px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; cursor: pointer; }
.switch span { font-weight: 600; }
.switch small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.switch input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 48px; height: 28px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer;
  transition: background .15s;
}
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 99px;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s;
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(20px); }
.pw-row { display: flex; gap: 8px; }
.pw-row input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; }
.skeleton { height: 90px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }

@media (min-width: 560px) { .health-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Restaurants ---------- */
.resto-btn {
  display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  margin-top: 2px; padding: 2px 8px 2px 5px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent-strong); border: none;
  font-size: 12px; font-weight: 700; letter-spacing: 0; max-width: 52vw;
}
.resto-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resto-btn .ic { width: 13px; height: 13px; stroke-width: 2.5; }
.resto-btn:disabled { cursor: default; opacity: 1; }
.resto-btn:not(:disabled):hover { filter: brightness(.96); }
.resto-ic {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong);
}
.avatar-wrap { position: relative; flex: none; display: inline-flex; }
.avatar-wrap .online {
  position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 99px;
  background: #22c55e; border: 2px solid var(--surface);
}
.dot.off { background: var(--muted); box-shadow: 0 0 0 4px var(--surface-2); }

/* ---------- WRIN, noms ---------- */
.wrin { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-weight: 600; }
.wrin.missing { color: var(--warn); font-family: inherit; }
.handle { font-size: 12px; font-weight: 500; margin-left: 6px; }

/* ---------- Historique ---------- */
.day { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 20px 4px 8px; }
.day:first-of-type { margin-top: 4px; }
.timeline { list-style: none; margin: 0 0 6px; padding: 6px 14px; }
.event { position: relative; display: flex; gap: 12px; padding: 10px 0; }
.event + .event { border-top: 1px solid var(--line); }
.ev-ic {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  color: var(--ev); background: color-mix(in srgb, var(--ev) 14%, var(--surface));
}
.ev-ic .ic { width: 17px; height: 17px; }
.ev-body { flex: 1; min-width: 0; }
.ev-body p { margin: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.ev-body time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bottombar button span { white-space: nowrap; }
@media (max-width: 380px) { .bottombar button { font-size: 11px; } }

/* ---------- Identifiant de connexion ---------- */
.login-preview {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px;
  padding: 10px 12px; margin: -4px 0 14px; border-radius: 12px; background: var(--surface-2);
}
.login-preview > span { font-size: 13px; font-weight: 650; color: var(--muted); }
.login-preview b { font-size: 15px; color: var(--accent-strong); overflow-wrap: anywhere; text-align: right; }
.login-preview b.changed { color: var(--warn); }
.login-preview small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* ---------- Application installée (écran d'accueil) ---------- */
/* Barre d'état transparente sur iPhone : on décale l'en-tête sous l'encoche. */
.appbar { padding-top: env(safe-area-inset-top, 0px); }
.appbar-inner { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
@media (display-mode: standalone) {
  body { overscroll-behavior-y: none; }
  .login { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
}
.install-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--accent-soft); margin-bottom: 4px; }
.install-card img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.install-card div { flex: 1; min-width: 0; font-size: 14px; }
.install-card strong { display: block; font-size: 15px; }
.ios-steps { margin: 10px 0 0; padding-left: 20px; font-size: 14px; }
.ios-steps li { margin: 4px 0; }
.ios-share { display: inline-block; vertical-align: -3px; width: 16px; height: 16px; }

/* ---------- Scanner de WRIN ---------- */
.search-scan {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-right: -6px;
  border: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong);
}
.search-scan .ic { color: inherit; width: 20px; height: 20px; }
.scan-btn { flex: none; }

.scanner {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: none;
  background: #000; color: #fff; overflow: hidden;
}
.scanner[open] { display: flex; flex-direction: column; }
.scanner::backdrop { background: #000; }
.scan-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; z-index: 2;
}
.scan-top strong { font-size: 17px; }
.scan-icon {
  width: 44px; height: 44px; border-radius: 99px; border: none; display: grid; place-items: center;
  background: rgba(255, 255, 255, .14); color: #fff;
}
.scan-view { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.scan-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame {
  position: absolute; left: 8%; right: 8%; top: 38%; height: 20%;
  border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .55);
}
.scan-frame i { position: absolute; width: 26px; height: 26px; border: 4px solid #2dd4bf; }
.scan-frame i:nth-child(1) { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.scan-frame i:nth-child(2) { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.scan-frame i:nth-child(3) { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.scan-frame i:nth-child(4) { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.scan-line {
  position: absolute; left: 6%; right: 6%; height: 2px; top: 50%;
  background: linear-gradient(90deg, transparent, #2dd4bf, transparent); animation: scanline 1.6s ease-in-out infinite;
}
@keyframes scanline { 0%, 100% { transform: translateY(-28px); opacity: .4; } 50% { transform: translateY(28px); opacity: 1; } }
.scan-hint { position: absolute; left: 16px; right: 16px; top: calc(58% + 14px); margin: 0; text-align: center; font-size: 14px; color: rgba(255,255,255,.85); }
.scan-hint .mono { opacity: .7; font-size: 13px; }
.scan-bottom { padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: #0b0f12; display: flex; flex-direction: column; gap: 10px; }
.scan-status { font-size: 14px; color: rgba(255,255,255,.75); text-align: center; min-height: 20px; }
.scan-status.ok { color: #5eead4; font-weight: 700; }
.scan-status.error { color: #fca5a5; }
.scan-result {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 10px; border-radius: 12px; background: rgba(45, 212, 191, .14); font-size: 20px; font-weight: 800;
}
.scan-result b { color: #5eead4; font-size: 15px; }
.scan-manual { display: flex; gap: 8px; }
.scan-manual input {
  flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border-radius: 12px; font-size: 16px;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff;
}
.scan-manual .btn { background: #2dd4bf; color: #032b27; border: none; }

/* ---------- Import ---------- */
#import-text { min-height: 150px; font-size: 14px; resize: vertical; }
.import-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.pill { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.pill.create { background: var(--accent-soft); color: var(--accent-strong); }
.pill.update { background: color-mix(in srgb, #3b82f6 16%, var(--surface)); color: #3b82f6; }
.pill.error { background: var(--danger-soft); color: var(--danger); }
.import-list { max-height: 42vh; overflow: auto; padding: 4px; }
.import-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; }
.import-row + .import-row { border-top: 1px solid var(--line); }
.import-row .ln { width: 28px; flex: none; font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.import-row .st { flex: none; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 3px 7px; border-radius: 6px; }
.import-row.create .st { background: var(--accent-soft); color: var(--accent-strong); }
.import-row.update .st { background: color-mix(in srgb, #3b82f6 16%, var(--surface)); color: #3b82f6; }
.import-row.same .st { background: var(--surface-2); color: var(--muted); }
.import-row.error .st { background: var(--danger-soft); color: var(--danger); }
.import-row.error .ri-sub { color: var(--danger); }

/* ---------- Campagne ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: 13px; }
.label { font-size: 13px; font-weight: 700; margin: 14px 0 8px; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-strong); }
.linklike { background: none; border: none; padding: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

.camp-top { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.camp-title { flex: 1; min-width: 0; font-size: 20px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.camp-select { flex: 1; min-width: 0; }
.camp-select select { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 16px; }
.camp-tabs { overflow: hidden; }
.camp-tabs button { padding: 8px 4px; font-size: 14px; min-width: 0; }
.segmented { scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }

.camp-hero { padding: 18px; margin-bottom: 14px; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); }
.camp-hero-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.camp-hero h1 { font-size: 24px; letter-spacing: -.02em; }
.camp-hero .muted { margin: 4px 0 0; font-size: 14px; }
.countdown { text-align: right; flex: none; }
.countdown b { display: block; font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--accent-strong); }
.countdown span { font-size: 12px; color: var(--muted); }
.bar.big { height: 9px; border-radius: 9px; background: var(--surface-2); overflow: hidden; margin: 16px 0 6px; }
.bar.big i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.del-chip { font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 9px; background: var(--surface-2); }
.del-chip.next { background: var(--accent); color: var(--accent-text); }
.del-chip.last { background: var(--text); color: var(--bg); }
.del-chip.next.last { background: var(--accent); color: var(--accent-text); }

.camp-stats { margin-bottom: 4px; }
.stat small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.stat.tone-bad { background: var(--danger-soft); border-color: transparent; }
.stat.tone-bad b, .stat.tone-bad span, .stat.tone-bad small { color: var(--danger); }
.stat.tone-warn { background: var(--warn-soft); border-color: transparent; }
.stat.tone-warn b, .stat.tone-warn span, .stat.tone-warn small { color: var(--warn); }

.camp-row .ri-title { display: flex; align-items: center; gap: 8px; }
.camp-row .ri-title .loc { font-size: 11px; padding: 2px 6px; }
.st-pill { flex: none; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.st-pill.bad { background: var(--danger-soft); color: var(--danger); }
.st-pill.warn { background: var(--warn-soft); color: var(--warn); }
.st-pill.good { background: var(--accent-soft); color: var(--accent-strong); }
.st-pill.info { background: color-mix(in srgb, #3b82f6 16%, var(--surface)); color: #3b82f6; }
.st-pill.neutral { background: var(--surface-2); color: var(--muted); }

/* Commande */
.order-list { padding: 4px 14px; }
.order-row { padding: 14px 0; }
.order-row + .order-row { border-top: 1px solid var(--line); }
.order-row.blocked { opacity: .75; }
.order-head { display: flex; align-items: center; gap: 12px; }
.cartons-input { display: flex; flex-direction: column; align-items: center; flex: none; }
.cartons-input input {
  width: 74px; min-height: 48px; text-align: center; font-size: 22px; font-weight: 800;
  border: 1.5px solid var(--accent); border-radius: 12px; background: var(--surface); color: var(--text);
}
.cartons-input input:disabled { border-color: var(--line); color: var(--muted); }
.cartons-input small { font-size: 11px; color: var(--muted); }
.order-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 0; }
.order-grid div { background: var(--surface-2); border-radius: 10px; padding: 7px 8px; min-width: 0; }
.order-grid dt { font-size: 11px; color: var(--muted); line-height: 1.2; }
.order-grid dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.order-grid dd small { font-weight: 500; color: var(--muted); font-size: 11px; }
.flag { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; font-weight: 700; }
.flag .ic { width: 16px; height: 16px; }
.flag.bad { color: var(--danger); }
.flag.warn { color: var(--warn); }
.flag.good { color: var(--accent-strong); }
.round-choice { border: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.round-choice legend { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.round-choice label { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.round-choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.round-choice input { margin: 2px 0 0; width: 18px; height: 18px; accent-color: var(--accent); }
.round-choice small { display: block; font-size: 12px; color: var(--muted); }
.order-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px; margin: 12px 0; }
.order-total p { margin: 0; font-size: 16px; }
.safety-card { padding: 14px; margin: 12px 0 8px; }
.safety-card h3 { margin-bottom: 8px; }
.safety-row { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 9px; font-size: 14px; }
.safety-row.now { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.safety-row.last { background: var(--text); color: var(--bg); font-weight: 700; }

/* Projection */
.proj-card { padding: 16px; margin-bottom: 12px; }
.proj-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.k-count, .bar-col.today i { background: var(--text); }
.k-plan, .bar-col.delivery i { background: color-mix(in srgb, var(--accent) 55%, var(--surface-2)); }
.k-end, .bar-col.end i { background: var(--warn); }
.bars { display: flex; align-items: stretch; gap: 4px; height: 230px; padding-bottom: 2px; border-bottom: 2px solid var(--text); overflow-x: auto; scrollbar-width: thin; }
.bar-col { flex: 1 0 30px; display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; gap: 3px; min-width: 30px; }
.bar-col .v { font-size: 10px; }
.bar-col i { align-self: end; width: 100%; max-width: 44px; border-radius: 6px 6px 0 0; }
.bar-col .v { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-col .d { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bar-col .c { font-size: 10px; font-weight: 700; color: var(--accent-strong); min-height: 13px; }
.bar-col.end .v { color: var(--warn); }
.proj-actions { padding: 14px; margin: 12px 0; }

/* Saisie */
.count-list { padding: 4px 12px; }
.count-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; }
.count-row + .count-row { border-top: 1px solid var(--line); }
.count-inputs { display: flex; gap: 6px; flex: none; }
.count-inputs label { display: flex; flex-direction: column; align-items: center; }
.count-inputs input {
  width: 82px; min-height: 46px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); font-size: 17px; font-weight: 700; text-align: right; color: var(--text);
}
.count-inputs .delivered input { width: 62px; font-size: 15px; font-weight: 600; }
.count-inputs input:focus { border-color: var(--accent); background: var(--surface); outline: none; }
.count-inputs small { font-size: 11px; color: var(--muted); }
.count-foot { padding: 12px 0 8px; border-top: 1px solid var(--line); }
.count-foot p { margin: 0 0 10px; }
.week-chips .chip span { min-width: 40px; text-align: center; }
.grid2 > * { min-width: 0; }
.field input[type="date"] { min-width: 0; width: 100%; -webkit-appearance: none; appearance: none; }
#sheet-body { overflow-x: hidden; }

@media (max-width: 480px) {
  .order-grid { grid-template-columns: repeat(2, 1fr); }
  .round-choice { grid-template-columns: 1fr; }
  .countdown b { font-size: 34px; }
  .camp-hero h1 { font-size: 21px; }
  .count-row { flex-wrap: wrap; }
  .count-row .ri-main { flex: 1 1 140px; }
}
