/* ============================================================
   FINALS — Calendar & Handover
   Look: westmarsurveys.com — white & light grey, #222 ink, gold #B08F5A
   rules and numerals, Barlow, bold uppercase headings. Large type for
   easy reading. Light / dark via [data-theme] ("auto" follows the phone).
   ============================================================ */

:root {
  --bg:        #f4f4f2;
  --paper:     #ffffff;
  --raised:    #ffffff;
  --ink:       #222222;
  --ink-soft:  #4a4a4a;
  --ink-faint: #767676;
  --line:      #e3e3e1;
  --line-soft: #eeeeec;
  --field:     #fafafa;
  --accent:    #222222;
  --accent-2:  #b08f5a;
  --accent-ink:#ffffff;
  --accent-soft: rgba(34,34,34,.06);
  --gold:      #b08f5a;
  --gold-2:    #d6bd8f;
  --gold-text: #8a6b3a;          /* gold dark enough to read as text */
  --brand:     #222222;
  --brand-ink: #ffffff;
  --good:      #2d7d4f;
  --warn:      #b93a26;
  --amber:     #946a22;
  --head-bg:   #ffffff;
  --glass:     color-mix(in srgb, var(--bg) 94%, transparent);
  --btn:       #222222; --btn-hover: #000000; --btn-ink: #ffffff;
  --shadow:    0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 10px 30px rgba(0,0,0,.08);
  --shadow-lg: 0 30px 80px rgba(0,0,0,.25);
  --r-sm: 3px; --r: 4px; --r-lg: 4px;
  --font: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: var(--font); --font-display: var(--font);
  --tabbar-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: #0c0c0c; --paper: #161616; --raised: #202020; --ink: #f0f0ee; --ink-soft: #c2c2be; --ink-faint: #8f8f8a;
    --line: #2c2c2a; --line-soft: #222221; --field: #111111; --accent: #f0f0ee; --accent-ink: #111111;
    --accent-soft: rgba(255,255,255,.07); --brand: #f0f0ee; --brand-ink: #111111; --gold-text: #d6bd8f;
    --good: #5cc98f; --warn: #ff7a66; --amber: #e8b964; --head-bg: #121212;
    --btn: #f0f0ee; --btn-hover: #ffffff; --btn-ink: #111111;
    --shadow: 0 1px 2px rgba(0,0,0,.5); --shadow-md: 0 14px 40px rgba(0,0,0,.6); --shadow-lg: 0 30px 80px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
[data-theme="dark"] {
  --bg: #0c0c0c; --paper: #161616; --raised: #202020; --ink: #f0f0ee; --ink-soft: #c2c2be; --ink-faint: #8f8f8a;
  --line: #2c2c2a; --line-soft: #222221; --field: #111111; --accent: #f0f0ee; --accent-ink: #111111;
  --accent-soft: rgba(255,255,255,.07); --brand: #f0f0ee; --brand-ink: #111111; --gold-text: #d6bd8f;
  --good: #5cc98f; --warn: #ff7a66; --amber: #e8b964; --head-bg: #121212;
  --btn: #f0f0ee; --btn-hover: #ffffff; --btn-ink: #111111;
  --shadow: 0 1px 2px rgba(0,0,0,.5); --shadow-md: 0 14px 40px rgba(0,0,0,.6); --shadow-lg: 0 30px 80px rgba(0,0,0,.8);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  line-height: 1.45; font-size: 15.5px; letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" 1, "cv11" 1;
}
[hidden] { display: none !important; }
svg { flex: none; }
h1, h2, h3 { font-family: var(--font); font-weight: 650; letter-spacing: -.02em; margin: 0; }
.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; letter-spacing: -.02em; }
b, strong { font-weight: 620; }

#app { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }

/* ============================== HEADER ============================== */
.app-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
/* the blur is desktop-only: on phones it would trap the fixed bottom tab bar inside the header */
@media (min-width: 900px) {
  .app-header { background: var(--glass); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); }
}
.burgee {
  width: 36px; height: 36px; flex: none; border-radius: 11px;
  background: linear-gradient(140deg, var(--hero-2), var(--accent-2));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.25);
}
.burgee svg { width: 22px; height: 22px; }
.app-header .title { flex: 1; min-width: 0; }
.app-header .title .wm { font-weight: 700; font-size: 18px; letter-spacing: -.02em; line-height: 1.1; text-transform: none; }
.app-header .title .sub { font-size: 12px; color: var(--ink-faint); font-weight: 500; }
.icon-btn {
  flex: none; width: 38px; height: 38px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft);
  display: grid; place-items: center; cursor: pointer; font-size: 17px; transition: background .15s, transform .1s;
}
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--field); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.me-pill {
  display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; white-space: nowrap;
  padding: 6px 12px 6px 9px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink);
}
.me-pill .dot { width: 10px; height: 10px; }

/* ---- tabs: bottom bar on phones, segmented pill on desktop ---- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--glass);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px 4px; border-radius: 12px; text-decoration: none; position: relative;
  color: var(--ink-faint); font-size: 11px; font-weight: 600; letter-spacing: 0;
  transition: color .15s;
}
.tabs a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current="page"] { color: var(--accent); }
.tabs a[aria-current="page"] svg { stroke-width: 2.1; }
.tabs a.has-new::after {
  content: ""; position: absolute; top: 4px; left: calc(50% + 9px);
  width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--paper);
}
@media (max-width: 899px) {
  :root { --tabbar-h: calc(62px + env(safe-area-inset-bottom)); }
  #app { padding-bottom: var(--tabbar-h); }
}

/* ============================== PROGRESS (handover) ============================== */
.progress {
  position: sticky; top: var(--header-h, 0); z-index: 29;
  padding: 10px 16px 12px; background: var(--glass);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--line);
}
.progress-track { height: 6px; border-radius: 6px; background: var(--line-soft); overflow: hidden; }
.progress-fill {
  height: 100%; width: 0%; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.progress-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-top: 7px; display: flex; justify-content: space-between; }
.progress-label #progressCount { font-family: var(--font-mono); color: var(--ink-faint); }

/* ============================== CARDS & FIELDS ============================== */
main { padding: 16px 14px 120px; display: flex; flex-direction: column; gap: 14px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 8px; }
.card-head .step {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 7px; padding: 3px 7px; flex: none;
}
.card-head h2 { font-size: 17px; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-head .hint { margin-left: auto; font-size: 12px; color: var(--ink-faint); }
.card-body { padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 16px; }

.field label.flabel, .flabel {
  display: block; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--ink-soft); margin-bottom: 7px;
}
.flabel .req { color: var(--warn); margin-left: 2px; }
.field-note { font-size: 12.5px; color: var(--ink-faint); margin-top: 6px; }

input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="password"], textarea, select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input[type="date"] { min-height: 48px; }
input[type="number"], .mono-input { font-family: var(--font-mono); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); background: var(--paper);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input[type="file"] { display: none; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-2 .field { min-width: 0; }

.computed { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin-top: 10px; }
.computed b { font-family: var(--font-mono); color: var(--ink); font-weight: 500; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 14px; font-weight: 550; display: inline-flex; align-items: center;
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  background: var(--field); color: var(--ink-soft); border: 1px solid var(--line);
  transition: transform .08s, background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.chip:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] {
  background: var(--accent-soft); color: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.chip .dot { margin-right: 7px; }

/* segmented controls */
.segmented, .seg-toggle {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--line-soft); border-radius: 12px; padding: 3px; gap: 2px; border: none;
}
.segmented button, .seg-toggle button {
  font: inherit; font-size: 13.5px; font-weight: 600; white-space: nowrap;
  padding: 9px 12px; border: none; border-radius: 9px; background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.segmented button { padding: 11px 4px; }
.segmented button[aria-pressed="true"], .seg-toggle button[aria-pressed="true"] {
  background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.06);
}
[data-theme="dark"] .segmented button[aria-pressed="true"], [data-theme="dark"] .seg-toggle button[aria-pressed="true"] { background: var(--raised); }
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .segmented button[aria-pressed="true"], [data-theme="auto"] .seg-toggle button[aria-pressed="true"] { background: var(--raised); }
}
.seg-toggle.wide { display: grid; }

/* switch */
.switch-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--field); border: 1px solid var(--line); border-radius: var(--r); }
.switch-row .sr-text { flex: 1; min-width: 0; }
.switch-row .sr-text .t { font-weight: 600; font-size: 15px; }
.switch-row .sr-text .d { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }
.switch { flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--line); border: none; cursor: pointer; position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch[aria-pressed="true"] { background: var(--good); }
.switch[aria-pressed="true"]::after { transform: translateX(20px); }
.switch.is-warn[aria-pressed="true"] { background: var(--warn); }

/* binary choice */
.binary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.binary button {
  font: inherit; font-size: 14px; font-weight: 600; padding: 13px; border-radius: 12px; cursor: pointer;
  background: var(--field); border: 1px solid var(--line); color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.binary button .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .4; border: none; }
.binary button.opt-good[aria-pressed="true"] { background: var(--good); border-color: var(--good); color: #fff; }
.binary button.opt-warn[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: #fff; }
.binary button[aria-pressed="true"] .dot { opacity: 1; }

/* checks */
.checks { display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--field); border: 1px solid var(--line); cursor: pointer; user-select: none; }
.check .box { flex: none; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line); background: var(--paper); display: grid; place-items: center; transition: all .15s; }
.check .box svg { width: 14px; height: 14px; stroke: #fff; opacity: 0; }
.check[aria-pressed="true"] .box { background: var(--good); border-color: var(--good); }
.check[aria-pressed="true"] .box svg { opacity: 1; }
.check .ctext { font-size: 15px; font-weight: 500; }

/* photos */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-slot {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden;
  background: var(--field); border: 1.5px dashed var(--line); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; text-align: center;
  transition: border-color .15s, background .15s;
}
.photo-slot:hover { border-color: var(--accent); background: var(--accent-soft); }
.photo-slot .ps-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); line-height: 1.2; }
.photo-slot .ps-icon { font-size: 20px; color: var(--ink-faint); }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot.filled { border-style: solid; border-color: var(--line); }
.photo-slot .ps-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 9px 7px; font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); display: flex; align-items: center; gap: 5px; }
.photo-slot .ps-remove { position: absolute; top: 6px; right: 6px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 15px; cursor: pointer; display: none; place-items: center; backdrop-filter: blur(6px); }
.photo-slot.filled .ps-remove { display: grid; }
.photo-meta { font-size: 12px; color: var(--ink-faint); margin-top: 10px; text-align: right; }

