:root {
  --bg: #080a0f;
  --bg-raised: #11141b;
  --bg-panel: rgba(20, 23, 31, 0.78);
  --bg-panel-solid: #151922;
  --line: rgba(255, 255, 255, 0.1);
  --line-bright: rgba(255, 255, 255, 0.18);
  --text: #f6f7fb;
  --muted: #9399aa;
  --faint: #656b7a;
  --lime: #e8ff57;
  --lime-strong: #d7f738;
  --violet: #a994ff;
  --violet-dark: #6753c7;
  --cyan: #68e5ef;
  --coral: #ff956c;
  --danger: #ff7373;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --nav-width: 236px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 90% -10%, rgba(140, 108, 255, 0.14), transparent 32rem),
    radial-gradient(circle at 20% 5%, rgba(223, 255, 76, 0.075), transparent 30rem),
    var(--bg);
  color: var(--text);
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

a { color: inherit; text-decoration: none; }

.app-shell { min-height: 100vh; }

.explore-layout { min-height: 100vh; padding-left: var(--nav-width); }

.side-nav {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--nav-width);
  flex-direction: column;
  padding: 22px 14px 16px;
  border-right: 1px solid var(--line);
  background: rgba(10, 12, 17, 0.93);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 0 8px 30px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: var(--lime);
  box-shadow: 0 0 18px rgba(232, 255, 87, 0.28);
  color: #11140b;
  font-size: 18px;
  font-weight: 900;
}

.brand-mark::after {
  position: absolute;
  inset: 5px;
  border: 2px solid currentColor;
  border-radius: 4px;
  content: "";
  opacity: 0.75;
}

.brand-name em { color: var(--lime); font-style: normal; }

.nav-group { display: grid; gap: 4px; }
.nav-label { margin: 0 12px 7px; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #aeb4c2;
  cursor: pointer;
  text-align: left;
  transition: background .2s, color .2s, transform .2s;
}

.nav-link:hover { background: rgba(255,255,255,.055); color: white; }
.nav-link:active { transform: scale(.98); }
.nav-link.active { background: rgba(232,255,87,.12); color: var(--lime); }
.nav-link svg { width: 18px; height: 18px; flex: 0 0 18px; }

.nav-spacer { flex: 1; }

.credit-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  margin: 16px 4px 11px;
  padding: 0 10px;
  border: 1px solid rgba(232,255,87,.17);
  border-radius: 11px;
  background: linear-gradient(105deg, rgba(232,255,87,.12), rgba(143,112,255,.12));
  color: #dce8a5;
  cursor: pointer;
}
.credit-chip strong { margin-left: auto; color: var(--lime); font-size: 13px; }
.credit-icon { color: var(--lime); font-size: 17px; }

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.profile-trigger:hover { border-color: var(--line); background: rgba(255,255,255,.035); }
.avatar { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--violet), #ef9dcf); color: #fff; font-size: 12px; font-weight: 800; }
.profile-copy { min-width: 0; }
.profile-copy b, .profile-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy b { font-size: 12px; }
.profile-copy span { margin-top: 2px; color: var(--muted); font-size: 10px; }

.mobile-topbar { display: none; }
.nav-scrim { display: none; }

.main-content { width: min(1500px, 100%); margin: 0 auto; padding: 0 42px 60px; }

.top-header { display: flex; align-items: center; justify-content: space-between; min-height: 88px; gap: 18px; }
.crumb { color: var(--muted); font-size: 13px; }
.crumb strong { color: var(--text); font-weight: 650; }
.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.02);
  color: #c3c8d2;
  cursor: pointer;
  transition: border .2s, background .2s, color .2s;
}
.icon-button:hover { border-color: var(--line-bright); background: rgba(255,255,255,.075); color: white; }
.icon-button svg { width: 17px; height: 17px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #242936;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
  transition: transform .18s, background .18s, border .18s, box-shadow .18s;
}
.button:hover { transform: translateY(-1px); background: #303747; }
.button:active { transform: translateY(0); }
.button svg { width: 16px; height: 16px; }
.button.primary { background: var(--lime); color: #171a0e; box-shadow: 0 8px 22px rgba(232,255,87,.15); }
.button.primary:hover { background: #f0ff7e; box-shadow: 0 11px 27px rgba(232,255,87,.24); }
.button.ghost { border-color: var(--line); background: rgba(255,255,255,.025); }
.button.ghost:hover { border-color: var(--line-bright); background: rgba(255,255,255,.07); }
.button.violet { background: var(--violet); color: #161221; }
.button.violet:hover { background: #b8a6ff; }
.button.danger { border-color: rgba(255,115,115,.28); background: rgba(255,115,115,.1); color: #ffb6b6; }
.button.small { min-height: 32px; padding: 0 11px; border-radius: 8px; font-size: 12px; }
.button.full { width: 100%; }
.button:disabled { cursor: wait; opacity: .52; transform: none; }

.hero { position: relative; display: grid; min-height: 382px; grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); align-items: center; overflow: hidden; margin: 15px 0 54px; border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-lg); background: linear-gradient(115deg, #171c29 0%, #111620 58%, #171326 100%); box-shadow: var(--shadow); }
.hero::before { position: absolute; inset: 0; background: radial-gradient(circle at 25% 35%, rgba(232,255,87,.2), transparent 28%), linear-gradient(120deg, transparent 35%, rgba(132,91,255,.22)); content: ""; pointer-events: none; }
.hero-copy { position: relative; z-index: 2; padding: 48px 25px 48px 54px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; color: var(--lime); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.hero h1 { max-width: 620px; margin: 0; font-size: clamp(32px, 4vw, 57px); line-height: 1.06; letter-spacing: -.065em; }
.hero h1 span { color: var(--lime); }
.hero p { max-width: 485px; margin: 18px 0 26px; color: #c2c7d3; font-size: 14px; line-height: 1.7; }

.idea-composer { display: flex; width: min(100%, 620px); align-items: center; gap: 9px; padding: 7px 7px 7px 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; background: rgba(4,6,10,.58); box-shadow: 0 13px 30px rgba(0,0,0,.22); }
.idea-composer:focus-within { border-color: rgba(232,255,87,.67); box-shadow: 0 0 0 3px rgba(232,255,87,.1); }
.idea-composer input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: white; font-size: 13px; }
.idea-composer input::placeholder { color: #83899a; }
.idea-composer .button { flex: 0 0 auto; }
.shortcut-hint { display: inline-flex; align-items: center; gap: 3px; margin: 10px 0 0 6px; color: #8e94a2; font-size: 11px; }
.keycap { padding: 2px 5px; border: 1px solid rgba(255,255,255,.16); border-radius: 4px; color: #bdc2cd; font-family: inherit; font-size: 10px; }

.hero-stage { position: relative; min-height: 382px; }
.hero-grid { position: absolute; z-index: 0; inset: 0; opacity: .2; background-image: linear-gradient(rgba(255,255,255,.17) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.17) 1px, transparent 1px); background-size: 25px 25px; mask-image: linear-gradient(to left, black, transparent); }
.hero-orb { position: absolute; width: 290px; height: 290px; border: 1px solid rgba(232,255,87,.44); border-radius: 50%; box-shadow: inset 0 0 38px rgba(232,255,87,.12), 0 0 55px rgba(150,111,255,.19); }
.hero-orb.one { top: 45px; right: 118px; }
.hero-orb.two { top: 103px; right: 41px; width: 204px; height: 204px; border-color: rgba(177,142,255,.55); }
.hero-orb::after { position: absolute; inset: 22%; border: 1px dashed rgba(255,255,255,.28); border-radius: inherit; content: ""; }
.floating-frame { position: absolute; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border: 1px solid rgba(255,255,255,.22); border-radius: 13px; box-shadow: 0 17px 40px rgba(0,0,0,.35); }
.floating-frame::before { position: absolute; inset: 0; content: ""; }
.floating-frame .frame-tag { position: relative; z-index: 1; width: max-content; margin: 9px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.17); border-radius: 5px; background: rgba(10,10,15,.65); color: white; font-size: 9px; font-weight: 700; backdrop-filter: blur(6px); }
.frame-a { top: 38px; right: 63px; width: 147px; height: 196px; transform: rotate(7deg); background: linear-gradient(150deg, #754ed0, #e1839f 48%, #ffd178); }
.frame-a::before { background: radial-gradient(ellipse at 65% 33%, #fff8d0 0 10%, transparent 11%), radial-gradient(ellipse at 39% 56%, #27213f 0 20%, transparent 21%), linear-gradient(155deg, transparent 32%, rgba(13,10,30,.83) 33% 70%, transparent 71%); }
.frame-b { right: 192px; bottom: 35px; width: 153px; height: 106px; transform: rotate(-8deg); background: linear-gradient(135deg, #10293d, #2c7791 53%, #efca82); }
.frame-b::before { background: radial-gradient(ellipse at 60% 45%, #1e2539 0 17%, transparent 18%), linear-gradient(24deg, transparent 43%, rgba(250,211,121,.8) 44% 57%, transparent 58%), linear-gradient(155deg, transparent 51%, rgba(8,17,34,.72) 52%); }
.frame-c { top: 82px; right: 13px; width: 102px; height: 137px; transform: rotate(11deg); background: linear-gradient(150deg, #233d76, #9c6cd8 60%, #f1a687); }
.frame-c::before { background: radial-gradient(ellipse at 38% 35%, #11172b 0 17%, transparent 18%), linear-gradient(25deg, transparent 48%, rgba(235,181,103,.77) 49% 67%, transparent 68%); }
.spark { position: absolute; z-index: 3; border-radius: 50%; background: var(--lime); box-shadow: 0 0 14px var(--lime); }
.spark.one { top: 47px; right: 247px; width: 6px; height: 6px; }.spark.two { right: 83px; bottom: 61px; width: 8px; height: 8px; }.spark.three { top: 259px; right: 342px; width: 4px; height: 4px; background: #b39bff; box-shadow: 0 0 14px #b39bff; }

.section { margin-top: 48px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.section-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.045em; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.text-link { padding: 4px 0; border: 0; background: none; color: #d8deef; cursor: pointer; font-size: 12px; }
.text-link:hover { color: var(--lime); }

.template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.template-card { position: relative; display: flex; min-height: 202px; flex-direction: column; justify-content: flex-end; overflow: hidden; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #151822; cursor: pointer; isolation: isolate; transition: border .2s, transform .22s, box-shadow .22s; }
.template-card:hover { z-index: 1; border-color: rgba(232,255,87,.46); box-shadow: 0 16px 28px rgba(0,0,0,.31); transform: translateY(-4px); }
.template-card::before { position: absolute; z-index: -1; inset: 0; background: var(--poster, linear-gradient(135deg, #334, #725)); content: ""; transition: transform .35s; }
.template-card:hover::before { transform: scale(1.08); }
.template-card::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(to top, rgba(4,5,9,.9), rgba(4,5,9,.05) 73%); content: ""; }
.template-card .tag { align-self: flex-start; margin-bottom: auto; padding: 4px 7px; border: 1px solid rgba(255,255,255,.16); border-radius: 5px; background: rgba(8,9,14,.42); color: #ecedf2; font-size: 10px; font-weight: 700; backdrop-filter: blur(6px); }
.template-card h3 { margin: 0; font-size: 15px; letter-spacing: -.03em; }
.template-card p { margin: 5px 0 0; color: #cdd0d8; font-size: 11px; }
.template-card .arrow { position: absolute; right: 13px; bottom: 14px; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 16px; opacity: 0; transform: translateX(-5px); transition: opacity .2s, transform .2s; }
.template-card:hover .arrow { opacity: 1; transform: translateX(0); }

.feature-rail { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 14px; }
.feature-card { position: relative; display: flex; min-height: 160px; flex-direction: column; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--feature-bg, #131823); cursor: pointer; transition: transform .2s, border .2s; }
.feature-card:hover { border-color: var(--line-bright); transform: translateY(-3px); }
.feature-card h3 { z-index: 1; margin: 0; font-size: 16px; letter-spacing: -.035em; }
.feature-card p { z-index: 1; max-width: 72%; margin: 8px 0 0; color: #b5bac8; font-size: 12px; line-height: 1.55; }
.feature-card .mini-button { z-index: 1; width: max-content; margin-top: auto; color: var(--lime); font-size: 12px; font-weight: 700; }
.feature-art { position: absolute; right: -17px; bottom: -28px; width: 140px; height: 140px; border: 1px solid rgba(255,255,255,.2); border-radius: 30px; background: linear-gradient(145deg, rgba(232,255,87,.38), rgba(148,103,255,.12)); transform: rotate(21deg); }
.feature-art::before, .feature-art::after { position: absolute; border: 1px solid rgba(255,255,255,.25); border-radius: inherit; content: ""; }
.feature-art::before { inset: 17px; }.feature-art::after { inset: 37px; }
.feature-card.character { --feature-bg: linear-gradient(130deg, #191a2b, #20172d); }.feature-card.character .feature-art { border-radius: 50%; background: radial-gradient(circle at 45% 35%, #ffe0a8 0 15%, #b879d8 16% 34%, #272640 35% 53%, transparent 54%), linear-gradient(130deg, #513d86, #a55f9e); }
.feature-card.audio { --feature-bg: linear-gradient(130deg, #121f2a, #112534); }.feature-card.audio .feature-art { width: 136px; height: 86px; border-radius: 20px; background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(100,229,239,.8) 10px 14px, transparent 15px 21px), #163443; }

.community-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.work-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-panel-solid); cursor: pointer; transition: transform .22s, border .22s; }
.work-card:hover { border-color: var(--line-bright); transform: translateY(-3px); }
.work-thumb { position: relative; height: 162px; overflow: hidden; background: var(--poster, linear-gradient(135deg, #553b80, #ef9f6a)); }
.work-thumb::before { position: absolute; inset: 0; background: radial-gradient(ellipse at 65% 32%, rgba(255,232,155,.9) 0 7%, transparent 8%), linear-gradient(150deg, transparent 43%, rgba(15,15,33,.66) 44% 66%, transparent 67%); content: ""; }
.work-thumb::after { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 58%, rgba(10,10,16,.48)); content: ""; }
.episode { position: absolute; z-index: 1; top: 9px; left: 9px; padding: 4px 6px; border-radius: 5px; background: rgba(5,6,10,.64); font-size: 10px; font-weight: 700; backdrop-filter: blur(5px); }
.play-pill { position: absolute; z-index: 1; right: 9px; bottom: 9px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; background: rgba(5,6,10,.55); font-size: 10px; backdrop-filter: blur(4px); }
.work-copy { padding: 13px 14px 14px; }.work-copy h3 { margin: 0; font-size: 14px; }.work-meta { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--muted); font-size: 11px; }.small-avatar { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg,#78cfff,#9658ba); }

.empty-state { display: grid; min-height: 200px; place-items: center; padding: 32px; border: 1px dashed rgba(255,255,255,.18); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-state b { display: block; margin-bottom: 6px; color: var(--text); }

.modal-layer { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(2,3,7,.7); backdrop-filter: blur(12px); animation: fade-in .18s ease-out; }
.modal { width: min(100%, 455px); border: 1px solid var(--line-bright); border-radius: 20px; background: #151821; box-shadow: 0 32px 90px rgba(0,0,0,.62); animation: rise-in .22s ease-out; }
.modal.wide { width: min(100%, 650px); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 21px 22px 10px; }.modal-header h2 { margin: 0; font-size: 18px; letter-spacing: -.04em; }.modal-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.modal-body { padding: 16px 22px 22px; }
.form-field { display: grid; gap: 8px; margin-top: 14px; }.form-field label { color: #cfd3dd; font-size: 12px; font-weight: 650; }.form-field input, .form-field textarea, .form-field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; outline: none; background: #0d1016; color: white; font-size: 13px; transition: border .18s, box-shadow .18s; }.form-field textarea { min-height: 90px; resize: vertical; line-height: 1.6; }.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: rgba(232,255,87,.65); box-shadow: 0 0 0 3px rgba(232,255,87,.08); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 21px; }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }.code-row .button { min-width: 105px; }
.login-note { margin: 15px 0 0; color: var(--faint); font-size: 11px; line-height: 1.6; text-align: center; }

.toast-region { position: fixed; z-index: 130; right: 18px; bottom: 18px; display: grid; width: min(380px, calc(100vw - 36px)); gap: 9px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-bright); border-radius: 12px; background: rgba(22,26,35,.96); box-shadow: 0 14px 32px rgba(0,0,0,.36); color: #e7eaf2; font-size: 12px; line-height: 1.45; animation: toast-in .22s ease-out; }.toast.success .toast-mark { color: var(--lime); }.toast.error .toast-mark { color: var(--danger); }.toast.info .toast-mark { color: var(--cyan); }.toast-mark { padding-top: 1px; font-weight: 900; }

/* Editor */
.editor-layout { min-height: 100vh; padding-left: 274px; background: #0a0c11; }
.editor-nav { position: fixed; z-index: 35; inset: 0 auto 0 0; display: flex; width: 274px; flex-direction: column; border-right: 1px solid var(--line); background: #10131a; }
.editor-nav .brand { margin: 18px 18px 13px; }.editor-nav-project { margin: 0 13px 15px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.026); }.project-title-row { display: flex; align-items: center; gap: 7px; }.project-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px rgba(232,255,87,.65); }.project-title-row b { overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.project-subtitle { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 10px; }.save-pill { color: var(--lime); }
.editor-steps { display: grid; gap: 3px; padding: 0 13px; }.editor-step { display: flex; align-items: center; gap: 10px; min-height: 41px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: #aab0c0; cursor: pointer; text-align: left; transition: color .18s, background .18s; }.editor-step:hover { background: rgba(255,255,255,.045); color: white; }.editor-step.active { background: rgba(232,255,87,.11); color: var(--lime); }.step-number { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 700; }.editor-step.complete .step-number { border-color: var(--lime); background: var(--lime); color: #171a0e; }.editor-step span:last-child { font-size: 12px; font-weight: 600; }
.editor-nav-bottom { margin-top: auto; padding: 13px; border-top: 1px solid var(--line); }.editor-nav-bottom .button { margin-top: 8px; }

.editor-topbar { position: sticky; z-index: 25; top: 0; display: flex; min-height: 65px; align-items: center; justify-content: space-between; gap: 15px; padding: 0 25px; border-bottom: 1px solid var(--line); background: rgba(10,12,17,.86); backdrop-filter: blur(15px); }.editor-breadcrumb { display: flex; min-width: 0; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }.editor-breadcrumb button { overflow: hidden; max-width: 160px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-overflow: ellipsis; white-space: nowrap; }.editor-breadcrumb button:hover { color: var(--lime); }.editor-breadcrumb strong { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }.editor-header-actions { display: flex; align-items: center; gap: 9px; }

.editor-stage { display: grid; grid-template-columns: minmax(230px, .77fr) minmax(410px, 1.42fr) minmax(250px, .81fr); min-height: calc(100vh - 65px); }
.editor-panel { min-width: 0; border-right: 1px solid var(--line); background: #10131a; }.editor-panel:last-child { border-right: 0; }.panel-head { display: flex; align-items: center; justify-content: space-between; min-height: 53px; padding: 0 15px; border-bottom: 1px solid var(--line); }.panel-head h2 { margin: 0; font-size: 13px; letter-spacing: -.02em; }.panel-head-meta { color: var(--faint); font-size: 10px; }.panel-scroll { max-height: calc(100vh - 118px); overflow-y: auto; scrollbar-color: #303646 transparent; }

.script-panel { background: #101319; }.script-toolbar { display: flex; gap: 5px; padding: 11px 13px 5px; }.toolbar-pill { padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }.toolbar-pill.active, .toolbar-pill:hover { background: rgba(255,255,255,.08); color: white; }.script-document { padding: 10px 14px 24px; }.script-document textarea { width: 100%; min-height: 113px; padding: 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #0b0e14; color: #dfe3eb; font-family: inherit; font-size: 12px; line-height: 1.65; resize: vertical; }.script-document textarea:focus { border-color: rgba(232,255,87,.5); }.scene-list { display: grid; gap: 8px; margin-top: 14px; }.scene-card { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.022); cursor: pointer; transition: border .18s, background .18s; }.scene-card:hover, .scene-card.active { border-color: rgba(232,255,87,.36); background: rgba(232,255,87,.055); }.scene-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 10px; }.scene-card h3 { margin: 5px 0 4px; font-size: 12px; }.scene-card p { display: -webkit-box; margin: 0; overflow: hidden; color: #9ca2b1; font-size: 11px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }.scene-duration { color: var(--cyan); }.add-scene { width: 100%; margin-top: 10px; padding: 9px; border: 1px dashed rgba(255,255,255,.22); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }.add-scene:hover { border-color: var(--lime); color: var(--lime); }

.canvas-panel { display: flex; min-height: 0; flex-direction: column; background: #0c0f15; }.canvas-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-bottom: 1px solid var(--line); }.canvas-view-switch { display: flex; gap: 2px; padding: 3px; border-radius: 8px; background: rgba(255,255,255,.06); }.canvas-view-switch button { padding: 5px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }.canvas-view-switch button.active { background: #2a3040; color: white; }.canvas-zoom { margin-left: auto; color: var(--muted); font-size: 10px; }.canvas-workspace { position: relative; flex: 1; min-height: 410px; overflow: auto; padding: 22px; background-image: radial-gradient(rgba(130,138,156,.16) 1px, transparent 1px); background-size: 15px 15px; }.storyboard { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 15px; min-width: 500px; padding-bottom: 30px; }.shot { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #151923; box-shadow: 0 8px 17px rgba(0,0,0,.15); cursor: pointer; transition: transform .18s, border .18s, box-shadow .18s; }.shot:hover, .shot.selected { border-color: rgba(232,255,87,.55); box-shadow: 0 12px 24px rgba(0,0,0,.28); transform: translateY(-2px); }.shot-image { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--shot-bg, linear-gradient(135deg, #753d8d, #d98072)); }.shot-image::before { position: absolute; inset: 0; content: ""; background: var(--shot-art, radial-gradient(ellipse at 68% 30%, #ffe8ac 0 9%, transparent 10%), linear-gradient(150deg, transparent 38%, rgba(18,18,39,.76) 39% 63%, transparent 64%)); }.shot-image::after { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.36), transparent 45%); content: ""; }.shot-index { position: absolute; z-index: 2; top: 8px; left: 8px; display: grid; width: 21px; height: 21px; place-items: center; border-radius: 5px; background: rgba(6,7,10,.64); color: #fff; font-size: 10px; font-weight: 800; }.shot-state { position: absolute; z-index: 2; top: 9px; right: 9px; color: var(--lime); font-size: 10px; }.shot-copy { padding: 9px 10px 11px; }.shot-copy b { display: block; overflow: hidden; color: #edf0f5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.shot-copy span { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.shot-add { display: grid; min-height: 155px; place-items: center; border: 1px dashed rgba(255,255,255,.2); border-radius: 12px; background: rgba(255,255,255,.02); color: var(--muted); cursor: pointer; font-size: 11px; }.shot-add:hover { border-color: var(--lime); color: var(--lime); }

.inspector-panel { background: #101319; }.inspector-tabs { display: flex; padding: 5px 11px; border-bottom: 1px solid var(--line); gap: 3px; }.inspector-tabs button { flex: 1; padding: 7px 5px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }.inspector-tabs button.active { background: rgba(255,255,255,.08); color: white; }.inspector-body { padding: 13px; }.render-preview { position: relative; aspect-ratio: 9 / 16; max-height: 330px; overflow: hidden; margin: 0 auto 14px; border: 1px solid var(--line-bright); border-radius: 13px; background: var(--preview-bg, linear-gradient(145deg, #6145a5, #e38a85 55%, #f0d788)); box-shadow: 0 15px 31px rgba(0,0,0,.3); }.render-preview::before { position: absolute; inset: 0; background: radial-gradient(ellipse at 65% 27%, #fff4be 0 7%, transparent 8%), radial-gradient(ellipse at 35% 44%, #251b4b 0 18%, transparent 19%), linear-gradient(150deg, transparent 37%, rgba(14,13,34,.7) 38% 68%, transparent 69%); content: ""; }.render-preview::after { position: absolute; inset: 0; background: linear-gradient(to top, rgba(5,7,15,.68), transparent 55%); content: ""; }.preview-subtitle { position: absolute; z-index: 1; right: 13px; bottom: 14px; left: 13px; padding: 7px 9px; border-radius: 5px; background: rgba(7,8,14,.65); color: white; font-size: 10px; line-height: 1.45; text-align: center; }.preview-play { position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(8,9,15,.48); color: white; cursor: pointer; transform: translate(-50%,-50%); }.preview-play:hover { background: rgba(232,255,87,.9); color: #10140b; }.preview-dots { display: flex; justify-content: center; gap: 5px; margin-top: 7px; }.preview-dots i { width: 4px; height: 4px; border-radius: 50%; background: #646a7a; }.preview-dots i.active { width: 16px; border-radius: 5px; background: var(--lime); }
.control-stack { display: grid; gap: 13px; margin-top: 15px; }.control-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.control-row label { color: #bdc2cd; font-size: 11px; }.select-dark { max-width: 142px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #0b0e14; color: #e0e3eb; font-size: 10px; }.range { width: 130px; accent-color: var(--lime); }.toggle { position: relative; width: 31px; height: 18px; padding: 0; border: 0; border-radius: 15px; background: #404656; cursor: pointer; }.toggle::after { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: white; content: ""; transition: transform .18s; }.toggle.on { background: #a8c333; }.toggle.on::after { transform: translateX(13px); }
.generation-card { margin-top: 19px; padding: 12px; border: 1px solid rgba(169,148,255,.27); border-radius: 10px; background: linear-gradient(135deg, rgba(169,148,255,.15), rgba(101,229,239,.06)); }.generation-card h3 { margin: 0 0 5px; color: #e7e2ff; font-size: 12px; }.generation-card p { margin: 0; color: #b6b3c6; font-size: 10px; line-height: 1.5; }.generation-card .button { margin-top: 11px; }

.character-list { display: grid; gap: 8px; padding: 11px 13px; }.character-card { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.02); }.character-portrait { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 8px; background: linear-gradient(145deg, var(--char-a,#6e75bc), var(--char-b,#e395a1)); color: #fff; font-size: 13px; font-weight: 800; }.character-card b { display: block; font-size: 11px; }.character-card span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }.character-card button { padding: 4px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }.character-card button:hover { color: var(--lime); }

.job-strip { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-bottom: 1px solid rgba(232,255,87,.17); background: rgba(232,255,87,.08); color: #e3ecb3; font-size: 10px; }.job-spinner { width: 13px; height: 13px; flex: 0 0 13px; border: 2px solid rgba(232,255,87,.3); border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; }.job-progress { width: 65px; height: 4px; overflow: hidden; margin-left: auto; border-radius: 5px; background: rgba(255,255,255,.12); }.job-progress i { display: block; width: var(--progress, 20%); height: 100%; border-radius: inherit; background: var(--lime); transition: width .3s; }

.command-palette { position: fixed; z-index: 105; top: min(20vh, 180px); left: 50%; width: min(560px, calc(100vw - 32px)); overflow: hidden; border: 1px solid var(--line-bright); border-radius: 15px; background: #171b24; box-shadow: 0 28px 80px rgba(0,0,0,.6); transform: translateX(-50%); }.command-search { display: flex; align-items: center; gap: 9px; padding: 13px; border-bottom: 1px solid var(--line); }.command-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: white; }.command-results { padding: 7px; }.command-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: #cfd3dc; cursor: pointer; text-align: left; }.command-item:hover { background: rgba(255,255,255,.07); color: white; }.command-item span:last-child { margin-left: auto; color: var(--faint); font-size: 10px; }

.hidden { display: none !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(9px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 1250px) {
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-layout { padding-left: 235px; }.editor-nav { width: 235px; }.editor-stage { grid-template-columns: minmax(210px,.75fr) minmax(350px,1.3fr) minmax(220px,.75fr); }
  .main-content { padding-right: 28px; padding-left: 28px; }
}

@media (max-width: 1020px) {
  :root { --nav-width: 0px; }
  .side-nav { width: 252px; transform: translateX(-102%); transition: transform .23s ease; }.side-nav.open { box-shadow: 18px 0 40px rgba(0,0,0,.33); transform: translateX(0); }.nav-scrim { position: fixed; z-index: 29; inset: 0; display: block; background: rgba(0,0,0,.5); }.mobile-topbar { position: sticky; z-index: 22; top: 0; display: flex; min-height: 60px; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(10,12,17,.86); backdrop-filter: blur(14px); }.mobile-topbar .brand { min-height: 0; margin: 0; }.top-header { display: none; }.main-content { padding-top: 3px; }.hero { grid-template-columns: 1fr; }.hero-copy { padding: 42px 36px 20px; }.hero-stage { min-height: 230px; }.hero-orb.one { top: -70px; right: 92px; }.hero-orb.two { top: -10px; right: 21px; }.frame-a { top: 12px; right: 81px; transform: scale(.8) rotate(7deg); transform-origin: top right; }.frame-b { right: 194px; bottom: -10px; transform: scale(.78) rotate(-8deg); transform-origin: bottom right; }.frame-c { top: 26px; right: 16px; transform: scale(.75) rotate(11deg); transform-origin: top right; }.spark.three { right: 294px; bottom: 40px; }
  .editor-layout { padding-left: 0; }.editor-nav { transform: translateX(-102%); transition: transform .22s ease; }.editor-nav.open { box-shadow: 17px 0 44px rgba(0,0,0,.4); transform: translateX(0); }.editor-topbar { padding: 0 14px; }.editor-stage { grid-template-columns: minmax(220px,.7fr) minmax(390px,1.3fr); }.inspector-panel { display: none; }.editor-topbar .mobile-menu { display: inline-grid; }
}

@media (min-width: 1021px) { .mobile-menu { display: none; } }

@media (max-width: 700px) {
  .main-content { padding: 0 16px 44px; }.mobile-topbar { margin: 0 -0px; }.hero { min-height: 0; margin: 8px 0 38px; border-radius: 18px; }.hero-copy { padding: 32px 20px 13px; }.hero h1 { font-size: clamp(31px, 10vw, 44px); }.hero p { font-size: 12px; }.idea-composer { align-items: stretch; flex-wrap: wrap; padding: 10px; }.idea-composer input { width: 100%; flex-basis: 100%; padding: 3px 5px; }.idea-composer .button { width: 100%; }.shortcut-hint { display: none; }.hero-stage { min-height: 170px; }.hero-orb.one { width: 210px; height: 210px; top: -60px; right: 67px; }.hero-orb.two { width: 147px; height: 147px; top: -18px; right: 3px; }.frame-a { top: 7px; right: 46px; transform: scale(.58) rotate(7deg); }.frame-b { right: 144px; bottom: -22px; transform: scale(.56) rotate(-8deg); }.frame-c { top: 21px; right: -1px; transform: scale(.55) rotate(11deg); }.spark.one { top: 23px; right: 166px; }.spark.two { right: 60px; bottom: 31px; }.spark.three { right: 192px; bottom: 26px; }
  .section { margin-top: 35px; }.section-heading h2 { font-size: 19px; }.template-grid, .community-grid { grid-template-columns: 1fr; }.template-card { min-height: 180px; }.feature-rail { grid-template-columns: 1fr; }.feature-card { min-height: 135px; }.feature-card p { max-width: 68%; }.modal-layer { align-items: end; padding: 0; }.modal { width: 100%; max-height: 94vh; overflow-y: auto; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 18px 18px 0 0; }.form-row { grid-template-columns: 1fr; }.toast-region { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .editor-topbar { min-height: 57px; }.editor-header-actions .button.ghost { display: none; }.editor-header-actions .button { padding: 0 9px; }.editor-breadcrumb { gap: 6px; }.editor-breadcrumb strong { max-width: 105px; }.editor-stage { display: block; }.editor-panel { display: none; border-right: 0; }.editor-panel.mobile-active { display: block; }.canvas-panel { min-height: calc(100vh - 57px); }.script-panel { min-height: calc(100vh - 57px); }.panel-scroll { max-height: none; }.canvas-workspace { min-height: calc(100vh - 160px); padding: 14px; }.storyboard { grid-template-columns: 1fr; min-width: 0; gap: 11px; }.shot { min-height: 0; }.editor-nav { width: 260px; }.editor-steps { grid-template-columns: 1fr 1fr; }.editor-step { min-height: 38px; }.editor-nav-bottom { margin-top: 10px; }.editor-nav .brand { margin-bottom: 8px; }.editor-nav-project { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
