/* Output stands alone once capture has its own tab, so the two-up grid that
   paired them collapses to one column. */
#t-voice.voice-output-only .voice-grid{grid-template-columns:minmax(0,1fr)}
#t-capture .voice-capture{position:static;max-width:760px;margin:0 auto}
#t-capture .lede,#t-capture .note{max-width:760px;margin-left:auto;margin-right:auto}
@media(max-width:767px){
  #t-capture .voice-capture{padding:16px}
}

/* Record, simplified 2026-09-30 ("a bit busy... a lot of text"). One column, one obvious
   path: the mic, then Write my content. Everything optional is a quiet link or a folded row
   at the bottom. Scoped under #t-capture .rec so it outranks mobile-app.css, which the app
   injects later and still sizes .voice-mic and .voice-recorder for the old layout. The
   saved-recordings library is prepended into the form by recording-library.js; flex order
   moves it down into the folded rows without touching that module. */
#t-capture .voice-capture.rec{display:flex;flex-direction:column;max-width:560px;margin:20px auto 0;padding:24px 24px 8px;border-radius:16px}
#t-capture .rec .voice-recorder{display:flex;flex-direction:column;align-items:center;gap:10px;min-height:0;margin:4px 0 0;padding:8px 0 0;border:0;background:none;text-align:center}
#t-capture .rec .voice-mic{display:grid;place-items:center;width:112px;height:112px;min-height:112px;margin:0;font-size:38px;line-height:1}
#t-capture .rec .voice-mic:disabled{opacity:.35;cursor:default;box-shadow:none}
#t-capture .rec .voice-mic:focus-visible{outline:2px solid var(--ink);outline-offset:6px}
#t-capture .rec .voice-time{grid-column:auto;margin:0;font:600 15px/1.3 "SF Mono",Menlo,monospace;color:var(--ink);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#t-capture .rec #capture-review{display:flex;flex-direction:column;align-items:center;gap:8px;width:100%;padding:0!important}
#t-capture .rec #capture-wave{width:100%;height:56px}
#t-capture .rec #capture-playback{width:100%}
#t-capture .rec #capture-level,#t-capture .rec #capture-save-status{margin:0;font-size:14px;line-height:1.45;color:var(--muted)}
#t-capture .rec #capture-save-status[data-error=true]{color:var(--red)}
#t-capture .rec .capture-library-actions{justify-content:center;gap:8px}
#t-capture .rec .capture-library-actions button{font-size:14px}
#t-capture .rec [hidden],#t-capture .rec :is(#capture-level,#capture-save-status,#capture-state,#voice-status):empty{display:none!important}

/* Quiet secondary actions: text buttons, full 44px targets, no boxes. */
#t-capture .rec .rec-alt{display:flex;flex-wrap:wrap;justify-content:center;gap:0 16px;margin:6px 0 0}
#t-capture .rec .voice-upload,#t-capture .rec .rec-link{display:inline-flex;align-items:center;min-height:44px;margin:0;padding:0 2px;border:0;background:none;color:var(--accent);font:inherit;font-size:15px;font-weight:500;cursor:pointer;text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--accent) 35%,transparent);text-underline-offset:4px}
#t-capture .rec .voice-upload:has(input:disabled){opacity:.4;cursor:default}
/* While recording, or once a clip is loaded, uploading is not an option: hide it, not grey it. */
#t-capture .rec:is(:has(.voice-mic.recording),:has(#capture-playback:not([hidden]))) .voice-upload{display:none}
#t-capture .rec .rec-link:focus-visible,#t-capture .rec .voice-upload:focus-within{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
#t-capture .rec .rec-add{align-self:center;margin-top:2px}
#t-capture .rec:not(.rec-typing) .rec-compose,#t-capture .rec.rec-typing [data-rec-type],
#t-capture .rec:not(.rec-directing) .rec-direction,#t-capture .rec.rec-directing [data-rec-direction]{display:none}
#t-capture .rec .rec-compose,#t-capture .rec .rec-direction{display:flex;flex-direction:column;gap:6px;margin-top:14px}
#t-capture .rec .rec-compose label,#t-capture .rec .rec-direction label{font-size:14px;color:var(--muted)}
#t-capture .rec #voice-transcript{min-height:120px;max-height:40dvh;font-size:16px;line-height:1.55}
#t-capture .rec #voice-context{margin:0;min-height:44px;font-size:16px}

/* The one primary action. */
#t-capture .rec .voice-generate{min-height:52px;margin-top:18px;border-radius:12px;font-size:14px}
#t-capture .rec .voice-generate:focus-visible{outline:2px solid var(--ink);outline-offset:3px}

/* One status area under the button; each line only takes space while it says something. */
#t-capture .rec .rec-status{display:flex;flex-direction:column;align-items:center;gap:4px;margin:10px 0 0;text-align:center}
#t-capture .rec .rec-status p{margin:0;min-height:0;font-size:14px;line-height:1.45;color:var(--muted)}
#t-capture .rec .rec-status .voice-status.bad{color:var(--red)}
#t-capture .rec .rec-job{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:0 12px;font-size:14px;line-height:1.45;color:var(--ink)}
#t-capture .rec .rec-job.bad{color:var(--red)}
#t-capture .rec .rec-progress{flex:0 0 100%;width:100%;max-width:320px;height:6px;margin-top:8px;border-radius:3px;background:var(--line);overflow:hidden}
#t-capture .rec .rec-progress i{display:block;height:100%;width:0;border-radius:inherit;background:var(--accent);transition:width .8s ease}
#t-capture .rec .rec-progress.waiting i{width:30%!important;animation:rec-wait 1.6s ease-in-out infinite}
@keyframes rec-wait{from{transform:translateX(-100%)}to{transform:translateX(340%)}}
#t-capture .rec .rec-job.done .rec-job-text{color:var(--green)}

