/* DEC274 — source-bound conversation visual-fidelity successor */
:root { --conversation-gap: .72rem; --conversation-radius: 1.35rem; --conversation-shadow: 0 12px 34px #15324a12; --recording: #d94b4b; }
.topbar { min-height: 3.35rem; padding: calc(.42rem + env(safe-area-inset-top)) .9rem .42rem; }
.brand { gap: .52rem; font-size: .95rem; }
.brand-mark { width: 1.85rem; height: 1.85rem; border-radius: .62rem; font-size: .68rem; }
.topbar .quiet { min-height: 2.35rem; padding: .35rem .55rem; }
.app-shell { padding: .7rem .78rem calc(4.65rem + env(safe-area-inset-bottom)); }
.workspace, .app-view { gap: var(--conversation-gap); }
.capture-state .journey-head { display: none; }
.capture-state .focus-tools { order: 3; }
.question-card { top: calc(3.35rem + env(safe-area-inset-top)); padding: .78rem .9rem; border-radius: var(--conversation-radius); box-shadow: 0 8px 24px #15324a0b; }
.question-label { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
.question-card h2 { margin-top: .28rem; font-size: clamp(1.02rem, 4.4vw, 1.16rem); line-height: 1.23; letter-spacing: -.018em; overflow-wrap: normal; word-break: normal; }
.capture-card { gap: .72rem; padding: .9rem; border-radius: var(--conversation-radius); box-shadow: var(--conversation-shadow); }
.capture-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; min-width: 0; }
.capture-heading label { color: var(--teal); font-size: .72rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.capture-editor { display: grid; gap: .65rem; }
.capture-card textarea { min-height: clamp(8.75rem, 25dvh, 13.5rem); padding: .85rem .9rem; border-radius: 1rem; resize: none; font-size: 1rem; line-height: 1.42; }
.capture-tools { align-items: center; }
.capture-tools > span { font-size: .72rem; }
.voice-button { flex: 0 0 auto; min-height: 2.55rem; padding: .5rem .78rem; border-radius: 999px; white-space: nowrap; }
.voice-button > span:first-child { position: relative; width: 1.05rem; height: 1.35rem; overflow: hidden; color: transparent; font-size: 0; }
.voice-button > span:first-child::before { content: ""; position: absolute; left: .34rem; top: .08rem; width: .38rem; height: .72rem; border-radius: .3rem; background: currentColor; color: var(--teal); }
.voice-button > span:first-child::after { content: ""; position: absolute; left: .2rem; top: .47rem; width: .66rem; height: .58rem; border: .12rem solid var(--teal); border-top: 0; border-radius: 0 0 .5rem .5rem; box-shadow: 0 .28rem 0 -.2rem var(--teal); }
.capture-card .support-note { margin: .05rem 0 0; font-size: .69rem; }
.action-dock { position: relative; bottom: auto; z-index: 2; grid-template-columns: 1fr; gap: .45rem; padding: .72rem; border-radius: var(--conversation-radius); background: #fffffff4; box-shadow: var(--conversation-shadow); backdrop-filter: none; }
.capture-state.answer-ready .capture-card { padding-bottom: .35rem; border-bottom: 0; border-radius: var(--conversation-radius) var(--conversation-radius) 0 0; box-shadow: none; }
.capture-state.answer-ready .capture-card .support-note { display: none; }
.capture-state.answer-ready .action-dock { margin-top: calc(-1 * var(--conversation-gap)); padding: .5rem .9rem .9rem; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--conversation-radius) var(--conversation-radius); background: #fffffff5; }
.capture-state .action-dock .primary { position: relative; order: 1; width: 100%; min-height: 3.25rem; }
.capture-state .action-dock .primary::after { content: "→"; position: absolute; right: 1rem; top: 50%; transform: translateY(-52%); font-size: 1.35rem; font-weight: 500; }
.capture-state .action-dock .secondary { order: 2; min-height: 2.35rem; border: 0; background: transparent; color: var(--teal-dark); padding: .35rem; font-size: .78rem; }
.capture-state:not(.answer-ready) .action-dock { padding: .18rem .72rem; background: transparent; box-shadow: none; }
.capture-state:not(.answer-ready) .action-dock .secondary { justify-self: center; }
.answer-processing .action-dock { display: none; }
.recording-active .capture-card { padding-bottom: .9rem; }
.recording-active.capture-state.answer-ready .capture-card { border: 1px solid var(--line); border-radius: var(--conversation-radius); box-shadow: var(--conversation-shadow); }
.recording-active .action-dock { display: none; }
.recording-map { display: inline-flex; align-items: center; gap: .38rem; min-height: 2.55rem; border: 0; border-radius: 999px; padding: .5rem .78rem; background: var(--mint); color: var(--teal-dark); font-size: .74rem; font-weight: 800; white-space: nowrap; }
.recording-map[hidden] { display: none; }
.recording-map span { font-size: 1.05rem; }
.recording-state { display: grid; place-items: center; gap: .5rem; min-height: clamp(20.5rem, 47dvh, 27rem); padding: .35rem 0 0; text-align: center; }
.recording-state[hidden] { display: none; }
.recording-timer { color: var(--navy); font-size: clamp(2.1rem, 11vw, 3rem); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.recording-state h3 { margin: 0; color: var(--teal-dark); font-size: 1.06rem; }
.recording-waveform { display: flex; align-items: center; justify-content: center; gap: .24rem; width: 100%; height: 6.2rem; overflow: hidden; }
.recording-waveform span { width: .28rem; height: 1.1rem; border-radius: 99px; background: var(--teal); animation: recording-wave 1.05s ease-in-out infinite; }
.recording-waveform span:nth-child(2n) { height: 2.2rem; animation-delay: .08s; opacity: .78; }
.recording-waveform span:nth-child(3n) { height: 3.7rem; animation-delay: .16s; }
.recording-waveform span:nth-child(4n) { height: 2.8rem; animation-delay: .24s; opacity: .62; }
.recording-waveform span:nth-child(5n) { height: 4.8rem; animation-delay: .32s; }
.recording-stop { display: grid; place-items: center; width: 5.25rem; height: 5.25rem; border: 0; border-radius: 50%; padding: 0; background: #dd4148; box-shadow: 0 0 0 .6rem #f7cfd1, 0 0 0 1.15rem #fbe9e9; }
.recording-stop span { width: 1.45rem; height: 1.45rem; border-radius: .22rem; background: #fff; }
.recording-stop-label { margin-top: .55rem; color: var(--navy); font-size: 1rem; }
.recording-cancel { min-height: 2.4rem; border: 0; padding: .35rem .8rem; background: transparent; color: var(--muted); font-weight: 750; }
.recording-note { align-self: end; display: flex; align-items: center; gap: .7rem; width: 100%; margin: .35rem 0 0; padding: .72rem .9rem; border-radius: 1rem; background: var(--mint); color: var(--muted); font-size: .74rem; line-height: 1.38; text-align: left; }
.recording-note > span:first-child { color: var(--teal); font-size: 1.15rem; }
.processing-state { display: grid; gap: .7rem; place-items: center; min-height: clamp(17rem, 43dvh, 23rem); padding: .2rem; text-align: center; }
.processing-state[hidden] { display: none; }
.submitted-answer { width: 100%; padding: .85rem; border-radius: 1rem; background: #f3f8f8; text-align: left; }
.submitted-answer p:last-child { margin: .35rem 0 0; color: var(--navy); font-size: .88rem; line-height: 1.45; }
.processing-orb { display: flex; align-items: center; justify-content: center; gap: .32rem; width: 5.4rem; height: 5.4rem; border: .46rem solid #d7efec; border-top-color: var(--teal); border-radius: 50%; animation: processing-spin 1.25s linear infinite; }
.processing-orb span { width: .42rem; height: .42rem; border-radius: 50%; background: var(--teal); }
.processing-orb span:nth-child(2) { opacity: .72; }
.processing-orb span:nth-child(3) { opacity: .42; }
.processing-state h3 { margin: .05rem 0 0; color: var(--teal-dark); font-size: 1.08rem; }
.processing-state > p { margin: 0; color: var(--muted); font-size: .82rem; }
.busy { opacity: 1; pointer-events: none; }
.map-dialog { height: min(70dvh, 42rem); max-height: 70dvh; overflow: auto; }
.map-dialog .dialog-head { position: relative; align-items: flex-start; padding-right: 2.8rem; }
.map-dialog .dialog-head h2 { font-size: clamp(1.18rem, 5.6vw, 1.48rem); overflow-wrap: normal; word-break: normal; }
.map-dialog .dialog-head .quiet { position: absolute; top: -.18rem; right: -.12rem; }
.map-dialog .heading-row { align-items: flex-start; }
.map-dialog .view-explainer { margin: .2rem 0; line-height: 1.4; }
.bottom-nav { padding: .24rem .42rem calc(.24rem + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px #15324a0e; }
.bottom-nav button { min-height: 3.25rem; gap: .1rem; font-size: .61rem; }
.bottom-nav button > span:first-child { font-size: 1rem; }
.bottom-nav button.active:after { bottom: -.08rem; height: .16rem; }
.status { margin: .35rem 0 0; }
@keyframes processing-spin { to { transform: rotate(360deg); } }
@media (max-width: 370px) {
  .topbar { padding-left: .7rem; padding-right: .7rem; }
  .brand { font-size: .86rem; }
  .app-shell { padding-left: .58rem; padding-right: .58rem; }
  .question-card { padding: .68rem .72rem; }
  .question-card h2 { font-size: 1rem; }
  .capture-card { padding: .72rem; }
  .voice-button { padding: .45rem .58rem; font-size: .72rem; }
  .capture-card textarea { min-height: 8.5rem; }
}
@keyframes recording-wave { 50% { transform: scaleY(.46); opacity: .46; } }
@media (prefers-reduced-motion: reduce) { .processing-orb, .recording-waveform span { animation: none; } }
