/* Try the panel: a mock Premiere (program monitor over a timeline) beside a working replica of the QuickApply panel.
   The replica uses the panel's own look: soft glass cards, pill buttons, icon tabs, a status bar. */
html, body { height: 100%; }
body { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.site-head .wordmark .mark { font-size: 1.5em; }
.site-head { border-bottom: 1px solid var(--line); }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 14px; padding: 14px max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px)); min-height: 0; }

/* ---------- mock Premiere ---------- */
.ppro { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; border-radius: 14px; padding: 10px; background: #101318; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.ppro-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 500 .72rem/1 var(--body); color: #9aa3b5; }
.ppro-bar .seqs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.ppro-bar .seq { padding: 6px 10px; border-radius: 6px 6px 0 0; background: #181c24; white-space: nowrap; }
.ppro-bar .seq.on { color: #fff; background: #222836; box-shadow: inset 0 2px 0 var(--blue-500); }
.monitor { position: relative; min-height: 0; display: grid; place-items: center; background: #000; border-radius: 8px; overflow: hidden; }
.monitor canvas { width: 100%; height: 100%; display: block; }
.mon-ctrl { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; padding: 4px 6px; border-radius: 999px; background: rgba(16, 19, 24, .8); backdrop-filter: blur(8px); }
.mon-ctrl button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: none; color: #dfe5f2; cursor: pointer; font-size: .85rem; }
.mon-ctrl button:hover { background: rgba(255, 255, 255, .1); }
.mon-ctrl .tc { font-family: var(--mono); font-size: .72rem; color: #8bbaff; padding: 0 6px; font-variant-numeric: tabular-nums; }
.tl { position: relative; user-select: none; border-radius: 8px; background: #14171d; padding: 6px 8px 8px 44px; }
.ruler { position: relative; height: 18px; cursor: pointer; border-bottom: 1px solid #262b36; background: repeating-linear-gradient(90deg, #2b3140 0 1px, transparent 1px calc(100% / 30)); }
.ruler .mk { position: absolute; top: 4px; width: 8px; height: 8px; margin-left: -4px; transform: rotate(45deg); background: var(--blue-300); }
.tracks { position: relative; display: grid; gap: 3px; padding-top: 4px; }
.trk { position: relative; height: 30px; border-radius: 4px; background: #191d25; }
.trk.a { height: 34px; }
.trk .lab { position: absolute; left: -38px; top: 50%; transform: translateY(-50%); font: 500 .66rem/1 var(--mono); color: #7d8699; display: flex; gap: 4px; align-items: center; }
.trk.locked .lab::after { content: "🔒"; font-size: .6rem; }
.clip { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; padding: 3px 6px; font: 500 .62rem/1.2 var(--body); color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; transition: left .45s var(--ease), width .45s var(--ease), box-shadow .2s; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.clip.v { background: linear-gradient(180deg, #5b4fd6, #3d33a8); }
.clip.v.graded { background: linear-gradient(180deg, #2e7cff, #1257e6); }
.clip.adj { background: linear-gradient(180deg, #8a8f9c, #5d6270); }
.clip.title { background: linear-gradient(180deg, #c2508f, #8f2e66); }
.clip.lut { background: linear-gradient(180deg, #2a9d8f, #1d6b62); }
.clip.au { background: linear-gradient(180deg, #2f9e61, #1d6b40); }
.clip.mus { background: linear-gradient(180deg, #2a8a8f, #1a5d61); }
.clip.sfx { background: linear-gradient(180deg, #c98d2c, #8a5f17); }
.clip.sel { box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--blue-400); }
.clip .fx { display: inline-block; margin-left: 4px; padding: 0 3px; border-radius: 2px; background: rgba(0, 0, 0, .35); font-size: .55rem; }
.clip .fade-l, .clip .fade-r { position: absolute; top: 0; bottom: 0; width: 10px; pointer-events: none; }
.clip .fade-l { left: 0; background: linear-gradient(135deg, rgba(0, 0, 0, .55) 50%, transparent 50%); }
.clip .fade-r { right: 0; background: linear-gradient(225deg, rgba(0, 0, 0, .55) 50%, transparent 50%); }
.clip .tr { position: absolute; top: 0; bottom: 0; width: 12px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .5) 0 3px, rgba(255, 255, 255, .15) 3px 6px); }
.clip .lvl { position: absolute; right: 4px; bottom: 2px; font-family: var(--mono); font-size: .55rem; color: #d6ffe6; }
.clip .wave { position: absolute; left: 0; right: 0; bottom: 3px; height: 12px; opacity: .5; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .7) 0 1px, transparent 1px 3px); mask: linear-gradient(0deg, #000, transparent); }
.sil { position: absolute; top: 0; bottom: 0; background: rgba(255, 77, 94, .35); box-shadow: inset 0 0 0 1px rgba(255, 77, 94, .8); border-radius: 3px; pointer-events: none; animation: pIn .3s both; }
.gap { position: absolute; top: 6px; bottom: 6px; border: 1px dashed rgba(255, 197, 107, .7); border-radius: 3px; pointer-events: none; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #4f8cff; pointer-events: none; z-index: 3; }
.playhead::before { content: ""; position: absolute; top: -4px; left: -5px; width: 12px; height: 10px; background: #4f8cff; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.tl-hint { font-size: .7rem; color: #7d8699; }
@keyframes pIn { from { opacity: 0; } }

/* ---------- the panel replica ---------- */
.qa { --p-bg: #0b0f1a; --p-card: rgba(23, 30, 47, .72); --p-line: rgba(170, 190, 230, .12); --p-text: #e9edf5; --p-muted: #838da5; --p-field: #0e1422; --p-main: #fff; --p-main-text: #03050b;
    min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; border-radius: 14px; overflow: hidden; color: var(--p-text);
    background: radial-gradient(120% 60% at 50% -10%, rgba(46, 124, 255, .22), transparent 60%), var(--p-bg); box-shadow: inset 0 0 0 1px rgba(170, 190, 230, .16), 0 30px 80px -30px rgba(46, 124, 255, .45); }
.qa.light { --p-bg: #eef2f9; --p-card: rgba(255, 255, 255, .8); --p-line: rgba(30, 50, 90, .12); --p-text: #10172a; --p-muted: #5b6680; --p-field: #fff; --p-main: #03050b; --p-main-text: #fff; background: radial-gradient(120% 60% at 50% -10%, rgba(46, 124, 255, .18), transparent 60%), var(--p-bg); }
.qa-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px; }
.qa-head .logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, #5a9bff, #1257e6); }
.qa-head .logo .mark { color: #fff; width: 18px; height: 18px; }
.qa-head b { font: 600 .95rem/1 var(--display); letter-spacing: -.02em; }
.qa-head b span { color: var(--blue-400); }
.qa-head .sp { flex: 1; }
.qa-head button, .qa-ic { height: 30px; min-width: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--p-line); background: var(--p-card); color: var(--p-text); font: 500 .72rem/1 var(--body); cursor: pointer; }
.qa-head button:disabled { opacity: .4; cursor: default; }
.qa-ctx { margin: 0 12px; padding: 7px 10px; border-radius: 10px; background: var(--p-card); border: 1px solid var(--p-line); font-size: .72rem; color: var(--p-muted); display: flex; align-items: center; gap: 8px; }
.qa-ctx::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(79, 209, 139, .18); }
.qa-tabs { display: flex; gap: 2px; margin: 10px 12px 6px; padding: 3px; border-radius: 999px; background: var(--p-card); border: 1px solid var(--p-line); overflow-x: auto; scrollbar-width: none; }
.qa-tabs button { flex: 1 0 auto; height: 30px; min-width: 32px; padding: 0 8px; display: grid; grid-auto-flow: column; align-items: center; gap: 5px; border: 0; border-radius: 999px; background: none; color: var(--p-muted); cursor: pointer; font: 500 .72rem/1 var(--body); }
.qa-tabs button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qa-tabs button span { display: none; }
.qa-tabs button.on { background: var(--p-main); color: var(--p-main-text); padding: 0 12px; }
.qa-tabs button.on span { display: inline; }
.qa-body { min-height: 0; overflow-y: auto; padding: 4px 12px 12px; display: grid; gap: 8px; align-content: start; scrollbar-width: thin; }
.qa-sec { border-radius: 14px; background: var(--p-card); border: 1px solid var(--p-line); overflow: hidden; animation: pIn .25s both; }
.qa-sec > h4 { margin: 0; display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font: 600 .8rem/1 var(--body); cursor: pointer; }
.qa-sec > h4 small { font: 400 .66rem/1 var(--mono); color: var(--p-muted); }
.qa-sec > div { padding: 0 12px 12px; display: grid; gap: 8px; }
.qa-sec.closed > div { display: none; }
.qa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.qa-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qa-b { min-height: 34px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--p-line); background: var(--p-field); color: var(--p-text); font: 500 .74rem/1.15 var(--body); cursor: pointer; text-align: left; transition: border-color .2s, transform .15s var(--ease), background .2s; }
.qa-b:hover { border-color: var(--blue-400); }
.qa-b:active { transform: scale(.97); }
.qa-b.hero { grid-column: 1 / -1; min-height: 44px; color: #fff; border: 0; background: linear-gradient(135deg, #5a9bff, #1257e6 60%, #0c3fae); }
.qa-b.main { background: var(--p-main); color: var(--p-main-text); border-color: transparent; text-align: center; border-radius: 999px; }
.qa-b.ghost { background: none; text-align: center; border-radius: 999px; }
.qa-b small { display: block; font: 400 .62rem/1.2 var(--mono); color: var(--p-muted); margin-top: 2px; }
.qa-b.hero small { color: rgba(255, 255, 255, .75); }
.qa-in { width: 100%; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--p-line); background: var(--p-field); color: var(--p-text); font: 400 .8rem var(--body); outline: 0; }
.qa-in:focus { border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(46, 124, 255, .2); }
textarea.qa-in { height: 70px; padding: 10px 12px; border-radius: 12px; resize: none; }
.qa-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 220px; overflow-y: auto; }
.qa-list li { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; font-size: .76rem; cursor: pointer; }
.qa-list li:hover, .qa-list li.sel { background: rgba(46, 124, 255, .16); }
.qa-list li .k { margin-left: auto; font: 400 .6rem/1 var(--mono); color: var(--p-muted); text-transform: uppercase; }
.qa-list li .star { color: var(--p-muted); } .qa-list li .star.on { color: var(--amber); }
.qa-seg { display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--p-field); border: 1px solid var(--p-line); }
.qa-seg button { flex: 1; height: 26px; border: 0; border-radius: 999px; background: none; color: var(--p-muted); font: 500 .7rem/1 var(--body); cursor: pointer; }
.qa-seg button.on { background: var(--blue-500); color: #fff; }
.qa-sl { display: grid; gap: 4px; font-size: .72rem; color: var(--p-muted); }
.qa-sl div { display: flex; justify-content: space-between; } .qa-sl output { font-family: var(--mono); color: var(--p-text); }
.qa-sl input { width: 100%; accent-color: var(--blue-500); }
.qa-hint { margin: 0; font-size: .68rem; line-height: 1.45; color: var(--p-muted); }
.qa-plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.qa-plan li { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: center; padding: 7px 9px; border-radius: 9px; background: var(--p-field); border: 1px solid var(--p-line); font-size: .74rem; animation: pIn .3s both; }
.qa-plan li i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--p-muted); }
.qa-plan li.done i { background: var(--blue-500); border-color: var(--blue-500); }
.qa-plan li.run i { border-color: var(--blue-400); border-top-color: transparent; animation: wSpin2 .7s linear infinite; }
.qa-plan li small { font: 400 .6rem/1 var(--mono); color: var(--p-muted); }
@keyframes wSpin2 { to { transform: rotate(360deg); } }
.qa-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.qa-chips button { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--p-line); background: var(--p-field); color: var(--p-text); font: 500 .68rem/1 var(--body); cursor: pointer; }
.qa-chips button.on { border-color: var(--blue-400); background: rgba(46, 124, 255, .25); }
.qa-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.qa-stats div { padding: 8px; border-radius: 9px; background: var(--p-field); border: 1px solid var(--p-line); font-size: .66rem; color: var(--p-muted); }
.qa-stats b { display: block; font: 600 1.1rem/1.1 var(--display); color: var(--p-text); }
.qa-status { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--p-line); font-size: .72rem; color: var(--p-muted); min-height: 36px; }
.qa-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-400); flex: none; }
.qa-status.ok::before { background: var(--ok); } .qa-status.err::before { background: var(--rec); }
.qa-status.flash { animation: flash .6s; }
@keyframes flash { 0% { background: rgba(46, 124, 255, .25); } }
.qa-diag { width: 100%; height: 140px; font: 400 .62rem/1.4 var(--mono); padding: 8px; border-radius: 9px; background: var(--p-field); color: var(--p-text); border: 1px solid var(--p-line); resize: none; }

.intro-strip { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.intro-strip h1 { margin: 0; font: 600 1.25rem/1.1 var(--display); letter-spacing: -.03em; color: var(--white); }
.intro-strip p { margin: 0; font-size: .82rem; color: var(--grey-400); }
.stage { grid-template-rows: auto minmax(0, 1fr); }

@media (max-width: 980px) {
    html, body { height: auto; }
    body { display: block; }
    .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
    .ppro { grid-template-rows: auto auto auto; }
    .monitor { aspect-ratio: 16 / 9; }
    .qa { height: 640px; }
}
@media (max-width: 560px) {
    .tl { padding-left: 34px; }
    .trk .lab { left: -30px; }
}
