:root {
  color-scheme: light;
  --paper: #f7f2e8;
  --surface: #fdf9f0;
  --ink: #293d4a;
  --quiet: #555248;
  --blue: #314a5a;
  --clay: #81514b;
  --rule: #d2c5b2;
  --panel: #eee5d5;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.45 var(--sans); }
.wrap { width: min(calc(100% - 3.2rem), 78rem); margin-inline: auto; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }
button, input, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; z-index: 2; top: .5rem; left: .5rem; background: #fff; padding: .7rem; }
.bar { padding-block: 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; border-bottom: 1px solid var(--rule); }
.wordmark { font: 700 1.2rem/1.2 var(--serif); text-decoration: none; }
.wordmark span { margin-inline-end: .25rem; color: var(--clay); }
.sample-link { font-size: .85rem; text-align: right; }
.studio-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; padding-block: clamp(2.2rem, 5vw, 4.5rem) 2rem; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -.055em; }
h1 { font-size: clamp(3rem, 6vw, 5.8rem); line-height: 1; }
h1 em { color: var(--clay); }
h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.13; }
.studio-heading div p { margin-top: .6rem; color: var(--quiet); }
.mode { color: var(--quiet); font-size: .82rem; text-align: right; max-width: 30ch; }
.return-note { padding: .7rem .9rem; margin-bottom: .9rem; border: 1px solid var(--rule); background: var(--panel); }
.workspace { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, .87fr); gap: clamp(1rem, 3vw, 2.75rem); align-items: start; }
.controls, .review { min-width: 0; display: grid; gap: 1rem; }
.editor, .narration, .proof, .purchase { border: 1px solid var(--rule); background: var(--surface); padding: clamp(1rem, 2.7vw, 1.65rem); }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .7rem; align-items: baseline; margin-block-end: .85rem; }
.link-button { color: var(--blue); background: none; border: 0; padding: .3em 0; text-decoration: underline; text-underline-offset: .22em; font-size: .84rem; font-weight: 650; }
.link-button:not(:disabled):hover { color: var(--clay); }
.link-button:disabled { color: var(--quiet); text-decoration: none; }
.photo-control { display: flex; align-items: center; gap: .72rem; min-height: 4.15rem; border: 1px dashed #b6a185; background: #f6eee1; border-radius: .24rem; padding: .6rem .7rem; cursor: pointer; }
.photo-control:has(+ input:focus-visible) { outline: 3px solid var(--clay); outline-offset: 3px; }
.photo-control:has(+ input:disabled) { cursor: not-allowed; }
.photo-control span { min-width: 0; }
.photo-control .small { display: block; overflow-wrap: anywhere; }
.photo-icon { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; background: #e8d9c6; border-radius: 50%; color: var(--blue); }
.small { font-size: .82rem; color: var(--quiet); }
.privacy { margin-top: .4rem; }
.field-label { display: block; font-size: .91rem; font-weight: 700; }
.field-label span { font-weight: 400; color: var(--quiet); font-size: .79rem; }
label[for=title] { margin-top: 1rem; }
.field-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem .65rem; align-items: baseline; margin-top: .75rem; }
input[type=text], textarea { display: block; width: 100%; min-width: 0; padding: .68rem .75rem; margin-top: .3rem; color: var(--ink); border: 1px solid #b9a78f; border-radius: .24rem; background: #fffdf8; }
textarea { resize: vertical; min-height: 8.5rem; line-height: 1.55; }
output[data-invalid=true] { font-weight: 700; color: #84382e; }
details { margin-top: .8rem; padding-block: .55rem; border-bottom: 1px solid var(--rule); }
summary { font-size: .84rem; font-weight: 650; }
details p { margin-top: .4rem; }
.transcribe-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; }
.transcribe-controls input { max-width: 100%; font-size: .84rem; }
.transcribe-consent { display: block; margin-top: .45rem; }
.proof-action { margin-top: .8rem; }

.voice-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; min-width: 0; margin: 0 0 .6rem; padding: 0; border: 0; }
.voice-card { min-width: 0; border: 1px solid var(--rule); padding: .65rem; background: #f9f1e4; border-radius: .24rem; }
.voice-card:has(input:checked) { border-color: var(--blue); background: #ecede5; }
.voice-card label { display: flex; gap: .3rem; align-items: start; cursor: pointer; }
.voice-card input { accent-color: var(--blue); margin: .29rem .2rem 0 0; }
.voice-card span { min-width: 0; }
.voice-card strong { display: block; overflow-wrap: anywhere; }
.voice-card small { color: var(--quiet); display: block; font-size: .77rem; line-height: 1.3; }
.sample-button { display: block; margin: .45rem 0 0; text-align: left; }
.voice-actions { align-items: center; }
audio { width: 100%; height: 2.65rem; margin-top: .75rem; }
.feedback:not(:empty) { margin-top: .55rem; }

.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; min-height: 2.75rem; border: 1px solid var(--blue); border-radius: .23rem; padding: .55rem .84rem; font-size: .9rem; font-weight: 650; text-decoration: none; text-align: center; }
.primary { background: var(--blue); color: #fffaf0; }
.secondary { background: transparent; color: var(--blue); }
.primary:not(:disabled):hover { background: #223846; }
.secondary:not(:disabled):hover { background: #e9e5d7; }
.primary:disabled, .secondary:disabled { background: #e6ddce; color: #514b42; border-color: #baa990; }
.proof-mat { padding: clamp(.65rem, 2vw, 1.3rem); background: #eae0cf; border: 1px solid var(--rule); }
canvas { display: block; width: min(100%, 25rem); height: auto; margin: auto; box-shadow: 0 7px 14px #54463826; aspect-ratio: 1488 / 2104; }
.purchase { background: var(--panel); }
.purchase p:not(.price) { color: var(--quiet); }
.purchase .primary { margin-top: .9rem; }
.purchase-tools, .downloads { display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: center; }
.purchase-tools .link-button { margin-top: .45rem; }
.downloads { margin-top: .9rem; }
.purchase .downloads .primary { margin-top: 0; }
.open-checkout { margin-top: .65rem; }
.price { font: 500 1.72rem/1.05 var(--serif); white-space: nowrap; }
.price small { font: 650 .72rem/1 var(--sans); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; padding: 1.25rem 0; margin-top: 2rem; border-top: 1px solid var(--rule); color: var(--quiet); font-size: .82rem; }

@media (max-width: 55rem) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .review { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .studio-heading { align-items: start; flex-direction: column; }
  .mode { text-align: left; max-width: none; }
}
@media (max-width: 38rem) {
  .wrap { width: calc(100% - 1.75rem); }
  .bar { padding-block: .9rem; }
  .wordmark { font-size: 1.03rem; }
  .sample-link { font-size: .76rem; }
  .review { grid-template-columns: minmax(0, 1fr); }
  .voice-card { padding: .48rem; }
  .voice-card label { gap: .2rem; }
  .voice-card input { margin-inline-end: 0; }
}
