/* ============ FLASHROOM ============ */
:root {
  --bg: #07080b;
  --bg-soft: #0b0e13;
  --panel: #0e1219;
  --panel-2: #121821;
  --line: #1c2330;
  --line-2: #2a3342;
  --text: #e9eef7;
  --muted: #8a94a6;
  --dim: #5c6678;
  --brand: #ff4d2e;
  --brand-2: #ff9500;
  --ok: #3ddc97;
  --err: #ff5c5c;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 78%);
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(58vw 38vw at 12% -8%, rgba(255, 77, 46, 0.16), transparent 68%),
    radial-gradient(46vw 34vw at 88% -6%, rgba(255, 149, 0, 0.12), transparent 70%),
    radial-gradient(60vw 46vw at 50% 108%, rgba(60, 120, 255, 0.07), transparent 72%);
}

a { color: inherit; }

/* ---------- topbar ---------- */
.topbar {
  position: relative;
  z-index: 5;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(14px);
  background: rgba(7, 8, 11, 0.6);
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }

.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(150deg, var(--brand-2), var(--brand) 70%);
  box-shadow: 0 6px 18px rgba(255, 77, 46, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand-mark svg { width: 19px; height: 19px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 14px; letter-spacing: 0.16em; font-weight: 700; }
.brand-text em { font-style: normal; font-size: 10.5px; color: var(--dim); letter-spacing: 0.04em; }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.018);
  white-space: nowrap;
}
.pill svg { width: 13px; height: 13px; color: var(--ok); }

.btn {
  font: inherit; font-size: 12.5px; font-weight: 500;
  height: 34px; padding: 0 15px;
  border-radius: 9px;
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer;
  transition: 0.16s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-ghost { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.09); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.16); }

/* ---------- layout ---------- */
.app { position: relative; z-index: 2; max-width: 1400px; margin: 0 auto; padding: 0 28px; }

/* ---------- intro ---------- */
.intro {
  padding: 64px 0 72px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px 56px;
  align-items: center;
  max-width: 1120px;
  min-height: calc(100vh - 68px - 90px);
  align-content: center;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; letter-spacing: 0.22em; font-weight: 600;
  color: var(--brand-2);
  margin: 0 0 16px;
  text-transform: uppercase;
}
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(255, 77, 46, 0.14); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.intro h1 {
  margin: 0 0 18px;
  font-size: clamp(31px, 4.3vw, 52px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 650;
}
.intro h1 b {
  background: linear-gradient(100deg, var(--brand-2), var(--brand) 60%, #ff2d55);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 650;
}
.lede { margin: 0; color: var(--muted); font-size: 14px; max-width: 420px; }

.dropzone {
  position: relative;
  border-radius: 20px;
  border: 1px dashed var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008));
  padding: 58px 30px;
  cursor: pointer;
  transition: 0.2s ease;
  overflow: hidden;
  outline: none;
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: rgba(255, 120, 60, 0.55);
  background: linear-gradient(180deg, rgba(255, 120, 60, 0.07), rgba(255, 255, 255, 0.01));
  box-shadow: 0 0 0 1px rgba(255, 120, 60, 0.14), 0 24px 60px -30px rgba(255, 77, 46, 0.5);
}
.dropzone.is-over { border-color: var(--brand); background: rgba(255, 77, 46, 0.1); }

.dz-frame {
  position: absolute; inset: 10px;
  border-radius: 14px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 149, 0, 0.5) 0 18px, transparent 18px) top left / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(255, 149, 0, 0.5) 0 18px, transparent 18px) top left / 1px 100% no-repeat,
    linear-gradient(270deg, rgba(255, 77, 46, 0.45) 0 18px, transparent 18px) bottom right / 100% 1px no-repeat,
    linear-gradient(0deg, rgba(255, 77, 46, 0.45) 0 18px, transparent 18px) bottom right / 1px 100% no-repeat;
  opacity: 0.55;
  transition: opacity 0.2s;
}
.dropzone:hover .dz-frame { opacity: 1; }

