body {
    margin: 0;
    background: #0b1723;
    font: 16px/1.4 system-ui, sans-serif;
    color: #e3eff7;
}

#game {
    display: grid;
    height: 100dvh;
    grid-template-rows: minmax(0, 1fr) auto;
    max-width: 1200px;
    margin-inline: auto;
}

#battlefield {
    min-height: 0;
    overflow: hidden;
    touch-action: none;
}

#match-hud {
    padding: 8px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: #142535;
    border-top: 1px solid #335367;
}

#match-status, #match-hint {
    margin: 0 0 6px;
}

#match-hint {
    color: #b6cdd9;
}

.match-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.match-actions button {
    min-height: 44px;
    padding: 5px 10px;
    border: 1px solid #50748c;
    border-radius: 6px;
    background: #233d51;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.match-actions button[aria-pressed="true"] {
    color: #122631;
    background: #94e0c6;
}

.match-actions button:disabled {
    opacity: 0.55;
    cursor: default;
}

.match-actions button:focus-visible {
    outline: 2px solid #9de8ff;
    outline-offset: 2px;
}

@media (max-width: 560px) {
    #match-hud { font-size: 14px; }
    .match-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* RU: Место под управление постоянно. / EN: Keep the controls' layout space. */
#match-hud[hidden] {
    display: block;
    visibility: hidden;
}

#match-status {
    min-height: 1.4em;
}

#match-hint {
    min-height: 2.8em;
}

@media (max-width: 560px) {
    #match-status { min-height: 2.8em; }
}
