/* One concrete quantity: filled places plus the places still waiting for objects. */
.site-theme.playing.addition-game .choice-layout {
    grid-template-rows: minmax(190px, 1fr) auto minmax(110px, .42fr);
    gap: 14px;
}
.addition-board {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100%; height: 100%; min-height: 0;
    padding: clamp(12px, 2vw, 24px); gap: 12px;
    box-sizing: border-box; border-radius: 24px;
    background: linear-gradient(155deg, #e4f2e5, #f4f6df);
    border: 1px solid #d4e3cb;
}
.addition-counts { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.addition-count { display: flex; align-items: center; gap: 10px; color: #527166; font-size: clamp(14px, 2vw, 19px); font-weight: 700; }
.addition-count strong { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 6px; border-radius: 14px; box-sizing: border-box; background: #fafff7; color: #355e50; font-size: 28px; }
.addition-count-target { padding: 5px 6px 5px 12px; border-radius: 18px; background: #fff3c9; color: #7b6034; }
.addition-count-target strong { background: #ffdf87; color: #795728; }
.addition-tray-area { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
.addition-tray { display: grid; grid-template-columns: repeat(var(--addition-columns, 5), var(--addition-slot-size, 40px)); grid-auto-rows: var(--addition-slot-size, 40px); gap: 8px; }
.addition-slot { display: grid; place-items: center; min-width: 0; min-height: 0; border-radius: 16px; box-sizing: border-box; }
.addition-slot.is-filled { background: #fffef7; border: 1px solid #e3e5cb; box-shadow: 0 3px 0 #c7d6b5; }
.addition-slot.is-empty { border: 2px dashed #95b99c; background: #ffffff45; }
.addition-slot img { display: block; width: 88%; height: 88%; object-fit: contain; min-width: 0; min-height: 0; }
.addition-placeholder { color: #91b19a; font-size: clamp(20px, 4vw, 36px); font-weight: 400; }
.addition-equation { display: flex; align-items: center; justify-content: center; gap: clamp(6px, 1.5vw, 14px); font-size: clamp(22px, 3.4vw, 36px); font-weight: 900; color: #3e6658; }
.addition-number { display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 6px; border-radius: 14px; background: #fffef8; box-sizing: border-box; }
.addition-unknown { color: #b36039; background: #ffe2ae; border: 2px dashed #dba65c; }
.addition-operator { color: #799080; }
.addition-board.is-complete .addition-unknown { border-style: solid; border-color: #79ab7d; background: #cde9c6; color: #356746; }
.addition-slot.is-added { animation: addition-arrive .35s cubic-bezier(.2,.8,.3,1.25) both; }
.site-theme.playing.addition-game .choice-question { font-size: clamp(15px, 2vw, 20px); }
.site-theme.playing.addition-game .choice-options { gap: 12px; }
.site-theme.playing.addition-game .choice-answer { border-radius: 20px; }
@keyframes addition-arrive { from { opacity: 0; transform: translateY(-14px) scale(.6); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media(min-width:1000px) and (min-height:681px) and (orientation:landscape) {
    .site-theme.playing.addition-game .choice-layout { grid-template-columns: minmax(0,1.3fr) minmax(0,.9fr); grid-template-rows: auto minmax(0,1fr); gap: 20px 30px; }
}
@media(max-height:680px) {
    .site-theme.playing.addition-game .choice-layout { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(230px,1fr) auto auto; min-height: 430px; }
    .site-theme.playing.addition-game .choice-visual { height:100%; min-height:0; grid-column:1; grid-row:1; }
    .site-theme.playing.addition-game .choice-question { grid-column:1; grid-row:2; }
    .site-theme.playing.addition-game .choice-options { grid-column:1; grid-row:3; grid-template-columns: repeat(4,minmax(0,1fr)); min-height:64px; }
    .site-theme.playing.addition-game .choice-options .choice-answer { min-width:0; min-height:64px; padding:8px; }
}
@media(orientation:landscape) and (max-height:680px) {
    .site-theme.playing.addition-game .choice-layout { min-height:280px; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); }
    .site-theme.playing.addition-game .choice-visual { grid-row:1 / 3; }
    .site-theme.playing.addition-game .choice-question { grid-column:2; grid-row:1; }
    .site-theme.playing.addition-game .choice-options { grid-column:2; grid-row:2; grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(prefers-reduced-motion: reduce) { .addition-slot.is-added { animation: none; } }
/* Keep twenty countable objects large enough on short screens; scroll when needed. */
@media(max-height:680px) and (orientation:portrait) {
    .site-theme.playing.addition-game .choice-layout.addition-many { min-height:520px; grid-template-rows:minmax(350px,1fr) auto auto; }
}
@media(max-height:680px) and (orientation:landscape) {
    .site-theme.playing.addition-game .choice-layout.addition-many { min-height:390px; }
    .site-theme.playing.addition-game .choice-layout.addition-many .choice-visual { min-height:340px; }
}
