@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ═══════════════════════════════════════════════════════════
   NEBULA OPS — SOC 관제 대시보드 + 풀스크린 콘솔 오버레이
   Blueprint 변형 · 다크 네이비 기본 + 시안 1색 액센트(절제) · 헤어라인 · 모노
   색은 _tokens.css(data-theme)가 관장. 여기선 레이아웃·형태·모션.
═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* JS로 hidden 토글하는 오버레이가 CSS display 로 안 덮이도록 강제 (factory_pipeline §8) */
[hidden] { display: none !important; }

:root {
  --r: 3px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  background: var(--bg);
  /* 관제 무드: 아주 옅은 헤어라인 그리드(절제) */
  background-image:
    linear-gradient(var(--line-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-faint) 1px, transparent 1px);
  background-size: 30px 30px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 18px 64px;
  overflow-x: hidden;
  line-height: 1.5;
}

.sr-title, .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

a { color: inherit; }

/* ─── HEADER ─── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  width: 100vw;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.site-header__inner {
  max-width: 1180px; margin: 0 auto; height: 56px;
  padding: 0 18px; display: flex; align-items: center; justify-content: space-between;
}
.site-header__logo { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.logo-badge {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r); color: var(--primary); background: var(--fill-tint);
}
.logo-badge svg { width: 18px; height: 18px; }
.logo-text { display: inline-flex; flex-direction: column; line-height: 1.05; gap: 3px; }
.logo-main { font-size: 0.98rem; font-weight: 700; letter-spacing: 0.02em; color: var(--text-strong); }
.logo-main .accent { color: var(--primary); }
.logo-sub { font-size: 0.5rem; font-weight: 700; letter-spacing: 0.32em; color: var(--text-3); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.site-header__nav { display: flex; align-items: center; gap: 4px; }
.site-header__nav a {
  font-size: 0.68rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-2); text-decoration: none; padding: 6px 10px;
  border: 1px solid transparent; border-radius: var(--r); transition: all .14s var(--ease);
}
.site-header__nav a:hover { color: var(--primary); border-color: var(--line-soft); background: var(--fill-tint); }
@media (max-width: 620px) { .site-header__nav a { display: none; } }

.lang-select {
  font-family: inherit; font-size: 0.68rem; font-weight: 500;
  color: var(--text-2); background: transparent;
  border: 1px solid var(--line-soft); border-radius: var(--r);
  padding: 6px 8px; cursor: pointer; outline: none; max-width: 116px;
}
.lang-select:focus { border-color: var(--primary); }
.lang-select option { background: var(--surface); color: var(--text); }

.theme-toggle-btn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-soft); border-radius: var(--r);
  background: transparent; color: var(--text-2); cursor: pointer; transition: all .14s var(--ease);
}
.theme-toggle-btn:hover { color: var(--primary); border-color: var(--line); }
.theme-toggle-btn svg { width: 17px; height: 17px; }
[data-theme="midnight"] .ic-light { display: none; }
[data-theme="blueprint"] .ic-dark { display: none; }

/* ─── STATUS STRIP (관제 상단 바) ─── */
.opsbar {
  width: 100%; max-width: 1180px; margin: 16px 0 4px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px;
  padding: 11px 16px; border: 1px solid var(--line-soft); border-radius: var(--r);
  background: color-mix(in srgb, var(--surface) 40%, transparent);
}
.ops-stat { display: inline-flex; align-items: baseline; gap: 7px; font-size: 0.72rem; }
.ops-stat .lab { color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.62rem; }
.ops-stat .val { color: var(--text-strong); font-weight: 700; font-variant-numeric: tabular-nums; }
.ops-stat .val.live { color: var(--primary); }
.ops-stat .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 70%, transparent);
  animation: pulse 2s var(--ease) infinite;
}
.ops-spacer { flex: 1; }
.ops-clock { color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ─── SECTION HINT ─── */
.dash-hint {
  width: 100%; max-width: 1180px; margin: 20px 0 12px;
  display: flex; align-items: center; gap: 12px;
  font-size: 0.66rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.12em;
}
.dash-hint::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }
.dash-hint b { color: var(--primary); font-weight: 700; }

