:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-weight: 400;
  color: #eeeee9;
  background: #080808;
  --surface: #101010;
  --surface-raised: #181918;
  --muted: #acafa8;
  --line: #30322e;
  --accent: #bccba4;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: #080808; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; transition: background .18s, transform .18s, opacity .18s; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a, input, select, textarea { outline-offset: 5px; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .import-link:focus-within { outline: 2px solid var(--accent); outline-offset: 5px; }
button:not(:disabled):active { transform: translateY(1px); }
a { color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; padding: 0 38px; margin: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 108px; gap: 20px; border-bottom: 1px solid #292a27; }
.wordmark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.wordmark img { flex: 0 0 auto; }
.brand-name { font-size: 26px; font-weight: 650; letter-spacing: -1px; }
.brand-stage { font: 9px var(--mono); letter-spacing: 1.1px; color: #a3a69e; border: 1px solid #45473f; padding: 4px 6px; margin-left: 1px; }
.local-badge { display: flex; align-items: center; gap: 9px; font: 10px var(--mono); color: #b2b7a9; border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; background: #11120f; }
.status-dot { height: 5px; width: 5px; background: var(--accent); flex: 0 0 auto; }
.intro { padding: 43px 0 36px; }
.eyebrow { font: 10px var(--mono); letter-spacing: 2px; color: #aeb8a2; margin: 0 0 20px; }
h1 { font-size: clamp(40px, 5.1vw, 61px); font-weight: 600; line-height: 1.08; letter-spacing: -2.5px; margin: 0; }
h1 span { color: #9d9f98; }
.intro-copy { font-size: 15px; line-height: 1.75; color: var(--muted); margin: 22px 0 0; }
.app-grid { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.25fr); gap: 20px; }
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 28px; }
.card-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.step { display: inline-flex; justify-content: center; align-items: center; flex: 0 0 auto; width: 26px; height: 26px; border: 1px solid #44473f; border-radius: 2px; background: #171914; font: 10px var(--mono); color: #c0c9b5; }
.card-heading h2 { font-size: 14px; font-weight: 550; margin: 0; }
.mic-state { margin-left: auto; font: 10px var(--mono); padding: 5px 7px; color: #a9ada1; border: 1px solid #35382f; background: #161813; border-radius: 2px; }
.mic-state.recording { color: #efb1a8; border-color: #744b43; background: #301d1b; }
.voice-card h3 { font-size: 22px; font-weight: 550; letter-spacing: -.6px; margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.75; }
.button { border-radius: 4px; min-height: 46px; padding: 13px 17px; border: 1px solid transparent; display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 13px; font-weight: 550; }
.primary { background: #252a20; color: #eef2e7; border-color: #7b856f; }
.primary:not(:disabled):hover { background: #363f2e; }
.secondary { background: #1b1d18; border-color: #454a3d; color: #dbe2d1; }
.secondary:not(:disabled):hover { background: #292e22; }
.wide { width: 100%; }
.voice-card .primary { margin-top: 24px; }
.import-link { position: relative; display: block; text-align: center; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; color: #b5bbaa; margin: 17px 0 20px; cursor: pointer; border-radius: 2px; }
.import-link input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.micro { font-size: 11px; line-height: 1.75; color: #a0a597; }
.privacy-strip { display: flex; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 25px; font-size: 11px; color: #a4ad99; line-height: 1.7; }
.privacy-strip > span:first-child { font-size: 19px; line-height: 1.1; color: var(--accent); }
.player-card { min-width: 0; border: 1px solid #42473b; border-radius: 6px; padding: 28px 34px; background: #10120f; color: #eeeee9; overflow: hidden; }
.player-card .step { background: #1a1e16; color: #c6d2b9; }
.synthetic-badge { margin-left: auto; font: 10px var(--mono); color: #bec7b2; border: 1px solid #464d3d; padding: 5px 8px; border-radius: 2px; }
.player-heading { text-align: center; margin: 36px 0 8px; }
.player-heading p { font: 10px var(--mono); letter-spacing: 1.3px; color: #a9b59a; margin: 0 0 14px; line-height: 1.6; }
.player-heading h3 { font-weight: 450; letter-spacing: -.7px; font-size: 27px; min-height: 34px; margin: 0; overflow-wrap: anywhere; }
.waveform { height: 65px; display: flex; gap: 4px; align-items: center; justify-content: center; margin: 24px 0 27px; overflow: hidden; }
.waveform i { width: 3px; flex-shrink: 0; border-radius: 1px; background: #778565; height: var(--height); transform: scaleY(.5); }
.waveform.active i { animation: pulse 1.3s ease-in-out infinite; animation-delay: var(--delay); background: #c0d1a5; }
.waveform.paused i { animation-play-state: paused; }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 24px; }
.round-button { border: 1px solid #505747; background: #1b1f17; color: #e6ecdd; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.round-button:not(:disabled):hover { background: #2d3525; }
.round-button svg { fill: currentColor; width: 19px; height: 19px; }
.small { width: 44px; height: 44px; flex: 0 0 auto; }
.play-button { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 26px; height: 62px; min-width: 145px; border-radius: 5px; background: #cedabc; color: #182010; font-size: 16px; font-weight: 600; border: 1px solid #d7e1c9; }
.play-button:not(:disabled):hover { background: #e0e9d3; }
.play-button svg { width: 22px; height: 22px; fill: currentColor; }
.player-status { text-align: center; font-size: 12px; color: #c2ccba; min-height: 18px; margin: 19px 0 0; line-height: 1.6; }
.session-progress { display: flex; align-items: center; gap: 11px; font: 10px var(--mono); color: #afbba1; margin-top: 22px; }
.session-track, .progress-track { height: 3px; background: #353d2c; flex: 1; overflow: hidden; }
.session-track > div, .progress-track > div { height: 100%; background: var(--accent); transition: width .3s; width: 0; }
.player-options { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; border-top: 1px solid #343a2e; padding-top: 17px; gap: 18px; }
.volume-control { display: flex; align-items: center; gap: 10px; max-width: 220px; min-width: 0; flex: 1; }
.volume-control svg { width: 19px; height: 19px; fill: none; stroke: #c4d2b2; stroke-width: 1.5; flex-shrink: 0; }
.volume-control input { width: 100%; min-width: 0; accent-color: #cbdcba; height: 4px; }
.volume-control span { font: 10px var(--mono); min-width: 28px; color: #c2cdba; }
.speaker-check { border: 0; background: none; color: #ccd7bf; font-size: 11px; padding: 8px 0; white-space: nowrap; }
.speaker-check:not(:disabled):hover { text-decoration: underline; text-underline-offset: 4px; }
.speaker-check span { margin-left: 5px; }
.speaker-note { font-size: 11px; color: #a7b49a; line-height: 1.6; text-align: center; margin: 17px 0 0; }
.content-card { grid-column: 1 / -1; }
.library-card { grid-column: 1 / -1; }
.audio-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 22px; }
.saved-selection { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 13px; border-top: 1px solid #343a2e; padding-top: 11px; margin-top: 14px; font-size: 11px; color: #bccba9; line-height: 1.6; }
.saved-selection > span { overflow-wrap: anywhere; }
.audio-library { margin-top: 20px; }
.audio-library > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; font-size: 13px; color: #d0ddc1; padding: 8px 0; }
.audio-library > summary::before { content: '+'; font: 18px var(--mono); margin-right: 3px; }
.audio-library[open] > summary::before { content: '−'; }
.audio-library > summary::-webkit-details-marker { display: none; }
.audio-library > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
#saved-count { color: #a7b198; font: 10px var(--mono); margin-left: auto; line-height: 1.7; }
.library-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 22px; margin: 20px 0 12px; }
.library-toolbar select { max-width: 100%; min-width: 0; }
.library-notice { margin: 14px 0; font-size: 12px; }
.saved-list { list-style: none; padding: 0; margin: 20px 0 0; }
.saved-clip { display: flex; align-items: center; justify-content: space-between; gap: 15px 22px; padding: 18px 0; border-top: 1px solid #33392d; }
.saved-clip-info { min-width: 0; }
.saved-clip h4 { font-size: 14px; line-height: 1.6; font-weight: 500; margin: 0; overflow-wrap: anywhere; }
.saved-clip p { color: #a5b096; font: 10px var(--mono); margin: 7px 0 0; line-height: 1.7; }
.saved-clip-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.saved-clip-actions .compact { min-height: 40px; padding: 9px 16px; }
.saved-empty { padding: 20px; margin: 20px 0 0; border: 1px dashed #414b35; font-size: 12px; line-height: 1.8; color: #aebc9d; }
.data-actions { display: flex; align-items: flex-start; flex-direction: column; gap: 5px; }
.optional { margin-left: auto; font: 9px var(--mono); letter-spacing: 1.2px; color: #a1aa96; }
.content-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 25px; }
.segmented { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #090a08; border: 1px solid #34382e; border-radius: 4px; }
.segmented button { font-size: 12px; border: 1px solid transparent; background: transparent; color: #acb59f; padding: 10px 14px; border-radius: 2px; white-space: nowrap; }
.segmented button[aria-pressed=true] { background: #292f23; border-color: #68745a; color: #e2e9d8; }
.segmented button[aria-pressed=false]:hover { background: #1a1e16; }
.duration { display: flex; align-items: center; gap: 9px; color: #b0b9a3; font-size: 12px; white-space: nowrap; }
.duration select { border: 1px solid #51594a; background: #151812; padding: 11px 10px; border-radius: 3px; color: #e0e7d6; font-size: 12px; min-width: 123px; }
.story-preview { margin-top: 22px; padding: 22px 25px; background: #0b0c0a; border: 1px solid #31362b; border-radius: 4px; }
.story-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.story-heading h3 { font-size: 17px; font-weight: 500; letter-spacing: -.3px; margin: 0; }
.text-button { background: none; border: 0; padding: 7px 0; color: #bdcda8; font-size: 12px; text-underline-offset: 4px; }
.text-button:not(:disabled):hover { text-decoration: underline; }
.story-heading .text-button { white-space: nowrap; }
.story-heading .text-button span { margin-left: 8px; }
.story-preview > p { font-size: 13px; color: #b6c1a8; line-height: 1.9; white-space: pre-line; max-height: 160px; overflow: auto; margin: 16px 0 0; padding-right: 10px; }
.content-footnote { margin: 13px 0 0; }
.download { margin-top: 14px; }
.loading { margin: 17px 0 0; }
.loading p { font-size: 11px; text-align: center; color: #c8d7b7; line-height: 1.6; margin-bottom: 0; }
.progress-track { height: 4px; }
.loading #load-fill { min-width: 2%; }
.record-instruction { font-size: 12px; color: #b0bba3; margin-top: 27px; }
blockquote { font-size: 15px; line-height: 1.75; color: #d5ddc9; margin: 13px 0; padding: 16px 0 16px 17px; border-left: 2px solid #738260; }
.record-display { display: flex; align-items: center; gap: 9px; margin-top: 18px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; }
.record-dot { width: 7px; height: 7px; background: #eaa294; border-radius: 50%; animation: pulse 1s infinite; }
.level-track { margin-left: auto; width: 50%; height: 5px; background: #30382a; overflow: hidden; }
.level-track > div { height: 100%; width: 0; background: #bccf9f; transition: width .1s; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #bcc6b0; margin-top: 18px; }
.check-row input { accent-color: #b7ca9d; }
#sample-panel h3 { margin-top: 33px; }
audio { width: 100%; margin-top: 12px; height: 40px; }
.reference-quality { border-left: 2px solid #899c73; padding: 9px 12px; margin: 14px 0; color: #c6d3b8; background: #171c13; font-size: 12px; line-height: 1.7; }
.reference-warning { color: #e7c28e; font-size: 12px; line-height: 1.7; }
.reference-play { margin-top: 10px; }
.voice-profile { display: flex; align-items: center; gap: 14px; margin-top: 35px; margin-bottom: 28px; }
.voice-profile h3 { margin: 0 0 5px !important; font-size: 21px; }
.voice-profile p { margin: 0; font-size: 11px; }
.profile-icon { width: 55px; height: 55px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; border: 1px solid #47523b; border-radius: 4px; background: #1b2215; color: #c1d2aa; }
.profile-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.checkmark { margin-left: auto; color: #c0d5a4; font-size: 16px; border: 1px solid #536043; background: #202919; width: 27px; height: 27px; display: flex; align-items: center; justify-content: center; border-radius: 3px; }
.voice-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin-top: 14px; }
.danger { color: #e1a999; }
.voice-card #voice-saved > .muted { margin-bottom: 25px; }
.custom-label { display: block; margin-top: 25px; font-size: 13px; margin-bottom: 12px; color: #bac8ab; }
textarea { width: 100%; resize: vertical; border: 1px solid #526044; background: #0d100b; color: #dce6d0; border-radius: 4px; line-height: 1.7; padding: 16px; font-size: 14px; }
textarea::placeholder { color: #929f83; }
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 30px; }
.help-grid details { border-top: 1px solid #34392d; padding: 17px 0; }
.help-grid summary { font-size: 12px; color: #bac5ae; cursor: pointer; font-weight: 500; }
.help-grid summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.help-grid p { font-size: 12px; line-height: 1.8; color: #a7b499; }
footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 37px 0 30px; padding-top: 22px; border-top: 1px solid #34392d; font-size: 12px; color: #a6b198; }
footer > span { white-space: nowrap; }
footer p { margin: 0; font-size: 11px; line-height: 1.7; max-width: 560px; }
.version { font: 8px var(--mono); letter-spacing: .9px; margin-left: 8px; border: 1px solid #46503b; border-radius: 2px; padding: 4px 5px; }
footer a { font-size: 11px; text-underline-offset: 4px; white-space: nowrap; }
.notice { border: 1px solid #586548; border-radius: 4px; background: #1a2114; padding: 14px 18px; margin: 0 0 24px; font-size: 13px; line-height: 1.7; color: #d0ddc1; }
.notice.error { background: #2c1a15; border-color: #835444; color: #f0bca9; }
.notice a { font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0, 0, 0, 0); overflow: hidden; white-space: nowrap; }
.voice-card .reading-heading { margin-top: 29px; font-size: 21px; }
.reading-preview { font-size: 14px; line-height: 1.8; margin: 17px 0 0; padding: 13px 0 13px 15px; }
.playback-settings { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 19px; }
.playback-settings .duration { flex: 1; justify-content: space-between; }
.playback-settings select { min-width: 0; max-width: 100%; font-size: 12px; }
.mode-note { font-size: 12px; line-height: 1.7; color: #afbd9f; margin: 12px 0 0; }
.awake-panel { border: 1px solid #46503b; background: #181e13; border-radius: 4px; padding: 13px 15px; margin-top: 20px; }
.awake-panel label { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #d0dec0; line-height: 1.6; }
.awake-panel input { accent-color: #c5d9ac; margin: 0; flex: 0 0 auto; }
.awake-panel p { font-size: 11px; line-height: 1.6; color: #b2c3a0; margin: 8px 0 0; }
@keyframes pulse { 0%, 100% { transform: scaleY(.42); opacity: .55; } 50% { transform: scaleY(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 760px) {
  .wrap { padding-left: 21px; padding-right: 21px; }
  .topbar { flex-wrap: wrap; justify-content: flex-start; min-height: 96px; padding-top: 18px; padding-bottom: 18px; gap: 12px 22px; }
  .wordmark img { width: 40px; height: 40px; }
  .brand-name { font-size: 24px; }
  .local-badge { font-size: 9px; padding: 8px 10px; }
  .intro { padding-top: 31px; padding-bottom: 29px; }
  h1 { letter-spacing: -1.8px; }
  .intro-copy { font-size: 14px; }
  .desktop { display: none; }
  .app-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .card, .player-card { padding: 23px; border-radius: 5px; }
  .content-card { grid-column: auto; }
  .library-card { grid-column: auto; }
  .saved-clip { flex-wrap: wrap; }
  .saved-clip-actions { width: 100%; }
  .library-toolbar .duration { flex: 1; flex-wrap: wrap; }
  .library-toolbar select { flex: 1; }
  .voice-profile { margin-top: 23px; margin-bottom: 16px; }
  .player-heading h3 { font-size: 25px; }
  .content-controls { align-items: stretch; flex-direction: column; gap: 14px; }
  .segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented button { padding: 11px 6px; }
  .duration { justify-content: space-between; }
  .story-preview { padding: 17px; }
  .story-heading { flex-wrap: wrap; gap: 6px; }
  .story-heading h3 { font-size: 16px; }
  .story-preview > p { max-height: 210px; }
  .help-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 24px; }
  footer { flex-wrap: wrap; gap: 13px; }
  footer p { order: 3; width: 100%; }
  .optional { font-size: 8px; letter-spacing: .8px; }
  .voice-card .privacy-strip { margin-top: 18px; }
  body.has-voice .voice-card { order: 2; }
  body.has-voice .player-card { order: 1; }
  body.has-voice .content-card { order: 3; }
  body.has-voice .library-card { order: 4; }
  .playback-settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .segmented button[data-kind=custom] { grid-column: 1 / -1; }
  .playback-settings .duration { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 9px; }
  .playback-settings select { width: 100%; min-width: 0; }
  .voice-card .reading-heading { margin-top: 23px; }
}
@media (max-width: 420px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .card, .player-card { padding: 20px; }
  .player-controls { gap: 14px; }
  .play-button { min-width: 122px; padding: 0 18px; }
  .player-options { gap: 12px; }
  .volume-control { gap: 7px; }
  .optional { display: none; }
  .playback-settings .duration { grid-template-columns: minmax(0, 1fr); gap: 7px; }
}
