:root {
  color-scheme: light;
  --ink: #18212b;
  --muted: #5f6b76;
  --line: #cdd4da;
  --line-strong: #9ba7b1;
  --canvas: #eef1f3;
  --surface: #ffffff;
  --surface-2: #f7f8f9;
  --navy: #17324d;
  --navy-2: #244e6f;
  --teal: #147d78;
  --teal-soft: #e5f3f1;
  --green: #2c704c;
  --green-soft: #e6f2eb;
  --amber: #a7650d;
  --amber-soft: #fff3dd;
  --red: #af3540;
  --red-soft: #fdecee;
  --blue-soft: #e9f0f7;
  --shadow: 0 4px 18px rgba(20, 35, 48, 0.09);
  font-family: "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, select, input { min-height: 38px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
a { color: var(--navy-2); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.loading-screen { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.login-page { min-height: 100vh; background: var(--surface); display: grid; grid-template-rows: auto 1fr auto; }
.login-header { background: var(--navy); color: white; padding: 28px max(24px, calc((100vw - 1120px) / 2)); border-bottom: 5px solid var(--teal); }
.login-header h1 { margin: 4px 0 0; font-size: 30px; line-height: 1.25; font-weight: 700; }
.login-header p { margin: 0; color: #d8e3ec; font-weight: 600; }
.login-content { width: min(1120px, calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); gap: 56px; align-items: center; padding: 56px 0; }
.login-intro h2 { margin: 0 0 14px; font-size: 26px; }
.login-intro p { max-width: 620px; margin: 0; color: var(--muted); font-size: 16px; }
.portal-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); }
.portal-button { min-height: 90px; padding: 14px 12px; background: var(--surface); border: 0; border-right: 1px solid var(--line-strong); color: var(--ink); font-weight: 700; }
.portal-button:last-child { border-right: 0; }
.portal-button:hover, .portal-button.active { background: var(--blue-soft); color: var(--navy); box-shadow: inset 0 -4px 0 var(--navy-2); }
.portal-code { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.login-panel { border: 1px solid var(--line); box-shadow: var(--shadow); padding: 28px; border-radius: 6px; background: var(--surface); }
.login-panel h2 { margin: 0 0 20px; font-size: 20px; }
.form-stack { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 4px; background: white; color: var(--ink); padding: 9px 10px; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(20, 125, 120, 0.16); border-color: var(--teal); }
.login-hint { padding: 11px 12px; background: var(--surface-2); border-left: 3px solid var(--teal); color: var(--muted); font-size: 13px; }
.form-help { color: var(--muted); font-size: 12px; }
.login-error { color: var(--red); min-height: 21px; font-weight: 600; }
.login-footer { border-top: 1px solid var(--line); padding: 18px; text-align: center; color: var(--muted); font-size: 12px; }

.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); padding: 8px 14px; font-weight: 700; text-decoration: none; }
.button:hover { background: var(--surface-2); }
.button.primary { background: var(--navy); border-color: var(--navy); color: white; }
.button.primary:hover { background: var(--navy-2); }
.button.success { background: var(--green); border-color: var(--green); color: white; }
.button.danger { background: var(--red); border-color: var(--red); color: white; }
.button.warning { background: var(--amber); border-color: var(--amber); color: white; }
.button.small { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.button.full { width: 100%; }
.button-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.button-row.spaced { margin-top: 16px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--navy); color: white; display: flex; flex-direction: column; }
.brand { padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,0.18); }
.brand strong { display: block; font-size: 17px; }
.brand span { color: #c4d4df; font-size: 12px; }
.nav { display: grid; gap: 2px; padding: 14px 10px; }
.nav button { border: 0; border-radius: 4px; background: transparent; color: #d9e4ec; text-align: left; padding: 10px 12px; font-weight: 600; }
.nav button:hover, .nav button.active { background: rgba(255,255,255,0.13); color: white; }
.sidebar-user { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,0.18); }
.sidebar-user strong, .sidebar-user span { display: block; }
.sidebar-user span { margin-top: 2px; color: #c4d4df; font-size: 12px; }
.account-actions { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 12px; }
.account-actions button { width: 100%; min-height: 34px; padding: 6px 8px; background: transparent; border: 1px solid rgba(255,255,255,0.38); color: white; border-radius: 4px; font-weight: 600; }
.account-actions button:hover { background: rgba(255,255,255,0.1); }

.main { min-width: 0; }
.topbar { min-height: 70px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 15px 24px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.topbar h1 { margin: 0; font-size: 21px; }
.connection { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.connection-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.connection.saving .connection-dot { background: var(--amber); }
.connection.error .connection-dot { background: var(--red); }
.content { padding: 24px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.page-heading h2 { margin: 0; font-size: 20px; }
.page-heading p { margin: 4px 0 0; color: var(--muted); }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); background: var(--surface); border: 1px solid var(--line); margin-bottom: 22px; }
.metric { padding: 16px 18px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric strong { display: block; margin-top: 3px; font-size: 25px; }
.metric.alert strong { color: var(--red); }

.section { margin-bottom: 24px; }
.section-header { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 10px; }
.section-header h3 { margin: 0; font-size: 16px; }
.table-frame { background: var(--surface); border: 1px solid var(--line); overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { background: var(--surface-2); color: #394753; font-size: 12px; white-space: nowrap; }
.data-table tbody tr:hover { background: #f8fafb; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.empty-state { padding: 34px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.submitted, .badge.reviewing { background: var(--blue-soft); border-color: #a9bfd2; color: var(--navy-2); }
.badge.returned { background: var(--red-soft); border-color: #e2a7ac; color: var(--red); }
.badge.approved, .badge.excel_exported, .badge.shipper_submitted { background: var(--green-soft); border-color: #a6cab4; color: var(--green); }
.badge.inactive { background: #eceff1; border-color: #c4cbd1; color: #59646d; }
.badge.delivery-sent, .badge.backup-succeeded { background: var(--green-soft); border-color: #a6cab4; color: var(--green); }
.badge.delivery-failed, .badge.backup-failed { background: var(--red-soft); border-color: #e2a7ac; color: var(--red); }
.badge.delivery-disabled, .badge.delivery-skipped, .badge.backup-running { background: var(--amber-soft); border-color: #dfbd83; color: #6e4a18; }
.segmented-control { display: inline-flex; max-width: 100%; margin-bottom: 12px; border: 1px solid var(--line-strong); overflow-x: auto; background: var(--surface); }
.segmented-control button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 14px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--muted); font-weight: 700; white-space: nowrap; }
.segmented-control button:last-child { border-right: 0; }
.segmented-control button.active { background: var(--navy); color: white; }
.segmented-control button span { min-width: 22px; padding: 1px 5px; border-radius: 3px; background: var(--surface-2); color: var(--ink); font-size: 11px; text-align: center; }
.operation-note { margin-bottom: 10px; padding: 10px 12px; border-left: 3px solid var(--teal); background: var(--teal-soft); color: #285b58; font-size: 12px; }
.hash-cell { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
.comment-count { display: block; margin-top: 3px; color: var(--red); font-weight: 700; }
.notice-list { display: grid; background: var(--surface); border: 1px solid var(--line); }
.notice-item { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notice-item:last-child { border-bottom: 0; }
.notice-item strong { display: block; }
.notice-item time { color: var(--muted); font-size: 12px; }

.month-toolbar { background: var(--surface); border: 1px solid var(--line); padding: 12px; margin-bottom: 10px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.toolbar-fields { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.compact-field { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; }
.compact-field select, .compact-field input { border: 1px solid var(--line-strong); border-radius: 4px; padding: 6px 8px; background: white; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line); border-bottom: 0; color: var(--muted); font-size: 12px; }
.legend strong { color: var(--ink); }
.month-frame { position: relative; height: calc(100vh - 250px); min-height: 430px; overflow: auto; background: white; border: 1px solid var(--line-strong); }
.month-grid { table-layout: fixed; width: 2728px; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.month-grid col.date-column { width: 70px; }
.month-grid col.entry-column { width: 62px; }
.month-grid th, .month-grid td { width: 62px; min-width: 62px; height: 42px; padding: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.month-grid thead th { position: sticky; z-index: 5; color: white; font-size: 11px; font-weight: 700; }
.month-grid .group-header { top: 0; width: auto; min-width: 0; height: 40px; background: var(--navy); font-size: 13px; }
.month-grid .group-header.work { background: var(--teal); }
.month-grid .role-header { top: 40px; height: 48px; background: #31526d; writing-mode: horizontal-tb; line-height: 1.15; }
.month-grid .role-header.work { background: #2d7773; }
.month-grid .date-header { position: sticky; left: 0; top: 0; width: 70px; min-width: 70px; z-index: 9; background: #10293f; }
.month-grid .date-cell { position: sticky; left: 0; z-index: 4; width: 70px; min-width: 70px; background: #f3f5f6; border-right: 2px solid var(--line-strong); font-weight: 700; }
.month-grid tr.week-start .date-cell, .month-grid tr.week-start td { border-top: 2px solid var(--navy-2); }
.month-grid tr.selected-period .date-cell { box-shadow: inset 4px 0 0 var(--teal); background: var(--teal-soft); }
.month-grid tr.selected-period .grid-cell:not(.locked):not(.returned):not(.value-cross) { background: #f2f9f8; }
.month-grid tr.outside td { background: #eceff1; color: #8c959c; }
.grid-cell { width: 100%; height: 100%; border: 0; border-radius: 0; background: white; color: var(--ink); padding: 2px; font-weight: 600; }
.grid-cell:hover:not(:disabled), .grid-cell:focus-visible { outline: 3px solid rgba(20,125,120,0.28); outline-offset: -3px; background: var(--teal-soft); }
.grid-cell.locked { background: #f1f4f6; color: #5f6b76; }
.grid-cell.returned { background: var(--red-soft); color: var(--red); box-shadow: inset 0 0 0 2px #db7e86; }
.grid-cell.selected { background: var(--amber-soft); box-shadow: inset 0 0 0 2px var(--amber); }
.grid-cell.value-cross { background: var(--red-soft); color: var(--red); }
.grid-cell.value-dash { color: #77828b; }
.period-band { display: flex; gap: 7px; flex-wrap: wrap; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-top: 0; }
.period-item { display: inline-flex; gap: 7px; align-items: center; padding-right: 9px; border-right: 1px solid var(--line); font-size: 12px; }

.review-panel { margin-bottom: 10px; border: 1px solid #d3a45b; background: var(--amber-soft); }
.review-bar { padding: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.review-bar .field { flex: 1; min-width: 220px; }
.review-meta { display: flex; gap: 5px 14px; flex: 1; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.review-guidance { margin: 0; padding: 0 12px 12px; color: #6e4a18; font-size: 12px; }
.return-form { border-top: 1px solid #dfbd83; padding: 12px; background: #fffaf0; }
.return-form-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.review-target-list { display: grid; gap: 8px; }
.review-target { display: grid; grid-template-columns: minmax(190px, 0.7fr) minmax(260px, 1.3fr) 38px; gap: 8px; align-items: center; font-weight: 700; }
.review-target textarea { width: 100%; min-height: 56px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 4px; padding: 8px 10px; background: white; }
.return-form-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.workflow-history { margin-top: 16px; padding-top: 15px; border-top: 2px solid var(--line-strong); }
.workflow-history .section-header > span { color: var(--muted); font-size: 12px; }
.workflow-timeline { margin: 0; padding: 0; list-style: none; background: var(--surface); border: 1px solid var(--line); }
.workflow-timeline li { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.workflow-timeline li:last-child { border-bottom: 0; }
.workflow-marker { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.workflow-timeline li > div { display: grid; grid-template-columns: minmax(80px, auto) minmax(0, 1fr) auto; gap: 8px 14px; align-items: baseline; }
.workflow-timeline small, .comment-history-item small { color: var(--muted); }
.comment-history { margin-top: 12px; }
.comment-history h4 { margin: 0 0 7px; font-size: 14px; }
.comment-history-item { display: grid; grid-template-columns: auto minmax(180px, 0.7fr) minmax(240px, 1fr) auto; gap: 8px 12px; align-items: center; padding: 9px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.comment-history-item:first-of-type { border-top: 1px solid var(--line); }
.empty-state.compact { padding: 16px; }
.export-list { margin-top: 12px; }
.latest-label { display: block; margin-top: 3px; color: var(--teal); font-weight: 700; }
.export-file-name { display: block; min-width: 260px; overflow-wrap: anywhere; }
.export-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.export-targets { display: grid; gap: 3px; min-width: 210px; font-size: 12px; }
.export-preview-file { padding: 12px; border: 1px solid var(--line); background: var(--surface-2); overflow-wrap: anywhere; }
.export-preview-file strong, .export-preview-file span { display: block; }
.export-preview-file span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.export-preview-targets { border: 1px solid var(--line); }
.export-preview-targets > strong { display: block; padding: 9px 11px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.export-preview-targets > div { display: grid; grid-template-columns: minmax(190px, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 11px; border-bottom: 1px solid var(--line); }
.export-preview-targets > div:last-child { border-bottom: 0; }

.modal-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(15, 27, 38, 0.48); display: grid; place-items: center; padding: 20px; }
.modal { width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: white; border-radius: 6px; box-shadow: 0 18px 56px rgba(0,0,0,0.22); }
.modal.wide { width: min(720px, 100%); }
.modal-header { padding: 17px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.modal-header h3 { margin: 0; font-size: 17px; }
.icon-button { width: 38px; min-width: 38px; border: 1px solid var(--line); background: white; border-radius: 4px; font-size: 20px; line-height: 1; }
.modal-body { padding: 18px; }
.modal-footer { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-strong); }
.choice-grid button { border: 0; border-right: 1px solid var(--line-strong); background: white; min-height: 58px; font-size: 20px; font-weight: 700; }
.choice-grid button:last-child { border-right: 0; }
.choice-grid button.active { background: var(--teal-soft); color: var(--teal); box-shadow: inset 0 -3px 0 var(--teal); }
.time-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.checkbox-field { display: inline-flex; align-items: center; gap: 8px; width: fit-content; font-weight: 700; }
.checkbox-field input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--teal); }
.section-title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.master-target { display: flex; justify-content: space-between; gap: 14px; padding: 11px 12px; background: var(--surface-2); border-left: 3px solid var(--teal); }
.master-target span { color: var(--muted); }
.submission-period { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; background: var(--surface-2); border-left: 3px solid var(--navy-2); }
.submission-period span { color: var(--muted); }
.autofill-summary { padding: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.autofill-summary strong { display: block; margin-bottom: 7px; }
.autofill-summary div { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 12px; }
.error-list, .warning-list { margin: 0; padding-left: 20px; max-height: 220px; overflow: auto; }
.error-box, .warning-box { padding: 12px; margin-bottom: 12px; border-left: 4px solid; }
.error-box { background: var(--red-soft); border-color: var(--red); }
.warning-box { background: var(--amber-soft); border-color: var(--amber); }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: grid; gap: 8px; width: min(360px, calc(100% - 36px)); }
.toast { background: #17242f; color: white; padding: 12px 14px; border-radius: 4px; box-shadow: var(--shadow); }
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }

@media (max-width: 980px) {
  .login-content { grid-template-columns: 1fr; gap: 30px; align-items: start; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .brand { padding: 14px 16px; }
  .nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding: 8px; }
  .sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
  .sidebar-user span { margin: 0; }
  .account-actions { display: flex; margin: 0 0 0 auto; }
  .account-actions button { width: auto; padding: 6px 10px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .month-frame { height: calc(100vh - 300px); }
}

@media (max-width: 620px) {
  .login-header { padding: 22px 20px; }
  .login-header h1 { font-size: 24px; }
  .login-content { width: min(100% - 28px, 1120px); padding: 32px 0; }
  .portal-grid { grid-template-columns: 1fr; }
  .portal-button { min-height: 64px; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .portal-button:last-child { border-bottom: 0; }
  .login-panel { padding: 20px; }
  .topbar { padding: 12px 14px; min-height: 58px; }
  .sidebar-user { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .account-actions { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
  .account-actions button { width: 100%; }
  .topbar h1 { font-size: 18px; }
  .content { padding: 14px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: 12px; }
  .metric strong { font-size: 21px; }
  .month-toolbar { align-items: stretch; }
  .toolbar-fields, .toolbar-actions { width: 100%; }
  .compact-field { flex: 1; }
  .compact-field select { min-width: 0; width: 100%; }
  .toolbar-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .toolbar-actions .compact-field { width: 100%; }
  .toolbar-actions .button { width: 100%; }
  .month-frame { height: calc(100vh - 360px); min-height: 390px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 78vh; border-radius: 6px 6px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .choice-grid button { min-height: 64px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .master-target { display: grid; gap: 2px; }
  .submission-period { display: grid; gap: 2px; }
  .review-bar { align-items: stretch; }
  .review-meta { flex-basis: 100%; }
  .review-target { grid-template-columns: minmax(0, 1fr) 38px; }
  .review-target span, .review-target textarea { grid-column: 1; }
  .review-target .icon-button { grid-column: 2; grid-row: 1; }
  .workflow-timeline li > div { grid-template-columns: 1fr; gap: 2px; }
  .comment-history-item { grid-template-columns: auto 1fr; }
  .comment-history-item > span:not(.badge), .comment-history-item small { grid-column: 1 / -1; }
  .export-preview-targets > div { grid-template-columns: 1fr auto; }
  .export-preview-targets > div .badge { grid-column: 1 / -1; width: fit-content; }
  .segmented-control { display: flex; width: 100%; }
  .segmented-control button { flex: 1 0 auto; justify-content: center; }
  .toast-region { right: 12px; bottom: 12px; width: calc(100% - 24px); }
}
