:root {
  --ui-scale: 1.28;
  --ping-mt: 18px;
  --ping-max-width: 460px;
  --ping-bg: #000;
  --ping-border: 1px solid #3a3020;
  --ping-border-left: 2px solid #e8c96a;
  --ping-shadow: 0 0 0 1px #1a1610, 0 8px 30px rgba(0,0,0,0.9);
  --ping-padding-v: 12px;
  --ping-padding-h: 14px;
  --ping-label-color: #5a5040;
  --ping-label-size: 7px;
  --ping-label-mb: 8px;
  --ping-render-w: 1400;
}

html {
  zoom: var(--ui-scale);
}

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

body {
  background: #080808;
  color: #c9b88a;
  font-family: 'Share Tech Mono', monospace;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 20px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0px, transparent 3px, rgba(0, 0, 0, 0.18) 3px, rgba(0, 0, 0, 0.18) 4px);
  pointer-events: none;
  z-index: 999;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none;
  z-index: 88;
}

/* ── Site Header ─────────────────────────────────────────────── */
.site-header {
  text-align: center;
  margin-bottom: 28px;
}

.site-header img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  margin-bottom: 8px;
  position: relative;
  z-index: 8000;
}

.site-header h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(13px, 3vw, 20px);
  color: #a56ae8;
  text-shadow: 0 0 12px rgba(120, 214, 238, 0.5), 2px 2px 0 #000;
  letter-spacing: 2px;
  line-height: 1.6;
}

.site-header p {
  font-size: 12px;
  color: #b89a6a;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* ── Card ────────────────────────────────────────────────────── */
.card {
  background: #0d0d0d;
  border: 1px solid #3a3020;
  box-shadow: 0 0 0 1px #1a1610, inset 0 0 40px rgba(0, 0, 0, 0.6), 0 8px 40px rgba(0, 0, 0, 0.9);
  width: 100%;
  max-width: 460px;
  padding: 28px 24px;
  position: relative;
}

.card::before,
.card::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: #e8c96a;
  border-style: solid;
}

.card::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.card::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

/* ── Question & Options ──────────────────────────────────────── */
#question {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(9px, 2.2vw, 12px);
  color: #e8c96a;
  line-height: 1.9;
  margin-bottom: 20px;
  text-shadow: 0 0 8px rgba(232, 201, 106, 0.3);
}

#options {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
button {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 10px 16px;
  background: #0d0d0d;
  color: #e8c96a;
  border: 1px solid #e8c96a;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.1s, color 0.1s, box-shadow 0.1s;
  position: relative;
  line-height: 1.6;
}

button::after {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(232, 201, 106, 0.12);
  pointer-events: none;
}

button:hover {
  background: #e8c96a;
  color: #080808;
  box-shadow: 0 0 14px rgba(232, 201, 106, 0.4);
}

button:active {
  transform: translateY(1px);
}

/* ── Steps ───────────────────────────────────────────────────── */
.step {
  background: #0a0a0a;
  border-left: 2px solid #e8c96a;
  padding: 12px 14px;
  margin: 10px 0;
  text-align: left;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.step-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: #080808;
  background: #e8c96a;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step p {
  font-size: 13px;
  color: #a89060;
  line-height: 1.6;
}

.step a {
  color: #e8c96a;
  text-decoration: none;
  border-bottom: 1px dotted #e8c96a;
}

.step a:hover {
  color: #fff;
}

.step img {
  width: 100%;
  display: block;
  margin-top: 10px;
  image-rendering: auto;
  position: relative;
  z-index: 1000;
}

/* ── Command Box ─────────────────────────────────────────────── */
.cmd-box {
  background: #000;
  border: 1px solid #3a3020;
  border-left: 3px solid #e8c96a;
  padding: 10px 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: #e8c96a;
  word-break: break-all;
  margin-top: 8px;
}

.cmd-box::before {
  content: '> ';
  color: #5a5040;
}

/* ── Result Block ────────────────────────────────────────────── */
.result-block {
  text-align: left;
}

.result-block p {
  font-size: 13px;
  color: #a89060;
  line-height: 1.7;
  margin-bottom: 10px;
}

.result-block strong {
  color: #e8c96a;
}

.result-block img {
  width: 100%;
  margin-bottom: 12px;
  display: block;
  position: relative;
  z-index: 1000;
}

/* ── Info Line ───────────────────────────────────────────────── */
.info-line {
  background: #000;
  border-left: 3px solid #e8c96a;
  padding: 8px 12px;
  font-size: 13px;
  color: #a89060;
  margin: 6px 0;
  word-break: break-all;
}

.info-line span {
  color: #e8c96a;
  font-weight: bold;
}

/* ── Divider ─────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid #1e1a10;
  margin: 14px 0;
}

/* ── Reset Button ────────────────────────────────────────────── */
.reset-wrap {
  margin-top: 16px;
  text-align: center;
}

/* ── Utilities ───────────────────────────────────────────────── */
.hidden {
  display: none;
}

.warn {
  color: #c9a040;
}

/* ── Cursor ──────────────────────────────────────────────────── */
.cursor {
  display: inline-block;
  width: 6px;
  height: 8px;
  background: #240547;
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%,
  100% { opacity: 1; }
  50%  { opacity: 0; }
}

/* ── Top Bar ─────────────────────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 54px;
  background: #0d0d0d;
  border-bottom: 1px solid #3a3020;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 9999;
  box-shadow: 0 0 20px rgba(0, 0, 0, .8);
}

.top-bar img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
}

.top-bar .title {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #e8c96a;
}

/* ── Ping Embed ──────────────────────────────────────────────── */
.ping-wrap {
  width: 100%;
  max-width: var(--ping-max-width);
  margin-top: var(--ping-mt);
  background: var(--ping-bg);
  border: var(--ping-border);
  border-left: var(--ping-border-left);
  box-shadow: var(--ping-shadow);
  padding: var(--ping-padding-v) var(--ping-padding-h);
  position: relative;
  z-index: 1000;
}

.ping-label {
  font-family: 'Press Start 2P', monospace;
  font-size: var(--ping-label-size);
  color: var(--ping-label-color);
  letter-spacing: 2px;
  margin-bottom: var(--ping-label-mb);
}

.ping-iframe-shell {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.ping-iframe-shell iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: none;
  display: block;
  transform-origin: top left;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav-text { display: none; }
}
