/* סמל חזק – design system (redesign 2026-11-21: tape and marker).
   Tokens first: every color comes from a variable, so light and dark mode are the same components.
   Dark mode: follows the phone ("auto"), or a choice saved in the settings sheet (data-theme on <html>, set by
   boot.js before first paint so there is no white flash). */

/* Rubik, self-hosted (SIL OFL). Hebrew and Latin subsets: a phone downloads only what the page uses. */
   boot.js before first paint so there is no white flash). */

/* Rubik, self-hosted (SIL OFL). Hebrew and Latin subsets: a phone downloads only what the page uses. */
@font-face { font-family: "Rubik"; font-style: normal; font-display: swap; font-weight: 400; src: url(/rubik-he-400.woff2) format("woff2"); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Rubik"; font-style: normal; font-display: swap; font-weight: 500; src: url(/rubik-he-500.woff2) format("woff2"); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Rubik"; font-style: normal; font-display: swap; font-weight: 600; src: url(/rubik-he-600.woff2) format("woff2"); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Rubik"; font-style: normal; font-display: swap; font-weight: 700; src: url(/rubik-he-700.woff2) format("woff2"); unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Rubik"; font-style: normal; font-display: swap; font-weight: 400; src: url(/rubik-la-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

/* World: olive, like the logo, with gear marked by masking tape and black marker. Olive carries the shell and the
   actions; one material colour (tape) only ever carries an item number or "you are here". State colours appear only
   where they mean something, always next to a word. Built for direct sun (contrast first) and for night (dark mode
   that does not glare). The olive of the shell is the logo's own background, so the logo sits in it seamlessly. */
:root {
  --bg: #f3f2ea;
  --surface: #ffffff;
  --sunk: #e9e8dd;
  --ink: #1b1f14;
  --muted: #545848;
  --line: #dbdacd;
  --line-strong: #c2c1ae;
  --tape: #e5d29c;
  --tape-ink: #1d1a10;
  --tape-edge: #cdb879;
  --olive: #5a5e40;
  --olive-deep: #464a30;
  --olive-ink: #f4f1e4;
  --act: #4a4f31;
  --act-ink: #f7f5ec;
  --brand: var(--olive);
  --brand-ink: var(--olive-ink);
  --accent: var(--act);
  --accent-ink: var(--act-ink);
  --accent-soft: var(--sunk);
  --focus: #1b1f14;
  --ok: #24642f;
  --ok-bg: #e6f0df;
  --ok-line: #b6d0aa;
  --warn: #8a4f00;
  --warn-bg: #faeed4;
  --warn-line: #e3c482;
  --bad: #ad3512;
  --bad-bg: #fae6dc;
  --neutral-bg: #ebeadf;
  --ring-track: #e2e1d4;
  --shadow: none;
  --shadow-lift: 0 2px 6px rgb(27 31 20 / .07), 0 18px 40px rgb(27 31 20 / .18);
  --backdrop: rgb(20 22 14 / .55);
  --radius: 14px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Rubik", "Assistant", "Heebo", "Segoe UI", "Arial Hebrew", Arial, system-ui, sans-serif;
  --nav-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11130d; --surface: #1a1d14; --sunk: #23261b; --ink: #ecebdf; --muted: #a9ab97; --line: #2d3023; --line-strong: #444835;
    --tape: #cdbb83; --tape-ink: #16140c; --tape-edge: #a8965f; --olive: #2b2f1e; --olive-deep: #22251a; --olive-ink: #ecebdf;
    --act: #b3bd85; --act-ink: #12140d; --focus: #ecebdf;
    --ok: #93d19a; --ok-bg: #18261a; --ok-line: #2d4a30; --warn: #f0c068; --warn-bg: #2b2311; --warn-line: #5a4719;
    --bad: #ff9a6c; --bad-bg: #33190f; --neutral-bg: #25281d; --ring-track: #2c2f22;
    --shadow-lift: 0 2px 6px rgb(0 0 0 / .4), 0 18px 44px rgb(0 0 0 / .55); --backdrop: rgb(0 0 0 / .66);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11130d; --surface: #1a1d14; --sunk: #23261b; --ink: #ecebdf; --muted: #a9ab97; --line: #2d3023; --line-strong: #444835;
  --tape: #cdbb83; --tape-ink: #16140c; --tape-edge: #a8965f; --olive: #2b2f1e; --olive-deep: #22251a; --olive-ink: #ecebdf;
  --act: #b3bd85; --act-ink: #12140d; --focus: #ecebdf;
  --ok: #93d19a; --ok-bg: #18261a; --ok-line: #2d4a30; --warn: #f0c068; --warn-bg: #2b2311; --warn-line: #5a4719;
  --bad: #ff9a6c; --bad-bg: #33190f; --neutral-bg: #25281d; --ring-track: #2c2f22;
  --shadow-lift: 0 2px 6px rgb(0 0 0 / .4), 0 18px 44px rgb(0 0 0 / .55); --backdrop: rgb(0 0 0 / .66);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; scroll-padding-bottom: calc(110px + env(safe-area-inset-bottom));
  accent-color: var(--ink); caret-color: var(--ink); scrollbar-color: var(--line-strong) transparent;
}
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  min-height: 100vh; min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  overscroll-behavior-y: contain;
}
body.has-nav { --nav-h: 74px; }
::selection { background: var(--tape); color: var(--tape-ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 20; padding: 10px 14px; border-radius: 10px;
  background: var(--act); color: var(--act-ink); font-weight: 600;
}
.skip:focus { top: calc(10px + env(safe-area-inset-top)); }

/* Top bar: the logo's own olive, so the logo sits in it with no visible edge. */
.topbar {
  position: sticky; top: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
  background: var(--olive); color: var(--olive-ink);
}
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: -.1px; display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; }
.topbar-end { display: inline-flex; align-items: center; gap: 2px; }
.topbar-tools { display: inline-flex; gap: 2px; }
.tour-link { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--ink); }
.help-link {
  color: var(--olive-ink); opacity: .85; font-size: .92rem; font-weight: 500; text-decoration: none; min-height: 44px; padding: 0 8px;
  display: inline-flex; align-items: center; border-radius: 10px;
}
.help-link:hover { opacity: 1; }
.help-link:focus-visible { outline: 2.5px solid var(--olive-ink); outline-offset: 1px; }
.icon-btn {
  appearance: none; border: 0; background: transparent; color: inherit; width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
}
.icon-btn:hover { background: rgb(255 255 255 / .1); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:focus-visible { outline: 2.5px solid currentColor; outline-offset: 1px; }

/* Opening screen: the logo picture, large, with the name floating over it. Shown on every load (and drawn the same in
   the iPhone home-screen launch images), removed by app.js after the first screen is drawn. */
.splash {
  position: fixed; inset: 0; z-index: 100; background: #5a5e40; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  transition: opacity .4s ease, visibility .4s;
}
.splash.out { opacity: 0; visibility: hidden; }
/* The picture's own background is a touch different from the splash olive: its edges fade out so no square shows. */
.splash-art {
  width: min(128vw, 74vh, 680px); height: auto; display: block; margin-bottom: -2vh; flex-shrink: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%), linear-gradient(to right, transparent 0, #000 11%, #000 89%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 16%), linear-gradient(to right, transparent 0, #000 11%, #000 89%, transparent 100%);
  mask-composite: intersect;
}
.splash-text {
  position: absolute; inset-inline: 0; top: calc(12vh + env(safe-area-inset-top)); text-align: center; color: #f4f1e4; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 20px;
}
.splash-name {
  font-weight: 700; font-size: clamp(3.4rem, 19vw, 6rem); line-height: .95; letter-spacing: -1.5px;
  text-shadow: 0 3px 0 rgb(0 0 0 / .18), 0 10px 30px rgb(0 0 0 / .35);
}
.splash-line { font-weight: 500; font-size: clamp(1rem, 4.6vw, 1.35rem); opacity: .9; text-shadow: 0 2px 12px rgb(0 0 0 / .35); }
@media (prefers-reduced-motion: no-preference) {
  .splash-name { animation: float-in .7s var(--ease) both; }
  .splash-line { animation: float-in .7s .08s var(--ease) both; }
  .splash-art { animation: art-in .9s var(--ease) both; }
}
@keyframes float-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes art-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }

