/* Hot Weeks — NHS style, matching the rota app */
:root {
  --blue: #005EB8;
  --blue-dark: #003B73;
  --blue-tint: #E6F0FA;
  --paper: #F7F5F0;
  --paper-2: #EFECE4;
  --white: #FFFFFF;
  --ink: #1A2B42;
  --slate: #34465C;
  --muted: #5B6B7F;
  --muted-2: #5F6367;
  --line: rgba(0, 59, 115, 0.14);
  --line-soft: rgba(0, 59, 115, 0.1);
  --amber: #A16207;
  --amber-ink: #4A2C00;
  --amber-ink-2: #6B3F00;
  --amber-bg: #FFF8E5;
  --amber-tag: #FFF1CC;
  --green: #007F3B;
  --green-ink: #004D24;
  --green-bg: #E3F3E9;
  --red: #B42318;
  --grey-marker: #D9DEE5;
  --chip-edge: inset 0 0 0 1px rgba(10, 26, 43, 0.28);
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans);
  font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased;
}
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid #FFB81C; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.page { flex: 1 0 auto; padding: 8px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.page.no-nav { padding-bottom: 24px; }

/* ── Loading ── */
.loading { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px; text-align: center; }
.loading img { width: 76px; height: 76px; border-radius: 17px; box-shadow: 0 4px 14px rgba(0, 59, 115, 0.18); margin-bottom: 16px; }
.loading .t1 { font-size: 19px; font-weight: 700; line-height: 1.25; }
.loading .t2 { font-size: 14px; color: var(--muted); margin-top: 4px; }
.loading .t3 { font-size: 15px; font-weight: 600; margin-top: 2px; }
.spin-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; display: inline-block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mono-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); }
.mono-muted { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }

/* ── Headers ── */
.app-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; padding-top: calc(12px + env(safe-area-inset-top)); }
.app-header img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 2px 6px rgba(0, 59, 115, 0.18); }
.app-header .titles { flex-grow: 1; min-width: 0; }
.app-header .t1 { font-size: 16px; font-weight: 700; line-height: 1.2; }
.app-header .t2 { font-size: 12px; color: var(--muted); line-height: 1.3; }
.me-chip { text-decoration: none; width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; padding: 0; }
.me-chip span { width: 34px; height: 34px; border-radius: 17px; font-family: var(--mono); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; box-shadow: var(--chip-edge); }
.sub-header { display: flex; align-items: center; gap: 4px; padding: 6px 8px; background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; padding-top: calc(6px + env(safe-area-inset-top)); }
.back-btn { display: flex; align-items: center; gap: 2px; height: 44px; padding: 0 10px 0 6px; border: 0; background: transparent; color: var(--blue); font-size: 15px; font-weight: 600; flex-shrink: 0; min-width: 96px; }
.sub-header h1 { font-size: 15px; font-weight: 700; flex-grow: 1; text-align: center; margin: 0; }
.sub-header .spacer { min-width: 96px; flex-shrink: 0; }

.banner { display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 13px; font-weight: 600; }
.banner.test { background: var(--amber-tag); color: var(--amber-ink); border-bottom: 1px solid var(--amber); }
.banner.plan { background: var(--blue-dark); color: var(--white); }
.banner.acting { background: var(--slate); color: var(--white); }
.banner button { margin-left: auto; background: transparent; border: 1.5px solid currentColor; color: inherit; border-radius: 8px; height: 32px; padding: 0 10px; font-size: 12.5px; font-weight: 600; }
.stale-pill { align-self: center; font-size: 12px; color: var(--slate); background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px 10px; display: flex; gap: 6px; align-items: center; }

/* ── Cards and controls ── */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.card.tight { padding: 0; overflow: hidden; }
.card h2, .section-title { font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.muted { color: var(--muted-2); }
.small { font-size: 12.5px; }
.xs { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex-grow: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.divider { height: 1px; background: var(--line); margin: 10px 0 9px; }

.btn { height: 46px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--blue); color: var(--white); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.big { height: 52px; border-radius: 12px; font-size: 16px; font-weight: 700; width: 100%; }
.btn.secondary { background: var(--white); color: var(--ink); border: 1.5px solid var(--muted); }
.btn.ghost { background: transparent; color: var(--ink); height: 44px; }
.btn.danger { background: var(--white); color: var(--red); border: 1.5px solid var(--red); }
.btn.small { height: 40px; font-size: 13px; padding: 0 12px; }
.btn:disabled { background: var(--muted); color: var(--white); border-color: var(--muted); opacity: 0.85; }
.btn.secondary:disabled { background: var(--paper-2); color: var(--muted); }
.btn .spin { border-color: rgba(255, 255, 255, 0.35); border-top-color: var(--white); }

.seg { display: flex; padding: 3px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line); }
.seg button { height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 600; flex: 1 1 0; min-width: 0; }
.seg button[aria-pressed="true"] { background: var(--blue); color: var(--white); }

.switch { flex-shrink: 0; position: relative; width: 52px; height: 44px; border: 0; background: transparent; padding: 0; }
.switch .track { position: absolute; left: 3px; top: 8px; width: 46px; height: 28px; border-radius: 14px; background: #6B7684; transition: background 0.15s; }
.switch .knob { position: absolute; top: 11px; left: 6px; width: 22px; height: 22px; border-radius: 11px; background: var(--white); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: left 0.15s; }
.switch[aria-checked="true"] .track { background: var(--blue); }
.switch[aria-checked="true"] .knob { left: 24px; }
.switch-row { display: flex; align-items: center; gap: 12px; min-height: 52px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.input { height: 48px; border: 1.5px solid var(--muted); border-radius: 10px; padding: 0 12px; background: var(--white); font-size: 16px; width: 100%; }
.input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.2); }
select.input { appearance: auto; }
.error-text { color: var(--red); font-size: 13px; font-weight: 600; }

/* ── Chips and tags ── */
.chip { flex-shrink: 0; min-width: 32px; padding: 2px 4px; border-radius: 6px; text-align: center; font-family: var(--mono); font-size: 11.5px; font-weight: 600; box-shadow: var(--chip-edge); display: inline-block; }
.you-tag { flex-shrink: 0; background: var(--white); color: var(--ink); font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 8px; }
.you-tag.blue { background: var(--blue-tint); color: var(--blue-dark); }
.clash-tag { flex-shrink: 0; display: inline-flex; align-items: center; gap: 3px; background: var(--amber-tag); color: var(--amber-ink-2); border: 1px solid var(--amber); font-size: 10.5px; font-weight: 700; padding: 0 6px; height: 18px; border-radius: 9px; }
.status-chip { flex-shrink: 0; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.status-chip.draft { background: var(--blue-tint); color: var(--blue-dark); border: 1px solid var(--blue); }
.status-chip.published { background: var(--green-bg); color: var(--green-ink); border: 1px solid var(--green); }
.status-chip.unallocated { background: var(--white); color: var(--slate); border: 1.5px dashed var(--muted); }
.status-chip.open { background: var(--white); color: var(--slate); border: 1px solid var(--muted); }

/* ── Notes ── */
.note { display: flex; align-items: flex-start; gap: 8px; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; }
.note.info { background: var(--blue-tint); color: var(--slate); }
.note.warn { background: var(--amber-bg); border: 1px solid var(--amber); color: var(--amber-ink); }
.note.ok { background: var(--green-bg); color: var(--green-ink); }
.note svg { flex-shrink: 0; margin-top: 2px; }
.note strong { font-weight: 700; }

/* ── Month view ── */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.month-nav .seg button { flex: 0 0 auto; padding: 0 10px; white-space: nowrap; height: 40px; }
.month-nav .arrows { display: flex; align-items: center; margin-left: -10px; }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--ink); padding: 0; }
.icon-btn:disabled { color: #B8C0CA; }
.month-title { font-size: 16px; font-weight: 700; min-width: 0; width: 118px; text-align: center; white-space: nowrap; }
.legend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; row-gap: 6px; }
.legend-person { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; }
.legend-person span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-keys { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 6px; font-size: 12px; color: var(--slate); }
.legend-keys > div { display: flex; align-items: center; gap: 5px; }
.k-circle { width: 14px; height: 14px; border-radius: 7px; background: var(--slate); display: inline-block; }
.k-square { width: 14px; height: 14px; border-radius: 3px; background: var(--slate); display: inline-block; }
.k-dash { width: 22px; height: 12px; border-radius: 4px; border: 1.5px dashed var(--muted); display: inline-block; }
.k-clash { width: 14px; height: 4px; border-radius: 2px; background: var(--amber); display: inline-block; }
.k-leave { width: 22px; height: 8px; border-radius: 4px; background: repeating-linear-gradient(135deg, var(--slate) 0 3px, #FFF 3px 6px); box-shadow: inset 0 0 0 1px rgba(10, 26, 43, 0.4); display: inline-block; }

.dow-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-top: 4px; }
.dow-row div { text-align: center; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); }
.dow-row div.we { color: var(--muted-2); }
.week { display: block; text-decoration: none; color: inherit; margin-bottom: 8px; border-radius: 10px; }
.week.past { opacity: 0.6; }
.band { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin-bottom: 4px; min-height: 30px; }
.seg-band { margin: 0 1px; height: 30px; border-radius: 8px; display: flex; align-items: center; gap: 6px; overflow: hidden; box-shadow: var(--chip-edge); }
.seg-band .ini { font-family: var(--mono); font-size: 12px; font-weight: 600; flex-shrink: 0; }
.seg-band .nm { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-grow: 1; min-width: 0; }
.seg-band.me { outline: 2.5px solid var(--ink); outline-offset: 1px; }
.seg-band.open { box-shadow: none; border: 1.5px dashed var(--muted); color: var(--slate); font-size: 12.5px; font-weight: 600; justify-content: center; background: transparent; }
.seg-band.unpub { box-shadow: none; border: 1.5px dashed #9AA5B1; color: var(--muted-2); font-size: 12px; font-weight: 600; justify-content: center; background: var(--paper-2); }
.seg-band.unfilled { box-shadow: none; border: 1.5px dashed #9AA5B1; color: var(--muted-2); font-size: 12px; justify-content: center; }
.seg-band.draft { box-shadow: none; border: 1.5px dashed var(--blue); color: var(--blue-dark); background: var(--blue-tint); font-size: 12px; font-weight: 600; justify-content: center; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--white); }
.day { position: relative; height: 64px; padding-top: 4px; display: flex; flex-direction: column; align-items: center; gap: 3px; border-left: 1px solid var(--line-soft); }
.day:first-child { border-left: 0; }
.day.we { background: var(--paper-2); }
.day .num { min-width: 22px; height: 22px; padding: 0 3px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; }
.day.other .num { color: #6B7684; }
.day.we .num { color: var(--muted-2); }
.day.today .num { background: var(--blue); color: var(--white); font-weight: 700; }
.day .bh { position: absolute; top: 2px; right: 2px; font-family: var(--mono); font-size: 8.5px; font-weight: 600; color: var(--muted-2); }
.markers { display: flex; gap: 2px; height: 18px; }
.mk { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(10, 26, 43, 0.35); flex-shrink: 0; }
.mk.oc { border-radius: 9px; }
.mk.ccu { border-radius: 4px; }
.strips { position: absolute; left: 5px; right: 5px; bottom: 10px; height: 6px; display: flex; gap: 2px; }
.strip { flex: 1 1 0; min-width: 0; height: 6px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(10, 26, 43, 0.4); }
.clash-bar { position: absolute; left: 7px; right: 7px; bottom: 3px; height: 4px; border-radius: 2px; background: var(--amber); }
.prompt-card { background: var(--blue-tint); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.prompt-card .t1 { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.prompt-card .t2 { font-size: 12.5px; color: var(--slate); margin-top: 2px; }

/* ── Mine list ── */
.mine-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-decoration: none; color: inherit; border-top: 1px solid var(--line-soft); min-height: 56px; }
.mine-item:first-child { border-top: 0; }

/* ── Week detail ── */
.big-date { font-size: 22px; font-weight: 700; margin-top: 2px; line-height: 1.2; }
.holder-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; box-shadow: var(--chip-edge); }
.holder-card .ini { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.holder-card .nm { font-size: 15px; font-weight: 600; flex-grow: 1; }
.holder-card .dd { font-size: 12.5px; font-weight: 600; opacity: 0.9; }
.dashed-box { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 10px; border: 1.5px dashed var(--muted); color: var(--slate); font-size: 14px; font-weight: 600; text-align: center; padding: 8px 12px; }
.check-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.45; }
.check-row + .check-row { margin-top: 10px; }
.tick { flex-shrink: 0; width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.tick.ok { background: var(--green); }
.tick.info { background: var(--blue-tint); }
.tick.warn { background: var(--amber-tag); border: 1px solid var(--amber); }
.day-table-head { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr); padding: 0 12px 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); }
.day-table-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr); align-items: center; min-height: 54px; padding: 6px 12px; border-top: 1px solid var(--line-soft); }
.day-table-row:first-child { border-top: 0; }
.day-table-row.leave { background: var(--amber-bg); }
.day-table-row .dname { font-size: 13px; font-weight: 700; }
.person-cell { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; }
.person-cell span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leave-tag { display: inline-block; margin-top: 2px; background: var(--amber-tag); color: var(--amber-ink-2); border: 1px solid var(--amber); font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 8px; }
.cover-mini { display: inline-block; margin-top: 2px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 0 4px; border-radius: 4px; box-shadow: var(--chip-edge); }
.sticky-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.admin-card { border: 1.5px solid var(--blue-dark); }
.admin-card .mono-label { color: var(--blue-dark); }
.days-edit { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 10px; align-items: center; }