/* ============================== BUTTONS ============================== */
.footer-bar {
  position: fixed; left: 0; right: 0; bottom: var(--tabbar-h); z-index: 40;
  padding: 10px 14px 10px;
  background: var(--glass); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
.btn {
  width: 100%; font: inherit; font-weight: 600; font-size: 15.5px; letter-spacing: -.01em;
  padding: 14px 16px; border-radius: 14px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .08s, opacity .15s, background .15s, box-shadow .15s; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.btn:active { transform: scale(.985); }
.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-primary .sub { font-weight: 400; font-size: 13px; opacity: .85; }
.btn-ghost { background: var(--field); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--line-soft); }
.btn-brand { background: var(--brand); color: var(--brand-ink); }
.btn[disabled] { opacity: .45; pointer-events: none; box-shadow: none; }
.btn + .btn { margin-top: 9px; }
.btn-sm { width: auto; padding: 9px 15px; font-size: 14px; border-radius: 12px; }

.mini-btn {
  margin-left: auto; font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); border: none;
  border-radius: 9px; padding: 6px 11px; cursor: pointer; white-space: nowrap;
}
.mini-btn:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.mini-btn:active { transform: scale(.95); }
.muted-link { color: var(--accent); font-weight: 600; cursor: pointer; background: none; border: none; font: inherit; }
.danger { color: var(--warn) !important; background: color-mix(in srgb, var(--warn) 10%, transparent) !important; }
.danger-text { color: var(--warn); }

/* ============================== SHEETS ============================== */
.scrim {
  position: fixed; inset: 0; z-index: 90; background: rgba(5,10,18,.45);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: none; align-items: flex-end; justify-content: center;
}
.scrim.open { display: flex; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 520px; background: var(--paper);
  border-radius: 26px 26px 0 0; padding: 6px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg); max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
}
.scrim.open .sheet { animation: up .32s cubic-bezier(.32,.72,0,1); }
@keyframes up { from { transform: translateY(40px); } }
.sheet-grip { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 8px auto 16px; }
.sheet h2 { font-size: 22px; margin-bottom: 4px; }
.sheet .sheet-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 18px; }
.sheet-section { margin-bottom: 22px; }
.sheet-section .flabel { margin-bottom: 10px; }

.theme-opts { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.theme-opt { border: 1.5px solid var(--line); border-radius: var(--r); padding: 8px; cursor: pointer; background: var(--field); text-align: center; font: inherit; color: var(--ink); }
.theme-opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-opt .sw { height: 40px; border-radius: 9px; margin-bottom: 7px; overflow: hidden; display: flex; border: 1px solid var(--line); }
.theme-opt .sw span { flex: 1; }
.theme-opt .nm { font-size: 12.5px; font-weight: 600; }

.result-row { display: flex; align-items: center; gap: 13px; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
.result-row:last-child { border-bottom: none; }
.result-row .ri { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 19px; background: var(--field); border: 1px solid var(--line); }
.result-row .rt { flex: 1; min-width: 0; }
.result-row .rt .t { font-weight: 600; font-size: 15px; }
.result-row .rt .d { font-size: 12.5px; color: var(--ink-faint); }
.result-row .rc { color: var(--accent); font-size: 20px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 84px); transform: translateX(-50%) translateY(10px);
  background: var(--brand); color: var(--brand-ink); font-size: 14px; font-weight: 550;
  padding: 11px 18px; border-radius: 14px; box-shadow: var(--shadow-lg);
  z-index: 95; opacity: 0; pointer-events: none; transition: all .25s; max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.missing-list { font-size: 14px; color: var(--ink-soft); margin: 0 0 18px; padding-left: 18px; }
.missing-list li { margin: 4px 0; }
.missing-list.tappable { list-style: none; padding-left: 0; }
.missing-list.tappable li {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin: 6px 0; border-radius: 12px; cursor: pointer;
  background: var(--field); border: 1px solid var(--line); font-size: 14.5px; color: var(--ink); font-weight: 500;
}
.missing-list.tappable li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--warn); }
.missing-list.tappable li .arr { margin-left: auto; color: var(--ink-faint); }

.success-mark { width: 64px; height: 64px; border-radius: 50%; margin: 6px auto 14px; background: var(--good); display: grid; place-items: center; box-shadow: 0 8px 24px color-mix(in srgb, var(--good) 35%, transparent); }
.success-mark svg { width: 30px; height: 30px; stroke: #fff; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin .7s linear infinite; }
.spinner.dark, .boot .spinner { width: 30px; height: 30px; border-color: var(--line); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 200; }

@media (prefers-reduced-motion: no-preference) {
  .view:not([hidden]) > * { animation: rise .35s cubic-bezier(.2,.7,.2,1) both; }
  main > .card:nth-child(2) { animation-delay: .03s } main > .card:nth-child(3) { animation-delay: .06s }
  @keyframes rise { from { transform: translateY(8px); opacity: .001; } }
}

/* ============================== HANDOVER BITS ============================== */
.card-head .sec-status {
  margin-left: auto; flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; border: 1.5px solid var(--line); background: var(--field); transition: all .2s;
}
.card-head .sec-status svg { width: 13px; height: 13px; stroke: #fff; opacity: 0; transition: opacity .2s; }
.card-head .sec-status.done { background: var(--good); border-color: var(--good); }
.card-head .sec-status.done svg { opacity: 1; }
.card-head .hint + .sec-status { margin-left: 10px; }

.label-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.label-row .flabel { margin-bottom: 0; }

.nights-pill { display: block; font-size: 14px; color: var(--ink-soft); }
.nights-pill small { display: block; margin-top: 2px; }
.nights-pill b { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }
.nights-pill small { font-size: 12.5px; color: var(--ink-faint); }

.carryover {
  display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--accent-soft); font-size: 13px; color: var(--ink-soft);
}
.carryover .co-val { font-family: var(--font-mono); color: var(--ink); font-weight: 500; }
.carryover .mini-btn { margin-left: auto; background: var(--paper); }

.sig-wrap { position: relative; }
.sig-pad { width: 100%; height: 170px; border-radius: var(--r); touch-action: none; background: var(--field); border: 1.5px solid var(--line); display: block; }
.sig-pad.signed { border-color: color-mix(in srgb, var(--good) 55%, var(--line)); }
.sig-baseline { position: absolute; left: 16px; right: 16px; bottom: 46px; border-bottom: 1.5px dashed var(--line); pointer-events: none; }
.sig-hint { position: absolute; left: 18px; bottom: 26px; font-size: 12px; color: var(--ink-faint); pointer-events: none; transition: opacity .2s; }
.sig-x { position: absolute; left: 18px; bottom: 50px; font-size: 18px; color: var(--ink-faint); pointer-events: none; }
.sig-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.sig-by { font-size: 13px; color: var(--ink-soft); }
.sig-by b { color: var(--ink); }

.card.flash { animation: flashCard 1.4s ease; }
@keyframes flashCard { 0%, 100% { box-shadow: var(--shadow); } 20%, 60% { box-shadow: 0 0 0 2px var(--accent), var(--shadow); } }

.choice-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; background: var(--field); border: 1px solid var(--line); border-radius: var(--r); }
.choice-row + .choice-row { margin-top: 8px; }
.choice-row .cr-label { flex: 1; min-width: 0; font-weight: 500; font-size: 14.5px; }
.cr-seg { display: flex; gap: 2px; flex: none; background: var(--line-soft); border-radius: 10px; padding: 3px; }
.cr-seg button { font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; padding: 7px 13px; border: none; border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer; }
.cr-seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.cr-seg button.is-good[aria-pressed="true"] { background: var(--good); color: #fff; }
.cr-seg button.is-warn[aria-pressed="true"] { background: var(--warn); color: #fff; }

.check-group-title { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin: 18px 0 9px; }
.checks > .check-group-title:first-child { margin-top: 2px; }

.ci { padding: 13px 14px; border-radius: var(--r); background: var(--field); border: 1px solid var(--line); }
.ci + .ci { margin-top: 8px; }
.ci-head { display: flex; align-items: flex-start; gap: 10px; }
.ci-text { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; line-height: 1.35; }
.ci-text small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-faint); margin-top: 3px; line-height: 1.35; }
.ci-note-btn { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-faint); cursor: pointer; display: grid; place-items: center; font-size: 15px; }
.ci-note-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.ci-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 11px; }
.ci-opts button { font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft); }
.ci-opts button:active { transform: scale(.96); }
.ci-opts button.opt-yes[aria-pressed="true"] { background: var(--good); border-color: var(--good); color: #fff; }
.ci-opts button.opt-no[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: #fff; }
.ci-opts button.opt-na[aria-pressed="true"] { background: var(--ink-soft); border-color: var(--ink-soft); color: var(--paper); }
.ci-note { margin-top: 10px; display: none; }
.ci-note.open { display: block; }
.ci-note .cn-label { font-size: 12px; font-weight: 600; color: var(--ink-faint); margin-bottom: 5px; display: block; }
.ci-note input { padding: 10px 12px; font-size: 14px; border-radius: 10px; background: var(--paper); }
.ci-note.req input { border-color: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 16%, transparent); }
.ci-note.req .cn-label { color: var(--warn); }
.ci-req-note { font-size: 12px; font-weight: 600; color: var(--warn); margin-top: 6px; display: none; }
.ci-note.req .ci-req-note { display: block; }
.ci.flash-req { animation: flashReq 1.4s ease; }
@keyframes flashReq { 0%,100%{ box-shadow: none; } 25%,65%{ box-shadow: 0 0 0 2px var(--warn); } }

.signed-as { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; }
.signed-as small { font-weight: 400; color: var(--ink-faint); font-size: 13px; }
.cloud-status { font-size: 13.5px; padding: 10px 12px; border-radius: 12px; margin: -6px 0 16px; text-align: center; }
.cloud-status.ok { color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); }
.cloud-status.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.cloud-status .mini-btn { margin-left: 6px; }