/* Connection and update strip, under the top bar. */
.netbar {
  position: sticky; top: calc(61px + env(safe-area-inset-top)); z-index: 5; display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap; padding: 9px 16px; font-weight: 600; font-size: .95rem; text-align: center;
  background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn-line);
  animation: drop .3s var(--ease);
}
.netbar.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.netbar.info { background: var(--sunk); color: var(--ink); border-color: var(--line); }
.netbar .btn { min-height: 36px; padding: 0 14px; font-size: .9rem; }
@keyframes drop { from { transform: translateY(-100%); } }

main { max-width: 560px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left)); outline: none; }
main.anim > * { animation: rise .32s var(--ease) both; }
main.anim > :nth-child(2) { animation-delay: .03s; }
main.anim > :nth-child(3) { animation-delay: .06s; }
main.anim > :nth-child(n+4) { animation-delay: .09s; }
@keyframes rise { from { opacity: .001; transform: translateY(8px); } }

h1 { font-size: 1.85rem; font-weight: 700; line-height: 1.15; margin: 6px 0 6px; letter-spacing: -.5px; text-wrap: balance; }
h1:focus { outline: none; }
h2 { font-size: 1.08rem; font-weight: 700; line-height: 1.3; margin: 0 0 6px; letter-spacing: -.1px; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 1rem; }
.section { margin: 30px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; gap: 8px; }
.section-head h2 { margin: 0; font-size: 1.15rem; }
.count { color: var(--muted); font-size: .95rem; font-weight: 600; }

