:root {
  /* Anthropic 视觉系统：云白底 + 书布陶土 accent + 收敛的暖中性表面 */
  --bg: #F0EEE6;        /* Anthropic cloud ivory */
  --side: #E8E5D9;      /* 侧栏更深一档的云白 */
  --surface: #FFFFFF;
  --soft: #F7F5EE;      /* 唯一的柔和填充，取代原先近十种米白 */
  --paper: #F3F0E7;
  --brand: #CC785C;     /* book cloth 陶土 */
  --brand-border: #BC6A4E;
  --brand-strong: #A85639;
  --brand-soft: #ECDBD0;
  --ink: #141413;
  --text: #1A1A18;
  --text-2: #3A3833;
  --muted: #6A665C;
  --weak: #7C776C;
  --faint: #9A9488;
  --fainter: #A8A296;
  --line: #E4DFD2;
  --line-soft: #ECE8DC;
  --line-dash: #DCD6C7;
  --input: #DAD4C6;
  --red: #B23B22;
  --red-bg: #F3E1DA;
  --red-text: #97311B;
  --important: #B07D2B;
  --important-bg: #F1E8D3;
  --important-text: #8A641F;
  --normal: #5B7C86;
  --normal-bg: #E4EBEC;
  --normal-text: #466069;
  --green-bg: #E5EBDC;
  --green-text: #4E6B40;
  --shadow: 0 1px 2px rgba(35,28,15,0.04);
  --shadow-soft: 0 1px 1px rgba(35,28,15,0.03);
  --shadow-modal: 0 24px 60px rgba(30,22,12,0.22);
  --sans: "PingFang SC","Microsoft YaHei","Helvetica Neue",Helvetica,Arial,sans-serif;
  --serif: "Newsreader","Noto Serif SC",Georgia,serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.01em;
}
h2 { font-size: 14px; font-weight: 600; }
small { font: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #E4DFD2; border-radius: 7px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #D5CFBF; }

.app { height: 100vh; display: flex; overflow: hidden; }
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: var(--bg);
}
.login-panel {
  width: min(390px, 100%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.login-brand { padding: 0 0 8px; }
.login-head { display: grid; gap: 6px; }
.login-head p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.login-panel label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 600; }
.login-panel input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
}
.login-error { min-height: 18px; color: var(--red-text); font-size: 13px; }
.side {
  width: 248px;
  height: 100vh;
  flex: none;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  border-right: 1px solid var(--line-dash);
  background: var(--side);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand);
  color: #FAF4EE;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}
