.reason-game { max-width: 1120px; margin: 0 auto 24px; }
.reason-toolbar, .reason-settings, .reason-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 18px; }
.reason-toolbar { border-bottom: 2px solid #d7e5e3; padding-bottom: 14px; }
.reason-toolbar > :first-child { margin-right: auto; }
.reason-settings .field { min-width: 180px; max-width: 100%; }
.reason-welcome img { display: block; width: 100%; max-height: 210px; object-fit: contain; }
.reason-game h2 { font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
.reason-boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 20px 0; }
.reason-boards.is-numbers { grid-template-columns: minmax(0, 660px); justify-content: center; }
.reason-board { min-width: 0; }
.reason-board h3 { font-size: 18px; margin: 0 0 10px; }
.reason-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.reason-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 114px; padding: 9px 4px; border: 2px solid #a7bebb; border-radius: 6px; background: #f4faf9; color: #173c3c; font: inherit; box-sizing: border-box; }
button.reason-cell { cursor: pointer; }
button.reason-cell:hover:not(:disabled) { border-color: #155e66; background: #e3f2ef; }
.reason-cell[aria-pressed=true] { border-color: #155e66; background: #d6ece8; box-shadow: inset 0 0 0 2px #155e66; }
.reason-cell:focus-visible, .reason-game button:focus-visible, .reason-game summary:focus-visible { outline: 3px solid #9b264f; outline-offset: 3px; }
.reason-cell .reason-mark { position: absolute; top: 4px; right: 5px; width: 18px; height: 18px; border: 1px solid #587470; border-radius: 3px; font-size: 13px; text-align: center; line-height: 16px; background: white; }
.reason-cell svg { width: 50px; height: 50px; flex: none; }
.reason-address { position: absolute; top: 4px; left: 5px; font-size: 12px; font-weight: 700; }
.reason-item-name { font-size: 13px; overflow-wrap: anywhere; text-align: center; }
.reason-quantity { font-size: 14px; font-weight: 700; }
.reason-number { font-size: 32px; font-weight: 700; }
.reason-cell.is-correct { background: #e0f0df; border-color: #28602b; }
.reason-cell.is-missed, .reason-cell.is-extra { background: #fbe9ed; border-color: #9b264f; }
.reason-cell:disabled { opacity: 1; cursor: default; }
.reason-verdict { font-size: 12px; font-weight: 700; min-height: 16px; }
.reason-game .is-error { color: #952444; font-weight: 700; }
#reason-feedback { min-height: 28px; font-weight: 700; }
#reason-review { margin: 16px 0; padding: 12px 0; border-top: 1px solid #b9ceca; }
#reason-review summary { cursor: pointer; font-weight: 700; }
#reason-review li { margin: 9px 0; }
#reason-paused, #reason-finish { padding: 28px 0; }
.reason-game [hidden] { display: none !important; }
[data-reason-kind=crew] .reason-cell { min-height: 142px; padding: 24px 8px 10px; }
[data-reason-kind=crew] .reason-item-name { display: block; min-height: 34px; line-height: 17px; }
[data-reason-kind=crew] .reason-cell svg { width: 54px; height: 54px; }
@media (max-width: 600px) {
    .reason-boards { gap: 8px; }
    .reason-grid { gap: 4px; }
    .reason-cell { min-height: 92px; padding: 22px 2px 5px; }
    .reason-cell svg { width: 32px; height: 32px; }
    .reason-item-name { display: none; }
    .reason-quantity { font-size: 12px; }
    .reason-cell .reason-mark { width: 13px; height: 13px; line-height: 11px; font-size: 11px; right: 2px; }
    .reason-address { left: 2px; font-size: 11px; }
    .reason-verdict { font-size: 10px; overflow-wrap: anywhere; }
    .reason-game h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: no-preference) {
    .reason-cell { transition: background-color .15s, border-color .15s; }
}