/* Cards are only for things that ask something of you. Inside a section, plain cards become rows on hairlines. */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px;
}
.section > .card:not(.flag):not(.done):not(.tap):not(.msg) {
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 2px; margin: 0;
}
.section > .card:not(.flag):not(.done):not(.tap):not(.msg):last-child { border-bottom: 0; }
.card.flag { border: 2px solid var(--ink); background: var(--surface); }
.section > .card.flag { margin: 10px 0; }
.card.done { border-color: var(--ok-line); background: var(--ok-bg); }
.card.done h2 { color: var(--ok); }
.card.muted { opacity: .7; }
.person { display: flex; align-items: center; gap: 12px; }
.person .who { flex: 1; min-width: 0; }
.person .name { font-weight: 600; font-size: 1.03rem; line-height: 1.35; overflow-wrap: anywhere; }
.person .meta { color: var(--muted); font-size: .9rem; }
.person > .badge, .person > span:not(.who) { flex-shrink: 0; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .92rem; color: var(--ink); background: var(--sunk); border: 1.5px solid var(--line-strong);
}

/* The signature: an item's number on a strip of masking tape, slightly askew, with torn ends. */
.tape {
  display: inline-flex; align-items: center; justify-content: center; min-width: 66px; height: 30px; padding: 0 11px;
  background: var(--tape); color: var(--tape-ink); font-weight: 700; font-size: 1.08rem; letter-spacing: .3px;
  direction: ltr; white-space: nowrap; flex-shrink: 0; transform: rotate(-2deg);
  -webkit-mask: url(/tape.svg) center / 100% 100% no-repeat; mask: url(/tape.svg) center / 100% 100% no-repeat;
  transition: transform .5s var(--ease);
}
.card:nth-child(odd) > .person > .tape { transform: rotate(1.6deg); }
.card:nth-child(3n) > .person > .tape { transform: rotate(-.8deg); }
.tape.blank { background: transparent; -webkit-mask: none; mask: none; border: 1.5px dashed var(--line-strong); height: 28px; }
/* Item rows: secondary actions are quiet fills, so the one black button reads first. */
.card.item .btn.small.ghost { border-color: transparent; background: var(--sunk); }
.card.item .btn.small.ghost:hover:not(:disabled) { background: var(--neutral-bg); }
.card.item > .row { margin-top: 10px; }
.reported .card > .person > .tape { transform: none; }
.just-reported .card.item > .person > .tape { animation: settle .55s var(--ease) both; }
.just-reported .card.item:nth-child(3) > .person > .tape { animation-delay: .07s; }
.just-reported .card.item:nth-child(4) > .person > .tape { animation-delay: .14s; }
.just-reported .card.item:nth-child(5) > .person > .tape { animation-delay: .21s; }
.just-reported .card.item:nth-child(n+6) > .person > .tape { animation-delay: .28s; }
@keyframes settle { 0% { transform: rotate(-4deg) translateY(-3px); } 60% { transform: rotate(.8deg); } 100% { transform: none; } }

