/* Wundura Manii shifts. Same look as wunduramaniiconsulting.com.au: the palette, fonts and
   buttons come from the website's tokens (Project/website/src/index.css). The planner boards
   (renderer/) keep their own locked design and don't use this file. */

[hidden] { display: none !important; }  /* the hidden attribute must win over display rules */

:root {
  /* themed (dark is the default, like the website) */
  --night: #0b0a0c;        /* page background */
  --night-soft: #151217;   /* lifted surfaces */
  --night-line: #2a2530;   /* hairlines */
  --bone: #ede9ee;         /* primary text */
  --bone-muted: #a89fac;   /* secondary text */
  --accent: #6fcfc3;       /* text, icons, borders */
  --accent-soft: #16302d;  /* accent tint for fills */
  --danger: #f2a6a0;
  --danger-soft: #2e1a1a;
  --warn: #e0b45a;
  --warn-soft: #2b2416;
  /* fixed (same in both themes) */
  --ink: #0b0a0c;
  --reef: #6fcfc3;         /* button fills on any background */
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --sans: 'Figtree', system-ui, sans-serif;
  /* derived */
  --fill: color-mix(in srgb, var(--bone) 5%, transparent);     /* inputs, chips */
  --fill-2: color-mix(in srgb, var(--bone) 9%, transparent);
  --faint: color-mix(in srgb, var(--bone-muted) 70%, transparent);
  color-scheme: dark;
}
/* Colour schemes (picked per device from the palette button). "night" is the default above. */
html[data-theme='day'] {          /* the website's light theme */
  --night: #f7f5f6; --night-soft: #ffffff; --night-line: #e3dee4; --bone: #241e28; --bone-muted: #5f5766;
  --accent: #14766b; --accent-soft: #dcefec; --danger: #b3423a; --danger-soft: #f8e4e2;
  --warn: #9a6512; --warn-soft: #f7ecd8;
  color-scheme: light;
}
html[data-theme='dusk'] {         /* deep plum, the artwork's pink */
  --night: #110b12; --night-soft: #1c121d; --night-line: #35243a; --bone: #f3e9f1; --bone-muted: #b9a2b8;
  --accent: #e98cc0; --accent-soft: #3b1a30; --reef: #e98cc0;
  --danger: #f5a49c; --danger-soft: #331a1c; --warn: #e8b85e; --warn-soft: #2e2416;
}
html[data-theme='ochre'] {        /* warm earth, golden ochre */
  --night: #0f0c08; --night-soft: #1b150e; --night-line: #372c1e; --bone: #f2ece2; --bone-muted: #b6a891;
  --accent: #e8ac4c; --accent-soft: #3a2a12; --reef: #e8ac4c;
  --danger: #f5a49c; --danger-soft: #331a18; --warn: #f2895e; --warn-soft: #34190f;
}
html[data-theme='saltwater'] {    /* deep blue, sky blue */
  --night: #080c12; --night-soft: #101722; --night-line: #213045; --bone: #e7eef6; --bone-muted: #95a6bb;
  --accent: #76b2f0; --accent-soft: #15263c; --reef: #76b2f0;
  --danger: #f5a49c; --danger-soft: #301a1d; --warn: #e8b85e; --warn-soft: #2c2416;
}
html[data-theme='contrast'] {     /* easiest to read: pure black, white, yellow */
  --night: #000000; --night-soft: #0b0b0b; --night-line: #6b6b6b; --bone: #ffffff; --bone-muted: #dcdcdc;
  --accent: #ffd43b; --accent-soft: #2e2600; --reef: #ffd43b;
  --danger: #ff8f85; --danger-soft: #330d0a; --warn: #ffb35c; --warn-soft: #331f00;
  --fill: #141414; --fill-2: #1f1f1f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--night); }
body {
  font-family: var(--sans); color: var(--bone); background: var(--night); min-height: 100vh;
  -webkit-font-smoothing: antialiased; line-height: 1.4;
}
/* the website's faint film grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: var(--night); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }

.wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 60px; }
.wrap.wide { max-width: 1040px; }

/* header */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--night-line); }
.top img { width: 44px; height: 44px; border-radius: 10px; }
.top h1 { font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.02em; }
.top .sub { font-size: 10px; font-weight: 500; letter-spacing: 0.35em; text-transform: uppercase; color: var(--bone-muted); margin-top: 3px; }
.top .right { margin-left: 12px; font-size: 14px; color: var(--bone-muted); text-align: right; }

h2 { font-family: var(--display); font-size: 21px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; margin: 28px 0 12px; }
.card { background: var(--night-soft); border: 1px solid var(--night-line); border-radius: 16px; padding: 16px; }
.card + .card { margin-top: 12px; }
.muted { color: var(--bone-muted); }
.small { font-size: 13px; }

/* buttons: the website's reef pills */
button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 999px; padding: 10px 22px; font-size: 15px;
  color: var(--ink); background: var(--reef); border: 1px solid var(--reef); text-decoration: none; display: inline-block;
  transition: filter 0.15s, transform 0.15s;
}
button:hover, .btn:hover { filter: brightness(1.1); }
button:active, .btn:active { transform: scale(0.98); }
button:disabled { opacity: 0.6; cursor: default; }
button.ghost, .btn.ghost {
  background: transparent; border-color: var(--night-line); color: var(--bone-muted); font-weight: 500; padding: 7px 15px; font-size: 13px;
}
button.ghost:hover, .btn.ghost:hover { filter: none; border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--bone); }
button.danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 55%, transparent); color: var(--danger); padding: 7px 15px; font-size: 13px; font-weight: 500; }
.btn.mini, button.mini { padding: 6px 14px; font-size: 13px; }
button.tiny { padding: 3px 10px; font-size: 12px; }
.actions { margin-top: 16px; }

/* week navigation */
.weeknav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.weeknav .label {
  padding: 8px 18px; border-radius: 999px; background: var(--night-soft); border: 1px solid var(--night-line);
  font-family: var(--display); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
}
.weeknav .label .rel { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: 0.3em; color: var(--accent); font-weight: 700; }
.weeknav a.arrow {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--night-line); color: var(--bone); text-decoration: none; font-size: 18px;
}
.weeknav a.arrow:hover { border-color: var(--accent); }
.weeknav .hint { font-size: 12px; color: var(--faint); }

.flash { padding: 11px 15px; border-radius: 12px; margin-bottom: 12px; font-size: 14px; }
.flash.ok { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.flash.error { background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent); }

