.game-active .search-box,
.game-active .series-list {
    display: none;
}

.cards-grid.game-host {
    display: block;
    padding: 0;
    gap: 0;
    min-height: 0;
    overflow: hidden;
}

.game-sidebar-panel {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
}

.game-side-section {
    margin-bottom: 1rem;
}

.game-side-title {
    margin: 0 0 0.55rem;
    color: #cfe8f6;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.game-side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.game-side-btn,
.game-side-link {
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(103, 193, 245, 0.26);
    border-radius: 8px;
    background: rgba(16, 55, 78, 0.84);
    color: #eaf7ff;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.game-side-btn {
    text-align: center;
    padding: 0 0.5rem;
}

.game-side-link {
    display: grid;
    gap: 0.18rem;
    padding: 0.7rem 0.75rem;
    margin-bottom: 0.42rem;
}

.game-side-link small {
    color: #9cc6dc;
    font-size: 0.72rem;
    font-weight: 900;
}

.game-side-link.locked {
    opacity: 0.68;
    border-color: rgba(156, 198, 220, 0.18);
    background: rgba(8, 31, 46, 0.72);
}

.game-side-link.locked small {
    color: #ffd65a;
}

.game-side-btn:hover,
.game-side-link:hover,
.game-side-link.active {
    border-color: rgba(255, 214, 90, 0.82);
    background: rgba(39, 127, 163, 0.9);
    transform: translateX(2px);
}

.game-side-btn.primary {
    border-color: rgba(255, 214, 90, 0.66);
    background: #ffd65a;
    color: #172331;
}

.game-mobile-menu-back {
    display: none;
}

.game-side-link.disabled {
    cursor: default;
    opacity: 0.42;
    text-decoration: none;
}

.game-side-link.disabled:hover {
    border-color: rgba(103, 193, 245, 0.26);
    background: rgba(16, 55, 78, 0.84);
    transform: none;
}

.game-page {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
    grid-template-rows: minmax(260px, auto) minmax(0, 1fr);
    gap: 1rem;
    padding: 1.1rem;
    background: #0d2232;
    overflow: hidden;
}

.game-card {
    min-width: 0;
    border: 1px solid rgba(103, 193, 245, 0.18);
    border-radius: 8px;
    background:
        radial-gradient(circle at top left, rgba(103, 193, 245, 0.14), transparent 36%),
        linear-gradient(145deg, rgba(16, 55, 78, 0.95), rgba(9, 31, 46, 0.98));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
}

.game-card-inner {
    padding: 1.25rem;
}

.game-page.achievements-mode {
    grid-template-rows: minmax(260px, auto) minmax(0, 1fr);
}

.game-page.achievements-mode .game-event-card {
    display: none;
}

.game-page.achievements-mode .game-trainer-card {
    grid-column: 1;
    grid-row: 1;
}

.game-page.achievements-mode .game-controls-card {
    grid-column: 1;
    grid-row: 2;
}

.game-page.achievements-mode .game-stage {
    grid-column: 2;
    grid-row: 1 / 3;
}

.game-trainer-card {
    display: grid;
    gap: 0.9rem;
}

.game-trainer-name,
.game-event-title {
    margin: 0;
    color: #ffffff;
    font-size: 1.18rem;
    line-height: 1.2;
}

.game-trainer-name::after {
    content: attr(data-player-level);
    display: inline-block;
    margin-left: 0.55rem;
    color: #67c1f5;
    font-size: 0.82rem;
    font-weight: 900;
}

.game-partner {
    margin: 0;
    color: #cfe8f6;
    font-weight: 900;
}

.game-coins {
    color: #ffd65a;
    font-weight: 900;
    font-size: 1.1rem;
}

.game-stat-row {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 0.55rem;
    color: #cfe8f6;
    font-size: 0.86rem;
    font-weight: 900;
}

.game-stat-bar {
    height: 18px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.14);
}

.game-stat-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #63d173;
    transition: width 0.25s ease;
}

.game-stat-fill.affection {
    background: #ff8fb3;
}

