.games { border-top: 1px solid var(--line); padding-block: 2.5rem; scroll-margin-top: 1rem; }
.game { display: grid; grid-template-rows: auto auto 1fr; background: var(--panel); border: 1px solid var(--line); }
.game-heading, .game-controls { padding: 1.2rem 1.5rem; }
.game-heading p, .game-progress, .game-controls details p { color: var(--muted); }
.game-board { min-height: 12rem; margin-inline: 1.5rem; border: 1px solid var(--line); overflow: hidden; }
.apple-board { display: grid; grid-template: repeat(3, 1fr) / repeat(6, minmax(0, 1fr)); padding: .55rem; background: radial-gradient(ellipse at 65% 70%, #303d24, #19271e); }
.orchard-piece { display: grid; place-items: center; }
.orchard-piece > span { display: block; width: clamp(1.1rem, 5vw, 2rem); aspect-ratio: 1; position: relative; transform: rotate(var(--tilt)); }
.orchard-apple > span { border-radius: 44% 44% 48% 48%; background: radial-gradient(circle at 31% 28%, #ff9772, #cf472d 55%, #8d2a20); }
.orchard-apple > span::before { content: ""; position: absolute; top: -.26rem; left: 51%; width: .16rem; height: .45rem; background: #e5bc79; transform: rotate(13deg); }
.orchard-leaf > span { width: clamp(.95rem, 4vw, 1.65rem); border-radius: 76% 4% 76% 4%; background: linear-gradient(135deg, #75a64c, #375a31); }
.apple-board.revealed .orchard-apple > span { outline: 1px solid var(--accent); outline-offset: .34rem; }
.resistor-board { display: grid; place-content: center; justify-items: center; gap: 1rem; background: repeating-linear-gradient(90deg, #40583930 0 1px, transparent 1px 24px), #1c2722; }
.game-resistor { position: relative; isolation: isolate; display: flex; align-items: stretch; justify-content: space-evenly; width: min(12rem, 49vw); height: 3.6rem; border-radius: 1rem; background: #d8bc83; box-shadow: inset 0 -8px 14px #5d471d66, 0 7px 16px #0a100d80; }
.game-resistor::before { content: ""; position: absolute; z-index: -1; inset: calc(50% - 1px) -17%; height: 3px; background: linear-gradient(90deg, #9faea2, #c9d7cc 16%, transparent 17% 83%, #c9d7cc 84%, #9faea2); }
.game-resistor > span { width: 9%; background: var(--band); box-shadow: inset 0 .35rem .6rem #fff2, inset 0 -.35rem .6rem #0003; }
.game-resistor > span:last-child { margin-left: 9%; }
.band-labels { color: var(--ink); min-height: 1.65em; }
.game-progress { font-size: .88rem; }
.game-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-block: .85rem; }
.game button { min-height: 44px; padding: .48rem .65rem; border: 1px solid #576451; border-radius: .3rem; background: #1d2721; color: var(--ink); font: inherit; cursor: pointer; }
.game button:enabled:hover { border-color: var(--accent); }
.game button[aria-disabled="true"] { cursor: default; }
.game button.correct { background: #273520; border-color: var(--accent); color: var(--accent); }
.game button.incorrect { background: #382520; border-color: #ff9c85; }
.game-feedback { min-height: 1.65em; }
.game .game-next { margin-top: .65rem; background: var(--accent); color: var(--bg); font-weight: 700; }
@media (max-width: 420px) {
  .header { flex-wrap: wrap; padding-block: .75rem; gap: .45rem .8rem; }
  .header nav { gap: .8rem; }
  .game-heading, .game-controls { padding-inline: 1rem; }
  .game-board { margin-inline: 1rem; }
}
.moon-feature { display: grid; grid-template-columns: 1fr minmax(5rem, 36%); align-items: center; gap: 1rem; position: relative; isolation: isolate; overflow: hidden; margin-bottom: 1.25rem; padding: clamp(1.1rem, 4vw, 2rem); border: 1px solid #57604c; background: radial-gradient(ellipse at 85% 50%, #384237, #202c2a 47%, #182322 77%); }
.moon-callout h3 { font-size: clamp(1.65rem, 4vw, 2.45rem); }
.moon-callout p { color: var(--muted); }
.moon-callout p:first-child { color: #f3c46e; font-size: .85rem; }
.moon-callout .button { margin-top: 1rem; background: #f3c46e; }
.moon-callout .button:hover { background: #ffdc98; }
.moon-emblem { display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem; justify-self: center; width: min(64%, 8rem); padding: .25rem; transform: rotate(-16deg); }
.moon-emblem span { display: grid; place-items: center; aspect-ratio: 1; border-radius: .23rem; color: #17202a; background: #f3c46e; font-weight: 800; }
.moon-emblem span:nth-child(2) { background: #80e2bd; }
.moon-emblem span:nth-child(3) { grid-column: 2; background: #ffadab; }
@media (max-width: 400px) {
  .moon-feature { grid-template-columns: 1fr 3.6rem; }
  .moon-emblem { width: 100%; }
}