/* forms */
label.field { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bone-muted); margin: 14px 0 6px; }
label.field:first-child { margin-top: 0; }
input[type=time], input[type=text], input[type=email], input[type=date], input[type=number], select, textarea {
  font: inherit; color: var(--bone); background: var(--fill); border: 1px solid var(--night-line);
  border-radius: 10px; padding: 9px 12px; font-size: 15px;
}
/* iPhone Safari draws time/date boxes at their own native width, wider than the screen: make them obey ours */
input[type=time], input[type=date] { -webkit-appearance: none; appearance: none; box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 42px; }
input[type=time]::-webkit-date-and-time-value, input[type=date]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
input[type=color] { width: 44px; height: 38px; border: 1px solid var(--night-line); border-radius: 10px; background: none; }
textarea, input.wide, input.num-box, input.date-box { padding: 11px 13px; font-size: 16px; width: 100%; }
input.num-box { width: 120px; }
input.date-box { width: auto; }
textarea { resize: vertical; min-height: 80px; display: block; }
.row-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--night-line); background: var(--fill); font-size: 15px; font-weight: 500; user-select: none;
  transition: border-color 0.15s, background 0.15s;
}
.chip span:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.chip span .dot { width: 11px; height: 11px; border-radius: 50%; }
.chip input:checked + span { background: var(--reef); border-color: var(--reef); color: var(--ink); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip .order { font-size: 11px; opacity: 0.8; }
.chips.big .chip span { padding: 12px 18px; font-size: 16px; min-height: 46px; }

/* the week, day by day */
.day { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--night-line); }
.day:first-child { border-top: 0; padding-top: 0; }
.days .day { padding: 10px 0; }
.day .d { flex: 0 0 52px; text-align: center; }
.day .d b { display: block; font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1; }
.day .d small { font-size: 10px; letter-spacing: 0.25em; color: var(--bone-muted); }
button.d {
  font: inherit; color: var(--bone); background: none; border: 1px solid transparent; border-radius: 12px;
  padding: 8px 0; align-self: flex-start; cursor: pointer;
}
button.d:hover { filter: none; border-color: var(--night-line); background: var(--fill); }
.day.open button.d { background: var(--reef); border-color: var(--reef); color: var(--ink); }
.day.open button.d small { color: var(--ink); }
button.add-day {
  align-self: flex-start; background: none; border: 1px dashed var(--night-line); color: var(--bone-muted);
  font-weight: 500; font-size: 14px; padding: 8px 15px; border-radius: 10px;
}
button.add-day:hover { filter: none; color: var(--bone); border-color: var(--accent); }
.day.open button.add-day { display: none; }
.day-form { padding: 14px; border-radius: 14px; background: var(--fill); border: 1px solid var(--night-line); }
.day-form .note { text-transform: none; letter-spacing: 0; }
.day-form .actions { margin-top: 14px; }
.day-form button.add { padding: 13px 28px; font-size: 16px; }
.day .list { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.empty { color: var(--faint); font-size: 14px; padding: 6px 0; }

.shift { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border-radius: 12px;
  background: var(--fill); border: 1px solid transparent; }
.shift.mine { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: inset 3px 0 0 var(--accent); }
.shift .t { flex: 0 0 72px; font-weight: 600; font-size: 14px; }
.shift .p { font-weight: 600; letter-spacing: 0.03em; }
.shift .spacer { flex: 1; }
.shift form { display: inline; }
.shift .btn.ghost.mini { color: var(--bone); }
.shift.focus { outline: 3px solid var(--warn); outline-offset: 3px; animation: pulse 1.6s ease-in-out 3; scroll-margin-top: 120px; }
@keyframes pulse { 50% { outline-color: color-mix(in srgb, var(--warn) 25%, transparent); } }
.tag { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); padding: 3px 9px; border-radius: 20px; }
.flag { font-size: 12px; padding: 2px 9px; border-radius: 20px; border: 1px solid; }
.flag.info { color: var(--bone-muted); border-color: var(--night-line); }
.flag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.flag.bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
.flag.ok-flag { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

/* step-by-step questions */
.step { padding: 12px 0; border-top: 1px solid var(--night-line); }
.step:first-of-type { border-top: 0; padding-top: 0; }
.step-q { font-size: 16px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.step-q .num {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-family: var(--display); font-size: 13px; font-weight: 600;
}
.step-q .note { font-size: 13px; font-weight: 400; color: var(--bone-muted); }
.step.bad .step-q .num, .q.bad .step-q .num { background: var(--danger); color: var(--night); }
.step-error { margin-top: 8px; color: var(--danger); font-size: 14px; font-weight: 500; }
.other-time { margin-top: 10px; }
.other-time input { font-size: 18px; padding: 10px 14px; }
.readback { margin-top: 6px; font-size: 15px; color: var(--bone-muted); }
.readback.ready { color: var(--bone); font-weight: 600; padding: 11px 14px; border-radius: 12px; background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.readback.ready::before { content: attr(data-prefix) " "; font-weight: 400; color: var(--bone-muted); }

/* admin */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--night-line); }
.pub:first-of-type { border-top: 0; }
.pub img { width: 60px; border-radius: 6px; }
.people-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.people-list form { display: inline; }
.people-list button { padding: 5px 13px; font-size: 13px; font-weight: 500; background: var(--fill); border-color: var(--night-line); color: var(--bone); }
.people-list button.off { opacity: 0.45; text-decoration: line-through; }
.email-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.email-grid label { display: flex; flex-direction: column; gap: 4px; color: var(--bone-muted); }

/* sign in */
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.who button { padding: 18px; font-family: var(--display); font-size: 20px; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 16px; }

/* to-do cards, change requests */
.card.todo { margin-bottom: 14px; border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.card.todo.answer { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.change-what { margin-top: 6px; }
.todo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--night-line); }
.todo-row:first-of-type { border-top: 0; }
.card > .todo-row:first-child { padding-top: 0; }

/* shift header on finish / change / review pages */
.shift-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.big-date { flex: 0 0 56px; text-align: center; }
.big-date b { display: block; font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1; }
.big-date small { font-size: 11px; letter-spacing: 0.25em; color: var(--bone-muted); }
.shift-head .p { font-weight: 600; letter-spacing: 0.03em; }

/* shift notes form */
.q { padding: 16px 0; border-top: 1px solid var(--night-line); scroll-margin-top: 16px; }
.q:first-child { border-top: 0; padding-top: 0; }
.q.bad textarea, .q.bad input[type=text], .q.bad input[type=number], .q.bad input[type=time] { border-color: var(--danger); }
.q-help { font-size: 14px; color: var(--bone-muted); margin: -2px 0 10px; line-height: 1.45; }
.q-help b { color: var(--bone); font-weight: 600; }
.quick { margin-top: 8px; }
.time-box { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--bone-muted); }
.time-box input { font-size: 18px; padding: 10px 14px; }
.reveal { margin-top: 12px; }
.upload {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 12px 18px; border-radius: 12px; cursor: pointer;
  border: 1px dashed color-mix(in srgb, var(--bone-muted) 60%, transparent); font-weight: 600;
}
.upload:hover { border-color: var(--accent); }
.upload.has { border-style: solid; border-color: var(--accent); color: var(--accent); }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.picked { margin-top: 8px; }
.files { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.file { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--bone-muted); }
.file img, .file .pdf { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--night-line); }
.file .pdf { display: grid; place-items: center; font-weight: 700; color: var(--bone); background: var(--fill); }
.finish-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.finish-actions button.add { padding: 14px 30px; font-size: 17px; }
.problems ul { margin: 8px 0 0 18px; }
.problems a { color: var(--bone); }
.notes-view dl { display: grid; grid-template-columns: 200px 1fr; gap: 10px 16px; }
.notes-view dt { color: var(--bone-muted); font-size: 13px; letter-spacing: 0.03em; }
.notes-view dd { white-space: pre-wrap; }

/* travel & expenses group */
.group-title { margin: 24px 0 10px; display: flex; align-items: baseline; gap: 8px; }
.group-title .note { font-family: var(--sans); text-transform: none; font-size: 13px; font-weight: 400; color: var(--bone-muted); }
.card.group { padding: 16px; }
.sub-title { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin: 4px 0 8px; }
.rows { display: flex; flex-direction: column; gap: 10px; }
.trip { border: 1px solid var(--night-line); border-radius: 14px; padding: 12px; background: var(--fill); }
.trip.confirmed { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.trip-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.trip-n { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.trip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trip-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--bone-muted); }
.trip-grid .span2 { grid-column: 1 / -1; }
.trip-grid input, .expense-row input { padding: 10px 12px; font-size: 16px; width: 100%; min-width: 0; }
.trip-total { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--night-line); }
.trip-km { font-size: 17px; }
.bad-text { color: var(--danger); font-size: 14px !important; }
.confirm { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--warn) 65%, transparent); color: var(--warn); font-weight: 600; }
.trip.confirmed .confirm { border-color: var(--accent); color: var(--accent); }
.confirm input, .switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.add-row { margin-top: 10px; }
.group-total { margin-top: 12px; text-align: right; color: var(--bone-muted); }
.group-total b { color: var(--bone); font-family: var(--display); font-size: 19px; font-weight: 600; }
.expense-row { display: grid; grid-template-columns: 1fr 130px auto; gap: 8px; align-items: center; }
.money { display: flex; align-items: center; gap: 6px; }

/* tables: mileage log, report */
table.log { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
table.log th { text-align: left; color: var(--bone-muted); font-weight: 600; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--night-line); }
table.log td { padding: 8px; border-bottom: 1px solid var(--night-line); vertical-align: top; }
table.log td.n, table.log th.n { text-align: right; white-space: nowrap; }
table.log tfoot td { font-weight: 700; border-bottom: 0; }
.log-wrap { overflow-x: auto; }
.view-section { margin-top: 16px; }

/* travel & expenses report */
.report-controls { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.report-controls label { display: inline-flex; align-items: center; gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; }
.tile-label { font-family: var(--display); font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.tile-figs { display: flex; gap: 22px; margin: 10px 0 6px; }
.tile-figs div { display: flex; flex-direction: column; }
.tile-figs b { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.05; color: var(--accent); }
.report-table .period-head { text-align: center; border-left: 1px solid var(--night-line); }
.report-table td.zero { color: var(--faint); }
.report-table th[rowspan] { vertical-align: bottom; }

/* outbox */
details.email summary { cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.email-subject { font-weight: 600; }
.email-body { white-space: pre-wrap; font-family: inherit; font-size: 14px; margin-top: 10px; color: var(--bone-muted); }

/* pop-ups: "something changed", tour chooser */
.modal-back {
  position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--ink) 82%, transparent); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal {
  width: 100%; max-width: 480px; background: var(--night-soft); border: 1px solid var(--night-line); border-top: 3px solid var(--accent);
  border-radius: 18px; padding: 22px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55); animation: pop 0.25s ease-out;
}
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h2 { margin: 6px 0 4px; font-size: 24px; }
.modal-icon {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display);
  font-size: 26px; font-weight: 700; background: var(--reef); color: var(--ink);
}
.modal .later { margin-top: 16px; width: 100%; }
.notice { padding: 14px; border-radius: 14px; background: var(--fill); border: 1px solid var(--night-line); margin-top: 10px; }
.notice-title { font-weight: 700; font-size: 16px; }
.notice-shift { margin-top: 4px; }
.notice-detail { margin-top: 6px; color: var(--warn); font-weight: 600; }
.focus-bar { padding: 14px; border-radius: 14px; border: 2px solid var(--warn); background: var(--warn-soft); }

/* header controls: guided tour + light/dark */
.tour-launch {
  margin-left: auto; padding: 7px 14px; font-size: 13px; font-weight: 600; background: transparent;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); white-space: nowrap;
}
.tour-launch:hover { filter: none; background: var(--accent-soft); }
.tour-launch::before { content: "?"; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 6px;
  border-radius: 50%; background: var(--reef); color: var(--ink); font-size: 11px; font-weight: 800; }
.theme-wrap { position: relative; flex: 0 0 auto; }
.theme-toggle {
  width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--night-line); color: var(--bone-muted);
}
.theme-toggle:hover, .theme-toggle[aria-expanded=true] { filter: none; color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: 250px; padding: 10px;
  background: var(--night-soft); border: 1px solid var(--night-line); border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.theme-menu-title { font-family: var(--display); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); padding: 4px 6px 8px; }
.theme-option {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px; border-radius: 10px;
  background: transparent; border: 1px solid transparent; color: var(--bone); font-weight: 500; font-size: 14px;
}
.theme-option:hover { filter: none; background: var(--fill); }
.theme-option[aria-checked=true] { border-color: var(--accent); background: var(--accent-soft); }
.theme-option small { display: block; font-size: 12px; font-weight: 400; color: var(--bone-muted); }
.swatch { flex: 0 0 auto; display: inline-flex; width: 44px; height: 26px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(128, 128, 128, 0.35); }
.swatch i { flex: 1; }

/* practice mode + guided tour */
.practice-banner {
  position: sticky; top: 0; z-index: 40; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 16px; font-size: 13px; background: #e0b45a; color: var(--ink);
}
.practice-banner a { color: var(--ink); font-weight: 700; }
.tour-option + .tour-option { margin-top: 10px; }
.tour-option button { width: 100%; text-align: left; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.tour-option-title { font-family: var(--display); font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.tour-option-desc { font-size: 13px; font-weight: 500; opacity: 0.85; }
#tour-chooser .modal { max-height: calc(100vh - 80px); overflow-y: auto; }
.tour-parts-title { margin: 18px 0 6px; font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.tour-parts-head { margin: 10px 0 6px; font-weight: 700; font-size: 14px; color: var(--bone); }
.tour-part + .tour-part { margin-top: 6px; }
.tour-part button { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px;
  border-radius: 12px; color: var(--bone); }
.tour-part button span { font-size: 12px; font-weight: 400; color: var(--bone-muted); }

.touring .tour-launch { visibility: hidden; }
.touring body * { scroll-margin-top: 64px; }  /* keep highlighted things clear of the practice banner */
.tour-hole {
  position: fixed; z-index: 1000; border-radius: 14px; pointer-events: none; display: none;
  box-shadow: 0 0 0 3px var(--reef), 0 0 0 9999px rgba(6, 5, 8, 0.7); transition: all 0.25s ease;
}
.tour-tip {
  position: fixed; z-index: 1001; width: 360px; max-width: calc(100vw - 20px); padding: 18px 18px 14px;
  background: var(--night-soft); border: 1px solid var(--night-line); border-top: 3px solid var(--accent); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px color-mix(in srgb, var(--reef) 55%, transparent), 0 0 22px color-mix(in srgb, var(--reef) 35%, transparent);
}
/* each new step: the card pulses a reef glow a few times ("read me first"), then keeps a soft one */
.tour-tip.fresh { animation: tip-glow 1.1s ease-in-out 3; }
@keyframes tip-glow {
  0%, 100% { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px color-mix(in srgb, var(--reef) 55%, transparent), 0 0 22px color-mix(in srgb, var(--reef) 35%, transparent); }
  50% { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 3px var(--reef), 0 0 46px color-mix(in srgb, var(--reef) 80%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .tour-tip.fresh { animation: none; } }
.tour-tip.center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.tour-tip.sheet { left: 10px; right: 10px; bottom: 10px; top: auto; width: auto; max-height: 46vh; overflow-y: auto; }
.tour-count { font-family: var(--display); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.tour-title { font-family: var(--display); font-size: 22px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.1; margin: 5px 0 7px; }
.tour-text { font-size: 15px; line-height: 1.5; color: var(--bone); }
.tour-hint { margin-top: 8px; font-size: 13px; color: var(--accent); }
.tour-bar { height: 4px; border-radius: 4px; background: var(--night-line); margin: 14px 0 12px; overflow: hidden; }
.tour-bar div { height: 100%; background: var(--reef); }
.tour-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tour-btns button, .tour-btns .btn { padding: 9px 18px; font-size: 14px; }
.tour-x { margin-top: 10px; background: none; border: 0; padding: 0; color: var(--faint); font-size: 12px; font-weight: 500; text-decoration: underline; }
.tour-x:hover { filter: none; color: var(--bone); }

/* phones */
@media (max-width: 760px) {
  .grid2, .tiles { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top { gap: 10px; }
  .top .right { font-size: 12px; }
  .tour-launch { padding: 6px 10px; }
  .weeknav { flex-wrap: nowrap; }
  .weeknav .label { flex: 1; min-width: 0; text-align: center; font-size: 12px; letter-spacing: 0.05em; padding: 7px 10px; }
  .weeknav a.arrow { flex: 0 0 38px; }
  .weeknav .hint { display: none; }
  .day { flex-direction: column; gap: 8px; }
  .day .d, button.d { flex-basis: auto; display: flex; align-items: baseline; gap: 8px; padding: 6px 10px; text-align: left; }
  .day .d b { display: inline; font-size: 22px; }
  .day-form .actions button { flex: 1; }
  .notes-view dl { grid-template-columns: 1fr; gap: 2px; }
  .notes-view dd { margin-bottom: 10px; }
  .trip-grid { grid-template-columns: 1fr; }
  .expense-row { grid-template-columns: 1fr 110px auto; }
  .practice-banner { gap: 10px; padding: 6px 12px; font-size: 12px; }
  .practice-banner .long { display: none; }
}

/* sign in + PIN */
.who button small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: 0.25em; opacity: 0.75; margin-top: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pin-wrap { max-width: 340px; margin: 10px auto 0; text-align: center; }
.pin-who { font-family: var(--display); font-size: 15px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.pin-title { margin: 6px 0 6px; font-size: 28px; }
.pin-help { font-size: 14px; margin-bottom: 4px; }
.pin-error { margin-top: 12px; text-align: left; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin: 22px 0 10px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--bone-muted); transition: background 0.1s; }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); }
.pin-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }  /* keyboards type here; the dots show it */
.pin-dots { margin-bottom: 22px; cursor: text; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pin-pad button { height: 64px; font-family: var(--display); font-size: 26px; font-weight: 500; border-radius: 18px;
  background: var(--night-soft); border-color: var(--night-line); color: var(--bone); }
.pin-pad button:hover { filter: none; border-color: var(--accent); }
.pin-pad button:active { background: var(--accent-soft); }
.pin-pad button.ghost { font-family: var(--sans); font-size: 15px; color: var(--bone-muted); background: transparent; }
.pin-foot { margin-top: 20px; line-height: 1.7; }
.account-row { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--night-line); }
.account-row:first-of-type { border-top: 0; }
.account-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.account-row.off { opacity: 0.5; }
@media (max-width: 700px) { .account-row { grid-template-columns: 1fr; gap: 4px; } .account-row .acts { justify-content: flex-start; } }
.signin-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.signin-form input { font-size: 18px; padding: 14px 16px; text-align: center; border-radius: 14px; }
.signin-form button { padding: 14px; font-size: 17px; }
code { font-family: ui-monospace, monospace; font-size: 13px; background: var(--fill-2); padding: 1px 5px; border-radius: 5px; }
.email-edit input[type=email] { flex: 1; min-width: 0; padding: 7px 10px; font-size: 14px; }
.account-row { grid-template-columns: 1fr 0.9fr 1.8fr auto; }
@media (max-width: 700px) { .account-row { grid-template-columns: 1fr; } }

/* Wagtail, the willy wagtail character */
.wagtail { display: block; height: auto; max-width: 100%; pointer-events: none; user-select: none;
  /* a black bird on a near-black page needs a faint light rim to read */
  filter: drop-shadow(0 0 0.7px color-mix(in srgb, var(--bone) 70%, transparent)) drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35)); }
html[data-theme='day'] .wagtail { filter: drop-shadow(0 6px 14px rgba(36, 30, 40, 0.18)); }
@media (prefers-reduced-motion: no-preference) {
  .wagtail.pop { animation: wag-pop 0.45s cubic-bezier(.2, .9, .3, 1.3) both; }
  .wagtail.flick { animation: wag-flick 1.1s ease-in-out 0.7s 2; transform-origin: 55% 85%; }
  .wagtail.pop.flick { animation: wag-pop 0.45s cubic-bezier(.2, .9, .3, 1.3) both, wag-flick 1.1s ease-in-out 0.6s 2; }
}
@keyframes wag-pop { from { transform: translateY(14px) scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wag-flick { 0%, 100% { rotate: 0deg; } 25% { rotate: -5deg; } 55% { rotate: 4deg; } 80% { rotate: -2deg; } }

/* Wagtail pops up in the corner to say something short */
.wag-say { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; align-items: flex-end; gap: 4px;
  max-width: min(380px, calc(100vw - 32px)); cursor: pointer; }
.wag-say .wagtail { width: 92px; flex: 0 0 auto; }
.wag-say .bubble { order: -1; margin-bottom: 52px; padding: 11px 14px; border-radius: 16px 16px 4px 16px; font-size: 14px; font-weight: 600;
  background: var(--night-soft); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.wag-say.leaving { transition: opacity 0.3s, transform 0.3s; opacity: 0; transform: translateY(10px); }

/* in the guided tour card */
.tour-head { display: flex; align-items: flex-end; gap: 10px; }
.tour-head .wagtail { width: 62px; margin: -30px 0 -2px -6px; flex: 0 0 auto; }
.tour-head > div { min-width: 0; }

/* places Wagtail sits */
.modal-wagtail { width: 96px; margin: -6px 0 4px; }
.empty-note { text-align: center; margin: 18px 0; }
/* Start shift / End shift on today's shift */
.shift .s-clock { flex: 1 1 100%; grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--night-line); }
.shift .s-clock form { margin: 0; }
.clock-btn { padding: 10px 20px; font-size: 16px; font-weight: 700; }
.clock-btn.end { background: var(--bone); color: var(--night); }
.clock-state { font-size: 14px; }
.clock-others, .clock-why { flex: 1 1 100%; }
.loc-link { white-space: nowrap; }
.loc-none { color: var(--accent); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--reef); margin-right: 7px;
  box-shadow: 0 0 0 0 var(--reef); animation: live-pulse 1.8s ease-out infinite; vertical-align: 1px; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
button.linkish { background: none; border: 0; padding: 4px 2px; color: var(--bone-muted); text-decoration: underline; min-height: 0; }
/* admin: Happening now */
.live-strip { margin-bottom: 14px; padding: 12px 14px; }
.live-strip h2 { font-family: var(--display); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; display: flex; align-items: center; }
.live-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--night-line); }
.live-row:first-of-type { border-top: 0; }
.live-row .live-who { flex: 1 1 auto; }
.live-row.late .state { color: var(--accent); font-weight: 600; }
.live-row.done { opacity: .75; }
.flag.live { background: color-mix(in srgb, var(--reef) 22%, transparent); color: var(--bone); }
/* what someone said about a change: quoted, so it reads as their words */
.why-said { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--reef); background: var(--fill); border-radius: 0 10px 10px 0; font-style: italic; }
.why-said .muted { font-style: normal; display: block; }
.why { margin: 18px 0 6px; }
.why textarea { width: 100%; margin-top: 8px; min-height: 64px; }
.decline-why { flex: 1 1 100%; display: grid; gap: 8px; }
.decline-why[hidden] { display: none; }
.decline-why textarea { width: 100%; min-height: 60px; }
.todo-clear { width: 64px; height: 64px; margin: 36px auto 0; border-radius: 50%; display: grid; place-items: center;
  font-size: 30px; font-weight: 700; color: var(--reef); border: 2px solid color-mix(in srgb, var(--reef) 60%, transparent); }
.wag-empty { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; }
.wag-empty .wagtail { width: 84px; flex: 0 0 auto; }
.wag-corner { float: right; width: 58px; margin: -26px -4px 0 8px; }
.signin-wagtail { width: 110px; margin: 0 auto 4px; }

/* animated Wagtail (static/wagtail.js) */
.wag-stage { position: relative; height: 200px; margin: 0 auto 6px; max-width: 340px; }
.wag-stage[data-wagtail='signin'], .wag-stage[data-wagtail='pin'] { height: 236px; }
.wag-body { position: absolute; left: 50%; bottom: 16px; width: 140px; margin-left: -70px; transform-origin: 50% 100%; }
.wag-body .wag-bird { width: 100%; }
.wag-shadow { position: absolute; left: 50%; bottom: 10px; width: 96px; height: 14px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), transparent); transform: translateX(-50%); }
html[data-theme='day'] .wag-shadow { background: radial-gradient(closest-side, rgba(36, 30, 40, 0.22), transparent); }
.wag-bubble { position: absolute; left: 50%; top: 0; transform: translateX(-50%); max-width: 92%; width: max-content;
  padding: 9px 14px; border-radius: 16px; font-size: 14px; font-weight: 600; text-align: center;
  background: var(--night-soft); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.wag-bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; margin-left: -6px; rotate: 45deg;
  background: var(--night-soft); border-right: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); }

/* tour: Wagtail beside the card, the card is his speech bubble */
.tour-bird { position: fixed; z-index: 1002; width: 104px; height: 118px; pointer-events: none; }
.tour-bird.moving { transition: left 0.7s cubic-bezier(.45, .05, .3, 1), top 0.7s cubic-bezier(.45, .05, .3, 1); }
.tour-bird .wag-body { width: 104px; margin-left: -52px; bottom: 8px; }
.tour-bird .wag-shadow { width: 70px; bottom: 4px; }
.tour-bird .wag-bubble { display: none; }
.tour-tip.from-left::after, .tour-tip.from-top::after {
  content: ""; position: absolute; width: 16px; height: 16px; rotate: 45deg; background: var(--night-soft); }
.tour-tip.from-left::after { left: -9px; bottom: 34px; border-left: 1px solid var(--night-line); border-bottom: 1px solid var(--night-line); }
.tour-tip.from-top::after { left: 46px; top: -10px; border-left: 3px solid var(--accent); border-top: 3px solid var(--accent); }

/* one Wagtail at a time: the tour's bird takes over from the page's */
.touring .wag-stage { visibility: hidden; }

/* ---- admin area: sidebar on computers, tab bar on phones ---------------------------------- */
.wrap.admin { max-width: 1240px; }
.admin-shell { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 18px; }
.admin-nav .nav-main, .admin-nav .nav-foot { display: flex; flex-direction: column; gap: 2px; }
.admin-nav .nav-foot { padding-top: 14px; border-top: 1px solid var(--night-line); }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--bone-muted);
  text-decoration: none; font-weight: 600; font-size: 15px; cursor: pointer; }
.nav-item:hover { background: var(--fill); color: var(--bone); }
.nav-item.on { background: var(--accent-soft); color: var(--accent); }
.nav-item .ico { width: 20px; height: 20px; flex: 0 0 20px; }
.nav-count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--warn); color: #111;
  font-size: 12px; font-weight: 700; text-align: center; }
.admin-tabs { display: none; }
.admin-main { min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .page-title { margin: 0; font-size: 28px; }
.page-head .weeknav { margin-bottom: 0; }
.page-tools:empty { display: none; }
.section-title { font-family: var(--display); font-size: 18px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; margin: 26px 0 10px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; padding: 12px 16px; }
.toolbar label { font-weight: 600; font-size: 14px; }
.notes-pick select { width: auto; min-width: 140px; padding: 7px 12px; }
.toolbar-note a { margin-left: 4px; }
.waiting-strip { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 11px 16px; border-radius: 14px; text-decoration: none;
  color: var(--bone); background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); }
.waiting-strip:hover { border-color: var(--warn); }
.waiting-strip b { color: var(--warn); }
.publish-card .pub { margin-top: 6px; }
.admin .grid2 + .section-title { margin-top: 26px; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; gap: 0; }
  .admin-nav { display: none; }
  .wrap.admin { padding-bottom: 100px; }
  .admin-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--night-soft); border-top: 1px solid var(--night-line); }
  .admin-tabs > .nav-item, .admin-tabs .tab-more > .nav-item { flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 11px;
    flex: 1; text-align: center; position: relative; border-radius: 10px; }
  .admin-tabs .tab-more { flex: 1; display: flex; }
  .admin-tabs .tab-more > summary { list-style: none; }
  .admin-tabs .tab-more > summary::-webkit-details-marker { display: none; }
  .admin-tabs .tab-more.on > summary { color: var(--accent); }
  .admin-tabs .nav-count { position: absolute; top: 0; left: 55%; margin: 0; font-size: 10px; min-width: 18px; padding: 0 5px; }
  .more-menu { position: absolute; right: 8px; bottom: calc(100% + 8px); min-width: 190px; padding: 6px; border-radius: 14px;
    background: var(--night-soft); border: 1px solid var(--night-line); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
  .more-menu .nav-item { font-size: 15px; }
  .page-head .page-title { font-size: 24px; }
  .page-head .weeknav { width: 100%; }
  .touring .admin-tabs { z-index: 1; }
}
.grid2 > .card + .card { margin-top: 0; }
@media (min-width: 701px) { .account-row { grid-template-columns: 1fr 0.9fr 1.8fr 236px; } }
.tour-tip.sheet.up { top: 10px; bottom: auto; }
.tour-bird, .tour-bird * { pointer-events: none !important; }  /* never in the way of what the tour asks you to tap */
.roster-hints { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin: 0 0 10px; }
.viewas-banner { background: var(--accent); }  /* not the practice yellow, so the two never get mixed up */

/* dropdowns: the list that opens is drawn by the browser, so give it the scheme's colours
   (a see-through background makes it fall back to white with pale text) */
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 15px; }
select option, select optgroup { background-color: var(--night-soft); color: var(--bone); }

/* who's doing the notes: a small two-way switch */
.notes-by { display: inline-flex; align-items: center; gap: 7px; }
.notes-by-label { font-size: 12px; color: var(--bone-muted); }
.seg { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--fill); border: 1px solid var(--night-line); }
.seg button { padding: 4px 11px; font-size: 13px; font-weight: 600; border-radius: 999px; border: 0;
  background: transparent; color: var(--bone-muted); }
.seg button:hover { filter: none; color: var(--bone); }
.seg button.on { background: var(--accent); color: var(--night); }

.add-client { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--night-line); }
.add-client .row-inline { flex-wrap: wrap; }
.add-client input[type=text] { flex: 1; min-width: 150px; }
.colour-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--bone-muted); cursor: pointer; }

/* who's doing the notes, on a shift row */
.shift .star { color: var(--accent); font-weight: 800; margin-left: 1px; }

/* today */
.day.today { position: relative; }
.day.today button.d { background: var(--accent); border-color: var(--accent); color: var(--night); }
.day.today button.d small { color: var(--night); opacity: .8; }
.day.today .list { border-left: 2px solid var(--accent); padding-left: 10px; margin-left: -12px; }
.today-tag { position: absolute; top: -8px; left: 50%; z-index: 1; transform: translateX(-50%); padding: 1px 7px; border-radius: 999px;
  background: var(--night); border: 1px solid var(--accent); color: var(--accent); font-size: 9px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.day.today { padding-top: 14px; }
.day.today .today-tag { left: 34px; }

/* change / edit / delete: small icons, shown when you point at the shift (always on touch screens) */
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: 10px;
  background: transparent; border: 1px solid transparent; color: var(--bone-muted); cursor: pointer; text-decoration: none; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { filter: none; background: var(--fill); border-color: var(--night-line); color: var(--bone); }
.icon-btn.danger-icon:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
form.row-act { display: inline; margin: 0; }
@media (hover: hover) {
  .shift .row-act { opacity: 0; transition: opacity .15s; }
  .shift:hover .row-act, .shift:focus-within .row-act, .touring .shift .row-act { opacity: 1; }
}

/* the notes switch on the edit screen */
.notes-card { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }


/* boards: tabs (All clients / Clients / Workers), each a grid of board cards */
.tabbar { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; width: max-content; max-width: 100%; overflow-x: auto;
  border-radius: 999px; background: var(--night-soft); border: 1px solid var(--night-line); }
.tabbar .tab { padding: 8px 16px; border-radius: 999px; border: 0; background: transparent; color: var(--bone-muted);
  font-size: 14px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tabbar .tab:hover { filter: none; color: var(--bone); }
.tabbar .tab[aria-selected=true] { background: var(--accent); color: var(--night); }
.tab-count { min-width: 20px; padding: 0 6px; border-radius: 999px; font-size: 11px; background: var(--fill); }
.tab[aria-selected=true] .tab-count { background: color-mix(in srgb, var(--night) 18%, transparent); }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.board-tile { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden;
  background: var(--night-soft); border: 1px solid var(--night-line); transition: border-color .15s; }
.board-tile:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.board-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #120f16; }
.board-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .25s; }
.board-tile:hover .board-thumb img { transform: scale(1.03); }
.board-thumb.no-pic { display: grid; place-items: center; color: rgba(255,255,255,.55); font-weight: 600; text-decoration: none; }
.board-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.board-name { font-family: var(--display); font-size: 17px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em;
  color: var(--bone); text-decoration: none; }
.board-links { margin-top: 3px; color: var(--bone-muted); }
@media (max-width: 560px) { .board-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .board-name { font-size: 15px; } }

/* ===== Mobile-first worker app: header menu, tab bar, Wagtail companion, add-shift steps ===== */
html.sheet-open { overflow: hidden; }
.top > div:nth-child(2) { min-width: 0; }
.menu-btn { display: none; width: 40px; height: 40px; padding: 0; margin-left: auto; place-items: center; background: transparent;
  border: 1px solid var(--night-line); color: var(--bone); }
.menu-btn:hover { filter: none; border-color: var(--accent); color: var(--accent); }
.menu-btn svg { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .top .tour-launch, .top .theme-wrap, .top .right { display: none; }
  .menu-btn { display: grid; }
  .top { margin-bottom: 14px; padding-bottom: 12px; }
}

/* bottom sheets (menu, Wagtail's list) */
.sheet-back { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: color-mix(in srgb, var(--ink) 75%, transparent); backdrop-filter: blur(2px); }
.sheet-back[hidden] { display: none; }
.bsheet { width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto; background: var(--night-soft);
  border: 1px solid var(--night-line); border-bottom: 0; border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); animation: sheet-up .28s cubic-bezier(.2, .9, .3, 1); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bsheet, .day-form.sheet { animation: none; } }
.sheet-grab { width: 40px; height: 4px; border-radius: 4px; background: var(--night-line); margin: 2px auto 14px; }
.sheet-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.sheet-head .wagtail { width: 70px; flex: 0 0 auto; }
.sheet-head h2 { margin: 0 0 2px; font-size: 22px; }
.bsheet .later { width: 100%; margin-top: 14px; }
.app-menu-who { padding: 4px 2px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--night-line); font-weight: 600; line-height: 1.7; }
.app-menu-who a { font-weight: 600; }
.menu-row { width: 100%; text-align: left; background: var(--fill); border-color: var(--night-line); color: var(--bone); border-radius: 14px;
  padding: 13px 16px; margin-bottom: 14px; }
.menu-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.menu-themes .theme-option { padding: 8px; }

/* worker tab bar */
.wtabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--night-soft); border-top: 1px solid var(--night-line); }
.wtab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; border-radius: 12px;
  color: var(--bone-muted); text-decoration: none; font-size: 12px; font-weight: 600; position: relative; white-space: nowrap; }
.wtab svg { width: 22px; height: 22px; }
.wtab.on { color: var(--accent); background: var(--accent-soft); }
.wtab-count { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--warn); color: #111; font-size: 11px; line-height: 18px; text-align: center; }
body.has-wtabs .wrap { padding-bottom: 170px; }
@media (min-width: 900px) {
  .wtabs { left: 50%; right: auto; bottom: 18px; transform: translateX(-50%); gap: 4px; padding: 6px; border: 1px solid var(--night-line);
    border-radius: 999px; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
  .wtab { flex-direction: row; gap: 8px; padding: 9px 18px; border-radius: 999px; font-size: 14px; }
  .wtab svg { width: 19px; height: 19px; }
  .wtab-count { position: static; }
}
.touring .wtabs { z-index: 1; }

/* Wagtail, the companion */
.buddy { position: fixed; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 41;
  transition: opacity .25s, transform .25s; }
.buddy.away { opacity: 0; transform: translateY(24px); pointer-events: none; }
@media (min-width: 900px) { .buddy { right: 24px; bottom: 16px; } }
.buddy-bird { position: relative; display: block; width: 86px; height: 92px; padding: 0; background: none; border: 0; border-radius: 20px; }
.buddy-bird:hover { filter: none; }
.buddy-bird .wag-stage { display: block; height: 92px; max-width: none; margin: 0; }
.buddy-bird .wag-body { width: 78px; margin-left: -39px; bottom: 8px; }
.buddy-bird .wag-shadow { width: 52px; bottom: 5px; }
.buddy-bird .wag-bubble { display: none; }
.buddy-badge { position: absolute; top: 4px; right: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--warn); color: #111; font-size: 12px; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px var(--night); }
.buddy-bubble { position: absolute; right: 72px; bottom: 46px; width: max-content; max-width: min(280px, calc(100vw - 96px));
  padding: 12px 14px; border-radius: 18px 18px 4px 18px; background: var(--night-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 12px 32px rgba(0, 0, 0, .4);
  animation: pop .22s ease-out; }
.buddy-bubble[hidden] { display: none; }
.buddy-text { font-size: 15px; font-weight: 600; line-height: 1.35; }
.buddy-acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.buddy-acts .ghost.mini { padding: 6px 12px; }
.buddy-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; margin-bottom: 8px;
  border-radius: 14px; background: var(--fill); border: 1px solid var(--night-line); color: var(--bone); text-decoration: none; font-weight: 500; }
.buddy-item.todo { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.buddy-item b { flex: 0 0 auto; color: var(--accent); font-size: 14px; }
.touring .buddy-bubble { display: none; }   /* in the tour he's just the To do button */
/* Wagtail is the To do tab: he perches on the right half of the tab bar */
.wtab-slot { flex: 1; }
.buddy { right: calc(25% - 52px); bottom: calc(8px + env(safe-area-inset-bottom)); }
.buddy-bird { text-decoration: none; color: var(--bone-muted); }
.buddy-label { position: absolute; left: 0; right: 0; bottom: -4px; text-align: center; font-size: 12px; font-weight: 600; z-index: 2; }
.buddy.on .buddy-label { color: var(--accent); }
.buddy.on .buddy-bird::before { content: ""; position: absolute; left: 50%; bottom: -8px; width: 92px; height: 30px; margin-left: -46px;
  border-radius: 12px; background: var(--accent-soft); z-index: 0; }

/* the week (worker Week and admin Roster). A shift row is three parts: s-main (time + who),
   s-tags (client, flags, notes button) and s-acts (pencil, bin). On a computer they sit in one line. */
.page-h { margin-top: 0; }
.week-hint { margin-bottom: 10px; }
.shift .s-main, .shift .s-tags, .shift .s-acts { display: contents; }
.shift .t-end { display: block; }
button.add-day.more { border-style: dashed; }
/* on a phone: time and names on top with the pencil and bin at the right, client and flags underneath;
   the date sits in a narrow column on the left, and empty days stay one slim line */
@media (max-width: 560px) {
  .card.days { padding: 6px 10px; }
  .days .day { flex-direction: row; align-items: flex-start; gap: 8px; padding: 8px 0; }
  .days .day.today { padding-top: 16px; }
  .days .day .d, .days button.d { flex: 0 0 44px; display: block; padding: 5px 0; text-align: center; }
  .days .day .d b { display: block; font-size: 21px; }
  .days .day .d small { letter-spacing: .15em; }
  .days .list { gap: 6px; }
  .days .day:not(:has(.shift)) .list { align-self: center; }
  .days .shift { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 6px; align-items: start; padding: 10px 8px 10px 12px; }
  .days .shift .s-main { grid-column: 1; grid-row: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
  .days .shift .t { flex: 0 0 auto; font-size: 13px; }
  .days .shift .t-end { display: inline; margin-left: 2px; }
  .days .shift .p { font-size: 15px; line-height: 1.25; }
  .days .shift .s-acts { grid-column: 2; grid-row: 1; display: flex; gap: 2px; margin: -5px -2px -5px 0; }
  .days .shift .s-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .days .shift .spacer { display: none; }
  .days .shift .flag { font-size: 11px; }
  .days button.add-day { width: 100%; text-align: left; padding: 9px 12px; font-size: 14px; }
  .days button.add-day.more { width: auto; border: 0; background: none; padding: 2px 4px; font-size: 13px; color: var(--accent); }
  .roster-hints { flex-wrap: wrap; gap: 4px 12px; }
}

/* add a shift: a sheet that asks one question at a time */
.wiz-head, .wiz-nav { display: none; }
.wiz-back-drop { position: fixed; inset: 0; z-index: 61; background: color-mix(in srgb, var(--ink) 75%, transparent); backdrop-filter: blur(2px); }
.wiz-back-drop[hidden] { display: none; }
.day-form.sheet { position: fixed; z-index: 62; left: max(0px, calc(50% - 270px)); right: max(0px, calc(50% - 270px)); bottom: 0;
  max-height: 90vh; overflow-y: auto; margin: 0; background: var(--night-soft); border: 1px solid var(--night-line); border-bottom: 0;
  border-top: 3px solid var(--accent); border-radius: 22px 22px 0 0; padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .45); animation: sheet-up .28s cubic-bezier(.2, .9, .3, 1); }
.day-form.sheet .wiz-head { display: flex; align-items: flex-end; gap: 10px; margin: 6px 0 16px; position: relative; }
.day-form.sheet .wiz-head .wagtail { width: 72px; flex: 0 0 auto; margin-top: -8px; }
.wiz-words { flex: 1; min-width: 0; padding-right: 30px; }
.wiz-count { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.wiz-say { font-family: var(--display); font-size: 24px; font-weight: 600; text-transform: uppercase; line-height: 1.1; margin-top: 4px; }
.wiz-x { position: absolute; top: -4px; right: -4px; width: 36px; height: 36px; padding: 0; font-size: 22px; line-height: 1;
  background: transparent; border: 1px solid var(--night-line); color: var(--bone-muted); }
.wiz-x:hover { filter: none; color: var(--bone); border-color: var(--accent); }
.day-form.sheet .step.wiz-off, .day-form.sheet .step-q { display: none; }
.day-form.sheet .step { border: 0; padding: 0; margin: 0; }
.day-form.sheet .chips.big { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.day-form.sheet .chips.big .chip span { width: 100%; justify-content: center; min-height: 56px; font-size: 17px; border-radius: 16px; }
.day-form.sheet .other-time { margin-top: 12px; }
.day-form.sheet .other-time input { font-size: 18px; padding: 12px 14px; width: 100%; }
.day-form.sheet .wiz-nav { display: flex; gap: 10px; margin-top: 16px; }
.day-form.sheet .wiz-nav .wiz-next { margin-left: auto; padding: 12px 30px; font-size: 16px; }
.day-form.sheet:not(.wiz-confirm) .readback, .day-form.sheet:not(.wiz-confirm) .actions { display: none; }
.day-form.sheet.wiz-confirm .readback.ready { font-size: 17px; padding: 16px; }
.day-form.sheet .actions { display: flex; flex-direction: column-reverse; gap: 8px; margin-top: 14px; }
.day-form.sheet .actions button.add { width: 100%; padding: 15px; font-size: 17px; }
.day-form.sheet .actions .day-cancel { display: none; }

/* the "something changed" pop-up comes up from the bottom on phones */
@media (max-width: 640px) {
  .modal-back { align-items: flex-end; padding: 0; }
  .modal-back .modal { border-radius: 22px 22px 0 0; max-height: 92vh; overflow-y: auto; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* during the guided tour the add-shift sheet sits above the tour's dimming, with the tour card above it */
.touring .day-form.sheet { z-index: 1000; max-height: 58vh; }

/* "Refresh everyone's app" sits in the admin nav like a link */
.nav-form { margin: 0; }
.nav-form button.nav-item { width: 100%; text-align: left; background: none; border: 0; border-radius: 12px; font: inherit;
  font-weight: 600; font-size: 15px; color: var(--bone-muted); display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.nav-form button.nav-item:hover { filter: none; background: var(--fill); color: var(--bone); }

/* worker Roster: Everyone / Just me, then the week's board right on the page */
.roster-switch, .view-switch { display: flex; width: 100%; margin: 0 0 12px; }
.roster-switch a, .view-switch a { flex: 1; text-align: center; padding: 9px 12px; border-radius: 999px; font-weight: 600; font-size: 14px;
  color: var(--bone-muted); text-decoration: none; }
.roster-switch a.on, .view-switch a.on { background: var(--accent); color: var(--night); }
.roster-frame { display: block; width: 100%; height: 70vh; border: 0; border-radius: 14px; background: #120e18; }
.roster-acts { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* the Me tab */
.me-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.me-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent); font-family: var(--display); font-size: 24px; font-weight: 600; }
.me-head .page-h { margin: 0; }
.me-title { font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin: 22px 0 8px; }
.me-months { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.me-months .card + .card { margin-top: 0; }
.me-month { padding: 14px; }
.me-month-name { font-weight: 700; margin-bottom: 8px; }
.me-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 4px; }
.me-figs b { display: block; font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.1; color: var(--bone); }
.me-figs span { font-size: 11px; color: var(--bone-muted); letter-spacing: .05em; }
.me-note { margin-top: 8px; }
.me-list { padding: 4px 6px; }
.me-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 8px;
  border-top: 1px solid var(--night-line); color: var(--bone); text-decoration: none; }
.me-row:first-child { border-top: 0; }
.me-row:hover { background: var(--fill); border-radius: 10px; }
.me-pin input { font-size: 20px; letter-spacing: .4em; max-width: 200px; }
.me-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 380px) { .me-figs b { font-size: 20px; } }

/* phones: no double-tap zoom (taps register straight away), and no zooming in when a box is tapped:
   iPhones zoom into any typing box with text under 16px. Pinch-zoom is off too (base.html). */
html { touch-action: manipulation; }
@media (max-width: 900px) {
  input, select, textarea { font-size: 16px !important; }
}

/* add-shift choices: what's usual on that weekday as pills, the rest as a plain list */
.sugg-label { margin: 0 0 8px; font-weight: 600; color: var(--bone-muted); }
.sugg:empty { display: none; }
.day-form .sugg { margin-bottom: 10px; }
.rest-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 2px; margin: 2px 0 4px;
  color: var(--accent); font-weight: 600; font-size: 15px; }
.rest-toggle::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); margin: -4px 0 0 4px; }
.rest-toggle:hover { filter: none; text-decoration: underline; }
.optlist { display: flex; flex-direction: column; border: 1px solid var(--night-line); border-radius: 14px; overflow: hidden; background: var(--fill); }
.optlist .opt span { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 14px; border: 0; border-radius: 0;
  background: none; border-top: 1px solid var(--night-line); font-size: 16px; font-weight: 500; min-height: 0; }
.optlist .opt:first-child span { border-top: 0; }
.optlist .opt input:checked + span { background: var(--accent-soft); color: var(--bone); font-weight: 600; }
.optlist .opt .tick { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--night-line); flex: 0 0 auto; }
.optlist .opt input:checked + span .tick { background: var(--accent); border-color: var(--accent); }
.optlist .opt input:checked + span .tick::after { content: "\2713"; display: grid; place-items: center; color: var(--night); font-size: 13px; font-weight: 800; height: 100%; }
.sugg .opt .tick { display: none; }
.optlist .opt .order:empty { display: none; }
.day-form.sheet .optlist { max-height: 42vh; overflow-y: auto; }
.day-form.sheet .chips.big.sugg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.time-more { display: flex; gap: 4px 22px; flex-wrap: wrap; }
.time-more .chip span, .time-more .chip span:hover { padding: 6px 2px; font-size: 15px; font-weight: 600; background: none; border: 0;
  border-radius: 0; color: var(--accent); min-height: 0; }
.time-more .chip input:checked + span { background: none; color: var(--bone); text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 5px; text-decoration-color: var(--accent); }
.day-form.sheet .finish-row { margin-top: 12px; }

/* Wagtail stands out: bigger, and perched on a twig */
.buddy-bird { width: 104px; height: 112px; }
.buddy-bird .wag-stage { height: 112px; position: relative; z-index: 1; }
.buddy-bird .wag-body { width: 96px; margin-left: -48px; bottom: 11px; }
.buddy-bird .wag-shadow { display: none; }

.buddy-bird::after { content: ""; position: absolute; left: 50%; bottom: 8px; width: 104px; height: 22px; margin-left: -52px; z-index: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26'%3E%3Cpath d='M4 15 C30 12 60 13 116 9' stroke='%238a5a35' stroke-width='5' stroke-linecap='round' fill='none'/%3E%3Cpath d='M84 11 C88 4 96 2 102 3 C98 8 92 11 84 11Z' fill='%236fa86a'/%3E%3Cpath d='M22 14 C18 20 12 23 6 23 C10 18 15 15 22 14Z' fill='%237fb879'/%3E%3Cpath d='M60 13 L68 21' stroke='%238a5a35' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; pointer-events: none; }
.buddy-badge { z-index: 2; top: 8px; right: 8px; }
.buddy-bubble { right: 40px; bottom: 112px; border-radius: 18px 18px 4px 18px; }
.buddy-bird::after { bottom: 16px; }
.buddy-bird .wag-body { bottom: 19px; }
@media (min-width: 900px) {
  .wtab-slot { display: none; }
  .buddy { right: 24px; bottom: 16px; }
}

body.has-wtabs .wrap { padding-bottom: 190px; }

/* workers: a round Me button (their initial) top right, in place of the menu; the rest of the
   header controls live on the Me page */
.worker-page .top .tour-launch, .worker-page .top .theme-wrap, .worker-page .top .right { display: none; }
.me-btn { margin-left: auto; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  font-family: var(--display); font-size: 19px; font-weight: 600; text-decoration: none; text-transform: uppercase; }
.me-btn:hover, .me-btn.on { background: var(--accent); color: var(--night); border-color: var(--accent); }

/* Week layout "Strip + list" (the default): a day strip, then only the days with shifts */
.shift .cl { display: none; }
.day-strip { display: flex; gap: 5px; margin: 0 0 8px; }
.day-strip .ds { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px;
  border-radius: 14px; background: var(--fill); border: 1px solid var(--night-line); color: var(--bone); font: inherit; }
.day-strip .ds:hover { filter: none; border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.day-strip .ds small { font-size: 10px; letter-spacing: .1em; color: var(--bone-muted); font-weight: 600; }
.day-strip .ds b { font-family: var(--display); font-size: 19px; font-weight: 600; line-height: 1.1; }
.day-strip .ds i { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.day-strip .ds.has i { background: var(--accent); }
.day-strip .ds.today { background: var(--accent); border-color: var(--accent); color: var(--night); }
.day-strip .ds.today small { color: var(--night); }
.day-strip .ds.today.has i { background: var(--night); }
.layout-strip .day.empty { padding: 0 !important; border: 0; min-height: 0; }
.layout-strip .day.empty > button.d, .layout-strip .day.empty .add-day, .layout-strip .day.empty .today-tag { display: none; }
.layout-strip .day.empty .list { border: 0; padding: 0; margin: 0; }
.card.days.layout-strip.no-shifts { padding: 0; border: 0; background: none; }
.layout-strip .shift .cl { display: inline; font-weight: 700; letter-spacing: .02em; }
.layout-strip .shift .s-tags .tag { display: none; }
.layout-strip .shift .p { font-weight: 500; color: var(--bone-muted); }
@media (max-width: 560px) {
  .layout-strip .shift .p { flex-basis: 100%; font-size: 14px; }
  .layout-strip .shift .s-tags:not(:has(*:not(.tag))) { display: none; }
}

/* Me: pick the week layout */
.layout-pick { display: grid; gap: 8px; }
.layout-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 16px;
  background: var(--night-soft); border: 1px solid var(--night-line); color: var(--bone); font-weight: 400; }
.layout-opt:hover { filter: none; border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.layout-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.layout-opt b { display: block; font-weight: 700; }
.layout-opt small { display: block; color: var(--bone-muted); font-size: 13px; margin-top: 2px; }
.layout-pic { flex: 0 0 54px; height: 54px; border-radius: 10px; background: var(--fill); border: 1px solid var(--night-line);
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 3px; padding: 6px; }
.layout-pic i { width: 4px; height: 8px; border-radius: 2px; background: var(--night-line); }
.layout-pic i.d { background: var(--accent); }
.layout-pic u { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--night-line); }
.layout-pic.strip u { height: 9px; background: color-mix(in srgb, var(--accent) 45%, transparent); margin-top: 2px; }
.layout-opt.on .layout-pic { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

/* pages with the week swipe: no sideways overscroll / swipe-to-go-back (Android and desktop Chrome) */
html.week-swipe, html.week-swipe body { overscroll-behavior-x: none; }

/* People: clients and workers as tappable rows */
.pe-list { display: flex; flex-direction: column; border: 1px solid var(--night-line); border-radius: 14px; overflow: hidden; }
.pe-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--night-line);
  color: var(--bone); text-decoration: none; }
.pe-row:first-child { border-top: 0; }
.pe-row:hover { background: var(--fill); }
.pe-row.off { opacity: .55; }
.pe-row .dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.pe-row small .dot { width: 8px; height: 8px; margin: 0 4px 0 0; }
.pe-main { flex: 1; min-width: 0; }
.pe-main b { font-weight: 700; }
.pe-main small { display: block; color: var(--bone-muted); font-size: 13px; margin-top: 2px; }
.pe-go { color: var(--bone-muted); font-size: 22px; line-height: 1; }
.grid2.tight { gap: 12px; }
.client-edit textarea { min-height: 64px; }
.client-edit #c-imp { border-color: color-mix(in srgb, var(--danger) 45%, var(--night-line)); }
.over { color: var(--danger); font-weight: 600; }
.optlist.assign { max-height: none; }

/* client details for workers: tap a client's name; important notes stand out */
.cl-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.cl-btn:hover { filter: none; text-decoration: underline; text-underline-offset: 3px; }
button.tag.cl-btn { padding: 3px 9px; color: var(--ink); text-decoration: none; }
.cl-btn .imp { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 5px; border-radius: 50%;
  background: var(--danger); color: var(--night); font-size: 10px; font-weight: 800; vertical-align: 1px; }
.client-sheet-name { margin: 0 0 12px; font-size: 24px; }
.client-imp { padding: 12px 14px; border-radius: 14px; margin-bottom: 12px; background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent); }
.client-imp b { color: var(--danger); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.client-imp p, .client-loc p, .client-more p { margin: 4px 0 0; white-space: pre-line; font-size: 16px; }
.client-loc, .client-more { margin-bottom: 12px; }
.wiz-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent); }
.wiz-note b { color: var(--danger); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.wiz-note p { margin: 3px 0 0; white-space: pre-line; }
.day-form.sheet:not(.wiz-confirm) .wiz-note { display: none; }

/* admin Roster: each capped client's hours this week against their maximum */
.hours-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.hours-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px;
  background: var(--fill); border: 1px solid var(--night-line); color: var(--bone); text-decoration: none; }
.hours-chip .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.hours-chip b { font-weight: 700; }
.hours-chip small { color: var(--bone-muted); }
.hours-chip.near { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.hours-chip.near b { color: var(--warn); }
.hours-chip.over { border-color: var(--danger); background: var(--danger-soft); }
.hours-chip.over b { color: var(--danger); }

/* inviting a worker */
.invite-link input { font-size: 15px !important; }
.invite-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.invite-email summary { cursor: pointer; font-weight: 600; }
.invite-email pre { white-space: pre-wrap; font: inherit; font-size: 14px; color: var(--bone-muted); margin: 12px 0 0; }
.invite-open { display: inline-block; }

/* People: tabs, tucked-away add forms, sign-in blocks */
.people-tabs { margin-bottom: 14px; }
.people-tabs small { opacity: .7; font-weight: 500; margin-left: 2px; }
.add-box { margin-bottom: 12px; padding: 12px 16px; }
.add-box summary { cursor: pointer; font-weight: 700; color: var(--accent); list-style: none; }
.add-box summary::-webkit-details-marker { display: none; }
.add-box[open] summary { margin-bottom: 10px; }
.pe-main .flag { font-size: 11px; vertical-align: 1px; }
.acct { display: grid; gap: 10px; }
.acct-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acct-top .flag { margin-right: 6px; }
.acct-email input { flex: 1; min-width: 0; }
.acct-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-card { display: grid; gap: 8px; }
.admin-card + .admin-card { margin-top: 10px; }

/* Outbox: one line per email, opens when tapped */
.outbox-off { color: var(--warn); }
.ob-row { border-top: 1px solid var(--night-line); }
.ob-row:first-child { border-top: 0; }
.ob-row summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.ob-row summary::-webkit-details-marker { display: none; }
.ob-row summary:hover { background: var(--fill); }
.ob-row[open] summary { background: var(--fill); }
.ob-body { padding: 4px 14px 14px; }
.ob-body .email-body { white-space: pre-wrap; font: inherit; font-size: 14px; color: var(--bone-muted); margin: 8px 0 0; }

/* Reports: one period at a time */
.report-tabs { margin-bottom: 12px; }
.report-summary { padding: 14px 16px; }
.report-range { font-weight: 700; margin-bottom: 8px; }
.report-figs { grid-template-columns: 1fr 1fr; }
.report-n { text-align: right; flex: 0 0 auto; }
.report-n b { display: block; font-weight: 700; }
.report-n small { color: var(--bone-muted); font-size: 13px; }
.report-opts { margin-top: 18px; }
.report-opts summary { cursor: pointer; font-weight: 600; color: var(--accent); }

/* Boards: one quiet line on top */
.boards-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.boards-top p { margin: 0; }

/* tour: their turn to tap */
.tour-turn { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .04em; margin-right: auto; align-self: center; }
.tour-btns .tour-skip { padding: 6px 12px; font-size: 13px; }

/* after the PIN, for someone who's admin and a worker: which view? */
.choose-wrap { max-width: 520px; margin: 24px auto; }
.choose-views { display: grid; gap: 12px; margin: 18px 0; }
.choose-card { display: grid; grid-template-columns: 36px 1fr; gap: 2px 14px; align-items: center; text-align: left;
  padding: 18px; border-radius: 18px; background: var(--night-soft); color: var(--bone); border: 1px solid var(--night-line); }
.choose-card svg { grid-row: span 2; width: 30px; height: 30px; color: var(--accent); }
.choose-card b { font-family: var(--display); font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.choose-card span { font-size: 14px; color: var(--bone-muted); font-weight: 500; }
.choose-card:hover, .choose-card.last { border-color: var(--accent); }
.choose-card.last::after { content: "Last time"; grid-column: 2; font-size: 11px; color: var(--accent); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.also-admin { margin: 12px 0 4px; }
.also-admin small { font-weight: 500; }

/* admin Overview: the week at a glance */
.ov-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (min-width: 900px) { .ov-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ov-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--night-soft);
  border: 1px solid var(--night-line); color: var(--bone); text-decoration: none; min-width: 0; }
.ov-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 900px) { .ov-tile:last-child:nth-child(odd) { grid-column: auto; } }
.ov-tile b { font-family: var(--display); font-size: 34px; line-height: 1.05; }
.ov-k { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--bone-muted); }
.ov-sub { font-size: 12.5px; color: var(--bone-muted); }
.ov-tile.warn { border-color: color-mix(in srgb, var(--warn) 65%, transparent); }
.ov-tile.warn b { color: var(--warn); }
a.ov-tile:hover { border-color: var(--accent); }
.ov-live { display: flex; align-items: center; gap: 6px; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px;
  background: var(--accent-soft); color: var(--bone); text-decoration: none; font-size: 14px; }
