/* Rega client app — one design system (Avner 24.10: «הנראות ברמה נמוכה», «תוריד כל סממן לזה שזה נבנה ב-AI»).
   Calm and editorial: paper and ink, the brand's red dot only where something waits for the client, real states in
   plain words, no emoji, no gradients, no glow. Tokens first; every component below reads them, light and dark. */
@font-face {
  font-family: "Rubik";
  src: url("/static/Rubik-Variable.ttf") format("truetype");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F5F3EE;
  --surface: #FFFFFF;
  --surface-2: #EEEBE4;
  --ink: #17161A;
  --ink-2: #45423C;
  --muted: #69655D;
  --line: #E2DDD2;
  --line-strong: #CBC4B5;
  --accent: #D92D20;            /* the dot in the icon: «this waits for you» */
  --accent-ink: #FFFFFF;
  --danger: #B42318; --on-danger: #FFFFFF;
  /* the four package groups (core/views.py GROUP_OF): text + tint */
  --you: #B42318;   --you-bg: #FCEBE9;
  --way: #2A5594;   --way-bg: #E7EDF7;
  --pub: #17703D;   --pub-bg: #E3F2E8;
  --del: #57534C;   --del-bg: #ECE9E2;
  --warn-ink: #7A5200; --warn-bg: #FBF1D9;
  --ok: #17703D;
  --soft: var(--surface-2);     /* the old name, still read by a few rules */
  --card: var(--surface);
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --tabs-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --surface: #1B1A18;
    --surface-2: #262420;
    --ink: #F2EFE8;
    --ink-2: #CFCAC0;
    --muted: #A29D92;
    --line: #2E2C28;
    --line-strong: #46433D;
    --accent: #FF5B4F;
    --accent-ink: #1A0503;
    --danger: #FF8A80; --on-danger: #2A0806;
    --you: #FF9A90;   --you-bg: #3A1D1A;
    --way: #A8C1F0;   --way-bg: #1C2638;
    --pub: #86D7A4;   --pub-bg: #16291D;
    --del: #CFCAC0;   --del-bg: #26241F;
    --warn-ink: #F3D58F; --warn-bg: #362C14;
    --ok: #86D7A4;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 16px);
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------------------------------------------------------------- icons (app.js icon(): one stroke, one size) */
.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75;
      stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; }
.ic.sm { width: 16px; height: 16px; }
.ic.lg { width: 24px; height: 24px; }

/* ---------------------------------------------------------------- shell */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand img { border-radius: 7px; }
.who { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }

main { max-width: 560px; margin: 0 auto; padding: 4px 16px; outline: none; }

/* ---------------------------------------------------------------- type */
h1 { font-size: 26px; line-height: 1.2; margin: 12px 0 18px; font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: 18px; line-height: 1.3; margin: 28px 0 10px; font-weight: 600; }
h3 { font-size: 17px; line-height: 1.35; font-weight: 600; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.5; }
.lead { font-size: 17px; color: var(--ink-2); margin-bottom: 18px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .01em; margin: 0 2px 8px; }
.count, .num { font-variant-numeric: tabular-nums; }
.warn-text { color: var(--danger); font-weight: 600; }

/* a section: a small title above its card (settings, help, the packages groups) */
.section { margin-top: 28px; }
.section:first-of-type { margin-top: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 8px; }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.section-head .num { color: var(--muted); font-size: 14px; }
.more-group + .more-group, .more-group + .btn { margin-top: 24px; }
.more-title { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 4px 8px; }

/* ---------------------------------------------------------------- surfaces */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  margin: 0 0 12px;
}
a.card { display: block; color: inherit; text-decoration: none; }
.card h3 { margin: 0 0 6px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack > * + * { margin-top: 10px; }
.stack > .btns.col { margin-top: 12px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .btn { margin-top: 14px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

/* ---------------------------------------------------------------- buttons: primary (ink), default (outlined), quiet */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px;
  border-radius: var(--r); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; font-weight: 500; font-size: 16px; line-height: 1.25;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), opacity .15s;
  -webkit-tap-highlight-color: transparent; text-align: center;
}
.btn:active { background: var(--surface-2); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.btn.primary:active { opacity: .85; }
.btn.accent { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.btn.quiet { background: transparent; border-color: transparent; padding-inline: 8px; color: var(--ink-2); }
.btn.danger { background: var(--danger); color: var(--on-danger); border-color: var(--danger); font-weight: 600; }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn:disabled, .btn.disabled { opacity: .45; cursor: default; pointer-events: none; }
.btn.busy, .chip.busy, .choice.busy, .link-btn.busy { opacity: .6; pointer-events: none; position: relative; }
.btn.busy::after, .chip.busy::after, .choice.busy::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-inline-start: 8px; vertical-align: -2px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btns.tight { margin: 0; flex-wrap: nowrap; flex: none; }
.btns.tight .btn, .btns.tight .chip { min-width: 44px; padding-inline: 12px; }
.btns.spread { justify-content: space-between; align-items: center; }
/* the package screen (owner 24.10): one full-width row each, in one line of sight */
.btns.col { flex-direction: column; flex-wrap: nowrap; gap: 8px; align-items: stretch; margin-top: 12px; }
.btns.col .btn { width: 100%; }
/* two equal secondary actions side by side */
.btns.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btns.pair .btn { width: 100%; padding-inline: 8px; }
.link-btn { background: none; border: 0; padding: 6px 2px; min-height: 32px; cursor: pointer; color: var(--ink);
            font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.edit-btn { background: none; border: 0; padding: 6px 4px; min-height: 32px; cursor: pointer; color: var(--ink-2);
            display: inline-flex; align-items: center; vertical-align: middle; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; color: var(--ink-2); text-decoration: none;
        font-size: 15px; margin-top: 4px; }

/* ---------------------------------------------------------------- chips: square-cornered, a choice among few */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 8px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; text-align: start; line-height: 1.3;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip:disabled { opacity: .45; cursor: default; }
a.chip { text-decoration: none; }
.chip .muted { color: inherit; opacity: .75; }
.seg { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.seg .chip { flex: none; white-space: nowrap; }
/* an icon toggle (music, styles): 44px, outlined, filled when on */
.chip.icon-only { width: 44px; min-height: 44px; padding: 0; justify-content: center; }

/* one choice out of a few (delivery, involvement) */
.choice { display: block; width: 100%; text-align: start; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line-strong);
          background: var(--surface); cursor: pointer; }
.choice[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice:disabled { opacity: .5; cursor: default; }

/* ---------------------------------------------------------------- forms */
textarea, input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="url"],
input[type="datetime-local"], select {
  width: 100%; padding: 12px; border-radius: var(--r);
  border: 1px solid var(--line-strong); background: var(--surface); min-height: 44px;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
label.field { display: block; margin: 14px 0 6px; font-weight: 500; }
label.check { display: flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- toggles */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0;
          border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.toggle > :first-child { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px;
                      border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: .15s var(--ease); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { right: 23px; }
.switch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------------------------------------------------------------- list rows: one tap target each, a chevron */
.list { padding: 0 16px; }
.list .item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0;
              border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 56px; }
.list .item:last-child { border-bottom: 0; }
.list a.item::after { content: ""; width: 8px; height: 8px; flex: none; border-left: 1.75px solid var(--muted);
                      border-bottom: 1.75px solid var(--muted); transform: rotate(45deg); margin-inline-end: 4px; }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 500; overflow-wrap: anywhere; }
.item-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.item-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--surface-2); color: var(--ink-2);
           display: flex; align-items: center; justify-content: center; }
/* the packages list (24.10): a picture, the title, one state */
.pkg-row .tile { width: 52px; height: 52px; flex: none; border-radius: 10px; background: var(--surface-2); color: var(--muted);
                 display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pkg-row .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pkg-row .item-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }

/* ---------------------------------------------------------------- the state badge: one per package, in words */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; font-size: 13px;
         font-weight: 600; line-height: 1.6; background: var(--del-bg); color: var(--del); white-space: nowrap; max-width: 100%;
         overflow: hidden; text-overflow: ellipsis; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.g-needs_you .badge, .badge.g-needs_you { background: var(--you-bg); color: var(--you); }
.g-on_the_way .badge, .badge.g-on_the_way { background: var(--way-bg); color: var(--way); }
.g-published .badge, .badge.g-published { background: var(--pub-bg); color: var(--pub); }
.g-delivered .badge, .badge.g-delivered { background: var(--del-bg); color: var(--del); }
.status { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }

/* the package screen's state, first thing on it: what is true now and the one next step */
.state-card { border-radius: var(--r-lg); padding: 16px; margin: 0 0 16px; border: 1px solid var(--line); background: var(--surface); }
.state-card .state-title { font-size: 19px; font-weight: 700; line-height: 1.3; display: flex; align-items: center; gap: 10px; }
.state-card .state-title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.state-card p { margin: 6px 0 0; color: var(--ink-2); }
.state-card .btns { margin-top: 14px; }
.state-card.g-needs_you { background: var(--you-bg); border-color: transparent; }
.state-card.g-needs_you .state-title { color: var(--you); }
.state-card.g-on_the_way { background: var(--way-bg); border-color: transparent; }
.state-card.g-on_the_way .state-title { color: var(--way); }
.state-card.g-published { background: var(--pub-bg); border-color: transparent; }
.state-card.g-published .state-title { color: var(--pub); }
.state-card.g-delivered .state-title { color: var(--del); }
.state-card .lines { margin-top: 10px; padding: 0; list-style: none; }
.state-card .lines li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; font-size: 15px; }
.state-card .lines .ic { margin-top: 2px; }

/* home: the counts by group, a tap opens the list there */
.counts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0 0 12px; }
.count-tile { display: block; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
              text-decoration: none; color: inherit; }
.count-tile .n { font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.count-tile .l { font-size: 14px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.count-tile .l::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--del); flex: none; }
.count-tile.g-needs_you .l::before { background: var(--you); }
.count-tile.g-on_the_way .l::before { background: var(--way); }
.count-tile.g-published .l::before { background: var(--pub); }
.count-tile.zero { opacity: .6; }
.count-tile.g-needs_you:not(.zero) { border-color: var(--you); }

/* the one thing to do now (home) */
.focus { padding: 18px 16px; }
.focus .focus-title { font-size: 19px; font-weight: 700; line-height: 1.3; margin: 0 0 4px; }
.focus p { color: var(--ink-2); }
.focus .btns { margin-top: 14px; }

/* ---------------------------------------------------------------- notices */
.warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--r); padding: 12px 14px; margin: 0 0 12px; }
.warn ul { margin: 6px 0 0; padding-inline-start: 18px; }
.warn strong { display: block; }
.info { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; line-height: 1.5; }
.info-btn { width: 26px; height: 26px; min-width: 26px; border-radius: 50%; border: 1.5px solid var(--muted); background: transparent;
            color: var(--muted); font: 600 13px/1 "Rubik", system-ui, sans-serif; cursor: pointer; padding: 0; position: relative; }
