:root {
  --navy: #063b8e;
  --navy-dark: #071d49;
  --gold: #ffcb05;
  --sky: #6eb7ff;
  --ink: #111d35;
  --muted: #687187;
  --line: #dfe3ea;
  --wash: #f4f6fa;
  --white: #fff;
  --danger: #c43b42;
  --shadow: 0 18px 54px rgba(14, 30, 65, .13);
  --radius: 16px;
  font-family: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #eef1f7; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button, label[for] { cursor: pointer; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 276px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 276px; display: flex; flex-direction: column; background: var(--navy-dark); color: white; padding: 25px 20px 17px; z-index: 5; overflow: hidden; }
.sidebar::after { content: ""; position: absolute; width: 270px; height: 270px; right: -160px; bottom: 70px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 35px rgba(255,255,255,.025), 0 0 0 70px rgba(255,255,255,.018); pointer-events: none; }
.brand-lockup { display: flex; align-items: flex-end; gap: 10px; position: relative; z-index: 1; }
.brand-lockup p { margin: 0 0 2px; color: var(--gold); letter-spacing: .18em; font: 700 10px/1 "Space Grotesk"; }
.brand-mark { display: flex; flex-direction: column; align-items: flex-start; font: 700 14px/18px "Space Grotesk"; letter-spacing: 0; }
.brand-mark .brand-row { display: flex; }
.brand-mark span { display: grid; place-items: center; background: #0f4597; color: var(--sky); }
.brand-mark span { width: 18px; height: 18px; }
.brand-mark .brand-row:first-child span:nth-child(odd) { background: var(--gold); color: var(--navy); }
.brand-mark .brand-row:last-child span:nth-child(odd) { background: var(--sky); color: var(--navy); }
.brand-mark .brand-row:last-child span:nth-child(even) { background: var(--gold); color: var(--navy); }

.sidebar-summary { display: grid; grid-template-columns: 1fr 1fr; margin: 28px 0 16px; padding: 15px 0; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); position: relative; z-index: 1; }
.sidebar-summary div { display: flex; align-items: baseline; gap: 6px; }
.sidebar-summary strong { font: 600 24px "Space Grotesk"; color: var(--gold); }
.sidebar-summary span { font-size: 11px; color: #aab7d1; text-transform: uppercase; letter-spacing: .08em; }
.search-wrap { height: 40px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; display: flex; align-items: center; gap: 9px; padding: 0 11px; background: rgba(255,255,255,.06); position: relative; z-index: 1; }
.search-wrap:focus-within { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(110,183,255,.15); }
.search-wrap svg { width: 17px; fill: none; stroke: #93a4c5; stroke-width: 1.8; }
.search-wrap input { width: 100%; border: 0; outline: 0; color: white; background: transparent; font-size: 13px; }
.search-wrap input::placeholder { color: #7f90b0; }
.filter-row { display: flex; gap: 5px; margin: 12px 0 10px; position: relative; z-index: 1; }
.filter-pill { border: 0; border-radius: 20px; padding: 6px 9px; color: #91a1be; background: transparent; font-size: 10px; font-weight: 700; }
.filter-pill.active { color: var(--navy-dark); background: var(--gold); }
.guide-list { flex: 1; min-height: 0; overflow: auto; margin: 0 -8px; padding: 2px 8px 6px; scrollbar-width: thin; scrollbar-color: #30466e transparent; position: relative; z-index: 1; }
.guide-item { width: 100%; border: 0; display: grid; grid-template-columns: 35px 1fr auto; gap: 10px; align-items: center; padding: 10px; margin: 2px 0; color: white; background: transparent; text-align: left; border-radius: 10px; }
.guide-item:hover { background: rgba(255,255,255,.06); }
.guide-item.active { background: #123568; box-shadow: inset 3px 0 var(--gold); }
.guide-avatar { width: 35px; height: 35px; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: #1b4d8d; color: var(--sky); font: 700 11px "Space Grotesk"; }
.guide-avatar img { width: 100%; height: 100%; object-fit: cover; }
.guide-copy { min-width: 0; }
.guide-copy b, .guide-copy small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.guide-copy b { font-size: 12px; font-weight: 600; }
.guide-copy small { margin-top: 3px; color: #90a2c1; font-size: 10px; }
.guide-state { width: 7px; height: 7px; border-radius: 50%; background: #8b96aa; }
.guide-state.published, .guide-state.ready { background: #54c689; box-shadow: 0 0 0 3px rgba(84,198,137,.12); }
.guide-state.review { background: var(--gold); }
.empty-list { padding: 30px 12px; color: #8ea0c0; text-align: center; font-size: 12px; }
.add-guide-btn { position: relative; flex: 0 0 42px; width: 100%; height: 42px; margin-top: 10px; border: 1px solid rgba(255,203,5,.42); border-radius: 10px; background: #112f5e; color: var(--gold); font-size: 12px; font-weight: 700; z-index: 2; }
.add-guide-btn:hover { background: #183d75; }
.sidebar-foot { position: static; flex: 0 0 auto; margin-top: 11px; color: #7184a6; font-size: 10px; display: flex; align-items: center; gap: 7px; }
.autosave-dot, .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #54c689; box-shadow: 0 0 0 3px rgba(84,198,137,.13); display: inline-block; }

.workspace { grid-column: 2; min-width: 0; background: #f5f6f9; min-height: 100vh; }
.topbar { height: 96px; display: flex; align-items: center; justify-content: space-between; padding: 0 38px; background: white; border-bottom: 1px solid var(--line); }
.eyebrow { margin-bottom: 6px; color: #8a93a5; letter-spacing: .12em; font-size: 9px; font-weight: 700; }
.eyebrow span { margin: 0 7px; color: var(--gold); }
h1 { margin: 0; font: 600 24px/1 "Space Grotesk"; letter-spacing: -.03em; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.button { min-height: 40px; border: 1px solid transparent; border-radius: 9px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 700; text-decoration: none; }
.button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button.primary { color: var(--navy-dark); background: var(--gold); box-shadow: 0 7px 18px rgba(255,203,5,.22); }
.button.primary:hover { filter: brightness(.97); transform: translateY(-1px); }
.button.secondary { color: #34415a; background: white; border-color: #cfd5df; }
.button.secondary:hover { border-color: #98a3b5; }
.button.publish { color: white; background: #188653; border-color: #188653; box-shadow: 0 7px 18px rgba(24,134,83,.18); }
.button.publish:hover { background: #147346; transform: translateY(-1px); }
.button.danger-outline { color: var(--danger); background: white; border-color: #e8b8bb; }
.button.danger-outline:hover { background: #fff5f5; border-color: var(--danger); }
.button.ghost { min-width: 40px; padding: 0; color: #7b8497; background: transparent; }
.tabs { height: 54px; display: flex; padding: 0 38px; gap: 24px; background: white; border-bottom: 1px solid var(--line); }
.tab { border: 0; border-bottom: 2px solid transparent; padding: 0 2px; background: transparent; color: #737d91; font-size: 12px; font-weight: 700; }
.tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.tab-count { margin-left: 4px; min-width: 19px; padding: 2px 5px; border-radius: 8px; color: #6b7487; background: #eceff4; font-size: 9px; }
.tab-panel { display: none; padding: 28px 38px 42px; }
.tab-panel.active { display: block; }

.editor-grid { display: grid; grid-template-columns: minmax(420px, 520px) minmax(460px, 1fr); gap: 28px; align-items: start; }
.editor-form { display: grid; gap: 15px; }
.form-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 5px 18px rgba(31,49,85,.035); }
.form-card.compact { padding-bottom: 18px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-heading > div { display: flex; align-items: center; gap: 10px; }
.section-number { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #dae0e9; border-radius: 7px; color: var(--navy); font: 700 9px "Space Grotesk"; }
.section-heading h2 { margin: 0; font: 600 15px "Space Grotesk"; }
.helper { color: #98a0af; font-size: 10px; }
.status-chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 5px 9px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.status-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-chip.warning { color: #9c6b00; background: #fff5cf; }
.status-chip.published, .status-chip.ready { color: #187646; background: #dff7e9; }
.status-chip.review { color: #3655a5; background: #e7edff; }
.photo-field { display: grid; grid-template-columns: 74px 1fr; gap: 15px; align-items: center; padding: 13px; margin-bottom: 19px; border: 1px dashed #cdd4df; border-radius: 12px; background: #fafbfc; }
.photo-thumb { width: 74px; height: 74px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, var(--sky), var(--navy)); color: white; font: 700 20px "Space Grotesk"; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-field strong { font-size: 12px; }
.photo-field p { margin: 4px 0 7px; color: #7c8596; font-size: 10px; }
.inline-actions { display: flex; gap: 12px; }
.text-button { border: 0; padding: 0; color: var(--navy); background: transparent; font-size: 10px; font-weight: 700; }
.text-button.muted { color: #969eac; }
.field-grid { display: grid; gap: 12px; align-items: start; }
.field-grid.two { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.field-grid.two > label, .field-grid.two > label:last-child { align-self: start; margin-bottom: 14px; }
.editor-form label, .settings-row label { position: relative; display: grid; gap: 7px; margin-bottom: 14px; color: #3e485c; font-size: 10px; font-weight: 700; }
.editor-form label:last-child { margin-bottom: 0; }
.optional { color: #a3aab6; font-weight: 500; }
input, textarea, select { width: 100%; border: 1px solid #d4dae4; border-radius: 9px; outline: 0; padding: 10px 11px; color: var(--ink); background: white; font-size: 12px; transition: .18s ease; }
input:not([type="radio"]):not([type="checkbox"]), select { min-height: 40px; }
input[readonly] { color: #687386; background: #f5f7fa; }
textarea { min-height: 58px; resize: vertical; line-height: 1.35; }
input:focus, textarea:focus, select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(6,59,142,.08); }
.character-count { position: absolute; right: 10px; bottom: 8px; color: #a2a9b5; background: white; padding-left: 5px; font-size: 8px; font-weight: 500; }
.character-count b { font-weight: inherit; }

.preview-column { position: sticky; top: 18px; min-width: 0; }
.preview-head { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 10px; color: #747e91; font-size: 10px; }
.preview-head > div:first-child { display: flex; align-items: center; gap: 8px; }
.preview-head strong { color: #2f394d; font-size: 11px; }
.view-switch { display: flex; padding: 2px; background: #e8ebf0; border-radius: 7px; }
.view-switch button { border: 0; padding: 4px 8px; background: transparent; border-radius: 5px; color: #7e8798; font-size: 9px; }
.view-switch button.active { color: #27334b; background: white; box-shadow: 0 1px 4px rgba(20,35,66,.12); }
.preview-stage { padding: 17px; border-radius: 17px 17px 0 0; background: #151e30; box-shadow: var(--shadow); overflow: auto; }
.video-canvas { --speed: 1; position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #073b85 0%, #0b61b4 52%, #164f91 100%); isolation: isolate; }
.video-canvas::before { content: ""; position: absolute; inset: -15%; background: radial-gradient(circle at 78% 17%, rgba(102,196,255,.75), transparent 24%), radial-gradient(circle at 18% 72%, rgba(90,154,231,.56), transparent 28%), linear-gradient(40deg, transparent 28%, rgba(255,255,255,.08) 29% 36%, transparent 37%); filter: blur(18px); transform: scale(1.15); z-index: -2; }
.soft-grid { position: absolute; inset: 0; opacity: .09; background-image: linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px); background-size: 12.5% 22.22%; z-index: -1; }
.gold-frame { position: absolute; inset: 4.6% 4%; border: .55vw solid var(--gold); pointer-events: none; }
.video-canvas:not(.safe-area) .gold-frame { opacity: 0; }
.pride-title { position: absolute; top: 10%; left: 8%; z-index: 5; filter: drop-shadow(0 4px 8px rgba(0,31,80,.16)); font: 700 clamp(12px, 2.45vw, 35px)/1 "Space Grotesk"; letter-spacing: -.06em; }
.pride-title > div { display: flex; width: max-content; }
.pride-title span { width: 1.2em; height: 1.12em; display: grid; place-items: center; background: #0c459d; color: var(--sky); }
.pride-title > div:first-child span:nth-child(odd), .pride-title > div:last-child span:nth-child(even) { background: var(--gold); color: var(--navy); }
.pride-title > div:first-child span:nth-child(4), .pride-title > div:last-child span:nth-child(1), .pride-title > div:last-child span:nth-child(5) { background: var(--sky); color: var(--navy); }
.polaroid { --polaroid-angle: 4deg; --polaroid-drift-x: -1.1%; --polaroid-drift-y: -.8%; --polaroid-lift: 1.012; position: absolute; left: 34%; top: 7%; width: 55%; height: 84%; margin: 0; padding: 4% 3.1% 3%; background: #f7f6f2; box-shadow: 0 11px 22px rgba(0,20,57,.42); transform: rotate(var(--polaroid-angle)); transform-origin: 50% 50%; will-change: transform; }
.polaroid::after { content: ""; position: absolute; inset: 0; opacity: .18; mix-blend-mode: multiply; pointer-events: none; background-image: repeating-linear-gradient(98deg, transparent 0 3px, rgba(50,50,50,.06) 4px); }
.portrait { position: relative; width: 100%; height: 70%; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, #88c8ff, #0b4c9a 75%); color: rgba(255,255,255,.9); font: 700 clamp(30px,7vw,90px) "Space Grotesk"; }
.portrait img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; object-position: 50% 58%; }
.polaroid h3 { position: relative; margin: 4.2% 0 0; font: 600 clamp(12px,2vw,29px)/1.05 "Space Grotesk"; letter-spacing: -.05em; color: #101010; overflow-wrap: anywhere; }
.polaroid p { position: absolute; right: 6%; bottom: 4.4%; margin: 0; font-size: clamp(7px,1.1vw,15px); color: #151515; }
.detail-card { position: absolute; right: 8%; top: 18%; width: 45%; min-height: 63%; padding: 8% 5% 5%; border: 1px solid rgba(255,255,255,.45); background: rgba(3,29,77,.88); color: white; box-shadow: 0 16px 35px rgba(0,20,57,.3); transform: translateX(130%); opacity: 0; }
.detail-rule { position: absolute; top: 7%; left: 10%; width: 24%; height: 4px; background: var(--gold); }
.detail-card > p:first-of-type { margin: 0 0 6%; color: var(--sky); font: 600 clamp(7px,1vw,13px) "Space Grotesk"; letter-spacing: .12em; }
.detail-card h3 { margin: 0 0 9%; color: white; font: 600 clamp(15px,3vw,40px)/1 "Space Grotesk"; letter-spacing: -.05em; }
.detail-card div:last-child { border-top: 1px solid rgba(255,255,255,.25); padding-top: 5%; }
.detail-card div:last-child span { color: var(--gold); font: 700 clamp(6px,.75vw,10px) "Space Grotesk"; letter-spacing: .12em; }
.detail-card div:last-child p { margin: 2% 0 0; font-size: clamp(8px,1.2vw,17px); }
.video-canvas:not(.scene-2) .polaroid { animation: polaroidHover calc(5.4s / var(--speed)) cubic-bezier(.45,.05,.55,.95) infinite; }
.video-canvas:not(.scene-2) .portrait img { animation: portraitDrift calc(8s / var(--speed)) ease-in-out infinite alternate; will-change: transform; }
.video-canvas.scene-2 .polaroid { animation: polaroidAcademicIn calc(.7s / var(--speed)) cubic-bezier(.2,.8,.2,1) both, polaroidAcademicFloat calc(5s / var(--speed)) calc(.7s / var(--speed)) ease-in-out infinite; z-index: 2; }
.video-canvas.scene-2 .polaroid h3 { font-size: clamp(11px,1.65vw,24px); }
.video-canvas.scene-2 .polaroid p { font-size: clamp(6px,.85vw,12px); }
.video-canvas.scene-2 .detail-card { right: 5%; top: 14%; width: 48%; min-height: 70%; padding-top: 7%; }
.video-canvas.scene-2 .detail-card { animation: detailIn calc(.72s / var(--speed)) cubic-bezier(.2,.8,.2,1) both; }
.video-canvas.scene-2 .pride-title { transform: scale(.8); transform-origin: top left; transition: transform .5s ease; }
.video-canvas.motion-pop .polaroid { --polaroid-angle: -2deg; --polaroid-drift-x: 1.3%; --polaroid-drift-y: -1%; --polaroid-lift: 1.018; }
.video-canvas.motion-soft .polaroid { --polaroid-drift-x: -.65%; --polaroid-drift-y: -.5%; --polaroid-lift: 1.008; }
.video-canvas.motion-pop.scene-2 .detail-card { animation-name: detailPop; }
.video-canvas.motion-soft.scene-2 .detail-card { animation-name: detailSoft; }
@keyframes polaroidHover {
  0%, 100% { transform: translate3d(0,0,0) rotate(var(--polaroid-angle)) scale(1); }
  50% { transform: translate3d(var(--polaroid-drift-x),var(--polaroid-drift-y),0) rotate(calc(var(--polaroid-angle) - .7deg)) scale(var(--polaroid-lift)); }
}
@keyframes portraitDrift {
  from { transform: scale(1.035) translate3d(-.45%,.25%,0); }
  to { transform: scale(1.065) translate3d(.45%,-.35%,0); }
}
@keyframes polaroidAcademicIn { to { transform: translate3d(-63%,0,0) scale(.64) rotate(-4deg); opacity: 1; } }
@keyframes polaroidAcademicFloat {
  0%, 100% { transform: translate3d(-63%,0,0) scale(.64) rotate(-4deg); }
  50% { transform: translate3d(-61%,-1%,0) scale(.65) rotate(-3.2deg); }
}
@keyframes detailIn { to { transform: translateX(0); opacity: 1; } }
@keyframes detailPop { 0% { transform: scale(.65) rotate(4deg); opacity: 0; } 70% { transform: scale(1.04) rotate(-1deg); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes detailSoft { from { transform: none; opacity: 0; } to { transform: none; opacity: 1; } }
.transport { height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: #98a4ba; background: #101726; border-radius: 0 0 15px 15px; box-shadow: var(--shadow); font: 500 9px "Space Grotesk"; }
.play-btn, .icon-button { width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #132246; background: var(--gold); }
.play-btn svg, .icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.play-btn .play-icon { fill: currentColor; stroke: none; }
.play-btn .pause-icon { display: none; }
.play-btn.playing .play-icon { display: none; }
.play-btn.playing .pause-icon { display: block; }
.icon-button { color: #9ca8bd; background: transparent; }
.timeline { flex: 1; position: relative; height: 4px; border-radius: 4px; background: #344056; cursor: pointer; }
.timeline-progress { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: var(--gold); }
.scene-marker { position: absolute; top: -2px; width: 1px; height: 8px; background: #69758a; }
.preview-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 11px 13px; border: 1px solid #e1e5ec; border-radius: 9px; color: #7d8799; background: rgba(255,255,255,.65); font-size: 9px; line-height: 1.45; }
.preview-note svg { flex: 0 0 14px; width: 14px; fill: none; stroke: #929cad; stroke-width: 1.7; }

.data-toolbar { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; }
.data-toolbar h2 { margin: 0 0 6px; font: 600 20px "Space Grotesk"; }
.data-toolbar p { margin: 0; color: var(--muted); font-size: 12px; }
.table-card { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 18px rgba(31,49,85,.035); }
table { width: 100%; border-collapse: collapse; min-width: 920px; }
th { padding: 13px 16px; color: #7d879a; background: #fafbfc; border-bottom: 1px solid var(--line); text-align: left; text-transform: uppercase; letter-spacing: .08em; font-size: 9px; }
td { padding: 13px 16px; border-bottom: 1px solid #edf0f4; color: #3b465a; font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }
.table-name { display: flex; align-items: center; gap: 9px; font-weight: 700; color: #17233b; }
.table-avatar { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: #e6eef9; color: var(--navy); font: 700 9px "Space Grotesk"; }
.table-row-button { border: 0; background: transparent; color: var(--navy); font-size: 10px; font-weight: 700; }
.import-hint { margin-top: 12px; color: #7b8597; font-size: 10px; }

.brand-grid { max-width: 970px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.full-span { grid-column: 1 / -1; }
.color-list { display: grid; gap: 9px; }
.color-list label { display: grid; grid-template-columns: 1fr 34px 72px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef0f4; }
.color-list label:last-child { border-bottom: 0; }
.color-list b, .color-list small { display: block; }
.color-list b { font-size: 11px; }
.color-list small { margin-top: 3px; color: #8b94a5; font-size: 9px; }
.color-list input { width: 32px; height: 32px; border: 0; padding: 0; background: transparent; }
.color-list code { color: #687286; font: 500 10px "Space Grotesk"; }
.reset-brand { margin-top: 14px; }
.motion-options { display: grid; gap: 9px; }
.motion-options label input { position: absolute; opacity: 0; }
.motion-options label > span { display: grid; grid-template-columns: 1fr 66px; align-items: center; min-height: 69px; padding: 13px; border: 1px solid #dfe3ea; border-radius: 11px; cursor: pointer; }
.motion-options label input:checked + span { border-color: var(--navy); background: #f7faff; box-shadow: 0 0 0 2px rgba(6,59,142,.08); }
.motion-options b, .motion-options small { display: block; }
.motion-options b { font-size: 11px; }
.motion-options small { margin-top: 4px; color: #8992a3; font-size: 9px; }
.motion-demo { grid-column: 2; grid-row: 1 / span 2; width: 62px; height: 40px; border-radius: 7px; overflow: hidden; background: linear-gradient(135deg, var(--navy), var(--sky)); position: relative; }
.motion-demo::before { content: ""; position: absolute; width: 25px; height: 31px; left: 20px; top: 4px; background: white; box-shadow: 0 2px 5px rgba(0,0,0,.2); }
.slide-demo::before { transform: rotate(8deg); }
.pop-demo::before { transform: scale(1.08) rotate(-3deg); }
.soft-demo::before { opacity: .7; }
.settings-row { display: grid; grid-template-columns: 1fr 190px 1.5fr; gap: 25px; align-items: center; }
.settings-row label { margin: 0; }
.toggle { display: flex !important; align-items: center; gap: 9px !important; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { width: 34px; height: 19px; border-radius: 20px; background: #c8ced8; position: relative; transition: .2s; }
.toggle span::after { content: ""; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: .2s; }
.toggle input:checked + span { background: var(--navy); }
.toggle input:checked + span::after { transform: translateX(15px); }

.menu-popover { position: fixed; min-width: 155px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 14px 40px rgba(16,30,59,.18); z-index: 20; }
.menu-popover button { width: 100%; border: 0; padding: 9px 10px; border-radius: 6px; background: transparent; text-align: left; font-size: 11px; }
.menu-popover button:hover { background: #f3f5f8; }
.menu-popover .danger { color: var(--danger); }
.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(5,16,38,.55); backdrop-filter: blur(5px); }
.modal-backdrop[hidden], .menu-popover[hidden] { display: none; }
.modal { position: relative; width: min(520px, 100%); padding: 30px; border-radius: 18px; background: white; box-shadow: 0 28px 80px rgba(0,12,38,.35); }
.modal-close { position: absolute; right: 16px; top: 14px; border: 0; background: transparent; color: #8d96a7; font-size: 24px; }
.modal-kicker { color: var(--navy); font: 700 9px "Space Grotesk"; letter-spacing: .16em; }
.modal h2 { margin: 6px 0 9px; font: 600 23px "Space Grotesk"; }
.modal > p { margin: 0 0 20px; color: #747e91; font-size: 11px; line-height: 1.6; }
.embed-code-label { display: block; margin-bottom: 7px; color: #3e485c; font-size: 10px; font-weight: 700; }
.embed-code { width: 100%; min-height: 112px; padding: 13px; border: 1px solid #d7dce5; border-radius: 10px; resize: vertical; color: #20304d; background: #f7f9fc; font: 500 10px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.embed-code:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(6,59,142,.08); }
.embed-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.export-options { display: grid; gap: 9px; }
.export-options button { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; border: 1px solid #e0e4eb; border-radius: 11px; padding: 12px; background: white; text-align: left; }
.export-options button:hover { border-color: var(--navy); background: #f9fbff; }
.file-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; color: var(--navy); background: #eaf2ff; font: 700 10px "Space Grotesk"; }
.export-options b, .export-options small { display: block; }
.export-options b { font-size: 11px; }
.export-options small { margin-top: 4px; color: #8a93a4; font-size: 9px; }
.export-options em { color: var(--navy); font-size: 9px; font-style: normal; font-weight: 700; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; padding: 11px 15px; border-radius: 9px; color: white; background: var(--navy-dark); box-shadow: 0 12px 32px rgba(11,28,60,.25); font-size: 11px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 230px 1fr; }
  .sidebar { width: 230px; }
  .workspace { grid-column: 2; }
  .editor-grid { grid-template-columns: 1fr; }
  .preview-column { position: static; order: -1; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; min-height: 0; padding-bottom: 20px; }
  .guide-list { max-height: 220px; padding-bottom: 4px; }
  .add-guide-btn, .sidebar-foot { position: static; margin-top: 10px; box-shadow: none; }
  .workspace { min-height: 0; }
  .topbar { height: auto; gap: 15px; align-items: flex-start; padding: 20px; flex-direction: column; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .tabs { padding: 0 20px; overflow-x: auto; }
  .tab-panel { padding: 20px; }
  .field-grid.two, .brand-grid, .settings-row { grid-template-columns: 1fr; }
  .editor-grid { grid-template-columns: minmax(0,1fr); }
  .full-span { grid-column: auto; }
  .data-toolbar { align-items: flex-start; gap: 15px; flex-direction: column; }
}

@media print {
  body { background: white; }
  .sidebar, .topbar, .tabs, .editor-form, .preview-head, .transport, .preview-note { display: none !important; }
  .workspace { display: block; }
  .tab-panel { display: none !important; padding: 0; }
  #editorPanel { display: block !important; }
  .editor-grid { display: block; }
  .preview-column { position: static; }
  .preview-stage { padding: 0; background: white; box-shadow: none; }
  .video-canvas { break-inside: avoid; }
}
