/* ==========================================================================
   SwipeIn design system v3 — "Map first".
   Yellow screens are for everything before you are inside the app (sign in,
   code, PIN). Inside, the map is the screen and white sheets float over it.
   Class prefix: si-   ·   Light only.
   This file grows page by page; it holds what pages 01 onward use.
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:wght@400..800&family=Atkinson+Hyperlegible+Mono:wght@400..700&family=Instrument+Sans:wght@400..700&family=Noto+Sans+Sinhala:wght@400;700&family=Noto+Sans+Tamil:wght@400;700&display=swap");

:root {
  color-scheme: light;
  /* Ink and grounds */
  --ink: #0e1116;            /* text, icons, the route, strong buttons */
  --soft: #5b6472;           /* secondary text; never lighter */
  --faint: #8a93a1;          /* disabled text only */
  --line: #e4e8ee;           /* hairlines */
  --edge: #cfd5de;           /* outlines of quiet controls */
  --ground: #ffffff;         /* sheets and screens inside the app */
  --well: #f3f5f8;           /* fields, tracks, quiet tiles */
  /* Hi-vis */
  --hivis: #ffd60a;          /* sign-in ground; the one main action; where the day has reached */
  --hivis-edge: #a88600;
  --hivis-deep: #f2c800;     /* pressed keys on a hi-vis ground */
  /* Meaning */
  --blue: #1557ff;           /* swiped in, you-are-here, focus */
  --blue-soft: #e6edff;
  --red: #c4241a;            /* emergency and errors */
  --red-soft: #fee4e2;
  --green: #007a55;          /* a target reached, nothing else */
  /* Type */
  --font-head: "Instrument Sans", "Noto Sans Sinhala", "Noto Sans Tamil", system-ui, sans-serif;
  --font-text: "Atkinson Hyperlegible Next", "Noto Sans Sinhala", "Noto Sans Tamil", system-ui, sans-serif;
  --font-time: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  /* Shape */
  --r-field: 16px; --r-btn: 18px; --r-box: 24px; --r-sheet: 30px; --r-pill: 999px;
  /* Depth: three levels */
  --lift-1: 0 1px 2px rgba(14, 17, 22, 0.08), 0 6px 16px -6px rgba(14, 17, 22, 0.25);    /* pills over the map */
  --lift-2: 0 14px 30px -14px rgba(90, 70, 0, 0.55);                                       /* white box on hi-vis */
  --lift-3: 0 -10px 40px -12px rgba(14, 17, 22, 0.28);                                     /* sheets */
  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --fast: 120ms; --slow: 320ms;
}

/* ---------- Screen ---------- */
.si-screen, .si-screen *, .si-screen *::before, .si-screen *::after { box-sizing: border-box; }
.si-screen { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; background: var(--ground); color: var(--ink); font: 400 16px/23px var(--font-text); -webkit-font-smoothing: antialiased; }
.si-screen--hivis { background: var(--hivis); }
.si-screen h1, .si-screen h2, .si-screen h3, .si-screen p { margin: 0; }
:where(.si-screen button) { font: inherit; color: inherit; cursor: pointer; border: 0; }
.si-screen :focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.si-screen--hivis :focus-visible { outline-color: var(--ink); }
.si-pad { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 6px 22px 26px; }
.si-push { margin-top: auto; }

/* ---------- Type ---------- */
.si-display { font: 700 36px/38px var(--font-head); letter-spacing: -0.04em; text-wrap: balance; }      /* hi-vis screens */
.si-h1 { font: 600 30px/34px var(--font-head); letter-spacing: -0.03em; text-wrap: balance; }            /* inside the app */
.si-h2 { font: 600 20px/26px var(--font-head); letter-spacing: -0.02em; }
.si-sub { font-size: 16px; line-height: 23px; }
.si-screen:not(.si-screen--hivis) .si-sub { color: var(--soft); }
.si-fine { font-size: 13px; line-height: 18px; }
.si-label { font: 600 14px/20px var(--font-text); }
.si-time { font-family: var(--font-time); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; }
.si-center { text-align: center; }
.si-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Icon (Lucide) ---------- */
.si-icon { width: 20px; height: 20px; flex: none; stroke-width: 1.9; }
.si-icon--sm { width: 16px; height: 16px; stroke-width: 2.1; }
.si-icon--lg { width: 26px; height: 26px; stroke-width: 1.8; }

/* ---------- Logo ---------- */
.si-logo { display: inline-flex; align-items: center; gap: 6px; font: 700 19px/1 var(--font-text); letter-spacing: -0.02em; }
.si-logo svg { width: 26px; height: 26px; flex: none; }
/* The mark, huge and cropped by the screen edge. Hi-vis screens only. */
.si-bigmark { position: absolute; right: -70px; top: -52px; width: 230px; height: 230px; pointer-events: none; }

