:root {
  color-scheme: light;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --blue: #4c6fff;
  --blue-deep: #3154ed;
  --blue-soft: #edf1ff;
  --cyan: #27b8d8;
  --ink: #1d2738;
  --muted: #758096;
  --line: #e5eaf2;
  --panel: #ffffff;
  --canvas: #f4f7fb;
  --success: #38b978;
  --warning: #ff8a32;
  --danger: #f25f6b;
  --shadow: 0 14px 40px rgba(39, 58, 97, 0.11);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 10%, rgba(96, 126, 255, 0.12), transparent 32%),
    #e8edf5;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(76, 111, 255, 0.24);
  outline-offset: 2px;
}

.prototype-stage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 16px 16px 42px;
}

.cockpit {
  position: relative;
  width: min(1440px, calc(100vw - 32px), calc((100vh - 74px) * 16 / 9));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(85, 102, 134, 0.17);
  border-radius: 22px;
  background: var(--canvas);
  box-shadow:
    0 30px 90px rgba(34, 48, 74, 0.2),
    0 2px 8px rgba(34, 48, 74, 0.08);
  font-size: clamp(11px, 0.92vw, 16px);
}

.system-bar {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 2.7em;
  padding: 0 1.3em;
  color: #596579;
  border-bottom: 1px solid rgba(222, 228, 238, 0.84);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.system-cluster {
  display: flex;
  align-items: center;
  gap: 0.85em;
  font-size: 0.76em;
  font-weight: 600;
}

.system-cluster--right {
  justify-self: end;
}

.system-time {
  color: var(--ink);
  font-size: 1.02em;
  font-weight: 700;
}

.gear-badge {
  display: grid;
  width: 1.7em;
  height: 1.7em;
  color: #fff;
  border-radius: 50%;
  background: #28344a;
  place-items: center;
}

.voice-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.42em 0.85em;
  color: #67738a;
  font-size: 0.72em;
  border: 0;
  border-radius: 999px;
  background: #f5f7fb;
  cursor: pointer;
}

.voice-dot {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(76, 111, 255, 0.12);
}

.signal-icon {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.signal-icon i {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: currentColor;
}

.signal-icon i:nth-child(1) { height: 4px; }
.signal-icon i:nth-child(2) { height: 7px; }
.signal-icon i:nth-child(3) { height: 11px; }

.battery-icon {
  position: relative;
  width: 1.7em;
  height: 0.82em;
  padding: 2px;
  border: 1px solid currentColor;
  border-radius: 3px;
}

.battery-icon::after {
  position: absolute;
  top: 0.18em;
  right: -0.24em;
  width: 0.14em;
  height: 0.34em;
  border-radius: 0 2px 2px 0;
  background: currentColor;
  content: "";
}

.battery-icon i {
  display: block;
  width: 82%;
  height: 100%;
  border-radius: 1px;
  background: var(--success);
}

.screen {
  position: absolute;
  z-index: 1;
  top: 2.7em;
  right: 0;
  bottom: 5.35em;
  left: 0;
  overflow: hidden;
  background: var(--canvas);
}

.route-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.app-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  flex: 0 0 4.15em;
  padding: 0 2.15em;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.app-bar__left,
.app-bar__actions,
.segmented-control,
.inline-actions {
  display: flex;
  align-items: center;
}

.app-bar__left {
  min-width: 0;
  gap: 0.8em;
}

.app-bar__left h1 {
  margin: 0;
  font-size: 1.3em;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.app-bar__left p {
  margin: 0.25em 0 0;
  color: var(--muted);
  font-size: 0.72em;
}

.app-bar__actions {
  justify-content: flex-end;
  gap: 0.65em;
}

.back-button,
.icon-button,
.text-button,
.chip,
.tab-button,
.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  border: 0;
  cursor: pointer;
}

.back-button,
.icon-button {
  display: grid;
  width: 2.55em;
  height: 2.55em;
  color: #4e5c72;
  border: 1px solid var(--line);
  border-radius: 0.78em;
  background: #fff;
  place-items: center;
}

.icon-button.is-active {
  color: var(--blue);
  border-color: #cbd4ff;
  background: var(--blue-soft);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 0.8em;
}

.app-logo__mark {
  position: relative;
  display: grid;
  width: 2.5em;
  height: 2.5em;
  color: #fff;
  border-radius: 0.8em;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(76, 111, 255, 0.24);
  place-items: center;
}

.app-logo__mark::after {
  position: absolute;
  right: -0.15em;
  bottom: -0.15em;
  width: 0.72em;
  height: 0.72em;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #61d89c;
  content: "";
}

.segmented-control {
  gap: 0.25em;
  padding: 0.25em;
  border-radius: 0.85em;
  background: #edf1f6;
}

.tab-button {
  min-width: 7.2em;
  padding: 0.7em 1.1em;
  color: #6e798c;
  font-size: 0.84em;
  font-weight: 620;
  border-radius: 0.65em;
  background: transparent;
}

.tab-button.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(37, 54, 88, 0.08);
}

.page-content {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 1.45em 2.15em 1.7em;
}

.page-content::-webkit-scrollbar,
.chat-flow::-webkit-scrollbar,
.history-list::-webkit-scrollbar {
  width: 6px;
}

.page-content::-webkit-scrollbar-thumb,
.chat-flow::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #ccd4e1;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(19em, 0.75fr);
  gap: 1.25em;
  height: 100%;
}

.home-main,
.home-aside {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 1em;
}

.welcome-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(12em, 0.7fr);
  align-items: center;
  min-height: 10.4em;
  overflow: hidden;
  padding: 1.45em 1.6em;
  color: #fff;
  border-radius: 1.35em;
  background: #3f61e9;
  box-shadow: 0 18px 34px rgba(63, 97, 233, 0.22);
}

.welcome-card::before,
.welcome-card::after {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  content: "";
}

.welcome-card::before {
  top: -6em;
  right: -4em;
  width: 17em;
  height: 17em;
}

.welcome-card::after {
  right: 11em;
  bottom: -6.5em;
  width: 13em;
  height: 13em;
}