.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.row.tight { margin-top: 8px; }
.row.center { justify-content: center; }

.btn {
  appearance: none; border: 1.5px solid var(--act); border-radius: var(--radius-sm); min-height: 50px; padding: 0 20px;
  font: 600 1rem var(--font); background: var(--act); color: var(--act-ink); cursor: pointer;
  transition: transform .14s var(--ease), background-color .2s, border-color .2s, color .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
}
.btn:hover:not(:disabled) { background: color-mix(in srgb, var(--act) 86%, var(--bg)); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: .95rem; border-radius: 999px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover:not(:disabled) { background: var(--sunk); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.btn.danger:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 86%, var(--bg)); }
.btn.block { width: 100%; }
.btn.grow { flex: 2; }
.btn:disabled { opacity: .5; cursor: default; }
.btn .spin {
  width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite; opacity: .85;
}
.btn:focus-visible, .link:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible,
.tab:focus-visible, .nav-btn:focus-visible, summary:focus-visible, .choice input:focus-visible, .check input:focus-visible {
  outline: 2.5px solid var(--focus); outline-offset: 2px;
}
.link {
  background: none; border: 0; color: var(--muted); font: 500 .95rem var(--font); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px; min-height: 44px; cursor: pointer; padding: 0 4px;
}
.link:hover { color: var(--ink); }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.danger-link { color: var(--bad); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 3px 9px; border-radius: 7px;
  white-space: nowrap; line-height: 1.4;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.neutral { background: var(--neutral-bg); color: var(--muted); }
.badge.neutral::before { background: transparent; border: 1.5px solid currentColor; width: 5px; height: 5px; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
select, input[type="text"], input[type="password"], input[type="search"], input[type="number"], textarea {
  width: 100%; min-height: 50px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0 14px; font: 1rem var(--font); background: var(--surface); color: var(--ink);
  transition: border-color .2s;
}
textarea { padding: 12px 14px; resize: vertical; }
select:focus, input:focus, textarea:focus { border-color: var(--ink); }
input[readonly] { direction: ltr; text-align: left; font-size: .9rem; background: var(--sunk); border-color: var(--line); }
::placeholder { color: var(--muted); opacity: 1; }

/* Search inside a long list (equipment, team). */
.search { position: relative; margin: 16px 0 4px; }
.search input { padding-inline-start: 44px; }
.search svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  appearance: none; border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink); border-radius: 999px;
  min-height: 38px; padding: 0 15px; font: 600 .9rem var(--font); white-space: nowrap; cursor: pointer;
}
.chip.on { background: var(--act); color: var(--act-ink); border-color: var(--act); }