.game-stats-copy {
    margin: 0;
    color: #67c1f5;
    font-weight: 900;
    line-height: 1.6;
}

.game-event-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.game-area-description {
    margin: 0;
    color: #b2d6e8;
    line-height: 1.45;
}

.game-event-body {
    margin: 0;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.5;
    white-space: pre-line;
}

.game-controls-card {
    overflow: hidden;
}

.game-team-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.game-team-header .game-side-title {
    margin-bottom: 0;
}

.game-achievements-btn {
    min-height: 36px;
    border: 1px solid rgba(255, 214, 90, 0.5);
    border-radius: 8px;
    background: rgba(255, 214, 90, 0.14);
    color: #ffd65a;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 950;
    padding: 0 0.75rem;
    cursor: pointer;
}

.game-achievements-btn:hover {
    background: rgba(255, 214, 90, 0.24);
}

.game-team-list {
    display: grid;
    gap: 0.58rem;
}

.game-team-slot {
    min-height: 46px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid rgba(103, 193, 245, 0.2);
    border-radius: 8px;
    background: #10374e;
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    text-align: left;
    padding: 0 0.85rem;
    cursor: pointer;
}

.game-team-slot.active {
    background: #277fa3;
    border-color: rgba(255, 214, 90, 0.74);
}

.game-team-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-team-level {
    color: #ffd65a;
    font-size: 0.82rem;
    font-weight: 900;
}

.game-stage {
    min-height: 0;
    overflow: hidden;
}

.game-stage-content {
    height: 100%;
    min-height: 0;
    position: relative;
}

.game-map-shell,
.game-encounter,
.game-subview {
    height: 100%;
    min-height: 0;
}

.game-map-shell {
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    background: #091f2e;
}

.game-map-shell.locked {
    cursor: not-allowed;
}

.game-map {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #091f2e;
    user-select: none;
    -webkit-user-drag: none;
}

.game-map-shell.locked .game-map {
    opacity: 0.28;
    filter: grayscale(0.8) saturate(0.55);
}

.game-map-lock-message {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    width: min(360px, calc(100% - 2rem));
    border: 1px solid rgba(255, 214, 90, 0.5);
    border-radius: 8px;
    background: rgba(6, 24, 38, 0.88);
    color: #ffd65a;
    font-size: clamp(1.1rem, 4vw, 1.8rem);
    font-weight: 950;
    line-height: 1.15;
    padding: 1rem 1.2rem;
    text-align: center;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.game-map-hotspots {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: auto;
}

.game-map-hotspot {
    position: absolute;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    cursor: crosshair;
    padding: 0;
    pointer-events: auto;
}

.game-map-hotspot:hover,
.game-map-hotspot:focus-visible {
    border-color: rgba(255, 214, 90, 0.85);
    background: rgba(255, 214, 90, 0.12);
    outline: none;
}

.game-map-fallback {
    height: 100%;
    min-height: 420px;
    display: grid;
    place-items: center;
    color: #eaf7ff;
    font-weight: 900;
    text-align: center;
    padding: 2rem;
}

.game-encounter {
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 50% 36%, rgba(103, 193, 245, 0.2), transparent 34%),
        linear-gradient(145deg, #123b58, #081e2d 72%);
    color: #eaf7ff;
}

.game-encounter-card {
    width: min(720px, 100%);
    display: grid;
    justify-items: center;
    gap: 1rem;
    text-align: center;
}

.game-sprite {
    width: 160px;
    height: 170px;
    display: grid;
    place-items: center;
    border: 4px solid #17384f;
    background:
        radial-gradient(circle at 50% 42%, rgba(103, 193, 245, 0.2), transparent 58%),
        linear-gradient(145deg, rgba(16, 55, 78, 0.98), rgba(8, 28, 42, 0.98));
}

.game-sprite img {
    max-width: 138px;
    max-height: 138px;
    object-fit: contain;
    image-rendering: auto;
}

.game-sprite.shiny {
    position: relative;
    border-color: #ffd65a;
    box-shadow: 0 0 0 2px rgba(255, 214, 90, 0.35), 0 0 26px rgba(103, 193, 245, 0.26);
}

.game-sprite.shiny img {
    filter: hue-rotate(78deg) saturate(1.75) brightness(1.12) contrast(1.08);
}

.game-sprite.shiny::after {
    content: "Shiny";
    position: absolute;
    right: 0.35rem;
    top: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 214, 90, 0.92);
    color: #172331;
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    padding: 0.25rem 0.42rem;
}