.welcome-copy,
.knowledge-mini {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 0.55em;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-copy h2 {
  margin: 0;
  font-size: 1.8em;
  font-weight: 680;
  letter-spacing: -0.04em;
}

.welcome-copy > p:last-of-type {
  max-width: 34em;
  margin: 0.65em 0 1.1em;
  color: rgba(255, 255, 255, 0.79);
  font-size: 0.83em;
  line-height: 1.65;
}

.knowledge-mini {
  align-self: stretch;
  padding: 1.05em 1.15em;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1em;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.knowledge-mini small {
  color: rgba(255, 255, 255, 0.68);
}

.knowledge-mini h3 {
  margin: 0.5em 0 0.35em;
  font-size: 1em;
}

.knowledge-mini p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72em;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 2.75em;
  padding: 0.72em 1.25em;
  font-size: 0.82em;
  font-weight: 650;
  border-radius: 0.78em;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(76, 111, 255, 0.22);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.danger-button:active {
  transform: translateY(0);
}

.primary-button--light {
  color: var(--blue-deep);
  background: #fff;
  box-shadow: 0 8px 20px rgba(27, 47, 115, 0.14);
}

.primary-button[disabled],
.secondary-button[disabled] {
  color: #9ca6b6;
  background: #e4e8ef;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.secondary-button {
  color: #31405a;
  border: 1px solid #dce2ec;
  background: #fff;
}

.ghost-button {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.danger-button {
  color: #d94a58;
  background: #fff0f2;
}

.action-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1em;
  min-height: 0;
  flex: 1;
}

.action-card,
.panel,
.profile-card,
.metric-card,
.selection-card,
.archive-chart-card {
  border: 1px solid var(--line);
  border-radius: 1.2em;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(44, 63, 99, 0.06);
}

.action-card {
  position: relative;
  display: flex;
  min-height: 11em;
  overflow: hidden;
  padding: 1.35em;
  flex-direction: column;
  justify-content: space-between;
}

.action-card__icon,
.metric-icon,
.avatar-small {
  display: grid;
  place-items: center;
}

.action-card__icon {
  width: 3.1em;
  height: 3.1em;
  color: var(--blue);
  border-radius: 1em;
  background: var(--blue-soft);
}

.action-card--archive .action-card__icon {
  color: #0899b8;
  background: #e7f9fd;
}

.action-card h3 {
  margin: 0.9em 0 0.35em;
  font-size: 1.08em;
}

.action-card p {
  max-width: 30em;
  margin: 0;
  color: var(--muted);
  font-size: 0.76em;
  line-height: 1.6;
}

.action-card .text-button {
  align-self: flex-start;
  margin-top: 0.9em;
}

.profile-card {
  display: flex;
  align-items: center;
  padding: 1.25em;
  flex-direction: column;
  text-align: center;
}

.avatar,
.avatar-small {
  position: relative;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: #dfe8ff;
}

.avatar {
  width: 5.1em;
  height: 5.1em;
  margin-bottom: 0.75em;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px #d9e0ee, 0 10px 20px rgba(53, 75, 120, 0.12);
}

.avatar-small {
  width: 2.55em;
  height: 2.55em;
}

.avatar::before,
.avatar-small::before {
  position: absolute;
  top: 17%;
  left: 50%;
  width: 38%;
  height: 38%;
  border-radius: 50%;
  background: #efba8b;
  content: "";
  transform: translateX(-50%);
  box-shadow: inset 0 0.48em 0 #2c3550;
}

.avatar::after,
.avatar-small::after {
  position: absolute;
  right: 18%;
  bottom: -12%;
  left: 18%;
  height: 55%;
  border-radius: 50% 50% 0 0;
  background: #5c75df;
  content: "";
}

.profile-card h3 {
  margin: 0;
  font-size: 1.08em;
}

.profile-card > p {
  margin: 0.38em 0 0.95em;
  color: var(--muted);
  font-size: 0.75em;
}

.profile-stats {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 1em;
  border-top: 1px solid var(--line);
}

.profile-stats strong,
.profile-stats small {
  display: block;
}

.profile-stats strong {
  font-size: 0.92em;
}

.profile-stats small {
  margin-top: 0.3em;
  color: var(--muted);
  font-size: 0.65em;
}

.profile-card .secondary-button {
  width: 100%;
  margin-top: 1em;
}

.quick-vitals {
  display: grid;
  min-height: 0;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75em;
  flex: 1;
}

.mini-vital {
  display: flex;
  min-width: 0;
  padding: 0.95em;
  align-items: center;
  gap: 0.75em;
  border: 1px solid var(--line);
  border-radius: 1em;
  background: #fff;
}

.mini-vital span:first-child {
  display: grid;
  width: 2.35em;
  height: 2.35em;
  flex: none;
  color: var(--blue);
  border-radius: 0.75em;
  background: var(--blue-soft);
  place-items: center;
}

.mini-vital strong,
.mini-vital small {
  display: block;
}

.mini-vital strong {
  overflow: hidden;
  font-size: 0.86em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-vital small {
  margin-top: 0.25em;
  color: var(--muted);
  font-size: 0.64em;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0;
  color: var(--blue-deep);
  font-size: 0.76em;
  font-weight: 650;
  background: transparent;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
}

.stepper__item {
  display: flex;
  align-items: center;
  gap: 0.55em;
  color: #9aa4b5;
  font-size: 0.72em;
  font-weight: 600;
}

.stepper__item span {
  display: grid;
  width: 1.75em;
  height: 1.75em;
  color: #7d889a;
  border-radius: 50%;
  background: #e7ebf2;
  place-items: center;
}

.stepper__item.is-active,
.stepper__item.is-done {
  color: var(--ink);
}

.stepper__item.is-active span,
.stepper__item.is-done span {
  color: #fff;
  background: var(--blue);
}

.stepper__line {
  width: 3.4em;
  height: 2px;
  background: #dfe4ed;
}

.selection-layout {
  display: grid;
  align-content: center;
  max-width: 72em;
  min-height: 100%;
  margin: 0 auto;
}

.selection-intro {
  margin-bottom: 1.25em;
  text-align: center;
}

.selection-intro h2 {
  margin: 0;
  font-size: 1.45em;
}

.selection-intro p {
  margin: 0.45em 0 0;
  color: var(--muted);
  font-size: 0.78em;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1em;
}

.selection-card {
  position: relative;
  min-height: 13em;
  overflow: hidden;
  padding: 1.2em;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.selection-card:hover,
.selection-card.is-selected {
  border-color: #9cabff;
  box-shadow: 0 12px 30px rgba(76, 111, 255, 0.13);
  transform: translateY(-2px);
}

.selection-card.is-selected::after {
  position: absolute;
  top: 1em;
  right: 1em;
  display: grid;
  width: 1.8em;
  height: 1.8em;
  color: #fff;
  border-radius: 50%;
  background: var(--blue);
  content: "✓";
  place-items: center;
}

.seat-visual {
  position: relative;
  width: 12em;
  height: 7.5em;
  margin: 0.25em auto 0.8em;
  border: 0.6em solid #313c50;
  border-radius: 3.2em 3.2em 2.1em 2.1em;
  background: #e7ebf2;
  box-shadow: inset 0 -1.2em 2em rgba(70, 83, 108, 0.12);
}

.seat-visual::before,
.seat-visual::after {
  position: absolute;
  top: 1em;
  width: 4.1em;
  height: 4.2em;
  border-radius: 1.4em;
  background: #b7c0cf;
  box-shadow: inset 0 -0.65em 0 rgba(77, 91, 114, 0.18);
  content: "";
}

.seat-visual::before { left: 0.75em; }
.seat-visual::after { right: 0.75em; }

.selection-card[data-seat="driver"] .seat-visual::before,
.selection-card[data-seat="passenger"] .seat-visual::after {
  background: var(--blue);
  box-shadow: 0 0 0 0.45em rgba(76, 111, 255, 0.12);
}

.selection-card h3,
.selection-card p {
  margin: 0;
  text-align: center;
}

.selection-card p {
  margin-top: 0.35em;
  color: var(--muted);
  font-size: 0.72em;
}

.person-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1em;
}

.person-card {
  display: flex;
  align-items: center;
  min-height: 10em;
  padding: 1.1em;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 1.2em;
  background: #fff;
  cursor: pointer;
}

.person-card.is-selected {
  border-color: #9cabff;
  background: #f7f8ff;
  box-shadow: 0 10px 26px rgba(76, 111, 255, 0.12);
}

.person-card .avatar {
  width: 4.3em;
  height: 4.3em;
  margin-bottom: 0.65em;
}

.person-card strong {
  font-size: 0.92em;
}

.person-card small {
  margin-top: 0.25em;
  color: var(--muted);
  font-size: 0.66em;
}

.selection-footer {
  display: flex;
  justify-content: center;
  margin-top: 1.25em;
  gap: 0.75em;
}

.scan-screen {
  position: relative;
  display: grid;
  height: 100%;
  color: #fff;
  background:
    radial-gradient(circle at 50% 40%, rgba(74, 111, 196, 0.36), transparent 30%),
    linear-gradient(145deg, #101827, #1a263b 60%, #101726);
  grid-template-columns: 1fr minmax(22em, 0.78fr);
}

.scan-stage {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
}

.scan-grid {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(132, 157, 210, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 157, 210, 0.12) 1px, transparent 1px);
  background-size: 3.2em 3.2em;
  mask-image: radial-gradient(circle at center, black 0%, transparent 70%);
}

.face-frame {
  position: relative;
  width: 19em;
  height: 23em;
  border: 2px solid rgba(104, 233, 177, 0.7);
  border-radius: 8em 8em 6em 6em;
  box-shadow:
    0 0 0 0.7em rgba(68, 210, 154, 0.05),
    0 0 3em rgba(69, 221, 163, 0.13);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.face-frame::before,
.face-frame::after {
  position: absolute;
  left: 10%;
  width: 80%;
  height: 2px;
  background: rgba(100, 236, 183, 0.72);
  content: "";
  box-shadow: 0 0 1em rgba(100, 236, 183, 0.7);
  animation: scan-line 2.4s ease-in-out infinite alternate;
}

.face-frame::after {
  display: none;
}

.face-frame.is-warning {
  border-color: rgba(244, 93, 105, 0.85);
  box-shadow: 0 0 0 0.7em rgba(244, 93, 105, 0.07), 0 0 3em rgba(244, 93, 105, 0.15);
}

.face-frame.is-warning::before {
  background: rgba(244, 93, 105, 0.75);
  box-shadow: 0 0 1em rgba(244, 93, 105, 0.65);
}

@keyframes scan-line {
  from { top: 18%; }
  to { top: 79%; }
}

.scan-person {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 82%;
}

.scan-person__head {
  position: absolute;
  top: 4%;
  left: 50%;
  width: 8em;
  height: 9.5em;
  border-radius: 48% 48% 45% 45%;
  background: #c88d67;
  transform: translateX(-50%);
  box-shadow: inset 0 1.6em 0 #283348;
}

.scan-person__head::before,
.scan-person__head::after {
  position: absolute;
  top: 48%;
  width: 0.55em;
  height: 0.34em;
  border-radius: 50%;
  background: #1f2633;
  content: "";
}

.scan-person__head::before { left: 26%; }
.scan-person__head::after { right: 26%; }

.scan-person__body {
  position: absolute;
  bottom: -5%;
  left: 50%;
  width: 14em;
  height: 12em;
  border-radius: 7em 7em 1em 1em;
  background: #536fd4;
  transform: translateX(-50%);
}

.face-points {
  position: absolute;
  inset: 18% 21%;
  opacity: 0.68;
  background-image: radial-gradient(circle, #7cf2c1 0 1px, transparent 1.5px);
  background-size: 0.8em 0.75em;
  mask-image: radial-gradient(ellipse at center, black 18%, transparent 70%);
}

.scan-sidebar {
  position: relative;
  z-index: 2;
  display: flex;
  padding: 2em 2em 1.7em;
  flex-direction: column;
  border-left: 1px solid rgba(160, 179, 216, 0.12);
  background: rgba(17, 27, 44, 0.66);
  backdrop-filter: blur(20px);
}

.scan-sidebar h1 {
  margin: 0.2em 0 0.35em;
  font-size: 1.55em;
}

.scan-sidebar > p {
  margin: 0;
  color: #9caac3;
  font-size: 0.78em;
  line-height: 1.6;
}

.scan-progress-row {
  display: flex;
  align-items: center;
  margin: 1.8em 0;
  gap: 1.15em;
}

.scan-ring {
  display: grid;
  width: 5.3em;
  height: 5.3em;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(#68e1ae var(--scan-progress), rgba(255, 255, 255, 0.1) 0);
  place-items: center;
}

.scan-ring::before {
  position: absolute;
  width: 4.2em;
  height: 4.2em;
  border-radius: 50%;
  background: #18253a;
  content: "";
}

.scan-ring strong {
  position: relative;
  z-index: 1;
  font-size: 1.25em;
}

.scan-status strong,
.scan-status span {
  display: block;
}

.scan-status strong {
  font-size: 0.95em;
}

.scan-status span {
  margin-top: 0.35em;
  color: #8292ad;
  font-size: 0.7em;
}

.check-list {
  display: grid;
  gap: 0.65em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: #8492aa;
  font-size: 0.75em;
}

.check-list li::before {
  display: grid;
  width: 1.55em;
  height: 1.55em;
  flex: none;
  color: #5f6f89;
  border: 1px solid #394961;
  border-radius: 50%;
  content: "";
  place-items: center;
}

.check-list li.is-done {
  color: #e7edf8;
}

.check-list li.is-done::before {
  color: #0e2c20;
  border-color: #68e1ae;
  background: #68e1ae;
  content: "✓";
}

.scan-actions {
  display: flex;
  margin-top: auto;
  gap: 0.7em;
}

.scan-actions .secondary-button {
  color: #d8e2f2;
  border-color: #35445c;
  background: #202e43;
}

.scan-actions .danger-button {
  color: #ff9099;
  background: rgba(242, 95, 107, 0.13);
}

.warning-banner {
  position: absolute;
  z-index: 4;
  top: 1.4em;
  left: 50%;
  padding: 0.75em 1.1em;
  color: #ffd8dc;
  font-size: 0.8em;
  border: 1px solid rgba(244, 93, 105, 0.35);
  border-radius: 0.8em;
  background: rgba(100, 27, 38, 0.84);
  transform: translateX(-50%);
  animation: banner-in 180ms ease-out;
}

@keyframes banner-in {
  from { opacity: 0; transform: translate(-50%, -0.5em); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(18em, 0.72fr) minmax(0, 1.5fr);
  gap: 1.2em;
  min-height: 100%;
}

.result-summary {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: 1.5em;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  border-radius: 1.3em;
  background: #3f61e9;
}

.result-summary.is-abnormal {
  background: #e66b34;
}

.result-summary::after {
  position: absolute;
  right: -5em;
  bottom: -6em;
  width: 17em;
  height: 17em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  content: "";
}

.result-badge {
  position: relative;
  z-index: 1;
  display: grid;
  width: 3.4em;
  height: 3.4em;
  color: #2f56dc;
  border-radius: 50%;
  background: #fff;
  place-items: center;
}

.result-summary h2 {
  position: relative;
  z-index: 1;
  max-width: 13em;
  margin: 0.85em 0 0.5em;
  font-size: 1.55em;
  line-height: 1.28;
}

.result-summary p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.74em;
  line-height: 1.6;
}

.result-summary .inline-actions {
  position: relative;
  z-index: 1;
  margin-top: 1.2em;
  gap: 0.7em;
}

.result-summary .secondary-button {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
}

.metrics-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75em;
}

.metric-card {
  display: flex;
  min-width: 0;
  min-height: 8em;
  padding: 1em;
  flex-direction: column;
}

.metric-card--wide {
  grid-column: span 2;
}

.metric-card.is-abnormal {
  border-color: #ffc7a9;
  background: #fff8f3;
}

.metric-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-icon {
  width: 2.35em;
  height: 2.35em;
  color: var(--blue);
  border-radius: 0.75em;
  background: var(--blue-soft);
}

.metric-card.is-abnormal .metric-icon {
  color: #e86330;
  background: #ffe8dc;
}

.status-tag {
  padding: 0.28em 0.6em;
  color: #258f5c;
  font-size: 0.62em;
  font-weight: 650;
  border-radius: 999px;
  background: #e9f8f0;
}

.status-tag.is-abnormal {
  color: #d75627;
  background: #ffe7dc;
}

.metric-card h3 {
  margin: 0.8em 0 0;
  color: var(--muted);
  font-size: 0.7em;
  font-weight: 560;
}

.metric-value {
  margin-top: 0.23em;
  font-size: 1.25em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.metric-value small {
  margin-left: 0.2em;
  color: var(--muted);
  font-size: 0.55em;
  font-weight: 500;
}

.diagnosis-panel {
  grid-column: 1 / -1;
  padding: 1.15em 1.25em;
  border: 1px solid var(--line);
  border-radius: 1em;
  background: #fff;
}

.diagnosis-panel h3 {
  margin: 0 0 0.45em;
  font-size: 0.9em;
}

.diagnosis-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.73em;
  line-height: 1.6;
}

.disclaimer {
  display: flex;
  align-items: center;
  margin-top: 0.8em;
  gap: 0.45em;
  color: #8a94a6;
  font-size: 0.66em;
}

.archive-layout {
  display: grid;
  grid-template-columns: minmax(17em, 0.55fr) minmax(0, 1.45fr);
  gap: 1.1em;
  min-height: 100%;
}

.archive-side {
  display: flex;
  padding: 1.3em;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 1.2em;
  background: #fff;
}

.archive-date {
  color: var(--muted);
  font-size: 0.72em;
}

.archive-side h2 {
  margin: 0.55em 0 0.35em;
  font-size: 1.25em;
}

.archive-side > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72em;
  line-height: 1.6;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1em;
  border-top: 1px solid var(--line);
  font-size: 0.76em;
  font-weight: 600;
}

.switch {
  position: relative;
  width: 2.8em;
  height: 1.55em;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cbd2df;
  cursor: pointer;
}

.switch::after {
  position: absolute;
  top: 0.18em;
  left: 0.18em;
  width: 1.18em;
  height: 1.18em;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(38, 50, 77, 0.24);
  content: "";
  transition: transform 160ms ease;
}

.switch.is-on {
  background: var(--blue);
}

.switch.is-on::after {
  transform: translateX(1.25em);
}

.archive-main {
  min-width: 0;
}

.archive-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75em;
}

.archive-row {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0.95em 1em;
  gap: 0.8em;
  border: 1px solid var(--line);
  border-radius: 1em;
  background: #fff;
}

.archive-row .metric-icon {
  flex: none;
}

.archive-row__copy {
  min-width: 0;
  flex: 1;
}

.archive-row__copy strong,
.archive-row__copy small {
  display: block;
}

.archive-row__copy strong {
  font-size: 0.84em;
}

.archive-row__copy small {
  margin-top: 0.28em;
  color: var(--muted);
  font-size: 0.64em;
}

.archive-row__value {
  font-size: 0.95em;
  font-weight: 700;
  white-space: nowrap;
}

.monthly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75em;
}

.archive-chart-card {
  min-width: 0;
  padding: 0.9em 1em 0.75em;
}

.archive-chart-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.archive-chart-card h3 {
  margin: 0;
  font-size: 0.8em;
}

.archive-chart-card strong {
  font-size: 0.9em;
}

.line-chart {
  width: 100%;
  height: 5.4em;
  margin-top: 0.5em;
}

.chart-grid-line {
  stroke: #e8ecf3;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-area {
  fill: rgba(76, 111, 255, 0.08);
}

.chart-dot {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 2;
}

.consult-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(18em, 0.58fr);
  gap: 1em;
  height: 100%;
}

.chat-panel {
  display: flex;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 1.2em;
  background: #fff;
  box-shadow: 0 8px 24px rgba(44, 63, 99, 0.06);
}

.chat-flow {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 1.25em 1.35em 0.7em;
}

.chat-empty {
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 17em;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.doctor-avatar {
  position: relative;
  display: grid;
  width: 4.6em;
  height: 4.6em;
  color: #fff;
  border-radius: 1.45em;
  background: var(--blue);
  box-shadow: 0 12px 28px rgba(76, 111, 255, 0.24);
  place-items: center;
}

.doctor-avatar::after {
  position: absolute;
  right: -0.2em;
  bottom: -0.2em;
  display: grid;
  width: 1.45em;
  height: 1.45em;
  color: var(--blue);
  font-size: 0.65em;
  font-weight: 800;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #74efbb;
  content: "AI";
  place-items: center;
}

.chat-empty h2 {
  margin: 0.8em 0 0.35em;
  font-size: 1.2em;
}

.chat-empty > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74em;
}

.prompt-chips {
  display: flex;
  max-width: 42em;
  margin-top: 1em;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55em;
}

.chip {
  padding: 0.62em 0.85em;
  color: #536077;
  font-size: 0.7em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.chip:hover {
  color: var(--blue-deep);
  border-color: #bcc7ff;
  background: #f8f9ff;
}

.message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1em;
  gap: 0.65em;
}

.message--user {
  justify-content: flex-end;
}

.message-avatar {
  display: grid;
  width: 2.35em;
  height: 2.35em;
  flex: none;
  color: #fff;
  font-size: 0.65em;
  font-weight: 700;
  border-radius: 0.75em;
  background: var(--blue);
  place-items: center;
}

.message-bubble {
  max-width: 75%;
  padding: 0.85em 1em;
  color: #37435a;
  font-size: 0.76em;
  line-height: 1.7;
  border-radius: 0.35em 1em 1em;
  background: #f1f4f8;
}

.message--user .message-bubble {
  color: #fff;
  border-radius: 1em 0.35em 1em 1em;
  background: var(--blue);
}

.message-bubble p {
  margin: 0;
}

.message-bubble p + p {
  margin-top: 0.6em;
}

.message-tools {
  display: flex;
  align-items: center;
  margin-top: 0.65em;
  gap: 0.35em;
}

.message-tools button {
  display: grid;
  width: 2em;
  height: 2em;
  color: #7e899b;
  border: 0;
  border-radius: 0.55em;
  background: #fff;
  cursor: pointer;
  place-items: center;
}

.message-tools button.is-active {
  color: var(--blue);
  background: var(--blue-soft);
}

.thinking {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
}

.thinking i {
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: #8c98aa;
  animation: thinking 1s ease-in-out infinite alternate;
}

.thinking i:nth-child(2) { animation-delay: 180ms; }
.thinking i:nth-child(3) { animation-delay: 360ms; }

@keyframes thinking {
  to { opacity: 0.25; transform: translateY(-3px); }
}

.composer {
  padding: 0.8em 1em 1em;
  border-top: 1px solid var(--line);
  background: #fff;
}

.voice-listening {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.3em;
  margin-bottom: 0.55em;
  color: var(--blue-deep);
  font-size: 0.72em;
  font-weight: 620;
  border-radius: 0.75em;
  background: var(--blue-soft);
  gap: 0.65em;
}

.waveform {
  display: inline-flex;
  align-items: center;
  height: 1.2em;
  gap: 2px;
}

.waveform i {
  width: 2px;
  height: 30%;
  border-radius: 2px;
  background: var(--blue);
  animation: wave 600ms ease-in-out infinite alternate;
}

.waveform i:nth-child(2),
.waveform i:nth-child(5) { animation-delay: 120ms; }
.waveform i:nth-child(3) { animation-delay: 240ms; }
.waveform i:nth-child(4) { animation-delay: 360ms; }

@keyframes wave {
  to { height: 100%; }
}

.composer-row {
  display: grid;
  align-items: end;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55em;
}

.composer textarea {
  min-height: 2.7em;
  max-height: 6em;
  padding: 0.72em 0.9em;
  resize: none;
  color: var(--ink);
  font-size: 0.76em;
  line-height: 1.45;
  border: 1px solid #dce2ec;
  border-radius: 0.78em;
  background: #f9fafc;
}

.consult-aside {
  display: flex;
  min-height: 0;
  padding: 1.15em;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 1.2em;
  background: #fff;
}

.consult-profile {
  display: flex;
  align-items: center;
  gap: 0.75em;
}

.consult-profile h3,
.consult-profile p {
  margin: 0;
}

.consult-profile h3 {
  font-size: 0.9em;
}

.consult-profile p {
  margin-top: 0.25em;
  color: var(--muted);
  font-size: 0.65em;
}

.consult-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 1em;
  gap: 0.55em;
}

