@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,800&family=DM+Sans:wght@400;500;700;800&display=swap');

:root {
  --canvas: #F5F1E7;
  --canvas-alt: #EFE9DB;
  --ink: #22201C;
  --forest: #2E5141;
  --forest-light: #3C5C4E;
  --coral: #C8512E;
  --mustard: #F0C24B;
  --rule: #D6D1C4;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow-hard: 3px 3px 0 0 rgba(34,32,28,.20);
  --shadow-hard-lg: 4px 4px 0 0 rgba(34,32,28,.14);
  --f-display: 'Bricolage Grotesque', sans-serif;
  --f-body: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--f-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 13%, rgba(255, 90, 54, 0.13) 0 72px, transparent 73px),
    radial-gradient(circle at 90% 7%, rgba(255, 201, 64, 0.24) 0 90px, transparent 91px),
    linear-gradient(90deg, rgba(26, 26, 26, 0.035) 1px, transparent 1px),
    linear-gradient(var(--canvas), var(--canvas));
  background-size: auto, auto, 48px 48px, auto;
}
button { font: inherit; }
a { color: inherit; }

.ff-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.75rem);
}

.ff-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: clamp(1.25rem, 3vw, 2.5rem);
}

.ff-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ff-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: none;
  border: 2px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 48%, var(--ink) 48% 52%, transparent 52%),
    linear-gradient(transparent 48%, var(--ink) 48% 52%, transparent 52%),
    var(--mustard);
  box-shadow: var(--shadow-hard);
  transform: rotate(-6deg);
}
.ff-mark::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  right: -7px;
  bottom: -7px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--coral);
}

.ff-brand h1,
.ff-title,
.ff-card h2,
.ff-target-card h2,
.ff-reward h2 {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
}

.ff-brand h1 { font-size: clamp(1.45rem, 4vw, 2rem); }
.ff-brand p,
.ff-kicker {
  margin: 0;
  color: var(--forest);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ff-link,
.ff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--canvas);
  color: var(--ink);
  font-weight: 800;
  line-height: 1;
  min-height: 44px;
  padding: 0.78rem 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.ff-link:hover,
.ff-btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-lg); }
.ff-link:focus-visible,
.ff-btn:focus-visible,
.ff-choice:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.ff-btn--primary { background: var(--coral); color: var(--ink); }
.ff-btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

.ff-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.42fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.ff-title {
  font-size: clamp(2.45rem, 6vw, 4.5rem);
  max-width: 10ch;
}
.ff-title span { background-image: linear-gradient(transparent 65%, var(--mustard) 65%); padding: 0 4px; }
.ff-lede {
  color: #444;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 500;
  line-height: 1.65;
  max-width: 54ch;
  margin: 1.25rem 0 0;
}

.ff-field-map {
  position: relative;
  min-height: 232px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--canvas-alt);
  box-shadow: var(--shadow-hard-lg);
  overflow: hidden;
}
.ff-field-map::before {
  content: '';
  position: absolute;
  inset: 18px;
  background:
    linear-gradient(90deg, rgba(26, 26, 26, 0.13) 1px, transparent 1px),
    linear-gradient(180deg, rgba(26, 26, 26, 0.13) 1px, transparent 1px);
  background-size: 38px 38px;
}
.ff-field-map b {
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 2;
  max-width: 13ch;
  font-family: var(--f-display);
  font-size: 1.55rem;
  line-height: 1;
}
.ff-map-plot {
  position: absolute;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  z-index: 1;
}
.ff-map-plot--forest { width: 112px; height: 74px; right: 30px; top: 30px; background: var(--forest); transform: rotate(5deg); }
.ff-map-plot--mustard { width: 96px; height: 92px; left: 38px; bottom: 32px; background: var(--mustard); transform: rotate(-8deg); }
.ff-map-plot--coral { width: 76px; height: 76px; right: 74px; bottom: 40px; border-radius: 50%; background: var(--coral); }
.ff-map-path {
  position: absolute;
  left: 34px;
  right: 28px;
  bottom: 88px;
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 18px, transparent 18px 30px);
  transform: rotate(-11deg);
  z-index: 2;
}
.ff-map-stamp {
  position: absolute;
  right: 26px;
  bottom: 24px;
  z-index: 3;
  background: var(--mustard);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 0.45rem 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(-5deg);
}

