/* ==========================================================================
   THE FINAL STAGE — Shell Layout
   Three-column: rail | main (header + frame + director) | call-sheet
   Views cross-blur in the shared frame — no hard nav switching.
   ========================================================================== */

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
    background: #08080a;
    color: #f0ece4;
    font-family: var(--font-ui, 'DM Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent-alpha-20, rgba(155,92,246,.20)); color: #fff; }

/* ── Reactive ambient — two small corner orbs, no full-bleed purple wash ─────── */
#fs-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: none;
}
#fs-ambient::before,
#fs-ambient::after {
    content: '';
    position: absolute;
    width: 320px; height: 320px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0;
    transition: opacity 1.2s ease, transform 1.4s cubic-bezier(0.16,1,0.3,1);
}
#fs-ambient::before {
    top: -80px; left: -80px;
    background: #9B5CF6;
}
#fs-ambient::after {
    bottom: -80px; right: -80px;
    background: #F97316;
}
#fs-ambient.is-pulse::before { opacity: .06; transform: scale(1.2); }
#fs-ambient.is-pulse::after  { opacity: .05; transform: scale(1.15); }
@media (prefers-reduced-motion: reduce) {
    #fs-ambient::before, #fs-ambient::after { display: none; }
}

/* ── App Shell ─────────────────────────────────────────────────────────────── */
#app {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* ── Mobile breakpoints (first pass — conservative, needs on-device tuning) ─── */
@media (max-width: 768px) {
    .fs-rail { width: 56px; padding: 12px 0 16px; }
    .fs-rail__label { font-size: 7px; }
    .fs-header { padding: 0 12px; }
    .fs-header__sub { display: none; }
    .fs-sheet { width: 200px; }
    /* Respect the home-bar / notch on phones */
    .fsp-chat-input-row { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
    /* History becomes a slide-over so the chat/prompter get full width */
    .fs-sheet {
        position: absolute; right: 0; top: 0; height: 100%;
        z-index: 40; box-shadow: -8px 0 24px rgba(0,0,0,.5);
    }
    .fs-sheet.is-collapsed { width: 30px; box-shadow: none; }
    .fs-rail { width: 48px; }
    .fs-prompter__controls { flex-wrap: wrap; gap: 6px; }
}

/* ── Left Rail ─────────────────────────────────────────────────────────────── */
.fs-rail {
    flex-shrink: 0;
    width: 72px;
    border-right: 1px solid rgba(255,255,255,.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0 20px;
    gap: 4px;
    background: rgba(8,8,10,.96);
}

.fs-rail__logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--spectrum);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}
.fs-rail__logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    letter-spacing: .08em;
    color: #ffffff;
    line-height: 1;
}

.fs-rail__item {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: none;
    background: none;
    color: rgba(255,255,255,.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: color 140ms ease, background 140ms ease;
}
.fs-rail__item:hover { color: rgba(255,255,255,.65); background: rgba(255,255,255,.05); }
.fs-rail__item.is-active { color: var(--accent); background: var(--accent-alpha-10); }

.fs-rail__icon { width: 20px; height: 20px; }
.fs-rail__label {
    font-size: 8px;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-family: 'Bebas Neue', sans-serif;
}

/* ── Main Column ───────────────────────────────────────────────────────────── */
.fs-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.fs-header {
    flex-shrink: 0;
    height: 52px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: rgba(8,8,10,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.fs-header__brand { display: flex; flex-direction: column; gap: 1px; }
.fs-header__title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 17px;
    letter-spacing: .14em;
    color: #f0ece4;
    line-height: 1;
}
.fs-header__sub {
    font-size: 8px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
}

.fs-header__status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
}
.fs-header__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent-alpha-40, rgba(155,92,246,.5));
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { opacity: 1; }
    50% { opacity: .45; }
}
.fs-header__status-text {
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
}

.fs-header__actions { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; }

/* Ambient usage indicator — quiet "X of Y this month". Low-contrast by design:
   informational, never an alert. When over a soft cap it carries an inspiring
   line (.is-nudge) — still subtle, still no border, no color shift to red. */
.fs-usage {
    font-size: 10px;
    letter-spacing: .04em;
    color: rgba(255,255,255,.32);
    white-space: nowrap;
    user-select: none;
}
.fs-usage[hidden] { display: none; }
.fs-usage.is-nudge { color: rgba(255,255,255,.5); font-style: italic; }