.dz-body { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.dz-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  margin-bottom: 16px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.dz-icon svg { width: 26px; height: 26px; }
.dz-title { font-size: 16px; font-weight: 550; letter-spacing: 0.01em; }
.dz-sub { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.link { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }
.dz-tags { display: flex; gap: 6px; margin-top: 18px; }
.dz-tags span {
  font-family: var(--mono); font-size: 10.5px; color: var(--dim);
  border: 1px solid var(--line); border-radius: 5px;
  padding: 2px 7px;
  background: rgba(0, 0, 0, 0.25);
}

.features {
  grid-column: 1 / -1;
  list-style: none; margin: 8px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.features li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px 18px;
  background: var(--bg-soft);
}
.f-icon { font-family: var(--mono); font-size: 10px; color: var(--brand-2); padding-top: 3px; letter-spacing: 0.06em; }
.features strong { display: block; font-size: 12.5px; font-weight: 550; }
.features em { font-style: normal; display: block; font-size: 11.5px; color: var(--dim); line-height: 1.5; margin-top: 2px; }

/* ---------- workspace ---------- */
.workspace {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 344px;
  gap: 14px;
  height: calc(100vh - 68px - 48px);
  min-height: 520px;
  padding: 22px 0 8px;
}

.sidebar, .inspector, .stage-col {
  background: rgba(14, 18, 25, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 0;
  backdrop-filter: blur(8px);
}

.sidebar { display: flex; flex-direction: column; overflow: hidden; }
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px; padding: 0 10px 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase;
}
.sidebar-head em { font-style: normal; margin-left: 6px; color: var(--dim); font-family: var(--mono); font-size: 10.5px; }
.icon-btn {
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
  transition: 0.15s;
}
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.05); }

.filelist { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.file-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 9px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: 0.14s;
}
.file-item:hover { background: rgba(255, 255, 255, 0.035); }
.file-item.is-active { background: rgba(255, 77, 46, 0.09); border-color: rgba(255, 77, 46, 0.24); }
.file-item .fi-badge {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.04em;
  padding: 3px 4px; border-radius: 4px; flex: none;
  background: rgba(255, 255, 255, 0.07); color: var(--muted); font-weight: 600;
}
.file-item.is-active .fi-badge { background: rgba(255, 77, 46, 0.2); color: #ffb4a4; }
.fi-body { min-width: 0; flex: 1; }
.fi-name { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-meta { display: block; font-size: 10px; color: var(--dim); font-family: var(--mono); }
.fi-state { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.fi-state.ready { background: var(--ok); }
.fi-state.parsing { background: var(--brand-2); animation: pulse 1.2s infinite; }
.fi-state.error { background: var(--err); }

.sidebar-foot {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: 10.5px; color: var(--dim);
}
.sidebar-foot svg { width: 12px; height: 12px; color: var(--ok); }

/* stage */
.stage-col { display: flex; flex-direction: column; overflow: hidden; }

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.035), transparent 62%),
    #050609;
  background-image:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.04), transparent 62%),
    linear-gradient(45deg, #050609 25%, transparent 25%, transparent 75%, #050609 75%),
    linear-gradient(45deg, #050609 25%, #080a0e 25%, #080a0e 75%, #050609 75%);
  background-size: auto, 22px 22px, 22px 22px;
  background-position: 0 0, 0 0, 11px 11px;
  overflow: hidden;
}
.stage.is-fullscreen { position: fixed; inset: 0; z-index: 90; padding: 0; border-radius: 0; }

.stage-inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; }

.swf-shell {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.13), 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  background: #000;
  overflow: hidden;
  display: flex;
}
.swf-shell ruffle-player, .swf-shell #ruffleMount {
  width: 100%; height: 100%; display: block;
}
.swf-shell #ruffleMount ruffle-player { width: 100%; height: 100%; display: block; }

.fla-shell {
  max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.fla-artboard {
  position: relative;
  max-width: 100%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 26px 70px -24px rgba(0, 0, 0, 0.9);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
}
.fla-artboard::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.artboard-label {
  position: absolute; left: 0; top: -22px;
  font-family: var(--mono); font-size: 10px; color: var(--dim);
  white-space: nowrap;
}
.fla-note {
  font-size: 11px; color: var(--dim); max-width: 420px; text-align: center; line-height: 1.6;
}
.fla-note b { color: var(--muted); font-weight: 500; }

.stage-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--dim); font-size: 12.5px; text-align: center; padding: 24px;
}
.stage-empty svg { width: 30px; height: 30px; opacity: 0.5; }
.stage-empty strong { color: var(--muted); font-weight: 500; font-size: 13px; }

.stage-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 46px; padding: 0 10px 0 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.014);
}
.file-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kind {
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 5px; border-radius: 4px; flex: none;
  background: rgba(255, 77, 46, 0.16); color: #ff9f8c;
}
.kind.is-fla { background: rgba(90, 140, 255, 0.16); color: #9db9ff; }
.file-title .name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-title .size { font-family: var(--mono); font-size: 10px; color: var(--dim); flex: none; }

.tools { display: flex; gap: 4px; flex: none; }
.tool {
  display: inline-flex; align-items: center; gap: 5px;
  height: 27px; padding: 0 9px;
  border-radius: 6px; border: 1px solid transparent; background: transparent;
  color: var(--muted); font: inherit; font-size: 11px; cursor: pointer;
  transition: 0.14s;
}
.tool svg { width: 13px; height: 13px; }
.tool:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.tool:disabled { opacity: 0.3; cursor: not-allowed; }

/* inspector */
.inspector { display: flex; flex-direction: column; overflow: hidden; }

.tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); }
.tab {
  flex: 1;
  height: 33px;
  border: 0; background: transparent; color: var(--dim);
  font: inherit; font-size: 11.5px; cursor: pointer;
  border-radius: 7px 7px 0 0;
  position: relative;
  transition: 0.15s;
}
.tab:hover { color: var(--muted); background: rgba(255, 255, 255, 0.03); }
.tab.is-active { color: var(--text); }
.tab.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  border-radius: 2px 2px 0 0;
}
.tab:disabled { opacity: 0.3; cursor: not-allowed; }

.panels { flex: 1; min-height: 0; position: relative; }
.panel {
  position: absolute; inset: 0;
  overflow-y: auto;
  padding: 14px;
  display: none;
  scrollbar-width: thin;
  scrollbar-color: #2a3342 transparent;
}
.panel.is-active { display: block; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.045); font-size: 12px; }
.kv:last-child { border-bottom: 0; }
.kv dt { color: var(--dim); flex: none; }
.kv dd { margin: 0; text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--text); word-break: break-all; }
.swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2); }

.sec-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim);
  margin: 18px 0 8px;
}
.sec-title:first-child { margin-top: 2px; }
.sec-title em { font-style: normal; font-family: var(--mono); letter-spacing: 0; color: var(--dim); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 11px;
}
.stat b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 10.5px; color: var(--dim); }

.scene { margin-bottom: 14px; }
.scene-head { display: flex; align-items: center; gap: 7px; font-size: 12px; margin-bottom: 6px; }
.scene-head .badge-s { font-family: var(--mono); font-size: 9px; color: var(--dim); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }
.layer {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px 5px 10px;
  border-left: 1px solid var(--line-2);
  margin-left: 5px;
  font-size: 11.5px;
}
.layer:hover { background: rgba(255, 255, 255, 0.03); }
.layer .ly-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.layer .ly-frames { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.layer .ly-vis { width: 12px; height: 12px; color: var(--dim); flex: none; }
.layer.is-hidden .ly-name { opacity: 0.4; text-decoration: line-through; }
.layer .ly-type { font-family: var(--mono); font-size: 9px; color: var(--dim); text-transform: lowercase; }

.asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.asset {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0a0d12;
  overflow: hidden;
  cursor: zoom-in;
  display: grid; place-items: center;
}
.asset img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.asset:hover { border-color: var(--line-2); }
.asset .a-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 9px; padding: 3px 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #cfd6e2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--mono);
}
.asset.is-file { cursor: default; color: var(--dim); font-family: var(--mono); font-size: 9.5px; text-align: center; padding: 6px; }