.game-sprite.fallback {
    color: #eaf7ff;
    font-weight: 900;
}

.game-rival-card {
    display: grid;
    justify-items: center;
    gap: 0.65rem;
}

.game-rival-card strong {
    color: #eaf7ff;
    font-size: 1.05rem;
    font-weight: 900;
}

.game-rival-card .game-sprite {
    border-color: #17384f;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 214, 90, 0.25), transparent 58%),
        linear-gradient(145deg, rgba(92, 34, 39, 0.98), rgba(26, 24, 28, 0.98));
}

.game-encounter-actions,
.game-battle-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.game-action {
    min-width: 140px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    border: 1px solid rgba(103, 193, 245, 0.28);
    background: #10374e;
    color: #eaf7ff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.game-action.primary {
    background: #ffd65a;
    border-color: rgba(255, 214, 90, 0.9);
    color: #172331;
}

.game-action:disabled {
    cursor: default;
    opacity: 0.55;
}

.game-gym-photo {
    height: 100%;
    min-height: 420px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    background: #000;
}

.game-gym-photo img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.game-gym-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.68);
}

.game-battle {
    min-height: 520px;
    padding: 1.2rem;
    background:
        radial-gradient(circle at 50% 10%, rgba(103, 193, 245, 0.12), transparent 32%),
        linear-gradient(145deg, #0f344d, #071d2b 78%);
    color: #eaf7ff;
}

.game-battle.resolving .game-sprite.player {
    animation: battlePlayerPulse 0.65s ease-in-out infinite alternate;
}

.game-battle.resolving .game-sprite.enemy {
    animation: battleEnemyPulse 0.65s ease-in-out infinite alternate;
}

.game-battle h2 {
    margin: 0 0 1rem;
    text-align: center;
}

.game-battle-field {
    display: grid;
    grid-template-columns: minmax(180px, 430px) 170px 170px minmax(180px, 430px);
    align-items: start;
    justify-content: center;
    gap: 1rem;
}

.game-battle-status {
    overflow: hidden;
    border: 1px solid rgba(103, 193, 245, 0.22);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.86);
}

.game-battle-name {
    padding: 0.55rem 0.8rem;
    background: #10374e;
    color: #ffffff;
    font-weight: 900;
    text-align: center;
}

.game-hp-wrap {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 82px;
    gap: 0.55rem;
    align-items: center;
    padding: 1rem;
    font-weight: 900;
}

.game-hp-bar {
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

.game-hp-fill {
    height: 100%;
    width: 100%;
    background: #39b86b;
    border-radius: inherit;
    transition: width 0.28s ease;
}

.game-hp-fill.low {
    background: #ef4444;
}

.game-hp-value {
    color: #eaf7ff;
    font-size: 0.9rem;
    text-align: right;
}

.game-battle-message {
    width: min(640px, 100%);
    min-height: 118px;
    margin: 1.35rem auto 1rem;
    color: #b2d6e8;
    font-weight: 900;
    text-align: center;
    white-space: pre-line;
}

.game-encounter-status {
    display: inline-grid;
    place-items: center;
    justify-self: center;
    margin: 0.15rem auto 0.35rem;
    border: 1px solid rgba(255, 214, 90, 0.5);
    border-radius: 999px;
    background: rgba(255, 214, 90, 0.16);
    color: #ffd65a;
    font-weight: 950;
    padding: 0.35rem 0.75rem;
}

@keyframes battlePlayerPulse {
    from { transform: translateX(0) scale(1); }
    to { transform: translateX(8px) scale(1.03); }
}

@keyframes battleEnemyPulse {
    from { transform: translateX(0) scale(1); }
    to { transform: translateX(-8px) scale(1.03); }
}

.game-move-select {
    width: min(260px, 100%);
    min-height: 42px;
    display: block;
    margin: 0 auto 1rem;
    border: 1px solid rgba(103, 193, 245, 0.32);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.94);
    color: #ffffff;
    padding: 0 0.75rem;
    font: inherit;
    font-weight: 800;
}

