/* Self-hosted variable fonts (SIL OFL 1.1, see fonts/OFL-*.txt): faster on mobile, work offline,
   and make no third-party request. Weight ranges match the original Google Fonts request. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --ink: #203d33;
  --muted: #748077;
  --green: #254f3e;
  --lime: #deedc8;
  --paper: #f7f8f4;
  --line: #e3e7df;
  --white: #fff;
  --soft: #edf2e9;
  --coral: #c97557;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.55 'DM Sans',
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #92ae7b;
  outline-offset: 4px;
}
button {
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
.hidden {
  display: none !important;
}
.app-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}
.sidebar {
  width: 250px;
  flex: none;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 34px 22px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
}
.brand {
  font:
    800 29px 'Manrope',
    sans-serif;
  letter-spacing: -1.4px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}
.brand-dot {
  color: #9aaf7e;
  margin-left: -10px;
}
.brand-icon {
  height: 35px;
  width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.brand-icon i {
  width: 4px;
  background: var(--green);
  border-radius: 3px;
  height: 13px;
}
.brand-icon i:nth-child(2) {
  height: 23px;
}
.brand-icon i:nth-child(3) {
  height: 32px;
}
.brand-icon i:nth-child(4) {
  height: 19px;
}
.workspace {
  margin: 38px 0 31px;
  padding: 14px 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f6f7f3;
  border-radius: 12px;
}
.workspace-logo {
  background: #e6ebdf;
  font-weight: 800;
  padding: 7px;
  border-radius: 8px;
  font-size: 13px;
}
.workspace strong {
  font-size: 12px;
}
.workspace small,
.profile small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.lock-icon {
  margin-left: auto;
  color: #92a089;
}
.nav-label,
.eyebrow,
.section-label {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 700;
}
.nav-label {
  padding-left: 14px;
  color: #9aa293;
  font-size: 9px;
  margin-bottom: 12px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 49px;
  background: none;
  color: #788277;
  border-radius: 10px;
  text-align: left;
  padding: 0 15px;
  margin-bottom: 6px;
  font-size: 13px;
}
.nav-item > span:first-child {
  font-size: 20px;
}
.nav-item.active {
  background: var(--soft);
  color: var(--green);
  font-weight: 700;
}
.count {
  margin-left: auto;
  font-size: 10px;
  background: white;
  padding: 2px 7px;
  border-radius: 6px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 22px 13px 0;
}
.leaf {
  font-size: 38px;
  color: #9bad88;
  line-height: 1;
}
.sidebar-bottom p {
  font:
    500 16px/1.55 'Manrope',
    sans-serif;
  margin: 14px 0 16px;
}
.text-button,
.inline-button {
  background: transparent;
  color: var(--green);
  padding: 8px 0;
}
.text-button {
  font-size: 12px;
  font-weight: 600;
}
.profile {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 25px;
  align-items: center;
}
.profile > span {
  background: #e5e0d4;
  color: #706655;
  border-radius: 50%;
  height: 34px;
  width: 34px;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.profile strong {
  font-size: 12px;
}
.main-shell {
  margin-left: 250px;
  width: calc(100% - 250px);
}
header {
  height: 84px;
  padding: 0 47px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbf8;
}
.breadcrumb {
  font-size: 11px;
  color: #8f988e;
}
.breadcrumb span {
  padding: 0 14px;
  color: #bcc3b8;
}
.breadcrumb strong {
  font-weight: 500;
  color: #5b6a5e;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #899582;
}
.save-dot {
  width: 5px;
  height: 5px;
  background: #7da26f;
  border-radius: 50%;
}
.small-button {
  background: white;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  min-height: 42px;
}
.header-right .small-button {
  margin-left: 20px;
}
main {
  padding: 44px 47px 0;
  max-width: 1510px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.eyebrow {
  color: #789166;
  font-size: 9px;
  display: block;
  margin-bottom: 14px;
}
h1 {
  font:
    600 clamp(27px, 2.7vw, 42px) / 1.24 'Manrope',
    sans-serif;
  letter-spacing: -1.5px;
  margin: 0 0 14px;
}
h1 span {
  color: #7d8d74;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.session-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #78866e;
  border: 1px solid #dde4d5;
  border-radius: 24px;
  padding: 8px 13px;
  white-space: nowrap;
}
.session-pill span {
  font-size: 17px;
}
.safety-note {
  font-size: 11px;
  color: #829078;
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}
.safety-note > span:first-child {
  color: #7d916b;
}
.capture-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 26px;
  align-items: start;
}
.interview-card,
.script-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 5px 20px #23362603;
  overflow: hidden;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 28px 0;
}
.section-label {
  color: #87967d;
  font-size: 9px;
}
.listen-button {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #64775a;
  font-size: 11px;
  padding: 7px 11px;
  border-radius: 7px;
  background: #f5f7f0;
  min-height: 36px;
}
.listen-button span {
  font-size: 13px;
}
.step-tabs {
  display: flex;
  padding: 26px 28px 0;
  gap: 8px;
}
.step-tab {
  position: relative;
  border-radius: 5px;
  background: #edf0e9;
  height: 4px;
  flex: 1;
  padding: 0;
}
.step-tab.active {
  background: #839f6b;
}
.step-tab.done {
  background: #bdcda9;
}
.step-tab:after {
  content: '';
  position: absolute;
  inset: -12px 0;
}
.question-area {
  padding: 28px 28px 0;
}
.question-area .eyebrow {
  font-size: 9px;
  margin-bottom: 8px;
  color: #8a9b78;
}
.question-area h2 {
  font:
    600 26px/1.3 'Manrope',
    sans-serif;
  letter-spacing: -0.7px;
  margin: 0 0 10px;
  max-width: 470px;
}
.question-area p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
}
.mode-tabs {
  display: flex;
  background: #f5f7f2;
  border: 1px solid #ecf0e6;
  border-radius: 9px;
  margin: 23px 28px 0;
  padding: 4px;
  gap: 4px;
}
.mode-tabs button {
  flex: 1;
  padding: 7px 5px;
  border-radius: 6px;
  background: transparent;
  color: #8a9581;
  font-size: 11px;
  min-height: 36px;
}
.mode-tabs button.selected {
  background: white;
  color: var(--green);
  box-shadow: 0 1px 4px #27392d0d;
  font-weight: 600;
}
#voice-panel {
  text-align: center;
  padding: 23px 28px 6px;
  min-height: 174px;
}
.voice-orb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 31px;
  margin-bottom: 16px;
}
.voice-orb span {
  width: 4px;
  height: 12px;
  background: #a8be8e;
  border-radius: 4px;
}
.voice-orb span:nth-child(2n) {
  height: 22px;
}
.voice-orb span:nth-child(3n) {
  height: 31px;
}
.voice-orb.active span {
  animation: wave 0.75s ease-in-out infinite alternate;
  background: #c5795f;
}
.voice-orb.active span:nth-child(2n) {
  animation-delay: 0.25s;
}
.voice-orb.active span:nth-child(3n) {
  animation-delay: 0.5s;
}
@keyframes wave {
  to {
    height: 6px;
  }
}
.record-button {
  background: var(--green);
  color: white;
  border-radius: 30px;
  min-height: 50px;
  padding: 13px 24px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 5px 12px #254f3e14;
  font-size: 13px;
  font-weight: 600;
}
.record-button.recording {
  background: #b35d44;
}
.mic-icon {
  height: 18px;
  width: 18px;
  display: grid;
  place-items: center;
  font-size: 12px;
  border: 1px solid #ffffff55;
  border-radius: 50%;
}
.voice-help {
  font-size: 10px;
  color: #96a08d;
  margin: 12px 0 0;
}
#voice-status {
  font-size: 11px;
  color: #9c653e;
  margin: 7px 0;
  min-height: 0;
}
.field-group {
  padding: 10px 28px 0;
}
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 11px;
  color: #617058;
  margin: 0 0 8px;
  gap: 8px;
}
.field-label > span {
  font-weight: 400;
  font-size: 9px;
  color: #9aa391;
}
.answer-input {
  background: #fafbf8;
  border: 1px solid #e5eadd;
  border-radius: 10px;
  width: 100%;
  min-height: 104px;
  resize: vertical;
  line-height: 1.7;
  padding: 13px;
  font-size: 12px;
  color: var(--ink);
}
textarea:focus,
input:focus,
select:focus {
  outline: 2px solid #afc69c;
  outline-offset: 2px;
}
textarea::placeholder,
input::placeholder {
  color: #a0a898;
}
.field-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9ba58f;
  font-size: 10px;
  min-height: 29px;
}
.field-target {
  border: 0;
  background: none;
  color: #678057;
  font-size: 10px;
  padding: 5px 0;
}
.field-target.active {
  color: #305b3e;
  font-weight: 700;
}
.question-footer {
  margin: 21px 28px 0;
  padding: 19px 0 22px;
  border-top: 1px solid #edf0e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.question-footer > span {
  color: #9aa58e;
  font-size: 10px;
}
.primary-button {
  background: var(--green);
  color: white;
  padding: 12px 18px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  min-height: 44px;
}
.primary-button span {
  margin-left: 15px;
}
.story-map {
  background: #eaf0e1;
  border: 1px solid #e0e7d5;
  border-radius: 18px;
  padding: 27px 24px;
}
.story-map .eyebrow {
  font-size: 8px;
  color: #82946d;
  letter-spacing: 1.3px;
}
.story-map h3 {
  font:
    600 23px/1.4 'Manrope',
    sans-serif;
  letter-spacing: -0.6px;
  margin: 16px 0 25px;
}
.story-map ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.story-map li {
  display: flex;
  gap: 13px;
  padding-bottom: 23px;
  position: relative;
}
.story-map li:not(:last-child):before {
  content: '';
  position: absolute;
  width: 1px;
  background: #cfdbc0;
  left: 12px;
  top: 30px;
  height: 27px;
}
.map-num {
  flex: none;
  background: #f7f9f2;
  border: 1px solid #d7e1cc;
  color: #92a37b;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 10px;
  display: grid;
  place-items: center;
}
.story-map li.current .map-num {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.story-map li strong {
  font-size: 11px;
  font-weight: 600;
}
.story-map li p {
  font-size: 10px;
  color: #829373;
  margin: 4px 0 0;
}
.story-caption {
  padding-top: 15px;
  border-top: 1px solid #d7e0ce;
  display: flex;
  gap: 13px;
  align-items: center;
}
.story-caption > span {
  font-size: 27px;
  color: #8fa477;
}
.story-caption p {
  font-size: 11px;
  color: #7d906c;
  margin: 0;
}
.destination-card {
  border: 1px solid var(--line);
  background: white;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 12px;
  margin-top: 17px;
}
.destination-card strong {
  font-size: 11px;
}
.destination-card p {
  font-size: 9px;
  color: #8e9b83;
  margin: 3px 0 0;
}
.mini-wave {
  height: 35px;
  width: 42px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.mini-wave i {
  width: 3px;
  height: 8px;
  background: #98ad7b;
  border-radius: 3px;
}
.mini-wave i:nth-child(2n) {
  height: 18px;
}
.mini-wave i:nth-child(3n) {
  height: 28px;
}
.local-note {
  color: #97a18e;
  font-size: 10px;
  padding: 0 6px;
  line-height: 1.8;
  margin-top: 16px;
}
.inline-button {
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
footer {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 34px 0 23px;
  color: #9ba592;
  font-size: 9px;
}
footer .inline-button {
  margin-left: auto;
}
.script-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 25px;
}
.script-card {
  padding: 0 28px 25px;
}
.script-card .card-top {
  padding: 24px 0;
  margin-bottom: 4px;
}
.badge {
  font-size: 10px;
  color: #7f946a;
  background: #eef3e7;
  padding: 3px 10px;
  border-radius: 6px;
}
.title-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  font:
    600 22px 'Manrope',
    sans-serif;
  padding: 7px 0 14px;
  color: var(--ink);
}
.script-stats {
  font-size: 10px;
  color: #849477;
  display: flex;
  gap: 13px;
  align-items: center;
  margin: 16px 0;
  flex-wrap: wrap;
}
.script-stats label {
  margin-left: auto;
}
.script-stats select {
  font-size: 10px;
  border: 0;
  background: #f5f7f0;
  border-radius: 5px;
  padding: 5px;
  color: #5c7551;
}
#script-text {
  font:
    400 17px/1.9 'DM Sans',
    sans-serif;
  color: #33483c;
  width: 100%;
  min-height: 375px;
  resize: vertical;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fdfefa;
}
.feedback {
  font-size: 11px;
  background: #f5f7ef;
  padding: 12px;
  border-radius: 8px;
  margin: 14px 0;
  color: #7c8b6f;
}
.script-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.prototype-note {
  font-size: 10px;
  color: #97a28b;
  margin-top: 18px;
  line-height: 1.7;
}
.review-card {
  padding: 25px;
  background: #edf2e5;
  border-radius: 17px;
  border: 1px solid #e1e8d8;
}
.review-card h3 {
  font:
    600 26px/1.3 'Manrope',
    sans-serif;
  margin: 8px 0 22px;
  letter-spacing: -0.5px;
}
.check-row {
  font-size: 11px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0;
  color: #687b5a;
}
.check-row input {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  flex: none;
  margin: 3px 0 0;
}
.review-card .field-label {
  display: block;
  margin-top: 22px;
}
.review-card .field-label span {
  display: block;
  margin-top: 5px;
}
.review-card textarea {
  min-height: 90px;
  background: #f8faf3;
  border: 1px solid #dce6cf;
  border-radius: 8px;
  width: 100%;
  padding: 10px;
  font-size: 11px;
  color: var(--ink);
  resize: vertical;
}
.review-hint {
  font-size: 10px;
  color: #849575;
  line-height: 1.7;
  margin: 10px 0 20px;
}
.full {
  width: 100%;
}
.voiceover {
  border-top: 1px solid #d9e2ce;
  padding-top: 16px;
  margin-top: 22px;
}
.voiceover h4 {
  font-size: 12px;
  margin: 0 0 5px;
}
.voiceover p {
  font-size: 10px;
  color: #849575;
  margin: 0 0 12px;
}
.audio-item {
  padding: 12px;
  background: #f5f8ef;
  border: 1px solid #e4ebdc;
  border-radius: 9px;
  margin: 10px 28px;
  font-size: 11px;
}
.audio-item audio {
  width: 100%;
  height: 35px;
  display: block;
  margin: 8px 0;
}
.audio-item a,
.audio-item button {
  color: #5d7950;
  background: none;
  font-size: 10px;
  padding: 5px;
}
.audio-item .audio-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.audio-item .audio-header strong {
  font-size: 10px;
}
.audio-item > p {
  font-size: 9px;
  color: #8f9d82;
  margin: 4px 0;
}
#narration-audio .audio-item {
  margin: 12px 0 0;
  padding: 8px;
}
.report-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  margin: 15px 0;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.report-card h3 {
  margin: 0;
  font-size: 18px;
}
.report-card p {
  font-size: 11px;
  color: #89967d;
  margin: 8px 0 0;
}
.report-card .report-actions {
  display: flex;
  gap: 8px;
}
.empty-state {
  padding: 65px 20px;
  background: white;
  border: 1px dashed #d9e2cf;
  border-radius: 18px;
  text-align: center;
  color: #829376;
}
.empty-state .leaf {
  font-size: 50px;
}
.empty-state h2 {
  font:
    600 24px 'Manrope',
    sans-serif;
  color: var(--ink);
}
.empty-state p {
  font-size: 12px;
}
.library-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 25px;
  font-size: 11px;
  color: #97a28a;
}
.danger-button {
  font-size: 11px;
  color: #ad604b;
  border: 1px solid #e5cec1;
  background: transparent;
  padding: 10px 14px;
  min-height: 42px;
  border-radius: 8px;
}
.mobile-nav {
  display: none;
}
.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
}
dialog {
  max-width: 530px;
  width: calc(100% - 32px);
  border: 1px solid #dbe5d0;
  border-radius: 20px;
  padding: 28px;
  color: var(--ink);
  box-shadow: 0 20px 60px #203d3325;
}
dialog::backdrop {
  background: #132b2266;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font:
    600 24px 'Manrope',
    sans-serif;
  letter-spacing: -0.5px;
}
dialog p,
dialog li {
  font-size: 12px;
  color: #718268;
  line-height: 1.8;
}
dialog .primary-button {
  margin: 12px 0 16px;
  display: block;
}
dialog #close-modal {
  margin-top: 8px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #244c3d;
  color: white;
  box-shadow: 0 7px 25px #203d3322;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 12px;
  max-width: 90%;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 10;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1450px) {
  main {
    padding-top: 54px;
  }
  .capture-grid {
    grid-template-columns: minmax(0, 750px) 310px;
  }
  .question-area h2 {
    font-size: 30px;
  }
  .question-area {
    padding-top: 32px;
  }
  #voice-panel {
    padding-top: 27px;
    padding-bottom: 14px;
  }
  .story-map {
    padding: 30px;
  }
  .story-map li {
    padding-bottom: 28px;
  }
  .answer-input {
    min-height: 115px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 210px;
    padding: 28px 15px;
  }
  .main-shell {
    margin-left: 210px;
    width: calc(100% - 210px);
  }
  header {
    padding: 0 30px;
  }
  main {
    padding: 35px 30px 0;
  }
  .capture-grid,
  .script-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 20px;
  }
  .story-map {
    padding: 23px 20px;
  }
  .card-top,
  .question-area {
    padding-left: 22px;
    padding-right: 22px;
  }
  .step-tabs {
    padding-left: 22px;
    padding-right: 22px;
  }
  .mode-tabs {
    margin-left: 22px;
    margin-right: 22px;
  }
  .field-group {
    padding-left: 22px;
    padding-right: 22px;
  }
  .question-footer {
    margin-left: 22px;
    margin-right: 22px;
  }
  .page-heading .session-pill {
    display: none;
  }
  .header-right #save-state {
    display: none;
  }
  .story-map h3 {
    font-size: 22px;
  }
  .question-area h2 {
    font-size: 24px;
  }
}
@media (max-width: 920px) {
  .sidebar {
    width: 190px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .main-shell {
    margin-left: 190px;
    width: calc(100% - 190px);
  }
  .brand {
    font-size: 25px;
    padding: 0 6px;
  }
  .nav-item {
    font-size: 11px;
    padding: 0 11px;
  }
  .capture-grid,
  .script-layout {
    grid-template-columns: 1fr;
  }
  .story-aside {
    display: none;
  }
  .review-card {
    display: block;
  }
  .review-card h3 br {
    display: none;
  }
  .page-heading h1 {
    font-size: 32px;
  }
  header {
    padding: 0 26px;
  }
  .script-card {
    padding-left: 22px;
    padding-right: 22px;
  }
  .script-stats label {
    margin-left: 0;
  }
  .review-card {
    padding: 23px;
  }
  .review-card .field-label {
    margin-top: 18px;
  }
  .sidebar-bottom {
    padding-left: 10px;
  }
  .sidebar-bottom p {
    font-size: 14px;
  }
}
/* Phones, portrait and landscape: readable text (11px minimum, 13–16px for body copy),
   44px+ touch targets, 16px form text so iOS does not zoom, and safe-area insets for
   notches and the home indicator. */