/* ---------- Rows ---------- */
.si-row { display: flex; align-items: center; gap: 10px; }
.si-row--between { justify-content: space-between; }
.si-stack { display: flex; flex-direction: column; gap: 12px; }
.si-stack--tight { gap: 4px; }

/* ---------- Box: the white card that holds a form on a hi-vis screen ---------- */
.si-box { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--r-box); background: var(--ground); box-shadow: var(--lift-2); }

/* ---------- Field ---------- */
.si-field { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-radius: var(--r-field); background: var(--well); font-size: 18px; transition: box-shadow var(--fast) var(--ease); }
.si-field:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.si-field input { flex: 1 1 0; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--ink); font: 400 18px/1 var(--font-text); padding: 0; }
.si-field input::placeholder { color: var(--faint); }
.si-field__cc { display: inline-flex; align-items: center; gap: 4px; height: 100%; padding: 0 12px 0 0; border: 0; border-right: 1px solid var(--edge); background: none; color: var(--soft); font-size: 18px; }
.si-field--error { box-shadow: inset 0 0 0 2px var(--red); background: var(--red-soft); }
.si-help { font-size: 13px; line-height: 18px; color: var(--soft); }
.si-help--error { color: var(--red); font-weight: 600; }

/* ---------- Button ---------- */
.si-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; padding: 0 22px; border: 0; border-radius: var(--r-btn); background: var(--ground); box-shadow: inset 0 0 0 1.5px var(--edge); font: 600 17px/1 var(--font-head); letter-spacing: -0.01em; transition: transform var(--fast) var(--ease), background var(--fast) var(--ease); }
.si-btn:active { transform: scale(0.985); }
.si-btn--ink { background: var(--ink); color: #fff !important; box-shadow: none; }
.si-btn--hivis { background: var(--hivis); box-shadow: inset 0 0 0 1px var(--hivis-edge); }
.si-btn--go { justify-content: space-between; padding: 0 6px 0 22px; }                                    /* label left, arrow tile right */
.si-btn__go { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--hivis); color: var(--ink); }
.si-btn--hivis .si-btn__go { background: var(--ink); color: var(--hivis); }
.si-btn--text { height: 44px; background: none; box-shadow: none; font: 600 15px/1 var(--font-text); letter-spacing: 0; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.si-btn--auto { width: auto; }
.si-btn[disabled] { background: #e9ecf1; color: var(--faint) !important; box-shadow: none; cursor: not-allowed; transform: none; }
.si-btn[disabled] .si-btn__go { background: #dfe3ea; color: var(--faint); }
.si-btn.is-busy .si-btn__go > * { display: none; }
.si-btn.is-busy .si-btn__go::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: si-spin 0.7s linear infinite; }
@keyframes si-spin { to { transform: rotate(360deg); } }
/* Back and other small round controls */
.si-round { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(14, 17, 22, 0.08); }
.si-screen:not(.si-screen--hivis) .si-round { background: var(--well); }

/* ---------- One-time code: six cells over one real input ---------- */
.si-code { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.si-code__cell { height: 58px; border-radius: 14px; background: var(--ground); display: grid; place-items: center; font: 600 24px/1 var(--font-time); box-shadow: 0 6px 14px -8px rgba(90, 70, 0, 0.6); }
.si-code__cell.is-active { box-shadow: inset 0 0 0 2.5px var(--ink), 0 6px 14px -8px rgba(90, 70, 0, 0.6); }
.si-code--error .si-code__cell { box-shadow: inset 0 0 0 2.5px var(--red); }
.si-code--off .si-code__cell { background: rgba(255, 255, 255, 0.45); box-shadow: none; }
.si-code input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; }

/* ---------- PIN: four dots and the app's own keypad ---------- */
.si-pin { display: flex; justify-content: center; gap: 18px; padding: 6px 0; }
.si-pin i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2.5px var(--ink); transition: background var(--fast) var(--ease), transform var(--fast) var(--ease); }
.si-pin i.is-on { background: var(--ink); transform: scale(1.08); }
.si-pin--error i { box-shadow: inset 0 0 0 2.5px var(--red); }
.si-pin--error { animation: si-shake 0.32s var(--ease); }
@keyframes si-shake { 20% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 80% { transform: translateX(-3px); } }
.si-keys { display: grid; grid-template-columns: repeat(3, 66px); gap: 10px 22px; justify-content: center; }
.si-key { width: 66px; height: 66px; border: 0; border-radius: 50%; background: var(--ground); display: grid; place-items: center; font: 600 27px/1 var(--font-head); box-shadow: 0 6px 14px -8px rgba(90, 70, 0, 0.6); transition: transform var(--fast) var(--ease), background var(--fast) var(--ease); }
.si-key:active { transform: scale(0.94); background: #fff7cf; }
.si-key--ghost { background: none; box-shadow: none; }
.si-key--ghost:active { background: var(--hivis-deep); }
.si-key[disabled] { opacity: 0.4; cursor: not-allowed; }
.si-key--none { visibility: hidden; }

/* ---------- Banner ---------- */
.si-banner { position: relative; z-index: 1; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--ink); color: #fff; font-size: 15px; line-height: 21px; }
.si-banner .si-icon { margin-top: 1px; }
.si-banner--ok { background: var(--blue-soft); color: var(--ink); }

/* ---------- Avatar ---------- */
.si-avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 600 18px/1 var(--font-head); }

/* ---------- Sheet ---------- */
.si-dim { position: absolute; inset: 0; z-index: 7; background: rgba(14, 17, 22, 0.4); display: flex; flex-direction: column; justify-content: flex-end; }
.si-sheet { display: flex; flex-direction: column; gap: 12px; padding: 10px 20px 30px; border-radius: var(--r-sheet) var(--r-sheet) 0 0; background: var(--ground); box-shadow: var(--lift-3); }
.si-sheet::before { content: ""; width: 38px; height: 4px; border-radius: 2px; background: var(--edge); align-self: center; margin-bottom: 4px; }
.si-options { display: flex; flex-direction: column; }
.si-options button { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 17px; text-align: left; }
.si-options button:last-child { border-bottom: 0; }
.si-options button[aria-pressed="true"] { font-weight: 700; }

/* ---------- Motion ---------- */
.si-rise { animation: si-rise var(--slow) var(--ease) both; }
@keyframes si-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .si-rise, .si-pin--error, .si-btn.is-busy .si-btn__go::after { animation: none; } .si-btn, .si-key, .si-pin i { transition: none; } }

