/* /sound-check/record/ — the buyer records (or uploads) the Sound Check passage.
   Phone-first, one column, big targets: many buyers are beginners on a phone. */
.rec-page { background: var(--cyc); padding: calc(var(--top, 78px) + 12px) 0 64px; }
.rec-wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }

.rec-langs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.rec-langs::-webkit-scrollbar { display: none; }
.rec-langs button { flex: none; font: 600 15px/1 var(--f-text); padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.rec-langs button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.rec-head { margin: 14px 0 22px; }
.rec-kicker { display: inline-flex; align-items: center; gap: 8px; font: 700 14px/1 var(--f-text); letter-spacing: .04em; text-transform: uppercase; color: var(--live); margin: 0 0 10px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); }
.rec-head h1 { font: 800 clamp(34px, 8vw, 52px)/1.02 var(--f-display); letter-spacing: -.02em; margin: 0 0 10px; color: var(--ink); }
.rec-lede { font-size: 20px; color: var(--ink-2); margin: 0; }

.rec-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg, 24px); padding: 22px 18px; margin: 0 0 18px; box-shadow: var(--shadow-1); }
.rec-step h2 { display: flex; align-items: center; gap: 12px; font: 800 24px/1.15 var(--f-display); margin: 0 0 16px; color: var(--ink); }
.rec-num { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--sound); color: #fff; display: grid; place-items: center; font: 800 20px/1 var(--f-display); }

.rec-field { display: block; margin: 0 0 14px; }
.rec-field > span { display: block; font-weight: 700; font-size: 17px; margin: 0 0 6px; color: var(--ink); }
.rec-field input, .rec-field textarea { width: 100%; box-sizing: border-box; font: 18px/1.35 var(--f-text); padding: 13px 14px; border: 2px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink); }
.rec-field input:focus, .rec-field textarea:focus { outline: none; border-color: var(--sound); box-shadow: 0 0 0 4px var(--sound-soft); }
.rec-field.bad input { border-color: var(--live); box-shadow: 0 0 0 4px var(--live-soft); }
.rec-field .rec-need { display: block; color: var(--live); font-weight: 700; font-size: 15px; margin-top: 6px; }

.rec-tip { font-size: 17px; color: var(--ink-2); margin: -4px 0 14px; }
.rec-passage { margin: 0; font: 500 clamp(20px, 4.8vw, 24px)/1.65 var(--f-text); color: var(--ink); background: var(--pen-soft); border-left: 6px solid var(--pen); border-radius: 14px; padding: 18px 18px 18px 20px; }

/* the recorder: one state at a time */
.rec-box { border-radius: 20px; background: var(--cyc-2); padding: 22px 16px; text-align: center; }
.rec-box > button.rec-big, .rec-live, .rec-ready, .rec-sending { display: none; }
.rec-box[data-state="idle"] > .rec-big { display: inline-flex; }
.rec-box[data-state="recording"] > .rec-live,
.rec-box[data-state="ready"] > .rec-ready,
.rec-box[data-state="sending"] > .rec-sending { display: block; }