.code-wrap { display: flex; flex-direction: column; gap: 8px; height: 100%; }
.code-files { display: flex; flex-wrap: wrap; gap: 4px; }
.code-file {
  font-family: var(--mono); font-size: 10px;
  padding: 3px 7px; border-radius: 5px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.code-file:hover { color: var(--text); border-color: var(--line-2); }
.code-file.is-active { background: rgba(255, 77, 46, 0.14); border-color: rgba(255, 77, 46, 0.3); color: #ffb4a4; }
.code-view {
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #080a0e;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.7;
  color: #b9c4d4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}
.code-view .ln { color: #3f4a5c; user-select: none; display: inline-block; width: 22px; text-align: right; margin-right: 10px; }
.code-meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--dim); font-family: var(--mono); }
.copy-btn { border: 1px solid var(--line); background: transparent; color: var(--dim); font: inherit; font-size: 10px; padding: 2px 7px; border-radius: 5px; cursor: pointer; }
.copy-btn:hover { color: var(--text); }

.empty-note {
  padding: 28px 12px; text-align: center; color: var(--dim); font-size: 12px; line-height: 1.7;
}
.empty-note svg { width: 24px; height: 24px; opacity: 0.4; display: block; margin: 0 auto 8px; }

/* footer */
.foot {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  max-width: 1400px; margin: 0 auto;
  padding: 18px 28px 26px;
  font-size: 10.5px; color: var(--dim);
}
.foot .sep { opacity: 0.4; }
.foot a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.foot a:hover { color: var(--text); }

/* drag overlay */
.drag-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(7, 8, 11, 0.78);
  backdrop-filter: blur(6px);
}
.drag-overlay.is-on { display: flex; }
.drag-box {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 54px 76px;
  border: 2px dashed rgba(255, 120, 60, 0.6);
  border-radius: 20px;
  color: var(--brand-2);
  font-size: 15px; letter-spacing: 0.04em;
  background: rgba(255, 77, 46, 0.05);
}
.drag-box svg { width: 34px; height: 34px; }

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast {
  display: flex; align-items: center; gap: 8px;
  max-width: 380px;
  padding: 9px 13px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: rgba(18, 24, 33, 0.96);
  font-size: 12px;
  color: var(--text);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8);
  animation: toastIn 0.2s ease;
}
.toast.err { border-color: rgba(255, 92, 92, 0.4); }
.toast .t-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); flex: none; }
.toast.err .t-dot { background: var(--err); }
.toast.ok .t-dot { background: var(--ok); }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(4, 5, 8, 0.9);
  display: none; align-items: center; justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox.is-on { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8); }
.lightbox .lb-cap { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* scrollbars */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #232b38; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #313b4c; background-clip: content-box; }

/* responsive */
@media (max-width: 1180px) {
  .workspace { grid-template-columns: 200px minmax(0, 1fr) 300px; }
  .app { padding: 0 18px; }
  .topbar { padding: 0 18px; }
}

@media (max-width: 960px) {
  .intro { grid-template-columns: 1fr; padding: 34px 0 40px; gap: 26px; }
  .features { grid-template-columns: 1fr; }
  .pill { display: none; }
  .workspace {
    grid-template-columns: 1fr;
    height: auto;
  }
  .sidebar { order: 2; }
  .stage-col { order: 1; height: 58vh; min-height: 380px; }
  .inspector { order: 3; height: 60vh; }
  .filelist { display: flex; gap: 6px; overflow-x: auto; padding: 8px; }
  .file-item { flex: none; max-width: 220px; }
  .sidebar-foot { display: none; }
  .foot { padding: 16px 18px 24px; flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .brand-text em { display: none; }
  .topbar { height: 58px; }
  .btn span { display: none; }
  .intro h1 { font-size: 28px; }
  .dz-tags { display: none; }
  .stage { padding: 12px; }
  .tools .tool span { display: none; }
}
