/* Music Video Creator – editor styles (platform colours: dark greys, one orange accent) */
:root {
  --bg: #0d0f13;
  --bg2: #111317;
  --panel: #15181d;
  --panel2: #1a1e24;
  --panel3: #20252c;
  --line: #262b33;
  --line2: #323944;
  --text: #e7eaef;
  --muted: #9aa3ae;
  --dim: #6b7480;
  --accent: #ff5707;
  --accent-text: #ff7a3d;
  --accent-soft: rgba(255, 87, 7, .14);
  --on-accent: #140800;
  --danger: #ff3b6b;
  --warn: #ffd23f;
  --ok: #3ddc84;
  --r: 8px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.4 var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
[hidden] { display: none !important; }
.ic { flex: none; display: block; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ------------------------------------------------------------------ layout */
.app {
  height: 100vh; display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 344px;
  grid-template-rows: 50px minmax(0, 1fr) 218px 26px;
  grid-template-areas: "top top top" "left stage right" "tl tl right" "status status status";
}
.top { grid-area: top; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--bg2); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255, 87, 7, .35); position: relative; z-index: 3; min-width: 0; }
.left { grid-area: left; display: flex; flex-direction: column; min-height: 0; background: var(--panel); border-right: 1px solid var(--line); }
.stage { grid-area: stage; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #08090b; position: relative; }
.right { grid-area: right; min-height: 0; background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.timeline { grid-area: tl; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg2); border-top: 1px solid var(--line); }
.status { grid-area: status; display: flex; align-items: center; gap: 14px; padding: 0 12px; background: var(--bg2); border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; }
.status a { color: var(--muted); text-decoration: none; }
.status a:hover { color: var(--accent-text); }
.status .ok { color: #9fe3bd; }
.status .warn { color: var(--warn); }
.status #caps { display: inline-flex; gap: 6px; align-items: center; }
.saved { transition: color .3s; }
.saved.flash { color: var(--muted); }
.grow { flex: 1; }

/* ------------------------------------------------------------------ header */
.exit { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line2); white-space: nowrap; font-size: 12.5px; }
.exit:hover { color: var(--text); border-color: var(--accent); }
.brand { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 14px; letter-spacing: .01em; }
.brand .mark { filter: drop-shadow(0 0 8px rgba(255, 87, 7, .45)); }
.proj-name { min-width: 80px; width: 210px; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 6px 8px; color: var(--muted); }
.proj-name:hover { border-color: var(--line2); }
.proj-name:focus { outline: none; border-color: var(--accent); color: var(--text); background: var(--panel); }
.tb { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.tsep { width: 1px; height: 22px; background: var(--line2); margin: 0 6px; }
.tbtn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.tbtn:hover { background: var(--panel2); color: var(--text); }
.top .export { margin-left: 8px; }

/* ------------------------------------------------------------------ buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 13px; border-radius: 7px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s, box-shadow .15s; }
.btn:hover { border-color: #46505d; background: var(--panel3); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { background: #ff6a24; border-color: #ff6a24; box-shadow: 0 0 18px rgba(255, 87, 7, .45); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--panel3); color: var(--text); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.sm { width: 26px; height: 26px; border-radius: 6px; }
.icon-btn.on { color: var(--accent-text); background: var(--accent-soft); }
.icon-btn.ghost { opacity: .55; }
.icon-btn.ghost:hover { opacity: 1; color: var(--danger); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=text], input[type=number], select, textarea { background: var(--bg); border: 1px solid var(--line2); border-radius: 6px; padding: 5px 7px; min-width: 0; }
input[type=text]:focus, input[type=number]:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
select { cursor: pointer; padding-right: 4px; }
select option, select optgroup { background: var(--panel); color: var(--text); }
textarea { resize: vertical; width: 100%; line-height: 1.4; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { opacity: .4; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 18px; background: transparent; cursor: pointer; min-width: 40px; --p: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) var(--p), #2b313a var(--p)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: #2b313a; }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #f3f4f6; border: 3px solid var(--accent); box-shadow: 0 0 0 3px rgba(0, 0, 0, .35); }
input[type=range]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: #f3f4f6; border: 3px solid var(--accent); }
input[type=range]:disabled { opacity: .35; }
input[type=color] { -webkit-appearance: none; appearance: none; width: 30px; height: 26px; padding: 0; border: 1px solid var(--line2); border-radius: 6px; background: none; cursor: pointer; flex: none; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 4px; }
input[type=color]::-moz-color-swatch { border: 0; border-radius: 4px; }
.switch { -webkit-appearance: none; appearance: none; width: 32px; height: 18px; border-radius: 9px; background: #2b313a; position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; border: 0; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #c9ced6; transition: transform .15s, background .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(14px); background: var(--on-accent); }

/* ------------------------------------------------------------------ panels */
.panel { display: flex; flex-direction: column; min-height: 0; }
.players { flex: 1 1 58%; border-bottom: 1px solid var(--line); }
.pmedia { flex: 1 1 42%; }
.phead { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px; }
.phead h2, .msub { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.llist { list-style: none; margin: 0; padding: 0 6px 10px; overflow-y: auto; flex: 1; position: relative; }
.litem { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 7px; cursor: pointer; margin-bottom: 2px; border: 1px solid transparent; position: relative; }
.litem:hover { background: var(--panel2); }
.litem.sel { background: var(--panel3); border-color: #3a424e; }
.litem.sel::before { content: ""; position: absolute; left: -6px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--accent); }
.litem.pseudo { padding: 7px 8px; }
.litem.pseudo + .litem:not(.pseudo) { margin-top: 8px; }
.litem.hid .lname, .litem.hid .lic { opacity: .4; }
.litem.dragging { opacity: .5; }
.lic { display: inline-flex; color: var(--accent-text); flex: none; }
.lic.big { width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent-soft); }
.lname { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lname b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lname small { color: var(--dim); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grip { color: var(--dim); cursor: grab; display: inline-flex; touch-action: none; }
.litem .icon-btn.ghost { visibility: hidden; }
.litem:hover .icon-btn.ghost, .litem.sel .icon-btn.ghost { visibility: visible; }
.llist .empty { color: var(--dim); padding: 12px 10px; list-style: none; }
.drop-line { position: absolute; left: 8px; right: 8px; height: 2px; background: var(--accent); border-radius: 1px; pointer-events: none; }
.rename { flex: 1; min-width: 0; padding: 3px 6px; }

.media { overflow-y: auto; padding: 0 12px 12px; flex: 1; }
.song { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); }
.song.none { border-style: dashed; }
.msub { margin: 14px 0 8px; }
.msub.big { font-size: 12px; margin: 20px 0 10px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.thumb { aspect-ratio: 1; border-radius: 7px; border: 1px solid var(--line2); background: var(--bg) center / cover no-repeat; cursor: pointer; position: relative; padding: 0; color: var(--muted); }
.thumb:hover { border-color: var(--accent); }
.thumb.add { display: flex; align-items: center; justify-content: center; border-style: dashed; }
.thumb .tag { position: absolute; left: 3px; bottom: 3px; font-size: 9.5px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .7); color: #fff; }
.fonts { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.font-row { display: flex; align-items: center; gap: 6px; width: 100%; }
.fname { flex: 1; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ stage */
.viewport { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #13161b 0, #08090b 70%); }
#preview { display: block; background: #000; box-shadow: 0 10px 50px rgba(0, 0, 0, .6), 0 0 0 1px #20242b; }
#overlay { position: absolute; touch-action: none; }
.busy { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; min-width: 260px; padding: 10px 14px; border-radius: 10px; background: rgba(15, 17, 21, .92); border: 1px solid var(--line2); box-shadow: 0 8px 30px rgba(0, 0, 0, .5); z-index: 2; }
.busy b { display: block; height: 4px; border-radius: 2px; background: #2b313a; overflow: hidden; }
.busy i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.transport { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--bg2); border-top: 1px solid var(--line); min-width: 0; }
.transport .play { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.transport .play:hover { background: #ff6a24 !important; color: var(--on-accent) !important; box-shadow: 0 0 16px rgba(255, 87, 7, .5); }
.tc { font-variant-numeric: tabular-nums; font-size: 14px; letter-spacing: .02em; margin-left: 6px; color: #d7dbe1; white-space: nowrap; }
#vol { width: 90px; }
.res { color: var(--dim); font-size: 11px; white-space: nowrap; }
#quality { font-size: 12px; }

/* ------------------------------------------------------------------ timeline */
.tlbar { display: flex; align-items: center; gap: 4px; padding: 3px 10px; border-bottom: 1px solid var(--line); min-width: 0; }
.tlbar b { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.tlhint { color: var(--dim); margin-left: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlwrap { flex: 1; min-height: 0; position: relative; }
#tl { display: block; position: absolute; inset: 0; touch-action: none; }

/* ------------------------------------------------------------------ inspector */
.inspector { overflow-y: auto; flex: 1; padding: 0 0 30px; }
.ihead { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px; position: sticky; top: 0; background: var(--panel); z-index: 1; border-bottom: 1px solid var(--line); }
.ititle { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ititle b { font-size: 14px; }
.ititle small { color: var(--dim); font-size: 11.5px; }
.lname-in { font-weight: 600; font-size: 14px; background: transparent !important; border-color: transparent !important; padding: 2px 4px !important; margin-left: -4px; }
.lname-in:hover { border-color: var(--line2) !important; }
.lname-in:focus { border-color: var(--accent) !important; }
.itools { display: flex; gap: 2px; }
.sec { border-bottom: 1px solid var(--line); }
.sec > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); user-select: none; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid var(--dim); border-bottom: 1.5px solid var(--dim); transform: rotate(-45deg); margin-right: 2px; transition: transform .15s; flex: none; }
.sec[open] > summary::before { transform: rotate(45deg); }
.sec > summary > span { flex: 1; }
.sec > summary:hover { color: var(--text); }
.sec.off > summary > span { opacity: .55; }
.sec.off > .row { opacity: .5; }
.sec > :last-child { margin-bottom: 8px; }
.row { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 8px; padding: 3px 12px; min-height: 30px; }
.row.col { grid-template-columns: 1fr; gap: 5px; }
.rl { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; user-select: none; }
.rc { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rc input[type=range] { flex: 1; }
.rc .num { width: 62px; flex: none; padding: 3px 5px; font-variant-numeric: tabular-nums; }
.unit { color: var(--dim); font-size: 11px; white-space: nowrap; }
.row > select, .row > input[type=text] { width: 100%; }
.rc.react select { width: 84px; flex: none; padding: 3px 4px; }
.rc.react .num { width: 58px; }
.rc.color .hex { width: 76px; padding: 3px 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.tchips { display: flex; gap: 3px; margin-left: auto; }
.tchip { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
.tchip.on { border-color: #fff; }
.time { width: 90px; font-variant-numeric: tabular-nums; }
.hint { color: var(--dim); font-size: 11px; line-height: 1.3; }
.tokens { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 11px; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.note { color: var(--dim); font-size: 12px; margin: 4px 12px 8px; line-height: 1.45; }
.note.warn { color: var(--warn); }
.btnrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.btnrow.pad { padding: 12px; }
.sec .btnrow { padding: 4px 12px 8px; }
.imgpick { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 7px; border: 1px solid var(--line2); background: var(--bg); cursor: pointer; min-width: 0; text-align: left; }
.imgpick:hover { border-color: var(--accent); }
.ip-thumb { width: 34px; height: 34px; border-radius: 5px; background: var(--panel2) center / cover no-repeat; flex: none; display: flex; align-items: center; justify-content: center; color: var(--dim); }
.ip-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.imglist { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 5px; }
.ithumb { aspect-ratio: 16 / 10; border-radius: 6px; background: var(--bg) center / cover no-repeat; border: 1px solid var(--line2); position: relative; }
.ithumb.add { display: flex; align-items: center; justify-content: center; border-style: dashed; color: var(--muted); cursor: pointer; }
.ithumb.add:hover { border-color: var(--accent); color: var(--text); }
.ix { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; opacity: 0; }
.ix.left { right: auto; left: 2px; }
.ithumb:hover .ix { opacity: 1; }
.songcard { margin: 2px 12px 8px; padding: 10px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.sc-t { display: flex; flex-direction: column; min-width: 0; }
.sc-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-t small { color: var(--dim); }
.sc-b { display: flex; gap: 6px; flex-wrap: wrap; }
.theme-row { display: flex; gap: 10px; padding: 2px 12px 8px; }
.tsw { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--dim); font-size: 11px; }
.tsw input[type=color] { width: 54px; height: 34px; }

/* lyrics editor */
.lyr { display: flex; flex-direction: column; gap: 8px; }
.lyr-list { display: flex; flex-direction: column; gap: 3px; max-height: 300px; overflow-y: auto; padding-right: 2px; }
.lt { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto auto auto; gap: 3px; align-items: center; padding: 2px; border-radius: 6px; }
.lt.cur { background: var(--accent-soft); }
.lt input { padding: 3px 5px; font-size: 12px; }
.lt-time { font-variant-numeric: tabular-nums; }
.lyr .note { margin: 0; }
.lyr-edit { min-height: 320px; font-size: 14px; }
.tapbar { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: min(680px, calc(100% - 28px)); background: rgba(14, 16, 20, .94); border: 1px solid var(--accent); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; z-index: 4; box-shadow: 0 10px 40px rgba(0, 0, 0, .6), 0 0 30px rgba(255, 87, 7, .2); }
.tap-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tap-head small { color: var(--dim); }
.tap-next { display: flex; flex-direction: column; gap: 2px; }
.tap-next small { color: var(--accent-text); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.tn { font-size: 20px; font-weight: 600; }
.tn2 { color: var(--dim); }
.tap-btns { display: flex; gap: 8px; align-items: center; }
.tapbtn { font-size: 16px; padding: 10px 28px; }
.tapbtn.hit { animation: hit .25s; }
@keyframes hit { 0% { transform: scale(.94); box-shadow: 0 0 30px rgba(255, 87, 7, .9); } 100% { transform: scale(1); } }

/* ------------------------------------------------------------------ menus, modals, toasts */
.menu { position: fixed; z-index: 60; min-width: 220px; max-width: 340px; max-height: 70vh; overflow-y: auto; padding: 6px; border-radius: 10px; background: #171a20; border: 1px solid var(--line2); box-shadow: 0 16px 50px rgba(0, 0, 0, .6); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; }
.menu-item:hover, .menu-item:focus { background: var(--panel3); outline: none; }
.menu-item:disabled { opacity: .4; }
.mi-ic { color: var(--accent-text); display: inline-flex; }
.mi-t { display: flex; flex-direction: column; min-width: 0; }
.mi-t b { font-weight: 600; }
.mi-t small { color: var(--dim); font-size: 11.5px; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; font-size: 0; }
.menu-sep:not(:empty) { height: auto; background: none; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 700; padding: 6px 6px 2px; }
.add-menu { width: 300px; }
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(5, 6, 8, .72); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); overflow: hidden; }
.modal.wide { width: min(1040px, 100%); }
.modal.xmodal { width: min(620px, 100%); }
.mhead { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.mhead h2 { margin: 0; font-size: 16px; }
.mbody { padding: 16px; overflow-y: auto; }
.mfoot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg2); }
.mtext { margin: 0 0 10px; color: var(--muted); line-height: 1.5; }
.toasts { position: fixed; right: 16px; bottom: 40px; z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; max-width: 420px; padding: 9px 13px; border-radius: 9px; background: #1c2027; border: 1px solid var(--line2); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: tin .2s; }
.toast .ti { color: var(--accent-text); display: inline-flex; }
.toast.ok .ti { color: var(--ok); }
.toast.err { border-color: rgba(255, 59, 107, .6); }
.toast.err .ti { color: var(--danger); }
.toast.out { opacity: 0; transform: translateY(6px); transition: .35s; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.drop-hint { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; background: rgba(10, 11, 14, .7); pointer-events: none; }
.drop-hint.show { display: flex; }
.drop-hint > div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 56px; border: 2px dashed var(--accent); border-radius: 18px; background: rgba(20, 22, 27, .9); }
.drop-hint b { font-size: 22px; }
.drop-hint span { color: var(--muted); }

/* templates & welcome */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tcard { display: flex; flex-direction: column; gap: 3px; padding: 8px; border-radius: 11px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; text-align: left; transition: border-color .15s, transform .15s, box-shadow .15s; }
.tcard:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 87, 7, .25); }
.tthumb { width: 100%; aspect-ratio: 16 / 9; border-radius: 7px; background: #000; margin-bottom: 5px; display: block; }
.tcard b { font-size: 13.5px; }
.tcard small { color: var(--dim); font-size: 11.5px; line-height: 1.35; }
.keep { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--muted); cursor: pointer; }
.hero { display: flex; gap: 20px; padding: 18px; border-radius: 12px; background: linear-gradient(120deg, rgba(255, 87, 7, .16), rgba(255, 87, 7, 0) 60%), var(--panel2); border: 1px solid var(--line2); }
.hero h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; }
.hero p { margin: 0 0 14px; color: var(--muted); line-height: 1.5; max-width: 720px; }

/* export */
.xform { display: flex; flex-direction: column; gap: 10px; }
.xrow { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: center; }
.xrow label { color: var(--muted); }
.xrow input[type=text] { flex: 1; width: 100%; }
.est { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); }
.est span { display: flex; flex-direction: column; min-width: 0; }
.est small, .xstats small { color: var(--dim); font-size: 11px; }
.est b, .xstats b { font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.codec { display: flex; gap: 6px; align-items: flex-start; color: #9fe3bd; margin: 0; line-height: 1.4; }
.codec .ic { margin-top: 1px; }
.codec.warn { color: var(--warn); }
.xform .note, .xrun .note, .xdone .note { margin: 0; }
.xrun { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.xprev { align-self: center; border-radius: 8px; background: #000; box-shadow: 0 0 0 1px var(--line2); max-width: 100%; }
.xstage { color: var(--muted); }
.xbar { height: 8px; border-radius: 4px; background: #2b313a; overflow: hidden; }
.xfill { height: 100%; width: 0; background: linear-gradient(90deg, #ff5707, #ff8a3d); box-shadow: 0 0 12px rgba(255, 87, 7, .6); transition: width .2s; }
.xstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.xstats span { display: flex; flex-direction: column; }
.xdone { display: flex; flex-direction: column; gap: 12px; }
.xvid { width: 100%; max-height: 52vh; border-radius: 8px; background: #000; }
.help h3 { margin: 16px 0 8px; font-size: 14px; color: var(--accent-text); }
.help h3:first-child { margin-top: 0; }
.help ol { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.6; }
.help p { color: var(--muted); line-height: 1.5; }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; align-items: center; }
kbd { font: 12px/1 var(--font); padding: 4px 7px; border-radius: 5px; background: var(--bg); border: 1px solid var(--line2); border-bottom-width: 2px; color: var(--text); white-space: nowrap; justify-self: start; }
.keys span { color: var(--muted); }

/* ------------------------------------------------------------------ smaller screens */
@media (max-width: 1280px) {
  .app { grid-template-columns: 236px minmax(0, 1fr) 316px; }
  .tlhint, .res, .brand b { display: none; }
  .tbtn { padding: 6px 7px; }
}
@media (max-width: 980px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100vh; grid-template-columns: 1fr; grid-template-rows: auto minmax(260px, 56vh) 200px auto auto auto;
    grid-template-areas: "top" "stage" "tl" "right" "left" "status"; }
  .top { flex-wrap: wrap; padding: 8px 10px; gap: 6px; }
  .tb { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
  .top .export { margin-left: auto; }
  .proj-name { width: 130px; flex: 1; }
  .right { border-left: 0; border-top: 1px solid var(--line); }
  .inspector { max-height: none; overflow: visible; }
  .left { border-right: 0; border-top: 1px solid var(--line); }
  .players, .pmedia { flex: none; }
  .llist { max-height: 340px; }
  .status { flex-wrap: wrap; height: auto; padding: 6px 10px; white-space: normal; }
  .status .local { display: none; }
  .est, .xstats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .app { grid-template-rows: auto minmax(250px, 44vh) 190px auto auto auto; }
  .exit { padding: 5px 7px; }
  .tbtn { font-size: 0; gap: 0; }
  .tbtn .ic { margin: 0; }
  #vol, #quality { display: none; }
  .hero { padding: 14px; }
  .row { grid-template-columns: 92px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
