/* Quest page additions on top of styles.css. The quest needs more width than the
   480px swap column so the 64x64 canvas renders crisp at 8px/cell. */

.quest-app { max-width: 720px; }

/* ── testnet banner ── */
.testnet-banner {
  background: rgba(229, 149, 0, .08);
  border: 1px solid rgba(229, 149, 0, .35);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}
.testnet-banner b { color: #e5b455; }
.testnet-banner a { color: var(--accent); }
.testnet-banner code { color: var(--text); }

/* ── per-step "How it works" ── */
.step-how { margin-top: 8px; font-size: 12px; }
.step-how summary {
  cursor: pointer; color: var(--accent); font-weight: 600;
  list-style: none; user-select: none;
}
.step-how summary::before { content: '▸ '; }
.step-how[open] summary::before { content: '▾ '; }
.step-how summary::-webkit-details-marker { display: none; }
.step-how p {
  margin: 8px 0 2px; color: var(--muted); line-height: 1.55;
  border-left: 2px solid var(--border); padding-left: 10px;
}
.step-how code { color: var(--text); font-size: 11px; }
.step-how a { color: var(--accent); }

/* ── quest steps ── */
.quest-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.quest-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 8px; border-radius: 10px;
}
.quest-step + .quest-step { border-top: 1px solid var(--border); }
.quest-step.locked { opacity: .45; }
.quest-step.done { opacity: 1; }

.step-badge {
  flex: 0 0 28px; width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.quest-step.done .step-badge { background: rgba(56,211,159,.15); border-color: rgba(56,211,159,.4); color: var(--accent-2); }
.quest-step.active .step-badge { background: rgba(91,140,255,.15); border-color: rgba(91,140,255,.5); color: var(--accent); }

.step-body { flex: 1; min-width: 0; }
.step-title { font-weight: 600; font-size: 14px; }
.step-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.step-btn { margin-top: 10px; }
.step-state { flex: 0 0 auto; font-size: 16px; color: var(--muted); padding-top: 4px; }
.quest-step.done .step-state { color: var(--accent-2); }

.quest-done {
  margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: 14px;
  background: rgba(56,211,159,.1); border: 1px solid rgba(56,211,159,.35);
}

/* ── tx inspector (Under the hood) ── */
.insp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.insp-chip {
  font: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
  background: var(--panel-2); color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px;
}
.insp-chip.sel { color: var(--accent); border-color: rgba(91,140,255,.5); background: rgba(91,140,255,.1); }

.insp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.insp-col {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; min-width: 0;
}
.insp-h { margin: 0 0 10px; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; }
.insp-h.evm { color: #8fa6ff; }
.insp-h.koinos { color: #56c8a8; }

.insp-body { display: flex; flex-direction: column; gap: 7px; font-size: 12px; }
.insp-row { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.insp-row .k { flex: 0 0 86px; color: var(--muted); }
.insp-row .v {
  flex: 1; min-width: 0; color: var(--text); word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px;
}
.insp-row .v .lbl { color: var(--accent-2); font-family: inherit; }
.insp-row .v a { color: var(--accent); }
.insp-call {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; white-space: pre-wrap; word-break: break-all; color: var(--text);
}
.insp-call .fn { color: #8fa6ff; }
.insp-pending { color: var(--muted); font-style: italic; }
.insp-note { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 12px 2px 0; }
.insp-note code { color: var(--text); font-size: 11px; }

@media (max-width: 620px) {
  .insp-grid { grid-template-columns: 1fr; }
}

/* ── canvas ── */
.canvas-wrap { display: flex; justify-content: center; }
#pixels {
  width: 100%; max-width: 512px; aspect-ratio: 1;
  image-rendering: pixelated;
  border: 1px solid var(--border); border-radius: 6px;
  background: #fff;
  cursor: crosshair;
  touch-action: none; /* let pointermove paint instead of scrolling */
}

.palette {
  display: grid; grid-template-columns: repeat(16, 1fr); gap: 6px;
  margin-top: 12px;
}
.swatch {
  aspect-ratio: 1; border-radius: 6px; cursor: pointer;
  border: 2px solid var(--border); padding: 0;
}
.swatch.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91,140,255,.35); }

.paint-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px;
}
.paint-btns { display: flex; gap: 8px; }

.canvas-stats {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 12px; margin-top: 10px;
}
.canvas-stats b { color: var(--text); font-variant-numeric: tabular-nums; }

/* ── live feed ── */
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent-2); margin-right: 6px;
  box-shadow: 0 0 6px rgba(56,211,159,.8);
}
.live-dot.off { background: var(--muted); box-shadow: none; }

.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.activity li {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px;
}
.activity li code { color: var(--text); }
.activity .chips { display: flex; gap: 2px; margin-left: auto; }
.activity .chip { width: 10px; height: 10px; border-radius: 2px; border: 1px solid rgba(0,0,0,.25); }

@media (max-width: 560px) {
  .palette { grid-template-columns: repeat(8, 1fr); }
}
