:root { font-family: Inter, system-ui, sans-serif; }
h1, h2 { font-family: Nunito, system-ui, sans-serif; font-weight: 800; }
[hidden] { display: none !important; }
.mobile-links { display: none; }
@media (max-width: 767px) {
  .mobile-links { display: flex; gap: 1.5rem; padding: .5rem 1rem .8rem; font-weight: 700; }
}
a[aria-current=page] { font-weight: 800; }
:focus-visible { outline: 3px solid #285ba0; outline-offset: 4px; }
.page { max-width: 70rem; margin: auto; padding: clamp(2.5rem, 7vw, 6rem) 1rem; }
.page h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.05; }
.intro { font-size: 1.2rem; margin: 1rem 0 2rem; max-width: 42rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.panel { background: white; border: 1px solid #eadbd0; border-radius: 1.2rem; padding: clamp(1rem, 3vw, 2rem); }
.card { display: block; border-top: .35rem solid var(--accent); transition: transform .15s; }
.card:hover { transform: translateY(-3px); }
.panel h2 { font-size: 1.5rem; margin: .35rem 0; }
.card strong { display: inline-block; margin-top: 1rem; color: var(--accent); }
.puzzle { --accent: #b8430a; }
.reflex { --accent: #08796b; }
.idle { --accent: #6742aa; }
.controls { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.controls button, .action, #reset { border: 1px solid #eadbd0; border-radius: .65rem; padding: .55rem .85rem; background: white; font-weight: 700; }
.controls button[aria-pressed="true"], .action { background: #ad3905; color: white; }
.action { display: inline-block; margin-top: 1.2rem; }
.game { max-width: 46rem; }
#board { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; width: min(100%, 25rem); }
.tile { aspect-ratio: 1; border-radius: .65rem; color: #24202a; font-size: clamp(1rem, 4vw, 1.6rem); font-weight: 800; background: var(--tile); }
.tile.empty { background: #f4eee9; }
#arena { position: relative; width: min(100%, 26.25rem); aspect-ratio: 1; background: #ecf8f5; border: 1px solid #bcdfd6; border-radius: .9rem; }
#target { position: absolute; width: 3rem; height: 3rem; border-radius: 50%; background: var(--target, #08796b); border: 4px solid white; box-shadow: 0 2px 8px #0004; }
#produce { display: inline-block; margin-bottom: 1rem; background: #6742aa; color: white; border-radius: 1rem; padding: 1.1rem 1.6rem; font-size: 1.25rem; font-weight: 800; }
#upgrades { display: grid; gap: .5rem; }
.upgrade { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; text-align: left; border: 1px solid #ded3ed; padding: .75rem; border-radius: .6rem; }
.upgrade:disabled { color: #625c69; background: #f7f3fa; }
#status { margin-top: .8rem; }
#reset { margin-top: .75rem; }