/* ==========================================================================
   Added with page 02
   ========================================================================== */

/* ---------- Steps: the route as a progress line (ring = to come, ink = done, white = now) ---------- */
.si-steps { display: flex; align-items: center; }
.si-steps i { width: 12px; height: 12px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2.5px var(--ink); }
.si-steps i.is-done { background: var(--ink); }
.si-steps i.is-now { width: 18px; height: 18px; background: #fff; box-shadow: inset 0 0 0 4px var(--ink); }
.si-steps u { width: 22px; height: 3px; flex: none; background: radial-gradient(circle at 1.5px 1.5px, var(--ink) 1.4px, transparent 1.7px) 2px 0 / 7px 3px repeat-x; }

/* ---------- Icon tile: one per permission screen ---------- */
.si-tile { width: 64px; height: 64px; flex: none; border-radius: 20px; background: var(--ground); display: grid; place-items: center; box-shadow: var(--lift-2); }
.si-tile .si-icon { width: 30px; height: 30px; stroke-width: 1.7; }

/* ---------- List: icon and a line of text ---------- */
.si-list { display: flex; flex-direction: column; gap: 7px; }
.si-list__label { font: 600 13px/18px var(--font-text); color: var(--soft); }
.si-list__row { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 20px; }
.si-list__row .si-icon { margin-top: 0; }
.si-list__row--no .si-icon { color: var(--red); }
.si-rule { height: 1px; background: var(--line); margin: 3px 0; }

/* ---------- Check: a setup item that is done or still to do ---------- */
.si-check { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--ink); color: var(--hivis); display: grid; place-items: center; }
.si-check--off { background: none; color: var(--soft); box-shadow: inset 0 0 0 2px var(--edge); }
.si-checkrow { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 20px; }
.si-checkrow span { flex: 1 1 0; min-width: 0; }
.si-checkrow small { display: block; font-size: 13px; line-height: 18px; color: var(--soft); }
.si-checkrow button { height: 32px; padding: 0 12px; border-radius: 16px; background: var(--well); font: 600 13px/1 var(--font-text); }

/* ---------- Hint: shows which choice to pick in the phone's own dialog ---------- */
.si-hint { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r-box); background: rgba(255, 255, 255, 0.55); }
.si-hint__cap { font: 600 13px/18px var(--font-text); margin-bottom: 2px; }
.si-hint__opt { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.6); color: var(--soft); font-size: 15px; }
.si-hint__opt.is-pick { background: var(--ground); color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 2.5px var(--ink), 0 8px 16px -10px rgba(90, 70, 0, 0.7); }