/* ============================== SHARED BITS ============================== */
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); vertical-align: -1px; }
.dot.lg { width: 16px; height: 16px; }
.empty-note { color: var(--ink-faint); font-size: 14px; padding: 10px 2px; }
.faint { color: var(--ink-faint); }

/* ============================== LOGIN ============================== */
.auth {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--accent-2) 35%, transparent), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%),
    linear-gradient(160deg, var(--hero-1), #071425);
}
.auth-card { width: 100%; max-width: 400px; background: var(--paper); border-radius: 24px; padding: 28px 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-brand .burgee { width: 44px; height: 44px; border-radius: 13px; }
.auth-brand .burgee svg { width: 27px; height: 27px; }
.auth-wm { font-weight: 700; font-size: 20px; letter-spacing: -.02em; line-height: 1.1; }
.auth-sub { font-size: 13px; color: var(--ink-faint); }
.auth-card h2 { font-size: 24px; margin-bottom: 4px; }
.auth-card .sheet-sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 20px; }
.auth-card .field { margin-bottom: 14px; }
.auth-err { font-size: 13.5px; color: var(--warn); min-height: 4px; margin-bottom: 12px; }
.auth-err.ok { color: var(--good); }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 18px; font-size: 14px; }

/* ============================== VIEWS ============================== */
.view { flex: 1; }
.view.narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 14px 40px; }
.list-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 2px 16px; }
.list-head h2 { font-size: 26px; letter-spacing: -.03em; }
.list-head .hint { font-size: 13.5px; color: var(--ink-faint); }
.list { display: flex; flex-direction: column; gap: 8px; }

/* ============================== CALENDAR ============================== */
#view-calendar { padding: 14px 12px 40px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-content: start; }
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 6px; margin-right: auto; }
.cal-title { font-size: 24px; font-weight: 700; letter-spacing: -.03em; min-width: 170px; text-align: center; }
.icon-btn.ghost { width: 36px; height: 36px; }
.cal-nav .mini-btn { margin-left: 6px; }
.cal-hint { font-size: 12.5px; color: var(--ink-faint); margin-top: -4px; }
.cal-side { display: grid; gap: 14px; align-content: start; }
.cal-side .card-head h2 { font-size: 15.5px; }
#calGrid { align-self: start; }

@media (max-width: 620px) {
  .cal-toolbar #calAdd { order: 3; width: 100%; padding: 12px; }
  .cal-title { min-width: 0; font-size: 21px; flex: 1; }
  .cal-nav { flex: 1; }
}

/* month */
.cal-month { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.mh { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.mh div { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--ink-faint); padding: 10px 0 8px; }
.mgrid { display: grid; grid-template-columns: repeat(7, 1fr); }
.mday {
  font: inherit; color: var(--ink); background: none; border: none; cursor: pointer; text-align: left;
  min-height: 78px; padding: 6px 0 6px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: background .12s;
}
.mday:nth-child(7n) { border-right: none; }
.mday .num {
  font-size: 13px; font-weight: 600; font-family: var(--font-mono); letter-spacing: -.03em;
  width: 26px; height: 26px; display: grid; place-items: center; margin-left: 4px; border-radius: 50%;
}
.mday.weekend { background: color-mix(in srgb, var(--ink) 2.2%, transparent); }
.mday.out { color: var(--ink-faint); }
.mday.out .bars { opacity: .4; }
.mday.today .num { color: #fff; background: var(--accent); box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 40%, transparent); }
.mday.picked { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.mday:hover { background: var(--accent-soft); }
.bars { display: flex; flex-direction: column; gap: 3px; }
.bar {
  height: 20px; font-size: 11.5px; font-weight: 650; color: #0d1520; line-height: 20px;
  padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar.s { margin-left: 4px; border-top-left-radius: 7px; border-bottom-left-radius: 7px; }
.bar.e { margin-right: 4px; border-top-right-radius: 7px; border-bottom-right-radius: 7px; }
.bar.empty { background: none; }
@media (min-width: 900px) { .mday { min-height: 108px; } .bar { height: 24px; line-height: 24px; font-size: 12.5px; } }

/* year */
.ywrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.ygrid { display: grid; grid-template-columns: repeat(12, minmax(84px, 1fr)); min-width: 1010px; }
.ycol { border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; }
.ycol:last-child { border-right: none; }
.ymonth { font-weight: 650; font-size: 13px; text-align: center; padding: 10px 0; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); }
.yday {
  --fill: transparent; font: inherit; color: var(--ink); border: none; border-bottom: 1px solid var(--line-soft); cursor: pointer;
  height: 25px; display: flex; align-items: center; gap: 4px; padding: 0 6px; text-align: left; background: var(--fill); min-width: 0;
}
.yday.blank { cursor: default; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.yday .yd { font-family: var(--font-mono); font-size: 11px; width: 16px; text-align: right; flex: none; }
.yday .yw { font-size: 10px; color: var(--ink-faint); width: 16px; flex: none; }
.yday.booked, .yday.booked .yw { color: #0d1520; }
.yday.booked .yw { opacity: .55; }
.yday.weekend .yd, .yday.weekend .yw { font-weight: 700; }
.yday.weekend:not(.booked) { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.yday .yl { font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yday.today { box-shadow: inset 0 0 0 2px var(--accent); }
.yday.picked { box-shadow: inset 0 0 0 2px var(--ink); }
.yday:not(.blank):hover { filter: brightness(.95); box-shadow: inset 0 0 0 1px var(--ink-faint); }

/* range picking bar */
.pick-bar {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 14px); transform: translateX(-50%);
  z-index: 60; background: var(--brand); color: var(--brand-ink); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 24px); flex-wrap: wrap;
}
.pick-bar .pb-text { font-size: 14px; margin-right: 6px; }
.pick-bar .mini-btn { margin-left: 0; color: var(--brand-ink); background: color-mix(in srgb, var(--brand-ink) 14%, transparent); }

/* ---------- rounds hero card ---------- */
.card-rounds {
  border: none; color: #fff; position: relative;
  background:
    radial-gradient(500px 260px at 100% 0%, color-mix(in srgb, var(--accent-2) 45%, transparent), transparent 70%),
    linear-gradient(155deg, var(--hero-2), var(--hero-1) 75%);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--hero-1) 35%, transparent);
}
.card-rounds .card-body { padding: 18px 18px 18px; gap: 14px; }
.clock { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.clock-time { font-size: 30px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.clock-date { font-size: 13px; opacity: .75; }
.round-head { font-size: 15px; line-height: 1.4; opacity: .95; }
.round-head b { font-weight: 650; }
.countdown {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 12px 14px;
}
.cd-label { font-size: 12px; font-weight: 600; opacity: .75; grid-column: 1; }
.cd-val { font-size: 24px; font-weight: 600; letter-spacing: -.03em; grid-column: 1 / -1; }
.cd-at { font-size: 12px; opacity: .7; grid-column: 2; grid-row: 1; text-align: right; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.timeline li {
  display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font-size: 12.5px; opacity: .7;
}
.timeline li b { font-size: 13.5px; }
.timeline li small { font-size: 11.5px; opacity: .8; }
.timeline li.now { opacity: 1; background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); }
.timeline li.now b::after { content: "Now"; margin-left: 7px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: #fff; color: var(--hero-1); vertical-align: 1px; }
.timeline li.done { opacity: .5; }
.timeline li.done b::after { content: " ✓"; }
.meters { display: grid; gap: 12px; }
.meter-top { display: flex; justify-content: space-between; font-size: 13px; }
.meter-top .mono { opacity: .8; }
.meter-top .mono b { opacity: 1; font-weight: 600; }
.meter-track { height: 6px; border-radius: 6px; background: rgba(255,255,255,.16); overflow: hidden; margin-top: 6px; }
.meter-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #fff, #bfe9ff); transition: width .4s; }
.meter.full .meter-fill { background: linear-gradient(90deg, #ffd27a, #ffb347); }
.meter-sub { font-size: 11.5px; opacity: .6; margin-top: 4px; }
.rules-note { font-size: 12px; line-height: 1.5; opacity: .65; border-top: 1px solid rgba(255,255,255,.14); padding-top: 12px; }

/* allowances table */
#allowances { gap: 2px; }
.al-head { margin-left: auto; display: grid; grid-auto-flow: column; grid-auto-columns: 52px; column-gap: 10px; font-size: 11px; color: var(--ink-faint); text-align: right; }
.al-row { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.al-row:last-child { border-bottom: none; }
.al-name { flex: 1; min-width: 0; font-weight: 550; }
.al-cell { width: 52px; text-align: right; font-size: 13px; font-weight: 600; }
.al-cell i { font-style: normal; color: var(--ink-faint); font-weight: 400; }

/* legend / upcoming */
.lg-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.lg-row .lg-name { flex: 1; }
.lg-row .lg-n { color: var(--ink-soft); font-size: 13px; }
.card-body#legend, .card-body#upcoming { gap: 8px; }
.up-row, .hv-row {
  font: inherit; color: var(--ink); text-align: left; cursor: pointer; width: 100%;
  display: flex; align-items: center; gap: 11px; background: none; border: none; padding: 6px 0; border-radius: 10px;
}
.up-main, .hv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.up-main small, .hv-main small { color: var(--ink-soft); font-size: 12.5px; }
#bookingBody .up-row { padding: 12px 4px; border-bottom: 1px solid var(--line-soft); border-radius: 0; }

/* booking editor */
#bookingBody { display: flex; flex-direction: column; gap: 16px; }
#bookingBody h2 { margin-bottom: 0; }
#bookingBody .btn + .btn { margin-top: 0; }
#bookingBody .field-note { margin-top: -6px; }
.rule-check { font-size: 13.5px; line-height: 1.45; padding: 11px 13px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; }
.rule-check.ok { color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); font-weight: 600; }
.rule-check.bad { color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 22%, transparent); }
.rule-check.bad div { padding-left: 16px; position: relative; }
.rule-check.bad div::before { content: ""; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rule-check.pending { color: var(--ink-faint); background: var(--field); }
.note-box { font-size: 14.5px; padding: 12px 14px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); white-space: pre-wrap; }
.booking-meta { font-size: 12.5px; color: var(--ink-faint); text-align: center; line-height: 1.6; }
.booking-hist { display: flex; flex-direction: column; gap: 2px; }

/* change history + logbook */
.log-row { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 14px; font-size: 14.5px; box-shadow: var(--shadow); }
.log-row.tappable { cursor: pointer; transition: border-color .15s, transform .1s; }
.log-row.tappable:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.log-row.compact { background: none; border: none; box-shadow: none; border-bottom: 1px solid var(--line-soft); border-radius: 0; padding: 9px 0; font-size: 13.5px; }
.log-row small { color: var(--ink-faint); font-size: 12px; }
.log-main { flex: 1; min-width: 0; }
.log-ic { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; font-weight: 700; border: 2px solid var(--line); background: var(--field); font-size: 14px; }
.log-ic.created { color: var(--good); }
.log-ic.updated { color: var(--accent); }
.log-ic.deleted { color: var(--warn); }
#changesMore { margin-top: 14px; }
.hv-row { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.hv-row:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.tag { font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.tag.ok { color: var(--good); border-color: transparent; background: color-mix(in srgb, var(--good) 12%, transparent); }
.tag.warn { color: var(--warn); border-color: transparent; background: color-mix(in srgb, var(--warn) 12%, transparent); }

/* handover detail */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 14.5px; margin-bottom: 14px; }
.kv .k { color: var(--ink-soft); }
.kv .v { font-weight: 600; }
.kv .v.warn { color: var(--warn); } .kv .v.ok { color: var(--good); }
.issue-box, .comment-box { font-size: 14.5px; padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; background: var(--field); border: 1px solid var(--line); }
.issue-box { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 6%, var(--field)); }
.detail-section { margin: 16px 0; }
.ck-row { font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.ck-row small { color: var(--ink-faint); }
.photo-grid.detail { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.photo-grid.detail .photo-slot { text-decoration: none; }
#detailBody > .btn { margin-top: 9px; }

/* owners admin */
.owner-row { border: 1px solid var(--line); border-radius: var(--r); padding: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--field); }
.owner-top, .owner-bottom { display: flex; gap: 8px; align-items: center; }
.owner-row input[type="text"], .owner-row input[type="email"] { padding: 9px 11px; font-size: 14px; background: var(--paper); }
.owner-row input[type="color"] { width: 40px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); flex: none; }
.owner-admin { font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.owner-bottom .mini-btn { margin-left: 0; padding: 8px 11px; font-size: 13px; }

/* ============================== DESKTOP ============================== */
@media (min-width: 900px) {
  .app-header { padding: 12px 28px; gap: 14px; }
  .app-header .title { flex: none; margin-right: 10px; }
  .tabs {
    position: static; display: flex; gap: 2px; padding: 4px; margin-right: auto;
    background: var(--line-soft); border: none; border-radius: 13px; backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .tabs a { flex-direction: row; gap: 7px; font-size: 14px; padding: 7px 14px; border-radius: 10px; color: var(--ink-soft); }
  .tabs a svg { width: 17px; height: 17px; }
  .tabs a:hover { color: var(--ink); }
  .tabs a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.05); }
  .tabs a.has-new::after { top: 6px; left: auto; right: 6px; }
  #view-handover main { max-width: 620px; margin: 0 auto; width: 100%; padding-top: 22px; }
  #view-handover .progress { padding-left: calc(50% - 296px); padding-right: calc(50% - 296px); }
  .footer-bar { left: 50%; right: auto; transform: translateX(-50%); width: 620px; bottom: 16px; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-md); }
  .scrim { align-items: center; }
  .sheet { border-radius: 24px; max-width: 520px; padding-bottom: 24px; }
  .sheet.sheet-wide { max-width: 760px; }
  .sheet-grip { visibility: hidden; height: 0; margin: 10px auto; }
  .toast { bottom: 32px; }
  .pick-bar { bottom: 24px; }
}
@media (min-width: 1100px) {
  #view-calendar {
    grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: auto auto 1fr;
    padding: 24px 28px 40px; max-width: 1480px; width: 100%; margin: 0 auto; column-gap: 22px;
  }
  .cal-toolbar, .cal-hint, #calGrid { grid-column: 1; }
  .cal-side { grid-column: 2; grid-row: 1 / span 3; }
}

/* ============================== APPROVALS ============================== */
.bar.pending { opacity: .62; box-shadow: inset 0 0 0 1.5px rgba(13,21,32,.35); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.45) 0 5px, transparent 5px 10px) !important; }
.yday.pending { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 4px, transparent 4px 8px); }
.tag.pend { color: var(--amber); border-color: transparent; background: color-mix(in srgb, var(--amber) 14%, transparent); }
.tab-count {
  position: absolute; top: 1px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--warn); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--paper);
}
@media (min-width: 900px) { .tab-count { position: static; margin-left: 2px; box-shadow: none; } }
.status-box { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; }
.status-box span { color: var(--ink-soft); }
.status-box.pending { background: color-mix(in srgb, var(--amber) 11%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.status-box.pending b { color: var(--amber); }
.status-box.approved { background: color-mix(in srgb, var(--good) 9%, transparent); }
.status-box.approved b { color: var(--good); }
.status-box.rejected { background: color-mix(in srgb, var(--warn) 9%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.status-box.rejected b { color: var(--warn); }
.decide { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.decide input { padding: 10px 12px; font-size: 14px; background: var(--paper); }
.decide-row { display: flex; gap: 8px; }
.decide-row .btn { flex: 1; margin: 0; }
.btn-good { background: var(--good); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--good) 30%, transparent); }
.req-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow); }
.req-card.decided { padding: 12px 14px; box-shadow: none; }
.req-card.decided.rejected { opacity: .75; }
.req-head { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.req-head .dot { margin-top: 3px; }
.req-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.req-main b { font-size: 15.5px; }
.req-main span { font-size: 14px; }
.req-main small { font-size: 12.5px; color: var(--ink-faint); }
.req-note { margin-top: 6px; font-size: 13.5px; color: var(--ink-soft); background: var(--field); border-radius: 10px; padding: 8px 10px; }
.sub-head { margin-top: 28px; }
.sub-head h3 { font-size: 16px; color: var(--ink-soft); }

/* ============================== MANAGE (admin) ============================== */
.sub-head.first { margin-top: 4px; }
.acct-row { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.acct-row .dot { margin-top: 3px; }
.acct-main { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 1px; }
.acct-main b .tag { margin-left: 6px; vertical-align: 1px; }
.acct-main small { color: var(--ink-faint); font-size: 12.5px; }
.acct-state { font-size: 13px; font-weight: 600; margin-top: 3px; }
.acct-state.ok { color: var(--good); }
.acct-state.pend { color: var(--amber); }
.acct-state.muted { color: var(--ink-faint); font-weight: 500; }
.acct-acts { display: flex; gap: 6px; flex-wrap: wrap; align-self: center; }
.acct-acts .mini-btn { margin-left: 0; }
#activityList { gap: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 14px; }
#activityList .empty-note { padding: 12px 0; }
.act-row:last-child { border-bottom: none; }
.log-ic.mail { color: var(--accent); }
.log-ic.good { color: var(--good); }
#activityMore { margin-top: 10px; }
.acct-form { flex-basis: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.acct-form .flabel { margin-bottom: 0; }
.acct-form .btn-sm { align-self: flex-start; }
.acct-out { display: flex; flex-direction: column; gap: 8px; }
.acct-out-t { font-size: 13.5px; font-weight: 600; color: var(--good); }
.acct-out pre { margin: 0; font-family: var(--font-mono); font-size: 13px; white-space: pre-wrap; background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; user-select: all; }
.acct-out .btn { text-decoration: none; }
.pass-row { display: flex; gap: 8px; }
.pass-row input { flex: 1; }
.auth-note { font-size: 13.5px; color: var(--ink-faint); text-align: center; }


/* ======================================================================
   DESIGN LAYER — westmarsurveys.com, large print. Visual only.
   ====================================================================== */
html { -webkit-text-size-adjust: 100%; }
body { font-size: 18px; line-height: 1.5; letter-spacing: .005em; background: var(--bg); font-feature-settings: "tnum" 1, "lnum" 1; }
#app { background: transparent; }
::selection { background: rgba(176,143,90,.3); }
.mono { font-family: var(--font); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.on-dark { display: none !important; }
[data-theme="dark"] .on-light { display: none !important; }
[data-theme="dark"] .on-dark { display: block !important; }
@media (prefers-color-scheme: dark) { [data-theme="auto"] .on-light { display: none !important; } [data-theme="auto"] .on-dark { display: block !important; } }

/* ---- type, as on the website ---- */
h1, h2, h3, .cal-title, .list-head h2, .sheet h2, .auth-card h2 {
  font-family: var(--font); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--ink);
}
.cal-title { font-size: 26px; min-width: 0; }
.list-head h2 { font-size: 32px; }
.sheet h2 { font-size: 26px; }
/* eyebrow: small grey tracked caps with a short gold rule underneath */
.eyebrow, .card-head h2, .cal-side .card-head h2, .sub-head h3 {
  font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint);
  margin: 0; position: relative; padding-bottom: 12px;
}
.eyebrow::after, .card-head h2::after, .sub-head h3::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 32px; height: 2px; background: var(--gold);
}
.field label.flabel, .flabel { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.field-note, .list-head .hint, .cal-hint { font-size: 15px; color: var(--ink-faint); font-style: normal; }
.list-head .hint { font-family: var(--font); }

/* ---- header: white, like the site ---- */
.app-header {
  background: var(--head-bg); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: none;
  padding-top: calc(env(safe-area-inset-top) + 12px); padding-bottom: 12px;
}
@media (min-width: 900px) { .app-header { background: color-mix(in srgb, var(--head-bg) 96%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 16px 40px; } }
.burgee, .burgee svg { width: 46px; height: 46px; background: none; box-shadow: none; }
.mk-disc { fill: #111; stroke: none; }
.mk-ring { fill: none; stroke: var(--gold); stroke-width: .8; }
.mk-line { fill: none; stroke: #fff; stroke-width: 1.15; stroke-linejoin: round; stroke-linecap: round; }
.app-header .title .wm { font-family: var(--font); font-style: normal; font-weight: 600; font-size: 21px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink); }
.app-header .title .sub { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-text); font-weight: 600; margin-top: 3px; opacity: 1; }
.icon-btn { width: 46px; height: 46px; border-radius: 4px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; stroke-width: 1.7; }
.app-header .icon-btn { background: transparent; color: var(--ink); border-color: var(--line); }
.app-header .icon-btn:hover { background: var(--field); }
.me-pill { background: transparent; border: 1px solid var(--line); color: var(--ink); font-size: 16px; font-weight: 600; padding: 9px 14px; border-radius: 4px; }
.me-pill .dot { width: 12px; height: 12px; }

/* ---- tabs ---- */
@media (max-width: 899px) {
  :root { --tabbar-h: calc(84px + env(safe-area-inset-bottom)); }
  .tabs {
    left: 0; right: 0; bottom: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-radius: 0;
    background: var(--head-bg); border: none; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.05);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .tabs a { color: var(--ink-faint); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; text-transform: none; padding: 8px 0 6px; gap: 4px; border-radius: 0; }
  .tabs a svg { width: 27px; height: 27px; stroke-width: 1.6; }
  .tabs a[aria-current="page"] { color: var(--ink); background: none; }
  .tabs a[aria-current="page"] svg { stroke: var(--gold); stroke-width: 1.9; }
  .tabs a[aria-current="page"]::before { content: ""; position: absolute; top: -6px; left: 26%; right: 26%; height: 3px; background: var(--gold); }
  .tabs a.has-new::after, .tab-count { box-shadow: 0 0 0 2px var(--head-bg); }
  .tab-count { font-size: 12px; min-width: 20px; height: 20px; line-height: 20px; }
}
@media (min-width: 900px) {
  .tabs { background: transparent; border: none; gap: 6px; padding: 0; margin-left: 24px; }
  .tabs a { color: var(--ink-soft); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px; border-radius: 0; }
  .tabs a svg { display: none; }
  .tabs a:hover { color: var(--ink); }
  .tabs a[aria-current="page"] { background: none; color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold); }
  .tabs a.has-new::after { top: 6px; right: 0; }
}

/* ---- surfaces: flat white, gold top rule ---- */
.card, .log-row, .hv-row, .req-card, .acct-row, .cal-month, .ywrap, #activityList {
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
}
.cal-side .card { border-top: 2px solid var(--gold); }
.log-row.compact { border: none; box-shadow: none; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
.card-head { padding: 22px 22px 6px; }
.card-head .hint { font-size: 14px; }
.card-body { padding: 14px 22px 22px; gap: 18px; }
main > .card { border-top: 2px solid var(--gold); }
.card-head h2 { font-size: 14px; }
main .card-head h2 { font-size: 20px; letter-spacing: .04em; color: var(--ink); font-weight: 700; padding-bottom: 0; }
main .card-head h2::after { content: none; }
.card-head .step { background: none; border: none; color: var(--gold-text); font-weight: 700; letter-spacing: .06em; padding: 0; font-size: 14px; font-family: var(--font); }
.card-head .sec-status { width: 28px; height: 28px; }
.log-row, .hv-row { font-size: 16.5px; padding: 16px 18px; }
.log-row small, .up-main small, .hv-main small { font-size: 14.5px; }
.log-row.tappable:hover, .hv-row:hover, .req-card:hover, .acct-row:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }
.log-ic { width: 34px; height: 34px; border-radius: 50%; border-width: 1px; font-size: 16px; }
.empty-note { font-size: 16px; }

/* ---- buttons: square, uppercase, arrow ---- */
.btn { border-radius: 3px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: 16px; padding: 18px; min-height: 58px; }
.btn-sm { font-size: 14px; padding: 12px 18px; min-height: 46px; letter-spacing: .08em; }
.btn-primary { background: var(--btn); color: var(--btn-ink); box-shadow: none; }
.btn-primary:hover { background: var(--btn-hover); box-shadow: none; }
.btn-primary::after { content: none; }
.btn-ghost { background: transparent; border: 1px solid var(--ink-soft); color: var(--ink); }
.btn-ghost:hover { background: var(--field); border-color: var(--ink); }
.btn-brand { background: var(--btn); color: var(--btn-ink); }
.btn-good { background: var(--good); color: #fff; box-shadow: none; }
.mini-btn { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 3px; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 9px 14px; }
.mini-btn:hover { border-color: var(--gold); background: transparent; }
.muted-link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; font-size: 16px; }

/* ---- inputs, chips, toggles: big and clear ---- */
input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="password"], textarea, select {
  font-size: 18px; padding: 15px 16px; border-radius: 3px; background: var(--paper); border-color: color-mix(in srgb, var(--ink) 22%, transparent); min-height: 56px;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,143,90,.2); }
