/* Halawi Cue: application styles on top of the shared Halawi design system */

/* ---------- shell ---------- */
.mobile-only { display: none !important; }
.content { padding: 18px 22px 48px; scroll-padding-top: 12px; }
.content > .view-host { max-width: 1320px; margin: 0 auto; animation: fadeUp .2s ease both; }
.icon-btn.on { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-line); }
.unit-t { font: 600 12px/1 var(--f-ui); letter-spacing: .02em; }
.sb-backup b .ic { width: 14px; height: 14px; vertical-align: -2px; }
.scrim { display: none; }
.bottomnav { display: none; }
.modal--lg { max-width: 860px; }
#print-host { display: none; }

.sb-new { margin: 4px 0 8px; justify-content: center; }
.sb-count { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-count:empty { display: none; }
.sb-grp { display: flex; align-items: center; justify-content: space-between; }
.sb-grp .icon-btn { width: 24px; height: 24px; }
.sb-folder .fdot { width: 9px; height: 9px; border-radius: 3px; flex: none; margin: 0 4px 0 3px; }
.fdot--none { border: 1.5px dashed var(--dim); }
.sb-folder > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-fm { opacity: 0; width: 24px !important; height: 24px !important; margin-left: 2px; }
.sb-folder:hover .sb-fm, .sb-fm:focus-visible { opacity: 1; }
.sb-folder .sb-count { margin-left: auto; }
.app.sb-collapsed .sb-new span, .app.sb-collapsed .sb-count, .app.sb-collapsed #sbFolders { display: none; }
.app.sb-collapsed .sb-new { padding: 0; width: 40px; margin: 4px auto 8px; }
.tb-logo { display: none; align-items: center; gap: 8px; color: var(--text); font: 600 15px var(--f-ui); text-decoration: none !important; }
.tb-logo .sb-mark { width: 26px; height: 26px; }
.app.is-full { display: block; }
.app.is-full .sidebar, .app.is-full .topbar, .app.is-full .bottomnav, .app.is-full #banners, .app.is-full .scrim { display: none !important; }
.app.is-full .main { height: 100%; }
.app.is-full .content { padding: 0 !important; overflow: hidden; }
.app.is-full .content > .view-host { max-width: none; animation: none; height: 100%; }
.dim { color: var(--muted); }
.grow { flex: 1; }
.r { text-align: right !important; }
kbd { font: 500 11px var(--f-mono); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--glass-2); color: var(--text-2); white-space: nowrap; }
.callout--ok { border-color: rgba(63,182,139,.4); background: rgba(63,182,139,.07); } .callout--ok > .ic { color: var(--ok); }
.callout ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.radio-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; cursor: pointer; }
.radio-row:has(input:checked) { border-color: var(--accent-line); background: var(--accent-bg); }
.radio-row input { margin-top: 4px; accent-color: var(--violet); }
.radio-row span { display: flex; flex-direction: column; }
.radio-row small { color: var(--muted); font-size: 12px; }
.switch em small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.switch:has(em small) { height: auto; min-height: 36px; padding: 4px 0; }
.lnkbtn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; }
.ack a { color: var(--accent); text-decoration: underline; }
.first-run-modal .modal-ft .btn--primary { min-width: 200px; justify-content: center; }

