/* GiftLabs Games: a playful pastel arcade for two. */
:root {
    --gm-ink: #2a2140; --gm-mute: #6f6785; --gm-line: #efe6f5;
    --gm-rose: #ff5e8e; --gm-gold: #f5b942; --gm-sky: #4aa8ff; --gm-mint: #2fc99a; --gm-violet: #8b5cf6;
    --gm-grad: linear-gradient(135deg, #ff6b9a, #ffa66b);
    --gm-glass: rgba(255, 255, 255, .78);
    --gm-shadow: 0 10px 34px rgba(120, 80, 160, .14);
}

body.games-body {
    color: var(--gm-ink); font-family: 'Outfit', sans-serif; min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 170, 200, .45), transparent 38%),
        radial-gradient(circle at 88% 16%, rgba(160, 200, 255, .45), transparent 36%),
        radial-gradient(circle at 70% 92%, rgba(255, 215, 150, .45), transparent 40%),
        #fff8fb;
    background-attachment: fixed;
}
.gm-main, .gp-top, .gp-main { position: relative; z-index: 1; }

/* Floating decorations behind everything */
.gm-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.gm-bg span { position: absolute; font-size: clamp(1.6rem, 4vw, 3rem); opacity: .35; animation: gmFloat var(--d, 9s) ease-in-out infinite; filter: saturate(1.2); }
.gm-bg span::before { content: var(--e); }
.gm-bg span:nth-child(1) { --e: "💖"; left: 6%; top: 18%; --d: 8s; }
.gm-bg span:nth-child(2) { --e: "🎮"; right: 7%; top: 26%; --d: 10s; animation-delay: -3s; }
.gm-bg span:nth-child(3) { --e: "⭐"; left: 14%; bottom: 14%; --d: 7s; animation-delay: -2s; }
.gm-bg span:nth-child(4) { --e: "🎲"; right: 12%; bottom: 10%; --d: 11s; animation-delay: -5s; }
.gm-bg span:nth-child(5) { --e: "🎨"; left: 46%; top: 6%; --d: 9s; animation-delay: -1s; }
.gm-bg span:nth-child(6) { --e: "☁️"; right: 30%; bottom: 24%; --d: 12s; animation-delay: -6s; }
@keyframes gmFloat { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-26px) rotate(6deg); } }

.gm-main { max-width: 1280px; margin: 0 auto; padding: clamp(5.5rem, 13vh, 8rem) clamp(1rem, 4vw, 3rem) clamp(2rem, 6vh, 4rem); }

