:root {
  --navy: #0a233b;
  --navy-2: #123652;
  --paper: #f6efe3;
  --paper-2: #fbf7f0;
  --white: #ffffff;
  --ink: #10233a;
  --muted: #5d6b7c;
  --line: #d9cdbb;
  --orange: #f36f45;
  --orange-dark: #ca4f2c;
  --low: #dbe9f7;
  --steady: #dcefeb;
  --rising: #f7e2c5;
  --overload: #f4d9df;
  --recovery: #e6e7df;
  --yes: #dff1ea;
  --yes-line: #69a88f;
  --sometimes: #f8efce;
  --sometimes-line: #b89845;
  --no: #f7e5e5;
  --no-line: #c77d83;
  --unknown: #e9ebf2;
  --unknown-line: #8994aa;
  --shadow: 0 18px 55px rgba(3, 18, 31, 0.16);
  --topbar-h: 78px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--navy); color: var(--ink); }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 4px solid #ffb28f;
  outline-offset: 3px;
}
a { color: #125b87; }
img { display: block; max-width: 100%; }

.app-shell { min-height: 100dvh; background: linear-gradient(115deg, var(--navy-2), var(--navy) 55%); }
.topbar {
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 28px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.16);
  background: rgba(8, 32, 53, .96);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .17em;
  white-space: nowrap;
}
.brand-mobile { display: none; }
.topnav { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.nav-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 7px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .045em;
  cursor: pointer;
}
.nav-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); }
.global-progress { height: 5px; background: rgba(255,255,255,.15); position: sticky; top: var(--topbar-h); z-index: 49; }
.global-progress span { height: 100%; display: block; width: 0; background: var(--orange); transition: width .25s ease; }