/* ---------- view header ---------- */
/* ---------- view header ---------- */
.view-h { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.vh-t { flex: 1; min-width: 240px; }
.vh-t h1 { font-size: 24px; margin-top: 4px; }
.vh-intro { margin: 6px 0 0; color: var(--text-2); max-width: 760px; font-size: 13.5px; }
.view-h > .acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.panel-hd h3 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.panel-hd h3 .ic { color: var(--accent); }
.panel + .panel, .panel + .grid, .grid + .panel, .kpis + .panel { margin-top: 14px; }

/* ---------- results, tables ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kp { text-align: left; padding: 13px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass); cursor: copy; min-width: 0; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s; }
.kp:hover { border-color: var(--line-3); }
.kp-l { font: 500 10.5px/1.2 var(--f-ui); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.kp-v { font: 600 22px/1.15 var(--f-ui); letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kp-s { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.kp--main { border-color: var(--accent-line); background: linear-gradient(160deg, var(--accent-bg), transparent 70%); }
.kp.ok .kp-v { color: var(--ok); } .kp.warn .kp-v { color: var(--warn); }
.tbl-wrap { overflow-x: auto; max-width: 100%; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl thead th { font: 500 10.5px var(--f-ui); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--glass); position: sticky; top: 0; }
.tbl tbody th { font-weight: 500; }
.tbl tr.on th, .tbl tr.on td { background: var(--accent-bg); }
.tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 0; }
.tbl--compact th, .tbl--compact td { padding: 7px 10px; }
.callout--sm { padding: 10px 12px; font-size: 13px; }
.callout--sm > div { min-width: 0; }
.empty { color: var(--muted); padding: 18px; text-align: center; margin: 0; }
.empty-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); color: var(--muted); text-align: center; }
.empty-card .ic { width: 28px; height: 28px; }
.sm { font-size: 12px; }
.btn--block { width: 100%; justify-content: center; min-height: 42px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
ul.plain { list-style: none; padding: 0; margin: 8px 0 14px; display: flex; flex-direction: column; gap: 6px; }
ul.plain li { display: flex; gap: 8px; align-items: center; }
.ack { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; cursor: pointer; }
.ack input { margin-top: 3px; flex: none; }
.help h4 { font-size: 13px; margin: 14px 0 8px; color: var(--text-2); }
.help h4:first-child { margin-top: 0; }
.help ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }

.kpis--sm { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 10px 0 14px; }
.kpis--sm .kp { cursor: default; padding: 10px; }
.kpis--sm .kp-v { font-size: 18px; }

/* ---------- library ---------- */
.quick { position: relative; margin: 0 0 22px; padding: 26px; border-radius: 20px; border: 1px solid var(--line-2); background: radial-gradient(700px 260px at 0% 0%, rgba(155,61,245,.16), transparent 70%), radial-gradient(600px 260px at 100% 100%, rgba(234,106,90,.10), transparent 70%), var(--glass); overflow: hidden; }
.quick-in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 26px; align-items: center; }
.quick-t h1 { font-size: 34px; line-height: 1.12; margin: 8px 0 10px; letter-spacing: -.02em; }
.quick-t p { margin: 0; color: var(--text-2); font-size: 14.5px; max-width: 520px; }
.quick-box { display: flex; flex-direction: column; gap: 10px; }
.quick-ta { height: auto; min-height: 128px; padding: 12px 14px; font-size: 15px; line-height: 1.5; resize: vertical; border-radius: 12px; }
.quick-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-acts .btn--primary { min-width: 168px; justify-content: center; }
.quick-h { margin: 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.content.over::after, .view-host.over::after { content: 'Drop to import'; position: fixed; inset: 12px; border: 2px dashed var(--accent-line); border-radius: 18px; background: rgba(10,10,12,.7); display: grid; place-items: center; font: 600 20px var(--f-ui); color: var(--text); z-index: 90; pointer-events: none; }
.lib-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.lib-search { flex: 1; min-width: 220px; }
.lib-search .input { height: 38px; }
.lib-sort, .lib-tag { width: auto; height: 38px; }
.lib-view button { padding: 6px 9px; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.sc-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--glass); overflow: hidden; transition: border-color .15s, transform .15s; min-width: 0; }
.sc-card:hover { border-color: var(--line-3); }
.sc-main { display: flex; flex-direction: column; gap: 7px; padding: 14px 15px 10px; border: 0; background: none; text-align: left; cursor: pointer; flex: 1; min-width: 0; }
.sc-top { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.sc-folder { display: inline-flex; align-items: center; gap: 6px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-folder::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--fc, var(--dim)); flex: none; }
.sc-folder--none::before { background: none; border: 1.5px dashed var(--dim); }
.sc-pin .ic { width: 13px; height: 13px; color: var(--accent); }
.sc-time { margin-left: auto; white-space: nowrap; }
.sc-title { font: 600 16px/1.3 var(--f-ui); color: var(--text); overflow-wrap: anywhere; }
.sc-prev { color: var(--text-2); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-target { color: var(--accent); display: inline-flex; gap: 4px; align-items: center; }
.sc-target .ic { width: 12px; height: 12px; }
.sc-tags { display: flex; flex-wrap: wrap; }
.sc-acts { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-top: 1px solid var(--line); background: var(--glass); }
.sc-grid--list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.sc-grid--list .sc-card { flex-direction: row; align-items: center; }
.sc-grid--list .sc-main { flex-direction: row; align-items: center; gap: 14px; padding: 10px 14px; }
.sc-grid--list .sc-prev, .sc-grid--list .sc-tags { display: none; }
.sc-grid--list .sc-top { order: 3; margin-left: auto; }
.sc-grid--list .sc-title { font-size: 14.5px; min-width: 180px; }
.sc-grid--list .sc-acts { border-top: 0; background: none; }
.sc-grid--list .sc-acts .grow { display: none; }
.pledge { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.pledge > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass); }
.pledge .ic { grid-row: span 2; width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }
.pledge b { font: 600 13.5px var(--f-ui); }
.pledge span { font-size: 12.5px; color: var(--muted); }

