/* ============================================================
   Script suggestion card, script sheet bits, teleprompter overlay
   ============================================================ */

/* ---------- Live script suggestion (coach panel, light) ---------- */
.script-suggest { margin-bottom: var(--s-2); padding: 13px 15px; border-radius: var(--r-lg); background: oklch(58% 0.2 295 / 0.08); border: 1px solid oklch(58% 0.2 295 / 0.3); animation: slide-in var(--dur-2) var(--ease); }
.script-suggest.objection { background: oklch(60% 0.22 25 / 0.07); border-color: oklch(60% 0.22 25 / 0.4); }
.ss-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ss-tag { font-size: var(--text-2xs); letter-spacing: 0.02em; text-transform: uppercase; color: var(--violet); font-weight: 700; }
.script-suggest.objection .ss-tag { color: var(--danger); }
.ss-open { font-size: var(--text-2xs); color: var(--text-2); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 3px 10px; background: var(--card-solid); font-weight: 600; transition: color var(--dur-1), border-color var(--dur-1); }
.ss-open:hover { color: var(--violet); border-color: var(--violet); }
.ss-text { font-size: var(--text-sm); margin-top: 7px; line-height: 1.5; color: var(--text); }

/* ---------- Toolbar script chip ---------- */
.script-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: var(--r-pill); background: var(--fill-subtle); font-size: var(--text-xs); color: var(--text-2); font-weight: 500; }
.script-chip.on { background: oklch(58% 0.2 295 / 0.12); color: var(--text); }
.script-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-4); }
.script-chip.on .dot { background: var(--violet); }

/* ---------- Script sheet bits ---------- */
.tmpl-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: 6px; }
.tmpl-chip { padding: 9px 15px; border-radius: var(--r-pill); background: var(--card-solid); border: 1px solid var(--hairline); color: var(--text); font-size: var(--text-sm); font-weight: 600; box-shadow: var(--sh-1); transition: all var(--dur-1); }
.tmpl-chip:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.script-textarea { width: 100%; min-height: 170px; resize: vertical; background: var(--card-solid); border: 1px solid var(--hairline); color: var(--text); border-radius: var(--r-md); padding: 13px 15px; font-size: var(--text-sm); line-height: 1.6; box-shadow: var(--sh-1); }
.script-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px oklch(68% 0.17 152 / 0.15); }
.script-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; }
.script-status { font-size: var(--text-xs); color: var(--text-3); }
.script-status.ok { color: var(--accent); }
.script-status.err { color: var(--warn); }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Teleprompter (focused dark reading mode) ---------- */
.tp-overlay { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; background: oklch(16% 0.01 264); color: oklch(96% 0 0); animation: fade-in var(--dur-2); }
.tp-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) clamp(1rem, 3vw, 2rem); border-bottom: 1px solid oklch(100% 0 0 / 0.1); flex-wrap: wrap; }
.tp-bar-left { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.tp-title { font-size: var(--text-base); font-weight: 600; }
.tp-step { font-size: var(--text-xs); color: var(--accent); font-weight: 600; }
.tp-adherence { font-size: var(--text-xs); color: oklch(70% 0 0); }

.tp-controls { display: flex; align-items: center; gap: 6px; }
.tp-ctrl { min-width: 38px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); background: oklch(100% 0 0 / 0.08); border: 1px solid oklch(100% 0 0 / 0.12); color: oklch(92% 0 0); font-size: var(--text-sm); font-weight: 600; display: grid; place-items: center; transition: all var(--dur-1); }
.tp-ctrl:hover { background: oklch(100% 0 0 / 0.16); }
.tp-ctrl.on { background: var(--accent); color: #fff; border-color: transparent; }
.tp-play { background: var(--accent); color: #fff; border-color: transparent; }
.tp-close:hover { background: var(--danger); border-color: transparent; }
.tp-readout { font-size: var(--text-xs); color: oklch(72% 0 0); min-width: 58px; text-align: center; }
.tp-sep { width: 1px; height: 22px; background: oklch(100% 0 0 / 0.14); margin: 0 4px; }

.tp-objection { padding: 16px clamp(1rem, 3vw, 2rem); background: oklch(60% 0.22 25 / 0.2); border-bottom: 2px solid var(--danger); }
.tp-objection.flash { animation: obj-flash 0.5s var(--ease); }
@keyframes obj-flash { from { transform: translateY(-100%); opacity: 0; } }
.tp-obj-tag { display: block; font-size: var(--text-xs); letter-spacing: 0.05em; color: oklch(80% 0.15 25); font-weight: 700; }
.tp-obj-text { font-size: clamp(1.1rem, 0.8rem + 1.3vw, 1.7rem); font-weight: 600; margin-top: 6px; line-height: 1.3; }

.tp-stage { position: relative; flex: 1; overflow: hidden; }
.tp-guide { position: absolute; top: 50%; left: 0; right: 0; height: 0; border-top: 1px solid oklch(68% 0.18 150 / 0.45); pointer-events: none; z-index: 2; }
.tp-guide::before, .tp-guide::after { content: ""; position: absolute; top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.tp-guide::before { left: 0; border-left: 8px solid var(--accent); }
.tp-guide::after { right: 0; border-right: 8px solid var(--accent); }

.tp-reel { height: 100%; overflow-y: auto; scroll-behavior: smooth; padding: 0 clamp(1rem, 9vw, 10rem); font-size: 40px; line-height: 1.5; text-align: center; mask-image: linear-gradient(180deg, transparent, #000 24%, #000 76%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 24%, #000 76%, transparent); }
.tp-reel::-webkit-scrollbar { display: none; }
.tp-reel { scrollbar-width: none; }
.tp-spacer { height: 42vh; }
.tp-stepblock { padding: var(--s-4) 0; opacity: 0.25; transition: opacity var(--dur-2); }
.tp-stepblock.active { opacity: 1; }
.tp-stepkicker { display: block; font-size: 0.4em; letter-spacing: 0.16em; text-transform: uppercase; color: oklch(60% 0 0); margin-bottom: 0.4em; }
.tp-stepblock.active .tp-stepkicker { color: var(--accent); }
.tp-line { font-weight: 600; color: oklch(58% 0 0); margin: 0.3em 0; }
.tp-stepblock.active .tp-line { color: oklch(98% 0 0); }

@media (max-width: 640px) { .tp-reel { font-size: 27px; } }
