/* TCA To-Do */
:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --ink: #16213a;
  --ink-2: #3b4760;
  --muted: #6b7690;
  --line: #e3e8f0;
  --soft: #eef2f8;
  --navy: #182f59;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --accent-soft: #e6eefe;
  --green: #15803d;
  --green-soft: #e3f5e9;
  --red: #c0262d;
  --red-soft: #fdecec;
  --amber: #a5590b;
  --amber-soft: #fdf3dc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --tabbar-h: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1422;
    --card: #172033;
    --ink: #e8edf6;
    --ink-2: #c3cbdb;
    --muted: #8d98ae;
    --line: #26314a;
    --soft: #1d2840;
    --navy: #0b1730;
    --accent: #5b8cff;
    --accent-soft: #1d2d52;
    --green: #4ade80;
    --green-soft: #12301f;
    --red: #f87171;
    --red-soft: #3a1618;
    --amber: #fbbf24;
    --amber-soft: #3a2a0c;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
}
body.plain { padding-bottom: 0; }
a { color: var(--accent); text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
small { font-size: .82em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.err { display: block; color: var(--red); font-style: normal; font-size: .85rem; margin-top: 4px; }
p.err { margin: 8px 0 0; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--navy); color: #fff;
  padding-top: env(safe-area-inset-top);
}
.topbar-in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; letter-spacing: .2px; }
.brand img { border-radius: 8px; }
.who { font-size: .85rem; color: #c7d3ea; max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }

/* Bottom tabs */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--card) 94%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
  flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); font-size: .7rem; font-weight: 600; padding: 4px 0; border-radius: 10px;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--accent); }