.game-subview {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    background: #0a2d46;
}

.game-subview h2 {
    margin: 0;
    padding: 1rem;
    background: #14415f;
    color: #ffffff;
    text-align: center;
    text-transform: uppercase;
}

.game-subview-body {
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
}

.game-back-row {
    min-height: 42px;
    border: 0;
    background: #10374e;
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.game-captured-controls {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 0.9rem;
}

.game-captured-controls label {
    display: grid;
    gap: 0.3rem;
    color: #9fd6f7;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.game-captured-controls select {
    min-height: 42px;
    border: 1px solid rgba(103, 193, 245, 0.3);
    border-radius: 8px;
    background: #082335;
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    padding: 0 0.75rem;
}

.game-captured-controls strong {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    color: #eaf7ff;
    white-space: nowrap;
}

.game-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    color: #b8d7ee;
    font-weight: 900;
}

.game-pagination .game-action {
    min-width: 120px;
}

.game-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.game-captured-tile,
.game-shop-row,
.game-log-row {
    border: 1px solid rgba(103, 193, 245, 0.18);
    border-radius: 8px;
    background: #10374e;
    color: #ffffff;
}

.game-captured-tile {
    min-height: 190px;
    padding: 0.85rem;
    cursor: pointer;
}

.game-captured-tile .game-sprite {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border: 4px solid rgba(103, 193, 245, 0.22);
    background:
        radial-gradient(circle at 50% 38%, rgba(103, 193, 245, 0.22), transparent 56%),
        linear-gradient(145deg, rgba(14, 64, 88, 0.94), rgba(7, 28, 42, 0.98));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.04),
        0 12px 26px rgba(0, 0, 0, 0.24);
}

.game-captured-tile .game-sprite img {
    max-width: 82%;
    max-height: 82%;
}

.game-captured-tile strong {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 1rem;
}

.game-mini-bars {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.game-mini-bar {
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.14);
}

.game-mini-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #63d173;
}

.game-mini-bar.affection span {
    background: #ff8fb3;
}

.game-shop-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.7rem;
}

.game-shop-row p {
    margin: 0;
    color: #cfe8f6;
    font-weight: 800;
}

.game-shop-row strong {
    color: #ffffff;
}

.game-shop-section-title {
    margin: 1rem 0 0.55rem;
    color: #ffffff;
}

.game-empty {
    color: #b2d6e8;
    font-weight: 900;
}

.game-log-row {
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.45rem;
    color: #cfe8f6;
    font-weight: 800;
}

.game-achievements-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(103, 193, 245, 0.22);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.68);
    color: #b2d6e8;
    padding: 0.85rem 1rem;
}

.game-achievements-summary strong {
    color: #ffffff;
}

.game-achievement-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 260px));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.game-achievement-filters select {
    min-height: 42px;
    border: 1px solid rgba(103, 193, 245, 0.3);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.94);
    color: #ffffff;
    font: inherit;
    font-weight: 900;
    padding: 0 0.75rem;
}

.game-achievement-section {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.game-achievement-section[hidden],
.game-achievement-card[hidden] {
    display: none !important;
}

.game-achievement-section h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
    letter-spacing: 0;
}

.game-achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.game-achievement-card {
    display: grid;
    gap: 0.65rem;
    border: 1px solid rgba(103, 193, 245, 0.18);
    border-radius: 8px;
    background: rgba(8, 31, 46, 0.72);
    padding: 0.9rem;
}