/* Folded rows at the bottom: Writer, Saved recordings, How it works. */
#t-capture .rec #rec-writer{order:1}
#t-capture .rec #recording-library{order:2}
#t-capture .rec #capture-transcripts{order:3}
#t-capture .rec .rec-how{order:4}
#t-capture .rec .rec-more,#t-capture .rec #recording-library{margin:0;border:0;border-top:1px solid var(--line);border-radius:0;background:none}
#t-capture .rec #rec-writer{margin-top:22px}
#t-capture .rec .rec-more>summary,#t-capture .rec #recording-library>summary{display:flex;align-items:center;gap:6px;min-height:52px;padding:6px 0;font-size:15px;font-weight:500;color:var(--ink);cursor:pointer;list-style:none;letter-spacing:0;text-transform:none;font-family:inherit}
#t-capture .rec .rec-more>summary::-webkit-details-marker,#t-capture .rec #recording-library>summary::-webkit-details-marker{display:none}
#t-capture .rec .rec-more>summary::after,#t-capture .rec #recording-library>summary::after{content:'+';flex:none;margin-left:auto;padding-left:12px;font-size:20px;font-weight:400;color:var(--accent)}
#t-capture .rec .rec-more[open]>summary::after,#t-capture .rec #recording-library[open]>summary::after{content:'−'}
#t-capture .rec .rec-more>summary:focus-visible,#t-capture .rec #recording-library>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
#t-capture .rec .rec-sum{display:flex;flex-direction:column;gap:3px;min-width:0}
#t-capture .rec .rec-more-note{margin:0 0 16px;font-size:14px;line-height:1.55;color:var(--muted)}
#t-capture .rec #recording-library .rl-content{padding:0 0 14px}
#t-capture .rec #capture-transcripts>p{max-height:35dvh;overflow:auto;white-space:pre-wrap}

/* The writer override: three equal segments, the chosen one filled. */
#t-capture .rec .rec-engines{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:2px 0 12px;padding:4px;border:1px solid var(--line);border-radius:12px}
#t-capture .rec .rec-engines button{min-height:44px;border:0;border-radius:8px;background:none;color:var(--muted);font:inherit;font-size:15px;cursor:pointer}
#t-capture .rec .rec-engines button[aria-pressed=true]{background:var(--accent);color:var(--bg);font-weight:600}
#t-capture .rec .rec-engines button:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}

@media(max-width:767px){
  #t-capture .voice-capture.rec{padding:16px 16px 4px}
  #t-capture .rec .voice-mic{width:104px;height:104px;min-height:104px}
}

/* Write my content stays in reach on a phone whenever there is something to send (.rec-ready,
   index.html syncRecLayout): pinned just above the tab bar, or above the iOS keyboard while it is
   up (--rec-kb, set from visualViewport by recKeyboard). */
@media(max-width:767px){
  #t-capture .rec.rec-ready .voice-generate{position:sticky;bottom:calc(var(--rec-kb, 59px + env(safe-area-inset-bottom)) + 8px);z-index:5;box-shadow:0 8px 24px rgba(0,0,0,.35)}
  #t-capture .rec.rec-ready :is(#voice-transcript,#voice-context){scroll-margin-bottom:76px}
}

/* Off Record: the running job or the live mic, one tap from Record (index.html voicePaintPill). */
.rec-pill{position:fixed;left:50%;bottom:calc(22px + env(safe-area-inset-bottom));z-index:44;transform:translateX(-50%);max-width:calc(100vw - 32px);min-height:44px;padding:0 18px;border:1px solid var(--line);border-radius:22px;background:var(--panel);color:var(--ink);font:inherit;font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 8px 24px rgba(0,0,0,.3);cursor:pointer}
.rec-pill[hidden]{display:none}
.rec-pill::before{content:'';display:inline-block;width:8px;height:8px;margin-right:8px;border-radius:50%;background:var(--accent);vertical-align:1px}
.rec-pill.recording::before{background:var(--red)}
.rec-pill:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:767px){
  .rec-pill{bottom:calc(67px + env(safe-area-inset-bottom))}
  body:has(.rec-pill:not([hidden])) .shell{padding-bottom:calc(132px + env(safe-area-inset-bottom))}
}

/* ccToast's action button (app-ui.js), e.g. Open on "Your script is ready". */
.cc-toast:has(.cc-toast-action){display:flex;align-items:center;justify-content:space-between;gap:12px}
.cc-toast-action{flex:none;min-width:44px;min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:8px;background:none;color:var(--accent);font:inherit;font-weight:600;cursor:pointer}
.cc-toast-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* Packages: the thesis shows in full (mobile-app.css boxed it at 160px with no hint of more),
   the Scripts retry sits beside its message, and older packages fold under "Show N more". */
#t-voice .voice-source .voice-body{max-height:none;overflow:visible}
#t-voice .voice-note{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 12px;font-size:13px}
#t-voice .voice-retry{min-height:44px;padding:0 16px;border:1px solid var(--line);border-radius:8px;background:none;color:var(--accent);font:inherit;font-weight:600;cursor:pointer}
#t-voice .voice-history-more>summary{display:flex;align-items:center;min-height:44px;color:var(--accent);font-family:inherit;font-size:14px;letter-spacing:0;text-transform:none}
