


@media (max-width: 430px) {
    .gh-games { gap: 10px; }
    .gh-game-card { min-height: 112px; padding: 12px 11px 11px; border-radius: 18px; }
    .gh-game-emoji { font-size: 23px; }
    .gh-game-desc { font-size: 11px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
.gh-games { scroll-margin-top: 12px; }


.gh-game-card[data-gh-game="tictactoe"] {
    background:
        linear-gradient(90deg, rgba(249, 115, 22, 0.10) 1px, transparent 1px) 0 0 / 14px 14px,
        linear-gradient(0deg, rgba(249, 115, 22, 0.10) 1px, transparent 1px) 0 0 / 14px 14px,
        rgba(255, 255, 255, 0.04);
}
.gh-game-card[data-gh-game="rps"] {
    background: radial-gradient(circle at 18% 120%, rgba(20, 184, 166, 0.28), transparent 60%), rgba(255, 255, 255, 0.04);
}
.gh-game-card[data-gh-game="rallyloop"] {
    background:
        radial-gradient(ellipse 70% 40% at 50% -10%, rgba(37, 99, 235, 0.35), transparent 70%),
        rgba(255, 255, 255, 0.04);
}
.gh-game-card[data-gh-game="skyhop"] {
    background: linear-gradient(180deg, rgba(42, 10, 61, 0.55), rgba(225, 29, 72, 0.22)), rgba(255, 255, 255, 0.03);
}


.ar-stage {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    contain: layout paint;
}
.ar-canvas { background: #050b24; }
.ar-canvas--skyhop { background: #2a0a3d; }


.ar-ttt { width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.ar-ttt-turn {
    min-height: 18px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 237, 213, 0.82);
    text-align: center;
}
.ar-ttt-board {
    position: relative;
    width: min(86vw, 320px);
    aspect-ratio: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 7px;
    padding: 10px;
    border-radius: 22px;
    background:
        linear-gradient(90deg, rgba(253, 186, 116, 0.07) 1px, transparent 1px) 0 0 / 12px 12px,
        linear-gradient(0deg, rgba(253, 186, 116, 0.07) 1px, transparent 1px) 0 0 / 12px 12px,
        linear-gradient(160deg, #2b1608, #140a05);
    border: 1px solid rgba(253, 186, 116, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.5);
    transition: box-shadow .3s ease;
}
.ar-ttt.is-my-turn .ar-ttt-board { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1.5px rgba(249, 115, 22, 0.55); }
.ar-ttt-cell {
    position: relative;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 247, 237, 0.045);
    cursor: pointer;
    padding: 0;
    transition: background .15s ease, transform .12s ease;
}
.ar-ttt-cell:not([disabled]):active { transform: scale(0.95); }
.ar-ttt.is-my-turn .ar-ttt-cell:not([disabled]) { background: rgba(249, 115, 22, 0.08); }
.ar-ttt-cell[disabled] { cursor: default; }
.ar-ttt-cell i { position: absolute; left: 50%; top: 50%; width: 56%; aspect-ratio: 1; transform: translate(-50%, -50%); display: block; }

.ar-ttt-cell[data-mark="X"] i::before,
.ar-ttt-cell[data-mark="X"] i::after {
    content: '';
    position: absolute;
    left: 50%; top: -6%;
    width: 15%; height: 112%;
    margin-left: -7.5%;
    border-radius: 99px;
    background: currentColor;
    transform: rotate(45deg);
    animation: ar-ttt-in .22s ease-out both;
}
.ar-ttt-cell[data-mark="X"] i::after { transform: rotate(-45deg); animation-delay: .06s; }

.ar-ttt-cell[data-mark="O"] i::before {
    content: '';
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    border: solid currentColor;
    border-width: clamp(6px, 2.4vw, 10px);
    animation: ar-ttt-in .22s ease-out both;
}
.ar-ttt-cell.is-mine { color: #ffb066; }
.ar-ttt-cell.is-theirs { color: #e6d8ff; }
.ar-ttt-cell.is-mine i { filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.55)); }
.ar-ttt-cell.is-win { background: rgba(253, 186, 116, 0.18); animation: ar-ttt-win .7s ease-in-out 2 alternate; }
@keyframes ar-ttt-in { from { opacity: 0; transform: scale(0.4) rotate(var(--r, 0deg)); } }
@keyframes ar-ttt-win { to { background: rgba(253, 186, 116, 0.36); } }


.ar-rps { width: 100%; display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
.ar-rps-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 12px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.22), transparent 62%),
        linear-gradient(180deg, #062a2a, #03181a);
    border: 1px solid rgba(94, 234, 212, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.45);
}
.ar-rps-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ar-rps-side--them { flex-direction: column-reverse; }
.ar-rps-card {
    width: 92px; height: 92px;
    border-radius: 26px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, rgba(94, 234, 212, 0.18), rgba(20, 184, 166, 0.06));
    border: 1px solid rgba(94, 234, 212, 0.3);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.ar-rps-card b { font-size: 48px; line-height: 1; font-weight: 800; color: #ccfbf1; }
.ar-rps[data-phase="reveal"] .ar-rps-card,
.ar-rps[data-phase="over"] .ar-rps-card { animation: ar-rps-flip .32s ease-out; }
.ar-rps-side.is-win .ar-rps-card { border-color: #5eead4; box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.55), 0 0 28px rgba(20, 184, 166, 0.45); }
.ar-rps-who { font-size: 12px; font-weight: 700; color: rgba(204, 251, 241, 0.75); }
.ar-rps-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 70%; }
.ar-rps-round { font-size: 13px; font-weight: 800; color: #5eead4; letter-spacing: .2px; }
.ar-rps.is-tie .ar-rps-round { color: #fde68a; }
.ar-rps-timer { display: block; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ar-rps-timer i { display: block; height: 100%; background: linear-gradient(90deg, #14b8a6, #5eead4); transform-origin: left center; }
.ar-rps-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ar-rps-pick {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 6px 10px;
    border-radius: 18px;
    border: 1px solid rgba(94, 234, 212, 0.22);
    background: rgba(20, 184, 166, 0.08);
    color: #ccfbf1;
    font: inherit;
    cursor: pointer;
    transition: transform .12s ease, background .15s ease, opacity .2s ease;
}
.ar-rps-pick:not([disabled]):active { transform: scale(0.94); }
.ar-rps-pick[disabled] { opacity: 0.45; cursor: default; }
.ar-rps-pick.is-picked { opacity: 1; background: rgba(20, 184, 166, 0.3); border-color: #5eead4; }
.ar-rps-hand { font-size: 30px; line-height: 1; }
.ar-rps-lbl { font-size: 11.5px; font-weight: 700; }
@keyframes ar-rps-flip { from { transform: scale(0.6) rotateY(90deg); } }


.ar-record { color: #ffd66e; font-weight: 700; }


.gh-tut-stage .gh-tut-ar { transform: scale(0.72); transform-origin: center center; pointer-events: none; }
.gh-tut-stage .gh-tut-ar .ar-rps-picks { gap: 7px; }

@media (prefers-reduced-motion: reduce) {
    .ar-ttt-cell i::before, .ar-ttt-cell i::after, .ar-ttt-cell.is-win,
    .ar-rps-card { animation: none !important; transition: none !important; }
}


.ar-ttt, .gh-c4 { position: relative; }
.ar-turn-clock {
    position: absolute; top: 0; right: 4px; z-index: 2;
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    font: 800 12px/1 system-ui, sans-serif; color: #fff;
    background:
        radial-gradient(closest-side, rgba(16, 10, 28, 0.92) 78%, transparent 80% 100%),
        conic-gradient(rgba(255, 255, 255, 0.85) calc(var(--p, 1) * 360deg), rgba(255, 255, 255, 0.14) 0);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}
.ar-turn-clock[hidden] { display: none; }
