/* Demo stage layout: header, phone | device | evidence columns, corner notice, and the
   standalone simulated SMS page. */

body {
  background-color: #f2eff6;
  background-image:
    radial-gradient(1200px 600px at 12% -10%, rgba(122, 98, 160, 0.14), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(243, 211, 156, 0.16), transparent 55%),
    linear-gradient(180deg, #f5f2f9 0%, #eeebf3 100%);
  background-attachment: fixed;
}

.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.stage-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
  padding: var(--sp-2) var(--sp-6);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}

.brand-mark {
  color: var(--brand-700);
  display: inline-grid;
}

.brand-name {
  font-size: var(--fs-17);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  line-height: 1.25;
}

.brand-sub {
  font-size: var(--fs-12);
  color: var(--ink-600);
  line-height: 1.3;
}

.header-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--sp-2);
}

.header-sep {
  width: 1px;
  height: 24px;
  margin: 0 var(--sp-1);
  background: var(--line-strong);
}

.planner-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 34px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-600);
  font-size: var(--fs-13);
  font-weight: 600;
}

button.planner-badge:hover {
  border-color: var(--brand-400);
  color: var(--ink-900);
}

.planner-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-500);
}

.planner-badge.badge-model {
  color: var(--brand-600);
  border-color: var(--brand-200);
  background: var(--brand-100);
}

.planner-badge.badge-model .dot {
  background: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(88, 65, 116, 0.18);
}

.evidence-toggle {
  display: none;
}

.judge-strip {
  padding: 7px var(--sp-6);
  background: var(--brand-100);
  border-bottom: 1px solid var(--brand-200);
  color: var(--brand-600);
  font-size: var(--fs-13);
  text-align: center;
}

/* Public mode's demo notice: first on the main page and the phone page, never closable. */
.public-banner {
  padding: var(--sp-2) var(--sp-6);
  background: var(--warn-bg);
  border-bottom: 2px solid var(--warn-line);
  color: var(--warn-fg);
  font-size: var(--fs-13);
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.public-banner:empty {
  display: none;
}

.public-details {
  padding: var(--sp-2) var(--sp-6);
  font-size: var(--fs-13);
  line-height: 1.45;
}

.public-details summary {
  cursor: pointer;
}

/* Columns */
.stage-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--sp-6);
  padding: var(--sp-6);
  --col-h: calc(100vh - var(--header-h) - 48px);
}

.stage[data-view="judge"] .stage-main {
  --col-h: calc(100vh - var(--header-h) - 84px);
}

.col {
  min-width: 0;
}

.col-phone {
  flex: 0 0 var(--phone-w);
  width: var(--phone-w);
}

/* The device frame keeps its four corners: only the white screen inside it scrolls. */
.col-device {
  flex: 0 0 var(--device-w);
  width: var(--device-w);
  height: var(--col-h);
  max-height: 880px;
  min-height: 560px;
  display: flex;
  flex-direction: column;
}

.col-evidence {
  flex: 1 1 480px;
  min-width: 380px;
  max-width: 560px;
  height: var(--col-h);
  max-height: 880px;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  overflow: hidden;
}

/* Phone frame */
.phone-frame {
  height: var(--col-h);
  max-height: 880px;
  min-height: 560px;
  padding: 6px;
  border-radius: var(--r-phone);
  background: var(--brand-900);
  box-shadow: var(--sh-phone), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: calc(var(--r-phone) - 6px);
  overflow: hidden;
  background: var(--brand-50);
  isolation: isolate;
}

.status-bar {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  height: 34px;
  padding: 2px 22px 0;
  background: var(--brand-700);
  color: #fff;
  font-size: var(--fs-12);
}

.status-time {
  font-weight: 600;
  font-size: var(--fs-14);
}

.status-label {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--brand-200);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-icons {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}

.app-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-5) var(--sp-4);
  background-color: var(--brand-800);
  background-image: linear-gradient(180deg, var(--brand-700) 0%, var(--brand-800) 100%);
  color: #fff;
}

.app-mark {
  color: rgba(255, 255, 255, 0.12);
  display: inline-grid;
}

.app-mark .mark rect {
  fill: rgba(255, 255, 255, 0.12);
}