.state { text-align: center; padding: 52px 12px; }
.state p { color: var(--muted); max-width: 34ch; margin-inline: auto; }
.state h1 { margin-top: 0; }
.state .icon {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px; background: var(--sunk); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.state .icon svg { width: 30px; height: 30px; }
.state .icon-alert { background: var(--warn-bg); color: var(--warn); }
.state .icon-check { background: var(--ok-bg); color: var(--ok); }
.empty {
  color: var(--muted); padding: 20px 16px; text-align: center; border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  background: transparent; margin: 8px 0 10px;
}
.spinner {
  width: 30px; height: 30px; margin: 0 auto 14px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeletons: the shape of the screen while it loads, instead of an empty spinner. */
.skeleton { display: grid; gap: 12px; padding-top: 6px; }
.sk { border-radius: var(--radius); background: var(--sunk); position: relative; overflow: hidden; }
.sk::after {
  content: ""; position: absolute; inset: 0; transform: translateX(100%);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / .5), transparent); animation: shimmer 1.3s infinite;
}
:root[data-theme="dark"] .sk::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / .05), transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sk::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / .05), transparent); } }
.sk.line { height: 16px; border-radius: 8px; }
.sk.title { height: 30px; width: 55%; border-radius: 10px; }
.sk.card { height: 64px; border: 0; padding: 0; margin: 0; }
.sk.hero { height: 120px; }
@keyframes shimmer { to { transform: translateX(-100%); } }

.toast {
  position: fixed; inset-inline: 16px; bottom: calc(16px + var(--nav-h) + env(safe-area-inset-bottom)); z-index: 30;
  max-width: 528px; margin: 0 auto; padding: 15px 18px; border-radius: 14px; display: flex; align-items: center; gap: 12px;
  background: var(--act); color: var(--act-ink); box-shadow: var(--shadow-lift); font-weight: 500;
  animation: toast-in .35s var(--ease);
}
.toast::before {
  content: ""; width: 6px; height: 12px; flex-shrink: 0; margin: 0 4px 3px;
  border: solid var(--tape); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.toast.bad { background: var(--bad); color: #fff; }
.toast.bad::before {
  content: "!"; width: 22px; height: 22px; margin: 0; border: 2px solid currentColor; border-radius: 50%; transform: none;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem;
}
/* Neutral information: same toast, no icon (it must not read as done or as an error). */
.toast.info::before { content: none; display: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } }
/* Inside an open dialog the toast is moved into it (top layer), so it is never hidden behind the backdrop. */
/* At the top there, so it never covers the dialog's own buttons at the bottom of the sheet. */
dialog .toast { position: fixed; bottom: auto; top: calc(16px + env(safe-area-inset-top)); }

/* Dialogs: a bottom sheet on phones, a centered card on wider screens. */
.dialog {
  border: 0; border-radius: 22px; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); width: min(100vw, 480px);
  max-height: 92dvh; overflow-y: auto; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift);
}
.dialog::backdrop { background: var(--backdrop); }
.dialog p { color: var(--muted); }
.dialog h2, .dialog form h2 { margin-bottom: 4px; font-size: 1.3rem; letter-spacing: -.3px; }
.dialog-foot { margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .dialog { margin: auto 0 0; max-width: 100vw; width: 100vw; border-radius: 22px 22px 0 0; }
  .dialog[open] { animation: sheet-up .38s var(--ease); }
  .dialog::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: -12px auto 16px; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }

.switcher { margin-bottom: 8px; }
.meta.flush { margin: 0; }
.meta.lead { margin: 0 0 10px; }
.meta.note { margin: 10px 0 0; }
.meta { color: var(--muted); }

/* Old top tabs (kept for screens wider than a phone). */
.tabs { display: flex; gap: 4px; margin: 12px 0 4px; background: var(--sunk); padding: 4px; border-radius: 14px; }
.tab {
  flex: 1; appearance: none; border: 0; border-radius: 10px; min-height: 44px; background: transparent;
  font: 600 .95rem var(--font); color: var(--muted); cursor: pointer; padding: 0 4px; position: relative;
}
.tab.on { background: var(--surface); color: var(--ink); }