.rec-big { align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 76px; font: 800 22px/1.1 var(--f-display); color: #fff; background: var(--live); border: 0; border-radius: 999px; cursor: pointer; box-shadow: 0 12px 28px -10px rgba(232, 53, 43, .6); transition: transform .15s var(--ease-out); }
.rec-big:active { transform: scale(.98); }
.rec-big-dot { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(255,255,255,.3); }

.rec-live-top { display: flex; align-items: center; justify-content: center; gap: 10px; }
.rec-pulse { width: 16px; height: 16px; border-radius: 50%; background: var(--live); animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: .35; transform: scale(.8); } }
.rec-time { font: 800 34px/1 var(--f-display); font-variant-numeric: tabular-nums; color: var(--ink); }
.rec-meter { display: block; width: 100%; height: 72px; margin: 12px 0 6px; }
.rec-live-msg { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.rec-warn { background: var(--pen-soft); border-radius: 10px; padding: 10px 12px; font-weight: 700; margin: 0 0 10px; }
.rec-stop { display: inline-flex; align-items: center; gap: 12px; font: 800 20px/1 var(--f-display); color: #fff; background: var(--ink); border: 0; border-radius: 999px; padding: 18px 40px; cursor: pointer; }
.rec-stop-sq { width: 16px; height: 16px; border-radius: 3px; background: #fff; }

.rec-small { margin: 0 0 8px; font-weight: 700; font-size: 17px; }
.rec-file { margin: 0 0 10px; font-weight: 700; word-break: break-all; }
.rec-ready audio { width: 100%; margin: 0 0 16px; }
.rec-send { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 68px; font: 800 22px/1.1 var(--f-display); color: #fff; background: var(--sound); border: 0; border-radius: 999px; cursor: pointer; box-shadow: 0 12px 28px -10px rgba(36, 87, 245, .6); }
.rec-send:hover { background: var(--sound-2); }
.rec-again { margin-top: 12px; font: 700 17px/1 var(--f-text); background: none; border: 0; color: var(--ink-2); padding: 10px; cursor: pointer; text-decoration: underline; }

.rec-sending p { font-weight: 700; font-size: 18px; margin: 0 0 12px; }
.rec-bar { height: 14px; border-radius: 99px; background: #fff; overflow: hidden; }
.rec-bar i { display: block; height: 100%; width: 0; background: var(--sound); border-radius: 99px; transition: width .3s; }
.rec-sending .rec-pct { font: 800 22px/1 var(--f-display); margin: 12px 0 0; }

.rec-err { margin: 14px 0 0; background: var(--live-soft); color: #9b1c14; border-radius: 12px; padding: 12px 14px; font-weight: 700; font-size: 17px; }
.rec-open { margin-top: 10px; }
.rec-copy { font: 700 16px/1 var(--f-text); padding: 12px 18px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; cursor: pointer; }

.rec-upload { margin-top: 18px; text-align: center; color: var(--ink-2); }
.rec-upload p { margin: 0 0 8px; font-size: 16px; }
.rec-choose { display: inline-block; cursor: pointer; }
.rec-choose input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rec-choose > span { display: inline-block; font: 700 17px/1 var(--f-text); padding: 14px 22px; border: 2px dashed var(--line-2); border-radius: 999px; color: var(--ink); background: #fff; }
.rec-choose input:focus-visible + span { outline: 3px solid var(--sound); }

.rec-done { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg, 24px); padding: 40px 20px; box-shadow: var(--shadow-2); outline: none; }
.rec-tick { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%; background: #1f9d55; color: #fff; display: grid; place-items: center; font: 800 46px/1 var(--f-display); animation: rec-pop .5s var(--ease-out); }
@keyframes rec-pop { from { transform: scale(.4); opacity: 0; } }
.rec-done h2 { font: 800 28px/1.15 var(--f-display); margin: 0 0 10px; }
.rec-done p { font-size: 19px; color: var(--ink-2); margin: 0; }

.rec-foot { margin-top: 22px; text-align: center; color: var(--ink-2); font-size: 15px; }
.rec-foot p { margin: 6px 0; }
.rec-foot a { color: var(--sound); }

@media (prefers-reduced-motion: reduce) { .rec-pulse, .rec-tick { animation: none; } }

/* While recording, the passage is on screen and the timer + Stop float at the bottom. */
.rec-box[data-state="recording"] > .rec-live { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 60; max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 12px 14px 14px; box-shadow: var(--shadow-3, 0 20px 50px -10px rgba(14,17,24,.35)); }
.rec-box[data-state="recording"] { min-height: 40px; }
.rec-box[data-state="recording"] .rec-meter { height: 44px; margin: 8px 0 4px; }
.rec-box[data-state="recording"] .rec-time { font-size: 28px; }
.rec-box[data-state="recording"] .rec-live-msg { font-size: 15px; margin: 0 0 8px; }
.rec-box[data-state="recording"] .rec-stop { width: 100%; justify-content: center; padding: 16px 20px; }
body.is-recording .rec-foot { padding-bottom: 220px; }