.app-title {
  flex: 1;
  min-width: 0;
}

.app-bank {
  font-size: var(--fs-17);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.app-assistant {
  font-size: var(--fs-12);
  color: var(--gold-300);
  line-height: 1.4;
}

.app-shield {
  color: var(--brand-200);
}

.app-banners:empty {
  display: none;
}

.lock-banner {
  display: flex;
  gap: 10px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--bad-bg);
  border-bottom: 1px solid var(--bad-line);
  color: var(--bad-fg);
  font-size: var(--fs-13);
}

.lock-text {
  font-weight: 600;
}

.lock-hint {
  color: var(--ink-900);
}

.lock-judge {
  margin-top: 2px;
  font-size: var(--fs-12);
  color: var(--bad-fg);
}

.paused-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-line);
  color: var(--warn-fg);
  font-size: var(--fs-13);
  font-weight: 600;
}

.app-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.screen {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.tabbar {
  flex: none;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 6px var(--sp-2) 10px;
}

.tabbar:empty {
  display: none;
}

.tablist {
  display: flex;
  justify-content: space-around;
}

.tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 48px;
  padding: 4px 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-500);
  font-size: 11px;
  font-weight: 600;
  transition: color var(--dur-1) var(--ease);
}

.tab:hover {
  color: var(--ink-900);
}

.tab.is-on {
  color: var(--brand-500);
}

.tab.is-on::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 22px;
  height: 3px;
  margin-left: -11px;
  border-radius: 0 0 3px 3px;
  background: var(--brand-500);
}

.phone-frame.is-login .app-header {
  padding-bottom: var(--sp-6);
}

/* Device column */
.device-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding-bottom: var(--sp-2);
}

.device-unit {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: var(--sp-2);
  border-radius: var(--r-xl);
  color: #fff;
  background-color: var(--brand-900);
  background-image: linear-gradient(180deg, var(--brand-800) 0%, var(--brand-900) 100%);
  box-shadow: var(--sh-device), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.device-queue-host {
  flex: 0 0 auto;
  max-height: 30%;
  overflow-y: auto;
  scrollbar-width: thin;
}

.device-queue-host:empty {
  display: none;
}

.sms-slot {
  flex: 0 0 auto;
}

.device-head {
  flex: 0 0 auto;
  background-color: var(--brand-800);
  border-radius: calc(var(--r-xl) - 8px) calc(var(--r-xl) - 8px) 0 0;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  color: #fff;
}

.device-head-icon {
  display: inline-grid;
  color: var(--gold-300);
}

.device-title {
  flex: 1;
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.device-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7ed3a6;
  box-shadow: 0 0 0 3px rgba(126, 211, 166, 0.18);
}

.col-device.has-task .device-led {
  background: var(--gold-300);
  box-shadow: 0 0 0 3px rgba(243, 211, 156, 0.22);
}

.device-screen {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scroll-padding-bottom: 200px;
  color: var(--ink-900);
  padding: var(--sp-4) var(--sp-4) 0;
  border-radius: calc(var(--r-xl) - 8px);
  background: var(--surface);
}

.device-idle {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--sp-3);
  min-height: max(268px, 100%);
  padding-bottom: var(--sp-4);
  text-align: center;
  color: var(--ink-600);
}

.idle-icon {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-500);
}

.idle-text {
  max-width: 260px;
  font-size: var(--fs-14);
}

.device-task {
  display: grid;
  gap: var(--sp-3);
  animation: sheet-in var(--dur-2) var(--ease);
}

.purchase-review {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-14);
}

.purchase-review .fact-list { margin: 0; }
.purchase-review .fact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.purchase-review dt { color: var(--ink-600); }
.purchase-review dd { margin: 0; font-weight: 600; }

.task-source {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.device-cards {
  display: grid;
  gap: var(--sp-3);
}

.device-cards .approval-card {
  box-shadow: none;
  padding: var(--sp-4);
}

.selection {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--brand-100);
  color: var(--brand-600);
  font-size: var(--fs-13);
  font-weight: 600;
}

.step-text {
  font-size: var(--fs-15);
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.5;
}

.mfa {
  display: grid;
  gap: 2px;
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: var(--fs-13);
}

.mfa-sent {
  color: var(--ink-900);
}

