:root {
  --lime: #ccff00;
  --lime-dim: #9acc00;
  --lime-glow: rgba(204, 255, 0, 0.45);
  --lime-soft: rgba(204, 255, 0, 0.08);
  --red: #ff3355;
  --amber: #ffb020;
  --cyan: #00f0ff;
  --void: #08080a;
  --panel: #0e0e12;
  --panel2: #14141a;
  --border: rgba(204, 255, 0, 0.18);
  --text: #e8e8ee;
  --muted: #6a6a80;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
  --font-ui: "Space Grotesk", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-ui);
  background: var(--void);
  color: var(--text);
  overflow-x: hidden;
}

/* ── Risk gate (Stonkbirds) ── */
.risk-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.risk-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s, visibility 0.4s;
}

.risk-panel {
  max-width: 560px;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 36px 32px;
  box-shadow: 0 0 80px rgba(204, 255, 0, 0.08);
}

.risk-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--lime);
  margin-bottom: 16px;
}

.risk-panel h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.risk-lead { color: var(--muted); font-size: 15px; margin-bottom: 20px; }

.risk-list {
  list-style: none;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.65;
  color: #b0b0c0;
}

.risk-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-left: 16px;
  position: relative;
}

.risk-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--lime-dim);
}

.risk-warn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--amber);
  margin-bottom: 20px;
}

.risk-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 24px;
}

.risk-check input {
  margin-top: 3px;
  accent-color: var(--lime);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.risk-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Buttons ── */
.btn-exec {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 16px 24px;
  background: var(--lime);
  color: #0a0a0c;
  border: none;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}

.btn-exec:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-exec:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-exec--hero {
  flex: 1;
  font-size: 14px;
  padding: 18px 32px;
  box-shadow: 0 0 32px var(--lime-glow);
}

/* ── HUD (FLOW) ── */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  flex-wrap: wrap;
}

.hud-brand {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--lime);
}

.hud-left, .hud-center, .hud-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-pill {
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.hud-pill--live {
  color: var(--lime);
  border-color: rgba(204, 255, 0, 0.35);
}

.hud-pill--live i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--lime);
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--lime); }
  50% { opacity: 0.4; }
}

.hud-stat em { color: var(--lime); font-style: normal; }
.hud-div { color: var(--muted); }

.hud-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.hud-btn:hover { border-color: var(--lime); color: var(--lime); }

.hud-btn--lime {
  background: var(--lime);
  color: #0a0a0c;
  border-color: var(--lime);
}

.hud-btn--lime:hover { filter: brightness(1.08); color: #0a0a0c; }

.hud-btn--static {
  cursor: default;
  pointer-events: none;
  opacity: 0.92;
}

.hud-btn--static:hover {
  filter: none;
  color: #0a0a0c;
  border-color: var(--lime);
}

/* ── Ticker ── */
.ticker-bar {
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(204, 255, 0, 0.03);
  padding: 6px 0;
}

.ticker-inner {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: scroll 35s linear infinite;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--lime-dim);
  text-transform: uppercase;
}

@keyframes scroll { to { transform: translateX(-50%); } }

/* ── Terminal layout ── */
.terminal-wrap {
  display: grid;
  grid-template-columns: 240px 1fr 220px;
  gap: 0;
  min-height: calc(100vh - 90px);
  max-height: none;
}

.panel {
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 16px 14px;
  overflow-y: auto;
}

.panel-right { border-right: none; border-left: 1px solid var(--border); }

.panel-block { margin-bottom: 24px; }
.panel-block--dim { opacity: 0.85; }

.panel-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 12px;
}

.desk-bars { display: flex; flex-direction: column; gap: 8px; }

.desk-row {
  display: grid;
  grid-template-columns: 72px 1fr 32px;
  gap: 8px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
}

.desk-row span:first-child { color: var(--muted); }
.desk-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.desk-track i {
  display: block;
  height: 100%;
  transition: width 0.6s ease;
}

.desk-row b { text-align: right; color: var(--lime); font-size: 9px; }

.gen-list { display: flex; flex-direction: column; gap: 6px; }

.gen-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 10px;
}

.gen-item.active {
  border-color: var(--lime);
  background: var(--lime-soft);
}

.gen-item span { color: var(--muted); font-size: 9px; }

.stat-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.stat-row span { color: var(--muted); }
.stat-row b { color: var(--lime); }

