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

:root {
  --wall: #1a1816;
  --wall2: #221f1c;
  --wall3: #2c2825;
  --frame: #3a3530;
  --gold: #c9a84c;
  --gold2: #e8c96a;
  --chalk: #f0ece4;
  --chalk2: #e0dbd0;
  --muted: #7a7268;
  --faint: #4a4540;
  --green: #4a8c5c;
  --green2: #5aad72;
  --red: #8c3a2e;
  --serif: 'Cormorant Garamond', serif;
  --sans: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--wall);
  color: var(--chalk);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 60px;
}

/* ── HEADER ── */
.gallery-header {
  width: 100%;
  max-width: 560px;
  padding: 32px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.gallery-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 8vw, 3.2rem);
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--chalk);
  text-transform: uppercase;
}

.gallery-sub {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── SCORE BAR ── */
.score-bar {
  width: 100%;
  max-width: 560px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  margin-top: 20px;
  border-top: 1px solid var(--frame);
  border-bottom: 1px solid var(--frame);
}

.sb-item { text-align: center; }

.sb-val {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.sb-key {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.round-pips { display: flex; gap: 7px; align-items: center; }

.pip {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--faint);
  background: transparent;
  transition: all 0.4s;
}
.pip.done { background: var(--gold); border-color: var(--gold); }
.pip.current { border-color: var(--gold2); box-shadow: 0 0 8px rgba(201,168,76,0.4); }

/* ── MAIN ── */
main {
  width: 100%;
  max-width: 560px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.screen { display: none; flex-direction: column; gap: 18px; }
.screen.active { display: flex; }

/* ── ARTWORK FRAME ── */
.artwork-frame {
  width: 100%;
  background: #0e0d0c;
  border: 2px solid var(--frame);
  border-radius: 4px;
  padding: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.7), inset 0 0 0 1px #111;
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artwork-frame::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid var(--frame);
  pointer-events: none;
  z-index: 1;
}

.artwork-img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: none;
}

.artwork-img.loaded { display: block; }

.artwork-loading {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-align: center;
}

/* ── QUESTION CARD ── */
.question-card {
  background: var(--wall2);
  border: 1px solid var(--frame);
  border-radius: 8px;
  padding: 18px;
}

.q-step {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.q-step::after { content: ''; flex: 1; height: 1px; background: var(--frame); }

.q-text {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--chalk);
  line-height: 1.4;
  margin-bottom: 16px;
}

/* ── OPTIONS ── */
.options { display: flex; flex-direction: column; gap: 8px; }

.option {
  padding: 13px 16px;
  background: var(--wall3);
  border: 1.5px solid var(--frame);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--chalk2);
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, transform 0.12s;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.option:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--chalk);
  transform: translateX(3px);
}

.option:disabled { cursor: default; }

.option.correct { background: #1c3025; border-color: var(--green2); color: var(--chalk); }
.option.wrong   { background: #2a1916; border-color: var(--red);    color: var(--muted); }
.option.reveal  { background: #1c3025; border-color: var(--green);  color: var(--muted); }

.opt-letter {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  min-width: 16px;
  flex-shrink: 0;
}
.option.correct .opt-letter { color: var(--green2); }
.option.wrong   .opt-letter { color: var(--red); }

/* ── POINTS FLASH ── */
.points-flash {
  text-align: center;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  animation: flash 0.4s ease;
}
.points-flash.good { color: var(--green2); }
.points-flash.bad  { color: var(--red); }

@keyframes flash {
  0%   { transform: scale(0.7); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1);   opacity: 1; }
}

/* ── ROUND PROGRESS ── */
.round-progress { display: flex; justify-content: center; gap: 8px; padding: 4px 0; }

.rp-dot {
  width: 28px; height: 4px;
  border-radius: 2px;
  background: var(--faint);
  transition: background 0.3s;
}
.rp-dot.done-good { background: var(--green2); }
.rp-dot.done-bad  { background: var(--red); }
.rp-dot.current   { background: var(--gold); }

/* ── ROUND RESULT ── */
.artwork-caption { margin-top: 10px; text-align: center; }

.caption-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--chalk);
}

.caption-meta {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 4px;
}

.round-score-card {
  background: var(--wall2);
  border: 1px solid var(--frame);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rs-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.rs-score {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.rs-max { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }

/* ── INSIGHT BOX ── */
.insight-box {
  background: var(--wall2);
  border: 1px solid var(--frame);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 16px 18px;
  animation: riseFade 0.4s ease;
}

.insight-label {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.insight-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--chalk2);
}

/* ── THINKING ── */
.thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 6px 0;
}

.dots span { animation: dp 1.3s infinite; color: var(--gold); }
.dots span:nth-child(2) { animation-delay: 0.22s; }
.dots span:nth-child(3) { animation-delay: 0.44s; }

@keyframes dp { 0%,80%,100%{opacity:0.15} 40%{opacity:1} }

/* ── FINAL ── */
.final-header { text-align: center; padding: 10px 0; }

.final-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--chalk);
  text-transform: uppercase;
}

.final-score {
  font-family: var(--serif);
  font-size: 4rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  margin-top: 4px;
}

.final-max {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.final-rows { display: flex; flex-direction: column; gap: 6px; }

.final-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--wall2);
  border: 1px solid var(--frame);
}

.fr-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--chalk2);
  flex: 1;
}

.fr-pts   { font-family: var(--mono); font-size: 0.82rem; color: var(--gold); margin-left: 12px; }
.fr-max   { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); margin-left: 4px; }

.verdict {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  padding: 4px 0;
}

/* ── SHARE ── */
.share-row { display: flex; justify-content: center; }

.btn-share {
  padding: 11px 28px;
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-share:hover { background: var(--gold); color: var(--wall); }

/* ── BUTTONS ── */
.btn-primary {
  width: 100%;
  padding: 15px;
  background: var(--gold);
  color: var(--wall);
  border: none;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover  { background: var(--gold2); }
.btn-primary:active { transform: scale(0.98); }

/* ── INTRO ── */
.intro-text {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--chalk2);
  line-height: 1.8;
  text-align: center;
  font-style: italic;
}

.difficulty-row { display: flex; gap: 8px; justify-content: center; }

.diff-btn {
  flex: 1;
  max-width: 150px;
  padding: 13px 10px;
  background: var(--wall2);
  border: 1.5px solid var(--frame);
  border-radius: 6px;
  color: var(--chalk2);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.diff-btn:hover   { border-color: var(--gold); color: var(--gold); }
.diff-btn.selected { background: var(--gold); border-color: var(--gold); color: var(--wall); }

.diff-sub {
  font-size: 0.54rem;
  color: inherit;
  opacity: 0.7;
  display: block;
  margin-top: 4px;
  letter-spacing: 0.06em;
  text-transform: none;
}

@keyframes riseFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 400px) {
  .diff-btn { max-width: 110px; font-size: 0.58rem; }
  .option   { font-size: 0.84rem; }
  .q-text   { font-size: 1.15rem; }
}
