:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e5ea;
  --text: #1b1f24;
  --muted: #5f6670;
  --faint: #9aa1ab;
  --accent: #3b5bdb;
  --accent-text: #ffffff;
  --accent-weak: #edf1ff;
  --accent-strong: #2f4bc0;
  --ok: #2b8a3e;
  --ok-weak: #e7f6eb;
  --warn: #a85a00;
  --warn-weak: #fff3e0;
  --danger: #c92a2a;
  --danger-weak: #fff0f0;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --radius: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114;
    --surface: #181b20;
    --surface-2: #20242a;
    --border: #2c3138;
    --text: #e8eaee;
    --muted: #a1a8b3;
    --faint: #6b727c;
    --accent: #7b96ff;
    --accent-text: #0f1114;
    --accent-weak: #1d2747;
    --accent-strong: #9aafff;
    --ok: #5cc277;
    --ok-weak: #15301d;
    --warn: #f0a346;
    --warn-weak: #33240f;
    --danger: #ff7272;
    --danger-weak: #3a1a1a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.boot { padding: 80px 16px; text-align: center; color: var(--muted); }

/* ---------- 레이아웃 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 0 16px; height: 56px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.wordmark { font-weight: 800; letter-spacing: .06em; font-size: 16px; }
.brand-lab { color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--border); margin-left: -4px; }
.auth-card .wordmark { font-size: 22px; }
.lab-name { color: var(--text); font-size: 15px; }
@media (max-width: 760px) { .brand-lab { overflow: hidden; text-overflow: ellipsis; max-width: 40vw; } }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; }
.brand-mark svg { width: 16px; height: 16px; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.active { color: var(--accent); background: var(--accent-weak); }
.top-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.icon-btn svg { width: 20px; height: 20px; }
.dot-badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-weak); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none;
}
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }

.mobile-nav { display: none; }
@media (max-width: 760px) {
  .topbar .nav { display: none; }
  .topbar-inner { justify-content: space-between; }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 0 7px; color: var(--muted); font-size: 11px; font-weight: 500;
  }
  .mobile-nav a svg { width: 22px; height: 22px; }
  .mobile-nav a.active { color: var(--accent); }
  .mobile-nav a:hover { text-decoration: none; }
  main.page { padding-bottom: 96px; }
}

main.page { max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); margin-bottom: 12px; font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

/* ---------- 카드 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-body { padding: 14px 18px; }
.card-body.flush { padding: 0; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); }
.empty .emoji { font-size: 28px; display: block; margin-bottom: 6px; }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { justify-content: center; font-size: 18px; margin-bottom: 6px; }
.auth-card .brand-mark { width: 32px; height: 32px; }
.auth-card .lead { text-align: center; color: var(--muted); margin-bottom: 20px; }

/* ---------- 폼 ---------- */
label.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
label.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--faint); font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; width: 100%; min-width: 0;
}
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.form-row label.field { margin-bottom: 14px; }
.form-error { color: var(--danger); font-size: 13.5px; margin: -4px 0 12px; min-height: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: 14px;
  padding: 9px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-weak); }
.btn.ok { color: var(--ok); }
.btn.ok:hover { background: var(--ok-weak); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; padding: 11px; }
.btn svg { width: 16px; height: 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.badge.accent { background: var(--accent-weak); color: var(--accent); }
.badge.ok { background: var(--ok-weak); color: var(--ok); }
.badge.warn { background: var(--warn-weak); color: var(--warn); }
.badge.danger { background: var(--danger-weak); color: var(--danger); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); padding: 5px 12px; border-radius: 6px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- 리스트 ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--border); }
.list > li:first-child { border-top: 0; }
.item { display: flex; gap: 14px; padding: 13px 18px; color: var(--text); align-items: flex-start; }
a.item:hover { background: var(--surface-2); text-decoration: none; }
.item-time { flex: none; width: 92px; font-variant-numeric: tabular-nums; }
.item-time b { display: block; font-size: 14px; }
.item-time span { font-size: 12.5px; color: var(--muted); }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 600; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.item-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.item-side { flex: none; display: flex; gap: 6px; align-items: center; }
.date-head { padding: 9px 18px; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--muted); border-top: 1px solid var(--border); }
.date-head:first-child { border-top: 0; border-radius: var(--radius) var(--radius) 0 0; }
.date-head.today { color: var(--accent); }

.notif { display: flex; gap: 10px; padding: 11px 18px; color: var(--text); align-items: flex-start; }
a.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 8px; flex: none; }
.notif.read .dot { background: transparent; }
.notif.read { color: var(--muted); }
.notif time { display: block; font-size: 12px; color: var(--faint); }

