/* Safe Zone Kit · live demo. The page runs at any size; the editors are a fixed
   1280 × 800 desktop mapped onto the display in room.jpg (see place() in sz.js). */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0a0908; color: #ddd; overflow: hidden;
  font: 12px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }
button, select, input { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid #4da3ff; outline-offset: 1px; }

/* ---------- top bar ---------- */
.bar { height: 52px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 18px; background: #0a0908; position: relative; z-index: 2; }
.bar__brand { justify-self: start; display: flex; align-items: center; gap: 9px; color: #fff3e8; text-decoration: none;
  font: 800 15px/1 "Archivo", Arial, sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.bar__brand img { border-radius: 6px; }
.bar__switch { margin: 0 auto; display: flex; padding: 3px; gap: 3px; background: #1b1918; border: 1px solid #2c2926; border-radius: 999px; }
.bar__switch button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; cursor: pointer;
  color: #a9a29c; font-size: 13px; font-weight: 600; }
.bar__switch button span { font-weight: 400; opacity: .7; margin-left: 4px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.bar__switch button[aria-selected="true"] { background: #ed1c24; color: #fff; }
.bar__switch button:hover:not([aria-selected="true"]) { color: #fff; }
.bar__get { color: #0b0b0b; background: #ffeddf; text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 6px; font-size: 13px; }
.bar__get:hover { background: #fff; }

/* ---------- the room ---------- */
.stage { position: relative; margin: 0 auto; aspect-ratio: 2048 / 1280;
  width: min(100vw, calc((100vh - 52px) * 1.6)); overflow: hidden; }
.stage__room { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; }
.screen { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; transform-origin: 0 0; overflow: hidden; background: #111; }
.app { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
.app[hidden] { display: none; }
.lights { display: inline-flex; gap: 7px; margin-right: 10px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.tc { font-variant-numeric: tabular-nums; }

/* shared viewer */
.mon { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #000; position: relative; }
.frame { position: relative; background: #000; overflow: hidden; }
.frame video, .frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.frame video { object-fit: cover; }

/* shared controls */
.grp__h { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; padding: 6px 4px; cursor: pointer; text-align: left; }
.grp__h .tw { width: 0; height: 0; border: 4px solid transparent; border-left: 5px solid currentColor; transform-origin: 2px 4px; transition: transform .12s; }
.grp__h[aria-expanded="true"] .tw { transform: rotate(90deg); }
.row { display: flex; align-items: center; }
input[type=range] { -webkit-appearance: none; appearance: none; background: none; height: 16px; margin: 0; cursor: pointer; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ================= editor 1: graphics template panel ================= */
.pp { background: #101010; color: #b9b9b9; font-size: 11.5px; }
.pp__title { height: 34px; flex: none; display: flex; align-items: center; padding: 0 12px; background: #1c1c1c; border-bottom: 1px solid #000; position: relative; }
.pp__ws { display: flex; gap: 18px; margin-left: 30px; font-size: 13px; }
.pp__ws .on { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.pp__doc { position: absolute; left: 50%; transform: translateX(-50%); color: #ddd; font-size: 12.5px; }
.pp__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 352px; grid-template-rows: 1fr 236px; gap: 4px; padding: 4px; }
.pp__panel { background: #1d1d1d; border-radius: 4px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.pp__ph { height: 30px; flex: none; display: flex; align-items: center; gap: 16px; padding: 0 12px; border-bottom: 1px solid #141414; color: #9a9a9a; }
.pp__ph .on { color: #e6e6e6; text-decoration: underline; text-underline-offset: 5px; }
.pp__ph .menu { margin-left: -10px; }
.pp__mon { grid-row: 1; }
.pp__mon .mon { margin: 0 0 0; background: #0d0d0d; }
.pp__monbar { height: 64px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 14px; flex-wrap: wrap; }
.pp__monbar .tc { color: #3d8ff0; font-size: 15px; }
.pp__monbar .dur { margin-left: auto; color: #e6e6e6; font-size: 14px; }
.pp__monbar .drop { border: 1px solid #333; border-radius: 3px; padding: 2px 22px 2px 7px; position: relative; }
.pp__monbar .drop::after { content: "⌄"; position: absolute; right: 6px; top: -1px; }
.pp__transport { display: flex; gap: 16px; margin: 0 auto; color: #c9c9c9; font-style: normal; }
.pp__transport i { font-style: normal; } .pp__transport .play { color: #fff; }
.pp__eg { grid-row: 1 / span 2; grid-column: 2; }
.pp__egtabs { display: flex; margin: 10px 12px 6px; background: #151515; border-radius: 4px; padding: 2px; }
.pp__egtabs span { flex: 1; text-align: center; padding: 4px; border-radius: 3px; }
.pp__egtabs .on { background: #333; color: #eee; }
.pp__layer { display: flex; align-items: center; gap: 8px; margin: 4px 12px 8px; padding: 7px 8px; background: #262626; border-radius: 3px; color: #ddd; }
.pp__layer .ico { width: 14px; height: 12px; border: 1.5px solid #c47ad8; border-radius: 2px; }
.pp__ctl { flex: 1; overflow: auto; padding: 0 10px 16px 8px; scrollbar-width: thin; scrollbar-color: #444 transparent; }
.pp .grp__h { color: #d6d6d6; font-weight: 600; font-size: 11.5px; }
.pp .grp.brand > .grp__h { color: #fff; letter-spacing: .03em; }
.pp .grp__b { padding-left: 10px; }
.pp .row.ck { gap: 8px; padding: 5px 4px; cursor: pointer; }
.pp .row.ck input { accent-color: #3d8ff0; width: 13px; height: 13px; margin: 0; }
.pp .row.sl, .pp .row.se { flex-direction: column; align-items: stretch; padding: 4px 4px 6px; gap: 3px; }
.pp .lab { display: flex; align-items: center; gap: 6px; color: #b9b9b9; }
.pp .sw { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.pp .ctl { display: flex; align-items: center; gap: 10px; }
.pp .ctl input[type=range] { flex: 1; }
.pp input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #3d8ff0 var(--p, 0%), #444 var(--p, 0%)); }
.pp input[type=range]::-moz-range-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #3d8ff0 var(--p, 0%), #444 var(--p, 0%)); }
.pp input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%; background: #e8e8e8; margin-top: -4px; border: 0; }
.pp input[type=range]::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: #e8e8e8; border: 0; }
.pp .num { width: 44px; text-align: right; border: 0; background: none; color: #3d8ff0; padding: 1px 2px; }
.pp .num:hover, .pp .num:focus { background: #151515; }
.pp select { width: 100%; background: #262626; border: 1px solid #333; border-radius: 3px; padding: 4px 6px; color: #ddd; }
.pp__tl { grid-row: 2; grid-column: 1; position: relative; }
.pp__seqs { height: 30px; flex: none; display: flex; align-items: stretch; gap: 2px; padding: 0 8px; border-bottom: 1px solid #141414; }
.pp__seqs button { border: 0; background: none; padding: 0 12px; color: #8d8d8d; cursor: pointer; font-size: 11.5px; display: flex; align-items: center; gap: 6px; }
.pp__seqs button::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: #3a7a3a; }
.pp__seqs button[aria-selected="true"] { color: #eee; text-decoration: underline; text-underline-offset: 5px; }
.pp__seqs button:hover { color: #ddd; }
.pp__tlbar { height: 26px; display: flex; align-items: center; gap: 12px; padding: 0 12px; }
.pp__tlbar .tc { color: #3d8ff0; font-size: 13px; width: 108px; }
.ruler { flex: 1; height: 10px; background: repeating-linear-gradient(90deg, #555 0 1px, transparent 1px 12px); opacity: .7; }
.pp__tracks { flex: 1; position: relative; padding: 2px 0; }
.trk { height: 30px; display: flex; align-items: center; border-bottom: 1px solid #161616; }
.trk b { width: 120px; flex: none; padding-left: 70px; font-weight: 500; color: #aaa; }
.pp .trk b.tgt { color: #fff; }
.trk span { flex: 1; height: 100%; position: relative; }
.trk i { position: absolute; top: 3px; bottom: 3px; left: 2px; width: 46%; font-style: normal; padding: 3px 6px; overflow: hidden; white-space: nowrap; color: #fff; font-size: 10.5px; border-radius: 2px; }
.pp .clip-g { background: #c34fa5; } .pp .clip-v { background: #7d2f9c; } .pp .clip-a { background: #2f7a53; }
.playhead { position: absolute; top: 0; bottom: 0; left: calc(120px + 18%); width: 1px; background: #3d8ff0; }
.pp__tl .playhead { top: 0; }

/* ================= editor 2: title Inspector ================= */
.rv { background: #1c1c20; color: #c7c7c7; font-size: 11.5px; }
.rv__top { height: 40px; flex: none; display: flex; align-items: center; gap: 22px; padding: 0 12px; background: #28282d; border-bottom: 1px solid #111; }
.rv__tb { color: #c9c9c9; } .rv__tb.on { color: #fff; }
.rv__doc { margin: 0 auto; color: #fff; font-weight: 600; font-size: 13px; } .rv__doc em { font-style: normal; color: #888; font-weight: 400; margin-left: 6px; }
.rv__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px 1fr 410px; grid-template-rows: 1fr 250px; gap: 1px; background: #0f0f12; }
.rv__lib { grid-row: 1 / span 2; background: #222226; display: flex; flex-direction: column; }
.rv__pool { display: flex; height: 46%; border-bottom: 1px solid #111; }
.rv__bins { width: 96px; padding: 10px 8px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid #111; }
.rv__bins .on { background: #33333a; padding: 3px 6px; border-radius: 3px; color: #fff; }
.rv__thumbs { flex: 1; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; align-content: flex-start; }
.rv__thumbs figure { margin: 0; width: 80px; text-align: center; color: #999; font-size: 10.5px; }
.rv__thumbs img, .rv__thumbs .ttl span { display: block; width: 80px; height: 45px; object-fit: cover; border-radius: 3px; border: 1.5px solid #e2513a; }
.rv__thumbs .ttl span { background: #000; border-color: transparent; }
.rv__thumbs figcaption { margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv__fx { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.rv__search { background: #18181b; border-radius: 3px; padding: 5px 8px; color: #ddd; }
.rv__fx ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: #aaa; }
.rv__fx li.h { color: #ddd; }
.rv__fxlist { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.rv__fxlist span { display: flex; align-items: center; gap: 8px; border: 1px solid #555; border-radius: 3px; padding: 5px 8px; color: #ddd; }
.rv__fxlist i { width: 26px; height: 16px; background: #fff3e8; border: 3px solid #ed1c24; border-radius: 2px; }
.rv__viewer { background: #1e1e22; display: flex; flex-direction: column; min-height: 0; }
.rv__vh { height: 34px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.rv__vh .tc { color: #ddd; }
.rv__tlsel select { background: none; border: 0; color: #e8e8e8; font-weight: 600; cursor: pointer; padding: 3px 4px; }
.rv__tlsel select option { background: #222; }
.rv__viewer .mon { background: #1e1e22; margin: 0 10px; }
.rv__transport { height: 46px; flex: none; display: flex; justify-content: center; align-items: center; gap: 22px; color: #ccc; }
.rv__transport i { font-style: normal; }
.rv__insp { background: #222226; display: flex; flex-direction: column; min-height: 0; }
.rv__ih { height: 34px; flex: none; display: flex; align-items: center; padding: 0 12px; color: #ddd; }
.rv__ih b { margin-right: 4px; }
.rv__itabs { display: flex; justify-content: space-around; padding: 6px 0; border-bottom: 1px solid #111; color: #777; }
.rv__itabs .on { color: #e8e8e8; border-bottom: 2px solid #e2513a; padding-bottom: 4px; }
.rv__sub { display: flex; margin: 8px 10px; border: 1px solid #333; border-radius: 3px; }
.rv__sub span { flex: 1; text-align: center; padding: 4px; color: #888; } .rv__sub .on { background: #2e2e33; color: #eee; }
.rv__ctl { flex: 1; overflow: auto; padding: 0 8px 18px; scrollbar-width: thin; scrollbar-color: #444 transparent; }
.rv__brand { text-align: center; color: #fff3e8; font: 700 11px/1 "Barlow Semi Condensed", Arial, sans-serif; letter-spacing: .08em; padding: 8px 0 10px; border-bottom: 1px solid #2c2c31; margin-bottom: 4px; }
.rv .grp { border-top: 1px solid #2c2c31; }
.rv .grp__h { color: #ddd; padding: 7px 4px; }
.rv .grp.nest .grp__h { color: #bbb; padding-left: 26px; }
.rv .row { gap: 8px; padding: 3px 2px; min-height: 25px; }
.rv .lab { width: 138px; flex: none; text-align: right; color: #b6b6b6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv .ctl { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.rv .ctl input[type=range] { flex: 1; min-width: 0; }
.rv input[type=range]::-webkit-slider-runnable-track { height: 2px; background: #4a4a50; }
.rv input[type=range]::-moz-range-track { height: 2px; background: #4a4a50; }
.rv input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: #c9c9c9; margin-top: -4px; border: 0; }
.rv input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: #c9c9c9; border: 0; }
.rv .num { width: 54px; background: #18181b; border: 1px solid #2b2b30; border-radius: 3px; color: #e8e8e8; text-align: right; padding: 2px 5px; }
.rv select { flex: 1; min-width: 0; background: #18181b; border: 1px solid #2b2b30; border-radius: 3px; color: #e8e8e8; padding: 3px 5px; }
.rv input[type=color] { width: 54px; height: 18px; border: 1px solid #2b2b30; padding: 0; background: none; cursor: pointer; }
.rv .kf { width: 7px; height: 7px; background: #777; transform: rotate(45deg); flex: none; margin: 0 4px; }
.rv__tl { grid-column: 2 / span 2; background: #1e1e22; position: relative; display: flex; flex-direction: column; }
.rv__tlh { height: 40px; display: flex; align-items: center; gap: 14px; padding: 0 14px; }
.rv__tlh .tc { color: #eee; font-size: 18px; width: 110px; }
.rv .trk { border-bottom: 1px solid #18181b; height: 40px; }
.rv .trk b { width: 138px; padding-left: 90px; color: #e2513a; }
.rv .trk i { width: 34%; border-radius: 3px; top: 4px; bottom: 4px; color: #1a1a1a; padding-top: 12px; }
.rv .clip-t { background: #c9b28f; } .rv .clip-v { background: #6c86a8; color: #fff !important; } .rv .clip-a { background: #3b7a5a; }
.rv__tl .playhead { left: calc(138px + 9%); background: #e2513a; }
.rv__pages { height: 30px; flex: none; display: flex; justify-content: center; gap: 70px; align-items: center; background: #1a1a1d; border-top: 1px solid #0f0f12; }
.rv__pages i { width: 14px; height: 12px; border: 1.5px solid #888; border-radius: 2px; }
.rv__pages i.on { border-color: #e2513a; }
