:root {
  --ink: #172033;
  --text: #3d4a61;
  --muted: #6d7b92;
  --faint: #93a0b5;
  --line: #e4e9f1;
  --input: #cfd7e4;
  --paper: #f4f6fa;
  --sheet: #ffffff;
  --stripe: #f7f9fc;
  --hover: #eef3f9;
  --side: #0f2744;
  --side-2: #16365c;
  --side-muted: #b7c6d8;
  --primary: #1f6f8b;
  --primary-dark: #15596f;
  --ok: #0f7a5a;
  --ok-bg: #e5f6ef;
  --wait: #9a6700;
  --wait-bg: #fff4d6;
  --bad: #b42318;
  --bad-bg: #fdeceb;
  --info: #1d4f91;
  --info-bg: #e8f0fb;
  --warn: #9a4d12;
  --warn-bg: #ffedd5;
  --shadow: 0 1px 2px rgba(15, 39, 68, 0.05), 0 8px 24px rgba(15, 39, 68, 0.04);
  --radius: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  z-index: 40;
}
.skip:focus { top: 8px; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 36vw) 1fr;
  background: var(--paper);
}
.login-side {
  background:
    radial-gradient(circle at 20% 18%, rgba(31, 111, 139, 0.45), transparent 28%),
    linear-gradient(165deg, var(--side-2), var(--side) 58%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 32px;
}
.login-side p { max-width: 280px; margin: 0; color: var(--side-muted); font-size: 15px; line-height: 1.7; }
.login-main { display: grid; place-items: center; padding: 32px 24px; }
.login-form { width: min(400px, 100%); margin: 0; padding: 32px 28px; }
.login-form h2 { margin: 0 0 6px; font-size: 28px; }
.login-form .hint { margin-bottom: 8px; }
.login-submit { width: 100%; margin-top: 20px; }
.kicker { margin: 0 0 6px; color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.who, .mode-pill, .nav-label { color: var(--side-muted); }
.nav-label { padding: 18px 20px 6px; font-size: 12px; font-weight: 600; }
.who, .mode-pill { padding: 4px 20px; font-size: 13px; }
.tree { display: grid; gap: 12px; font-size: 14px; color: #e2e8f0; }
.login-card { display: grid; place-items: center; padding: 32px 24px; }
.panel, .drawer, .ledger, .table-wrap, .todo, .banner, .panel-block, .empty, .m-card {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { width: 100%; max-width: 480px; padding: 24px; }
.panel h2, .drawer h2, .top h1, .top h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; letter-spacing: 0; }
.hint, .sub, .note, .error, label, .card span, .ledger-head, th { font-size: 13px; }
.hint, .sub { margin: 0; color: var(--muted); }
label { display: block; margin: 16px 0 6px; color: var(--text); font-weight: 600; }
.note { color: var(--faint); margin-top: 4px; }
.error { color: var(--bad); min-height: 1.2em; margin-top: 8px; }
.card span { display: block; color: var(--muted); margin-bottom: 8px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--input);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 40px;
  font-size: 14px;
  line-height: 38px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 2px; border-color: var(--primary); }
input[readonly] { color: var(--muted); background: var(--stripe); }
.accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.account { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.account:hover { background: var(--hover); }
.account b { display: block; font-size: 14px; }
.account span { color: var(--faint); font-size: 12px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 232px 1fr; }
.rail {
  width: 232px;
  background: linear-gradient(180deg, var(--side-2), var(--side));
  color: #e7eef6;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 22px 18px 12px; font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 0.02em; }
.mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #1f6f8b;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex: 0 0 auto;
}
.nav-label {
  padding: 18px 20px 6px;
  font-size: 12px;
  font-weight: 600;
}
.nav-btn {
  display: block;
  width: calc(100% - 16px);
  margin: 2px 8px;
  border: 0;
  background: transparent;
  color: #d7e2ee;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.07); }
.nav-btn.active { background: rgba(255, 255, 255, 0.12); color: #fff; font-weight: 650; box-shadow: inset 3px 0 0 #7ec8dc; }
.rail .spacer { flex: 1; }
.who {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 12px 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.who b { color: #fff; font-size: 14px; font-weight: 600; display: block; }
.who span { color: var(--side-muted); font-size: 12px; }
.phone-only { display: none; }
.mobile-bar { display: none; }
.signout { height: 32px; min-height: 32px; line-height: 32px; padding: 0 8px; border: 0; background: transparent; color: var(--side-muted); font-size: 14px; }
.mode-pill { display: flex; align-items: center; gap: 8px; }
.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.text-btn {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  line-height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 600;
}
.text-btn:hover { background: var(--hover); }
.text-btn.danger { color: var(--bad); }
.text-btn:disabled, .primary:disabled { opacity: 0.5; cursor: not-allowed; }
input, select, textarea { min-height: 44px; }

.main { min-width: 0; min-height: 100vh; background: var(--paper); }
.content { width: 100%; max-width: none; margin: 0; padding: 28px clamp(20px, 2.4vw, 40px) 40px; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.top h1 { font-size: 24px; letter-spacing: -0.02em; }
.row, .filters, .form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-actions { margin-top: 20px; justify-content: flex-end; }
.filters { margin: 0 0 16px; }
.filters input, .filters select { width: 180px; min-width: 0; }

.control, input, select, textarea, .primary, .ghost, .danger, .login-submit {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
  line-height: 38px;
}
textarea { height: auto; min-height: 72px; padding: 8px 12px; line-height: 1.5; }
.drawer { width: min(440px, 100%); height: 100%; overflow-x: hidden; overflow-y: auto; }
.drawer input, .drawer select, .drawer textarea { width: 100%; }
.form-actions .primary, .form-actions .ghost { width: auto; }
.primary { background: var(--primary); color: #fff; border: 0; border-radius: 10px; font-weight: 650; }
.primary:hover { background: var(--primary-dark); }
.ghost { color: var(--text); border: 1px solid var(--input); background: #fff; border-radius: 10px; }
.ghost:hover { background: var(--hover); border-color: #b7c4d6; }
.danger { color: var(--bad); border: 1px solid #fecaca; background: #fff; }
.quiet, .icon-btn { color: var(--primary); border-color: transparent; background: transparent; padding: 6px; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: #fff; }
.icon-btn:hover { background: var(--hover); }
.icon-btn.danger { color: var(--bad); }

.banner { color: #92400e; background: var(--wait-bg); border: 0; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 22px 24px;
  margin-bottom: 16px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 10%, rgba(126, 200, 220, 0.28), transparent 26%),
    linear-gradient(135deg, #16365c, #0f2744 62%);
  box-shadow: var(--shadow);
}
.hero b {
  display: block;
  margin: 2px 0 4px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.hero span, .hero em { color: #c5d4e4; font-size: 13px; font-style: normal; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px 18px;
  overflow: hidden;
}
.card b { font-variant-numeric: tabular-nums; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.ledger { margin-bottom: 24px; overflow: hidden; }
.ledger-head, .line-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 12px;
  padding: 12px 16px;
  align-items: center;
}
.ledger-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: var(--stripe);
  border-bottom: 2px solid var(--line);
}
.line-row { border-bottom: 1px solid var(--line); font-size: 14px; }
.line-row:last-child { border-bottom: 0; }
.line-row:hover { background: var(--hover); }
.amt { text-align: right; font-variant-numeric: tabular-nums; }
.desk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 12px; }
.desk-head h1 { margin: 0 0 4px; font-size: 22px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.desk-cards { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.card-btn { width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.card-btn em { display: block; margin-top: 6px; color: var(--muted); font-style: normal; font-size: 13px; }
.card-btn:hover { border-color: #c5d5e6; background: #f8fbfe; }
.flags { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.flag { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid #f3d48a; border-radius: 999px; background: #fff8e8; color: #8a5a00; cursor: pointer; }
.flag b { font-variant-numeric: tabular-nums; }
.totals-block { margin-bottom: 16px; }
.totals-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.totals-head h2 { margin-bottom: 4px; }
.month-pick { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.month-pick select { width: 128px; height: 36px; }
.totals-hero { margin-bottom: 12px; }
.totals-cards { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
.m-main { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 8px; }
.m-main span { color: var(--text); }
.m-main b { font-variant-numeric: tabular-nums; font-size: 20px; letter-spacing: -0.03em; }
.desk-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr); gap: 14px; margin-bottom: 14px; }
.panel-block { padding: 16px; }
.panel-block h2, .desk-grid h2, .todo-block h2 { margin: 0 0 12px; font-size: 16px; }
.panel-block .ledger, .panel-block .empty { border: 0; box-shadow: none; border-radius: 0; margin: 0; padding: 0; background: transparent; }
.panel-block .ledger-head, .panel-block .line-row { background: transparent; }
.panel-block .ledger-head { border-bottom: 1px solid var(--line); }
.recent { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 2px 10px; width: 100%; margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--stripe); text-align: left; cursor: pointer; }
.recent i { grid-row: 1 / span 2; align-self: center; min-width: 36px; padding: 4px 0; border-radius: 8px; background: #e7f3f6; color: var(--primary-dark); font-style: normal; font-size: 12px; font-weight: 700; text-align: center; }
.recent b { font-variant-numeric: tabular-nums; font-size: 13px; }
.recent span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent em { grid-column: 3; grid-row: 1 / span 2; align-self: center; font-style: normal; font-variant-numeric: tabular-nums; font-weight: 700; }
.recent small { grid-column: 2; color: var(--muted); }
.recent:hover { background: #fff; border-color: #c5d5e6; }
.todo-block { margin-top: 4px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.todo-block .top { margin-bottom: 12px; }
.todo-block .empty { border: 0; box-shadow: none; padding: 8px 0 0; background: transparent; }
.todo {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
}
.todo b { font-variant-numeric: tabular-nums; }

.table-wrap { overflow: auto; max-height: calc(100vh - 196px); width: 100%; }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; font-weight: 400; }
th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  background: var(--stripe);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 2px solid var(--line);
}
td { height: 52px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.menu { position: relative; display: inline-block; }
.menu-list {
  position: fixed;
  z-index: 40;
  min-width: 148px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 4px;
}
.menu-list button {
  display: block;
  width: 100%;
  min-height: 40px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
}
.menu-list button:hover { background: var(--hover); }
.menu-list button.danger { color: var(--bad); }
th.act, td.act { width: 148px; text-align: right; white-space: nowrap; }
.act-row { display: inline-flex; gap: 8px; justify-content: flex-end; flex-wrap: nowrap; }
td.act .text-btn {
  box-sizing: border-box;
  width: 64px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0;
  line-height: 30px;
}
tbody tr:nth-child(even) { background: var(--stripe); }
tbody tr:hover { background: var(--hover); }
.status {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}
.status.ok { color: var(--ok); background: var(--ok-bg); }
.status.wait { color: var(--wait); background: var(--wait-bg); }
.status.bad { color: var(--bad); background: var(--bad-bg); }
.status.info { color: var(--info); background: var(--info-bg); }
.status.warn { color: var(--warn); background: var(--warn-bg); }
.empty { padding: 28px 20px; color: var(--muted); text-align: center; }

.drawer-back { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.4); display: flex; justify-content: flex-end; z-index: 30; }
.preview-back { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.72); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 16px; }
.preview { width: min(920px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: #fff; border-radius: 10px; overflow: hidden; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.preview-bar b { font-size: 15px; }
.preview-wait, .preview .error { padding: 28px 16px; color: var(--muted); }
.preview-img, .preview-frame { width: 100%; max-height: calc(100dvh - 96px); object-fit: contain; background: #111827; border: 0; }
.voucher-btn { display: block; width: 100%; margin: 0 0 10px; padding: 0; border: 0; background: #111827; border-radius: 8px; overflow: hidden; }
.voucher-thumb { display: block; width: 100%; max-height: 220px; object-fit: contain; }
.drawer { width: min(440px, 100%); height: 100%; max-height: none; padding: 24px; overflow-x: hidden; overflow-y: auto; border-radius: 0; }
@media (max-width: 1180px) {
  .desk-cards, .totals-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .desk-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  html, body { background: var(--paper); }
  body { font-size: 15px; -webkit-text-size-adjust: 100%; }
  .login-wrap { grid-template-columns: 1fr; min-height: 100dvh; }
  .login-side { display: none; }
  .login-main { padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); align-items: center; }
  .login-form { padding: 24px 18px; }
  .login-submit { min-height: 46px; height: 46px; }
  .shell {
    min-height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
  .mobile-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 1;
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: calc(48px + env(safe-area-inset-top));
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
    background: var(--side);
    color: #fff;
  }
  .mobile-bar b { font-size: 16px; }
  .mobile-bar span { color: var(--side-muted); font-size: 13px; margin-right: auto; }
  .mobile-bar .signout { color: #fff; min-height: 36px; }
  .rail {
    position: sticky;
    top: calc(48px + env(safe-area-inset-top));
    min-height: 0;
    height: auto;
    max-height: 52px;
    align-self: start;
    order: 2;
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 16;
    padding: 8px;
    background: var(--side);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .brand, .nav-label, .who, .mode-pill, .rail .spacer { display: none; }
  .login-side { display: none; }
  .mobile-bar .mark { width: 24px; height: 24px; font-size: 12px; }
  .nav-btn {
    width: auto;
    min-height: 36px;
    margin: 0 4px 0 0;
    padding: 0 12px;
    white-space: nowrap;
    line-height: 36px;
    flex: 0 0 auto;
  }
  .nav-btn.active { box-shadow: none; background: rgba(255, 255, 255, 0.14); }
  .main { order: 3; margin-left: 0; min-height: 0; background: var(--paper); }
  .content { padding: 12px 12px 20px; }
  .top { align-items: center; flex-direction: row; gap: 10px; margin-bottom: 10px; }
  .top h1 { font-size: 20px; }
  .top .primary, .top .row .primary { width: auto; min-height: 36px; height: 36px; padding: 0 12px; }
  .desk-head { margin-bottom: 8px; }
  .desk-head h1 { font-size: 20px; }
  .quick { display: flex; gap: 6px; overflow-x: auto; flex-wrap: nowrap; margin-bottom: 10px; scrollbar-width: none; }
  .quick::-webkit-scrollbar { display: none; }
  .quick .ghost { flex: 0 0 auto; height: 34px; min-height: 34px; padding: 0 12px; }
  .totals-block, .panel-block, .todo-block { padding: 12px; }
  .totals-head { align-items: center; margin-bottom: 8px; }
  .mode-pill { display: none; }
  .month-pick select { width: 112px; height: 34px; min-height: 34px; }
  .hero { padding: 14px 16px; margin-bottom: 10px; }
  .hero b { font-size: 30px; }
  .hero em { display: none; }
  .cards, .desk-cards, .totals-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
  .desk-cards .card-btn:last-child, .totals-cards .card-btn:last-child { grid-column: auto; }
  .card { padding: 12px; box-shadow: none; }
  .card b { font-size: 18px; }
  .card-btn em { margin-top: 2px; font-size: 12px; }
  .desk-grid { grid-template-columns: 1fr; gap: 10px; }
  .flags { margin-bottom: 10px; }
  .flag { height: 32px; }
  .recent { grid-template-columns: auto 1fr auto; }
  .recent small { grid-column: 2; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters input, .filters select { width: 100%; }
  .ledger { display: none; }
  .todo { grid-template-columns: 1fr; gap: 4px; }
  .todo .ghost { width: 100%; min-height: 44px; height: 44px; }
  .desk-only { display: none !important; }
  .phone-only { display: grid; gap: 10px; }
  .m-card { padding: 12px; box-shadow: none; }
  .m-card-top, .m-card .menu { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .m-card-top b { font-variant-numeric: tabular-nums; font-size: 15px; }
  .m-meta { color: var(--muted); font-size: 13px; margin-top: 6px; }
  .m-facts { display: grid; gap: 8px; margin: 12px 0 0; }
  .m-facts div { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: start; }
  .m-facts dt { color: var(--muted); font-size: 12px; }
  .m-facts dd { margin: 0; word-break: break-word; }
  .m-card .text-btn, .m-card .act-row .text-btn { min-height: 40px; height: 40px; }
  .m-card .act-row { margin-top: 12px; justify-content: flex-start; flex-wrap: wrap; }
  .m-card .act-row .text-btn { width: auto; padding: 0 12px; }
  .table-wrap { max-height: none; }
  .drawer-back { align-items: flex-end; }
  .drawer {
    width: 100%;
    height: auto;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .form-actions { display: grid; grid-template-columns: 1fr 1.4fr; }
  .form-actions .ghost, .form-actions .primary { width: 100%; min-height: 44px; height: 44px; }
  .drawer label { margin-top: 12px; }
  .drawer .note { line-height: 1.4; }
  .menu-list { min-width: min(220px, calc(100vw - 24px)); }
  input, select, textarea, .primary, .ghost { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
