@font-face { font-family: Thmanyah; src: url('font/thmanyahsans-Bold.woff2') format('woff2'); font-display: swap; font-weight: 700; }
:root { color-scheme: light; font-family: Thmanyah, sans-serif; color: #171717; background: #fff; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
a { color: #171717; text-underline-offset: 3px; }
::selection { background: #deded9; color: #171717; }
:focus-visible { outline: 2px solid #171717; outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.topbar { position: sticky; top: 0; z-index: 4; background: #fff; border-bottom: 1px solid #e2e2de; }
.topbar-inner, .main, .footer-inner { width: min(1100px, calc(100% - 48px)); margin-inline: auto; }
.topbar-inner { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand img { object-fit: contain; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 1.65rem; margin-bottom: 0; line-height: 1.45; }
.brand p { margin: 0; color: #666; font-size: .875rem; }
h2 { font-size: 1.25rem; line-height: 1.5; margin-bottom: 20px; }
.key-menu { position: relative; flex-shrink: 0; }
.key-menu summary { list-style: none; display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid #e2e2de; border-radius: 7px; white-space: nowrap; }
.key-menu summary::-webkit-details-marker { display: none; }
.key-menu summary:hover, .secondary-button:hover { background: #f6f6f4; }
.key-dot { width: 8px; height: 8px; border: 1px solid #999; border-radius: 50%; }
.key-dot.active { background: #171717; border-color: #171717; }
.key-panel { position: absolute; top: calc(100% + 9px); left: 0; width: min(320px, calc(100vw - 32px)); padding: 18px; background: #fff; border: 1px solid #e2e2de; border-radius: 10px; box-shadow: 0 12px 30px #1717171c; }
.key-panel p { color: #595959; font-size: .875rem; line-height: 1.7; margin: 10px 0; }
.text-button { border: 0; background: transparent; text-decoration: underline; text-underline-offset: 3px; padding: 5px 0; }
.main { flex: 1; padding-block: 25px 48px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid #e2e2de; margin-bottom: 22px; overflow-x: auto; }
.tabs button { flex-shrink: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 11px 0; color: #666; }
.tabs button[aria-selected="true"] { border-bottom-color: #171717; color: #171717; }
.tabs button:hover { color: #171717; }
.sheet { border: 1px solid #e2e2de; border-radius: 10px; padding: 32px; }
.studio { display: grid; grid-template-columns: 3fr 2fr; gap: 32px; }
.editor { min-width: 0; }
.playback { border-inline-start: 1px solid #e2e2de; padding-inline-start: 32px; min-height: 390px; }
.editor > label, .seed-controls label, .key-panel label, #library-fields label { display: block; margin-bottom: 8px; }
textarea, input[type="text"], input[type="password"], input[type="number"], select { width: 100%; border: 1px solid #d6d6d1; border-radius: 6px; background: #fff; color: #171717; padding: 11px 13px; }
textarea { background: #f6f6f4; min-height: 235px; resize: vertical; font-size: 1.18rem; line-height: 1.9; }
textarea::placeholder, input::placeholder { color: #666; opacity: 1; }
input[dir="ltr"] { text-align: left; }
input[type="file"] { width: 100%; border: 1px dashed #bdbdb7; border-radius: 7px; padding: 20px; margin-bottom: 9px; }
input[type="file"]::file-selector-button { font: inherit; padding: 7px 12px; margin-inline-end: 14px; border: 1px solid #d6d6d1; border-radius: 5px; background: #fff; cursor: pointer; }
#clone-name { margin-bottom: 17px; }
.voice-choice { display: flex; flex-wrap: wrap; gap: 8px 22px; border: 0; margin: 17px 0 0; padding: 0; }
.voice-choice legend { margin-bottom: 7px; }
.voice-choice label { cursor: pointer; white-space: nowrap; }
.voice-choice input { accent-color: #171717; }
.muted { color: #595959; font-size: .87rem; line-height: 1.7; }
#saved-voice-hint { margin: 7px 0 0; }
#library-fields { margin-top: 16px; }
.field-link { display: inline-block; margin-top: 8px; font-size: .875rem; }
.seed-settings { margin-top: 20px; }
.seed-settings summary { width: fit-content; padding: 8px 0; }
.seed-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; align-items: center; max-width: 440px; margin: 8px 0 16px; }
.seed-controls label { margin: 0; }
.secondary-button { background: #fff; border: 1px solid #d6d6d1; border-radius: 6px; padding: 10px; }
#speech-note { margin: 18px 0 12px; }
.message { padding: 10px 13px; border-radius: 6px; background: #f6f6f4; line-height: 1.7; margin: 15px 0; }
.message.error { color: #8b2929; background: #fff1ef; }
.primary-button { display: block; width: 100%; padding: 12px 18px; border: 1px solid #171717; border-radius: 6px; color: #fff; background: #171717; }
.primary-button:hover { background: #383838; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.empty-result { color: #666; margin-top: 32px; }
#player-ready { margin-top: 32px; }
audio { width: 100%; }
.download-button { display: block; text-align: center; border: 1px solid #d6d6d1; border-radius: 6px; text-decoration: none; padding: 11px; margin-top: 20px; }
.download-button:hover { background: #f6f6f4; }
.voice-reference { overflow-wrap: anywhere; text-align: left; padding: 12px; background: #f6f6f4; border-radius: 6px; }
.history { min-height: 300px; }
.recording { border-top: 1px solid #e2e2de; padding-block: 20px; }
.recording > div { display: flex; justify-content: space-between; gap: 15px; align-items: baseline; margin-bottom: 10px; }
.recording .muted { margin: 0; }
.recording audio { max-width: 570px; }
.recording a { display: block; width: fit-content; margin-top: 8px; }
.footer { border-top: 1px solid #e2e2de; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; align-items: center; min-height: 170px; padding-block: 30px; }
.footer-inner > p { margin: 0; color: #666; font-size: .875rem; }
.footer-brand { text-align: center; }
.footer-brand > img { max-width: 100%; }
.footer-brand p { color: #666; font-size: .875rem; margin: 7px 0 12px; }
.footer-brand a { display: inline-grid; place-items: center; width: 44px; height: 44px; }
@media (max-width: 700px) {
  .topbar-inner, .main, .footer-inner { width: calc(100% - 32px); }
  .topbar-inner { min-height: 82px; }
  .brand img { width: 44px; height: 44px; }
  .brand p { font-size: .875rem; }
  .key-menu summary { padding: 8px; font-size: .875rem; }
  .tabs { gap: 20px; }
  .tabs button { font-size: .875rem; }
  .sheet { padding: 20px; }
  .studio { grid-template-columns: 1fr; gap: 22px; }
  .playback { border-inline-start: 0; border-top: 1px solid #e2e2de; padding: 20px 0 0; min-height: 0; }
  .footer-inner { grid-template-columns: 1fr; justify-items: center; gap: 10px; text-align: center; }
}