.ff-progress-wrap {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.ff-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ff-progress {
  height: 18px;
  border: 2px solid var(--ink);
  background: var(--canvas-alt);
  border-radius: 999px;
  overflow: hidden;
}
.ff-progress span {
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  background: linear-gradient(90deg, var(--coral), var(--mustard));
}

.ff-card {
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--canvas);
  box-shadow: var(--shadow-hard-lg);
  padding: clamp(1rem, 3vw, 2rem);
}
.ff-card h2 { font-size: clamp(1.6rem, 4vw, 2.45rem); margin-bottom: 0.75rem; }
.ff-card p { margin: 0; color: #444; font-weight: 500; }

.ff-play-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.ff-target-card,
.ff-work-card {
  display: grid;
  gap: 1rem;
  align-content: start;
}
.ff-target-card h2 { font-size: clamp(2rem, 5vw, 3.4rem); }

.ff-facts {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}
.ff-facts div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: baseline;
  border-top: 2px solid var(--rule);
  padding-top: 0.75rem;
}
.ff-facts dt {
  color: var(--forest);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}
.ff-facts dd { margin: 0; color: #444; font-weight: 700; }

.ff-instruction {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.ff-mini-label {
  color: var(--forest);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.ff-count-pill {
  flex: none;
  border: 2px solid var(--ink);
  background: var(--mustard);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  font-weight: 900;
  box-shadow: 3px 3px 0 0 rgba(34,32,28,.20);
}

.ff-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.ff-choice {
  min-height: 64px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--canvas-alt);
  color: var(--ink);
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  font-weight: 900;
  font-size: clamp(1.15rem, 3vw, 1.55rem);
  transition: transform 0.12s ease-in-out, box-shadow 0.12s ease-in-out, background 0.12s ease-in-out;
}
.ff-choice:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-lg); }
.ff-choice.is-selected {
  background: var(--forest);
  color: var(--canvas);
}
.ff-choice.is-correct {
  background: var(--mustard);
  color: var(--ink);
}
.ff-choice.is-extra {
  background: var(--canvas);
  color: var(--ink);
  background-image: repeating-linear-gradient(-45deg, transparent 0 9px, rgba(255, 90, 54, 0.22) 9px 18px);
}

.ff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.ff-feedback,
.ff-success {
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-hard);
}
.ff-feedback { background: #fff7df; }
.ff-success { background: #e7f0e9; }
.ff-feedback h3,
.ff-success strong {
  display: block;
  margin: 0 0 0.35rem;
  font-family: var(--f-display);
  font-size: 1.35rem;
  line-height: 1.05;
}
.ff-feedback p,
.ff-success p { margin: 0; color: #333; font-weight: 600; line-height: 1.55; }

.ff-reward {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 1.25rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--canvas-alt);
  box-shadow: var(--shadow-hard-lg);
  padding: clamp(1.5rem, 5vw, 4rem);
}
.ff-reward h2 { font-size: clamp(2.5rem, 8vw, 5rem); }
.ff-reward p {
  max-width: 52ch;
  margin: 0 auto;
  color: #444;
  font-weight: 600;
  line-height: 1.65;
}
.ff-reward-map {
  width: min(320px, 80vw);
  aspect-ratio: 1.45;
  border: 2px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(26,26,26,.13) 1px, transparent 1px),
    linear-gradient(rgba(26,26,26,.13) 1px, transparent 1px),
    radial-gradient(circle at 30% 45%, var(--forest) 0 32px, transparent 33px),
    radial-gradient(circle at 68% 55%, var(--mustard) 0 42px, transparent 43px),
    var(--canvas);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  box-shadow: var(--shadow-hard-lg);
}

@media (max-width: 820px) {
  .ff-topbar,
  .ff-instruction {
    align-items: flex-start;
    flex-direction: column;
  }
  .ff-hero,
  .ff-play-grid {
    grid-template-columns: 1fr;
  }
  .ff-field-map { min-height: 190px; }
  .ff-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ff-actions .ff-btn,
  .ff-link { width: 100%; }
}

@media (max-width: 460px) {
  .ff-shell { padding: 1rem; }
  .ff-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .ff-choice { min-height: 58px; }
  .ff-progress-row { align-items: flex-start; flex-direction: column; }
  .ff-map-plot--forest { right: 18px; }
  .ff-map-plot--coral { right: 42px; }
}

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