.game-achievement-card.completed {
    border-color: rgba(255, 214, 90, 0.54);
    background: linear-gradient(145deg, rgba(39, 127, 163, 0.42), rgba(8, 31, 46, 0.9));
}

.game-achievement-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.7rem;
}

.game-achievement-top strong {
    color: #ffffff;
    line-height: 1.15;
}

.game-achievement-top span {
    color: #ffd65a;
    font-size: 0.78rem;
    font-weight: 950;
    white-space: nowrap;
}

.game-achievement-card p {
    margin: 0;
    color: #b2d6e8;
    font-size: 0.84rem;
    line-height: 1.35;
}

.game-achievement-bar {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
}

.game-achievement-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #67c1f5, #ffd65a);
}

@media (max-width: 1100px) {
    .game-page {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100%;
        overflow: visible;
        grid-template-rows: auto auto auto minmax(420px, 1fr);
    }

    .game-battle-field {
        grid-template-columns: minmax(180px, 1fr) minmax(100px, 150px);
    }

    .game-page.achievements-mode {
        grid-template-rows: auto auto minmax(560px, 1fr);
    }

    .game-page.achievements-mode .game-trainer-card {
        grid-column: 1;
        grid-row: 1;
    }

    .game-page.achievements-mode .game-controls-card {
        grid-column: 1;
        grid-row: 2;
    }

    .game-page.achievements-mode .game-stage {
        grid-column: 1;
        grid-row: 3;
    }
}

@media (max-width: 768px) {
    .game-page {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .game-card-inner {
        padding: 1rem;
    }

    .game-side-grid {
        grid-template-columns: 1fr;
    }

    .game-achievement-filters {
        grid-template-columns: 1fr;
    }

    .game-battle {
        min-height: auto;
        padding: 0.75rem;
    }

    .game-battle h2 {
        margin-bottom: 0.65rem;
        font-size: 1.35rem;
    }

    .game-battle-field {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "playerStatus enemyStatus"
            "playerSprite enemySprite";
        gap: 0.55rem;
    }

    .game-battle-field .game-battle-status[data-hp-role="player"] {
        grid-area: playerStatus;
    }

    .game-battle-field .game-battle-status[data-hp-role="enemy"] {
        grid-area: enemyStatus;
    }

    .game-battle-field .game-sprite.player {
        grid-area: playerSprite;
    }

    .game-battle-field .game-sprite.enemy {
        grid-area: enemySprite;
    }

    .game-battle-field .game-sprite {
        width: 124px;
        height: 124px;
        justify-self: center;
        border-width: 3px;
    }

    .game-battle-field .game-sprite img {
        max-width: 108px;
        max-height: 108px;
    }

    .game-battle-name {
        min-height: 42px;
        display: grid;
        place-items: center;
        padding: 0.45rem 0.4rem;
        font-size: 0.78rem;
        line-height: 1.15;
    }

    .game-hp-wrap {
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 0.4rem;
        padding: 0.55rem;
        font-size: 0.82rem;
    }

    .game-hp-value {
        grid-column: 1 / -1;
        text-align: center;
        font-size: 0.78rem;
    }

    .game-hp-bar {
        height: 18px;
    }

    .game-battle-message {
        min-height: 56px;
        margin: 0.75rem auto 0.65rem;
        font-size: 0.86rem;
    }

    .game-move-select {
        min-height: 38px;
        margin-bottom: 0.65rem;
    }

    [data-soup-accept] {
        margin-top: 1rem;
    }

    .game-shop-row {
        grid-template-columns: 1fr;
    }

    .game-captured-controls {
        grid-template-columns: 1fr;
    }

    .game-captured-controls strong {
        justify-content: flex-start;
    }

    .game-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .game-action {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .game-battle {
        padding: 0.55rem;
    }

    .game-battle-field {
        gap: 0.45rem;
    }

    .game-battle-field .game-sprite {
        width: 108px;
        height: 108px;
    }

    .game-battle-field .game-sprite img {
        max-width: 94px;
        max-height: 94px;
    }

    .game-battle-name {
        min-height: 38px;
        font-size: 0.72rem;
    }
}