/* User chip */
.fs-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 5px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 120ms, background 120ms;
}
.fs-user-chip:hover { border-color: var(--accent-alpha-40, rgba(155,92,246,.4)); background: var(--accent-alpha-10, rgba(155,92,246,.06)); }
.fs-user-chip__avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: #08080a;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.fs-user-chip__name {
    font-size: 11px;
    letter-spacing: .04em;
    color: rgba(255,255,255,.7);
}
.fs-user-chip__tag {
    font-size: 8px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.28);
    border-left: 1px solid rgba(255,255,255,.12);
    padding-left: 8px;
}

/* ── Frame + Views ─────────────────────────────────────────────────────────── */
/* All views share this frame; they blur/fade over each other */
.fs-frame {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.fs-view {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.99);
    pointer-events: none;
    transition:
          opacity 280ms cubic-bezier(0.16,1,0.3,1),
          filter 280ms cubic-bezier(0.16,1,0.3,1),
          transform 280ms cubic-bezier(0.16,1,0.3,1);
    will-change: opacity, filter, transform;
}

.fs-view.is-active {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
    pointer-events: auto;
}

/* Outgoing view (being replaced) */
.fs-view.is-leaving {
    opacity: 0;
    filter: blur(6px);
    transform: scale(1.005);
    pointer-events: none;
}

/* ── Director Command Bar ──────────────────────────────────────────────────── */
.fs-director {
    flex-shrink: 0;
    height: 52px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(255,255,255,.06);
    background: rgba(8,8,10,.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.fs-director__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--accent-alpha-40, rgba(155,92,246,.6));
}

.fs-director__input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: rgba(255,255,255,.5);
    font-size: 12px;
    letter-spacing: .02em;
    caret-color: var(--accent);
}
.fs-director__input::placeholder { color: rgba(255,255,255,.22); }
.fs-director__input:focus { color: rgba(255,255,255,.8); }

.fs-director__send {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.10);
    background: none;
    color: rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 120ms, border-color 120ms, background 120ms;
}
.fs-director__send:hover { color: var(--accent); border-color: var(--accent-alpha-40, rgba(155,92,246,.4)); }

/* ── History / Campaign Panel (Right Panel) ────────────────────────────────── */
.fs-sheet {
    flex-shrink: 0;
    width: 240px;
    border-left: 1px solid rgba(255,255,255,.07);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(10,10,12,.95);
    position: relative;
    transition: width 220ms cubic-bezier(0.16,1,0.3,1);
}
.fs-sheet__inner { display: flex; flex-direction: column; height: 100%; min-width: 240px; }
.fs-sheet__collapse {
    position: absolute;
    /* Sits at top-right of the open panel */
    top: 14px;
    right: 10px;
    left: auto;
    width: 20px; height: 20px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.3);
    color: rgba(255,255,255,.5);
    font-size: 13px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}
