:root { font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #203b35; background: #f5f4ee; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1160px; margin: auto; padding: 30px 40px; }
header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #d9ded3; padding-bottom: 20px; gap: 16px; }
.brand { font-size: 28px; color: inherit; text-decoration: none; font-weight: 700; letter-spacing: -1px; }
.brand span { display: block; font-size: 11px; font-weight: 400; letter-spacing: 1px; color: #647770; margin-top: 4px; }
.badge { font-size: 10px; letter-spacing: 1.4px; border: 1px solid #c7d3c8; border-radius: 30px; padding: 8px 12px; white-space: nowrap; }
.intro { padding: 34px 0 28px; display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
.eyebrow { grid-column: 1/-1; font-size: 10px !important; letter-spacing: 2px; color: #668271; margin: 0 0 12px !important; }
h1 { font-family: Georgia, serif; font-size: clamp(40px, 5vw, 60px); font-weight: 400; line-height: 1.06; letter-spacing: -2px; margin: 0; }
.intro > p:last-child { font-size: 16px; line-height: 1.8; margin: 0 0 2px 20px; color: #596d64; }
.intro > p span { font-size: 13px; }
.conversation { border-radius: 18px; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; background: #fffef9; border: 1px solid #d9ded3; border-radius: 12px 12px 0 0; }
.status-group { display: flex; align-items: center; gap: 12px; font-size: 14px; }
#status .ui-secondary { display: block; font-size: 11px; color: #697b6d; margin-top: 5px; }
.dot { height: 8px; width: 8px; background: #aab5a9; border-radius: 50%; flex-shrink: 0; }
.dot.live { background: #4d905d; box-shadow: 0 0 0 4px #e5efdf; }
.actions { display: flex; gap: 8px; flex-shrink: 0; }
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid #ca8336; outline-offset: 4px; }
button:disabled { cursor: default; opacity: .5; }
.actions button, .below button { background: transparent; border: 1px solid #d9ded3; border-radius: 7px; padding: 9px 12px; font-size: 12px; color: #3f5849; }
.actions small { display: block; font-size: 10px; margin-top: 4px; color: #68786b; }
#pause:not(:disabled) { background: #edf3e8; border-color: #c0d3b8; }
.meter { height: 3px; background: #e3e7dc; overflow: hidden; }
.meter > div { height: 100%; background: #619563; width: 0; transition: width .1s; }
.speaker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.person { min-width: 0; background: #fffef9; border: 1px solid #d9ded3; border-radius: 14px; padding: 22px; transition: border-color .2s, box-shadow .2s; }
.person.active { border-color: #62946a; box-shadow: 0 0 0 2px #dce8d8; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 22px; }
.language-code { font-size: 12px; font-weight: 600; letter-spacing: 1px; background: #e7efdf; border-radius: 6px; padding: 7px 9px; }
.person:nth-child(2) .language-code { background: #eee8dc; }
.person-state { font-size: 11px; color: #6a7e6c; }
h2 { font-family: Georgia, serif; font-weight: 400; font-size: 27px; margin: 0 0 10px; }
.person-help { color: #71806e; font-size: 12px; margin: 0 0 22px; line-height: 1.6; }
.speaker { width: 100%; text-align: left; border: 1px solid #cfdccf; background: #eff4ea; border-radius: 10px; padding: 16px; color: #254b3c; transition: background .15s; }
.person:nth-child(2) .speaker { background: #f2eee5; border-color: #dedbcb; }
.speaker:not(:disabled):hover { background: #e1ead8; }
.person:nth-child(2) .speaker:not(:disabled):hover { background: #e9e1d2; }
.speaker[aria-pressed="true"] { opacity: 1; }
.speaker strong { font-size: 17px; display: block; font-weight: 500; margin-bottom: 6px; }
.speaker > span { font-size: 11px; color: #64756b; }
.transcript-heading { display: flex; justify-content: space-between; gap: 10px; margin: 26px 0 0; padding-bottom: 12px; border-bottom: 1px solid #eceee4; font-size: 11px; color: #586d5c; }
.transcript-heading > span { font-size: 10px; color: #82907c; }
.transcript { height: 220px; overflow: auto; font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.transcript p { margin: 16px 0; }
.utterance-label { display: block; font-size: 10px; color: #778772; letter-spacing: .3px; }
.transcript .placeholder { font-size: 13px; color: #7f8d7b; line-height: 1.8; }
.below { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 24px; gap: 12px; }
.below > span { font-size: 11px; color: #788475; }
.below-actions { display: flex; gap: 14px; flex: none; }
.below button { border: none; text-decoration: underline; padding-right: 0; }
.configuration .share { display: block; background: transparent; border: none; text-decoration: underline; padding: 10px 0 0; margin-top: 8px; font-size: 12px; color: #3f5849; }
.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; color: #71806f; font-size: 12px; line-height: 1.8; }
.tips strong { color: #476047; display: block; }
footer { border-top: 1px solid #d9ded3; margin-top: 20px; padding-top: 18px; font-size: 10px; line-height: 1.6; color: #75826f; display: flex; justify-content: space-between; gap: 25px; }
.notice, .error { font-size: 13px; line-height: 1.6; background: #fff0db; color: #825518; padding: 14px; border-radius: 8px; }
.notice { margin-bottom: 18px; }.notice > span { display: block; font-size: 11px; margin-top: 5px; }
.error { margin: 14px 0 0; }code { font-size: 12px; }[hidden] { display: none !important; }
@media(max-width:760px) { main { padding: 22px 18px; }.intro { grid-template-columns: 1fr; padding-top: 26px; }.intro > p:last-child { margin: 18px 0 0; }.controls { align-items: flex-start; flex-direction: column; }.actions { width: 100%; }.actions button { flex: 1; }.speaker-grid { grid-template-columns: 1fr; gap: 14px; }.transcript { height: 165px; }.person { padding: 18px; }.panel-heading { margin-bottom: 16px; }.tips { grid-template-columns: 1fr; gap: 0; }footer { flex-direction: column; gap: 6px; }.badge { font-size: 8px; padding: 7px; letter-spacing: .5px; }.below { align-items: flex-start; }.below > span { max-width: 55%; line-height: 1.6; } }

.configuration { background: #fffef9; border: 1px solid #d9ded3; border-radius: 14px; padding: 28px; }
.configuration > p { color: #596d64; font-size: 14px; line-height: 1.8; }
.language-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 20px; margin-top: 26px; }
.language-fields label { font-size: 13px; min-width: 0; }
.language-fields label > span { color: #71806e; }
select { display: block; width: 100%; margin-top: 10px; padding: 14px 12px; font: inherit; font-size: 17px; color: #203b35; background: #f5f6ee; border: 1px solid #c7d3c8; border-radius: 8px; }
select:focus-visible { outline: 3px solid #ca8336; outline-offset: 3px; }
#swap-languages { background: none; border: 1px solid #d9ded3; border-radius: 8px; color: #3f5849; padding: 7px 12px; font-size: 22px; }
#swap-languages small { display: block; font-size: 10px; }
.configuration-note { font-size: 12px; line-height: 1.8; color: #71806e; margin: 24px 0; }
.primary { background: #254b3c; color: #fffef9; border: none; border-radius: 8px; padding: 15px 20px; font-size: 14px; }
@media(max-width:760px) { .configuration { padding: 20px; }.language-fields { grid-template-columns: 1fr; gap: 14px; }#swap-languages { justify-self: center; }.primary { width: 100%; line-height: 1.7; }.actions { flex-wrap: wrap; }.badge { white-space: normal; text-align: center; } }

.ui-primary, .ui-secondary { display: block; }
.ui-secondary { font-size: .82em; margin-top: 5px; opacity: .8; }
h1 .ui-primary { white-space: pre-line; }
h1 .ui-secondary { font: 400 18px/1.5 ui-sans-serif, -apple-system, sans-serif; letter-spacing: 0; margin-top: 16px; white-space: normal; max-width: 460px; }
h2 .ui-secondary { font: 400 15px/1.5 ui-sans-serif, -apple-system, sans-serif; }
.intro { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.intro > p .ui-primary { font-size: 16px; }
.intro .eyebrow .ui-primary, .intro .eyebrow .ui-secondary { font-size: 10px; }
.brand > span { letter-spacing: .5px; }
.brand > span span { margin-top: 2px; }
/* Both language controls stay in the normal, scrolling header. */
.header-controls { display: flex; align-items: center; gap: 10px; }
.interface-menu { position: relative; }
.interface-menu summary { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid #c7d3c8; border-radius: 30px; background: #fffef9; cursor: pointer; list-style: none; }
.interface-menu summary::-webkit-details-marker { display: none; }
.interface-menu summary:focus-visible { outline: 3px solid #ca8336; outline-offset: 4px; }
#interface-flags { font-size: 22px; white-space: pre; line-height: 1; }
.chevron { font-size: 16px; line-height: 1; color: #647770; }
.interface-menu[open] summary { border-color: #62946a; background: #eff4ea; }
.interface-options { position: absolute; top: calc(100% + 10px); right: 0; width: 340px; max-width: calc(100vw - 36px); padding: 20px; background: #fffef9; border: 1px solid #d9ded3; border-radius: 14px; box-shadow: 0 12px 32px #203b351a; z-index: 2; }
.interface-options h2 { font: 600 14px/1.5 ui-sans-serif, -apple-system, sans-serif; margin: 0 0 18px; }
.interface-options h2 .ui-secondary { font-size: 12px; }
.interface-options p { font-size: 11px; line-height: 1.6; color: #647770; margin: 18px 0 0; }
.interface-fields { display: grid; gap: 16px; }
.interface-fields label { font-size: 12px; }
.interface-fields select { padding: 10px; font-size: 16px; }
#change-languages { display: flex; align-items: center; gap: 10px; min-height: 44px; background: transparent; color: inherit; letter-spacing: .4px; font-size: 12px; }
#change-languages:hover, .interface-menu summary:hover { background: #eff4ea; }
.actions { flex-shrink: 1; }
.actions button { min-width: 0; }
.controls .status-group { min-width: 160px; }
.tips { display: block; }
.tips h2 { font: 600 13px/1.5 ui-sans-serif, -apple-system, sans-serif; }
.tips h2 .ui-secondary { font-size: 12px; }
.tips p { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.tips p .ui-secondary { font-size: inherit; margin: 0; }
footer > span { flex: 1; }footer .ui-secondary { font-size: inherit; margin: 0; }
@media(max-width:900px) {.controls { align-items: stretch; flex-direction: column; }.actions button { flex: 1; } }
@media(max-width:760px) { .intro { grid-template-columns: 1fr; }.tips p { grid-template-columns: 1fr; gap: 12px; }.actions .ui-secondary { font-size: 10px; }.actions button { padding: 9px 7px; } }

@media(max-width:600px) {
  header { flex-wrap: wrap; gap: 18px; }
  .header-controls { width: 100%; position: relative; justify-content: space-between; }
  .interface-menu { position: static; }
  .interface-options { left: 0; right: auto; width: min(340px, 100%); }
  #change-languages { font-size: 12px; padding: 8px 12px; }
}

/* Speaker controls and conversation text share columns on larger screens. */
.compact-title { display: none; }
.transcript-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.transcript-panel { min-width: 0; background: #fffef9; border: 1px solid #d9ded3; border-radius: 14px; padding: 0 22px 10px; }
.transcript-panel .transcript-heading { margin-top: 18px; }
.transcript:focus-visible, .tips summary:focus-visible { outline: 3px solid #ca8336; outline-offset: 3px; }
.tips summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-weight: 600; color: #476047; }
.tips summary .ui-primary { display: inline; }
button, summary { touch-action: manipulation; -webkit-tap-highlight-color: rgba(98, 148, 106, .12); }
/* Native macOS/WebKit select styling can ignore the requested touch height. */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23596d64' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.interface-fields select, .language-fields select { min-height: 48px; padding-right: 28px; }