.chips { gap: 10px; }
.chip { border-radius: 3px; background: var(--paper); font-weight: 600; font-size: 17px; padding: 12px 18px 12px 14px; letter-spacing: 0; border-color: color-mix(in srgb, var(--ink) 18%, transparent); color: var(--ink); min-height: 50px; }
.chip .dot { width: 14px; height: 14px; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: none; }
.seg-toggle, .segmented { background: var(--paper); border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 3px; padding: 3px; }
.seg-toggle button, .segmented button { border-radius: 2px; text-transform: uppercase; letter-spacing: .08em; font-size: 15px; font-weight: 600; padding: 12px 18px; min-height: 46px; color: var(--ink-soft); }
.seg-toggle button[aria-pressed="true"], .segmented button[aria-pressed="true"],
[data-theme="dark"] .seg-toggle button[aria-pressed="true"], [data-theme="dark"] .segmented button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
@media (prefers-color-scheme: dark) { [data-theme="auto"] .seg-toggle button[aria-pressed="true"], [data-theme="auto"] .segmented button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); } }
.ci, .choice-row, .check, .switch-row, .photo-slot, .binary button, .ci-opts button, .cr-seg { border-radius: 3px; }
.ci-text, .cr-label, .check .ctext, .switch-row .sr-text .t { font-size: 17px; }
.ci-text small, .switch-row .sr-text .d { font-size: 14.5px; }
.ci-opts button, .binary button { font-size: 16px; padding: 14px 6px; }
.cr-seg button { font-size: 15px; padding: 10px 14px; border-radius: 2px; }
.nights-pill { font-size: 17px; }
.nights-pill small { font-size: 15px; }
.rule-check { font-size: 16px; border-radius: 3px; }
.status-box { font-size: 16px; border-radius: 3px; }
.toast { font-size: 16px; border-radius: 4px; padding: 14px 22px; }

