.pg-shell {
    max-width: 560px;
    margin: 0 auto;
    padding: 14px 12px 30px;
    color: var(--cg-ink);
    font-family: Inter, Arial, sans-serif;
}

.pg-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.pg-stats,
.pg-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pg-stat {
    min-width: 62px;
    padding: 8px 9px;
    border: 1px solid var(--cg-line);
    border-radius: 8px;
    background: var(--cg-panel);
    box-shadow: 0 6px 16px rgba(30, 37, 40, 0.06);
}

.pg-stat span,
.pg-hud-card span {
    display: block;
    color: var(--cg-muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.pg-stat strong,
.pg-hud-card strong {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    line-height: 1;
}

.pg-btn {
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid var(--cg-line);
    border-radius: 8px;
    background: var(--cg-panel);
    color: var(--cg-ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.pg-btn:hover {
    border-color: var(--cg-teal);
    transform: translateY(-1px);
}

.pg-btn:active {
    transform: translateY(0);
}

.pg-btn:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.pg-icon-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pg-icon-btn svg {
    width: 20px;
    height: 20px;
}

.pg-primary {
    background: var(--cg-green);
    border-color: var(--cg-green);
    color: #fff;
}

.pg-primary:hover {
    border-color: var(--cg-green);
    filter: brightness(1.08);
}

.pg-hud {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.pg-hud-card {
    padding: 9px 11px;
    border: 1px solid var(--cg-line);
    border-radius: 8px;
    background: var(--cg-panel);
    box-shadow: 0 6px 16px rgba(30, 37, 40, 0.06);
}

.pg-stage {
    display: flex;
    justify-content: center;
}

.pg-board {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border-radius: 16px;
    background:
        radial-gradient(circle at 26% 18%, rgba(255, 233, 194, 0.22), transparent 55%),
        linear-gradient(160deg, #6b4426, #4a2c17 60%, #3b2211);
    border: 1px solid #2c1a0d;
    box-shadow: var(--cg-shadow), inset 0 0 34px rgba(0, 0, 0, 0.35);
}

.pg-hole {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.pg-hole .pg-disc {
    width: 74%;
    height: 74%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #2a1809, #1d1006);
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 220, 175, 0.12);
    transition: transform 0.1s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.pg-hole.pg-filled .pg-disc {
    background: radial-gradient(circle at 34% 28%, #ffe6a8, #e8a93c 58%, #a66a12);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45), inset 0 -3px 7px rgba(120, 66, 6, 0.55);
}

.pg-hole.pg-movable .pg-disc {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45), inset 0 -3px 7px rgba(120, 66, 6, 0.55), 0 0 0 2px rgba(255, 233, 176, 0.25);
}

.pg-hole.pg-sel .pg-disc {
    background: radial-gradient(circle at 34% 28%, #d9fff0, #37c99a 58%, #14795c);
    box-shadow: 0 0 16px rgba(55, 201, 154, 0.6), inset 0 -3px 7px rgba(10, 80, 60, 0.5);
    transform: scale(1.08);
}

.pg-hole.pg-target .pg-disc {
    background: radial-gradient(circle at 50% 40%, rgba(55, 201, 154, 0.34), rgba(20, 90, 70, 0.18));
    box-shadow: inset 0 0 0 3px rgba(96, 226, 180, 0.85), 0 0 14px rgba(55, 201, 154, 0.35);
    animation: pg-pulse 1.1s ease-in-out infinite;
}

.pg-hole:focus-visible {
    outline: 3px solid var(--cg-teal);
    outline-offset: -4px;
    border-radius: 50%;
}

.pg-hole:active .pg-disc {
    transform: scale(0.92);
}

.pg-hole.pg-pop .pg-disc {
    animation: pg-pop 0.24s ease;
}

@keyframes pg-pulse {
    50% { opacity: 0.6; }
}

@keyframes pg-pop {
    0% { transform: scale(1); background: radial-gradient(circle at 34% 28%, #ffe6a8, #e8a93c 58%, #a66a12); }
    60% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.pg-status {
    min-height: 22px;
    margin: 12px 2px 10px;
    color: var(--cg-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.pg-controls,
.pg-modes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pg-modes {
    margin-top: 8px;
}

.pg-controls .pg-btn {
    flex: 1;
    min-width: 110px;
}

.pg-mode {
    flex: 1;
    min-width: 84px;
    font-size: 0.84rem;
}

.pg-mode-on {
    border-color: var(--cg-teal);
    background: rgba(18, 122, 137, 0.1);
    color: var(--cg-teal);
}

.pg-result {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--cg-line);
    border-radius: 12px;
    background: var(--cg-panel);
    box-shadow: var(--cg-shadow);
    text-align: center;
    animation: pg-rise 0.25s ease;
}

.pg-result.pg-noanim {
    animation: none;
}

@keyframes pg-rise {
    from { opacity: 0; transform: translateY(8px); }
}

.pg-result-kicker {
    display: block;
    color: var(--cg-teal);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pg-result strong {
    display: block;
    margin: 4px 0 2px;
    font-size: 1.35rem;
}

.pg-result p {
    margin: 0 0 12px;
    color: var(--cg-muted);
    font-size: 0.9rem;
}

.pg-result-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pg-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 26, 30, 0.55);
}

.pg-modal-card {
    position: relative;
    max-width: 420px;
    width: 100%;
    padding: 20px 22px;
    border-radius: 12px;
    background: var(--cg-panel);
    border: 1px solid var(--cg-line);
    box-shadow: var(--cg-shadow);
}

.pg-modal-card h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.pg-modal-card p {
    margin: 0 0 10px;
    color: var(--cg-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.pg-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--cg-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.pg-close:hover {
    color: var(--cg-ink);
    background: var(--cg-bg);
}

@media (max-width: 640px) {
    .pg-shell {
        padding: 8px 4px 22px;
    }

    .pg-stat {
        min-width: 56px;
        padding: 7px 8px;
    }

    .pg-stat strong,
    .pg-hud-card strong {
        font-size: 16px;
    }

    .pg-btn {
        padding: 9px 10px;
        font-size: 0.84rem;
    }

    .pg-mode {
        min-width: 70px;
        font-size: 0.8rem;
    }
}
