.prompter{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#000;color:#f5f2ea;overflow:hidden}
.prompter::backdrop{background:#000}
.prompter-text{position:absolute;left:max(9vw,env(safe-area-inset-left));right:max(9vw,env(safe-area-inset-right));top:32dvh;height:33dvh;overflow-y:auto;overscroll-behavior-y:auto;padding:0 4px .6em;line-height:1.35;font-weight:600;outline:1px solid rgba(255,255,255,.14);outline-offset:6px;border-radius:4px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
/* Christopher 2026-10-11: scrolling stops at the last line (no empty band-height below it),
   and the system's own rubber band (iOS bounce, Android stretch) shows at both ends. */
.prompter-text::-webkit-scrollbar{display:none}
.prompter-text h2{font-size:.5em;opacity:.55;margin:0 0 1em}
.prompter-text p{margin:0;white-space:pre-wrap}
.prompter-bar{position:absolute;left:0;right:0;bottom:0;display:flex;gap:4px;justify-content:center;align-items:center;padding:10px 8px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(transparent,rgba(0,0,0,.92) 35%)}
.prompter-bar button{font:inherit;font-size:18px;flex:1 1 0;max-width:64px;min-width:0;min-height:48px;padding:0;border:1px solid rgba(255,255,255,.25);border-radius:12px;background:rgba(255,255,255,.08);color:#f5f2ea;cursor:pointer}
.prompter-bar .prompter-play{flex:1.8 1 0;max-width:120px;background:#f5f2ea;color:#000;font-weight:700;font-size:16px;white-space:nowrap}
.prompter-bar output{font:inherit;font-size:12px;line-height:1.15;min-width:2ch;text-align:center;opacity:.8;display:grid}
.prompter-bar output b{font-size:17px}
.prompter-bar button:focus-visible{outline:2px solid #f5f2ea;outline-offset:2px}
.prompter-fade{-webkit-mask-image:linear-gradient(transparent,#000 22%);mask-image:linear-gradient(transparent,#000 22%)}
.prompter-count{position:absolute;inset:0;display:grid;place-items:center;font-size:30vmin;font-weight:700;color:#f5f2ea;background:rgba(0,0,0,.55);pointer-events:none}
.prompter-sheet{position:absolute;left:8px;right:8px;bottom:calc(76px + env(safe-area-inset-bottom));max-height:60dvh;overflow-y:auto;padding:12px 14px;border:1px solid rgba(255,255,255,.14);border-radius:18px;background:rgba(24,24,24,.96);display:grid;gap:10px}
.prompter-sheet[hidden]{display:none}
.prompter-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:15px}
.prompter-seg{display:flex;gap:4px;padding:3px;border-radius:12px;background:rgba(255,255,255,.07)}
.prompter-seg button{font:inherit;font-size:14px;min-width:44px;min-height:40px;padding:0 10px;border:0;border-radius:9px;background:transparent;color:#f5f2ea;opacity:.65;cursor:pointer}
.prompter-seg button[aria-pressed="true"]{background:rgba(255,255,255,.2);opacity:1;font-weight:700}
.prompter-seg button:focus-visible{outline:2px solid #f5f2ea;outline-offset:1px}
.prompter-cam{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}
/* The canvas is the saved frame, shown whole (letterboxed) so the preview is the take. Its black box hides the video. */
canvas.prompter-cam{object-fit:contain}
.prompter:not(.prompter-live) .prompter-cam{display:none}
.prompter-live .prompter-text{outline-color:rgba(255,255,255,.3);text-shadow:0 1px 3px #000,0 0 14px rgba(0,0,0,.85)}
.prompter-recording .prompter-bar .prompter-play{background:#e5484d;color:#fff}
.prompter-recording::before{content:'● REC';position:absolute;z-index:1;top:calc(12px + env(safe-area-inset-top));left:16px;padding:4px 10px;border-radius:999px;background:#e5484d;color:#fff;font-size:13px;font-weight:700}
.prompter-note{position:absolute;z-index:2;left:16px;right:16px;top:calc(48px + env(safe-area-inset-top));margin:0;padding:10px 12px;border-radius:12px;background:rgba(0,0,0,.82);font-size:15px;text-align:center}
.prompter-note[hidden]{display:none}
.prompter-next{position:absolute;z-index:3;left:8px;right:8px;bottom:calc(76px + env(safe-area-inset-bottom));display:grid;grid-template-columns:auto 1fr;gap:8px;padding:14px;border:1px solid rgba(255,255,255,.14);border-radius:18px;background:rgba(24,24,24,.96)}
.prompter-next[hidden]{display:none}
.prompter-next-info{grid-column:1/-1;margin:0 0 2px;font-size:15px;color:#f5f2ea;opacity:.85}
.prompter-next button{font:inherit;font-size:16px;min-height:52px;padding:0 16px;border:1px solid rgba(255,255,255,.25);border-radius:12px;background:rgba(255,255,255,.08);color:#f5f2ea;cursor:pointer}
.prompter-next .prompter-next-go{background:#f5f2ea;color:#000;font-weight:700;border-color:#f5f2ea}
.prompter-next button:disabled{opacity:.6}
.prompter-next button:focus-visible{outline:2px solid #f5f2ea;outline-offset:2px}
.prompter-camtoggle{position:absolute;z-index:3;top:calc(10px + env(safe-area-inset-top));right:12px;width:48px;height:48px;border:1px solid rgba(255,255,255,.25);border-radius:50%;background:rgba(0,0,0,.45);font-size:20px;line-height:1;cursor:pointer;opacity:.55}
.prompter-camtoggle[aria-pressed="true"]{opacity:1;border-color:#f5f2ea}
.prompter-camtoggle:focus-visible{outline:2px solid #f5f2ea;outline-offset:2px}
.prompter-cam[hidden]{display:none}
.prompter-zoom{position:absolute;z-index:3;top:calc(66px + env(safe-area-inset-top));right:12px;display:flex;flex-direction:column;align-items:center;gap:4px;padding:4px;border:1px solid rgba(255,255,255,.2);border-radius:24px;background:rgba(0,0,0,.45)}
.prompter:not(.prompter-live) .prompter-zoom{display:none}
.prompter-zoom button{width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:#f5f2ea;font:inherit;font-size:22px;line-height:1;cursor:pointer}
.prompter-zoom button:focus-visible{outline:2px solid #f5f2ea;outline-offset:1px}
.prompter-zoom output{font:inherit;font-size:13px;font-weight:700;color:#f5f2ea}

@media(min-width:768px){
 .prompter-next,.prompter-sheet{box-sizing:border-box;left:50%;right:auto;width:min(560px,calc(100% - 32px));transform:translateX(-50%)}
 .prompter-bar{box-sizing:border-box;left:50%;right:auto;width:min(560px,calc(100% - 32px));transform:translateX(-50%);border-radius:18px 18px 0 0}
}

.prompter-front video.prompter-cam{transform:scaleX(-1)}
.prompter-camswitch{position:absolute;z-index:3;top:calc(10px + env(safe-area-inset-top));right:68px;width:48px;height:48px;border:1px solid rgba(255,255,255,.25);border-radius:50%;background:rgba(0,0,0,.65);color:#f5f2ea;font:24px system-ui;cursor:pointer}
.prompter-camswitch[hidden]{display:none}
.prompter-camswitch:disabled{opacity:.4;cursor:default}
.prompter-camswitch:focus-visible{outline:2px solid #f5f2ea;outline-offset:2px}
.prompter-camswitch[aria-expanded="true"]{background:rgba(255,255,255,.28);border-color:#f5f2ea}
/* Camera menu (Christopher 2026-10-15): a see-through list that grows out of its button, like an iOS menu.
   The tint keeps white text over 4.5:1 even over a white wall. */
.prompter-cammenu{box-sizing:border-box;position:absolute;z-index:5;top:calc(64px + env(safe-area-inset-top));right:12px;display:flex;flex-direction:column;width:max-content;min-width:220px;max-width:calc(100% - 24px);max-height:calc(100dvh - 160px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;padding:6px;border:1px solid rgba(255,255,255,.2);border-radius:16px;background:rgba(28,28,30,.62);-webkit-backdrop-filter:blur(28px) saturate(170%);backdrop-filter:blur(28px) saturate(170%);box-shadow:0 18px 50px rgba(0,0,0,.45);transform-origin:calc(100% - 80px) -10px;animation:prompter-menu-in .24s cubic-bezier(.2,.9,.25,1)}
.prompter-cammenu[hidden]{display:none}
.prompter-cammenu button{display:flex;align-items:center;gap:8px;box-sizing:border-box;min-height:48px;padding:0 14px 0 10px;border:0;border-radius:10px;background:transparent;color:#fff;font:600 16px/1.25 system-ui;letter-spacing:.01em;text-align:left;cursor:pointer}
/* A fixed width, not a flex-basis: WebKit sizes the menu from the check's content width and wraps long names. */
.prompter-cammenu button::before{content:'';flex:none;width:20px;text-align:center}
.prompter-cammenu button[aria-current="true"]::before{content:'✓'}
.prompter-cammenu button:active{background:rgba(255,255,255,.18)}
.prompter-cammenu button:focus-visible{outline:2px solid #f5f2ea;outline-offset:-2px}
.prompter-cammenu:not([hidden])~.prompter-zoom{display:none}
@keyframes prompter-menu-in{from{opacity:0;transform:scale(.9)}}
@keyframes prompter-fade-in{from{opacity:0}}
@media (prefers-reduced-motion:reduce){.prompter-cammenu{animation:prompter-fade-in .15s ease-out}}
@media (prefers-reduced-transparency:reduce){.prompter-cammenu{background:#1c1c1e;-webkit-backdrop-filter:none;backdrop-filter:none}}
.prompter-size{display:block;margin-top:2px;font-size:12px;color:#bbb}
.prompter-camera-choice{flex-wrap:wrap}
.prompter-camera-choice select{box-sizing:border-box;width:100%;min-width:0;height:48px;padding:10px;border:1px solid rgba(255,255,255,.25);border-radius:10px;background:#181818;color:#f5f2ea;font:16px system-ui}
.prompter-camera-choice select:focus-visible{outline:2px solid #f5f2ea;outline-offset:2px}
/* Save takes to: the label on its own line, then where takes go and the folder buttons. */
.prompter-save{flex-wrap:wrap;justify-content:flex-start}
.prompter-save>span{flex-basis:100%}
.prompter-save p{flex:1 1 12em;margin:0;font-size:14px;line-height:1.4;color:#bbb}
.prompter-save button{min-height:44px;padding:0 14px;border:1px solid rgba(255,255,255,.25);border-radius:10px;background:rgba(255,255,255,.08);color:#f5f2ea;font:inherit;font-size:14px;cursor:pointer}
.prompter-save button[hidden]{display:none}
.prompter-save button:focus-visible{outline:2px solid #f5f2ea;outline-offset:2px}

.prompter-scriptnav{position:absolute;z-index:4;top:calc(10px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));display:flex;gap:4px}
.prompter-scriptnav button{width:44px;height:48px;border:1px solid rgba(255,255,255,.25);border-radius:12px;background:rgba(0,0,0,.75);color:#f5f2ea;font:26px system-ui;cursor:pointer}
.prompter-scriptnav button:disabled{opacity:.4;cursor:default}
/* Five buttons (✕ ☰ ‹ › Edit) end left of the camera buttons at 375px wide. */
.prompter-scriptnav [data-p="edit"]{width:auto;min-width:44px;padding:0 8px;font-size:14px}
.prompter-scriptnav button:focus-visible,.prompter-scriptlist button:focus-visible{outline:2px solid #f5f2ea;outline-offset:2px}
.prompter-scriptlist{box-sizing:border-box;position:absolute;z-index:4;top:calc(68px + env(safe-area-inset-top));bottom:calc(80px + env(safe-area-inset-bottom));left:12px;width:min(420px,calc(100% - 24px));overflow-y:auto;padding:16px;border:1px solid rgba(255,255,255,.25);border-radius:18px;background:rgba(18,18,18,.98);-webkit-overflow-scrolling:touch}
.prompter-scriptlist[hidden]{display:none}
.prompter-scriptlist h2{margin:0 0 8px;font-size:20px}
.prompter-scriptlist p{margin:0 0 14px;font-size:14px;color:#bbb}
.prompter-scriptlist button{display:block;width:100%;min-height:56px;margin:8px 0;padding:14px;text-align:left;white-space:normal;border:1px solid rgba(255,255,255,.2);border-radius:12px;background:#242424;color:#f5f2ea;font:16px/1.4 system-ui;cursor:pointer}
.prompter-scriptlist button[aria-current="true"]{border-color:#f5f2ea;background:#383838;font-weight:700}
.prompter-scriptlist button:disabled{opacity:.6;cursor:default}
.prompter-recording::before{top:calc(70px + env(safe-area-inset-top))}

/* Emphasis colours (paintEmphasis): stress 10.4:1 and pivot 9.9:1 on black, over 5:1 on mid-grey video. */
.prompter-text .pe-stress{color:#f2a47c}
.prompter-text .pe-pivot{color:#b8a6ff}
/* Zoom sits over the sheet's right-hand buttons (A+, Wider) on short screens. */
.prompter-sheet:not([hidden])~.prompter-zoom{display:none}
/* Landscape phone: a reading band 60% of the height between compact control rows. The fixed top
   overrides the saved Position (portrait eye-line), so that stepper is hidden here. */
@media (orientation:landscape) and (max-height:500px){
 .prompter-text{top:calc(58px + env(safe-area-inset-top))!important;height:60dvh}
 .prompter-row:has([data-p="up"]){display:none}
 .prompter-bar{padding-top:6px;padding-bottom:calc(6px + env(safe-area-inset-bottom))}
 .prompter-bar button{min-height:44px}
 .prompter-scriptnav,.prompter-camtoggle,.prompter-camswitch{top:calc(6px + env(safe-area-inset-top))}
 .prompter-scriptnav button,.prompter-camtoggle,.prompter-camswitch{height:44px}
 .prompter-camtoggle,.prompter-camswitch{width:44px}
 .prompter-camswitch{right:62px}
 .prompter-zoom{top:calc(56px + env(safe-area-inset-top))}
 .prompter-sheet,.prompter-next{bottom:calc(62px + env(safe-area-inset-bottom));max-height:calc(100dvh - 118px - env(safe-area-inset-bottom))}
 .prompter-scriptlist{top:calc(56px + env(safe-area-inset-top));bottom:calc(62px + env(safe-area-inset-bottom))}
 .prompter-recording::before{top:calc(16px + env(safe-area-inset-top));left:auto;right:118px}
 .prompter-cammenu{top:calc(56px + env(safe-area-inset-top));max-height:calc(100dvh - 118px - env(safe-area-inset-bottom))}
}

/* Desktop settings leave the reading surface visible; the saved canvas size stays unchanged. */
.prompter-stage{position:absolute;inset:0}
.prompter-settings-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.prompter-settings-head button{min-height:44px;padding:0 14px;border:1px solid #666;border-radius:10px;background:#282828;color:#fff;font:inherit;cursor:pointer}
.prompter-effects-help{margin:4px 0;font-size:13px;line-height:1.5;color:#ccc}
@media(min-width:768px){
 .prompter-sheet{left:auto;right:12px;top:76px;bottom:90px;width:340px;max-height:none;transform:none;align-content:start;overscroll-behavior:contain}
 .prompter-sheet .prompter-row{flex-wrap:wrap}
 .prompter-settings-open .prompter-stage{right:372px}
 .prompter-settings-toggle{position:absolute;right:124px;top:calc(10px + env(safe-area-inset-top));width:48px;height:48px;border:1px solid #666;border-radius:12px;background:#242424;color:#fff;font:24px system-ui;cursor:pointer}
}

.prompter-settings-toggle{z-index:4}
.prompter-settings-toggle:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media(max-width:767px){
 .prompter-settings-toggle{position:absolute;right:12px;top:calc(10px + env(safe-area-inset-top));width:48px;height:48px;border:1px solid #666;border-radius:12px;background:#242424;color:#fff;font:24px system-ui;z-index:4}
 .prompter-camtoggle,.prompter-camswitch{top:calc(66px + env(safe-area-inset-top))}
 .prompter-zoom{top:calc(122px + env(safe-area-inset-top))}
 .prompter-cammenu{top:calc(120px + env(safe-area-inset-top));max-height:calc(100dvh - 216px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
}

.prompter-bar button[hidden]{display:none}
.prompter-bar [data-p="pause"]{max-width:90px;font-size:15px}
.prompter-paused::before{content:'Ⅱ PAUSED';background:#8b5c00}
.prompter-review{box-sizing:border-box;width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:20px;border:1px solid #555;border-radius:18px;background:#181818;color:#f5f2ea;font:16px/1.4 system-ui}
.prompter-review::backdrop{background:rgba(0,0,0,.8)}
.prompter-review h2{margin:0 0 12px;font-size:22px}
.prompter-review video{display:block;width:100%;max-height:55dvh;background:#000}
.prompter-review>div{display:flex;gap:8px;flex-wrap:wrap}
.prompter-review button{min-height:48px;padding:10px 16px;border:1px solid #666;border-radius:10px;background:#282828;color:#fff;font:inherit;cursor:pointer}
.prompter-review button:first-child{background:#f5f2ea;color:#000;font-weight:700}
.prompter-review button:focus-visible{outline:2px solid #fff;outline-offset:2px}

@media(max-width:767px) and (orientation:portrait){.prompter-recording::before{left:72px}}

.prompter-review progress{display:block;width:100%;height:12px;margin-top:16px;accent-color:#8db49a}
.prompter-review progress[hidden],.prompter-review button[hidden]{display:none}