/* ---------- 예약 슬롯 ---------- */
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.week-nav .range { font-weight: 700; min-width: 150px; text-align: center; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.day { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-height: 96px; }
.day.today { border-color: var(--accent); }
.day-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.day-head b { font-size: 15px; }
.day-head span { font-size: 12.5px; color: var(--muted); }
.day.weekend .day-head b { color: var(--danger); }
.day-empty { color: var(--faint); font-size: 13px; }
.slots { display: flex; flex-direction: column; gap: 6px; }
.slot {
  font: inherit; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 7px 8px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); text-align: left; display: flex; justify-content: space-between; gap: 6px; align-items: center;
  white-space: nowrap; min-width: 0;
}
.slot small { min-width: 0; font-weight: 500; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.slot.free { border-color: var(--accent); color: var(--accent); cursor: pointer; background: var(--accent-weak); }
button.slot.free:hover { background: var(--accent); color: var(--accent-text); }
.slot.mine { border-color: var(--ok); background: var(--ok-weak); color: var(--ok); cursor: pointer; }
.slot.mine small { color: var(--ok); }
.slot.busy { background: var(--surface-2); color: var(--faint); border-color: transparent; }
.slot.busy.link { color: var(--text); cursor: pointer; }
.slot.busy.link.pending { background: var(--warn-weak); color: var(--warn); }
.slot.blocked { background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 5px, transparent 5px, transparent 10px); color: var(--faint); border-color: var(--border); }
.slot.past, .slot.closed { color: var(--faint); border-style: dashed; background: transparent; font-weight: 500; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--border); }
.legend .l-free { background: var(--accent-weak); border-color: var(--accent); }
.legend .l-mine { background: var(--ok-weak); border-color: var(--ok); }
.legend .l-busy { background: var(--surface-2); }

/* ---------- 상세 ---------- */
.meta { display: grid; gap: 8px; margin-top: 14px; }
.meta div { display: flex; gap: 10px; align-items: flex-start; }
.meta svg { width: 18px; height: 18px; color: var(--faint); flex: none; margin-top: 2px; }
.prose { white-space: pre-wrap; line-height: 1.65; }
.prose.empty-text { color: var(--faint); }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 10px; padding: 9px 18px; border-top: 1px solid var(--border); }
.people li:first-child { border-top: 0; }
.people .who { flex: 1; min-width: 0; }
.people .who small { display: block; color: var(--muted); font-size: 12.5px; }
.order { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.rsvp-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.rsvp-bar .btn.on-yes { background: var(--ok-weak); color: var(--ok); border-color: var(--ok); }
.rsvp-bar .btn.on-maybe { background: var(--warn-weak); color: var(--warn); border-color: var(--warn); }
.rsvp-bar .btn.on-no { background: var(--danger-weak); color: var(--danger); border-color: var(--danger); }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.notice.warn { background: var(--warn-weak); color: var(--warn); }
.notice.accent { background: var(--accent-weak); color: var(--accent-strong); }
.notice.danger { background: var(--danger-weak); color: var(--danger); }

/* ---------- 투표 ---------- */
.poll-table { width: 100%; border-collapse: collapse; }
.poll-table th, .poll-table td { padding: 10px 12px; border-top: 1px solid var(--border); text-align: left; vertical-align: middle; }
.poll-table th { font-size: 12.5px; color: var(--muted); font-weight: 600; border-top: 0; }
.poll-table tr.best td { background: var(--ok-weak); }
.vote-btn {
  font: inherit; font-size: 13px; font-weight: 600; border-radius: 7px; padding: 6px 10px; min-width: 76px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--faint);
}
.vote-btn.v2 { background: var(--ok); border-color: var(--ok); color: #fff; }
.vote-btn.v1 { background: var(--warn-weak); border-color: var(--warn); color: var(--warn); }
.vote-btn:disabled { cursor: default; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; display: flex; min-width: 60px; }
.bar i { display: block; height: 100%; }
.bar .b2 { background: var(--ok); }
.bar .b1 { background: var(--warn); opacity: .6; }
.names { font-size: 12.5px; color: var(--muted); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 13px; }
.chip button { border: 0; background: transparent; color: var(--faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 3px; }
.chip button:hover { color: var(--danger); }
.sticky-save { position: sticky; bottom: 12px; display: flex; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 760px) { .sticky-save { bottom: 76px; } }

/* ---------- 가용 시간 편집 ---------- */
.wk-row { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); align-items: start; }
.wk-row:first-child { border-top: 0; }
.wk-row .wd { font-weight: 700; padding-top: 7px; }
.wk-row .wd.weekend { color: var(--danger); }
.range-row { display: grid; grid-template-columns: 110px 14px 110px 1fr 36px; gap: 6px; align-items: center; margin-bottom: 6px; }
@media (max-width: 560px) {
  .range-row { grid-template-columns: 1fr 14px 1fr 36px; }
  .range-row .loc { grid-column: 1 / -2; grid-row: 2; }
  .wk-row { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- 표 (관리) ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { padding: 10px 14px; border-top: 1px solid var(--border); text-align: left; white-space: nowrap; }
table.tbl th { font-size: 12.5px; color: var(--muted); border-top: 0; font-weight: 600; }
table.tbl tr.inactive td { color: var(--faint); }
table.tbl select { width: auto; padding: 5px 8px; }
.copy-box { display: flex; gap: 6px; }
.copy-box input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
code.big { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; font-weight: 700; letter-spacing: 2px; }

/* ---------- 모달 · 토스트 ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10, 14, 20, .45); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade .12s ease-out;
}
.modal {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto;
  animation: pop .14s ease-out;
}
.modal.wide { max-width: 640px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 0; }
.modal-body { padding: 14px 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 18px 18px; }
@media (max-width: 560px) {
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { border-radius: 16px 16px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1b1f24; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 14px; animation: pop .15s ease-out; max-width: calc(100vw - 32px); }
.toast.error { background: var(--danger); }
@media (max-width: 760px) { #toast { bottom: 84px; } }
.pick-list { max-height: 280px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.pick-list label { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); cursor: pointer; }
.pick-list label:first-child { border-top: 0; }
.pick-list label:hover { background: var(--surface-2); }
.skeleton { color: var(--faint); padding: 40px 0; text-align: center; }

/* ---------- 시간표 ---------- */
.slot.myclass { background: var(--surface-2); color: var(--faint); border-style: dashed; }
.slot.myclass small { color: var(--warn); }
.legend .l-class { background: var(--surface-2); border-style: dashed; }

.tt { overflow-x: auto; }
.tt-head, .tt-body { display: grid; grid-template-columns: 34px repeat(var(--cols), minmax(62px, 1fr)); min-width: calc(34px + var(--cols) * 62px); }
.tt-head div { text-align: center; font-weight: 700; font-size: 13px; padding: 6px 0 8px; color: var(--muted); }
.tt-head .weekend { color: var(--danger); }
.tt-body { border-top: 1px solid var(--border); }
.tt-hours div { font-size: 11px; color: var(--faint); text-align: right; padding: 2px 6px 0 0; }
.tt-col { position: relative; border-left: 1px solid var(--border); background-image: linear-gradient(to bottom, var(--border) 1px, transparent 1px); }
.tt-block {
  position: absolute; left: 2px; right: 2px; border-radius: 6px; padding: 3px 5px; overflow: hidden;
  font-size: 11px; line-height: 1.3; display: flex; flex-direction: column;
  background: hsl(var(--h) 75% 93%); color: hsl(var(--h) 55% 24%); border-left: 3px solid hsl(var(--h) 55% 52%);
}
.tt-block b { font-size: 11.5px; font-weight: 700; }
.tt-block span { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-block.click { cursor: pointer; }
.tt-block.click:hover { filter: brightness(.96); }
@media (prefers-color-scheme: dark) {
  .tt-block { background: hsl(var(--h) 30% 21%); color: hsl(var(--h) 70% 86%); }
}

.upload {
  display: flex; align-items: center; gap: 16px; padding: 22px; margin-bottom: 16px;
  border: 2px dashed var(--border); box-shadow: none; background: var(--surface);
}
.upload .upload-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.upload.compact { padding: 12px 16px; border-width: 1px; }
.upload.over { border-color: var(--accent); background: var(--accent-weak); }
@media (max-width: 560px) { .upload { flex-direction: column; align-items: stretch; } }

table.heat { border-collapse: collapse; width: 100%; font-size: 11.5px; font-variant-numeric: tabular-nums; }
table.heat th { font-weight: 600; color: var(--muted); padding: 4px 6px; text-align: center; white-space: nowrap; }
table.heat tbody th { text-align: right; color: var(--faint); font-weight: 500; vertical-align: top; padding-top: 0; transform: translateY(-7px); }
table.heat td { height: 20px; min-width: 40px; text-align: center; border: 1px solid var(--surface); cursor: pointer; font-weight: 600; }
table.heat td.h0 { background: var(--ok-weak); }
table.heat td.h1 { background: var(--warn-weak); color: var(--warn); }
table.heat td.h2 { background: color-mix(in srgb, var(--warn) 30%, var(--surface)); color: var(--warn); }
table.heat td.h3 { background: var(--danger-weak); color: var(--danger); }
table.heat td.h-past { background: var(--surface-2); cursor: default; }
table.heat td:hover:not(.h-past) { outline: 2px solid var(--accent); outline-offset: -2px; }
.legend i.h0 { background: var(--ok-weak); }
.legend i.h1 { background: var(--warn-weak); }
.legend i.h3 { background: var(--danger-weak); }
.free-list { border: 1px solid var(--border); border-radius: 10px; max-height: 420px; overflow: auto; }
.free-list .item { padding: 10px 12px; align-items: center; }
.tt-block.short span + span { display: none; }
.tt-block.short { padding-top: 2px; }