.fs-sheet__collapse:hover { color: #fff; border-color: var(--accent-alpha-40, rgba(155,92,246,.4)); }
.fs-sheet__rail-label {
    display: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    /* Push label down below the button */
    margin: 12px auto 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 12px;
    letter-spacing: .22em;
    color: rgba(255,255,255,.3);
}
.fs-sheet.is-collapsed { width: 36px; }
.fs-sheet.is-collapsed .fs-sheet__inner { display: none; }
.fs-sheet.is-collapsed .fs-sheet__rail-label { display: block; }
/* When collapsed the button centres in the narrow rail */
.fs-sheet.is-collapsed .fs-sheet__collapse {
    position: static;
    margin: 10px auto 0;
}

/* History items — selectable for campaign */
.fs-hist-empty {
    padding: 48px 16px;
    text-align: center;
    color: rgba(255,255,255,.2);
    font-size: 11px;
    line-height: 1.6;
    letter-spacing: .06em;
}
.fs-hist-item {
    padding: 10px 14px 10px 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: background 100ms, border-color 100ms;
}
.fs-hist-item:hover { background: rgba(255,255,255,.03); }
.fs-hist-item.is-selected {
    background: var(--accent-alpha-10, rgba(155,92,246,.08));
    border-left-color: var(--accent, #9B5CF6);
}
.fs-hist-check {
    flex-shrink: 0;
    width: 16px; height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.20);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
    color: #fff;
    margin-top: 1px;
}
.fs-hist-item.is-selected .fs-hist-check {
    background: var(--accent, #9B5CF6);
    border-color: var(--accent, #9B5CF6);
}
/* Per-episode status badge — idea ○ / recorded ● / posted ✓ */
.fs-hist-status {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    background: none;
    color: rgba(255,255,255,.3);
    font-size: 11px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    margin-top: 1px;
    transition: color 120ms, border-color 120ms, background 120ms;
}
.fs-hist-status.is-recorded { color: var(--accent, #9B5CF6); border-color: var(--accent-alpha-40, rgba(155,92,246,.4)); }
.fs-hist-status.is-posted { color: #4caf7d; border-color: rgba(76,175,125,.45); background: rgba(76,175,125,.10); }

/* Saved session sets */
.fs-sets {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 12px 12px 8px;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.fs-set {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 6px 4px 9px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    cursor: pointer;
    transition: border-color 120ms, background 120ms;
}
.fs-set:hover { border-color: var(--accent-alpha-40, rgba(155,92,246,.4)); background: var(--accent-alpha-10, rgba(155,92,246,.08)); }
.fs-set-name { font-size: 10px; color: rgba(255,255,255,.78); letter-spacing: .04em; }
.fs-set-count {
    font-size: 9px; color: rgba(255,255,255,.5);
    background: rgba(255,255,255,.08); border-radius: 8px; padding: 1px 5px;
}
.fs-set-del { background: none; border: none; color: rgba(255,255,255,.3); font-size: 13px; line-height: 1; padding: 0 2px; }
.fs-set-del:hover { color: #e05252; }
.fs-sets-save { padding: 10px 12px 6px; }
.fs-set-save-btn {
    width: 100%;
    padding: 7px;
    border-radius: 6px;
    border: 1px dashed var(--accent-alpha-40, rgba(155,92,246,.4));
    background: none;
    color: var(--accent, #9B5CF6);
    font-family: 'DM Mono', monospace;
    font-size: 10px; letter-spacing: .12em;
}
.fs-set-save-btn:hover { background: var(--accent-alpha-10, rgba(155,92,246,.08)); }

.fs-hist-type {
    flex-shrink: 0;
    width: 7px; height: 7px;
    border-radius: 50%;
    margin-top: 5px;
}
.fs-hist-body { min-width: 0; }
.fs-hist-title {
    font-size: 11px;
    color: rgba(255,255,255,.78);
    font-family: 'DM Mono', monospace;
    line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fs-hist-meta {
    font-size: 9px;
    color: rgba(255,255,255,.30);
    letter-spacing: .04em;
    margin-top: 2px;
    text-transform: uppercase;
}

.fs-sheet__header {
    padding: 18px 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
}
.fs-sheet__title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 15px;
    letter-spacing: .18em;
    color: rgba(255,255,255,.75);
}
.fs-sheet__sub {
    font-size: 7px;
    letter-spacing: .20em;
    text-transform: uppercase;
    color: rgba(255,255,255,.25);
}
.fs-sheet__edit {
    position: absolute;
    right: 14px;
    top: 18px;
    font-size: 8px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent-dim, rgba(109,63,212,.8));
    background: none;
    border: 1px solid var(--accent-alpha-20, rgba(155,92,246,.2));
    border-radius: 4px;
    padding: 3px 7px;
    cursor: pointer;
    transition: color 120ms, border-color 120ms;
}
.fs-sheet__edit:hover { color: var(--accent); border-color: var(--accent-alpha-40, rgba(155,92,246,.4)); }

.fs-sheet__list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    scrollbar-width: none;
}
.fs-sheet__list::-webkit-scrollbar { display: none; }

/* Sheet item */
.fs-sheet-item {
    padding: 10px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: background 100ms;
}
.fs-sheet-item:hover { background: rgba(255,255,255,.03); }
.fs-sheet-item.is-active { background: var(--accent-alpha-10, rgba(155,92,246,.06)); }

.fs-sheet-item__num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 8px;
    color: rgba(255,255,255,.35);
    margin-top: 1px;
}
.fs-sheet-item.is-forming .fs-sheet-item__num {
    border-color: var(--accent-alpha-40, rgba(155,92,246,.4));
    color: var(--accent);
    background: var(--accent-alpha-10, rgba(155,92,246,.08));
}

.fs-sheet-item__body { min-width: 0; }
.fs-sheet-item__title {
    font-size: 11px;
    color: rgba(255,255,255,.7);
    font-family: 'DM Mono', monospace;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fs-sheet-item.is-forming .fs-sheet-item__title { color: #f0ece4; }
.fs-sheet-item__meta {
    font-size: 9px;
    color: rgba(255,255,255,.28);
    letter-spacing: .04em;
    margin-top: 2px;
}

/* Sheet items for the brief-forming state */
.fs-sheet-placeholder {
    padding: 8px 16px;
    font-size: 10px;
    color: rgba(255,255,255,.15);
    letter-spacing: .06em;
    font-family: 'DM Mono', monospace;
}

/* ── Generate Button ───────────────────────────────────────────────────────── */
.fs-sheet__footer {
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(255,255,255,.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fs-generate-btn {
    width: 100%;
    padding: 14px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    color: rgba(255,255,255,.3);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 15px;
    letter-spacing: .22em;
    cursor: default;
    transition:
          background 200ms cubic-bezier(0.16,1,0.3,1),
          border-color 200ms,
          color 200ms,
          box-shadow 200ms;
}

.fs-generate-btn.is-armed {
    background: linear-gradient(135deg, hsl(265 64% 60%) 0%, hsl(286 60% 54%) 35%, hsl(28 82% 58%) 100%);
    border-color: transparent;
    color: #08080a;
    cursor: pointer;
    box-shadow: 0 0 28px var(--accent-alpha-20, rgba(155,92,246,.25)), inset 0 1px 0 rgba(255,255,255,.25);
}
.fs-generate-btn.is-armed:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 32px var(--accent-alpha-40, rgba(155,92,246,.35)), inset 0 1px 0 rgba(255,255,255,.30);
}
.fs-generate-btn:not(.is-armed):disabled { opacity: 1; }

/* Record = primary (keeps the gradient). Campaign = secondary outline so the
   two distinct actions read clearly. */
#fsGenerateBtn.is-armed {
    background: var(--accent-alpha-10, rgba(155,92,246,.10));
    border-color: var(--accent-alpha-40, rgba(155,92,246,.4));
    color: rgba(255,255,255,.88);
    box-shadow: none;
}
#fsGenerateBtn.is-armed:hover {
    transform: none;
    background: var(--accent-alpha-20, rgba(155,92,246,.18));
    box-shadow: none;
}

.fs-sheet__note {
    font-size: 7px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255,255,255,.18);
    text-align: center;
    line-height: 1.4;
}

/* ── Brief View ────────────────────────────────────────────────────────────── */
.fs-brief {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 40px 48px 24px;
    max-width: 820px;
}

/* Watch It Build button */
.fs-watch-btn {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: none;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    color: rgba(255,255,255,.4);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 24px;
    transition: color 120ms, border-color 120ms;
}
.fs-watch-btn:hover { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.25); }
.fs-watch-btn__icon { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Chat questions */
.fs-q {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 260ms ease, transform 260ms ease;
}
.fs-q.is-visible { opacity: 1; transform: translateY(0); }
.fs-q.is-done { opacity: .45; }

.fs-q__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: 2px solid rgba(255,255,255,.18);
    flex-shrink: 0;
    margin-top: 6px;
    transition: background 200ms, border-color 200ms;
}
.fs-q.is-active .fs-q__dot {
    background: rgba(201,168,76,.8);
    border-color: #C9A84C;
    box-shadow: 0 0 10px rgba(201,168,76,.4);
}
.fs-q.is-done .fs-q__dot {
    background: rgba(201,168,76,.4);
    border-color: rgba(201,168,76,.6);
}

.fs-q__body { flex: 1; }
.fs-q__label {
    font-size: 8px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    margin-bottom: 4px;
}
.fs-q__text {
    font-size: 22px;
    color: #f0ece4;
    line-height: 1.3;
    margin-bottom: 8px;
}
.fs-q__text em { font-style: normal; color: #C9A84C; }
.fs-q__hint {
    font-size: 12px;
    color: rgba(255,255,255,.3);
    line-height: 1.5;
}

/* Answered value bubble */
.fs-answer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(201,168,76,.10);
    border: 1px solid rgba(201,168,76,.25);
    border-radius: 6px;
    font-size: 12px;
    color: rgba(255,255,255,.7);
    margin-top: 6px;
}
.fs-answer__label {
    font-size: 8px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(201,168,76,.7);
}

/* Topic pill chips */
.fs-topic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.fs-topic-pill {
    padding: 5px 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.45);
    font-size: 11px;
    letter-spacing: .04em;
    cursor: pointer;
    transition: color 120ms, border-color 120ms, background 120ms;
}
.fs-topic-pill:hover { color: #C9A84C; border-color: rgba(201,168,76,.4); background: rgba(201,168,76,.07); }
.fs-topic-pill.is-selected { color: #C9A84C; border-color: rgba(201,168,76,.45); background: rgba(201,168,76,.1); }

/* Input row */
.fs-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.fs-input {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,.14);
    padding: 10px 0;
    font-size: 16px;
    color: #f0ece4;
    outline: none;
    caret-color: #C9A84C;
    transition: border-color 200ms;
}
.fs-input:focus { border-bottom-color: rgba(201,168,76,.6); }
.fs-input::placeholder { color: rgba(255,255,255,.22); }

/* ── Bank View ─────────────────────────────────────────────────────────────── */
.fs-bank {
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fs-bank__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.fs-bank__title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: .18em;
    color: rgba(255,255,255,.7);
}
.fs-bank__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -6px 0 8px;
}

.fs-bank-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    background: rgba(255,255,255,.025);
    cursor: pointer;
    transition: border-color 120ms, background 120ms;
}
.fs-bank-card:hover { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.04); }
.fs-bank-card.is-active { border-color: rgba(201,168,76,.35); background: rgba(201,168,76,.05); }

.fs-bank-card__num {
    font-size: 11px;
    color: rgba(255,255,255,.25);
    margin-top: 2px;
    flex-shrink: 0;
    width: 20px;
}
.fs-bank-card__body { flex: 1; min-width: 0; }
.fs-bank-card__title {
    font-size: 13px;
    color: rgba(255,255,255,.8);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fs-bank-card__meta {
    font-size: 9px;
    color: rgba(255,255,255,.3);
    letter-spacing: .06em;
    display: flex;
    gap: 10px;
}
.fs-bank-card__open {
    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(201,168,76,.5);
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    transition: color 120ms;
}
.fs-bank-card__open:hover { color: #C9A84C; }

/* ── Prompter View ─────────────────────────────────────────────────────────── */
.fs-prompter {
    position: absolute;
    inset: 0;
    background: #08080a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Viewfinder frame corners */
.fs-prompter::before,
.fs-prompter::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 4;
    pointer-events: none;
}
.fs-prompter::before {
    top: 16px; left: 24px;
    border-top: 1px solid rgba(201,168,76,.4);
    border-left: 1px solid rgba(201,168,76,.4);
}
.fs-prompter::after {
    bottom: 80px; right: 24px;
    border-bottom: 1px solid rgba(201,168,76,.4);
    border-right: 1px solid rgba(201,168,76,.4);
}

.fs-prompter__topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 4;
}
.fs-prompter__tabs {
    position: absolute;
    top: 46px;
    left: 24px;
    right: 24px;
    z-index: 4;
    display: flex;
    gap: 8px;
}
.fs-prompter__tab {
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.5);
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 9px;
    letter-spacing: .14em;
    font-family: "DM Mono", monospace;
}
.fs-prompter__tab.is-active {
    border-color: rgba(201,168,76,.45);
    color: #C9A84C;
    background: rgba(201,168,76,.08);
}
.fs-prompter__camera {
    position: absolute;
    inset: 80px 0 236px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
    transition: opacity 140ms;
}
.fs-prompter__camera.is-live { opacity: 1; }
.fs-prompter__camera-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
.fs-prompter__camera-feed.is-unflipped {
    transform: none;
}
.fs-prompter__camera-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.6);
}
.fs-prompter.is-camera-layout-pip .fs-prompter__camera {
    width: 200px;
    height: 150px;
    inset: auto 18px 96px auto;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.fs-prompter.is-camera-layout-pip .fs-prompter__camera-overlay {
    background: rgba(0,0,0,.2);
}
.fs-prompter__rec {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    letter-spacing: .18em;
    color: rgba(255,255,255,.5);
}
.fs-prompter__rec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.3);
    box-shadow: none;
}
/* Only the live recording state shows red + pulses. */
.fs-prompter__rec.is-recording { color: #e05252; }
.fs-prompter__rec.is-recording .fs-prompter__rec-dot {
    background: #e05252;
    box-shadow: 0 0 8px rgba(224,82,82,.6);
    animation: blink-rec 1.2s ease-in-out infinite;
}
.fs-ctrl-btn--voice.is-active {
    color: #38BDF8;
    border-color: rgba(56,189,248,.5);
    background: rgba(56,189,248,.10);
    animation: voicePulse 1.6s ease-in-out infinite;
}
@keyframes voicePulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(56,189,248,.0); }
    50%      { box-shadow: 0 0 0 5px rgba(56,189,248,.15); }
}
.fs-ctrl-btn--play {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.25);
    color: rgba(255,255,255,.9);
}
.fs-ctrl-btn--play.is-active {
    background: rgba(76,175,125,.15);
    border-color: rgba(76,175,125,.5);
    color: #4caf7d;
}
.fs-ctrl-btn--rec.is-active {
    color: #e05252;
    border-color: rgba(224,82,82,.5);
    background: rgba(224,82,82,.12);
}
@keyframes blink-rec {
    0%,100% { opacity: 1; }
    50% { opacity: .3; }
}
.fs-prompter__topic {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
}