/* ---- calendar ---- */
#view-calendar { gap: 18px; }
.cal-toolbar { gap: 12px; }
.icon-btn.ghost { border-radius: 3px; }
.cal-nav .mini-btn { margin-left: 8px; }
.mh div { font-size: 13px; letter-spacing: .1em; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; padding: 12px 0 10px; }
.mday { min-height: 92px; gap: 5px; }
.mday .num { font-family: var(--font); font-weight: 600; font-size: 18px; width: 34px; height: 34px; margin-left: 3px; border-radius: 50%; }
.mday.weekend { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.mday.today .num { background: var(--gold); color: #fff; box-shadow: none; animation: none; }
.mday:hover { background: rgba(176,143,90,.08); }
.mday.picked { box-shadow: inset 0 0 0 2px var(--gold); background: rgba(176,143,90,.1); }
.bar { height: 26px; line-height: 26px; font-weight: 700; font-size: 14px; letter-spacing: 0; color: #111; background-image: none; box-shadow: none; padding: 0 7px; }
.bar.s { border-top-left-radius: 3px; border-bottom-left-radius: 3px; margin-left: 4px; }
.bar.e { border-top-right-radius: 3px; border-bottom-right-radius: 3px; margin-right: 4px; }
.bar:not(.e):not(.empty) { margin-right: -1px; }
@media (min-width: 900px) { .mday { min-height: 120px; } .bar { height: 30px; line-height: 30px; font-size: 15px; } }
.ymonth { font-family: var(--font); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.yday { height: 30px; }
.yday .yd { font-size: 13px; width: 20px; font-family: var(--font); font-weight: 600; }
.yday .yw { font-size: 12px; width: 20px; }
.yday .yl { font-size: 13px; }
.ygrid { grid-template-columns: repeat(12, minmax(96px, 1fr)); min-width: 1160px; }
.yday.today { box-shadow: inset 0 0 0 2px var(--gold); }
.pick-bar { border-radius: 4px; padding: 12px 12px 12px 18px; }
.pick-bar .pb-text { font-size: 16px; }
.pick-bar .mini-btn { color: var(--brand-ink); border-color: color-mix(in srgb, var(--brand-ink) 35%, transparent); }

/* ---- booking round: a website-style section with big gold numerals ---- */
.card-rounds { background: var(--paper); color: var(--ink); border: 1px solid var(--line) !important; border-top: 2px solid var(--gold) !important; box-shadow: var(--shadow); }
.hero-hull { position: absolute; right: 18px; top: 22px; width: 46%; opacity: .08; pointer-events: none; }
[data-theme="dark"] .hero-hull { opacity: .14; }
.card-rounds .card-body { position: relative; padding: 24px 22px 24px; gap: 20px; }
.clock { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; border: none; padding: 0; }
.clock-time { font-family: var(--font); font-weight: 600; font-size: 22px; letter-spacing: .02em; color: var(--ink); }
.clock-date { font-family: var(--font); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink-faint); font-style: normal; opacity: 1; }
.round-head { font-size: 17px; color: var(--ink-soft); line-height: 1.45; }
.round-head b { display: block; font-size: 24px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); margin: 0 0 4px; font-family: var(--font); }
.countdown { background: var(--field); border: none; border-left: 3px solid var(--gold); border-radius: 0; padding: 14px 16px; backdrop-filter: none; -webkit-backdrop-filter: none; display: grid; grid-template-columns: 1fr; gap: 2px; }
.cd-label { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; grid-column: 1; }
.cd-val { font-family: var(--font); font-weight: 700; font-size: 40px; letter-spacing: 0; color: var(--gold); background: none; -webkit-background-clip: border-box; background-clip: border-box; line-height: 1.1; grid-column: 1; grid-row: auto; }
.cd-at { color: var(--ink-soft); font-size: 15px; text-align: left; grid-column: 1; grid-row: auto; opacity: 1; }
.timeline { gap: 12px; }
.timeline li { border-radius: 0; background: transparent; border: none; border-top: 2px solid var(--line); padding: 12px 0 0; opacity: .6; font-size: 15px; color: var(--ink-soft); }
.timeline li b { font-size: 15px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--ink); }
.timeline li small { font-size: 14px; }
.timeline li.now { background: none; border-color: var(--gold); opacity: 1; }
.timeline li.now b::after { background: var(--gold); color: #fff; font-size: 11.5px; letter-spacing: .08em; padding: 2px 7px; border-radius: 2px; }
.timeline li.done { opacity: .45; }
/* allowance meters become stat tiles: big gold number, label underneath */
.meters { grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.meter { border-top: 2px solid var(--gold); padding-top: 10px; display: flex; flex-direction: column; }
.meter-top { display: flex; flex-direction: column-reverse; gap: 2px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.3; }
.meter-top .mono { font-size: 15px; color: var(--ink-faint); opacity: 1; }
.meter-top .mono b { font-size: 34px; font-weight: 700; color: var(--gold); line-height: 1; }
.meter-track { display: none; }
.meter-sub { font-size: 13px; color: var(--ink-faint); opacity: 1; margin-top: 2px; }
.meter.full .meter-top .mono b { color: var(--warn); }
.rules-note { border-top: 1px solid var(--line); font-style: normal; font-size: 15px; color: var(--ink-soft); opacity: 1; line-height: 1.5; padding-top: 16px; }
.sea { display: none; }

/* ---- side lists ---- */
.lg-row, .al-row { font-size: 17px; }
.lg-row .dot, .up-row .dot, .al-row .dot { width: 14px; height: 14px; }
.al-head { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; grid-auto-columns: 58px; font-family: var(--font); font-weight: 600; }
.al-cell { width: 58px; font-size: 16px; font-family: var(--font); font-weight: 700; }
.al-name { font-weight: 600; }
.lg-n { font-family: var(--font); font-weight: 700; font-size: 16px; }
.up-row { padding: 10px 10px; margin: 0 -10px; width: calc(100% + 20px); border-radius: 3px; }
.up-row:hover { background: rgba(176,143,90,.07); }
.up-main b { font-size: 17px; }
.tag { border-radius: 2px; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; font-weight: 700; padding: 4px 9px; }

/* ---- the full-width Westmar band ---- */
.wm-band {
  grid-column: 1 / -1; margin: 30px -12px -40px; padding: 56px 24px 64px;
  background: var(--paper); border-top: 1px solid var(--line);
}
.wmb-inner { max-width: 1240px; margin: 0 auto; display: grid; gap: 44px; }
.wmb-head { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.wmb-logo img { width: 300px; max-width: 80vw; height: auto; display: block; }
.wmb-head h2 { margin: 6px 0 0; font-size: 34px; line-height: 1.12; letter-spacing: .01em; max-width: 20ch; }
.wmb-lede { margin: 0; font-size: 19px; line-height: 1.55; color: var(--ink-soft); max-width: 58ch; text-transform: uppercase; letter-spacing: .02em; font-size: 16.5px; }
.wmb-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.wmb-btn {
  display: inline-flex; align-items: center; gap: 12px; text-decoration: none; text-transform: uppercase; letter-spacing: .1em;
  font-size: 15px; font-weight: 600; padding: 16px 22px; border-radius: 3px; border: 1px solid var(--ink-soft); color: var(--ink); min-height: 54px;
  transition: background .2s, color .2s, border-color .2s;
}
.wmb-btn span { transition: transform .2s; }
.wmb-btn:hover span { transform: translateX(4px); }
.wmb-btn:hover { border-color: var(--ink); background: var(--field); }
.wmb-btn.primary { background: #5d5d5d; border-color: #5d5d5d; color: #fff; }
.wmb-btn.primary:hover { background: #222; border-color: #222; }
.wmb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.wmb-stats div { border-top: 2px solid var(--gold); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.wmb-stats b { font-size: 52px; font-weight: 700; color: var(--gold); line-height: 1; }
.wmb-stats span { font-size: 17px; line-height: 1.5; color: var(--ink-soft); }
.wmb-services { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 44px; }
.wmb-services ol { list-style: none; margin: 18px 0 0; padding: 0; }
.wmb-services li { display: flex; align-items: baseline; gap: 16px; font-size: 21px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink); }
.wmb-services li i { font-style: normal; font-size: 14px; font-weight: 700; color: var(--gold); letter-spacing: .06em; width: 24px; flex: none; }
.wmb-foot { margin: 0; text-align: center; font-size: 28px; font-weight: 700; line-height: 1.3; color: var(--ink); border-top: 1px solid var(--line); padding-top: 36px; }
@media (max-width: 760px) {
  .wm-band { padding: 44px 20px 52px; }
  .wmb-head h2 { font-size: 27px; }
  .wmb-stats { grid-template-columns: 1fr; gap: 22px; }
  .wmb-stats b { font-size: 46px; }
  .wmb-services { grid-template-columns: 1fr; }
  .wmb-services li { font-size: 18px; }
  .wmb-foot { font-size: 22px; }
  .wmb-btn { flex: 1 1 100%; justify-content: space-between; }
}
@media (min-width: 1100px) {
  .wm-band { margin: 40px -40px -40px; padding: 72px 40px 80px; grid-row: 4; }
  .wmb-inner { grid-template-columns: 1.15fr 1fr; column-gap: 72px; row-gap: 52px; }
  .wmb-head { grid-column: 1; grid-row: 1; }
  .wmb-stats { grid-column: 2; grid-row: 1; grid-template-columns: 1fr; align-content: start; gap: 22px; }
  .wmb-services { grid-column: 1 / -1; }
  .wmb-foot { grid-column: 1 / -1; }
}

/* ---- sheets ---- */
.scrim { background: rgba(0,0,0,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { border-radius: 6px 6px 0 0; border: none; border-top: 3px solid var(--gold); padding: 8px 22px calc(26px + env(safe-area-inset-bottom)); max-height: 92dvh; }
.sheet::before { content: none; }
@media (min-width: 900px) { .sheet { border-radius: 4px; border: 1px solid var(--line); border-top: 3px solid var(--gold); max-width: 600px; } }
.sheet .sheet-sub { font-size: 16px; }
#bookingBody { gap: 20px; }
.settings-credit { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink-faint); font-size: 14px; text-align: center; }
.settings-credit b { color: var(--ink); font-weight: 700; }
.sc-hull { width: 140px; opacity: .85; }
[data-theme="dark"] .sc-hull { filter: invert(1); }
@media (prefers-color-scheme: dark) { [data-theme="auto"] .sc-hull { filter: invert(1); } }
.theme-opt .nm { font-size: 15px; }

/* ---- handover ---- */
.progress { background: var(--head-bg); border-bottom: 1px solid var(--line); }
.progress-track { height: 4px; border-radius: 0; }
.progress-fill { background: var(--gold); box-shadow: none; border-radius: 0; }
.progress-label { text-transform: uppercase; letter-spacing: .08em; font-size: 14px; font-weight: 600; }
.signed-as { font-size: 19px; }
.signed-as small { font-size: 15px; }
@media (max-width: 899px) {
  .footer-bar { bottom: var(--tabbar-h); border-top: none; background: linear-gradient(180deg, transparent, var(--bg) 40%); padding: 24px 14px 10px; }
  #view-handover main { padding-bottom: calc(var(--tabbar-h) + 100px); }
}

/* ---- manage page ---- */
.req-card, .acct-row { padding: 18px; }
.req-main b, .acct-main b { font-size: 18px; }
.req-main span { font-size: 16px; }
.req-main small, .acct-main small { font-size: 14.5px; }
.acct-state { font-size: 15px; }
.decide input { font-size: 17px; min-height: 50px; }

/* ---- login: light, like the site ---- */
.auth { background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; padding: 32px 18px; }
.auth::before { content: none; }
.auth-card { border-radius: 4px; border: 1px solid var(--line); border-top: 3px solid var(--gold); padding: 34px 28px; box-shadow: var(--shadow-md); max-width: 460px; }
.auth-brand { gap: 16px; }
.auth-brand .burgee, .auth-brand .burgee svg { width: 60px; height: 60px; }
.auth-wm { font-family: var(--font); font-style: normal; font-weight: 600; font-size: 24px; letter-spacing: .3em; text-transform: uppercase; }
.auth-sub { font-size: 12.5px; letter-spacing: .2em; color: var(--gold-text); text-transform: uppercase; font-weight: 600; }
.auth-card h2 { font-size: 30px; }
.auth-card .sheet-sub { font-size: 17px; }
.auth-note { font-size: 16px; color: var(--ink-soft); }
.auth-credit { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; text-decoration: none; }
.auth-credit span { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.auth-credit img { width: 280px; height: auto; }
@media (max-width: 620px) { .cal-title { font-size: 22px; } .app-header .title .wm { font-size: 19px; } }
.cal-title { white-space: nowrap; }
@media (min-width: 1100px) {
  #view-calendar { grid-template-columns: minmax(0, 1fr) 420px; }
  .wm-band { margin: 40px -28px -40px; padding: 72px 28px 80px; }
}
.card-head h2 { white-space: normal; overflow: visible; }
.wmb-lede { text-transform: none; letter-spacing: 0; font-size: 19px; }
.hero-hull { top: auto; bottom: 14px; right: 16px; width: 42%; }

/* ======================================================================
   Westmar band — the black card, spanning the full page width
   ====================================================================== */
.wm-band { background: #0b0b0b; color: #fff; border-top: 2px solid var(--gold); }
.wmb-inner { display: grid; gap: 26px; grid-template-columns: 1fr; max-width: 1320px; }
.wm-band .wm-top { display: flex; align-items: center; gap: 18px; color: inherit; text-decoration: none; }
.wm-band .wm-top img { width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.2); flex: none; }
.wm-band .wm-top span { display: flex; flex-direction: column; gap: 2px; }
.wm-band .wm-top small { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.wm-band .wm-top b { font-size: 26px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.wm-band .wm-top i { font-style: normal; font-size: 16px; color: rgba(255,255,255,.65); }
.wm-band .wm-line { margin: 0; font-size: 22px; line-height: 1.4; color: rgba(255,255,255,.9); }
.wm-band .wm-services { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; border-top: 1px solid rgba(176,143,90,.4); padding-top: 20px; }
.wm-band .wm-services h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.wm-band .wm-services ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wm-band .wm-services li { font-size: 18px; color: rgba(255,255,255,.85); line-height: 1.3; }
.wm-band .wm-cta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wm-band .wm-cta a {
  display: flex; align-items: center; justify-content: center; min-height: 56px; text-decoration: none; color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px; transition: border-color .2s, color .2s, background .2s;
}
.wm-band .wm-cta a:hover { border-color: var(--gold); color: var(--gold); }
.wm-band .wm-cta a:first-child { background: var(--gold); border-color: var(--gold); color: #111; }
.wm-band .wm-cta a:first-child:hover { background: var(--gold-2); color: #111; }
.wm-band .wm-foot { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.5); text-align: center; }
.wm-band .wm-foot span { color: var(--gold); }
@media (max-width: 620px) { .wm-band .wm-services { grid-template-columns: 1fr; } .wm-band .wm-cta { grid-template-columns: 1fr; } }
@media (min-width: 1100px) {
  .wmb-inner { grid-template-columns: 1.1fr 1.2fr .8fr; column-gap: 56px; row-gap: 28px; align-items: center; }
  .wm-band .wm-top { grid-column: 1; grid-row: 1; }
  .wm-band .wm-line { grid-column: 1; grid-row: 2; }
  .wm-band .wm-services { grid-column: 2; grid-row: 1 / span 2; border-top: none; border-left: 1px solid rgba(176,143,90,.4); padding: 0 0 0 40px; }
  .wm-band .wm-cta { grid-column: 3; grid-row: 1 / span 2; grid-template-columns: 1fr; }
  .wm-band .wm-foot { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; }
}

/* ======================================================================
   The whole calendar at once
   ====================================================================== */
/* YEAR — all twelve months side by side, like the paper calendar; never scrolls sideways */
.ywrap { overflow: hidden; }
.ygrid { grid-template-columns: repeat(12, minmax(0, 1fr)); min-width: 0; }
.ycol { min-width: 0; }
.ymonth { position: static; padding: 8px 0; font-size: 13px; overflow: hidden; }
.yday {
  height: clamp(18px, calc((100dvh - 300px) / 31), 32px);
  padding: 0 4px; gap: 3px; overflow: hidden;
}
.yday .yl { min-width: 0; }
@media (max-width: 1250px) { .yday .yw { display: none; } }
@media (max-width: 900px) {
  .ymonth { font-size: 0; }
  .ymonth::first-letter { font-size: 12px; }
  .yday { padding: 0 2px; justify-content: center; }
  .yday .yl { display: none; }
  .yday .yd { width: auto; text-align: center; font-size: 11px; }
}
.ymonth { text-transform: uppercase; }

/* MONTH — on a phone the whole month fits on one screen */
@media (max-width: 620px) {
  #view-calendar { gap: 12px; padding-top: 10px; }
  .cal-toolbar { gap: 8px; }
  .cal-nav { flex: 1 1 100%; }
  .cal-toolbar .seg-toggle { flex: 1 1 auto; }
  .cal-toolbar #calAdd { order: 3; flex: 1 1 auto; width: auto; padding: 12px 14px; min-height: 52px; }
  .cal-hint { display: none; }
  .mday { min-height: 0; height: clamp(58px, calc((100dvh - 430px) / 6), 96px); padding: 4px 0; gap: 3px; }
  .mday .num { width: 30px; height: 30px; font-size: 16px; }
  .bar { height: 20px; line-height: 20px; font-size: 12px; padding: 0 4px; }
  .mh div { padding: 8px 0 6px; font-size: 12px; }
}

/* ======================================================================
   Manuals
   ====================================================================== */
.man-list { display: grid; gap: 20px; }
.man-card { display: grid; grid-template-columns: 220px 1fr; background: var(--paper); border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.man-thumb { display: block; background: #f1f1ef; }
.man-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 200px; }
.man-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.man-body h3 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.man-meta { margin: 0; font-size: 16px; color: var(--ink-soft); }
.man-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.man-actions .btn { width: auto; flex: 1 1 180px; text-decoration: none; }
.man-actions .btn + .btn { margin-top: 0; }
@media (max-width: 620px) { .man-card { grid-template-columns: 1fr; } .man-thumb img { height: 200px; } }
.man-reader { display: flex; flex-direction: column; gap: 14px; }
.man-bar { display: flex; gap: 10px; justify-content: space-between; position: sticky; top: calc(var(--header-h, 70px) + 8px); z-index: 5; }
.man-bar .btn { width: auto; text-decoration: none; }
.man-bar .btn + .btn { margin-top: 0; }
#manFrame { width: 100%; border: 1px solid var(--line); border-radius: var(--r); background: #fff; display: block; }
#view-manuals.narrow { max-width: 900px; }
@media (max-width: 899px) { .tabs a { font-size: 11.5px; } .tabs a svg { width: 25px; height: 25px; } }
/* fit the screen height exactly */
.yday { height: clamp(14px, calc((100dvh - 275px) / 31), 32px); }
@media (max-width: 899px) { .yday { height: clamp(14px, calc((100dvh - 335px) / 31), 30px); } }
@media (min-width: 621px) { .mday { min-height: 0; height: clamp(64px, calc((100dvh - 280px) / 6), 130px); } }
@media (min-width: 901px) { .ymonth { font-size: clamp(10px, .78vw, 13px); letter-spacing: .02em; } }
.man-thumb img { object-position: center top; }

/* ======================================================================
   Full width everywhere (pages only — pop-up sheets and the login box keep their size)
   ====================================================================== */
#view-calendar { max-width: none; }
.view.narrow, #view-manuals.narrow { max-width: none; }
@media (min-width: 900px) {
  .view.narrow { padding-left: 28px; padding-right: 28px; }
  #view-handover main { max-width: none; padding-left: 28px; padding-right: 28px; }
  #view-handover .progress { padding-left: 28px; padding-right: 28px; }
  .footer-bar { width: auto; left: 28px; right: 28px; transform: none; }
}
.wmb-inner { max-width: none; }

/* ======================================================================
   Countdown card — restored to the black version (only text sizes kept larger)
   ====================================================================== */
.card-rounds {
  background: #0b0b0b; color: #fff; border: 1px solid #000 !important;
  box-shadow: 0 20px 50px rgba(0,0,0,.25), inset 0 0 0 1px rgba(176,143,90,.25);
  position: relative; overflow: hidden; border-radius: 14px;
}
.card-rounds .hero-hull { position: absolute; left: 6%; right: 6%; top: auto; bottom: 18px; width: 88%; opacity: .22; pointer-events: none; }
.card-rounds .card-body { position: relative; z-index: 1; padding: 24px 22px 56px; gap: 18px; }
.card-rounds .clock { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid rgba(176,143,90,.35); padding-bottom: 14px; }
.card-rounds .clock-time { font-family: var(--font); font-weight: 300; font-size: 44px; letter-spacing: .02em; color: #fff; font-variant-numeric: tabular-nums; }
.card-rounds .clock-date { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.card-rounds .round-head { font-size: 17px; color: rgba(255,255,255,.8); }
.card-rounds .round-head b { display: inline; font-size: 14px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: #fff; margin: 0 6px 0 0; }
.card-rounds .countdown {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px;
  background: transparent; border: 1px solid rgba(176,143,90,.45); border-left-width: 1px; border-radius: 10px; padding: 14px 16px;
}
.card-rounds .cd-label { grid-column: 1; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.card-rounds .cd-val { grid-column: 1 / -1; grid-row: auto; font-family: var(--font); font-weight: 300; font-size: 40px; letter-spacing: .02em; color: #fff; line-height: 1.15; background: none; }
.card-rounds .cd-at { grid-column: 2; grid-row: 1; text-align: right; font-size: 14px; color: rgba(255,255,255,.6); }
.card-rounds .timeline { grid-template-columns: 1fr 1fr; gap: 8px; }
.card-rounds .timeline li { border-radius: 8px; background: transparent; border: 1px solid rgba(255,255,255,.12); padding: 10px 12px; opacity: .7; font-size: 14.5px; color: #fff; }
.card-rounds .timeline li b { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: #fff; }
.card-rounds .timeline li small { font-size: 13px; opacity: .8; }
.card-rounds .timeline li.now { opacity: 1; background: rgba(176,143,90,.1); border-color: var(--gold); }
.card-rounds .timeline li.now b::after { background: var(--gold); color: #111; }
.card-rounds .timeline li.done { opacity: .5; }
.card-rounds .meters { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card-rounds .meter { border-top: none; padding-top: 0; display: block; }
.card-rounds .meter-top { display: flex; flex-direction: row; justify-content: space-between; gap: 10px; font-size: 15px; color: #fff; line-height: 1.3; }
.card-rounds .meter-top .mono { font-size: 15px; color: rgba(255,255,255,.85); }
.card-rounds .meter-top .mono b { font-size: 15px; font-weight: 600; color: #fff; line-height: 1.3; }
.card-rounds .meter-track { display: block; background: rgba(255,255,255,.12); height: 2px; border-radius: 0; margin-top: 6px; overflow: hidden; }
.card-rounds .meter-fill { height: 100%; background: var(--gold); box-shadow: none; border-radius: 0; }
.card-rounds .meter.full .meter-fill { background: #e06a4f; }
.card-rounds .meter.full .meter-top .mono b { color: #fff; }
.card-rounds .meter-sub { font-size: 13px; color: rgba(255,255,255,.55); margin-top: 4px; }
.card-rounds .rules-note { border-top: 1px solid rgba(176,143,90,.3); font-size: 14px; color: rgba(255,255,255,.7); padding-top: 14px; }
.cal-side .card.card-rounds { border-top: 1px solid #000 !important; }

/* ======================================================================
   Dashboard layout: calendar as tall as the countdown, cards in a row below
   ====================================================================== */
.cal-dash { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.cal-dash .card { border-top: 2px solid var(--gold); }
.cal-dash .card-head h2 { font-size: 14px; }
@media (min-width: 760px) { .cal-dash { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); } }
@media (min-width: 1100px) {
  #view-calendar { grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: auto auto 1fr auto auto; }
  .cal-toolbar { grid-column: 1; grid-row: 1; }
  .cal-hint { grid-column: 1; grid-row: 2; }
  #calGrid { grid-column: 1; grid-row: 3; align-self: stretch; }
  .cal-side { grid-column: 2; grid-row: 1 / span 3; }
  .cal-dash { grid-column: 1 / -1; grid-row: 4; margin-top: 4px; }
  .wm-band { grid-row: 5; }
  /* month fills the height */
  #calGrid.cal-month { display: flex; flex-direction: column; }
  #calGrid.cal-month .mh { flex: none; }
  #calGrid.cal-month .mgrid { flex: 1; grid-auto-rows: minmax(0, 1fr); }
  #calGrid.cal-month .mday { height: auto; min-height: 72px; }
  /* year fills the height */
  #calGrid.cal-year { display: flex; flex-direction: column; }
  #calGrid.cal-year .ywrap { flex: 1; display: flex; }
  #calGrid.cal-year .ygrid { flex: 1; }
  #calGrid.cal-year .ycol { display: flex; flex-direction: column; }
  #calGrid.cal-year .yday { flex: 1 1 0; height: auto; min-height: 16px; }
}

/* ======================================================================
   Rounded corners everywhere
   ====================================================================== */
.card, .cal-month, .ywrap, .log-row, .hv-row, .req-card, .acct-row, #activityList, .man-card, #manFrame, .card-rounds { border-radius: 18px !important; }
.card, .cal-month, .ywrap, .man-card { overflow: hidden; }
.log-row.compact { border-radius: 0 !important; }
.btn { border-radius: 14px; }
.btn-sm, .mini-btn, .icon-btn, .icon-btn.ghost { border-radius: 12px; }
.me-pill { border-radius: 999px; }
.chip { border-radius: 999px; }
input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="password"], textarea, select { border-radius: 12px; }
.seg-toggle, .segmented { border-radius: 14px; }
.seg-toggle button, .segmented button { border-radius: 10px; }
.ci, .choice-row, .check, .switch-row, .binary button, .ci-opts button, .cr-seg, .photo-slot, .owner-row, .note-box, .issue-box, .comment-box { border-radius: 12px; }
.cr-seg button { border-radius: 8px; }
.status-box, .rule-check, .callout { border-radius: 12px; }
.bar.s { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.bar.e { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.tag { border-radius: 999px; }
.toast { border-radius: 16px; }
.pick-bar { border-radius: 18px; }
.sheet { border-radius: 24px 24px 0 0; }
@media (min-width: 900px) { .sheet { border-radius: 22px; } }
.auth-card { border-radius: 22px; }
.card-rounds .countdown { border-radius: 14px; }
.card-rounds .timeline li { border-radius: 12px; }
.theme-opt { border-radius: 14px; }
.wmb-btn { border-radius: 14px; }

/* ======================================================================
   Settings sheet
   ====================================================================== */
@media (min-width: 900px) { .sheet.settings-sheet { max-width: 720px; } }
.settings-sheet { display: flex; flex-direction: column; gap: 16px; background: var(--bg); }
.set-head { display: flex; align-items: center; justify-content: space-between; }
.set-head h2 { margin: 0; }
.set-head .icon-btn svg { stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.set-profile { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.set-profile .dot.lg { width: 22px; height: 22px; }
.sp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-main b { font-size: 19px; }
.sp-main small { font-size: 15px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; }
.set-card { background: var(--paper); border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.set-card .eyebrow { margin-bottom: 4px; }
.set-card .field-note { margin: 0; }
.set-card .flabel { margin-bottom: 0; }
.set-card .btn + .btn { margin-top: 0; }
.pass-row { gap: 10px; }
.pass-row .btn { width: auto; flex: none; }
/* appearance */
.theme-opts { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theme-opt { background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px; color: var(--ink); }
.theme-opt[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,143,90,.2); }
.theme-opt .sw { height: 46px; border-radius: 10px; border: 1px solid var(--line); }
.theme-opt .nm { font-size: 14.5px; font-weight: 600; margin-top: 2px; }
/* owners */
#ownersList { display: flex; flex-direction: column; gap: 8px; }
.owner-row { background: var(--field); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 0; gap: 8px; }
.owner-row input[type="text"], .owner-row input[type="email"] { min-height: 44px; font-size: 16px; padding: 9px 12px; border-radius: 10px; background: var(--paper); }
.owner-row input[type="color"] { width: 36px; height: 36px; padding: 0; border: none; border-radius: 50%; background: none; cursor: pointer; flex: none; }
.owner-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.owner-row input[type="color"]::-webkit-color-swatch { border: 2px solid var(--paper); border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.owner-row input[type="color"]::-moz-color-swatch { border: 2px solid var(--paper); border-radius: 50%; }
.owner-admin { font-size: 14px; gap: 6px; }
.owner-admin input { width: 18px; height: 18px; accent-color: var(--gold); }
.owner-bottom .mini-btn { min-height: 44px; padding: 8px 14px; border-radius: 10px; }
@media (min-width: 700px) {
  .owner-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1.5fr) auto auto auto; align-items: center; }
  .owner-top, .owner-bottom { display: contents; }
  .owner-top .owner-admin { grid-column: 4; grid-row: 1; }
  .owner-bottom input[type="email"] { grid-column: 3; grid-row: 1; }
}
.set-done { margin-top: 4px; }
.settings-credit { margin-top: 0; border-top: none; padding-top: 4px; }
.set-card .btn { white-space: normal; letter-spacing: .06em; line-height: 1.25; }
@media (max-width: 699px) {
  .owner-bottom { flex-wrap: wrap; justify-content: flex-end; }
  .owner-bottom input[type="email"] { flex: 1 1 100%; }
}

/* ======================================================================
   Dashboard cards: all the same size; long lists scroll inside the card
   ====================================================================== */
.cal-dash { align-items: stretch; grid-auto-rows: 1fr; }
.cal-dash .card { display: flex; flex-direction: column; min-height: 0; }
.cal-dash .card-head { flex: none; }
.cal-dash .card-body { flex: 1; min-height: 0; max-height: 440px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
@media (min-width: 760px) and (max-width: 1099px) { .cal-dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .cal-dash { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cal-dash:has(#myReqCard:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1500px) { .cal-dash:has(#myReqCard:not([hidden])) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