.info-btn::before { content: ""; position: absolute; inset: -9px; }  /* a 44px target around the small circle */
.info-btn[aria-expanded="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.combo { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; margin: 14px 0 0; line-height: 1.5; }

/* ---------------------------------------------------------------- progress */
.bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 8px 0 4px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .3s var(--ease); }
/* «קיבלנו · מתכננים · עורכים · בדיקת איכות · מוכן» (owner 14.10): a quiet stepper */
.stages { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; list-style: none; padding: 0; margin: 10px 0 4px; font-size: 12.5px; }
.stages li { color: var(--muted); padding-top: 8px; border-top: 3px solid var(--line); line-height: 1.3; }
.stages li.done { border-top-color: var(--ink-2); color: var(--ink-2); }
.stages li.now { border-top-color: var(--way); color: var(--ink); font-weight: 600; }
.next-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.next-item > :first-child { flex: 1 1 200px; min-width: 0; }
.next-item + .next-item { border-top: 1px solid var(--line); }
.next-item .btns { margin-top: 0; }

/* ---------------------------------------------------------------- media */
.media { width: 100%; max-height: 70vh; border-radius: var(--r); background: #000; display: block; }
.media + .media { margin-top: 8px; }
.caption { white-space: pre-wrap; background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; unicode-bidi: plaintext; min-width: 0; }
.files { list-style: none; padding: 0; margin: 8px 0 0; }
.files li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0;
            border-bottom: 1px solid var(--line); font-size: 15px; }
