* { box-sizing: border-box; letter-spacing: 0; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { font-family: "Trebuchet MS", sans-serif; color: #173b33; background: #b9eed7; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid #173b33; outline-offset: 3px; }
#game { height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; position: relative; overflow: hidden; }
#game > * { flex-shrink: 0; }
body[data-game="pixel-pad"] { background: #f4bed1; color: #542b44; }
body[data-game="pocket-garden"] { background: #f1dd8e; color: #4b4429; }
.eyebrow { font-size: 11px; font-weight: bold; line-height: 14px; text-transform: uppercase; margin: 0 0 9px; }
.target { font-size: 64px; font-weight: 700; line-height: 1; margin: 0; }
.target-label { font-size: 13px; line-height: 17px; margin: 4px 0 14px; }
.number-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(248px, 100%); }
.number { border: 1px solid #173b3326; background: #ffffffa8; border-radius: 8px; aspect-ratio: 1.4; font-size: 30px; font-weight: bold; color: #173b33; box-shadow: 0 3px 0 #173b3314; }
.number.selected { background: #204b3c; color: white; transform: translateY(2px); box-shadow: none; }
.game-status { min-height: 18px; font-size: 12px; line-height: 18px; font-weight: 700; margin: 12px 0 2px; text-align: center; }
.round { font-size: 11px; line-height: 14px; opacity: .7; margin: 0; }
.art-grid { display: grid; grid-template-columns: repeat(8, 1fr); width: min(240px, 100%); aspect-ratio: 1; gap: 3px; touch-action: none; padding: 9px; background: #ffffff65; border-radius: 8px; }
.pixel { border: 0; border-radius: 2px; min-width: 0; padding: 0; touch-action: none; }
.color-0 { background: #fff2f7; }
.color-1 { background: #e14c71; }
.color-2 { background: #533c78; }
.color-3 { background: #ffc74e; }
.color-4 { background: #378668; }
.color-5 { background: #313131; }
.swatches { display: flex; gap: 10px; margin-top: 16px; }
.swatch { width: 30px; height: 30px; border: 3px solid transparent; border-radius: 50%; outline-offset: 3px; }
.swatch[aria-pressed="true"] { outline: 2px solid #542b44; }
.pad-heading { font-size: 27px; line-height: 33px; margin: 0 0 14px; }
.garden { width: 200px; height: 160px; position: relative; display: grid; place-items: center; margin: 4px 0 0; }
.pot { position: absolute; bottom: 8px; width: 90px; height: 50px; background: #d36b51; border-radius: 6px 6px 25px 25px; border-top: 9px solid #bb5944; }
.stem { width: 8px; height: 73px; background: #46714b; position: absolute; bottom: 54px; border-radius: 5px; }
.leaf { position: absolute; width: 50px; height: 25px; background: #46714b; border-radius: 0 50px; bottom: 80px; left: 47px; transform: rotate(12deg); }
.leaf.right { left: 100px; bottom: 97px; transform: scaleX(-1) rotate(12deg); background: #699556; }
.flower { position: absolute; width: 44px; height: 44px; border: 12px solid #fff4bc; border-radius: 50%; background: #dfa73d; bottom: 116px; left: 78px; }
.sun-button { border: 1px solid #4b442935; background: #fff7d4; border-radius: 8px; color: #4b4429; padding: 10px 24px; font-size: 14px; line-height: 20px; font-weight: 700; }
.sun-button:active { transform: translateY(2px); }
.garden-count { font-size: 34px; line-height: 40px; margin: 0; }
.garden-title { font-size: 24px; line-height: 30px; margin: 0 0 4px; }
body[data-game="pocket-garden"] .target-label { margin: 4px 0 12px; }
@media (max-height: 500px) {
  #game { padding: 12px; }
  .eyebrow { margin-bottom: 8px; font-size: 10px; line-height: 12px; }
  .target { font-size: 48px; }
  .target-label { font-size: 12px; margin: 4px 0 12px; }
  .number-grid { width: min(210px, 100%); gap: 7px; }
  .number { font-size: 25px; aspect-ratio: 1.5; }
  .game-status { font-size: 11px; line-height: 16px; min-height: 16px; margin: 10px 0 2px; }
  .round { font-size: 10px; line-height: 12px; }
  .art-grid { width: min(228px, 100%); }
  .pad-heading { font-size: 25px; line-height: 30px; margin-bottom: 14px; }
  body[data-game="pixel-pad"] .eyebrow, body[data-game="pixel-pad"] .game-status { display: none; }
  .garden { height: 115px; margin-top: 8px; }
  .pot { bottom: 5px; width: 76px; height: 38px; border-top-width: 7px; }
  .stem { bottom: 39px; height: 52px; width: 7px; }
  .leaf { bottom: 57px; left: 60px; width: 40px; height: 20px; }
  .leaf.right { left: 100px; bottom: 70px; }
  .flower { bottom: 83px; left: 84px; width: 32px; height: 32px; border-width: 9px; }
  .garden-title { font-size: 22px; line-height: 27px; margin: 0; }
  .garden-count { font-size: 29px; line-height: 32px; }
  .sun-button { padding: 9px 20px; font-size: 13px; }
  body[data-game="pocket-garden"] .target-label { font-size: 12px; margin: 4px 0 10px; }
}
@media (max-height: 440px) { .number-grid { width: min(195px, 100%); } .target { font-size: 44px; } .art-grid { width: min(220px, 100%); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }