:root {
  --green-950: #0b2d1f;
  --green-900: #123d2a;
  --green-800: #1b5137;
  --green-600: #5e8f2f;
  --lime: #92bd3f;
  --lime-light: #c8ea68;
  --cream: #f5f7ee;
  --cream-dark: #e6ebdc;
  --berry: #b6425c;
  --orange: #e5903d;
  --ink: #17251d;
  --muted: #647168;
  --white: #fff;
  --shadow: 0 24px 65px rgba(11, 45, 31, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: "Poppins", sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.site-container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; padding: 10px 14px; transform: translateY(-140%); border-radius: 8px; background: var(--white); color: var(--green-950); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }

.game-topbar { background: var(--lime); color: var(--green-950); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.game-topbar-inner { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.game-topbar a { text-decoration: none; }
.game-header { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid rgba(19,61,42,.08); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.game-header-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.game-brand { display: inline-flex; align-items: center; gap: 12px; color: #111; font-size: 19px; font-weight: 800; text-decoration: none; text-transform: uppercase; }
.game-brand img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.desktop-nav { display: flex; align-items: center; gap: 29px; }
.desktop-nav a { position: relative; color: #1e2722; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.desktop-nav a::after { position: absolute; right: 0; bottom: -8px; left: 0; height: 2px; content: ""; transform: scaleX(0); background: var(--lime); transition: transform .2s ease; }
.desktop-nav a:hover::after,.desktop-nav a.active::after { transform: scaleX(1); }
.desktop-nav a.active { color: var(--green-600); }
.mobile-nav { display: none; position: relative; }
.mobile-nav summary { padding: 9px 13px; border: 1px solid var(--cream-dark); border-radius: 8px; cursor: pointer; font-weight: 600; list-style: none; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav nav { position: absolute; top: 46px; right: 0; width: 220px; overflow: hidden; border: 1px solid var(--cream-dark); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.mobile-nav nav a { display: block; padding: 12px 16px; text-decoration: none; }
.mobile-nav nav a:hover,.mobile-nav nav a.active { background: var(--cream); color: var(--green-600); }

.game-hero { position: relative; overflow: hidden; padding: 74px 0 88px; background: radial-gradient(circle at 87% 10%,rgba(200,234,104,.25),transparent 26%),linear-gradient(135deg,#f9fbf5 0%,#edf3e6 100%); }
.game-hero::before { position: absolute; right: -70px; bottom: -130px; width: 420px; height: 420px; content: ""; border: 55px solid rgba(130,174,70,.1); border-radius: 50%; }
.game-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(380px,.8fr); align-items: center; gap: 75px; }
.game-eyebrow { display: inline-block; margin-bottom: 14px; color: var(--green-600); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.game-hero h1 { max-width: 720px; margin: 0 0 22px; color: var(--green-950); font-size: clamp(46px,6vw,78px); line-height: .98; letter-spacing: -.045em; }
.game-hero-copy > p { max-width: 660px; margin: 0 0 32px; color: #536158; font-size: 18px; line-height: 1.75; }
.game-button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; padding: 13px 23px; border: 0; border-radius: 999px; cursor: pointer; font-weight: 700; text-align: center; text-decoration: none; transition: transform .2s ease,box-shadow .2s ease,background .2s ease; }
.game-button:hover { transform: translateY(-2px); }
.game-button-primary { background: var(--lime); color: var(--green-950); box-shadow: 0 12px 28px rgba(95,143,47,.24); }
.game-button-primary:hover { background: var(--lime-light); }
.game-button-secondary { border: 1px solid rgba(255,255,255,.44); background: rgba(255,255,255,.1); color: var(--white); }
.game-button-secondary:hover { background: rgba(255,255,255,.18); }
.game-button-light { background: var(--white); color: var(--green-950); }
.hero-product-stack { position: relative; min-height: 410px; }
.hero-product { position: absolute; margin: 0; overflow: hidden; border: 7px solid var(--white); border-radius: 22px; background: var(--white); box-shadow: var(--shadow); }
.hero-product img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-product figcaption { position: absolute; right: 10px; bottom: 10px; left: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(11,45,31,.87); color: var(--white); font-size: 12px; font-weight: 700; text-align: center; }
.hero-product-main { inset: 0 18% 0 0; transform: rotate(-2deg); }
.hero-product-small { right: 0; bottom: 23px; width: 45%; height: 54%; transform: rotate(4deg); }

.game-section { padding: 90px 0; background: var(--white); }
.section-heading { max-width: 790px; margin: 0 auto 42px; text-align: center; }
.section-heading h2 { margin: 0 0 14px; color: var(--green-950); font-size: clamp(34px,4.5vw,52px); line-height: 1.1; letter-spacing: -.03em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.section-heading.compact { margin-bottom: 36px; }
.game-shell { overflow: hidden; border: 1px solid #dfe7da; border-radius: 24px; background: var(--cream); box-shadow: var(--shadow); }
.game-hud { display: grid; grid-template-columns: repeat(4,minmax(84px,1fr)) auto; gap: 1px; border-bottom: 1px solid rgba(255,255,255,.12); background: var(--green-950); color: var(--white); }
.hud-item { min-height: 76px; display: flex; flex-direction: column; justify-content: center; padding: 13px 20px; border-right: 1px solid rgba(255,255,255,.1); }
.hud-item span { color: rgba(255,255,255,.62); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hud-item strong { font-size: 23px; }
#livesValue { color: #ff718d; letter-spacing: .14em; }
.hud-actions { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.icon-button { min-height: 40px; padding: 8px 13px; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; background: rgba(255,255,255,.08); color: var(--white); cursor: pointer; font-size: 12px; font-weight: 600; }
.icon-button:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.icon-button:disabled { cursor: not-allowed; opacity: .45; }
.game-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); }
.order-panel { padding: 28px 24px; border-right: 1px solid #dfe7da; background: #f8faf5; }
.order-number { display: block; margin-bottom: 7px; color: var(--green-600); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.order-panel h3 { margin: 0 0 8px; color: var(--green-950); font-size: 25px; }
.order-help { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.order-list { display: grid; gap: 11px; }
.order-product { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid #dae4d4; border-radius: 12px; background: var(--white); }
.order-product.complete { border-color: #a3ca54; background: #f2f8e8; }
.order-product img { width: 52px; height: 48px; border-radius: 8px; object-fit: cover; }
.order-product-name { overflow: hidden; font-size: 11px; font-weight: 700; line-height: 1.3; }
.order-product-count { min-width: 32px; padding: 5px 7px; border-radius: 999px; background: var(--cream); color: var(--green-900); font-size: 11px; font-weight: 800; text-align: center; }
.order-product.complete .order-product-count { background: var(--lime); }
.order-progress { height: 7px; margin-top: 18px; overflow: hidden; border-radius: 99px; background: #dfe7da; }
.order-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lime); transition: width .25s ease; }
.keyboard-help { margin: 24px 0 0; color: #718078; font-size: 11px; line-height: 1.6; }
.canvas-column { min-width: 0; padding: 18px; }
.canvas-wrap { position: relative; overflow: hidden; border-radius: 15px; background: var(--green-950); }
#gameCanvas { display: block; width: 100%; height: auto; aspect-ratio: 16/9; outline: none; touch-action: manipulation; }
#gameCanvas:focus-visible { box-shadow: inset 0 0 0 4px var(--lime-light); }
.game-overlay { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(8,34,23,.76); backdrop-filter: blur(4px); }
.game-overlay[hidden] { display: none; }
.overlay-card { width: min(520px,100%); padding: 31px; border: 1px solid rgba(255,255,255,.18); border-radius: 20px; background: rgba(16,58,39,.95); color: var(--white); text-align: center; box-shadow: 0 25px 70px rgba(0,0,0,.28); }
.overlay-card .overlay-label { color: var(--lime-light); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.overlay-card h3 { margin: 9px 0 12px; color: var(--white); font-size: clamp(28px,4vw,42px); line-height: 1.1; }
.overlay-card p { max-width: 430px; margin: 0 auto 22px; color: rgba(255,255,255,.75); font-size: 14px; line-height: 1.65; }
.overlay-score { margin-bottom: 22px; color: var(--white); font-size: 18px; font-weight: 700; }
.overlay-score strong { color: var(--lime-light); font-size: 30px; }
.overlay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.screen-flash { position: absolute; z-index: 5; inset: 0; pointer-events: none; opacity: 0; }
.screen-flash.wrong { animation: wrong-flash .28s ease; background: rgba(196,43,74,.35); }
.screen-flash.correct { animation: correct-flash .24s ease; background: rgba(151,198,67,.25); }
.game-status { min-height: 22px; margin: 10px 4px 0; color: var(--muted); font-size: 12px; }
.mobile-product-controls { display: none; }
.mobile-control-help { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.mobile-product-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.mobile-product-button { min-width: 0; min-height: 70px; display: grid; grid-template-columns: 54px minmax(0,1fr); align-items: center; gap: 9px; padding: 7px; border: 2px solid #dce5d7; border-radius: 12px; background: var(--white); color: var(--green-950); cursor: pointer; text-align: left; transition: border-color .16s ease,background .16s ease,transform .16s ease; }
.mobile-product-button img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; }
.mobile-product-button span { min-width: 0; }
.mobile-product-button strong { display: block; font-size: 11px; line-height: 1.25; }
.mobile-product-button small { display: block; margin-top: 3px; color: #748078; font-size: 10px; font-weight: 600; }
.mobile-product-button.is-needed { border-color: #9dc543; box-shadow: 0 0 0 2px rgba(157,197,67,.12); }
.mobile-product-button.is-needed small { color: #55791f; }
.mobile-product-button:active:not(:disabled) { transform: scale(.98); }
.mobile-product-button:focus-visible { outline: 3px solid var(--lime-light); outline-offset: 2px; }
.mobile-product-button:disabled { cursor: default; filter: grayscale(.25); opacity: .52; }
.mobile-product-button.is-complete { border-color: #dce5d7; background: #f1f5ed; opacity: .56; }

.product-discovery { padding: 88px 0; background: var(--cream); }
.discovery-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 14px; }
.discovery-card { overflow: hidden; border: 1px solid #dde6d7; border-radius: 14px; background: var(--white); color: var(--green-950); text-decoration: none; transition: transform .2s ease,box-shadow .2s ease; }
.discovery-card:hover { transform: translateY(-4px); box-shadow: 0 15px 35px rgba(11,45,31,.12); }
.discovery-card img { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.discovery-card span { display: block; padding: 13px 9px; font-size: 11px; font-weight: 700; text-align: center; }
.game-cta { padding: 75px 0; background: var(--green-900); color: var(--white); }
.game-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.game-cta .game-eyebrow { color: var(--lime-light); }
.game-cta h2 { margin: 0 0 9px; color: var(--white); font-size: clamp(31px,4vw,46px); line-height: 1.1; }
.game-cta p { margin: 0; color: rgba(255,255,255,.7); }
.game-footer { padding: 60px 0 24px; background: #09251a; color: rgba(255,255,255,.68); }
.game-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 45px; }
.game-footer strong { display: block; margin-bottom: 12px; color: var(--white); }
.game-footer p { margin: 0; }
.game-footer a { display: block; margin: 7px 0; color: rgba(255,255,255,.68); text-decoration: none; }
.game-footer a:hover { color: var(--lime-light); }
.copyright { margin: 42px 20px 0 !important; padding-top: 21px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; text-align: center; }

@keyframes wrong-flash { 0%{opacity:0} 45%{opacity:1} 100%{opacity:0} }
@keyframes correct-flash { 0%{opacity:0} 45%{opacity:.8} 100%{opacity:0} }

@media (max-width: 1050px) {
  .desktop-nav { gap: 18px; }
  .desktop-nav a { font-size: 10px; }
  .game-brand { font-size: 16px; }
  .game-hero-grid { grid-template-columns: 1fr 390px; gap: 45px; }
  .game-layout { grid-template-columns: 240px minmax(0,1fr); }
  .order-panel { padding: 22px 17px; }
  .discovery-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 860px) {
  .game-topbar-inner span { display: none; }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; }
  .game-hero { padding: 58px 0 70px; }
  .game-hero-grid { grid-template-columns: 1fr; }
  .hero-product-stack { min-height: 390px; max-width: 560px; width: 100%; margin: 0 auto; }
  .game-hud { grid-template-columns: repeat(4,1fr); }
  .hud-actions { grid-column: 1 / -1; justify-content: center; border-top: 1px solid rgba(255,255,255,.1); }
  .game-layout { grid-template-columns: 1fr; }
  .order-panel { border-right: 0; border-bottom: 1px solid #dfe7da; }
  .order-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .keyboard-help { display: none; }
  .mobile-product-controls { display: block; margin-top: 12px; padding: 12px; border: 1px solid #dfe7da; border-radius: 14px; background: #f8faf5; }
  .game-cta-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 600px) {
  .site-container { width: min(100% - 24px,1180px); }
  .game-topbar { display: none; }
  .game-header-inner { min-height: 70px; }
  .game-brand { gap: 8px; font-size: 13px; }
  .game-brand img { width: 40px; height: 40px; }
  .game-hero { padding: 36px 0 44px; }
  .game-hero h1 { font-size: 40px; }
  .game-hero-copy > p { font-size: 15px; }
  .hero-product-stack { min-height: 245px; }
  .game-section,.product-discovery { padding: 48px 0; }
  .section-heading { margin-bottom: 26px; }
  .section-heading h2 { font-size: 31px; }
  .game-shell { border-radius: 17px; }
  .game-hud { grid-template-columns: repeat(2,1fr); }
  .hud-item { min-height: 65px; padding: 9px 14px; }
  .hud-item strong { font-size: 20px; }
  .order-panel { padding: 20px 15px; }
  .order-list { grid-template-columns: 1fr; }
  .order-product { grid-template-columns: 58px minmax(0,1fr) auto; }
  .order-product img { width: 58px; height: 52px; }
  .canvas-column { padding: 8px; }
  .canvas-wrap { border-radius: 10px; }
  #gameCanvas { min-height: 205px; object-fit: fill; touch-action: none; }
  .game-overlay { padding: 12px; }
  .game-overlay:not([hidden]) { position: relative; min-height: 0; padding: 14px; background: #103a27; backdrop-filter: none; }
  .overlay-card { padding: 22px 16px; border-radius: 15px; }
  .overlay-card h3 { font-size: 25px; }
  .overlay-card p { margin-bottom: 16px; font-size: 12px; }
  .overlay-actions { flex-direction: column; }
  .overlay-actions .game-button { width: 100%; min-height: 50px; }
  .mobile-product-controls { margin-top: 8px; padding: 10px; }
  .mobile-product-button { min-height: 74px; grid-template-columns: 56px minmax(0,1fr); }
  .mobile-product-button img { width: 56px; height: 56px; }
  .mobile-product-button strong { font-size: 11px; }
  .game-status { min-height: 38px; margin: 10px 2px 2px; font-size: 12px; line-height: 1.45; }
  .discovery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .game-cta { padding: 58px 0; }
  .game-button-light { width: 100%; }
  .game-footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

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