/* Flash & nudges */
.flash {
  background: var(--green-soft); color: var(--green); border-radius: 12px;
  padding: 11px 14px; margin-bottom: 14px; font-weight: 500; font-size: .95rem;
}
.flash-err { background: var(--red-soft); color: var(--red); }
.nudge {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--amber-soft); color: var(--amber); border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; font-size: .9rem;
}
.nudge .btn { white-space: nowrap; flex: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer;
  text-align: center; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn-sm { min-height: 36px; padding: 6px 13px; font-size: .9rem; border-radius: 10px; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: var(--accent-soft); color: var(--accent); }
.btn-green { background: var(--green); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); }
.btn[disabled] { opacity: .6; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.link-red { color: var(--red); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.actions-row .btn { width: 100%; }

/* Cards & forms */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.form { padding: 16px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px;
  min-height: 46px; -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7690' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[type="checkbox"] { width: auto; min-height: 0; -webkit-appearance: auto; appearance: auto; }
input[type="date"], input[type="time"] { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: .88rem; color: var(--muted); margin: 0 0 14px; }
.hint-warn { background: var(--amber-soft); color: var(--amber); padding: 9px 12px; border-radius: 10px; }
.hint[hidden] { display: none; }
.inline { display: inline; }

/* Auth */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: calc(32px + env(safe-area-inset-top)) 16px 32px; }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-brand img { border-radius: 16px; box-shadow: var(--shadow); }
.auth-brand h1 { font-size: 1.4rem; margin-top: 10px; }
.auth-card { padding: 20px; }
.auth-card h2 { margin-bottom: 6px; font-size: 1.2rem; }
.auth-card p { margin: 0 0 14px; }

/* Page heads */
.page-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; }
.page-head h1 { font-size: 1.45rem; flex: 1; }
.page-head h1 small { font-size: .65em; color: var(--muted); font-weight: 600; }
.back { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }

.hello { margin: 4px 0 18px; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.hello h1 { font-size: 1.6rem; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

.block { margin: 18px 0; }
.sec { font-size: .82rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 0 0 8px 2px; display: flex; align-items: center; gap: 8px; }
.sec .count { background: var(--soft); color: var(--ink-2); border-radius: 20px; padding: 1px 8px; font-size: .75rem; letter-spacing: 0; }
.sec-red { color: var(--red); }
.sec-red .count { background: var(--red-soft); color: var(--red); }
.sec-green { color: var(--green); }
.empty { color: var(--muted); margin: 6px 2px; font-size: .95rem; }
.empty-big { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty-big p { margin: 0 0 14px; }
.more-link { display: inline-block; margin: 8px 2px 0; font-weight: 600; font-size: .92rem; }

/* Task list */
.tasks { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 12px 8px 12px 12px; border-bottom: 1px solid var(--line); position: relative; }
.task:last-child { border-bottom: 0; }
.task-check { margin: 0; }
.check {
  width: 28px; height: 28px; margin-top: 1px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--muted) 60%, transparent);
  background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; color: transparent;
}
.check svg { width: 16px; height: 16px; stroke-width: 3; }
.check:hover, .check:active { border-color: var(--green); color: var(--green); }
.task.is-overdue .check { border-color: var(--red); }
.task-body { flex: 1; min-width: 0; color: var(--ink); display: flex; flex-direction: column; gap: 3px; }
.task-title { font-weight: 600; word-break: break-word; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .82rem; color: var(--muted); }
.task-notes { font-size: .85rem; color: var(--muted); }
.overdue { color: var(--red); font-weight: 600; }
.chip { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 1px 7px; font-size: .75rem; font-weight: 600; }
.chip-soft { background: var(--soft); color: var(--ink-2); }
.chip-warn { background: var(--amber-soft); color: var(--amber); }
.task-more { position: relative; }
.task-more summary { list-style: none; cursor: pointer; padding: 4px 6px; color: var(--muted); border-radius: 8px; }
.task-more summary::-webkit-details-marker { display: none; }
.task-more summary svg { fill: currentColor; stroke: none; }
.task-more .menu {
  position: absolute; right: 0; top: 32px; z-index: 10; min-width: 230px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, .16); overflow: hidden;
}
.task-more .menu form { margin: 0; }
.task-more .menu button, .task-more .menu a {
  display: block; width: 100%; text-align: left; padding: 12px 14px; background: none; border: 0; border-bottom: 1px solid var(--line);
  font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer;
}
.task-more .menu > :last-child, .task-more .menu > :last-child button { border-bottom: 0; }

.donelist { list-style: none; margin: 0; padding: 4px 12px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.donelist li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.donelist li:last-child { border-bottom: 0; }
.donelist li > svg { color: var(--green); }
.donelist li > span { flex: 1; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.donelist small { text-decoration: none; display: inline-block; margin-left: 4px; }
.donelist form { margin: 0; }

.mini-log { list-style: none; margin: 0; padding: 4px 14px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.mini-log li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.mini-log li:last-child { border-bottom: 0; }
.mini-log time { color: var(--accent); font-weight: 700; font-size: .82rem; min-width: 62px; padding-top: 2px; }

/* Team */
.team, .userlist { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.team li, .userlist li { border-bottom: 1px solid var(--line); }
.team li:last-child, .userlist li:last-child { border-bottom: 0; }
.team a, .userlist li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; color: var(--ink); }
.userlist li.inactive { opacity: .55; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.team-name { flex: 1; min-width: 0; font-weight: 600; display: flex; flex-direction: column; }
.team-name small { font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-block; border-radius: 20px; padding: 2px 9px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pill-ok { background: var(--green-soft); color: var(--green); }
.pill-muted { background: var(--soft); color: var(--muted); }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-warn { background: var(--amber-soft); color: var(--amber); }

/* Segmented control & pickers */
.seg { display: flex; background: var(--soft); border-radius: 12px; padding: 3px; margin-bottom: 14px; }
.seg a { flex: 1; text-align: center; padding: 8px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.seg a.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.who-pick { margin: 0 0 12px; }

/* History */
.history { list-style: none; margin: 0; padding: 4px 12px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
.history li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.hist-body { display: flex; flex-direction: column; min-width: 0; }
.hist-body small { color: var(--muted); }
.hist-badge { font-size: .72rem; font-weight: 700; border-radius: 6px; padding: 2px 7px; min-width: 58px; text-align: center; margin-top: 2px; }
.hist-done { background: var(--green-soft); color: var(--green); }
.hist-skipped { background: var(--soft); color: var(--muted); }
.hist-missed { background: var(--red-soft); color: var(--red); }

/* Quick time chips */
.chips-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 14px; }
.chips-quick button { border: 1px solid var(--line); background: var(--soft); color: var(--ink-2); border-radius: 20px; padding: 6px 11px; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.danger-zone { margin-top: 26px; text-align: center; }

/* Feed: calendar */
.cal { padding: 0; margin-bottom: 12px; }
.cal summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; cursor: pointer; font-weight: 700; list-style: none; }
.cal summary::-webkit-details-marker { display: none; }
.cal summary small { color: var(--muted); font-weight: 500; }
.cal-nav { display: flex; justify-content: space-between; padding: 0 14px 6px; font-weight: 600; font-size: .9rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0 10px 12px; }
.cal-grid > * { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font-size: .9rem; color: var(--ink); position: relative; }
.cal-h { aspect-ratio: auto !important; font-size: .72rem !important; color: var(--muted) !important; font-weight: 700; padding: 2px 0; }
.cal-grid a.has { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.cal-grid a i { position: absolute; bottom: 2px; font-style: normal; font-size: .58rem; opacity: .8; }
.cal-grid .today { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-grid .sel { background: var(--accent) !important; color: #fff !important; }
.cal-grid .future { color: var(--muted); opacity: .45; }

.daynav { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 14px; }
.daynav > div { text-align: center; display: flex; flex-direction: column; }
.daynav small { color: var(--muted); }
.daynav a, .daynav > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.daynav > span { visibility: hidden; }

/* Feed: timeline */
.timeline { list-style: none; margin: 0 0 14px; padding: 0; }
.entry { display: grid; grid-template-columns: 64px 1fr; gap: 10px; margin-bottom: 12px; }
.entry time { font-weight: 700; color: var(--accent); font-size: .85rem; padding-top: 12px; text-align: right; }
.entry-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.entry-text { margin: 4px 0 0; word-break: break-word; }
.entry-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: .85rem; }
.entry-foot a { font-weight: 600; margin-left: auto; }
.late-tag { color: var(--amber); background: var(--amber-soft); border-radius: 6px; padding: 2px 7px; font-size: .75rem; font-weight: 600; }
.photos { display: grid; gap: 6px; margin-top: 10px; }
.photos-1 { grid-template-columns: 1fr; }
.photos-2 { grid-template-columns: 1fr 1fr; }
.photos-3 { grid-template-columns: 1fr 1fr 1fr; }
.photos a { display: block; border-radius: 10px; overflow: hidden; background: var(--soft); aspect-ratio: 4 / 3; }
.photos-1 a { aspect-ratio: auto; max-height: 340px; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-drop {
  display: flex; align-items: center; justify-content: center; gap: 10px; border: 2px dashed var(--line); border-radius: 12px;
  padding: 16px; color: var(--accent); font-weight: 600; cursor: pointer; position: relative; background: var(--soft);
}
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.photo-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.photo-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.photo-manage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.photo-manage figure { margin: 0; text-align: center; }
.photo-manage img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 4px; }

.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox img { max-width: 100vw; max-height: 88vh; display: block; }
.lightbox button { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 14px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .2); color: #fff; font-size: 26px; cursor: pointer; }

/* Reports */
.reports { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.report { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
.report-main { display: flex; flex-direction: column; gap: 2px; }
.report-main small { color: var(--muted); }
.report-actions { display: flex; gap: 8px; }
.report-actions form { margin: 0; }

/* Settings */
.set { padding: 16px; margin-bottom: 14px; }
.set h2 { font-size: 1.05rem; margin-bottom: 10px; }
.set h3.sub { font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 18px 0 6px; }
.install-help { background: var(--soft); border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
.install-help p { margin: 0 0 8px; }
.install-steps h3 { font-size: .95rem; margin: 10px 0 4px; }
.install-steps ol { margin: 0; padding-left: 20px; }
.install-steps li { margin: 4px 0; }
.install-steps[hidden] { display: none; }
.kbd { display: inline-block; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; background: var(--card); font-weight: 700; }
.devices, .notif-log { list-style: none; margin: 0; padding: 0; }
.devices li, .notif-log li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.devices li:last-child, .notif-log li:last-child { border-bottom: 0; }
.devices li > span, .notif-log li > span:first-child { display: flex; flex-direction: column; min-width: 0; font-size: .95rem; }
.devices small, .notif-log small { color: var(--muted); }
.devices form { margin: 0; }
.devices li.this-device > span::after { content: "This device"; font-size: .72rem; font-weight: 700; color: var(--green); }
.switch { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 48px; height: 28px; border-radius: 20px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.days { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.days legend { font-size: .85rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.days label { position: relative; }
.days input { position: absolute; opacity: 0; }
.days span { display: inline-block; min-width: 46px; text-align: center; padding: 8px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: .88rem; color: var(--muted); }
.days input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.days input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; }
.inline-form .field { flex: 1; margin-bottom: 0; }
.inline-form .btn { margin-bottom: 4px; }
.pw { margin-top: 10px; }
.pw summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 6px 0; }
.pw form { margin-top: 10px; }
.row-link { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.row-link span { color: var(--muted); }
.signout { margin: 20px 0 10px; }

details.form > summary { list-style: none; cursor: pointer; }
details.form > summary::-webkit-details-marker { display: none; }
details.form[open] > summary { margin-bottom: 16px; background: var(--soft); color: var(--ink); }
.userlist { margin-bottom: 14px; }

@media (min-width: 720px) {
  .wrap { padding: 24px 16px; }
  .photo-preview { grid-template-columns: repeat(6, 1fr); }
}

/* Weekly offs & holidays */
.dayoff { margin: 6px 0 0; display: inline-block; background: var(--amber-soft); color: var(--amber); border-radius: 8px; padding: 4px 10px; font-size: .88rem; font-weight: 600; }
.cal-grid .holiday { color: var(--red); font-weight: 700; background: var(--red-soft); }
.cal-grid .off { color: var(--muted); background: var(--soft); }
.cal-grid a.has.holiday, .cal-grid a.has.off { box-shadow: inset 0 -3px 0 var(--accent); }
.holiday-text { color: var(--red); font-weight: 600; }
.off-text { color: var(--muted); font-weight: 600; }
.cal-key { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; padding: 0 14px 12px; font-size: .75rem; color: var(--muted); }
.cal-key span { width: 12px; height: 12px; border-radius: 4px; display: inline-block; margin-left: 6px; }
.cal-key span:first-child { margin-left: 0; }
.k-log { background: var(--accent-soft); border: 1px solid var(--accent); }
.k-hol { background: var(--red-soft); border: 1px solid var(--red); }
.k-off { background: var(--soft); border: 1px solid var(--line); }
.hol-list { list-style: none; margin: 0; padding: 0; }
.hol-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hol-list li:last-child { border-bottom: 0; }
.hol-list li.past { opacity: .5; }
.hol-date { min-width: 54px; text-align: center; background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 4px 0; font-weight: 700; line-height: 1.1; }
.hol-date small { display: block; font-size: .7rem; font-weight: 600; }
.hol-name { flex: 1; display: flex; flex-direction: column; font-weight: 600; }
.hol-name small { color: var(--muted); font-weight: 400; }
.hol-list form { margin: 0; }
.pick-list label { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.pick-list label:last-child { border-bottom: 0; }
.pick-list input { width: 20px; height: 20px; }
.pick-list small { color: var(--muted); margin-left: auto; }