.mfa-method,
.mfa-hint {
  color: var(--ink-600);
  font-size: var(--fs-12);
}

.mfa-expired {
  color: var(--bad-fg);
}

/* The gesture buttons (and on the code step the code field) stay in reach while the
   card above them scrolls; a solid bar with a top rule, so nothing reads through it. */
.device-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: grid;
  gap: var(--sp-2);
  margin: 0 calc(-1 * var(--sp-4));
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -10px 16px -10px rgba(28, 20, 38, 0.14);
}

.device-actions:empty {
  display: none;
}

.cancel-hint {
  font-size: var(--fs-12);
  color: var(--ink-600);
  text-align: center;
}

.device-result {
  display: grid;
  gap: 2px;
  padding: var(--sp-3) 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--fs-13);
  animation: sheet-in var(--dur-3) var(--ease);
}

.device-result.tone-success {
  background: var(--ok-bg);
  border-color: var(--ok-line);
}

.device-result.tone-warning {
  background: var(--warn-bg);
  border-color: var(--warn-line);
}

.device-result.tone-error {
  background: var(--bad-bg);
  border-color: var(--bad-line);
}

.device-result.tone-info {
  background: var(--info-bg);
  border-color: var(--info-line);
}

.result-title {
  font-weight: 700;
  font-size: var(--fs-14);
}

.tone-success .result-title {
  color: var(--ok-fg);
}

.tone-warning .result-title {
  color: var(--warn-fg);
}

.tone-error .result-title {
  color: var(--bad-fg);
}

.tone-info .result-title {
  color: var(--info-fg);
}

.receipt {
  font-family: var(--font-num);
  color: var(--ink-600);
  font-size: var(--fs-12);
}

.device-queue {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
}

.queue-title {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink-600);
  margin-bottom: var(--sp-1);
}

.queue-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  border-top: 1px solid var(--line);
}

.queue-text {
  flex: 1;
  min-width: 0;
}

.queue-main,
.queue-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-main {
  font-size: var(--fs-13);
  font-weight: 600;
}

.queue-sub {
  font-size: var(--fs-12);
  color: var(--ink-600);
}

.sms-card {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  overflow: hidden;
}

.sms-summary {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 0 var(--sp-4);
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-13);
  font-weight: 600;
}

.sms-summary::-webkit-details-marker {
  display: none;
}

.sms-icon {
  display: inline-grid;
  color: var(--brand-500);
}

.sms-title {
  flex: 1;
}

.sms-card .disclosure-chevron {
  color: var(--ink-500);
}

.sms-body {
  padding: 0 var(--sp-3) var(--sp-3);
}

.sms-frame {
  width: 100%;
  height: 272px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.sms-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.sms-foot {
  font-size: var(--fs-12);
  color: var(--ink-600);
}

/* SMS column (wide screens): the simulated phone's inbox beside the device */
.col-sms {
  flex: 0 0 300px;
  width: 300px;
}

.col-sms .sms-card {
  box-shadow: var(--sh-2);
}

.col-sms .sms-frame {
  height: calc(min(var(--col-h), 880px) - 112px);
  min-height: 320px;
}

.sms-slot:empty {
  display: none;
}

/* Evidence column */
.evidence-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
  background-color: var(--surface);
  background-image: linear-gradient(180deg, var(--surface) 0%, var(--brand-50) 100%);
}

.evidence-head-icon {
  display: inline-grid;
  color: var(--brand-500);
}

.evidence-title {
  font-size: var(--fs-15);
}

.evidence-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-2) var(--sp-5) var(--sp-4);
  scrollbar-width: thin;
}

.evidence-empty {
  margin: var(--sp-3) 0;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink-600);
  font-size: var(--fs-13);
}

.evidence-current {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-3) 0 var(--sp-1);
  font-size: var(--fs-13);
}

.evidence-intent {
  font-weight: 600;
}

.evidence-section {
  border-bottom: 1px solid var(--line);
}

.evidence-section > summary {
  min-height: 48px;
  color: var(--ink-900);
  font-size: var(--fs-14);
}

.evidence-section > .disclosure-body {
  padding-bottom: var(--sp-4);
  gap: var(--sp-3);
}