.app-main { width: 100%; }
.screen { width: min(1500px, calc(100% - 48px)); margin: 0 auto; padding: 26px 0 34px; }
.screen-fit {
  height: calc(100dvh - var(--topbar-h) - 5px);
  max-height: calc(100dvh - var(--topbar-h) - 5px);
  overflow: hidden;
  padding-top: 18px;
  padding-bottom: 18px;
}
.paper-panel {
  background: var(--paper);
  border: 1px solid rgba(214, 201, 182, .85);
  box-shadow: var(--shadow);
}
.paper-inner { border: 1px solid rgba(214, 201, 182, .65); margin: 16px; padding: clamp(28px, 4vw, 62px); }
.overline {
  color: var(--orange-dark);
  font-weight: 900;
  font-size: clamp(13px, 1.1vw, 17px);
  letter-spacing: .19em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
h1, h2, h3, p { margin-top: 0; }
.hero-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(50px, 7.2vw, 108px);
  line-height: .92;
  letter-spacing: -.055em;
  font-weight: 900;
}
.hero-subtitle {
  max-width: 1040px;
  margin: 30px 0 0;
  font-size: clamp(20px, 2.3vw, 34px);
  line-height: 1.25;
}
.body-copy { color: #435267; font-size: 18px; line-height: 1.55; }
.small-copy { color: var(--muted); font-size: 14px; line-height: 1.45; }

.home-layout { display: grid; grid-template-columns: 1fr 290px; gap: 30px; align-items: end; }
.home-glorb { align-self: stretch; display: flex; align-items: flex-end; justify-content: center; min-height: 260px; }
.home-glorb img { max-height: 330px; object-fit: contain; filter: contrast(1.05); }
.glorb-line { margin: 10px auto 0; max-width: 260px; text-align: center; font-weight: 800; color: #3a4960; }
.name-row { margin-top: 32px; display: grid; grid-template-columns: minmax(220px, 520px) 1fr; gap: 18px; align-items: end; }
.name-label { display: block; font-size: 13px; letter-spacing: .15em; font-weight: 900; margin-bottom: 8px; }
.name-input {
  width: 100%; min-height: 62px; border: 2px solid #bcae99; background: #fff; color: var(--ink);
  padding: 12px 16px; font-size: 24px; font-weight: 700; border-radius: 2px;
}
.warning-box {
  border-left: 7px solid var(--orange);
  background: #fffaf3;
  padding: 18px 22px;
  line-height: 1.45;
  min-height: 82px;
}
.warning-box strong { letter-spacing: .1em; font-size: 14px; }
.path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.path-card {
  appearance: none; text-align: left; background: #fff; border: 2px solid #d6cab8; min-height: 220px;
  padding: 28px; cursor: pointer; color: var(--ink); display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.path-card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 10px 25px rgba(13, 32, 50, .08); }
.path-card h2 { font-size: clamp(25px, 2.2vw, 36px); line-height: 1.02; margin-bottom: 12px; }
.path-card p { color: var(--muted); line-height: 1.45; font-size: 17px; }
.path-card .start-link { font-weight: 900; letter-spacing: .06em; }

.selection-header { display: grid; grid-template-columns: 250px 1fr; gap: 30px; align-items: start; margin-bottom: 18px; }
.signal-side { background: rgba(255,255,255,.08); color: #fff; padding: 18px; border: 1px solid rgba(255,255,255,.18); }
.signal-side .signal-pill { display: inline-block; padding: 12px 17px; background: var(--paper); color: var(--ink); font-weight: 900; letter-spacing: .12em; }
.signal-side img { margin: 18px auto 8px; max-height: 235px; background: #fff; padding: 10px; }
.signal-side p { color: #dce5ee; line-height: 1.45; margin-bottom: 0; }
.selection-panel { background: var(--paper); padding: 28px 32px 34px; min-height: 520px; }
.selection-panel h1 { font-size: clamp(42px, 5.2vw, 78px); line-height: .96; letter-spacing: -.045em; margin: 0 0 14px; }
.feeling-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.feeling-grid.all { grid-template-columns: repeat(7, minmax(0,1fr)); }
.feeling-card {
  appearance: none; border: 2px solid #d8cdbb; background: #fff; color: var(--ink); padding: 10px; min-height: 180px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px;
}
.feeling-card:hover { border-color: var(--ink); }
.feeling-card img { height: 120px; width: 100%; object-fit: contain; }
.feeling-card span { font-weight: 900; font-size: 15px; text-align: center; }
.feeling-card.other { justify-content: center; font-size: 48px; }

.question-screen { display: flex; flex-direction: column; color: #fff; }
.question-head { flex: 0 0 auto; padding: 0 6px 10px; }
.question-head .overline { color: #ff9a74; margin-bottom: 6px; }
.question-title {
  color: #fff;
  font-size: clamp(36px, 5vw, 68px);
  line-height: .98;
  letter-spacing: -.04em;
  margin: 0;
  max-width: 1350px;
  font-weight: 900;
}
.question-card-shell {
  min-height: 0; flex: 1 1 auto; background: var(--paper); color: var(--ink); padding: 16px 22px 18px;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 14px; border: 1px solid #d7c9b5;
}
.visual-card {
  background: #fff; border: 1.5px solid #d5c8b6; min-height: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: clamp(8px, 1.5vh, 18px);
}
.visual-card img { width: 100%; height: 100%; max-height: 44dvh; object-fit: contain; }
.visual-card .visual-fallback { font-size: 30px; font-weight: 900; text-align: center; }
.answer-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; min-height: 86px; }
.answer-btn {
  appearance: none; border: 3px solid; min-height: 86px; padding: 12px 8px; font-size: clamp(16px, 1.8vw, 25px); font-weight: 900;
  cursor: pointer; color: var(--ink); background: #fff; display: flex; justify-content: center; align-items: center; text-align: center;
}
.answer-btn.yes { background: var(--yes); border-color: var(--yes-line); color: #126345; }
.answer-btn.sometimes { background: var(--sometimes); border-color: var(--sometimes-line); color: #775d0b; }
.answer-btn.no { background: var(--no); border-color: var(--no-line); color: #8d2c32; }
.answer-btn.unknown { background: var(--unknown); border-color: var(--unknown-line); color: #4d5a70; }
.answer-btn:hover { filter: brightness(.985); transform: translateY(-1px); }

.transition-wrap { height: 100%; display: flex; align-items: center; justify-content: center; }
.transition-card { background: var(--paper); width: min(1100px, 92%); padding: clamp(34px, 6vw, 80px); text-align: center; border: 1px solid #d7c9b5; }
.transition-card .emotion-chip { width: 160px; height: 160px; background: #fff; border: 1px solid #d7c9b5; margin: 0 auto 22px; padding: 8px; }
.transition-card .emotion-chip img { width: 100%; height: 100%; object-fit: contain; }
.transition-card h1 { font-size: clamp(48px, 7vw, 88px); line-height: .94; letter-spacing: -.04em; margin: 0 0 18px; }
.transition-card p { font-size: clamp(18px, 2.1vw, 28px); color: #445267; margin: 0 auto 26px; max-width: 820px; line-height: 1.4; }
.primary-btn, .secondary-btn {
  appearance: none; min-height: 58px; border: 2px solid var(--ink); padding: 13px 24px; font-weight: 900; letter-spacing: .04em; cursor: pointer;
}
.primary-btn { background: var(--orange); border-color: var(--orange); color: #fff; }
.primary-btn:hover { background: #df6038; }
.secondary-btn { background: #fff; color: var(--ink); }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; }
.button-row.center { justify-content: center; }

.text-screen { color: var(--ink); background: var(--paper); padding: 34px 42px; height: 100%; }
.text-screen h1 { font-size: clamp(42px, 5vw, 74px); line-height: .98; margin: 0 0 18px; letter-spacing: -.04em; }
.text-area { width: 100%; min-height: 190px; resize: vertical; border: 2px solid #cdbfa9; background: #fff; padding: 18px; font-size: 21px; line-height: 1.4; color: var(--ink); }

.pressure-intro { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: center; height: 100%; }
.pressure-intro-visual { background: #fff; border: 1px solid #d6cab8; padding: 14px; }
.pressure-intro-visual img { width: 100%; max-height: 270px; object-fit: contain; }
.pressure-intro-copy h1 { font-size: clamp(48px, 6vw, 86px); line-height: .95; margin-bottom: 16px; }
.pressure-intro-copy p { font-size: 22px; color: #4f5d70; line-height: 1.45; max-width: 850px; }

.rating-shell { min-height: 0; flex: 1 1 auto; background: var(--paper); padding: 14px 20px 16px; display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 12px; }
.rating-visual { background: #fff; border: 1.5px solid #d5c8b6; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 10px; }
.rating-visual img { width: 100%; height: 100%; max-height: 39dvh; object-fit: contain; }
.rating-row { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 9px; }
.rating-btn {
  appearance: none; background: #fff; border: 2px solid #cfc4b3; color: var(--ink); min-height: 116px; padding: 7px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.rating-btn img { height: 95px; width: 100%; object-fit: contain; }
.rating-btn:hover { border-color: var(--ink); transform: translateY(-1px); }

.report-preview-wrap { background: #dfe5e8; padding: 24px 0 70px; min-height: calc(100dvh - var(--topbar-h)); }
.report-actions { width: min(980px, calc(100% - 32px)); margin: 0 auto 18px; display: flex; gap: 10px; flex-wrap: wrap; position: sticky; top: calc(var(--topbar-h) + 12px); z-index: 20; }
.report-document {
  width: 190mm;
  margin: 0 auto;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 40px rgba(0,0,0,.18);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.report-page {
  width: 190mm;
  min-height: 274mm;
  padding: 13mm 12mm 14mm;
  background: var(--paper);
  page-break-after: always;
  break-after: page;
  position: relative;
}
.report-page:last-child { page-break-after: auto; break-after: auto; }
.report-page h1 { font-size: 31pt; line-height: .98; letter-spacing: -.035em; margin: 0 0 5mm; }
.report-page h2 { font-size: 20pt; margin: 0 0 4mm; }
.report-page h3 { font-size: 13pt; margin: 0 0 2mm; }
.report-page p, .report-page li { font-size: 10.5pt; line-height: 1.42; }
.report-kicker { color: var(--orange-dark); font-weight: 900; letter-spacing: .16em; font-size: 9pt; text-transform: uppercase; margin-bottom: 3mm; }
.report-subtitle { font-size: 13pt !important; color: #4e5b6c; margin-bottom: 8mm; }

.report-generated {
  position: absolute;
  right: 12mm;
  bottom: 4mm;
  margin: 0 !important;
  color: #6b7480;
  font-size: 7pt !important;
  line-height: 1 !important;
  white-space: nowrap;
}
.report-note { background: #fff; border-left: 4px solid var(--orange); padding: 4mm; margin: 4mm 0; }
.signal-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }
.signal-report-card { background: #fff; border: 1px solid #cfc5b5; padding: 5mm; min-height: 55mm; break-inside: avoid; }
.signal-report-card.low { border-top: 8px solid #a9cbe9; }
.signal-report-card.steady { border-top: 8px solid #a9d9d0; }
.signal-report-card.rising { border-top: 8px solid #f0bf83; }
.signal-report-card.overload { border-top: 8px solid #e5aab8; }
.signal-report-card.recovery { border-top: 8px solid #c7c9bb; }
.signal-report-card .feeling-name { font-size: 19pt; font-weight: 900; margin: 2mm 0 4mm; }
.report-list { margin: 1.5mm 0 4mm; padding-left: 5mm; }
.report-list.compact li { margin-bottom: 1mm; }
.pathway { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2mm; align-items: center; margin: 9mm 0 7mm; }
.pathway-node { text-align: center; position: relative; min-height: 35mm; padding: 5mm 2mm; background: #fff; border: 1px solid #cfc5b5; }
.pathway-node:not(:last-child)::after { content: '→'; position: absolute; right: -5mm; top: 10mm; font-size: 20pt; font-weight: 900; }
.pathway-node.low { background: var(--low); }
.pathway-node.steady { background: var(--steady); }
.pathway-node.rising { background: var(--rising); }
.pathway-node.overload { background: var(--overload); }
.pathway-node.recovery { background: var(--recovery); }
.pathway-node strong { display: block; font-size: 9pt; letter-spacing: .08em; }
.pathway-node span { display: block; font-size: 13pt; font-weight: 900; margin-top: 2mm; }
.report-table { width: 100%; border-collapse: collapse; margin: 4mm 0; }
.report-table th, .report-table td { border: 1px solid #cfc5b5; text-align: left; padding: 2.5mm; vertical-align: top; font-size: 9.5pt; }
.report-table th { background: #fff; }
.severity-meter { display: grid; grid-template-columns: 50mm 1fr 25mm; gap: 3mm; align-items: center; margin: 3mm 0; }
.severity-track { height: 8px; background: #e6ded1; overflow: hidden; }
.severity-track span { display: block; height: 100%; background: var(--orange); }
.pressure-summary-card { border: 1px solid #cfc5b5; background: #fff; padding: 4mm; margin: 4mm 0; break-inside: avoid; }
.pressure-summary-card h3 { display: flex; justify-content: space-between; gap: 5mm; align-items: baseline; }
.impact-pill { border: 1px solid #8e99a8; padding: 1.5mm 2.5mm; font-size: 8.5pt; font-weight: 900; white-space: nowrap; }
.unknown-line { color: #667286; font-style: italic; }
.report-card-sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5mm; }
.cut-card { min-height: 63mm; border: 1.5px dashed #7e8792; padding: 4mm; background: #fff; break-inside: avoid; display: grid; grid-template-rows: auto 1fr auto; }
.cut-card.low { border-top: 8px solid #a9cbe9; }
.cut-card.steady { border-top: 8px solid #a9d9d0; }
.cut-card.rising { border-top: 8px solid #f0bf83; }
.cut-card.overload { border-top: 8px solid #e5aab8; }
.cut-card .card-signal { font-size: 8pt; font-weight: 900; letter-spacing: .12em; }
.cut-card img { height: 37mm; width: 100%; object-fit: contain; margin: 1mm auto; }
.cut-card .card-text { font-size: 14pt; font-weight: 900; text-align: center; }
.cut-card .sometimes-tag { font-size: 7.5pt; color: #775d0b; font-weight: 800; text-align: center; }
.report-reference-list { padding-left: 6mm; }
.report-reference-list li { margin-bottom: 3mm; }

.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(4, 17, 29, .84); display: grid; place-items: center; padding: 18px; }
.modal-card { width: min(1180px, 100%); max-height: calc(100dvh - 36px); background: var(--paper); color: var(--ink); box-shadow: var(--shadow); overflow: auto; position: relative; }
.modal-head { position: sticky; top: 0; z-index: 3; background: var(--paper); border-bottom: 1px solid #d8cdbb; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 24px; }
.close-btn { appearance: none; border: 2px solid var(--ink); background: #fff; min-width: 46px; min-height: 46px; font-weight: 900; cursor: pointer; }
.modal-body { padding: 28px; }
.info-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.info-choice button { min-height: 180px; background: #fff; border: 2px solid #d5c9b7; text-align: left; padding: 28px; cursor: pointer; color: var(--ink); }
.info-choice h3 { font-size: 31px; margin-bottom: 10px; }
.info-section { background: #fff; border: 1px solid #d5c9b7; padding: 24px; margin: 0 0 18px; }
.info-section h2 { font-size: 31px; margin-bottom: 12px; }
.info-section h3 { font-size: 21px; margin: 18px 0 8px; }
.info-section p, .info-section li { font-size: 17px; line-height: 1.55; }
.info-section .disclaimer { border-left: 5px solid var(--orange); background: #fff8ed; padding: 14px 16px; font-weight: 700; }
.info-scale { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; margin: 16px 0; }
.info-scale > div { background: var(--paper-2); border: 1px solid #d4c7b6; padding: 10px; text-align: center; font-size: 13px; font-weight: 800; }
.math-box { background: #eef2f4; padding: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 12px 0; }
.references { margin-top: 18px; padding-top: 10px; border-top: 2px solid #d4c7b6; }
.references li { margin-bottom: 12px; }

.confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.toast { position: fixed; z-index: 500; bottom: 22px; left: 50%; transform: translateX(-50%); background: #0d2c47; color: #fff; padding: 12px 18px; border-radius: 4px; box-shadow: var(--shadow); font-weight: 700; }

@media (max-width: 1180px) {
  .topbar { padding: 12px 16px; }
  .brand { font-size: 13px; }
  .nav-btn { font-size: 11px; padding: 7px 8px; }
  .screen { width: calc(100% - 28px); }
  .path-grid { grid-template-columns: 1fr; }
  .path-card { min-height: 150px; }
  .home-layout { grid-template-columns: 1fr 210px; }
  .feeling-grid { grid-template-columns: repeat(7, minmax(0,1fr)); }
  .feeling-grid.all { grid-template-columns: repeat(5,1fr); }
  .selection-header { grid-template-columns: 1fr; }
  .signal-side { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 16px; }
  .signal-side img { margin: 0; max-height: 135px; grid-row: span 2; }
  .answer-row { gap: 8px; }
  .rating-row { gap: 5px; }
}

@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px) {
  :root { --topbar-h: 118px; }
  .topbar { align-items: flex-start; }
  .topnav { max-width: 560px; }
  .home-layout { grid-template-columns: 1fr; }
  .home-glorb { display: none; }
  .name-row { grid-template-columns: 1fr; }
  .selection-header { grid-template-columns: 1fr; }
  .signal-side { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 18px; }
  .signal-side img { margin: 0; max-height: 155px; grid-row: span 2; }
  .feeling-grid, .feeling-grid.all { grid-template-columns: repeat(3,1fr); }
  .feeling-card { min-height: 160px; }
  .feeling-card img { height: 105px; }
  .question-title { font-size: clamp(34px, 6.3vw, 54px); }
  .question-card-shell { padding: 10px 12px 12px; }
  .visual-card img { max-height: 39dvh; }
  .answer-row { min-height: 78px; }
  .answer-btn { min-height: 78px; font-size: clamp(14px, 2.7vw, 21px); padding: 7px 4px; }
  .rating-row { grid-template-columns: repeat(3, 1fr); }
  .rating-btn { min-height: 86px; }
  .rating-btn img { height: 76px; }
  .rating-visual img { max-height: 30dvh; }
  .pressure-intro { grid-template-columns: 180px 1fr; }
  .info-scale { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 680px) {
  :root { --topbar-h: 68px; }
  .topbar {
    min-height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
  }
  .brand { margin: 0 auto 0 0; font-size: 10px; letter-spacing: .12em; }
  .brand-full { display: none; }
  .brand-mobile { display: inline; }
  .topnav { flex: 0 0 auto; flex-wrap: nowrap; justify-content: flex-end; gap: 2px; }
  .nav-btn {
    width: 40px;
    min-width: 40px;
    min-height: 44px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
    border-color: rgba(255,255,255,.12);
  }
  .nav-btn::after {
    content: attr(data-mobile-icon);
    color: #fff;
    font-size: 19px;
    line-height: 1;
  }
  .screen { width: calc(100% - 18px); }
  .paper-inner { margin: 8px; padding: 22px; }
  .hero-title { font-size: 48px; }
  .hero-subtitle { font-size: 20px; margin-top: 18px; }
  .path-card { padding: 20px; }
  .feeling-grid, .feeling-grid.all { grid-template-columns: repeat(2,1fr); }
  .question-title { font-size: 31px; }
  .answer-row { grid-template-columns: repeat(2, 1fr); }
  .screen-fit { overflow-y: auto; height: auto; max-height: none; min-height: calc(100dvh - var(--topbar-h)); }
  .pressure-intro { grid-template-columns: 1fr; }
  .pressure-intro-visual { display: none; }
  .rating-row { grid-template-columns: repeat(2,1fr); }
  .info-choice { grid-template-columns: 1fr; }
  .report-document { width: 100%; }
  .report-page { width: 100%; min-height: auto; padding: 22px; }
}

/* Branded cover — isolated from the existing Mapper interface. */
.is-cover .topbar,
.is-cover .global-progress { display: none; }
.signal-cover {
  --cover-olive: #b3b568;
  --cover-cream: #eee8d9;
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  color: var(--cover-cream);
  background: #061c1d;
}
.signal-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 62% 48%, transparent 0 24%, rgba(1,14,16,.48) 70%), linear-gradient(90deg, rgba(1,13,15,.04), rgba(1,13,15,.48));
}
.signal-cover__background { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; opacity: .44; filter: sepia(.35) hue-rotate(38deg) saturate(.65); }
.signal-cover__glorb { position: absolute; z-index: -1; left: -2%; bottom: 0; width: min(43vw, 690px); max-height: 88%; object-fit: contain; object-position: left bottom; }
.signal-cover__frame { position: absolute; inset: 10% 3.5% 6%; border: 1px solid rgba(179,181,104,.62); pointer-events: none; }
.signal-cover__frame::before,
.signal-cover__frame::after { content: ""; position: absolute; left: 2%; right: 2%; height: 1px; background: rgba(179,181,104,.45); }
.signal-cover__frame::before { top: 3%; }
.signal-cover__frame::after { bottom: 3%; }
.signal-cover__header { position: absolute; top: 4.5%; left: 4.5%; right: 4.5%; display: flex; justify-content: space-between; color: var(--cover-olive); font: 800 13px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; }
.signal-cover__content { width: min(55vw, 760px); margin-left: 41%; padding-top: clamp(145px, 20vh, 240px); position: relative; z-index: 2; }
.signal-cover__eyebrow { margin: 0 0 18px; color: var(--cover-olive); font: 800 13px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .22em; text-align: center; }
.signal-cover h1 { margin: 0; color: var(--cover-cream); font-size: clamp(62px, 7.3vw, 116px); line-height: .82; letter-spacing: -.06em; font-weight: 900; }
.signal-cover__meter { display: grid; grid-template-columns: auto repeat(8, 1fr) auto; align-items: center; gap: 8px; margin-top: 34px; color: var(--cover-olive); font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.signal-cover__meter i { height: 13px; background: var(--cover-olive); border-radius: 1px; }
.signal-cover__meter b { font-weight: 800; }
.signal-cover__decoded { margin: 20px 0; text-align: center; color: var(--cover-olive); font: 500 15px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2em; }
.signal-cover__button { display: block; width: min(350px, 70%); min-height: 70px; margin: 0 auto; border: 1px solid #d8d994; border-radius: 4px; background: var(--cover-olive); color: #14212a; font: 900 17px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; cursor: pointer; box-shadow: 0 12px 34px rgba(0,0,0,.2); }
.signal-cover__button:hover { filter: brightness(1.08); }

@media (max-width: 680px) {
  .signal-cover { min-height: 100svh; }
  .signal-cover__background { opacity: .18; object-position: 58% center; }
  .signal-cover__frame { inset: calc(env(safe-area-inset-top) + 64px) 14px calc(env(safe-area-inset-bottom) + 18px); }
  .signal-cover__header { top: calc(env(safe-area-inset-top) + 25px); left: 18px; right: 18px; font-size: 10px; }
  .signal-cover__status { display: none; }
  .signal-cover__glorb {
    position: relative;
    left: auto;
    bottom: auto;
    width: min(48vw, 210px);
    height: 17svh;
    max-height: 165px;
    margin: calc(env(safe-area-inset-top) + 66px) auto 0;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    visibility: hidden;
  }
  .signal-cover__content { width: 100%; margin: 0; padding: 12px 28px calc(env(safe-area-inset-bottom) + 30px); text-align: center; }
  .signal-cover__eyebrow { margin-bottom: 12px; font-size: 10px; text-align: center; }
  .signal-cover h1 { width: 100%; margin: 0 auto; font-size: clamp(50px, 14.5vw, 68px); line-height: .86; text-align: center; }
  .signal-cover__meter { width: min(100%, 500px); margin: 28px auto 0; gap: 5px; grid-template-columns: auto repeat(6, 1fr); }
  .signal-cover__meter i:nth-of-type(n+7),
  .signal-cover__meter b { display: none; }
  .signal-cover__meter i { height: 10px; }
  .signal-cover__decoded { margin: 18px auto; font-size: 12px; text-align: center; }
  .signal-cover__button { width: min(100%, 500px); min-height: 58px; margin: 0 auto; font-size: 15px; }
}

@media (max-width: 390px) {
  .brand { max-width: 70px; line-height: 1.15; }
  .nav-btn { width: 38px; min-width: 38px; }
  .signal-cover__content { padding-left: 22px; padding-right: 22px; }
  .signal-cover h1 { font-size: clamp(46px, 14.3vw, 57px); }
}

@media print {
  @page { size: A4 portrait; margin: 0; }
  body { background: #fff !important; }
  .app-shell, .modal-backdrop, .toast { display: none !important; }
  .report-root {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .report-document { box-shadow: none; margin: 0; width: 190mm; }
  .report-page { box-shadow: none; }
}

/* Final phone-cover override: remove only the foreground Glorb layer.
   Equivalent spacing is transferred to the content so its approved position stays fixed. */
@media screen and (max-width: 680px) {
  .is-cover .signal-cover__glorb {
    display: none !important;
  }

  .is-cover .signal-cover__content {
    padding-top: calc(env(safe-area-inset-top) + 78px + 17svh) !important;
  }
}

.report-root {
  position: fixed;
  left: -100000px;
  top: 0;
  width: 190mm;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   2026-08-13 approved UX/UI + report rebuild
   ========================================================= */

/* Readability: instructional text is left aligned and uses the readable UI face. */
.readable-page-title,
.readable-display,
.transition-card h1,
.question-title,
.text-screen h1,
.info-section h2,
.info-section h3,
.report-page h1,
.report-page h2,
.report-page h3 {
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, sans-serif;
}
.readable-page-title {
  max-width: 1040px;
  font-size: clamp(36px, 4.4vw, 62px) !important;
  line-height: 1.04 !important;
  letter-spacing: -.03em !important;
  text-transform: none;
  margin: 0 0 14px;
}
.readable-display {
  max-width: 900px;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -.035em;
}

/* Sequential onboarding */
.onboarding-screen { display: flex; align-items: center; justify-content: center; }
.onboarding-card {
  width: min(1180px, 94%);
  min-height: min(620px, calc(100dvh - var(--topbar-h) - 70px));
  background: var(--paper);
  border: 1px solid #d7c9b5;
  padding: clamp(36px, 6vw, 82px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  box-shadow: var(--shadow);
  transition: opacity .18s ease, transform .18s ease;
}
.onboarding-card.fade-out { opacity: 0; transform: translateY(-6px); }
.onboarding-title {
  min-height: 1.08em;
  font-size: clamp(52px, 7vw, 98px);
  line-height: .98;
  letter-spacing: -.05em;
  margin: 0 0 28px;
}
.onboarding-copy {
  max-width: 920px;
  min-height: 3.2em;
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.35;
  margin-bottom: 32px;
}
.onboarding-next[hidden] { visibility: hidden; display: block; }
.glorb-intro-card { display: grid; grid-template-columns: minmax(220px, 34%) 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.glorb-intro-visual { background: #fff; border: 1px solid var(--line); padding: 20px; display: grid; place-items: center; min-height: 360px; }
.glorb-intro-visual img { max-height: 360px; width: 100%; object-fit: contain; }
.glorb-intro-copy { text-align: left; }
.name-entry-card { max-width: 980px; min-height: 470px; }
.name-input-large { font-size: clamp(24px, 3vw, 38px); min-height: 86px; margin-bottom: 24px; }
.pathway-choice-panel { max-width: 1380px; margin: 0 auto; }
.pathway-choice-panel .path-grid { align-items: stretch; }
.time-estimate { margin-top: 18px !important; color: var(--ink) !important; font-size: 13px !important; font-weight: 900; letter-spacing: .11em; }
.warning-screen-card { max-width: 960px; min-height: 520px; }
.warning-box-large { width: 100%; max-width: 850px; margin: 10px 0 28px; font-size: clamp(18px, 2vw, 24px); line-height: 1.5; }

/* Compact signal orientation header. */
.signal-selection-screen { padding-top: 18px; }
.signal-orientation {
  width: min(920px, 100%);
  min-height: 150px;
  margin: 0 0 16px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.075);
  display: grid;
  grid-template-columns: 1fr 230px;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  color: #fff;
}
.signal-orientation-copy { display: flex; align-items: center; gap: 20px; }
.signal-orientation .signal-pill { background: var(--paper); color: var(--ink); padding: 12px 17px; font-weight: 900; letter-spacing: .12em; min-width: 170px; text-align: center; }
.signal-orientation p { margin: 0; color: #e4ebf1; line-height: 1.4; max-width: 500px; }
.signal-orientation-image { background: #fff; border: 1px solid #d7c9b5; min-height: 115px; padding: 7px; display: grid; place-items: center; }
.signal-orientation-image img { max-height: 105px; width: 100%; object-fit: contain; }
.selection-panel h1.readable-page-title { max-width: 1050px; }

/* Section transitions: left aligned, compact, readable. */
.transition-card-left {
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  gap: clamp(24px, 5vw, 65px);
  padding: clamp(34px, 5vw, 66px);
}
.transition-card-left .transition-copy { min-width: 0; }
.transition-card-left .emotion-chip {
  width: 210px;
  height: 210px;
  margin: 0;
  justify-self: end;
}
.transition-card-left h1 {
  max-width: 800px;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -.035em;
  margin: 0 0 18px;
  text-align: left;
}
.transition-card-left p {
  max-width: 760px;
  margin: 0 0 26px;
  text-align: left;
  font-size: clamp(18px, 2vw, 25px);
}
.transition-card-left .primary-btn { justify-self: start; }
.rating-strip-chip { width: 310px !important; height: 220px !important; }

/* Rating choices look like controls, not content cards. */
.rating-btn {
  border: 3px solid #9e927f;
  border-radius: 5px;
  background: #fff;
  min-height: 124px;
  padding: 7px 7px 10px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(16,35,58,.12);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.rating-btn:hover,
.rating-btn:focus-visible { border-color: var(--ink); box-shadow: 0 5px 14px rgba(16,35,58,.12); }
.rating-btn:active { transform: translateY(2px); box-shadow: none; }
.rating-btn img { height: 78px; width: 100%; object-fit: contain; }
.rating-label { font-size: clamp(10px, 1vw, 13px); line-height: 1.15; font-weight: 900; color: var(--ink); text-align: center; }

/* Framework visual inside More Information. */
.framework-info-visual { display: grid; grid-template-columns: 1fr 420px; gap: 26px; align-items: center; }
.framework-info-visual img { width: 100%; max-height: 300px; object-fit: contain; background: var(--paper-2); border: 1px solid var(--line); padding: 12px; }

/* Report sizing */
.report-document.landscape { width: 277mm; }
.report-document.portrait { width: 190mm; }
.report-document.landscape .report-page { width: 277mm; min-height: 190mm; padding: 12mm 13mm; }
.report-document.portrait .report-page { width: 190mm; min-height: 277mm; }
.report-page { text-align: left; }
.report-page-landscape { min-height: 190mm !important; }
.report-empty { color: #697486; font-style: italic; font-size: 9.5pt; }
.overall-severity { border-left: 4px solid var(--orange); background: #fff; padding: 4mm; margin: 4mm 0 5mm; font-size: 12pt; }

/* Approved Signal System explanation visual. */
.framework-report-box { display: grid; grid-template-columns: 1fr 44%; gap: 7mm; border: 1px solid #cfc5b5; background: #fff; padding: 6mm; margin: 5mm 0; align-items: center; }
.framework-report-copy h2 { font-size: 19pt; }
.framework-report-copy p { font-size: 10.5pt; }
.framework-report-image { background: #fff; min-height: 55mm; display: grid; place-items: center; }
.framework-report-image img { width: 100%; max-height: 67mm; object-fit: contain; }
.signal-definition-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; margin: 5mm 0; }
.signal-definition { border: 1px solid #cfc5b5; padding: 4mm; min-height: 34mm; background: #fff; }
.signal-definition.low { border-top: 5px solid #a9cbe9; }
.signal-definition.steady { border-top: 5px solid #a9d9d0; }
.signal-definition.rising { border-top: 5px solid #f0bf83; }
.signal-definition.overload { border-top: 5px solid #e5aab8; }
.signal-definition h3 { font-size: 12pt; }
.signal-definition p { font-size: 9.4pt; margin-bottom: 0; }

/* Detailed map: the earlier compact column format. */
.signal-columns { display: grid; gap: 3mm; align-items: stretch; }
.signal-columns.five { grid-template-columns: repeat(5, 1fr); }
.signal-column { border: 1px solid #cfc5b5; background: #fff; min-width: 0; break-inside: avoid; }
.signal-column-head { min-height: 36mm; padding: 4mm; border-bottom: 1px solid #cfc5b5; }
.signal-column.low .signal-column-head { background: var(--low); }
.signal-column.steady .signal-column-head { background: var(--steady); }
.signal-column.rising .signal-column-head { background: var(--rising); }
.signal-column.overload .signal-column-head { background: var(--overload); }
.signal-column.recovery .signal-column-head { background: var(--recovery); }
.signal-column-body { padding: 4mm; }
.signal-column-body h3 { font-size: 8.4pt; letter-spacing: .09em; margin: 0 0 1.4mm; }
.signal-column-body .report-list { padding-left: 4.5mm; margin: 0 0 3mm; }
.signal-column-body .report-list li { font-size: 8.5pt; line-height: 1.3; margin-bottom: .6mm; }
.report-signal-label { font-size: 9pt; font-weight: 900; letter-spacing: .08em; }
.report-feeling-large { font-size: 23pt; font-weight: 900; line-height: 1.05; margin-top: 2mm; }
.report-feeling-large.small { font-size: 17pt; }

.single-feeling-report-head { display: grid; grid-template-columns: 38mm 1fr; gap: 5mm; align-items: center; background: #fff; border: 1px solid #cfc5b5; padding: 5mm; margin-bottom: 5mm; }
.single-feeling-report-head.low { border-top: 7px solid #a9cbe9; }
.single-feeling-report-head.steady { border-top: 7px solid #a9d9d0; }
.single-feeling-report-head.rising { border-top: 7px solid #f0bf83; }
.single-feeling-report-head.overload { border-top: 7px solid #e5aab8; }
.single-feeling-report-head img { width: 35mm; height: 30mm; object-fit: contain; }
.detailed-map-box { margin-top: 0; }

/* Low → Rising → Overload → Recovery pathway */
.pathway-graphic { margin: 2mm 0 4mm; height: 55mm; position: relative; }
/* Use ordinary HTML/CSS for the pathway rather than inline SVG. html2canvas/jsPDF can
   intermittently omit inline SVG strokes during export, while CSS boxes render reliably. */
.pathway-track { position: relative; width: 100%; height: 44mm; overflow: visible; }
.path-segment { position: absolute; display: block; height: 2.8mm; background: #10233a; border-radius: 999px; transform-origin: 0 50%; z-index: 1; }
.segment-low-rising { left: 8%; top: 79%; width: 28.5%; transform: rotate(-5deg); }
.segment-rising-overload { left: 36%; top: 61%; width: 34.5%; transform: rotate(-10deg); }
.segment-overload-recovery { left: 69%; top: 16%; width: 25%; transform: rotate(18deg); }
.path-dot { position: absolute; width: 8mm; height: 8mm; border: 1.1mm solid #10233a; border-radius: 50%; transform: translate(-50%, -50%); z-index: 2; box-sizing: border-box; }
.path-dot-low { left: 8%; top: 79%; background: #a9cbe9; }
.path-dot-rising { left: 36%; top: 61%; background: #f0bf83; }
.path-dot-overload { left: 69%; top: 16%; background: #e5aab8; }
.path-dot-recovery { left: 92%; top: 75%; background: #c7c9bb; }
.pathway-labels { display: grid; grid-template-columns: repeat(4,1fr); font-size: 9pt; font-weight: 900; letter-spacing: .08em; text-align: center; margin-top: -2mm; }
.support-path-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; }
.path-stage { border: 1px solid #cfc5b5; padding: 3.5mm; background: #fff; min-height: 70mm; }
.path-stage.low { background: var(--low); }
.path-stage.rising { background: var(--rising); }
.path-stage.overload { background: var(--overload); }
.path-stage.recovery { background: var(--recovery); }
.path-stage h3 { font-size: 11pt; margin-bottom: 1mm; }
.path-stage h4 { font-size: 7.8pt; letter-spacing: .08em; margin: 3mm 0 1mm; }
.path-stage .path-feeling { font-size: 14pt; font-weight: 900; margin-bottom: 2mm; }
.path-stage .report-list { margin: 0; padding-left: 4.5mm; }
.path-stage .report-list li { font-size: 8pt; line-height: 1.25; }

/* Quick guide boxes. */
.quick-guide-block { border: 2px solid var(--orange); padding: 5mm; margin: 0 0 6mm; break-inside: avoid; }
.quick-guide-block h2 { font-size: 18pt; }
.quick-guide-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 3mm; }
.quick-guide-grid > div { border: 1px solid #cfc5b5; background: #fff; padding: 4mm; min-height: 52mm; }
.quick-guide-grid h3 { font-size: 9pt; letter-spacing: .05em; }
.quick-guide-grid .report-list { margin: 0; padding-left: 4.5mm; }
.quick-guide-grid .report-list li { font-size: 8.5pt; }

/* Pressure summary gets 2 x 2 cards. */
.pressure-grid-two { display: grid; grid-template-columns: repeat(2,1fr); gap: 4mm; }
.pressure-grid-two .pressure-summary-card { margin: 0; min-height: 52mm; }
.student-pressure-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 4mm; }
.student-pressure-card { display: grid; grid-template-columns: 32mm 1fr; gap: 4mm; align-items: center; border: 1px solid #cfc5b5; background: #fff; padding: 4mm; }
.student-pressure-card img { width: 30mm; height: 28mm; object-fit: contain; }
.student-pressure-card p { margin: 1mm 0 0; }
.student-detail-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 5mm; }
.student-detail-grid > div { border: 1px solid #cfc5b5; background: #fff; padding: 5mm; }

.text-card-space { height: 35mm; background: var(--paper-2); margin: 1mm 0; }
.cut-card.recovery { border-top: 8px solid #c7c9bb; }

/* More information is left aligned. */
.modal-body, .info-section, .info-choice button { text-align: left; }

@media (max-width: 1180px) {
  .signal-orientation { grid-template-columns: 1fr 190px; }
  .glorb-intro-card { grid-template-columns: 250px 1fr; }
  .transition-card-left { grid-template-columns: 1fr 180px; }
  .transition-card-left .emotion-chip { width: 170px; height: 170px; }
}

@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px) {
  .onboarding-card { min-height: calc(100dvh - var(--topbar-h) - 45px); padding: 34px; }
  .glorb-intro-card { grid-template-columns: 190px 1fr; }
  .glorb-intro-visual { min-height: 260px; }
  .signal-orientation { width: 100%; grid-template-columns: 1fr 170px; min-height: 120px; }
  .signal-orientation-copy { gap: 12px; }
  .signal-orientation .signal-pill { min-width: 150px; }
  .signal-orientation-image { min-height: 90px; }
  .signal-orientation-image img { max-height: 82px; }
  .transition-card-left { grid-template-columns: 1fr 160px; width: min(920px, 96%); padding: 32px; }
  .transition-card-left h1 { font-size: clamp(36px, 5.2vw, 54px); }
  .transition-card-left .emotion-chip { width: 150px; height: 150px; }
  .rating-btn { min-height: 94px; }
  .rating-btn img { height: 58px; }
  .rating-label { font-size: 10px; }
  .framework-info-visual { grid-template-columns: 1fr 300px; }
}

@media (max-width: 680px) {
  .onboarding-card, .glorb-intro-card, .transition-card-left { display: block; min-height: auto; }
  .glorb-intro-visual, .transition-card-left .emotion-chip { width: 100%; height: 190px; min-height: 0; margin: 0 0 22px; }
  .signal-orientation { grid-template-columns: 1fr; }
  .signal-orientation-copy { display: block; }
  .signal-orientation .signal-pill { display: inline-block; margin-bottom: 10px; }
  .signal-orientation-image { display: none; }
  .framework-info-visual { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4 landscape; margin: 0; }
  .report-document.landscape { width: 277mm !important; }
  .report-document.landscape .report-page { width: 277mm !important; min-height: 190mm !important; }
}

/* Preserve the student's variable / sometimes responses in compact report views. */
.sometimes-inline {
  display: inline-block;
  margin-left: .45em;
  padding: .12em .4em;
  border: 1px solid #b59632;
  border-radius: 999px;
  font-size: .68em;
  font-weight: 800;
  letter-spacing: .04em;
  vertical-align: .08em;
  white-space: nowrap;
}

/* === AUG 13 REPORT/PDF LAYOUT FIXES === */
/* Prevent the scale illustration from sitting on top of the intro copy. */
.pressure-welcome-card {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
}
.pressure-welcome-card .transition-copy { min-width: 0; }
.pressure-welcome-card .rating-strip-chip {
  width: 100% !important;
  max-width: 340px;
  height: 220px !important;
  justify-self: end;
}
.pressure-welcome-card .transition-copy p { max-width: 720px; }

/* Every exported .report-page is a real A4 page. Padding is the page margin. */
#reportRoot.pdf-export .report-document.landscape { width: 297mm !important; }
#reportRoot.pdf-export .report-document.portrait { width: 210mm !important; }
#reportRoot.pdf-export .report-document.landscape .report-page {
  width: 297mm !important;
  min-height: 210mm !important;
  padding: 10mm 12mm !important;
}
#reportRoot.pdf-export .report-document.portrait .report-page {
  width: 210mm !important;
  min-height: 297mm !important;
  padding: 12mm 14mm !important;
}
#reportRoot.pdf-export .report-page {
  page-break-after: always;
  break-after: page;
}
#reportRoot.pdf-export .report-page:last-child {
  page-break-after: auto;
  break-after: auto;
}

/* Compact, legible landscape report typography so a logical page stays on one PDF page. */
.report-document.landscape .report-page h1 {
  font-size: 25pt;
  line-height: 1.02;
  margin-bottom: 3mm;
}
.report-document.landscape .report-page h2 { font-size: 15pt; margin-bottom: 2.5mm; }
.report-document.landscape .report-page h3 { font-size: 10.5pt; margin-bottom: 1.4mm; }
.report-document.landscape .report-page p,
.report-document.landscape .report-page li { font-size: 8.6pt; line-height: 1.28; }
.report-document.landscape .report-kicker { font-size: 7.8pt; margin-bottom: 2mm; }
.report-document.landscape .report-subtitle { font-size: 10.5pt !important; margin-bottom: 4mm; }
.report-document.landscape .report-note { padding: 2.8mm 3.2mm; margin: 3mm 0; }
.report-document.landscape .report-note p { margin: 1mm 0 0; }

/* Adult guide / framework page - designed to remain one landscape page. */
.report-document.landscape .framework-report-box {
  grid-template-columns: 1fr 38%;
  gap: 5mm;
  padding: 4mm;
  margin: 3mm 0;
}
.report-document.landscape .framework-report-copy h2 { font-size: 14pt; }
.report-document.landscape .framework-report-copy p { font-size: 8.3pt; line-height: 1.28; }
.report-document.landscape .framework-report-image { min-height: 38mm; }
.report-document.landscape .framework-report-image img { max-height: 46mm; }
.report-document.landscape .signal-definition-grid { gap: 2.5mm; margin: 3mm 0; }
.report-document.landscape .signal-definition { padding: 2.7mm; min-height: 27mm; }
.report-document.landscape .signal-definition h3 { font-size: 9.5pt; margin-bottom: 1mm; }
.report-document.landscape .signal-definition p { font-size: 7.6pt; line-height: 1.22; }

/* Five-column signal pages - keep the visual structure the user preferred, but fit the page. */
.report-document.landscape .signal-columns.five { gap: 2.4mm; }
.report-document.landscape .signal-column-head { min-height: 26mm; padding: 2.8mm; }
.report-document.landscape .signal-column-body { padding: 2.8mm; }
.report-document.landscape .signal-column-body h3 {
  font-size: 7.2pt;
  line-height: 1.12;
  letter-spacing: .07em;
  margin: 0 0 1mm;
}
.report-document.landscape .signal-column-body .report-list {
  padding-left: 3.8mm;
  margin: 0 0 2mm;
}
.report-document.landscape .signal-column-body .report-list li {
  font-size: 7.25pt;
  line-height: 1.16;
  margin-bottom: .35mm;
}
.report-document.landscape .report-signal-label { font-size: 7.3pt; }
.report-document.landscape .report-feeling-large.small { font-size: 14pt; }
.report-document.landscape .sometimes-inline { font-size: .62em; }

/* Signal pathway page. */
.report-document.landscape .pathway-graphic { height: 43mm; margin: 1mm 0 3mm; }
.report-document.landscape .pathway-track { height: 33mm; }
.report-document.landscape .path-stage { min-height: 61mm; padding: 2.6mm; }
.report-document.landscape .path-stage h3 { font-size: 9pt; }
.report-document.landscape .path-stage h4 { font-size: 6.8pt; margin: 2mm 0 .7mm; }
.report-document.landscape .path-stage .path-feeling { font-size: 11pt; }
.report-document.landscape .path-stage .report-list { padding-left: 3.6mm; }
.report-document.landscape .path-stage .report-list li { font-size: 7pt; line-height: 1.15; }

/* Adult quick guide: two blocks fit together rather than being split across pages. */
.report-document.landscape .quick-guide-block { padding: 3.2mm; margin-bottom: 3mm; }
.report-document.landscape .quick-guide-block h2 { font-size: 13.5pt; margin-bottom: 2mm; }
.report-document.landscape .quick-guide-grid { gap: 2.5mm; }
.report-document.landscape .quick-guide-grid > div { padding: 2.8mm; min-height: 39mm; }
.report-document.landscape .quick-guide-grid h3 { font-size: 7.5pt; }
.report-document.landscape .quick-guide-grid .report-list { padding-left: 3.6mm; }
.report-document.landscape .quick-guide-grid .report-list li { font-size: 7.2pt; line-height: 1.16; }

/* Pressure report: 2x2 summary plus tables are deliberately compact. */
.report-document.landscape .pressure-grid-two { gap: 3mm; }
.report-document.landscape .pressure-summary-card { padding: 3mm; margin: 0; min-height: 48mm; }
.report-document.landscape .pressure-summary-card h3 { font-size: 10pt; margin-bottom: 1.5mm; }
.report-document.landscape .pressure-summary-card p { font-size: 7.6pt; line-height: 1.22; margin: 1.2mm 0; }
.report-document.landscape .severity-meter { grid-template-columns: 38mm 1fr 18mm; gap: 2mm; margin: 2mm 0; font-size: 8pt; }
.report-document.landscape .impact-pill { font-size: 7.2pt; padding: 1mm 1.8mm; }
.report-document.landscape .overall-severity { padding: 2.8mm; margin: 2.5mm 0 3mm; font-size: 9.2pt; }
.report-document.landscape .report-table th,
.report-document.landscape .report-table td,
.report-document.landscape .compact-table th,
.report-document.landscape .compact-table td {
  padding: 1.35mm 1.7mm;
  font-size: 7.45pt;
  line-height: 1.18;
}
.report-document.landscape .pressure-detail-table th,
.report-document.landscape .pressure-detail-table td { font-size: 7.15pt; }

/* Research and references are deliberately separated, instead of overflowing one page. */
.research-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
.research-two-col > div { min-width: 0; }
.report-document.landscape .research-two-col h2 { font-size: 14pt; margin-top: 1mm; }
.report-document.landscape .report-reference-list { margin-top: 3mm; }
.report-document.landscape .report-reference-list li {
  font-size: 8pt;
  line-height: 1.3;
  margin-bottom: 2.8mm;
  overflow-wrap: anywhere;
}

/* Student map: visual overview and detailed five-column map now live on separate pages. */
.student-overview-page .student-signal-visual {
  height: 108mm;
  margin: 2mm auto 5mm;
  display: grid;
  place-items: center;
}
.student-overview-page .student-signal-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.student-overview-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3mm;
}
.student-overview-chip {
  border: 1px solid #cfc5b5;
  padding: 3mm;
  min-height: 24mm;
  background: #fff;
}
.student-overview-chip.low { border-top: 6px solid #a9cbe9; }
.student-overview-chip.steady { border-top: 6px solid #a9d9d0; }
.student-overview-chip.rising { border-top: 6px solid #f0bf83; }
.student-overview-chip.overload { border-top: 6px solid #e5aab8; }
.student-detail-page .signal-columns { margin-top: 2mm; }

/* Portrait answer/report pages: avoid splitting tables and make continuations readable. */
.report-document.portrait .report-page h1 { font-size: 24pt; line-height: 1.04; margin-bottom: 3mm; }
.report-document.portrait .report-page h2 { font-size: 14.5pt; margin: 4mm 0 2mm; }
.report-document.portrait .report-page p,
.report-document.portrait .report-page li { font-size: 9.5pt; line-height: 1.35; }
.report-document.portrait .report-kicker { font-size: 7.8pt; margin-bottom: 2mm; }
.report-document.portrait .report-subtitle { font-size: 10.5pt !important; margin-bottom: 5mm; }
.answers-page .report-table { margin: 2.5mm 0 4mm; }
.answers-page .report-table th,
.answers-page .report-table td { padding: 1.55mm 1.8mm; font-size: 8.25pt; line-height: 1.22; }
.answers-page .report-table th:last-child,
.answers-page .report-table td:last-child { width: 28%; }

/* Printable cards: 6 per portrait page, no card can be split between pages. */
.report-document.portrait .report-card-sheet { grid-template-columns: repeat(2, 1fr); gap: 4mm; }
.report-document.portrait .cut-card { min-height: 62mm; height: 62mm; padding: 3.2mm; }
.report-document.portrait .cut-card img { height: 35mm; margin: 0 auto; }
.report-document.portrait .cut-card .card-text { font-size: 12.5pt; }
.report-document.portrait .cut-card .card-signal { font-size: 7.2pt; }

/* Adult-guide PDF is portrait and has its own balanced spacing. */
.guide-page .framework-report-box { grid-template-columns: 1fr 42%; padding: 5mm; margin: 4mm 0; }
.guide-page .framework-report-image { min-height: 48mm; }
.guide-page .framework-report-image img { max-height: 55mm; }
.guide-page .signal-definition-grid { grid-template-columns: repeat(2, 1fr); gap: 3mm; }
.guide-page .signal-definition { min-height: 38mm; padding: 3.5mm; }
.guide-page .signal-definition p { font-size: 8.7pt; }
.guide-page .report-note { margin: 4mm 0; }
.guide-page .research-two-col { grid-template-columns: 1fr; }
.guide-page .report-reference-list li { overflow-wrap: anywhere; }

@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px) {
  .pressure-welcome-card { grid-template-columns: minmax(0, 1fr) 230px; }
  .pressure-welcome-card .rating-strip-chip { max-width: 230px; height: 170px !important; }
}

@media (max-width: 680px) {
  .pressure-welcome-card { display: block; }
  .pressure-welcome-card .rating-strip-chip {
    width: 100% !important;
    max-width: none;
    height: 170px !important;
    margin-top: 20px;
  }
}

@media print {
  @page { size: A4 landscape; margin: 0; }
  .report-document.landscape { width: 297mm !important; }
  .report-document.landscape .report-page {
    width: 297mm !important;
    min-height: 210mm !important;
    padding: 10mm 12mm !important;
  }
}

/* === AUG 13 PRESSURE INTRO TEXT-OVERLAP HOTFIX ===
   Keep all explanatory copy in its own column so the rating-scale visual
   can never cover or sit on top of text at school-laptop/iPad widths. */
.pressure-welcome-card .transition-copy {
  min-width: 0;
  overflow: hidden;
}
.pressure-welcome-card .transition-copy p {
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
}

@media (max-width: 1180px) {
  .pressure-welcome-card {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 28px;
    padding: clamp(28px, 4vw, 42px);
  }
  .pressure-welcome-card .rating-strip-chip {
    width: 210px !important;
    max-width: 210px;
    height: 160px !important;
    justify-self: end;
  }
}

@media (max-width: 760px) {
  .pressure-welcome-card {
    display: block;
  }
  .pressure-welcome-card .rating-strip-chip {
    width: 100% !important;
    max-width: 100%;
    height: 150px !important;
    margin: 18px 0 22px;
  }
}


/* === AUG 13 PRESSURE INTRO SCROLL FIX ===
   The intro can be taller than the usable viewport on school laptops/iPads.
   Let the document scroll normally here; actual one-question screens keep
   their fixed no-scroll interaction. */
.pressure-welcome-screen {
  height: auto !important;
  max-height: none !important;
  min-height: calc(100dvh - var(--topbar-h) - 5px);
  overflow: visible !important;
  padding-bottom: 34px;
}
.pressure-welcome-screen .transition-wrap {
  min-height: 0;
}
.pressure-welcome-screen .pressure-welcome-card {
  min-height: 0;
}

@media (max-height: 820px) and (min-width: 761px) {
  .pressure-welcome-screen { padding-top: 14px; }
  .pressure-welcome-screen .pressure-welcome-card {
    padding-top: 28px;
    padding-bottom: 28px;
  }
}

/* Timestamp footer for every generated PDF page. */
#reportRoot.pdf-export .report-generated { right: 12mm; bottom: 4mm; font-size: 6.8pt !important; }

/* =========================================================
   MOBILE SAFARI AUDIT — PHONE-ONLY ADAPTIVE LAYER
   This final layer intentionally applies at 680px and below.
   Desktop, iPad, print and hidden PDF-export layouts are unchanged.
   ========================================================= */
@media screen and (max-width: 680px) {
  html {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }

  button,
  input,
  textarea { font-size: max(16px, 1em); }

  img { max-width: 100%; height: auto; }

  :root { --topbar-h: 68px; }

  .app-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .topbar {
    width: 100%;
    min-height: var(--topbar-h);
    padding: 8px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
    align-items: center;
    gap: 4px;
  }

  .brand { flex: 0 1 auto; min-width: 0; }
  .topnav { min-width: 0; max-width: none; }
  .nav-btn { flex: 0 0 40px; touch-action: manipulation; }

  .global-progress {
    top: var(--topbar-h);
    height: 4px;
  }

  .app-main { width: 100%; min-width: 0; }
  .screen,
  .screen-fit {
    width: 100%;
    height: auto;
    max-height: none;
    min-height: calc(100vh - var(--topbar-h) - 4px);
    min-height: calc(100dvh - var(--topbar-h) - 4px);
    margin: 0;
    padding: 14px 10px calc(24px + env(safe-area-inset-bottom));
    overflow: visible;
  }

  .overline {
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: .14em;
    overflow-wrap: anywhere;
  }

  .readable-page-title,
  .readable-display,
  .selection-panel h1,
  .transition-card h1,
  .transition-card-left h1,
  .text-screen h1,
  .pressure-intro-copy h1 {
    font-size: clamp(30px, 9.2vw, 42px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.035em !important;
    overflow-wrap: break-word;
  }

  .body-copy,
  .transition-card p,
  .transition-card-left p,
  .pressure-intro-copy p { font-size: 17px; line-height: 1.45; }

  .primary-btn,
  .secondary-btn {
    width: 100%;
    min-height: 54px;
    padding: 13px 16px;
    text-align: center;
    touch-action: manipulation;
  }

  .button-row { width: 100%; gap: 9px; }
  .button-row > * { flex: 1 1 100%; }

  /* Cover: remove only its foreground character and retain the approved spacing. */
  .is-cover .signal-cover__glorb { display: none !important; }
  .is-cover .signal-cover__content {
    width: 100%;
    margin: 0;
    padding: calc(env(safe-area-inset-top) + 78px + 17svh) 22px calc(env(safe-area-inset-bottom) + 28px) !important;
    text-align: center;
  }
  .signal-cover__header { left: 18px; right: 18px; }
  .signal-cover h1 {
    width: 100%;
    margin: 0 auto;
    font-size: clamp(46px, 14.5vw, 66px);
    text-align: center;
  }
  .signal-cover__meter,
  .signal-cover__button { width: min(100%, 500px); margin-left: auto; margin-right: auto; }

  /* Onboarding and name entry. */
  .onboarding-screen { align-items: flex-start; }
  .onboarding-card,
  .glorb-intro-card,
  .name-entry-card,
  .warning-screen-card {
    width: 100%;
    min-height: auto;
    margin: 0;
    padding: 26px 20px;
  }
  .onboarding-title { min-height: 0; font-size: clamp(40px, 12vw, 54px); margin-bottom: 20px; }
  .onboarding-copy { min-height: 0; font-size: 19px; line-height: 1.42; margin-bottom: 24px; }
  .glorb-intro-visual {
    width: 100%;
    height: min(31svh, 250px);
    margin-bottom: 22px;
    padding: 10px;
  }
  .glorb-intro-visual img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
  .name-input,
  .name-input-large {
    min-height: 58px;
    padding: 12px 14px;
    font-size: 18px;
    margin-bottom: 18px;
  }
  .warning-box,
  .warning-box-large { padding: 16px; font-size: 16px; }

  /* Pathway choice and feeling selection. */
  .selection-panel {
    width: 100%;
    min-height: 0;
    padding: 24px 16px 28px;
  }
  .path-grid,
  .selection-panel .path-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
    margin-top: 18px;
  }
  .path-card,
  .selection-panel .path-card {
    min-height: 0 !important;
    padding: 20px 18px;
    gap: 18px;
  }
  .path-card h2 { font-size: 25px; line-height: 1.05; }
  .path-card p { font-size: 16px; }
  .time-estimate { margin-top: 12px !important; }

  .signal-selection-screen { padding-top: 12px; }
  .signal-orientation {
    width: 100%;
    min-height: 0;
    margin-bottom: 10px;
    padding: 14px;
    grid-template-columns: 1fr;
  }
  .signal-orientation-copy { display: block; }
  .signal-orientation .signal-pill { min-width: 0; margin-bottom: 8px; padding: 10px 13px; }
  .signal-orientation p { font-size: 15px; }
  .signal-orientation-image { display: none; }

  .feeling-grid,
  .feeling-grid.all {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 16px;
  }
  .feeling-card {
    min-width: 0;
    min-height: 148px;
    padding: 9px 7px;
  }
  .feeling-card img { height: 98px; }
  .feeling-card span { font-size: 14px; overflow-wrap: anywhere; }

  /* Transition and free-text screens. */
  .transition-wrap { height: auto; min-height: 0; align-items: flex-start; }
  .transition-card,
  .transition-card-left,
  .pressure-welcome-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    padding: 24px 18px;
    gap: 0;
    text-align: left;
  }
  .transition-card-left .emotion-chip,
  .pressure-welcome-card .rating-strip-chip {
    order: -1;
    width: 100% !important;
    max-width: 100%;
    height: min(28svh, 210px) !important;
    margin: 0 0 20px;
    padding: 8px;
    align-self: stretch;
  }
  .transition-card-left .primary-btn { justify-self: auto; }
  .text-screen {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 24px 18px;
  }
  .text-area { min-height: 180px; padding: 14px; font-size: 18px; }

  /* One-question pattern screens. */
  .question-screen { display: block; color: #fff; }
  .question-head { padding: 0 4px 12px; }
  .question-title {
    font-size: clamp(27px, 8.2vw, 38px) !important;
    line-height: 1.04 !important;
    letter-spacing: -.025em !important;
  }
  .question-card-shell,
  .rating-shell {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 12px;
  }
  .visual-card,
  .rating-visual {
    width: 100%;
    height: min(32svh, 265px);
    min-height: 180px;
    margin-bottom: 12px;
    padding: 8px;
  }
  .visual-card img,
  .rating-visual img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
  }
  .answer-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
  }
  .answer-btn {
    min-width: 0;
    min-height: 62px;
    padding: 10px 7px;
    font-size: 15px;
    line-height: 1.18;
    touch-action: manipulation;
  }

  .rating-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .rating-btn {
    min-width: 0;
    min-height: 118px;
    padding: 7px;
    touch-action: manipulation;
  }
  .rating-btn img { height: 76px; }
  .rating-label { font-size: 12px; }

  /* Pressure introductions. */
  .pressure-welcome-screen {
    min-height: calc(100dvh - var(--topbar-h) - 4px);
    padding: 14px 10px calc(24px + env(safe-area-inset-bottom));
  }
  .pressure-intro {
    display: block;
    height: auto;
  }
  .pressure-intro-visual {
    display: grid;
    width: 100%;
    height: min(27svh, 205px);
    margin-bottom: 20px;
    padding: 8px;
    place-items: center;
  }
  .pressure-intro-visual img { width: 100%; height: 100%; max-height: none; object-fit: contain; }

  /* Information modal. */
  .modal-backdrop {
    align-items: stretch;
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  }
  .modal-card {
    width: 100%;
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
    border-radius: 0;
    -webkit-overflow-scrolling: touch;
  }
  .modal-head { padding: 12px 14px; }
  .modal-head h2 { font-size: 20px; }
  .modal-body { padding: 16px 12px 24px; }
  .info-choice { grid-template-columns: 1fr; gap: 10px; }
  .info-choice button { min-height: 0; padding: 20px 16px; }
  .info-choice h3 { font-size: 25px; }
  .info-section { padding: 17px 14px; }
  .info-section h2 { font-size: 27px; }
  .info-section h3 { font-size: 20px; }
  .info-section p,
  .info-section li { font-size: 16px; overflow-wrap: anywhere; }
  .info-scale { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .framework-info-visual { display: block; }
  .framework-info-visual img { margin-top: 16px; }
  .math-box,
  .references { overflow-wrap: anywhere; word-break: break-word; }

  /* On-screen report preview only. Hidden export pages retain exact A4 sizing. */
  .report-preview-wrap {
    width: 100%;
    padding: 12px 8px calc(36px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }
  .report-actions {
    position: static;
    width: 100%;
    margin-bottom: 12px;
    gap: 8px;
  }
  .report-actions > * { flex: 1 1 100%; }
  .app-main .report-document,
  .app-main .report-document.landscape,
  .app-main .report-document.portrait {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-shadow: none;
  }
  .app-main .report-page,
  .app-main .report-document.landscape .report-page,
  .app-main .report-document.portrait .report-page {
    width: 100%;
    min-height: 0 !important;
    padding: 22px 16px 38px;
    overflow-wrap: anywhere;
  }
  .app-main .report-page h1 { font-size: 29px; }
  .app-main .report-page h2 { font-size: 22px; }
  .app-main .report-page h3 { font-size: 17px; }
  .app-main .report-page p,
  .app-main .report-page li { font-size: 14px; line-height: 1.4; }
  .app-main .report-generated { right: 16px; bottom: 12px; }
  .app-main .signal-report-grid,
  .app-main .signal-columns.five,
  .app-main .signal-definition-grid,
  .app-main .support-path-grid,
  .app-main .quick-guide-grid,
  .app-main .pressure-grid-two,
  .app-main .student-pressure-grid,
  .app-main .student-detail-grid,
  .app-main .student-overview-row,
  .app-main .research-two-col,
  .app-main .framework-report-box,
  .app-main .guide-page .framework-report-box,
  .app-main .guide-page .signal-definition-grid {
    grid-template-columns: 1fr;
  }
  .app-main .single-feeling-report-head { grid-template-columns: 74px 1fr; }
  .app-main .single-feeling-report-head img { width: 70px; height: 70px; }
  .app-main .signal-column-head,
  .app-main .signal-definition,
  .app-main .path-stage,
  .app-main .quick-guide-grid > div,
  .app-main .pressure-summary-card { min-height: 0; }
  .app-main .pathway-graphic { display: none; }
  .app-main .severity-meter { grid-template-columns: 1fr; gap: 6px; }
  .app-main .report-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .app-main .report-card-sheet { grid-template-columns: 1fr; }
  .app-main .cut-card { height: auto; min-height: 0; }

  .toast {
    width: calc(100% - 24px);
    bottom: calc(12px + env(safe-area-inset-bottom));
    text-align: center;
  }
}

@media screen and (max-width: 390px) {
  .topbar:has(#backBtn:not([hidden])) .brand { display: none; }
  .topnav { margin-left: auto; }
  .nav-btn { flex-basis: 38px; width: 38px; min-width: 38px; }
  .signal-cover h1 { font-size: clamp(43px, 14vw, 55px); }
  .feeling-card { min-height: 140px; }
  .feeling-card img { height: 91px; }
}

/* =========================================================
   COVER-ONLY RESPONSIVENESS — iPad and desktop
   These selectors require .is-cover, so no Mapper screen after
   OPEN MAPPER can be affected at these viewport widths.
   ========================================================= */
@media screen and (min-width: 681px) and (max-width: 1100px) {
  .is-cover .signal-cover__glorb {
    display: block;
    width: 100vw;
    max-width: none;
    max-height: 88%;
    left: -4%;
    bottom: -1%;
    object-fit: contain;
    object-position: left bottom;
    clip-path: inset(0 58% 0 0);
  }

  .is-cover .signal-cover__content {
    width: 58%;
    margin-left: 39%;
    padding-top: clamp(135px, 20vh, 205px);
  }

  .is-cover .signal-cover h1 {
    font-size: clamp(54px, 7.4vw, 78px);
  }

  .is-cover .signal-cover__button {
    width: min(360px, 78%);
  }
}

@media screen and (min-width: 1101px) {
  .is-cover .signal-cover__glorb {
    display: block;
    width: min(82vw, 1500px);
    max-width: none;
    max-height: 92%;
    left: -2%;
    bottom: -1%;
    object-fit: contain;
    object-position: left bottom;
    clip-path: inset(0 58% 0 0);
  }

  .is-cover .signal-cover__content {
    width: min(55vw, 760px);
    margin-left: 41%;
  }
}