/* Bottom navigation (sergeant): a solid bar on the thumb's edge. "You are here" is a strip of tape under the icon. */
.bottomnav {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 8; display: flex; gap: 0;
  padding: 4px max(6px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  background: var(--bg); border-top: 1px solid var(--line);
}
.bottomnav > * { max-width: 92px; }
.bottomnav { justify-content: center; }
.bottomnav[hidden] { display: none; }
.nav-btn {
  flex: 1; appearance: none; border: 0; background: transparent; color: var(--muted); border-radius: 12px; min-height: 62px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer;
  font: 600 .72rem var(--font); position: relative; transition: color .2s; padding: 0 2px;
}
.nav-btn svg { width: 24px; height: 24px; padding: 3px 11px; box-sizing: content-box; transition: background-color .25s var(--ease); }
.nav-btn[aria-current="page"] { color: var(--ink); }
.nav-btn[aria-current="page"] svg {
  background: var(--tape); color: var(--tape-ink);
  -webkit-mask: url(/tape.svg) center / 100% 100% no-repeat; mask: url(/tape.svg) center / 100% 100% no-repeat;
}
.nav-dot {
  position: absolute; top: 4px; inset-inline-end: calc(50% - 26px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--bad); color: #fff; font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg); z-index: 1;
}
@media (max-width: 360px) { .nav-btn { font-size: .66rem; } .nav-btn svg { padding: 3px 7px; } }

/* Pull to refresh indicator. */
.ptr {
  position: fixed; top: calc(72px + env(safe-area-inset-top)); left: 50%; z-index: 7; width: 40px; height: 40px; margin-left: -20px;
  border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-lift); display: flex; align-items: center; justify-content: center;
  transform: translateY(-80px); opacity: 0; pointer-events: none;
}
.ptr-dot { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--ink); border-top-color: transparent; }
.ptr.go .ptr-dot { animation: spin .7s linear infinite; }

/* Today at a glance: progress ring + counts. */
.glance { display: flex; align-items: center; gap: 16px; }
.ring { width: 76px; height: 76px; flex-shrink: 0; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--ring-track); }
.ring .val { stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease); }
.card.done .ring .val { stroke: var(--ok); }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; direction: ltr; }
.glance .who { flex: 1; min-width: 0; }
.glance h2 { margin-bottom: 2px; font-size: 1.2rem; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 16px -16px -16px; border-top: 1px solid var(--line); }
.tile {
  appearance: none; border: 0; border-inline-start: 1px solid var(--line); background: transparent; color: var(--ink); padding: 12px 6px 14px;
  text-align: center; font: inherit; cursor: pointer; min-height: 72px; border-radius: 0;
}
.tile:first-child { border-inline-start: 0; }
.tile:hover:not(:disabled) { background: var(--sunk); }
.tile b { display: block; font-size: 1.6rem; line-height: 1.15; font-weight: 700; }
.tile span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.tile.warn b { color: var(--warn); }
.tile.bad b { color: var(--bad); }
.tile.ok b { color: var(--ok); }
.tile:focus-visible { outline: 2.5px solid var(--focus); outline-offset: -3px; }
.tile:disabled { cursor: default; }
.card.done .tiles { border-color: var(--ok-line); }
.card.done .tile { border-color: var(--ok-line); }

.toolbar { margin-top: 16px; }
.summary { margin: 12px 0 0; }
.history { list-style: none; margin: 0; padding: 0; max-height: 55vh; overflow-y: auto; }
.history li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.kinds { margin-bottom: 8px; max-height: 40vh; overflow-y: auto; }
.kind-row { padding: 11px 0; border-bottom: 1px solid var(--line); }

