.games-page { max-width:1100px; }
.game-shell { max-width:850px; margin:0 auto; padding:clamp(20px,4vw,42px); background:#fff; border:1px solid #dbe9e6; border-radius:24px; box-shadow:0 12px 40px #103b4010; }
.game-shell button { font-family:inherit; cursor:pointer; }
.game-shell button:focus-visible { outline:3px solid #007f85; outline-offset:4px; }
.game-shell h2:focus { outline:none; }
.game-card, .game-result { text-align:center; }
.game-card .tags { justify-content:center; }
.game-card h2 { font-size:clamp(28px,5vw,40px); margin:18px 0 10px; }
.game-card > .button, .game-result > .button { margin:20px auto 0; }
.game-art { display:flex; direction:ltr; align-items:center; justify-content:center; gap:20px; padding:25px 0; }
.game-art span { background:#e5f5ef; color:#007b80; border-radius:18px; padding:16px; font-size:clamp(27px,6vw,46px); font-weight:800; transform:rotate(-5deg); }
.game-art span:last-child { background:#fff0c4; color:#775d19; transform:rotate(5deg); }
.game-art b { font-size:35px; color:#008c92; }
.game-hint { background:#f3f8f6; padding:15px; border-radius:12px; line-height:1.9; }
.game-note, .game-instruction { color:#596880; font-size:13px; }
.game-topline { margin-bottom:12px; display:flex; justify-content:space-between; gap:15px; font-weight:700; }
#game-progress { display:block; width:100%; height:12px; margin:15px 0 25px; accent-color:#008c92; }
#game-question { text-align:center; margin:10px 0; font-size:clamp(23px,4vw,30px); }
.game-instruction { text-align:center; }
.game-equation { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:18px; margin:25px 0; }
.game-number { min-width:0; text-align:center; padding:20px 10px; border-radius:18px; background:#f0f7f5; border:1px solid #d9eae5; }
.game-number small { display:block; color:#596880; font-size:12px; }
.game-number strong { display:block; font-size:clamp(34px,7vw,62px); color:#143d4a; }
#game-symbol { font-size:38px; color:#008c92; font-weight:800; }
.game-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.game-choices button { display:flex; flex-direction:column; align-items:center; padding:12px 5px; border:2px solid #dbe5e5; border-radius:14px; background:white; color:#183b4a; font-size:15px; }
.game-choices b { font-size:34px; line-height:1.2; }
.game-choices button:hover:not(:disabled) { background:#eef9f6; border-color:#008c92; }
.game-choices button:disabled { cursor:default; }
.game-choices button.is-correct { background:#e3f5e9; border-color:#33834e; }
.game-choices button.is-wrong { background:#fff0e4; border-color:#b56723; }
.game-feedback { line-height:1.9; padding:16px; margin:20px 0; border-radius:12px; }
.game-feedback:empty { display:none; }
.game-feedback.correct { background:#eaf7ee; color:#215c35; }
.game-feedback.wrong { background:#fff4e9; color:#744715; }
#game-next { margin-inline-start:auto; }
.game-result-star { color:#d8a72c; font-size:60px; }
.game-final-score { font-size:40px; font-weight:800; color:#00858b; margin:12px 0; }
#game-review { text-align:right; margin:25px 0; background:#f6f9f8; border-radius:14px; padding:20px; }
#game-review-list { padding-inline-start:22px; }
#game-review-list li { padding:10px 0; border-bottom:1px solid #dce7e3; line-height:1.9; }
#game-review-list bdi { font-size:22px; font-weight:750; }
#game-review-list p { margin:5px 0; font-size:14px; }
@media(max-width:480px) {
  .game-equation { gap:10px; }
  .game-number { padding:15px 5px; }
  .game-choices { gap:8px; }
  .game-choices button { font-size:13px; }
  .game-art { gap:14px; }
}

.game-library { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.game-card { display:flex; flex-direction:column; align-items:center; padding:28px; background:white; border:1px solid #dbe9e6; border-radius:22px; box-shadow:0 10px 30px #103b400a; }
.game-card button { font-family:inherit; cursor:pointer; }
.game-card .game-hint { width:100%; }
.game-card > .button { margin-top:auto; }
.game-card h2 { font-size:30px; }
.library-note { grid-column:1/-1; text-align:center; }
.game-menu-link { background:transparent; color:#007b80; border:1px solid #b7d6d0; border-radius:8px; padding:6px 12px; font-size:12px; }
.build-art { display:flex; direction:ltr; justify-content:center; align-items:center; gap:8px; min-height:145px; }
.build-art span { padding:12px 10px; border-radius:12px; background:#e5f5ef; color:#007b80; font-size:25px; font-weight:800; }
.build-art span:nth-of-type(2) { background:#fff0c4; color:#775d19; }
.build-art span:nth-of-type(3) { background:#eee7fb; color:#66498e; }
.build-equation { margin:25px 0; text-align:center; padding:20px 10px; background:#f5f9f7; border-radius:18px; }
.build-equation > p { margin-bottom:0; color:#596880; font-size:13px; }
.place-values { display:grid; grid-template-columns:1fr auto 1fr auto 1fr; gap:10px; align-items:center; }
.place-values > div { min-width:0; padding:12px 4px; border:1px solid #dbe9e6; border-radius:12px; background:#fff; }
.place-values small { display:block; font-size:12px; color:#596880; }
.place-values strong { display:block; font-size:clamp(28px,5vw,45px); color:#007b80; }
.place-values > b { color:#007b80; font-size:23px; }
.game-choices span { font-size:13px; }
.game-result-actions { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; margin-top:25px; }
@media(max-width:700px) { .game-library { grid-template-columns:1fr; } }
@media(max-width:480px) {
  .game-card { padding:22px 16px; }
  .place-values { gap:5px; }
  .place-values > b { font-size:18px; }
  .game-choices span { font-size:11px; }
}

.level-panel { grid-column:1/-1; background:#edf7f3; border:1px solid #cde2da; border-radius:16px; padding:20px; }
.level-panel label { display:block; font-weight:800; margin-bottom:10px; }
.level-panel select { width:100%; max-width:440px; padding:12px; border:1px solid #a8ccc2; border-radius:10px; background:white; font:inherit; }
.level-panel p { margin:10px 0 0; font-size:14px; color:#49646a; }
.place-values { display:flex; justify-content:center; flex-wrap:wrap; }
.place-values > div { flex:1 1 65px; max-width:160px; }
.place-values strong { font-size:clamp(23px,4vw,38px); }
.game-choices b { font-size:clamp(24px,5vw,34px); }
.game-number strong { font-size:clamp(28px,6vw,56px); }
@media(max-width:480px) {
 .place-values { gap:4px; }
 .place-values > div { flex-basis:45px; padding:10px 2px; }
 .place-values small { font-size:10px; }
 .place-values strong { font-size:21px; }
 .place-values > b { font-size:15px; }
}