@media (max-width: 650px), (max-width: 950px) and (max-height: 500px) {
  .sidebar {
    display: none;
  }
  .main-shell {
    margin-left: 0;
    width: 100%;
  }
  header {
    height: calc(66px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(21px, env(safe-area-inset-right)) 0
      max(21px, env(safe-area-inset-left));
  }
  .breadcrumb {
    font:
      800 24px 'Manrope',
      sans-serif;
    color: var(--green);
    letter-spacing: -1px;
  }
  .breadcrumb:before {
    content: 'fieldnote.';
  }
  .breadcrumb > *,
  .breadcrumb {
    font-size: 0;
  }
  .breadcrumb:before {
    font-size: 24px;
  }
  .header-right {
    gap: 5px;
  }
  .header-right .small-button {
    margin-left: 8px;
    font-size: 14px;
    padding: 8px 14px;
    min-height: 44px;
  }
  .save-dot {
    display: none;
  }
  main {
    padding: 22px max(18px, env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left));
  }
  .capture-grid,
  .script-layout {
    grid-template-columns: 1fr;
  }
  .small-button {
    min-height: 44px;
    font-size: 14px;
  }
  .primary-button {
    min-height: 48px;
    font-size: 15px;
  }
  .danger-button {
    min-height: 44px;
    font-size: 14px;
  }
  .text-button {
    font-size: 14px;
  }
  .eyebrow,
  .page-heading .eyebrow,
  .question-area .eyebrow {
    font-size: 11px;
    letter-spacing: 1.2px;
  }
  .page-heading {
    margin-bottom: 18px;
    gap: 12px;
  }
  .page-heading .eyebrow {
    margin-bottom: 10px;
  }
  .page-heading h1 {
    font-size: 27px;
    letter-spacing: -1px;
    margin-bottom: 10px;
    line-height: 1.18;
  }
  .page-heading p {
    font-size: 15px;
  }
  .safety-note {
    font-size: 13px;
    margin-bottom: 16px;
    gap: 8px;
    line-height: 1.5;
  }
  .interview-card {
    border-radius: 17px;
    scroll-margin-top: 12px;
  }
  .card-top {
    padding: 18px 18px 0;
  }
  .section-label {
    font-size: 11px;
    letter-spacing: 1.2px;
  }
  .listen-button {
    font-size: 14px;
    min-height: 44px;
  }
  .step-tabs {
    padding: 20px 18px 0;
    gap: 6px;
  }
  .step-tab:after {
    inset: -20px 0;
  }
  .question-area {
    padding: 24px 18px 0;
  }
  .question-area h2 {
    font-size: 24px;
  }
  .question-area p {
    font-size: 15px;
  }
  .mode-tabs {
    margin: 19px 18px 0;
  }
  .mode-tabs button {
    font-size: 13px;
    min-height: 44px;
    padding: 7px 2px;
    white-space: nowrap;
  }
  #voice-panel {
    padding: 21px 18px 3px;
    min-height: 163px;
  }
  .record-button {
    min-height: 56px;
    font-size: 16px;
    padding: 14px 26px;
  }
  .voice-help {
    font-size: 13px;
    line-height: 1.6;
  }
  #voice-status {
    font-size: 14px;
  }
  .field-group {
    padding: 8px 18px 0;
  }
  .field-label {
    font-size: 13px;
  }
  .field-label > span {
    font-size: 12px;
  }
  .answer-input {
    font-size: 16px;
    min-height: 115px;
    padding: 12px;
    line-height: 1.6;
  }
  .field-foot {
    font-size: 12px;
    gap: 10px;
  }
  .field-target,
  .field-foot .inline-button {
    font-size: 13px;
    min-height: 44px;
  }
  .question-footer {
    margin: 18px 18px 0;
    padding: 17px 0 19px;
  }
  .question-footer > span {
    font-size: 13px;
  }
  .question-footer .primary-button {
    padding: 12px 18px;
  }
  .question-footer .text-button {
    min-height: 44px;
    font-size: 15px;
  }
  .audio-item {
    margin-left: 18px;
    margin-right: 18px;
  }
  .audio-item a,
  .audio-item button {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    min-height: 44px;
    padding: 5px 8px;
  }
  .audio-item > p {
    font-size: 13px;
  }
  footer {
    font-size: 12px;
    gap: 6px;
    padding: 24px 2px 12px;
    flex-wrap: wrap;
  }
  footer .inline-button {
    margin-left: auto;
    font-size: 12px;
    min-height: 44px;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffffed;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--line);
    padding: 6px max(25px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom))
      max(25px, env(safe-area-inset-left));
    justify-content: space-around;
    z-index: 5;
  }
  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    color: #7a8670;
    gap: 0;
    font-size: 21px;
    min-width: 72px;
    min-height: 50px;
  }
  .mobile-nav button span {
    font-size: 12px;
  }
  .mobile-nav button.active {
    color: var(--green);
  }
  /* Give the on-screen keyboard the room while typing. */
  body:has(:is(textarea, input:not([type='checkbox'])):focus) .mobile-nav {
    display: none;
  }
  .script-layout {
    gap: 16px;
  }
  .script-card {
    padding: 0 18px 20px;
    border-radius: 17px;
  }
  .script-card .card-top {
    padding: 20px 0;
  }
  .badge {
    font-size: 12px;
  }
  .title-input {
    font-size: 21px;
  }
  .script-stats {
    font-size: 13px;
    gap: 8px 14px;
  }
  .script-stats label {
    width: 100%;
    margin-top: 2px;
  }
  .script-stats select {
    font-size: 16px;
    min-height: 44px;
    padding: 0 10px;
    margin-left: 6px;
  }
  #script-text {
    font-size: 17px;
    padding: 12px;
    min-height: min(400px, 60vh);
  }
  .feedback {
    font-size: 14px;
  }
  .script-actions .primary-button {
    width: 100%;
  }
  .script-actions .small-button {
    flex: 1 1 0;
    padding-left: 8px;
    padding-right: 8px;
  }
  .prototype-note {
    font-size: 13px;
  }
  .script-view .page-heading {
    display: block;
  }
  .page-heading > #return-capture {
    display: none;
  }
  .review-card {
    display: block;
    padding: 22px;
  }
  .review-card h3 {
    font-size: 23px;
  }
  .review-card textarea {
    font-size: 16px;
    min-height: 105px;
  }
  .check-row {
    font-size: 15px;
    gap: 12px;
  }
  .check-row input {
    width: 22px;
    height: 22px;
    margin-top: 1px;
  }
  .review-hint {
    font-size: 13px;
  }
  .voiceover h4 {
    font-size: 16px;
  }
  .voiceover p {
    font-size: 13px;
  }
  .report-card {
    padding: 20px;
    display: block;
  }
  .report-card h3 {
    font-size: 17px;
  }
  .report-card p {
    font-size: 14px;
  }
  .report-actions {
    margin-top: 18px;
  }
  .library-footer {
    flex-direction: column;
    align-items: flex-start;
    font-size: 13px;
  }
  .library-footer .danger-button {
    margin-top: 5px;
  }
  #toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
    font-size: 14px;
    min-width: 220px;
    text-align: center;
  }
  dialog {
    padding: 23px;
  }
  dialog p,
  dialog li {
    font-size: 14px;
    line-height: 1.7;
  }
  .story-aside {
    display: none;
  }
}
/* Very narrow phones (e.g. 320px): let the three input-mode labels wrap rather than clip. */
@media (max-width: 350px) {
  .mode-tabs button {
    white-space: normal;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
