/* Lyric Motion Studio — FrameGlitch cinematic-glass language */
.lm-studio{
  --lm-a:#ff2eaa;--lm-b:#9b5cff;--lm-c:#00dcff;
  display:flex;flex-direction:column;gap:10px;padding:4px 2px 8px;color:#e8edf6;min-width:0;min-height:0;flex:1;overflow:hidden;
}
.lm-studio *{box-sizing:border-box}
.living-storyboard[data-mode="lyric"]{padding:8px 0;min-height:0;overflow:hidden;display:flex;flex-direction:column}
.canvas-viewport-mode .living-storyboard[data-mode="lyric"]>.lm-studio{flex:1;min-height:0;height:auto}
.lm-head{
  flex:none;position:relative;isolation:isolate;overflow:hidden;
  display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:12px;
  min-height:52px;padding:8px 12px 8px 16px;border-radius:14px;border:1px solid rgba(255,92,200,.35);
  background:#05060d;box-shadow:var(--ux-shadow,0 14px 36px rgba(2,4,14,.45));
}
.lm-head::before{
  content:'';position:absolute;inset:0;z-index:-2;
  background:var(--lm-hero) right center/cover no-repeat;
  filter:saturate(1.2) brightness(1.05);transform:scale(1.03);
}
.lm-head::after{
  content:'';position:absolute;inset:0;z-index:-1;
  background:linear-gradient(90deg,rgba(5,6,13,.94) 0%,rgba(5,6,13,.78) 34%,rgba(5,6,13,.28) 68%,rgba(5,6,13,.55) 100%);
}
.lm-head-title{position:relative;z-index:1;min-width:0;flex:1 1 auto}
.lm-head h2{
  margin:0;font-size:17px;line-height:1.2;color:#fff;letter-spacing:.01em;font-weight:750;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  text-shadow:0 0 22px rgba(255,46,170,.4),0 1px 2px #000a;
}
.lm-head-actions{position:relative;z-index:1;display:flex;flex-wrap:nowrap;gap:6px;flex:none;align-items:center}
.lm-head-btn,.living-storyboard .lm-head-btn{
  min-height:28px!important;height:28px!important;padding:0 10px!important;margin:0!important;
  font-size:11px!important;line-height:1!important;border-radius:7px!important;white-space:nowrap;
  background:rgba(8,12,22,.72)!important;border:1px solid rgba(255,255,255,.18)!important;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);box-shadow:none!important;
}
.lm-head-btn:hover,.living-storyboard .lm-head-btn:hover{border-color:rgba(157,240,255,.55)!important;color:#fff!important}
.lm-layout{
  flex:1;display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,360px);gap:14px;align-items:stretch;min-height:0;overflow:hidden;
}
@media (max-width:1100px){
  .lm-layout{grid-template-columns:1fr;overflow:auto}
  .lm-main,.lm-side{max-height:none;height:auto;overflow:visible}
}
.lm-main{
  display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0;height:100%;
  padding:16px;border-radius:20px;border:1px solid transparent;
  background:var(--ux-fill,rgba(13,18,40,.55)) padding-box,var(--ux-edge,linear-gradient(135deg,rgba(168,186,255,.4),rgba(76,204,240,.3))) border-box;
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
  overflow:auto;overscroll-behavior:contain;
}
.lm-side{
  display:flex;flex-direction:column;gap:0;min-width:0;min-height:0;height:100%;
  padding:10px;border-radius:20px;border:1px solid transparent;
  background:var(--ux-fill,rgba(13,18,40,.55)) padding-box,var(--ux-edge,linear-gradient(135deg,rgba(168,186,255,.4),rgba(76,204,240,.3))) border-box;
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
  overflow:hidden;overscroll-behavior:contain;
}
.lm-dock{display:flex;flex-direction:column;gap:0;min-height:0;flex:1;height:100%;overflow:hidden;border:1px solid #2a3548;border-radius:8px;background:#0a111d}
/* Premiere風タブ帯：左=スクロール可能なタブ、右=≡のみ（タブを絶対に覆わない） */
.lm-dock-head{
  flex:none;display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:stretch;
  background:#232a36;border-bottom:1px solid #0a0e14;min-width:0;overflow:visible;z-index:8;height:27px;
}
.lm-tabbar{
  display:flex;flex-wrap:nowrap;gap:0;overflow-x:auto;overflow-y:hidden;min-width:0;max-width:100%;padding:0;height:27px;
  scrollbar-width:none;background:#232a36;
}
.lm-tabbar::-webkit-scrollbar{display:none;height:0}
.lm-tab,.living-storyboard .lm-tab{
  flex:0 0 auto;appearance:none;border:0!important;border-right:1px solid #ffffff0c!important;border-radius:0!important;background:transparent!important;
  color:#b6c2d4!important;padding:0!important;margin:0!important;font:inherit;cursor:pointer;white-space:nowrap;height:27px!important;min-height:0!important;
  position:relative;z-index:1;pointer-events:auto;box-shadow:none!important;
}
.lm-tab-label{display:block;padding:0 10px;font-size:12px;font-weight:550;letter-spacing:.01em;line-height:27px;pointer-events:none}
.lm-tab:hover,.living-storyboard .lm-tab:hover{background:#2c3442!important;border-color:transparent!important;color:#e8eef8!important}
.lm-tab.is-open,.living-storyboard .lm-tab.is-open{color:#d0d8e6!important;background:#1c2330!important}
.lm-tab.selected,.living-storyboard .lm-tab.selected{background:#0a111d!important;color:#fff!important;box-shadow:inset 0 -1px 0 #4db8ff;z-index:2;border-color:transparent!important}
.lm-tab.dragging{opacity:.45}
.lm-tab.drag-over{background:#2a3a55;outline:1px dashed #7ecbff;outline-offset:-2px}
.lm-dock-menu{position:relative;display:flex;align-items:stretch;border-left:1px solid #ffffff10;background:#232a36;z-index:3;height:27px}
.lm-dock-menu-btn{
  width:24px;min-width:24px;height:27px;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
  background:transparent!important;color:#b6c2d4!important;font-size:12px!important;line-height:1;cursor:pointer;
  box-shadow:none!important;min-height:0!important;
}
.lm-dock-menu-btn:hover{background:#232b3a!important;color:#fff!important}
.lm-dock-menu-pop{
  position:absolute;right:0;top:100%;z-index:40;min-width:148px;padding:6px;
  border:1px solid #3a4660;border-radius:8px;background:#121926;box-shadow:0 12px 28px #000a;
}
.lm-dock-menu-item{
  display:block;width:100%;text-align:left;padding:8px 10px!important;margin:0 0 2px!important;border:0!important;border-radius:6px!important;
  background:transparent!important;color:#d5deee!important;font-size:12px!important;cursor:pointer;box-shadow:none!important;min-height:0!important;
}
.lm-dock-menu-item:hover{background:#243044!important}
.lm-dock-menu-item.selected{background:#1c3355!important;color:#fff!important}
.lm-dock-body{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:10px 10px 16px;scroll-padding-bottom:16px;background:#0a111d;scrollbar-width:thin}
.lm-dock-foot{flex:none;padding:8px 10px;border-top:1px solid #ffffff12;background:#0c1320}
.lm-dock-foot .lm-dock-export,.living-storyboard .lm-dock-foot .lm-dock-export{width:100%!important;min-height:36px!important;justify-content:center;border-radius:10px!important}
.lm-dock.is-stack .lm-dock-body{display:flex;flex-direction:column;gap:14px}
.lm-dock.is-tabs .lm-dock-body{display:flex;flex-direction:column;overflow:hidden;padding-bottom:10px}
.lm-dock.is-tabs .lm-dock-pane{border:0;border-radius:0;background:transparent;box-shadow:none}
.lm-dock.is-tabs .lm-dock-pane:not(.is-active){display:none!important}
.lm-dock.is-tabs .lm-dock-pane.is-active{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.lm-dock.is-tabs .lm-dock-pane.is-active>.lm-panel-body{flex:1;min-height:0;overflow:auto;scrollbar-width:thin;overscroll-behavior:contain}
/* キーパネル：上のテンプレで下を潰さない。本体をスクロールしフッタ（キャンバスへ送る）は常に残す */
.lm-dock.is-tabs .lm-dock-pane[data-panel="keys"].is-active>.lm-panel-body{
  display:block;overflow:auto;padding-bottom:14px;scroll-padding-bottom:18px;
}
.lm-dock-pane{border:1px solid #ffffff14;border-radius:8px;background:#0c1320;overflow:visible;min-width:0;flex:0 0 auto}
.lm-dock-pane-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;font-size:11px;letter-spacing:.06em;color:#9bb0cc;background:#121a2a;border-bottom:1px solid #ffffff10;font-weight:700;border-radius:8px 8px 0 0}
.lm-dock-pane-head>strong{font-size:11px;font-weight:700}
.lm-pane-close{min-width:28px!important;min-height:28px!important;padding:0!important;border-radius:6px!important;background:#182235!important;border:1px solid #ffffff18!important;color:#c9d4e8!important}
.lm-panel-body{display:flex;flex-direction:column;gap:10px;padding:10px;min-width:0;overflow:visible}
.lm-style-lead{margin:0;font-size:11px;letter-spacing:.08em;color:#9aa6c0;font-weight:700}
.lm-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.lm-toolbar .lm-spacer{flex:1}
.lm-chip{
  display:inline-flex;align-items:center;height:26px;padding:0 10px;border-radius:999px;
  border:1px solid rgba(255,255,255,.16);background:rgba(5,6,13,.45);font-size:12px;color:#c9d2e6;
}
.lm-chip.is-on{border-color:rgba(0,220,255,.55);color:#9df0ff}
button.lm-shortcut-tip{
  cursor:help;border-style:dashed;color:#9ec4ff;letter-spacing:.02em;
}
button.lm-shortcut-tip:hover{border-color:rgba(0,220,255,.45);color:#c8ecff}
.lm-preview{
  position:relative;aspect-ratio:16/9;border-radius:16px;overflow:hidden;isolation:isolate;
  background:#05060d;border:1px solid rgba(255,255,255,.1);
}
.lm-preview video,.lm-preview .lm-preview-bg{
  position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#05060d;
}
.lm-preview-bg{background:radial-gradient(ellipse at 50% 40%,rgba(123,44,255,.22),transparent 60%),#05060d}
.lm-preview-stage{
  position:absolute;z-index:2;pointer-events:auto;cursor:grab;touch-action:none;max-width:88%;max-height:70%;
  display:grid;place-items:center;text-align:center;
}
.lm-preview-stage.is-dragging{cursor:grabbing}
.lm-preview-drag-hint{
  position:absolute;z-index:3;left:12px;bottom:10px;padding:4px 8px;border-radius:999px;
  font-size:11px;color:#c9d6ea;background:rgba(5,8,16,.72);border:1px solid rgba(255,255,255,.12);
  pointer-events:none;
}
.lm-preview-text{
  display:grid;font-size:clamp(18px,4.2vw,42px);font-weight:800;line-height:1.25;color:#fff;
  text-shadow:0 2px 0 #000,0 0 18px rgba(255,46,170,.35);overflow-wrap:anywhere;padding:8px 14px;
  min-width:4ch;min-height:1.2em;
}
.lm-preview-text .caption-preview-layer{grid-area:1/1;paint-order:stroke fill;white-space:pre-line}
.lm-style-live-hint{margin:0 0 8px;font-size:11px;line-height:1.45;color:#9ec4ff}
.lm-main-replay{width:100%!important;margin:0 0 8px!important}
.lm-preview-text.is-karaoke{
  text-shadow:none;filter:none;color:transparent;background:none;
}
.lm-preview-text .caption-karaoke-edge{
  color:transparent!important;-webkit-text-fill-color:transparent!important;
}
.lm-preview-text .caption-karaoke-fill{
  background-image:linear-gradient(90deg,var(--lm-kar,#4fd1ff) 0 50%,#ffffff 50% 100%);
  background-size:200% 160%!important;background-position:0 50%;
  -webkit-background-clip:text;background-clip:text;
  color:transparent!important;-webkit-text-fill-color:transparent!important;
  padding:0.12em 0;margin:-0.12em 0;
}
.lm-transport{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.lm-play{
  display:grid;place-items:center;width:42px;height:42px;border:0;border-radius:50%;cursor:pointer;color:#fff;
  background:linear-gradient(135deg,var(--lm-a),var(--lm-b) 55%,var(--lm-c));
  box-shadow:0 0 20px rgba(255,46,170,.45);
}
.lm-play:hover{transform:scale(1.05)}
.lm-time{font-variant-numeric:tabular-nums;font-size:13px;color:#9df0ff;min-width:9ch}
.lm-seek{flex:1;min-width:120px;accent-color:var(--lm-c)}
.lm-timeline{
  position:relative;height:264px;border-radius:14px;border:1px solid rgba(255,255,255,.1);
  background:#05060d;overflow:auto;user-select:none;touch-action:pan-x;padding-left:10px;
}
.lm-ruler{position:absolute;left:0;right:0;top:0;height:30px;border-bottom:1px solid rgba(255,255,255,.14);cursor:pointer;z-index:5}
.lm-ruler-mark,.living-storyboard .lm-ruler-mark{
  position:absolute;top:0;transform:translateX(-50%);white-space:nowrap;height:30px;margin:0!important;padding:0 2px!important;
  border:0!important;border-radius:0!important;background:transparent!important;color:#d7e6ff!important;
  font-size:11px!important;font-weight:700!important;font-variant-numeric:tabular-nums;letter-spacing:0;
  box-shadow:none!important;cursor:pointer;z-index:1;line-height:30px;
}
.lm-ruler-mark::after{
  content:"";position:absolute;left:50%;bottom:0;width:1px;height:8px;background:rgba(157,240,255,.45);transform:translateX(-50%);
}
.lm-ruler-mark:hover,.living-storyboard .lm-ruler-mark:hover{color:#fff!important;background:rgba(157,240,255,.14)!important}
.lm-beats{position:absolute;inset:30px 0 0;pointer-events:none}
.lm-beats i{position:absolute;top:0;bottom:0;width:1px;background:rgba(0,220,255,.18)}
.lm-beats i.bar{background:rgba(255,46,170,.35);width:2px}
.lm-track{position:absolute;left:0;right:0;top:38px;bottom:8px}
.lm-clip{
  position:absolute;top:8px;height:calc(100% - 16px);border-radius:10px;padding:6px 12px;overflow:hidden;
  border:1px solid rgba(255,255,255,.18);background:linear-gradient(135deg,rgba(255,46,170,.35),rgba(0,220,255,.22));
  color:#fff;font-size:12px;line-height:1.3;cursor:grab;display:flex;flex-direction:column;justify-content:center;gap:2px;
  box-shadow:0 8px 20px rgba(0,0,0,.35);touch-action:none;
}
.lm-clip strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.lm-clip small{opacity:.8;font-variant-numeric:tabular-nums}
.lm-clip.selected{outline:2px solid #9df0ff;outline-offset:0;z-index:2;box-shadow:0 0 0 2px #9df0ff66,0 8px 20px rgba(0,0,0,.35)}
.lm-clip.dragging{cursor:grabbing;opacity:.92;z-index:3}
.lm-clip.resizing{cursor:ew-resize;opacity:.95;z-index:3}
.lm-clip-edge{
  position:absolute;top:0;bottom:0;width:10px;z-index:5;cursor:ew-resize;touch-action:none;
}
.lm-clip-edge.is-start{left:0}
.lm-clip-edge.is-end{right:0}
.lm-clip-edge::after{
  content:"";position:absolute;top:18%;bottom:18%;width:3px;border-radius:99px;
  background:rgba(255,255,255,.55);box-shadow:0 0 8px rgba(157,240,255,.35);
}
.lm-clip-edge.is-start::after{left:3px}
.lm-clip-edge.is-end::after{right:3px}
.lm-clip:hover .lm-clip-edge::after,.lm-clip.selected .lm-clip-edge::after,.lm-clip.resizing .lm-clip-edge::after{
  background:#9df0ff;box-shadow:0 0 10px rgba(157,240,255,.7);
}
.lm-kf-dot{position:absolute;top:3px;width:7px;height:7px;margin-left:-3px;border-radius:50%;background:#fff;box-shadow:0 0 8px rgba(0,220,255,.9);pointer-events:none}
.lm-playhead{
  position:absolute;top:0;bottom:0;width:2px;background:#fff;box-shadow:0 0 10px rgba(255,255,255,.7);
  pointer-events:auto;z-index:6;cursor:ew-resize;touch-action:none;
}
.lm-playhead::before{
  content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);
  width:12px;height:12px;border-radius:0 0 2px 2px;background:#fff;
}
.lm-playhead::after{content:"";position:absolute;inset:0 -6px;cursor:ew-resize}
.lm-timeline.is-scrubbing,.lm-timeline.is-scrubbing .lm-ruler,.lm-timeline.is-scrubbing .lm-playhead{cursor:ew-resize}
.lm-keys{margin:0;padding:0 0 4px;display:flex;flex-direction:column;gap:8px;flex:none;min-height:auto;overflow:visible}
.lm-keys>h4,.lm-keys>.lm-motion-cards,.lm-keys>.lm-key-add,.lm-keys>.lm-hint,.lm-keys>.lm-key-guide,.lm-keys>.lm-key-list,.lm-keys>.lm-keys-subtabs,.lm-keys>.lm-keys-subpane{flex:none}
.lm-keys>h4{margin:0}
.lm-keys-subtabs{
  display:grid;grid-template-columns:1fr 1fr;gap:2px;padding:3px;margin:0;
  border-radius:10px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04);
}
.lm-keys-subtab,.living-storyboard .lm-keys-subtab{
  min-width:0!important;min-height:28px!important;height:auto!important;margin:0!important;padding:5px 8px!important;
  border-radius:7px!important;border:0!important;background:transparent!important;color:#9aabc4!important;
  font-size:12px!important;font-weight:700!important;line-height:1.2;text-align:center;box-shadow:none!important;
  letter-spacing:.04em;cursor:pointer;
}
.lm-keys-subtab:hover{color:#e8edf6!important;background:rgba(255,255,255,.06)!important}
.lm-keys-subtab.selected{
  color:#fff!important;background:rgba(96,160,255,.24)!important;
  box-shadow:inset 0 0 0 1px rgba(140,190,255,.42)!important;
}
.lm-keys-subpane{display:flex;flex-direction:column;gap:8px;min-width:0}
.lm-key-subh{margin:10px 0 4px!important;font-size:11px!important;letter-spacing:.06em;color:#9ec4ff!important;font-weight:800!important}
.lm-key-guide{
  margin:0;padding:10px 11px;border-radius:10px;border:1px solid rgba(157,240,255,.22);
  background:rgba(20,36,58,.55);color:#c5d3e8;
}
.lm-key-guide>p{margin:0 0 6px;font-size:12px;line-height:1.55;color:#d7e2f3}
.lm-key-steps{margin:0;padding:0 0 0 1.15em;font-size:11px;line-height:1.55;color:#aab6cf}
.lm-key-steps>li{margin:0 0 4px}
.lm-key-add,.living-storyboard .lm-key-add{width:100%!important;min-height:36px!important;justify-content:center;border-radius:8px!important;font-size:12px!important}
.lm-key-list{display:flex;flex-direction:column;gap:6px;flex:none;min-height:auto;overflow:visible;padding-bottom:6px}
.lm-key-item{
  display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:8px;
  border:1px solid rgba(255,255,255,.14);background:rgba(5,6,13,.5);
}
.lm-key-ease{
  display:flex;flex-direction:column;gap:5px;padding:6px;border-radius:8px;
  border:1px solid rgba(157,240,255,.18);background:rgba(12,28,48,.4);
}
.lm-key-ease-label{font-size:10px;font-weight:700;letter-spacing:.04em;color:#9ec4ff;line-height:1.2}
.lm-key-ease-presets{display:flex;flex-wrap:wrap;gap:3px}
.lm-key-ease-chip,.living-storyboard .lm-key-ease-chip{
  min-width:0!important;min-height:22px!important;margin:0!important;padding:2px 7px!important;
  border-radius:999px!important;border:1px solid rgba(255,255,255,.14)!important;
  background:rgba(8,12,22,.7)!important;color:#b7c6de!important;font-size:10px!important;font-weight:600!important;
  box-shadow:none!important;cursor:pointer;line-height:1.2!important;
}
.lm-key-ease-chip:hover{border-color:rgba(157,240,255,.35)!important;color:#e8f4ff!important}
.lm-key-ease-chip.selected{
  color:#fff!important;border-color:rgba(140,190,255,.55)!important;
  background:rgba(96,160,255,.28)!important;
}
.lm-key-ease-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:6px;align-items:start}
.lm-bezier-graph{
  width:100%;height:auto;aspect-ratio:200/110;display:block;
  border-radius:6px;background:#070b14;border:1px solid rgba(255,255,255,.1);
  touch-action:none;
}
.lm-bezier-grid{stroke:rgba(255,255,255,.08);stroke-width:1}
.lm-bezier-curve{fill:none;stroke:#6ecbff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.lm-bezier-handle-line{stroke:rgba(158,196,255,.45);stroke-width:1.2;stroke-dasharray:3 3}
.lm-bezier-end{fill:#cfe8ff;stroke:#0a111d;stroke-width:1}
.lm-bezier-ctrl{fill:#ff6bcb;stroke:#fff;stroke-width:1.4;cursor:grab}
.lm-bezier-ctrl:active{cursor:grabbing}
.lm-key-ease-nums{display:grid;grid-template-columns:1fr 1fr;gap:4px;align-content:start;min-width:0}
.lm-key-ease-num{display:flex;flex-direction:column;gap:1px;font-size:9px;color:#9aa8c2;min-width:0;line-height:1.15}
.lm-key-ease-num>span{line-height:1.1}
.lm-key-item .lm-key-ease-num>input.caption-range-num,
.lm-key-item .lm-key-ease-num>input,
.living-storyboard .lm-key-item .lm-key-ease-num>input.caption-range-num{
  width:100%!important;min-width:0!important;max-width:none!important;flex:none!important;
  height:22px!important;min-height:22px!important;box-sizing:border-box!important;
  margin:0!important;padding:1px 3px!important;border-radius:0!important;
  border:1px solid rgba(255,255,255,.22)!important;background:#0a1018!important;color:#e8edf6!important;
  font-size:11px!important;font-weight:600!important;line-height:1.1!important;
  font-variant-numeric:tabular-nums;text-align:right;letter-spacing:0;
  appearance:textfield;-moz-appearance:textfield;
}
.lm-key-ease-end{margin:0!important;font-size:10px!important;color:#8fa0b8!important;line-height:1.3}
@media (max-width:420px){
  .lm-key-ease-row{grid-template-columns:1fr}
}
.lm-keys-monitor-hint{margin:0 0 6px!important;padding:6px 8px;border:1px solid rgba(157,240,255,.28);background:rgba(157,240,255,.06);color:#d7eefc!important;font-size:11px!important;line-height:1.35}
.lm-key-head,.living-storyboard .lm-key-head{
  display:flex!important;align-items:flex-start;justify-content:space-between;gap:6px;
  width:100%;margin:0!important;padding:5px 8px!important;border:0!important;border-radius:0!important;
  background:rgba(255,255,255,.04)!important;color:inherit!important;text-align:left!important;cursor:pointer;
  box-shadow:none!important;
}
.lm-key-head:hover,.living-storyboard .lm-key-head:hover{background:rgba(157,240,255,.08)!important}
.lm-key-item.is-active{border-color:rgba(157,240,255,.55);box-shadow:inset 0 0 0 1px rgba(157,240,255,.25)}
.lm-key-title{display:grid;gap:1px;min-width:0}
.lm-key-title strong{font-size:12px;color:#9df0ff;font-variant-numeric:tabular-nums;line-height:1.2}
.lm-key-title small{font-size:9px;color:#8fa0b8;line-height:1.2}
.lm-key-sum{font-size:9px;color:#aab6cf;white-space:nowrap;line-height:1.2}
.lm-key-edits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 6px}
.lm-key-cell{display:grid;gap:1px;min-width:0}
.lm-key-cell>span{font-size:9px;line-height:1.15;color:#9ec4ff;letter-spacing:.02em;font-weight:700}
.lm-key-item .lm-key-cell input.caption-range-num,
.lm-key-item .lm-key-cell input,
.lm-key-item .lm-key-edits input,
.living-storyboard .lm-key-item .lm-key-cell input.caption-range-num{
  width:100%!important;min-width:0!important;max-width:none!important;flex:none!important;
  height:24px!important;min-height:24px!important;box-sizing:border-box!important;
  margin:0!important;padding:2px 5px!important;border-radius:0!important;
  border:1px solid rgba(255,255,255,.2)!important;background:rgba(5,6,13,.55)!important;color:#e8edf6!important;
  font-size:11px!important;font-weight:600!important;line-height:1.1!important;
  font-variant-numeric:tabular-nums;text-align:right;letter-spacing:0;
  appearance:textfield;-moz-appearance:textfield;
}
.lm-key-cell:last-child:nth-child(odd){grid-column:1/-1}
.lm-key-ops{display:grid;grid-template-columns:1.4fr 1fr;gap:5px}
.lm-key-ops>button,.living-storyboard .lm-key-ops>button{min-height:28px!important;padding:4px 6px!important;font-size:10px!important;border-radius:7px!important;white-space:normal;line-height:1.2}
.lm-side h3{margin:0 0 8px;font-size:15px;color:#fff}
.lm-side h4{margin:14px 0 8px;font-size:12px;letter-spacing:.08em;color:#9aa6c0;font-weight:700}
.lm-field{display:grid;gap:6px;margin-bottom:10px}
.lm-field label{font-size:12px;color:#aab6cf}
.lm-field textarea,.lm-field input,.lm-field select{
  width:100%;border-radius:12px;border:1px solid rgba(255,255,255,.14);background:rgba(5,6,13,.55);
  color:#e8edf6;padding:10px 12px;font:inherit;resize:vertical;
}
.lm-field textarea{min-height:120px}
.lm-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.lm-hint{margin:0;font-size:12px;line-height:1.6;color:#8f9bb5}
.lm-empty{
  display:grid;place-items:center;gap:10px;min-height:220px;padding:28px;text-align:center;
  border-radius:16px;border:1.5px dashed rgba(255,92,200,.4);background:rgba(5,6,13,.45);color:#b9c3dc;
}
.lm-empty strong{font-size:18px;color:#fff}
/* —— ムード選択（作り直し） —— */
.lm-mood-picker{display:flex;flex-direction:column;gap:8px;min-width:0}
.lm-mood-head{display:flex;align-items:center;gap:10px}
.lm-mood-kicker{font-size:11px;letter-spacing:.08em;color:#8fa0b8;font-weight:700}
.lm-mood-search-wrap{
  display:flex;align-items:center;gap:8px;width:100%;min-height:34px;box-sizing:border-box;
  padding:0 10px;border-radius:10px;border:1px solid rgba(255,255,255,.14);
  background:rgba(5,6,13,.65);color:#9aa8c2;cursor:text;
}
.lm-mood-search-wrap:focus-within{border-color:rgba(255,92,200,.55);color:#e8edf6}
.lm-mood-search-icon{flex:none;display:grid;place-items:center;opacity:.85}
.lm-mood-search{
  flex:1;min-width:0;min-height:32px;margin:0;padding:7px 0;border:0;border-radius:0;
  background:transparent;color:#e8edf6;font:inherit;font-size:12px;outline:none;
  appearance:none;-webkit-appearance:none;
}
.lm-mood-search::-webkit-search-decoration,
.lm-mood-search::-webkit-search-cancel-button{-webkit-appearance:none}
.lm-mood-tabs{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;padding:3px;
  border-radius:12px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.05);
}
.lm-mood-tabs>button,.living-storyboard .lm-mood-tabs>button{
  min-width:0!important;min-height:30px!important;height:auto!important;margin:0!important;padding:5px 2px!important;
  border-radius:8px!important;border:0!important;background:transparent!important;color:#9aabc4!important;
  font-size:11px!important;font-weight:600!important;line-height:1.2;text-align:center;box-shadow:none!important;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.lm-mood-tabs>button:hover{color:#e8edf6!important;background:rgba(255,255,255,.06)!important}
.lm-mood-tabs>button.selected{
  color:#fff!important;background:rgba(96,160,255,.22)!important;
  box-shadow:inset 0 0 0 1px rgba(140,190,255,.4)!important;
}
.lm-mood-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:8px;
  padding:8px;border-radius:12px;border:1px solid rgba(255,255,255,.1);background:rgba(8,6,16,.35);
}
.lm-mood-card,.living-storyboard .lm-mood-card{
  display:flex!important;align-items:center;justify-content:flex-start;gap:8px;
  box-sizing:border-box;height:52px!important;min-height:52px!important;max-height:52px!important;
  margin:0!important;padding:0 12px!important;
  border-radius:12px!important;border:1px solid rgba(255,255,255,.12)!important;
  border-left:3px solid var(--mood-swatch,#ff5cc8)!important;
  background:rgba(12,10,22,.75)!important;color:#e8edf6!important;text-align:left!important;
  box-shadow:none!important;cursor:pointer;overflow:hidden;
}
.lm-mood-card-body{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px;align-items:flex-start;padding-right:2px}
.lm-mood-card strong{font-size:13px;font-weight:700;line-height:1.15;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.lm-mood-card-blurb{font-size:11px;line-height:1.2;color:#9aa8c2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.lm-mood-card:hover,.living-storyboard .lm-mood-card:hover{
  border-color:color-mix(in srgb,var(--mood-swatch,#ff5cc8) 50%,#fff 10%)!important;
  background:rgba(255,255,255,.06)!important;
}
.lm-mood-card.selected,.living-storyboard .lm-mood-card.selected{
  border-color:var(--mood-swatch,#ff5cc8)!important;
  background:color-mix(in srgb,var(--mood-swatch,#ff5cc8) 22%,#0a111d)!important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--mood-swatch,#ff5cc8) 35%,transparent)!important;
}
.lm-mood-flyout{
  position:fixed;z-index:90;width:360px;min-height:248px;margin:0;padding:16px 18px;
  display:flex;flex-direction:column;justify-content:center;gap:8px;
  border-radius:14px;border:1px solid color-mix(in srgb,var(--mood-swatch,#ff5cc8) 55%,#fff 0%);
  background:#141a28;box-shadow:0 16px 36px rgba(0,0,0,.5);pointer-events:none;overflow:visible;
}
.lm-mood-flyout[hidden]{display:none!important}
.lm-mood-flyout-stage{
  min-height:132px;display:grid;place-items:center;overflow:hidden;
  padding:36px 30px;box-sizing:border-box;
  border-radius:10px;background:rgba(0,0,0,.32);border:1px solid rgba(255,255,255,.08);
}
.lm-mood-flyout-stage.has-bag{border-color:rgba(0,0,0,.25)}
.lm-mood-flyout-stage.is-dim{background:rgba(8,10,14,.72)}
.lm-mood-flyout-stage.is-liminal{background:linear-gradient(180deg,#243044,#121826)}
.lm-mood-flyout-stage.is-karaoke{background:#0a1524;border-color:rgba(79,209,255,.28)}
.lm-mood-flyout-stage.is-marker{background:#141a22;border-color:rgba(251,191,36,.35)}
.lm-mood-flyout-sample.lm-fly-karaoke{display:inline-grid;place-items:center;color:transparent}
.lm-fly-kar-edge,.lm-fly-kar-fill{grid-area:1/1;white-space:nowrap;font:inherit;letter-spacing:inherit}
.lm-fly-kar-fill.is-playing{animation:lmFlyKaraokeFill 1.25s linear both}
.lm-mood-flyout-sample{
  font-size:28px;font-weight:800;line-height:1.55;color:#fff;white-space:nowrap;
  overflow:visible;text-align:center;max-width:96%;padding:6px 8px;
  transform-origin:50% 50%;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  text-rendering:geometricPrecision;
}
.lm-mood-flyout-sample.is-vertical{white-space:nowrap;max-height:68px;letter-spacing:.12em;line-height:1.2}
.lm-mood-flyout-sample.is-playing.lm-fly-bounce{animation:lmFlyBounce .9s cubic-bezier(.22,1.4,.36,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-charbounce{animation:lmFlyCharBounce 1s cubic-bezier(.22,1.5,.36,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-pop{animation:lmFlyPop .75s cubic-bezier(.2,1.5,.3,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-punch{animation:lmFlyPunch .7s cubic-bezier(.15,.9,.2,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-slam{animation:lmFlySlam .75s cubic-bezier(.15,.85,.2,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-snap{animation:lmFlySnap .55s cubic-bezier(.1,.9,.2,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-zoom{animation:lmFlyZoom .65s cubic-bezier(.1,.9,.2,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-blurpunch{animation:lmFlyBlurPunch .7s cubic-bezier(.12,.9,.2,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-soft{animation:lmFlySoft 1.1s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-cinema{animation:lmFlyCinema 1.25s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-credit{animation:lmFlyCredit 1.3s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-docu{animation:lmFlyDocu 1.15s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-hand{animation:lmFlyHand 1.2s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-goth{animation:lmFlyGoth 1.25s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-liminal{animation:lmFlyLiminal 1.4s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-dive{animation:lmFlyDive 1.3s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-vertical{animation:lmFlyVertical 1.2s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-bag{animation:lmFlyPop .7s cubic-bezier(.2,1.4,.3,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-whip{animation:lmFlyWhip .55s cubic-bezier(.1,.85,.2,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-scatter{animation:lmFlyScatter .85s cubic-bezier(.15,.9,.25,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-cascade{animation:lmFlyCascade .95s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-flip{animation:lmFlyFlip .85s cubic-bezier(.2,.85,.25,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-stretch{animation:lmFlyStretch .85s cubic-bezier(.2,.9,.25,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-track{animation:lmFlyTrack 1.05s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-wave{animation:lmFlyWave 1s ease-in-out both}
.lm-mood-flyout-sample.is-playing.lm-fly-glitch{animation:lmFlyGlitch .8s steps(2,end) both}
.lm-mood-flyout-sample.is-playing.lm-fly-horror{animation:lmFlyHorror .95s ease-in both}
.lm-mood-flyout-sample.is-playing.lm-fly-strobe{animation:lmFlyStrobe .7s steps(1,end) both}
.lm-mood-flyout-sample.is-playing.lm-fly-flicker{animation:lmFlyFlicker 1.05s steps(1,end) both}
.lm-mood-flyout-sample.is-playing.lm-fly-glow{animation:lmFlyGlow 1s ease-in-out both}
.lm-mood-flyout-sample.is-playing.lm-fly-echo{animation:lmFlyEcho 1s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-karaoke{animation:none}
.lm-mood-flyout-sample.is-playing.lm-fly-marker{animation:lmFlyMarker 1.15s linear both}
.lm-mood-flyout-sample.is-playing.lm-fly-rainbow{animation:lmFlyRainbow 1.1s linear both}
.lm-mood-flyout-sample.is-playing.lm-fly-type{animation:lmFlyType 1.05s steps(7,end) both}
.lm-mood-flyout-sample.is-playing.lm-fly-kinetic{animation:lmFlyKinetic .95s cubic-bezier(.2,1.2,.3,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-stroke{animation:lmFlyStroke 1.1s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-elastic{animation:lmFlyElastic .95s cubic-bezier(.34,1.56,.64,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-drop{animation:lmFlyDrop .75s cubic-bezier(.2,.9,.2,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-rise{animation:lmFlyRise 1.05s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-heartbeat{animation:lmFlyHeartbeat 1.1s ease-in-out both}
.lm-mood-flyout-sample.is-playing.lm-fly-dust{animation:lmFlyDust 1.15s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-squeeze{animation:lmFlySqueeze .85s cubic-bezier(.2,.9,.25,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-spin3d{animation:lmFlySpin3d .9s cubic-bezier(.2,.85,.25,1) both}
.lm-mood-flyout-sample.is-playing.lm-fly-jitter{animation:lmFlyJitter .7s linear both}
.lm-mood-flyout-sample.is-playing.lm-fly-wire{animation:lmFlyWire 1.05s ease both}
.lm-mood-flyout-sample.is-playing.lm-fly-swing{animation:lmFlySwing 1s ease-in-out both}
@keyframes lmFlyBounce{0%{transform:translateY(18px) scale(.9);opacity:0}45%{transform:translateY(-6px) scale(1.08);opacity:1}70%{transform:translateY(3px) scale(.96)}100%{transform:none;opacity:1}}
@keyframes lmFlyCharBounce{0%{transform:translateY(14px) scale(.85);opacity:0}35%{transform:translateY(-8px) scale(1.1);opacity:1}55%{transform:translateY(4px) scale(.94)}75%{transform:translateY(-2px) scale(1.03)}100%{transform:none;opacity:1}}
@keyframes lmFlyPop{0%{transform:scale(.35) rotate(-6deg);opacity:0}60%{transform:scale(1.14) rotate(2deg);opacity:1}100%{transform:scale(1) rotate(0);opacity:1}}
@keyframes lmFlyPunch{0%{transform:scale(1.9);opacity:0;filter:blur(2px)}70%{transform:scale(.96);opacity:1;filter:blur(0)}100%{transform:scale(1);opacity:1}}
@keyframes lmFlySlam{0%{transform:scale(1.7) rotate(-8deg);opacity:0}55%{transform:scale(.94) rotate(2deg);opacity:1}100%{transform:scale(1) rotate(0);opacity:1}}
@keyframes lmFlySnap{0%{transform:scale(1.5);opacity:0}50%{transform:scale(.92);opacity:1}100%{transform:scale(1);opacity:1}}
@keyframes lmFlyZoom{0%{transform:scale(2.1);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes lmFlyBlurPunch{0%{transform:scale(1.6);opacity:0;filter:blur(8px)}60%{transform:scale(1);opacity:1;filter:blur(0)}100%{transform:none;opacity:1}}
@keyframes lmFlySoft{0%{transform:translateX(-20px);opacity:0}100%{transform:none;opacity:1}}
@keyframes lmFlyCinema{0%{transform:translateY(10px);opacity:0;filter:blur(4px);letter-spacing:.2em}100%{transform:none;opacity:1;filter:blur(0);letter-spacing:.06em}}
@keyframes lmFlyCredit{0%{opacity:0;letter-spacing:.45em;transform:translateY(6px)}100%{opacity:.92;letter-spacing:.12em;transform:none}}
@keyframes lmFlyDocu{0%{opacity:0;transform:translateY(8px)}100%{opacity:.88;transform:none}}
@keyframes lmFlyHand{0%{opacity:0;transform:translate(4px,6px) rotate(-3deg)}40%{opacity:1}100%{opacity:1;transform:rotate(-1deg)}}
@keyframes lmFlyGoth{0%{opacity:0;transform:translateY(8px);filter:brightness(.6)}100%{opacity:1;transform:none;filter:brightness(1)}}
@keyframes lmFlyLiminal{0%{opacity:.85;letter-spacing:.28em;transform:translateY(4px)}100%{opacity:1;letter-spacing:.06em;transform:none}}
@keyframes lmFlyDive{0%{opacity:0;transform:translateY(-18px) scale(.9);filter:blur(5px)}100%{opacity:1;transform:translateY(4px);filter:blur(0)}}
@keyframes lmFlyVertical{0%{opacity:0;transform:translateY(-12px)}100%{opacity:1;transform:none}}
@keyframes lmFlyWhip{0%{transform:translateX(-30px) scale(1.3);opacity:0}100%{transform:none;opacity:1}}
@keyframes lmFlyScatter{0%{transform:translate(-14px,10px) rotate(-14deg) scale(.5);opacity:0}55%{transform:translate(5px,-4px) rotate(5deg) scale(1.05);opacity:1}100%{transform:none;opacity:1}}
@keyframes lmFlyCascade{0%{transform:translateY(14px) scale(.9);opacity:0;letter-spacing:-.1em}100%{transform:none;opacity:1;letter-spacing:.02em}}
@keyframes lmFlyFlip{0%{transform:perspective(260px) rotateY(-80deg) scale(.65);opacity:0}100%{transform:none;opacity:1}}
@keyframes lmFlyStretch{0%{transform:scaleX(.2);opacity:0}65%{transform:scaleX(1.1);opacity:1}100%{transform:scaleX(1);opacity:1}}
@keyframes lmFlyTrack{0%{letter-spacing:.4em;opacity:0}100%{letter-spacing:.08em;opacity:1}}
@keyframes lmFlyWave{0%,100%{transform:rotate(0) translateY(0)}25%{transform:rotate(-5deg) translateY(-3px)}50%{transform:rotate(4deg) translateY(2px)}75%{transform:rotate(-2deg)}}
@keyframes lmFlyGlitch{0%,100%{transform:none;opacity:1;filter:none}18%{transform:translate(4px,0);filter:hue-rotate(90deg)}36%{transform:translate(-4px,1px)}54%{transform:translate(3px,-1px);filter:hue-rotate(-40deg)}72%{transform:translate(-2px,0)}}
@keyframes lmFlyHorror{0%{opacity:0;transform:scale(1.2) skewX(8deg);filter:contrast(1.4)}40%{opacity:1;transform:skewX(-4deg)}70%{transform:skewX(2deg)}100%{transform:none;opacity:1}}
@keyframes lmFlyStrobe{0%,100%{opacity:1}12%,40%,70%{opacity:.12}26%,55%,85%{opacity:1}}
@keyframes lmFlyFlicker{0%,100%{opacity:1;filter:brightness(1.15)}10%{opacity:.35}18%{opacity:1}42%{opacity:.2}50%{opacity:1}78%{opacity:.45}}
@keyframes lmFlyGlow{0%{transform:scale(.86);opacity:.4;filter:brightness(.7)}45%{transform:scale(1.08);opacity:1;filter:brightness(1.35)}100%{transform:scale(1);opacity:1;filter:brightness(1.05)}}
@keyframes lmFlyEcho{0%{transform:scale(1.18) translateX(-8px);opacity:0}35%{transform:scale(1);opacity:1}100%{transform:translateX(3px);opacity:.85}}
@keyframes lmFlyKaraokeFill{0%{background-position:100% 0}100%{background-position:0 0}}
@keyframes lmFlyMarker{0%{background-size:0% 34%;opacity:1}100%{background-size:100% 34%;opacity:1}}
@keyframes lmFlyRainbow{0%{transform:scale(.92);opacity:1;filter:hue-rotate(0deg)}40%{transform:scale(1.04);opacity:1}100%{transform:scale(1);opacity:1;filter:hue-rotate(40deg)}}
@keyframes lmFlyType{0%{clip-path:inset(0 100% 0 0);opacity:1}100%{clip-path:inset(0 0 0 0);opacity:1}}
@keyframes lmFlyKinetic{0%{transform:scale(.4) rotate(-18deg);opacity:0;letter-spacing:-.12em}40%{transform:scale(1.12) rotate(6deg);opacity:1}70%{transform:scale(.94) rotate(-3deg);letter-spacing:.04em}100%{transform:none;opacity:1;letter-spacing:.02em}}
@keyframes lmFlyStroke{0%{opacity:.55;-webkit-text-stroke:2px currentColor;-webkit-text-fill-color:transparent;transform:scale(.92)}55%{opacity:1;-webkit-text-stroke:1px currentColor;-webkit-text-fill-color:transparent}100%{opacity:1;-webkit-text-stroke:0;-webkit-text-fill-color:currentColor;transform:none}}
@keyframes lmFlyElastic{0%{transform:scale(.2);opacity:0}45%{transform:scale(1.22);opacity:1}70%{transform:scale(.88)}100%{transform:scale(1);opacity:1}}
@keyframes lmFlyDrop{0%{transform:translateY(-22px);opacity:0}100%{transform:none;opacity:1}}
@keyframes lmFlyRise{0%{transform:translateY(18px);opacity:0;filter:blur(4px)}100%{transform:none;opacity:1;filter:blur(0)}}
@keyframes lmFlyHeartbeat{0%,100%{transform:scale(1)}20%{transform:scale(1.14)}35%{transform:scale(.96)}50%{transform:scale(1.1)}65%{transform:scale(1)}}
@keyframes lmFlyDust{0%{opacity:0;transform:scale(.55);filter:blur(10px)}55%{opacity:1;transform:scale(1.05);filter:blur(0)}100%{transform:none;opacity:1;filter:blur(0)}}
@keyframes lmFlySqueeze{0%{transform:scaleX(1.45) scaleY(.35);opacity:0}50%{transform:scaleX(.82) scaleY(1.18);opacity:1}100%{transform:none;opacity:1}}
@keyframes lmFlySpin3d{0%{transform:perspective(320px) rotateX(-70deg) rotateY(40deg) scale(.55);opacity:0}100%{transform:none;opacity:1}}
@keyframes lmFlyJitter{0%,100%{transform:translate(0)}15%{transform:translate(3px,-2px)}30%{transform:translate(-3px,2px)}45%{transform:translate(2px,1px)}60%{transform:translate(-2px,-1px)}75%{transform:translate(1px,2px)}}
@keyframes lmFlyWire{0%{opacity:.4;-webkit-text-fill-color:transparent;-webkit-text-stroke:1.5px currentColor;letter-spacing:.2em}100%{opacity:1;-webkit-text-fill-color:currentColor;-webkit-text-stroke:0;letter-spacing:0}}
@keyframes lmFlySwing{0%{transform:rotate(-12deg);opacity:0}40%{transform:rotate(8deg);opacity:1}70%{transform:rotate(-3deg)}100%{transform:none;opacity:1}}
.lm-mood-flyout-meta{display:flex;flex-direction:column;gap:2px;min-width:0}
.lm-mood-flyout-meta>strong{font-size:14px;color:#fff;line-height:1.2}
.lm-mood-flyout-meta>span{font-size:12px;color:#c5d0e4;line-height:1.3}
.lm-mood-flyout-motion{margin:0;font-size:12px;font-weight:700;color:var(--mood-swatch,#ff5cc8);line-height:1.25}
.lm-mood-flyout-looks{margin:0;font-size:11px;color:#8fa0b8;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* タイムライン下の Director：入力を広く。外枠は1枚だけ */
.lm-director-slot{flex:none;margin:2px 0 0;min-width:0;border:0;background:transparent;padding:0}
.lm-director-slot .ai-director-card,
.lm-director-slot .ai-director-card.compact{
  margin:0!important;padding:8px 10px!important;border-radius:12px!important;
  border:1px solid rgba(126,114,232,.42)!important;
  background:linear-gradient(120deg,rgba(25,34,75,.9),rgba(7,22,42,.94))!important;
  box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;
}
.lm-director-slot .ai-director-card>header{
  display:flex!important;align-items:center;justify-content:space-between;gap:8px;
  margin:0 0 4px;flex-wrap:nowrap;min-width:0;
}
.lm-director-slot .director-brand{display:inline-flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto}
.lm-director-slot .director-goal,
.lm-director-slot .ai-director-card>header>select{
  flex:none!important;width:auto!important;max-width:190px!important;min-width:132px;min-height:30px;
  margin:0 0 0 auto!important;padding:5px 8px!important;
  border-radius:6px!important;border:1px solid rgba(255,255,255,.18)!important;
  background:rgba(5,6,13,.65)!important;color:#e8edf6!important;font-size:11px!important;
  box-sizing:border-box;
}
.lm-director-slot .director-intro{font-size:11px!important;line-height:1.35!important;color:#9bb0cc!important;margin:0 0 4px!important;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.lm-director-slot .director-stage{display:flex!important;flex-direction:column!important;gap:6px!important;min-width:0;width:100%}
.lm-director-slot .director-request,
.lm-director-slot .ai-director-card.compact .director-request{
  display:grid!important;grid-template-columns:1fr!important;gap:6px!important;align-items:stretch!important;
  width:100%!important;min-width:0;box-sizing:border-box;
}
.lm-director-slot .director-request textarea,
.lm-director-slot .ai-director-card.compact .director-request textarea{
  width:100%!important;max-width:none!important;min-height:96px!important;max-height:180px!important;height:96px!important;
  margin:0!important;padding:10px 12px!important;border-radius:8px!important;
  border:1px solid rgba(255,255,255,.14)!important;background:rgba(5,6,13,.55)!important;color:#e8edf6!important;
  line-height:1.45!important;resize:vertical;box-sizing:border-box;
}
.lm-director-slot .director-foot{
  display:flex!important;align-items:center;justify-content:space-between;gap:10px;
  width:100%;min-width:0;margin:2px 0 0;flex-wrap:wrap;
}
.lm-director-slot .director-actions{
  display:flex;flex-wrap:nowrap;gap:6px;margin:0;flex:none;width:auto!important;
}
.lm-director-slot .director-actions>button{
  min-height:32px!important;border-radius:8px!important;padding:0 12px!important;
  flex:none!important;white-space:nowrap;font-size:11px!important;
}
.lm-director-slot .director-actions>.director-apply-run,
.lm-director-slot .director-actions>button.living-primary{font-weight:700}
.lm-director-slot .director-footnote{
  margin:0!important;font-size:10px!important;line-height:1.4!important;color:#7f8aa3;
  flex:1 1 140px;min-width:0;max-width:none;white-space:normal;
}
.lm-style-mini{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:4px}
.lm-style-mini button{
  text-align:left;padding:10px 12px;border-radius:12px;border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);color:#e8edf6;font:inherit;font-size:12px;cursor:pointer;min-height:40px;
}
.lm-style-mini button.selected{border-color:var(--lm-c);box-shadow:0 0 0 1px rgba(0,220,255,.35),0 0 14px rgba(0,220,255,.15)}
.lm-actions-stack{display:flex;flex-direction:column;gap:8px;align-items:stretch;overflow:visible}
.lm-actions-stack>button{width:100%;justify-content:center;border-radius:12px!important;min-height:40px;flex:none}
.lm-actions-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.lm-actions-pair>button{width:100%;min-height:38px;border-radius:12px!important}
.lm-danger{background:#3a1d2a!important;border:1px solid #ff6b8a55!important;color:#ffd0db!important}
.lm-motion-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;width:100%}
.lm-motion-card,.living-storyboard .lm-motion-card{
  display:flex;align-items:center;justify-content:center;min-height:36px!important;padding:7px 8px!important;border-radius:0!important;
  border:1px solid rgba(255,255,255,.16)!important;background:rgba(5,6,13,.5)!important;cursor:pointer;color:#e8edf6;font:inherit;box-shadow:none!important;
}
.lm-motion-card em{font-style:normal;font-size:12px;color:#d5deee}
.lm-motion-card.selected,.living-storyboard .lm-motion-card.selected{border-color:#9df0ff!important;box-shadow:0 0 0 1px rgba(157,240,255,.35)!important;color:#fff}
.lm-motion-card.selected em{color:#fff}
.lm-motion-card:hover,.living-storyboard .lm-motion-card:hover{border-color:rgba(157,240,255,.45)!important;background:rgba(157,240,255,.08)!important}
/* 左に大きく出す動き見本（ムード flyout と同系） */
.lm-motion-flyout{
  position:fixed;z-index:95;width:380px;min-height:268px;margin:0;padding:16px 18px;
  display:flex;flex-direction:column;justify-content:center;gap:10px;
  border-radius:0;border:1px solid rgba(157,240,255,.45);
  background:#121826;box-shadow:0 18px 40px rgba(0,0,0,.55);pointer-events:none;overflow:visible;
}
.lm-motion-flyout[hidden]{display:none!important}
.lm-motion-flyout-stage{
  min-height:168px;display:grid;place-items:center;overflow:hidden;
  padding:28px 24px;box-sizing:border-box;
  border-radius:0;background:rgba(0,0,0,.42);border:1px solid rgba(255,255,255,.1);
}
.lm-motion-flyout-sample{
  font-size:30px;font-weight:800;line-height:1.35;color:#fff;white-space:nowrap;
  text-align:center;max-width:96%;transform-origin:50% 50%;
  text-shadow:0 2px 0 #000,0 0 16px rgba(0,220,255,.25);
}
.lm-motion-flyout-meta{display:flex;flex-direction:column;gap:3px;min-width:0}
.lm-motion-flyout-meta>strong{font-size:15px;color:#9df0ff;line-height:1.2}
.lm-motion-flyout-meta>span{font-size:11px;color:#a8b6cb;line-height:1.35}
.lm-preview.is-motion-previewing{outline:2px solid rgba(157,240,255,.55);outline-offset:-2px}
.lm-preview.is-motion-previewing .lm-preview-drag-hint{content:none}
.lm-preview.is-motion-previewing .lm-preview-drag-hint{opacity:0}
.living-storyboard[data-mode="lyric"] .studio-shot-summary{display:none}
.lm-panel-body-tight{gap:10px;padding:10px}
.lm-caption-host{min-width:0;max-width:100%;overflow:visible}
.lm-caption-host .caption-style{max-width:100%;overflow:visible;min-width:0;margin:0;padding:0;gap:12px;border:0;background:none;border-radius:0}
.lm-caption-host .caption-presets{max-width:100%;gap:8px;max-height:none;overflow:visible}
.lm-caption-host .caption-presets button,.living-storyboard .lm-caption-host .caption-presets button{
  padding:7px 12px!important;font-size:12px!important;line-height:1.2!important;min-height:32px!important;border-radius:999px!important;
}
.lm-caption-host .caption-style-catalog{gap:6px;min-width:0}
.lm-caption-host .caption-style-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;max-height:none;overflow:visible;
}
.lm-caption-host .caption-style-thumb,
.lm-caption-host .caption-style-card .caption-style-thumb.caption-preview{height:48px}
.lm-caption-host .caption-style-card{min-height:96px!important;padding:12px 6px 10px!important;gap:8px}
.lm-caption-host .caption-style{overflow:visible!important}
/* スタイルは内部タブで切り替える。パネルを二重スクロールにしない */
.lm-dock.is-tabs .lm-dock-pane[data-panel="style"].is-active>.lm-panel-body{
  overflow:auto;scrollbar-width:thin;
}
.lm-dock.is-tabs .lm-dock-pane[data-panel="style"].is-active>.lm-panel-body .caption-style-grid{
  max-height:none!important;overflow:visible!important;
}
.lm-caption-host .caption-style-panes{margin:0 0 10px;width:100%;grid-template-columns:1.35fr 1fr 1fr 1.15fr}
.lm-caption-host .caption-style-pane-tab{font-size:12px!important;padding:7px 4px!important;min-height:32px!important;width:100%!important}
.lm-caption-host .caption-style-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.lm-caption-host .caption-preview-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.lm-caption-host .caption-preview{max-height:120px;aspect-ratio:16/9;border-radius:10px}
.lm-caption-host .caption-replay,.living-storyboard .lm-caption-host .caption-replay{
  min-height:34px!important;padding:6px 12px!important;font-size:12px!important;border-radius:8px!important;white-space:nowrap;
}
.lm-caption-host .caption-row{
  grid-template-columns:4.75rem minmax(0,1fr);min-width:0;gap:10px;align-items:center;margin:0;
}
.lm-caption-host .caption-label{
  font-size:12px;line-height:1.35;color:#c5d3e8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.lm-caption-host .caption-row:has(.caption-align){grid-template-columns:4.75rem minmax(0,1fr);align-items:start}
.lm-caption-host .caption-row:has(.caption-style-marks){grid-template-columns:4.75rem minmax(0,1fr)}
.lm-caption-host .caption-row-check{
  grid-template-columns:auto auto 1fr!important;gap:10px!important;justify-items:start;
}
.lm-caption-host .caption-row:has(.caption-align)>button{
  grid-column:2;justify-self:start;margin-top:8px;white-space:nowrap;
  min-height:30px!important;padding:5px 12px!important;font-size:12px!important;
}
.lm-caption-host .caption-font-row-ui{margin:0}
.lm-caption-host .caption-font-trigger,.living-storyboard .lm-caption-host .caption-font-trigger{min-height:32px!important;padding:6px 10px!important}
.lm-caption-host .caption-font-trigger-label{font-size:14px}
.lm-caption-host .caption-font-menu{z-index:10060}
.lm-caption-host .caption-font-card,.living-storyboard .lm-caption-host .caption-font-card{min-height:28px!important;padding:5px 10px!important}
.lm-caption-host .caption-font-name{font-size:14px}
.lm-caption-host .caption-fold{
  border:1px solid #ffffff16;border-radius:10px;background:#0a111d;padding:2px 12px 10px;margin:0;
}
.lm-caption-host .caption-fold>summary{
  cursor:pointer;list-style:none;padding:10px 0;font-size:13px;font-weight:700;color:#c5d3e8;letter-spacing:.02em;user-select:none;
}
.lm-caption-host .caption-fold>summary::-webkit-details-marker{display:none}
.lm-caption-host .caption-fold>summary::before{content:'▸ ';color:#6eb6ff}
.lm-caption-host .caption-fold[open]>summary::before{content:'▾ '}
.lm-caption-host .caption-fold .caption-row{margin:8px 0}
.lm-caption-host .caption-fold .caption-anim-cards{margin:8px 0 10px}
.lm-caption-host .caption-anim-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.lm-caption-host .caption-anim-card,.living-storyboard .lm-caption-host .caption-anim-card{
  min-height:40px!important;padding:8px 10px!important;border-radius:9px!important;
}
.lm-caption-host .caption-anim-card em{
  font-size:12px;line-height:1.35;white-space:normal;overflow:visible;text-overflow:unset;
}
.lm-caption-host .caption-row select,.lm-caption-host .caption-row input:not([type=checkbox]):not([type=range]):not([type=color]):not(.caption-range-num){min-width:0;max-width:100%}
.lm-caption-host .caption-range{min-width:0;max-width:100%;gap:6px}
.lm-caption-host .caption-range input[type=range]{min-width:0;width:100%}
.lm-caption-host .caption-range-num{
  width:4.2em;min-width:4.2em;height:28px;border-radius:0!important;font-size:13px;
  appearance:textfield;-moz-appearance:textfield;
}
.lm-caption-host .caption-range-num:focus,
.lm-caption-host .caption-range-num:focus-visible{
  border-radius:0!important;outline:none!important;
  border-color:rgba(157,240,255,.85)!important;box-shadow:0 0 0 1px rgba(157,240,255,.55)!important;
}
.lm-caption-host .caption-range-num::-webkit-outer-spin-button,
.lm-caption-host .caption-range-num::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.lm-caption-host .caption-block{margin:0 0 10px;padding:10px;border-radius:0}
.lm-caption-host .caption-block .caption-row{margin:0 0 8px}
.lm-caption-host .caption-block .caption-row:last-child{margin-bottom:0}
.lm-caption-host .caption-range output{font-size:12px;min-width:3.2em}
.lm-caption-host .caption-color{gap:6px;overflow:visible}
.lm-caption-host .caption-color-face,.living-storyboard .lm-caption-host .caption-color-face{
  width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;
  border:0!important;border-radius:0!important;padding:0!important;box-shadow:none!important;
}
.lm-caption-host .caption-color-palette{flex-wrap:nowrap;overflow:hidden;gap:3px;padding:0}
.lm-caption-host .caption-color-chip,.living-storyboard .lm-caption-host .caption-color-chip{
  width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;
  border:0!important;border-radius:0!important;
}
.lm-caption-host .caption-row:has(.caption-color){align-items:center;overflow:visible}
.lm-caption-host .caption-check{
  display:inline-flex;align-items:center;gap:8px;padding:8px 12px;margin:4px 0;
  font-size:12px;white-space:nowrap;width:100%;box-sizing:border-box;
}
.lm-caption-host .caption-row:has(>input[type=checkbox]),
.lm-caption-host .caption-row-check{
  grid-template-columns:auto auto 1fr!important;gap:10px!important;justify-items:start;
}
.lm-caption-host .caption-row-check .caption-label,
.lm-caption-host .caption-row:has(>input[type=checkbox]) .caption-label{white-space:nowrap;overflow:visible;text-overflow:unset}
.lm-caption-host .caption-inline{gap:8px;flex-wrap:wrap}
.lm-caption-host .caption-align{width:100%;max-width:240px;gap:6px;padding:8px}
.lm-caption-host .caption-align-cell,.living-storyboard .lm-caption-host .caption-align-cell{
  width:auto!important;height:32px!important;min-height:32px!important;border-radius:0!important;border:0!important;
}
.lm-caption-host .caption-row{margin:0 0 12px}
.lm-caption-host .caption-style-pane .caption-row{margin:0 0 14px}
.lm-caption-host .caption-align-wrap{gap:8px}
