:root {
  color-scheme: dark;
  font-family: Barlow, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #edf2f4;
  background: #10151a;
  --panel: #1a2128;
  --stroke: #34414b;
  --muted: #a9b5bd;
  --accent: #ffac74;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: #aedfd7; text-underline-offset: .24em; }
button, input, select, textarea { font: inherit; color: inherit; }
button, input, select, textarea, .button { border-radius: 7px; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 1px solid #586570; background: #29343d; color: #f3f6f7;
  padding: 9px 15px; cursor: pointer; text-decoration: none; font-size: .92rem; font-weight: 600;
}
button:hover:not(:disabled), .button:hover { border-color: #a6bebd; background: #34414a; }
button.primary { border-color: #e69e6d; background: var(--accent); color: #251a13; }
button.primary:hover:not(:disabled) { background: #ffbc8e; border-color: #ffd3b4; }
button:disabled { opacity: .5; cursor: default; }
input:not([type=file]):not([type=checkbox]), select, textarea {
  width: 100%; border: 1px solid #475661; background: #10171d; padding: 10px 12px;
}
input::placeholder,textarea::placeholder { color: #85939e; }
textarea { resize: vertical; }
input[type=file] { width: 100%; max-width: 100%; padding: 6px 8px; border: 1px solid #475661; background: #10171d; font-size: .88rem; }
input[type=file]::file-selector-button {
  padding: 6px 10px; margin-right: 9px; border: 0; border-radius: 4px; background: #34434d; color: #ebf1f2; cursor: pointer;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.top { border-bottom: 1px solid var(--stroke); background: #0d1217; }
.nav,main { width: min(1220px,100%); margin: 0 auto; padding-inline: clamp(16px,4vw,56px); }
.nav { min-height: 64px; display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.nav nav { display:flex; gap: 20px; align-items:center; }
.brand { color: #f3f7f7; text-decoration: none; font-size: 1.22rem; font-weight: 760; }
.brand span { color: var(--accent); }
.nav nav a { color: #c6d2d8; text-decoration: none; font-size: .9rem; }
main { padding-block: clamp(24px,3.6vw,46px) 50px; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: clamp(1.85rem,3.7vw,2.9rem); line-height: 1.18; letter-spacing: -.035em; }
h2 { font-size: 1.18rem; }
h3 { font-size: .96rem; }
.heading { margin-bottom: 20px; }
.panel,.connection { border:1px solid var(--stroke); border-radius:12px; background:var(--panel); }
.connection { padding: 13px 17px; margin: 0 0 18px; background:#172129; }
.connection summary { display: flex; align-items:center; justify-content:space-between; gap:14px; font-weight:650; }
.connection summary, .connect-toggle { cursor:pointer; }
.connection summary::after { content:'⌄'; color: var(--muted); }
.connection[open] summary::after { content:'⌃'; }
.connection summary::marker { content:''; }
.connection summary::-webkit-details-marker { display:none; }
.connection .row { margin-top:12px; }
.grid { display:grid; grid-template-columns:minmax(0,1.16fr) minmax(0,.84fr); gap:18px; align-items:start; }
.stack { display:grid; align-content:start; gap:18px; min-width:0; }
.panel { padding:clamp(15px,2.15vw,24px); min-width:0; }
.section-title { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.field { display:grid; gap:7px; min-width:0; margin-top:14px; }
.field label,.label { color:#e1e8eb; font-weight:620; font-size:.92rem; }
.small,.hint { color:var(--muted); font-size:.85rem; line-height:1.55; }
.hint { margin-top:7px; }
.row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.row>input, .row>select { flex:1 1 130px; }
.row button { flex-shrink:0; }
.actions { display:flex; gap:9px; align-items:center; flex-wrap:wrap; margin-top:16px; }
.subsection { border-top:1px solid var(--stroke); padding-top:18px; margin-top:18px; }
.duo { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
.status { display:block; color:#b6d5cd; line-height:1.5; font-size:.88rem; overflow-wrap:anywhere; }
.status:empty { display:none; }
.status[data-kind=error] { color:#ffb39b; }
.status[data-kind=notice] { color:#ecd0a3; }
form .status, .actions + .status { margin-top:9px; }
.pill { display:inline-flex; align-items:center; border:1px solid #46545e; border-radius:99px; padding:3px 10px; color:#bbcad0; font-size:.8rem; }
.pill.active { background:#19382e; border-color:#3e705c; color:#b7ebd3; }
.screen { overflow:hidden; position:relative; aspect-ratio:16/9; isolation:isolate; border:1px solid var(--stroke); border-radius:8px; background:#17262b; }
.scene { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.talent { position:absolute; bottom:5%; right:3%; width:30%; max-height:88%; aspect-ratio:4/5; display:grid; place-items:center; overflow:hidden; background:#18222cde; border:1px solid #83919ad4; border-radius:6px; box-shadow:0 3px 12px #0007; }
.talent img { width:100%; height:100%; object-fit:cover; }
.talent span { color:#c3ced5; text-align:center; font-size:clamp(.62rem,1.3vw,.85rem); }
.preview-key { position:absolute; top:7%; left:4%; padding:3px 8px; border-left:3px solid var(--accent); background:#0c1823d9; color:white; font-weight:640; font-size:.81rem; }
audio { display:block; width:100%; height:36px; margin-top:10px; }
.copy-field { font-size:.83rem!important; }
.switch-label { display:flex; gap:9px; align-items:flex-start; font-size:.91rem; line-height:1.5; }
.switch-label input { margin-top:4px; accent-color: var(--accent); }
@media(max-width:780px){ .grid{grid-template-columns:1fr;} .nav{min-height:55px;} .panel{padding:16px;} .stack{gap:14px;} .nav nav{gap:10px;} }
@media(max-width:480px){ .duo{grid-template-columns:1fr;gap:0;} .nav nav a{font-size:.82rem;} .connection .row{align-items:stretch;} .subsection{margin-top:14px;padding-top:14px;} }

.heading {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px}
.chat-studio {margin-top:18px;scroll-margin-top:12px}
.chat-studio fieldset {min-width:0;border:0;margin:0;padding:0}
.chat-studio legend {font-weight:650;margin-bottom:12px}
.switch-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:10px}
.chat-inbox {min-width:0}
.chat-inbox .section-title {margin-bottom:10px}
#chat-list {list-style:none;max-height:17rem;overflow:auto;margin:0;padding:0;scrollbar-gutter:stable}
#chat-list:empty {display:none}
#chat-list li {border-top:1px solid var(--stroke);padding:8px 3px}
.chat-meta {display:flex;align-items:center;gap:7px;flex-wrap:wrap;color:var(--muted);font-size:.77rem}
.chat-meta time {margin-left:auto}
.chat-meta button,#chat-untarget {padding:3px 8px;font-size:.78rem}
.chat-content {margin:4px 0 0;overflow-wrap:anywhere;white-space:pre-wrap}
.chat-meta strong {color:#c4dce1}
[data-chat-kind=ad] .chat-meta strong,.chat-example strong {color:var(--accent)}
.chat-target,.chat-example {margin-top:8px;border-left:2px solid var(--accent);border-radius:3px;padding:7px 9px;background:#10181f;overflow-wrap:anywhere}
.chat-target {display:flex;align-items:center;justify-content:space-between;gap:8px}
#chat-draft {margin-top:7px}
#chat-read-state {margin-top:7px}
.sample-call{margin-top:12px}.sample-call summary{cursor:pointer;color:var(--accent)}
