.app-shell .view#games-view { position: fixed; z-index: 25; inset: 154px 0 0; width: 100%; max-width: none; margin: 0; overflow: auto; padding: 16px 24px 40px; background: #e8eddfeb; overscroll-behavior: contain; }
#games-view[hidden] { display: none; }
.games-shell { --games-ink: #315d4e; max-width: 1240px; margin: 0 auto; padding: 24px; border: 1px solid #fff8dd; border-radius: 26px; color: var(--games-ink); background: #fffaf0; box-shadow: 0 12px 48px #284d3a1a; font-family: ui-rounded, "Trebuchet MS", system-ui, sans-serif; }
.games-shell * { box-sizing: border-box; }
.games-shell button, .games-shell select { font: inherit; }
.games-shell button { min-height: 44px; padding: 10px 15px; border: 1px solid #b9ceb6; border-radius: 14px; color: #315d4e; background: #e6edd9; font-weight: 700; cursor: pointer; }
.games-shell button:hover { background: #d4e5c9; }
.games-shell button:disabled { opacity: .55; cursor: default; }
.games-shell :focus-visible { outline: 3px solid #7f9d5e; outline-offset: 3px; }
.games-heading { position: sticky; z-index: 3; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding: 10px 0; background: #fffaf0; }
.games-heading > div { text-align: center; }
.games-heading span:not(.games-coin-balance) { font-size: 10px; letter-spacing: .15em; font-weight: 800; color: #829474; }
.games-heading h1 { margin: 4px 0 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; color: #315d4e; }
.games-coin-balance { padding: 10px 14px; border-radius: 15px; color: #886b36; background: #f7eaca; font-size: 13px; font-weight: 800; white-space: nowrap; }
.games-main { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 24px; }
.games-kit { min-width: 0; padding: 16px; border: 1px solid #dce4cf; border-radius: 20px; background: #f2f4e7; }
.games-kit h2, .games-equipment h2 { margin: 0 0 14px; font-size: 18px; color: #315d4e; }
.games-kit label { display: grid; gap: 7px; margin: 12px 0; font-size: 12px; font-weight: 700; }
.games-kit select { width: 100%; min-height: 44px; padding: 8px; border: 1px solid #c4d2b8; border-radius: 11px; color: #315d4e; background: #fffdf4; }
.games-pet-preview { position: relative; margin: 12px 0; border: 1px solid #dae3c9; border-radius: 17px; background: radial-gradient(ellipse at center, #f9f4d8, #e2ecd6); overflow: hidden; }
.games-pet-canvas { display: block; width: 100%; height: 150px; }
.games-outfit-label { display: block; padding: 6px; color: #71905f; background: #eef2df; text-align: center; font-size: 10px; font-weight: 800; }
.games-trait-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.games-trait-badges > span { padding: 5px 7px; border-radius: 9px; font-size: 10px; color: #657d58; background: #e1eacd; }
.games-trait-badges b { color: #315d4e; }
.games-kit-help { margin: 15px 0 0; font-size: 11px; line-height: 1.6; color: #718264; }
.games-play { min-width: 0; }
.games-score-strip { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid #e6dbbe; border-radius: 15px; background: #f5edd8; font-size: 12px; }
.games-score-strip b { margin-left: 7px; font-size: 18px; color: #3c6e58; }
.games-instructions { margin: 12px 2px; color: #647b62; font-size: 12px; line-height: 1.6; }
.games-board-wrap { position: relative; border: 2px solid #b9d0b0; border-radius: 20px; background: #e6f0e9; overflow: hidden; }
.games-board { display: block; width: 100%; height: auto; aspect-ratio: 800 / 520; touch-action: none; cursor: crosshair; }
.games-board-caption { position: absolute; top: 10px; right: 12px; color: #688d78; font-size: 10px; pointer-events: none; }
.games-controls { display: flex; align-items: flex-end; gap: 16px; margin: 14px 0; }
.games-controls label { display: grid; flex: 1; gap: 7px; font-size: 12px; font-weight: 700; }
.games-controls output { float: right; font-size: 11px; color: #829474; }
.games-controls input { width: 100%; min-height: 28px; margin: 0; accent-color: #659c79; cursor: pointer; }
.games-shell .games-launch, .games-shell .games-start { background: #547f65; color: #fff8e5; border-color: #547f65; }
.games-shell .games-launch:hover, .games-shell .games-start:hover { background: #3f6954; }
.games-start { width: 100%; }
.games-daily { display: grid; gap: 5px; margin-top: 16px; padding: 12px 15px; border: 1px solid #e6dec5; border-radius: 14px; background: #fbf4df; font-size: 11px; line-height: 1.5; color: #849075; }
.games-daily strong { color: #8d763f; font-size: 13px; }
.games-daily small { font-size: 10px; }
.games-result { display: grid; gap: 7px; margin-top: 15px; padding: 16px; border: 1px solid #b9d0a5; border-radius: 17px; background: #eaf2dc; }
.games-result strong { font-size: 18px; }
.games-result p { margin: 0; font-size: 13px; line-height: 1.5; }
.games-result button { justify-self: start; }
.games-notice { min-height: 30px; margin-top: 16px; font-size: 13px; line-height: 1.5; color: #547f65; }
.games-notice.is-error { color: #9c654b; }
.games-equipment { margin-top: 12px; padding-top: 20px; border-top: 1px solid #e5dfca; }
.games-equipment > p { margin: -6px 0 16px; color: #718264; font-size: 12px; line-height: 1.5; }
.games-upgrades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.games-upgrade { display: flex; min-width: 0; padding: 15px; flex-direction: column; border: 1px solid #dedfc7; border-radius: 17px; background: #f9f5e7; }
.games-upgrade > div { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 5px; }
.games-upgrade-icon { grid-row: span 2; font-size: 27px; color: #87a578; }
.games-upgrade strong { font-size: 13px; }
.games-upgrade b { font-size: 10px; color: #9a9674; }
.games-upgrade p { flex: 1; margin: 12px 0; font-size: 11px; line-height: 1.6; color: #7a896b; }
.games-upgrade button { padding: 8px; font-size: 11px; }
.games-loading { min-height: 160px; padding: 36px; text-align: center; }
@media (max-width: 900px) { .games-main { grid-template-columns: 190px minmax(0, 1fr); gap: 16px; } .games-upgrades { grid-template-columns: repeat(2, minmax(0, 1fr)); } .games-heading { gap: 10px; } }
@media (max-width: 700px) {
  .app-shell .view#games-view { inset: 151px 0 0; padding: 8px 8px calc(24px + env(safe-area-inset-bottom)); }
  .games-shell { padding: 14px; border-radius: 20px; }
  .games-heading { flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
  .games-heading > div { order: 3; width: 100%; text-align: left; margin-top: 5px; }
  .games-heading h1 { font-size: 27px; }
  .games-heading > button { padding: 8px 11px; font-size: 11px; }
  .games-coin-balance { padding: 8px 10px; font-size: 11px; }
  .games-main { display: flex; flex-direction: column; gap: 14px; }
  .games-kit { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 0 12px; padding: 12px; }
  .games-kit h2 { grid-column: 1 / -1; font-size: 16px; margin-bottom: 2px; }
  .games-pet-preview { grid-column: 1; grid-row: 2 / 5; align-self: start; margin: 10px 0; }
  .games-pet-canvas { height: 90px; }
  .games-trait-badges { grid-column: 1 / -1; grid-row: 5; }
  .games-kit > label { grid-column: 2; margin: 7px 0; gap: 4px; }
  .games-kit select { min-height: 40px; font-size: 12px; }
  .games-kit-help { grid-column: 1 / -1; margin-top: 8px; font-size: 10px; }
  .games-score-strip { padding: 10px; gap: 6px; font-size: 10px; }
  .games-score-strip b { margin-left: 3px; font-size: 16px; }
  .games-instructions { font-size: 11px; }
  .games-board-wrap { border-radius: 14px; }
  .games-board-caption { top: 7px; right: 8px; max-width: 180px; font-size: 8px; }
  .games-controls { gap: 10px; flex-wrap: wrap; }
  .games-controls label { min-width: 115px; font-size: 11px; }
  .games-controls .games-launch { width: 100%; }
  .games-upgrade { padding: 11px; }
  .games-upgrade strong { font-size: 12px; }
  .games-upgrade p { font-size: 10px; }
  .games-result strong { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .games-shell *, .games-shell *::before, .games-shell *::after { animation: none !important; transition: none !important; } }
