:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --border: #e2e7ef;
  --text: #182032;
  --muted: #64708a;
  --primary: #2563eb;
  --primary-ink: #ffffff;
  --primary-soft: #e8efff;
  --ok: #15803d;
  --ok-soft: #e7f6ec;
  --warn: #b45309;
  --warn-soft: #fdf3e2;
  --danger: #c2410c;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 1px 3px rgb(16 24 40 / 0.06);
  --radius: 12px;
  --fn: #2a78d6; /* session series: categorical slots 1 & 2 */
  --an: #eb6834;
  --fn-soft: #e6f0fb;
  --an-soft: #fdeee7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --surface: #171e2d;
    --surface-2: #1e2738;
    --border: #2a3448;
    --text: #e6eaf2;
    --muted: #94a0b8;
    --primary: #5b8cff;
    --primary-ink: #0b1020;
    --primary-soft: #1d2a4a;
    --ok: #4ade80;
    --ok-soft: #14301f;
    --warn: #fbbf24;
    --warn-soft: #36290f;
    --danger: #fb923c;
    --fn: #3987e5;
    --an: #d95926;
    --fn-soft: #172a45;
    --an-soft: #3a2116;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2 { margin: 0; font-weight: 650; }
h1 { font-size: 17px; }
h2 { font-size: 15px; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 10px max(16px, calc((100vw - 1200px) / 2));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { color: var(--primary); width: 34px; height: 34px; flex: none; }
.logo svg { width: 100%; height: 100%; }
.subtitle { margin: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; }
.tab {
  border: 0; background: transparent; color: var(--muted);
  padding: 7px 16px; border-radius: 7px; font: inherit; font-weight: 600; cursor: pointer;
}
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 48px; }
.panel[hidden] { display: none; }

/* upload */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 32px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--muted);
  transition: border-color .15s, background .15s;
}
.dropzone svg { color: var(--primary); margin-bottom: 4px; }
.dropzone strong { color: var(--text); font-size: 15px; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.privacy { color: var(--muted); font-size: 12px; margin: 8px 2px 18px; }

.progress { display: grid; gap: 6px; margin-bottom: 18px; }
.progress-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.progress-item .name { font-weight: 600; flex: 1; min-width: 160px; overflow-wrap: anywhere; }
.progress-item .msg { color: var(--muted); font-size: 13px; }
.progress-item ul { margin: 4px 0 0; padding-left: 18px; width: 100%; color: var(--warn); font-size: 12px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 7px 12px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; font: inherit; }
.icon-btn:hover { background: var(--surface-2); color: var(--danger); }

/* tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.wrap { white-space: normal; }
table.data .num { text-align: right; }
.codes { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; color: var(--muted); white-space: normal; min-width: 260px; }
.codes b { color: var(--text); font-weight: 600; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.r { background: var(--primary-soft); color: var(--primary); }
.badge.s { background: var(--warn-soft); color: var(--warn); }
.empty { color: var(--muted); text-align: center; padding: 28px 16px; margin: 0; }
.empty[hidden] { display: none; }
.muted { color: var(--muted); font-size: 13px; }

/* candidates */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field span { font-size: 12px; font-weight: 600; color: var(--muted); }
.field select, .field input {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%;
}
.field select:focus, .field input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.result-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 2px 12px; }
.count { font-size: 22px; font-weight: 700; }
.count span { color: var(--primary); font-variant-numeric: tabular-nums; }

.badge.link { border: 0; font-family: inherit; cursor: pointer; }
.badge.link:hover { text-decoration: underline; }
.problems { margin-top: 18px; scroll-margin-top: 76px; }
.problems[hidden] { display: none; }
.problems .codes { min-width: 320px; }
.select-sm {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px;
}

.sources { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-bottom: 16px; }
.source { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 260px; }
.source .l { font-size: 12px; font-weight: 600; color: var(--muted); }
.source b { font-size: 14px; overflow-wrap: anywhere; }
tr.session-total td { font-weight: 600; text-align: right; color: var(--text); }
tr.session-total.fn td { background: var(--fn-soft); }
tr.session-total.an td { background: var(--an-soft); }
tr.session-total:hover { background: none !important; }

.diff-stats { margin-bottom: 12px; }
.problems td.subj { min-width: 280px; }
.diff-stats .pill { background: var(--surface-2); }

.banner {
  margin-bottom: 16px; padding: 12px 16px; border-radius: 10px; font-weight: 600;
  background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn);
}
.banner[hidden] { display: none; }

/* exam schedule dashboard */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px;
}
.kpi .l { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi b { font-size: 26px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.kpi.ok .l::before { content: "✓ "; color: var(--ok); }
.kpi.warn { border-color: var(--warn); background: var(--warn-soft); }
.kpi.warn .l::before { content: "⚠ "; color: var(--warn); }

.chart-card { position: relative; margin-bottom: 20px; }
.chart-card[hidden], .undated[hidden] { display: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sw.fn { background: var(--fn); }
.sw.an { background: var(--an); }
.chart-scroll { overflow-x: auto; padding-top: 18px; }
.chart {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: 210px auto;
  min-width: calc(34px + var(--cols, 1) * 50px);
}
.axis { position: relative; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.axis span { position: absolute; right: 8px; transform: translateY(50%); }
.plot { position: relative; display: flex; align-items: flex-end; border-bottom: 1px solid var(--muted); }
.grid { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.grid:first-child { display: none; }
.bar {
  position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center;
  background: none; border: 0; padding: 0; cursor: pointer; border-radius: 6px 6px 0 0;
}
.bar:hover, .bar:focus-visible { background: var(--surface-2); outline: none; }
.stack { position: relative; width: min(34px, 70%); display: flex; flex-direction: column; gap: 2px; }
.seg { display: block; min-height: 3px; }
.seg.fn { background: var(--fn); }
.seg.an { background: var(--an); }
.stack > .seg:first-child { border-radius: 4px 4px 0 0; }
.val { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 3px; font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.xlabels { grid-column: 2; display: flex; }
.xlabels span { flex: 1; display: flex; flex-direction: column; align-items: center; padding-top: 6px; font-size: 11px; color: var(--muted); line-height: 1.3; }
.xlabels b { color: var(--text); font-weight: 600; white-space: nowrap; }
.chart-tip {
  position: absolute; z-index: 3; pointer-events: none; min-width: 210px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 24px rgb(0 0 0 / .15);
  padding: 8px 10px; font-size: 12px; display: grid; gap: 3px;
}
.chart-tip[hidden] { display: none; }
.chart-tip div { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.chart-tip div.on { color: var(--text); }

.days { display: grid; gap: 14px; margin-bottom: 18px; }
.day { scroll-margin-top: 76px; }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.day-date { display: flex; align-items: baseline; gap: 10px; }
.day-date b { font-size: 16px; font-variant-numeric: tabular-nums; }
.dow { font-weight: 700; color: var(--primary); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.day-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12px; color: var(--muted); }
.pill b { color: var(--text); }
.pill.fn { background: var(--fn-soft); }
.pill.an { background: var(--an-soft); }
.badge.fn { background: var(--fn-soft); color: var(--fn); }
.badge.an { background: var(--an-soft); color: var(--an); }
table.papers td.total { font-weight: 700; }
table.papers tr.paper { cursor: pointer; }
table.papers tr.paper:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.chev { color: var(--muted); font-size: 18px; line-height: 1; transition: transform .15s; width: 24px; }
tr.paper.open .chev { transform: rotate(90deg); }
tr.paper.open { background: var(--surface-2); }
tr.drill > td { background: var(--surface-2); padding: 4px 12px 14px; white-space: normal; }
tr.drill:hover { background: none !important; }
.drill-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
table.inner { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
table.inner th { position: static; }
tr.day-total td { font-weight: 600; color: var(--muted); text-align: right; border-bottom: 0; }
tr.day-total td.total { color: var(--text); }
tr.day-total:hover { background: none !important; }
.btn.sm { padding: 3px 10px; font-size: 12px; }
.undated summary { cursor: pointer; }
.undated[open] summary { margin-bottom: 4px; }
.days + .empty { margin-bottom: 18px; }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; box-shadow: 0 6px 24px rgb(0 0 0 / .2); max-width: calc(100vw - 32px);
}
.toast[hidden] { display: none; }

@media (max-width: 640px) {
  .topbar { padding: 10px 16px; }
  .tabs { width: 100%; }
  .tab { flex: 1; padding: 7px 4px; font-size: 12.5px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi b { font-size: 22px; }
  .count { font-size: 18px; }
}

/* seating arrangement */
.halls { margin-bottom: 16px; }
.halls summary { cursor: pointer; }
.halls[open] summary { margin-bottom: 12px; }
.hall-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; margin-bottom: 14px; }
.hall-form .cap { padding: 8px 0; font-variant-numeric: tabular-nums; }
.hall-form .actions { padding-bottom: 1px; }
td.row-actions { text-align: right; }
td.row-actions .btn { margin-right: 4px; }
.seat-filters { align-items: end; }
.segmented { display: flex; background: var(--surface-2); padding: 3px; border-radius: 9px; gap: 3px; }
.segmented button {
  flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 600;
  padding: 6px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.segmented button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.exam-days { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.exam-days:empty { display: none; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12px;
  padding: 2px 10px; border-radius: 99px; cursor: pointer; white-space: nowrap;
}
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

.workspace { margin-bottom: 16px; }
.hall-tabs { display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; padding: 8px 8px 0; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.hall-tabs:empty { display: none; }
.hall-tab {
  display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 6px 14px;
  border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; background: transparent;
  color: var(--muted); font: inherit; cursor: pointer; margin-bottom: -1px;
}
.hall-tab b { font-size: 14px; }
.hall-tab span { font-size: 11px; font-variant-numeric: tabular-nums; }
.hall-tab:hover { color: var(--text); }
.hall-tab.active { background: var(--surface); border-color: var(--border); color: var(--text); }
.grid-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px 14px; }
.seat-scroll { overflow-x: auto; padding: 0 14px 16px; }
.seat-grid { border-collapse: collapse; user-select: none; -webkit-user-select: none; margin: 0 auto; }
.seat-grid:focus { outline: none; }
.seat-grid th { font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px; text-align: center; }
.seat-grid tbody th { padding: 0 8px 0 0; }
.seat {
  position: relative; width: 112px; min-width: 96px; height: 58px; padding: 0;
  border: 1px solid var(--border); background: var(--surface); cursor: cell; text-align: center; vertical-align: middle;
}
.seat .sid { position: absolute; top: 3px; left: 5px; font-size: 11px; color: var(--muted); }
.seat .reg { display: block; font-size: 14px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; padding-top: 8px; }
.seat .grp { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.seat.filled { background: hsl(var(--h) 80% 94%); }
.seat.stale { outline: 2px dashed var(--warn); outline-offset: -3px; }
.seat:hover { background: var(--surface-2); }
.seat.filled:hover { background: hsl(var(--h) 75% 90%); }
.seat.sel { background: var(--primary-soft); box-shadow: inset 0 0 0 2px var(--primary); }
.seat.filled.sel { background: hsl(var(--h) 70% 86%); }
.queue-card { margin-bottom: 16px; }
.queue { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.queue .empty { grid-column: 1 / -1; }
.q-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; min-width: 0;
  border: 1px solid var(--border); border-left: 5px solid hsl(var(--h) 65% 50%); border-radius: 10px;
  background: hsl(var(--h) 80% 97%); color: var(--text); font: inherit; padding: 8px 12px; cursor: pointer;
}
.q-item:hover { background: hsl(var(--h) 80% 92%); }
.q-key { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.q-n { font-size: 12px; color: var(--muted); }
.q-n b { color: var(--text); }
.q-sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (prefers-color-scheme: dark) {
  .seat.filled { background: hsl(var(--h) 35% 20%); }
  .seat.filled:hover { background: hsl(var(--h) 35% 25%); }
  .seat.filled.sel { background: hsl(var(--h) 40% 28%); }
  .q-item { background: hsl(var(--h) 30% 16%); border-left-color: hsl(var(--h) 60% 55%); }
  .q-item:hover { background: hsl(var(--h) 30% 21%); }
}
@media (max-width: 640px) {
  .seat { width: 84px; min-width: 84px; height: 52px; }
  .seat .reg { font-size: 12.5px; }
}
.queue-card .actions { align-items: center; }
.save-state { font-size: 12px; }

/* seating: hand-added subjects */
.badge.cross { background: var(--fn-soft); color: var(--fn); }
.badge.unsched { background: var(--surface-2); color: var(--muted); }
.badge.manual { background: var(--an-soft); color: var(--an); }
.q-wrap { position: relative; display: flex; }
.q-wrap .q-item { flex: 1; border-style: dashed; border-left-style: solid; padding-right: 30px; }
.q-item:disabled { cursor: default; opacity: .65; }
.q-key .badge { font-size: 10.5px; vertical-align: middle; }
.q-remove {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer; font: inherit;
}
.q-remove:hover { background: var(--surface); color: var(--danger); }
.import-dlg {
  width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 18px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text);
  box-shadow: 0 12px 40px rgb(0 0 0 / .25);
}
.import-dlg::backdrop { background: rgb(15 20 32 / .45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dlg-head .icon-btn:hover { color: var(--text); }
.import-dlg > .muted { margin: 4px 0 12px; }
.dlg-tabs { margin-bottom: 12px; }
.dlg-pane[hidden] { display: none; }
.dlg-input {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; margin-bottom: 10px;
}
.import-results { display: grid; gap: 6px; max-height: 52vh; overflow: auto; }
.result { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.result .r-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.result .muted { font-size: 12px; }
.center { text-align: center; }
.manual-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.manual-form .full { grid-column: 1 / -1; }
.manual-form textarea {
  font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%; resize: vertical;
}
.manual-actions { display: flex; align-items: center; gap: 10px; }
.manual-actions .btn.primary { margin-left: auto; }

/* seating: dock split by exam type */
.q-sections { display: grid; gap: 16px; }
.q-sections > .empty { margin: 0; }
.q-section h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14px; font-weight: 650; }
.q-section h3 .muted { font-weight: 400; font-size: 12px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }

/* seating: custom dates and postponed sessions */
.chip.custom { display: inline-flex; align-items: center; padding: 0; border-style: dashed; }
.chip.custom button { border: 0; background: none; color: inherit; font: inherit; padding: 2px 4px 2px 10px; cursor: pointer; }
.chip.custom .chip-x { padding: 2px 8px 2px 4px; opacity: .7; }
.chip.custom .chip-x:hover { opacity: 1; }
.chip.add { border-style: dashed; color: var(--primary); }
.badge.postponed { background: var(--warn-soft); color: var(--warn); }
.post-form { display: grid; gap: 10px; }
.post-form > .muted { margin: 0; }
.post-head { display: flex; align-items: center; justify-content: space-between; }
.post-list { display: grid; gap: 4px; max-height: 40vh; overflow: auto; }
.post-row { display: flex; align-items: baseline; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; overflow-wrap: anywhere; }
.post-row input { accent-color: var(--primary); }

.site-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 24px; }