/* ─── DASHBOARD GRID (작업 패널) ─── */
.dash-grid {
  width: 100%; max-width: 1180px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
@media (min-width: 760px) { .dash-grid { grid-template-columns: repeat(3, 1fr); } }
/* SETI 워터폴 패널을 한 줄 전체 폭으로 */
@media (min-width: 760px) { .panel.wide { grid-column: 1 / -1; } }

.panel {
  position: relative;
  border: 1px solid var(--line-soft); border-radius: var(--r);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  padding: 15px 15px 13px; cursor: pointer;
  display: flex; flex-direction: column; gap: 11px; min-height: 168px;
  transition: border-color .16s var(--ease), background .16s var(--ease), transform .3s var(--ease-out);
  overflow: hidden;
}
.panel::before {  /* 코너 틱 */
  content: ''; position: absolute; top: 6px; right: 6px;
  width: 9px; height: 9px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line);
  opacity: 0.6; pointer-events: none;
}
.panel:hover, .panel:focus-visible {
  border-color: var(--primary); background: var(--fill-tint); transform: translateY(-2px); outline: none;
}
.panel:hover .panel-open { opacity: 1; transform: translateX(0); }

.panel-head { display: flex; align-items: center; gap: 9px; }
.panel-ic {
  width: 30px; height: 30px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-soft); border-radius: var(--r); color: var(--primary); background: var(--fill-tint);
}
.panel-ic svg { width: 16px; height: 16px; }
.panel-titles { min-width: 0; flex: 1; }
.panel-name { font-size: 0.82rem; font-weight: 700; color: var(--text-strong); letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-tag { font-size: 0.58rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.14em; }
.panel-status {
  font-size: 0.56rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
  padding: 3px 6px; border-radius: 2px; white-space: nowrap;
}

/* 미니 시각화 */
.viz { flex: 1; min-height: 62px; position: relative; }
.viz canvas { display: block; width: 100%; height: 100%; }
.viz-log { font-size: 0.6rem; line-height: 1.7; color: var(--text-2); overflow: hidden; height: 100%; }
.viz-log .ll { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.85; }
.viz-log .ll .c { color: var(--primary); }
.viz-log .ll .g { color: var(--ok); }

/* 패널 하단 미니 지표 */
.panel-metrics { display: flex; gap: 14px; border-top: 1px solid var(--line-faint); padding-top: 9px; }
.pm { display: flex; flex-direction: column; gap: 1px; }
.pm .pmk { font-size: 0.54rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.pm .pmv { font-size: 0.78rem; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }

.panel-open {
  position: absolute; bottom: 12px; right: 13px;
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--primary); display: inline-flex; align-items: center; gap: 4px;
  opacity: 0; transform: translateX(-4px); transition: all .18s var(--ease); pointer-events: none;
}
.panel-open svg { width: 12px; height: 12px; }

/* "전체 실행" 버튼 */
.dash-actions { width: 100%; max-width: 1180px; margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.dash-btn {
  font-family: inherit; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--primary); background: var(--fill-tint);
  border: 1px solid var(--line); border-radius: var(--r); padding: 11px 18px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: all .14s var(--ease);
}
.dash-btn svg { width: 15px; height: 15px; }
.dash-btn:hover { background: color-mix(in srgb, var(--primary) 14%, transparent); transform: translateY(-1px); }
.dash-btn.ghost { color: var(--text-2); background: transparent; border-color: var(--line-soft); }
.dash-btn.ghost:hover { color: var(--primary); border-color: var(--line); background: var(--fill-tint); }

/* ═══ CONSOLE OVERLAY (풀스크린) ═══ */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: ovIn .28s var(--ease-out);
}
.overlay::before { /* 아주 옅은 스캔라인 */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.4;
  background: repeating-linear-gradient(0deg, transparent 0 2px, color-mix(in srgb, var(--primary) 3%, transparent) 2px 3px);
}
@keyframes ovIn { from { opacity: 0; } to { opacity: 1; } }