/* ── Stage ── */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 32px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(204, 255, 0, 0.06), transparent),
    var(--void);
}

.stage-modes {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.mode-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn--active,
.mode-btn:hover {
  background: var(--lime);
  color: #0a0a0c;
}

.viewport {
  position: relative;
  width: min(380px, 88vw);
  aspect-ratio: 1;
  background: var(--lime);
  border: 3px solid var(--outline, #0a0a0c);
  box-shadow:
    0 0 0 1px var(--border),
    0 0 60px rgba(204, 255, 0, 0.15),
    inset 0 0 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.viewport-scanlines {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.06) 2px,
    rgba(0, 0, 0, 0.06) 4px
  );
}

.viewport-face {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.2s, transform 0.2s;
}

.viewport.reading .viewport-face {
  filter: blur(4px) contrast(1.3) saturate(0.5);
  animation: glitch 0.12s steps(2) infinite;
}

@keyframes glitch {
  0% { transform: translate(0); }
  50% { transform: translate(-3px, 2px); }
  100% { transform: translate(3px, -2px); }
}

.viewport-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  transition: opacity 0.4s;
}

.viewport-overlay.hidden { opacity: 0; pointer-events: none; }

.viewport-status {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--lime);
  margin-bottom: 8px;
}

.viewport-sub {
  font-size: 12px;
  color: var(--muted);
  max-width: 260px;
}

.viewport-tag {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  background: #0a0a0c;
  color: var(--lime);
  padding: 6px 16px;
  border: 1px solid var(--lime);
}

.fill-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(380px, 88vw);
  margin: 20px 0 16px;
}

.fill-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.fill-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime-glow);
  transition: width 0.3s;
}

.fill-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--lime);
  min-width: 36px;
}

.exec-row {
  display: flex;
  gap: 12px;
  width: min(480px, 92vw);
  align-items: stretch;
}

.qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
}

.qty button {
  width: 44px;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--lime);
  font-size: 20px;
  cursor: pointer;
}

.qty button:hover { background: var(--lime-soft); }

.qty span {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.stage-foot {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  max-width: 520px;
  line-height: 1.6;
}

.stage-foot strong { color: var(--lime); }

.log-feed {
  width: min(520px, 92vw);
  margin-top: 16px;
  max-height: 80px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}

.log-feed .hi { color: var(--lime); }
.log-feed .warn { color: var(--amber); }

/* ── Right panel ── */
.live-feed {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.9;
  color: var(--muted);
  max-height: 180px;
  overflow: hidden;
}

.live-feed div { border-bottom: 1px solid rgba(255, 255, 255, 0.04); padding: 2px 0; }
.live-feed .mint { color: var(--cyan); }

.last-fill {
  font-family: var(--font-mono);
  font-size: 10px;
}

.last-fill .muted { color: var(--muted); }
.last-fill b { color: var(--lime); display: block; margin-top: 4px; }

.mech-list {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 10px;
}

.mech-list li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.mech-list span { color: var(--lime); }

/* ── Gallery ── */
.gallery-strip {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  background: var(--panel);
}

.gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 24px 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-head h2 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--lime);
}

.gallery-head span { font-size: 12px; color: var(--muted); }

.gallery-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 24px 8px;
  scroll-snap-type: x mandatory;
}

.gallery-scroll::-webkit-scrollbar { height: 4px; }
.gallery-scroll::-webkit-scrollbar-thumb { background: var(--lime-dim); }

.gallery-item {
  flex: 0 0 140px;
  scroll-snap-align: start;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.gallery-item:hover {
  border-color: var(--lime);
  transform: translateY(-4px);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: var(--lime);
}

.gallery-item span {
  display: block;
  padding: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
}

/* ── Footer ── */
.foot {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.foot a { color: var(--lime); text-decoration: none; }

/* ── Modal ── */
.fill-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  place-items: center;
  padding: 24px;
}

.fill-modal.open {
  display: grid;
}

.fill-modal-inner {
  background: var(--panel2);
  border: 1px solid var(--lime);
  max-width: 400px;
  width: 100%;
  padding: 24px;
  text-align: center;
  box-shadow: 0 0 60px var(--lime-glow);
}

.fill-modal-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--lime);
  margin-bottom: 16px;
}