/* ---------- editor ---------- */
.view-edit .view-host { max-width: 1480px; }
.ed { display: flex; flex-direction: column; gap: 10px; min-height: calc(100dvh - 120px); }
.ed-hd { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ed-title { flex: 1; min-width: 220px; border: 0; background: none; color: var(--text); font: 600 24px/1.2 var(--f-ui); padding: 6px 8px; margin-left: -8px; border-radius: 8px; letter-spacing: -.01em; }
.ed-title:hover { background: var(--glass-2); }
.ed-title:focus { outline: none; background: var(--glass-2); box-shadow: var(--focus); }
.ed-go { display: flex; gap: 6px; align-items: center; }
.ed-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.em { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.em > span .ic { width: 15px; height: 15px; }
.em select { width: auto; max-width: 200px; }
.em-num { width: 70px; text-align: center; }
.em-dur { width: 78px; }
.em em { font-style: normal; }
.em-dir button { padding: 3px 9px; font-size: 12px; }
.em-tags { flex-wrap: wrap; gap: 2px; }
.tag-in { border: 1px dashed var(--line-2); background: none; color: var(--text); border-radius: 6px; height: 24px; width: 92px; padding: 0 7px; font-size: 12px; }
.tag-in:focus { outline: none; border-color: var(--accent-line); }
.ed-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); position: sticky; top: -18px; z-index: 5; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.ed-tools .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.ed-tools .btn--sm { height: 32px; }
.ed-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 12px; flex: 1; min-height: 0; }
.ed-main { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg-2); overflow: hidden; }
.ed-main:focus-within { border-color: var(--accent-line); }
.ed-ta { flex: 1; width: 100%; min-height: 52vh; resize: none; border: 0; background: transparent; color: var(--text); padding: 18px 20px; font: 400 16.5px/1.7 var(--f-data); tab-size: 4; }
.ed-ta:focus { outline: none; }
.ed-foot { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ed-foot b { color: var(--text); font-weight: 600; }
.ed-foot .ic { width: 13px; height: 13px; }
.ed-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ed-tabs { width: 100%; }
.ed-tabs button { flex: 1; justify-content: center; }
.ed-pane { flex: 1; min-height: 0; overflow: auto; max-height: calc(100dvh - 260px); }
.ed-prev { border-radius: var(--r-lg); padding: 18px 20px !important; font-size: 21px; line-height: 1.5; background: var(--pr-bg); color: var(--pr-fg); max-height: none; }
.ed-hint { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; }
.ed-hint .ic { margin-top: 2px; }
.ed-hint code, .legend code { font: 500 12px var(--f-mono); background: var(--glass-3); padding: 1px 5px; border-radius: 4px; color: var(--text); white-space: pre-wrap; }
.tm-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.tm-kpis .kp { cursor: default; }
.tm-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.tm-tbl td, .tm-tbl th { white-space: normal; }
.lvl { display: inline-block; height: 6px; border-radius: 3px; background: var(--grad); vertical-align: middle; }
.spk-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.spk { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.spk b { font: 600 14px var(--f-ui); text-transform: uppercase; letter-spacing: .04em; }
.spk .dim { margin-left: auto; font-size: 12px; }
.ver-pre { white-space: pre-wrap; font: 14px/1.6 var(--f-data); margin: 0; max-height: 60vh; overflow: auto; }
.legend td:first-child { width: 42%; }
.legend td { white-space: normal; }

/* ---------- prompter text (shared by prompter, preview, operator, talent, print) ---------- */
.pr { position: relative; overflow: hidden; background: var(--pr-bg, #000); color: var(--pr-fg, #fff); contain: layout paint; -webkit-user-select: none; user-select: none; }
.pr-mirror { position: absolute; inset: 0; overflow: hidden; transform-origin: 50% 50%; }
.pr-scroll { position: absolute; left: 0; right: 0; top: 0; will-change: transform; backface-visibility: hidden; }
.pr-text { position: relative; margin: 0 auto; overflow-wrap: break-word; word-break: normal; hyphens: manual; text-rendering: optimizeLegibility; font-kerning: normal; }
.pr-text p, .pr-text h2 { margin: 0; }
.pr-text .p-para { margin: 0 0 .62em; }
.pr-text .p-para.has-spk { border-inline-start: .12em solid var(--spk); padding-inline-start: .42em; }
.pr-text .p-spk { display: inline-block; font-size: .44em; line-height: 1.2; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--spk); border: .12em solid var(--spk); border-radius: .4em; padding: .12em .5em; vertical-align: .45em; margin-inline-end: .2em; font-family: var(--f-ui); }
.pr-text .p-sec { font-family: var(--f-ui); font-size: .42em; line-height: 1.3; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .62; margin: 1.6em 0 .9em; display: flex; align-items: center; gap: .8em; }
.pr-text .p-sec::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .5; }
.pr-text .p-sec:first-child { margin-top: 0; }
.pr-text .w.b { font-weight: 800; }
.pr-text .w.i { font-style: italic; }
.pr-text .w.u { text-decoration: underline; text-decoration-thickness: .07em; text-underline-offset: .14em; }
.pr-text .w.hl, .pr-text .p-raw.hl { background: rgba(255, 210, 0, .3); box-shadow: 0 0 0 .06em rgba(255, 210, 0, .3); border-radius: .08em; }
.pr-text .c-red { color: #ff5a5f; } .pr-text .c-orange { color: #ff9a3c; } .pr-text .c-yellow { color: #ffd84a; } .pr-text .c-green { color: #46d68c; } .pr-text .c-blue { color: #5aa9ff; } .pr-text .c-purple { color: #c08bff; } .pr-text .c-pink { color: #ff7ac6; }
.pr[data-theme="bw"] .c-yellow, .ed-prev[style*="#ffffff;"] .c-yellow { color: #a07800; }
.pr-text .w.sl { text-decoration: underline dotted; text-decoration-thickness: .06em; text-underline-offset: .2em; text-decoration-color: rgba(120, 170, 255, .85); }
.pr-text .p-cue { display: inline-flex; align-items: center; gap: .3em; font-family: var(--f-ui); font-size: .4em; line-height: 1; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: .38em .7em; margin: 0 .3em; border-radius: .5em; vertical-align: .35em; border: .14em solid; white-space: nowrap; }
.pr-text .p-cue--pause { color: #ffb020; border-color: #ffb020; background: rgba(255, 176, 32, .12); }
.pr-text .p-cue--breathe { color: #4fc3f7; border-color: #4fc3f7; background: rgba(79, 195, 247, .1); }
.pr-text .p-cue.done { opacity: .45; }
.pr-text .p-pron { font-size: .48em; font-style: italic; opacity: .78; margin: 0 .25em; vertical-align: .15em; letter-spacing: .02em; }
.pr-text .p-pron::before { content: '('; } .pr-text .p-pron::after { content: ')'; }
.pr-text .p-tag { display: inline-block; font-family: var(--f-ui); font-size: .32em; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: .3em .6em; border-radius: .4em; margin: 0 .3em; vertical-align: .55em; }
.pr-text .p-tag--slow { color: #8ab6ff; border: .14em solid #8ab6ff; }
.pr-text .p-tag--end { color: currentColor; opacity: .55; border: .14em solid; }
.pr-text .p-note { font-family: var(--f-ui); font-size: .42em; font-style: italic; color: #58d6b5; margin: 0 0 1em; padding-inline-start: .6em; border-inline-start: .15em solid #58d6b5; }
.pr-text .p-empty { font-size: .5em; opacity: .6; }
.pr.hl-on .w.cur { background: rgba(255, 255, 255, .22); box-shadow: 0 0 0 .08em rgba(255, 255, 255, .22); border-radius: .1em; transition: background .12s; }
.pr[data-theme="bw"].hl-on .w.cur { background: rgba(0, 0, 0, .14); box-shadow: 0 0 0 .08em rgba(0, 0, 0, .14); }
.pr-dim { position: absolute; left: 0; right: 0; background: var(--pr-bg, #000); opacity: var(--pr-dim, .45); pointer-events: none; }
.pr-dim--top { top: 0; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.pr-dim--bot { bottom: 0; -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); }
.pr-line { position: absolute; left: 0; right: 0; height: var(--lh, 60px); transform: translateY(-50%); border-top: 1px solid rgba(234, 106, 90, .38); border-bottom: 1px solid rgba(234, 106, 90, .38); background: rgba(234, 106, 90, .055); pointer-events: none; }
.pr[data-theme="bw"] .pr-line { background: rgba(155, 61, 245, .06); }
.pr.no-line .pr-line { display: none; }
.pr-arrow { position: absolute; left: .6%; width: 0; height: 0; transform: translateY(-50%); border-top: calc(var(--asz, 24px) * .62) solid transparent; border-bottom: calc(var(--asz, 24px) * .62) solid transparent; border-left: var(--asz, 24px) solid #ea6a5a; pointer-events: none; filter: drop-shadow(0 0 6px rgba(0,0,0,.5)); }
.pr[data-dir="rtl"] .pr-arrow { left: auto; right: .6%; border-left: 0; border-right: var(--asz, 24px) solid #ea6a5a; }
.pr.no-arrow .pr-arrow { display: none; }
.pr-count { position: absolute; inset: 0; display: grid; place-items: center; font: 700 min(38vmin, 300px)/1 var(--f-ui); color: var(--pr-fg); background: color-mix(in srgb, var(--pr-bg) 55%, transparent); pointer-events: none; font-variant-numeric: tabular-nums; z-index: 3; }
.pr-count:not(.on), .pr-count:empty { display: none; }
.pr-count.on { animation: countPop 1s ease both; }
@keyframes countPop { 0% { opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: .2; } }
.pr-hold { position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%); padding: 8px 18px; border-radius: 30px; background: rgba(255, 176, 32, .92); color: #111; font: 700 15px var(--f-ui); letter-spacing: .06em; text-transform: uppercase; pointer-events: none; z-index: 3; white-space: nowrap; }
.pr-hold:not(.on), .pr-hold:empty { display: none; }

/* ---------- prompter screen ---------- */
.pv { position: fixed; inset: 0; z-index: 50; background: #000; color: #fff; overflow: hidden; outline: none; touch-action: none; }
.pv-stage { position: absolute; inset: 0; }
.pv-stage .pr { position: absolute; inset: 0; }
.pv.hud-off { cursor: none; }
.pv .hud { position: absolute; left: 0; right: 0; z-index: 10; transition: opacity .35s ease, transform .35s ease; }
.pv.hud-off .hud { opacity: 0; pointer-events: none; }
.pv.hud-off .pv-top { transform: translateY(-8px); } .pv.hud-off .pv-bot { transform: translateY(8px); }
.pv-top { top: 0; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 22px; background: linear-gradient(rgba(0,0,0,.82), rgba(0,0,0,.55) 70%, transparent); }
.pv-bot { bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.78) 28%, rgba(0,0,0,.92)); }
.pv-ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pv-ttl b { font: 600 15px/1.25 var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-ttl small { font-size: 12px; color: rgba(255,255,255,.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1em; }
.pv-times { display: flex; gap: 16px; font-variant-numeric: tabular-nums; }
.pv-times span { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.pv-times em { font: 500 10px var(--f-ui); text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.55); font-style: normal; }
.pv-times b { font: 600 17px var(--f-ui); }
.pv-btn { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .15s, border-color .15s; }
.pv-btn:hover { background: rgba(255,255,255,.16); }
.pv-btn.on { background: rgba(155,61,245,.35); border-color: rgba(180,108,255,.8); }
.pv-btn .ic { width: 20px; height: 20px; }
.pv-mic.on { background: rgba(63,182,139,.35); border-color: #3fb68b; }
.pv-mic.na { opacity: .45; }
.pv-play { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 24px -6px rgba(155,61,245,.7); flex: none; }
.pv-play .ic { width: 28px; height: 28px; }
.pv-play:active { transform: scale(.96); }
.pv-row { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; max-width: 860px; width: 100%; }
.pv-row--main { gap: 12px; }
.pv-speed { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 180px; max-width: 360px; }
.pv-speed input { flex: 1; accent-color: #c84fb4; min-width: 0; height: 30px; }
.pv-speed span { font: 500 13px var(--f-ui); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 72px; }
.pv-speed span b { font-size: 16px; }
.pv-speed span em { font-style: normal; color: rgba(255,255,255,.6); font-size: 11px; display: block; }
.pv-chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font: 500 13px var(--f-ui); white-space: nowrap; }
.pv-chip.on { background: rgba(155,61,245,.35); border-color: rgba(180,108,255,.8); }
.pv-chip .ic { width: 16px; height: 16px; }
.pv-sel { height: 40px; border-radius: 20px; border: 1px solid rgba(255,255,255,.16); background: rgba(20,20,26,.85); color: #fff; padding: 0 10px; font: 500 13px var(--f-ui); }
.pv-prog { position: absolute; left: 0; right: 0; top: 0; height: 5px; z-index: 12; cursor: pointer; background: rgba(255,255,255,.1); }
.pv-prog i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
.pv-prog:hover { height: 9px; }
.pv-voice { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 16px; background: rgba(63,182,139,.18); border: 1px solid rgba(63,182,139,.6); font: 600 12px var(--f-ui); white-space: nowrap; }
.pv-voice i { width: 8px; height: 8px; border-radius: 50%; background: #3fb68b; animation: pulse 1.2s infinite; }
.pv-voice.is-error, .pv-voice.is-denied { background: rgba(239,91,98,.18); border-color: rgba(239,91,98,.6); }
.pv-voice.is-error i, .pv-voice.is-denied i { background: #ef5b62; animation: none; }
.pv-voice.is-installing, .pv-voice.is-starting { background: rgba(232,163,61,.18); border-color: rgba(232,163,61,.6); }
.pv-voice.is-installing i, .pv-voice.is-starting i { background: #e8a33d; }
.pv-voice[hidden], .pv-recstate[hidden] { display: none; }
.pv-recstate { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 16px; background: rgba(239,40,50,.9); font: 700 12px var(--f-ui); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.pv-recdot { position: absolute; z-index: 6; right: 14px; top: calc(44% + 14px); display: none; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; background: rgba(239,40,50,.88); color: #fff; font: 700 11px var(--f-ui); letter-spacing: .06em; font-variant-numeric: tabular-nums; pointer-events: none; }
.pv-recdot i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1s infinite; }
.pv.is-rec.hud-off .pv-recdot { display: inline-flex; }
.pv-recstate i { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: pulse 1s infinite; }
.pv-flash { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 20; padding: 12px 22px; border-radius: 14px; background: rgba(10,10,12,.86); border: 1px solid rgba(255,255,255,.16); font: 600 18px var(--f-ui); pointer-events: none; opacity: 0; white-space: nowrap; }
.pv-flash.on { animation: flash 1.1s ease forwards; }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%, -40%); } 15% { opacity: 1; transform: translate(-50%, -50%); } 70% { opacity: 1; } 100% { opacity: 0; } }
.pv-sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 100%); z-index: 30; background: rgba(13,13,17,.97); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; color: var(--text); box-shadow: -20px 0 50px rgba(0,0,0,.5); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: slideIn .2s ease both; }
.pv-sheet[hidden] { display: none; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.pv-sheet-hd { display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 14px 12px; border-bottom: 1px solid var(--line); }
.pv-sheet-hd b { font: 600 15px var(--f-ui); }
.pv-sheet-hd .icon-btn { margin-left: auto; }
.pv-sheet-bd { flex: 1; overflow: auto; padding: 12px 14px calc(20px + env(safe-area-inset-bottom)); }
.pv.sheet-on .pv-bot { right: min(400px, 100%); }
.pv-end { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; background: rgba(5,5,8,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 20px; }
.pv-end[hidden] { display: none; }
.pv-end-in { max-width: 560px; width: 100%; text-align: center; color: var(--text); }
.pv-end-in h2 { font-size: 46px; margin: 8px 0; font-variant-numeric: tabular-nums; }
.pv-end-in h2 small { display: block; font-size: 15px; color: var(--muted); font-weight: 500; margin-top: 4px; }
.pv-end-in p { color: var(--text-2); }
.pv-end-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
/* record mode: words sit at the top, close to the lens, over the camera preview */
.pv-cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.pv-cam.mirror { transform: scaleX(-1); }
.pv--rec .pv-stage { top: 0; bottom: auto; height: 44%; }
.pv--rec .pv-stage .pr { background: color-mix(in srgb, var(--pr-bg) 74%, transparent); }
.pv--rec .pv-stage .pr-dim { display: none; }
.pv--rec .pv-top { top: 44%; background: linear-gradient(rgba(0,0,0,.55), transparent); padding-top: 10px; }
.pv--rec .pv-prog { top: 44%; height: 3px; }
.pv-camerr { position: absolute; left: 50%; top: 62%; transform: translate(-50%, -50%); z-index: 9; max-width: 440px; width: calc(100% - 32px); display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; padding: 18px; border-radius: 14px; background: rgba(13,13,17,.92); border: 1px solid rgba(239,91,98,.5); }
.pv-camerr[hidden] { display: none; }
.pv-camerr span { color: var(--text-2); font-size: 13px; }
.pv-rec { width: 64px; height: 64px; border-radius: 50%; border: 3px solid #fff; background: transparent; display: grid; place-items: center; cursor: pointer; flex: none; padding: 0; }
.pv-rec i { width: 46px; height: 46px; border-radius: 50%; background: #e5303b; transition: all .2s ease; }
.pv.is-rec .pv-rec i { width: 24px; height: 24px; border-radius: 6px; }
.pv-row--rec { gap: 10px; font-size: 12.5px; color: rgba(255,255,255,.8); }
.pv-meter { width: 120px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; flex: none; }
.pv-meter i { display: block; height: 100%; background: linear-gradient(90deg, #3fb68b 0%, #3fb68b 70%, #e8a33d 85%, #ef5b62 100%); transform-origin: 0 50%; transform: scaleX(0); }
.pv-recinfo { font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
body.prompting #toasts { bottom: 50%; }

/* ---------- prompter settings form ---------- */
.pf-form { display: flex; flex-direction: column; gap: 8px; }
.pf-grp { border: 1px solid var(--line); border-radius: 12px; background: var(--glass); overflow: hidden; }
.pf-grp summary { display: flex; align-items: center; gap: 9px; padding: 11px 13px; cursor: pointer; list-style: none; font: 500 13.5px var(--f-ui); }
.pf-grp summary::-webkit-details-marker { display: none; }
.pf-grp summary .ic { color: var(--accent); }
.pf-grp summary .pf-chev { margin-left: auto; color: var(--muted); transition: transform .2s; }
.pf-grp[open] summary .pf-chev { transform: rotate(180deg); }
.pf-bd { display: flex; flex-direction: column; gap: 12px; padding: 4px 13px 14px; }
.pf { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pf-l { display: flex; justify-content: space-between; gap: 8px; font: 500 12px var(--f-ui); color: var(--text-2); }
.pf-l output { color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 400; }
.pf-h { font-size: 11.5px; color: var(--muted); line-height: 1.4; margin: 0; }
.pf--range input { width: 100%; accent-color: var(--violet); height: 26px; }
.pf--sw { flex-direction: row; }
.pf-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pf-quick { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.pf-quick .pf-h { display: flex; gap: 6px; align-items: center; }
.pf-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.seg--fill { display: flex; width: 100%; }
.seg--fill button { flex: 1; justify-content: center; }
.theme-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.theme-pick button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--glass); cursor: pointer; font-size: 11px; color: var(--text-2); }
.theme-pick button.on { border-color: var(--accent-line); background: var(--accent-bg); color: var(--text); }
.theme-pick i { display: grid; place-items: center; width: 100%; height: 34px; border-radius: 6px; font: 700 16px var(--f-ui); font-style: normal; border: 1px solid var(--line-2); }

/* ---------- operator console ---------- */
.op-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.4fr) minmax(260px, .7fr); gap: 12px; align-items: start; }
.op-ed { display: flex; flex-direction: column; min-height: 520px; }
.op-ta { min-height: 420px; font-size: 14.5px; padding: 14px; }
.op-mid { display: flex; flex-direction: column; }
.op-prev-wrap { padding: 12px; background: #050507; }
.op-prev { position: relative; width: 100%; height: 300px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.op-prog { height: 5px; background: var(--glass-3); cursor: pointer; }
.op-prog i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
.op-ctl { display: flex; gap: 10px; justify-content: center; align-items: center; padding: 14px 12px 6px; }
.op-ctl .pv-btn, .op-speed .pv-btn { background: var(--glass-2); border-color: var(--line-2); color: var(--text); }
.op-ctl .pv-btn.on { background: rgba(63,182,139,.25); border-color: var(--ok); }
.op-speed { display: flex; gap: 10px; align-items: center; padding: 6px 14px; }
.op-speed input { flex: 1; min-width: 0; accent-color: var(--violet); }
.op-speed span { min-width: 0; flex: 0 1 auto; white-space: nowrap; font-size: 13px; font-variant-numeric: tabular-nums; }
.op-speed span em { font-style: normal; color: var(--muted); font-size: 11px; display: block; }
.op-times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 8px 14px 14px; font-variant-numeric: tabular-nums; }
.op-times span { display: flex; flex-direction: column; min-width: 0; }
.op-times em { font: 500 10px var(--f-ui); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-style: normal; }
.op-times b { font: 600 17px var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-side { display: flex; flex-direction: column; gap: 12px; }
.op-side .panel + .panel { margin-top: 0; }
.op-status { display: flex; align-items: center; gap: 8px; font: 500 13.5px var(--f-ui); }
.op-status i { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); }
.op-status.on i { background: var(--ok); box-shadow: 0 0 0 4px rgba(63,182,139,.18); }
.op-secs { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
.op-secs li button { width: 100%; display: flex; gap: 8px; align-items: center; text-align: left; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; font-size: 13px; }
.op-secs li button:hover { background: var(--glass-2); }
.op-secs li.on button { background: var(--accent-bg); }
.op-secs small { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
#opPrefs .pf-grp { background: none; }

/* ---------- analytics ---------- */
.an-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.an-main { min-width: 0; }
.an-main > .panel, .an-main > .grid { margin-top: 14px; }
.an-side { display: flex; flex-direction: column; gap: 14px; }
.an-side .panel + .panel { margin-top: 0; }
.ch { width: 100%; height: auto; display: block; font-family: var(--f-data); }
.ch-grid { stroke: var(--line); }
.ch-t { fill: var(--muted); font-size: 11px; }
.ch-pause { opacity: .12; }
.ch-leg { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.ch-leg i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.an-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.an-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.an-list li:last-child { border-bottom: 0; }
.an-list em { color: var(--muted); font-size: 12.5px; flex-basis: 100%; overflow-wrap: anywhere; }
.run-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.run-list li { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 14px; border-bottom: 1px solid var(--line); }
.run-list li.on { background: var(--accent-bg); }
.run-list li > button:not(.icon-btn) { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; border: 0; background: none; cursor: pointer; padding: 4px 0; }
.run-list b { font-weight: 500; font-size: 13px; }
.run-list small { color: var(--muted); font-size: 11.5px; }
.run-list input { accent-color: var(--violet); width: 16px; height: 16px; }
.srt-prev { margin: 10px 0 0; padding: 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); font: 12px/1.5 var(--f-mono); color: var(--text-2); white-space: pre-wrap; max-height: 220px; overflow: auto; }

/* ---------- takes ---------- */
.storage { padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--glass); margin-bottom: 14px; }
.storage .bar { margin-top: 10px; }
.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tk { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--glass); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.tk video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; display: block; }
.tk-bd { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tk-bd b { font: 600 14px var(--f-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-bd small { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tk-acts { display: flex; gap: 6px; padding: 0 12px 12px; flex-wrap: wrap; align-items: center; }
.tk-acts .icon-btn { margin-left: auto; }
.tk-player { width: 100%; max-height: 62vh; background: #000; border-radius: 10px; display: block; }
.tk-info { margin-top: 10px; }
.take-modal .callout { margin-top: 12px; }
.tk-list { list-style: none; margin: 0; padding: 0; }
.tk-list li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tk-li-t { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.tk-li-t small { color: var(--muted); font-size: 12px; }

/* ---------- remote ---------- */
.rm-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 14px; align-items: start; }
.rm-key { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 140px; border-radius: 14px; border: 1px dashed var(--line-2); background: var(--bg-2); text-align: center; padding: 14px; }
.rm-key b { font: 700 34px var(--f-ui); letter-spacing: -.01em; }
.rm-key span { color: var(--muted); font-size: 13px; }
.rm-key.hit { animation: hit .5s ease; border-style: solid; border-color: var(--accent-line); }
@keyframes hit { 0% { background: var(--accent-bg); transform: scale(.985); } 100% { background: var(--bg-2); transform: none; } }
.rm-log { list-style: none; margin: 10px 0 0; padding: 0; font-size: 12.5px; }
.rm-log li { display: flex; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line); }
.rm-log em { margin-left: auto; color: var(--dim); font-style: normal; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.rm-map td { white-space: normal; }
.rm-keys { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.rm-keys .chip { height: 26px; }
.rm-keys kbd { border: 0; background: none; padding: 0; }
.rm-map tr.flash th, .rm-map tr.flash td { animation: rowflash 1s ease; }
@keyframes rowflash { 0% { background: rgba(155,61,245,.3); } 100% { background: transparent; } }
.rm-wait { animation: pulse 1s infinite; }

/* ---------- settings and help ---------- */
.st-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.st-side { display: flex; flex-direction: column; gap: 14px; }
.st-side .panel + .panel { margin-top: 0; }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.help-grid .panel + .panel { margin-top: 0; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.sup th { width: 30%; white-space: normal; vertical-align: top; }
.sup td { white-space: normal; color: var(--text-2); }

/* ---------- desktop sizes ---------- */
@media (max-width: 1360px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  .op-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .quick-in { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ed-body { grid-template-columns: minmax(0, 1fr); }
  .ed-pane { max-height: none; }
  .an-grid, .st-grid { grid-template-columns: minmax(0, 1fr); }
  .rm-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rm-last { grid-column: 1 / -1; }
  .op-grid { grid-template-columns: minmax(0, 1fr); }
  .op-side { grid-template-columns: minmax(0, 1fr); display: flex; }
  .help-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- mobile: one handed, large targets ---------- */
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 284px; max-width: 86vw; z-index: 180; transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .app.sb-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 170; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .app.sb-open .scrim { opacity: 1; pointer-events: auto; }
  .app.sb-collapsed .sb-name, .app.sb-collapsed .sb-proj .t, .app.sb-collapsed .sb-link span, .app.sb-collapsed .sb-backup, .app.sb-collapsed .sb-legal, .app.sb-collapsed .sb-logo img { display: revert; }
  .app.sb-collapsed .sb-grp { display: block; height: auto; padding: 14px 10px 6px; }
  .app.sb-collapsed .sb-link { justify-content: flex-start; padding: 7px 10px; }
  .sb-link { min-height: 44px; }
  .sb-close { margin-left: auto; }
  .mobile-only { display: inline-grid !important; }
  .desk-only { display: none !important; }
  .cmdk-btn { display: none; }
  .crumbs { min-width: 0; overflow: hidden; }
  .crumbs a, .crumbs .sep { display: none; }
  .crumbs b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .save-ind span { display: none; }
  .save-ind { padding: 6px 4px; }
  .topbar { gap: 2px; padding: 0 6px; }
  .topbar .icon-btn { width: 40px; height: 40px; }
  .content { padding: 12px 12px calc(88px + env(safe-area-inset-bottom)); }
  .bottomnav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg-1) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line-2); }
  .bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border: 0; background: none; border-radius: 10px; color: var(--muted); font: 500 11px var(--f-ui); text-decoration: none !important; cursor: pointer; }
  .bottomnav .ic { width: 22px; height: 22px; }
  .bottomnav .on { color: var(--accent); background: var(--accent-bg); }
  .view-h { margin-bottom: 10px; gap: 10px; }
  .vh-t { min-width: 0; flex-basis: 100%; }
  .vh-t h1 { font-size: 20px; }
  .vh-intro { font-size: 12.5px; }
  .view-h > .acts { width: 100%; }
  .kpis { gap: 8px; }
  .kp { padding: 10px 11px; gap: 2px; }
  .kp-v { font-size: 18px; }
  .kp--main .kp-v { font-size: 20px; }
  .kp-s { font-size: 11px; }
  .panel-hd { padding: 11px 13px; }
  .panel-bd { padding: 13px; }
  .tbl th, .tbl td { padding: 9px 9px; }
  .modal-wrap { padding: 8px; align-items: flex-end; }
  .modal { max-height: calc(100dvh - 16px); border-radius: 16px; }
  .modal-ft { flex-wrap: wrap; }
  .modal-ft .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
  .kbd-grid { grid-template-columns: minmax(0, 1fr); }
  .banner { padding: 8px 12px; font-size: 12.5px; }
  .banner .acts { margin-left: 0; }
  .ctx-i { min-height: 44px; }
  #toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .tb-logo { display: inline-flex !important; margin-left: 2px; }
  .sb-fm { opacity: 1; }
  .quick { padding: 18px 16px; margin: 0 0 16px; border-radius: 16px; }
  .quick-t h1 { font-size: 26px; }
  .quick-t p { font-size: 13.5px; }
  .quick-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-acts .btn { justify-content: center; min-width: 0; padding: 0 10px; }
  .quick-acts .btn--primary { grid-column: 1 / -1; }
  .lib-search { min-width: 0; flex-basis: 100%; }
  .lib-sort, .lib-tag { flex: 1; min-width: 0; }
  .sc-grid { grid-template-columns: minmax(0, 1fr); }
  .sc-grid--list .sc-main { flex-direction: column; align-items: stretch; gap: 4px; }
  .sc-grid--list .sc-card { flex-direction: column; align-items: stretch; }
  .sc-grid--list .sc-title { min-width: 0; }
  .sc-grid--list .sc-top { order: 0; margin-left: 0; }
  .pledge { grid-template-columns: minmax(0, 1fr); }
  .ed-title { font-size: 19px; min-width: 0; flex-basis: 100%; }
  .ed-go { width: 100%; }
  .ed-go .btn { flex: 1; justify-content: center; padding: 0 8px; }
  .ed-go .btn .t { display: none; }
  .ed-go .btn--primary { flex: 2; }
  .ed-meta { gap: 6px; }
  .em select { max-width: 140px; }
  .ed-tools { top: -12px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .ed-tools::-webkit-scrollbar { display: none; }
  .ed-tools .btn--sm { flex: none; }
  .ed-tools .icon-btn { flex: none; }
  .ed-ta { min-height: 46vh; padding: 14px; font-size: 16px; }
  .pv-top { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .pv-times { gap: 10px; }
  .pv-times b { font-size: 14px; }
  .pv-times .pv-eta { display: none; }
  .pv-ttl b { font-size: 13.5px; }
  .pv-btn { width: 42px; height: 42px; }
  .pv-row--main { gap: 10px; }
  .pv-row--speed { gap: 6px; }
  .pv-speed { order: -1; flex-basis: 100%; max-width: none; }
  .pv-chip span { display: none; }
  .pv-chip { padding: 0 11px; }
  .pv-voice span { display: none; }
  .pv.sheet-on .pv-bot { right: 0; display: none; }
  .pv-meter { width: 70px; }
  .pv-end-in h2 { font-size: 36px; }
  .op-times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-ed { min-height: 0; }
  .op-ta { min-height: 240px; }
  .rm-grid { grid-template-columns: minmax(0, 1fr); }
  .rm-map th { white-space: normal; }
  .kpis--sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-grid { grid-template-columns: minmax(0, 1fr); }
  .help-grid .kbd-grid { grid-template-columns: minmax(0, 1fr); }
  .tbl th, .tbl td { white-space: normal; }
}
@media (max-width: 400px) {
  .pv-times span:nth-child(1) { display: none; }
  .quick-t h1 { font-size: 24px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .pv-bot { padding-top: 12px; gap: 4px; }
  .pv-top { padding-bottom: 10px; }
  .pv-play, .pv-rec { width: 52px; height: 52px; }
  .pv-row--speed .pv-speed { order: 0; flex-basis: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ---------- print: script as PDF ---------- */
@media print {
  @page { size: A4; margin: 16mm 16mm 18mm; }
  :root, html[data-theme] { color-scheme: light !important; }
  html, body { height: auto; overflow: visible; background: #fff !important; color: #000 !important; }
  body::before { display: none !important; }
  body.printing .app, body.printing #modals, body.printing #toasts, body.printing .boot, body.printing .cmdk, body.printing .ctx { display: none !important; }
  body.printing #print-host { display: block !important; }
  .print-doc header { border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 18px; }
  .print-doc h1 { font: 600 20pt/1.2 'Lexend', Arial, sans-serif; color: #000; }
  .print-doc header p { margin: 4px 0 0; font: 9pt 'Inter', Arial, sans-serif; color: #444; }
  .print-doc footer { margin-top: 18px; border-top: 1px solid #999; padding-top: 6px; font: 8pt 'Inter', Arial, sans-serif; color: #555; }
  .pr-print { font-size: 15pt; line-height: 1.55; color: #000; padding: 0 !important; }
  .pr-print .p-para { break-inside: avoid; }
  .pr-print .p-sec { opacity: 1; color: #333; break-after: avoid; }
  .pr-print .w.hl { background: #fff3a8 !important; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pr-print .p-cue--pause { color: #a35a00; border-color: #a35a00; background: none; }
  .pr-print .p-cue--breathe { color: #0b6c99; border-color: #0b6c99; background: none; }
  .pr-print .c-yellow { color: #8a6a00; }
  .pr-print .p-note { color: #1c7a63; }
}
