/* Scene "code" — editor + live preview + build log */
.scn-code { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 34%; grid-template-rows: 34px minmax(0, 1fr) auto; font-family: var(--f-mono); }
.scn-code-tabs { grid-column: 1 / -1; display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); background: rgba(5, 10, 28, 0.45); overflow: hidden; }
.scn-code-tab { display: inline-flex; align-items: center; padding: 0 12px; font-size: 11.5px; color: var(--dim); border-bottom: 2px solid transparent; white-space: nowrap; }
.scn-code-tab.is-on { color: var(--text); border-bottom-color: var(--accent); background: rgba(var(--accent-rgb), 0.08); }
.scn-code-body { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); overflow: hidden; font-size: 12.2px; line-height: 20px; padding-top: 10px; }
.scn-code-gutter { display: flex; flex-direction: column; align-items: flex-end; padding-right: 10px; color: rgba(107, 119, 157, 0.6); transition: transform 0.25s; }
.scn-code-pre { margin: 0; white-space: pre; color: #c8d2f0; font: inherit; transition: transform 0.25s; overflow: visible; }
.scn-line { min-height: 20px; }
.scn-caret { display: inline-block; width: 7px; height: 15px; margin-left: 1px; vertical-align: -2px; background: var(--cyan); animation: blink 1s steps(1) infinite; }
.tk-c { color: #5f6c94; font-style: italic; }
.tk-s { color: #57f2b0; }
.tk-t { color: #ff8fa3; }
.tk-k { color: #b39dff; }
.tk-n { color: #ffbe5c; }
.tk-f { color: #46e1ff; }
.tk-v { color: #ffd38a; }
.scn-code-preview { grid-row: 2; grid-column: 2; margin: 12px 12px 10px 0; border-radius: 10px; border: 1px solid var(--line-2); background: #0b1336; overflow: hidden; display: flex; flex-direction: column; }
.scn-pv-bar { display: flex; gap: 4px; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.scn-pv-bar i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.scn-pv-body { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.scn-pv-b { border-radius: 5px; background: rgba(140, 165, 255, 0.08); opacity: 0; transform: translateY(8px) scale(0.97); transition: opacity 0.45s var(--ease), transform 0.55s var(--ease); display: flex; gap: 5px; padding: 6px; }
.scn-pv-b.is-on { opacity: 1; transform: none; }
.scn-pv-b i { display: block; height: 5px; border-radius: 3px; background: rgba(160, 180, 255, 0.35); }
.scn-pv-nav { height: 14px; justify-content: space-between; align-items: center; padding: 0 6px; }
.scn-pv-nav i:first-child { width: 22%; background: var(--accent); }
.scn-pv-nav i:last-child { width: 30%; }
.scn-pv-hero { flex: 1.6; flex-direction: column; justify-content: center; background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(154, 131, 255, 0.18)); }
.scn-pv-hero i:first-child { width: 78%; height: 8px; background: rgba(255, 255, 255, 0.75); }
.scn-pv-hero i:last-child { width: 34%; height: 9px; border-radius: 5px; background: var(--accent); }
.scn-pv-cards { flex: 1; }
.scn-pv-cards i { flex: 1; height: auto; border-radius: 4px; background: rgba(160, 180, 255, 0.16); }
.scn-pv-cta, .scn-pv-form, .scn-pv-footer { flex: 0.6; align-items: center; justify-content: center; }
.scn-pv-cta i:first-child, .scn-pv-form i:first-child { width: 40%; }
.scn-pv-cta i:last-child, .scn-pv-form i:last-child { width: 24%; height: 9px; background: var(--mint); }
.scn-pv-footer { flex: 0.4; }
.scn-pv-footer i { width: 30%; }
.scn-code-log { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-top: 1px solid var(--line); background: rgba(5, 10, 28, 0.55); min-height: 50px; }
.scn-code-status { font-size: 11px; color: var(--amber); letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 7px; }
.scn-code-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.scn-code-status.is-done { color: var(--mint); }
.scn-code-ticks { display: flex; flex-wrap: wrap; gap: 6px; }
.scn-code-ticks .scn-tag { transition: all 0.4s var(--ease); }
@media (max-width: 560px) {
  .scn-code { grid-template-columns: minmax(0, 1fr); }
  .scn-code-preview { display: none; }
  .scn-code-body { font-size: 11px; line-height: 18px; }
  .scn-line { min-height: 18px; }
}