.consult-summary div {
  padding: 0.75em;
  border-radius: 0.75em;
  background: #f5f7fb;
}

.consult-summary strong,
.consult-summary small {
  display: block;
}

.consult-summary strong {
  font-size: 0.78em;
}

.consult-summary small {
  margin-top: 0.25em;
  color: var(--muted);
  font-size: 0.6em;
}

.health-context {
  margin-top: 0.9em;
  padding: 0.9em;
  border: 1px solid #dfe5ff;
  border-radius: 0.85em;
  background: #f7f8ff;
}

.health-context h4 {
  margin: 0 0 0.4em;
  font-size: 0.74em;
}

.health-context p {
  margin: 0;
  color: var(--muted);
  font-size: 0.64em;
  line-height: 1.55;
}

.aside-actions {
  display: grid;
  margin-top: auto;
  gap: 0.55em;
}

.dock {
  position: absolute;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 5.35em;
  padding: 0 1.4em;
  border-top: 1px solid rgba(219, 226, 237, 0.95);
  background: rgba(252, 253, 255, 0.94);
  box-shadow: 0 -8px 28px rgba(44, 59, 91, 0.06);
  backdrop-filter: blur(20px);
}

.dock-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 0.15em;
}

.dock-nav button {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 6em;
  padding: 0.65em 1.1em 0.5em;
  flex-direction: column;
  justify-content: center;
  gap: 0.28em;
  color: #7a8598;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.dock-nav button::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2.2em;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: transparent;
  content: "";
  transform: translateX(-50%);
}

.dock-nav button.is-active {
  color: var(--blue);
}

.dock-nav button.is-active::before {
  background: var(--blue);
}

.dock-icon {
  display: grid;
  width: 1.65em;
  height: 1.65em;
  place-items: center;
}

.dock-nav small {
  font-size: 0.64em;
}

.climate-zone {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 0.45em;
}

.climate-zone--right {
  justify-self: end;
}

.climate-zone span {
  min-width: 4.1em;
  text-align: center;
}

.climate-zone strong {
  font-size: 1.16em;
}

.climate-zone small {
  color: var(--muted);
  font-size: 0.65em;
}

.temperature-control {
  display: grid;
  width: 2em;
  height: 2em;
  color: #69758a;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: grid;
  padding: 2em;
  background: rgba(19, 28, 43, 0.48);
  backdrop-filter: blur(7px);
  place-items: center;
  animation: fade-in 140ms ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(36em, 88%);
  max-height: 82%;
  overflow: auto;
  padding: 1.45em;
  border-radius: 1.3em;
  background: #fff;
  box-shadow: 0 28px 70px rgba(23, 34, 56, 0.3);
  animation: modal-in 180ms ease-out;
}

.modal--wide {
  width: min(54em, 92%);
}

.modal--compact {
  width: min(29em, 88%);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(0.8em) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1em;
}

.modal-header h2,
.modal-header p {
  margin: 0;
}

.modal-header h2 {
  font-size: 1.15em;
}

.modal-header p {
  margin-top: 0.35em;
  color: var(--muted);
  font-size: 0.7em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.2em;
  gap: 0.85em;
}

.field {
  display: grid;
  gap: 0.4em;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label,
.field > span:first-child {
  color: #536077;
  font-size: 0.7em;
  font-weight: 600;
}

.field input {
  width: 100%;
  height: 2.8em;
  padding: 0 0.85em;
  color: var(--ink);
  font-size: 0.78em;
  border: 1px solid #dbe1ea;
  border-radius: 0.72em;
  background: #fafbfd;
}

.field input.has-error {
  border-color: #f2878f;
  background: #fff8f8;
}

.field-error {
  min-height: 1.2em;
  color: #dc4f5a;
  font-size: 0.62em;
}

.gender-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5em;
}

.gender-options button {
  height: 2.8em;
  color: #667287;
  font-size: 0.76em;
  border: 1px solid #dbe1ea;
  border-radius: 0.72em;
  background: #fff;
  cursor: pointer;
}

.gender-options button.is-selected {
  color: var(--blue-deep);
  border-color: #9eaeff;
  background: var(--blue-soft);
}

.bmi-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
  padding: 0.9em 1em;
  border-radius: 0.85em;
  background: #f4f6fb;
}

.bmi-preview span {
  color: var(--muted);
  font-size: 0.7em;
}

.bmi-preview strong {
  color: var(--blue-deep);
  font-size: 0.9em;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.2em;
  gap: 0.65em;
}

.login-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13em, 0.72fr);
  margin-top: 1em;
  gap: 1em;
}

.login-main {
  padding: 0.25em 0;
}

.login-display {
  min-height: 4.2em;
  padding: 0.9em 1em;
  border: 1px solid #dbe1ea;
  border-radius: 0.9em;
  background: #fafbfd;
}

.login-display label,
.login-display strong,
.login-display small {
  display: block;
}

.login-display label {
  color: var(--muted);
  font-size: 0.65em;
}

.login-display strong {
  min-height: 1.3em;
  margin-top: 0.3em;
  font-size: 1.05em;
  letter-spacing: 0.1em;
}

.login-display small {
  margin-top: 0.3em;
  color: #d9505c;
  font-size: 0.62em;
}

.agreement {
  display: flex;
  align-items: flex-start;
  margin-top: 0.85em;
  gap: 0.55em;
  color: #717d91;
  font-size: 0.66em;
  line-height: 1.5;
  cursor: pointer;
}

.agreement input {
  accent-color: var(--blue);
}

.agreement a {
  color: var(--blue-deep);
}

.numeric-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45em;
}

.numeric-keypad button {
  min-height: 2.8em;
  color: #344159;
  font-weight: 650;
  border: 0;
  border-radius: 0.72em;
  background: #f0f3f8;
  cursor: pointer;
}

.numeric-keypad button:active {
  background: #dfe5ef;
}

.code-dots {
  display: flex;
  margin: 1.1em 0 1.3em;
  gap: 0.45em;
}

.code-dots i {
  display: grid;
  width: 2.3em;
  height: 2.7em;
  font-style: normal;
  border: 1px solid #dbe1ea;
  border-radius: 0.6em;
  background: #fafbfd;
  place-items: center;
}

