:root {
  --bg: #f6f5f1;
  --panel: #ffffff;
  --ink: #1f2a2e;
  --muted: #66737a;
  --line: #e3e1da;
  --accent: #1f6f6b;
  --accent-ink: #ffffff;
  --accent-soft: #e2f0ee;
  --ok: #2f7d4f;
  --ok-soft: #e4f3ea;
  --warn: #a5611a;
  --warn-soft: #fbefdf;
  --bad: #b03a3a;
  --bad-soft: #f8e5e3;
  --pref: #2f7d4f;
  --avoid: #c28a1c;
  --no: #b03a3a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(31, 42, 46, .06), 0 4px 14px rgba(31, 42, 46, .05);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 15px; line-height: 1.5; }
a { color: var(--accent); }
h1 { font-size: 1.55rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------- layout ---------- */
.topbar {
  background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 1.25rem; height: 56px; position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; color: #fff; text-decoration: none; display: flex; align-items: center; gap: .55rem; white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #4fb3aa 0 50%, #e9c46a 50% 100%); }
.nav { display: flex; gap: .2rem; flex: 1; overflow-x: auto; }
.nav a { color: #cfd8da; text-decoration: none; padding: .4rem .7rem; border-radius: 7px; white-space: nowrap; font-size: .93rem; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a.active { color: #fff; background: rgba(255, 255, 255, .14); }
.nav .sep { width: 1px; background: rgba(255, 255, 255, .18); margin: .6rem .4rem; }
.who { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: #cfd8da; white-space: nowrap; }
.who form { margin: 0; }
.who button { background: transparent; border: 1px solid rgba(255, 255, 255, .25); color: #fff; border-radius: 7px; padding: .25rem .6rem; cursor: pointer; font: inherit; }
main { max-width: 1280px; margin: 0 auto; padding: 1.6rem 1.25rem 4rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.stat b { display: block; font-size: 1.5rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.attn { border-color: var(--warn); background: var(--warn-soft); }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: .88rem; margin: .7rem 0 .25rem; }
label.inline { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; margin: .4rem 1rem .4rem 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  font: inherit; padding: .5rem .65rem; border: 1px solid #cfccc3; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; max-width: 420px;
}
textarea { max-width: 100%; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.row { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; }
.row > div { flex: 1 1 160px; }
.btn, button.btn {
  display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600; font-size: .92rem;
  padding: .5rem .95rem; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: #fff; color: var(--accent); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.danger { background: #fff; border-color: var(--bad); color: var(--bad); }
.btn.sm { padding: .25rem .6rem; font-size: .82rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; margin: 0; }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ---------- badges ---------- */
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 99px; background: #eceae4; color: var(--muted); }
.badge.voorkeuren { background: var(--accent-soft); color: var(--accent); }
.badge.concept { background: var(--warn-soft); color: var(--warn); }
.badge.gepubliceerd, .badge.goedgekeurd { background: var(--ok-soft); color: var(--ok); }
.badge.afgewezen, .badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.aangevraagd, .badge.open, .badge.overgenomen { background: var(--warn-soft); color: var(--warn); }

.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: .8rem; border: 1px solid; }
.flash.ok { background: var(--ok-soft); border-color: #bfe0cb; color: #1f5a37; }
.flash.warn { background: var(--warn-soft); border-color: #f0d2a8; color: #7a4510; }
.flash.err { background: var(--bad-soft); border-color: #eec3be; color: #7f2525; }

/* ---------- roster grid ---------- */
.roster { border-collapse: separate; border-spacing: 0; min-width: 900px; }
.roster th, .roster td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: .35rem .4rem; }
.roster th:first-child, .roster td:first-child { position: sticky; left: 0; background: var(--panel); z-index: 1; min-width: 180px; }
.roster thead th { background: #faf9f6; text-align: center; text-transform: none; letter-spacing: 0; font-size: .82rem; color: var(--ink); }
.roster thead th.weekend { background: #f3f1ea; }
.roster td.cell { min-width: 112px; height: 44px; }
.roster td.weekend { background: #fcfbf8; }
.roster .emp { font-weight: 600; font-size: .9rem; }
.roster .emp small { display: block; font-weight: 400; color: var(--muted); }
.coverage td { background: #faf9f6; font-size: .8rem; }
.cov { display: flex; justify-content: space-between; gap: .3rem; text-decoration: none; color: var(--ink); padding: .1rem .35rem; border-radius: 5px; margin: 2px 0; }
.cov:hover { background: #eeece6; }
.cov.short { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.cov.full { color: var(--ok); }
.chip { display: inline-flex; gap: .3rem; align-items: center; font-size: .8rem; font-weight: 600; padding: .15rem .45rem; border-radius: 6px; color: #fff; text-decoration: none; margin: 1px 0; }
.chip.manual::after { content: "📌"; font-size: .7rem; }
.chip.warn { outline: 2px solid var(--bad); outline-offset: 1px; }
.dots { display: inline-flex; gap: 2px; margin-left: .2rem; vertical-align: middle; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.graag { background: var(--pref); }
.dot.liever_niet { background: var(--avoid); }
.dot.niet { background: var(--no); }
.hours { font-size: .8rem; white-space: nowrap; }
.hours.under { color: var(--warn); }
.hours.over { color: var(--bad); }

.weektabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: .5rem 0 1rem; }
.weektabs a { padding: .3rem .7rem; border-radius: 7px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: .88rem; }
.weektabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); align-items: center; }

/* ---------- preference pickers ---------- */
.pref-grid { border-collapse: separate; border-spacing: 0; }
.pref-grid td, .pref-grid th { padding: .35rem .4rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg label { margin: 0; font-weight: 500; font-size: .76rem; padding: .25rem .45rem; white-space: nowrap; cursor: pointer; border-right: 1px solid var(--line); display: inline-flex; align-items: center; color: var(--muted); }
.seg label:last-child { border-right: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { color: #fff; }
.seg label.l-neutraal:has(input:checked) { background: #8a959a; }
.seg label.l-graag:has(input:checked) { background: var(--pref); }
.seg label.l-liever_niet:has(input:checked) { background: var(--avoid); }
.seg label.l-niet:has(input:checked) { background: var(--no); }
.seg label:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
tr.weekend-row td { background: #fbfaf6; }
tr.leave-row td { background: var(--bad-soft); }
.day-cell { white-space: nowrap; font-weight: 600; }

.shift-list { list-style: none; padding: 0; margin: 0; }
.shift-list li { display: flex; gap: 1rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.shift-list li:last-child { border-bottom: 0; }
.date-tile { width: 54px; text-align: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); padding: .25rem 0; line-height: 1.15; }
.date-tile b { display: block; font-size: 1.2rem; }
.date-tile span { font-size: .72rem; text-transform: uppercase; }
.grow { flex: 1; }

.copy { display: flex; gap: .4rem; }
.copy input { max-width: 100%; font-size: .82rem; }

/* ---------- login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth { width: 100%; max-width: 380px; }
.auth .brand { color: var(--ink); justify-content: center; margin-bottom: 1rem; font-size: 1.1rem; }
.auth input { max-width: 100%; }
.auth .btn { width: 100%; justify-content: center; margin-top: 1rem; }

@media (max-width: 1360px) { .who > a { display: none; } }
@media (max-width: 760px) {
  .topbar { height: auto; flex-wrap: wrap; padding: .5rem .75rem; gap: .5rem; }
  .nav { order: 3; flex: 1 1 100%; }
  .who > a { display: none; }
  main { padding: 1rem .75rem 3rem; }
}

fieldset { min-width: 0; }
details.danger-zone { margin-top: .5rem; }
details.danger-zone summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
details.danger-zone form { margin-top: .6rem; }

.brand .org { font-weight: 400; color: #9fb2b5; margin-left: .4rem; padding-left: .55rem; border-left: 1px solid rgba(255,255,255,.2); font-size: .88rem; }
.role-badge { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .12rem .45rem; border-radius: 5px; background: #e6e3db; color: #4a5559; }
.topbar .role-badge { background: rgba(255,255,255,.12); color: #e5ecee; }
.role-badge.role-beheerder { background: #5b4b8a; color: #fff; }
.role-badge.role-leidinggevende { background: #1f6f6b; color: #fff; }
.site-foot { max-width: 1280px; margin: 0 auto; padding: 0 1.25rem 2rem; color: var(--muted); font-size: .8rem; }
.site-foot a { color: var(--muted); }
.tabs { display: flex; gap: .3rem; margin-bottom: .8rem; flex-wrap: wrap; }
.tabs a { padding: .3rem .75rem; border-radius: 99px; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); font-size: .88rem; }
.tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.roles .role { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; background: #fff; }
.roles .role ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .88rem; color: var(--muted); }
.release { border-left: 3px solid var(--line); padding-left: 1rem; margin-bottom: 1.4rem; }
.release.current { border-color: var(--accent); }
.release h2 { margin: 0 0 .2rem; }
.release h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: .8rem 0 .2rem; }
.release ul { margin: 0; padding-left: 1.2rem; }
.auth .roles-hint { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; margin: -.4rem 0 1rem; }
.dot.verlof { background: #5b4b8a; }
.dot.ziek { background: #111; }
code { background: #efede7; padding: .05rem .3rem; border-radius: 4px; font-size: .85em; }
.acting { background: #5b4b8a; color: #fff; text-align: center; padding: .45rem 1rem; font-size: .9rem; }
.acting button { margin-left: .6rem; background: #fff; color: #5b4b8a; border: 0; border-radius: 6px; padding: .2rem .7rem; font: inherit; font-weight: 600; cursor: pointer; }
.org-card { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.secret { font-family: ui-monospace, Menlo, monospace; background: #fff; padding: .1rem .4rem; border-radius: 5px; border: 1px solid var(--line); }
.open-warning { border-color: #eec3be; background: #fffaf9; }
.open-warning h2 { color: var(--bad); }
.acting.viewas { background: #1f6f6b; }
.acting.viewas button { color: #1f6f6b; }
.linkbtn { background: none; border: 0; padding: 0 0 0 .4rem; color: var(--accent); font: inherit; font-size: .8rem; cursor: pointer; text-decoration: underline; }
.cal-buttons { display: flex; gap: .4rem; flex-wrap: wrap; }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.cal-card { margin-bottom: 0; display: flex; flex-direction: column; gap: .5rem; }
.cal-card h2 { margin: 0; }
.cal-card p { margin: 0; }
.slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem; }
.slot { margin: 0; display: flex; gap: .5rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; cursor: pointer; font-weight: 400; background: #fff; }
.slot span { display: flex; flex-direction: column; line-height: 1.3; }
.slot small { color: var(--muted); font-size: .78rem; }
.slot:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.slot.taken { opacity: .55; cursor: not-allowed; }

/* ---------- KPI's ---------- */
.kpi-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.kpi-hero > div { display: flex; flex-direction: column; gap: .15rem; }
.hero-value { font-size: 3.2rem; font-weight: 650; line-height: 1.05; letter-spacing: -.02em; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi-row.compact { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: .5rem; }
.kpi-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; }
.kpi-tile.flat { background: #faf9f6; }
.kpi-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 1.7rem; font-weight: 650; line-height: 1.15; }
.kpi-value small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.kpi-sub { font-size: .82rem; color: var(--muted); }
.kpi-delta { font-size: .78rem; font-weight: 600; }
.kpi-delta.good { color: var(--ok); }
.kpi-delta.bad { color: var(--bad); }
.kpi-delta.flat { color: var(--muted); font-weight: 500; }
.status-pill { display: inline-flex; gap: .3rem; align-items: center; font-size: .82rem; font-weight: 600; padding: .2rem .6rem; border-radius: 99px; white-space: nowrap; }
.status-pill.sm { font-size: .74rem; padding: .1rem .5rem; }
.status-pill.good { background: var(--ok-soft); color: var(--ok); }
.status-pill.warn { background: var(--warn-soft); color: var(--warn); }
.status-pill.bad { background: var(--bad-soft); color: var(--bad); }
.meter-list { display: flex; flex-direction: column; gap: .55rem; }
.meter-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: .7rem; align-items: center; font-size: .88rem; }
.meter-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter-fig { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.meter { display: block; height: 8px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.meter.inline { display: inline-block; width: 90px; vertical-align: middle; margin-right: .4rem; }
.meter-fill { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter-fill.warn { background: #d08a2a; }
.meter-fill.bad { background: var(--bad); }
.kpi-table td.num, .kpi-table .num { font-variant-numeric: tabular-nums; }

/* ---------- aandachtspunten ---------- */
.issues { border-color: #eec3be; }
.issues.clean { border-color: #bfe0cb; }
.issues-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; margin-bottom: .6rem; }
.issue-chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .5rem; }
.issue-chip { font-size: .82rem; padding: .2rem .65rem; border-radius: 99px; background: #eeece6; color: var(--muted); }
.issue-chip.bad { background: var(--bad-soft); color: var(--bad); }
.issue-chip.warn { background: var(--warn-soft); color: var(--warn); }
.issue-chip.none { opacity: .55; }
.issue-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .3rem 1.5rem; }
.issue-cols details { padding: .3rem 0; }
.issue-cols summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.issue-list { list-style: none; padding: 0; margin: .4rem 0 0; }
.issue-list li { display: flex; justify-content: space-between; gap: .6rem; padding: .25rem 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.issue-list li:last-child { border-bottom: 0; }
.ok-line { color: var(--ok); margin: 0; font-weight: 600; }

/* ---------- uren ---------- */
.hours-table td { vertical-align: middle; }
.hours-table .pos { color: var(--ok); font-weight: 600; }
.hours-table .neg { color: var(--warn); font-weight: 600; }
details.inline-edit { display: inline-block; position: relative; }
details.inline-edit > summary { list-style: none; display: inline-flex; }
details.inline-edit > summary::-webkit-details-marker { display: none; }
details.inline-edit[open] .edit-box { position: absolute; right: 0; top: 2.2rem; z-index: 5; width: 360px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .4rem .9rem .2rem; text-align: left; }
.balance-pos { color: var(--ok); font-weight: 600; }
.balance-neg { color: var(--warn); font-weight: 600; }
.kpi-tile.attn-tile { border-color: var(--warn); background: var(--warn-soft); }

/* ---------- agenda (Outlook-achtig) ---------- */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .7rem; }
.cal-nav { display: flex; align-items: center; gap: .35rem; }
.cal-arrow { font-size: 1.1rem; padding: .15rem .55rem; }
.cal-title { margin: 0 0 0 .4rem; font-size: 1.15rem; text-transform: capitalize; }
.cal-views { display: inline-flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.cal-views > a { padding: .3rem .75rem; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-size: .86rem; border-radius: 7px; }
.cal-views > a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.cal { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal-week { --gutter: 56px; }
.cal-head, .cal-allday { display: grid; grid-template-columns: var(--gutter) repeat(var(--days), 1fr); border-bottom: 1px solid var(--line); }
.cal-dayhead { padding: .45rem .5rem; border-left: 1px solid var(--line); display: flex; gap: .4rem; align-items: baseline; text-decoration: none; color: var(--ink); }
.cal-dayhead:hover { background: #f3f1ea; }
.cal-dayhead .wd { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.cal-dayhead .dn { font-size: 1.25rem; font-weight: 600; }
.cal-dayhead.today .dn { background: var(--accent); color: #fff; border-radius: 99px; min-width: 2rem; text-align: center; padding: 0 .35rem; }
.cal-dayhead.weekend, .cal-col.weekend { background-color: #fbfaf7; }
.cal-allday-cell { border-left: 1px solid var(--line); padding: .25rem; display: flex; flex-direction: column; gap: 2px; min-height: 28px; }
.cal-allday > .cal-gutter { padding: .35rem .3rem; text-align: right; }
.cal-body { display: grid; grid-template-columns: var(--gutter) repeat(var(--days), 1fr); position: relative; overflow: hidden; }
.cal-hours .cal-hour { position: relative; border-top: 1px solid transparent; }
.cal-hours .cal-hour span { position: absolute; top: -.55rem; right: .4rem; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-hours .cal-hour:first-child span { top: 2px; }
.cal-col { position: relative; border-left: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); }
.cal-col.today { background-color: #f3faf9; }
.cal-ev { position: absolute; box-sizing: border-box; border-radius: 6px; padding: .2rem .4rem; overflow: hidden; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--c) 16%, #fff); border-left: 4px solid var(--c); font-size: .78rem; line-height: 1.25; display: flex; flex-direction: column; gap: 1px;
  box-shadow: 0 0 0 1px #fff; }
.cal-ev:hover { background: color-mix(in srgb, var(--c) 26%, #fff); z-index: 2; }
.cal-ev b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev .t { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-ev .s { color: var(--ink); opacity: .8; overflow: hidden; }
.cal-ev.short { flex-direction: row; gap: .35rem; align-items: baseline; }
.cal-ev.open { border-left-color: var(--bad); background: repeating-linear-gradient(135deg, var(--bad-soft) 0 6px, #fff 6px 12px); }
.cal-ev.over { border-left-color: var(--warn); }
.cal-ev.concept { border-style: dashed; border-left-style: solid; opacity: .9; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: #d13438; z-index: 3; }
.cal-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #d13438; }
.cal-chip { display: block; font-size: .75rem; padding: .1rem .4rem; border-radius: 5px; background: color-mix(in srgb, var(--c) 16%, #fff); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-month .cal-mhead, .cal-month .cal-mrow { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-mhead div { padding: .4rem .5rem; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line); }
.cal-mcell { min-height: 112px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .25rem .3rem; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-mcell:nth-child(7n+1) { border-left: 0; }
.cal-mcell.out { background: #faf9f6; }
.cal-mcell.out .cal-mday { color: #aab3b6; }
.cal-mcell.weekend { background-color: #fbfaf7; }
.cal-mday { align-self: flex-start; font-weight: 600; font-size: .85rem; color: var(--ink); text-decoration: none; padding: 0 .3rem; border-radius: 99px; }
.cal-mcell.today .cal-mday { background: var(--accent); color: #fff; }
.cal-mev { display: block; font-size: .74rem; padding: .05rem .35rem; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; color: var(--ink);
  border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); }
.cal-mev .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-mev.open { border-left-color: var(--bad); background: var(--bad-soft); }
.cal-mev.allday { background: color-mix(in srgb, var(--c) 22%, #fff); }
.cal-more { font-size: .72rem; color: var(--muted); }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.view-toggle a { padding: .3rem .75rem; font-size: .86rem; color: var(--ink); text-decoration: none; }
.view-toggle a.active { background: var(--accent); color: #fff; }
@media (max-width: 760px) {
  .cal-week { --gutter: 40px; }
  .cal-ev .s { display: none; }
  .cal-dayhead { flex-direction: column; gap: 0; padding: .3rem; }
  .cal-mcell { min-height: 70px; }
  .cal-mev .t { display: none; }
}