/* ── Hero ─────────────────────────────────────────── */
.gm-hero { text-align: center; margin-bottom: 2rem; }
.gm-eyebrow { display: inline-flex; gap: .5rem; align-items: center; background: #fff; color: #c2410c; font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; padding: .45rem 1.1rem; border-radius: 999px; box-shadow: 0 4px 14px rgba(255, 120, 80, .18); }
.gm-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(2.5rem, 7.5vw, 4.6rem); line-height: 1.08; margin: 1rem 0 .7rem; letter-spacing: -.01em; }
.gm-hero h1 em { font-style: italic; background: var(--gm-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.gm-wiggle { display: inline-block; animation: gmWiggle 2.4s ease-in-out infinite; transform-origin: 70% 80%; }
@keyframes gmWiggle { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-16deg); } 80% { transform: rotate(14deg); } 90% { transform: rotate(-8deg); } }
.gm-hero p { color: var(--gm-mute); font-size: 1.12rem; max-width: 520px; margin: 0 auto; }
.gm-steps { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.gm-steps li { display: inline-flex; align-items: center; gap: .5rem; background: var(--gm-glass); border: 1px solid #fff; border-radius: 999px; padding: .4rem 1rem .4rem .45rem; font-weight: 600; font-size: .88rem; box-shadow: 0 4px 14px rgba(120, 80, 160, .08); }
.gm-steps b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gm-grad); color: #fff; font-size: .78rem; }

/* ── Buttons & fields ─────────────────────────────── */
.gm-btn { text-decoration: none; font-family: inherit; font-weight: 700; font-size: .9rem; border: 2px solid #fff; background: #fff; color: var(--gm-ink); padding: .62rem 1.15rem; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; box-shadow: 0 4px 14px rgba(120, 80, 160, .12); transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s; }
.gm-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 22px rgba(120, 80, 160, .2); }
.gm-btn:active { transform: scale(.96); }
.gm-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.gm-btn-primary { background: var(--gm-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(255, 110, 130, .38); }
.gm-btn-ghost { background: rgba(255, 255, 255, .55); box-shadow: none; }
.gm-field { display: flex; flex-direction: column; gap: .3rem; font-size: .72rem; font-weight: 800; color: var(--gm-mute); text-transform: uppercase; letter-spacing: .08em; }
.gm-field input, .gm-join input { font-family: inherit; font-size: 1rem; padding: .62rem 1rem; border-radius: 14px; border: 2px solid var(--gm-line); background: #fff; color: var(--gm-ink); outline: none; transition: border-color .15s, box-shadow .15s; }
.gm-field input:focus, .gm-join input:focus { border-color: var(--gm-rose); box-shadow: 0 0 0 4px rgba(255, 94, 142, .18); }
.gm-join { display: flex; gap: .4rem; }
.gm-join input { width: 6.8rem; text-transform: uppercase; text-align: center; letter-spacing: .2em; font-weight: 800; }

/* ── Room "ticket" ────────────────────────────────── */
.gm-room { position: relative; background: var(--gm-glass); backdrop-filter: blur(10px); border: 2px solid #fff; border-radius: 26px; padding: 1.2rem 1.4rem; box-shadow: var(--gm-shadow); margin-bottom: 2rem; }
.gm-ticket::before, .gm-ticket::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: #fff8fb; transform: translateY(-50%); box-shadow: inset 0 2px 5px rgba(120, 80, 160, .12); }
.gm-ticket::before { left: -12px; } .gm-ticket::after { right: -12px; }
.gm-room-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; }
.gm-room-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.gm-room-actions[hidden], #gmStage[hidden], .gm-room [hidden] { display: none !important; }
.gm-code { font-weight: 700; color: var(--gm-mute); }
.gm-code strong { color: var(--gm-ink); letter-spacing: .22em; font-size: 1.3rem; background: #fff; border: 2px dashed #ffb1c8; border-radius: 12px; padding: .15rem .7rem; margin-left: .3rem; }
.gm-status { margin-top: 1rem; padding-top: .9rem; border-top: 2px dashed #f1dff0; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-size: .9rem; color: var(--gm-mute); }
.gm-dot { width: 10px; height: 10px; border-radius: 50%; background: #c4bdd3; display: inline-block; }
.gm-status.online .gm-dot, .gp-room.online .gm-dot { background: #22c55e; animation: gmPulse 2s infinite; }
@keyframes gmPulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } }
.gm-peers { display: flex; flex-wrap: wrap; gap: .45rem; margin-left: auto; }
.gm-peer { display: inline-flex; align-items: center; gap: .35rem; background: #fff; border: 2px solid var(--c, #e4e0f0); border-radius: 999px; padding: .15rem .8rem .15rem .3rem; font-weight: 700; color: var(--gm-ink); font-size: .8rem; }
.gm-peer i { font-style: normal; font-size: 1.05rem; line-height: 1; }
.gm-peer.me { background: color-mix(in srgb, var(--c, #ff5e8e) 16%, #fff); }

/* ── Game cards ───────────────────────────────────── */
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: clamp(1rem, 2vw, 1.8rem); }
.gm-card { --c1: #ff7aa8; --c2: #ffb36b; display: block; text-decoration: none; text-align: left; font-family: inherit; background: #fff; border: 2px solid #fff; border-radius: 28px; padding: 1.4rem 1.4rem 1.2rem; cursor: pointer; box-shadow: var(--gm-shadow); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s; position: relative; overflow: hidden; color: var(--gm-ink); }
.gm-card:nth-child(6n+2) { --c1: #6ab7ff; --c2: #9d8bff; }
.gm-card:nth-child(6n+3) { --c1: #2fd1a4; --c2: #6ad7e8; }
.gm-card:nth-child(6n+4) { --c1: #ffc14d; --c2: #ff8a5c; }
.gm-card:nth-child(6n+5) { --c1: #b57bff; --c2: #ff7fc6; }
.gm-card:nth-child(6n+6) { --c1: #ff6e6e; --c2: #ffa07a; }
.gm-card::after { content: ""; position: absolute; right: -50px; top: -50px; width: 150px; height: 150px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); opacity: .16; transition: transform .5s, opacity .3s; }
.gm-card:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 24px 50px rgba(120, 80, 160, .24); }
.gm-card:hover::after { transform: scale(1.6); opacity: .24; }
.gm-card-emoji { position: relative; width: 66px; height: 66px; border-radius: 22px; display: grid; place-items: center; font-size: 1.9rem; margin-bottom: 1.1rem; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 10px 22px color-mix(in srgb, var(--c1) 55%, transparent); transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.gm-card:hover .gm-card-emoji { transform: rotate(-9deg) scale(1.1); }
.gm-card h3 { position: relative; margin: 0 0 .35rem; font-size: 1.3rem; font-weight: 800; }
.gm-card p { position: relative; margin: 0 0 1rem; color: var(--gm-mute); font-size: .93rem; line-height: 1.5; }
.gm-card-tags { position: relative; display: flex; gap: .4rem; flex-wrap: wrap; }
.gm-tag { font-size: .7rem; font-weight: 800; padding: .22rem .65rem; border-radius: 999px; background: #f4eef8; color: var(--gm-mute); }
.gm-tag.live { background: #dcfce7; color: #15803d; }
.gm-tag.soon { background: #fef3c7; color: #92400e; }
.gm-card-go { position: relative; display: inline-flex; align-items: center; gap: .4rem; margin-top: 1.1rem; font-weight: 800; font-size: .88rem; color: var(--c1); }
.gm-card-go i { transition: transform .25s; }
.gm-card:hover .gm-card-go i { transform: translateX(6px); }
.gm-card.disabled { opacity: .6; cursor: default; filter: grayscale(.4); }
.gm-card.disabled:hover { transform: none; box-shadow: var(--gm-shadow); }
.gm-card.disabled .gm-card-go { display: none; }

/* ── Shared play bits ─────────────────────────────── */
.gm-banner { font-weight: 800; font-size: 1.05rem; text-align: center; padding: .55rem 1.4rem; border-radius: 999px; background: #fff; color: var(--gm-ink); box-shadow: 0 6px 18px rgba(120, 80, 160, .14); }
.gm-banner.mine { background: var(--gm-grad); color: #fff; animation: gmNudge 1.6s ease-in-out infinite; box-shadow: 0 8px 22px rgba(255, 110, 130, .4); }
@keyframes gmNudge { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.gm-banner .bi { margin-right: .25rem; }
.gm-scores { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.gm-score { --c: #ff5e8e; display: inline-flex; align-items: center; gap: .45rem; background: #fff; border: 2px solid var(--c); border-radius: 18px; padding: .35rem 1rem .35rem .6rem; font-weight: 700; font-size: .92rem; box-shadow: 0 4px 12px rgba(120, 80, 160, .1); }
.gm-score::before { content: "🐱"; font-size: 1.2rem; }
.gm-score:nth-child(2) { --c: #3b82f6; } .gm-score:nth-child(2)::before { content: "🐰"; }
.gm-score:nth-child(3) { --c: #10b981; } .gm-score:nth-child(3)::before { content: "🐻"; }
.gm-score:nth-child(4) { --c: #f59e0b; } .gm-score:nth-child(4)::before { content: "🐼"; }
.gm-score b { font-size: 1.15rem; margin-left: .2rem; color: var(--c); }

/* Memory */
.mem-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; width: min(100%, 420px); }
.mem-card { aspect-ratio: 1; perspective: 700px; border: 0; background: none; padding: 0; cursor: pointer; transition: transform .2s; }
.mem-card:hover:not(.flipped):not(.matched) { transform: translateY(-4px) rotate(-2deg); }
.mem-inner { position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.34, 1.3, .64, 1); transform-style: preserve-3d; }
.mem-card.flipped .mem-inner, .mem-card.matched .mem-inner { transform: rotateY(180deg); }
.mem-face { position: absolute; inset: 0; border-radius: 20px; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-size: clamp(1.7rem, 7vw, 2.5rem); }
.mem-front { background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .45), transparent 40%), linear-gradient(135deg, #ff6b9a, #ffa66b); color: rgba(255, 255, 255, .95); font-weight: 800; box-shadow: 0 8px 18px rgba(255, 110, 130, .35), inset 0 -4px 0 rgba(0, 0, 0, .08); }
.mem-back { background: #fff; transform: rotateY(180deg); border: 3px solid #f1e3f3; box-shadow: 0 6px 14px rgba(120, 80, 160, .14); }
.mem-card.matched .mem-back { border-color: #4ade80; background: linear-gradient(135deg, #f0fdf4, #dcfce7); animation: gmBounce .6s; }
@keyframes gmBounce { 50% { transform: rotateY(180deg) scale(1.14); } }

/* Tic tac toe */
.ttt-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; width: min(100%, 340px); padding: .8rem; background: rgba(255, 255, 255, .6); border-radius: 30px; box-shadow: var(--gm-shadow); }
.ttt-cell { aspect-ratio: 1; border: 0; border-radius: 22px; background: linear-gradient(145deg, #fff, #f6effb); box-shadow: 0 6px 0 #eadcf3, 0 10px 18px rgba(120, 80, 160, .12); font-family: inherit; font-size: 3rem; font-weight: 900; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.ttt-cell:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 9px 0 #eadcf3, 0 14px 22px rgba(120, 80, 160, .16); }
.ttt-cell:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #eadcf3; }
.ttt-cell.x { color: var(--gm-rose); text-shadow: 0 3px 10px rgba(255, 94, 142, .45); }
.ttt-cell.o { color: var(--gm-sky); text-shadow: 0 3px 10px rgba(74, 168, 255, .45); }
.ttt-cell.x, .ttt-cell.o { animation: gmPop .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes gmPop { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
.ttt-cell.win { background: linear-gradient(145deg, #fffbe0, #ffefa8); box-shadow: 0 6px 0 #f5d567, 0 0 0 4px #ffd84d, 0 0 26px rgba(255, 200, 40, .6); animation: gmNudge 1s ease-in-out infinite; }
.ttt-cell:disabled { cursor: default; }

/* Draw */
.dr-tools { display: flex; gap: .55rem; flex-wrap: wrap; justify-content: center; align-items: center; background: var(--gm-glass); backdrop-filter: blur(8px); border: 2px solid #fff; border-radius: 999px; padding: .5rem 1rem; box-shadow: var(--gm-shadow); }
.dr-swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #e4dcee, 0 3px 8px rgba(0, 0, 0, .15); cursor: pointer; padding: 0; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.dr-swatch:hover { transform: scale(1.18); }
.dr-swatch.active { box-shadow: 0 0 0 3px var(--gm-rose), 0 3px 8px rgba(0, 0, 0, .15); transform: scale(1.18); }
.dr-canvas { width: min(100%, 720px); aspect-ratio: 4/3; background: #fff; border-radius: 20px; border: 8px solid #fff; box-shadow: 0 18px 44px rgba(120, 80, 160, .22), 0 0 0 2px #f1e3f3; touch-action: none; cursor: crosshair; }
.dr-size { accent-color: var(--gm-rose); }

/* Truth or dare */
.td-card { position: relative; width: min(100%, 440px); min-height: 230px; border-radius: 32px; padding: 2.2rem 2rem; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: .9rem; background: linear-gradient(135deg, #fff, #faf5ff); border: 3px solid #fff; box-shadow: 0 22px 50px rgba(120, 80, 160, .2); animation: tdFlip .55s cubic-bezier(.34, 1.3, .64, 1); overflow: hidden; }
.td-card::before { content: "“"; position: absolute; left: 18px; top: -18px; font-family: 'Playfair Display', serif; font-size: 8rem; line-height: 1; color: rgba(139, 92, 246, .14); }
@keyframes tdFlip { from { transform: perspective(700px) rotateY(-90deg) scale(.9); opacity: 0; } }
.td-card.truth { background: linear-gradient(135deg, #e0f2ff, #ece4ff); }
.td-card.dare { background: linear-gradient(135deg, #ffe3ee, #fff1d6); }
.td-kind { position: relative; font-weight: 900; letter-spacing: .14em; font-size: .78rem; text-transform: uppercase; color: #fff; background: var(--gm-violet); padding: .25rem .9rem; border-radius: 999px; }
.td-card.dare .td-kind { background: var(--gm-rose); }
.td-text { position: relative; font-family: 'Playfair Display', serif; font-size: 1.5rem; line-height: 1.38; }
.td-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }

/* ── Toast, name prompt ───────────────────────────── */
.gm-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 40px); background: rgba(42, 33, 64, .92); color: #fff; padding: .75rem 1.3rem; border-radius: 999px; font-weight: 700; font-size: .9rem; opacity: 0; pointer-events: none; transition: all .4s cubic-bezier(.34, 1.56, .64, 1); z-index: 999; backdrop-filter: blur(8px); }
.gm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.gm-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem; background: rgba(60, 30, 80, .45); backdrop-filter: blur(8px); }
.gm-modal-card { background: #fff; border-radius: 30px; padding: 2rem; width: min(100%, 390px); text-align: center; display: flex; flex-direction: column; gap: .9rem; box-shadow: 0 30px 80px rgba(60, 30, 80, .35); animation: gmIn .45s cubic-bezier(.34, 1.4, .64, 1); }
.gm-modal-card h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin: 0; }
.gm-modal-card p { margin: 0; color: var(--gm-mute); font-size: .92rem; }
.gm-modal-card input { font: inherit; font-size: 1rem; padding: .85rem 1rem; border-radius: 14px; border: 2px solid var(--gm-line); text-align: center; }
.gm-modal-card input:focus { outline: none; border-color: var(--gm-rose); box-shadow: 0 0 0 4px rgba(255, 94, 142, .18); }
@keyframes gmIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }

/* ── Dedicated game page ──────────────────────────── */
body.gp-body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: 'Outfit', sans-serif; color: var(--gm-ink); background: var(--gp-bg, linear-gradient(160deg, #fdfafb, #f1ecf7)); background-attachment: fixed; }
.theme-memory { --gp-bg: radial-gradient(circle at 15% 10%, #ffd0e0, transparent 40%), radial-gradient(circle at 90% 85%, #ffe0c2, transparent 40%), #fff4f6; }
.theme-ttt    { --gp-bg: radial-gradient(circle at 12% 12%, #cfe0ff, transparent 40%), radial-gradient(circle at 88% 88%, #e8d4ff, transparent 40%), #f3f6ff; }
.theme-draw   { --gp-bg: radial-gradient(circle at 12% 88%, #c8f3e0, transparent 40%), radial-gradient(circle at 90% 12%, #c9e1ff, transparent 40%), #f1fbf7; }
.theme-tod    { --gp-bg: radial-gradient(circle at 85% 10%, #ffe0a8, transparent 40%), radial-gradient(circle at 10% 90%, #ffc9d6, transparent 40%), #fff8ee; }

.gp-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: clamp(.4rem, 1.2vw, .9rem); padding: clamp(.5rem, 1.4vh, .8rem) clamp(.6rem, 2.4vw, 1.4rem); background: rgba(255, 255, 255, .66); backdrop-filter: blur(16px); border-bottom: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 6px 24px rgba(120, 80, 160, .08); }
.gp-title { display: flex; align-items: center; gap: .6rem; position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; }
.gp-emoji { font-size: 1.5rem; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--gm-grad); box-shadow: 0 6px 14px rgba(255, 110, 130, .35); }
.gp-title h1 { margin: 0; font-family: 'Playfair Display', serif; font-size: 1.45rem; }
.gp-room { display: flex; align-items: center; gap: .6rem; }
.gp-status { font-size: .8rem; color: var(--gm-mute); }
.gp-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(.6rem, 2vh, 1.2rem); padding: clamp(1rem, 3vh, 2rem) clamp(.8rem, 3vw, 2rem) clamp(2rem, 6vh, 3.5rem); }
.gp-help { margin: 0; max-width: 520px; text-align: center; color: var(--gm-mute); font-size: .98rem; background: rgba(255, 255, 255, .6); padding: .4rem 1.1rem; border-radius: 999px; }
.gm-stage-body { display: flex; flex-direction: column; align-items: center; gap: 1rem; min-height: 360px; }
.gp-main .gm-stage-body { width: 100%; max-width: 960px; min-height: 0; gap: 1.4rem; animation: gmIn .5s cubic-bezier(.34, 1.3, .64, 1); }
.gp-main .gm-banner { font-size: 1.15rem; padding: .65rem 1.7rem; }
.gp-main .mem-board { width: min(100%, 64vh, 580px); gap: clamp(.5rem, 1.6vw, 1rem); }
.gp-main .ttt-board { width: min(100%, 54vh, 440px); gap: clamp(.5rem, 1.4vw, .9rem); }
.gp-main .ttt-cell { font-size: clamp(2.6rem, 9vw, 4rem); }
.gp-main .dr-canvas { width: min(100%, 86vh, 960px); }
.gp-main .td-card { width: min(100%, 520px); min-height: 290px; }
.gp-main .td-text { font-size: 1.75rem; }

.mem-back .bi-heart-fill { color: #d6455d; }
.mem-back .bi-flower1 { color: #e0699f; }
.mem-back .bi-gift-fill { color: #c0892b; }
.mem-back .bi-cup-hot-fill { color: #8a5a3c; }
.mem-back .bi-envelope-heart-fill { color: #c2415f; }
.mem-back .bi-moon-stars-fill { color: #5b6bb0; }
.mem-back .bi-balloon-heart-fill { color: #d1572e; }
.mem-back .bi-cake2-fill { color: #b8741a; }

/* ── Confetti on a win ────────────────────────────── */
.gm-confetti { position: fixed; inset: 0; z-index: 2500; pointer-events: none; overflow: hidden; }
.gm-confetti span { position: absolute; top: -40px; animation: gmFall linear forwards; }
@keyframes gmFall { to { transform: translateY(110vh) rotate(540deg); opacity: .9; } }

/* ── Live cursors (your partner, as a little mascot) ─ */
#gmCursors { position: fixed; inset: 0; z-index: 3000; pointer-events: none; overflow: hidden; }
.gmc { position: absolute; top: 0; left: 0; width: 26px; height: 26px; color: var(--c, #ff5e8e); --tilt: 0deg; transition: transform .09s linear; }
.gmc-arrow { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .28)); }
.gmc-face { position: absolute; left: 17px; top: 11px; font-size: 26px; line-height: 1; transform: rotate(var(--tilt)); transform-origin: 50% 90%; transition: transform .2s ease; }
.gmc-face b { display: block; font-weight: 400; animation: gmcBob 1.8s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
@keyframes gmcBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.gmc.clicked .gmc-face b { animation: gmcJump .5s ease-out; }
@keyframes gmcJump { 0% { transform: scale(1); } 35% { transform: translateY(-13px) scale(1.4) rotate(-8deg); } 70% { transform: translateY(0) scale(.9); } 100% { transform: scale(1); } }
.gmc.idle .gmc-face b { animation-duration: 3.4s; }
.gmc.idle .gmc-face::after { content: "💤"; position: absolute; right: -15px; top: -14px; font-size: 13px; animation: gmcZzz 1.7s ease-in-out infinite; }
@keyframes gmcZzz { 0% { opacity: 0; transform: translate(0, 5px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translate(5px, -9px); } }
.gmc-label { position: absolute; top: 40px; left: 12px; background: var(--c, #ff5e8e); color: #fff; padding: 3px 11px 4px; border-radius: 14px 14px 14px 4px; font-size: .75rem; font-weight: 800; white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); transition: transform .15s; transform-origin: left top; }
.gmc.clicked .gmc-label { transform: scale(1.14) rotate(-3deg); }
.gmc.clicked .gmc-label::after { content: " ✨"; }
.gmc-ping { position: absolute; left: 4px; top: 3px; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 3px solid var(--c, #ff5e8e); animation: gmcPing .6s ease-out forwards; }
@keyframes gmcPing { to { transform: scale(3.2); opacity: 0; } }
.gmc-pop { position: absolute; left: 4px; top: 4px; font-size: 16px; line-height: 1; pointer-events: none; animation: gmcPop .85s ease-out forwards; }
@keyframes gmcPop { 0% { transform: translate(0, 0) scale(.3); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(25deg); opacity: 0; } }
.gmc-spark { position: absolute; font-size: 13px; line-height: 1; pointer-events: none; text-shadow: 0 0 6px currentColor; animation: gmcSpark .8s ease-out forwards; }
@keyframes gmcSpark { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: translateY(14px) scale(1.2) rotate(40deg); } }

/* ── Small screens, calm motion ───────────────────── */
@media (max-width: 720px) {
    .gm-main { padding-top: 6rem; }
    .gp-hide-sm { display: none; }
    .gp-title { position: static; transform: none; flex: 1; justify-content: center; }
    .gp-title h1 { font-size: 1.1rem; }
    .gp-emoji { width: 34px; height: 34px; font-size: 1.2rem; border-radius: 11px; }
    .gp-top { padding: .6rem .7rem; }
    .gp-main { padding-top: 1rem; }
    .gm-ticket::before, .gm-ticket::after { display: none; }
    .gm-peers { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Name + room first ─────────────────────────────── */
.gm-card.locked { filter: saturate(.55); }
.gm-card.locked .gm-card-emoji { background: linear-gradient(135deg, #c9c2d6, #b4abc6); box-shadow: 0 8px 18px rgba(120, 100, 160, .25); }
.gm-card.locked .gm-card-go { color: var(--gm-mute); }
.gm-card.locked:hover { transform: translateY(-4px) rotate(0); }
.gm-card.locked:hover .gm-card-emoji { transform: rotate(-9deg) scale(1.05); }
.gm-attn { animation: gmAttn .9s ease; }
@keyframes gmAttn { 0%, 100% { box-shadow: var(--gm-shadow); } 25%, 75% { box-shadow: 0 0 0 5px rgba(255, 94, 142, .45), var(--gm-shadow); transform: translateX(-5px); } 50% { transform: translateX(5px); } }
.gm-shake { animation: gmShake .45s ease; border-color: var(--gm-rose) !important; }
@keyframes gmShake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.gm-gate { width: min(100%, 400px); display: flex; flex-direction: column; gap: .9rem; text-align: center; background: var(--gm-glass); backdrop-filter: blur(10px); border: 2px solid #fff; border-radius: 30px; padding: 2rem 1.8rem; box-shadow: var(--gm-shadow); }
.gm-gate-art { font-size: 3rem; animation: gmWiggle 2.4s ease-in-out infinite; }
.gm-gate h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin: 0; }
.gm-gate p { margin: 0; color: var(--gm-mute); font-size: .95rem; line-height: 1.5; }
.gm-gate .gm-field { text-align: left; }
.gm-gate .gm-btn { justify-content: center; }
.gm-gate-or { display: flex; align-items: center; gap: .7rem; color: var(--gm-mute); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.gm-gate-or::before, .gm-gate-or::after { content: ""; flex: 1; border-top: 2px dashed #f1dff0; }
.gm-gate .gm-join { justify-content: center; }

/* Game page header: three columns, so the title never sits on top of the room info */
.gp-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.gp-title { position: static; transform: none; justify-self: center; }
.gp-room { justify-self: end; min-width: 0; flex-wrap: wrap; justify-content: flex-end; row-gap: .3rem; }
.gp-status { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1500px) { .gp-status { display: none; } }
@media (max-width: 720px) {
    .gp-top { grid-template-columns: auto 1fr auto; }
    .gp-room .gm-peers, .gp-room .gm-code { display: none; }
}
.gm-modal-card .gm-btn { justify-content: center; }
.gm-empty { grid-column: 1 / -1; text-align: center; color: var(--gm-mute); background: var(--gm-glass); border-radius: 22px; padding: 2.2rem 1rem; }

/* ═══ How to play: solo or with friends ═══════════════ */
.gm-modes { align-items: stretch; }
.gm-mode { display: inline-flex; align-items: center; gap: .75rem; text-align: left; font-family: inherit; cursor: pointer; background: #fff; border: 2px solid #fff; border-radius: 20px; padding: .65rem 1.2rem .65rem .7rem; color: var(--gm-ink); box-shadow: 0 4px 14px rgba(120, 80, 160, .12); transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s; }
.gm-mode:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 26px rgba(120, 80, 160, .22); }
.gm-mode:active { transform: scale(.97); }
.gm-mode > i { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; font-size: 1.25rem; background: #f4eef8; color: var(--gm-violet); flex: none; font-style: normal; }
.gm-mode b { display: block; font-size: 1rem; }
.gm-mode small { display: block; color: var(--gm-mute); font-weight: 500; font-size: .8rem; }
.gm-mode.primary { background: var(--gm-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(255, 110, 130, .38); }
.gm-mode.primary > i { background: rgba(255, 255, 255, .25); color: #fff; }
.gm-mode.primary small { color: rgba(255, 255, 255, .88); }
.gm-gate-modes { display: grid; gap: .6rem; }
.gm-gate .gm-mode { justify-content: flex-start; }

/* ═══ Categories on one page ══════════════════════════ */
.gm-tabs { display: inline-flex; flex-wrap: wrap; gap: .3rem; padding: .3rem; background: var(--gm-glass); backdrop-filter: blur(8px); border: 2px solid #fff; border-radius: 999px; box-shadow: var(--gm-shadow); margin-bottom: 1.8rem; }
.gm-tabs button { border: 0; background: transparent; font: inherit; font-weight: 700; padding: .5rem 1.15rem; border-radius: 999px; color: var(--gm-mute); cursor: pointer; display: inline-flex; gap: .45rem; align-items: center; transition: background .2s, color .2s; }
.gm-tabs button:hover { color: var(--gm-ink); }
.gm-tabs button.on { background: var(--gm-grad); color: #fff; box-shadow: 0 6px 16px rgba(255, 110, 130, .35); }
.gm-cat { margin-bottom: 2.8rem; }
.gm-cat[hidden] { display: none; }
.gm-cat-head { margin-bottom: 1.2rem; }
.gm-cat-head h2 { margin: 0 0 .3rem; display: flex; align-items: center; gap: .65rem; font-family: 'Playfair Display', serif; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.gm-cat-head h2 em { font-family: 'Outfit', sans-serif; font-style: normal; font-size: .78rem; font-weight: 800; background: #fff; color: var(--gm-mute); border-radius: 999px; padding: .15rem .65rem; box-shadow: 0 2px 8px rgba(120, 80, 160, .12); }
.gm-cat-head p { margin: 0; color: var(--gm-mute); max-width: 640px; }
.gm-cat-ico { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; font-size: 1.1rem; color: #fff; background: var(--gm-grad); box-shadow: 0 6px 14px rgba(255, 110, 130, .35); }
.gm-cat-ico.c3d { background: linear-gradient(135deg, #5a8bff, #8b5cf6); box-shadow: 0 6px 14px rgba(110, 100, 255, .35); }

/* ═══ Cards with a preview of the game ════════════════ */
.gm-card { padding: 0; }
.gm-card::after { display: none; }
.gm-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.gm-preview { position: relative; height: 164px; overflow: hidden; border-radius: 26px 26px 0 0; background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .35), transparent 45%), linear-gradient(135deg, var(--c1), var(--c2)); }
.gm-card-body { padding: 1.1rem 1.3rem 1.25rem; }
.gm-card-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .55rem; }
.gm-card-head h3 { margin: 0; }
.gm-card-emoji { width: 40px; height: 40px; border-radius: 13px; font-size: 1.15rem; margin: 0; flex: none; }
.gm-card:hover .gm-card-emoji { transform: rotate(-9deg) scale(1.08); }
.gm-card-go.lock { color: var(--gm-mute); }
.gm-lock { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .4rem; background: rgba(48, 30, 70, .5); backdrop-filter: blur(3px); color: #fff; font-weight: 700; font-size: .85rem; text-align: center; }
.gm-lock i { font-size: 1.7rem; font-style: normal; }
.gm-badge3d { position: absolute; left: .8rem; top: .8rem; z-index: 2; background: rgba(0, 0, 0, .55); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .06em; padding: .18rem .65rem; border-radius: 999px; backdrop-filter: blur(4px); }
.gm-card.locked .gm-preview { filter: saturate(.7); }
.gm-card.is3d { --c1: #5a8bff; --c2: #8b5cf6; }

.pv { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pv-shot { background-size: cover; background-position: center; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.gm-card:hover .pv-shot { transform: scale(1.08); }
.pv-icon { font-size: 3.4rem; color: rgba(255, 255, 255, .9); }

/* memory: cards flip over in turns */
.pv-memory { display: grid; grid-template-columns: repeat(4, 48px); gap: 10px; justify-content: center; align-content: center; }
.mc { display: block; width: 48px; height: 60px; perspective: 320px; font-style: normal; }
.mc .in { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.mc b { position: absolute; inset: 0; border-radius: 11px; display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-weight: 800; }
.mc .fr { background: rgba(255, 255, 255, .3); border: 2px solid rgba(255, 255, 255, .75); color: #fff; font-size: 1.25rem; }
.mc .bk { background: #fff; transform: rotateY(180deg); color: #e0486e; font-size: 1.35rem; box-shadow: 0 6px 12px rgba(0, 0, 0, .12); }
.mc.a .in { animation: pvFlip 4.4s ease-in-out infinite; }
.mc.b .in { animation: pvFlip 4.4s ease-in-out 1.6s infinite; }
@keyframes pvFlip { 0%, 14% { transform: rotateY(0); } 26%, 62% { transform: rotateY(180deg); } 74%, 100% { transform: rotateY(0); } }

/* tic tac toe: marks pop onto the board */
.pv-ttt { display: grid; grid-template-columns: repeat(3, 44px); gap: 7px; justify-content: center; align-content: center; }
.pv-ttt i { height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .92); display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .1); font-style: normal; }
.pv-ttt b { font-size: 1.5rem; font-weight: 900; animation: pvPop 6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .42s); }
.pv-ttt b.x { color: #ff4d86; } .pv-ttt b.o { color: #3b9bff; }
@keyframes pvPop { 0% { opacity: 0; transform: scale(.2) rotate(-25deg); } 9%, 78% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: scale(.6); } }

/* draw: lines draw themselves and a friend's cursor wanders */
.pv-draw { flex-direction: column; gap: 8px; }
.pv-draw .paper { width: 74%; aspect-ratio: 16 / 9; background: #fff; border-radius: 14px; padding: 6px; box-shadow: 0 8px 18px rgba(0, 0, 0, .14); }
.pv-draw svg { width: 100%; height: 100%; display: block; }
.pv-draw path { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 300; stroke-dashoffset: 300; animation: pvDraw 5.2s ease-in-out infinite; }
.pv-draw .s1 { stroke: #ff5e8e; } .pv-draw .s2 { stroke: #8b5cf6; animation-delay: .9s; } .pv-draw .s3 { stroke: #38bdf8; animation-delay: 1.8s; }
@keyframes pvDraw { 0% { stroke-dashoffset: 300; } 35%, 82% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 300; } }
.pv-draw .dots { display: flex; gap: 7px; }
.pv-draw .dots u { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .2); }
.pv-draw .who { position: absolute; font-size: 1.5rem; animation: pvWho 5.2s ease-in-out infinite; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); }
@keyframes pvWho { 0%, 100% { left: 24%; top: 26%; } 30% { left: 52%; top: 56%; } 62% { left: 66%; top: 24%; } 85% { left: 40%; top: 40%; } }

/* truth or dare: the card flips between the two */
.pv-tod .card { position: absolute; width: 64%; padding: 12px 14px 14px; border-radius: 18px; background: #fff; text-align: center; box-shadow: 0 10px 22px rgba(0, 0, 0, .16); animation: pvCard 6s ease-in-out infinite; }
.pv-tod .dare { animation-delay: -3s; }
.pv-tod em { display: inline-block; font-style: normal; font-size: .62rem; font-weight: 900; letter-spacing: .14em; color: #fff; padding: .12rem .65rem; border-radius: 999px; margin-bottom: .35rem; }
.pv-tod .truth em { background: #8b5cf6; } .pv-tod .dare em { background: #ff5e8e; }
.pv-tod p { margin: 0; font-family: 'Playfair Display', serif; font-size: .82rem; line-height: 1.3; color: #2a2140; }
@keyframes pvCard { 0% { opacity: 0; transform: perspective(500px) rotateY(-75deg) scale(.9); } 10%, 44% { opacity: 1; transform: none; } 54%, 100% { opacity: 0; transform: perspective(500px) rotateY(75deg) scale(.9); } }

/* a little night city for the game without a screenshot */
.pv-city { background: linear-gradient(180deg, #1d2b57 0%, #6a4b8c 62%, #f0a08a 100%); overflow: hidden; }
.pv-city .moon { position: absolute; right: 12%; top: 14%; width: 34px; height: 34px; border-radius: 50%; background: #ffeab8; box-shadow: 0 0 34px 8px rgba(255, 234, 184, .55); }
.pv-city i { position: absolute; bottom: 0; left: calc(var(--d) * 14.4%); width: 13%; height: var(--h); background-color: #121830; background-image: radial-gradient(circle, #ffd98a 1.6px, transparent 2.2px); background-size: 10px 12px; border-radius: 4px 4px 0 0; animation: pvTwinkle 3.4s ease-in-out infinite; animation-delay: calc(var(--d) * .4s); }
@keyframes pvTwinkle { 50% { filter: brightness(1.35); } }

.gm-hero { margin-bottom: 1.6rem; }
@media (max-width: 720px) {
    .gm-modes { width: 100%; }
    .gm-mode { flex: 1 1 100%; }
    .gm-tabs { display: flex; width: 100%; justify-content: center; }
    .gm-tabs button { padding: .5rem .8rem; font-size: .85rem; }
}

/* ═══ Bomb It ═════════════════════════════════════════ */
.theme-bomb { --gp-bg: radial-gradient(circle at 12% 10%, #ffd9a8, transparent 40%), radial-gradient(circle at 90% 88%, #ffc4d8, transparent 40%), #fff3ea; }
.bm-wrap { width: min(100%, 720px, calc((100vh - 340px) * 15 / 13)); min-width: 300px; }
.bm-canvas { display: block; width: 100%; height: auto; aspect-ratio: 15 / 13; background: #fff5f8; border-radius: 22px; border: 8px solid #fff; box-shadow: 0 18px 44px rgba(150, 90, 60, .25), 0 0 0 2px #ffd7c2; outline: none; touch-action: none; }
.bm-canvas:focus-visible { box-shadow: 0 18px 44px rgba(150, 90, 60, .25), 0 0 0 4px rgba(255, 94, 142, .45); }
.bm-keys { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.bm-pill { display: inline-flex; align-items: center; gap: .3rem; background: #fff; border-radius: 999px; padding: .4rem 1rem; font-weight: 600; font-size: .88rem; box-shadow: 0 4px 12px rgba(150, 90, 60, .12); }
.bm-pill.p1 { box-shadow: 0 0 0 2px #ff5e8e, 0 4px 12px rgba(150, 90, 60, .12); }
.bm-pill.p2 { box-shadow: 0 0 0 2px #3b82f6, 0 4px 12px rgba(150, 90, 60, .12); }
.bm-pill kbd, .gm-main kbd { font-family: inherit; font-weight: 800; font-size: .76rem; background: #f6eefb; border: 1px solid #e3d3ee; border-bottom-width: 3px; border-radius: 7px; padding: .05rem .42rem; margin: 0 .08rem; }
.bm-face { font-size: 1.15rem; }
.bm-bar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: center; }
.bm-bar [hidden] { display: none !important; }
.bm-seg { display: inline-flex; padding: .25rem; gap: .2rem; background: rgba(255, 255, 255, .75); border: 2px solid #fff; border-radius: 999px; box-shadow: 0 4px 12px rgba(150, 90, 60, .1); }
.bm-seg button { border: 0; background: transparent; font: inherit; font-weight: 700; font-size: .85rem; color: var(--gm-mute); padding: .45rem 1rem; border-radius: 999px; cursor: pointer; }
.bm-seg button.on { background: var(--gm-grad); color: #fff; box-shadow: 0 5px 14px rgba(255, 110, 130, .35); }
.bm-legend { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; color: var(--gm-mute); font-size: .85rem; font-weight: 600; }

/* on-screen controls for touch screens */
.bm-pad { display: none; width: 100%; max-width: 420px; justify-content: space-between; align-items: center; padding: 0 .4rem; }
@media (pointer: coarse) { .bm-pad { display: flex; } .bm-keys { display: none; } }
.bm-dpad { display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(3, 58px); gap: 4px; }
.bm-dpad button, .bm-drop { border: 0; border-radius: 20px; background: #fff; color: var(--gm-ink); box-shadow: 0 5px 0 #f0dbe5, 0 8px 16px rgba(150, 90, 60, .16); font-size: 1.4rem; display: grid; place-items: center; touch-action: none; -webkit-user-select: none; user-select: none; }
.bm-dpad button:active, .bm-drop:active { transform: translateY(4px); box-shadow: 0 1px 0 #f0dbe5; }
.bm-dpad .u { grid-column: 2; grid-row: 1; } .bm-dpad .l { grid-column: 1; grid-row: 2; } .bm-dpad .r { grid-column: 3; grid-row: 2; } .bm-dpad .d { grid-column: 2; grid-row: 3; }
.bm-drop { width: 96px; height: 96px; border-radius: 50%; font-size: 2.4rem; background: var(--gm-grad); }

/* the card preview on the hub */
.pv-bomb .bgrid { display: grid; grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(5, 1fr); gap: 2px; width: min(90%, 270px); aspect-ratio: 9 / 5; }
.pv-bomb i { position: relative; border-radius: 7px; background: rgba(255, 255, 255, .5); display: grid; place-items: center; font-style: normal; font-size: clamp(11px, 3.4vw, 17px); }
.pv-bomb i.pi { background: #6b5b95; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .25); }
.pv-bomb i.cr { background: #f6a35c; box-shadow: inset 0 0 0 3px #e08a3a; }
.pv-bomb i.cr.br { animation: pvCrate 4s ease-in-out infinite; }
.pv-bomb i.fl::after { content: ""; position: absolute; inset: 0; border-radius: 7px; background: linear-gradient(135deg, #ffe066, #ff7a3d); box-shadow: 0 0 12px #ffd84d; opacity: 0; animation: pvFlame 4s ease-in-out infinite; }
.pv-bomb i.bm span { display: block; animation: pvFuse 4s ease-in-out infinite; }
.pv-bomb i.pl span { display: block; animation: pvWobble 1.6s ease-in-out infinite; }
@keyframes pvCrate { 0%, 62% { opacity: 1; transform: none; } 70%, 90% { opacity: 0; transform: scale(.4); } 100% { opacity: 1; transform: none; } }
@keyframes pvFlame { 0%, 62% { opacity: 0; } 66%, 80% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes pvFuse { 0%, 40% { transform: scale(1); } 50% { transform: scale(1.18); } 56% { transform: scale(.95); } 62% { transform: scale(1.3); } 64%, 100% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes pvWobble { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-3px) rotate(6deg); } }

/* the header's back button keeps its own size */
.gp-top #gpBack { justify-self: start; }
/* five "play together" games fit on one row on a wide screen */
#gmGridParty { grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); }

/* ═══ Rock Paper Scissors ═════════════════════════════ */
.theme-rps { --gp-bg: radial-gradient(circle at 15% 12%, #ffd2e4, transparent 40%), radial-gradient(circle at 88% 85%, #cfe0ff, transparent 40%), #fff6fa; }
.rps-arena { display: flex; align-items: center; justify-content: center; gap: clamp(.6rem, 3vw, 2rem); width: 100%; }
.rps-hand { flex: 1 1 0; max-width: 260px; min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 1.2rem .8rem; background: var(--gm-glass); backdrop-filter: blur(8px); border: 3px solid #fff; border-radius: 34px; box-shadow: var(--gm-shadow); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s, background .3s; }
.rps-who { font-weight: 800; font-size: 1.05rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rps-emoji { font-size: clamp(4rem, 14vw, 6.4rem); line-height: 1; filter: drop-shadow(0 8px 10px rgba(120, 60, 90, .25)); animation: rpsPop .45s cubic-bezier(.34, 1.56, .64, 1); }
.rps-state { color: var(--gm-mute); font-weight: 700; font-size: .9rem; min-height: 1.3em; }
.rps-hand.ready { box-shadow: 0 0 0 4px rgba(34, 197, 94, .35), var(--gm-shadow); }
.rps-hand.ready .rps-state { color: #15803d; }
.rps-hand.win { background: linear-gradient(180deg, #fffbe0, #fff0b8); box-shadow: 0 0 0 4px #ffd84d, 0 18px 40px rgba(255, 190, 40, .45); transform: scale(1.07); }
.rps-hand.lose { opacity: .72; transform: scale(.94); filter: grayscale(.35); }
.rps-hand.shake .rps-emoji { animation: rpsShake .26s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes rpsShake { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-22px) rotate(8deg); } }
@keyframes rpsPop { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
.rps-vs { font-weight: 900; font-size: clamp(1.1rem, 3vw, 1.6rem); letter-spacing: .1em; color: #fff; background: var(--gm-grad); border-radius: 50%; width: 3.2rem; height: 3.2rem; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(255, 110, 130, .4); flex: none; }
.rps-choices { display: flex; gap: clamp(.6rem, 2vw, 1.2rem); justify-content: center; flex-wrap: wrap; }
.rps-btn { position: relative; width: clamp(96px, 26vw, 140px); aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; font: inherit; color: var(--gm-ink); background: #fff; border: 3px solid #fff; border-radius: 30px; cursor: pointer; box-shadow: 0 6px 0 #f0dbe5, 0 14px 26px rgba(150, 90, 120, .18); transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s, border-color .2s; }
.rps-btn span { font-size: clamp(2.2rem, 8vw, 3.4rem); line-height: 1; }
.rps-btn b { font-size: .95rem; }
.rps-btn kbd { position: absolute; top: 8px; right: 10px; font-family: inherit; font-weight: 800; font-size: .7rem; color: var(--gm-mute); background: #f6eefb; border-radius: 6px; padding: 0 .4rem; }
.rps-btn:hover:not(:disabled) { transform: translateY(-6px) rotate(-2deg); border-color: #ffb1c8; }
.rps-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #f0dbe5; }
.rps-btn:disabled { opacity: .5; cursor: not-allowed; }
.rps-btn.on { border-color: var(--gm-rose); background: linear-gradient(#fff, #fff1f6); opacity: 1; box-shadow: 0 0 0 4px rgba(255, 94, 142, .22), 0 14px 26px rgba(255, 94, 142, .3); }
.rps-btn.on:disabled { opacity: 1; }
@media (max-width: 560px) { .rps-arena { flex-direction: column; } .rps-hand { max-width: 320px; min-height: 190px; width: 100%; } .rps-vs { width: 2.6rem; height: 2.6rem; } }

/* the card preview on the hub */
.pv-rps { gap: 16px; }
.pv-rps .hand { position: relative; width: 74px; height: 74px; border-radius: 26px; background: #fff; box-shadow: 0 10px 22px rgba(0, 0, 0, .16); }
.pv-rps .hand b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.5rem; opacity: 0; animation: pvHand 4.5s ease-in-out infinite; }
.pv-rps .hand b:nth-child(2) { animation-delay: 1.5s; } .pv-rps .hand b:nth-child(3) { animation-delay: 3s; }
.pv-rps .hand.r b { animation-name: pvHandR; }
@keyframes pvHand { 0% { opacity: 0; transform: translateY(8px) scale(.6); } 6%, 30% { opacity: 1; transform: none; } 36%, 100% { opacity: 0; transform: translateY(-8px) scale(.7); } }
@keyframes pvHandR { 0% { opacity: 0; transform: translateY(8px) scale(.6) scaleX(-1); } 6%, 30% { opacity: 1; transform: scaleX(-1); } 36%, 100% { opacity: 0; transform: translateY(-8px) scale(.7) scaleX(-1); } }
.pv-rps .vs { font-weight: 900; color: #fff; font-size: .95rem; letter-spacing: .08em; text-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
