:root {
    color-scheme:light;
    --ink:#29252a; --muted:#665f64; --accent:#9d3157; --accent-dark:#772241;
    --line:#e3deda; --canvas:#f8f7f4; --tint:#f8edf0; --surface:#fff;
    --gutter:clamp(18px,4vw,52px); --measure:1280px;
    font:16px/1.55 "Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
* {box-sizing:border-box}
body {margin:0;color:var(--ink);background:var(--canvas)}
header {background:var(--surface);border-bottom:1px solid var(--line)}
.masthead,main {max-width:var(--measure);margin:auto;padding-inline:var(--gutter)}
.masthead {min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:12px 24px;flex-wrap:wrap;padding-block:8px}
.brand {display:block;width:184px;flex:none}
.brand img {display:block;width:100%;height:auto}
nav {display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px}
a {color:var(--accent);text-underline-offset:3px}
nav a,.dept-list a {text-decoration:none;color:var(--muted);font-size:.88rem;font-weight:600;padding:7px 10px;border-radius:7px}
nav a:hover,.dept-list a:hover,nav [aria-current],.dept-list [aria-current] {background:var(--tint);color:var(--accent-dark)}
main {padding-block:clamp(26px,4vw,52px) 64px}
h1,h2,p {margin:0}
h1 {font-size:clamp(1.75rem,3.4vw,2.65rem);letter-spacing:-.045em;line-height:1.16;margin-bottom:24px}
h2 {font-size:1.16rem;line-height:1.35;letter-spacing:-.02em;margin-bottom:14px}
p {color:var(--muted);margin-bottom:14px}
p:last-child {margin-bottom:0}
.card {background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:clamp(16px,2.5vw,28px);margin-bottom:18px;overflow:auto;min-width:0}
form {display:flex;align-items:end;gap:14px;flex-wrap:wrap}
label {display:grid;gap:5px;min-width:0;max-width:100%;font-size:.85rem;color:#514951;font-weight:600}
input,select,button {font:inherit;min-height:42px;border-radius:7px}
input,select {max-width:100%;min-width:0;padding:7px 11px;border:1px solid #bfb7b9;color:var(--ink);background:white}
button,.cta {display:inline-flex;align-items:center;justify-content:center;gap:16px;border:0;background:var(--accent);color:white;padding:10px 16px;font-size:.9rem;font-weight:650;line-height:1.4;text-decoration:none;cursor:pointer;border-radius:8px}
button:hover,.cta:hover {background:var(--accent-dark)}
nav button,.rows button,td button {background:#f4f1ef;color:#514951}
nav button:hover,.rows button:hover,td button:hover {background:#eae4e3}
.check {display:flex;align-items:center;gap:8px}
.check input {min-height:auto;accent-color:var(--accent)}
table {width:100%;border-collapse:collapse;text-align:left;font-size:.88rem;font-variant-numeric:tabular-nums}
td,th {padding:12px 10px;border-bottom:1px solid var(--line)}
thead th {color:var(--muted);font-weight:600;background:#f7f6f3}
tbody tr:last-child>* {border-bottom:0}
small {display:block;color:var(--muted);font-size:.78rem;font-weight:450}
.scroll {overflow-x:auto}
.grid {min-width:790px}
.grid th,.grid td {white-space:nowrap}
.grid tbody th {position:sticky;left:0;background:white}
.shift {display:inline-block;padding:4px 8px;border-radius:5px;background:#f3f2ee;color:#585459;font-size:.83rem}
.shift a {color:inherit}
.shift-work,.morning {background:#eaf1ef;color:#305c51}
.shift-vacation,.shift-leave,.late {background:#f9ecd8;color:#765625}
.rows,.alerts {padding:0;margin:0;list-style:none}
.rows li {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}
.rows li:last-child {border:0}
.notice,.alerts li {border-radius:7px;padding:10px 14px;margin-bottom:8px}
.notice {background:#e5f1e8;color:#305a44}
.alerts .block {background:#fae8e9;color:#83283d}
.alerts .review {background:#fff3dc;color:#74541e}
.invite {overflow-wrap:anywhere}
.dept-list {display:flex;flex-wrap:wrap;gap:5px;margin:8px 0 16px}
details {margin:12px 0}
summary {cursor:pointer;color:var(--accent);font-weight:600}
details[open] summary {margin-bottom:14px}
:focus-visible {outline:3px solid #9a4971;outline-offset:3px}
.account main {max-width:540px;padding-top:clamp(30px,8vh,84px)}
.account form,.account label,.account .form-action,.account main button {width:100%}
.home main {max-width:1220px}
.landing {display:grid;grid-template-columns:1.06fr 1fr;gap:clamp(24px,5vw,64px);align-items:center;padding:clamp(32px,6vw,76px) 0}
.landing h1 {font-family:"Iowan Old Style",Georgia,serif;font-size:clamp(2.9rem,5.8vw,5rem);font-weight:500;line-height:1.02;letter-spacing:-.055em;margin-bottom:20px}
.landing em {display:block;color:var(--accent);font-weight:400}
.landing p {max-width:42ch;margin-bottom:26px;font-size:1.05rem}
.preview {margin:0;padding:clamp(16px,2.6vw,34px);background:white;border:1px solid var(--line);border-top:3px solid #b76380;border-radius:14px;box-shadow:0 16px 45px #32242a0c;min-width:0}
.preview figcaption {font-size:1.25rem;letter-spacing:-.025em;font-weight:650;margin-bottom:18px}
.preview table {table-layout:fixed;text-align:center}
.preview th,.preview td {padding:11px 2px}
.preview th:first-child {text-align:left}
.preview td span {display:block;margin:0 1px;border-radius:5px;font-size:.78rem;padding:5px 0}
.off {background:#f5f2f0;color:#665e62}
.features {display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(16px,4vw,48px);border-top:1px solid var(--line);padding-top:24px}
.features .card {border:0;padding:0;background:transparent;border-radius:0}
.features h2 {font-size:1rem;margin-bottom:6px}
.features p {font-size:.92rem}
@media(max-width:760px) {
 .landing,.features {grid-template-columns:1fr}
 .landing {padding:16px 0 32px}
 .features {gap:10px}
 .masthead {justify-content:flex-start}
 .masthead nav {gap:2px;max-width:100%}
 .home .masthead {justify-content:space-between}
 .brand {width:152px}
 form label,.form-action {flex:1 1 180px}
 .form-action button {width:100%}
 nav form,nav .form-action {flex:none}
 .preview td span {font-size:.72rem}
}
.people {display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.people button {background:#f4ecef;color:#632941;cursor:grab}
.people button[aria-pressed=true] {background:#832d51;color:#fff}
.time-row {display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;border-bottom:1px solid var(--line);font-size:.82rem}
.time-row canvas {display:block;width:100%;height:38px;touch-action:none;cursor:crosshair;background:#fbf9f7}
.time-row canvas.selected {outline:1px solid var(--accent);outline-offset:-1px}
.time-axis {display:flex;justify-content:space-between;margin-left:64px;font-size:.75rem;color:var(--muted)}
.timeline form {padding-top:12px}
#month-board {background:#fff;border:1px solid var(--line);border-radius:16px;padding:clamp(12px,2vw,26px);margin-bottom:20px}
.month-top,.month-tools,.month-arrows {display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.month-top h2 {font-family:Georgia,serif;font-weight:500;font-size:clamp(1.9rem,3vw,2.6rem);margin:0}
.month-arrows a {padding:5px 12px;border:1px solid var(--line);border-radius:7px;text-decoration:none}
.month-tools {border-block:1px solid var(--line);margin:14px 0;padding:8px 0}
.month-tools .people {margin:0}
.worker {cursor:grab}
.month-scroll {overflow-x:auto}
.month-grid {min-width:700px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-left:1px solid var(--line);border-top:1px solid var(--line)}
.month-day,.month-weekday,.outside {border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:6px}
.month-weekday,.outside {background:#f6f4f2;font-size:.8rem;color:var(--muted)}
.month-day {min-height:95px;cursor:pointer}
.month-day.over {background:#ffe8f0;outline:2px solid var(--accent);outline-offset:-2px}
.day-open {background:transparent;color:var(--ink);padding:2px 5px;min-height:25px}
.month-tag {display:flex;align-items:flex-start;flex-direction:column;gap:0;width:100%;min-height:0;margin-top:3px;padding:4px 6px;line-height:1.25;font-size:.78rem;text-align:left;cursor:grab}
.month-tag b {max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.month-tag span {font-variant-numeric:tabular-nums;font-size:.72rem}
.month-tag.tone-0 {background:#f9e8ed;color:#67283f}.month-tag.tone-1 {background:#e4efed;color:#23564b}.month-tag.tone-2 {background:#f7eddc;color:#694e24}.month-tag.tone-3 {background:#edeaf6;color:#4b4276}
#month-editor {border:1px solid var(--line);border-radius:18px;width:min(520px,95vw);max-height:90vh;color:var(--ink);padding:24px}
#month-editor::backdrop {background:#26212960}
#month-editor form {align-items:start}
#month-editor h2,#month-editor fieldset,#month-editor details,#month-editor output {width:100%}
#month-editor fieldset {border:1px solid var(--line);border-radius:8px;padding:12px;display:flex;flex-wrap:wrap;gap:8px}
#month-editor fieldset[hidden],#month-editor button[hidden] {display:none}
.clock-slider {width:100%;accent-color:var(--accent)}
.dialog-actions {display:flex;flex-wrap:wrap;gap:6px}
.dialog-actions button:not(:first-child) {background:#f1eeec;color:var(--ink)}
#shift-strip {width:100%;height:54px;touch-action:none;cursor:grab;background:#faf8f6;border-radius:6px}
#shift-strip:active {cursor:grabbing}
#month-editor output {font-size:1.35rem;font-weight:650;font-variant-numeric:tabular-nums}

#month-editor [hidden] {display:none}
#month-editor [data-groups] {display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%}
#month-editor [data-groups] select {max-width:100%}
#month-editor [data-split] {display:contents}
#month-editor [data-split][hidden] {display:none}
#month-editor [data-times] label, #month-editor [data-single] {flex:1 1 42%}
#month-editor [data-times] > small {width:100%;color:var(--muted)}