.brand-title { font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.brand-sub { margin-top: 1px; color: #8E897E; font-size: 11px; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-section {
  padding: 18px 8px 8px;
  color: var(--fainter);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.nav-section:first-child { padding-top: 0; }
.nav-btn {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 14px;
  font-weight: 500;
}
.nav-btn strong { flex: 1; font: inherit; }
.nav-btn b {
  min-width: 24px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--red-bg);
  color: var(--red-text);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
}
.nav-btn.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  font-weight: 600;
}
.operator {
  /* 原来是 .dev-date 顶着它到底部，测试面板删掉后这条得自己带上。 */
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 10px;
  background: #E8E5D9;
}
.operator > div:nth-child(2) { min-width: 0; flex: 1; }
.avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #7C5A48;
  color: #F4EBE4;
  font-size: 13px;
  font-weight: 600;
}
.operator strong { display: block; font-size: 13px; font-weight: 600; }
.operator span { display: block; margin-top: 1px; color: #8E897E; font-size: 11px; }

.main { flex: 1; min-width: 0; overflow-y: auto; }
.page { display: none; margin: 0 auto; padding: 36px 40px 64px; }
.page.active { display: block; }
.page-narrow { max-width: 880px; }
.page-detail { max-width: 920px; }
.page-form { max-width: 760px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.eyebrow { margin-bottom: 7px; color: var(--faint); font-size: 13px; letter-spacing: 0.03em; }
.lead { margin-top: 8px; max-width: 680px; color: var(--muted); font-size: 14px; line-height: 1.65; }
#casePageSubtitle { max-width: 760px; margin-top: 6px; font-size: 15px; line-height: 1.45; }
.head-actions, .panel-actions, .modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { border-color: var(--weak); }
.btn.primary { border-color: var(--brand-border); background: var(--brand); color: #fff; }
.btn.primary:hover { border-color: var(--brand-strong); background: var(--brand-strong); }
.btn.ghost { background: var(--surface); }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { border-color: var(--red); background: var(--red); color: #fff; }
.btn.danger:hover { background: #97311B; border-color: #97311B; }
.btn.small { min-height: 32px; padding: 5px 12px; font-size: 12.5px; }
.btn:disabled { opacity: 0.42; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--input); }
.icon-btn {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #E4DFD2;
  border-radius: 7px;
  background: var(--surface);
  color: var(--weak);
}

[data-icon] {
  width: 17px;
  height: 17px;
  flex: none;
  display: inline-block;
  background: currentColor;
  color: #8E897E;
  mask: var(--icon) center / contain no-repeat;
  -webkit-mask: var(--icon) center / contain no-repeat;
}
.active > [data-icon], .btn.primary [data-icon] { color: var(--brand); }
[data-icon="calendar"] { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E"); }
[data-icon="done"] { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 11.1V12a9 9 0 11-5.3-8.2'/%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3C/svg%3E"); }
[data-icon="inbox"] { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 13l3-8h12l3 8M3 13v5a2 2 0 002 2h14a2 2 0 002-2v-5M3 13h5l1.4 2.4h5.2L16 13h5'/%3E%3C/svg%3E"); }
[data-icon="folder"] { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 7a2 2 0 012-2h3.5l2 2.5H19a2 2 0 012 2V18a2 2 0 01-2 2H5a2 2 0 01-2-2z'/%3E%3C/svg%3E"); }
[data-icon="shield"] { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 8-7 10-4-2-7-5.5-7-10V6z'/%3E%3C/svg%3E"); }
[data-icon="upload"] { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 16V5m0 0l-4 4m4-4l4 4M5 19h14'/%3E%3C/svg%3E"); }
[data-icon="alert"] { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 9v4m0 4h.01M10.3 3.9L2.4 18a1.8 1.8 0 001.6 2.7h16a1.8 1.8 0 001.6-2.7L13.7 3.9a1.8 1.8 0 00-3.1 0z'/%3E%3C/svg%3E"); }
[data-icon="list"] { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }
[data-icon="lane"] { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='4' width='18' height='5' rx='1.5'/%3E%3Crect x='3' y='11' width='18' height='5' rx='1.5'/%3E%3Crect x='3' y='18' width='18' height='3' rx='1.5'/%3E%3C/svg%3E"); }
[data-icon="clock"] { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
[data-icon="user"] { --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 21a8 8 0 10-16 0'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.summary-grid article {
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.summary-grid span { display: flex; align-items: center; gap: 7px; color: #76726A; font-size: 12.5px; }
.summary-grid strong {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.risk { width: 8px; height: 8px; display: inline-block; border-radius: 999px; }
.risk.red, .bar.red { background: var(--red); }
.risk.important, .bar.important { background: var(--important); }
.risk.normal, .bar.normal { background: var(--normal); }

.notice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 18px;
  margin-bottom: 24px;
  border: 1px solid #E7D3C6;
  border-radius: 13px;
  background: #F5ECE4;
  text-align: left;
}
.notice [data-icon] { color: var(--brand-border); width: 19px; height: 19px; }
.notice div { flex: 1; min-width: 0; }
.notice strong { display: block; color: #7A3A1E; font-size: 14px; font-weight: 600; }
.notice small { display: block; margin-top: 2px; color: #9A6B50; font-size: 12.5px; }
.notice em { color: var(--brand-border); font-style: normal; font-size: 13px; font-weight: 600; white-space: nowrap; }
.notice.empty {
  border-color: #E4DFD2;
  background: #F7F5EE;
}
.notice.empty [data-icon],
.notice.empty em { color: #A5A095; }
.notice.empty strong { color: var(--weak); }
.notice.empty small { color: var(--faint); }

.viewbar { margin-bottom: 18px; }
.segmented {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: #E6E1D4;
}
.segmented button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--weak);
  font-size: 13.5px;
  font-weight: 500;
}
.segmented button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(60,50,30,0.06);
  font-weight: 600;
}
.segmented button.active [data-icon] { color: var(--brand); }
.rangebar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}
.rangebar-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rangebar > span { margin-left: auto; color: var(--faint); font-size: 12.5px; }
.range-hint { color: var(--weak); font-size: 12.5px; }
.inline-route {
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pill-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pill-row button {
  min-height: 31px;
  padding: 6px 14px;
  border: 1px solid #E4DFD2;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.pill-row button.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: #A85639;
  font-weight: 600;
}
.pill-row.wrap { margin-bottom: 20px; }

.groups, .list { display: grid; gap: 11px; }
.group { margin-top: 26px; }
.group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 13px; }
.group-head h2 { color: var(--text); letter-spacing: 0.02em; }
.group-head span { color: var(--fainter); font-size: 12px; }
.card {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.bar { width: 4px; flex: none; background: var(--normal); }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 11px; padding: 15px 18px; }
.card-top { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.card-title { margin-top: 6px; color: var(--text); font-size: 16px; font-weight: 600; line-height: 1.38; }
.meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #8A857B; font-size: 12.5px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge::before { content: ""; width: 5px; height: 5px; display: none; border-radius: 999px; }
.badge.red { background: var(--red-bg); color: var(--red-text); }
.badge.red::before { display: inline-block; background: var(--red); }
.badge.important { background: var(--important-bg); color: var(--important-text); }
.badge.normal { background: var(--normal-bg); color: var(--normal-text); }
.badge.overdue { background: var(--red); color: #fff; }
.badge.green { background: var(--green-bg); color: var(--green-text); }
.badge.orange { background: #F4E7D8; color: #9A5C21; }
.badge.gray { background: #F0EDE5; color: var(--weak); }
.countdown { flex: none; min-width: 86px; text-align: right; }
.countdown strong {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.countdown span { display: block; margin-top: 3px; color: var(--faint); font-size: 12px; }
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
}
.source { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--weak); font-size: 12.5px; }
.source span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source em { color: #C9C3B6; font-style: normal; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.calendar-panel, .panel, .draft-card, .case-head-card, .phase-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.calendar-panel { padding: 22px 24px; }
.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.calendar-head strong { margin-right: 12px; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.legend { display: flex; align-items: center; gap: 14px; color: var(--weak); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #E6E1D4;
  border-radius: 10px;
  background: #E6E1D4;
}
.calendar-weekday {
  padding: 9px 0;
  background: #F1EDE2;
  color: var(--weak);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}
.calendar-weekday.weekend { color: var(--faint); }
.calendar-cell {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 8px;
  background: var(--surface);
}
.day-number {
  width: fit-content;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 999px;
  color: var(--weak);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.day-number.today { background: var(--brand); color: #fff; font-weight: 600; }
.event-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.event-chip.red { background: var(--red-bg); color: var(--red-text); }
.event-chip.important { background: var(--important-bg); color: var(--important-text); }
.event-chip.normal { background: var(--normal-bg); color: var(--normal-text); }

.lane-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.lane-row {
  display: grid;
  grid-template-columns: 150px repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line-soft);
}
.lane-row:last-child { border-bottom: 0; }
.lane-cell {
  min-height: 58px;
  padding: 12px;
  border-left: 1px solid var(--line-soft);
  color: var(--weak);
  font-size: 12.5px;
}
.lane-row .lane-cell:first-child { border-left: 0; }
.lane-head .lane-cell {
  min-height: 42px;
  background: #F1EDE2;
  color: var(--weak);
  font-weight: 600;
}
.lane-case { color: var(--text); font-weight: 600; }
.lane-empty { color: #D5CFBF; font-size: 18px; }

/* 切换案件是本页使用频率最高的控件，原来是一枚和普通输入框同色的下拉，
   在标题旁边几乎看不见。改成陶土描边 + 自绘箭头，让它一眼可辨是"可以点的"。 */
.case-select {
  max-width: 320px;
  padding: 10px 38px 10px 14px;
  border: 1.5px solid var(--brand-soft);
  border-radius: 11px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%23CC785C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  box-shadow: var(--shadow);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-overflow: ellipsis;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.case-select:hover { border-color: var(--brand); }
.case-select:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.case-head-card { padding: 20px 22px; margin-bottom: 18px; }
.case-head-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
/* 状态徽章单独一行，两个按钮并排——原来三样挤在一个 flex-wrap 里，
   窄一点就把「＋ 新增节点」甩到第二行，看着像没对齐的两截。 */
.case-head-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.case-head-buttons { display: flex; flex-wrap: nowrap; gap: 8px; }
.case-head-buttons .btn { white-space: nowrap; }
.case-head-card h2 { font-family: var(--serif); font-size: 25px; line-height: 1.3; font-weight: 600; }
.case-meta { margin-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; color: var(--weak); font-size: 13px; }
.case-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-top: 16px;
}
.case-stat { display: grid; gap: 5px; }
.case-stat span { color: var(--faint); font-size: 12px; }
.case-stat strong { font-family: var(--serif); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 10px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--weak);
  font-size: 13.5px;
}
.tab.active { border-bottom-color: var(--brand); color: var(--text); font-weight: 600; }
.phase-card { padding: 18px; margin-bottom: 18px; }
.phase-line {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 16px;
}
.phase-node { position: relative; display: grid; justify-items: center; gap: 8px; color: var(--weak); font-size: 12px; }
.phase-node::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
  z-index: 0;
}
.phase-node:first-child::before { left: 50%; }
.phase-node:last-child::before { right: 50%; }
.phase-dot {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid #D2C9B5;
  border-radius: 999px;
  background: #fff;
}
.phase-node.done .phase-dot { border-color: var(--brand); background: var(--brand); color: #fff; }
.phase-node.current .phase-dot { border-color: var(--brand); color: var(--brand); }
.parallel-line {
  padding-top: 14px;
  border-top: 1px dashed var(--line-dash);
}
.timeline-item, .file-row, .inbox-item, .pres-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.timeline-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 16px; }
.status-dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 999px; background: var(--normal); }
.status-dot.done { background: var(--brand); }
.status-dot.red { display: inline-block; margin: 0 7px 1px 0; background: var(--red); }
.timeline-title { font-size: 15px; font-weight: 600; }
.timeline-source { margin-top: 4px; color: var(--weak); font-size: 12.5px; }
.timeline-note {
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #F5EEE4;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.timeline-note > span {
  margin-right: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}
.timeline-document-source { margin-top: 7px; color: var(--weak); font-size: 12px; }
.timeline-date { color: var(--weak); font-size: 13px; white-space: nowrap; }
.timeline-groups { display: grid; gap: 30px; }
.timeline-month-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.timeline-month-head h2 { font-size: 19px; }
.timeline-month-head span { color: var(--fainter); font-size: 12px; }
.timeline-month.overdue .timeline-month-head h2 { color: var(--red-text); }
.timeline-schedule {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.timeline-row {
  width: 100%;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text);
  text-align: left;
}
.timeline-row:last-child { border-bottom: 0; }
.timeline-row:hover { background: var(--soft); }
.timeline-row-date {
  color: var(--brand);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.timeline-row-main { min-width: 0; }
.timeline-row-main strong { display: block; font-size: 15px; font-weight: 600; }
.timeline-row-main small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--weak);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.timeline-row-countdown { color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.timeline-row-countdown.overdue { color: var(--red-text); }
.file-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px; }
.file-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: #ECDBD0; color: #B5853F; font-weight: 700; }
.dashed-add {
  width: 100%;
  padding: 14px;
  border: 1px dashed #D2C9B5;
  border-radius: 12px;
  background: transparent;
  color: var(--weak);
  font-weight: 600;
}

.inbox-item { padding: 16px; }
.inbox-title { margin: 10px 0; font-size: 16px; font-weight: 600; line-height: 1.38; }
.quote {
  margin: 12px 0;
  padding: 12px 14px;
  border-left: 3px solid #D2C9B5;
  border-radius: 8px;
  background: var(--paper);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}
.quote strong { display: block; margin-bottom: 4px; color: var(--weak); font-size: 12px; }

/* 待确认卡内编辑区：字段/日期直接在卡上修改，改完点「确认」一次生效 */
.confirm-form { display: grid; gap: 12px; }
.confirm-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #F7F5EE;
}
.confirm-field { font-size: 12px; }
.confirm-editor input, .confirm-editor select { font-size: 13px; }

.panel, .draft-card { padding: 18px; }
.upload-mode { margin-bottom: 20px; }
.upload-panel { margin-bottom: 16px; }
.form { display: grid; gap: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.span-2 { grid-column: 1 / -1; }
label { display: grid; gap: 6px; color: var(--weak); font-size: 13px; }
input, select, textarea {
  width: 100%;
  min-height: 41px;
  padding: 0 12px;
  border: 1px solid var(--input);
  border-radius: 10px;
  background: var(--soft);
  color: var(--text);
  outline: none;
}
textarea { padding-top: 10px; line-height: 1.55; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); background: #fff; }
input[type="file"] { min-height: auto; padding: 8px 10px; }
.dropzone {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 24px;
  border: 1px dashed #D2C9B5;
  border-radius: 14px;
  background: #F7F5EE;
  text-align: center;
}
.dropzone [data-icon] { width: 24px; height: 24px; color: #B5853F; }
.dropzone strong { color: var(--text); font-size: 15px; }
.dropzone small { max-width: 440px; color: var(--weak); font-size: 12.5px; line-height: 1.6; }
.check-row { display: flex; gap: 14px; flex-wrap: wrap; }
.check { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 8px; color: var(--muted); }
.check input { width: 16px; min-height: 16px; }
.mobile-file-actions { display: none; gap: 10px; flex-wrap: wrap; }
.file-picker { position: relative; overflow: hidden; }
.file-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.selected-files {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #F7F5EE;
}
.selected-files span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--normal-bg);
  color: var(--normal-text);
  font-size: 12px;
  font-weight: 600;
}
.selected-files small { color: var(--weak); font-size: 11px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-title span { color: var(--faint); font-size: 12.5px; }
.draft-fields { display: grid; gap: 9px; margin-bottom: 16px; }
.draft-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: #F7F5EE; }
.draft-field-value { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }
.draft-field-actions { display: inline-flex; flex-shrink: 0; align-items: center; gap: 8px; }
.dedup-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft); }
.dedup-filename { margin-top: 5px; color: var(--weak); font-size: 13px; overflow-wrap: anywhere; }
.dedup-summary { display: grid; gap: 12px; margin: 14px 0; padding: 12px; border-radius: 10px; background: var(--paper); }
.dedup-summary > div > span { display: block; margin-bottom: 6px; color: var(--weak); font-size: 12px; }
.dedup-summary strong { font-size: 14px; }
.dedup-point-list { display: grid; gap: 6px; }
.dedup-point { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 13px; }
.dedup-empty { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.dedup-card .actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.import-result-list { display: grid; gap: 16px; }
.import-result-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft); }
.import-result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.import-result-head strong { min-width: 0; overflow-wrap: anywhere; }
.import-result-card > .btn { margin-top: 14px; }
.draft-processing { display: flex; align-items: center; gap: 12px; padding: 18px 14px; border: 1px dashed var(--line-dash); border-radius: 10px; background: #F7F5EE; }
.draft-processing strong { display: block; font-size: 14px; color: var(--text); }
.draft-processing small { color: var(--muted); }
.spinner { width: 18px; height: 18px; flex-shrink: 0; border: 2px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.upload-queue {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.upload-queue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #F7F5EE;
}
.upload-queue-row.failed { border-color: #E9C8BD; background: #FAECE6; }
.upload-queue-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.upload-queue-row small { grid-column: 1 / -1; color: var(--weak); line-height: 1.45; }
.choice-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  border: 0;
}
.choice-field legend { width: 100%; margin-bottom: 7px; color: var(--weak); font-size: 13px; }
.choice-field label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 6px 12px;
  border: 1px solid #E4DFD2;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}
.choice-field input { width: 14px; min-height: 14px; }
.choice-field.compact label { padding: 6px 10px; }

.pres-card { display: flex; overflow: hidden; }
.pres-card .card-body { padding: 16px 18px; }
.pres-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--weak); font-size: 12.5px; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(38,32,24,0.32); }
.modal-card {
  position: relative;
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  margin: 22px auto;
  overflow: auto;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-modal);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 14px;
}
.modal-head h2 { font-size: 21px; font-weight: 600; }
.modal-body { padding: 0 22px 22px; }
.modal-note {
  margin: 0 0 4px;
  padding: 11px 12px;
  border-left: 4px solid #D2C9B5;
  border-radius: 10px;
  background: #F7F5EE;
  color: var(--weak);
  font-size: 13px;
  line-height: 1.6;
}
.rule-card {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #F1ECDF;
}
.rule-card [data-icon] { color: #B5853F; }
.rule-card strong { display: block; font-size: 13px; }
.rule-card small { display: block; margin-top: 2px; color: var(--weak); font-size: 12px; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  box-shadow: 0 10px 28px rgba(39,33,25,0.24);
}
.mobile-tabbar { display: none; }
.me-panel { display: grid; gap: 18px; }
.operator-row { display: flex; align-items: center; gap: 12px; }
.operator-row > div:nth-child(2) { min-width: 0; }
.operator-row strong { display: block; font-size: 15px; }
.operator-row span { display: block; margin-top: 2px; color: var(--weak); font-size: 13px; }
.me-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.me-grid article {
  min-height: 78px;
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #F7F5EE;
}
.me-grid span { color: var(--faint); font-size: 12px; }
.me-grid strong { font-size: 14px; }
.prefs-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #F7F5EE;
}
.quiet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.settings-block { display: grid; gap: 10px; }
.settings-block h2 { margin: 0; font-size: 16px; }
.settings-list { display: grid; gap: 8px; }
.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #F7F5EE;
}
.settings-row > div { min-width: 0; display: grid; gap: 3px; }
.settings-row strong { font-size: 13.5px; }
.settings-row span, .settings-row small { color: var(--weak); font-size: 12px; line-height: 1.45; }
.empty {
  padding: 28px;
  border: 1px dashed #D2C9B5;
  border-radius: 12px;
  color: var(--weak);
  text-align: center;
}
.empty.compact { padding: 14px; }
.hidden { display: none !important; }

@media (max-width: 980px) {
  .app { height: auto; min-height: 100vh; display: block; overflow: visible; }
  .side {
    width: 100%;
    height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line-dash);
  }
  .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-section { grid-column: 1 / -1; padding-top: 10px; }
  .operator { display: none; }
  .main { overflow: visible; }
  .page { padding: 24px 16px 48px; }
  .case-stats, .summary-grid { grid-template-columns: 1fr; }
  .lane-row { grid-template-columns: 130px repeat(4, minmax(120px, 1fr)); min-width: 640px; }
  .lane-table { overflow-x: auto; }
}

@media (max-width: 760px) {
  body { background: var(--bg); }
  .app {
    min-height: 100dvh;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }
  .side { display: none; }
  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(240, 238, 230, 0.9);
    box-shadow: 0 -6px 20px rgba(40,32,18,0.06);
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
  }
  .mobile-tab-btn {
    position: relative;
    min-width: 0;
    min-height: 54px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--faint);
    font-size: 11px;
    font-weight: 500;
    transition: color 0.15s ease, background-color 0.15s ease;
  }
  .mobile-tab-btn strong { font: inherit; }
  .mobile-tab-btn [data-icon] { width: 21px; height: 21px; color: var(--faint); }
  .mobile-tab-btn.active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-weight: 600;
  }
  .mobile-tab-btn.active [data-icon] { color: var(--brand); }
  .mobile-tab-btn b {
    position: absolute;
    top: 5px;
    right: 16px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    line-height: 18px;
  }
  .page { padding: 18px 12px 28px; }
  .page-head { margin-bottom: 18px; }
  .head-actions { width: 100%; justify-content: stretch; }
  .head-actions .btn { flex: 1; min-height: 42px; }
  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .summary-grid article {
    min-height: 76px;
    padding: 12px 10px;
    border-radius: 12px;
  }
  .summary-grid span { font-size: 11.5px; }
  .summary-grid strong { font-size: 25px; }
  .notice { align-items: flex-start; padding: 12px; }
  .notice em { display: none; }
  .rangebar-controls, .pill-row {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }
  .rangebar-controls::-webkit-scrollbar, .pill-row::-webkit-scrollbar { display: none; }
  .pill-row button { flex: none; }
  .card { border-radius: 12px; }
  .card-body { padding: 13px 14px; }
  .card-foot .actions, .confirm-form .actions, .pres-card .actions { width: 100%; }
  .card-foot .actions .btn, .confirm-form .actions .btn, .pres-card .actions .btn { flex: 1; min-height: 38px; }
  .source { width: 100%; }
  .calendar-panel, .panel, .draft-card, .case-head-card, .phase-card { border-radius: 12px; }
  .calendar-panel, .panel, .draft-card { padding: 14px; }
  .calendar-grid { min-width: 540px; }
  .calendar-panel { overflow-x: auto; }
  .lane-table {
    display: grid;
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
  }
  .lane-head { display: none; }
  .lane-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
  }
  .lane-cell {
    min-height: 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }
  .lane-cell[data-label]::before {
    content: attr(data-label);
    flex: none;
    color: var(--faint);
    font-size: 12px;
    font-weight: 600;
  }
  .lane-case { border-top: 0; background: #F1EDE2; }
  .case-select { max-width: none; width: 100%; }
  .case-head-card { padding: 14px; }
  .case-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs {
    gap: 0;
    overflow-x: auto;
    border-bottom: 0;
    padding: 4px;
    border-radius: 11px;
    background: #E6E1D4;
  }
  .tab {
    flex: 1;
    min-width: 86px;
    border-radius: 8px;
    border-bottom: 0;
    white-space: nowrap;
  }
  .tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft); }
  .phase-card { display: none; }
  .timeline-date {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    white-space: normal;
  }
  .file-row { align-items: start; }
  .dropzone {
    min-height: 150px;
    padding: 18px;
  }
  .dropzone input { display: none; }
  .mobile-file-actions { display: flex; }
  .mobile-file-actions .btn { flex: 1; min-height: 42px; }
  .draft-field, .upload-queue-row { grid-template-columns: 1fr; }
  .draft-field-actions { justify-content: flex-start; }
  .me-grid { grid-template-columns: 1fr; }
  .quiet-grid { grid-template-columns: 1fr; }
  .settings-row { align-items: stretch; flex-direction: column; }
  .toast {
    left: 12px;
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    max-width: none;
  }
}

@media (max-width: 640px) {
  h1 { font-size: 26px; }
  .page-head, .card-foot, .case-head-main, .calendar-head, .rangebar { align-items: stretch; flex-direction: column; }
  /* 窄屏下案件头竖排，徽章和按钮跟着左对齐、按钮平分整行 */
  .case-head-actions { align-items: flex-start; }
  .case-head-buttons { width: 100%; }
  .case-head-buttons .btn { flex: 1; min-height: 38px; }
  .rangebar > span { margin-left: 0; }
  .segmented { width: 100%; flex-wrap: wrap; }
  .segmented button { flex: 1; justify-content: center; }
  /* 窄屏卡片：标题与倒计时同排，倒计时收成「3 天后到期」紧凑一体，不再单独占一大行 */
  .card-top { flex-direction: row; align-items: flex-start; gap: 12px; }
  .card-title { margin-top: 4px; font-size: 15px; }
  .countdown {
    flex: none;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
    text-align: right;
  }
  .countdown strong { font-size: 17px; }
  .countdown span { margin-top: 0; font-size: 11.5px; white-space: nowrap; }
  .form-grid, .confirm-editor { grid-template-columns: 1fr; }
  .confirm-editor input, .confirm-editor select { min-height: 46px; font-size: 16px; }
  .span-2 { grid-column: auto; }
  .file-row, .timeline-item { grid-template-columns: 1fr; }
  input, select, textarea { min-height: 44px; font-size: 16px; }
  .modal-card {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: calc(100dvh - 28px);
    margin: 0;
    border-radius: 18px 18px 0 0;
  }
  .modal-body { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .modal-actions .btn { flex: 1; min-height: 42px; }
}