/* member home: "הכל אצלי" is the biggest thing on the screen. */
[data-tour="daily"]:not(.done) { border: 0; background: transparent; padding: 0; margin: 28px 0 8px; }
[data-tour="daily"]:not(.done) > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
[data-tour="daily"]:not(.done) > .meta.lead { font-size: .95rem; margin: 0 2px 12px; }
.btn.hero {
  min-height: 92px; font-size: 1.75rem; font-weight: 700; letter-spacing: -.4px; border-radius: 18px; margin-top: 0;
  padding: 0 24px;
}
/* At night the big button must not glare: a dark block with a light outline instead of a light slab. */
:root[data-theme="dark"] .btn.hero { background: var(--surface); color: var(--act); border: 2px solid var(--act); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.hero { background: var(--surface); color: var(--act); border: 2px solid var(--act); } }
.choices { border: 0; padding: 0; margin: 0 0 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.choices legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.choice {
  display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border: 1.5px solid var(--line-strong);
  border-radius: 12px; cursor: pointer; flex: 1; margin: 0; font-weight: 600;
}
.choice:has(input:checked) { border-color: var(--ink); background: var(--sunk); }
.choice:has(input:disabled) { opacity: .5; cursor: default; }
.choice input { width: 20px; height: 20px; margin: 0; }

/* sergeant dashboard */
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 600; margin: 6px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; }
.check:has(input:disabled) { opacity: .5; cursor: default; }

/* callouts */
.replies { margin-top: 10px; }
.replies summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.count-input { max-width: 5em; }

/* /start: intro for sergeants */
.intro { padding-top: 4px; }
.intro-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.brand-mark { font-weight: 700; color: var(--ink); }
.intro .state { padding: 24px 8px 12px; }
.intro .state p { font-size: 1.05rem; }
.dots { display: flex; justify-content: center; gap: 8px; margin: 14px 0 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: width .35s var(--ease), background-color .35s; }
.dot.on { background: var(--ink); width: 24px; border-radius: 999px; }
.intro .row .btn { flex: 1; }
.steps { margin: 12px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 12px 54px 12px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 12px; width: 40px; height: 28px;
  background: var(--tape); color: var(--tape-ink); font-weight: 700; transform: rotate(-2deg);
  display: flex; align-items: center; justify-content: center;
  -webkit-mask: url(/tape.svg) center / 100% 100% no-repeat; mask: url(/tape.svg) center / 100% 100% no-repeat;
}
.steps .meta { color: var(--muted); font-size: .95rem; }
.steps .name { font-weight: 600; }
.center { text-align: center; }
.intro-logo { width: 148px; height: 148px; border-radius: 32px; margin: 0 auto 22px; display: block; box-shadow: var(--shadow-lift); }

/* Compact prompts (notifications, saved sign-in): quiet rows, not banners. */
.keep { display: flex; align-items: center; gap: 14px; background: var(--sunk); border-color: transparent; }
.keep .who { flex: 1; min-width: 0; }
.keep .name { font-weight: 600; }
.keep .meta { font-size: .9rem; }
.keep .ico {
  width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--ink); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; align-self: flex-start;
}
.keep .ico svg { width: 22px; height: 22px; }
.keep > div:last-child { display: flex; flex-direction: column; align-items: center; }

/* Settings sheet rows. */
.set-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .who { flex: 1; min-width: 0; }
.set-row .name { font-weight: 600; }
.set-row .meta { font-size: .9rem; }
.seg { display: flex; gap: 4px; background: var(--sunk); padding: 4px; border-radius: 12px; }
.seg button {
  flex: 1; appearance: none; border: 0; background: transparent; color: var(--muted); border-radius: 9px; min-height: 42px;
  font: 600 .92rem var(--font); cursor: pointer; transition: background-color .2s, color .2s;
}
.seg button[aria-pressed="true"] { background: var(--act); color: var(--act-ink); }
.seg button:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 1px; }
.version { color: var(--muted); font-size: .8rem; text-align: center; margin-top: 16px; direction: ltr; }