.fill-modal-head button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 8px 12px;
  margin: -8px -12px -8px 0;
  position: relative;
  z-index: 2;
}

.fill-modal-head button:hover {
  color: var(--lime);
}

.fill-modal-inner img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--lime);
  margin-bottom: 16px;
}

.fill-modal-inner h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  margin-bottom: 8px;
}

.fill-type { font-size: 12px; color: var(--muted); margin-bottom: 20px; }

.fill-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fill-modal-actions .hud-btn { display: block; text-align: center; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .terminal-wrap {
    grid-template-columns: 1fr;
  }
  .panel-left, .panel-right {
    border: none;
    border-bottom: 1px solid var(--border);
  }
  .hud-center { display: none; }
}

/* ── Sentiment Lock ── */
.container-wide {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--lime-dim);
  margin-bottom: 8px;
}

.lock-section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(204, 255, 0, 0.03), transparent);
}

.lock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.lock-header h2 {
  font-family: var(--font-mono);
  font-size: 28px;
  letter-spacing: 4px;
  color: var(--lime);
  margin-bottom: 12px;
}

.lock-desc {
  max-width: 560px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.lock-desc strong { color: var(--text); }

.lock-sent-box {
  text-align: right;
  padding: 16px 24px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.lock-sent-box span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
}

.lock-sent-box b {
  font-family: var(--font-mono);
  font-size: 36px;
  color: var(--lime);
}

.lock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
  gap: 16px;
}

.lock-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 20px;
}

.lock-preview {
  text-align: center;
  margin-bottom: 16px;
}

.lock-preview img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 3px solid var(--outline);
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--outline);
}

.lock-preview span {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--lime);
}

.lock-select {
  width: 100%;
  padding: 12px;
  background: var(--void);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 8px;
}

.lock-hint {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.lock-periods {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.lock-periods button {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 10px 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.lock-periods button.active,
.lock-periods button:hover {
  background: var(--lime);
  color: var(--void);
  border-color: var(--lime);
}

.lock-multiplier {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  margin-bottom: 16px;
}

.lock-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-exec--ghost {
  background: transparent;
  color: var(--lime);
  border: 1px solid var(--border);
}

.btn-exec--ghost:hover:not(:disabled) {
  background: var(--lime-soft);
}

.lock-status {
  min-height: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
}

.lock-idle { color: var(--muted); letter-spacing: 2px; }
.lock-active { color: var(--lime); font-weight: 700; letter-spacing: 2px; }
.lock-sub { color: var(--muted); font-size: 11px; margin-top: 8px; }
.lock-status p { color: var(--muted); margin-top: 8px; }

.lock-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  padding: 6px 10px;
  background: var(--lime-soft);
  border: 1px solid var(--lime);
  color: var(--lime);
}

.lock-badges .muted { font-size: 11px; color: var(--muted); }

.mile-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.mile-row span { color: var(--lime); }
.mile-row b { color: var(--muted); font-weight: 500; text-align: right; max-width: 55%; }

.lock-feed {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  line-height: 1.8;
  max-height: 100px;
  overflow: hidden;
}

.lock-steps {
  margin: 0 0 16px 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}

.lock-steps b { color: var(--lime); }

.lock-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.roadmap-section {
  padding: 64px 0 80px;
  border-top: 1px solid var(--border);
}

.roadmap-title {
  font-family: var(--font-mono);
  font-size: 28px;
  letter-spacing: 4px;
  color: var(--lime);
  margin-bottom: 32px;
}

.roadmap-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.road-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 20px;
}

.road-card--done { border-color: rgba(74, 222, 128, 0.35); }
.road-card--active {
  border-color: var(--lime);
  box-shadow: 0 0 24px var(--lime-soft);
}
.road-card--next { border-color: rgba(0, 240, 255, 0.35); }

.road-card-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
}

.road-phase { color: var(--muted); }
.road-card--done .road-status { color: #4ade80; }
.road-card--active .road-status { color: var(--lime); }
.road-card--next .road-status { color: var(--cyan); }
.road-card--planned .road-status { color: var(--muted); }

.road-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.road-card time {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 12px;
}

.road-card ul {
  list-style: none;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.road-card li {
  padding: 4px 0 4px 12px;
  position: relative;
}

.road-card li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--lime-dim);
}

@media (max-width: 960px) {
  .lock-grid { grid-template-columns: 1fr; }
}