.ov-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 50%, transparent); position: relative; z-index: 2;
}
.ov-ic {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r); color: var(--primary); background: var(--fill-tint);
}
.ov-ic svg { width: 17px; height: 17px; }
.ov-title { min-width: 0; }
.ov-title .t { font-size: 0.9rem; font-weight: 700; color: var(--text-strong); letter-spacing: 0.02em; }
.ov-title .s { font-size: 0.6rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.14em; }
.ov-spacer { flex: 1; }
.ov-live {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ok);
  display: inline-flex; align-items: center; gap: 6px;
}
.ov-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s var(--ease) infinite; }
.ov-btn {
  font-family: inherit; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-2); background: transparent; border: 1px solid var(--line-soft); border-radius: var(--r);
  padding: 7px 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all .14s var(--ease);
}
.ov-btn:hover { color: var(--primary); border-color: var(--line); background: var(--fill-tint); }
.ov-btn svg { width: 13px; height: 13px; }
.ov-btn.close:hover { color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, transparent); }

/* 진행 단계 바 */
.ov-steps {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 18px;
  border-bottom: 1px solid var(--line-soft); position: relative; z-index: 2;
  background: color-mix(in srgb, var(--surface) 26%, transparent);
}
.ov-step {
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3); border: 1px solid var(--line-faint); border-radius: 2px; padding: 4px 9px;
  display: inline-flex; align-items: center; gap: 6px; transition: all .3s var(--ease);
}
.ov-step .n { color: var(--text-3); opacity: 0.6; }
.ov-step.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.ov-step.done .n { color: var(--ok); opacity: 1; }
.ov-step.active { color: var(--primary); border-color: var(--primary); background: var(--fill-tint); }

/* 진행바 */
.ov-progress { height: 2px; background: var(--line-faint); position: relative; z-index: 2; }
.ov-progress .bar { height: 100%; width: 0%; background: var(--primary); transition: width .4s var(--ease); }

/* 본문: 콘솔 + 위젯 사이드 */
.ov-body {
  flex: 1; min-height: 0; position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr minmax(300px, 360px);
}

/* 콘솔 */
.ov-console {
  min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 16px 18px 22px;
  font-size: 0.78rem; line-height: 1.65;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}

