:root{
  --bg:#0f1115;
  --panel:#171a21;
  --panel2:#1f2430;
  --text:#f3f5f7;
  --muted:#a9b0bb;
  --line:#2e3440;
  --accent:#78a9ff;
  --danger:#ff7b72;
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f4f6f8;color:#20242a}
a{color:#2058a8;text-decoration:none}
button,input,textarea,select{font:inherit}
.wrap{max-width:1100px;margin:0 auto;padding:24px}
.topbar{display:flex;gap:16px;align-items:center;justify-content:space-between;margin-bottom:24px}
.topbar .actions{display:flex;gap:10px;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;padding:10px 14px;background:#20242a;color:#fff;cursor:pointer}
.btn.secondary{background:#e3e7ec;color:#20242a}
.btn.danger{background:#9d2c2c}
.card{background:#fff;border:1px solid #dfe3e8;border-radius:10px;padding:18px;margin-bottom:16px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}
.meta{color:#68707c;font-size:14px}
label{display:block;font-weight:700;margin:14px 0 6px}
input[type=text],input[type=password],input[type=number],textarea{
  width:100%;padding:11px;border:1px solid #c9ced6;border-radius:7px;background:#fff
}
textarea{min-height:420px;resize:vertical;line-height:1.45}
.inline{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.notice{padding:12px 14px;border-radius:8px;background:#edf4ff;border:1px solid #cddffd;margin-bottom:16px}
.error{background:#fff0f0;border-color:#f0b7b7;color:#842020}
.small{font-size:13px;color:#68707c}
hr{border:0;border-top:1px solid #e2e6eb;margin:18px 0}

/* Prompter */
body.prompter-page{background:var(--bg);color:var(--text);overflow:hidden}
.prompter-shell{height:100vh;display:flex;flex-direction:column}
.prompter-controls{
  flex:0 0 auto;background:rgba(15,17,21,.97);border-bottom:1px solid var(--line);
  padding:10px 14px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;z-index:5
}
.prompter-controls button,.prompter-controls select,.prompter-controls input{
  min-height:38px;border-radius:7px;border:1px solid #394151;background:#202631;color:#fff;padding:7px 10px
}
.prompter-controls button{cursor:pointer}
.prompter-controls .status{margin-left:auto;color:var(--muted);font-size:14px}
.prompter-viewport{position:relative;flex:1;overflow:hidden;background:#090a0d}
.reading-band{
  position:absolute;left:0;right:0;top:43%;height:14%;
  border-top:1px solid rgba(120,169,255,.35);border-bottom:1px solid rgba(120,169,255,.35);
  pointer-events:none;z-index:2
}
.prompter-content{
  position:absolute;left:50%;top:0;transform:translateX(-50%);
  width:min(84vw,1050px);padding:42vh 24px 55vh;
  font-size:54px;line-height:1.42;font-weight:600;letter-spacing:.01em;
  will-change:transform;
}
.prompter-content.mirrored{transform:translateX(-50%) scaleX(-1)}
.prompter-content p{margin:0 0 1.05em}
.prompter-content .section{
  color:#91baff;font-size:.62em;text-transform:uppercase;letter-spacing:.08em;margin:1.7em 0 .6em
}
.prompter-content .cue{
  color:#ffd580;font-size:.58em;font-weight:700;letter-spacing:.06em;
  border-left:4px solid #ffd580;padding-left:.6em;margin:.9em 0
}
@media(max-width:700px){
  .wrap{padding:14px}
  .prompter-controls .status{width:100%;margin-left:0}
  .prompter-content{font-size:38px;width:94vw;padding-left:14px;padding-right:14px}
}


.prompt-word.voice-current{
  background:rgba(120,169,255,.18);
  border-radius:.18em;
  outline:2px solid rgba(120,169,255,.28);
}

.prompter-controls input[type="color"]{
  width:42px;
  min-width:42px;
  height:38px;
  padding:2px;
  cursor:pointer;
}


/* V2.1 voice-follow readability improvements */
body.voice-follow-active .reading-band{
  top:26%;
  height:11%;
}

body.voice-follow-active .prompter-content{
  padding-top:28vh;
  padding-bottom:62vh;
}

/* Production cues remain visible but do not consume the space of a spoken paragraph. */
body.voice-follow-active .prompter-content .cue{
  font-size:.42em;
  line-height:1.15;
  margin:.32em 0 .38em;
  padding:.18em 0 .18em .55em;
}

/* Section headings are navigational information, not required spoken text. */
body.voice-follow-active .prompter-content .section{
  font-size:.46em;
  line-height:1.2;
  margin:.45em 0 .38em;
}

/* Tighten the gap after a cue/heading so the next spoken sentence stays in view. */
body.voice-follow-active .prompter-content .cue + .section{
  margin-top:.28em;
}

body.voice-follow-active .prompter-content .section + p,
body.voice-follow-active .prompter-content .cue + p{
  margin-top:.18em;
}


/* V2.3: broaden the visual reading zone for voice-follow mode */
body.voice-follow-active .reading-band{
  top:20%;
  height:42%;
  border-top:1px solid rgba(120,169,255,.22);
  border-bottom:1px solid rgba(120,169,255,.22);
  background:rgba(120,169,255,.025);
}