/* Guided tour: a spotlight on one part of the screen at a time, with a short card. */
.t-hole {
  position: fixed; z-index: 40; border-radius: 16px; pointer-events: none;
  box-shadow: 0 0 0 200vmax rgb(20 20 19 / .66); transition: all .3s var(--ease);
}
.t-card {
  position: fixed; z-index: 41; inset-inline: 16px; max-width: 420px; margin: 0 auto; padding: 16px 18px;
  background: var(--surface); color: var(--ink); border-radius: 18px; box-shadow: var(--shadow-lift);
  transition: top .3s var(--ease);
}
.t-card h2 { margin: 0 0 4px; }
.t-card p { margin: 0; color: var(--muted); }
.t-card .row { justify-content: space-between; align-items: center; }
.t-step { color: var(--muted); font-size: .85rem; font-weight: 600; }

.confetti { position: fixed; inset: 0; z-index: 50; pointer-events: none; }

@media (pointer: coarse) { .btn.small { min-height: 46px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (min-width: 900px) {
  main { max-width: 640px; }
}

/* ---------- שיתוף עם הפלוגה (רס"פ / סמ"פ) ---------- */
h3 { font-size: .95rem; margin: 14px 0 4px; }
.cats { margin: 6px 0 10px; }
.cats .check { align-items: flex-start; }
.cats .check input { margin-top: 2px; }
.meta.block { display: block; font-weight: 400; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-bottom: 6px; }
.chip-btn {
  appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px;
  min-height: 40px; padding: 0 14px; font: 600 .85rem var(--font); cursor: pointer;
}
.chip-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.danger-text { color: var(--bad); }
.card.tap { cursor: pointer; }
.card.tap:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
.msg.mine { background: var(--sunk); border-color: transparent; }
.receipt { font-size: .8rem; }
.msg details { margin-top: 6px; }
details > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-weight: 600; }
.line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.line > :last-child { text-align: end; }
table.mini { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.mini th, table.mini td { padding: 6px 4px; text-align: start; border-bottom: 1px solid var(--line); }
table.mini th { color: var(--muted); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; text-align: center; }
.glance > .stats { flex: 1; }
.stats b { display: block; font-size: 1.35rem; }
.stats span { color: var(--muted); font-size: .8rem; }
.print-report { display: none; }

/* PDF of the team status: the phone's print → "save as PDF" of a plain report, nothing else on the page. */
@media print {
  body.printing > *:not(#print-report) { display: none !important; }
  body.printing { background: #fff; color: #000; }
  body.printing .print-report { display: block; direction: rtl; font: 11pt var(--font); color: #000; }
  .print-report h1 { font-size: 16pt; margin: 0 0 4pt; }
  .print-report h2 { font-size: 12.5pt; margin: 14pt 0 4pt; break-after: avoid; }
  .print-report table { width: 100%; border-collapse: collapse; }
  .print-report th, .print-report td { border: 1px solid #999; padding: 3pt 5pt; text-align: start; }
  .print-report th { background: #eee; }
  .print-report tr { break-inside: avoid; }
}

/* Demo (/demo, owner request 2026-11-21): a quiet strip under the top bar, and the text readers without JS get. */
.demobar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
  padding: 8px 16px; background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn-line);
  font-size: .875rem; line-height: 1.4;
}
.demobar a { color: var(--accent); font-weight: 600; white-space: nowrap; padding: 6px 0; }
.demo-about { text-align: start; max-width: 36rem; margin-inline: auto; }
.demo-about ul { padding-inline-start: 1.2em; }

/* Per report type lines on the dashboard (report types, 2026-11-22). */
.report-lines { margin: 12px 0 0; padding: 0; list-style: none; }
.report-lines li { padding: 2px 0; }

/* Sign-in options stacked under each other (fingerprint, Google, username + password). */
.stack { display: grid; gap: 10px; margin-top: 10px; }
.stack.tight { gap: 8px; }
.stack [hidden] { display: none; }
.contents { display: contents; }

/* Sign-up page: "חדש בסמל חזק?" between the existing-account card and the new-account form (2026-11-23). */
.section-title { font-size: 1.15rem; margin: 22px 0 4px; }