/* ─── 위젯 사이드 ─── */
.ov-widgets {
  min-height: 0; overflow-y: auto; overflow-x: hidden;
  border-left: 1px solid var(--line-soft);
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
  background: color-mix(in srgb, var(--surface) 20%, transparent);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.ov-widgets::-webkit-scrollbar, .ov-console::-webkit-scrollbar { width: 8px; }
.ov-widgets::-webkit-scrollbar-thumb, .ov-console::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.wgt {
  border: 1px solid var(--line-soft); border-radius: var(--r);
  padding: 10px 12px 11px; background: color-mix(in srgb, var(--surface) 45%, transparent);
  position: relative; flex: 0 0 auto;
}
.wgt::before { content: ''; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); opacity: 0.5; }
.wgt-label {
  font-size: 0.54rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.wgt-label .wv { color: var(--primary); font-weight: 700; letter-spacing: 0.02em; }
.wgt-canvas { display: block; width: 100%; height: 62px; }
.wgt.big .wgt-canvas { height: 128px; }
/* stat */
.wgt-stat { font-size: 1.7rem; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1; }
.wgt-stat .su { font-size: 0.7rem; color: var(--text-3); font-weight: 500; margin-left: 4px; }
.wgt-substat { margin-top: 5px; font-size: 0.58rem; color: var(--text-3); }
/* gauge */
.wgt-gauge-track { height: 8px; border: 1px solid var(--line-soft); border-radius: 2px; overflow: hidden; }
.wgt-gauge-fill { height: 100%; width: 0%; background: var(--primary); transition: width .45s var(--ease); }
.wgt-gauge-val { margin-top: 6px; font-size: 0.72rem; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
/* nodes */
.wgt-nodes { display: grid; gap: 3px; }
.wgt-node { aspect-ratio: 1; border-radius: 1px; background: var(--line-soft); transition: background .3s var(--ease); }
.wgt-node.up { background: var(--ok); }
.wgt-node.hot { background: var(--primary); }
.wgt-node.down { background: var(--err); }
/* cadence */
.wgt-cadence { display: flex; gap: 5px; }
.wgt-cad-cell { flex: 1; text-align: center; padding: 8px 0 6px; border: 1px solid var(--line-soft); border-radius: 2px; }
.wgt-cad-cell .cl { font-size: 0.82rem; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.wgt-cad-cell .cs { font-size: 0.44rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.wgt-cad-cell.on { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.wgt-cad-cell.on .cl { color: var(--ok); }
.wgt-cad-cell.active { border-color: var(--primary); background: var(--fill-tint); }
.wgt-cad-cell.active .cl { color: var(--primary); }
/* target kv */
.wgt-kv { display: flex; flex-direction: column; gap: 5px; }
.wgt-kv .row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.64rem; }
.wgt-kv .row .k { color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.wgt-kv .row .v { color: var(--text-strong); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
/* list */
.wgt-list { display: flex; flex-direction: column; gap: 0; max-height: 150px; overflow: hidden; }
.wgt-list-row { font-size: 0.6rem; padding: 4px 0; border-bottom: 1px dashed var(--line-faint); display: flex; justify-content: space-between; gap: 8px; animation: lineIn .2s var(--ease-out); }
.wgt-list-row:last-child { border-bottom: none; }
.wgt-list-row .lf { color: var(--primary); font-variant-numeric: tabular-nums; }
.wgt-list-row .lm { color: var(--text-3); font-variant-numeric: tabular-nums; }
.wgt-list-row.hot .lm { color: var(--ok); font-weight: 700; }
.ov-console::-webkit-scrollbar { width: 8px; }
.ov-console::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.cline { white-space: pre-wrap; word-break: break-word; display: flex; gap: 9px; padding: 1px 0; animation: lineIn .2s var(--ease-out); }
@keyframes lineIn { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.cline .ts { color: var(--text-3); flex: 0 0 auto; opacity: 0.7; font-size: 0.72rem; }
.cline .tx { min-width: 0; }
.cline.cmd .tx { color: var(--primary-strong); font-weight: 700; }
.cline.cmd .tx::before { content: '$ '; color: var(--primary); }
.cline.info .tx { color: var(--text); }
.cline.ok .tx { color: var(--ok); }
.cline.warn .tx { color: var(--warn); }
.cline.err .tx { color: var(--err); }
.cline.data .tx { color: var(--text-2); }
.cline.dim .tx { color: var(--text-3); opacity: 0.75; }
.cline.codetype .tx { color: var(--primary-strong); white-space: pre-wrap; }
.cursor { display: inline-block; width: 8px; height: 1em; background: var(--primary); vertical-align: text-bottom; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* hackertyper 코드 모드 */
.ov-code {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 18px 22px; position: relative; z-index: 2;
  font-size: 0.82rem; line-height: 1.6; color: var(--primary-strong);
  white-space: pre-wrap; word-break: break-word;
}
.ov-hint {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 3;
  font-size: 0.64rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em;
  background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line-soft);
  padding: 7px 14px; border-radius: var(--r); pointer-events: none; animation: hintFade 5s var(--ease) forwards;
}
@keyframes hintFade { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
body.ov-open { overflow: hidden; }

/* ─── CONTENT PAGES (about/contact/씬/가이드 공통) ─── */
.doc { width: 100%; max-width: 760px; margin: 26px auto 0; }
.title-bar { width: 100%; max-width: 760px; margin: 24px auto 0; }
.title-bar a { display: inline-flex; align-items: center; gap: 6px; font-size: 0.7rem; color: var(--text-2); text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid var(--line-soft); border-radius: var(--r); padding: 6px 11px; transition: all .14s var(--ease); }
.title-bar a:hover { color: var(--primary); border-color: var(--line); background: var(--fill-tint); }
.title-bar a svg { width: 13px; height: 13px; }
.doc-title { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; color: var(--text-strong); letter-spacing: -0.01em; margin-bottom: 10px; }
.doc-sub { font-size: 0.82rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 24px; }
.doc-card { border: 1px solid var(--line-soft); border-radius: var(--r); padding: 24px; background: color-mix(in srgb, var(--surface) 40%, transparent); }
.doc p { color: var(--text); line-height: 1.85; margin-bottom: 14px; word-break: keep-all; }
.content-h2 { font-size: 1.05rem; font-weight: 700; color: var(--text-strong); margin: 26px 0 12px; letter-spacing: 0.01em; }
.content-h2:first-child { margin-top: 0; }
.doc-list { margin: 0 0 14px 4px; padding: 0; list-style: none; }
.doc-list li { position: relative; padding-left: 18px; margin-bottom: 8px; color: var(--text); line-height: 1.7; }
.doc-list li::before { content: '▸'; position: absolute; left: 0; color: var(--primary); }
.doc-note { font-size: 0.8rem; color: var(--text-3); border-left: 2px solid var(--line); padding: 4px 0 4px 14px; margin: 0 0 14px; }
.doc code { background: var(--fill-tint); border: 1px solid var(--line-faint); border-radius: 2px; padding: 1px 5px; font-size: 0.86em; color: var(--primary-strong); }
.doc b { color: var(--text-strong); }

/* 씬/가이드 허브 카드 */
.info-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
.info-card { position: relative; display: flex; flex-direction: column; gap: 6px; text-decoration: none; border: 1px solid var(--line-soft); border-radius: var(--r); padding: 18px; background: color-mix(in srgb, var(--surface) 40%, transparent); transition: all .16s var(--ease); }
.info-card:hover { border-color: var(--primary); background: var(--fill-tint); transform: translateY(-2px); }
.info-card-title { font-size: 0.92rem; font-weight: 700; color: var(--text-strong); }
.info-card-desc { font-size: 0.76rem; color: var(--text-3); line-height: 1.6; flex: 1; word-break: keep-all; }
.info-card-more { color: var(--primary); }
.info-card-more svg { width: 15px; height: 15px; }

/* 씬 상세: 실행 버튼 */
.scene-run { margin: 20px 0; }

/* ─── AD ─── */
.ad-grid { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 672px; margin: 34px auto 0; }
.ad-grid[data-ad-layout="mixed"] { max-width: 760px; }
.ad-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
.ad-cell { min-height: 50px; }

/* ─── FOOTER ─── */
.site-footer {
  width: 100%; max-width: 1180px; margin-top: 40px; padding: 22px 16px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; text-align: center;
}
.site-footer a { color: var(--text-3); font-size: 0.7rem; text-decoration: none; text-transform: uppercase; letter-spacing: 0.05em; transition: color .14s var(--ease); }
.site-footer a:hover { color: var(--primary); }
.footer-copy { color: var(--text-3); font-size: 0.66rem; }
.footer-proj { color: var(--text-3); font-size: 0.62rem; opacity: 0.7; letter-spacing: 0.1em; }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-2); color: var(--text-strong); border: 1px solid var(--line);
  padding: 10px 18px; border-radius: var(--r); font-size: 0.76rem; z-index: 200;
  opacity: 0; pointer-events: none; transition: all .24s var(--ease-out);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── ANIM ─── */
.animate-fade-in { animation: fadeIn .5s var(--ease-out) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  /* 오버레이 위젯을 콘솔 위 가로 스크롤 스트립으로 */
  .ov-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .ov-widgets {
    border-left: none; border-bottom: 1px solid var(--line-soft);
    flex-direction: row; overflow-x: auto; overflow-y: hidden; max-height: 172px; padding: 12px;
  }
  .wgt { min-width: 208px; }
  .wgt.big { min-width: 300px; }
}
@media (max-width: 520px) {
  body { padding: 0 12px 56px; background-size: 24px 24px; }
  .dash-grid { grid-template-columns: 1fr; }
  .panel.wide { grid-column: auto; }
  .opsbar { gap: 6px 14px; }
  .ov-console, .ov-code { font-size: 0.72rem; }
}
