:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #203e4b;
  background: #f1f6f8;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --ink: #203e4b;
  --muted: #536e7b;
  --blue: #286b88;
  --line: #d6e4ea;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .55; cursor: wait; }
button, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #287493; outline-offset: 3px; }
svg { width: 22px; height: 22px; flex: none; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.topbar { height: 68px; padding: 0 max(18px, calc((100vw - 660px)/2)); display: flex; align-items: center; gap: 15px; background: #fff; border-top: 4px solid var(--ink); border-bottom: 1px solid var(--line); }
.brand-logo { display: block; width: 145px; height: auto; }
.header-subtitle { color: var(--muted); font-size: 12px; font-weight: 700; }
.network-pill { margin-left: auto; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 20px; color: #365e70; background: #edf4f7; font-size: 11px; font-weight: 700; white-space: nowrap; }
.network-dot { width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.network-pill.offline { background: #fff0dc; color: #89551b; }
.field-wrap { width: min(100%, 600px); padding: 24px 18px 40px; margin: auto; }
.field-kicker { font-size: 10px; letter-spacing: .13em; font-weight: 800; color: #567483; margin: 0 0 10px; }
h1 { font-size: clamp(28px, 6vw, 36px); letter-spacing: -.04em; line-height: 1.14; margin: 0; }
h2 { font-size: 20px; letter-spacing: -.025em; margin: 0; }
.field-help { color: var(--muted); font-size: 14px; line-height: 1.55; }
.field-primary { width: 100%; min-height: 58px; padding: 14px 18px; background: var(--blue); color: #fff; border: 0; border-radius: 16px; font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 10px; }
.field-primary:active, .dock-voice:active { background: #204d63; }
.field-back { min-height: 44px; padding: 4px 0; border: 0; background: none; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; font-weight: 700; }
.field-back svg { width: 18px; }
.home { padding-top: 34px; }
.home h1 span { color: var(--blue); }
.capture-story { display: flex; align-items: center; justify-content: center; gap: 12px; background: #e4f0f5 url('./waves.svg') center bottom/cover; border-radius: 24px; padding: 28px 16px; margin: 24px 0 18px; }
.story-step { width: 96px; height: 108px; border-radius: 20px; background: #fff; color: var(--blue); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; box-shadow: 0 6px 16px #35576910; }
.story-step svg { width: 37px; height: 37px; }
.story-step strong { font-size: 13px; }
.story-step.voice { color: #fff; background: var(--blue); transform: rotate(4deg); }
.story-step.photo { transform: rotate(-4deg); }
.story-plus { color: #4c7b8e; font-size: 22px; }
.story-check { align-self: flex-start; color: #3f7b69; background: #fff; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin: -6px 0 0 -10px; }
.story-check svg { width: 18px; }
.home > .field-help { text-align: center; font-size: 13px; margin: 12px 4px 22px; }
.resume-card, .home-row { width: 100%; display: flex; align-items: center; text-align: left; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 18px; gap: 12px; padding: 16px; }
.resume-card { margin-top: 20px; border: 2px solid #b9d5e2; }
.resume-card > span:not(.card-icon), .home-row > span:not(.card-icon) { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-icon { background: #eaf3f7; color: var(--blue); width: 44px; height: 48px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.resume-card small { font-size: 10px; font-weight: 800; color: #466a7b; letter-spacing: .1em; }
.resume-card strong { font-size: 17px; overflow-wrap: anywhere; }
.resume-card em { display: flex; align-items: center; color: var(--blue); font-style: normal; font-size: 13px; font-weight: 800; }
.resume-card em svg { width: 16px; height: 16px; }
.home-list { margin-top: 28px; }
.home-list h2 { margin-bottom: 12px; font-size: 18px; }
.home-row { padding: 12px; margin-bottom: 8px; }
.home-row strong { font-size: 14px; overflow-wrap: anywhere; }
.home-row small { color: var(--muted); font-size: 12px; }
.home-row > svg { width: 16px; }
.storage-info { margin-top: 24px; color: var(--muted); }
.storage-info summary { min-height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; list-style: none; font-size: 12px; font-weight: 700; }
.storage-info summary::-webkit-details-marker { display: none; }
.storage-info summary svg { width: 16px; height: 16px; }
.storage-info summary:after { content: '⌄'; margin-left: 3px; }
.storage-info p { background: #e6eff3; padding: 14px; margin: 4px 0 0; border-radius: 12px; font-size: 13px; line-height: 1.55; }
.detail { padding-top: 8px; }
.has-dock { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
.field-title { margin: 8px 0 2px; }
.field-title .field-kicker { margin-bottom: 5px; }
.field-title h1 { font-size: 22px; letter-spacing: -.035em; }
.reference { margin: 6px 0; color: var(--muted); font-size: 13px; }
.identity-details { margin-bottom: 14px; }
.identity-details summary { display: flex; align-items: center; gap: 6px; color: var(--blue); cursor: pointer; min-height: 44px; font-weight: 700; font-size: 12px; list-style: none; }
.identity-details summary::-webkit-details-marker { display: none; }
.identity-details summary svg { width: 15px; height: 15px; }
.identity-form, .sequence-form, .field-form { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.identity-form { border-radius: 16px; background: #fff; padding: 16px; border: 1px solid var(--line); margin: 0 0 14px; }
label { color: var(--ink); font-weight: 700; font-size: 13px; }
label > span { font-weight: 400; color: var(--muted); }
input:not([type=radio]), select, textarea { width: 100%; min-height: 48px; border: 1px solid #b9ced9; border-radius: 10px; background: #fff; padding: 11px 12px; color: var(--ink); font-size: 16px; margin: 0 0 7px; }
textarea { resize: vertical; }
.save-context { align-self: flex-start; min-height: 44px; background: var(--blue); border: 0; color: #fff; border-radius: 10px; font-size: 14px; font-weight: 800; padding: 10px 18px; }
.point-card { background: #fff; border: 1px solid #cadde6; border-radius: 22px; overflow: hidden; box-shadow: 0 5px 20px #203e4b05; }
.point-head { display: flex; align-items: center; gap: 10px; padding: 16px; border-bottom: 1px solid #e6eef2; }
.point-number { width: 36px; height: 36px; flex: none; border-radius: 12px; background: #e5f1f6; color: var(--blue); font-weight: 800; font-size: 18px; display: grid; place-items: center; }
.point-head > div:not(.capture-counts) { min-width: 0; flex: 1; }
.point-head h2 { font-size: 17px; }
.point-head small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.capture-counts { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.capture-counts > span { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.capture-counts svg { width: 15px; height: 15px; }
.capture-empty { text-align: center; padding: 26px 12px 22px; background: radial-gradient(ellipse at center, #eff7fa, #fff 70%); }
.empty-camera { width: 80px; height: 70px; background: #e5f0f5; border-radius: 21px; position: relative; display: grid; place-items: center; color: #3d7b95; margin: 0 auto 18px; transform: rotate(-5deg); }
.empty-camera > svg { width: 41px; height: 41px; }
.empty-mic { position: absolute; right: -12px; bottom: -7px; background: var(--blue); color: #fff; width: 38px; height: 38px; border: 4px solid #fff; border-radius: 13px; display: grid; place-items: center; transform: rotate(10deg); }
.empty-mic svg { width: 20px; height: 20px; }
.capture-empty h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -.02em; }
.capture-empty p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; }
.capture-nudge { margin: 0 14px 12px; color: var(--blue); background: #edf6fa; display: flex; align-items: center; gap: 7px; border-radius: 10px; padding: 12px; font-size: 12px; font-weight: 700; }
.capture-nudge svg { width: 18px; height: 18px; }
.details-extra { padding: 0 16px; border-top: 1px solid #e6eef2; }
.details-extra summary { cursor: pointer; list-style: none; min-height: 48px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.details-extra summary::-webkit-details-marker { display: none; }
.details-extra summary svg { width: 15px; height: 15px; }
.details-extra summary:after { content: '+'; margin-left: auto; font-size: 18px; }
.details-extra[open] summary:after { content: '−'; }
.extra-actions { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; }
.secondary-link { min-height: 44px; padding: 8px 0; border: 0; background: none; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; font-weight: 700; }
.media-stack { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.photo-grid.single { grid-template-columns: 1fr; }
.media-photo { position: relative; border: 0; border-radius: 14px; padding: 0; background: #e5eef3; overflow: hidden; width: 100%; height: 132px; }
.photo-grid.single .media-photo { height: 188px; }
.media-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-photo > span { position: absolute; bottom: 8px; right: 8px; border-radius: 8px; padding: 4px 7px; background: #163a4bd9; color: #fff; display: flex; align-items: center; gap: 5px; font-size: 11px; }
.media-photo > span svg { width: 13px; height: 13px; }
.media-audio { width: 100%; padding: 10px; border-radius: 14px; background: #eaf3f7; color: var(--blue); }
.audio-label { display: flex; gap: 6px; align-items: center; font-size: 12px; padding: 0 3px 7px; }
.audio-label svg { width: 16px; height: 16px; }
.audio-label time { margin-left: auto; color: var(--muted); font-size: 11px; }
.media-audio audio { display: block; width: 100%; min-width: 0; height: 40px; }
.media-note { white-space: pre-wrap; background: #f1f6f8; border-left: 3px solid #9bbfcc; border-radius: 4px 10px 10px 4px; padding: 12px; color: var(--ink); font-size: 14px; line-height: 1.5; margin: 0; }
.result-tag { display: inline-block; margin: 0 12px 12px; padding: 7px 10px; border-radius: 10px; background: #e8f4ed; color: #306249; font-size: 12px; font-weight: 700; }
.new-point { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 8px; background: transparent; border: 1px dashed #9bbfcc; border-radius: 14px; color: var(--blue); font-size: 13px; font-weight: 800; padding: 12px 15px; margin-top: 12px; }
.new-point > svg:last-child { width: 16px; height: 16px; margin-left: auto; }
.new-point > svg:first-child { width: 19px; height: 19px; }
.past-heading { display: flex; align-items: center; justify-content: space-between; margin: 25px 0 12px; gap: 12px; }
.past-heading h2 { font-size: 16px; }
.past-heading > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.past-card { display: flex; align-items: center; gap: 12px; width: 100%; background: #fff; color: var(--ink); text-align: left; border: 1px solid var(--line); border-radius: 16px; padding: 10px; margin-bottom: 8px; }
.past-thumb { width: 62px; height: 66px; background: #eaf3f7; color: var(--blue); border-radius: 10px; overflow: hidden; display: grid; place-items: center; flex: none; }
.past-thumb img { width: 100%; height: 100%; object-fit: cover; }
.past-description { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.past-description strong { font-size: 14px; overflow-wrap: anywhere; }
.past-description small { color: var(--muted); font-size: 11px; }
.past-card > svg { width: 17px; }
.field-dock { position: fixed; left: 50%; transform: translateX(-50%); width: min(100%,600px); bottom: 0; z-index: 20; padding: 10px 16px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #d1e1e9; background: #f1f6f8f5; backdrop-filter: blur(12px); }
.dock-capture { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dock-capture button { min-height: 68px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 11px; font-size: 18px; font-weight: 800; }
.dock-capture svg { width: 27px; height: 27px; }
.dock-photo { background: #fff; border: 2px solid var(--blue); color: var(--blue); }
.dock-voice { background: var(--blue); border: 2px solid var(--blue); color: #fff; }
.dock-finish { width: 100%; min-height: 44px; border: 0; background: none; color: #3f6475; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 4px; }
.dock-finish svg { width: 17px; height: 17px; }
.finish-page { padding-top: 12px; }
.finish-page > .field-back { margin-bottom: 18px; }
.finish-page h1 { font-size: 29px; }
.finish-captures { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 18px 0 20px; }
.finish-captures > svg { width: 17px; height: 17px; }
.finish-captures .capture-counts { margin-left: auto; }
.finish-form fieldset { border: 0; margin: 0; padding: 0; }
.outcome-grid { display: grid; gap: 9px; }
.outcome-grid label { position: relative; cursor: pointer; }
.outcome-grid input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.outcome-option { display: flex; align-items: center; gap: 12px; min-height: 78px; padding: 14px 12px; border: 2px solid #dae6ec; border-radius: 17px; background: #fff; color: var(--ink); }
.outcome-option > i { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--blue); background: #eaf3f7; }
.outcome-option > span:not(.radio-dot) { min-width: 0; flex: 1; }
.outcome-option strong { display: block; font-size: 15px; }
.outcome-option small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.4; margin-top: 4px; }
.radio-dot { width: 18px; height: 18px; border: 2px solid #95b1bf; border-radius: 50%; flex: none; }
.outcome-grid input:checked + .outcome-option { border-color: var(--blue); background: #edf6fa; }
.outcome-grid input:checked + .outcome-option .radio-dot { background: var(--blue); border-color: var(--blue); box-shadow: inset 0 0 0 3px #edf6fa; }
.outcome-grid input:focus-visible + .outcome-option { outline: 3px solid #287493; outline-offset: 2px; }
.unknown-outcome .outcome-option { min-height: 44px; font-size: 12px; border-radius: 11px; padding: 10px 13px; }
.unknown-outcome .outcome-option > span { font-weight: 600; }
.conclusion-block { margin-top: 22px; }
.conclusion-voice { display: flex; gap: 10px; justify-content: center; align-items: center; width: 100%; min-height: 56px; border: 1px solid #8eb3c5; border-radius: 15px; background: #e2eef4; color: #265d76; font-size: 15px; font-weight: 800; }
.conclusion-block > p { color: var(--muted); font-size: 12px; text-align: center; margin: 8px 0 16px; }
.conclusion-block .media-audio { margin-top: 8px; }
.written-summary { margin-top: 12px; }
.written-summary summary { min-height: 44px; cursor: pointer; color: var(--muted); font-weight: 700; font-size: 12px; }
.finish-submit { margin-top: 18px; }
.finish-help, .export-help { text-align: center; font-size: 12px; color: var(--muted); line-height: 1.5; }
.review-alert { background: #fff0dc; color: #825522; border-radius: 12px; padding: 12px; font-size: 13px; line-height: 1.5; }
.finished-card { padding: 26px 18px 16px; margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 22px; text-align: center; }
.finished-icon { width: 54px; height: 54px; background: #e6f2eb; color: #34745d; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; }
.finished-icon svg { width: 27px; height: 27px; }
.finished-card h2 { font-size: 28px; }
.finished-card > p { color: var(--muted); font-size: 13px; }
.finished-card > .capture-counts { justify-content: center; margin: 18px 0; font-size: 15px; }
.finished-summary { padding: 14px; margin: 18px 0; border-radius: 12px; background: #edf5f8; text-align: left; display: flex; flex-direction: column; gap: 7px; color: var(--ink); font-size: 13px; line-height: 1.5; }
.past-title { margin: 28px 0 14px; font-size: 18px; }
.read-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 10px; }
.read-card > small { font-size: 11px; color: var(--muted); }
.read-card h3 { margin: 7px 0 12px; font-size: 17px; }
.read-card .media-stack { padding: 0; }
.recorder-overlay { position: fixed; inset: 0; z-index: 100; background: #183b4be8; display: grid; place-items: center; padding: 20px; }
.recorder-card { width: min(100%,440px); max-height: calc(100dvh - 40px); overflow: auto; padding: 30px 22px 16px; background: #fff; border-radius: 26px; text-align: center; }
.recorder-card h2 { font-size: 26px; margin: 18px 0 12px; }
.recorder-card p { font-size: 14px; color: var(--muted); line-height: 1.55; }
.record-dot { display: block; width: 14px; height: 14px; margin: 0 auto; background: #bb453c; border-radius: 50%; box-shadow: 0 0 0 7px #bb453c15; }
.recorder-timer { font-size: 38px; font-weight: 800; margin: 8px 0 24px; font-variant-numeric: tabular-nums; }
.voice-wave { height: 54px; display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--blue); margin-top: 20px; }
.voice-wave i { width: 5px; height: calc(9px * var(--bar)); background: currentColor; border-radius: 5px; animation: wave 1s ease-in-out infinite alternate; animation-delay: calc(var(--bar) * -120ms); }
@keyframes wave { to { transform: scaleY(.45); } }
.toast { position: fixed; bottom: calc(152px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%,15px); max-width: calc(100vw - 32px); width: max-content; z-index: 200; border-radius: 12px; background: #244957; color: #fff; padding: 13px 16px; font-size: 13px; font-weight: 700; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 5px 20px #183b4b25; }
.toast.visible { opacity: 1; transform: translate(-50%,0); }
.toast.error { background: #943e33; }
.preview-open { overflow: hidden; }
.photo-viewer { position: fixed; inset: 0; z-index: 120; background: #102a35f7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 70px 16px 30px; color: #fff; }
.photo-viewer img { max-width: 100%; max-height: calc(100vh - 130px); max-height: calc(100dvh - 130px); object-fit: contain; touch-action: pinch-zoom; }
.photo-viewer > span { font-size: 12px; color: #d6e7ed; }
.viewer-close { position: absolute; top: max(18px, env(safe-area-inset-top)); right: 16px; min-height: 44px; padding: 8px 17px; border: 1px solid #b5d3df; border-radius: 10px; background: #244b5b; color: #fff; font-weight: 800; }
@media (max-width: 600px) { .header-subtitle { display: none; } }
@media (max-width: 350px) {
  .topbar { padding-inline: 12px; gap: 8px; height: 61px; }
  .brand-logo { width: 127px; }
  .network-pill { padding: 7px 8px; font-size: 10px; }
  .field-wrap { padding-inline: 12px; }
  .point-head { padding: 13px; gap: 8px; }
  .point-head .capture-counts { gap: 7px; }
  .point-head .capture-counts svg { width: 13px; }
  .capture-empty { padding-block: 20px; }
  .outcome-option { gap: 8px; padding: 12px 10px; }
  .outcome-option strong { font-size: 14px; }
  .story-step { width: 83px; }
  .capture-story { gap: 10px; }
}
@media (max-height: 650px) and (orientation: portrait) {
  .field-title h1 { font-size: 19px; }
  .identity-details { margin-bottom: 6px; }
  .capture-empty { padding-block: 14px; }
  .empty-camera { width: 61px; height: 50px; margin-bottom: 13px; }
  .empty-camera > svg { width: 31px; height: 31px; }
  .capture-empty p { font-size: 12px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .topbar { height: 48px; }
  .brand-logo { width: 120px; }
  .field-dock { padding-top: 6px; }
  .dock-capture button { min-height: 48px; font-size: 16px; }
  .dock-finish { min-height: 44px; margin-top: 0; }
  .has-dock { padding-bottom: calc(125px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