.verdict {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.rules {
  display: grid;
  gap: 6px;
}

.rules li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-2);
  font-size: var(--fs-13);
  color: var(--ink-900);
}

.rule-id {
  padding: 1px 6px;
  border-radius: var(--r-xs);
  background: var(--brand-100);
  color: var(--brand-600);
  font-size: var(--fs-12);
  height: max-content;
}

.consistency-verdict {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: var(--fs-13);
}

.consistency-verdict.is-ok {
  background: var(--ok-bg);
  color: var(--ok-fg);
}

.consistency-verdict.is-bad {
  background: var(--bad-bg);
  color: var(--bad-fg);
}

.consistency-verdict.is-unknown {
  background: var(--surface-2);
  color: var(--ink-600);
}

.hash-block {
  display: grid;
  gap: 4px;
  padding-top: var(--sp-2);
}

.hash-caption {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--ink-900);
}

.not-yet {
  font-size: var(--fs-13);
  color: var(--ink-600);
  padding: var(--sp-2) var(--sp-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
}

.warn-text {
  color: var(--bad-fg);
  font-weight: 600;
}

.big-count {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: var(--fs-32);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink-900);
}

.count-label {
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--ink-600);
}

.receipts {
  display: grid;
  gap: 6px;
}

.receipts li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: var(--fs-12);
}

.receipt-kind {
  font-weight: 600;
  color: var(--ink-900);
}

.receipt-time {
  color: var(--ink-600);
}

.receipt-id {
  flex-basis: 100%;
  color: var(--ink-600);
  overflow-wrap: anywhere;
}

.evidence-foot {
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--line);
  background: var(--brand-50);
  color: var(--ink-600);
  font-size: var(--fs-12);
}

.evidence-foot:empty {
  display: none;
}

/* Corner notice: always the topmost layer, never intercepts the pointer */
.corner {
  position: fixed;
  right: 16px;
  bottom: 14px;
  z-index: var(--z-corner);
  max-width: calc(100vw - 32px);
  padding: 6px 12px;
  /* A small radius keeps the hit-test corners inside the shape (checked before screenshots). */
  border-radius: var(--r-xs);
  background: rgba(36, 26, 49, 0.9);
  color: #fff;
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(36, 26, 49, 0.25);
  pointer-events: none;
}

.corner:empty {
  display: none;
}

/* 1024 to 1359: phone | device; evidence becomes a right drawer */
@media (max-width: 1359px) {
  .brand-sub,
  .header-sep {
    display: none;
  }

  .stage-header {
    gap: var(--sp-3);
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
  }

  .header-controls {
    gap: 6px;
  }

  .header-controls .btn {
    padding: 0 var(--sp-3);
  }

  .segment {
    padding: 0 10px;
  }

  .stage[data-view="judge"] .evidence-toggle {
    display: inline-flex;
  }

  .col-evidence {
    position: fixed;
    top: var(--header-live, var(--header-h));
    right: 0;
    bottom: 0;
    z-index: var(--z-drawer);
    width: 480px;
    max-width: 100vw;
    min-width: 0;
    height: auto;
    max-height: none;
    border-radius: var(--r-lg) 0 0 0;
    box-shadow: var(--sh-3);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform var(--dur-3) var(--ease), visibility var(--dur-3);
  }

  .col-evidence.is-open {
    z-index: var(--z-sheet);
    transform: none;
    visibility: visible;
  }

  .stage.evidence-open .stage-header {
    z-index: calc(var(--z-sheet) + 1);
  }

  .stage.evidence-open .scrim {
    top: var(--header-live, var(--header-h));
  }
}

/* 768 to 1023: one column; the device becomes a bottom sheet that only opens, never acts */
@media (max-width: 1023px) {
  .stage-header {
    padding: var(--sp-2) var(--sp-4);
  }

  .stage-main {
    padding: var(--sp-4);
  }

  .col-device {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-sheet);
    width: auto;
    height: auto;
    min-height: 0;
    max-height: 72vh;
    padding: var(--sp-3) var(--sp-4) 48px;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    background: var(--brand-50);
    box-shadow: var(--sh-3);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform var(--dur-3) var(--ease), visibility var(--dur-3);
  }

  .col-device.is-open {
    transform: none;
    visibility: visible;
  }

  .col-evidence {
    width: 100vw;
    border-radius: 0;
  }
}

