:root {
  --bg: #eef0f5; --surface: #f3f5f9; --ink: #26324a; --ink-2: #5b6782; --ink-3: #94a0b8;
  --hl: #ffffff; --sh: #c9d0dd;
  --neu: 9px 9px 20px var(--sh), -9px -9px 20px var(--hl);
  --neu-sm: 5px 5px 12px var(--sh), -5px -5px 12px var(--hl);
  --neu-in: inset 4px 4px 10px var(--sh), inset -4px -4px 10px var(--hl);
  --pink: #ef5e8f; --orange: #f7a64a; --teal: #22c3a0; --blue: #3fa2f6;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Pretendard Variable', Pretendard, 'Roboto', system-ui, sans-serif; background: var(--bg); color: var(--ink);
  min-height: 100vh; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--ink); }
.app-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.app-bg i { position: absolute; width: 560px; height: 560px; border-radius: 58% 42% 63% 37% / 45% 55% 45% 55%; background: radial-gradient(circle at 35% 35%, #fff, #e6e9f0 70%); opacity: .7; animation: otl-morph 16s ease-in-out infinite, otl-float 22s ease-in-out infinite; }
.app-bg i:first-child { top: -220px; left: -160px; }
.app-bg i:last-child { bottom: -260px; right: -200px; animation-delay: -7s, -11s; }

/* ===== top bar ===== */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 28px; background: rgba(238,240,245,.82); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 14px; }
.dots { display: flex; gap: 6px; }
.dots b { width: 11px; height: 11px; border-radius: 4px; display: block; }
.dots b:nth-child(1) { background: var(--pink) } .dots b:nth-child(2) { background: var(--orange) } .dots b:nth-child(3) { background: var(--teal) }
.brand-name { font-size: 22px; letter-spacing: -.02em; }
.brand-name strong { font-weight: 800; }
.top-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  border: 0; background: var(--bg); color: var(--ink); box-shadow: var(--neu-sm); border-radius: 14px; height: 42px; padding: 0 16px;
  font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: box-shadow .2s, transform .2s, color .2s; text-decoration: none; white-space: nowrap;
}
.btn:hover { color: var(--pink); transform: translateY(-1px); }
.btn:active { box-shadow: var(--neu-in); transform: none; }
.btn:disabled { opacity: .5; cursor: wait; }
.btn.primary { background: linear-gradient(135deg, var(--pink), var(--orange)); color: #fff; box-shadow: 6px 6px 14px rgba(239,94,143,.35), -6px -6px 14px var(--hl); }
.btn.primary:hover { color: #fff; filter: brightness(1.05); }
.btn.ghost { box-shadow: none; background: transparent; border: 1.5px dashed #c6cddb; }
.btn.danger { color: #e0446f; }
.btn.round { width: 42px; padding: 0; border-radius: 50%; font-size: 18px; }
.btn.sm { height: 36px; padding: 0 13px; font-size: 12.5px; border-radius: 12px; }
.btn.wide { width: 100%; height: 50px; font-size: 15px; margin-top: 14px; border-radius: 18px; }

/* settings dropdown */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 12px); width: 270px; padding: 10px; background: var(--surface); border-radius: 22px; box-shadow: 14px 14px 34px rgba(160,170,190,.55), -8px -8px 20px var(--hl);
  opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: top right; pointer-events: none; transition: .22s cubic-bezier(.2,.9,.25,1.1);
}
.menu.show { opacity: 1; transform: none; pointer-events: auto; }
.menu button { width: 100%; display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; border: 0; background: none; padding: 9px; border-radius: 14px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
.menu button:hover { box-shadow: var(--neu-in); }
.menu button small { grid-column: 2; font-weight: 500; color: var(--ink-3); font-size: 11px; }
.menu .mi { grid-row: span 2; width: 34px; height: 34px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 900; border-radius: 46% 54% 40% 60% / 55% 45% 55% 45%; background: #dfe3ec; color: var(--ink-2); }
.menu .mi.pink { background: var(--pink); color: #fff } .menu .mi.teal { background: var(--teal); color: #fff } .menu .mi.blue { background: var(--blue); color: #fff } .menu .mi.orange { background: var(--orange); color: #fff }
.menu hr { border: 0; height: 1px; background: #dde2ea; margin: 6px 4px; }
.menu .ok { color: var(--teal); }

/* ===== layout ===== */
.layout { --side-w: 390px; display: grid; grid-template-columns: var(--side-w) 16px minmax(0, 1fr); gap: 6px; padding: 10px 28px 30px; align-items: start; }
.side { display: grid; gap: 22px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding: 8px 12px 20px 8px; margin: -8px -12px 0 -8px; scrollbar-width: thin; }
.panel { background: var(--surface); border-radius: 26px; padding: 20px; box-shadow: var(--neu); }
.panel-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-h h2 { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.panel-h h2 b { font-weight: 800; }
.num { width: 36px; height: 36px; display: grid; place-items: center; font-size: 12px; font-weight: 900; border-radius: 50%; box-shadow: var(--neu-in); color: var(--ink-2); }
.panel:nth-child(1) .num { color: var(--pink) } .panel:nth-child(2) .num { color: var(--orange) } .panel:nth-child(3) .num { color: var(--teal) }

.seg { display: flex; gap: 4px; padding: 5px; border-radius: 16px; box-shadow: var(--neu-in); margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; padding: 9px 6px; border-radius: 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; transition: .2s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--neu-sm); }
.seg.small button { padding: 7px 4px; font-size: 12px; }
.seg.lanes button.on:nth-child(1) { color: var(--pink) } .seg.lanes button.on:nth-child(2) { color: var(--orange) } .seg.lanes button.on:nth-child(3) { color: var(--teal) } .seg.lanes button.on:nth-child(4) { color: var(--blue) }

.inp, textarea {
  width: 100%; border: 0; background: var(--bg); box-shadow: var(--neu-in); border-radius: 14px; padding: 11px 14px; font: inherit; font-size: 13.5px; color: var(--ink); outline: none; resize: vertical;
}
.inp:focus, textarea:focus { box-shadow: var(--neu-in), 0 0 0 2px rgba(239,94,143,.35); }
.inp.color { padding: 4px; height: 42px; cursor: pointer; }
select.inp { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8a96ad 50%), linear-gradient(135deg, #8a96ad 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.lbl { display: block; font-size: 12px; font-weight: 800; color: var(--ink-2); margin: 12px 0 6px; }
.lbl small { font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.hint { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.hint code { background: #e2e6ee; padding: 1px 5px; border-radius: 6px; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.row .inp { flex: 1; min-width: 140px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; margin-top: 12px; color: var(--ink-2); cursor: pointer; }
.chk input { accent-color: var(--pink); width: 16px; height: 16px; }
.chk small { color: var(--ink-3); font-weight: 500; }

.src-pane, .img-pane, .set-pane { display: none; }
.src-pane.on, .img-pane.on, .set-pane.on { display: block; }
.src-pane textarea { min-height: 150px; }
.src-pane .btn { margin-top: 10px; }
.drop { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 20px; border: 2px dashed #cdd3df; cursor: pointer; transition: .2s; font-size: 13px; }
.drop.over, .drop:hover { border-color: var(--pink); background: rgba(239,94,143,.05); }
.drop input { display: none; }
.drop small { color: var(--ink-3); }
.drop-blob { width: 54px; height: 54px; flex: none; display: grid; place-items: center; color: #fff; font-size: 22px; background: linear-gradient(135deg, var(--teal), var(--blue)); border-radius: 46% 54% 40% 60% / 55% 45% 55% 45%; animation: otl-morph 8s infinite; box-shadow: 0 8px 18px rgba(63,162,246,.35); }

.src-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.src-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 14px; box-shadow: var(--neu-sm); font-size: 12.5px; }
.src-list li .ic { width: 26px; height: 26px; flex: none; border-radius: 9px; display: grid; place-items: center; font-size: 10px; font-weight: 900; color: #fff; background: var(--orange); }
.src-list li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.src-list li small { color: var(--ink-3); }
.src-list li button { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 16px; }

.lane-names { display: grid; gap: 8px; }
.lane-names .ln { display: flex; gap: 8px; align-items: center; }
.lane-names .ln input[type=color] { width: 42px; height: 40px; flex: none; padding: 3px; }

.count-row { display: flex; gap: 10px; align-items: center; }
.count-row .seg { margin: 0; flex: 0 0 132px; }
.count-box { flex: 1; display: flex; gap: 6px; align-items: center; transition: opacity .25s; }
.count-box .inp { text-align: center; font-weight: 800; font-size: 16px; padding: 8px 6px; -moz-appearance: textfield; }
.count-box .inp::-webkit-inner-spin-button { -webkit-appearance: none; }
.count-box .btn.round { width: 36px; height: 36px; flex: none; font-size: 16px; }
.count-row.auto .count-box, .range.auto { opacity: .38; pointer-events: none; }
.range { width: 100%; margin: 12px 0 2px; accent-color: var(--pink); transition: opacity .25s; }
#countHint { display: block; margin-top: 2px; }
.status { margin-top: 12px; font-size: 12.5px; color: var(--ink-2); min-height: 18px; line-height: 1.5; }
.status.err { color: #e0446f; }
.status .bar { height: 6px; border-radius: 6px; box-shadow: var(--neu-in); overflow: hidden; margin-top: 8px; }
.status .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--orange), var(--teal)); width: 30%; animation: load 1.2s ease-in-out infinite; border-radius: 6px; }
@keyframes load { 0% { transform: translateX(-100%) } 100% { transform: translateX(350%) } }

.node-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; max-height: 340px; overflow: auto; padding: 4px 6px 6px 2px; }
.node-list li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; box-shadow: var(--neu-sm); cursor: pointer; font-size: 12.5px; transition: .2s; }
.node-list li:hover { box-shadow: var(--neu-in); }
.node-list li .sw { width: 12px; height: 12px; flex: none; border-radius: 50% 40% 55% 45%; }
.node-list li .th { width: 34px; height: 34px; flex: none; border-radius: 40% 60% 46% 54%; background: #dfe3ec center/cover; }
.node-list li .tx { flex: 1; min-width: 0; }
.node-list li .tx b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-list li .tx small { color: var(--ink-3); }
.node-list li .bd { font-size: 11px; }

/* stage */
.stage { min-width: 0; }
#preview { min-height: 560px; border-radius: 28px; box-shadow: var(--neu); }
#preview .otl { min-height: 560px; }
.stage-hint { text-align: center; color: var(--ink-3); font-size: 12px; margin: 14px 0 0; }
.empty { display: grid; place-items: center; min-height: 520px; text-align: center; color: var(--ink-3); }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.drawer::before { content: ''; position: absolute; inset: 0; background: rgba(38,50,74,.18); opacity: 0; transition: .3s; }
.drawer.show { pointer-events: auto; }
.drawer.show::before { opacity: 1; }
.drawer-box { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(460px, calc(100% - 24px)); background: var(--surface); border-radius: 28px; box-shadow: -20px 0 50px rgba(120,130,155,.35); display: flex; flex-direction: column; transform: translateX(110%); transition: transform .45s cubic-bezier(.2,.9,.25,1); }
.drawer.show .drawer-box { transform: none; }
.drawer-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 8px; }
.drawer-h h3 { margin: 0; font-size: 20px; font-weight: 500; } .drawer-h h3 b { font-weight: 800; }
.drawer-body { flex: 1; overflow: auto; padding: 0 20px 20px; }
.drawer-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; flex-wrap: wrap; }
.drawer-f .danger { margin-right: auto; }
.embed { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; margin-top: 10px; box-shadow: var(--neu-sm); background: #e4e8f0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hidden { display: none !important; }
.img-prev { position: relative; height: 170px; border-radius: 42% 58% 38% 62% / 52% 44% 56% 48%; background: #e2e6ee center/cover; box-shadow: var(--neu-sm); margin-bottom: 12px; display: grid; place-items: center; color: var(--ink-3); font-size: 12px; overflow: hidden; animation: otl-morph 12s infinite; }
.img-prev .cr { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font-size: 10px; background: rgba(255,255,255,.8); padding: 2px 8px; border-radius: 8px; white-space: nowrap; max-width: 80%; overflow: hidden; text-overflow: ellipsis; }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.pick-grid button { border: 0; padding: 0; aspect-ratio: 4/3; border-radius: 14px; background: #dfe3ec center/cover; cursor: pointer; box-shadow: var(--neu-sm); position: relative; overflow: hidden; transition: transform .2s; }
.pick-grid button:hover { transform: scale(1.04); outline: 2px solid var(--pink); }
.pick-grid button span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); padding: 10px 5px 4px; text-align: left; line-height: 1.25; }

/* modals */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(38,50,74,.3); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: .25s; }
.modal.show { opacity: 1; pointer-events: auto; }
.modal-box { width: min(620px, 100%); max-height: 92vh; overflow: auto; background: var(--surface); border-radius: 28px; box-shadow: 0 30px 80px rgba(38,50,74,.3); padding: 6px 22px 16px; transform: translateY(20px) scale(.97); transition: .35s cubic-bezier(.2,.9,.25,1); }
.modal.show .modal-box { transform: none; }
.modal-box.narrow { width: min(520px, 100%); }
.modal-box.wide { width: min(1100px, 100%); }
.modal-box .drawer-h { padding: 16px 0 10px; }
.modal-box .drawer-f { padding: 16px 0 6px; }
.srv-state { display: flex; flex-wrap: wrap; gap: 6px; }
.srv-state span { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 10px; box-shadow: var(--neu-in); color: var(--ink-3); }
.srv-state span.ok { color: var(--teal); }
.map-canvas { height: min(64vh, 620px); border-radius: 22px; overflow: hidden; box-shadow: var(--neu-in); background: #e4e8f0; }

/* presentation */
.present { position: fixed; inset: 0; z-index: 95; background: var(--bg); overflow: auto; display: none; }
.present.show { display: block; }
.present #presentStage { min-height: 100%; }
.present #presentStage .otl { min-height: 100vh; border-radius: 0; }
.present-x { position: fixed; right: 18px; top: 18px; z-index: 5; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); z-index: 120; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 16px; font-size: 13.5px; font-weight: 600; opacity: 0; transition: .3s; pointer-events: none; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* footer */
.footer { text-align: center; padding: 26px 20px 34px; color: var(--ink-2); font-size: 13px; line-height: 1.8; }
.footer .dots { justify-content: center; margin-bottom: 10px; }
.footer p { margin: 0; }
.footer a { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 1.5px solid rgba(239,94,143,.4); }
.footer a:hover { color: var(--pink); }

@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; overflow: visible; margin: 0; padding: 0; }
}
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .brand-name { font-size: 17px; }
  .hide-sm { display: none; }
  .top-actions { gap: 6px; }
  .btn { padding: 0 12px; }
  .layout { padding: 8px 16px 24px; gap: 20px; }
  .grid2 { grid-template-columns: 1fr; }
  .brand .dots { display: none; }
}
.brand-name .ver { display: inline-block; margin-left: 8px; padding: 3px 8px; vertical-align: middle; font-size: 11px; font-weight: 800; letter-spacing: .02em; color: var(--pink); border-radius: 10px; box-shadow: var(--neu-in); position: relative; top: -2px; }

/* ===== TTS ===== */
.voice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 6px 6px 8px 2px; }
.voice { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; border-radius: 14px; box-shadow: var(--neu-sm); cursor: pointer; transition: .2s; min-width: 0; border: 2px solid transparent; }
.voice:hover { box-shadow: var(--neu-in); }
.voice.on { border-color: var(--pink); background: rgba(239,94,143,.06); }
.voice .vi { flex: 1; min-width: 0; }
.voice b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice small { display: block; font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice .vp { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; background: var(--bg); box-shadow: var(--neu-sm); color: var(--pink); font-size: 12px; display: grid; place-items: center; }
.voice .vp.playing { background: var(--pink); color: #fff; animation: vpulse 1s ease-in-out infinite; }
@keyframes vpulse { 50% { box-shadow: 0 0 0 6px rgba(239,94,143,.2); } }
.naudio { width: 100%; margin-top: 10px; height: 40px; }
#mTts.ok, #ttsSel.ok { color: var(--teal); }

/* ===== narration settings ===== */
.nar-box { margin-top: 16px; padding: 14px; border-radius: 20px; box-shadow: var(--neu-in); }
.nar-head { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.nar-head b { flex: 1; }
.nar-ic { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 46% 54% 40% 60% / 55% 45% 55% 45%; background: linear-gradient(135deg, var(--pink), var(--orange)); color: #fff; font-size: 14px; }
.nar-body { display: none; }
.nar-box.on .nar-body { display: block; animation: narIn .35s ease; }
@keyframes narIn { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: none } }
.nar-box .row .inp { min-width: 120px; }
.switch { position: relative; width: 50px; height: 28px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 28px; background: var(--bg); box-shadow: var(--neu-in); transition: .25s; }
.switch i::after { content: ""; position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 2px 2px 6px var(--sh); transition: .3s cubic-bezier(.3,1.5,.5,1); }
.switch input:checked + i { background: linear-gradient(135deg, var(--pink), var(--orange)); box-shadow: inset 2px 2px 6px rgba(0,0,0,.12); }
.switch input:checked + i::after { left: 26px; }
.switch input:focus-visible + i { outline: 2px solid var(--pink); outline-offset: 2px; }
#narPreview.playing { background: var(--pink); color: #fff; }

.nscript { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; box-shadow: var(--neu-in); font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.nscript:empty { display: none; }
.nscript::before { content: "내레이션 문장 · "; font-weight: 800; color: var(--pink); }

/* ===== timeline history ===== */
.history { padding: 0 28px 10px; }
.hist-h { flex-wrap: wrap; }
.hist-count { font-size: 12px; font-weight: 800; color: var(--ink-3); padding: 4px 10px; border-radius: 10px; box-shadow: var(--neu-in); }
.hist-count:empty { display: none; }
.hist-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.hist-tools .inp { width: 200px; padding: 9px 13px; }
.hist-wrap { overflow-x: auto; margin-top: 6px; }
.hist { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: 13px; }
.hist th { text-align: left; font-size: 11.5px; font-weight: 800; color: var(--ink-3); padding: 4px 12px; white-space: nowrap; letter-spacing: .02em; }
.hist th:nth-child(n+3) { text-align: center; }
.hist td { background: var(--surface); padding: 10px 12px; vertical-align: middle; box-shadow: 0 4px 10px rgba(201,208,221,.35); }
.hist td:first-child { border-radius: 16px 0 0 16px; white-space: nowrap; }
.hist td:last-child { border-radius: 0 16px 16px 0; }
.hist td:nth-child(n+3) { text-align: center; }
.hist tr { animation: histIn .45s cubic-bezier(.2,.9,.25,1) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes histIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
.hist tr.cur td { background: #fdf3f7; }
.hist tr.cur td:first-child { box-shadow: inset 4px 0 0 var(--pink), 0 4px 10px rgba(201,208,221,.35); }
.hist .dt b { display: block; font-weight: 800; }
.hist .dt small { color: var(--ink-3); font-size: 11px; }
.hist .tp { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.hist .tp i { width: 12px; height: 12px; flex: none; border-radius: 55% 45% 60% 40%; }
.hist .tp b { font-weight: 800; }
.hist .tp .badge { font-size: 10.5px; font-weight: 800; color: #fff; background: var(--pink); padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.hist .tp small { display: block; color: var(--ink-3); font-size: 11px; }
.hist .nn { font-size: 18px; font-weight: 900; color: var(--ink); }
.hist .nn small { font-size: 11px; color: var(--ink-3); font-weight: 700; margin-left: 2px; }
.hist .ib { width: 38px; height: 38px; padding: 0; border-radius: 12px; font-size: 15px; }
.hist .ib.share.on { color: var(--teal); }
.hist .ib.del:hover { color: #e0446f; }
.hist-empty { text-align: center; padding: 10px 0 4px; }
@media (max-width: 760px) {
  .history { padding: 0 16px 10px; }
  .hist-tools { width: 100%; margin-left: 0; } .hist-tools .inp { flex: 1; width: auto; }
  .hist thead { display: none; }
  .hist, .hist tbody { display: block; }
  .hist tr { display: grid; grid-template-columns: 1fr repeat(4, auto); gap: 6px 8px; align-items: center; padding: 12px; margin-bottom: 10px; border-radius: 18px; background: var(--surface); box-shadow: var(--neu-sm); }
  .hist td { display: block; padding: 0; background: none !important; box-shadow: none; border-radius: 0 !important; }
  .hist td.c-dt { grid-column: 1 / -1; order: 2; } .hist td.c-tp { grid-column: 1 / -1; order: 1; } .hist td.c-nn { order: 3; text-align: left; }
  .hist td.c-html, .hist td.c-share, .hist td.c-edit, .hist td.c-del { order: 4; }
}

/* ===== media auto-enrich ===== */
.media-box .nar-head b small { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }
.nar-ic.yt { background: linear-gradient(135deg, #ff3d3d, #ff7a59); font-size: 12px; }
.nar-ic.map { background: linear-gradient(135deg, #22c3a0, #3fa2f6); }
.media-box.busy .nar-ic { animation: otl-morph 2s ease-in-out infinite; }

/* ===== template picker ===== */
.tpl-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 4px; }
.tpl { border: 0; padding: 0; cursor: pointer; border-radius: 14px; background: none; font: inherit; text-align: center; color: var(--ink-2); transition: transform .2s; }
.tpl:hover { transform: translateY(-2px); }
.tpl .sw { position: relative; display: block; height: 54px; border-radius: 12px; overflow: hidden; box-shadow: var(--neu-sm); border: 2px solid transparent; transition: border-color .2s; }
.tpl.on .sw { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(239,94,143,.2), var(--neu-sm); }
.tpl .sw .ln { position: absolute; left: 8%; right: 8%; top: 58%; height: 3px; border-radius: 3px; }
.tpl .sw .cd { position: absolute; top: 14%; width: 30%; height: 34%; border-radius: 6px; }
.tpl .sw .cd:nth-child(2) { left: 8%; } .tpl .sw .cd:nth-child(3) { left: 40%; top: 64%; } .tpl .sw .cd:nth-child(4) { left: 62%; }
.tpl .sw .dt { position: absolute; top: calc(58% - 3px); width: 9px; height: 9px; border-radius: 50%; }
.tpl b { display: block; font-size: 10.5px; margin-top: 5px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl.on b { color: var(--pink); }
@media (max-width: 420px) { .tpl-grid { grid-template-columns: repeat(3, 1fr); } }

.tpl .sw { background: #eef0f5; }
.tpl .sw svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ===== timeline generation animation ===== */
.stage { position: relative; }
.genfx { position: absolute; inset: 0 0 34px; z-index: 30; display: grid; place-items: center; border-radius: 28px; overflow: hidden;
  background: rgba(238,240,245,.78); backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1);
  opacity: 0; transition: opacity .45s ease; }
.genfx.show { opacity: 1; }
.genfx.leave { animation: gfLeave .85s cubic-bezier(.65,0,.35,1) forwards; }
@keyframes gfLeave { 0% { clip-path: circle(120% at 50% 50%); opacity: 1 } 100% { clip-path: circle(0% at 50% 46%); opacity: .6 } }
.gf-bg { position: absolute; inset: 0; pointer-events: none; }
.gf-bg i { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 58% 42% 63% 37% / 45% 55% 45% 55%; filter: blur(46px); opacity: .5; animation: otl-morph 9s ease-in-out infinite, gfDrift 12s ease-in-out infinite; }
.gf-bg i:nth-child(1) { background: #ef5e8f; left: -8%; top: -10%; }
.gf-bg i:nth-child(2) { background: #f7a64a; right: -10%; top: 20%; animation-delay: -3s, -4s; }
.gf-bg i:nth-child(3) { background: #22c3a0; left: 26%; bottom: -24%; animation-delay: -6s, -8s; }
@keyframes gfDrift { 0%,100% { transform: translate(0,0) scale(1) } 50% { transform: translate(40px,-30px) scale(1.15) } }
.gf-core { position: relative; width: min(640px, 92%); text-align: center; padding: 34px 26px 28px; border-radius: 34px; background: rgba(243,245,249,.75); box-shadow: 18px 18px 40px rgba(176,184,201,.45), -14px -14px 34px rgba(255,255,255,.9); }
.gf-orb { position: relative; width: 84px; height: 84px; margin: -76px auto 4px; }
.gf-orb span { position: absolute; inset: 0; border-radius: 46% 54% 40% 60% / 55% 45% 55% 45%; mix-blend-mode: multiply; animation: otl-morph 4s ease-in-out infinite, gfSpin 6s linear infinite; }
.gf-orb span:nth-child(1) { background: #ef5e8f; } .gf-orb span:nth-child(2) { background: #f7a64a; animation-duration: 5s, 7s; animation-direction: normal, reverse; opacity: .85; }
.gf-orb span:nth-child(3) { background: #22c3a0; animation-duration: 6s, 9s; opacity: .75; }
@keyframes gfSpin { to { rotate: 360deg } }
.genfx.done .gf-orb span { animation-duration: 1.2s, 1.2s; }
.gf-line { width: 100%; height: 110px; overflow: visible; }
.gf-track { fill: none; stroke: #dfe3ec; stroke-width: 9; stroke-linecap: round; }
.gf-draw { fill: none; stroke: url(#none); stroke: #ef5e8f; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 26 74; animation: gfDash 1.8s cubic-bezier(.45,.05,.55,.95) infinite; filter: drop-shadow(0 0 6px rgba(239,94,143,.5)); }
@keyframes gfDash { from { stroke-dashoffset: 100 } to { stroke-dashoffset: 0 } }
.genfx.built .gf-draw { animation: gfFill 1.1s cubic-bezier(.65,0,.35,1) forwards; }
@keyframes gfFill { from { stroke-dasharray: 0 100; stroke-dashoffset: 0 } to { stroke-dasharray: 100 0; stroke-dashoffset: 0 } }
.gf-dots circle { transform-box: fill-box; transform-origin: center; stroke: #fff; stroke-width: 3; }
.gf-dots circle.loop { animation: gfBlink 1.26s ease-in-out infinite; opacity: .25; }
@keyframes gfBlink { 0%,100% { transform: scale(.6); opacity: .25 } 40% { transform: scale(1.25); opacity: 1 } }
.gf-dots circle.pop { animation: gfPop .6s cubic-bezier(.3,1.7,.5,1) both; }
@keyframes gfPop { from { transform: scale(0) } to { transform: scale(1) } }
.genfx.done .gf-dots circle { animation: gfBurst .9s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes gfBurst { 0% { transform: scale(1) } 40% { transform: scale(1.8) } 100% { transform: scale(1) } }
.gf-title { margin: 6px 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.gf-msg { margin: 0; min-height: 22px; font-size: 14px; color: var(--ink-2); }
.gf-msg.swap { animation: gfSwap .45s ease; }
@keyframes gfSwap { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.gf-steps { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 18px 0 0; flex-wrap: wrap; }
.gf-steps li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 8px; border-radius: 14px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); box-shadow: var(--neu-in); transition: .35s; }
.gf-steps li i { width: 16px; height: 16px; border-radius: 50%; background: #dfe3ec; position: relative; flex: none; transition: .35s; }
.gf-steps li.on { color: var(--ink); box-shadow: var(--neu-sm); }
.gf-steps li.on i { background: conic-gradient(var(--pink) 0 70%, #f3c1d3 70% 100%); animation: gfSpin 1s linear infinite; }
.gf-steps li.done { color: var(--teal); }
.gf-steps li.done i { background: var(--teal); }
.gf-steps li.done i::after { content: ""; position: absolute; left: 5px; top: 2.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.gf-count { margin-top: 18px; display: inline-flex; align-items: baseline; gap: 6px; opacity: 0; transform: scale(.8); transition: .5s cubic-bezier(.3,1.6,.5,1); }
.genfx.built .gf-count { opacity: 1; transform: none; }
.gf-count b { font-size: 46px; font-weight: 900; letter-spacing: -.04em; background: linear-gradient(135deg, var(--pink), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.gf-count small { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--ink-3); }
.genfx.fail .gf-title { color: #e0446f; }
.genfx.fail .gf-draw { stroke: #c6cddb; animation: none; filter: none; }
.gf-pill { position: absolute; right: 18px; top: 18px; z-index: 25; display: flex; align-items: center; gap: 10px; max-width: min(420px, 80%); padding: 10px 16px 10px 12px; border-radius: 18px;
  background: rgba(243,245,249,.92); backdrop-filter: blur(8px); box-shadow: 8px 8px 20px var(--sh), -6px -6px 14px var(--hl); font-size: 12.5px; opacity: 0; transform: translateY(-10px); transition: .35s; pointer-events: none; }
.gf-pill.show { opacity: 1; transform: none; }
.gf-pill b { font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gf-spin { width: 18px; height: 18px; flex: none; border-radius: 50%; background: conic-gradient(var(--pink), var(--orange), var(--teal), var(--blue), var(--pink)); -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); animation: gfSpin .9s linear infinite; }
@media (prefers-reduced-motion: reduce) { .genfx *, .genfx { animation-duration: .01s !important; animation-iteration-count: 1 !important; } }

/* ===== v2 additions ===== */
.undo-group { display: flex; gap: 6px; }
.btn.sm-r { width: 38px; height: 38px; font-size: 17px; }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.collab-badge { font-size: 12px; font-weight: 800; color: var(--teal); padding: 6px 12px; border-radius: 12px; box-shadow: var(--neu-in); white-space: nowrap; }
.collab-badge.sync { color: var(--orange); }
#exportMenu { width: 290px; }
.ncmt { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-height: 220px; overflow: auto; }
.ncmt li { position: relative; padding: 8px 34px 8px 12px; border-radius: 12px; box-shadow: var(--neu-sm); font-size: 12.5px; }
.ncmt li b { margin-right: 6px; } .ncmt li small { color: var(--ink-3); font-size: 10.5px; }
.ncmt li p { margin: 3px 0 0; white-space: pre-wrap; color: var(--ink-2); }
.ncmt li button { position: absolute; right: 6px; top: 6px; border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 15px; }
.hist .st { display: block; margin-top: 3px; font-size: 10.5px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.hist .st.hot { color: var(--pink); }
#embedCode, #editUrl { font-size: 12px; font-family: ui-monospace, Consolas, monospace; }

/* ===== topic input ===== */
.topic-inp { font-size: 15px; font-weight: 700; padding: 13px 15px; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.topic-chips button { border: 0; cursor: pointer; padding: 6px 11px; border-radius: 12px; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: var(--bg); box-shadow: var(--neu-sm); transition: .2s; }
.topic-chips button:hover { color: var(--pink); transform: translateY(-1px); }
.topic-on .num { color: #fff !important; background: linear-gradient(135deg, var(--pink), var(--orange)); box-shadow: none; }

/* ===== sidebar resizer ===== */
.resizer { position: sticky; top: 84px; align-self: start; height: calc(100vh - 100px); width: 16px; cursor: col-resize; display: flex; justify-content: center; touch-action: none; outline: none; z-index: 5; }
.resizer i { width: 4px; height: 100%; border-radius: 4px; background: transparent; transition: background .2s, box-shadow .2s; position: relative; }
.resizer i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 44px; margin: -22px 0 0 -4px; border-radius: 8px; background: var(--bg); box-shadow: var(--neu-sm); transition: .2s; }
.resizer:hover i, .resizer:focus-visible i, .resizer.dragging i { background: linear-gradient(var(--pink), var(--orange), var(--teal)); box-shadow: 0 0 8px rgba(239,94,143,.35); }
.resizer:hover i::after, .resizer.dragging i::after, .resizer:focus-visible i::after { background: var(--pink); box-shadow: 0 0 0 3px rgba(239,94,143,.2); }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing #preview { pointer-events: none; }
.resizer-tip { position: fixed; z-index: 200; padding: 4px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; transform: translate(12px, -50%); }
@media (max-width: 1080px) { .resizer { display: none; } .layout { grid-template-columns: 1fr; gap: 22px; } }

/* ===== Google Drive browser ===== */
.drive-box { width: min(820px, 100%); }
.dv-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dv-bar .seg { margin: 0; flex: none; }
.dv-bar .inp { flex: 1; min-width: 200px; }
.dv-types { display: flex; gap: 12px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.dv-types label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.dv-types input { accent-color: var(--pink); }
.dv-crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 14px 2px 8px; font-size: 13px; color: var(--ink-3); }
.dv-crumb button { border: 0; background: none; cursor: pointer; font: inherit; color: var(--blue); font-weight: 700; padding: 0; }
.dv-crumb b { color: var(--ink); }
.dv-list { list-style: none; margin: 0; padding: 4px; display: grid; gap: 6px; max-height: min(52vh, 520px); overflow: auto; border-radius: 18px; box-shadow: var(--neu-in); }
.dv-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; cursor: pointer; background: var(--surface); transition: .15s; font-size: 13.5px; }
.dv-row:hover { box-shadow: var(--neu-sm); }
.dv-row.on { background: rgba(239,94,143,.08); box-shadow: inset 0 0 0 2px var(--pink); }
.dv-row input { accent-color: var(--pink); width: 16px; height: 16px; flex: none; }
.dv-ic { width: 38px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; font-size: 10.5px; font-weight: 900; color: #fff; background: #94a0b8; }
.dv-ic.pdf { background: #e5484d; } .dv-ic.txt { background: var(--teal); } .dv-ic.doc { background: var(--blue); } .dv-ic.folder { background: none; font-size: 20px; }
.dv-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.dv-row small { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.dv-go { color: var(--ink-3); font-size: 18px; }
.dv-empty { padding: 30px; text-align: center; color: var(--ink-3); font-size: 13px; }
.dv-empty.err { color: #e0446f; }
.dv-more { text-align: center; padding: 6px; } .dv-more button { border: 0; cursor: pointer; padding: 8px 18px; border-radius: 12px; background: var(--bg); box-shadow: var(--neu-sm); font: inherit; font-weight: 700; color: var(--ink); }
.dv-count { font-size: 12.5px; font-weight: 800; color: var(--pink); }

/* ===== responsive sidebar panels (container queries follow the resizable sidebar width) ===== */
.side { container: side / inline-size; overflow-x: hidden; }
.panel { min-width: 0; }
.panel * { min-width: 0; }
.panel .inp, .panel textarea, .panel select { max-width: 100%; }
.seg { overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { white-space: nowrap; flex: 1 1 auto; }
.src-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; }
.src-head b { margin-right: auto; color: var(--ink-2); }
.src-head .inp { flex: 1 1 140px; padding: 8px 12px; font-size: 12.5px; order: 5; }
.src-head .btn.danger:hover { color: #e0446f; }
.src-list { max-height: min(46vh, 420px); overflow-y: auto; padding: 4px 6px 6px 2px; scrollbar-width: thin; }
.src-list.folded { display: none; }
.src-list li .nm { font-size: clamp(11.5px, 3.2cqi, 13px); }
.topic-chips button { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.topic-inp { font-size: clamp(13px, 3.6cqi, 15px); }

/* narrow sidebar */
@container side (max-width: 380px) {
  .panel { padding: 16px 14px; border-radius: 22px; }
  .panel-h h2 { font-size: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .seg button { font-size: 11.5px; padding: 8px 4px; }
  .seg.small button { font-size: 11px; }
  .topic-chips button { font-size: 11px; padding: 5px 9px; }
  .src-list li { gap: 8px; padding: 8px; }
  .src-list li small { display: none; }
  .row .inp { min-width: 0; }
  .row .btn { flex: 1 1 auto; }
  .tpl-grid { grid-template-columns: repeat(3, 1fr); }
  .count-row { flex-wrap: wrap; } .count-row .seg { flex: 1 1 100%; }
  .nar-head b small { display: none; }
}
/* wide sidebar: use the extra room */
@container side (min-width: 520px) {
  .src-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2.auto3 { grid-template-columns: repeat(3, 1fr); }
  .topic-chips { gap: 8px; }
  .node-list { max-height: 460px; }
}
@container side (min-width: 640px) {
  .src-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) { .src-list { max-height: 50vh; } }

.dv-opts { display: grid; gap: 6px; margin-right: auto; }
.dv-opts small { color: var(--ink-3); font-weight: 500; }

/* ===== sidebar bottom aligned with the timeline viewer ===== */
.side { max-height: min(calc(100vh - 100px), var(--stage-h, calc(100vh - 100px))); overflow-x: hidden !important; }
.resizer { height: min(calc(100vh - 100px), var(--stage-h, calc(100vh - 100px))); }
@media (max-width: 1080px) { .side { max-height: none; } }
/* hint sits outside the stage box so the stage bottom == viewer bottom */
.stage-hint { position: absolute; left: 0; right: 0; top: 100%; margin-top: 10px !important; }
.layout { padding-bottom: 44px; }
@media (max-width: 1080px) { .stage-hint { position: static; } }

/* ===== history pagination ===== */
.hist-pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.hist-pager button { min-width: 36px; height: 36px; padding: 0 10px; border: 0; border-radius: 12px; cursor: pointer; background: var(--bg); box-shadow: var(--neu-sm); font: inherit; font-size: 13px; font-weight: 800; color: var(--ink-2); transition: .2s; }
.hist-pager button:hover:not(:disabled) { color: var(--pink); transform: translateY(-1px); }
.hist-pager button.on { color: #fff; background: linear-gradient(135deg, var(--pink), var(--orange)); box-shadow: 0 6px 14px rgba(239,94,143,.35); }
.hist-pager button:disabled { opacity: .35; cursor: default; }
.hist-pager .hp-gap { color: var(--ink-3); padding: 0 2px; }
.hist-pager .hp-info { margin-right: 10px; font-size: 12px; font-weight: 700; color: var(--ink-3); }

/* ===== Google login chip · admin mode ===== */
.login-chip { gap: 7px; padding: 0 12px 0 6px; }
.login-chip img, .login-chip .av, .login-chip .g, .au img, .au .av { width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; }
.login-chip .g { background: #fff; color: var(--blue); box-shadow: 0 2px 6px rgba(38,50,74,.15); }
.login-chip .av, .au .av { background: linear-gradient(135deg, var(--pink), var(--orange)); color: #fff; text-transform: uppercase; }
.login-chip.is-admin { box-shadow: var(--neu-out, 0 0 0 transparent), 0 0 0 2px rgba(247,166,74,.55); }
.st { font-style: normal; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; background: #e4e8f0; color: var(--ink-2); }
.st.pending { background: #fff1dd; color: #c27417; }
.st.approved { background: #d9f6ee; color: #12896f; }
.st.rejected { background: #fde2ea; color: #c23b68; }
.auth-msg { font-size: 14px; line-height: 1.7; color: var(--ink-2); margin: 6px 0 14px; }
.auth-msg .err, .hint.err, #admErr { color: #c23b68; }
.auth-msg .pend { color: #c27417; }
.auth-msg .btn { margin-left: 6px; vertical-align: middle; }
.gsi-btn { display: flex; justify-content: center; min-height: 48px; padding: 6px 0 10px; }
.admin-box { width: min(900px, 100%); }
.adm-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.adm-head small { color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.adm-wrap { overflow-x: auto; border-radius: 16px; box-shadow: var(--neu-in, inset 0 0 0 1px #dfe4ee); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.adm-table th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid #dfe4ee; }
.adm-table td { padding: 10px 12px; border-bottom: 1px solid #e8ecf3; vertical-align: middle; color: var(--ink-2); }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table td.adm-empty { text-align: center; color: var(--ink-3); padding: 22px; }
.adm-table .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.au { display: flex; align-items: center; gap: 10px; }
.au b { display: block; color: var(--ink); font-size: 13px; }
.au small { color: var(--ink-3); font-size: 12px; }
#authModal [hidden], #adminModal [hidden] { display: none !important; }

/* ===== shortform recording overlay ===== */
.short-ov { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(38,50,74,.35); backdrop-filter: blur(6px); }
.short-box { width: min(380px, 92vw); background: var(--surface); border-radius: 26px; padding: 24px; text-align: center; box-shadow: 0 30px 80px rgba(38,50,74,.3); }
.short-box b { font-size: 18px; }
.short-box p { font-size: 13px; color: var(--ink-2); margin: 8px 0 16px; line-height: 1.6; }
.short-bar { height: 10px; border-radius: 6px; background: #e1e6ef; overflow: hidden; }
.short-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--orange), var(--teal)); transition: width .3s; }
.short-box small { display: block; margin: 10px 0 14px; color: var(--ink-3); font-weight: 600; }

.short-pick { width: min(460px, 94vw); }
.short-pick em { font-style: normal; color: #c27417; font-size: 12.5px; }
.sp-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 14px; }
.sp-style { border: 0; cursor: pointer; padding: 10px 8px 12px; border-radius: 18px; background: var(--surface); box-shadow: 4px 4px 10px #cfd5e1, -4px -4px 10px #fff; font: inherit; color: var(--ink); transition: .2s; }
.sp-style i { display: block; height: 74px; border-radius: 12px; margin-bottom: 8px; }
.sp-style b { display: block; font-size: 13.5px; }
.sp-style small { display: block; font-size: 11px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; }
.sp-style.on { box-shadow: 0 0 0 3px var(--pink), 0 10px 22px rgba(239,94,143,.25); }
.sp-neon i { background: radial-gradient(circle at 30% 30%, rgba(255,77,141,.8), transparent 55%), radial-gradient(circle at 75% 70%, rgba(25,227,177,.7), transparent 55%), linear-gradient(160deg, #070a18, #1a0f3a); }
.sp-pop i { background: radial-gradient(circle, rgba(255,255,255,.35) 2px, transparent 2.5px) 0 0/12px 12px, #ef5e8f; border: 3px solid #14121f; box-shadow: 4px 4px 0 #14121f; }
.sp-soft i { background: radial-gradient(circle at 25% 35%, rgba(239,94,143,.35), transparent 55%), radial-gradient(circle at 75% 65%, rgba(34,195,160,.35), transparent 55%), #f3f5f9; }
.sp-len { margin: 0 auto 14px; width: max-content; }

.sp-yt { justify-content: center; margin: 0 0 12px; font-size: 12.5px; }
.sp-yt small { color: var(--ink-3); }