.files li.out { color: var(--muted); text-decoration: line-through; }
.files li:last-child { border-bottom: 0; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-items: center; }
.thumbs img, .thumbs video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.thumbs .out { opacity: .35; }
.thumbs .more { text-align: center; color: var(--muted); }
.media + .stack { margin-top: 12px; }

/* the package screen: one card per item */
.item-card { padding: 0; overflow: hidden; }
.item-card > .item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 10px; }
.item-card > .item-head h3 { margin: 0; font-size: 16px; }
.item-card > .item-head .muted { font-size: 13px; }
.item-card > .item-body { padding: 0 16px 16px; }
.item-card > .item-body > * + * { margin-top: 12px; }
.item-card .media { border-radius: var(--r); }
.meta-line { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2); font-size: 15px; }
.meta-line .ic { margin-top: 2px; color: var(--muted); }
.verdict { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.verdict.ok { color: var(--pub); }
.verdict.change { color: var(--way); }
.sub-block { border-top: 1px solid var(--line); padding-top: 12px; }
.pkg-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pkg-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pkg-tile video, .pkg-tile img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: #000; display: block; }
.pkg-tile .btn { text-align: center; padding-inline: 6px; }

/* folds (details) */
details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 500; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: ""; width: 7px; height: 7px; margin-inline-start: auto; border-right: 1.75px solid var(--muted);
  border-bottom: 1.75px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .15s var(--ease); }
details[open] > summary::after { transform: rotate(-135deg); }
.fold > summary { justify-content: space-between; gap: 12px; }
.fold-val { margin-inline-start: auto; text-align: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.fold > summary .fold-val + * { display: none; }
.fold-body { margin-top: 8px; }
.fold > summary::after { margin-inline-start: 0; }

/* sheets: an in-page dialog from the bottom */
.sheet-back { position: fixed; inset: 0; z-index: 70; background: rgba(10, 10, 10, .5); display: flex; align-items: flex-end;
  justify-content: center; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.del-sheet { width: 100%; max-width: 520px; margin: 0; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); border-radius: 20px; padding: 20px; }
.del-sheet h3 { margin: 0; font-size: 19px; }
.install-sheet { position: fixed; z-index: 60; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top));
  max-width: 520px; margin: 0 auto; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }

.toast {
  position: fixed; inset-inline: 16px; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 12px);
  max-width: 528px; margin: 0 auto; padding: 12px 16px; border-radius: var(--r);
  background: var(--ink); color: var(--bg); opacity: 0; transform: translateY(8px); transition: .2s var(--ease);
  pointer-events: none; z-index: 80; font-size: 15px;
}
.toast.on { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- the tab bar: five, icon over a word */
.tabs {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 5; transform: translateZ(0); -webkit-transform: translateZ(0);
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabs-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative;
          text-decoration: none; font-size: 11.5px; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.tabs a .ic { width: 23px; height: 23px; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabs a[aria-current="page"] .ic { stroke-width: 2.1; }
.tabs a .dot { position: absolute; top: 9px; inset-inline-start: calc(50% + 6px); width: 8px; height: 8px; border-radius: 50%;
               background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.tabs.hidden { display: none; }
body.kbd .tabs { display: none; }  /* the keyboard is up (app.js typingIn): no bar left mid-screen on iPhone */

/* ---------------------------------------------------------------- misc kept from before */
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
body.doc { padding-bottom: 32px; }
body.doc main { padding-top: 16px; }
body.doc li { margin-bottom: 6px; }
.gsi { min-height: 44px; display: flex; justify-content: center; margin: 8px 0; }
.prompt { white-space: pre-wrap; }
.steps { padding-inline-start: 20px; margin: 0; }
.steps li { margin-bottom: 8px; }
.guide { white-space: pre-wrap; }
ol.numbered { padding: 0; margin: 0; list-style: none; counter-reset: n; }
ol.numbered > li { counter-increment: n; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 8px 0; }
ol.numbered > li::before { content: counter(n); width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2);
                           color: var(--ink-2); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.step { padding-inline-start: 10px; border-inline-start: 3px solid var(--line); }
.step-off { opacity: .45; }
.step-q { font-weight: 600; margin-top: 16px; }
.card > h3 + .step-q { margin-top: 4px; }
.contact > summary { justify-content: center; font-size: 17px; font-weight: 600; padding: 10px 0; }

/* the client summary in the operator's card (owner 13.10: rows, readable) */
table.kv { width: 100%; border-collapse: collapse; font-size: 15px; }
table.kv th { text-align: start; font-weight: 500; color: var(--muted); padding: 6px 0 6px 12px; white-space: nowrap; vertical-align: top; width: 1%; }
table.kv td { padding: 6px 0; vertical-align: top; }
table.kv tr + tr th, table.kv tr + tr td { border-top: 1px solid var(--line); }

/* the styles gallery (14.10, fx.py): one card per style, a short looping sample; 2 columns on a wide screen */
main.wide { max-width: 960px; }
.gallery { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .gallery { grid-template-columns: 1fr 1fr; } }
.gallery .card { margin: 0; display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 120px; }
.gallery .sample { width: min(100%, 300px); aspect-ratio: 9 / 16; margin: 0 auto; border-radius: var(--r); overflow: hidden;
                   background: var(--surface-2); }
.gallery .sample video, .gallery .sample img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .sound { display: flex; align-items: center; justify-content: center; color: var(--muted); aspect-ratio: auto; min-height: 120px; }
.gallery .when { font-size: 14px; }
.gallery .when b { font-weight: 600; }
.gallery .card:target, .gallery .card.focus { box-shadow: 0 0 0 2px var(--ink); }

/* «פתיחה כלקוח»: the operator sees a client's app — always marked, read only */
.viewas { position: fixed; top: 0; inset-inline: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
          gap: 4px 12px; padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; background: var(--warn-bg); color: var(--warn-ink);
          font-size: 14px; text-align: center; border-bottom: 1px solid var(--line); }
.viewas button { min-height: 36px; padding: 4px 14px; border-radius: var(--r-sm); border: 1px solid currentColor; background: transparent;
                 color: inherit; font-weight: 600; cursor: pointer; }
body.viewing .top { position: static; padding-top: 10px; }
.field-block + .field-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

/* «הגדרות»: one row per publishing target with an (i) */
.target { padding: 12px 0; border-bottom: 1px solid var(--line); }
.target:last-child { border-bottom: 0; }
.target-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.target-title { display: flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; }
.target-state { margin-top: 4px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.target > .info, .target > .stack, .target > .warn { margin-top: 10px; }
.code-big { font-size: 34px; font-weight: 800; letter-spacing: 4px; text-align: center; user-select: all; -webkit-user-select: all;
            background: var(--surface-2); border-radius: var(--r); padding: 10px 0; }

/* the package's files: until when they are kept here */
.keep-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.keep .btns { margin-top: 0; }

/* the upload screen */
.pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
        min-height: 150px; padding: 20px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
        background: var(--surface); cursor: pointer; color: var(--ink); }
.pick .ic { width: 30px; height: 30px; stroke-width: 1.6; }
.pick strong { font-size: 18px; }
.pick span { color: var(--muted); font-size: 14px; }
.pick:active { background: var(--surface-2); }
.up-row { display: flex; gap: 12px; align-items: center; }
.up-body { flex: 1; min-width: 0; }
.thumb { width: 52px; height: 52px; flex: none; border-radius: 10px; object-fit: cover; background: var(--surface-2); display: block; }
.up-summary { font-weight: 600; margin: 16px 0 6px; }
.up-summary:empty { display: none; }

/* U12 «כתוביות»: one input per burned line; a line the client changed is marked */
.caps-lines { display: flex; flex-direction: column; gap: 6px; }
.caps-lines input { margin: 0; }
.caps-lines input.changed { border-color: var(--way); box-shadow: inset 0 0 0 1px var(--way); }

/* help: about lines */
.about { color: var(--muted); font-size: 14px; text-align: center; margin: 28px 0 8px; }
.about a { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 11.10: nothing wider than the phone (music titles, chips) */
/* owner 14.10: overflow hidden on html AND body makes iOS scroll the body, and a fixed bar then moves with it. clip
   cuts the sideways overflow without making a scroll box. */
html, body { overflow-x: clip; }

/* owner 14.10 + 20.10: in the iPhone app the fixed bottom bar drifted mid-screen. The app is one column of the screen's
   height: the header, <main> scrolls, the bar is the last row. Nothing is fixed, so nothing can drift. Pages with
   body.doc (privacy, terms) scroll as before. */
html { height: 100%; }
body:not(.doc) { display: flex; flex-direction: column; height: 100%; height: 100dvh; padding-bottom: 0; overflow: hidden; }
body:not(.doc) > .top { position: relative; flex: none; }
body:not(.doc) > main { flex: 1 1 auto; min-height: 0; width: 100%; max-width: none; overflow-y: auto;
  overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch;
  padding: 4px max(16px, calc((100% - 528px) / 2)) 32px; }
body:not(.doc) > main.wide { padding-inline: max(16px, calc((100% - 928px) / 2)); }
body:not(.doc) > .tabs { position: relative; flex: none; transform: none; -webkit-transform: none; }
.list button.item-btn { width: 100%; background: none; border: 0; border-radius: 0; cursor: pointer; text-align: start; font: inherit; color: inherit; }
/* settings: the rarely-changed folds as rows of one card, not a stack of cards */
.card.folds { padding: 0 16px; }
.card.folds > .fold { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; padding: 6px 0; }
.card.folds > .fold:last-child { border-bottom: 0; }
.card.folds > .fold[open] { padding-bottom: 14px; }
.contact > summary::after { margin-inline-start: 0; }
/* 24.10 «אפליקציה שתהיה אפליקציה» (thin channel): no web-page feel — no grey tap flash, no double-tap zoom delay, no
   text pick on controls, no iOS long-press callout on the tabs, no font inflation on rotate. */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, .tabs a, .choice, .chip, summary { touch-action: manipulation; }
.tabs a, .btn, button, .chip, .choice { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.offline { position: fixed; z-index: 70; inset-inline: 12px; top: calc(8px + env(safe-area-inset-top)); padding: 10px 14px;
           border-radius: var(--r); background: var(--ink); color: var(--bg); font-size: 14px; text-align: center; }
.pending-bar { position: fixed; z-index: 65; inset-inline: 12px; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 12px);
               display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r); background: var(--ink);
               color: var(--bg); font-size: 14px; }
.pending-bar span { flex: 1; }
.pending-bar button { background: none; border: 0; color: inherit; padding: 8px; min-width: 44px; min-height: 44px; display: flex;
                      align-items: center; justify-content: center; cursor: pointer; }
.stack > .btns.tight { margin-top: 10px; }

/* 24.10 (Avner's iPhone, a stuck request between Wi-Fi and 5G): the screen's outline while it loads, a word in the
   header while it refreshes behind a kept copy, and a calm «אין חיבור» when there is nothing to show */
.top-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sync { border: 0; background: var(--surface-2); color: var(--ink-2); font: 500 12.5px/1 "Rubik", system-ui, sans-serif;
        padding: 6px 10px; border-radius: 999px; min-height: 28px; display: inline-flex; align-items: center; gap: 6px; }
.sync[hidden] { display: none; }
.sync::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sync.busy::before { animation: sync-pulse 1.2s ease-in-out infinite; }
.sync.stale { background: var(--warn-bg); color: var(--warn-ink); cursor: pointer; }
.sync.update { background: var(--way-bg); color: var(--way); cursor: pointer; }
@keyframes sync-pulse { 50% { opacity: .25; } }
.skeleton { padding-top: 12px; }
.sk { background: var(--surface-2); border-radius: var(--r-lg); margin-bottom: 12px; animation: sk-pulse 1.4s ease-in-out infinite; }
.sk-title { height: 30px; width: 55%; border-radius: var(--r-sm); margin: 0 0 22px auto; }
.sk-card { height: 132px; }
.sk-card.short { height: 76px; }
@keyframes sk-pulse { 50% { opacity: .55; } }
.slow-line { text-align: center; min-height: 1.5em; }
.offline-card { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 24px; }
.offline-card .ic { color: var(--muted); }
.offline-card p { color: var(--ink-2); margin: 0; }
.offline-card .focus-title { color: var(--ink); }

/* «פרסום» on the package (24.10): one time for the whole package, on the publishing clock */
.when-row { display: flex; align-items: center; gap: 12px; }
.when-row .item-title { font-size: 17px; font-weight: 600; }
.when-row .btn.quiet { flex: none; }
.time-picker { border-top: 1px solid var(--line); padding-top: 12px; }
.time-picker label.field { margin-top: 0; }
/* the packages list: one group at a time from a home tile, chips to switch (24.10) */
.group-seg { margin: -6px 0 6px; }
.group-seg .chip { gap: 8px; }
.group-seg .chip .num { font-size: 13px; }
.group-seg .chip[aria-pressed="true"] .num { color: inherit; opacity: .7; }
a.count-tile:active { background: var(--surface-2); }
/* settings «איך עובדים» (24.10): each step's three choices in one row, an (i) with what each one does */
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg3 .chip { justify-content: center; text-align: center; min-height: 48px; padding: 8px 6px; font-size: 14.5px; line-height: 1.25; }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.info-list { margin: 0; }
.info-list dt { font-weight: 600; margin-top: 8px; }
.info-list dt:first-child { margin-top: 0; }
.info-list dd { margin: 2px 0 0; }
.dim + .dim { margin-top: 14px; }
.cta-line > .toggle { padding-bottom: 0; }
/* «ככה זה ייראה» (24.10): the end card's frame, 9:16, the outline while it is made */
.preview-frame { display: block; width: min(100%, 260px); aspect-ratio: 9 / 16; margin: 0 auto; border-radius: var(--r); background: var(--surface-2); object-fit: cover; }
.preview-frame.sk { margin-bottom: 0; }
.center { text-align: center; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-strong); flex: none; }
.seg3 .chip:disabled { opacity: .55; }
[hidden] { display: none !important; }
.files li.up-pick .thumb { width: 40px; height: 40px; flex: none; }
.files li.up-pick .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* «הסגנון שלי» / «מה Rega עשתה כאן» (29.10): two choices side by side; the plan of a reel as a short quiet list */
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg2 .chip { justify-content: center; text-align: center; min-height: 48px; padding: 8px 6px; font-size: 14.5px; line-height: 1.25; }
.made { border-top: 1px solid var(--line); padding-top: 12px; }
.made-list { margin: 0; padding-inline-start: 18px; font-size: 14.5px; color: var(--ink-2); }
.made-list li + li { margin-top: 2px; }

.update-bar { position: fixed; z-index: 66; inset-inline: 12px; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 12px);
              display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px;
              border-radius: var(--r); background: var(--ink); color: var(--bg); font-size: 14px; }

/* 16.11: a signed-in client's home is the app at «/» (app.js inNewApp): here no tab bar, and a way back on top */
.to-new { display: none; }
body.in-new .to-new { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
body.in-new .who { display: none; }
body.in-new .tabs { display: none; }