/* Below 768: best effort; the app fills the screen without the frame */
@media (max-width: 767px) {
  /* One scroll owner for the sheet: the card never shrinks behind the SMS inbox. */
  .col-device {
    max-height: calc(100dvh - 12px);
    padding: var(--sp-2) var(--sp-2) 48px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .device-body,
  .device-unit {
    flex: none;
  }

  .device-body {
    gap: var(--sp-2);
  }

  .device-screen,
  .device-queue-host {
    flex: none;
    max-height: none;
    overflow: visible;
  }

  .device-actions {
    position: static;
  }

  .device-task {
    gap: var(--sp-2);
  }

  .device-cards .approval-card {
    padding: var(--sp-2);
  }

  .device-screen {
    padding: var(--sp-3) var(--sp-3) 0;
  }

  .device-cards .card-amount {
    font-size: var(--fs-32);
  }

  .device-cards .card-fact {
    grid-template-columns: 8em minmax(0, 1fr);
    gap: var(--sp-2);
    padding: 4px 0;
    font-size: var(--fs-12);
  }

  .device-cards .card-facts {
    margin-top: var(--sp-2);
  }

  .device-actions {
    margin: 0 calc(-1 * var(--sp-3));
    padding: var(--sp-2) var(--sp-3);
  }

  .device-actions .btn {
    min-height: 44px;
  }

  .device-actions .step-text {
    font-size: var(--fs-14);
    line-height: 1.4;
  }

  .sms-summary {
    min-height: 44px;
    white-space: nowrap;
  }

  .brand-sub,
  .header-sep {
    display: none;
  }

  .stage-header {
    position: static;
    flex-wrap: wrap;
  }

  .stage-main {
    padding: 0;
  }

  .col-phone {
    flex: 1 1 auto;
    width: 100%;
  }

  .phone-frame {
    height: auto;
    min-height: calc(100vh - 120px);
    max-height: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .phone-screen {
    border-radius: 0;
    min-height: calc(100vh - 120px);
  }
}

/* Simulated SMS page (/phone/<pair>) */
.sms-doc {
  background: var(--surface-2);
}

.sms-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Room for the corner notice, which wraps to two lines in English. */
  padding-bottom: 72px;
  font-size: var(--fs-13);
}

.sms-status {
  padding: 6px var(--sp-4);
  background: var(--brand-800);
  color: var(--brand-200);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.sms-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4) var(--sp-2);
}

.sms-head-icon {
  display: inline-grid;
  color: var(--brand-500);
}

.sms-head-title {
  font-size: var(--fs-14);
  font-weight: 700;
}

.sms-main {
  flex: 1;
  padding: 0 var(--sp-4);
}

.sms-list {
  display: grid;
  gap: var(--sp-2);
}

.sms-msg {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border-radius: 4px var(--r-md) var(--r-md) var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  line-height: 1.6;
}

.sms-msg.is-latest {
  border: 2px solid var(--brand-500);
  box-shadow: 0 4px 12px rgba(88, 65, 116, 0.14);
}

.sms-msg-icon {
  display: inline-grid;
  color: var(--brand-500);
  padding-top: 2px;
}

.sms-used,
.sms-expired {
  background: var(--surface-2);
  color: var(--ink-600);
}

.sms-used .sms-msg-icon {
  color: var(--ok-fg);
}

.sms-expired .sms-msg-icon {
  color: var(--ink-500);
}

.sms-msg-body {
  min-width: 0;
}

.sms-msg-text {
  overflow-wrap: anywhere;
}

.sms-msg-status {
  margin-top: 2px;
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--ink-600);
}

.sms-empty {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  color: var(--ink-600);
  text-align: center;
}

.sms-footer {
  padding: var(--sp-3) var(--sp-4) 0;
  color: var(--ink-600);
  font-size: var(--fs-12);
  display: grid;
  gap: var(--sp-1);
}

.sms-disclosure {
  color: var(--ink-500);
}

.corner-sms {
  right: 8px;
  bottom: 8px;
  padding: 4px 10px;
  font-size: 11px;
}
