:root {
    --bg: #F7FBFF;
    --bg-soft: #EEF6FF;
    --surface: #FFFFFF;
    --ink-900: #061A3A;
    --ink-800: #061A3A;
    --ink-700: #334E73;
    --ink-500: #5D6B7F;
    --ink-400: #98A2B3;
    --ink-300: #D0D5DD;
    --line: #DBE8FB;
    --line-soft: #EEF6FF;
    --green-50: #EEF6FF;
    --green-100: #B9D9FF;
    --green-500: #1D7DF2;
    --green-600: #1D7DF2;
    --blue-50: #EEF6FF;
    --blue-100: #B9D9FF;
    --blue-500: #1D7DF2;
    --blue-600: #1D7DF2;
    --amber-50: #FFF8E6;
    --amber-500: #F4B52B;
    --r-lg: 18px;
    --r-md: 13px;
    --r-sm: 10px;
    --sh-sm: 0 1px 2px rgba(16,24,40,.05);
    --sh-card: 0 1px 3px rgba(16,24,40,.05), 0 12px 28px -14px rgba(16,24,40,.18);
    --sh-pop: 0 24px 60px -16px rgba(16,24,40,.4);
    --sh-btn: 0 8px 20px -6px rgba(15,20,28,.45);
    --font: "Plus Jakarta Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; height: 100%; }
  body { font-family: var(--font); background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); color: var(--ink-900); -webkit-font-smoothing: antialiased; line-height: 1.5; overflow: hidden; }
  button { font-family: inherit; cursor: pointer; }
  textarea, input, select { font-family: inherit; }

  .app { display: grid; grid-template-columns: 76px 1fr; height: 100vh; }

  /* ---------- Left nav ---------- */
  .nav { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 20px 0 18px; gap: 4px; }
  .nav__logo { width: 48px; height: 48px; border-radius: 16px; background: #fff; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: 0; margin-bottom: 18px; flex: none; box-shadow: 0 12px 28px rgba(29,125,242,.18); border: 1px solid var(--line); overflow: hidden; }
  .nav__logo img { width: 42px; height: 42px; object-fit: contain; display: block; }
  .nav__items { display: flex; flex-direction: column; gap: 4px; width: 100%; align-items: center; }
  .nav__item { width: 56px; height: 54px; border-radius: 15px; border: none; background: transparent; color: var(--ink-400); display: grid; place-items: center; transition: background .16s, color .16s; }
  .nav__col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .nav__item svg { width: 21px; height: 21px; display: block; }
  .nav__label { font-size: 10px; font-weight: 600; }
  .nav__item:hover { background: var(--line-soft); color: var(--ink-700); }
  .nav__item.is-active { background: var(--blue-500); color: #fff; box-shadow: 0 12px 28px rgba(29,125,242,.24); }
  .nav__spacer { flex: 1; }
  .nav__avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(140deg, #1D7DF2, #F4B52B); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; box-shadow: var(--sh-sm); }

  /* ---------- Main shell ---------- */
  .main { display: flex; flex-direction: column; height: 100vh; min-width: 0; }

  .appbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 26px; border-bottom: 1px solid var(--line); background: var(--surface); flex: none; }
  .appbar__title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
  .appbar__title h1 { font-size: 18px; font-weight: 800; letter-spacing: -.5px; margin: 0; white-space: nowrap; }
  .appbar__title p { font-size: 13px; color: var(--ink-500); margin: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .appbar__right { display: flex; align-items: center; gap: 9px; flex: none; }
  .lang-switch { height: 39px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); display: inline-flex; align-items: center; padding: 0 10px; }
  .lang-switch select { border: none; outline: none; background: transparent; color: var(--ink-700); font-size: 13.5px; font-weight: 700; cursor: pointer; padding-right: 2px; }

  .pill { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink-700); }
  .pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-400); flex: none; }
  .pill[data-state="active"] { background: var(--green-50); border-color: var(--green-100); color: var(--green-600); }
  .pill[data-state="active"] .dot { background: var(--green-500); box-shadow: 0 0 0 3px rgba(16,185,129,.2); }
  .pill[data-state="checking"] { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-600); }
  .pill[data-state="checking"] .dot { background: var(--blue-500); animation: pulse 1.2s infinite; }
  .pill[data-state="local"] { background: var(--amber-50); border-color: #FDE9C8; color: #B45309; }
  .pill[data-state="local"] .dot { background: var(--amber-500); }
  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
  .btn-ghost { border: 1px solid var(--line); background: var(--surface); color: var(--ink-700); border-radius: 11px; padding: 9px 14px; font-size: 13.5px; font-weight: 600; transition: background .15s; }
  .btn-ghost:hover { background: var(--line-soft); }

  /* ---------- Workspace ---------- */
  .workspace { display: grid; grid-template-columns: minmax(0,1fr) 404px; flex: 1; min-height: 0; }
  .workspace.inspector-collapsed { grid-template-columns: minmax(0,1fr) 76px; }
  .page-view { display: none; }
  .page-view.is-active { display: grid; }

  /* canvas */
  .canvas { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 20px 24px; gap: 18px; }
  .canvas__stagewrap { flex: 1; min-height: 0; display: grid; place-items: center; }
  .stage { position: relative; width: 100%; max-width: 900px; aspect-ratio: 16 / 9; max-height: 100%; border-radius: var(--r-lg); overflow: hidden; background: radial-gradient(120% 120% at 70% 8%, #1D7DF2 0%, #061A3A 55%, #031027 100%); box-shadow: var(--sh-card); }
  .workspace.inspector-collapsed .stage { max-width: 1080px; }
  .stage__glow { position: absolute; inset: 0; background: radial-gradient(40% 60% at 50% 38%, rgba(244,181,43,.25), transparent 70%), radial-gradient(45% 55% at 72% 70%, rgba(29,125,242,.28), transparent 70%); }
  .stage__avatar { position: absolute; left: 50%; top: 45%; transform: translate(-50%,-50%); width: 116px; height: 116px; border-radius: 50%; background: linear-gradient(150deg, rgba(255,255,255,.16), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; color: rgba(255,255,255,.92); font-size: 40px; font-weight: 700; letter-spacing: -1px; }
  .stage__play { position: absolute; left: 50%; top: 45%; transform: translate(-50%,-50%); width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); cursor: pointer; transition: transform .15s; z-index: 2; }
  .stage__play:hover { transform: translate(-50%,-50%) scale(1.07); }
  .stage__play svg { width: 24px; height: 24px; color: var(--ink-900); margin-left: 3px; }
  .stage__lower { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 22px 18px; background: linear-gradient(transparent, rgba(8,12,16,.8)); display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
  .stage__name { min-width: 0; color: #fff; }
  .stage__name b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
  .stage__name small { display: block; font-size: 12.5px; color: rgba(255,255,255,.72); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
  .stage__badge { flex: none; font-size: 11px; font-weight: 700; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(6px); display: inline-flex; align-items: center; gap: 6px; }
  .stage__badge .d { width: 6px; height: 6px; border-radius: 50%; background: #34D399; }

  /* materials strip */
  .strip { flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 14px 16px; display: flex; align-items: center; gap: 16px; }
  .strip__lead { flex: none; display: flex; flex-direction: column; gap: 9px; padding-right: 16px; border-right: 1px solid var(--line-soft); }
  .strip__title { font-size: 13px; font-weight: 700; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
  .strip__title small { font-weight: 600; color: var(--ink-400); font-size: 12px; }
  .upload-btn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px dashed var(--ink-300); background: var(--surface); color: var(--ink-700); border-radius: 11px; padding: 9px 14px; font-size: 13px; font-weight: 600; transition: all .15s; white-space: nowrap; }
  .upload-btn:hover { border-color: var(--blue-500); color: var(--blue-600); background: var(--blue-50); }
  .upload-btn svg { width: 16px; height: 16px; }
  .strip__files { flex: 1; min-width: 0; display: flex; gap: 9px; overflow-x: auto; padding-bottom: 2px; }
  .strip__files::-webkit-scrollbar { height: 6px; } .strip__files::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
  .file-card { flex: none; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px 8px 8px; background: var(--bg-soft); width: 184px; }
  .file-card__icon { width: 34px; height: 34px; border-radius: 8px; background: #0E1A22; color: #fff; display: grid; place-items: center; flex: none; }
  .file-card__icon svg { width: 16px; height: 16px; }
  .file-card__body { min-width: 0; flex: 1; }
  .file-card__name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .file-card__size { font-size: 11.5px; color: var(--ink-400); margin-top: 1px; font-weight: 500; }
  .strip__empty { flex: 1; display: flex; align-items: center; color: var(--ink-400); font-size: 13px; font-weight: 500; }

  .demo-panels { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 16px; }
  .demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 18px; min-width: 0; }
  .demo-card h2 { margin: 4px 0 8px; font-size: 20px; line-height: 1.25; letter-spacing: -.35px; color: var(--ink-900); }
  .demo-card p { margin: 0; color: var(--ink-500); font-size: 13.5px; font-weight: 500; }
  .demo-card--video { display: grid; grid-template-columns: minmax(230px, .85fr) minmax(260px, 1.15fr); align-items: center; gap: 18px; }
  .demo-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 15px; background: var(--ink-900); border: 1px solid var(--line); display: block; object-fit: cover; box-shadow: 0 14px 32px -24px rgba(6,26,58,.7); }
  .demo-card--live { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; background: linear-gradient(145deg, #fff 0%, #F7FBFF 58%, #FFF8E6 100%); }
  .live-frame { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
  .live-frame__screen { min-height: 96px; border-radius: 16px; border: 1px solid rgba(29,125,242,.24); background: radial-gradient(120% 120% at 80% 20%, rgba(244,181,43,.22), transparent 45%), linear-gradient(145deg, #061A3A, #123D79); color: #fff; padding: 16px; display: grid; align-content: center; gap: 4px; position: relative; overflow: hidden; }
  .live-frame__screen b { font-size: 15px; letter-spacing: -.2px; }
  .live-frame__screen small { color: rgba(255,255,255,.72); font-size: 12px; font-weight: 600; }
  .live-dot { width: 9px; height: 9px; border-radius: 50%; background: #F4B52B; box-shadow: 0 0 0 5px rgba(244,181,43,.22); display: inline-block; }

  /* ---------- Inspector ---------- */
  .inspector { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; position: relative; }
  .inspector__toggle { border: 1px solid var(--line); background: var(--surface); color: var(--ink-700); border-radius: 14px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, color .15s, transform .15s; box-shadow: var(--sh-sm); }
  .inspector__toggle:hover { background: var(--line-soft); color: var(--ink-900); }
  .inspector:not(.is-collapsed) .inspector__toggle { align-self: stretch; margin: 14px 18px 0; padding: 10px 12px; background: var(--ink-800); border-color: var(--ink-800); color: #fff; box-shadow: var(--sh-btn); }
  .inspector:not(.is-collapsed) .inspector__toggle:hover { background: #0b1220; color: #fff; }
  .inspector:not(.is-collapsed) .toggle-icon { transform: rotate(180deg); }
  .inspector.is-collapsed { align-items: center; justify-content: center; padding: 14px 10px; }
  .inspector.is-collapsed .inspector__toggle { width: 52px; min-height: 168px; padding: 12px 8px; flex-direction: column; writing-mode: vertical-rl; text-orientation: mixed; letter-spacing: .6px; }
  .inspector.is-collapsed .toggle-icon { writing-mode: horizontal-tb; }
  .inspector.is-collapsed .inspector__scroll,
  .inspector.is-collapsed .inspector__foot { display: none; }
  .inspector__scroll { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 26px; }
  .insp-sec__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
  .eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--ink-400); }
  .char-count { font-size: 12px; color: var(--ink-400); font-weight: 600; font-variant-numeric: tabular-nums; }

  .reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .reg-field { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-soft); padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, background .15s; min-width: 0; }
  .reg-field.span2 { grid-column: 1 / -1; }
  .reg-field:focus-within { border-color: var(--green-500); background: #fff; }
  .reg-field__k { font-size: 11px; color: var(--ink-400); font-weight: 700; }
  .reg-field input, .reg-field select { border: none; outline: none; background: transparent; font-size: 13.5px; font-weight: 600; color: var(--ink-900); padding: 1px 0; width: 100%; }
  .reg-field input::placeholder { color: var(--ink-400); opacity: 1; font-weight: 600; }
  .reg-field select.is-placeholder { color: var(--ink-400); }
  .reg-field select { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 16px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398A2B3' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right center; }

  textarea.script { width: 100%; min-height: 150px; resize: vertical; border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 14px; font-size: 14px; line-height: 1.7; color: var(--ink-900); outline: none; transition: border-color .15s, box-shadow .15s; background: var(--bg-soft); }
  textarea.script::placeholder { color: var(--ink-400); opacity: 1; font-weight: 500; }
  textarea.script:focus { border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(16,185,129,.12); background: #fff; }
  .quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-700); border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; transition: all .15s; }
  .chip:hover { border-color: var(--green-500); color: var(--green-600); background: var(--green-50); }
  .chip:active { transform: scale(.96); }
  .apply-link { margin-top: 12px; }
  .btn-secondary { border: 1px solid var(--line); background: var(--surface); color: var(--ink-900); border-radius: 11px; padding: 9px 15px; font-size: 13.5px; font-weight: 600; transition: background .15s; box-shadow: var(--sh-sm); }
  .btn-secondary:hover { background: var(--line-soft); }

  /* progress (vertical) */
  .steps { display: flex; flex-direction: column; }
  .step { display: flex; gap: 14px; }
  .step__rail { display: flex; flex-direction: column; align-items: center; flex: none; }
  .step__num { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--ink-400); font-size: 12.5px; font-weight: 700; display: grid; place-items: center; transition: all .25s; flex: none; }
  .step__line { width: 2px; flex: 1; background: var(--line); margin: 4px 0; min-height: 16px; transition: background .25s; border-radius: 2px; }
  .step:last-child .step__line { display: none; }
  .step__body { padding-bottom: 12px; padding-top: 4px; }
  .step__title { font-size: 14px; font-weight: 700; color: var(--ink-700); transition: color .2s; letter-spacing: -.2px; }
  .step__meta { font-size: 12px; color: var(--ink-400); margin-top: 2px; font-weight: 500; }
  .step.is-done .step__num { background: var(--green-500); border-color: var(--green-500); color: #fff; }
  .step.is-done .step__line { background: var(--green-500); }
  .step.is-done .step__title { color: var(--ink-900); }
  .step.is-active .step__num { background: var(--ink-800); border-color: var(--ink-800); color: #fff; box-shadow: 0 0 0 4px rgba(17,24,39,.1); }
  .step.is-active .step__title { color: var(--ink-900); }

  /* inspector footer */
  .inspector__foot { flex: none; border-top: 1px solid var(--line); padding: 16px 22px; background: var(--surface); }
  .btn-primary { width: 100%; border: none; background: var(--ink-800); color: #fff; border-radius: 13px; padding: 14px 20px; font-size: 15px; font-weight: 700; transition: transform .12s, box-shadow .15s, opacity .15s; display: inline-flex; align-items: center; justify-content: center; gap: 9px; box-shadow: var(--sh-btn); }
  .btn-primary svg { width: 18px; height: 18px; }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -6px rgba(15,20,28,.5); }
  .btn-primary:active { transform: translateY(0); }
  .btn-primary[disabled] { opacity: .55; cursor: default; box-shadow: none; transform: none; }
  .foot-hint { font-size: 11.5px; color: var(--ink-400); text-align: center; margin-top: 9px; font-weight: 500; }

  /* ---------- Publish modal ---------- */
  .publish { display: none; position: fixed; inset: 0; z-index: 60; }
  .publish.is-open { display: block; }
  .publish__backdrop { position: absolute; inset: 0; background: rgba(15,20,28,.5); backdrop-filter: blur(3px); animation: fade .25s ease; }
  .publish__card { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(920px, calc(100vw - 48px)); max-height: 86vh; background: var(--surface); border-radius: 22px; box-shadow: var(--sh-pop); display: flex; flex-direction: column; overflow: hidden; animation: rise .3s ease; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes rise { from { opacity: 0; transform: translate(-50%,-46%); } to { opacity: 1; transform: translate(-50%,-50%); } }
  .publish__head { padding: 22px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex: none; }
  .publish__head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.4px; margin: 0; }
  .publish__head p { font-size: 13.5px; color: var(--ink-500); margin: 5px 0 0; font-weight: 500; }
  .publish__close { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-500); display: grid; place-items: center; flex: none; transition: background .15s; }
  .publish__close:hover { background: var(--line-soft); }
  .publish__close svg { width: 18px; height: 18px; }
  .publish__body { overflow-y: auto; padding: 20px 24px 24px; }
  .publish__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }
  .plat { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, box-shadow .15s, transform .15s; }
  .plat:hover { border-color: var(--ink-300); box-shadow: var(--sh-card); transform: translateY(-2px); }
  .plat__head { display: flex; align-items: center; gap: 11px; }
  .plat__logo { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 800; color: #fff; }
  .plat__name { font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; }
  .plat__action { font-size: 12px; color: var(--ink-500); margin-top: 1px; font-weight: 500; }
  .plat__copy { font-size: 13px; color: var(--ink-700); line-height: 1.6; background: var(--bg-soft); border-radius: 11px; padding: 12px 13px; border: 1px solid var(--line); white-space: pre-wrap; flex: 1; }
  .plat__btn { border: 1px solid var(--ink-800); background: var(--ink-800); color: #fff; border-radius: 11px; padding: 10px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: opacity .15s; }
  .plat__btn svg { width: 15px; height: 15px; }
  .plat__btn:hover { opacity: .88; }
  .plat__btn.is-copied { background: var(--green-500); border-color: var(--green-500); }
  .publish__note { margin-top: 18px; font-size: 12.5px; color: var(--ink-500); background: var(--amber-50); border: 1px solid #FDE9C8; border-radius: 13px; padding: 13px 15px; display: flex; gap: 9px; align-items: flex-start; font-weight: 500; }
  .publish__note svg { width: 16px; height: 16px; flex: none; color: var(--amber-500); margin-top: 1px; }

  /* ---------- Toast ---------- */
  .toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink-900); color: #fff; padding: 13px 21px; border-radius: 13px; font-size: 14px; font-weight: 600; box-shadow: var(--sh-pop); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 80; display: flex; align-items: center; gap: 9px; }
  .toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
  .toast svg { width: 16px; height: 16px; color: var(--green-500); }

  /* ---------- Sub pages ---------- */
  .subpage { flex: 1; min-height: 0; overflow-y: auto; padding: 26px; gap: 18px; align-content: start; }
  .subpage.is-active { display: grid; }
  .subpage__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-sm); }
  .subpage__head h2 { margin: 2px 0 4px; font-size: 28px; letter-spacing: -.6px; }
  .subpage__head p { margin: 0; color: var(--ink-500); font-size: 14px; font-weight: 500; }
  .subgrid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
  .subcard,
  .project-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-sm); }
  .subcard h3,
  .project-card h3 { margin: 0 0 10px; font-size: 17px; letter-spacing: -.2px; }
  .hero-card { display: grid; gap: 14px; align-content: start; }
  .avatar-preview { width: 118px; height: 118px; border-radius: 32px; display: grid; place-items: center; background: radial-gradient(120% 120% at 70% 8%, #1B2A24 0%, #0E1A22 55%, #0A1016 100%); color: #fff; font-size: 44px; font-weight: 800; box-shadow: var(--sh-card); }
  .hero-card p,
  .project-card p,
  .subnote { color: var(--ink-500); margin: 0; font-size: 13px; font-weight: 500; }
  .mini-steps { display: grid; gap: 10px; }
  .mini-step { display: flex; align-items: center; gap: 10px; color: var(--ink-500); font-size: 13px; font-weight: 600; }
  .mini-step b { width: 28px; height: 28px; border-radius: 50%; background: var(--line); color: var(--ink-500); display: grid; place-items: center; flex: none; }
  .mini-step.is-done b { background: var(--green-500); color: #fff; }
  .subnote { margin-top: 12px; padding: 11px 12px; border-radius: var(--r-md); background: var(--amber-50); }
  .clean-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--ink-700); font-size: 13px; font-weight: 600; }
  .clean-list li { padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-soft); border: 1px solid var(--line); }
  .brand-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
  .brand-row:last-child { border-bottom: 0; }
  .brand-row span { color: var(--ink-400); font-size: 12px; font-weight: 800; }
  .brand-row b { color: var(--ink-800); font-size: 13px; text-align: right; }
  .tag-cloud,
  .tone-list { display: flex; flex-wrap: wrap; gap: 9px; }
  .tag-cloud span { padding: 8px 12px; border-radius: 999px; background: var(--green-50); color: var(--green-600); font-size: 12px; font-weight: 700; border: 1px solid var(--green-100); }
  .project-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
  .project-status { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 999px; background: var(--amber-50); color: #b45309; font-size: 11px; font-weight: 800; margin-bottom: 12px; }
  .project-status.ready { background: var(--green-50); color: var(--green-600); }
  .project-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
  .live-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 16px; align-items: stretch; }
  .live-stage { min-height: 520px; border-radius: 24px; border: 1px solid rgba(29,125,242,.24); background: radial-gradient(50% 50% at 50% 32%, rgba(244,181,43,.26), transparent 68%), radial-gradient(40% 40% at 72% 70%, rgba(29,125,242,.28), transparent 70%), linear-gradient(145deg, #061A3A, #0D2D5D 58%, #061A3A); color: #fff; padding: 22px; display: grid; align-content: space-between; box-shadow: var(--sh-card); overflow: hidden; position: relative; }
  .live-stage__top { display: inline-flex; width: fit-content; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-size: 13px; font-weight: 800; }
  .live-stage__avatar { justify-self: center; align-self: center; width: min(260px, 44vw); aspect-ratio: 1; border-radius: 42px; display: grid; place-items: center; background: linear-gradient(150deg, rgba(255,255,255,.2), rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 56px; font-weight: 900; letter-spacing: -2px; box-shadow: 0 24px 60px -28px rgba(0,0,0,.65); }
  .live-stage__caption { max-width: 560px; }
  .live-stage__caption h3 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.8px; }
  .live-stage__caption p { margin: 0; color: rgba(255,255,255,.74); font-weight: 600; }
  .live-side { display: grid; gap: 16px; align-content: start; }

  /* ---------- Responsive ---------- */
  @media (max-width: 1080px) {
    body { overflow: auto; }
    .app { grid-template-columns: 1fr; height: auto; }
    .nav { flex-direction: row; height: auto; width: 100%; position: sticky; top: 0; z-index: 30; padding: 10px 16px; gap: 6px; align-items: center; }
    .nav__logo { margin-bottom: 0; margin-right: 6px; width: 38px; height: 38px; }
    .nav__items { flex-direction: row; width: auto; gap: 4px; }
    .nav__item { width: 48px; height: 48px; }
    .nav__label { display: none; }
    .nav__spacer { flex: 1; }
    .main { height: auto; }
    .appbar { flex-wrap: wrap; }
    .workspace,
    .workspace.inspector-collapsed { grid-template-columns: 1fr; flex: none; }
    .canvas { padding: 20px 18px; }
    .stage { max-width: none; }
    .demo-panels,
    .demo-card--video,
    .live-layout { grid-template-columns: 1fr; }
    .live-frame { grid-template-columns: 1fr; }
    .live-stage { min-height: 420px; }
    .inspector { border-left: none; border-top: 1px solid var(--line); }
    .inspector.is-collapsed { min-height: 92px; padding: 14px 18px; align-items: stretch; }
    .inspector.is-collapsed .inspector__toggle { width: 100%; min-height: 52px; padding: 0 14px; flex-direction: row; writing-mode: horizontal-tb; }
    .inspector__scroll { overflow: visible; }
    .inspector__foot { position: sticky; bottom: 0; }
    .subgrid,
    .project-list { grid-template-columns: 1fr; }
  }
  @media (max-width: 560px) {
    .reg-grid { grid-template-columns: 1fr; }
    .strip { flex-direction: column; align-items: stretch; }
    .strip__lead { flex-direction: row; align-items: center; justify-content: space-between; border-right: none; border-bottom: 1px solid var(--line-soft); padding: 0 0 12px; }
    .appbar__title p { display: none; }
    .demo-card { padding: 15px; }
    .demo-card h2 { font-size: 18px; }
    .live-stage { min-height: 360px; border-radius: 18px; }
    .live-stage__caption h3 { font-size: 24px; }
  }