/* ---------- Reading screen: long text inside the app ---------- */
.si-read { display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.si-read h2 { font: 600 17px/23px var(--font-head); letter-spacing: -0.015em; margin-top: 6px; }
.si-read p { font-size: 15px; line-height: 22px; color: var(--soft); }

/* ==========================================================================
   Added with page 03 — inside the app: the map is the screen
   ========================================================================== */

/* ---------- Map: fills the screen behind everything ---------- */
.si-map { position: absolute; inset: 0 0 auto 0; width: 100%; height: 400px; display: block; background: #eef1f5; }
.si-map--blank { background: #eef1f5 linear-gradient(#e3e8ee 1px, transparent 1px) 0 0 / 100% 40px; background-image: linear-gradient(#e3e8ee 1px, transparent 1px), linear-gradient(90deg, #e3e8ee 1px, transparent 1px); background-size: 40px 40px; }
.si-pulse { animation: si-pulse 2s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes si-pulse { 0% { transform: scale(0.6); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- Floating row and pills over the map ---------- */
.si-float { position: absolute; z-index: 5; top: 52px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.si-float > * { pointer-events: auto; }
.si-pill { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: var(--r-pill); background: var(--ground); box-shadow: var(--lift-1); font: 600 14px/1 var(--font-text); white-space: nowrap; }
.si-pill i.si-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.si-pill i.si-dot--off { background: none; box-shadow: inset 0 0 0 2px var(--soft); border-radius: 2px; }
.si-pill--ink { background: var(--ink); color: #fff; }
.si-pill--red { color: var(--red); }
.si-fab { position: absolute; z-index: 5; right: 14px; width: 46px; height: 46px; border-radius: 50%; background: var(--ground); box-shadow: var(--lift-1); display: grid; place-items: center; }

/* ---------- Docked sheet: the white panel at the bottom of a map screen ---------- */
.si-dock { position: relative; z-index: 6; margin-top: auto; display: flex; flex-direction: column; gap: 14px; padding: 10px 20px 0; border-radius: var(--r-sheet) var(--r-sheet) 0 0; background: var(--ground); box-shadow: var(--lift-3); }
.si-dock::before { content: ""; width: 38px; height: 4px; border-radius: 2px; background: var(--edge); align-self: center; margin-bottom: 2px; }
.si-eyebrow { font: 500 13px/18px var(--font-text); color: var(--soft); }

/* ---------- Where: the place line ---------- */
.si-where { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 16px; background: var(--well); font-size: 15px; line-height: 20px; }
.si-where > span { flex: 1 1 0; min-width: 0; }
.si-where small { display: block; font-size: 13px; line-height: 18px; color: var(--soft); }
.si-skel { display: inline-block; height: 12px; border-radius: 6px; background: #dfe4ec; animation: si-skel 1.1s ease-in-out infinite alternate; }
@keyframes si-skel { to { opacity: 0.45; } }

/* ---------- Note: a line inside a sheet that needs attention ---------- */
.si-note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 16px; background: #fff6c2; font-size: 14px; line-height: 19px; }
.si-note > span { flex: 1 1 0; min-width: 0; }
.si-note .si-icon { margin-top: 0; }
.si-note--problem { background: var(--red-soft); }
.si-note--problem .si-icon { color: var(--red); }
.si-note--offline { background: var(--ink); color: #fff; }
.si-note--quiet { background: var(--well); }
.si-note button { flex: none; align-self: center; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--ink); color: #fff; font: 600 13px/1 var(--font-text); }
.si-note--offline button { background: var(--hivis); color: var(--ink); }

/* ---------- Swipe control ---------- */
.si-swipe { position: relative; height: 64px; border-radius: 32px; background: var(--well); display: flex; align-items: center; justify-content: center; padding: 0 44px 0 64px; overflow: hidden; font: 600 16px/1 var(--font-head); letter-spacing: -0.01em; user-select: none; touch-action: pan-y; }
.si-swipe__fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 32px; background: var(--hivis); }
.si-swipe__label { position: relative; }
.si-swipe__thumb { position: absolute; left: 4px; top: 4px; width: 56px; height: 56px; border-radius: 50%; background: var(--hivis); box-shadow: inset 0 0 0 1px var(--hivis-edge), 0 4px 10px -2px rgba(168, 134, 0, 0.5); display: grid; place-items: center; touch-action: none; cursor: grab; }
.si-swipe__thumb:active { cursor: grabbing; }
.si-swipe__end { position: absolute; right: 22px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; border: 3px solid #aab3c0; }
.si-swipe--out { background: var(--ink); color: #fff; }
.si-swipe--out .si-swipe__end { border-color: #fff; }
.si-swipe--off { color: var(--faint); }
.si-swipe--off .si-swipe__thumb { background: #e2e6ed; box-shadow: none; color: var(--faint); cursor: not-allowed; }
.si-swipe--off .si-swipe__end { border-color: var(--edge); }
.si-swipe--done .si-swipe__fill { width: 100%; }
.si-swipe--done .si-swipe__thumb { left: auto; right: 4px; background: var(--ink); color: var(--hivis); box-shadow: none; }
.si-swipe--done .si-swipe__end { display: none; }
.si-swipe.is-snapping .si-swipe__thumb, .si-swipe.is-snapping .si-swipe__fill { transition: transform var(--fast) var(--ease), width var(--fast) var(--ease); }

/* ---------- Tab bar ---------- */
.si-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 0 -20px; padding: 6px 10px 22px; border-top: 1px solid var(--line); }
.si-tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0 0; background: none; color: var(--soft); font: 600 11.5px/14px var(--font-text); }
.si-tabbar button > span:first-child { display: grid; place-items: center; width: 52px; height: 28px; border-radius: 14px; }
.si-tabbar button[aria-current="page"] { color: var(--ink); }
.si-tabbar button[aria-current="page"] > span:first-child { background: var(--hivis); }
@media (prefers-reduced-motion: reduce) { .si-pulse, .si-skel { animation: none; } }

/* ==========================================================================
   Added with page 04 — the camera
   ========================================================================== */
.si-cam { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #c5d0db; }
.si-cam--idle { background: var(--well); display: grid; place-items: center; }
/* Face guide: an oval window; everything outside it is dimmed */
.si-guide { position: absolute; z-index: 2; left: 50%; top: 102px; width: 196px; height: 250px; margin-left: -98px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 999px rgba(14, 17, 22, 0.28); pointer-events: none; transition: border-color var(--fast) var(--ease); }
.si-guide--found { border-color: var(--hivis); }
.si-guide--none { box-shadow: none; border-color: transparent; }
.si-camhint { position: absolute; z-index: 3; left: 50%; top: 360px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: rgba(14, 17, 22, 0.72); color: #fff; font: 600 13px/1 var(--font-text); white-space: nowrap; }
.si-stamp { position: absolute; z-index: 3; left: 14px; top: 106px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 15px; background: rgba(255, 255, 255, 0.92); font: 600 13px/1 var(--font-text); }
.si-shutter { width: 74px; height: 74px; flex: none; border-radius: 50%; background: var(--hivis); box-shadow: inset 0 0 0 4px #fff, 0 0 0 3px var(--ink); transition: transform var(--fast) var(--ease); }
.si-shutter:active { transform: scale(0.93); }
.si-shutter[disabled] { background: #e2e6ed; box-shadow: inset 0 0 0 4px #fff, 0 0 0 3px var(--edge); cursor: not-allowed; }
.si-flash { position: absolute; inset: 0; z-index: 8; background: #fff; pointer-events: none; animation: si-flash 0.35s ease-out both; }
@keyframes si-flash { from { opacity: 0.9; } to { opacity: 0; } }
.si-dock--end { padding-bottom: 30px; }
.si-float--cam { top: 54px; }
.si-round--glass { background: rgba(255, 255, 255, 0.92) !important; box-shadow: var(--lift-1); }
@media (prefers-reduced-motion: reduce) { .si-flash { animation: none; opacity: 0; } }

/* ==========================================================================
   Added with page 05 — confirming a place
   ========================================================================== */
/* Kind of place: four equal tiles, one picked */
.si-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.si-kind { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 66px; border-radius: 16px; background: var(--well); color: var(--soft); font: 600 12.5px/16px var(--font-text); transition: background var(--fast) var(--ease); }
.si-kind[aria-pressed="true"] { background: var(--ink); color: #fff; }
.si-kind[aria-pressed="true"] .si-icon { color: var(--hivis); }
/* The place line when it can be changed */
.si-where--edit { padding-right: 8px; }
.si-where--edit button { flex: none; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--ground); box-shadow: inset 0 0 0 1.5px var(--edge); font: 600 13px/1 var(--font-text); }
/* Suggestions under a field */
.si-suggest { display: flex; flex-direction: column; }
.si-suggest button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 2px; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 15px; line-height: 20px; }
.si-suggest button:last-child { border-bottom: 0; }
.si-suggest button > span { flex: 1 1 0; min-width: 0; }
.si-suggest small { display: block; font-size: 13px; line-height: 18px; color: var(--soft); }
/* Toast: confirms what just happened, then leaves */
.si-toast { position: absolute; z-index: 7; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 22px; background: var(--ink); color: #fff; box-shadow: var(--lift-1); font: 600 14px/1 var(--font-text); white-space: nowrap; }
.si-toast .si-icon { color: var(--hivis); }

/* ==========================================================================
   Added with page 06 — the working day
   ========================================================================== */
/* Stats: three numbers across the top of the sheet */
.si-stats { display: grid; grid-template-columns: 1.15fr 1fr 1fr; }
.si-stats > div { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 1px solid var(--line); min-width: 0; }
.si-stats > div:first-child { padding-left: 0; border: 0; }
.si-stats b { font: 600 26px/28px var(--font-head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.si-stats b small { font: 500 14px/1 var(--font-text); color: var(--soft); letter-spacing: 0; }
.si-stats span { font-size: 13px; line-height: 18px; color: var(--soft); white-space: nowrap; }
.si-stats--won span.is-won { color: var(--green); font-weight: 600; }
/* Goal: a thin bar under the stats, only when the company has a daily target */
.si-goal { height: 6px; border-radius: 3px; background: var(--well); overflow: hidden; margin-top: -4px; }
.si-goal i { display: block; height: 100%; border-radius: 3px; background: var(--blue); transition: width var(--slow) var(--ease); }
.si-goal--won i { background: #12c48b; }
/* The stop you are at, or the place you have reached */
.si-stop { display: flex; flex-direction: column; gap: 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.si-stop .si-h2 { margin: 0; }
/* Actions: one main pill and round extras */
.si-acts { display: flex; gap: 8px; }
.si-cta { flex: 1 1 0; min-width: 0; height: 50px; border-radius: 25px; background: var(--hivis); box-shadow: inset 0 0 0 1px var(--hivis-edge); display: flex; align-items: center; justify-content: center; gap: 8px; font: 600 16px/1 var(--font-head); letter-spacing: -0.01em; }
.si-cta--plain { background: var(--ground); box-shadow: inset 0 0 0 1.5px var(--edge); }
.si-rnd { width: 50px; height: 50px; flex: none; border-radius: 50%; background: var(--ground); box-shadow: inset 0 0 0 1.5px var(--edge); display: grid; place-items: center; }
/* Timeline: the day as a list, same line as the map */
.si-tl { list-style: none; margin: 0; padding: 0; overflow: auto; }
.si-tl li { position: relative; display: grid; grid-template-columns: 46px 1fr; column-gap: 10px; padding: 0 0 16px 26px; font-size: 15px; line-height: 20px; }
.si-tl li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.si-tl li::after { content: ""; position: absolute; left: 6.500px; top: 21px; bottom: 1px; width: 3px; background: radial-gradient(circle at 1.5px 1.5px, var(--ink) 1.4px, transparent 1.7px) 0 0 / 3px 7px repeat-y; }
.si-tl li:last-child { padding-bottom: 0; }
.si-tl li:last-child::after { display: none; }
.si-tl .is-start::before { background: var(--ground); box-shadow: inset 0 0 0 3.5px var(--ink); left: 1px; top: 3px; width: 14px; height: 14px; }
.si-tl .is-now::before { background: var(--hivis); box-shadow: inset 0 0 0 3px var(--ink); left: 0; top: 2px; width: 16px; height: 16px; }
.si-tl .is-gap::before { background: var(--ground); box-shadow: inset 0 0 0 2px var(--faint); }
.si-tl .is-gap::after { opacity: 0.35; }
.si-tl time { grid-row: span 2; font-family: var(--font-time); font-size: 14px; letter-spacing: -0.02em; }
.si-tl b { font-weight: 700; }
.si-tl small { font-size: 13px; line-height: 18px; color: var(--soft); }
.si-pill--alert { background: var(--red); color: #fff; }
.si-callout { position: absolute; z-index: 4; display: inline-flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 14px; background: var(--ground); box-shadow: var(--lift-1); font-size: 13px; line-height: 18px; white-space: nowrap; }
.si-callout b { font-size: 14px; }
.si-callout span { color: var(--soft); }

/* ==========================================================================
   Added with page 07 — the stop
   ========================================================================== */
/* Form screen: a strip of map at the top, a scrolling sheet, a fixed foot */
.si-dock--form { margin-top: 124px; flex: 1 1 auto; min-height: 0; overflow: auto; padding-bottom: 18px; }
.si-foot { position: relative; z-index: 6; flex: none; padding: 12px 20px 28px; background: var(--ground); border-top: 1px solid var(--line); }
/* Choice chips: pick one */
.si-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.si-chip { height: 40px; padding: 0 10px; border-radius: 20px; background: var(--well); color: var(--ink); font: 600 13.5px/1 var(--font-text); white-space: nowrap; transition: background var(--fast) var(--ease); }
.si-chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.si-chip--sm { height: 34px; padding: 0 11px; font-size: 13px; }
/* Add tiles: what can be attached to a stop */
.si-adds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.si-add { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 60px; border-radius: 14px; background: var(--ground); box-shadow: inset 0 0 0 1.5px var(--edge); font: 600 11.5px/14px var(--font-text); }
.si-add b { position: absolute; top: -5px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: var(--hivis); font: 700 11.5px/19px var(--font-text); text-align: center; }
/* Items attached to a stop */
.si-items { display: flex; flex-direction: column; }
.si-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 20px; }
.si-item:last-child { border-bottom: 0; }
.si-item > span { flex: 1 1 0; min-width: 0; }
.si-item small { display: block; font-size: 13px; line-height: 18px; color: var(--soft); }
.si-item button { flex: none; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--well); font: 600 13px/1 var(--font-text); }
.si-item button.is-add { background: var(--hivis); box-shadow: inset 0 0 0 1px var(--hivis-edge); }
.si-item button.is-x { width: 32px; padding: 0; display: grid; place-items: center; }
.si-thumbs { display: flex; gap: 8px; }
.si-thumbs i { width: 56px; height: 56px; border-radius: 12px; background: linear-gradient(135deg, #c9d3de, #9aa7b6); }
.si-thumbs i:nth-child(2) { background: linear-gradient(135deg, #e6d9b8, #b9a36c); }
.si-textarea { width: 100%; min-height: 92px; padding: 14px 16px; border: 0; border-radius: var(--r-field); background: var(--well); color: var(--ink); font: 400 16px/23px var(--font-text); resize: none; outline: 0; box-shadow: inset 0 0 0 2px var(--ink); }
.si-btn--sm { height: 48px; font-size: 16px; }

/* A tile the company requires and that is still empty */
.si-add--need { box-shadow: inset 0 0 0 2px var(--ink); }
.si-add--need::after { content: ""; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--hivis); box-shadow: 0 0 0 2px var(--ink); }

/* ==========================================================================
   Added with page 07b — tasks and comments
   ========================================================================== */
/* A plain screen inside the app (no map): white, with a title */
.si-page { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 14px; padding: 6px 20px 18px; }
.si-tabbar--page { margin: 0; flex: none; background: var(--ground); }
.si-tabbar button > span:first-child { position: relative; }
.si-tabbar em { position: absolute; top: -3px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--ink); color: var(--hivis); font: 700 11px/17px var(--font-text); font-style: normal; text-align: center; }
/* Status mark: ring = to do, half = doing, tick = done */
.si-status { width: 24px; height: 24px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2.5px var(--ink); display: grid; place-items: center; }
.si-status--doing { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.si-status--done { background: var(--ink); color: var(--hivis); }
/* Task row */
.si-tasks { display: flex; flex-direction: column; }
.si-task { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 15px; line-height: 20px; }
.si-task:last-child { border-bottom: 0; }
.si-task > span:nth-child(2) { flex: 1 1 0; min-width: 0; }
.si-task b { font-weight: 600; }
.si-task small { display: block; font-size: 13px; line-height: 18px; color: var(--soft); }
.si-task small.is-late { color: var(--red); font-weight: 600; }
.si-task--done b { color: var(--soft); font-weight: 400; text-decoration: line-through; }
.si-count { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--well); font: 600 12.5px/1 var(--font-text); color: var(--soft); }
.si-count--new { background: var(--blue); color: #fff; }
.si-group { font: 600 13px/18px var(--font-text); color: var(--soft); margin-bottom: -8px; }
/* Segmented: pick one of three */
.si-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 16px; background: var(--well); }
.si-seg button { display: flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border-radius: 13px; background: none; color: var(--soft); font: 600 14px/1 var(--font-text); }
.si-seg button[aria-pressed="true"] { background: var(--ground); color: var(--ink); box-shadow: 0 1px 2px rgba(14, 17, 22, 0.12), 0 0 0 1px var(--line); }
.si-seg .si-status { width: 16px; height: 16px; box-shadow: inset 0 0 0 2px currentColor; }
.si-seg .si-status--doing { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.si-seg .si-status--done { background: currentColor; }
/* Detail rows */
.si-rows { display: flex; flex-direction: column; border-radius: 16px; background: var(--well); padding: 0 14px; }
.si-rows button, .si-rows div { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 15px; line-height: 20px; }
.si-rows > :last-child { border-bottom: 0; }
.si-rows span { flex: 1 1 0; min-width: 0; }
.si-rows small { display: block; font-size: 13px; line-height: 18px; color: var(--soft); }
/* Thread */
.si-thread { display: flex; flex-direction: column; gap: 10px; }
.si-bubble { max-width: 86%; align-self: flex-start; padding: 10px 13px; border-radius: 16px 16px 16px 5px; background: var(--well); font-size: 15px; line-height: 21px; }
.si-bubble small { display: block; font-size: 12.5px; line-height: 17px; color: var(--soft); margin-bottom: 2px; font-weight: 600; }
.si-bubble--me { align-self: flex-end; border-radius: 16px 16px 5px 16px; background: var(--ink); color: #fff; }
.si-bubble--me small { color: #c3cad6; text-align: right; }
.si-bubble--wait { opacity: 0.6; }
.si-sysline { align-self: center; text-align: center; font-size: 12.5px; line-height: 17px; color: var(--soft); max-width: 90%; }
/* Composer */
.si-compose { position: relative; z-index: 6; flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px 26px 20px; background: var(--ground); border-top: 1px solid var(--line); }
.si-compose input { flex: 1 1 0; min-width: 0; height: 46px; padding: 0 16px; border: 0; border-radius: 23px; background: var(--well); color: var(--ink); font: 400 16px/1 var(--font-text); outline: 0; }
.si-compose input:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.si-compose button { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--hivis); box-shadow: inset 0 0 0 1px var(--hivis-edge); display: grid; place-items: center; }
.si-compose button[disabled] { background: var(--well); box-shadow: none; color: var(--faint); }
.si-compose--kbd { padding-bottom: 10px; }
.si-avatar--sm { width: 30px; height: 30px; font-size: 11.5px; }
.si-seg .si-status { color: inherit; }
.si-seg .si-status .si-icon { display: none; }
.si-item > .si-avatar { flex: none; }

/* ==========================================================================
   Added with pages 08 to 10 — emergency, finishing, the day's summary
   ========================================================================== */
/* Emergency hold: the only large red thing in the app */
.si-hold { position: relative; overflow: hidden; width: 184px; height: 184px; flex: none; align-self: center; border-radius: 50%; background: var(--red); color: #fff; box-shadow: 0 0 0 12px var(--red-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; touch-action: none; font: 400 15px/21px var(--font-text); }
.si-hold b { position: relative; font: 600 22px/27px var(--font-head); letter-spacing: -0.02em; }
.si-hold span { position: relative; }
.si-hold::before { content: ""; position: absolute; inset: auto 0 0 0; height: var(--fill, 0%); background: rgba(0, 0, 0, 0.3); }
.si-hold.is-holding::before { height: 100%; transition: height 3s linear; }
.si-btn--red { background: var(--red); color: #fff !important; box-shadow: none; }
.si-btn--redline { color: var(--red) !important; box-shadow: inset 0 0 0 1.5px var(--red); }
/* Summary cells */
.si-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.si-cells > div { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 14px; background: var(--well); }
.si-cells b { font: 600 22px/26px var(--font-head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.si-cells span { font-size: 13px; line-height: 18px; color: var(--soft); }
.si-win { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 16px; background: #ddf7ec; color: var(--green); font: 600 15px/20px var(--font-text); }
@media (prefers-reduced-motion: reduce) { .si-hold.is-holding::before { transition: none; } }

/* ==========================================================================
   Added with pages 11 to 14 — my days, fixing a day, leave, me
   ========================================================================== */
/* Week header */
.si-week { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.si-week b { font: 600 16px/22px var(--font-head); letter-spacing: -0.01em; }
/* A day in a list */
.si-days { display: flex; flex-direction: column; }
.si-day { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-size: 15px; line-height: 20px; }
.si-day:last-child { border-bottom: 0; }
.si-day__date { width: 44px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 5px 0; border-radius: 12px; background: var(--well); font: 600 12px/15px var(--font-text); color: var(--soft); }
.si-day__date b { font: 600 18px/21px var(--font-head); color: var(--ink); }
.si-day--today .si-day__date { background: var(--hivis); color: var(--ink); }
.si-day > span:nth-child(2) { flex: 1 1 0; min-width: 0; }
.si-day small { display: block; font-size: 13px; line-height: 18px; color: var(--soft); }
.si-day--off { color: var(--soft); }
/* Small status tag */
.si-tag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 13px; background: var(--well); font: 600 12.5px/1 var(--font-text); white-space: nowrap; }
.si-tag--warn { background: #fff6c2; }
.si-tag--blue { background: var(--blue-soft); color: var(--blue); }
.si-tag--red { background: var(--red-soft); color: var(--red); }
.si-tag--green { background: #ddf7ec; color: var(--green); }
/* Before and after, for a correction */
.si-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.si-compare > div { padding: 10px 12px; border-radius: 14px; background: var(--well); display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 18px; color: var(--soft); }
.si-compare b { font: 600 17px/22px var(--font-head); color: var(--ink); }
.si-compare > div.is-new { background: var(--ground); box-shadow: inset 0 0 0 2px var(--ink); }
/* Switch */
.si-switch { position: relative; width: 46px; height: 28px; flex: none; border-radius: 14px; background: var(--edge); transition: background var(--fast) var(--ease); }
.si-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left var(--fast) var(--ease); }
.si-switch[aria-checked="true"] { background: var(--ink); }
.si-switch[aria-checked="true"]::after { left: 21px; }
/* Selfie thumbnails on a past day */
.si-shots { display: flex; gap: 8px; }
.si-shots > div { flex: 1 1 0; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--well); font-size: 13px; line-height: 18px; color: var(--soft); }
.si-shots i { width: 40px; height: 40px; flex: none; border-radius: 10px; background: linear-gradient(160deg, #c9d3de 0 55%, #ffd60a 55%); }
.si-shots b { display: block; font: 600 14px/18px var(--font-time); color: var(--ink); letter-spacing: -0.02em; }

/* The PIN keypad on a white screen (cancelling an alert, changing the PIN) */
.si-screen:not(.si-screen--hivis) .si-key:not(.si-key--ghost) { background: var(--well); box-shadow: none; }
.si-screen:not(.si-screen--hivis) .si-key:active { background: var(--edge); }

/* ---- Page 11b (Fix a day) ---- */
.fx-step { display: flex; align-items: center; justify-content: center; gap: 14px; }
.fx-step b { min-width: 112px; text-align: center; font: 600 40px/44px var(--font-time); letter-spacing: -0.04em; }
.fx-step button { width: 48px; height: 48px; border-radius: 50%; background: var(--well); display: grid; place-items: center; }
