:root {
  --ink: #142018;
  --cream: #f4f0e6;
  --paper: #fffdf7;
  --green: #18583f;
  --lime: #d9f046;
  --muted: #687169;
  --line: #d8d9cf;
  --danger: #a3392e;
  --shadow: 0 22px 70px rgba(20, 32, 24, .13);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 15%, rgba(217, 240, 70, .28), transparent 22rem),
    linear-gradient(135deg, #f7f3e9 0%, #e8eee5 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.app-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 48px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--green); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.brand-ball { display: grid; place-items: center; width: 26px; height: 26px; color: var(--lime); background: var(--green); border-radius: 50%; }
.screen { margin-top: 24px; border: 1px solid rgba(24, 88, 63, .15); background: rgba(255, 253, 247, .88); box-shadow: var(--shadow); border-radius: 28px; overflow: hidden; }

.start-screen, .end-screen { min-height: 650px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; text-align: center; background: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.7)), repeating-linear-gradient(90deg, transparent 0 90px, rgba(24,88,63,.035) 90px 91px); }
.eyebrow { margin: 0 0 14px; color: var(--green); font-size: .75rem; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; line-height: .96; letter-spacing: -.045em; }
h1 { max-width: 850px; font-size: clamp(3.1rem, 8vw, 7.4rem); }
h1 em { color: var(--green); font-weight: 400; }
.intro { max-width: 570px; margin: 28px auto; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.6; }
.primary-button, .secondary-button { border: 0; border-radius: 999px; font-weight: 800; transition: transform .2s, box-shadow .2s, background .2s; }
.primary-button { padding: 16px 25px; color: white; background: var(--green); box-shadow: 0 10px 24px rgba(24,88,63,.22); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.primary-button:focus-visible, .secondary-button:focus-visible, input:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.microcopy { margin-top: 18px; color: var(--muted); font-size: .8rem; }

.game-screen { padding: 24px; }
.game-topbar { display: flex; justify-content: space-between; align-items: center; }
.game-topbar > div { display: grid; gap: 3px; }
.score-box { text-align: right; }
.stat-label { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.game-topbar strong { font-size: 1.1rem; }
.progress-track { height: 5px; margin: 18px 0 26px; background: #e5e5dc; border-radius: 99px; overflow: hidden; }
#progress-bar { width: 10%; height: 100%; background: var(--lime); border-radius: inherit; transition: width .35s ease; }
.game-layout { display: grid; grid-template-columns: minmax(320px, 1.05fr) minmax(350px, .95fr); gap: 40px; align-items: center; }
.shirt-frame { position: relative; height: 590px; margin: 0; display: grid; place-items: center; overflow: hidden; background: #202d3b; border: 1px solid rgba(255,255,255,.08); border-radius: 20px; }
.shirt-frame::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 43%, rgba(111,137,158,.22) 0, rgba(32,45,59,0) 46%, rgba(10,18,28,.26) 100%); }
.shirt-frame img { width: 100%; height: 100%; padding: 44px; display: block; object-fit: contain; object-position: center; position: relative; }
.photo-tag { position: absolute; z-index: 1; top: 16px; left: 16px; padding: 7px 11px; color: white; background: rgba(20,32,24,.76); border-radius: 99px; font-size: .67rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.answer-panel { padding: 24px 30px 24px 0; }
.answer-panel h2, .end-screen h2 { font-size: clamp(3rem, 5vw, 5.4rem); }
form { margin-top: 34px; }
label { display: block; margin-bottom: 9px; color: var(--muted); font-size: .83rem; font-weight: 700; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
input { min-width: 0; padding: 15px 18px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 999px; font-size: 1.05rem; }
.input-error { min-height: 20px; margin: 8px 0 0 10px; color: var(--danger); font-size: .8rem; }
.result-card { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); animation: reveal .32s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }
.result-heading { margin-bottom: 18px; font-family: Georgia, serif; font-size: 1.65rem; font-weight: 700; }
.result-heading.correct { color: var(--green); }
.result-heading.close { color: #9a6700; }
.result-heading.incorrect { color: var(--danger); }
.details-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0; }
.details-grid div { padding: 12px; background: var(--cream); border-radius: 12px; }
dt { color: var(--muted); font-size: .67rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
dd { margin: 3px 0 0; font-weight: 800; }
.description { color: var(--muted); line-height: 1.55; }
.hint { padding: 14px; line-height: 1.45; background: rgba(217,240,70,.22); border-left: 3px solid var(--lime); border-radius: 0 10px 10px 0; }
.secondary-button { width: 100%; padding: 14px 18px; color: var(--green); background: transparent; border: 1px solid var(--green); }
.final-score { margin: 28px 0 12px; display: flex; align-items: baseline; color: var(--green); }
.final-score strong { font-family: Georgia, serif; font-size: clamp(6rem, 14vw, 10rem); line-height: .8; }
.final-score span { font-size: 1.7rem; font-weight: 800; }
#final-message { max-width: 500px; margin: 18px 0 28px; color: var(--muted); font-size: 1.1rem; line-height: 1.5; }

@media (max-width: 820px) {
  .game-layout { grid-template-columns: 1fr; gap: 25px; }
  .shirt-frame { height: 430px; }
  .shirt-frame img { padding: 36px; }
  .answer-panel { padding: 0 4px 10px; }
  .start-screen, .end-screen { min-height: calc(100vh - 120px); }
}
@media (max-width: 480px) {
  .app-shell { width: min(100% - 20px, 1180px); padding-top: 16px; }
  .screen { margin-top: 16px; border-radius: 20px; }
  .game-screen { padding: 16px; }
  .input-row { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .shirt-frame { height: 350px; }
  .shirt-frame img { padding: 28px; }
}

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