:root {
  --bg: #f6f5f0;
  --surface: #fffefa;
  --white: #fff;
  --ink: #243d37;
  --muted: #69756e;
  --teal: #17544b;
  --teal-dark: #123e37;
  --tint: #e9efdf;
  --line: #e3e6dc;
  --sand: #eee9dd;
  --amber: #8b6224;
  --amber-bg: #faf0d8;
  --danger: #a34434;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(32, 53, 42, 0.04);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans TC",
    sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.58;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b17c3a;
}
a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  border: 0;
  background: none;
}
button svg,
a svg {
  flex-shrink: 0;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3,
h4 {
  font-weight: 550;
  line-height: 1.25;
}
h1 {
  font-family: Georgia, "Noto Serif TC", serif;
  font-size: 40px;
  letter-spacing: -1.25px;
  font-weight: 400;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.45px;
}
h3 {
  font-size: 16px;
  letter-spacing: -0.2px;
}
small {
  font-size: 12px;
}
svg {
  display: block;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.75px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
}
.text-link {
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--teal-dark);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -1.2px;
}
.brand-mark {
  font-size: 34px;
  line-height: 1;
  color: var(--teal);
}
.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 226px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 32px 18px 20px 22px;
  background: #f0f0e9;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 34px;
}
.sidebar .brand {
  padding: 0 12px;
}
.sidebar-caption {
  margin: 0 12px 12px;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.6px;
  font-weight: 650;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 9px;
  color: #6a746d;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.nav a:hover {
  background: #e7eadf;
}
.nav a.active {
  background: var(--teal);
  color: white;
}
.nav-badge {
  margin-left: auto;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.17);
  border-radius: 20px;
  padding: 1px 6px;
}
.sidebar-note {
  margin-top: auto;
  padding: 15px 12px;
  border: 1px solid #dce1d3;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.6;
  color: #697669;
}
.sidebar-note .icon {
  width: 16px;
  margin-bottom: 8px;
  color: var(--teal);
}
.sidebar-bottom {
  display: flex;
  gap: 9px;
  padding: 0 10px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.sidebar-bottom .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a9bca1;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.35);
}
.breadcrumb {
  font-size: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.language {
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  padding: 2px;
  background: var(--surface);
}
.language button {
  font-size: 10px;
  padding: 5px 7px;
  border-radius: 4px;
}
.language button.active {
  background: #e6ebdf;
  color: var(--teal);
  font-weight: 650;
}
.profile-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  padding: 0;
}
.avatar {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  background: #e1e7d5;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 16px;
  color: var(--teal);
}
.profile-chip small {
  display: block;
  line-height: 1.3;
  font-size: 10px;
  color: var(--muted);
}
.profile-chip strong {
  font-size: 12px;
  font-weight: 600;
}
main {
  padding: 34px 42px 28px;
  max-width: 1550px;
  margin: auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.page-head p {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  min-height: 40px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:hover {
  text-decoration: none;
  filter: brightness(0.97);
}
.btn.primary {
  background: var(--teal);
  color: #fff;
}
.btn.secondary {
  background: var(--surface);
  border-color: #d9dfd2;
  color: var(--ink);
}
.btn.ghost {
  color: var(--teal);
  border-color: var(--line);
}
.btn.danger {
  color: var(--danger);
  border-color: #e9cec7;
  background: #fff9f6;
}
.btn.small {
  padding: 7px 11px;
  min-height: 34px;
  font-size: 11px;
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.button-row {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.synthetic-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e4dfcb;
  background: #f0eee2;
  border-radius: 8px;
  color: #786e4d;
  padding: 8px 12px;
  font-size: 10px;
  margin-bottom: 22px;
}
.synthetic-banner .icon {
  width: 14px;
  height: 14px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 15px 18px;
  border-radius: 12px;
}
.stat-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: #eff1e8;
  border-radius: 10px;
  color: var(--teal);
}
.stat strong {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}
.stat span {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
.stat .stat-hint {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.93fr) minmax(380px, 1.1fr);
  gap: 22px;
  align-items: start;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  padding: 22px 23px 16px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.panel-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.panel-head h2 {
  font-size: 17px;
}
.panel-body {
  padding: 0 23px 23px;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 25px;
  padding: 0 23px;
}
.tabs button {
  padding: 12px 0;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  position: relative;
  bottom: -1px;
}
.tabs button.active {
  border-bottom-color: var(--teal);
  color: var(--teal);
  font-weight: 650;
}
.body-area {
  position: relative;
  min-height: 391px;
  background: radial-gradient(
    ellipse at 50% 53%,
    #ecf0e5 0%,
    #f8f9f2 42%,
    #fffefa 72%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 30px 6px;
}
.body-art {
  width: 230px;
  height: 360px;
}
.body-art .body-region {
  fill: #e1e8d9;
  stroke: #fafbf6;
  stroke-width: 2;
  transition: fill 0.16s;
  cursor: pointer;
}
.body-art .body-region:hover {
  fill: #bacdb5;
}
.body-art .body-region.selected {
  fill: #91b3a0;
  stroke: #226151;
  stroke-width: 1.5;
}
.body-art .body-region:focus {
  stroke: #ad782e;
  stroke-width: 3;
  outline: none;
}
.body-art .body-outline {
  fill: none;
  stroke: #bbcbb5;
  stroke-width: 0.9;
  pointer-events: none;
}
.body-art text {
  font: 8px sans-serif;
  fill: #7a8a78;
  pointer-events: none;
}
.body-label {
  position: absolute;
  font-size: 9px;
  color: #899184;
  top: 190px;
}
.body-label.left {
  left: 31px;
}
.body-label.right {
  right: 31px;
}
.body-legend {
  position: absolute;
  left: 23px;
  bottom: 19px;
  font-size: 9px;
  color: var(--muted);
  display: flex;
  gap: 5px;
  align-items: center;
}
.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #789c83;
}
.body-view-toggle {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  padding: 3px;
  background: #ecefe4;
  border-radius: 6px;
  z-index: 1;
}
.body-view-toggle button {
  padding: 4px 12px;
  font-size: 9px;
  border-radius: 4px;
  color: var(--muted);
}
.body-view-toggle button.active {
  background: #fffefa;
  color: var(--teal);
  box-shadow: 0 1px 3px #00000009;
}
.body-foot {
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.body-foot strong {
  font-size: 12px;
  font-weight: 600;
}
.body-foot span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.body-foot .btn {
  font-size: 10px;
}
.region-menu {
  padding: 20px;
  min-height: 391px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-content: start;
}
.region-menu button {
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
  min-height: 41px;
}
.region-menu button.active {
  background: var(--tint);
  border-color: #b7c6a8;
  color: var(--teal);
}
.region-menu button span {
  font-size: 10px;
  color: var(--muted);
}
.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.history-head h2 {
  font-size: 17px;
}
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  min-width: 21px;
  height: 21px;
  padding: 0 7px;
  font-size: 10px;
  background: #e5ebdb;
  color: var(--teal);
  margin-left: 7px;
  vertical-align: middle;
}
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.search-field .icon {
  position: absolute;
  left: 13px;
  width: 16px;
  color: #8b9385;
}
.search-field input {
  width: 100%;
  padding: 10px 13px 10px 39px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 11px;
  min-height: 40px;
}
.search-field input::placeholder {
  color: #979d91;
}
.record-list {
  display: grid;
  gap: 12px;
}
.record-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 17px 18px;
  transition: border-color 0.15s;
  position: relative;
}
.record-card:hover {
  border-color: #b7c7af;
}
.record-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.record-type {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 0.25px;
  color: var(--muted);
}
.record-type .icon {
  width: 14px;
  height: 14px;
}
.record-date {
  font-size: 10px;
  color: #73806e;
  white-space: nowrap;
}
.record-card h3 {
  font-size: 15px;
  margin: 10px 0 7px;
  line-height: 1.4;
}
.record-card .summary {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.record-card .original-title {
  font-size: 12px;
  color: #6f7d68;
  margin: -2px 0 7px;
}
.record-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 9px;
  color: var(--muted);
}
.record-meta .separator {
  color: #bbc1b4;
  margin: 0 2px;
}
.pill {
  font-size: 9px;
  line-height: 1.3;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 7px;
  border-radius: 5px;
  background: #edf1e5;
  color: #5c7155;
}
.pill.uncertain {
  background: var(--amber-bg);
  color: var(--amber);
}
.pill.neutral {
  background: #f0f0e9;
  color: #777e70;
}
.pill .icon {
  width: 10px;
  height: 10px;
}
.record-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #edf0e7;
  gap: 8px;
}
.record-bottom .text-link {
  font-size: 10px;
}
.source-mini {
  font-size: 9px;
  color: #85917b;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}
.source-mini .icon {
  width: 12px;
  height: 12px;
}
.source-mini span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 175px;
}
.source-note {
  display: flex;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 16px;
  align-items: flex-start;
}
.source-note .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.bottom-callout {
  margin-top: 24px;
  padding: 22px 25px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #e9eddf;
  border: 1px solid #dfe5d4;
  border-radius: 13px;
}
.callout-icon {
  padding: 13px;
  border: 1px solid #ccd9bd;
  border-radius: 50%;
  color: var(--teal);
}
.bottom-callout h3 {
  font-size: 14px;
}
.bottom-callout p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.bottom-callout .btn {
  margin-left: auto;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #919888;
  margin-top: 24px;
  gap: 20px;
}
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-bar select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 38px;
  font-size: 11px;
  padding: 7px 26px 7px 11px;
  max-width: 190px;
}
.filter-bar .search-field {
  flex: 1;
  min-width: 190px;
  margin: 0;
}
.filter-bar .search-field input {
  min-height: 38px;
}
.view-toolbar {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.view-toolbar p {
  font-size: 11px;
  color: var(--muted);
}
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline:before {
  content: "";
  position: absolute;
  left: 6px;
  top: 9px;
  bottom: 25px;
  width: 1px;
  background: #d7dfcd;
}
.timeline-month {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 24px 0 13px;
  position: relative;
}
.timeline-month:before {
  content: "";
  position: absolute;
  left: -26px;
  top: 5px;
  background: #bccdb3;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  outline: 1px solid #c6d0bd;
}
.timeline .record-card {
  max-width: 900px;
}
.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.document-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 13px;
  overflow: hidden;
}
.document-preview {
  height: 135px;
  background: #eeeee5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.paper-mini {
  background: #fffefa;
  width: 92px;
  height: 113px;
  box-shadow: 0 3px 9px #183a2810;
  border: 1px solid #e5e5d9;
  border-radius: 2px;
  padding: 14px 11px;
  transform: rotate(-3deg);
}
.paper-mini .paper-title {
  font-size: 5px;
  font-weight: 700;
  margin-bottom: 7px;
  max-height: 20px;
  overflow: hidden;
}
.paper-line {
  height: 2px;
  background: #dde2d3;
  margin: 5px 0;
}
.paper-line.short {
  width: 70%;
}
.paper-stamp {
  font-size: 6px;
  border: 1px solid #c6d3b8;
  padding: 3px;
  color: #7b8c70;
  margin-top: 10px;
  width: fit-content;
}
.document-content {
  padding: 17px;
}
.document-content h3 {
  font-size: 13px;
  overflow-wrap: anywhere;
  line-height: 1.5;
  margin-bottom: 7px;
}
.document-content p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.document-content .button-row {
  margin-top: 13px;
}
.document-content .btn {
  font-size: 10px;
  flex: 1;
}
.drop-zone {
  border: 1px dashed #b3c2a9;
  border-radius: 13px;
  background: #eff2e7;
  padding: 23px;
  text-align: center;
  margin-bottom: 22px;
}
.drop-zone.dragging {
  background: #dce8d3;
  border-color: var(--teal);
}
.drop-zone .icon {
  margin: 0 auto 9px;
  width: 24px;
  height: 24px;
  color: #6c8560;
}
.drop-zone p {
  font-size: 12px;
}
.drop-zone small {
  display: block;
  color: var(--muted);
  margin: 5px 0 10px;
}
.treatment-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.treatment-tabs button {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 9px 17px;
  font-size: 11px;
  background: var(--surface);
}
.treatment-tabs button.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}
.treatment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.treatment-card {
  padding: 22px;
}
.treatment-card h3 {
  font-size: 18px;
  margin: 12px 0 6px;
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  margin: 19px 0;
}
.info-grid dt {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.65px;
  color: var(--muted);
  margin-bottom: 5px;
}
.info-grid dd {
  margin: 0;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.original-block {
  padding: 13px;
  background: #f1f3eb;
  border-radius: 8px;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.8;
  margin: 11px 0;
}
.original-block small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 4px;
}
.ingredients {
  border-top: 1px solid var(--line);
  margin: 16px 0;
}
.ingredient {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
}
.ingredient span:last-child {
  white-space: nowrap;
  color: var(--muted);
}
.info-note {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eeefe7;
  margin-bottom: 18px;
}
.info-note .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.empty-state {
  padding: 48px 28px;
  text-align: center;
  border: 1px dashed #d1dac5;
  border-radius: 13px;
  background: #f9faf4;
}
.empty-state .icon {
  margin: 0 auto 17px;
  width: 31px;
  height: 31px;
  color: #839b75;
}
.empty-state h3 {
  font-size: 18px;
  margin-bottom: 9px;
}
.empty-state p {
  font-size: 12px;
  color: var(--muted);
  max-width: 360px;
  margin: 0 auto 20px;
}
.empty-state .button-row {
  justify-content: center;
}
.error-state {
  padding: 20px;
  border: 1px solid #e9d2c5;
  background: #fff6ef;
  border-radius: 12px;
  color: #8b4c36;
}
.error-state p {
  font-size: 12px;
  margin: 8px 0 12px;
}
.loading {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}
.spinner {
  display: inline-block;
  width: 19px;
  height: 19px;
  border: 2px solid #cdd7c4;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 9px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.review-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}
.review-top h1 {
  font-size: 30px;
  margin-top: 12px;
}
.review-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(370px, 1.05fr);
  gap: 22px;
  align-items: start;
}
.source-panel {
  position: sticky;
  top: 20px;
}
.source-panel iframe {
  width: 100%;
  height: 660px;
  border: 0;
  display: block;
  background: #f1f1e9;
}
.source-panel .source-text {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
  padding: 22px;
  max-height: 650px;
  overflow: auto;
  background: #fafaf5;
  font-family: Georgia, "Noto Serif TC", serif;
}
.source-panel img {
  width: 100%;
  display: block;
}
.source-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
}
.review-form {
  padding: 22px;
}
.form-section {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.form-section h3 {
  font-size: 13px;
  margin-bottom: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-no {
  font-size: 9px;
  width: 20px;
  height: 20px;
  border: 1px solid #cbd7be;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--teal);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  margin-bottom: 14px;
  min-width: 0;
}
.form-grid .field {
  margin-bottom: 0;
}
.field.full {
  grid-column: 1/-1;
}
.field label {
  font-size: 10px;
  font-weight: 600;
  color: #61735a;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #dce3d3;
  background: #fffefa;
  border-radius: 7px;
  padding: 9px 10px;
  font-size: 12px;
  min-height: 39px;
}
.field textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.7;
}
.field small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.checkbox-group {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.check-pill {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f9faf5;
}
.check-pill input {
  accent-color: var(--teal);
  margin: 0;
  width: 13px;
  height: 13px;
}
.field-hint {
  font-size: 10px;
  color: var(--muted);
  margin: 7px 0 14px;
}
.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 3px;
}
.review-mobile-tabs {
  display: none;
}
.warning {
  background: var(--amber-bg);
  color: var(--amber);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.warning strong {
  font-weight: 650;
}
.history-log {
  margin-top: 17px;
  font-size: 10px;
  color: var(--muted);
}
.history-log summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--teal);
}
.history-log ul {
  padding-left: 17px;
}
.packet-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.packet-form {
  padding: 24px;
}
.packet-record {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.packet-record input {
  margin-top: 4px;
  accent-color: var(--teal);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.packet-record strong {
  font-size: 12px;
  font-weight: 550;
  display: block;
}
.packet-record small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.packet-preview {
  background: #fffefa;
  padding: 30px;
  min-height: 520px;
}
.packet-preview .packet-wordmark {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 24px;
}
.packet-preview h2 {
  font:
    30px Georgia,
    serif;
  color: var(--teal);
  margin-bottom: 6px;
}
.packet-preview h3 {
  font-size: 13px;
  margin: 24px 0 12px;
}
.packet-preview .packet-event {
  font-size: 11px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.packet-preview .packet-event strong {
  display: block;
  margin-bottom: 4px;
}
.packet-preview .packet-event p {
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.7;
}
.packet-preview .packet-footer {
  font-size: 9px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 26px;
}
.packet-output {
  margin-top: 20px;
  padding: 17px;
  background: #e8efdd;
  border: 1px solid #d3dfc6;
  border-radius: 10px;
}
.packet-output h3 {
  font-size: 14px;
  margin-bottom: 7px;
}
.packet-output p {
  font-size: 11px;
  margin-bottom: 12px;
  color: var(--muted);
}
.saved-packets {
  margin-top: 24px;
}
.saved-packet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.saved-packet strong {
  font-size: 12px;
}
.saved-packet small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.settings-grid .panel {
  padding: 24px;
}
.settings-grid h2 {
  margin-bottom: 14px;
  font-size: 17px;
}
.settings-grid p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 18px;
}
.profile-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  padding: 14px;
  margin: 10px 0;
  border-radius: 9px;
  text-align: left;
}
.profile-option strong {
  font-size: 12px;
}
.profile-option small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.profile-option.current {
  border-color: #9cb88c;
  background: #f1f5e9;
}
.welcome {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.04fr 1fr;
}
.welcome-art {
  background: var(--teal-dark);
  padding: 50px 70px;
  color: #f5f5e8;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.welcome-art .brand,
.welcome-art .brand-mark {
  color: #edf1d9;
}
.welcome-art h1 {
  font-size: 59px;
  line-height: 1.12;
  max-width: 460px;
  margin-top: 90px;
  color: #f5f4e8;
}
.welcome-art p {
  font-size: 14px;
  line-height: 1.8;
  color: #b8c7b2;
  max-width: 390px;
  margin-top: 25px;
}
.welcome-art .welcome-lines {
  width: 290px;
  height: 290px;
  border-radius: 50%;
  border: 1px solid #69897655;
  position: absolute;
  bottom: -110px;
  right: -40px;
  box-shadow:
    0 0 0 45px #69897618,
    0 0 0 90px #69897613,
    0 0 0 135px #6989760e;
}
.welcome-art .eyebrow {
  color: #aac2a2;
  margin-top: auto;
  padding-top: 65px;
}
.welcome-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
}
.welcome-inner {
  max-width: 370px;
  width: 100%;
}
.welcome-inner h2 {
  font:
    34px Georgia,
    serif;
  margin-bottom: 12px;
}
.welcome-inner > p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.8;
}
.welcome-inner .profile-option {
  padding: 17px;
  background: var(--surface);
}
.welcome-inner .profile-option .icon {
  margin-left: auto;
}
.welcome-notice {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.boot {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 15px;
}
.boot p {
  color: var(--muted);
  font-size: 12px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #1a332c70;
  backdrop-filter: blur(3px);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
}
.modal {
  background: var(--surface);
  padding: 26px;
  max-width: 530px;
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 20px 80px #12382b30;
  max-height: 90vh;
  overflow: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal h2 {
  font-size: 22px;
}
.icon-button {
  padding: 7px;
  border-radius: 7px;
  border: 1px solid var(--line);
  min-width: 34px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 18px;
}
.modal .form-grid {
  margin-bottom: 18px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  box-shadow: 0 8px 30px #15352925;
  border-radius: 10px;
  max-width: calc(100% - 30px);
  background: var(--teal-dark);
  color: white;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 99;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.skip-link {
  position: fixed;
  left: 15px;
  top: -60px;
  z-index: 100;
  padding: 10px;
  background: var(--teal);
  color: white;
}
.skip-link:focus {
  top: 12px;
}
.mobile-brand {
  display: none;
}
.mobile-nav {
  display: none;
}
.inline-error {
  color: var(--danger);
  background: #fff1ec;
  border: 1px solid #e9cfc5;
  padding: 12px;
  border-radius: 7px;
  font-size: 12px;
  margin-bottom: 15px;
}
.busy-indicator {
  position: fixed;
  top: 0;
  height: 3px;
  background: var(--teal);
  width: 100%;
  z-index: 90;
  animation: busy 1s ease-in-out infinite;
}
@keyframes busy {
  50% {
    opacity: 0.3;
  }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.directions-link {
  font-size: 10px;
  margin-top: 16px;
  display: block;
}
.audit-json {
  font-size: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f2f3ed;
  padding: 10px;
  border-radius: 6px;
}
.skeleton {
  height: 160px;
  border-radius: 12px;
  background: linear-gradient(90deg, #ecefe5, #f7f8f2, #ecefe5);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 12px;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}
.packet-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11px;
  line-height: 1.7;
  margin: 18px 0;
}
.packet-checkbox input {
  accent-color: var(--teal);
  margin-top: 4px;
  width: 15px;
  height: 15px;
}
.section-heading {
  margin-bottom: 18px;
}
.section-heading p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
details > summary {
  cursor: pointer;
}
.record-detail-button {
  position: absolute;
  inset: 0;
  z-index: 0;
  cursor: pointer;
  border-radius: 12px;
}
.record-card a,
.record-card button:not(.record-detail-button) {
  position: relative;
  z-index: 1;
}
.record-card h3 a {
  color: inherit;
}
.record-card h3 a:hover {
  text-decoration: underline;
}
.design-b {
  --bg: #e9edeb;
  --surface: #ffffff;
  --teal: #244c5d;
  --teal-dark: #1a3745;
  --tint: #e4edf0;
  --line: #d8e1e3;
}
.design-b h1 {
  font-family: inherit;
  font-size: 35px;
  font-weight: 650;
  letter-spacing: -1.5px;
}
.design-b .sidebar {
  background: #dce5e5;
}
.design-b .panel,
.design-b .record-card,
.design-b .stat {
  border-radius: 5px;
  box-shadow: none;
}
.design-b .body-area {
  background: #edf3f3;
}
.design-b .brand {
  letter-spacing: -0.8px;
}
@media (min-width: 1550px) {
  .body-area {
    min-height: 425px;
  }
  .body-art {
    height: 392px;
    width: 250px;
  }
  .record-card {
    padding: 21px;
  }
  .record-card .summary {
    font-size: 12px;
  }
  .record-card h3 {
    font-size: 17px;
  }
  .sidebar {
    padding-top: 35px;
  }
}
@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 192px 1fr;
  }
  .sidebar {
    padding: 26px 12px;
    gap: 28px;
  }
  .sidebar .brand {
    font-size: 22px;
    padding: 0 7px;
  }
  .sidebar .brand-mark {
    font-size: 29px;
  }
  .nav a {
    padding: 11px 12px;
    font-size: 12px;
    gap: 9px;
  }
  .topbar {
    padding: 0 26px;
  }
  main {
    padding: 28px 26px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(290px, 0.9fr) minmax(310px, 1.1fr);
    gap: 17px;
  }
  h1 {
    font-size: 34px;
  }
  .panel-head {
    padding: 20px 18px 14px;
  }
  .panel-head h2 {
    font-size: 15px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 13px;
  }
  .stat-hint {
    display: none !important;
  }
  .record-card {
    padding: 15px;
  }
  .record-card h3 {
    font-size: 14px;
  }
  .body-area {
    padding-left: 14px;
    padding-right: 14px;
  }
  .body-art {
    width: 210px;
    height: 360px;
  }
  .body-label.left {
    left: 18px;
  }
  .body-label.right {
    right: 18px;
  }
  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .review-layout {
    grid-template-columns: minmax(240px, 0.9fr) minmax(330px, 1.1fr);
    gap: 15px;
  }
  .review-form {
    padding: 18px;
  }
  .packet-preview {
    padding: 24px;
  }
  .page-head .btn {
    padding: 9px 12px;
  }
  .source-mini span {
    max-width: 125px;
  }
}
@media (max-width: 980px) {
  .layout {
    grid-template-columns: 76px 1fr;
  }
  .sidebar {
    padding: 24px 10px;
    align-items: center;
  }
  .sidebar .brand {
    font-size: 0;
    padding: 0;
    gap: 0;
  }
  .sidebar .brand-mark {
    font-size: 33px;
  }
  .sidebar-caption,
  .nav-label,
  .sidebar-note,
  .sidebar-bottom,
  .nav-badge {
    display: none;
  }
  .nav {
    width: 100%;
    gap: 12px;
  }
  .nav a {
    padding: 14px;
    justify-content: center;
  }
  .nav a .icon {
    width: 21px;
    height: 21px;
  }
  .nav a[title]:hover:after {
    content: attr(title);
    position: absolute;
    left: 68px;
    background: var(--teal-dark);
    color: white;
    padding: 7px 10px;
    font-size: 11px;
    border-radius: 5px;
    z-index: 30;
    white-space: nowrap;
  }
  .topbar {
    height: 72px;
  }
  .profile-chip .profile-text {
    display: none;
  }
  .top-actions {
    gap: 12px;
  }
  .dashboard-grid {
    grid-template-columns: minmax(270px, 0.9fr) minmax(295px, 1.1fr);
  }
  main {
    padding: 27px 24px;
  }
  .stat {
    padding: 12px;
  }
  .stat strong {
    font-size: 18px;
  }
  .stat span {
    font-size: 10px;
  }
  .body-foot {
    padding: 13px 17px;
  }
  .body-foot .btn {
    padding: 7px;
  }
  .body-foot strong {
    font-size: 11px;
  }
  .tabs {
    gap: 22px;
    padding: 0 18px;
  }
  .review-layout {
    grid-template-columns: 1fr;
  }
  .source-panel {
    position: static;
  }
  .source-panel iframe {
    height: 400px;
  }
  .review-mobile-tabs {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 18px;
    background: #eef0e7;
  }
  .review-mobile-tabs button {
    flex: 1;
    padding: 9px;
    font-size: 12px;
    border-radius: 5px;
  }
  .review-mobile-tabs button.active {
    background: var(--surface);
    color: var(--teal);
    box-shadow: 0 1px 5px #2239220a;
  }
  .review-layout .mobile-hidden {
    display: none;
  }
  .packet-layout {
    grid-template-columns: 1fr;
  }
  .packet-preview {
    min-height: 0;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .welcome-art {
    padding: 40px;
  }
  .welcome-art h1 {
    font-size: 49px;
  }
  .welcome-form {
    padding: 30px;
  }
  .treatment-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .body-area {
    min-height: 370px;
  }
  .body-art {
    height: 340px;
    width: 220px;
  }
  .history-column {
    margin-top: 3px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    gap: 8px;
  }
  .stat-icon {
    width: 29px;
    height: 29px;
  }
  .stat-icon .icon {
    width: 16px;
    height: 16px;
  }
  .stat strong {
    font-size: 17px;
  }
  .stat span {
    font-size: 9px;
  }
  .topbar {
    padding: 0 22px;
  }
  .page-head {
    gap: 12px;
  }
  .page-head h1 {
    font-size: 32px;
  }
  .page-head .btn {
    font-size: 11px;
  }
  .bottom-callout {
    padding: 18px;
    gap: 12px;
  }
  .callout-icon {
    padding: 10px;
  }
  .bottom-callout .btn {
    font-size: 10px;
  }
  .welcome {
    grid-template-columns: 1fr;
  }
  .welcome-art {
    padding: 30px 35px;
  }
  .welcome-art h1 {
    font-size: 42px;
    margin-top: 45px;
    max-width: 440px;
  }
  .welcome-art p {
    font-size: 12px;
    margin-top: 15px;
    max-width: 420px;
  }
  .welcome-art .eyebrow {
    padding-top: 32px;
    margin-bottom: 0;
  }
  .welcome-form {
    padding: 38px 28px;
  }
  .welcome-inner {
    max-width: 460px;
  }
  .welcome-inner h2 {
    font-size: 28px;
  }
  .region-menu {
    min-height: 360px;
  }
  .view-toolbar {
    align-items: flex-start;
  }
  .page-footer {
    font-size: 8px;
  }
  .breadcrumb {
    font-size: 11px;
  }
  .document-grid {
    gap: 13px;
  }
  .document-content {
    padding: 13px;
  }
}
@media (max-width: 520px) {
  .layout {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .topbar {
    height: 64px;
    padding: 0 19px;
  }
  .breadcrumb {
    display: none;
  }
  .mobile-brand {
    display: flex;
    font-size: 22px;
    gap: 8px;
  }
  .mobile-brand .brand-mark {
    font-size: 29px;
  }
  .profile-chip {
    display: none;
  }
  .language button {
    font-size: 9px;
  }
  .top-actions {
    gap: 8px;
  }
  main {
    padding: 26px 18px 100px;
  }
  .page-head {
    align-items: flex-start;
    margin-bottom: 19px;
  }
  .page-head h1 {
    font-size: 31px;
    max-width: 260px;
    line-height: 1.14;
  }
  .page-head p {
    font-size: 11px;
    line-height: 1.7;
    max-width: 260px;
  }
  .page-head .btn {
    min-width: 38px;
    padding: 10px;
    font-size: 0;
    border-radius: 50%;
    margin-top: 26px;
  }
  .page-head .btn .icon {
    width: 18px;
    height: 18px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
  }
  .synthetic-banner {
    font-size: 9px;
    padding: 8px 10px;
    align-items: flex-start;
    margin-bottom: 18px;
    line-height: 1.6;
  }
  .synthetic-banner .icon {
    margin-top: 1px;
    flex-shrink: 0;
  }
  .stats {
    gap: 6px;
    margin-bottom: 18px;
  }
  .stat {
    padding: 12px 9px;
    gap: 6px;
    display: block;
  }
  .stat-icon {
    display: none;
  }
  .stat strong {
    font-size: 20px;
  }
  .stat span {
    font-size: 9px;
    margin-top: 2px;
  }
  .dashboard-grid {
    gap: 23px;
  }
  .panel {
    border-radius: 14px;
  }
  .panel-head {
    padding: 19px 18px 12px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .panel-head p {
    font-size: 10px;
  }
  .tabs button {
    font-size: 10px;
  }
  .body-area {
    min-height: 353px;
  }
  .body-art {
    height: 326px;
    width: 211px;
  }
  .body-label {
    top: 166px;
    font-size: 8px;
  }
  .body-label.left {
    left: 26px;
  }
  .body-label.right {
    right: 26px;
  }
  .body-legend {
    font-size: 8px;
    bottom: 15px;
    left: 18px;
  }
  .body-foot {
    padding: 14px 17px;
  }
  .body-foot span {
    font-size: 9px;
  }
  .record-card {
    padding: 17px;
  }
  .record-card h3 {
    font-size: 15px;
  }
  .record-card .summary {
    font-size: 11px;
  }
  .record-meta {
    font-size: 9px;
  }
  .source-mini span {
    max-width: 175px;
  }
  .bottom-callout {
    display: grid;
    grid-template-columns: 39px 1fr;
    padding: 19px 16px;
  }
  .callout-icon {
    padding: 9px;
  }
  .bottom-callout h3 {
    font-size: 13px;
  }
  .bottom-callout p {
    font-size: 10px;
  }
  .bottom-callout .btn {
    grid-column: 2;
    margin-left: 0;
    width: fit-content;
  }
  .page-footer {
    display: block;
    line-height: 1.8;
    margin-top: 21px;
  }
  .page-footer span {
    display: block;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 74px;
    padding: 9px 8px max(9px, env(safe-area-inset-bottom));
    background: #fffefaef;
    backdrop-filter: blur(12px);
    border-top: 1px solid #dce1d2;
    justify-content: space-around;
    z-index: 20;
  }
  .mobile-nav a {
    color: #7c8775;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 8px;
    min-width: 51px;
    justify-content: center;
    border-radius: 8px;
  }
  .mobile-nav a.active {
    color: var(--teal);
    background: #eaf0df;
  }
  .mobile-nav .icon {
    width: 20px;
    height: 20px;
  }
  .filter-bar {
    gap: 7px;
  }
  .filter-bar .search-field {
    flex-basis: 100%;
  }
  .filter-bar select {
    max-width: none;
    flex: 1;
    font-size: 10px;
    min-width: calc(50% - 7px);
  }
  .document-grid {
    grid-template-columns: 1fr;
  }
  .document-card {
    display: grid;
    grid-template-columns: 100px 1fr;
  }
  .document-preview {
    height: 100%;
    min-height: 173px;
  }
  .paper-mini {
    width: 70px;
    height: 100px;
    padding: 12px 9px;
  }
  .document-content {
    padding: 15px;
  }
  .document-content h3 {
    font-size: 12px;
  }
  .document-content .btn {
    font-size: 9px;
    min-height: 32px;
    padding: 7px;
  }
  .drop-zone {
    padding: 19px 15px;
  }
  .drop-zone p {
    font-size: 11px;
  }
  .drop-zone small {
    font-size: 9px;
  }
  .view-toolbar {
    gap: 12px;
  }
  .view-toolbar p {
    font-size: 10px;
  }
  .view-toolbar .btn {
    font-size: 10px;
  }
  .timeline {
    padding-left: 20px;
  }
  .timeline:before {
    left: 2px;
  }
  .timeline-month:before {
    left: -21px;
  }
  .timeline-month {
    font-size: 9px;
  }
  .treatment-card {
    padding: 19px;
  }
  .info-grid {
    gap: 14px 12px;
  }
  .info-grid dd {
    font-size: 11px;
  }
  .info-grid dt {
    font-size: 8px;
  }
  .info-note {
    font-size: 10px;
  }
  .review-top {
    display: block;
  }
  .review-top .button-row {
    margin-top: 12px;
  }
  .review-top h1 {
    font-size: 28px;
  }
  .review-form {
    padding: 18px;
  }
  .form-grid {
    gap: 12px;
  }
  .field label {
    font-size: 9px;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 12px;
  }
  .form-grid .field.full-mobile {
    grid-column: 1/-1;
  }
  .source-panel iframe {
    height: 470px;
  }
  .source-panel .source-text {
    font-size: 12px;
  }
  .review-actions .btn {
    flex: 1;
    font-size: 10px;
    min-width: 43%;
  }
  .review-layout {
    gap: 0;
  }
  .packet-form {
    padding: 18px;
  }
  .packet-preview {
    padding: 23px 18px;
  }
  .packet-preview h2 {
    font-size: 28px;
  }
  .packet-layout {
    gap: 20px;
  }
  .packet-form .form-grid {
    grid-template-columns: 1fr;
  }
  .packet-record strong {
    font-size: 11px;
  }
  .packet-record small {
    font-size: 9px;
  }
  .packet-checkbox {
    font-size: 10px;
  }
  .saved-packet {
    display: block;
  }
  .saved-packet .button-row {
    margin-top: 11px;
  }
  .settings-grid .panel {
    padding: 21px;
  }
  .modal-backdrop {
    padding: 15px;
  }
  .modal {
    padding: 21px;
    max-height: calc(100vh - 50px);
  }
  .modal h2 {
    font-size: 20px;
  }
  .modal .form-grid {
    gap: 13px;
  }
  #toast {
    bottom: 86px;
    max-width: calc(100% - 25px);
    width: max-content;
    font-size: 11px;
  }
  .welcome-art h1 {
    font-size: 39px;
  }
  .welcome-art {
    padding: 28px;
  }
  .welcome-art .eyebrow {
    font-size: 8px;
  }
  .welcome-form {
    padding: 31px 24px;
  }
  .welcome-inner > p {
    font-size: 11px;
  }
  .welcome-notice {
    font-size: 9px;
  }
  .profile-option .avatar {
    width: 35px;
    height: 35px;
  }
  .region-menu {
    min-height: 352px;
    padding: 17px;
    gap: 7px;
  }
  .region-menu button {
    font-size: 10px;
    padding: 9px;
  }
  .page-head .btn-label {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition: none !important;
  }
}

/* Keep clinical details and controls readable, including on small screens. */
.summary,
.original-title,
.source-panel .source-text,
.packet-preview .packet-event,
.original-block,
.info-grid dd,
.ingredients-table,
.document-content p {
  font-size: 13px;
}
.field input,
.field select,
.field textarea {
  font-size: 14px;
  min-height: 44px;
}
.field label,
.field-hint,
.packet-record small,
.warning {
  font-size: 12px;
}
.check-pill {
  font-size: 12px;
  min-height: 40px;
}
.body-region:focus-visible {
  stroke: #123e37;
  stroke-width: 3;
}
.audit-json {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  font-size: 12px;
}
@media (max-width: 600px) {
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
  .btn,
  .tabs button,
  .body-view-toggle button,
  .review-mobile-tabs button {
    min-height: 44px;
  }
}
.field[hidden] {
  display: none;
}
.source-page-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}
#source-preview-status {
  padding: 0 18px;
}
#source-page-preview {
  background: white;
  width: 100%;
  height: auto;
  border-top: 1px solid var(--line);
}
#source-page-preview[hidden] {
  display: none;
}
.body-area {
  padding-top: 55px;
}

/* M2a: inspectable initial suggestions and explicit summary basis. */
.extraction-checks {
  border: 1px solid var(--line, #dce2d5);
  border-radius: 10px;
  padding: 14px;
  margin: 16px 0;
  min-width: 0;
}
.extraction-checks summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink, #214e45);
}
.field-evidence {
  padding: 14px 0;
  border-top: 1px solid #dce2d5;
  overflow-wrap: anywhere;
}
.evidence-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.field-evidence blockquote {
  margin: 10px 0;
  padding: 8px 12px;
  border-left: 3px solid #ced9c2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.field-evidence p {
  margin: 8px 0;
  font-size: 13px;
}
