@font-face { font-family:"MakeJoy Fredoka"; src:url("./Fredoka.ttf") format("truetype"); font-weight:300 700; font-display:swap; }
:root { --ink:#20223B; --cream:#FFFAF2; --coral:#FF6B5F; --deep-coral:#D94E45; --yellow:#FFD45C; --mint:#9FE0C3; --lilac:#C8B7FF; --muted:#68697d; --line:#ddd9d0; --panel:#fffefb; --label:145px; color-scheme:light; }
* { box-sizing:border-box; }
[hidden] { display:none!important; }
html, body { margin:0; width:100%; height:100%; overflow:hidden; background:#f3efe7; color:var(--ink); font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif; }
button, input, select, textarea { font:inherit; }
button, summary { cursor:pointer; }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .clip:focus-visible, .playhead:focus-visible { outline:3px solid rgba(255,107,95,.38); outline-offset:2px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.app-shell { height:100dvh; display:grid; grid-template-rows:64px minmax(0,1fr) 230px; gap:8px; padding-bottom:8px; overflow:hidden; }
.topbar { position:relative; z-index:20; display:grid; grid-template-columns:250px minmax(180px,1fr) auto; align-items:center; gap:16px; min-width:0; padding:8px 14px; color:white; background:var(--ink); border-bottom:4px solid var(--coral); }
.brand-lockup { display:flex; align-items:center; gap:10px; min-width:0; }
.brand-lockup img { width:42px; height:42px; flex:none; border-radius:11px; background:var(--cream); }
.brand-lockup div { display:flex; min-width:0; flex-direction:column; line-height:1.05; }
.brand-lockup strong { overflow:hidden; font-family:"MakeJoy Fredoka"; font-size:18px; white-space:nowrap; text-overflow:ellipsis; }
.brand-lockup span { margin-top:4px; color:#d8d8e3; font-size:11px; }
.project-name { min-width:0; }
.project-name input { width:100%; max-width:520px; padding:9px 12px; border:1px solid #4c5071; border-radius:9px; color:white; background:#30334f; font-family:"MakeJoy Fredoka"; font-size:15px; }
.header-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.save-state { min-width:46px; color:#cacbdd; font-size:11px; text-align:right; }
button, .project-menu summary { min-height:34px; padding:7px 11px; border:0; border-radius:8px; color:var(--ink); background:#ebe8e0; font-weight:750; }
.library-button { color:var(--ink); background:var(--yellow); box-shadow:inset 0 0 0 1px rgba(32,34,59,.12); }
.reset-button { color:white; background:#4b4f6c; border:1px solid #6a6e8b; }
.game-button { color:white; background:var(--deep-coral); }
button.quiet { color:inherit; background:transparent; border:1px solid currentColor; opacity:.9; }
button.primary { color:white; background:var(--coral); }
button.split-action { color:white; background:var(--ink); border:1px solid #4f526f; }
button:disabled { cursor:not-allowed; opacity:.45; }
button.danger { color:#aa332c; background:#fff0ee; border:1px solid #ffc7c2; }
.project-menu { position:relative; }
.project-menu summary { display:block; color:white; list-style:none; background:#343752; border:1px solid #5c607c; }
.project-menu summary::-webkit-details-marker { display:none; }
.project-menu[open] summary { background:#454967; }
.project-menu > div { position:absolute; top:42px; right:0; display:grid; gap:6px; width:180px; padding:8px; border:1px solid var(--line); border-radius:10px; background:var(--panel); box-shadow:0 18px 45px rgba(32,34,59,.24); }
.project-menu button { width:100%; text-align:left; }

.workspace { min-height:0; display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:8px; padding:0 10px; }
.preview-panel, .inspector, .timeline-panel { min-width:0; min-height:0; background:var(--panel); border:1px solid var(--line); border-radius:13px; box-shadow:0 5px 18px rgba(32,34,59,.055); }
.preview-panel { display:grid; grid-template-rows:auto minmax(0,1fr) auto; padding:9px 10px; }
.panel-heading, .timeline-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.panel-heading h1, .panel-heading h2, .timeline-toolbar h2 { margin:0; font-family:"MakeJoy Fredoka"; font-size:17px; }
.eyebrow { color:var(--deep-coral); font-size:9px; font-weight:850; letter-spacing:.13em; text-transform:uppercase; }
.canvas-meta { display:flex; gap:6px; color:var(--muted); font-size:10px; }
.canvas-meta span { padding:3px 7px; border:1px solid var(--line); border-radius:999px; }
.stage-wrap { position:relative; align-self:stretch; justify-self:center; height:100%; min-height:0; max-width:100%; aspect-ratio:16/9; overflow:hidden; border:1px solid #ece7dc; border-radius:10px; background:var(--cream); }
.stage-wrap svg { display:block; width:100%; height:100%; }
.stage-wrap > video { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; background:var(--cream); }
[data-target] { transform-box:fill-box; transform-origin:center; }
.education-scene { position:absolute; inset:0; overflow:hidden; background:radial-gradient(circle at 18% 22%,rgba(255,212,92,.48),transparent 27%),radial-gradient(circle at 82% 76%,rgba(200,183,255,.52),transparent 28%),var(--cream); }
.edu-prompt { position:absolute; top:9%; left:8%; display:grid; gap:6px; max-width:50%; padding:17px 22px; border:3px solid var(--ink); border-radius:18px; background:white; box-shadow:7px 7px 0 var(--mint); }
.edu-prompt span { color:var(--deep-coral); font-size:18px; font-weight:900; letter-spacing:.13em; }
.edu-prompt strong { font-family:"MakeJoy Fredoka"; font-size:47px; line-height:1; }
.edu-flow { position:absolute; top:37%; right:7%; left:7%; display:grid; grid-template-columns:1fr .6fr 1fr; align-items:center; gap:5%; }
.edu-sun,.edu-leaf { display:grid; justify-items:center; gap:12px; font-family:"MakeJoy Fredoka"; font-size:28px; }
.edu-sun i { position:relative; width:135px; height:135px; border:6px solid var(--ink); border-radius:50%; background:var(--yellow); box-shadow:0 0 0 18px rgba(255,212,92,.25); }
.edu-sun i::before,.edu-sun i::after { position:absolute; width:9px; height:178px; margin:-27px 0 0 62px; border-radius:9px; background:var(--coral); content:""; }
.edu-sun i::after { transform:rotate(90deg); }
.edu-leaf i { position:relative; width:135px; height:90px; border:6px solid var(--ink); border-radius:100% 0 100% 0; background:linear-gradient(135deg,#9FE0C3 0 34%,#FFD45C 34% 66%,#FF6B5F 66%); transform:rotate(-25deg); }
.edu-leaf i::after { position:absolute; top:50%; left:10%; width:86%; height:5px; border-radius:6px; background:var(--ink); content:""; transform:rotate(-8deg); }
.edu-arrow { display:grid; justify-items:center; gap:10px; color:#6a6b7d; font-size:21px; font-weight:850; }
.edu-arrow i { position:relative; width:100%; height:12px; border-radius:999px; background:var(--ink); }
.edu-arrow i::after { position:absolute; right:-4px; top:-19px; border-top:25px solid transparent; border-bottom:25px solid transparent; border-left:34px solid var(--ink); content:""; }
.edu-card { position:absolute; right:9%; bottom:8%; left:9%; display:grid; gap:7px; padding:22px 28px; border:3px solid var(--ink); border-radius:18px; background:var(--ink); color:white; box-shadow:7px 7px 0 var(--coral); }
.edu-card span { color:var(--yellow); font-family:"MakeJoy Fredoka"; font-size:34px; }
.edu-card strong { font-size:21px; }
.segmented-video-scene { position:absolute; inset:0; overflow:hidden; background:var(--cream); }
.segmented-video-scene > img,.segment-video-layers,.segment-video-layers video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:var(--cream); }
.segment-video-layers video { display:none; }
.segment-video-layers video.is-active { display:block; }
.segment-status { position:absolute; right:12px; bottom:10px; z-index:4; padding:6px 9px; border-radius:999px; color:white; background:rgba(32,34,59,.86); font-size:8px; font-weight:850; letter-spacing:.055em; text-transform:uppercase; }
.logo-transition-scene,.challenge-scene { position:absolute; inset:0; overflow:hidden; }
.logo-transition-scene { background:var(--ink); }
.transition-clip { position:absolute; inset:0; display:grid; place-items:center; color:#dbdce7; background:linear-gradient(135deg,#252944,#14172d); font-size:22px; font-weight:900; letter-spacing:.28em; }
.transition-clip span { padding:10px 16px; border:2px solid #555a79; border-radius:999px; }
.transition-before { z-index:0; }
.transition-after { z-index:5; color:var(--ink); background:linear-gradient(135deg,#ffd45c,#ffb65c); }
.transition-after span { border-color:rgba(32,34,59,.38); }
.transition-sweep { position:absolute; inset:-3%; z-index:1; width:106%; height:106%; }
.transition-sweep-in { background:linear-gradient(135deg,#9fe0c3,#c8b7ff); }
.transition-sweep-out { z-index:4; background:linear-gradient(135deg,#ff6b5f,#ffd45c); }
.transition-logo { position:absolute; top:50%; left:50%; z-index:3; width:24%; max-width:190px; aspect-ratio:1; border-radius:23%; box-shadow:0 25px 60px rgba(32,34,59,.28); translate:-50% -50%; }
.transition-ring { position:absolute; top:50%; left:50%; z-index:2; width:38%; max-width:300px; aspect-ratio:1; border:7px solid var(--ink); border-right-color:transparent; border-radius:50%; translate:-50% -50%; }
.transition-ring::after { position:absolute; top:4%; right:6%; width:15%; aspect-ratio:1; border:5px solid var(--ink); border-radius:50%; background:var(--yellow); content:""; }
.transition-spark { position:absolute; top:25%; left:66%; z-index:3; width:64px; aspect-ratio:1; background:var(--coral); clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%); }
.challenge-scene { background:var(--cream); }
.basketball-scene { background:linear-gradient(#c8e6ff 0 72%,#c88d54 72%); }
.challenge-sky { position:absolute; inset:0 0 28%; background:radial-gradient(circle at 18% 24%,rgba(255,255,255,.78),transparent 18%),linear-gradient(#bfe2ff,#e9f5ff); }
.challenge-court { position:absolute; right:3%; bottom:-16%; width:54%; aspect-ratio:1.7; border:7px solid rgba(255,255,255,.78); border-radius:50%; }
.challenge-backboard { position:absolute; top:14%; right:11%; width:17%; height:32%; border:8px solid white; background:rgba(255,255,255,.25); box-shadow:10px 0 0 -3px var(--ink); }
.challenge-backboard::after { position:absolute; right:58%; bottom:-10%; width:42%; height:8px; border-radius:8px; background:var(--coral); content:""; }
.challenge-net { position:absolute; top:47%; right:20%; width:9%; height:19%; border:5px solid var(--ink); border-top:0; clip-path:polygon(0 0,100% 0,78% 100%,22% 100%); background:repeating-linear-gradient(65deg,transparent 0 10px,rgba(32,34,59,.22) 10px 13px); }
.challenge-ball { position:absolute; bottom:12%; left:10%; width:9.5%; max-width:86px; aspect-ratio:1; border:5px solid var(--ink); border-radius:50%; background:#ee8b42; box-shadow:inset 0 0 0 2px rgba(255,255,255,.18); }
.challenge-ball::before,.challenge-ball::after { position:absolute; top:46%; left:-3%; width:106%; height:4px; border-radius:5px; background:var(--ink); content:""; transform:rotate(22deg); }
.challenge-ball::after { transform:rotate(-58deg); }
.challenge-score { position:absolute; top:12%; left:8%; padding:12px 18px; border:5px solid var(--ink); border-radius:16px; color:var(--ink); background:var(--yellow); box-shadow:7px 7px 0 var(--coral); font-family:"MakeJoy Fredoka"; font-size:clamp(24px,4vw,56px); }
.paper-plane-scene { background:radial-gradient(circle at 18% 20%,rgba(255,212,92,.58),transparent 22%),linear-gradient(135deg,#def7ee,#eee8ff); }
.challenge-plane-trail { position:absolute; top:59%; left:-4%; width:65%; height:24%; border-top:6px dashed rgba(32,34,59,.28); border-radius:50%; transform:rotate(-8deg); }
.challenge-plane { position:absolute; top:56%; left:7%; width:12%; aspect-ratio:1.45; background:var(--ink); clip-path:polygon(0 44%,100% 0,67% 100%,53% 59%); }
.challenge-plane::after { position:absolute; inset:10% 15%; background:var(--mint); clip-path:polygon(0 44%,100% 0,67% 100%,53% 59%); content:""; }
.challenge-plane-card { position:absolute; right:7%; bottom:10%; display:grid; gap:5px; width:34%; padding:20px 24px; border:5px solid var(--ink); border-radius:18px; background:white; box-shadow:8px 8px 0 var(--coral); }
.challenge-plane-card span { color:var(--deep-coral); font-size:12px; font-weight:900; letter-spacing:.14em; }
.challenge-plane-card strong { font-family:"MakeJoy Fredoka"; font-size:clamp(20px,3vw,42px); line-height:1; }
.countdown-scene { display:grid; place-items:center; background:radial-gradient(circle,rgba(255,255,255,.32),transparent 45%),var(--lilac); }
.countdown-scene b,.countdown-scene strong { position:absolute; font-family:"MakeJoy Fredoka"; font-size:clamp(110px,25vw,260px); line-height:1; }
.countdown-scene strong { padding:18px 28px; border:7px solid var(--ink); border-radius:24px; color:white; background:var(--coral); box-shadow:10px 10px 0 var(--yellow); font-size:clamp(70px,17vw,180px); transform:rotate(-4deg); }
.swipe-scene { background:var(--ink); }
.challenge-swipe-yellow,.challenge-swipe-coral { position:absolute; inset:-5%; width:110%; height:110%; }
.challenge-swipe-yellow { background:var(--yellow); }
.challenge-swipe-coral { background:var(--coral); }
.swipe-scene strong { position:absolute; inset:0; z-index:3; display:grid; place-items:center; color:white; font-family:"MakeJoy Fredoka"; font-size:clamp(48px,10vw,120px); letter-spacing:.08em; text-shadow:0 7px 0 rgba(32,34,59,.28); }
.idea-spark-scene { background:radial-gradient(circle at 50% 40%,rgba(255,212,92,.7),transparent 32%),#fff5cb; }
.challenge-idea-bulb { position:absolute; top:25%; left:50%; width:16%; max-width:150px; aspect-ratio:1; border:7px solid var(--ink); border-radius:50% 50% 42% 42%; background:var(--yellow); translate:-50% 0; }
.challenge-idea-bulb::after { position:absolute; bottom:-31%; left:30%; width:40%; height:34%; border:7px solid var(--ink); border-top:0; border-radius:0 0 12px 12px; background:var(--yellow); content:""; }
.challenge-idea-rays { position:absolute; top:17%; left:50%; width:32%; max-width:300px; aspect-ratio:1; translate:-50% 0; }
.challenge-idea-rays i { position:absolute; top:0; left:49%; width:4%; height:19%; border-radius:8px; background:var(--coral); transform-origin:50% 175%; }
.challenge-idea-rays i:nth-child(2) { transform:rotate(55deg); }
.challenge-idea-rays i:nth-child(3) { transform:rotate(-55deg); }
.challenge-idea-rays i:nth-child(4) { transform:rotate(98deg); }
.challenge-idea-rays i:nth-child(5) { transform:rotate(-98deg); }
.idea-spark-scene strong { position:absolute; right:12%; bottom:13%; left:12%; text-align:center; font-family:"MakeJoy Fredoka"; font-size:clamp(32px,6vw,78px); }
.drop-hint { position:absolute; inset:12px; display:none; place-items:center; border:2px dashed var(--coral); border-radius:10px; color:var(--deep-coral); background:rgba(255,250,242,.94); font-family:"MakeJoy Fredoka"; font-size:17px; }
.is-dragging .drop-hint { display:grid; }
.transport { display:grid; grid-template-columns:36px 42px 92px minmax(120px,1fr) 38px; align-items:center; gap:7px; min-height:44px; padding-top:5px; }
.transport-button, .play-button { min-width:34px; padding:0; border-radius:50%; }
.play-button { width:40px; height:40px; color:white; background:var(--coral); }
.time-readout { display:flex; justify-content:center; gap:3px; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.transport input[type=range] { width:100%; accent-color:var(--coral); cursor:ew-resize; }

.inspector { display:flex; flex-direction:column; gap:8px; padding:11px; overflow:auto; }
.human-finish { display:grid; grid-template-columns:50px minmax(0,1fr); gap:7px 9px; padding:9px; border:1px solid #f0b9b4; border-radius:10px; background:#fff3ef; box-shadow:0 5px 16px rgba(217,78,69,.08); }
.finish-readiness { grid-row:1/3; display:grid; place-items:center; align-content:center; width:50px; height:50px; border:5px solid var(--coral); border-right-color:#ffd4cf; border-radius:50%; line-height:1; }
.finish-readiness strong { max-width:43px; overflow:hidden; font-family:"MakeJoy Fredoka"; font-size:10px; text-align:center; text-overflow:ellipsis; }
.finish-readiness span { margin-top:2px; color:#7b5960; font-size:7px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.finish-copy { min-width:0; display:grid; gap:2px; }
.finish-copy > strong { font-family:"MakeJoy Fredoka"; font-size:12px; }
.finish-copy p { margin:0; color:#6b5961; font-size:9px; line-height:1.35; }
.human-finish button { grid-column:2; min-height:28px; justify-self:start; padding:4px 8px; color:white; background:var(--deep-coral); font-size:9px; }
.human-finish.complete { border-color:#8bcfb1; background:#eefaf4; }
.human-finish.complete .finish-readiness { border-color:#56b892; }
.human-finish.complete button { background:#327e62; }
.editor-hint { margin:0; padding:8px 9px; border-radius:8px; color:#55566c; background:#f4f0e8; font-size:11px; line-height:1.35; }
.inspector-empty { padding:14px 10px; color:var(--muted); font-size:12px; line-height:1.45; text-align:center; }
.inspector form { display:grid; gap:9px; }
.selected-summary { display:flex; flex-direction:column; gap:2px; padding:8px 10px; border-left:5px solid var(--coral); border-radius:8px; background:#fff3ef; }
.selected-summary span { color:var(--deep-coral); font-size:9px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.selected-summary strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-family:"MakeJoy Fredoka"; }
.inspector label, .dialog-card label { display:grid; gap:4px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.025em; }
.inspector input, .inspector select, .inspector textarea, .dialog-card input, .dialog-card textarea { width:100%; min-height:32px; padding:6px 8px; border:1px solid var(--line); border-radius:7px; color:var(--ink); background:white; font-weight:500; }
.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.volume-control label { grid-template-columns:auto 1fr; align-items:center; }
.volume-control output { justify-self:end; color:var(--ink); font-variant-numeric:tabular-nums; }
.volume-control input { grid-column:1/-1; padding:0; border:0; accent-color:var(--coral); }
.advanced-settings, .project-settings { border:1px solid var(--line); border-radius:8px; background:#faf8f3; }
.advanced-settings summary, .project-settings summary { padding:8px 9px; color:#4f5064; font-size:11px; font-weight:800; }
.advanced-settings > div, .project-settings > div { display:grid; gap:8px; padding:0 9px 9px; }
.inspector-actions { display:flex; gap:7px; }
.shortcuts { display:flex; flex-wrap:wrap; gap:4px 8px; margin-top:auto; padding:7px 9px; border-radius:8px; color:white; background:var(--ink); font-size:9px; }
.shortcuts strong { color:var(--yellow); font-family:"MakeJoy Fredoka"; }

.timeline-panel { display:grid; grid-template-rows:32px minmax(0,1fr); margin:0 10px; padding:7px 8px; overflow:hidden; }
.timeline-toolbar { min-height:30px; }
.timeline-toolbar h2 { font-size:15px; }
.timeline-actions { display:flex; align-items:center; gap:9px; }
.timeline-actions label { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:10px; }
.timeline-actions input { width:95px; accent-color:var(--coral); }
.timeline-actions button { min-height:30px; padding:5px 9px; }
.timeline-scroll { min-height:0; overflow:auto; border:1px solid var(--line); border-radius:9px; background:#faf8f3; }
.timeline { position:relative; min-width:100%; width:max-content; }
.ruler-row, .track-row { display:grid; grid-template-columns:var(--label) auto; min-height:38px; }
.ruler-row { position:sticky; top:0; z-index:8; min-height:28px; background:#f4f0e8; }
.track-label { position:sticky; left:0; z-index:6; display:flex; align-items:center; gap:7px; padding:0 9px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); background:var(--panel); font-size:10px; font-weight:800; }
.track-label i { width:9px; height:9px; flex:none; border-radius:50%; background:var(--track-color); box-shadow:0 0 0 3px color-mix(in srgb,var(--track-color),transparent 70%); }
.track-label small { margin-left:auto; color:var(--muted); font-size:9px; font-weight:500; }
.ruler-label { color:var(--muted); }
.ruler, .track-lane { position:relative; border-bottom:1px solid var(--line); background-image:linear-gradient(to right,rgba(32,34,59,.075) 1px,transparent 1px); background-size:var(--second-width) 100%; }
.ruler { height:28px; cursor:ew-resize; }
.tick { position:absolute; bottom:0; width:1px; height:7px; background:#9a99a6; pointer-events:none; }
.tick.major { height:12px; }
.tick span { position:absolute; top:1px; left:4px; color:var(--muted); font-size:9px; font-variant-numeric:tabular-nums; }
.track-lane { height:38px; cursor:crosshair; }
.clip { position:absolute; top:4px; height:30px; min-width:18px; overflow:hidden; border:1px solid color-mix(in srgb,var(--clip-color),var(--ink) 25%); border-radius:6px; color:var(--ink); background:color-mix(in srgb,var(--clip-color),white 23%); box-shadow:0 2px 6px rgba(32,34,59,.11); cursor:grab; user-select:none; touch-action:none; }
.clip:active { cursor:grabbing; }
.clip.audio { background:repeating-linear-gradient(90deg,color-mix(in srgb,var(--clip-color),white 20%) 0 5px,color-mix(in srgb,var(--clip-color),white 44%) 5px 8px); }
.clip.selected { z-index:3; outline:2px solid var(--ink); outline-offset:1px; }
.clip.challenge-clip { z-index:2; box-shadow:0 0 0 3px rgba(255,107,95,.3),0 2px 6px rgba(32,34,59,.11); }
.clip.challenge-clip.fixed { box-shadow:0 0 0 3px rgba(86,184,146,.38),0 2px 6px rgba(32,34,59,.11); }
.clip-content { display:flex; height:100%; flex-direction:column; justify-content:center; padding:0 13px; white-space:nowrap; pointer-events:none; }
.clip strong { overflow:hidden; font-size:9px; text-overflow:ellipsis; }
.clip small { color:#4e5063; font-size:8px; font-variant-numeric:tabular-nums; }
.trim-handle { position:absolute; top:0; z-index:2; width:9px; height:100%; cursor:ew-resize; background:rgba(32,34,59,.15); }
.trim-handle::after { position:absolute; top:7px; bottom:7px; width:2px; border-radius:2px; background:rgba(255,255,255,.85); content:""; }
.trim-start { left:0; border-radius:5px 0 0 5px; }
.trim-start::after { left:3px; }
.trim-end { right:0; border-radius:0 5px 5px 0; }
.trim-end::after { right:3px; }
.playhead { position:absolute; z-index:9; top:0; bottom:0; left:var(--label); width:18px; margin-left:-9px; background:transparent; cursor:ew-resize; touch-action:none; }
.playhead::after { position:absolute; top:0; bottom:0; left:8px; width:2px; background:var(--coral); content:""; }
.playhead span { position:absolute; top:0; left:2px; width:14px; height:13px; background:var(--coral); clip-path:polygon(0 0,100% 0,50% 100%); }

dialog { padding:0; border:0; border-radius:14px; box-shadow:0 24px 80px rgba(32,34,59,.28); }
dialog::backdrop { background:rgba(32,34,59,.55); }
.dialog-card { display:grid; gap:12px; width:min(440px,90vw); padding:20px; }
.dialog-card h2 { margin:0; font-family:"MakeJoy Fredoka"; }
.dialog-card div { display:flex; justify-content:flex-end; gap:8px; }

.demo-library-dialog { width:min(980px,95vw); max-width:none; max-height:92vh; overflow:hidden; border-radius:22px; background:var(--cream); }
.demo-library-dialog::backdrop { background:rgba(21,23,43,.82); backdrop-filter:blur(5px); }
.demo-library-card { max-height:92vh; display:grid; grid-template-rows:auto minmax(0,1fr) auto; padding:0; }
.demo-library-header { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; padding:22px 24px 16px; border-bottom:1px solid #e3ddd2; }
.demo-library-header h2 { margin:5px 0 7px; font-family:"MakeJoy Fredoka"; font-size:clamp(25px,3vw,36px); line-height:1.05; }
.demo-library-header p { max-width:800px; margin:0; color:#626377; font-size:12px; line-height:1.5; }
.demo-library-grid { min-height:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; overflow:auto; padding:14px 18px 18px; }
.library-group-heading { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:14px; margin:7px 2px 0; padding:9px 4px 4px; border-bottom:1px solid #ddd7cc; font-family:"MakeJoy Fredoka"; font-size:17px; }
.library-group-heading span { color:#77788a; font-family:Inter,ui-sans-serif,system-ui,sans-serif; font-size:9px; font-weight:850; letter-spacing:.06em; text-transform:uppercase; }
.demo-recipe.challenge-project { background:linear-gradient(145deg,#fff,#f5f1ff); }
.demo-library-loading { grid-column:1/-1; align-self:center; color:var(--muted); text-align:center; }
.demo-recipe { position:relative; min-height:144px; display:grid; grid-template-columns:42px minmax(0,1fr) auto; grid-template-rows:auto auto auto; align-items:start; gap:5px 10px; overflow:hidden; padding:13px 14px; border:1px solid #ded8cc; border-radius:14px; background:white; text-align:left; box-shadow:0 5px 16px rgba(32,34,59,.045); transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease; }
.demo-recipe::before { position:absolute; top:0; bottom:0; left:0; width:5px; background:var(--demo-accent); content:""; }
.demo-recipe:hover { border-color:color-mix(in srgb,var(--demo-accent),var(--ink) 18%); box-shadow:0 10px 26px rgba(32,34,59,.11); transform:translateY(-2px); }
.demo-recipe.featured { border-color:#f0aaa4; background:linear-gradient(145deg,#fff,#fff4f1); }
.demo-recipe.featured .demo-meta { margin-top:17px; }
.demo-number { grid-row:1/3; display:grid; place-items:center; width:38px; height:38px; border-radius:11px; color:var(--ink); background:color-mix(in srgb,var(--demo-accent),white 62%); font-family:"MakeJoy Fredoka"; font-size:14px; }
.demo-copy { min-width:0; display:grid; gap:2px; }
.demo-copy strong { font-family:"MakeJoy Fredoka"; font-size:15px; }
.demo-copy small { color:#66677a; font-size:9px; line-height:1.35; }
.demo-meta { display:grid; justify-items:end; gap:3px; }
.demo-meta b { font-size:11px; font-variant-numeric:tabular-nums; }
.demo-meta em { padding:3px 6px; border-radius:999px; color:#4d4f63; background:#f0ede6; font-size:8px; font-style:normal; font-weight:800; }
.demo-mini-timeline { grid-column:2/4; display:grid; gap:2px; padding:5px; border-radius:7px; background:#2a2d49; }
.demo-mini-timeline > span { position:relative; height:7px; overflow:hidden; border-radius:3px; background:rgba(255,255,255,.06); }
.demo-mini-timeline .bar { position:absolute; top:1px; height:5px; border-radius:3px; }
.demo-mini-timeline .motion { background:var(--yellow); }
.demo-mini-timeline .text { background:var(--coral); }
.demo-mini-timeline .sound { background:var(--mint); opacity:.9; }
.demo-mini-timeline .music { background:var(--lilac); opacity:.9; }
.demo-parts { grid-column:2/4; color:#77788a; font-size:8px; font-weight:800; letter-spacing:.035em; text-transform:uppercase; }
.demo-challenge { position:absolute; top:8px; right:8px; padding:4px 7px; border-radius:999px; color:white; background:var(--deep-coral); font-size:7px; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.demo-library-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 22px; border-top:1px solid #e3ddd2; color:#6d6e80; background:#f5f1e9; font-size:10px; }

.welcome-dialog { width:min(870px,94vw); max-width:none; max-height:94vh; overflow:hidden; border-radius:22px; background:var(--cream); }
.welcome-dialog::backdrop { background:rgba(21,23,43,.8); backdrop-filter:blur(5px); }
.welcome-card { min-height:min(600px,88vh); display:grid; grid-template-rows:auto minmax(0,1fr); padding:0; }
.welcome-topline { display:flex; align-items:center; justify-content:space-between; padding:14px 18px 0; }
.preview-badge { padding:6px 9px; border:1px solid #f3a39d; border-radius:999px; color:var(--deep-coral); background:#fff0ee; font-size:9px; font-weight:900; letter-spacing:.11em; text-transform:uppercase; }
.welcome-close { width:34px; min-height:34px; padding:0; border-radius:50%; color:#5e6074; background:#eee9df; font-size:22px; line-height:1; }
.welcome-step { min-height:0; display:grid; grid-template-rows:minmax(0,1fr) auto; padding:12px 30px 22px; }
.welcome-hero { min-height:0; display:grid; grid-template-columns:minmax(0,1.13fr) minmax(280px,.87fr); align-items:center; gap:32px; }
.welcome-hero h1 { max-width:620px; margin:7px 0 12px; font-family:"MakeJoy Fredoka"; font-size:clamp(30px,4vw,48px); line-height:1.02; letter-spacing:-.035em; }
.welcome-hero p, .tour-heading p { margin:0; color:#5c5d70; font-size:14px; line-height:1.55; }
.welcome-points { display:grid; gap:9px; margin:18px 0 0; padding:0; list-style:none; color:#56576b; font-size:12px; }
.welcome-points li { position:relative; padding-left:18px; line-height:1.45; }
.welcome-points li::before { position:absolute; top:.46em; left:0; width:8px; height:8px; border-radius:50%; background:var(--coral); content:""; box-shadow:0 0 0 4px #ffe5e2; }
.welcome-points strong { color:var(--ink); }
.announcement-art { position:relative; min-height:320px; overflow:hidden; border:1px solid #e5dfd3; border-radius:26px; background:radial-gradient(circle at 75% 20%,rgba(159,224,195,.6),transparent 32%),linear-gradient(145deg,#fffdf7,#f0ebe1); box-shadow:0 20px 55px rgba(32,34,59,.12); }
.announcement-orbit { position:absolute; top:40px; left:50%; width:156px; height:156px; padding:16px; border:2px dashed rgba(32,34,59,.16); border-radius:50%; transform:translateX(-50%); }
.announcement-orbit::after { position:absolute; top:12px; right:3px; width:21px; height:21px; border:4px solid var(--ink); border-radius:50%; background:var(--mint); content:""; }
.announcement-orbit img { width:100%; height:100%; border-radius:28px; box-shadow:0 12px 32px rgba(32,34,59,.18); }
.announcement-card { position:absolute; bottom:36px; display:grid; gap:4px; width:150px; padding:12px 14px; border:1px solid #d9d4ca; border-radius:12px; background:white; box-shadow:0 10px 24px rgba(32,34,59,.11); }
.announcement-card span { color:var(--deep-coral); font-size:8px; font-weight:900; letter-spacing:.1em; text-transform:uppercase; }
.announcement-card b { font-family:"MakeJoy Fredoka"; font-size:13px; }
.announcement-card::after { height:7px; margin-top:5px; border-radius:999px; content:""; }
.card-one { left:24px; transform:rotate(-3deg); }
.card-one::after { width:78%; background:var(--coral); }
.card-two { right:22px; transform:rotate(3deg); }
.card-two::after { width:88%; background:var(--mint); }
.announcement-playhead { position:absolute; bottom:24px; left:51%; width:2px; height:96px; background:var(--coral); transform:translateX(-50%); }
.announcement-playhead::before { position:absolute; top:-1px; left:-6px; width:14px; height:12px; background:var(--coral); clip-path:polygon(0 0,100% 0,50% 100%); content:""; }
.readiness-meter { position:absolute; top:18px; left:18px; display:grid; grid-template-columns:1fr auto; gap:4px 9px; width:128px; padding:8px 10px; border:1px solid #dcd6cb; border-radius:11px; background:rgba(255,255,255,.94); box-shadow:0 8px 20px rgba(32,34,59,.09); }
.readiness-meter span { color:#696a7c; font-size:7px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.readiness-meter strong { font-family:"MakeJoy Fredoka"; font-size:12px; }
.readiness-meter i { grid-column:1/-1; height:5px; overflow:hidden; border-radius:999px; background:#e8e4db; }
.readiness-meter i::after { display:block; width:90%; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--mint),var(--coral)); content:""; }
.welcome-footer { min-height:52px; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; padding-top:16px; border-top:1px solid #e4ded4; }
.welcome-footer > span { color:#777788; font-size:10px; font-weight:800; letter-spacing:.06em; text-align:center; text-transform:uppercase; }
.welcome-footer button:first-child { justify-self:start; }
.welcome-footer button:last-child { justify-self:end; }
.welcome-next { min-height:42px; padding:9px 16px; }
.tour-heading { max-width:720px; padding:4px 0 12px; }
.tour-heading h2 { margin:5px 0 7px; font-family:"MakeJoy Fredoka"; font-size:32px; line-height:1.05; }
.demo-board { min-height:245px; display:grid; grid-template-columns:210px minmax(0,1fr); gap:10px; padding:10px; border:1px solid #dcd6cc; border-radius:16px; background:#ebe7df; }
.demo-stage { display:grid; place-items:center; align-content:center; gap:9px; border-radius:10px; color:#68697d; background:var(--cream); font-size:9px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.demo-stage img { width:104px; height:104px; border-radius:24px; box-shadow:0 12px 28px rgba(32,34,59,.16); }
.demo-timeline { position:relative; display:grid; align-content:center; gap:7px; overflow:hidden; padding:22px 18px; border-radius:10px; background:#20223b; }
.demo-timeline > div { display:grid; grid-template-columns:70px minmax(0,1fr); align-items:center; gap:9px; }
.demo-timeline span { color:#d9dae5; font-size:9px; font-weight:750; }
.demo-clip { display:block; height:26px; border-radius:6px; opacity:.95; }
.demo-clip.coral { width:64%; background:var(--coral); }
.demo-clip.lilac { width:40%; margin-left:42%; background:var(--lilac); }
.demo-clip.mint { width:82%; background:var(--mint); }
.demo-clip.yellow { width:24%; margin-left:60%; background:var(--yellow); }
.demo-playhead { position:absolute; top:15px; bottom:15px; left:34%; width:2px; background:var(--coral); animation:demo-scrub 4.2s ease-in-out infinite; }
.demo-playhead::before { position:absolute; top:0; left:-6px; width:14px; height:12px; background:var(--coral); clip-path:polygon(0 0,100% 0,50% 100%); content:""; }
.demo-features { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin:10px 0 2px; }
.demo-features > div { display:grid; grid-template-columns:28px 1fr; align-items:start; gap:1px 8px; padding:10px 11px; border:1px solid #e0dad0; border-radius:11px; background:white; }
.demo-features span { grid-row:1/3; display:grid; place-items:center; width:28px; height:28px; border-radius:50%; color:white; background:var(--ink); font-family:"MakeJoy Fredoka"; font-size:13px; }
.demo-features strong { font-family:"MakeJoy Fredoka"; font-size:13px; }
.demo-features small { color:#68697d; font-size:9px; line-height:1.35; }
.tutorial-heading { max-width:680px; margin:2px auto 8px; text-align:center; }
.tutorial-list { width:min(660px,100%); display:grid; gap:9px; align-content:center; margin:0 auto; padding:0; list-style:none; }
.tutorial-list li { display:grid; grid-template-columns:44px minmax(0,1fr); align-items:center; gap:13px; padding:11px 14px; border:1px solid #e0dad0; border-radius:12px; background:white; box-shadow:0 5px 14px rgba(32,34,59,.045); }
.tutorial-list li > span { display:grid; place-items:center; width:42px; height:42px; border-radius:11px; color:var(--ink); background:var(--yellow); font-family:"MakeJoy Fredoka"; font-size:18px; }
.tutorial-list li:nth-child(2) > span { background:var(--mint); }
.tutorial-list li:nth-child(3) > span { background:var(--lilac); }
.tutorial-list li:nth-child(4) > span { color:white; background:var(--coral); }
.tutorial-list div { display:grid; gap:3px; }
.tutorial-list strong { font-family:"MakeJoy Fredoka"; font-size:14px; }
.tutorial-list small { color:#66677a; font-size:10px; line-height:1.4; }
@keyframes demo-scrub { 0%,8% { left:26%; } 48%,60% { left:63%; } 92%,100% { left:26%; } }
.toast { position:fixed; right:16px; bottom:16px; z-index:40; max-width:340px; padding:10px 13px; border-radius:9px; color:white; background:var(--ink); box-shadow:0 10px 30px rgba(32,34,59,.25); opacity:0; transform:translateY(8px); pointer-events:none; transition:.2s ease; }
.toast.show { opacity:1; transform:none; }

@media (max-width:1100px) { .topbar { grid-template-columns:220px minmax(140px,1fr) auto; }.save-state,[data-save] { display:none; }.header-actions { gap:6px; }.header-actions button,.project-menu summary { padding-inline:8px; font-size:10px; } }
@media (max-width:900px) { .topbar { grid-template-columns:190px minmax(0,1fr); }.brand-lockup span,.project-name { display:none; }.workspace { grid-template-columns:minmax(0,1fr) 230px; }.canvas-meta { display:none; }.welcome-hero { grid-template-columns:minmax(0,1fr) 260px; gap:18px; }.announcement-art { min-height:285px; }.demo-board { grid-template-columns:170px minmax(0,1fr); }.save-state { display:none; } }
@media (max-width:720px) { html,body { height:auto; overflow:auto; }.app-shell { height:auto; min-height:100vh; grid-template-rows:auto auto 300px; }.topbar { grid-template-columns:1fr; }.header-actions { flex-wrap:wrap; justify-content:flex-start; }.workspace { grid-template-columns:1fr; }.preview-panel { min-height:430px; }.inspector { min-height:300px; }.timeline-panel { min-height:300px; }.save-state { display:none; }.game-button { max-width:180px; }.project-menu { display:none; }.edu-prompt strong { font-size:34px; }.edu-sun i,.edu-leaf i { transform:scale(.75); }.edu-card span { font-size:25px; } }
@media (max-width:640px) { .welcome-dialog { max-height:96vh; overflow:auto; }.welcome-card { min-height:0; }.welcome-step { padding:10px 18px 18px; }.welcome-hero { grid-template-columns:1fr; }.announcement-art { display:none; }.welcome-footer { grid-template-columns:1fr 1fr; }.welcome-footer > span { display:none; }.demo-board { min-height:210px; grid-template-columns:1fr; }.demo-stage { display:none; }.demo-features { grid-template-columns:1fr; }.tutorial-list li { grid-template-columns:38px 1fr; }.tutorial-list li > span { width:36px; height:36px; }.timeline-actions label { display:none; }.demo-library-dialog { max-height:96vh; }.demo-library-card { max-height:96vh; }.demo-library-grid { grid-template-columns:1fr; }.demo-library-header { padding:18px 18px 13px; }.demo-library-footer { padding:10px 16px; }.demo-library-footer span { display:none; }.library-button { padding-inline:8px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition-duration:.001ms!important; animation-duration:.001ms!important; }.demo-playhead { animation:none; } }