.code-dots i.is-filled::before {
  width: 0.48em;
  height: 0.48em;
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.login-status {
  color: var(--muted);
  font-size: 0.68em;
  line-height: 1.55;
}

.feedback-options {
  display: grid;
  margin-top: 1em;
  gap: 0.55em;
}

.feedback-option {
  display: flex;
  align-items: center;
  padding: 0.75em 0.85em;
  gap: 0.55em;
  color: #4d5a71;
  font-size: 0.72em;
  border: 1px solid var(--line);
  border-radius: 0.75em;
  cursor: pointer;
}

.feedback-option input {
  accent-color: var(--blue);
}

.history-list {
  display: grid;
  max-height: 22em;
  overflow-y: auto;
  margin-top: 1em;
  gap: 0.55em;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8em 0.9em;
  border: 1px solid var(--line);
  border-radius: 0.8em;
}

.history-item strong,
.history-item small {
  display: block;
}

.history-item strong {
  max-width: 24em;
  overflow: hidden;
  font-size: 0.74em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item small {
  margin-top: 0.25em;
  color: var(--muted);
  font-size: 0.6em;
}

.agent-card {
  display: grid;
  grid-template-columns: 4em 1fr;
  align-items: center;
  padding: 1em;
  gap: 1em;
  border-radius: 1em;
  background: var(--blue-soft);
}

.agent-card h3,
.agent-card p {
  margin: 0;
}

.agent-card h3 {
  font-size: 0.9em;
}

.agent-card p {
  margin-top: 0.35em;
  color: var(--muted);
  font-size: 0.68em;
  line-height: 1.55;
}

.agent-vitals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 1em;
  gap: 0.55em;
}

.agent-vitals div {
  padding: 0.8em 0.55em;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 0.8em;
}

.agent-vitals strong,
.agent-vitals small {
  display: block;
}

.agent-vitals strong {
  font-size: 0.8em;
}

.agent-vitals small {
  margin-top: 0.28em;
  color: var(--muted);
  font-size: 0.58em;
}

.toast {
  position: absolute;
  z-index: 120;
  bottom: 6.2em;
  left: 50%;
  max-width: 75%;
  padding: 0.72em 1em;
  color: #fff;
  font-size: 0.72em;
  line-height: 1.4;
  border-radius: 0.7em;
  background: rgba(34, 43, 58, 0.92);
  box-shadow: 0 10px 25px rgba(23, 31, 45, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.5em);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.is-hidden {
  display: none !important;
}

svg {
  display: block;
}

@media (max-width: 900px), (max-height: 620px) {
  .prototype-stage {
    padding: 0;
  }

  .cockpit {
    width: min(100vw, calc(100vh * 16 / 9));
    border-radius: 0;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* PDF fidelity pass: 1986 × 1146 in-car center display */
.cockpit {
  width: min(1440px, calc(100vw - 32px), calc((100vh - 74px) * 1986 / 1146));
  aspect-ratio: 1986 / 1146;
  border-radius: 14px;
  background: #fff;
}

.system-bar {
  grid-template-columns: 1fr auto 1fr;
  height: 3.1em;
  padding: 0 1.45em;
  color: #777f87;
  border: 0;
  background: #fff;
}

.voice-hint {
  justify-self: start;
  padding: 0;
  color: #8d949c;
  background: transparent;
}

.system-assistant {
  display: grid;
  width: 1.55em;
  height: 1.55em;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 0.78em;
  font-weight: 700;
  border-radius: 50%;
  background: #d8dde3;
  place-items: center;
}

.screen-handle {
  width: 3.25em;
  height: 0.32em;
  border-radius: 99px;
  background: #e4e6e9;
}

.system-cluster--right {
  gap: 0.45em;
  color: #7f878f;
  font-size: 0.68em;
  font-weight: 540;
}

.system-time {
  color: #7f878f;
  font-size: inherit;
  font-weight: 540;
}

.gear-badge {
  width: auto;
  height: auto;
  color: inherit;
  background: transparent;
}

.round-system-icon {
  font-size: 1.25em;
}

.system-square,
.system-dot {
  display: inline-block;
  width: 0.65em;
  height: 0.65em;
  border-radius: 2px;
  background: #788089;
}

.system-square--soft {
  background: #aab0b7;
}

.system-dot {
  width: 0.48em;
  height: 0.48em;
  border-radius: 50%;
}

.screen {
  top: 3.1em;
  bottom: 4.4em;
  background: #fff;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 3.45em;
  padding: 0 2.1em;
  background: #fff;
}

.main-nav__tabs {
  display: flex;
  align-self: stretch;
  gap: 2.1em;
}

.main-nav__tabs button {
  position: relative;
  padding: 0;
  color: #4e555d;
  font-size: 0.86em;
  font-weight: 560;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.main-nav__tabs button::after {
  position: absolute;
  right: 0;
  bottom: 0.82em;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.main-nav__tabs button.is-active {
  color: #222b35;
  font-weight: 680;
}

.main-nav__tabs button.is-active::after {
  background: #6476a1;
}

.main-nav__settings {
  display: grid;
  width: 2.2em;
  height: 2.2em;
  padding: 0;
  color: #747b83;
  border: 0;
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.route-shell--main .page-content {
  padding: 0 2.1em 1em;
}

.home-layout {
  grid-template-columns: minmax(0, 1fr) 19.5em;
  gap: 1.1em;
}

.home-main,
.home-aside {
  gap: 0.72em;
}

.home-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  padding: 2.2em 4.1em;
  flex-direction: column;
  color: #46505d;
  border-radius: 0.7em;
  background: #edf0f4;
}

.home-notice h2 {
  margin: 0 0 2.2em;
  font-size: 1.05em;
  font-weight: 580;
}

.home-notice ol {
  width: min(40em, 90%);
  margin: 0 0 2.5em;
  padding-left: 1.5em;
  color: #5d6671;
  font-size: 0.76em;
  line-height: 1.85;
}

.home-notice .primary-button {
  min-width: 8.6em;
}

.profile-card--rail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.25em;
  align-items: center;
  min-height: 9.9em;
  padding: 1.05em 1.15em;
  color: #303944;
  border: 0;
  border-radius: 0.7em;
  background: #e8ebef;
  box-shadow: none;
  text-align: left;
}

.profile-rail-copy h3 {
  margin: 0 0 0.7em;
  font-size: 0.85em;
}

.profile-rail-copy h3 small {
  font-size: 0.75em;
  font-weight: 520;
}

.profile-rail-copy p {
  margin: 0.22em 0;
  color: #555f6a;
  font-size: 0.67em;
}

.profile-rail-copy em {
  padding: 0.12em 0.45em;
  color: #fff;
  font-size: 0.76em;
  font-style: normal;
  border-radius: 0.25em;
  background: #6fc838;
}

.profile-card--rail .avatar {
  width: 6.9em;
  height: 7.5em;
  margin: 0 auto -1.05em;
  border: 0;
  background: #d4dbe3;
  box-shadow: none;
}

.profile-edit-trigger {
  position: absolute;
  top: 0.55em;
  right: 0.55em;
  display: grid;
  width: 1.7em;
  height: 1.7em;
  padding: 0;
  color: #737b85;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  place-items: center;
}

.home-shortcuts {
  display: grid;
  min-height: 0;
  grid-template-rows: repeat(3, 1fr);
  gap: 0.7em;
  flex: 1;
}

.home-shortcut {
  display: grid;
  align-items: center;
  min-height: 0;
  padding: 0.6em 1.05em;
  color: #353e49;
  border: 0;
  border-radius: 0.7em;
  background: #e8ebef;
  cursor: pointer;
  grid-template-columns: minmax(0, 1fr) 8.5em;
  text-align: left;
}

.home-shortcut strong {
  font-size: 0.76em;
  font-weight: 650;
}

.home-shortcut__art {
  display: grid;
  width: 8.5em;
  height: 4.8em;
  place-items: center;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 2.45em;
  padding: 0.62em 1.4em;
  border-radius: 0.35em;
}

.primary-button {
  background: #6176e9;
  box-shadow: none;
}

.dock {
  grid-template-columns: 1fr auto 1fr;
  height: 4.4em;
  padding: 0 1.75em;
  color: #69717a;
  border-top: 1px solid #eceef0;
  background: #fff;
  box-shadow: 0 -3px 12px rgba(50, 57, 65, 0.04);
}

.dock-nav {
  align-items: center;
  justify-content: flex-start;
  height: auto;
  gap: 2.5em;
}

.dock-nav--right {
  justify-content: flex-end;
}

.dock-nav button {
  display: grid;
  width: 2.5em;
  height: 2.5em;
  min-width: 2.5em;
  padding: 0;
  color: #6d757d;
  background: transparent;
  line-height: 0;
  place-items: center;
}

.dock-nav button::before {
  display: none;
}

.dock-icon {
  display: grid;
  width: 1.55em;
  height: 1.55em;
  line-height: 0;
  place-items: center;
}

.dock-list-icon,
.dock-seat-icon {
  font-size: 1.05em;
  font-weight: 700;
}

.climate-strip {
  display: flex;
  align-items: center;
  gap: 0.45em;
  color: #69717a;
}

.climate-strip button {
  display: grid;
  width: 1.8em;
  height: 1.8em;
  padding: 0;
  color: #7d858d;
  font-size: 1.2em;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  place-items: center;
}

.climate-strip strong {
  display: inline-grid;
  min-width: 2.35em;
  font-size: 0.88em;
  font-weight: 580;
  line-height: 1;
  place-items: center;
}

.climate-strip small {
  display: inline-grid;
  height: 1.8em;
  margin-left: -0.42em;
  font-size: 0.57em;
  line-height: 1;
  place-items: center;
}

.fan-glyph {
  margin-left: 0.9em;
}

.app-bar {
  grid-template-columns: 1fr auto 1fr;
  flex-basis: 3.45em;
  padding: 0 2.1em;
  border: 0;
  background: #fff;
}

.app-bar__left h1 {
  font-size: 0.95em;
}

.app-bar__left p,
.app-logo__mark,
.app-bar .stepper {
  display: none;
}

.app-bar .back-button {
  width: 1.7em;
  height: 1.7em;
  border: 0;
  border-radius: 0;
}

.page-content {
  padding: 0.35em 2.1em 1.1em;
}

.selection-layout--seat-map {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  flex-direction: column;
}

.seat-map {
  display: grid;
  align-items: center;
  width: min(70em, 90%);
  grid-template-columns: 1fr 18em 1fr;
  gap: 0.2em;
}

.selection-card {
  min-height: 7.2em;
  padding: 1em;
  border: 1px solid #d7dce2;
  border-radius: 0.7em;
  box-shadow: none;
}

.selection-card.is-selected,
.selection-card:hover {
  border-color: #7d92fb;
  box-shadow: none;
  transform: none;
}

.seat-label {
  position: absolute;
  top: 0.7em;
  left: 0.7em;
  padding: 0.2em 0.8em;
  color: #fff;
  font-size: 0.62em;
  border-radius: 99px;
  background: #3e68ff;
}

.selection-card h3 {
  margin-top: 0.6em;
}

.cabin-visual {
  position: relative;
  width: 18em;
  height: 25em;
  border: 0.8em solid #434a52;
  border-radius: 6em 6em 4em 4em;
  background: linear-gradient(180deg, #c7cdd3 0 25%, #2f353b 25% 100%);
  box-shadow: 0 0 2.2em rgba(53, 61, 69, 0.25);
}

.cabin-visual::before {
  position: absolute;
  top: 1.4em;
  right: 2em;
  left: 2em;
  height: 5.5em;
  border-radius: 2.8em 2.8em 1em 1em;
  background: #e6eaed;
  content: "";
}

.cabin-seat {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 5.4em;
  height: 6.5em;
  color: #fff;
  font-size: 0.68em;
  border-radius: 1.7em 1.7em 1em 1em;
  background: #1d2227;
  box-shadow: inset 0 -1.1em 0 #11161a, 0 3px 8px rgba(0, 0, 0, 0.25);
  place-items: center;
}

.cabin-seat--driver { top: 7.5em; left: 2em; }
.cabin-seat--passenger { top: 7.5em; right: 2em; }
.cabin-seat--rear-left { bottom: 1.8em; left: 2em; }
.cabin-seat--rear-right { right: 2em; bottom: 1.8em; }

.selection-footer {
  margin-top: 0.8em;
}

.person-selection-stage {
  position: relative;
  display: grid;
  max-width: none;
  place-items: center;
}

.cabin-visual--backdrop {
  opacity: 0.28;
  filter: blur(3px);
  transform: scale(0.95);
}

.person-selection-modal {
  position: absolute;
  z-index: 2;
  width: 36em;
  padding: 1.45em 2em 1.25em;
  border-radius: 0.65em;
  background: #e8eaed;
  box-shadow: 0 12px 32px rgba(47, 54, 61, 0.2);
  text-align: center;
}

.person-selection-modal h2 {
  margin: 0;
  font-size: 1em;
}

.person-selection-modal > p {
  margin: 0.4em 0 1.1em;
  color: #7d858d;
  font-size: 0.67em;
}

.person-card {
  min-height: 8.5em;
  padding: 0.7em;
  border: 0;
  background: transparent;
}

.person-card.is-selected {
  border: 0;
  border-radius: 1em;
  background: transparent;
  box-shadow: none;
}

.person-card.is-selected .avatar {
  box-shadow: 0 0 0 3px #f5a000;
}

.person-card .avatar {
  width: 3.9em;
  height: 3.9em;
  margin-bottom: 0.45em;
}

.scan-light {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #fff;
}

.subpage-title {
  display: flex;
  align-items: center;
  height: 3.45em;
  padding: 0 2.1em;
  gap: 0.3em;
}

.subpage-title button {
  display: grid;
  width: 1.8em;
  height: 1.8em;
  padding: 0;
  color: #404850;
  border: 0;
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.subpage-title strong {
  font-size: 0.85em;
}

.scan-center {
  position: absolute;
  top: 48%;
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  transform: translate(-50%, -50%);
}

.scan-portrait {
  position: relative;
  display: grid;
  width: 11em;
  height: 11em;
  padding: 0.45em;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(#71ca47 var(--scan-progress), #e7e9eb 0);
  cursor: pointer;
  place-items: center;
}

.scan-portrait::before {
  position: absolute;
  width: 10em;
  height: 10em;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.scan-portrait.is-warning {
  background: #ff9aa1;
  box-shadow: 0 0 0 1.3em rgba(255, 95, 107, 0.12);
}

.scan-silhouette {
  position: relative;
  z-index: 1;
  width: 8.8em;
  height: 8.8em;
  overflow: hidden;
  border-radius: 50%;
  background: #f0f1f2;
}

.scan-silhouette::before {
  position: absolute;
  top: 1.4em;
  left: 50%;
  width: 3.6em;
  height: 4em;
  border-radius: 48%;
  background: #d7d9dc;
  content: "";
  transform: translateX(-50%);
}

.scan-silhouette::after {
  position: absolute;
  right: 1.1em;
  bottom: -1.5em;
  left: 1.1em;
  height: 5.3em;
  border-radius: 50% 50% 0 0;
  background: #d7d9dc;
  content: "";
}

.scan-center h2 {
  margin: 1em 0 0.3em;
  color: #404850;
  font-size: 0.96em;
  font-weight: 570;
}

.scan-center p {
  margin: 0;
  color: #899098;
  font-size: 0.68em;
}

.scan-complete-line {
  margin-top: 0.75em;
  color: #555d65;
  font-size: 0.7em;
}

.scan-complete-line b {
  color: #fff;
  border-radius: 0.2em;
  background: #37bf3d;
}

.scan-alert-copy {
  position: absolute;
  top: 67%;
  left: 50%;
  color: #555d65;
  font-size: 0.82em;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  transform: translateX(-50%);
}

.result-canvas {
  display: grid;
  align-items: center;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(20em, 0.85fr) minmax(36em, 1.45fr);
  gap: 1em;
}

.result-copy {
  align-self: stretch;
  display: flex;
  justify-content: center;
  padding: 1em 1.5em;
  flex-direction: column;
}

.result-copy h2 {
  max-width: 18em;
  margin: 0;
  color: #3e4855;
  font-size: 1.22em;
  line-height: 1.35;
}

.result-canvas.is-abnormal .result-copy h2 {
  color: #e75f22;
}

.result-copy p,
.result-copy small {
  margin: 0.9em 0 0;
  color: #717984;
  font-size: 0.68em;
  line-height: 1.55;
}

.result-copy small {
  margin-top: 0.2em;
}

.result-diagnosis {
  min-height: 7em;
  margin-top: 1em;
  padding: 0.9em;
  color: #65707c;
  font-size: 0.67em;
  line-height: 1.7;
  border-radius: 0.45em;
  background: #e4e7ea;
}

.result-copy__actions {
  display: flex;
  margin-top: 1em;
  gap: 0.7em;
}

.result-copy__actions .secondary-button {
  min-width: 8.5em;
  color: #fff;
  border: 0;
  background: #59626e;
}

.body-result {
  position: relative;
  width: 38em;
  height: 30em;
  justify-self: center;
}

.body-figure {
  position: absolute;
  top: 1.2em;
  left: 50%;
  width: 9.5em;
  height: 25em;
  transform: translateX(-50%);
}

.result-bubble {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8em;
  height: 8em;
  padding: 0.6em;
  flex-direction: column;
  border: 0;
  border-radius: 50%;
  background: #f1f2f4;
}

.result-bubble small,
.result-bubble strong {
  display: block;
}

.result-bubble small {
  color: #7d858d;
  font-size: 0.6em;
}

.result-bubble strong {
  margin-top: 0.25em;
  color: #5a6370;
  font-size: 0.88em;
}

.result-bubble.is-abnormal {
  color: #fff;
  background: #ff6b00;
}

.result-bubble.is-abnormal small,
.result-bubble.is-abnormal strong {
  color: #fff;
}

.bubble-top-left { top: 0.5em; left: 1em; }
.bubble-top-right { top: 0.5em; right: 1em; }
.bubble-mid-left { top: 10em; left: 0; }
.bubble-mid-right { top: 10em; right: 0; }
.bubble-bottom-left { bottom: 1em; left: 2em; }

.consult-orb {
  position: absolute;
  right: 2em;
  bottom: 1em;
  width: 8.5em;
  height: 8.5em;
  color: #fff;
  font-size: 0.8em;
  font-weight: 650;
  border: 0;
  border-radius: 50%;
  background: #27bfee;
  cursor: pointer;
}

.archive-side,
.archive-row {
  border: 0;
  border-radius: 0.55em;
  background: #e6e9ed;
  box-shadow: none;
}

.archive-chart-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.consult-layout {
  grid-template-columns: minmax(0, 1fr) 19.5em;
  gap: 1.1em;
}

.chat-panel {
  border: 0;
  border-radius: 0.7em;
  background: #edf0f4;
  box-shadow: none;
}

.chat-toolbar {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5em 1em 0.25em;
  color: #7a828c;
  font-size: 0.64em;
}

.chat-toolbar div {
  display: flex;
  gap: 0.45em;
}

.chat-toolbar button {
  display: grid;
  width: 2.3em;
  height: 2.3em;
  padding: 0;
  color: #68717b;
  border: 1px solid #cfd5dc;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.chat-flow {
  order: 0;
  padding: 1em 1.2em 0.6em;
}

.chat-empty {
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 1em 1.15em;
  border-radius: 0.5em;
  background: #fff;
  text-align: left;
}

.chat-empty .doctor-avatar {
  display: none;
}

.chat-empty h2 {
  margin: 0.4em 0 0.25em;
  font-size: 0.86em;
}

.prompt-chips {
  justify-content: flex-start;
}

.chip {
  background: #fff;
}

.composer {
  order: 2;
  padding: 0.65em 0.8em 0.8em;
  border: 0;
  background: #edf0f4;
}

.composer textarea {
  border: 0;
  border-radius: 0.25em;
  background: #fff;
}

.consult-aside {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.consult-profile,
.consult-summary,
.health-context,
.aside-actions {
  border-radius: 0.7em;
}

.consult-profile {
  padding: 1em;
  background: #e8ebef;
}

.consult-summary div,
.health-context {
  background: #e8ebef;
}

.numeric-keypad {
  order: -1;
}

.login-body {
  grid-template-columns: minmax(13em, 0.75fr) minmax(0, 1.25fr);
}

@media (max-width: 900px), (max-height: 620px) {
  .cockpit {
    width: min(100vw, calc(100vh * 1986 / 1146));
  }
}

/* Final visual fidelity pass: preserve the PDF layout while improving material quality. */
.prototype-stage {
  min-height: 100vh;
  padding: 0;
  background: #e9edf3;
}

.cockpit {
  width: min(100vw, calc(100vh * 1986 / 1146));
  max-width: 1986px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: clamp(11px, 1.1vw, 22px);
}

.system-bar {
  border-bottom: 1px solid #f0f1f3;
}

.voice-hint,
.system-cluster--right {
  letter-spacing: 0.005em;
}

.route-shell--main .page-content {
  padding-bottom: 0.95em;
}

.home-notice {
  color: #3f4853;
  background: #e9edf2;
}

.home-notice h2 {
  font-weight: 620;
}

.home-notice ol {
  color: #59636f;
}

.profile-card--rail,
.home-shortcut,
.consult-profile,
.consult-summary div,
.health-context {
  background: #e3e7eb;
}

.profile-card--rail .avatar,
.agent-card .avatar {
  width: 6.9em;
  height: 7.5em;
  margin: 0 auto -1.05em;
  border: 0;
  border-radius: 0;
  background: url("./assets/generated/avatar-male.png") center bottom / contain no-repeat;
  box-shadow: none;
}

.profile-card--rail .avatar::before,
.profile-card--rail .avatar::after,
.agent-card .avatar::before,
.agent-card .avatar::after {
  display: none;
}

.profile-edit-trigger {
  color: #666f79;
  border: 1px solid rgba(117, 126, 136, 0.16);
  background: rgba(255, 255, 255, 0.86);
}

.home-shortcut {
  transition: background 140ms ease, transform 140ms ease;
}

.home-shortcut:hover {
  background: #dce2e8;
  transform: translateY(-1px);
}

.home-shortcut:active {
  transform: translateY(0);
}

.home-shortcut__art {
  color: #3ac2ef;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.primary-button {
  background: #5d74e6;
}

.primary-button:hover {
  background: #536ada;
}

.cabin-visual {
  width: 18em;
  height: 23.4em;
  border: 0;
  border-radius: 0;
  background: transparent url("./assets/generated/cabin-top-view-transparent.png") center / contain no-repeat;
  box-shadow: none;
}

.cabin-visual::before,
.cabin-seat {
  display: none;
}

.selection-card {
  background: rgba(255, 255, 255, 0.96);
}

.selection-card.is-selected {
  border-color: #5e78ef;
}

.person-selection-modal {
  width: 50em;
  padding: 2em 4em 1.65em;
  border: 1px solid #dde1e5;
  background: #e6e8eb;
  box-shadow: 0 0.6em 1.5em rgba(41, 48, 56, 0.15);
}

.person-card .avatar {
  width: 6.8em;
  height: 6.8em;
  border: 0;
  background: #686d70;
  box-shadow: none;
}

.person-card .avatar::before {
  top: 21%;
  width: 42%;
  height: 42%;
  background: #919598;
  box-shadow: none;
}

.person-card .avatar::after {
  right: 13%;
  bottom: -18%;
  left: 13%;
  height: 58%;
  background: #919598;
}

.person-card[data-person="mother"] .avatar::before {
  box-shadow: -0.9em 0.5em 0 -0.22em #919598, 0.9em 0.5em 0 -0.22em #919598;
}

.person-card.is-selected .avatar {
  box-shadow: 0 0 0 3px #f49a00;
}

.person-card {
  min-height: 11.5em;
}

.body-figure {
  width: 10.2em;
  height: 25.2em;
  object-fit: contain;
  filter: saturate(0.9) contrast(0.98);
}

.result-bubble {
  background: #f2f3f4;
  box-shadow: 0 0.18em 0.55em rgba(43, 52, 61, 0.11);
}

.consult-orb {
  background: #2dbced;
  box-shadow: 0 0.35em 0.8em rgba(45, 188, 237, 0.22);
}

/* Premium cockpit refinement pass: hierarchy, alignment and visual balance. */
:root {
  --brand: #5068df;
  --brand-strong: #344ed2;
  --brand-soft: #eef2ff;
  --aqua: #24b9db;
  --lime: #71c840;
  --ink: #202a38;
  --muted: #697484;
  --line: #dfe5ed;
  --panel: #ffffff;
  --canvas: #f6f8fb;
  --surface-soft: #e9edf3;
  --surface-mid: #e1e7ee;
  --shadow-soft: 0 0.45em 1.4em rgba(42, 54, 72, 0.08);
  --shadow-float: 0 0.8em 2.4em rgba(32, 43, 61, 0.14);
}

body {
  background:
    radial-gradient(circle at 24% 12%, rgba(80, 104, 223, 0.10), transparent 30%),
    linear-gradient(135deg, #eef2f7, #dfe5ee);
}

.prototype-stage {
  background:
    radial-gradient(circle at 72% 18%, rgba(36, 185, 219, 0.11), transparent 28%),
    linear-gradient(135deg, #eef2f7 0%, #e2e8f1 100%);
}

.cockpit {
  background: var(--canvas);
  font-weight: 500;
}

.system-bar {
  border-bottom: 1px solid rgba(217, 224, 234, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.voice-hint {
  gap: 0.64em;
  color: #677281;
}

.system-assistant {
  background: linear-gradient(145deg, #bfc8d4, #dce2e9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.screen {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(246, 248, 251, 0.88)),
    var(--canvas);
}

.main-nav {
  padding: 0 2.45em;
  border-bottom: 1px solid rgba(225, 230, 237, 0.65);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}

.main-nav__tabs {
  gap: 2.45em;
}

.main-nav__tabs button {
  color: #687281;
  letter-spacing: 0.01em;
}

.main-nav__tabs button.is-active {
  color: var(--ink);
}

.main-nav__tabs button.is-active::after {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #7d91ff);
}

.main-nav__settings,
.back-button,
.icon-button {
  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.main-nav__settings:hover,
.back-button:hover,
.icon-button:hover {
  color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.route-shell--main .page-content,
.page-content {
  padding-right: 2.45em;
  padding-left: 2.45em;
}

.home-layout {
  grid-template-columns: minmax(0, 1fr) clamp(18.2em, 22vw, 21em);
  gap: 1.25em;
}

.home-main,
.home-aside {
  gap: 0.92em;
}

.home-notice {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.08fr) minmax(17em, 0.72fr);
  align-items: center;
  justify-content: stretch;
  padding: 2.2em 2.6em 2.1em 2.8em;
  color: var(--ink);
  border: 1px solid rgba(218, 225, 235, 0.75);
  border-radius: 1.05em;
  background:
    radial-gradient(circle at 82% 28%, rgba(80, 104, 223, 0.16), transparent 26%),
    radial-gradient(circle at 78% 78%, rgba(36, 185, 219, 0.14), transparent 26%),
    linear-gradient(145deg, #ffffff 0%, #eef3f8 100%);
  box-shadow: var(--shadow-soft);
}

.home-notice::before {
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.7), transparent 36%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.9), transparent 48%);
  content: "";
}

.home-notice__copy,
.home-notice__visual {
  position: relative;
  z-index: 1;
}

.home-notice__copy {
  max-width: 44em;
}

.home-notice__eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.9em;
  padding: 0.32em 0.72em;
  color: var(--brand-strong);
  font-size: 0.68em;
  font-weight: 680;
  letter-spacing: 0.08em;
  border: 1px solid rgba(80, 104, 223, 0.16);
  border-radius: 999px;
  background: rgba(238, 242, 255, 0.9);
}

.home-notice h2 {
  max-width: 12em;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.55em, 2.55vw, 2.28em);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.18;
}

.home-notice__lead {
  max-width: 32em;
  margin: 0.78em 0 0;
  color: var(--muted);
  font-size: 0.82em;
  line-height: 1.7;
}

.home-notice ol {
  display: grid;
  width: min(41em, 100%);
  margin: 1.35em 0 1.55em;
  padding: 0;
  gap: 0.62em;
  color: #526071;
  font-size: 0.72em;
  line-height: 1.68;
  list-style: none;
}

.home-notice ol li {
  position: relative;
  padding-left: 1.45em;
}

.home-notice ol li::before {
  position: absolute;
  top: 0.63em;
  left: 0;
  width: 0.48em;
  height: 0.48em;
  border-radius: 50%;
  background: var(--brand);
  content: "";
  box-shadow: 0 0 0 0.28em rgba(80, 104, 223, 0.1);
}

.home-notice .primary-button {
  min-width: 9.8em;
  justify-content: center;
}

.home-notice__visual {
  display: grid;
  justify-self: end;
  width: min(22em, 100%);
  min-height: 22em;
  place-items: center;
}

.home-scan-orbit {
  position: relative;
  display: grid;
  width: 13.6em;
  height: 13.6em;
  border: 1px solid rgba(80, 104, 223, 0.12);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.96) 0 38%, rgba(238, 242, 255, 0.72) 39% 100%);
  box-shadow:
    inset 0 0 0 0.85em rgba(255, 255, 255, 0.55),
    0 0.9em 2.4em rgba(67, 84, 120, 0.13);
  place-items: center;
}

.home-scan-orbit::before,
.home-scan-orbit::after {
  position: absolute;
  border: 1px dashed rgba(80, 104, 223, 0.24);
  border-radius: 50%;
  content: "";
}

.home-scan-orbit::before {
  inset: 1.45em;
}

.home-scan-orbit::after {
  inset: 3em;
}

.home-scan-orbit__core {
  position: relative;
  z-index: 1;
  display: grid;
  width: 5.2em;
  height: 5.2em;
  color: #fff;
  border-radius: 1.55em;
  background: linear-gradient(145deg, var(--brand), #7187ff);
  box-shadow: 0 0.7em 1.45em rgba(80, 104, 223, 0.24);
  place-items: center;
}

.home-scan-orbit__dot {
  position: absolute;
  width: 0.72em;
  height: 0.72em;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 0.38em rgba(36, 185, 219, 0.12);
}

.home-scan-orbit__dot--one { top: 1.2em; right: 3.2em; }
.home-scan-orbit__dot--two { right: 1.15em; bottom: 4.4em; background: var(--lime); }
.home-scan-orbit__dot--three { bottom: 2.05em; left: 3.1em; background: #8b9aff; }

.home-vital-preview {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: -0.8em;
  padding: 0.72em;
  gap: 0.55em;
  border: 1px solid rgba(217, 224, 234, 0.7);
  border-radius: 0.95em;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.home-vital-preview span {
  display: grid;
  min-width: 0;
  padding: 0.55em 0.45em;
  text-align: center;
  border-radius: 0.7em;
  background: #f6f8fb;
}

.home-vital-preview small,
.home-vital-preview strong {
  display: block;
}

.home-vital-preview small {
  color: var(--muted);
  font-size: 0.58em;
}

.home-vital-preview strong {
  margin-top: 0.18em;
  color: var(--ink);
  font-size: 0.88em;
}

.profile-card--rail {
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) 7.55em;
  min-height: 10.4em;
  padding: 1.12em 1.18em;
  border: 1px solid rgba(214, 222, 232, 0.75);
  border-radius: 1em;
  background:
    radial-gradient(circle at 92% 8%, rgba(113, 135, 255, 0.14), transparent 38%),
    linear-gradient(145deg, #ffffff, #e9eef4);
  box-shadow: var(--shadow-soft);
}

.profile-card__label {
  display: block;
  margin-bottom: 0.48em;
  color: var(--muted);
  font-size: 0.6em;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.profile-rail-copy h3 {
  color: var(--ink);
  font-size: 0.94em;
  letter-spacing: -0.01em;
}

.profile-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45em;
}

.profile-metrics span {
  display: grid;
  min-width: 0;
  padding: 0.54em 0.42em;
  border-radius: 0.62em;
  background: rgba(255, 255, 255, 0.65);
}

.profile-metrics small,
.profile-metrics strong {
  display: block;
}

.profile-metrics small {
  color: var(--muted);
  font-size: 0.52em;
}

.profile-metrics strong {
  margin-top: 0.16em;
  color: var(--ink);
  font-size: 0.76em;
  white-space: nowrap;
}

.profile-metrics i {
  margin-left: 0.08em;
  color: var(--muted);
  font-size: 0.78em;
  font-style: normal;
}

.profile-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.65em;
  gap: 0.6em;
}

.profile-card__footer span {
  display: inline-flex;
  align-items: center;
  gap: 0.36em;
  color: var(--muted);
  font-size: 0.6em;
}

.profile-card__footer span i {
  width: 0.48em;
  height: 0.48em;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0.28em rgba(113, 200, 64, 0.12);
}

.profile-card__footer em {
  padding: 0.24em 0.58em;
  border-radius: 999px;
  background: linear-gradient(135deg, #70c742, #5eb338);
}

.profile-card__visual {
  position: relative;
  align-self: stretch;
  display: grid;
  min-width: 0;
  place-items: end center;
}

.profile-card__visual img {
  position: relative;
  z-index: 1;
  width: 7.2em;
  height: 8.2em;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 0.42em 0.5em rgba(42, 54, 72, 0.13));
}

.profile-avatar-halo {
  position: absolute;
  right: 0.28em;
  bottom: 0.24em;
  width: 6.9em;
  height: 6.9em;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(221, 229, 239, 0.72));
}

.profile-card--rail > .avatar {
  display: none;
}

.home-shortcuts {
  gap: 0.86em;
}

.home-shortcut {
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) 8.1em 1.4em;
  min-height: 0;
  padding: 0.72em 0.92em 0.72em 1.05em;
  border: 1px solid rgba(214, 222, 232, 0.76);
  border-radius: 1em;
  background: linear-gradient(145deg, #ffffff, #e8eef4);
  box-shadow: var(--shadow-soft);
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.home-shortcut:hover {
  border-color: rgba(80, 104, 223, 0.22);
  background: linear-gradient(145deg, #ffffff, #eef2ff);
  box-shadow: 0 0.55em 1.55em rgba(52, 72, 110, 0.11);
}

.home-shortcut__copy {
  display: grid;
  min-width: 0;
  gap: 0.24em;
}

.home-shortcut strong {
  color: var(--ink);
  font-size: 0.82em;
}

.home-shortcut small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.58em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-shortcut__art {
  width: 7.8em;
  height: 4.4em;
  color: var(--brand);
  opacity: 0.88;
}

.shortcut-artwork {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-shortcut__arrow {
  display: grid;
  width: 1.4em;
  height: 1.4em;
  color: #8a94a3;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  place-items: center;
  transition: transform 150ms ease, color 150ms ease;
}

.home-shortcut:hover .home-shortcut__arrow {
  color: var(--brand);
  transform: translateX(2px);
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  gap: 0.36em;
  min-height: 2.7em;
  border-radius: 0.72em;
  letter-spacing: 0.01em;
}

.primary-button {
  background: linear-gradient(145deg, var(--brand), #7085f3);
  box-shadow: 0 0.45em 1em rgba(80, 104, 223, 0.2);
}

.primary-button:hover {
  background: linear-gradient(145deg, var(--brand-strong), #6278eb);
}

.secondary-button {
  border-color: rgba(208, 217, 229, 0.9);
  background: rgba(255, 255, 255, 0.9);
}

.dock {
  height: 4.55em;
  padding: 0 2.15em;
  border-top: 1px solid rgba(218, 224, 232, 0.92);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -0.35em 1.2em rgba(40, 52, 70, 0.05);
  backdrop-filter: blur(18px);
}

.dock-nav {
  gap: clamp(1.4em, 3.2vw, 3.15em);
}

.dock-nav button {
  border-radius: 0.72em;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.dock-nav button:hover,
.dock-nav button.is-active {
  color: var(--brand);
  background: var(--brand-soft);
}

.climate-strip {
  padding: 0.2em 0.42em;
  border: 1px solid rgba(222, 228, 236, 0.86);
  border-radius: 999px;
  background: #f7f9fc;
}

.climate-strip button {
  border-radius: 50%;
}

.climate-strip button:hover {
  background: #eef2ff;
}

.app-bar,
.subpage-title {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.app-bar {
  border-bottom: 1px solid rgba(224, 230, 238, 0.72);
}

.seat-map {
  width: min(73em, 92%);
  grid-template-columns: minmax(13em, 1fr) 18em minmax(13em, 1fr);
  gap: 1.1em;
}

.selection-card {
  border-radius: 1em;
  background: linear-gradient(145deg, #ffffff, #eef2f7);
  box-shadow: var(--shadow-soft);
}

.selection-card.is-selected,
.selection-card:hover {
  border-color: rgba(80, 104, 223, 0.58);
  box-shadow: 0 0.55em 1.4em rgba(80, 104, 223, 0.13);
}

.selection-card.is-selected::after {
  top: 0.85em;
  right: 0.85em;
  width: 1.55em;
  height: 1.55em;
  background: var(--brand);
}

.seat-label {
  background: linear-gradient(145deg, var(--brand), #7287f5);
}

.person-selection-modal {
  border-radius: 1.05em;
  background:
    radial-gradient(circle at 70% 0%, rgba(80, 104, 223, 0.1), transparent 32%),
    linear-gradient(145deg, #ffffff, #e8edf3);
  box-shadow: var(--shadow-float);
}

.person-card {
  border-radius: 1em;
  transition: background 150ms ease, transform 150ms ease;
}

.person-card:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-1px);
}

.person-card.is-selected {
  background: rgba(255, 255, 255, 0.78);
}

.person-card.is-selected .avatar {
  box-shadow: 0 0 0 3px #f2a100, 0 0.45em 1.1em rgba(61, 70, 85, 0.14);
}

.scan-light {
  background:
    radial-gradient(circle at 50% 42%, rgba(113, 200, 64, 0.08), transparent 32%),
    #ffffff;
}

.scan-portrait {
  width: 12.2em;
  height: 12.2em;
  box-shadow:
    0 0 0 0.8em rgba(113, 200, 64, 0.08),
    0 0.9em 2.4em rgba(63, 76, 96, 0.12);
}

.scan-portrait::before {
  width: 11em;
  height: 11em;
}

.scan-silhouette {
  width: 9.55em;
  height: 9.55em;
  background: linear-gradient(145deg, #f5f7f9, #e5e9ee);
}

.scan-center h2 {
  color: var(--ink);
  font-size: 1.1em;
  font-weight: 650;
}

.result-canvas {
  grid-template-columns: minmax(22em, 0.8fr) minmax(36em, 1.38fr);
  gap: 1.3em;
}

.result-copy {
  position: relative;
  overflow: hidden;
  margin: 0.4em 0;
  padding: 2em;
  border: 1px solid rgba(216, 224, 235, 0.78);
  border-radius: 1.05em;
  background:
    radial-gradient(circle at 12% 0%, rgba(80, 104, 223, 0.14), transparent 36%),
    linear-gradient(145deg, #ffffff, #edf2f7);
  box-shadow: var(--shadow-soft);
}

.result-copy h2 {
  max-width: 19em;
  color: var(--ink);
  font-size: 1.34em;
  font-weight: 720;
  letter-spacing: -0.035em;
}

.result-copy p,
.result-copy small {
  color: var(--muted);
}

.result-diagnosis {
  border: 1px solid rgba(231, 95, 34, 0.12);
  border-radius: 0.82em;
  background: #fff5ee;
}

.result-copy__actions {
  margin-top: 1.3em;
}

.result-copy__actions .secondary-button {
  min-width: 8.7em;
  background: #394454;
}

.body-result {
  width: min(41em, 100%);
  height: 31em;
}

.body-figure {
  top: 1em;
  width: 10.8em;
  height: 26.2em;
  filter: drop-shadow(0 0.45em 0.7em rgba(35, 44, 60, 0.12)) saturate(0.95) contrast(1);
}

.result-bubble {
  width: 7.85em;
  height: 7.85em;
  border: 1px solid rgba(218, 225, 235, 0.8);
  background:
    radial-gradient(circle at 40% 28%, rgba(255, 255, 255, 0.96), rgba(240, 244, 248, 0.96));
  box-shadow: 0 0.32em 0.9em rgba(43, 52, 61, 0.08);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.result-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.48em 1.25em rgba(43, 52, 61, 0.11);
}

.result-bubble strong {
  color: var(--ink);
}

.result-bubble.is-abnormal {
  border-color: rgba(255, 107, 0, 0.18);
  background: linear-gradient(145deg, #ff7a1a, #f45f00);
  box-shadow: 0 0.45em 1.3em rgba(244, 95, 0, 0.18);
}

.bubble-top-left { top: 0.15em; left: 1.7em; }
.bubble-top-right { top: 0.15em; right: 1.7em; }
.bubble-mid-left { top: 10.7em; left: 0.2em; }
.bubble-mid-right { top: 10.7em; right: 0.2em; }
.bubble-bottom-left { bottom: 0.4em; left: 3.3em; }

.consult-orb {
  right: 3.3em;
  bottom: 0.4em;
  width: 7.85em;
  height: 7.85em;
  background: linear-gradient(145deg, #23bfe8, #168fda);
  box-shadow: 0 0.5em 1.25em rgba(24, 156, 219, 0.22);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.consult-orb:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.7em 1.55em rgba(24, 156, 219, 0.26);
}

.archive-layout,
.consult-layout {
  gap: 1.25em;
}

.archive-side,
.archive-row,
.chat-panel,
.consult-aside .profile-card--rail {
  border: 1px solid rgba(215, 223, 233, 0.78);
  border-radius: 1em;
  background: linear-gradient(145deg, #ffffff, #edf2f7);
  box-shadow: var(--shadow-soft);
}

.archive-row {
  padding: 1.02em 1.08em;
}

.archive-row__value {
  color: var(--ink);
}

.archive-chart-card {
  padding: 1em;
  border: 1px solid rgba(215, 223, 233, 0.72);
  border-radius: 1em;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.chat-panel {
  background: #eef2f6;
}

.chat-empty {
  border: 1px solid rgba(215, 223, 233, 0.72);
  border-radius: 1em;
  box-shadow: var(--shadow-soft);
}

.message-bubble {
  border: 1px solid rgba(220, 226, 234, 0.7);
  background: #ffffff;
  box-shadow: 0 0.22em 0.75em rgba(40, 52, 70, 0.05);
}

.message--user .message-bubble {
  border-color: transparent;
  background: linear-gradient(145deg, var(--brand), #7085f3);
}

.composer {
  background: #eef2f6;
}

.composer textarea {
  border: 1px solid rgba(215, 223, 233, 0.86);
  border-radius: 0.78em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.modal {
  border: 1px solid rgba(226, 232, 240, 0.78);
  box-shadow: var(--shadow-float);
}

.toast {
  border-radius: 999px;
  box-shadow: 0 0.6em 1.4em rgba(23, 31, 45, 0.16);
}

@media (max-width: 980px), (max-height: 680px) {
  .home-notice {
    grid-template-columns: minmax(0, 1fr) minmax(14em, 0.58fr);
    padding: 1.65em 2em;
  }

  .home-notice__visual {
    min-height: 18em;
  }

  .home-scan-orbit {
    width: 11.2em;
    height: 11.2em;
  }

  .home-vital-preview {
    width: 90%;
  }

  .result-canvas {
    grid-template-columns: minmax(20em, 0.88fr) minmax(32em, 1.2fr);
  }

  .body-result {
    width: 35em;
    height: 28em;
  }

  .result-bubble,
  .consult-orb {
    width: 7.15em;
    height: 7.15em;
  }
}

.modal-backdrop {
  background: rgba(44, 49, 55, 0.42);
  backdrop-filter: blur(5px);
}

.modal {
  border: 1px solid rgba(84, 94, 106, 0.1);
  border-radius: 0.65em;
  box-shadow: 0 1em 2.6em rgba(29, 35, 42, 0.22);
}

.modal--profile {
  width: min(65em, 92%);
}

.modal--profile .modal-header {
  justify-content: center;
  text-align: center;
}

.modal--profile .modal-header p,
.modal--profile .modal-header .icon-button,
.profile-modal-body .bmi-preview {
  display: none;
}

.profile-modal-body {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.35fr) minmax(10em, 0.65fr);
  gap: 2em;
}

.profile-modal-body .form-grid {
  margin-top: 1.2em;
}

.profile-modal-visual {
  display: grid;
  align-self: stretch;
  min-height: 15em;
  place-items: center;
}

.profile-modal-visual img {
  width: min(12em, 100%);
  height: 15em;
  object-fit: contain;
}

.modal--profile .modal-footer {
  justify-content: center;
}

.field input,
.gender-options button {
  border-radius: 0.32em;
  background: #fafafa;
}

.gender-options button.is-selected {
  color: #fff;
  border-color: #4f5966;
  background: #4f5966;
}

.bmi-preview {
  border-radius: 0.35em;
  background: #f0f2f6;
}

/* Precision pass: artwork proportions and optical alignment. */
.profile-card--rail {
  overflow: hidden;
}

.profile-card--rail .avatar {
  align-self: end;
  justify-self: center;
}

.shortcut-artwork {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.main-nav__settings,
.profile-edit-trigger,
.message-tools button,
.chat-toolbar button,
.composer-row .icon-button,
.dock-nav button {
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
}

.main-nav__settings svg,
.profile-edit-trigger svg,
.message-tools button svg,
.chat-toolbar button svg,
.composer-row .icon-button svg,
.dock-nav button svg,
.climate-strip .dock-icon svg {
  display: block;
  margin: auto;
  flex: none;
}

.message-avatar {
  line-height: 1;
  place-items: center;
}

.message-tools {
  min-height: 2em;
}

.message-tools button {
  flex: 0 0 2em;
}

.chat-toolbar div {
  align-items: center;
}

.consult-aside {
  gap: 0.72em;
}

.composer-row {
  align-items: center;
  height: 2.55em;
  grid-template-columns: 2.55em minmax(0, 1fr) auto;
}

.composer-row .icon-button,
.composer-row textarea,
.composer-row .primary-button {
  height: 100%;
  min-height: 0;
  align-self: center;
}

.composer-row textarea {
  padding-top: 0.62em;
  padding-bottom: 0.62em;
}

.climate-strip {
  min-height: 2.55em;
}

.climate-strip button {
  width: 1.45em;
  height: 1.45em;
}

.climate-strip .fan-glyph {
  display: grid;
  width: 1.55em;
  height: 1.55em;
  line-height: 0;
  place-items: center;
}

/* Global alignment pass for second-level controls and icon-only buttons. */
.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.tab-button,
.chip,
.gender-options button,
.numeric-keypad button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  text-align: center;
  line-height: 1.16;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  padding-top: 0;
  padding-bottom: 0;
}

.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.danger-button svg {
  width: 1em;
  height: 1em;
  flex: none;
}

.back-button,
.icon-button,
.main-nav__settings,
.profile-edit-trigger,
.chat-toolbar button,
.message-tools button,
.subpage-title button,
.dock-nav button,
.climate-strip button {
  display: grid;
  align-items: center;
  justify-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
}

.back-button > svg,
.subpage-title button > svg,
.icon-button > svg,
.main-nav__settings > svg,
.profile-edit-trigger > svg,
.chat-toolbar button > svg,
.message-tools button > svg {
  display: block;
  width: 1.05em;
  height: 1.05em;
  margin: 0;
  flex: none;
}

.profile-edit-trigger > svg,
.message-tools button > svg {
  width: 0.95em;
  height: 0.95em;
}

.dock-icon svg,
.metric-icon svg,
.mini-vital > span svg,
.doctor-avatar svg,
.app-logo__mark svg,
.result-badge svg {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  flex: none;
}

.metric-icon svg,
.mini-vital > span svg {
  width: 1.08em;
  height: 1.08em;
}

.doctor-avatar svg,
.app-logo__mark svg,
.result-badge svg {
  width: 1.22em;
  height: 1.22em;
}

.selection-footer,
.result-copy__actions,
.scan-actions,
.modal-footer,
.app-bar__actions,
.chat-toolbar div,
.message-tools {
  align-items: center;
}

.selection-card.is-selected::after,
.scan-complete-line b {
  display: inline-grid;
  line-height: 1;
  place-items: center;
}

.archive-row {
  align-items: center;
}

.archive-chart-card header {
  align-items: center;
}

.archive-row__value,
.status-tag,
.seat-label,
.profile-rail-copy em {
  line-height: 1;
}

.climate-strip {
  display: grid;
  align-items: center;
  justify-content: center;
  min-height: 2.55em;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 0.38em;
  line-height: 1;
}

.climate-strip button {
  width: 1.62em;
  height: 1.8em;
  color: #737c85;
  font-size: 1em;
}

.climate-chevron {
  display: block;
  width: 0.82em;
  height: 0.82em;
  stroke: currentColor;
  stroke-width: 2.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.climate-readout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25em;
  height: 1.8em;
  gap: 0.1em;
}

.climate-strip .climate-value,
.climate-strip .climate-speed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.8em;
  min-width: 0;
  font-size: 0.88em;
  line-height: 1;
}

.climate-strip .climate-speed {
  min-width: 0.9em;
}

.climate-strip small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.8em;
  margin-left: 0;
  font-size: 0.56em;
  line-height: 1;
  transform: translateY(-0.02em);
}

.climate-strip .fan-glyph {
  width: 1.68em;
  height: 1.68em;
  margin-left: 0.68em;
  margin-right: 0.02em;
}

.scan-portrait,
.result-bubble,
.consult-orb {
  align-items: center;
  justify-items: center;
  text-align: center;
  line-height: 1;
}

@media (max-width: 900px), (max-height: 620px) {
  .cockpit {
    font-size: clamp(9px, 1.1vw, 16px);
  }
}

/* 2026 visual refinement: unified premium cockpit material system. */
:root {
  font-family:
    "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --blue: #5269ce;
  --blue-deep: #4057bd;
  --blue-soft: #eef1fb;
  --ink: #222b38;
  --muted: #6e7887;
  --line: #e1e6ec;
  --canvas: #f6f8fa;
  --success: #3ca86d;
  --shadow-soft: 0 0.45em 1.3em rgba(54, 67, 85, 0.08);
  --radius-card: 1em;
  --radius-control: 0.58em;
}

.screen,
.route-shell--main .page-content,
.page-content {
  background: var(--canvas);
}

.main-nav,
.app-bar,
.subpage-title {
  border-bottom: 1px solid #edf0f3;
  background: rgba(252, 253, 254, 0.98);
}

.main-nav__tabs button::after {
  bottom: 0.55em;
  height: 0.18em;
  border-radius: 99px;
}

.main-nav__tabs button.is-active::after {
  background: var(--blue);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  min-height: 2.75em;
  border-radius: var(--radius-control);
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease,
    transform 160ms ease;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 0.35em 0.9em rgba(82, 105, 206, 0.2);
}

.primary-button:hover {
  background: var(--blue-deep);
  box-shadow: 0 0.45em 1.1em rgba(82, 105, 206, 0.24);
}

.primary-button:active,
.secondary-button:active,
.home-shortcut:active,
.selection-card:active,
.person-card:active {
  transform: scale(0.985);
}

.home-layout,
.consult-layout {
  grid-template-columns: minmax(0, 1fr) 21.7em;
  gap: 1em;
}

.home-main,
.home-aside,
.consult-aside {
  gap: 0.82em;
}

.home-notice {
  position: relative;
  display: grid;
  align-items: stretch;
  justify-content: initial;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 2.45em 2.65em;
  color: var(--ink);
  border: 1px solid #e2e7ec;
  border-radius: var(--radius-card);
  background: #eef2f6;
  box-shadow: var(--shadow-soft);
  grid-template-columns: minmax(0, 1.08fr) minmax(18em, 0.92fr);
  text-align: left;
}

.home-notice::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 0.22em;
  background: var(--blue);
  content: "";
}

.home-notice__copy {
  display: flex;
  justify-content: center;
  min-width: 0;
  flex-direction: column;
}

.home-notice__eyebrow {
  align-self: flex-start;
  margin-bottom: 0.7em;
  padding: 0.36em 0.72em;
  color: var(--blue-deep);
  font-size: 0.66em;
  font-weight: 680;
  border: 1px solid rgba(82, 105, 206, 0.2);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.7);
}

.home-notice h2 {
  max-width: 16em;
  margin: 0;
  color: #263141;
  font-size: 1.58em;
  font-weight: 720;
  letter-spacing: -0.025em;
  line-height: 1.28;
}

.home-notice__lead {
  max-width: 31em;
  margin: 0.75em 0 0;
  color: #596575;
  font-size: 0.78em;
  line-height: 1.65;
}

.home-notice ol {
  width: min(38em, 96%);
  margin: 1.4em 0 1.55em;
  padding: 0;
  color: #626d7b;
  font-size: 0.68em;
  line-height: 1.6;
  list-style: none;
  counter-reset: health-notice;
}

.home-notice li {
  position: relative;
  margin-top: 0.55em;
  padding-left: 2em;
  counter-increment: health-notice;
}

.home-notice li::before {
  position: absolute;
  top: 0.05em;
  left: 0;
  display: grid;
  width: 1.35em;
  height: 1.35em;
  color: var(--blue-deep);
  font-size: 0.86em;
  font-weight: 700;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  content: counter(health-notice);
  place-items: center;
}

.home-notice .primary-button {
  align-self: flex-start;
  min-width: 10.2em;
  justify-content: space-between;
}

.home-notice .primary-button svg {
  width: 1.05em;
  height: 1.05em;
}

.home-notice__visual {
  position: relative;
  display: grid;
  align-content: center;
  min-width: 0;
  padding-left: 1em;
  place-items: center;
}

.home-notice__visual::before {
  position: absolute;
  width: 19em;
  height: 19em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 0 0 1px rgba(82, 105, 206, 0.08);
  content: "";
}

.home-scan-orbit {
  position: relative;
  z-index: 1;
  display: grid;
  width: 12.5em;
  height: 12.5em;
  border: 1px solid rgba(82, 105, 206, 0.22);
  border-radius: 50%;
  place-items: center;
}

.home-scan-orbit::before,
.home-scan-orbit::after {
  position: absolute;
  border: 1px solid rgba(82, 105, 206, 0.13);
  border-radius: 50%;
  content: "";
}

.home-scan-orbit::before {
  inset: 1.15em;
}

.home-scan-orbit::after {
  inset: 2.25em;
}

.home-scan-orbit__core {
  z-index: 1;
  display: grid;
  width: 5.4em;
  height: 5.4em;
  color: var(--blue);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0.45em 1.3em rgba(64, 83, 127, 0.13);
  place-items: center;
}

.home-scan-orbit__dot {
  position: absolute;
  z-index: 2;
  width: 0.72em;
  height: 0.72em;
  border: 0.18em solid #eef2f6;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0.2em 0.45em rgba(61, 80, 132, 0.18);
}

.home-scan-orbit__dot--one { top: 1.1em; left: 2.15em; }
.home-scan-orbit__dot--two { top: 4.65em; right: -0.28em; }
.home-scan-orbit__dot--three { bottom: 0.55em; left: 3.4em; }

.home-vital-preview {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(19em, 100%);
  margin-top: -0.2em;
  padding: 0.75em 0.6em;
  border: 1px solid rgba(82, 105, 206, 0.1);
  border-radius: 0.78em;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0.4em 1.2em rgba(54, 67, 85, 0.09);
  grid-template-columns: repeat(3, 1fr);
}

.home-vital-preview span {
  display: grid;
  min-width: 0;
  padding: 0 0.65em;
  border-left: 1px solid #e7eaf0;
}

.home-vital-preview span:first-child {
  border-left: 0;
}

.home-vital-preview small,
.home-vital-preview strong {
  display: block;
}

.home-vital-preview small {
  color: #7d8794;
  font-size: 0.6em;
}

.home-vital-preview strong {
  margin-top: 0.16em;
  color: #303c4f;
  font-size: 0.86em;
  font-variant-numeric: tabular-nums;
}

.profile-card--rail {
  position: relative;
  display: grid;
  align-items: stretch;
  min-height: 12.3em;
  overflow: hidden;
  padding: 0;
  color: var(--ink);
  border: 1px solid #dfe4ea;
  border-radius: var(--radius-card);
  background: #eef1f5;
  box-shadow: var(--shadow-soft);
  grid-template-columns: minmax(0, 1fr) 8.75em;
}

.profile-card--rail::before {
  position: absolute;
  right: -2.4em;
  bottom: -3.2em;
  width: 13em;
  height: 13em;
  border-radius: 50%;
  background: rgba(82, 105, 206, 0.08);
  content: "";
}

.profile-rail-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  padding: 1.15em 0 0 1.25em;
  flex-direction: column;
}

.profile-card__label {
  color: #7c8693;
  font-size: 0.57em;
  font-weight: 580;
}

.profile-rail-copy h3 {
  display: flex;
  align-items: center;
  margin: 0.32em 0 0.8em;
  gap: 0.5em;
  color: #273140;
  font-size: 1em;
  font-weight: 720;
}

.profile-rail-copy h3 small {
  padding: 0.23em 0.55em;
  color: #697484;
  font-size: 0.56em;
  font-weight: 620;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.72);
}

.profile-metrics {
  display: grid;
  max-width: 12.5em;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-metrics > span {
  display: grid;
  padding: 0 0.62em;
  border-left: 1px solid rgba(125, 137, 151, 0.18);
}

.profile-metrics > span:first-child {
  padding-left: 0;
  border-left: 0;
}

.profile-metrics small,
.profile-metrics strong {
  display: block;
}

.profile-metrics small {
  color: #7c8795;
  font-size: 0.55em;
}

.profile-metrics strong {
  margin-top: 0.18em;
  color: #394555;
  font-size: 0.78em;
  font-variant-numeric: tabular-nums;
}

.profile-metrics strong i {
  margin-left: 0.15em;
  color: #7b8592;
  font-size: 0.7em;
  font-style: normal;
  font-weight: 500;
}

.profile-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.45em;
  margin-top: auto;
  padding-right: 0.8em;
  color: #697483;
  border-top: 1px solid rgba(125, 137, 151, 0.18);
  font-size: 0.6em;
}

.profile-card__footer > span {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
}

.profile-card__footer > span i {
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--success);
}

.profile-card__footer em {
  padding: 0.3em 0.62em;
  color: #267348;
  font-style: normal;
  font-weight: 700;
  border-radius: 99px;
  background: rgba(60, 168, 109, 0.12);
}

.profile-card__visual {
  position: relative;
  z-index: 1;
  align-self: stretch;
  min-width: 0;
}

.profile-avatar-halo {
  position: absolute;
  right: -0.4em;
  bottom: -1.5em;
  width: 10.6em;
  height: 10.6em;
  border: 1px solid rgba(82, 105, 206, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.profile-card__visual img {
  position: absolute;
  right: -0.1em;
  bottom: -0.28em;
  display: block;
  width: 9.35em;
  height: 9.35em;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 0.45em 0.5em rgba(58, 65, 77, 0.12));
}

.profile-edit-trigger {
  top: 0.72em;
  right: 0.72em;
  z-index: 4;
  width: 2em;
  height: 2em;
  color: #626d7b;
  border: 1px solid rgba(87, 99, 114, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0.22em 0.55em rgba(62, 72, 84, 0.08);
}

.home-shortcuts {
  gap: 0.78em;
}

.home-shortcut {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 0;
  overflow: hidden;
  padding: 0.72em 0.8em 0.72em 1.15em;
  color: var(--ink);
  border: 1px solid #e0e5eb;
  border-radius: var(--radius-card);
  background: #f8f9fb;
  box-shadow: 0 0.32em 0.9em rgba(54, 67, 85, 0.06);
  grid-template-columns: minmax(0, 1fr) 8.8em;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease,
    transform 160ms ease;
}

.home-shortcut::before {
  display: none;
}

.home-shortcut--health { --shortcut-accent: #3f8fc2; }
.home-shortcut--history { --shortcut-accent: #5d70c7; }
.home-shortcut--folder { --shortcut-accent: #438e83; }

.home-shortcut:hover {
  border-color: rgba(82, 105, 206, 0.28);
  background: #fff;
  box-shadow: 0 0.5em 1.15em rgba(54, 67, 85, 0.09);
  transform: translateY(-1px);
}

.home-shortcut__copy {
  position: relative;
  z-index: 2;
  display: grid;
  min-width: 0;
}

.home-shortcut__copy strong {
  color: #303a48;
  font-size: 0.82em;
  font-weight: 700;
}

.home-shortcut__copy small {
  margin-top: 0.35em;
  color: #818a96;
  font-size: 0.55em;
  line-height: 1.35;
  white-space: nowrap;
}

.home-shortcut__art {
  position: absolute;
  z-index: 2;
  right: 0.62em;
  bottom: 0;
  display: grid;
  width: 10.9em;
  height: 6.55em;
  color: var(--shortcut-accent);
  transform: none;
  place-items: end center;
}

.home-shortcut__art .shortcut-artwork {
  display: block;
  width: 10.5em;
  height: 6.3em;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 0.22em 0.3em rgba(45, 73, 119, 0.08));
}

.home-shortcut__arrow {
  position: absolute;
  z-index: 3;
  right: 0.88em;
  bottom: 0.82em;
  display: grid;
  width: 1.55em;
  height: 1.55em;
  color: var(--shortcut-accent);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  place-items: center;
}

.seat-map {
  width: min(74em, 94%);
  grid-template-columns: minmax(14em, 1fr) 18.5em minmax(14em, 1fr);
  gap: 1.2em;
}

.selection-card {
  min-height: 9.2em;
  padding: 1.3em;
  border: 1px solid #dfe4ea;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 0.35em 1em rgba(54, 67, 85, 0.06);
}

.selection-card.is-selected,
.selection-card:hover {
  border-color: rgba(82, 105, 206, 0.58);
  background: #fbfcff;
  box-shadow: 0 0.55em 1.3em rgba(82, 105, 206, 0.11);
}

.seat-label {
  top: 0.85em;
  left: 0.85em;
  background: var(--blue);
}

.cabin-visual {
  width: 18.5em;
  height: 24em;
  filter: drop-shadow(0 0.7em 1.2em rgba(50, 59, 70, 0.12));
}

.person-selection-modal {
  width: 50em;
  padding: 2.1em 3.3em 1.7em;
  border: 1px solid #dfe4ea;
  border-radius: 1.15em;
  background: rgba(250, 251, 252, 0.97);
  box-shadow: 0 1em 2.7em rgba(40, 50, 63, 0.18);
}

.person-card {
  min-height: 12em;
  border: 1px solid transparent;
  border-radius: 0.9em;
  background: rgba(238, 241, 245, 0.55);
}

.person-card:hover,
.person-card.is-selected {
  border-color: rgba(82, 105, 206, 0.36);
  background: #fff;
  box-shadow: 0 0.35em 1em rgba(54, 67, 85, 0.08);
}

.person-card[data-person="self"] .avatar {
  background: #e8ecf2 url("./assets/generated/avatar-male.png") center 28% / 118% auto no-repeat;
}

.person-card[data-person="self"] .avatar::before,
.person-card[data-person="self"] .avatar::after {
  display: none;
}

.scan-light {
  background: #f7f9fb;
}

.scan-center::before {
  position: absolute;
  top: -2.1em;
  left: 50%;
  width: 25em;
  height: 25em;
  border: 1px solid rgba(82, 105, 206, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 0.7em 2em rgba(54, 67, 85, 0.06);
  content: "";
  transform: translateX(-50%);
}

.scan-portrait,
.scan-center h2,
.scan-center p,
.scan-complete-line {
  position: relative;
  z-index: 1;
}

.scan-portrait {
  width: 12em;
  height: 12em;
  box-shadow: 0 0 0 0.75em rgba(82, 105, 206, 0.06), 0 0.7em 1.6em rgba(50, 62, 80, 0.1);
}

.scan-portrait::before {
  width: 10.8em;
  height: 10.8em;
}

.scan-silhouette {
  width: 9.45em;
  height: 9.45em;
  background: #eef1f5;
}

.result-canvas {
  gap: 1.25em;
}

.result-copy {
  align-self: center;
  min-height: 23em;
  padding: 2em;
  border: 1px solid #e1e6ec;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.result-copy h2 {
  color: #2c3747;
  font-size: 1.3em;
}

.body-result {
  overflow: hidden;
  border: 1px solid #e1e6ec;
  border-radius: 1.35em;
  background: #f0f3f7;
  box-shadow: var(--shadow-soft);
}

.body-result::before {
  position: absolute;
  top: 1.4em;
  bottom: 1.4em;
  left: 50%;
  width: 13em;
  border: 1px solid rgba(82, 105, 206, 0.1);
  border-radius: 7em;
  background: rgba(255, 255, 255, 0.72);
  content: "";
  transform: translateX(-50%);
}

.body-figure {
  z-index: 1;
  top: 1.45em;
  width: 9.8em;
  height: 24.7em;
  filter: saturate(0.78) contrast(1.02) drop-shadow(0 0.5em 0.65em rgba(57, 68, 84, 0.12));
}

.result-bubble {
  z-index: 2;
  width: 9.2em;
  height: 5.65em;
  padding: 0.7em 1em;
  border: 1px solid #e0e5eb;
  border-radius: 1em;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0.35em 1em rgba(43, 52, 61, 0.09);
}

.result-bubble small {
  color: #7a8492;
}

.result-bubble strong {
  color: #354154;
  font-size: 0.94em;
}

.bubble-top-left { top: 2.2em; left: 1.4em; }
.bubble-top-right { top: 2.2em; right: 1.4em; }
.bubble-mid-left { top: 11.8em; left: 0.8em; }
.bubble-mid-right { top: 11.8em; right: 0.8em; }
.bubble-bottom-left { bottom: 1.8em; left: 2em; }

.consult-orb {
  z-index: 2;
  right: 2em;
  bottom: 1.8em;
  width: 8em;
  height: 5.7em;
  border-radius: 1em;
  background: var(--blue);
  box-shadow: 0 0.45em 1.1em rgba(82, 105, 206, 0.22);
}

.archive-side,
.archive-row,
.archive-chart-card,
.diagnosis-panel {
  border: 1px solid #e1e6ec;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 0.3em 0.9em rgba(54, 67, 85, 0.055);
}

.archive-side {
  padding: 1.55em;
}

.archive-row {
  min-height: 5.2em;
  padding: 1em 1.1em;
}

.archive-row .metric-icon {
  display: grid;
  width: 2.45em;
  height: 2.45em;
  color: var(--blue);
  border-radius: 0.68em;
  background: var(--blue-soft);
  place-items: center;
}

.archive-chart-card {
  padding: 1.1em 1.2em 0.9em;
}

.chat-panel {
  border: 1px solid #e1e6ec;
  border-radius: var(--radius-card);
  background: #f0f3f7;
  box-shadow: var(--shadow-soft);
}

.chat-toolbar {
  padding: 0.62em 1em 0.4em;
}

.chat-empty {
  padding: 1.3em 1.4em;
  border: 1px solid #e5e9ee;
  border-radius: 0.82em;
  box-shadow: 0 0.28em 0.8em rgba(54, 67, 85, 0.05);
}

.chip {
  border-color: #dfe4ea;
  border-radius: 0.58em;
}

.chip:hover {
  color: var(--blue-deep);
  border-color: rgba(82, 105, 206, 0.34);
  background: var(--blue-soft);
}

.composer {
  background: #f0f3f7;
}

.composer textarea {
  border: 1px solid #e1e5ea;
  border-radius: 0.58em;
}

.modal {
  border-radius: 1.1em;
  background: #fbfcfd;
}

.field input,
.gender-options button,
.numeric-keypad button {
  border-radius: 0.58em;
}

.dock {
  border-top-color: #e8ecf0;
  background: rgba(252, 253, 254, 0.98);
  box-shadow: 0 -0.35em 1em rgba(50, 57, 65, 0.045);
}

@media (prefers-reduced-motion: no-preference) {
  .home-scan-orbit__core {
    animation: health-orbit-pulse 2.8s ease-in-out infinite;
  }

  .home-scan-orbit__dot--one,
  .home-scan-orbit__dot--three {
    animation: health-dot-pulse 2.4s ease-in-out infinite;
  }

  .home-scan-orbit__dot--three {
    animation-delay: 0.8s;
  }
}

@keyframes health-orbit-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0.45em 1.3em rgba(64, 83, 127, 0.13); }
  50% { transform: scale(1.035); box-shadow: 0 0.65em 1.6em rgba(64, 83, 127, 0.18); }
}

@keyframes health-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 0.72; }
  50% { transform: scale(1.25); opacity: 1; }
}

@media (max-width: 900px), (max-height: 620px) {
  .home-layout,
  .consult-layout {
    grid-template-columns: minmax(0, 1fr) 21.7em;
  }

  .home-notice {
    padding: 1.8em 2em;
  }
}

/* Targeted layout refinement from review: remove home illustration and normalize profile form rows. */
.home-notice {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  padding: 2.7em 3.2em;
}

.home-notice__visual {
  display: none;
}

.home-notice__copy {
  display: grid;
  width: min(45em, 100%);
  justify-items: start;
  align-content: center;
}

.home-notice h2 {
  max-width: 12.8em;
}

.home-notice__lead {
  max-width: 34em;
}

.home-notice ol {
  width: 100%;
  max-width: 42em;
}

.profile-modal-body .form-grid {
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.05em;
  row-gap: 0.86em;
}

.profile-modal-body .field {
  min-width: 0;
}

.profile-modal-body .field--wide {
  grid-column: 1 / -1;
}

.field--gender {
  display: grid;
  gap: 0.45em;
}

.field--gender .gender-options {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72em;
}

.field--gender .gender-options button {
  width: 100%;
  min-height: 2.9em;
}

.profile-modal-body .field label,
.profile-modal-body .field > span:first-child {
  display: block;
  min-height: 1.2em;
  line-height: 1.2;
}

.profile-modal-body .field input {
  width: 100%;
}

/* Targeted review refinement: add subtle gray texture to seat selection cards. */
.seat-map .selection-card {
  overflow: hidden;
  border-color: rgba(207, 216, 226, 0.86);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.78), transparent 30%),
    radial-gradient(circle at 82% 86%, rgba(202, 211, 222, 0.28), transparent 34%),
    repeating-linear-gradient(
      135deg,
      rgba(122, 136, 154, 0.035) 0,
      rgba(122, 136, 154, 0.035) 1px,
      transparent 1px,
      transparent 9px
    ),
    linear-gradient(145deg, #f9fafc 0%, #edf1f5 100%);
}

.seat-map .selection-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent 48%),
    radial-gradient(circle at 50% 108%, rgba(64, 76, 92, 0.08), transparent 42%);
  content: "";
}

.seat-map .selection-card h3,
.seat-map .selection-card p,
.seat-map .selection-card .seat-label {
  position: relative;
  z-index: 1;
}

.seat-map .selection-card:hover,
.seat-map .selection-card.is-selected {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.86), transparent 30%),
    radial-gradient(circle at 82% 86%, rgba(80, 104, 223, 0.12), transparent 34%),
    repeating-linear-gradient(
      135deg,
      rgba(80, 104, 223, 0.04) 0,
      rgba(80, 104, 223, 0.04) 1px,
      transparent 1px,
      transparent 9px
    ),
    linear-gradient(145deg, #ffffff 0%, #eef2ff 100%);
}

/* Targeted archive-side enrichment: make the summary area feel complete and balanced. */
.archive-side {
  position: relative;
  overflow: hidden;
}

.archive-side::before {
  position: absolute;
  top: -4em;
  right: -5em;
  width: 13em;
  height: 13em;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82, 105, 206, 0.12), transparent 68%);
  content: "";
}

.archive-side > * {
  position: relative;
  z-index: 1;
}

.archive-date {
  display: inline-flex;
  width: fit-content;
  padding: 0.32em 0.64em;
  color: #667184;
  font-weight: 650;
  border-radius: 999px;
  background: #f3f6fa;
}

.archive-side h2 {
  margin-top: 0.82em;
  letter-spacing: -0.035em;
  line-height: 1.22;
}

.archive-side > p {
  max-width: 28em;
}

.archive-overview {
  display: grid;
  margin-top: 1.4em;
  gap: 0.82em;
}

.archive-score-card {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 8.2em;
  padding: 1em 1.05em;
  align-content: center;
  border: 1px solid rgba(82, 105, 206, 0.13);
  border-radius: 0.95em;
  background:
    radial-gradient(circle at 90% 10%, rgba(82, 105, 206, 0.18), transparent 36%),
    linear-gradient(145deg, #f9fbff, #eef2ff);
}

.archive-score-card::after {
  position: absolute;
  right: 0.9em;
  bottom: 0.8em;
  width: 4.2em;
  height: 4.2em;
  border: 0.55em solid rgba(82, 105, 206, 0.08);
  border-radius: 50%;
  content: "";
}

.archive-score-card span,
.archive-score-card small,
.archive-score-card strong {
  position: relative;
  z-index: 1;
  display: block;
}

.archive-score-card span {
  color: #667184;
  font-size: 0.66em;
  font-weight: 650;
}

.archive-score-card strong {
  margin-top: 0.08em;
  color: #293548;
  font-size: 2.25em;
  font-weight: 760;
  letter-spacing: -0.06em;
  line-height: 1;
}

.archive-score-card small {
  margin-top: 0.5em;
  color: #6f7a8b;
  font-size: 0.64em;
  line-height: 1.55;
}

.archive-side-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.66em;
}

.archive-side-metrics span {
  display: grid;
  min-height: 4.35em;
  padding: 0.82em 0.9em;
  align-content: center;
  border: 1px solid #e4e9ef;
  border-radius: 0.82em;
  background: #f8fafc;
}

.archive-side-metrics small,
.archive-side-metrics strong {
  display: block;
}

.archive-side-metrics small {
  color: #748092;
  font-size: 0.6em;
}

.archive-side-metrics strong {
  margin-top: 0.18em;
  color: #263244;
  font-size: 1.06em;
  letter-spacing: -0.025em;
}

.archive-advice,
.archive-trend-list {
  padding: 0.92em 1em;
  border: 1px solid #e4e9ef;
  border-radius: 0.86em;
  background: rgba(248, 250, 252, 0.88);
}

.archive-advice strong {
  display: block;
  color: #313b4b;
  font-size: 0.72em;
}

.archive-advice p {
  margin: 0.45em 0 0;
  color: #697586;
  font-size: 0.64em;
  line-height: 1.65;
}

.archive-trend-list {
  display: grid;
  gap: 0.68em;
}

.archive-trend-list div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.55em;
}

.archive-trend-list i {
  width: 0.5em;
  height: 0.5em;
  margin-top: 0.36em;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0.28em rgba(82, 105, 206, 0.1);
}

.archive-trend-list span {
  color: #667184;
  font-size: 0.64em;
  line-height: 1.58;
}

.archive-side .switch-row {
  margin-top: auto;
}

/* Targeted archive metrics balance: fill lower whitespace with secondary insight cards. */
.archive-metrics {
  align-content: start;
  min-height: 100%;
  gap: 0.86em;
}

.archive-metrics .diagnosis-panel {
  min-height: 5.5em;
}

.archive-insight-card,
.archive-action-card {
  min-width: 0;
  padding: 1.08em 1.15em;
  border: 1px solid #e1e6ec;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 0.3em 0.9em rgba(54, 67, 85, 0.055);
}

.archive-insight-card {
  display: grid;
  gap: 0.95em;
}

.archive-insight-card header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.72em;
}

.archive-insight-card header > span {
  display: grid;
  width: 2.45em;
  height: 2.45em;
  color: var(--blue);
  border-radius: 0.68em;
  background: var(--blue-soft);
  place-items: center;
}

.archive-insight-card h3,
.archive-insight-card p,
.archive-action-card h3 {
  margin: 0;
}

.archive-insight-card h3,
.archive-action-card h3 {
  color: #263244;
  font-size: 0.88em;
}

.archive-insight-card p {
  margin-top: 0.28em;
  color: #718094;
  font-size: 0.64em;
  line-height: 1.45;
}

.archive-insight-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72em;
}

.archive-insight-track span {
  display: grid;
  gap: 0.34em;
  min-width: 0;
}

.archive-insight-track i {
  position: relative;
  display: block;
  height: 0.42em;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.archive-insight-track i::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--track);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #7f93f4);
  content: "";
}

.archive-insight-track small {
  color: #748092;
  font-size: 0.58em;
}

.archive-insight-track strong {
  color: #2b3647;
  font-size: 0.75em;
}

.archive-action-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 0.78em;
}

.archive-action-card div {
  display: grid;
  gap: 0.48em;
}

.archive-action-card span {
  position: relative;
  padding-left: 1.1em;
  color: #667184;
  font-size: 0.66em;
  line-height: 1.5;
}

.archive-action-card span::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 0.38em;
  height: 0.38em;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

/* Targeted correction: use only original archive elements and stretch them to fill the right viewport. */
.archive-main {
  height: 100%;
}

.archive-metrics {
  height: 100%;
  min-height: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows:
    minmax(6.35em, 1fr)
    minmax(6.35em, 1fr)
    minmax(6.35em, 1fr)
    minmax(7em, 0.82fr);
  align-content: stretch;
}

.archive-metrics .archive-row {
  height: 100%;
  min-height: 0;
  padding-top: 1.2em;
  padding-bottom: 1.2em;
}

.archive-metrics .diagnosis-panel {
  display: flex;
  min-height: 0;
  padding: 1.18em 1.25em;
  flex-direction: column;
  justify-content: center;
}

.archive-metrics .diagnosis-panel p {
  max-width: 78em;
}

/* Targeted login refinement: stable keypad input and balanced bottom row. */
.numeric-keypad button[data-key="#"] {
  color: #7a8594;
  font-size: 0.92em;
}

.login-display {
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.login-display:focus-within,
.login-display:hover {
  border-color: rgba(82, 105, 206, 0.28);
  box-shadow: 0 0.35em 1em rgba(82, 105, 206, 0.08);
}

.login-display strong {
  min-height: 1.45em;
  white-space: nowrap;
}

/* Vehicle touch interaction policy: remove all mouse-hover visual effects. */
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.main-nav__settings:hover,
.back-button:hover,
.icon-button:hover,
.home-shortcut:hover,
.home-shortcut:hover .home-shortcut__arrow,
.selection-card:hover,
.seat-map .selection-card:hover,
.person-card:hover,
.result-bubble:hover,
.consult-orb:hover,
.dock-nav button:hover,
.climate-strip button:hover,
.chip:hover,
.login-display:hover {
  transform: none !important;
}

.primary-button:hover {
  background: var(--blue) !important;
  box-shadow: 0 0.35em 0.9em rgba(82, 105, 206, 0.2) !important;
}

.home-shortcut:hover {
  border-color: #e1e6ec !important;
  background: #fff !important;
  box-shadow: 0 0.3em 0.9em rgba(54, 67, 85, 0.055) !important;
}

.home-shortcut:hover .home-shortcut__arrow {
  color: #8a94a3 !important;
}

.dock-nav button:hover:not(.is-active) {
  color: #6d757d !important;
  background: transparent !important;
}

.climate-strip button:hover {
  background: transparent !important;
}

.chip:hover {
  color: #536077 !important;
  border-color: var(--line) !important;
  background: #fff !important;
}

.main-nav__settings:hover {
  color: #747b83 !important;
  background: transparent !important;
}

.back-button:hover,
.icon-button:hover {
  color: #4e5c72 !important;
  background: #fff !important;
}

.selection-card:hover:not(.is-selected) {
  border-color: #d7dce2 !important;
  box-shadow: var(--shadow-soft) !important;
}

.seat-map .selection-card:hover:not(.is-selected) {
  border-color: rgba(207, 216, 226, 0.86) !important;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.78), transparent 30%),
    radial-gradient(circle at 82% 86%, rgba(202, 211, 222, 0.28), transparent 34%),
    repeating-linear-gradient(
      135deg,
      rgba(122, 136, 154, 0.035) 0,
      rgba(122, 136, 154, 0.035) 1px,
      transparent 1px,
      transparent 9px
    ),
    linear-gradient(145deg, #f9fafc 0%, #edf1f5 100%) !important;
}

.person-card:hover:not(.is-selected) {
  background: transparent !important;
}

.result-bubble:hover {
  box-shadow: 0 0.32em 0.9em rgba(43, 52, 61, 0.08) !important;
}

.consult-orb:hover {
  box-shadow: 0 0.5em 1.25em rgba(24, 156, 219, 0.22) !important;
}

.login-display:hover:not(:focus-within) {
  border-color: #dbe1ea !important;
  box-shadow: none !important;
}

/* Targeted consult empty-state texture: enrich background without changing content layout. */
.chat-empty {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-color: #dde5ef;
  background:
    radial-gradient(circle at 86% 18%, rgba(82, 105, 206, 0.13), transparent 28%),
    radial-gradient(circle at 16% 88%, rgba(111, 154, 213, 0.10), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f2f6fb 100%);
}

.chat-empty::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(92, 111, 137, 0.035) 0,
      rgba(92, 111, 137, 0.035) 1px,
      transparent 1px,
      transparent 10px
    );
  content: "";
}

.chat-empty::after {
  display: none;
  content: none;
}

.chat-empty h2,
.chat-empty > p,
.chat-empty .prompt-chips {
  position: relative;
  z-index: 1;
}