.ov-live .late { color: var(--warn); }
.ov-live span { margin-left: auto; }
.ov-attn { margin-bottom: 12px; }
.ov-attn h3, .ov-table h3 { font-family: var(--display); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 10px; }
.attn { display: block; padding: 9px 12px; margin-top: 6px; border-radius: 10px; text-decoration: none; color: var(--bone); font-size: 14px;
  background: color-mix(in srgb, var(--warn) 12%, transparent); border-left: 3px solid var(--warn); }
.attn.bad { background: var(--danger-soft); border-left-color: var(--danger); }
.attn.soft { background: var(--fill); border-left-color: var(--night-line); }
.ov-cols { display: grid; gap: 12px; margin-bottom: 12px; }
@media (min-width: 900px) { .ov-cols { grid-template-columns: 1fr 1fr; align-items: start; } }
.ov-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 92px; gap: 8px; align-items: center; padding: 8px 2px;
  border-top: 1px solid var(--night-line); color: var(--bone); text-decoration: none; font-size: 14px; }
.ov-row.four { grid-template-columns: minmax(0, 1fr) 48px 70px 86px; }
.ov-row.note { grid-template-columns: minmax(0, 1fr) auto auto 64px; }
.ov-row.head { border-top: 0; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bone-muted); padding-top: 0; }
.ov-row > span:not(.nm) { text-align: right; }
.ov-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-row small { color: var(--bone-muted); font-size: 11.5px; }
.ov-row.zero { opacity: .5; }
a.ov-row:hover { background: var(--fill); }
.ov-row .hrs.over, .ov-row .late, .ov-row.late .age { color: var(--warn); font-weight: 600; }
.ov-row .bar { display: block; height: 4px; margin-top: 4px; border-radius: 4px; background: var(--night-line); overflow: hidden; }
.ov-row .bar i { display: block; height: 100%; background: var(--reef); }
.ov-row .hrs.over .bar i { background: var(--warn); }
.ov-row.note .age { font-weight: 600; }