/* ── Choice lists (radio / checkbox rows) ── */
.choice { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid rgba(0, 59, 115, 0.2); background: var(--white); text-align: left; color: var(--ink); }
.choice[aria-checked="true"] { border: 2px solid var(--blue); background: var(--blue-tint); }
.choice .t1 { display: block; font-size: 14.5px; font-weight: 700; }
.choice .t2 { display: block; font-size: 12.5px; color: var(--slate); margin-top: 1px; }
.radio-dot { flex-shrink: 0; width: 20px; height: 20px; border-radius: 10px; border: 2px solid var(--muted); display: flex; align-items: center; justify-content: center; }
.radio-dot::after { content: ''; width: 10px; height: 10px; border-radius: 5px; background: transparent; }
[aria-checked="true"] > .radio-dot { border-color: var(--blue); }
[aria-checked="true"] > .radio-dot::after { background: var(--blue); }
.check-box { flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--muted); background: var(--white); color: var(--white); font-size: 14px; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; }
.check-box.on { border-color: var(--blue); background: var(--blue); }
.list-choice { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 14px; border: 0; border-top: 1px solid var(--line-soft); background: var(--white); text-align: left; color: var(--ink); }
.list-choice:first-child { border-top: 0; }
.list-choice[aria-checked="true"], .list-choice[aria-checked="mixed"] { background: var(--blue-tint); }
.list-choice.warnbg { background: var(--amber-bg); }
.list-choice .t1 { display: block; font-size: 13.5px; font-weight: 600; }
.list-choice .t2 { display: block; font-size: 12px; color: var(--slate); }
.list-choice .flag { display: inline-block; margin-top: 2px; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 8px; }
.flag.warn { background: var(--amber-tag); color: var(--amber-ink-2); border: 1px solid var(--amber); }
.flag.info { background: var(--blue-tint); color: var(--blue-dark); }
.day-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.day-chip { height: 62px; border-radius: 10px; border: 1.5px solid rgba(0, 59, 115, 0.2); background: var(--white); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; }
.day-chip .dw { font-size: 12px; font-weight: 600; }
.day-chip .dn { font-size: 17px; font-weight: 700; line-height: 1; }
.day-chip .tg { font-size: 10px; font-weight: 700; height: 12px; line-height: 12px; color: var(--amber-ink-2); }
.day-chip.leave { background: var(--amber-bg); }
.day-chip[aria-checked="true"] { border: 2px solid var(--blue); background: var(--blue); color: var(--white); }
.day-chip[aria-checked="true"] .tg { color: var(--white); }
.day-chip:disabled { background: var(--paper-2); color: #8A96A3; border-style: dashed; }
.summary { background: var(--blue-tint); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.5; }

/* ── Swaps ── */
.swap-card { display: flex; flex-direction: column; gap: 10px; }
.swap-card .who { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.badge { min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: var(--white); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.return-pick { display: flex; flex-direction: column; gap: 4px; }

/* ── Plan ── */
.plan-row { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); text-align: left; color: var(--ink); }
.plan-row[aria-pressed="true"] { border: 2px solid var(--blue); background: var(--blue-tint); }
.plan-row:disabled { opacity: 1; background: #FBFAF7; }
.plan-row .lbl { flex-shrink: 0; width: 92px; font-size: 13.5px; font-weight: 700; }
.plan-row .choose { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--slate); border: 1.5px dashed var(--muted); border-radius: 6px; padding: 2px 8px; }
.plan-clash { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 11.5px; font-weight: 700; color: var(--amber-ink-2); }
.assign-panel { background: var(--white); border: 1.5px solid var(--blue); border-radius: 12px; overflow: hidden; }
.assign-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--blue-tint); }
.month-head { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); margin: 8px 2px 0; }
.publish-bar { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); margin: 0 -16px; padding: 10px 16px 8px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }

/* ── Tally ── */
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.stat .v { font-size: 24px; font-weight: 700; line-height: 1; }
.stat .l { font-size: 12px; color: var(--slate); margin-top: 4px; }
.tally-row { display: flex; align-items: center; gap: 10px; min-height: 64px; border-top: 1px solid var(--line-soft); }
.tally-row:first-of-type { border-top: 0; }
.bar { display: flex; height: 12px; border-radius: 6px; background: var(--paper-2); margin-top: 6px; overflow: hidden; }
.bar .done { box-shadow: var(--chip-edge); }
.bar .booked { opacity: 0.35; border: 1.5px dashed var(--slate); border-radius: 0 6px 6px 0; }
.tally-num { flex-shrink: 0; width: 92px; text-align: right; }
.tally-num .w { font-size: 20px; font-weight: 700; line-height: 1; }
.tally-num .d { font-size: 11.5px; color: var(--slate); margin-top: 3px; }
.date-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── Settings ── */
.set-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 14px; border-top: 1px solid var(--line-soft); }
.set-row:first-child { border-top: 0; }
.set-row .t1 { font-size: 14px; font-weight: 600; }
.set-row .t2 { font-size: 12px; color: var(--muted-2); line-height: 1.3; }
.log-item { padding: 10px 14px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.log-item:first-child { border-top: 0; }

/* ── Bottom nav ── */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav-inner { max-width: 560px; margin: 0 auto; display: flex; }
.nav a { flex: 1 1 0; min-width: 0; height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--slate); text-decoration: none; font-size: 11.5px; font-weight: 600; position: relative; }
.nav a[aria-current="page"] { color: var(--blue); }
.nav a .badge { position: absolute; top: 8px; left: calc(50% + 6px); }

/* ── Toast, install banner, modal ── */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); z-index: 60; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.toast { max-width: 520px; background: var(--ink); color: var(--white); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.4; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); pointer-events: auto; }
.toast.error { background: #7A1A12; }
.install { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 25; padding: 8px 12px; }
.install-inner { max-width: 536px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(0, 59, 115, 0.16); display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; }
.modal-back { position: fixed; inset: 0; background: rgba(10, 26, 43, 0.45); z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--white); width: 100%; max-width: 560px; border-radius: 16px 16px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); max-height: 90vh; overflow: auto; }
.modal h2 { font-size: 17px; margin: 0; }
.step { display: flex; gap: 12px; padding: 10px 0; }
.step-num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 14px; background: var(--blue); color: var(--white); font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ── Sign in ── */
.signin { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px 16px; gap: 16px; max-width: 420px; margin: 0 auto; }
.signin .brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 8px; }
.signin .brand img { width: 64px; height: 64px; border-radius: 14px; box-shadow: 0 4px 14px rgba(0, 59, 115, 0.18); margin-bottom: 12px; }