/* Script track */
.fs-prompter__track {
    position: absolute;
    inset: 80px 0 236px 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 2;
    /* touch scrolling on iOS */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
.fs-prompter__script {
    padding: 60px 80px 200px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.fs-slot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* cue pins left; label + text stay centered via their own align */
    align-items: flex-start;
    width: 100%;
}
.fs-slot__label {
    font-size: 9px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(201,168,76,.45);
    /* label centers with the text */
    align-self: center;
}
/* Text block stretches to full width so text-align:center on .fs-prompter__script works */
.fs-slot__text { width: 100%; }
/* Batch-record session strip */
.fs-prompter__session {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(155,92,246,.10);
    border-bottom: 1px solid var(--accent-alpha-20, rgba(155,92,246,.2));
}
.fs-session-nav {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--accent-alpha-40, rgba(155,92,246,.4));
    background: rgba(0,0,0,.25);
    color: rgba(255,255,255,.85);
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: .1em;
}
.fs-session-nav:hover:not(:disabled) { background: var(--accent-alpha-20, rgba(155,92,246,.2)); }
.fs-session-nav:disabled { opacity: .3; cursor: default; }
.fs-session-mid { display: flex; flex-direction: column; align-items: center; min-width: 0; gap: 2px; }
.fs-session-count { font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .14em; color: rgba(255,255,255,.55); }
.fs-session-count b { color: var(--accent, #9B5CF6); }
.fs-session-title {
    font-size: 11px;
    color: rgba(255,255,255,.75);
    letter-spacing: .04em;
    max-width: 60vw;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Delivery cue — glance-only, never spoken. Distinct from script text. */
.fs-slot__cue {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;   /* hug the left edge, never stretch */
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: var(--accent, #9B5CF6);
    background: var(--accent-alpha-10, rgba(155,92,246,.10));
    border: 1px solid var(--accent-alpha-40, rgba(155,92,246,.4));
    border-radius: 5px;
    padding: 2px 8px;
    margin-bottom: 2px;
    white-space: nowrap;
}
.fs-prompter__script.cues-off .fs-slot__cue { display: none; }
/* Cue categories — color-coded by emotional tone (internal) */
.fs-slot__cue--warm      { color:#F5C842; background:rgba(245,200,66,.10); border-color:rgba(245,200,66,.40); }
.fs-slot__cue--serious   { color:#e05252; background:rgba(224,82,82,.10);  border-color:rgba(224,82,82,.40); }
.fs-slot__cue--emotional { color:#38BDF8; background:rgba(56,189,248,.10); border-color:rgba(56,189,248,.40); }
.fs-slot__cue--energy    { color:#F97316; background:rgba(249,115,22,.12); border-color:rgba(249,115,22,.45); }

/* FOLLOW mode — speaker-paced: dim all but the active line */
.fs-prompter__script.follow .fs-slot { opacity:.32; transition:opacity .25s ease; }
.fs-prompter__script.follow .fs-slot.is-reading { opacity:1; }
.fs-slot.is-reading .fs-slot__text { text-shadow:0 0 18px var(--accent-alpha-40, rgba(155,92,246,.4)); }

.fs-slot__text {
    font-size: 40px;
    line-height: 1.25;
    color: rgba(255,255,255,.9);
    font-family: 'DM Mono', monospace;
    border-radius: 6px;
    transition: background 120ms, box-shadow 120ms;
}
.fs-slot__text:hover { background: rgba(255,255,255,.03); }
.fs-slot__text:focus {
    outline: none;
    background: rgba(155,92,246,.06);
    box-shadow: inset 0 0 0 1px var(--accent-alpha-40, rgba(155,92,246,.4));
}

/* Controls */
.fs-prompter__controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 24px;
    background: rgba(8,8,10,.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,.07);
}

.fs-ctrl-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.55);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: color 120ms, border-color 120ms, background 120ms;
}
.fs-ctrl-btn:hover { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.25); }
.fs-ctrl-btn.is-active { color: #C9A84C; border-color: rgba(201,168,76,.45); background: rgba(201,168,76,.08); }
.fs-ctrl-btn.is-blocked { color: #e05252; border-color: rgba(224,82,82,.45); background: rgba(224,82,82,.08); }
.fs-ctrl-btn.is-muted { color: rgba(255,255,255,.45); border-color: rgba(255,255,255,.2); }

.fs-ctrl-btn--restart { display: flex; align-items: center; gap: 6px; }
.fs-prompter__camera-msg {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 84px;
    text-align: center;
    font-size: 10px;
    letter-spacing: .04em;
    color: rgba(255,255,255,.72);
    z-index: 4;
    pointer-events: none;
}

.fs-ctrl-group {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    overflow: hidden;
}
.fs-ctrl-group span {
    padding: 8px 12px;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    border-right: 1px solid rgba(255,255,255,.12);
}
.fs-ctrl-group button {
    padding: 8px 14px;
    background: none;
    border: none;
    color: rgba(255,255,255,.55);
    font-size: 14px;
    transition: color 120ms, background 120ms;
}
.fs-ctrl-group button:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.06); }
.fs-ctrl-group button + button { border-left: 1px solid rgba(255,255,255,.08); }

/* Progress dot */
.fs-prompter__progress {
    position: absolute;
    bottom: 238px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    letter-spacing: .12em;
    color: rgba(255,255,255,.2);
}

.fs-prompter__post {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 80px;
    min-height: 156px;
    padding: 10px 16px 12px;
    background: rgba(8,8,10,.92);
    border-top: 1px solid rgba(255,255,255,.07);
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fs-prompter__deliverables {
    position: absolute;
    inset: 80px 0 80px 0;
    overflow: auto;
    padding: 18px 20px 20px;
    background: rgba(8,8,10,.92);
}
.fs-deliverable {
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: rgba(255,255,255,.02);
}
.fs-deliverable__head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 9px;
    letter-spacing: .16em;
    color: rgba(255,255,255,.55);
    margin-bottom: 6px;
}
.fs-deliverable__line {
    font-size: 11px;
    color: rgba(255,255,255,.82);
    line-height: 1.5;
    margin-bottom: 2px;
}
.fs-deliverable-copy {
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.72);
    border-radius: 6px;
    font-size: 9px;
    letter-spacing: .08em;
    padding: 2px 8px;
    cursor: pointer;
}
.fs-deliverable__actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.fs-prompter__post-title {
    font-size: 10px;
    letter-spacing: .16em;
    color: rgba(255,255,255,.5);
}
.fs-prompter__post-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.fs-post-chip {
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.45);
    font-size: 10px;
    font-family: "DM Mono", monospace;
}
.fs-post-chip:disabled {
    opacity: .65;
}
.fs-post-chip.is-selected {
    border-color: rgba(201,168,76,.45);
    color: #C9A84C;
    background: rgba(201,168,76,.08);
}
.fs-prompter__caption {
    width: 100%;
    min-height: 48px;
    resize: vertical;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.9);
    font-size: 11px;
    padding: 8px 10px;
    font-family: "DM Mono", monospace;
    box-sizing: border-box;
}
.fs-prompter__post-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.fs-post-action,
.fs-post-select {
    height: 30px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.82);
    padding: 0 10px;
    font-size: 10px;
    letter-spacing: .11em;
    font-family: "DM Mono", monospace;
}
.fs-post-action {
    cursor: pointer;
}
.fs-post-action--muted {
    color: rgba(255,255,255,.68);
}
.fs-prompter__post-msg {
    min-height: 14px;
    font-size: 10px;
    letter-spacing: .05em;
    color: rgba(255,255,255,.72);
}

/* ── Toast ─────────────────────────────────────────────────────────────────── */
#toastContainer {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }
