/* =========================================================
   PacksRipRoulette — soft black / gray / sky-blue game theme
   ========================================================= */

:root {
    --cab-bg: #05080c;
    --cab-panel: rgba(12, 16, 22, 0.94);
    --cab-panel-edge: rgba(110, 182, 224, 0.28);
    --cab-panel-edge-hot: rgba(158, 212, 240, 0.45);
    --cab-cyan: #6eb6e0;       /* soft sky blue */
    --cab-magenta: #5aa8d0;    /* deeper sky */
    --cab-lime: #6eb6e0;       /* alias → soft blue */
    --cab-lime-dim: #3d7a9e;
    --cab-gold: #a8d0e8;       /* ice highlight for scores */
    --cab-text: #e6ebf0;
    --cab-muted: #8a96a4;
    --cab-steel: #a8b4c0;
    --cab-inset: #080c12;
    --cab-gray: #1a1e26;
    --cab-gray-mid: #2a323c;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    height: 100%;
}

html, body {
    font-family: "Rajdhani", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-weight: 600;
    background: var(--cab-bg);
    color: var(--cab-text);
    letter-spacing: 0.01em;
    max-width: 100%;
    overflow-x: hidden;
    /* iOS Safari address bar: prefer dynamic viewport when supported */
    min-height: 100%;
    min-height: 100dvh;
}

body {
    margin: 0;
    padding: 0;
    /* Avoid horizontal rubber-band revealing white edges on Safari */
    overscroll-behavior-x: none;
    -webkit-tap-highlight-color: rgba(110, 182, 224, 0.15);
}

/* Prevent iOS Safari auto-zoom on focus (requires ≥16px) */
input.form-control,
select.form-select,
textarea.form-control,
.form-control,
.form-select {
    font-size: 16px;
}

button,
.btn,
.energy-pixel-btn,
.card-pick,
.set-card,
.player-open-btn,
.top-value-row,
.top-value-toggle {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

h1, h2, .section-title, .navbar-brand {
    font-family: "Orbitron", "Segoe UI", system-ui, sans-serif;
    letter-spacing: 0.04em;
}

a, .btn-link {
    color: var(--cab-cyan);
    text-shadow: 0 0 8px rgba(110, 182, 224, 0.25);
}

.btn {
    font-family: "Orbitron", "Segoe UI", sans-serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 0.65rem !important;
    transition: transform 0.08s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn:active {
    transform: translateY(1px) scale(0.98);
}

.btn-primary {
    color: #061018 !important;
    background: linear-gradient(180deg, #9ad4f0 0%, #6eb6e0 42%, #4a8fb8 100%) !important;
    border: 2px solid #c5e8f8 !important;
    box-shadow:
        0 0 0 1px #142838,
        0 3px 0 #2a5570,
        0 0 14px rgba(110, 182, 224, 0.28);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    filter: brightness(1.06);
    box-shadow:
        0 0 0 1px #142838,
        0 3px 0 #2a5570,
        0 0 22px rgba(110, 182, 224, 0.4);
}

.btn-outline-primary {
    color: var(--cab-cyan) !important;
    border: 2px solid rgba(110, 182, 224, 0.45) !important;
    background: rgba(12, 28, 40, 0.55) !important;
    box-shadow: 0 0 10px rgba(110, 182, 224, 0.1);
}

.btn-outline-primary:hover {
    background: rgba(110, 182, 224, 0.12) !important;
    color: #fff !important;
}

.btn-outline-secondary {
    color: #b8c4d0 !important;
    border: 2px solid rgba(90, 110, 130, 0.55) !important;
    background: rgba(12, 16, 22, 0.65) !important;
}

.btn-warning {
    color: #061018 !important;
    font-weight: 800;
    background: linear-gradient(180deg, #a8d8f0 0%, #6eb6e0 50%, #4a90b8 100%) !important;
    border: 2px solid #c8e8f5 !important;
    box-shadow:
        0 0 0 1px #2a4a60,
        0 3px 0 #355a78,
        0 0 14px rgba(110, 182, 224, 0.28);
}

.btn-outline-warning {
    color: var(--cab-gold) !important;
    border-color: rgba(142, 200, 232, 0.55) !important;
}

.btn-outline-danger {
    color: #ff8a9a !important;
    border-color: rgba(255, 80, 100, 0.5) !important;
}

.btn-success {
    background: linear-gradient(180deg, #9ad4f0 0%, #5aa8d0 50%, #3a7aa0 100%) !important;
    border: 2px solid #b8e4f5 !important;
    color: #061018 !important;
    font-weight: 800;
    box-shadow: 0 3px 0 #2a5570, 0 0 14px rgba(110, 182, 224, 0.28);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .form-select:focus {
    box-shadow: 0 0 0 0.18rem rgba(110, 182, 224, 0.35) !important;
}

.content {
    padding-top: 1.1rem;
    padding-bottom: 1.5rem;
    max-width: 720px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

h1 {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: #f2f5f0;
    text-shadow:
        0 0 14px rgba(110, 182, 224, 0.28),
        0 1px 0 rgba(0, 0, 0, 0.6);
}

h2, .section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.25rem 0 0.75rem;
    color: var(--cab-lime);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(110, 182, 224, 0.22);
}

.lead, .text-muted {
    color: var(--cab-muted) !important;
    font-weight: 500;
}

/* Arcade panels / cards — charcoal + lime edge */
.form-card, .panel, .empty-card, .room-card {
    background: var(--cab-panel);
    border: 1px solid var(--cab-panel-edge);
    border-radius: 0.85rem;
    padding: 1rem 1.1rem;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.65),
        0 10px 28px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 0 20px rgba(110, 182, 224, 0.04);
    backdrop-filter: blur(6px);
}

.panel {
    position: relative;
}

.panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cab-lime), transparent);
    opacity: 0.65;
    border-radius: 2px;
}

.room-card:hover {
    border-color: var(--cab-lime);
    box-shadow:
        0 0 0 1px rgba(110, 182, 224, 0.25),
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(110, 182, 224, 0.15);
}

.badge-status {
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #141a22, #1a2430);
    border: 1px solid rgba(110, 182, 224, 0.4);
    color: #9ad4f0;
    box-shadow: 0 0 10px rgba(110, 182, 224, 0.12);
}

.code, .code-input {
    color: var(--cab-lime);
    background: rgba(10, 14, 8, 0.85);
    border: 1px solid rgba(110, 182, 224, 0.28);
    text-shadow: 0 0 8px rgba(110, 182, 224, 0.35);
}

.form-control, .form-select {
    background: #0a0e12 !important;
    border: 1px solid rgba(100, 110, 95, 0.55) !important;
    color: var(--cab-text) !important;
    border-radius: 0.55rem !important;
    font-family: "Rajdhani", sans-serif;
    font-weight: 600;
}

.form-control:focus, .form-select:focus {
    border-color: var(--cab-lime) !important;
    background: #0e120c !important;
    box-shadow: 0 0 0 0.15rem rgba(110, 182, 224, 0.2) !important;
}

.form-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b4bcb0;
}

.hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.hero .lead {
    font-size: 1.1rem;
    color: #a8b0a4 !important;
}

.action-row .btn {
    min-width: 10rem;
}

/* Wider main column when room has a right-side chase panel */
.content:has(.room-layout.has-aside) {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================================
   MATCH / GAME MODE — room feels like you entered a game
   (Lobby · Guessing · RIP Time · Pull Log)
   ========================================================= */

/* Page chrome shifts when a live match shell is on screen */
.page:has(.room-shell.game-mode) {
    background:
        radial-gradient(ellipse 100% 60% at 50% -5%, #141a22 0%, transparent 55%),
        radial-gradient(ellipse 70% 40% at 100% 80%, rgba(80, 100, 60, 0.12), transparent 50%),
        linear-gradient(180deg, #060806 0%, #0a0e12 45%, #040504 100%);
}

.page:has(.room-shell.game-mode) .arcade-marquee {
    display: none;
}

.page:has(.room-shell.game-mode) .arcade-controls-bar {
    background: linear-gradient(180deg, #0c1014 0%, #080c10 100%);
    border-top-color: rgba(110, 182, 224, 0.35);
}

.page:has(.room-shell.game-mode) .arcade-controls-bar .cab-label {
    color: #7ec8d8;
    letter-spacing: 0.14em;
}

.page:has(.room-shell.game-mode) .arcade-controls-bar .cab-label::after {
    content: " · MATCH LIVE";
    color: #6eb6e0;
}

.page:has(.room-shell.game-mode) .sidebar.arcade-side {
    border-bottom-color: rgba(110, 182, 224, 0.2);
    box-shadow: inset 0 -1px 0 rgba(110, 182, 224, 0.08);
    opacity: 0.92;
}

.page:has(.room-shell.game-mode) .scanlines {
    opacity: 0.35;
}

.content:has(.room-shell.game-mode) {
    max-width: 960px;
    padding-top: 0.55rem;
    padding-bottom: 2rem;
}

.content:has(.room-shell.game-mode.gm-scored),
.content:has(.room-layout.has-aside) {
    max-width: 1120px;
}

/* Room shell as game arena */
.room-shell.game-mode {
    position: relative;
    isolation: isolate;
    margin: 0 -0.35rem;
    padding: 0.65rem 0.55rem 1.25rem;
    border-radius: 1.15rem;
    border: 1px solid rgba(110, 182, 224, 0.18);
    background: rgba(6, 4, 16, 0.55);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 20px 50px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    animation: game-mode-enter 0.45s cubic-bezier(0.18, 1.1, 0.4, 1) both;
}

@keyframes game-mode-enter {
    from { opacity: 0.6; transform: translateY(8px) scale(0.985); filter: brightness(0.85); }
    to { opacity: 1; transform: none; filter: brightness(1); }
}

/* —— Room enter / leave transitions (desktop + mobile) —— */
/* Class is set from Blazor state so desktop re-renders don't wipe the animation. */
.room-shell.room-anim-enter {
    animation: room-shell-enter 0.85s cubic-bezier(0.16, 1.05, 0.35, 1) both !important;
    will-change: transform, opacity, filter;
}

.room-shell.room-anim-exit {
    animation: room-shell-exit 0.55s cubic-bezier(0.55, 0.05, 0.9, 0.4) both !important;
    pointer-events: none;
    will-change: transform, opacity, filter;
}

@keyframes room-shell-enter {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
        filter: blur(8px) brightness(1.35) saturate(1.2);
    }
    45% {
        opacity: 1;
        filter: blur(0) brightness(1.12);
    }
    100% {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@keyframes room-shell-exit {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: none;
    }
    100% {
        opacity: 0;
        transform: translateY(22px) scale(0.92);
        filter: blur(5px) brightness(0.65);
    }
}

/* Full-screen portal overlay — fixed on body, above marquee/sidebar on desktop */
.prr-room-transition {
    position: fixed;
    inset: 0;
    z-index: 2147483000; /* above sticky nav / marquee / panels */
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    background:
        radial-gradient(ellipse 80% 60% at 50% 42%, rgba(20, 50, 70, 0.72), rgba(5, 8, 12, 0.92));
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
    isolation: isolate;
}

.prr-room-transition.show {
    opacity: 1;
    visibility: visible;
}

.prr-rt-flash {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 45%, rgba(110, 182, 224, 0.35), transparent 55%);
    opacity: 0;
}

.prr-room-transition.enter.show .prr-rt-flash {
    animation: prr-flash-in 0.7s ease both;
}

.prr-room-transition.exit.show .prr-rt-flash {
    animation: prr-flash-out 0.55s ease both;
}

.prr-rt-rings {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prr-room-transition.enter .prr-rt-ring {
    animation: prr-ring-in 0.7s cubic-bezier(0.16, 1.1, 0.35, 1) both;
}

.prr-room-transition.exit .prr-rt-ring {
    animation: prr-ring-out 0.55s ease both;
}

.prr-rt-ring {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(154, 212, 240, 0.9);
    box-shadow:
        0 0 28px rgba(110, 182, 224, 0.55),
        inset 0 0 22px rgba(110, 182, 224, 0.2);
}

.prr-rt-ring.r2 {
    width: 110px;
    height: 110px;
    border-color: rgba(158, 212, 240, 0.45);
    animation-delay: 0.07s !important;
}

.prr-rt-ring.r3 {
    width: 150px;
    height: 150px;
    border-color: rgba(110, 182, 224, 0.25);
    animation-delay: 0.12s !important;
}

.prr-rt-label {
    position: relative;
    z-index: 1;
    font-family: "Orbitron", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c8eaf8;
    text-shadow: 0 0 16px rgba(110, 182, 224, 0.7);
    animation: prr-label-in 0.45s ease both;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(110, 182, 224, 0.35);
    border-radius: 999px;
    background: rgba(8, 14, 20, 0.65);
}

@keyframes prr-flash-in {
    0% { opacity: 0; }
    30% { opacity: 1; }
    100% { opacity: 0.35; }
}

@keyframes prr-flash-out {
    0% { opacity: 0.5; }
    100% { opacity: 0; }
}

@keyframes prr-ring-in {
    0% { transform: scale(2.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes prr-ring-out {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.35); opacity: 0; }
}

@keyframes prr-label-in {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

/* Menus settle in after leaving a match */
.arcade-screen .content.menu-anim-enter {
    animation: menu-content-enter 0.55s cubic-bezier(0.18, 1.1, 0.4, 1) both;
}

@keyframes menu-content-enter {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.975);
        filter: brightness(1.2);
    }
    100% {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .room-shell.room-anim-enter,
    .room-shell.room-anim-exit,
    .prr-room-transition,
    .prr-rt-ring,
    .prr-rt-label,
    .prr-rt-flash,
    .arcade-screen .content.menu-anim-enter {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        filter: none !important;
        transform: none !important;
        visibility: visible !important;
    }
    .prr-room-transition { display: none !important; }
}

.room-shell.game-mode > *:not(.game-arena-bg) {
    position: relative;
    z-index: 2;
}

/* Arena background layers */
.game-arena-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.game-arena-grid {
    position: absolute;
    inset: -20%;
    background-image:
        linear-gradient(rgba(110, 182, 224, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(110, 182, 224, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    transform: perspective(400px) rotateX(52deg) translateY(-8%);
    transform-origin: center top;
    opacity: 0.55;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 85%);
    animation: game-grid-drift 18s linear infinite;
}

@keyframes game-grid-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 28px, 28px 0; }
}

.game-arena-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(110, 182, 224, 0.14), transparent 55%),
        radial-gradient(ellipse 50% 40% at 15% 90%, rgba(110, 182, 224, 0.1), transparent 50%),
        radial-gradient(ellipse 45% 35% at 90% 70%, rgba(90, 110, 80, 0.12), transparent 50%);
    animation: game-glow-breathe 5s ease-in-out infinite alternate;
}

@keyframes game-glow-breathe {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

.game-arena-orbs .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(28px);
    opacity: 0.35;
    animation: game-orb-float 7s ease-in-out infinite alternate;
}

.game-arena-orbs .o1 {
    width: 140px; height: 140px;
    top: 8%; left: -4%;
    background: #6eb6e0;
}

.game-arena-orbs .o2 {
    width: 120px; height: 120px;
    top: 40%; right: -3%;
    background: #6eb6e0;
    animation-delay: -2s;
}

.game-arena-orbs .o3 {
    width: 100px; height: 100px;
    bottom: 5%; left: 35%;
    background: #5a6a50;
    animation-delay: -4s;
}

@keyframes game-orb-float {
    from { transform: translateY(0) scale(1); }
    to { transform: translateY(-14px) scale(1.08); }
}

/* HUD corner brackets */
.game-arena-frame .gf {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: rgba(110, 182, 224, 0.55);
    border-style: solid;
    border-width: 0;
    opacity: 0.85;
}

.game-arena-frame .gf-tl { top: 8px; left: 8px; border-top-width: 2px; border-left-width: 2px; }
.game-arena-frame .gf-tr { top: 8px; right: 8px; border-top-width: 2px; border-right-width: 2px; }
.game-arena-frame .gf-bl { bottom: 8px; left: 8px; border-bottom-width: 2px; border-left-width: 2px; }
.game-arena-frame .gf-br { bottom: 8px; right: 8px; border-bottom-width: 2px; border-right-width: 2px; }

/* Phase-tinted arena accents — gray / lime only */
.room-shell.game-mode.gm-lobby .game-arena-glow {
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(110, 182, 224, 0.14), transparent 55%),
        radial-gradient(ellipse 45% 35% at 80% 80%, rgba(120, 140, 110, 0.12), transparent 50%);
}

.room-shell.game-mode.gm-wait .game-arena-glow {
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(140, 160, 130, 0.14), transparent 55%),
        radial-gradient(ellipse 45% 35% at 20% 80%, rgba(110, 182, 224, 0.1), transparent 50%);
}

.room-shell.game-mode.gm-guess .game-arena-glow {
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(142, 200, 232, 0.2), transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(90, 168, 208, 0.12), transparent 55%);
}

.room-shell.game-mode.gm-guess {
    border-color: rgba(142, 200, 232, 0.35);
    box-shadow:
        0 0 0 1px rgba(110, 182, 224, 0.15),
        0 20px 50px rgba(0, 0, 0, 0.45),
        0 0 40px rgba(110, 182, 224, 0.08);
}

.room-shell.game-mode.gm-rip {
    border-color: rgba(110, 182, 224, 0.45);
}

.room-shell.game-mode.gm-scored {
    border-color: rgba(126, 200, 216, 0.35);
}

.room-shell.game-mode.gm-scored .game-arena-glow {
    background:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(126, 200, 216, 0.16), transparent 55%),
        radial-gradient(ellipse 45% 35% at 70% 80%, rgba(142, 200, 232, 0.12), transparent 50%);
}

/* —— Match HUD —— */
.game-hud {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.game-hud-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 0.75rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(110, 182, 224, 0.22);
    background: linear-gradient(180deg, rgba(12, 14, 12, 0.92), rgba(8, 10, 8, 0.88));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 6px 18px rgba(0, 0, 0, 0.3);
}

.game-hud-live {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.game-live-pip {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7ec8d8;
    box-shadow: 0 0 10px #7ec8d8;
    animation: game-live-pulse 1.2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes game-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.85); }
}

.game-live-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    color: #7ec8d8;
    text-transform: uppercase;
}

.game-code-chip {
    font-family: "Orbitron", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #6eb6e0;
    padding: 0.15rem 0.45rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(110, 182, 224, 0.35);
    background: rgba(16, 24, 8, 0.65);
    text-shadow: 0 0 10px rgba(110, 182, 224, 0.45);
}

/* Phase stepper rail */
.game-phase-rail {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.game-phase-rail::-webkit-scrollbar { display: none; }

.gpr-step {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.2rem 0.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    opacity: 0.45;
    transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.gpr-step.done {
    opacity: 0.75;
}

.gpr-step.done .gpr-num {
    background: rgba(126, 200, 216, 0.2);
    color: #7ec8d8;
    border-color: rgba(126, 200, 216, 0.35);
}

.gpr-step.active {
    opacity: 1;
    border-color: rgba(142, 200, 232, 0.45);
    background: rgba(24, 32, 8, 0.55);
    box-shadow: 0 0 14px rgba(142, 200, 232, 0.2);
}

.gpr-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    font-family: "Orbitron", sans-serif;
    font-size: 0.55rem;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #8a9288;
    background: rgba(0, 0, 0, 0.35);
}

.gpr-step.active .gpr-num {
    background: linear-gradient(135deg, #8ec8e8, #5aa8d0);
    color: #1a1200;
    border-color: transparent;
    box-shadow: 0 0 10px rgba(142, 200, 232, 0.45);
}

.gpr-name {
    font-family: "Orbitron", sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b8c0b4;
}

.gpr-step.active .gpr-name {
    color: #8ec8e8;
}

.gpr-line {
    width: 14px;
    height: 2px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.gpr-line.on {
    background: linear-gradient(90deg, rgba(126, 200, 216, 0.6), rgba(110, 182, 224, 0.5));
    box-shadow: 0 0 6px rgba(126, 200, 216, 0.35);
}

.game-hud-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.game-hud-btn {
    font-family: "Orbitron", sans-serif !important;
    font-size: 0.58rem !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 0.45rem !important;
    border: 1px solid rgba(110, 182, 224, 0.35) !important;
    background: rgba(16, 24, 8, 0.7) !important;
    color: #9ad4f0 !important;
    padding: 0.28rem 0.55rem !important;
}

.game-hud-btn:hover {
    background: rgba(110, 182, 224, 0.12) !important;
    color: #fff !important;
}

.game-hud-btn.warn {
    border-color: rgba(255, 180, 60, 0.45) !important;
    color: #8ec8e8 !important;
    background: rgba(24, 32, 8, 0.65) !important;
}

.game-hud-btn.danger {
    border-color: rgba(255, 80, 100, 0.45) !important;
    color: #ff8a9a !important;
    background: rgba(40, 10, 18, 0.65) !important;
}

/* Title bar under HUD — room name titleplate */
.game-hud-titlebar,
.room-header-main.room-titleplate {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.95rem;
    padding: 0.85rem 1rem 0.9rem;
    border-radius: 1.05rem;
    border: 1px solid rgba(110, 182, 224, 0.28);
    background:
        radial-gradient(ellipse 70% 90% at 0% 50%, rgba(110, 182, 224, 0.14), transparent 55%),
        radial-gradient(ellipse 50% 80% at 100% 0%, rgba(240, 196, 64, 0.08), transparent 50%),
        linear-gradient(145deg, rgba(14, 20, 28, 0.96) 0%, rgba(8, 10, 14, 0.94) 55%, rgba(10, 14, 18, 0.95) 100%);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.45) inset,
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 12px 32px rgba(0, 0, 0, 0.35),
        0 0 28px rgba(110, 182, 224, 0.08);
    overflow: hidden;
}

.game-titlebar-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    pointer-events: none;
    z-index: 2;
}

.game-titlebar-corner.tl {
    top: 6px;
    left: 6px;
    border-top: 2px solid rgba(110, 182, 224, 0.75);
    border-left: 2px solid rgba(110, 182, 224, 0.75);
}

.game-titlebar-corner.tr {
    top: 6px;
    right: 6px;
    border-top: 2px solid rgba(240, 196, 64, 0.55);
    border-right: 2px solid rgba(240, 196, 64, 0.55);
}

.game-titlebar-corner.bl {
    bottom: 6px;
    left: 6px;
    border-bottom: 2px solid rgba(110, 182, 224, 0.45);
    border-left: 2px solid rgba(110, 182, 224, 0.45);
}

.game-titlebar-corner.br {
    bottom: 6px;
    right: 6px;
    border-bottom: 2px solid rgba(240, 196, 64, 0.4);
    border-right: 2px solid rgba(240, 196, 64, 0.4);
}

.game-titlebar-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255, 255, 255, 0.045) 48%,
        transparent 62%
    );
    background-size: 220% 100%;
    animation: game-title-sheen 6.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes game-title-sheen {
    0%, 100% { background-position: 130% 0; }
    50% { background-position: -30% 0; }
}

.game-pack-frame {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    padding: 0.35rem;
    border-radius: 0.75rem;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.08), transparent 55%),
        rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(110, 182, 224, 0.35);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.35) inset,
        0 0 18px rgba(110, 182, 224, 0.15);
}

.game-pack-logo {
    width: 72px !important;
    max-height: 56px !important;
    padding: 0 !important;
    border-radius: 0.35rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: block;
}

.game-pack-placeholder {
    position: relative;
    z-index: 1;
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    border: 1px solid rgba(110, 182, 224, 0.4);
    background:
        radial-gradient(circle at 35% 30%, rgba(110, 182, 224, 0.25), transparent 60%),
        rgba(8, 16, 24, 0.85);
    color: #9ad4f0;
    box-shadow: 0 0 16px rgba(110, 182, 224, 0.18);
}

.game-pack-placeholder .gpp-mark {
    font-family: "Orbitron", sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-shadow: 0 0 12px rgba(110, 182, 224, 0.55);
}

.game-hud-title-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    flex: 1;
}

.game-match-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.game-session-tag {
    font-family: "Orbitron", sans-serif;
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6eb6e0;
    padding: 0.14rem 0.45rem;
    border-radius: 0.3rem;
    border: 1px solid rgba(110, 182, 224, 0.35);
    background: rgba(0, 28, 42, 0.55);
    box-shadow: 0 0 10px rgba(110, 182, 224, 0.12);
}

.game-match-name {
    margin: 0 !important;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.25rem, 3.2vw, 1.75rem) !important;
    letter-spacing: 0.06em;
    line-height: 1.12;
    font-weight: 800;
}

.game-match-name-text {
    display: inline-block;
    max-width: 100%;
    background: linear-gradient(
        100deg,
        #f4f8fc 0%,
        #9ad4f0 38%,
        #ffe58a 72%,
        #e8f4fc 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 14px rgba(110, 182, 224, 0.35));
    animation: game-name-shine 5s ease-in-out infinite;
    word-break: break-word;
}

@keyframes game-name-shine {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.game-name-underline {
    width: min(100%, 14rem);
    height: 3px;
    margin: 0.4rem 0 0.45rem;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(110, 182, 224, 0.95),
        rgba(240, 196, 64, 0.75) 55%,
        transparent
    );
    box-shadow: 0 0 12px rgba(110, 182, 224, 0.45);
    animation: game-underline-pulse 2.4s ease-in-out infinite;
}

@keyframes game-underline-pulse {
    0%, 100% { opacity: 0.75; width: min(100%, 12rem); }
    50% { opacity: 1; width: min(100%, 15rem); }
}

.game-match-meta {
    margin: 0 !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #8a9288 !important;
}

.game-set-pill,
.game-players-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: "Rajdhani", "Segoe UI", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    max-width: 100%;
}

.game-set-pill {
    color: #c8eaf8;
    border-color: rgba(110, 182, 224, 0.35);
    background: rgba(0, 28, 42, 0.5);
}

.game-players-pill {
    color: #b8f0d0;
    border-color: rgba(61, 255, 138, 0.3);
    background: rgba(12, 36, 24, 0.45);
}

.game-set-ico,
.game-players-ico {
    font-size: 0.7rem;
    opacity: 0.85;
    line-height: 1;
}

.game-set-name {
    color: #b8c0b4;
    font-weight: 600;
}

.game-meta-sep {
    opacity: 0.45;
    margin: 0 0.15rem;
}

/* Ended session header uses same titleplate language */
.room-header-main.room-titleplate {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 0.5rem;
}

.room-header-main.room-titleplate .pack-logo {
    width: 64px;
    max-height: 48px;
    object-fit: contain;
    display: block;
}

.game-timer-chip {
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: #1a1200;
    background: linear-gradient(135deg, #8ec8e8, #ff9a3c);
    padding: 0.12rem 0.45rem;
    border-radius: 0.4rem;
    box-shadow: 0 0 12px rgba(110, 182, 224, 0.4);
    animation: game-timer-pulse 1s ease-in-out infinite;
}

.game-timer-chip .gtc-unit {
    font-size: 0.65rem;
    margin-left: 0.05rem;
    opacity: 0.8;
}

@keyframes game-timer-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.15); }
}

.game-role-chip {
    font-family: "Orbitron", sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(110, 182, 224, 0.35);
    color: #9ad4f0;
    background: rgba(0, 30, 45, 0.55);
}

.game-role-chip.host {
    border-color: rgba(142, 200, 232, 0.45);
    color: #8ec8e8;
    background: rgba(24, 32, 8, 0.6);
}

/* Panels inside match feel more “HUD module” */
.room-shell.game-mode .panel {
    border-color: rgba(110, 182, 224, 0.22);
    background: linear-gradient(165deg, rgba(16, 12, 36, 0.94), rgba(10, 8, 24, 0.92));
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.45),
        0 12px 28px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 20px rgba(110, 182, 224, 0.05);
}

.room-shell.game-mode .panel::before {
    opacity: 0.7;
    height: 2px;
}

.room-shell.game-mode .panel h2,
.room-shell.game-mode .section-title {
    font-family: "Orbitron", sans-serif;
    letter-spacing: 0.12em;
}

/* Status badge accents in match */
.room-shell.game-mode .badge-lobby,
.room-shell.game-mode .badge-selectingset {
    background: linear-gradient(135deg, #0a3040, #123050) !important;
    border-color: rgba(110, 182, 224, 0.45) !important;
    color: #9ad4f0 !important;
}

.room-shell.game-mode .badge-guessing {
    background: linear-gradient(135deg, #243040, #1a222c) !important;
    border-color: rgba(160, 180, 140, 0.45) !important;
    color: #c4d4b4 !important;
}

.room-shell.game-mode .badge-pulllogged {
    background: linear-gradient(135deg, #0a4030, #124028) !important;
    border-color: rgba(126, 200, 216, 0.45) !important;
    color: #7ec8d8 !important;
}

/* Mobile HUD stacking */
@media (max-width: 720px) {
    .room-shell.game-mode {
        margin: 0;
        padding: 0.45rem 0.2rem 1rem;
        border-radius: 0.85rem;
    }

    .game-hud-top {
        flex-direction: column;
        align-items: stretch;
    }

    .game-hud-live {
        justify-content: space-between;
    }

    .game-phase-rail {
        justify-content: space-between;
        width: 100%;
    }

    .gpr-name {
        display: none;
    }

    .gpr-step.active .gpr-name {
        display: inline;
    }

    .game-hud-actions {
        justify-content: stretch;
    }

    .game-hud-actions .game-hud-btn {
        flex: 1;
    }

    .game-match-name {
        font-size: 1.15rem !important;
    }

    .game-hud-titlebar,
    .room-header-main.room-titleplate {
        padding: 0.7rem 0.75rem 0.75rem;
        gap: 0.7rem;
    }

    .game-pack-logo {
        width: 56px !important;
        max-height: 44px !important;
    }

    .game-pack-placeholder {
        width: 3rem;
        height: 3rem;
    }

    .game-name-underline {
        width: min(100%, 9rem);
    }

    .page:has(.room-shell.game-mode) .arcade-controls-bar {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .room-shell.game-mode,
    .game-arena-grid,
    .game-arena-glow,
    .game-arena-orbs .orb,
    .game-live-pip,
    .game-timer-chip,
    .game-titlebar-sheen,
    .game-match-name-text,
    .game-name-underline {
        animation: none !important;
    }

    .game-match-name-text {
        background: none;
        -webkit-text-fill-color: #e8f4fc;
        color: #e8f4fc;
        filter: drop-shadow(0 0 10px rgba(110, 182, 224, 0.3));
    }
}

.room-layout {
    display: block;
}

.room-layout.has-aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 1rem;
    align-items: start;
}

.room-main {
    min-width: 0;
}

.room-aside {
    position: sticky;
    top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    align-items: stretch;
}

.room-aside.collapsed {
    align-items: flex-end;
}

.room-layout.has-aside:has(.room-aside.collapsed) {
    grid-template-columns: minmax(0, 1fr) auto;
}

.top-value-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(142, 200, 232, 0.45);
    background: linear-gradient(135deg, rgba(40, 24, 10, 0.95), rgba(24, 14, 40, 0.95));
    color: #8ec8e8;
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(110, 182, 224, 0.18);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.top-value-toggle:hover {
    border-color: #8ec8e8;
    box-shadow: 0 0 22px rgba(110, 182, 224, 0.35);
    transform: translateY(-1px);
}

.top-value-toggle.is-open {
    border-color: rgba(110, 182, 224, 0.45);
    color: #9ad4f0;
    box-shadow: 0 0 16px rgba(110, 182, 224, 0.2);
}

.room-aside.collapsed .top-value-toggle {
    width: auto;
    border-radius: 1rem;
    flex-direction: column;
    padding: 0.65rem 0.55rem;
    min-width: 3.25rem;
}

.room-aside.collapsed .tv-toggle-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.14em;
}

.tv-toggle-icon {
    font-size: 0.95rem;
    filter: drop-shadow(0 0 6px rgba(142, 200, 232, 0.6));
}

.tv-toggle-chevron {
    margin-left: auto;
    opacity: 0.8;
}

.room-aside.collapsed .tv-toggle-chevron {
    margin-left: 0;
}

.top-value-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.top-value-head h2 {
    margin: 0;
}

.top-value-chip {
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff5e62, #7eb8d8);
    color: #1a1000;
    font-weight: 800;
    box-shadow: 0 0 12px rgba(255, 120, 40, 0.45);
    animation: hot-chip 1.4s ease-in-out infinite;
}

@keyframes hot-chip {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.15); }
}

.top-value-panel {
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-color: rgba(110, 182, 224, 0.4) !important;
    background:
        linear-gradient(180deg, rgba(40, 16, 70, 0.95) 0%, rgba(14, 10, 28, 0.98) 50%) !important;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 0 28px rgba(110, 182, 224, 0.15) !important;
}

.top-value-panel h2 {
    margin-top: 0;
    color: var(--cab-gold);
}

.top-value-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.top-value-row {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    text-align: left;
    width: 100%;
    padding: 0.45rem;
    border-radius: 0.75rem;
    border: 1px solid #2a323c;
    background: #10141a;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.12s ease, transform 0.08s ease;
}

.top-value-row:hover:not(:disabled) {
    border-color: #5a6a50;
    transform: translateY(-1px);
}

.top-value-row.selected {
    border-color: #8ec8e8;
    box-shadow: 0 0 0 1px #8ec8e8;
}

.top-value-row:disabled {
    cursor: default;
    opacity: 0.95;
}

.top-value-thumb {
    width: 52px;
    height: auto;
    border-radius: 0.35rem;
    flex-shrink: 0;
    background: #0a0e12;
}

.top-value-meta {
    min-width: 0;
    flex: 1;
}

.top-value-meta strong {
    display: block;
    font-size: 0.82rem;
    line-height: 1.2;
    margin-bottom: 0.1rem;
}

.top-value-meta small {
    color: #8a9288;
    font-size: 0.72rem;
}

.top-value-meta .price-block {
    margin-top: 0.3rem;
}

.selection-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #1a2430;
    border: 1px solid #5a6a50;
    color: #e2d6ff;
    font-size: 0.9rem;
}

/* Right panel (top value): stack full-width on tablet/phone — no sticky side column */
@media (max-width: 960px) {
    .room-layout.has-aside {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        max-width: 100%;
    }

    .room-layout.has-aside:has(.room-aside.collapsed) {
        grid-template-columns: unset;
    }

    .room-main {
        width: 100%;
        max-width: 100%;
        order: 2;
    }

    .room-aside,
    .room-aside.open,
    .room-aside.collapsed {
        position: static !important;
        order: 1;
        width: 100% !important;
        max-width: 100% !important;
        align-items: stretch !important;
        top: auto !important;
        z-index: 2;
    }

    /* Collapsed desktop “vertical chip” becomes a normal full-width pill on mobile */
    .room-aside.collapsed .top-value-toggle,
    .room-aside .top-value-toggle {
        width: 100% !important;
        min-width: 0 !important;
        flex-direction: row !important;
        border-radius: 999px !important;
        padding: 0.65rem 0.9rem !important;
        justify-content: flex-start;
    }

    .room-aside.collapsed .tv-toggle-text,
    .room-aside .tv-toggle-text {
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
        letter-spacing: 0.08em !important;
        flex: 1;
        text-align: left;
    }

    .room-aside.collapsed .tv-toggle-chevron,
    .room-aside .tv-toggle-chevron {
        margin-left: auto !important;
    }

    .top-value-panel {
        max-height: min(42dvh, 340px);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .top-value-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .top-value-row {
        min-width: 0;
    }

    .top-value-meta strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 420px) {
    .top-value-list {
        grid-template-columns: 1fr;
    }
}

h1:focus {
    outline: none;
}

.lead {
    margin-bottom: 1.25rem;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.empty-card {
    color: var(--cab-muted);
}

.auth-cta {
    text-align: center;
}

.room-list {
    display: grid;
    gap: 0.75rem;
}

.room-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease, border-color 0.12s ease;
}

.room-card:hover {
    transform: translateY(-1px);
    border-color: #7a9a50;
    color: inherit;
}

.room-card-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.35rem;
}

.room-card-meta {
    color: #8a9288;
    font-size: 0.92rem;
}

/* =========================================================
   Home page — arcade lobby
   ========================================================= */
.content:has(.home-page) {
    max-width: min(960px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.home-page {
    padding-bottom: 1.5rem;
    width: 100%;
}

/* —— Hero —— */
.home-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.15rem;
    border: 2px solid rgba(110, 182, 224, 0.35);
    padding: 1.35rem 1.15rem 1.25rem;
    margin-bottom: 1.1rem;
    background:
        radial-gradient(ellipse 90% 70% at 20% 0%, rgba(110, 182, 224, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 80% 60% at 90% 30%, rgba(110, 182, 224, 0.16) 0%, transparent 50%),
        linear-gradient(165deg, rgba(36, 16, 64, 0.98) 0%, rgba(10, 8, 24, 0.99) 100%);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.45),
        0 14px 40px rgba(0, 0, 0, 0.4),
        0 0 32px rgba(110, 182, 224, 0.12);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem 1.25rem;
    align-items: center;
}

.home-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.home-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.55;
    animation: home-orb-drift 8s ease-in-out infinite;
}

.home-orb.o1 {
    width: 7rem;
    height: 7rem;
    top: -1.5rem;
    right: 8%;
    background: radial-gradient(circle, rgba(110, 182, 224, 0.55), transparent 70%);
}

.home-orb.o2 {
    width: 5rem;
    height: 5rem;
    bottom: 10%;
    left: 5%;
    background: radial-gradient(circle, rgba(110, 182, 224, 0.45), transparent 70%);
    animation-delay: -2s;
}

.home-orb.o3 {
    width: 4rem;
    height: 4rem;
    top: 40%;
    right: 20%;
    background: radial-gradient(circle, rgba(142, 200, 232, 0.4), transparent 70%);
    animation-delay: -4s;
}

.home-orb.o4 {
    width: 3rem;
    height: 3rem;
    bottom: -0.5rem;
    right: 40%;
    background: radial-gradient(circle, rgba(126, 200, 216, 0.35), transparent 70%);
    animation-delay: -1s;
}

@keyframes home-orb-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(8px, -10px) scale(1.08); }
}

.home-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.05) 2px,
        rgba(0, 0, 0, 0.05) 4px
    );
    opacity: 0.5;
}

.home-hero-stage {
    position: relative;
    z-index: 1;
    width: 6.5rem;
    height: 7.5rem;
    flex-shrink: 0;
}

.home-pack {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: home-pack-float 3s ease-in-out infinite;
}

@keyframes home-pack-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

.home-pack-body {
    position: relative;
    z-index: 2;
    width: 4.5rem;
    height: 6.1rem;
    border-radius: 0.55rem;
    background: #0a0e12;
    border: 2px solid rgba(110, 182, 224, 0.65);
    box-shadow:
        0 0 24px rgba(110, 182, 224, 0.4),
        0 10px 20px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.home-pack-logo {
    width: 2.4rem;
    height: 2.4rem;
    object-fit: contain;
    border-radius: 0.4rem;
    filter: drop-shadow(0 0 8px rgba(110, 182, 224, 0.4));
}

.home-pack-logo.home-pack-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.4rem;
    filter: none;
}

.home-pack-shine {
    position: absolute;
    z-index: 3;
    top: 12%;
    left: 20%;
    width: 2rem;
    height: 5.5rem;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: rotate(18deg);
    animation: home-shine 2.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes home-shine {
    0% { transform: translateX(-140%) rotate(18deg); opacity: 0; }
    35% { opacity: 0.9; }
    100% { transform: translateX(240%) rotate(18deg); opacity: 0; }
}

.home-float-cards {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.home-float-cards .hfc {
    position: absolute;
    width: 1.55rem;
    height: 2.15rem;
    border-radius: 0.22rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 0 10px rgba(110, 182, 224, 0.25);
    animation: home-card-bob 4.5s ease-in-out infinite;
    object-fit: cover;
    background: #0a0e12;
    display: block;
}

.home-float-cards .h1 {
    top: 4%;
    left: 0;
}

.home-float-cards .h2 {
    top: 8%;
    right: 0;
    animation-delay: 0.4s;
}

.home-float-cards .h3 {
    bottom: 6%;
    left: 36%;
    animation-delay: 0.8s;
}

@keyframes home-card-bob {
    0%, 100% { transform: translateY(0) rotate(-6deg); opacity: 0.8; }
    50% { transform: translateY(-8px) rotate(8deg); opacity: 1; }
}

.home-hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.home-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #9ad4f0;
    margin-bottom: 0.45rem;
    text-shadow: 0 0 12px rgba(110, 182, 224, 0.4);
}

.home-live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #7ec8d8;
    box-shadow: 0 0 10px #7ec8d8;
    animation: home-live-blink 1.1s ease-in-out infinite;
}

@keyframes home-live-blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.home-title {
    margin: 0 0 0.45rem;
    line-height: 1.05;
}

.home-title-line {
    display: block;
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: clamp(1.45rem, 5.5vw, 2.15rem);
    letter-spacing: 0.08em;
    color: #fff;
    text-shadow:
        0 0 14px rgba(110, 182, 224, 0.4),
        0 0 28px rgba(110, 182, 224, 0.25);
}

.home-title-line.accent {
    color: #8ec8e8;
    text-shadow:
        0 0 14px rgba(142, 200, 232, 0.5),
        0 0 28px rgba(110, 182, 224, 0.25);
}

.home-tagline {
    margin: 0 0 0.85rem;
    color: #b8c0b4;
    font-size: 1.02rem;
    font-weight: 600;
    max-width: 28rem;
}

.home-ticker {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.55rem;
}

.home-ticker-track {
    display: flex;
    gap: 0.65rem;
    width: max-content;
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: rgba(180, 190, 230, 0.75);
    animation: home-ticker 18s linear infinite;
}

.home-ticker-track span:nth-child(odd) {
    color: #9ad4f0;
}

@keyframes home-ticker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* —— CTA cards —— */
.home-cta-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-bottom: 1.35rem;
}

@media (min-width: 640px) {
    .home-cta-panel {
        grid-template-columns: 1.2fr 1fr 0.9fr;
    }

    .home-cta-panel-2 {
        grid-template-columns: 1.35fr 1fr;
    }
}

.home-cta-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 2px solid rgba(110, 182, 224, 0.3);
    background: linear-gradient(135deg, rgba(16, 20, 14, 0.95), rgba(12, 14, 12, 0.98));
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    min-width: 0;
}

.home-cta-card:hover {
    transform: translateY(-2px);
    border-color: rgba(110, 182, 224, 0.65);
    box-shadow: 0 0 24px rgba(110, 182, 224, 0.18);
    color: inherit;
}

.home-cta-card.primary {
    border-color: rgba(142, 200, 232, 0.45);
    background: linear-gradient(135deg, rgba(50, 32, 10, 0.95), rgba(24, 14, 40, 0.98));
    box-shadow: 0 0 20px rgba(110, 182, 224, 0.15);
    animation: home-cta-glow 2s ease-in-out infinite alternate;
}

.home-cta-card.primary:hover {
    border-color: #8ec8e8;
    box-shadow: 0 0 28px rgba(110, 182, 224, 0.3);
}

@keyframes home-cta-glow {
    from { box-shadow: 0 0 16px rgba(110, 182, 224, 0.12); }
    to { box-shadow: 0 0 28px rgba(110, 182, 224, 0.28); }
}

.home-cta-card.subtle {
    border-color: rgba(120, 100, 180, 0.35);
}

.home-cta-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    background: linear-gradient(145deg, #6eb6e0, #0080a0);
    color: #041018;
    box-shadow: 0 0 14px rgba(110, 182, 224, 0.35);
}

.home-cta-icon.join {
    background: linear-gradient(145deg, #9ad4f0, #2a5570);
    color: #fff;
    box-shadow: 0 0 14px rgba(110, 182, 224, 0.35);
}

.home-cta-icon.hist {
    background: linear-gradient(145deg, #8a7ab8, #3a2a60);
    color: #e6ebe4;
    box-shadow: 0 0 12px rgba(140, 120, 200, 0.3);
}

.home-cta-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.home-cta-body strong {
    font-family: "Orbitron", sans-serif;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    color: #fff;
}

.home-cta-body small {
    color: #8a9288;
    font-size: 0.82rem;
    line-height: 1.25;
}

.home-cta-arrow {
    color: #6eb6e0;
    font-size: 1.4rem;
    opacity: 0.7;
    flex-shrink: 0;
}

/* Guest banner */
.home-guest-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 1.15rem 1.2rem;
    border-radius: 1rem;
    border: 2px solid rgba(110, 182, 224, 0.4);
    background:
        radial-gradient(ellipse 80% 100% at 0% 50%, rgba(110, 182, 224, 0.15), transparent 55%),
        linear-gradient(135deg, rgba(18, 22, 14, 0.98), rgba(12, 14, 12, 0.98));
    box-shadow: 0 0 28px rgba(110, 182, 224, 0.12);
}

.home-guest-title {
    margin: 0 0 0.3rem;
    font-family: "Orbitron", sans-serif;
    font-size: 1.1rem;
    color: #8ec8e8;
    letter-spacing: 0.06em;
}

.home-guest-text {
    margin: 0;
    color: #b8c0b4;
    max-width: 26rem;
}

.home-guest-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

/* —— How it works —— */
.home-section-head {
    margin-bottom: 0.85rem;
}

.home-section-head h2 {
    margin: 0 0 0.25rem;
}

.home-section-head.rowish {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.65rem;
}

.home-section-sub {
    margin: 0;
    color: #8a9288;
    font-size: 0.92rem;
}

.home-how {
    margin-bottom: 1.25rem;
}

.home-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 720px) {
    .home-steps {
        grid-template-columns: repeat(3, 1fr);
    }

    .home-steps-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .home-steps-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.home-step {
    position: relative;
    padding: 1rem 0.95rem 1.05rem;
    border-radius: 1rem;
    border: 1px solid rgba(110, 182, 224, 0.22);
    background: linear-gradient(180deg, rgba(16, 20, 14, 0.9), rgba(10, 12, 10, 0.95));
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.12s ease;
}

.home-step:hover {
    border-color: rgba(110, 182, 224, 0.45);
    transform: translateY(-2px);
}

.home-step-num {
    display: inline-block;
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6eb6e0;
    margin-bottom: 0.55rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(110, 182, 224, 0.35);
    background: rgba(18, 28, 8, 0.45);
}

.home-step.phase-lobby .home-step-num {
    color: #b8c8a8;
    border-color: rgba(160, 180, 140, 0.4);
    background: rgba(40, 24, 70, 0.45);
}

.home-step.phase-guessing .home-step-num {
    color: #9ad4f0;
    border-color: rgba(110, 182, 224, 0.45);
}

.home-step.phase-rip .home-step-num {
    color: #1a1000;
    border-color: transparent;
    background: linear-gradient(135deg, #8ec8e8, #ff9a3c);
    box-shadow: 0 0 12px rgba(110, 182, 224, 0.35);
}

.home-step.phase-pull .home-step-num {
    color: #7ec8d8;
    border-color: rgba(126, 200, 216, 0.45);
    background: rgba(10, 40, 28, 0.55);
}

.home-step-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.65rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hs-pack {
    width: 1.35rem;
    height: 1.85rem;
    border-radius: 0.2rem;
    background: linear-gradient(145deg, #6eb6e0, #2a3814);
    box-shadow: 0 0 12px rgba(110, 182, 224, 0.5);
}

.hs-clock {
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: #8ec8e8;
    text-shadow: 0 0 10px rgba(142, 200, 232, 0.5);
}

.hs-star {
    color: #8ec8e8;
    font-size: 1.35rem;
    filter: drop-shadow(0 0 8px rgba(142, 200, 232, 0.6));
}

.hs-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #7ec8d8;
    color: #0a1a10;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 0 12px rgba(126, 200, 216, 0.5);
}

.home-step h3 {
    font-family: "Orbitron", sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: #fff;
    margin: 0 0 0.35rem;
}

.home-step p {
    margin: 0;
    color: #8a9288;
    font-size: 0.88rem;
    line-height: 1.4;
}

/* —— Scoring —— */
.home-scoring {
    margin-bottom: 1.35rem;
}

.home-scoring-head {
    margin-bottom: 0.75rem;
}

.home-scoring-head h2 {
    margin: 0 0 0.2rem;
}

.home-score-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.home-score-chips-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .home-score-chips-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.home-score-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
    padding: 0.75rem 0.5rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.28);
}

.home-score-chip .hsc-val {
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    line-height: 1;
}

.home-score-chip .hsc-lbl {
    font-size: 0.72rem;
    color: #8a9288;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.home-score-chip.energy .hsc-val { color: #9ad4f0; }
.home-score-chip.mon .hsc-val { color: #b8c0b4; }
.home-score-chip.ultra .hsc-val { color: #b8c8a8; }
.home-score-chip.ir .hsc-val { color: #9ad4f0; }
.home-score-chip.chase .hsc-val { color: #8ec8e8; }
.home-score-chip.mon .hsc-val { color: #8ec8e8; }
.home-score-chip.chase .hsc-val { color: #9ad4f0; text-shadow: 0 0 12px rgba(110, 182, 224, 0.4); }

/* —— Active rooms —— */
.home-rooms {
    margin-bottom: 1.25rem;
}

.home-rooms-new {
    flex-shrink: 0;
}

.home-loading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #8a9288;
    font-size: 0.9rem;
    padding: 0.75rem 0;
}

.home-loading-bar {
    width: 0.28rem;
    height: 0.7rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #6eb6e0, #6eb6e0);
    animation: home-eq 0.9s ease-in-out infinite;
}

.home-loading-bar:nth-child(2) { animation-delay: 0.12s; }
.home-loading-bar:nth-child(3) { animation-delay: 0.24s; }

@keyframes home-eq {
    0%, 100% { height: 0.4rem; opacity: 0.5; }
    50% { height: 1.1rem; opacity: 1; }
}

.home-empty {
    text-align: center;
    padding: 1.5rem 1.15rem !important;
}

.home-empty-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.home-empty-pack {
    width: 2.4rem;
    height: 3.3rem;
    border-radius: 0.35rem;
    background: linear-gradient(145deg, #3a1a6e, #0e120e);
    border: 2px solid rgba(110, 182, 224, 0.4);
    box-shadow: 0 0 18px rgba(110, 182, 224, 0.25);
    animation: home-pack-float 2.8s ease-in-out infinite;
}

.home-empty h3 {
    font-family: "Orbitron", sans-serif;
    font-size: 0.95rem;
    color: #fff;
    margin: 0 0 0.4rem;
}

.home-empty p {
    color: #8a9288;
    margin: 0 0 1rem;
}

.home-room-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
}

@media (min-width: 560px) {
    .home-room-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.home-room-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 2px solid rgba(110, 182, 224, 0.22);
    background: linear-gradient(160deg, rgba(16, 20, 14, 0.95), rgba(10, 12, 10, 0.98));
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    min-width: 0;
}

.home-room-card:hover {
    transform: translateY(-2px);
    border-color: rgba(110, 182, 224, 0.5);
    box-shadow: 0 0 24px rgba(110, 182, 224, 0.15);
    color: inherit;
}

.home-room-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.home-room-name {
    font-family: "Orbitron", sans-serif;
    font-size: 0.88rem;
    letter-spacing: 0.03em;
    color: #fff;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-status {
    flex-shrink: 0;
    font-family: "Orbitron", sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.22rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
    color: #b4bcb0;
}

.home-status.live {
    color: #9ad4f0;
    border-color: rgba(110, 182, 224, 0.45);
    box-shadow: 0 0 10px rgba(110, 182, 224, 0.2);
    animation: home-status-pulse 1.4s ease-in-out infinite;
}

.home-status.hot {
    color: #1a1000;
    background: linear-gradient(135deg, #8ec8e8, #ff9a3c);
    border-color: transparent;
}

.home-status.done {
    color: #7ec8d8;
    border-color: rgba(126, 200, 216, 0.4);
}

.home-status.idle {
    color: #b8c8a8;
    border-color: rgba(160, 180, 140, 0.35);
}

@keyframes home-status-pulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

.home-room-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    font-size: 0.88rem;
    color: #8a9288;
}

.home-room-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ad4f0;
    background: rgba(18, 28, 8, 0.55);
    border: 1px solid rgba(110, 182, 224, 0.3);
    padding: 0.12rem 0.45rem;
    border-radius: 0.35rem;
    text-shadow: 0 0 8px rgba(110, 182, 224, 0.35);
}

.home-room-set {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: #b8c0b4;
    min-width: 0;
}

.home-room-set img {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.home-room-set span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-room-set.muted {
    color: #6a7268;
    font-style: italic;
}

.home-room-enter {
    margin-top: 0.15rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: #6eb6e0;
    opacity: 0.75;
}

.home-room-card:hover .home-room-enter {
    opacity: 1;
}

.home-footer-pitch {
    text-align: center;
    padding: 0.5rem 0.25rem 0;
}

.home-footer-pitch p {
    margin: 0;
    color: #6a7268;
    font-size: 0.88rem;
    line-height: 1.45;
}

/* =========================================================
   Profile page — player card
   ========================================================= */
.content:has(.profile-page) {
    max-width: min(920px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.profile-loading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #8a9288;
    padding: 1rem 0;
}

.profile-loading .pl-bar {
    width: 0.28rem;
    height: 0.7rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #6eb6e0, #6eb6e0);
    animation: home-eq 0.9s ease-in-out infinite;
}

.profile-loading .pl-bar:nth-child(2) { animation-delay: 0.12s; }
.profile-loading .pl-bar:nth-child(3) { animation-delay: 0.24s; }

.profile-hero-v2 {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    border-color: rgba(110, 182, 224, 0.4) !important;
    animation: history-card-in 0.4s ease both;
}

.profile-hero-v2-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.phv-orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.45;
    animation: home-orb-drift 8s ease-in-out infinite;
}

.phv-orb.a {
    width: 8rem;
    height: 8rem;
    top: -2rem;
    right: 10%;
    background: radial-gradient(circle, rgba(110, 182, 224, 0.45), transparent 70%);
}

.phv-orb.b {
    width: 5rem;
    height: 5rem;
    bottom: -1rem;
    left: 5%;
    background: radial-gradient(circle, rgba(110, 182, 224, 0.35), transparent 70%);
    animation-delay: -2s;
}

.profile-hero-v2-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
}

.profile-avatar-frame.lg {
    width: 5.75rem;
    height: 5.75rem;
    border-radius: 1.15rem;
}

.profile-hero-v2-text {
    flex: 1 1 12rem;
    min-width: 0;
}

.profile-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    color: #9ad4f0;
    margin-bottom: 0.3rem;
}

.profile-live-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #7ec8d8;
    box-shadow: 0 0 8px #7ec8d8;
    animation: home-live-blink 1.1s ease-in-out infinite;
}

.profile-display-name {
    margin: 0 0 0.25rem;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.25rem, 4vw, 1.65rem);
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow: 0 0 16px rgba(110, 182, 224, 0.3);
}

.profile-email {
    margin: 0 0 0.45rem;
    color: #8a9288;
    font-size: 0.9rem;
}

.profile-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.profile-icon-tag,
.profile-last-tag {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #b4bcb0;
    background: rgba(0, 0, 0, 0.3);
}

.profile-rank-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.profile-rank-glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle, rgba(142, 200, 232, 0.25), transparent 65%);
    pointer-events: none;
}

.profile-rank-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    z-index: 1;
}

.profile-rank-meta strong {
    font-family: "Orbitron", sans-serif;
    font-size: 0.95rem;
    color: #fff;
}

.profile-xp-strip {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-level-bar-wrap.tall {
    height: 0.7rem;
    margin-bottom: 0.4rem;
}

.profile-xp-labels {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #8a9288;
}

.profile-section {
    margin-bottom: 1rem;
    animation: history-card-in 0.4s ease both;
}

.profile-section-head {
    margin-bottom: 0.85rem;
}

.profile-section-head h2 {
    margin: 0 0 0.2rem;
}

.profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

@media (min-width: 560px) {
    .profile-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.profile-stat-card {
    text-align: center;
    padding: 0.75rem 0.45rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
    transition: border-color 0.12s ease, transform 0.12s ease;
}

.profile-stat-card:hover {
    border-color: rgba(110, 182, 224, 0.35);
    transform: translateY(-1px);
}

.profile-stat-card.hot {
    border-color: rgba(142, 200, 232, 0.4);
    background: rgba(24, 32, 8, 0.45);
}

.profile-stat-card .psc-val {
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 1.35rem;
    color: #9ad4f0;
    line-height: 1.1;
}

.profile-stat-card.hot .psc-val {
    color: #8ec8e8;
    text-shadow: 0 0 12px rgba(142, 200, 232, 0.3);
}

.profile-stat-card .psc-lbl {
    font-size: 0.7rem;
    color: #8a9288;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}

.profile-meters {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.profile-meter .pm-top,
.pps-meter {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    font-size: 0.88rem;
    color: #b8c0b4;
}

.profile-meter .pm-top strong,
.pps-meter strong {
    font-family: "Orbitron", sans-serif;
    color: #fff;
}

.pm-bar-wrap {
    height: 0.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.pm-bar {
    height: 100%;
    border-radius: 999px;
    min-width: 2%;
    transition: width 0.55s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.pm-bar.energy {
    background: linear-gradient(90deg, #6eb6e0, #5aa0c8);
    box-shadow: 0 0 10px rgba(110, 182, 224, 0.35);
}

.pm-bar.mon {
    background: linear-gradient(90deg, #6eb6e0, #9ad4f0);
    box-shadow: 0 0 10px rgba(110, 182, 224, 0.35);
}

.pm-bar.perfect {
    background: linear-gradient(90deg, #8ec8e8, #7ec8d8);
    box-shadow: 0 0 10px rgba(142, 200, 232, 0.35);
}

.profile-meter small {
    display: block;
    margin-top: 0.25rem;
    color: #6a7268;
    font-size: 0.75rem;
}

.profile-chase-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.profile-chase-chip {
    text-align: center;
    padding: 0.85rem 0.5rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.profile-chase-chip .pcc-val {
    display: block;
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.1;
}

.profile-chase-chip .pcc-lbl {
    display: block;
    font-size: 0.72rem;
    color: #b8c0b4;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-chase-chip .pcc-pts {
    display: block;
    font-size: 0.68rem;
    color: #6a7268;
    margin-top: 0.15rem;
}

.profile-chase-chip.sir {
    border-color: rgba(142, 200, 232, 0.45);
    background: rgba(24, 32, 8, 0.5);
}

.profile-chase-chip.sir .pcc-val { color: #8ec8e8; }

.profile-chase-chip.ir {
    border-color: rgba(200, 255, 100, 0.4);
    background: rgba(18, 24, 14, 0.55);
}

.profile-chase-chip.ir .pcc-val { color: #9ad4f0; }

.profile-chase-chip.ultra {
    border-color: rgba(160, 180, 140, 0.4);
    background: rgba(18, 22, 14, 0.55);
}

.profile-chase-chip.ultra .pcc-val { color: #b8c8a8; }

.profile-highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.profile-highlight {
    padding: 0.7rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
    min-width: 0;
}

.profile-highlight.wide {
    grid-column: 1 / -1;
}

.profile-highlight .ph-label {
    display: block;
    font-family: "Orbitron", sans-serif;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a9288;
    margin-bottom: 0.25rem;
}

.profile-highlight strong {
    font-size: 0.95rem;
    color: #fff;
    word-break: break-word;
}

.profile-highlight .ph-sub {
    display: block;
    font-size: 0.78rem;
    color: #6a7268;
    font-weight: 500;
    margin-top: 0.15rem;
}

.profile-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* In-room player profile sheet extras */
.pps-card-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(142, 200, 232, 0.3);
    background: linear-gradient(135deg, rgba(40, 24, 10, 0.55), rgba(16, 12, 32, 0.8));
}

.pps-rank-icon {
    flex-shrink: 0;
    line-height: 0;
}

.pps-rank-copy {
    flex: 1;
    min-width: 0;
}

.pps-meters {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.pps-meter .pm-bar-wrap {
    margin-top: 0.2rem;
}

.player-stat-pill.chase-sir strong { color: #8ec8e8; }
.player-stat-pill.chase-ir strong { color: #9ad4f0; }
.player-stat-pill.chase-ur strong { color: #b8c8a8; }

@media (max-width: 540px) {
    .profile-hero-v2-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-rank-showcase {
        margin-left: 0;
    }

    .profile-tag-row {
        justify-content: center;
    }

    .profile-xp-labels {
        justify-content: center;
        text-align: center;
    }

    .profile-chase-row {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   History — session archive
   ========================================================= */
.content:has(.history-page) {
    max-width: min(960px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.history-page {
    padding-bottom: 1.5rem;
}

.history-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1.15rem;
    margin-bottom: 1rem;
    border-radius: 1.15rem;
    border: 2px solid rgba(142, 200, 232, 0.35);
    background:
        radial-gradient(ellipse 80% 80% at 0% 0%, rgba(142, 200, 232, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 70% 70% at 100% 50%, rgba(110, 182, 224, 0.16) 0%, transparent 50%),
        linear-gradient(155deg, rgba(36, 20, 12, 0.98), rgba(12, 8, 28, 0.99));
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), 0 0 28px rgba(110, 182, 224, 0.1);
}

.history-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hh-orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: home-orb-drift 8s ease-in-out infinite;
}

.hh-orb.a {
    width: 6rem;
    height: 6rem;
    top: -1rem;
    right: 15%;
    background: radial-gradient(circle, rgba(142, 200, 232, 0.5), transparent 70%);
}

.hh-orb.b {
    width: 4rem;
    height: 4rem;
    bottom: 0;
    left: 8%;
    background: radial-gradient(circle, rgba(110, 182, 224, 0.35), transparent 70%);
    animation-delay: -2.5s;
}

.history-hero-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.05) 2px, rgba(0, 0, 0, 0.05) 4px
    );
    opacity: 0.45;
}

.history-hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.history-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #8ec8e8;
    margin-bottom: 0.4rem;
}

.history-live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #8ec8e8;
    box-shadow: 0 0 10px #8ec8e8;
    animation: home-live-blink 1.2s ease-in-out infinite;
}

.history-title {
    margin: 0 0 0.4rem;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    letter-spacing: 0.05em;
    color: #fff;
    text-shadow: 0 0 16px rgba(142, 200, 232, 0.3);
}

.history-lead {
    margin: 0;
    color: #b8c0b4;
    font-size: 0.98rem;
    max-width: 28rem;
}

.history-hero-art {
    position: relative;
    z-index: 1;
    width: 5.5rem;
    height: 5rem;
}

.history-hero-art .hha-card {
    position: absolute;
    width: 2.4rem;
    height: 3.3rem;
    border-radius: 0.3rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    animation: home-pack-float 3.2s ease-in-out infinite;
}

.history-hero-art .c1 {
    left: 0;
    top: 0.6rem;
    background: linear-gradient(145deg, #8ec8e8, #a06010);
    z-index: 3;
}

.history-hero-art .c2 {
    left: 1.4rem;
    top: 0.2rem;
    background: linear-gradient(145deg, #6eb6e0, #2a3814);
    z-index: 2;
    animation-delay: 0.25s;
}

.history-hero-art .c3 {
    left: 2.8rem;
    top: 0.8rem;
    background: linear-gradient(145deg, #6eb6e0, #106080);
    z-index: 1;
    animation-delay: 0.5s;
}

.history-loading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #8a9288;
    padding: 1rem 0;
}

.history-loading .hl-bar {
    width: 0.28rem;
    height: 0.7rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #8ec8e8, #6eb6e0);
    animation: home-eq 0.9s ease-in-out infinite;
}

.history-loading .hl-bar:nth-child(2) { animation-delay: 0.12s; }
.history-loading .hl-bar:nth-child(3) { animation-delay: 0.24s; }

.history-empty {
    text-align: center;
    padding: 1.75rem 1.15rem !important;
}

.history-empty-art {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.hea-pack {
    width: 2.5rem;
    height: 3.4rem;
    border-radius: 0.35rem;
    background: linear-gradient(145deg, #3a1a6e, #0e120e);
    border: 2px solid rgba(142, 200, 232, 0.4);
    box-shadow: 0 0 18px rgba(142, 200, 232, 0.2);
    animation: home-pack-float 2.8s ease-in-out infinite;
}

.history-empty h2 {
    font-family: "Orbitron", sans-serif;
    margin: 0 0 0.4rem;
    color: #fff;
}

.history-empty p {
    color: #8a9288;
    margin: 0 0 1rem;
}

/* Career strip */
.history-career {
    margin-bottom: 1.25rem;
    border-color: rgba(142, 200, 232, 0.3) !important;
    animation: history-card-in 0.4s ease both;
}

.history-career-head {
    margin-bottom: 0.85rem;
}

.history-career-head h2 {
    margin: 0 0 0.2rem;
}

.history-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

@media (min-width: 560px) {
    .history-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.history-stat {
    text-align: center;
    padding: 0.75rem 0.5rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
}

.history-stat.highlight {
    border-color: rgba(142, 200, 232, 0.4);
    background: rgba(24, 32, 8, 0.45);
}

.history-stat-val {
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 1.45rem;
    color: #9ad4f0;
    line-height: 1.1;
}

.history-stat.highlight .history-stat-val {
    color: #8ec8e8;
    text-shadow: 0 0 12px rgba(142, 200, 232, 0.35);
}

.history-stat-lbl {
    font-size: 0.72rem;
    color: #8a9288;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.2rem;
}

.history-best-night {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.75rem;
    margin-top: 0.85rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(110, 182, 224, 0.3);
    background: rgba(30, 12, 40, 0.5);
    font-size: 0.9rem;
}

.history-best-night .hbn-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9ad4f0;
}

.history-best-night strong {
    color: #fff;
}

.history-best-night .hbn-pts {
    margin-left: auto;
    font-family: "Orbitron", sans-serif;
    color: #8ec8e8;
    font-size: 0.85rem;
}

.history-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.history-section-head h2 {
    margin: 0;
}

.history-count-chip {
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(110, 182, 224, 0.35);
    color: #9ad4f0;
    background: rgba(16, 24, 8, 0.5);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-session {
    animation: history-card-in 0.45s ease both;
    border-color: rgba(110, 182, 224, 0.22) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.history-session:nth-child(1) { animation-delay: 0.05s; }
.history-session:nth-child(2) { animation-delay: 0.1s; }
.history-session:nth-child(3) { animation-delay: 0.15s; }
.history-session:nth-child(4) { animation-delay: 0.2s; }
.history-session:nth-child(n+5) { animation-delay: 0.25s; }

.history-session:hover {
    border-color: rgba(110, 182, 224, 0.4) !important;
    box-shadow: 0 0 24px rgba(110, 182, 224, 0.12);
}

@keyframes history-card-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.history-session-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.history-session-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.history-session-name {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    color: #fff;
}

.history-status {
    font-family: "Orbitron", sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
    color: #b4bcb0;
}

.history-status.live { color: #9ad4f0; border-color: rgba(110, 182, 224, 0.45); }
.history-status.hot {
    color: #1a1000;
    background: linear-gradient(135deg, #8ec8e8, #ff9a3c);
    border-color: transparent;
}
.history-status.done { color: #7ec8d8; border-color: rgba(126, 200, 216, 0.4); }
.history-status.closed { color: #8a9288; border-color: rgba(120, 120, 140, 0.4); }

.history-session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.85rem;
    color: #8a9288;
}

.history-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ad4f0;
    background: rgba(18, 28, 8, 0.55);
    border: 1px solid rgba(110, 182, 224, 0.25);
    padding: 0.08rem 0.4rem;
    border-radius: 0.3rem;
}

.history-you-won {
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    color: #1a1000;
    background: linear-gradient(135deg, #8ec8e8, #ff9a3c);
    box-shadow: 0 0 16px rgba(110, 182, 224, 0.4);
    animation: hot-chip 1.6s ease-in-out infinite;
    white-space: nowrap;
}

/* Podium */
.history-podium {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

@media (min-width: 520px) {
    .history-podium {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .history-podium-slot.place-1 {
        order: 2;
        transform: translateY(-4px);
    }

    .history-podium-slot.place-2 { order: 1; }
    .history-podium-slot.place-3 { order: 3; }
}

.history-podium-slot {
    text-align: center;
    padding: 0.7rem 0.5rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    transition: border-color 0.12s ease, transform 0.12s ease;
}

.history-podium-slot.place-1 {
    border-color: rgba(142, 200, 232, 0.45);
    background: linear-gradient(180deg, rgba(50, 36, 8, 0.75), rgba(12, 10, 24, 0.9));
    box-shadow: 0 0 18px rgba(110, 182, 224, 0.15);
}

.history-podium-slot.place-2 {
    border-color: rgba(192, 200, 216, 0.35);
}

.history-podium-slot.place-3 {
    border-color: rgba(200, 120, 60, 0.35);
}

.history-podium-slot.is-me {
    box-shadow: 0 0 0 1px rgba(110, 182, 224, 0.45), 0 0 16px rgba(110, 182, 224, 0.15);
}

.hps-place {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.hps-name {
    font-family: "Orbitron", sans-serif;
    font-size: 0.78rem;
    color: #fff;
    letter-spacing: 0.03em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hps-pts {
    font-family: "Orbitron", sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #8ec8e8;
    margin: 0.15rem 0;
}

.hps-pts small {
    font-size: 0.65rem;
    color: #8a9288;
    font-weight: 600;
}

.hps-hits {
    font-size: 0.72rem;
    color: #8a9288;
}

.history-my-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(110, 182, 224, 0.25);
    background: rgba(16, 24, 8, 0.4);
    font-size: 0.9rem;
}

.history-my-row .hmr-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ad4f0;
}

.history-my-row strong {
    color: #fff;
    font-family: "Orbitron", sans-serif;
}

/* Pull chips */
.history-pulls {
    margin-bottom: 0.85rem;
}

.history-pulls-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a9288;
    margin-bottom: 0.45rem;
}

.history-pull-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.history-pull-chip {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 6.5rem;
    max-width: 11rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(110, 182, 224, 0.28);
    background: rgba(20, 10, 36, 0.75);
    animation: history-chip-in 0.35s ease both;
}

.history-pull-chip:nth-child(1) { animation-delay: 0.05s; }
.history-pull-chip:nth-child(2) { animation-delay: 0.1s; }
.history-pull-chip:nth-child(3) { animation-delay: 0.15s; }
.history-pull-chip:nth-child(4) { animation-delay: 0.2s; }
.history-pull-chip:nth-child(n+5) { animation-delay: 0.25s; }

@keyframes history-chip-in {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.hpc-energy {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8a9288;
}

.hpc-energy.energy-fire { color: #7eb8d8; }
.hpc-energy.energy-water { color: #7ec8ff; }
.hpc-energy.energy-grass { color: #9af06a; }
.hpc-energy.energy-lightning { color: #ffe566; }
.hpc-energy.energy-psychic { color: #e9b3ff; }
.hpc-energy.energy-fighting { color: #f0c09a; }
.hpc-energy.energy-darkness { color: #c8c8e0; }
.hpc-energy.energy-colorless { color: #e8e8f0; }

.hpc-mon {
    font-size: 0.85rem;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hpc-set {
    font-size: 0.68rem;
    color: #6a7268;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-no-pulls {
    margin: 0 0 0.75rem;
    color: #6a7268;
    font-size: 0.88rem;
    font-style: italic;
}

.history-session-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 540px) {
    .history-hero {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .history-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .history-best-night .hbn-pts {
        margin-left: 0;
    }

    .history-session-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .history-session-foot .btn {
        width: 100%;
    }
}

/* =========================================================
   Rooms hub — create + join + active list
   ========================================================= */
.content:has(.rooms-hub) {
    max-width: min(960px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.rooms-hub {
    padding-bottom: 1.5rem;
}

.rooms-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1.15rem;
    margin-bottom: 1rem;
    border-radius: 1.15rem;
    border: 2px solid rgba(110, 182, 224, 0.35);
    background:
        radial-gradient(ellipse 80% 80% at 10% 0%, rgba(110, 182, 224, 0.16) 0%, transparent 55%),
        radial-gradient(ellipse 70% 70% at 100% 40%, rgba(110, 182, 224, 0.18) 0%, transparent 50%),
        linear-gradient(155deg, rgba(32, 14, 56, 0.98), rgba(10, 8, 24, 0.99));
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), 0 0 28px rgba(110, 182, 224, 0.1);
}

.rooms-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.rh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0.5;
    animation: home-orb-drift 7s ease-in-out infinite;
}

.rh-orb.a {
    width: 6rem;
    height: 6rem;
    top: -1rem;
    right: 20%;
    background: radial-gradient(circle, rgba(142, 200, 232, 0.45), transparent 70%);
}

.rh-orb.b {
    width: 4.5rem;
    height: 4.5rem;
    bottom: -0.5rem;
    left: 10%;
    background: radial-gradient(circle, rgba(110, 182, 224, 0.4), transparent 70%);
    animation-delay: -2s;
}

.rooms-hero-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.05) 2px, rgba(0, 0, 0, 0.05) 4px
    );
    opacity: 0.45;
}

.rooms-hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.rooms-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #9ad4f0;
    margin-bottom: 0.4rem;
}

.rooms-live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #7ec8d8;
    box-shadow: 0 0 10px #7ec8d8;
    animation: home-live-blink 1.1s ease-in-out infinite;
}

.rooms-title {
    margin: 0 0 0.4rem;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    letter-spacing: 0.05em;
    color: #fff;
    text-shadow: 0 0 16px rgba(110, 182, 224, 0.35);
}

.rooms-lead {
    margin: 0;
    color: #b8c0b4;
    font-size: 0.98rem;
    max-width: 28rem;
}

.rooms-hero-pack {
    position: relative;
    z-index: 1;
    width: 5.5rem;
    height: 5.5rem;
}

.rooms-pack-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.rooms-pack-stack .rps {
    position: absolute;
    width: 2.6rem;
    height: 3.5rem;
    border-radius: 0.35rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    animation: home-pack-float 3s ease-in-out infinite;
}

.rooms-pack-stack .r1 {
    left: 0.4rem;
    top: 0.6rem;
    background: linear-gradient(145deg, #6eb6e0, #2a3814);
    z-index: 3;
}

.rooms-pack-stack .r2 {
    left: 1.3rem;
    top: 0.35rem;
    background: linear-gradient(145deg, #6eb6e0, #106080);
    z-index: 2;
    animation-delay: 0.2s;
}

.rooms-pack-stack .r3 {
    left: 2.2rem;
    top: 0.9rem;
    background: linear-gradient(145deg, #8ec8e8, #a06010);
    z-index: 1;
    animation-delay: 0.4s;
}

/* Mode switch */
.rooms-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.rooms-mode-btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    border-radius: 1rem;
    border: 2px solid rgba(120, 100, 180, 0.35);
    background: rgba(16, 12, 32, 0.85);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.1s ease, background 0.12s ease;
    touch-action: manipulation;
    min-width: 0;
}

.rooms-mode-btn:hover {
    border-color: rgba(110, 182, 224, 0.45);
    transform: translateY(-1px);
}

.rooms-mode-btn.active {
    border-color: rgba(142, 200, 232, 0.55);
    background: linear-gradient(135deg, rgba(48, 28, 8, 0.9), rgba(24, 14, 40, 0.95));
    box-shadow: 0 0 22px rgba(110, 182, 224, 0.2);
}

.rooms-mode-btn.active .rmb-text strong {
    color: #8ec8e8;
}

.rmb-icon {
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 1rem;
}

.rmb-icon.create {
    background: linear-gradient(145deg, #6eb6e0, #0080a0);
    color: #041018;
    box-shadow: 0 0 12px rgba(110, 182, 224, 0.35);
}

.rmb-icon.join {
    background: linear-gradient(145deg, #9ad4f0, #2a5570);
    color: #fff;
    box-shadow: 0 0 12px rgba(110, 182, 224, 0.35);
}

.rmb-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.rmb-text strong {
    font-family: "Orbitron", sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: #fff;
}

.rmb-text small {
    color: #8a9288;
    font-size: 0.78rem;
}

.rooms-form-stage {
    margin-bottom: 1.25rem;
    border-color: rgba(110, 182, 224, 0.3) !important;
}

.rooms-form-head {
    margin-bottom: 1rem;
}

.rooms-form-head h2 {
    margin: 0 0 0.25rem;
}

.rooms-code-input {
    text-align: center;
    font-size: 1.35rem !important;
    letter-spacing: 0.28em !important;
    text-transform: uppercase;
    font-weight: 700;
}

.rooms-submit {
    margin-top: 0.25rem;
    animation: cta-glow 2s ease-in-out infinite;
}

.rooms-submit.join-cta {
    background: linear-gradient(180deg, #ff8ad8 0%, #e040a0 45%, #a01860 100%) !important;
    border-color: #ffb0e8 !important;
    color: #fff !important;
    box-shadow: 0 4px 0 #601040, 0 0 18px rgba(110, 182, 224, 0.35) !important;
}

/* Active rooms */
.rooms-active-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.rooms-active-head h2 {
    margin: 0 0 0.2rem;
}

.rooms-active-sub {
    margin: 0;
    color: #8a9288;
    font-size: 0.9rem;
}

.rooms-count-chip {
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(126, 200, 216, 0.4);
    color: #7ec8d8;
    background: rgba(10, 30, 20, 0.6);
    box-shadow: 0 0 12px rgba(126, 200, 216, 0.15);
}

.rooms-loading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #8a9288;
    padding: 0.75rem 0;
}

.rooms-loading .rl-bar {
    width: 0.28rem;
    height: 0.7rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #6eb6e0, #6eb6e0);
    animation: home-eq 0.9s ease-in-out infinite;
}

.rooms-loading .rl-bar:nth-child(2) { animation-delay: 0.12s; }
.rooms-loading .rl-bar:nth-child(3) { animation-delay: 0.24s; }

.rooms-empty {
    text-align: center;
    padding: 1.5rem 1.1rem !important;
}

.rooms-empty-art {
    display: flex;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.rea-pack {
    width: 2.4rem;
    height: 3.3rem;
    border-radius: 0.35rem;
    background: linear-gradient(145deg, #3a1a6e, #0e120e);
    border: 2px solid rgba(110, 182, 224, 0.4);
    box-shadow: 0 0 18px rgba(110, 182, 224, 0.25);
    animation: home-pack-float 2.8s ease-in-out infinite;
}

.rooms-empty h3 {
    font-family: "Orbitron", sans-serif;
    font-size: 0.95rem;
    color: #fff;
    margin: 0 0 0.4rem;
}

.rooms-empty p {
    color: #8a9288;
    margin: 0 0 1rem;
}

.rooms-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.rooms-active-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
}

@media (min-width: 560px) {
    .rooms-active-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.rooms-active-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 2px solid rgba(110, 182, 224, 0.22);
    background: linear-gradient(160deg, rgba(16, 20, 14, 0.95), rgba(10, 12, 10, 0.98));
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
    min-width: 0;
}

.rooms-active-card:hover {
    transform: translateY(-2px);
    border-color: rgba(110, 182, 224, 0.5);
    box-shadow: 0 0 24px rgba(110, 182, 224, 0.15);
    color: inherit;
}

.rooms-active-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.rooms-active-name {
    font-family: "Orbitron", sans-serif;
    font-size: 0.88rem;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.rooms-status {
    flex-shrink: 0;
    font-family: "Orbitron", sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.22rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
    color: #b4bcb0;
}

.rooms-status.live {
    color: #9ad4f0;
    border-color: rgba(110, 182, 224, 0.45);
    animation: home-status-pulse 1.4s ease-in-out infinite;
}

.rooms-status.hot {
    color: #1a1000;
    background: linear-gradient(135deg, #8ec8e8, #ff9a3c);
    border-color: transparent;
}

.rooms-status.done {
    color: #7ec8d8;
    border-color: rgba(126, 200, 216, 0.4);
}

.rooms-active-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
    font-size: 0.88rem;
    color: #8a9288;
}

.rooms-active-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ad4f0;
    background: rgba(18, 28, 8, 0.55);
    border: 1px solid rgba(110, 182, 224, 0.3);
    padding: 0.12rem 0.45rem;
    border-radius: 0.35rem;
}

.rooms-active-set {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: #b8c0b4;
    min-width: 0;
}

.rooms-active-set img {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.rooms-active-set span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rooms-active-set.muted {
    color: #6a7268;
    font-style: italic;
}

.rooms-active-enter {
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: #6eb6e0;
    opacity: 0.75;
}

.rooms-active-card:hover .rooms-active-enter {
    opacity: 1;
}

@media (max-width: 540px) {
    .rooms-hero {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .rooms-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .rooms-mode-btn {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
        padding: 0.75rem;
    }

    .rmb-text small {
        display: none;
    }
}

@media (max-width: 540px) {
    .home-hero {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        padding: 1.15rem 0.95rem 1.1rem;
    }

    .home-hero-stage {
        margin: 0 auto;
    }

    .home-tagline {
        margin-left: auto;
        margin-right: auto;
    }

    .home-kicker {
        justify-content: center;
    }

    .home-guest-banner {
        flex-direction: column;
        text-align: center;
    }

    .home-guest-actions {
        justify-content: center;
        width: 100%;
    }

    .home-guest-actions .btn {
        flex: 1 1 auto;
    }

    .home-score-chips {
        gap: 0.4rem;
    }

    .home-score-chip .hsc-val {
        font-size: 1.15rem;
    }

    .home-score-chip .hsc-lbl {
        font-size: 0.62rem;
    }
}

.code, .code-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.code {
    background: #242b48;
    padding: 0.1rem 0.4rem;
    border-radius: 0.35rem;
    color: #c7d2ff;
}

.badge-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: #d0d6cc;
    background: #2d3560;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    white-space: nowrap;
}

.room-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.room-header-main {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    min-width: 0;
}

.room-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.pack-logo {
    width: 64px;
    height: auto;
    max-height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.pack-logo-lg {
    width: 96px;
    height: auto;
    max-height: 72px;
    object-fit: contain;
    flex-shrink: 0;
    background: #0a0e12;
    border-radius: 0.5rem;
    padding: 0.35rem;
}

.pack-current-info {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    min-width: 0;
}

.set-card-logo {
    display: block;
    width: 100%;
    max-height: 40px;
    object-fit: contain;
    margin-bottom: 0.35rem;
}

.price-block {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-top: 0.25rem;
    padding: 0.3rem 0.4rem;
    background: #10141a;
    border-radius: 0.4rem;
    border: 1px solid #222822;
    width: 100%;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.72rem;
    line-height: 1.25;
}

.price-label {
    color: #7a8278;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.65rem;
}

.price-val {
    color: #9dffb8;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.price-val.psa {
    color: #8ec8e8;
}

.price-val.est {
    color: #e0c56a;
}

.price-val.muted {
    color: #6a7268;
    font-weight: 500;
}

.chase-chip .price-block {
    max-width: 100%;
    padding: 0.2rem 0.3rem;
}

.chase-chip .price-row {
    font-size: 0.68rem;
}

.tag.pts {
    background: #2a3560;
    color: #c7d2ff;
}

.profile-hero-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.profile-avatar {
    border-radius: 0.75rem;
    box-shadow: 0 0 0 2px #3a4270;
}

/* —— Profile avatar picker —— */
.profile-avatar-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: inherit;
    flex-shrink: 0;
    touch-action: manipulation;
}

.profile-avatar-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.75rem;
    height: 4.75rem;
    border-radius: 1rem;
    border: 2px solid rgba(110, 182, 224, 0.45);
    background: rgba(0, 0, 0, 0.35);
    box-shadow:
        0 0 18px rgba(110, 182, 224, 0.2),
        0 6px 16px rgba(0, 0, 0, 0.35);
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
    overflow: hidden;
}

.profile-avatar-btn:hover .profile-avatar-frame {
    border-color: #8ec8e8;
    box-shadow: 0 0 22px rgba(142, 200, 232, 0.3);
    transform: translateY(-1px);
}

.profile-avatar-edit {
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ad4f0;
}

.profile-avatar-name {
    font-size: 0.9rem;
}

.profile-hero-text {
    min-width: 0;
}

.user-avatar-svg {
    display: block;
    border-radius: 50%;
}

.avatar-picker-panel {
    border-color: rgba(110, 182, 224, 0.4) !important;
    animation: avatar-picker-in 0.2s ease;
}

@keyframes avatar-picker-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.avatar-picker-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.avatar-picker-head h2 {
    margin: 0;
}

.avatar-preview-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(110, 182, 224, 0.25);
    background: rgba(0, 0, 0, 0.28);
}

.avatar-preview-frame {
    display: flex;
    flex-shrink: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0 16px rgba(110, 182, 224, 0.2);
}

.avatar-preview-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a9288;
}

.avatar-preview-name {
    font-family: "Orbitron", sans-serif;
    font-size: 1rem;
    color: #8ec8e8;
    letter-spacing: 0.04em;
}

.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

@media (max-width: 520px) {
    .avatar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.avatar-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.35rem 0.5rem;
    border-radius: 0.85rem;
    border: 2px solid #2a323c;
    background: #151a30;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.1s ease;
    touch-action: manipulation;
    min-width: 0;
}

.avatar-option:hover {
    border-color: rgba(110, 182, 224, 0.55);
    transform: translateY(-1px);
}

.avatar-option.selected {
    border-color: #8ec8e8;
    box-shadow: 0 0 0 1px #8ec8e8, 0 0 18px rgba(142, 200, 232, 0.25);
    background: rgba(40, 28, 10, 0.55);
}

.avatar-option-name {
    font-size: 0.68rem;
    font-weight: 700;
    color: #b4bcb0;
    text-align: center;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar-option.selected .avatar-option-name {
    color: #8ec8e8;
}

.avatar-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-top: 0.25rem;
}

.avatar-page-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: #8a9288;
    text-transform: uppercase;
}

.player-profile-avatar-frame {
    display: flex;
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(110, 182, 224, 0.4);
    box-shadow: 0 0 12px rgba(110, 182, 224, 0.25);
    background: #10141a;
    align-items: center;
    justify-content: center;
}

.player-profile-avatar-frame .user-avatar-svg {
    width: 52px;
    height: 52px;
}

/* —— Level / XP —— */
.rank-badge-svg {
    display: block;
    border-radius: 50%;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.personal-xp-panel {
    position: relative;
    margin-top: 1.15rem;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(110, 182, 224, 0.3);
    background: linear-gradient(135deg, rgba(16, 24, 48, 0.95), rgba(24, 12, 40, 0.95));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: personal-xp-in 0.45s ease both;
}

.personal-xp-panel.leveled-up {
    border-color: rgba(142, 200, 232, 0.55);
    box-shadow: 0 0 22px rgba(142, 200, 232, 0.25);
    animation: personal-xp-in 0.45s ease both, personal-xp-levelup 1.2s ease-in-out 2;
}

@keyframes personal-xp-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes personal-xp-levelup {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
}

.personal-xp-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
    flex-wrap: wrap;
}

.personal-xp-badge {
    flex-shrink: 0;
    line-height: 0;
}

.personal-xp-titles {
    flex: 1;
    min-width: 0;
}

.personal-xp-kicker {
    font-family: "Orbitron", sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a9288;
    margin-bottom: 0.15rem;
}

.personal-xp-level-line,
.player-level-line,
.profile-level-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem;
}

.personal-xp-level-line strong,
.player-level-line strong,
.profile-level-line strong {
    font-family: "Orbitron", sans-serif;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: 0.04em;
}

.personal-xp-rank {
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.personal-xp-rank.rank-bronze { color: #e8c080; border-color: rgba(176, 128, 64, 0.5); }
.personal-xp-rank.rank-silver { color: #e0e8f8; border-color: rgba(192, 200, 216, 0.5); }
.personal-xp-rank.rank-gold { color: #8ec8e8; border-color: rgba(240, 196, 0, 0.5); }
.personal-xp-rank.rank-emerald { color: #80ffb0; border-color: rgba(46, 204, 113, 0.5); }
.personal-xp-rank.rank-sapphire { color: #80b0ff; border-color: rgba(58, 138, 255, 0.5); }
.personal-xp-rank.rank-ruby { color: #ffb0c0; border-color: rgba(255, 94, 122, 0.5); }
.personal-xp-rank.rank-diamond { color: #9ad4f0; border-color: rgba(126, 249, 255, 0.5); }
.personal-xp-rank.rank-master { color: #b8c8a8; border-color: rgba(199, 179, 255, 0.5); }
.personal-xp-rank.rank-champion { color: #7ec8ff; border-color: rgba(126, 200, 255, 0.5); }
.personal-xp-rank.rank-legend { color: #8ec8e8; border-color: rgba(142, 200, 232, 0.55); background: rgba(60, 40, 10, 0.4); }
.personal-xp-rank.rank-mythic { color: #9ad4f0; border-color: rgba(200, 255, 100, 0.55); background: rgba(40, 8, 60, 0.45); box-shadow: 0 0 12px rgba(110, 182, 224, 0.2); }

.personal-xp-gain {
    font-family: "Orbitron", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #7ec8d8;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(126, 200, 216, 0.4);
    background: rgba(10, 40, 28, 0.65);
    white-space: nowrap;
}

.personal-xp-gain.levelup {
    color: #1a1000;
    border-color: transparent;
    background: linear-gradient(135deg, #8ec8e8, #ff9a3c);
    animation: hot-chip 1s ease-in-out infinite;
}

.personal-xp-bar-wrap,
.player-level-bar-wrap,
.profile-level-bar-wrap {
    height: 0.55rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-bottom: 0.35rem;
}

.personal-xp-bar,
.player-level-bar,
.profile-level-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #6eb6e0, #6eb6e0 55%, #8ec8e8);
    box-shadow: 0 0 12px rgba(110, 182, 224, 0.4);
    transition: width 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
    min-width: 2%;
}

.personal-xp-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    font-size: 0.78rem;
    color: #8a9288;
}

.player-level-section .player-level-row,
.profile-level-block {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.player-level-row > div,
.profile-level-meta {
    flex: 1;
    min-width: 0;
}

.profile-level-block {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-level-badge,
.player-level-badge {
    flex-shrink: 0;
    line-height: 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.65rem;
}

.stat-card {
    background: #141a22;
    border: 1px solid #2a323c;
    border-radius: 0.85rem;
    padding: 0.85rem 0.9rem;
}

.stat-value {
    font-size: 1.45rem;
    font-weight: 750;
    color: #e8ece6;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    color: #8a9288;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.stat-sub {
    color: #6a7268;
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.text-end {
    text-align: right;
}

/* —— Energy type picker (same SVG symbols as pull result) —— */
.energy-pixel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

.energy-pixel-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 4.5rem;
    padding: 0.55rem 0.25rem 0.45rem;
    border-radius: 0.65rem;
    border: 2px solid #2a323c;
    background: #151a30;
    color: #e8ece6;
    cursor: pointer;
    transition: transform 0.08s ease, border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.energy-pixel-btn:hover {
    transform: translateY(-1px);
    border-color: #7a9a50;
}

.energy-pixel-btn.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px #5a6a50, 0 6px 16px rgba(90, 110, 80, 0.35);
}

.energy-btn-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.energy-btn-symbol .energy-symbol-svg {
    width: 36px;
    height: 36px;
    max-width: 100%;
}

.pixel-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.1;
}

/* Legacy pixel-orb kept if referenced elsewhere */
.pixel-orb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    box-shadow:
        inset -3px -3px 0 rgba(0, 0, 0, 0.35),
        inset 3px 3px 0 rgba(255, 255, 255, 0.35),
        0 0 0 2px #0a0e12;
}

.energy-colorless.selected { background: #1a1e26; }
.energy-fire.selected { background: #3a1a14; }
.energy-water.selected { background: #14243a; }
.energy-grass.selected { background: #14301a; }
.energy-lightning.selected { background: #3a3010; }
.energy-psychic.selected { background: #2a1840; }
.energy-fighting.selected { background: #3a2010; }
.energy-darkness.selected { background: #1a1a28; }

@media (max-width: 420px) {
    .energy-pixel-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.35rem;
    }
    .pixel-label { font-size: 0.58rem; }
    .energy-btn-symbol .energy-symbol-svg {
        width: 32px;
        height: 32px;
    }
    .energy-pixel-btn {
        min-height: 4.25rem;
        padding: 0.4rem 0.15rem 0.35rem;
    }
}

/* —— Reveal celebration —— */
.reveal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(90, 110, 80, 0.35), rgba(15, 18, 32, 0.55) 55%, transparent 70%);
    animation: reveal-fade 2.2s ease forwards;
}

.reveal-burst {
    position: relative;
    text-align: center;
    padding: 1.5rem 2rem;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, #1a2430, #141820);
    border: 2px solid #b8c8a8;
    box-shadow: 0 0 0 4px rgba(90, 110, 80, 0.35), 0 20px 50px rgba(0, 0, 0, 0.45);
    animation: reveal-pop 0.55s cubic-bezier(0.18, 1.2, 0.4, 1) both;
}

.reveal-title {
    font-size: 1.75rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    color: #ffe566;
    text-shadow: 0 0 18px rgba(142, 200, 232, 0.55);
}

.reveal-sub {
    margin-top: 0.35rem;
    color: #d0d6cc;
    font-weight: 600;
}

.reveal-spark {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: #8ec8e8;
    box-shadow: 0 0 8px #8ec8e8;
    animation: spark-fly 1.1s ease-out forwards;
}

.reveal-spark.s1 { top: 20%; left: 10%; animation-delay: 0.05s; }
.reveal-spark.s2 { top: 15%; right: 12%; background: #5a6a50; animation-delay: 0.12s; }
.reveal-spark.s3 { bottom: 18%; left: 18%; background: #7ec8d8; animation-delay: 0.18s; }
.reveal-spark.s4 { bottom: 14%; right: 16%; background: #7ec8ff; animation-delay: 0.08s; }

@keyframes reveal-pop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes reveal-fade {
    0% { opacity: 0; }
    15% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes spark-fly {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx, 40px), var(--dy, -50px)) scale(0.2); opacity: 0; }
}

.reveal-spark.s1 { --dx: -50px; --dy: -40px; }
.reveal-spark.s2 { --dx: 55px; --dy: -35px; }
.reveal-spark.s3 { --dx: -45px; --dy: 40px; }
.reveal-spark.s4 { --dx: 50px; --dy: 45px; }

/* Soft glow on reveal panel when shown after lock-in */
.reveal-panel {
    animation: panel-glow 1.2s ease;
    overflow: hidden;
    position: relative;
}

.reveal-panel.has-scores.scores-hot {
    border-color: rgba(126, 200, 216, 0.5) !important;
    animation: panel-glow 1.2s ease, scores-glow-hot 2.2s ease-in-out infinite alternate,
               scores-panel-pop 0.55s cubic-bezier(0.18, 1.25, 0.4, 1) both;
}

.reveal-panel.has-scores.scores-cold {
    border-color: rgba(255, 70, 90, 0.55) !important;
    animation: panel-glow 1.2s ease, scores-glow-cold 0.85s ease-in-out 4,
               scores-panel-shake 0.65s ease both;
}

.reveal-panel.has-scores.me-scored {
    box-shadow: 0 0 0 1px rgba(126, 200, 216, 0.25), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.reveal-panel.has-scores.me-missed {
    animation: panel-glow 1.2s ease, scores-glow-cold 0.75s ease-in-out 5,
               scores-panel-shake 0.7s ease both;
}

@keyframes scores-glow-hot {
    from { box-shadow: 0 0 0 1px rgba(126, 200, 216, 0.15), 0 10px 30px rgba(0, 0, 0, 0.25); }
    to { box-shadow: 0 0 32px rgba(126, 200, 216, 0.35), 0 0 60px rgba(142, 200, 232, 0.12), 0 10px 30px rgba(0, 0, 0, 0.25); }
}

@keyframes scores-glow-cold {
    0%, 100% { box-shadow: 0 0 0 1px rgba(255, 80, 100, 0.25), 0 10px 30px rgba(0, 0, 0, 0.25); }
    50% { box-shadow: 0 0 36px rgba(255, 40, 70, 0.55), 0 0 12px rgba(255, 0, 40, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25); }
}

@keyframes scores-panel-pop {
    0% { transform: scale(0.97); }
    55% { transform: scale(1.015); }
    100% { transform: scale(1); }
}

@keyframes scores-panel-shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px); }
    30% { transform: translateX(6px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

@keyframes panel-glow {
    0% { box-shadow: 0 0 0 0 rgba(142, 200, 232, 0.0); border-color: #222822; }
    30% { box-shadow: 0 0 28px 4px rgba(142, 200, 232, 0.35); border-color: #8ec8e8; }
    100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); border-color: #222822; }
}

/* Full-panel impact flash (green win / red miss) */
.results-impact-flash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
    opacity: 0;
}

.results-impact-flash.flash-win {
    background:
        radial-gradient(ellipse 90% 70% at 50% 30%, rgba(126, 200, 216, 0.35), transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(142, 200, 232, 0.2), transparent 55%);
    animation: impact-win-flash 1.1s ease-out both;
}

.results-impact-flash.flash-lose {
    background:
        radial-gradient(ellipse 100% 80% at 50% 40%, rgba(255, 40, 70, 0.45), transparent 55%),
        linear-gradient(180deg, rgba(120, 10, 30, 0.35), transparent 70%);
    animation: impact-lose-flash 1.35s ease-out both;
}

@keyframes impact-win-flash {
    0% { opacity: 0; }
    12% { opacity: 1; }
    45% { opacity: 0.55; }
    100% { opacity: 0; }
}

@keyframes impact-lose-flash {
    0% { opacity: 0; }
    8% { opacity: 1; }
    22% { opacity: 0.35; }
    38% { opacity: 0.9; }
    55% { opacity: 0.25; }
    70% { opacity: 0.65; }
    100% { opacity: 0; }
}

/* Confetti rain on scored boards */
.results-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    border-radius: inherit;
}

.rc-piece {
    position: absolute;
    top: -12px;
    left: calc(6% + var(--c, 0) * 6.5%);
    width: 7px;
    height: 10px;
    border-radius: 1px;
    opacity: 0;
    animation: confetti-fall 1.6s cubic-bezier(0.2, 0.7, 0.3, 1) calc(var(--c, 0) * 0.05s + 0.15s) both;
    background: #8ec8e8;
    box-shadow: 0 0 6px currentColor;
}

.rc-piece:nth-child(3n) { background: #7ec8d8; width: 5px; height: 8px; }
.rc-piece:nth-child(3n+1) { background: #6eb6e0; width: 6px; height: 6px; border-radius: 50%; }
.rc-piece:nth-child(3n+2) { background: #6eb6e0; width: 8px; height: 5px; }
.rc-piece:nth-child(4n) { background: #8ec8e8; transform: rotate(25deg); }

@keyframes confetti-fall {
    0% { opacity: 0; transform: translateY(0) rotate(0deg) scale(0.6); }
    12% { opacity: 1; }
    100% { opacity: 0; transform: translateY(220px) rotate(320deg) scale(0.85); }
}

/* Red veins overlay on total bust */
.results-miss-veins {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
    background:
        repeating-linear-gradient(-18deg,
            transparent,
            transparent 18px,
            rgba(255, 40, 70, 0.04) 18px,
            rgba(255, 40, 70, 0.04) 19px);
    animation: miss-veins-pulse 1.2s ease-in-out 3;
}

@keyframes miss-veins-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* —— Results board aesthetics —— */
.results-head {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.results-kicker {
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9ad4f0;
    margin-bottom: 0.25rem;
}

.scores-cold .results-kicker {
    color: #ff8a9a;
    animation: kicker-pulse-red 0.9s ease-in-out 3;
}

.scores-hot .results-kicker {
    color: #7ec8d8;
    text-shadow: 0 0 12px rgba(126, 200, 216, 0.45);
    animation: kicker-pulse-green 1.4s ease-in-out infinite alternate;
}

@keyframes kicker-pulse-green {
    from { opacity: 0.85; letter-spacing: 0.14em; }
    to { opacity: 1; letter-spacing: 0.16em; text-shadow: 0 0 18px rgba(126, 200, 216, 0.7); }
}

@keyframes kicker-pulse-red {
    0%, 100% { opacity: 0.85; text-shadow: none; }
    50% { opacity: 1; text-shadow: 0 0 14px rgba(255, 60, 80, 0.7); }
}

.results-title {
    margin: 0 !important;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}

.scores-hot .results-title {
    animation: title-reward-in 0.55s cubic-bezier(0.18, 1.2, 0.4, 1) both;
}

.scores-cold .results-title {
    animation: title-bust-in 0.5s ease both;
    color: #ffb0bc;
}

@keyframes title-reward-in {
    0% { opacity: 0; transform: translateY(8px) scale(0.96); filter: brightness(1.4); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1); }
}

@keyframes title-bust-in {
    0% { opacity: 0; transform: scale(1.04); filter: brightness(1.5) saturate(1.4); }
    100% { opacity: 1; transform: scale(1); filter: brightness(1) saturate(1); }
}

.results-pack-num {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8a9288;
    letter-spacing: 0.06em;
}

.results-you-toast {
    margin-top: 0.45rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    animation: you-toast-in 0.55s cubic-bezier(0.18, 1.3, 0.4, 1) 0.25s both;
}

.results-you-toast.win {
    border: 1px solid rgba(126, 200, 216, 0.5);
    background: linear-gradient(90deg, rgba(10, 50, 35, 0.95), rgba(20, 40, 28, 0.9));
    color: #b8e4f0;
    box-shadow: 0 0 18px rgba(126, 200, 216, 0.25);
}

.results-you-toast.win strong {
    color: #8ec8e8;
    font-family: "Orbitron", sans-serif;
}

.results-you-toast.lose {
    border: 1px solid rgba(255, 80, 100, 0.55);
    background: linear-gradient(90deg, rgba(36, 12, 14, 0.95), rgba(40, 10, 18, 0.9));
    color: #ffc1cf;
    animation: you-toast-in 0.5s ease 0.2s both, you-toast-red-pulse 0.9s ease-in-out 0.5s 3;
}

.results-you-toast.lose strong {
    color: #ff6a7a;
    font-family: "Orbitron", sans-serif;
}

@keyframes you-toast-in {
    0% { opacity: 0; transform: translateY(8px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes you-toast-red-pulse {
    0%, 100% { box-shadow: 0 0 0 transparent; }
    50% { box-shadow: 0 0 16px rgba(255, 50, 70, 0.45); }
}

.results-total-chip {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 4.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.results-total-chip.hot {
    border-color: rgba(142, 200, 232, 0.55);
    background: linear-gradient(160deg, rgba(55, 38, 8, 0.9), rgba(20, 40, 28, 0.85));
    animation: results-chip-pop 0.65s cubic-bezier(0.18, 1.35, 0.4, 1) both;
}

.results-total-chip.cold {
    border-color: rgba(255, 80, 100, 0.5);
    background: linear-gradient(160deg, rgba(50, 12, 18, 0.9), rgba(30, 8, 14, 0.85));
    animation: results-chip-shake 0.65s ease both;
}

.results-total-chip .rtc-ring {
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid rgba(142, 200, 232, 0.55);
    opacity: 0;
    animation: rtc-ring-expand 0.9s ease 0.2s both;
    pointer-events: none;
}

@keyframes rtc-ring-expand {
    0% { opacity: 0.9; transform: scale(0.85); }
    100% { opacity: 0; transform: scale(1.35); }
}

.results-total-chip .rtc-val {
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 1.45rem;
    line-height: 1;
    color: #8ec8e8;
    position: relative;
    z-index: 1;
}

.results-total-chip.hot .rtc-val {
    animation: rtc-val-bounce 0.7s cubic-bezier(0.18, 1.4, 0.4, 1) 0.15s both;
    text-shadow: 0 0 16px rgba(142, 200, 232, 0.55);
}

.results-total-chip.cold .rtc-val {
    color: #ff8a9a;
    text-shadow: 0 0 12px rgba(255, 60, 80, 0.45);
}

@keyframes rtc-val-bounce {
    0% { transform: scale(0.4); opacity: 0; }
    55% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}

.results-total-chip .rtc-lbl {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8a9288;
    position: relative;
    z-index: 1;
}

@keyframes results-chip-pop {
    0% { transform: scale(0.55) rotate(-6deg); opacity: 0; }
    55% { transform: scale(1.12) rotate(2deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); }
}

@keyframes results-chip-shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-5px) rotate(-1deg); }
    35% { transform: translateX(5px) rotate(1deg); }
    55% { transform: translateX(-4px); }
    75% { transform: translateX(3px); }
}

.results-banner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.6rem 0.95rem;
    margin-bottom: 0.95rem;
    border-radius: 999px;
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

.results-banner.banner-hit {
    border: 1px solid rgba(126, 200, 216, 0.5);
    background: linear-gradient(90deg, rgba(10, 45, 32, 0.95), rgba(30, 55, 40, 0.9), rgba(10, 45, 32, 0.95));
    background-size: 200% 100%;
    color: #7ec8d8;
    animation: banner-hit-in 0.55s ease both, banner-shimmer 2.4s ease-in-out 0.5s infinite;
    box-shadow: 0 0 20px rgba(126, 200, 216, 0.15);
}

.results-banner.banner-miss {
    border: 1px solid rgba(255, 70, 90, 0.55);
    background: linear-gradient(90deg, rgba(55, 10, 20, 0.98), rgba(45, 8, 16, 0.95));
    color: #ff8a9a;
    animation: banner-miss-flash 0.85s ease-in-out 4;
}

@keyframes banner-hit-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes banner-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes banner-miss-flash {
    0%, 100% { filter: brightness(1); box-shadow: 0 0 0 transparent; }
    50% { filter: brightness(1.35); box-shadow: 0 0 24px rgba(255, 40, 70, 0.5); }
}

.results-banner .rb-burst {
    opacity: 0.9;
    animation: rb-spin 1.2s ease both;
}

.banner-hit .rb-burst {
    animation: rb-spin 0.8s ease both, rb-twinkle 1.5s ease-in-out 0.8s infinite;
    color: #8ec8e8;
}

@keyframes rb-spin {
    from { transform: scale(0) rotate(-40deg); opacity: 0; }
    to { transform: scale(1) rotate(0); opacity: 0.9; }
}

@keyframes rb-twinkle {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}

.results-waiting-hint {
    color: #8a9288;
    font-size: 0.9rem;
    margin: 0 0 0.85rem;
    position: relative;
    z-index: 2;
}

.guess-grid.results-grid {
    position: relative;
    z-index: 2;
    gap: 0.85rem;
}

.reveal-panel.has-scores .guess-card {
    position: relative;
    overflow: hidden;
    animation: score-card-in 0.55s cubic-bezier(0.18, 1.15, 0.4, 1) both;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

@keyframes score-card-in {
    0% { opacity: 0; transform: translateY(18px) scale(0.92); filter: blur(2px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.guess-card {
    background: #141a22;
    border: 1px solid #2a323c;
    border-radius: 0.95rem;
    padding: 0.85rem 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.guess-card.is-me {
    box-shadow: 0 0 0 1px rgba(110, 182, 224, 0.4);
}

.guess-card.is-me.scored-up {
    box-shadow: 0 0 0 2px rgba(126, 200, 216, 0.45), 0 0 28px rgba(126, 200, 216, 0.2);
}

.guess-card.is-me.scored-down {
    box-shadow: 0 0 0 2px rgba(255, 70, 90, 0.5), 0 0 24px rgba(255, 40, 70, 0.25);
}

.guess-card.scored-up {
    animation: score-card-in 0.55s cubic-bezier(0.18, 1.15, 0.4, 1) both,
               score-win-pulse 0.85s ease calc(var(--i, 0) * 0.1s + 0.3s) both;
}

.guess-card.scored-down {
    animation: score-card-in 0.55s cubic-bezier(0.18, 1.15, 0.4, 1) both,
               score-lose-flash 1s ease calc(var(--i, 0) * 0.1s + 0.25s) both;
}

.guess-card.pts-mega.scored-up {
    animation: score-card-in 0.55s cubic-bezier(0.18, 1.15, 0.4, 1) both,
               score-win-pulse 0.85s ease calc(var(--i, 0) * 0.1s + 0.3s) both,
               mega-jackpot 1.1s ease calc(var(--i, 0) * 0.1s + 0.35s) both;
}

@keyframes score-win-pulse {
    0% { box-shadow: 0 0 0 0 rgba(126, 200, 216, 0); transform: scale(1); }
    35% { box-shadow: 0 0 28px 6px rgba(126, 200, 216, 0.4); transform: scale(1.02); }
    100% { box-shadow: 0 0 14px rgba(126, 200, 216, 0.15); transform: scale(1); }
}

@keyframes score-lose-flash {
    0% { box-shadow: 0 0 0 transparent; filter: brightness(1); background-color: transparent; }
    15% { box-shadow: 0 0 28px rgba(255, 30, 60, 0.6); filter: brightness(1.35); }
    30% { box-shadow: 0 0 8px rgba(255, 30, 60, 0.2); filter: brightness(0.9); }
    50% { box-shadow: 0 0 24px rgba(255, 40, 70, 0.5); filter: brightness(1.2); }
    100% { box-shadow: 0 0 0 transparent; filter: brightness(1); }
}

@keyframes mega-jackpot {
    0% { filter: brightness(1) saturate(1); }
    30% { filter: brightness(1.35) saturate(1.4); }
    100% { filter: brightness(1) saturate(1); }
}

.guess-card.hit-perfect {
    border-color: #8ec8e8;
    background: linear-gradient(145deg, #2a2410 0%, #163226 55%, #121612 100%);
    box-shadow: 0 0 24px rgba(142, 200, 232, 0.28);
}

.guess-card.hit-pokemon {
    border-color: #35d07f;
    background: linear-gradient(160deg, #163226 0%, #141a22 100%);
}

.guess-card.hit-energy {
    border-color: #f0c14b;
    background: linear-gradient(160deg, #2e2714 0%, #141a22 100%);
}

.guess-card.miss {
    border-color: #8a3048;
    background: linear-gradient(160deg, #2a1520 0%, #1a1220 100%);
}

.guess-card.is-top {
    outline: 1px solid rgba(142, 200, 232, 0.35);
}

.guess-rank-crown {
    position: absolute;
    top: 0.4rem;
    left: 0.45rem;
    z-index: 3;
    font-family: "Orbitron", sans-serif;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #1a1208;
    background: linear-gradient(135deg, #b0daf0, #8ec8e8, #5aa8d0);
    padding: 0.18rem 0.4rem;
    border-radius: 999px;
    box-shadow: 0 0 12px rgba(142, 200, 232, 0.45);
    animation: crown-pop 0.55s cubic-bezier(0.18, 1.4, 0.4, 1) calc(var(--i, 0) * 0.1s + 0.35s) both;
}

@keyframes crown-pop {
    0% { opacity: 0; transform: scale(0.4) translateY(-6px); }
    60% { opacity: 1; transform: scale(1.12) translateY(0); }
    100% { opacity: 1; transform: scale(1); }
}

/* Diagonal shine sweep on winners */
.guess-card-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    border-radius: inherit;
}

.scored-up .guess-card-shine::after {
    content: "";
    position: absolute;
    top: -20%;
    left: -40%;
    width: 40%;
    height: 140%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: skewX(-18deg);
    animation: card-shine-sweep 1s ease calc(var(--i, 0) * 0.1s + 0.4s) both;
}

.hit-perfect .guess-card-shine::after {
    background: linear-gradient(90deg, transparent, rgba(142, 200, 232, 0.28), transparent);
    animation: card-shine-sweep 0.9s ease calc(var(--i, 0) * 0.1s + 0.35s) both,
               card-shine-sweep 2.8s ease 1.6s infinite;
}

@keyframes card-shine-sweep {
    0% { left: -45%; opacity: 0; }
    20% { opacity: 1; }
    100% { left: 120%; opacity: 0; }
}

/* Expanding ring on score */
.guess-ring-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border-radius: 50%;
    border: 2px solid rgba(126, 200, 216, 0.7);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    animation: ring-burst 0.75s ease calc(var(--i, 0) * 0.1s + 0.35s) both;
}

.pts-mega .guess-ring-burst {
    border-color: rgba(142, 200, 232, 0.85);
    box-shadow: 0 0 12px rgba(142, 200, 232, 0.4);
}

@keyframes ring-burst {
    0% { opacity: 0.9; transform: scale(0.4); }
    100% { opacity: 0; transform: scale(8); }
}

/* Red wash on zero-point cards */
.guess-miss-flash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
    background: radial-gradient(ellipse at 50% 40%, rgba(255, 40, 70, 0.45), transparent 65%);
    opacity: 0;
    animation: miss-wash 1s ease calc(var(--i, 0) * 0.1s + 0.2s) both;
}

.is-me.scored-down .guess-miss-flash {
    animation: miss-wash 1s ease calc(var(--i, 0) * 0.1s + 0.2s) both,
               miss-wash 0.7s ease calc(var(--i, 0) * 0.1s + 0.9s) both;
}

@keyframes miss-wash {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; }
}

.guess-card-top {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.guess-card-meta {
    flex: 1;
    min-width: 0;
}

.guess-player-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.92rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.you-chip {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.12rem 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(110, 182, 224, 0.45);
    color: #9ad4f0;
    background: rgba(18, 28, 8, 0.5);
}

.is-me.scored-up .you-chip {
    border-color: rgba(126, 200, 216, 0.55);
    color: #7ec8d8;
    background: rgba(10, 50, 35, 0.7);
    animation: you-chip-glow 1s ease calc(var(--i, 0) * 0.1s + 0.4s) both;
}

.is-me.scored-down .you-chip {
    border-color: rgba(255, 80, 100, 0.55);
    color: #ff8a9a;
    background: rgba(32, 12, 14, 0.7);
}

@keyframes you-chip-glow {
    0%, 100% { box-shadow: 0 0 0 transparent; }
    40% { box-shadow: 0 0 12px rgba(126, 200, 216, 0.55); }
}

.guess-line {
    font-size: 0.85rem;
    color: #b8c0b4;
    line-height: 1.35;
}

.guess-line .gl-label {
    display: inline-block;
    min-width: 3.2rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6a7268;
    margin-right: 0.25rem;
}

.card-thumb.thumb-win {
    animation: thumb-win-pop 0.55s cubic-bezier(0.18, 1.3, 0.4, 1) calc(var(--i, 0) * 0.1s + 0.3s) both;
    box-shadow: 0 0 14px rgba(126, 200, 216, 0.35);
}

.card-thumb.thumb-lose {
    animation: thumb-lose-dim 0.6s ease calc(var(--i, 0) * 0.1s + 0.25s) both;
    filter: saturate(0.65) brightness(0.85);
}

@keyframes thumb-win-pop {
    0% { transform: scale(0.85); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes thumb-lose-dim {
    0% { filter: saturate(1) brightness(1.1); }
    100% { filter: saturate(0.65) brightness(0.85); }
}

.card-thumb-empty {
    width: 52px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.35rem;
    background: #10141a;
    border: 1px dashed #2a323c;
    color: #6a7268;
    font-weight: 700;
    flex-shrink: 0;
}

.guess-pts-badge {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 3.4rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.guess-pts-badge.earned {
    border-color: rgba(142, 200, 232, 0.6);
    background: linear-gradient(160deg, rgba(55, 38, 8, 0.95), rgba(18, 42, 30, 0.9));
    animation: pts-badge-pop 0.65s cubic-bezier(0.18, 1.4, 0.4, 1) calc(var(--i, 0) * 0.1s + 0.35s) both;
}

.guess-pts-badge.earned.pts-mega {
    border-color: rgba(142, 200, 232, 0.85);
    box-shadow: 0 0 18px rgba(142, 200, 232, 0.4);
    animation: pts-badge-pop 0.65s cubic-bezier(0.18, 1.4, 0.4, 1) calc(var(--i, 0) * 0.1s + 0.35s) both,
               pts-badge-jackpot 1.2s ease calc(var(--i, 0) * 0.1s + 0.5s) both;
}

.guess-pts-badge.earned.pts-big {
    box-shadow: 0 0 12px rgba(126, 200, 216, 0.3);
}

.guess-pts-badge.none {
    border-color: rgba(255, 70, 90, 0.5);
    background: linear-gradient(160deg, rgba(32, 12, 14, 0.9), rgba(30, 8, 14, 0.85));
    animation: pts-badge-drop 0.55s ease calc(var(--i, 0) * 0.1s + 0.3s) both,
               pts-badge-red-flash 0.9s ease calc(var(--i, 0) * 0.1s + 0.35s) 2;
}

.guess-pts-badge .gpb-glow {
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle, rgba(142, 200, 232, 0.35), transparent 60%);
    opacity: 0;
    animation: gpb-glow-pulse 1s ease calc(var(--i, 0) * 0.1s + 0.4s) both;
    pointer-events: none;
}

@keyframes gpb-glow-pulse {
    0% { opacity: 0; transform: scale(0.6); }
    40% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.2); }
}

.guess-pts-badge .gpb-num {
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1;
    color: #8ec8e8;
    position: relative;
    z-index: 1;
}

.guess-pts-badge.earned .gpb-num {
    text-shadow: 0 0 12px rgba(142, 200, 232, 0.55);
}

.guess-pts-badge.pts-mega .gpb-num {
    font-size: 1.35rem;
    color: #b0daf0;
}

.guess-pts-badge.none .gpb-num {
    color: #ff8a9a;
    text-shadow: 0 0 10px rgba(255, 50, 70, 0.4);
}

.guess-pts-badge .gpb-unit {
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8a9288;
    position: relative;
    z-index: 1;
}

@keyframes pts-badge-pop {
    0% { transform: scale(0.35) rotate(-12deg); opacity: 0; }
    55% { transform: scale(1.2) rotate(3deg); opacity: 1; }
    75% { transform: scale(0.95) rotate(-1deg); }
    100% { transform: scale(1) rotate(0); }
}

@keyframes pts-badge-jackpot {
    0%, 100% { filter: brightness(1); }
    25% { filter: brightness(1.4); }
    50% { filter: brightness(1.1); }
    75% { filter: brightness(1.3); }
}

@keyframes pts-badge-drop {
    0% { transform: scale(1.15); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pts-badge-red-flash {
    0%, 100% { box-shadow: 0 0 0 transparent; }
    50% { box-shadow: 0 0 16px rgba(255, 40, 70, 0.55); }
}

.guess-pts-burst {
    position: absolute;
    top: 0.4rem;
    right: 0.5rem;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.scored-up .guess-pts-burst {
    animation: pts-float 1.35s cubic-bezier(0.2, 0.8, 0.3, 1) calc(var(--i, 0) * 0.1s + 0.4s) both;
}

.scored-down .guess-pts-burst {
    animation: pts-float-miss 1.05s ease calc(var(--i, 0) * 0.1s + 0.35s) both;
}

.gpb-plus {
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: #7ec8d8;
    text-shadow: 0 0 14px rgba(126, 200, 216, 0.85), 0 0 4px rgba(255, 255, 255, 0.4);
}

.pts-mega .gpb-plus {
    font-size: 1.25rem;
    color: #b0daf0;
    text-shadow: 0 0 16px rgba(142, 200, 232, 0.9), 0 0 28px rgba(110, 182, 224, 0.5);
}

.pts-big .gpb-plus {
    font-size: 1.12rem;
    color: #8ed0e0;
}

.gpb-trail {
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    color: rgba(126, 200, 216, 0.45);
    margin-top: -0.15rem;
    animation: trail-fade 1.35s ease calc(var(--i, 0) * 0.1s + 0.45s) both;
}

@keyframes trail-fade {
    0% { opacity: 0; transform: translateY(4px); }
    30% { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-10px); }
}

.gpb-zero {
    font-family: "Orbitron", sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #ff6a7a;
    text-shadow: 0 0 14px rgba(255, 50, 70, 0.7);
}

@keyframes pts-float {
    0% { opacity: 0; transform: translateY(12px) scale(0.6); }
    20% { opacity: 1; transform: translateY(0) scale(1.2); }
    45% { opacity: 1; transform: translateY(-6px) scale(1.05); }
    100% { opacity: 0; transform: translateY(-28px) scale(0.9); }
}

@keyframes pts-float-miss {
    0% { opacity: 0; transform: translateY(-6px) scale(1.1); }
    25% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(14px) scale(0.85); }
}

.guess-card .comment {
    position: relative;
    z-index: 2;
    color: #a8b0a4;
    font-style: italic;
    margin-top: 0.35rem;
    font-size: 0.88rem;
}

.score-tags {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.tag {
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    letter-spacing: 0.02em;
}

.tag.hit {
    background: #1f5a3b;
    color: #b8e4f0;
    border: 1px solid rgba(126, 200, 216, 0.4);
}

.tag.hit.pop {
    animation: tag-pop 0.5s cubic-bezier(0.18, 1.4, 0.4, 1) calc(var(--i, 0) * 0.1s + 0.45s) both;
}

.tag.miss {
    background: #5a1f2f;
    color: #ffc1cf;
    border: 1px solid rgba(255, 100, 120, 0.35);
    animation: tag-miss-in 0.4s ease calc(var(--i, 0) * 0.1s + 0.4s) both;
}

.tag.perfect {
    background: linear-gradient(135deg, #5a4010, #2a5040);
    color: #8ec8e8;
    border: 1px solid rgba(142, 200, 232, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    box-shadow: 0 0 12px rgba(142, 200, 232, 0.25);
}

.tag.perfect.pop {
    animation: tag-pop 0.55s cubic-bezier(0.18, 1.4, 0.4, 1) calc(var(--i, 0) * 0.1s + 0.55s) both,
               perfect-glow 1.4s ease calc(var(--i, 0) * 0.1s + 0.7s) infinite alternate;
}

@keyframes tag-pop {
    0% { transform: scale(0.55); opacity: 0; }
    65% { transform: scale(1.12); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes tag-miss-in {
    0% { opacity: 0; transform: scale(0.9); filter: brightness(1.4); }
    100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}

@keyframes perfect-glow {
    from { box-shadow: 0 0 8px rgba(142, 200, 232, 0.2); }
    to { box-shadow: 0 0 16px rgba(142, 200, 232, 0.45); }
}

.guess-reward-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 3;
}

.guess-reward-fx span {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 1px;
    background: #8ec8e8;
    box-shadow: 0 0 10px #8ec8e8;
    opacity: 0;
    animation: reward-spark 1s ease calc(var(--i, 0) * 0.1s + 0.45s) both;
}

.guess-reward-fx span:nth-child(1) { top: 18%; left: 12%; --sx: -28px; --sy: -32px; background: #7ec8d8; }
.guess-reward-fx span:nth-child(2) { top: 22%; right: 14%; --sx: 30px; --sy: -26px; background: #6eb6e0; }
.guess-reward-fx span:nth-child(3) { bottom: 20%; left: 18%; --sx: -24px; --sy: 24px; background: #6eb6e0; }
.guess-reward-fx span:nth-child(4) { bottom: 16%; right: 16%; --sx: 26px; --sy: 28px; background: #8ec8e8; }
.guess-reward-fx span:nth-child(5) { top: 48%; left: 8%; --sx: -34px; --sy: -8px; background: #8ed0e0; width: 5px; height: 5px; border-radius: 50%; }
.guess-reward-fx span:nth-child(6) { top: 42%; right: 8%; --sx: 32px; --sy: 10px; background: #b0daf0; width: 5px; height: 5px; border-radius: 50%; }
.guess-reward-fx span:nth-child(7) { top: 12%; left: 48%; --sx: -6px; --sy: -36px; background: #6eb6e0; width: 4px; height: 4px; border-radius: 50%; }
.guess-reward-fx span:nth-child(8) { bottom: 10%; left: 45%; --sx: 8px; --sy: 30px; background: #6eb6e0; width: 4px; height: 4px; border-radius: 50%; }

@keyframes reward-spark {
    0% { opacity: 1; transform: translate(0, 0) scale(1.2) rotate(0deg); }
    100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(0.15) rotate(120deg); }
}

.hit-perfect .guess-reward-fx span:nth-child(1) { animation-delay: calc(var(--i, 0) * 0.1s + 0.4s); }
.hit-perfect .guess-reward-fx span:nth-child(2) { animation-delay: calc(var(--i, 0) * 0.1s + 0.48s); }
.hit-perfect .guess-reward-fx span:nth-child(3) { animation-delay: calc(var(--i, 0) * 0.1s + 0.44s); }
.hit-perfect .guess-reward-fx span:nth-child(4) { animation-delay: calc(var(--i, 0) * 0.1s + 0.52s); }
.hit-perfect .guess-reward-fx span:nth-child(5) { animation-delay: calc(var(--i, 0) * 0.1s + 0.56s); }
.hit-perfect .guess-reward-fx span:nth-child(6) { animation-delay: calc(var(--i, 0) * 0.1s + 0.5s); }
.hit-perfect .guess-reward-fx span:nth-child(7) { animation-delay: calc(var(--i, 0) * 0.1s + 0.42s); }
.hit-perfect .guess-reward-fx span:nth-child(8) { animation-delay: calc(var(--i, 0) * 0.1s + 0.58s); }

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-panel.has-scores.scores-hot,
    .reveal-panel.has-scores.scores-cold,
    .results-impact-flash,
    .results-confetti .rc-piece,
    .results-miss-veins,
    .guess-card.scored-up,
    .guess-card.scored-down,
    .guess-pts-burst,
    .guess-reward-fx span,
    .guess-ring-burst,
    .guess-miss-flash,
    .guess-card-shine::after {
        animation: none !important;
    }
    .results-impact-flash,
    .results-confetti,
    .guess-reward-fx { display: none; }
}

/* —— RIP PHASE (status = Revealed) —— */
.room-shell.phase-rip {
    position: relative;
}

.room-shell.phase-rip::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(110, 182, 224, 0.18), transparent 55%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(90, 110, 80, 0.12), transparent 50%),
        radial-gradient(ellipse 50% 30% at 10% 70%, rgba(255, 80, 80, 0.08), transparent 45%);
    animation: rip-ambient 4s ease-in-out infinite alternate;
}

.room-shell.phase-rip > * {
    position: relative;
    z-index: 1;
}

@keyframes rip-ambient {
    0% { opacity: 0.7; filter: hue-rotate(0deg); }
    100% { opacity: 1; filter: hue-rotate(12deg); }
}

.badge-revealed {
    background: linear-gradient(135deg, #7eb8d8, #ff5e62) !important;
    color: #1a1000 !important;
    animation: badge-pulse 1.4s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 180, 70, 0.55); }
    50% { box-shadow: 0 0 0 6px rgba(255, 180, 70, 0); }
}

.rip-phase-banner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1.15rem 1.25rem;
    border-radius: 1.15rem;
    border: 2px solid #7ec0e8;
    background: linear-gradient(135deg, #2a1a08 0%, #12161c 45%, #141820 100%);
    box-shadow: 0 0 0 1px rgba(142, 200, 232, 0.25), 0 16px 40px rgba(0, 0, 0, 0.35);
    animation: banner-in 0.55s cubic-bezier(0.18, 1.15, 0.4, 1) both;
    overflow: hidden;
}

.rip-phase-banner.for-host {
    border-color: #8ec8e8;
}

.rip-phase-banner.for-guest {
    border-color: #5a6a50;
    background: linear-gradient(135deg, #12161c 0%, #141820 55%, #10141a 100%);
}

@keyframes banner-in {
    0% { opacity: 0; transform: translateY(-10px) scale(0.98); }
    100% { opacity: 1; transform: none; }
}

.rip-pack-anim {
    width: 88px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rip-pack {
    position: relative;
    width: 64px;
    height: 92px;
    animation: pack-shake 1.1s ease-in-out infinite;
}

.rip-pack-body {
    position: absolute;
    inset: 10px 6px 4px;
    border-radius: 0.45rem;
    background: linear-gradient(160deg, #5b6cff, #5a6a50 50%, #3d2a6e);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15), 0 8px 16px rgba(0, 0, 0, 0.4);
}

.rip-pack-foil {
    position: absolute;
    top: 0;
    left: 4px;
    right: 4px;
    height: 22px;
    border-radius: 0.35rem 0.35rem 0.15rem 0.15rem;
    background: linear-gradient(90deg, #ffe566, #ff9a3c, #ffe566);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
    animation: foil-tear 2.2s ease-in-out infinite;
    transform-origin: top center;
}

.rip-sparkles span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: #8ec8e8;
    animation: sparkle 1.4s ease-out infinite;
}

.rip-sparkles span:nth-child(1) { top: 8px; left: -4px; animation-delay: 0s; }
.rip-sparkles span:nth-child(2) { top: 20px; right: -6px; background: #b8c8a8; animation-delay: 0.25s; }
.rip-sparkles span:nth-child(3) { bottom: 18px; left: -8px; background: #7ec8d8; animation-delay: 0.45s; }
.rip-sparkles span:nth-child(4) { bottom: 28px; right: -4px; background: #7ec8ff; animation-delay: 0.15s; }

@keyframes pack-shake {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    25% { transform: rotate(3deg) translateY(-2px); }
    50% { transform: rotate(-3deg) translateY(1px); }
    75% { transform: rotate(2deg) translateY(-1px); }
}

@keyframes foil-tear {
    0%, 100% { transform: rotate(0deg) translateY(0); opacity: 1; }
    40% { transform: rotate(-6deg) translateY(-2px); }
    70% { transform: rotate(4deg) translateY(-1px); opacity: 0.85; }
}

@keyframes sparkle {
    0% { transform: scale(0.4) translateY(0); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: scale(1) translateY(-14px); opacity: 0; }
}

.rip-phase-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #8ec8e8;
    margin-bottom: 0.25rem;
}

.rip-phase-banner.for-guest .rip-phase-kicker {
    color: #b8c8a8;
}

.rip-phase-title {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff6d6;
    line-height: 1.15;
}

.rip-phase-banner.for-guest .rip-phase-title {
    color: #ebe4ff;
}

.rip-phase-text {
    margin: 0 0 0.85rem;
    color: #b4bcb0;
    font-size: 0.95rem;
    max-width: 36rem;
}

.rip-cta {
    font-weight: 750;
    box-shadow: 0 6px 20px rgba(110, 182, 224, 0.35);
    animation: cta-glow 1.6s ease-in-out infinite;
}

@keyframes cta-glow {
    0%, 100% { box-shadow: 0 6px 20px rgba(110, 182, 224, 0.3); }
    50% { box-shadow: 0 8px 28px rgba(110, 182, 224, 0.55); }
}

.standby-pulse {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: #141a22;
    border: 1px solid #3a4a30;
}

.standby-pulse .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6eb6e0;
    animation: standby-dot 1.2s ease-in-out infinite;
}

.standby-pulse .dot:nth-child(2) { animation-delay: 0.15s; }
.standby-pulse .dot:nth-child(3) { animation-delay: 0.3s; }

.standby-label {
    margin-left: 0.25rem;
    font-size: 0.88rem;
    font-weight: 650;
    color: #d0d6cc;
}

@keyframes standby-dot {
    0%, 100% { opacity: 0.3; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}

.log-pull-hero {
    border: 2px solid #7ec0e8 !important;
    background: linear-gradient(180deg, #2a220f 0%, #141820 55%) !important;
    box-shadow: 0 0 0 1px rgba(142, 200, 232, 0.2), 0 14px 36px rgba(0, 0, 0, 0.3);
    animation: panel-glow 1.6s ease;
}

.log-pull-hero-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.log-pull-hero-head h2 {
    margin: 0;
    color: #8ec8e8;
}

.log-pull-badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1a1400;
    background: #8ec8e8;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
}

.phase-rip .reveal-panel {
    border-color: #5a4a20;
}

@media (max-width: 640px) {
    .rip-phase-banner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .rip-pack-anim {
        margin: 0 auto;
    }

    .rip-phase-text {
        margin-left: auto;
        margin-right: auto;
    }
}

/* —— Selection phase (timer live) —— */
.room-shell.phase-select::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 70% 40% at 50% 0%, rgba(110, 182, 224, 0.14), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 50%, rgba(110, 182, 224, 0.1), transparent 50%);
    animation: select-ambient 2.4s ease-in-out infinite alternate;
}

.room-shell.phase-select > * {
    position: relative;
    z-index: 1;
}

@keyframes select-ambient {
    0% { opacity: 0.65; }
    100% { opacity: 1; }
}

.timer-panel {
    border: 2px solid rgba(110, 182, 224, 0.55) !important;
    background: linear-gradient(180deg, rgba(10, 30, 45, 0.95), rgba(14, 10, 28, 0.98)) !important;
    box-shadow: 0 0 24px rgba(110, 182, 224, 0.2) !important;
    animation: timer-panel-pulse 1.6s ease-in-out infinite;
}

.timer-panel.timer-hot {
    border-color: rgba(110, 182, 224, 0.7) !important;
    box-shadow: 0 0 28px rgba(255, 160, 40, 0.3) !important;
}

.timer-panel.timer-urgent {
    border-color: rgba(255, 60, 80, 0.85) !important;
    background: linear-gradient(180deg, rgba(50, 10, 18, 0.98), rgba(20, 8, 16, 0.98)) !important;
    box-shadow: 0 0 32px rgba(255, 40, 60, 0.4) !important;
    animation: timer-urgent-flash 0.45s steps(2) infinite;
}

@keyframes timer-panel-pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(110, 182, 224, 0.18); }
    50% { box-shadow: 0 0 32px rgba(110, 182, 224, 0.35); }
}

@keyframes timer-urgent-flash {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
}

.timer-row {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.35rem 1rem;
    align-items: center;
}

.timer-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: var(--cab-cyan);
    grid-column: 1;
}

.timer-digits {
    font-family: "Orbitron", sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 16px rgba(110, 182, 224, 0.55);
    grid-column: 2;
    justify-self: end;
    line-height: 1;
}

.timer-urgent .timer-digits {
    color: #ff6a7a;
    text-shadow: 0 0 18px rgba(255, 60, 80, 0.65);
    animation: digit-pop 0.45s ease infinite;
}

@keyframes digit-pop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

.timer-unit {
    font-size: 1rem;
    margin-left: 0.15rem;
    opacity: 0.75;
}

.timer-bar-wrap {
    grid-column: 1 / -1;
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(110, 182, 224, 0.25);
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cab-cyan), var(--cab-magenta));
    box-shadow: 0 0 12px rgba(110, 182, 224, 0.5);
    transition: width 0.2s linear;
}

.timer-urgent .timer-bar {
    background: linear-gradient(90deg, #ff3040, #8ec8e8);
}

.select-form-panel {
    border-color: rgba(110, 182, 224, 0.4) !important;
    animation: select-form-glow 2s ease-in-out infinite alternate;
}

@keyframes select-form-glow {
    0% { box-shadow: 0 0 16px rgba(110, 182, 224, 0.12), 0 10px 28px rgba(0, 0, 0, 0.35); }
    100% { box-shadow: 0 0 28px rgba(110, 182, 224, 0.2), 0 10px 28px rgba(0, 0, 0, 0.35); }
}

.phase-select .energy-pixel-btn {
    animation: energy-float 2.2s ease-in-out infinite;
}

.phase-select .energy-pixel-btn:nth-child(2) { animation-delay: 0.1s; }
.phase-select .energy-pixel-btn:nth-child(3) { animation-delay: 0.2s; }
.phase-select .energy-pixel-btn:nth-child(4) { animation-delay: 0.3s; }
.phase-select .energy-pixel-btn:nth-child(5) { animation-delay: 0.15s; }
.phase-select .energy-pixel-btn:nth-child(6) { animation-delay: 0.25s; }
.phase-select .energy-pixel-btn:nth-child(7) { animation-delay: 0.35s; }
.phase-select .energy-pixel-btn:nth-child(8) { animation-delay: 0.05s; }

@keyframes energy-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.phase-select .card-pick {
    animation: card-shimmer 3s ease-in-out infinite;
}

@keyframes card-shimmer {
    0%, 100% { border-color: #2a323c; }
    50% { border-color: rgba(110, 182, 224, 0.45); }
}

.phase-select .status-waiting {
    animation: wait-blink 1s step-end infinite;
    color: #8ec8e8 !important;
}

@keyframes wait-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.wait-start-panel {
    border-color: rgba(142, 200, 232, 0.4) !important;
    text-align: center;
}

/* —— Guest wait-for-host hero —— */
.guest-wait-hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 1.35rem 1.1rem 1.5rem !important;
    border-color: rgba(110, 182, 224, 0.4) !important;
    background:
        radial-gradient(ellipse 90% 70% at 50% 15%, rgba(110, 182, 224, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 50% 100%, rgba(100, 120, 80, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, rgba(14, 18, 12, 0.96) 0%, rgba(8, 10, 8, 0.98) 100%) !important;
    box-shadow:
        0 0 0 1px rgba(110, 182, 224, 0.15),
        0 12px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.guest-wait-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.06) 2px,
            rgba(0, 0, 0, 0.06) 4px
        );
    pointer-events: none;
    opacity: 0.45;
}

.guest-wait-stage {
    position: relative;
    width: 9.5rem;
    height: 9.5rem;
    margin: 0.25rem auto 1.1rem;
}

.guest-wait-orbit {
    position: absolute;
    inset: 0;
}

.guest-wait-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(110, 182, 224, 0.25);
    animation: guest-ring-spin 8s linear infinite;
}

.guest-wait-ring.r1 {
    inset: 8%;
    border-color: rgba(110, 182, 224, 0.35);
    border-style: dashed;
    animation-duration: 10s;
    animation-direction: reverse;
}

.guest-wait-ring.r2 {
    inset: 0;
    border-color: rgba(110, 182, 224, 0.22);
    animation-duration: 14s;
}

.guest-wait-ring.r3 {
    inset: 18%;
    border-color: rgba(142, 200, 232, 0.28);
    animation-duration: 6s;
    animation-direction: reverse;
}

@keyframes guest-ring-spin {
    to { transform: rotate(360deg); }
}

.guest-wait-pack {
    position: absolute;
    inset: 22%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: guest-pack-float 2.8s ease-in-out infinite;
}

@keyframes guest-pack-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.03); }
}

.guest-wait-pack-body {
    position: relative;
    width: 3.6rem;
    height: 5rem;
    border-radius: 0.45rem;
    background:
        linear-gradient(145deg, #3a1a6e 0%, #0e120e 45%, #1a1e26 100%);
    border: 2px solid rgba(110, 182, 224, 0.55);
    box-shadow:
        0 0 22px rgba(110, 182, 224, 0.35),
        0 8px 18px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
}

.guest-wait-pack-shine {
    position: absolute;
    top: 18%;
    left: 28%;
    width: 2.2rem;
    height: 5.5rem;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: rotate(18deg);
    animation: guest-shine 2.4s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}

@keyframes guest-shine {
    0% { transform: translateX(-120%) rotate(18deg); opacity: 0; }
    30% { opacity: 0.9; }
    100% { transform: translateX(220%) rotate(18deg); opacity: 0; }
}

.guest-wait-pack-logo {
    font-family: "Orbitron", sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #8ec8e8;
    text-shadow: 0 0 12px rgba(142, 200, 232, 0.6);
    animation: guest-q-pulse 1.6s ease-in-out infinite;
}

@keyframes guest-q-pulse {
    0%, 100% { opacity: 0.65; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.guest-wait-float-cards {
    position: absolute;
    inset: -10%;
    z-index: 1;
}

.guest-wait-float-cards .fc {
    position: absolute;
    width: 1.35rem;
    height: 1.9rem;
    border-radius: 0.2rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(160deg, #4a2a80, #1a1030);
    box-shadow: 0 0 10px rgba(110, 182, 224, 0.25);
    animation: guest-card-orbit 5s ease-in-out infinite;
}

.guest-wait-float-cards .fc1 {
    top: 8%;
    left: 4%;
    animation-delay: 0s;
    background: linear-gradient(160deg, #ff5e62, #2a1020);
}

.guest-wait-float-cards .fc2 {
    top: 12%;
    right: 2%;
    animation-delay: 0.4s;
    background: linear-gradient(160deg, #6eb6e0, #0a2040);
}

.guest-wait-float-cards .fc3 {
    bottom: 6%;
    left: 38%;
    animation-delay: 0.8s;
    background: linear-gradient(160deg, #8ec8e8, #2a2008);
}

@keyframes guest-card-orbit {
    0%, 100% { transform: translateY(0) rotate(-8deg); opacity: 0.75; }
    50% { transform: translateY(-10px) rotate(8deg); opacity: 1; }
}

.guest-wait-copy {
    position: relative;
    z-index: 1;
    max-width: 28rem;
    margin: 0 auto;
}

.guest-wait-kicker {
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #9ad4f0;
    margin-bottom: 0.4rem;
    text-shadow: 0 0 12px rgba(110, 182, 224, 0.45);
}

.guest-wait-title {
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.15rem, 3.5vw, 1.45rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    margin: 0 0 0.55rem;
    text-shadow: 0 0 20px rgba(110, 182, 224, 0.35);
}

.guest-wait-text {
    margin: 0 auto 0.9rem;
    color: #b8c0b4;
    font-size: 0.95rem;
    line-height: 1.45;
}

.guest-wait-text strong {
    color: #8ec8e8;
}

.guest-wait-set-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 auto 1rem;
    padding: 0.4rem 0.85rem 0.4rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(110, 182, 224, 0.4);
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 16px rgba(110, 182, 224, 0.15);
}

.guest-wait-set-chip img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.05);
}

.guest-wait-set-chip span {
    font-family: "Orbitron", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: #e6ebe4;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guest-wait-loader {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.28rem;
    height: 1.6rem;
    margin-bottom: 0.85rem;
}

.guest-wait-loader .gwl-bar {
    width: 0.32rem;
    height: 0.5rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #6eb6e0, #6eb6e0);
    box-shadow: 0 0 8px rgba(110, 182, 224, 0.5);
    animation: guest-eq 1s ease-in-out infinite;
}

.guest-wait-loader .gwl-bar:nth-child(1) { animation-delay: 0s; }
.guest-wait-loader .gwl-bar:nth-child(2) { animation-delay: 0.1s; }
.guest-wait-loader .gwl-bar:nth-child(3) { animation-delay: 0.2s; }
.guest-wait-loader .gwl-bar:nth-child(4) { animation-delay: 0.3s; }
.guest-wait-loader .gwl-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes guest-eq {
    0%, 100% { height: 0.45rem; opacity: 0.5; }
    50% { height: 1.45rem; opacity: 1; }
}

.guest-wait-status {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(160, 180, 140, 0.4);
    background: rgba(14, 18, 12, 0.9);
    font-family: "Orbitron", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: #d0d6cc;
    text-transform: uppercase;
}

.guest-wait-pulse-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #6eb6e0;
    box-shadow: 0 0 10px rgba(110, 182, 224, 0.75);
    animation: guest-status-pulse 1.2s ease-in-out infinite;
}

@keyframes guest-status-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.2); }
}

.phase-wait-start .guest-wait-hero {
    animation: guest-hero-glow 2.4s ease-in-out infinite alternate;
}

@keyframes guest-hero-glow {
    from {
        box-shadow:
            0 0 0 1px rgba(110, 182, 224, 0.12),
            0 12px 40px rgba(0, 0, 0, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }
    to {
        box-shadow:
            0 0 0 1px rgba(110, 182, 224, 0.28),
            0 14px 48px rgba(80, 20, 140, 0.35),
            0 0 30px rgba(110, 182, 224, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
}

.start-rip-btn {
    animation: cta-glow 1.6s ease-in-out infinite;
}

.pack-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.select-live-panel {
    border-color: rgba(110, 182, 224, 0.3) !important;
}

.btn-outline-warning {
    color: #f0c14b;
    border-color: #a8862a;
}

.btn-outline-danger {
    color: #ff9aaa;
    border-color: #8a3a4a;
}

.form-check-input {
    background-color: #10141a;
    border-color: #2a323c;
}

.form-check-input:checked {
    background-color: #5a6a50;
    border-color: #5a6a50;
}

.form-check-label {
    color: #b4bcb0;
}

.room-meta {
    color: #8a9288;
    margin: 0;
}

.panel {
    margin-bottom: 1rem;
}

/* Keep arcade panel look when other rules only set spacing */
.form-card, .panel, .empty-card, .room-card {
    margin-bottom: 1rem;
}

.player-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.player-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #262d4a;
}

.player-row:last-child {
    border-bottom: none;
}

.player-row-clickable {
    padding: 0.2rem 0;
}

.player-open-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.player-open-btn:hover,
.player-open-btn:focus-visible {
    background: rgba(110, 182, 224, 0.08);
    border-color: rgba(110, 182, 224, 0.35);
    box-shadow: 0 0 14px rgba(110, 182, 224, 0.12);
    outline: none;
}

.player-open-main {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.player-name {
    font-weight: 600;
}

.player-open-hint {
    opacity: 0.45;
    font-size: 0.8rem;
}

.player-open-chevron {
    color: #6eb6e0;
    opacity: 0.7;
    font-size: 1.15rem;
    line-height: 1;
}

/* =========================================================
   IN-ROOM ROSTER — presence + leave status
   ========================================================= */
.players-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.players-panel-head h2 {
    margin: 0 0 0.15rem !important;
}

.players-count-pill {
    flex-shrink: 0;
    font-family: "Orbitron", sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(61, 255, 138, 0.4);
    color: #3dff8a;
    background: rgba(20, 48, 32, 0.55);
}

.room-roster {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.roster-card {
    border-radius: 0.75rem;
    border: 1px solid rgba(110, 182, 224, 0.18);
    background: linear-gradient(100deg, rgba(12, 18, 24, 0.9), rgba(6, 8, 12, 0.75));
    overflow: hidden;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.roster-card.is-host {
    border-color: rgba(110, 182, 224, 0.4);
}

.roster-card.is-me {
    border-color: rgba(110, 182, 224, 0.45);
    box-shadow: 0 0 14px rgba(110, 182, 224, 0.1);
}

.roster-card.is-left {
    opacity: 0.72;
    border-color: rgba(120, 130, 140, 0.25);
    background: rgba(0, 0, 0, 0.22);
}

.roster-open,
.roster-static {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.roster-static {
    cursor: default;
}

.roster-open:hover,
.roster-open:focus-visible {
    background: rgba(110, 182, 224, 0.07);
    outline: none;
}

.roster-avatar {
    flex-shrink: 0;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.6rem;
    display: grid;
    place-items: center;
    font-family: "Orbitron", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #c8eaf8;
    background: linear-gradient(145deg, rgba(40, 70, 95, 0.85), rgba(12, 20, 28, 0.9));
    border: 1px solid rgba(110, 182, 224, 0.35);
}

.roster-avatar.sm {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.62rem;
    border-radius: 0.45rem;
}

.roster-avatar.muted {
    color: #7a8694;
    border-color: rgba(120, 130, 140, 0.3);
    background: rgba(30, 36, 42, 0.7);
}

.roster-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.roster-name-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.4rem;
}

.roster-name {
    font-family: "Orbitron", sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #e8eef4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 12rem;
}

.roster-you {
    font-family: "Orbitron", sans-serif;
    font-size: 0.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.08rem 0.35rem;
    border-radius: 999px;
    color: #0a1218;
    background: #6eb6e0;
}

.roster-presence {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
}

.roster-presence.present {
    color: #6edfa0;
}

.roster-presence.left {
    color: #8a96a4;
}

.roster-presence-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3dff8a;
    box-shadow: 0 0 8px rgba(61, 255, 138, 0.75);
}

.roster-lock {
    flex-shrink: 0;
    font-family: "Orbitron", sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.roster-lock.locked {
    color: #7ec8d8;
    border-color: rgba(110, 200, 220, 0.4);
    background: rgba(20, 50, 60, 0.55);
}

.roster-lock.waiting {
    color: #a8a090;
    border-color: rgba(180, 160, 100, 0.3);
    background: rgba(40, 36, 16, 0.4);
}

.roster-chevron {
    flex-shrink: 0;
    color: #6eb6e0;
    opacity: 0.65;
    font-size: 1.2rem;
    line-height: 1;
}

.roster-left-block {
    margin-top: 0.75rem;
    padding-top: 0.55rem;
    border-top: 1px dashed rgba(120, 130, 140, 0.25);
}

.roster-left-head {
    font-family: "Orbitron", sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7a8694;
    margin-bottom: 0.4rem;
}

.room-roster.compact .roster-card {
    background: rgba(0, 0, 0, 0.2);
}

/* =========================================================
   SESSION SCOREBOARD — podium standings under Players
   ========================================================= */
.session-scoreboard {
    margin-top: 1rem;
    padding: 0.9rem 0.75rem 0.85rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(240, 196, 64, 0.22);
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(240, 196, 64, 0.12), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(110, 182, 224, 0.08), transparent 50%),
        linear-gradient(180deg, rgba(14, 18, 24, 0.95), rgba(6, 8, 12, 0.92));
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.35) inset,
        0 12px 28px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.session-scoreboard::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 30%,
        rgba(255, 255, 255, 0.03) 45%,
        transparent 60%
    );
    background-size: 200% 100%;
    animation: ssb-sheen 7s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ssb-sheen {
    0%, 100% { background-position: 120% 0; }
    50% { background-position: -20% 0; }
}

.session-scoreboard-head {
    position: relative;
    z-index: 1;
    margin-bottom: 0.65rem;
}

.ssb-title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.ssb-trophy {
    flex-shrink: 0;
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: 0.7rem;
    background: radial-gradient(circle at 40% 30%, rgba(255, 230, 140, 0.35), rgba(40, 28, 4, 0.6));
    border: 1px solid rgba(240, 196, 64, 0.45);
    box-shadow: 0 0 16px rgba(240, 196, 64, 0.25);
    animation: ssb-trophy-bob 2.4s ease-in-out infinite;
}

@keyframes ssb-trophy-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.session-scoreboard-head h3 {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f5e6a8;
    text-shadow: 0 0 12px rgba(240, 196, 64, 0.35);
}

.ssb-sub {
    margin: 0.1rem 0 0;
    font-size: 0.75rem;
    color: #8a96a4;
}

/* Scoring rule chips */
.ssb-legend {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.ssb-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.22rem 0.45rem;
    border-radius: 999px;
    font-family: "Orbitron", sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
    background: rgba(0, 0, 0, 0.35);
    color: #c8d0d8;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ssb-chip:hover {
    transform: translateY(-1px);
}

.ssb-chip strong {
    font-size: 0.62rem;
    color: #fff;
}

.ssb-chip-ico {
    font-size: 0.7rem;
    line-height: 1;
    opacity: 0.95;
}

.ssb-chip.energy {
    border-color: rgba(255, 210, 70, 0.45);
    background: linear-gradient(135deg, rgba(60, 48, 8, 0.75), rgba(0, 0, 0, 0.3));
    color: #ffe08a;
}
.ssb-chip.energy strong { color: #ffe58a; }

.ssb-chip.sir {
    border-color: rgba(160, 120, 255, 0.5);
    background: linear-gradient(135deg, rgba(40, 20, 70, 0.8), rgba(0, 0, 0, 0.3));
    color: #d4c0ff;
}
.ssb-chip.sir strong { color: #e8d8ff; }

.ssb-chip.ir {
    border-color: rgba(110, 182, 224, 0.5);
    background: linear-gradient(135deg, rgba(12, 36, 52, 0.8), rgba(0, 0, 0, 0.3));
    color: #9ad4f0;
}
.ssb-chip.ir strong { color: #c8eaf8; }

.ssb-chip.ur {
    border-color: rgba(255, 150, 90, 0.5);
    background: linear-gradient(135deg, rgba(55, 28, 10, 0.8), rgba(0, 0, 0, 0.3));
    color: #ffc49a;
}
.ssb-chip.ur strong { color: #ffd8b8; }

.ssb-chip.mon {
    border-color: rgba(100, 200, 140, 0.4);
    background: linear-gradient(135deg, rgba(12, 36, 22, 0.75), rgba(0, 0, 0, 0.3));
    color: #9edfb8;
}
.ssb-chip.mon strong { color: #b8f0d0; }

/* Standings list */
.ssb-standings {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.ssb-row {
    display: grid;
    grid-template-columns: 2.4rem 1fr auto;
    gap: 0.55rem 0.65rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(110, 182, 224, 0.16);
    background: rgba(0, 0, 0, 0.28);
    animation: ssb-row-in 0.45s ease both;
    animation-delay: calc(var(--ssb-i, 0) * 0.07s);
}

@keyframes ssb-row-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ssb-row.rank-gold,
.ssb-row.is-leader {
    border-color: rgba(240, 196, 64, 0.55);
    background:
        linear-gradient(100deg, rgba(70, 50, 8, 0.55), rgba(12, 16, 20, 0.55) 55%),
        rgba(0, 0, 0, 0.25);
    box-shadow:
        0 0 0 1px rgba(240, 196, 64, 0.12) inset,
        0 0 22px rgba(240, 196, 64, 0.18);
    animation: ssb-row-in 0.45s ease both, ssb-leader-glow 2.2s ease-in-out infinite;
    animation-delay: calc(var(--ssb-i, 0) * 0.07s), 0.5s;
}

@keyframes ssb-leader-glow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(240, 196, 64, 0.12) inset, 0 0 16px rgba(240, 196, 64, 0.14); }
    50% { box-shadow: 0 0 0 1px rgba(240, 196, 64, 0.28) inset, 0 0 28px rgba(240, 196, 64, 0.32); }
}

.ssb-row.rank-silver {
    border-color: rgba(180, 200, 220, 0.35);
    background: linear-gradient(100deg, rgba(40, 48, 58, 0.55), rgba(0, 0, 0, 0.28));
}

.ssb-row.rank-bronze {
    border-color: rgba(200, 130, 80, 0.35);
    background: linear-gradient(100deg, rgba(48, 32, 18, 0.5), rgba(0, 0, 0, 0.28));
}

.ssb-rank {
    display: grid;
    place-items: center;
}

.ssb-medal {
    font-size: 1.35rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.ssb-row.is-leader .ssb-medal {
    animation: ssb-medal-pop 1.8s ease-in-out infinite;
}

@keyframes ssb-medal-pop {
    0%, 100% { transform: scale(1) rotate(-2deg); }
    50% { transform: scale(1.12) rotate(2deg); }
}

.ssb-place {
    width: 1.7rem;
    height: 1.7rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-family: "Orbitron", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #9aa8b8;
    border: 1px solid rgba(110, 182, 224, 0.3);
    background: rgba(0, 0, 0, 0.35);
}

.ssb-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.ssb-name-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.ssb-name {
    font-family: "Orbitron", sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #e8eef4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.ssb-row.is-leader .ssb-name {
    color: #ffe9a0;
    text-shadow: 0 0 10px rgba(240, 196, 64, 0.4);
}

.ssb-leader-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.52rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    color: #1a1200;
    background: linear-gradient(90deg, #ffe58a, #e8b923);
    box-shadow: 0 0 12px rgba(240, 196, 64, 0.45);
    animation: ssb-tag-pulse 1.6s ease-in-out infinite;
}

@keyframes ssb-tag-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
}

.ssb-crown {
    font-size: 0.7rem;
    line-height: 1;
    animation: ssb-crown-wiggle 2s ease-in-out infinite;
}

@keyframes ssb-crown-wiggle {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(8deg); }
}

.ssb-hit-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.ssb-hit {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.ssb-hit.energy {
    color: #ffe08a;
    border-color: rgba(255, 210, 70, 0.35);
    background: rgba(50, 40, 8, 0.45);
}

.ssb-hit.mon {
    color: #9ad4f0;
    border-color: rgba(110, 182, 224, 0.35);
    background: rgba(12, 32, 48, 0.45);
}

.ssb-bar-track {
    position: relative;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.ssb-bar {
    height: 100%;
    width: var(--ssb-bar, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, #3a7aa0, #6eb6e0 55%, #9ad4f0);
    box-shadow: 0 0 8px rgba(110, 182, 224, 0.45);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    animation: ssb-bar-fill 0.7s ease both;
    animation-delay: calc(var(--ssb-i, 0) * 0.07s + 0.15s);
}

.ssb-row.is-leader .ssb-bar {
    background: linear-gradient(90deg, #b8860b, #f0c040 50%, #ffe58a);
    box-shadow: 0 0 10px rgba(240, 196, 64, 0.55);
}

@keyframes ssb-bar-fill {
    from { transform: scaleX(0); transform-origin: left; }
    to { transform: scaleX(1); transform-origin: left; }
}

.ssb-bar-spark {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 10px;
    left: calc(var(--ssb-bar, 0%) - 6px);
    border-radius: 50%;
    background: #fff8d0;
    box-shadow: 0 0 10px 3px rgba(255, 230, 140, 0.8);
    animation: ssb-spark 1.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ssb-spark {
    0%, 100% { opacity: 0.55; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}

.ssb-score {
    text-align: right;
    flex-shrink: 0;
    min-width: 3.2rem;
}

.ssb-pts {
    display: block;
    font-family: "Orbitron", sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
    color: #c8eaf8;
    letter-spacing: 0.02em;
}

.ssb-row.is-leader .ssb-pts {
    color: #ffe58a;
    text-shadow: 0 0 14px rgba(240, 196, 64, 0.55);
    animation: ssb-pts-pulse 1.8s ease-in-out infinite;
}

@keyframes ssb-pts-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.ssb-pts-lbl {
    font-family: "Orbitron", sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7a8694;
}

.ssb-row.is-leader .ssb-pts-lbl {
    color: #c4a84a;
}

@media (prefers-reduced-motion: reduce) {
    .session-scoreboard::before,
    .ssb-trophy,
    .ssb-row,
    .ssb-row.is-leader,
    .ssb-medal,
    .ssb-leader-tag,
    .ssb-crown,
    .ssb-bar,
    .ssb-bar-spark,
    .ssb-pts {
        animation: none !important;
    }
}

@media (max-width: 420px) {
    .ssb-chip-lbl {
        display: none;
    }
    .ssb-row {
        grid-template-columns: 2rem 1fr auto;
        gap: 0.4rem;
        padding: 0.5rem 0.5rem;
    }
    .ssb-pts {
        font-size: 1rem;
    }
}

/* Player profile sheet (mobile-friendly bottom sheet / desktop card) */
.player-profile-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(4, 2, 12, 0.72);
    backdrop-filter: blur(4px);
    animation: profile-fade-in 0.15s ease;
}

@keyframes profile-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.player-profile-sheet {
    width: min(100%, 28rem);
    max-height: min(88vh, 40rem);
    overflow: auto;
    margin: 0;
    padding: 1rem 1.1rem 1.25rem;
    border-radius: 1.1rem 1.1rem 0 0;
    border: 1px solid rgba(110, 182, 224, 0.35);
    border-bottom: none;
    background:
        linear-gradient(180deg, rgba(36, 18, 58, 0.98) 0%, rgba(12, 8, 24, 0.98) 100%);
    box-shadow:
        0 -8px 40px rgba(0, 0, 0, 0.55),
        0 0 28px rgba(110, 182, 224, 0.18);
    animation: profile-sheet-up 0.2s ease;
}

@keyframes profile-sheet-up {
    from { transform: translateY(12%); opacity: 0.85; }
    to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 641px) {
    .player-profile-overlay {
        align-items: center;
        padding: 1.5rem;
    }

    .player-profile-sheet {
        border-radius: 1rem;
        border-bottom: 1px solid rgba(110, 182, 224, 0.35);
        animation: profile-sheet-pop 0.18s ease;
    }

    @keyframes profile-sheet-pop {
        from { transform: scale(0.96); opacity: 0.85; }
        to { transform: scale(1); opacity: 1; }
    }
}

.player-profile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.player-profile-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.player-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    border: 1px solid rgba(110, 182, 224, 0.4);
    box-shadow: 0 0 12px rgba(110, 182, 224, 0.25);
    object-fit: cover;
    background: #10141a;
}

.player-profile-head h2 {
    font-family: "Orbitron", sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: #fff;
}

.player-profile-close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.player-profile-close:hover {
    background: rgba(110, 182, 224, 0.25);
    border-color: rgba(110, 182, 224, 0.55);
}

.player-profile-section {
    margin-bottom: 1rem;
}

.player-profile-section:last-child {
    margin-bottom: 0;
}

.player-profile-section h3 {
    margin: 0 0 0.45rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a9288;
}

.player-stat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.player-stat-pill {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(142, 200, 232, 0.35);
    background: rgba(40, 24, 10, 0.65);
    color: #8ec8e8;
    font-size: 0.82rem;
}

.player-stat-pill strong {
    color: #fff;
    margin-right: 0.15rem;
}

.player-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 400px) {
    .player-stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
    }
}

.player-stat-cell {
    padding: 0.55rem 0.5rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(110, 182, 224, 0.18);
    background: rgba(0, 0, 0, 0.28);
    text-align: center;
}

.player-stat-val {
    font-family: "Orbitron", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #9ad4f0;
    line-height: 1.15;
}

.player-stat-lbl {
    font-size: 0.72rem;
    color: #8a9288;
    margin-top: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.player-stat-sub {
    font-size: 0.68rem;
    color: #6a7268;
    margin-top: 0.1rem;
}

.player-profile-highlights .player-row {
    font-size: 0.9rem;
}

.host-tag {
    font-size: 0.72rem;
    margin-left: 0.35rem;
    color: #8ec8e8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-locked {
    color: #7ec8d8;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-waiting {
    color: #8a9288;
    font-size: 0.9rem;
}

.set-grid {
    display: grid;
    gap: 0.65rem;
}

.set-card {
    text-align: left;
    background: #141a22;
    border: 1px solid #2a323c;
    color: inherit;
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
}

.set-card span {
    display: block;
    color: #8a9288;
    font-size: 0.88rem;
    margin-top: 0.2rem;
}

.set-card:hover {
    border-color: #7c8cff;
}

.set-card.selected {
    border-color: #5a6a50;
    background: #1a2430;
}

.pack-current {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.text-warning {
    color: #f0c14b !important;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.chip {
    background: #2a2148;
    color: #e2d6ff;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
}

.card-pick-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    max-height: 320px;
    overflow: auto;
    padding: 0.15rem;
    -webkit-overflow-scrolling: touch;
}

/* Full set list — tall scroll so every card in the pack is reachable */
.card-pick-list-full {
    max-height: min(70vh, 720px);
    max-height: min(70dvh, 720px);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}



.card-pick {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    background: #141a22;
    border: 1px solid #2a323c;
    color: inherit;
    border-radius: 0.7rem;
    padding: 0.45rem;
    text-align: left;
}

.card-pick .card-thumb {
    width: 100%;
    aspect-ratio: 63 / 88;
    object-fit: contain; /* full card front — never crop to a mystery slice */
    border-radius: 0.4rem;
    background: #0a0e12;
}

.card-pick-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0 0.15rem 0.15rem;
}

.card-pick-meta span {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
}

.card-pick small {
    color: #8a9288;
    font-size: 0.72rem;
}

.card-pick.selected {
    border-color: #5a6a50;
    background: #1a2430;
    box-shadow: 0 0 0 1px #5a6a50;
}

.card-thumb {
    width: 56px;
    height: auto;
    border-radius: 0.35rem;
    background: #10141a;
    flex-shrink: 0;
}

.card-art-md {
    width: 90px;
    height: auto;
    border-radius: 0.45rem;
    background: #10141a;
}

.card-art-lg {
    width: 120px;
    height: auto;
    border-radius: 0.5rem;
    background: #10141a;
}

.locked-guess-body,
.guess-card-top,
.pull-result-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

/* —— Pull logged overlay —— */
.pull-logged-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background:
        radial-gradient(circle at center, rgba(142, 200, 232, 0.28), rgba(15, 18, 32, 0.55) 50%, transparent 72%);
    animation: pull-logged-fade 2.8s ease forwards;
}

.pull-logged-burst {
    position: relative;
    text-align: center;
    padding: 1.75rem 2.25rem;
    border-radius: 1.35rem;
    background: linear-gradient(155deg, #2a1840 0%, #10141a 55%, #1a2a18 100%);
    border: 2px solid #8ec8e8;
    box-shadow:
        0 0 0 4px rgba(142, 200, 232, 0.28),
        0 0 40px rgba(110, 182, 224, 0.25),
        0 20px 50px rgba(0, 0, 0, 0.5);
    animation: pull-logged-pop 0.6s cubic-bezier(0.18, 1.2, 0.4, 1) both;
    overflow: hidden;
}

.pull-logged-rays {
    position: absolute;
    inset: -40%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(142, 200, 232, 0.12) 20deg,
        transparent 40deg,
        rgba(110, 182, 224, 0.1) 60deg,
        transparent 80deg,
        rgba(110, 182, 224, 0.1) 100deg,
        transparent 120deg
    );
    animation: pull-rays-spin 4s linear infinite;
    pointer-events: none;
}

@keyframes pull-rays-spin {
    to { transform: rotate(360deg); }
}

.pull-logged-kicker {
    position: relative;
    font-family: "Orbitron", sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    color: #7ec8d8;
    margin-bottom: 0.35rem;
}

.pull-logged-title {
    position: relative;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 850;
    letter-spacing: 0.08em;
    color: #8ec8e8;
    text-shadow: 0 0 22px rgba(142, 200, 232, 0.55);
}

.pull-logged-sub {
    position: relative;
    margin-top: 0.4rem;
    color: #d0d6cc;
    font-weight: 600;
}

.pull-logged-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.pull-logged-confetti span {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    top: 40%;
    left: 50%;
    opacity: 0;
    animation: pull-confetti 1.4s ease-out forwards;
}

.pull-logged-confetti span:nth-child(1) { background: #8ec8e8; --cx: -90px; --cy: -70px; animation-delay: 0.05s; }
.pull-logged-confetti span:nth-child(2) { background: #6eb6e0; --cx: 95px; --cy: -60px; animation-delay: 0.1s; }
.pull-logged-confetti span:nth-child(3) { background: #6eb6e0; --cx: -70px; --cy: 65px; animation-delay: 0.12s; }
.pull-logged-confetti span:nth-child(4) { background: #7ec8d8; --cx: 85px; --cy: 55px; animation-delay: 0.08s; }
.pull-logged-confetti span:nth-child(5) { background: #8ec8e8; --cx: -40px; --cy: -95px; animation-delay: 0.15s; width: 6px; height: 12px; }
.pull-logged-confetti span:nth-child(6) { background: #7ec8ff; --cx: 50px; --cy: -90px; animation-delay: 0.18s; width: 10px; height: 5px; }
.pull-logged-confetti span:nth-child(7) { background: #ff5e62; --cx: -100px; --cy: 10px; animation-delay: 0.14s; }
.pull-logged-confetti span:nth-child(8) { background: #b8c8a8; --cx: 100px; --cy: 20px; animation-delay: 0.16s; }

@keyframes pull-confetti {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translate(var(--cx), var(--cy)) rotate(220deg) scale(0.3); opacity: 0; }
}

@keyframes pull-logged-pop {
    0% { transform: scale(0.55) rotate(-2deg); opacity: 0; }
    55% { transform: scale(1.06) rotate(1deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

@keyframes pull-logged-fade {
    0% { opacity: 0; }
    12% { opacity: 1; }
    72% { opacity: 1; }
    100% { opacity: 0; }
}

/* —— Actual pull result panel —— */
.result-panel.pull-revealed {
    position: relative;
    overflow: hidden;
    border-color: rgba(142, 200, 232, 0.45) !important;
    background:
        radial-gradient(ellipse 100% 80% at 50% 0%, rgba(142, 200, 232, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 80% 60% at 80% 100%, rgba(110, 182, 224, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, rgba(28, 18, 40, 0.98) 0%, rgba(12, 14, 28, 0.98) 100%) !important;
    box-shadow:
        0 0 0 1px rgba(142, 200, 232, 0.15),
        0 14px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: pull-panel-in 0.7s cubic-bezier(0.18, 1.1, 0.4, 1) both;
}

.result-panel.pull-revealed.celebrating {
    animation: pull-panel-in 0.7s cubic-bezier(0.18, 1.1, 0.4, 1) both, pull-panel-pulse 1.2s ease-in-out 2;
}

@keyframes pull-panel-in {
    0% { opacity: 0; transform: translateY(18px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pull-panel-pulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(142, 200, 232, 0.15), 0 14px 40px rgba(0, 0, 0, 0.35); }
    50% { box-shadow: 0 0 0 2px rgba(142, 200, 232, 0.45), 0 0 36px rgba(142, 200, 232, 0.25), 0 14px 40px rgba(0, 0, 0, 0.35); }
}

.pull-revealed-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.pull-revealed-bg .pr-ring {
    position: absolute;
    width: 16rem;
    height: 16rem;
    left: 50%;
    top: -4rem;
    margin-left: -8rem;
    border-radius: 50%;
    border: 1px solid rgba(142, 200, 232, 0.2);
    animation: pr-ring-expand 3.5s ease-out infinite;
}

@keyframes pr-ring-expand {
    0% { transform: scale(0.6); opacity: 0.7; }
    100% { transform: scale(1.5); opacity: 0; }
}

.pull-revealed-bg .pr-spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8ec8e8;
    box-shadow: 0 0 10px #8ec8e8;
    animation: pr-sparkle 2.4s ease-in-out infinite;
}

.pull-revealed-bg .pr-spark.s1 { top: 12%; left: 8%; animation-delay: 0s; }
.pull-revealed-bg .pr-spark.s2 { top: 18%; right: 12%; background: #6eb6e0; animation-delay: 0.3s; }
.pull-revealed-bg .pr-spark.s3 { bottom: 28%; left: 14%; background: #6eb6e0; animation-delay: 0.6s; }
.pull-revealed-bg .pr-spark.s4 { bottom: 22%; right: 10%; background: #7ec8d8; animation-delay: 0.9s; }
.pull-revealed-bg .pr-spark.s5 { top: 40%; left: 4%; background: #b8c8a8; animation-delay: 1.1s; }
.pull-revealed-bg .pr-spark.s6 { top: 50%; right: 6%; background: #8ec8e8; animation-delay: 1.4s; }

@keyframes pr-sparkle {
    0%, 100% { opacity: 0.25; transform: scale(0.7); }
    50% { opacity: 1; transform: scale(1.35); }
}

.pull-revealed-head {
    position: relative;
    text-align: center;
    margin-bottom: 1.1rem;
}

.pull-revealed-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #7ec8d8;
    margin-bottom: 0.35rem;
    text-shadow: 0 0 12px rgba(126, 200, 216, 0.4);
}

.pull-live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #7ec8d8;
    box-shadow: 0 0 10px #7ec8d8;
    animation: pull-live-blink 1s ease-in-out infinite;
}

@keyframes pull-live-blink {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.pull-revealed-title {
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #8ec8e8;
    margin: 0 0 0.25rem;
    text-shadow: 0 0 18px rgba(142, 200, 232, 0.4);
}

.pull-revealed-sub {
    margin: 0;
    color: #8a9288;
    font-size: 0.9rem;
}

.pull-result-showcase {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.pull-card-stage {
    position: relative;
    flex-shrink: 0;
    animation: pull-card-enter 0.85s cubic-bezier(0.18, 1.2, 0.4, 1) both;
}

@keyframes pull-card-enter {
    0% { opacity: 0; transform: translateY(24px) scale(0.85) rotateY(-18deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotateY(0); }
}

.pull-card-glow {
    position: absolute;
    inset: -12%;
    border-radius: 1rem;
    background: radial-gradient(circle, rgba(142, 200, 232, 0.45) 0%, transparent 65%);
    animation: pull-card-glow 2s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes pull-card-glow {
    from { opacity: 0.55; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1.08); }
}

.pull-card-art {
    position: relative;
    z-index: 1;
    width: min(160px, 42vw);
    border-radius: 0.65rem;
    border: 2px solid rgba(142, 200, 232, 0.55);
    box-shadow:
        0 0 24px rgba(142, 200, 232, 0.35),
        0 12px 28px rgba(0, 0, 0, 0.45);
    animation: pull-card-float 3.2s ease-in-out infinite;
}

@keyframes pull-card-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.pull-card-placeholder {
    position: relative;
    z-index: 1;
    width: 120px;
    height: 168px;
    border-radius: 0.65rem;
    border: 2px dashed rgba(142, 200, 232, 0.4);
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #8ec8e8;
}

.pull-result-meta {
    flex: 1 1 12rem;
    min-width: 0;
    max-width: 22rem;
    animation: pull-meta-enter 0.7s ease 0.15s both;
}

@keyframes pull-meta-enter {
    0% { opacity: 0; transform: translateX(12px); }
    100% { opacity: 1; transform: translateX(0); }
}

.pull-energy-showcase {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.28);
    max-width: 12rem;
}

.pull-energy-symbol-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 14px rgba(142, 200, 232, 0.35));
    animation: energy-symbol-pop 0.7s cubic-bezier(0.18, 1.2, 0.4, 1) both,
               energy-symbol-float 3s ease-in-out 0.7s infinite;
}

.energy-symbol-svg {
    display: block;
    border-radius: 50%;
}

@keyframes energy-symbol-pop {
    0% { opacity: 0; transform: scale(0.5) rotate(-12deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes energy-symbol-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.pull-energy-name {
    font-family: "Orbitron", sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: #fff;
}

.pull-energy-showcase.energy-fire .pull-energy-name { color: #7eb8d8; }
.pull-energy-showcase.energy-water .pull-energy-name { color: #7ec8ff; }
.pull-energy-showcase.energy-grass .pull-energy-name { color: #9af06a; }
.pull-energy-showcase.energy-lightning .pull-energy-name { color: #ffe566; }
.pull-energy-showcase.energy-psychic .pull-energy-name { color: #e9b3ff; }
.pull-energy-showcase.energy-fighting .pull-energy-name { color: #f0c09a; }
.pull-energy-showcase.energy-darkness .pull-energy-name { color: #c8c8e0; }
.pull-energy-showcase.energy-colorless .pull-energy-name { color: #e8e8f0; }

.pull-energy-label,
.pull-hit-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a9288;
}

.pull-hit-block {
    margin-bottom: 0.55rem;
}

.pull-hit-name {
    display: block;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.15rem, 3vw, 1.45rem);
    letter-spacing: 0.03em;
    color: #fff;
    text-shadow: 0 0 16px rgba(110, 182, 224, 0.35);
    line-height: 1.2;
}

.pull-notes {
    margin: 0 0 0.55rem;
    color: #8a9288;
    font-size: 0.9rem;
    font-style: italic;
}

.pull-score-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(126, 200, 216, 0.4);
    background: rgba(20, 40, 30, 0.75);
    color: #7ec8d8;
    font-family: "Orbitron", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    animation: pull-score-in 0.6s ease 0.35s both;
}

.pull-score-banner.no-hits {
    border-color: rgba(160, 160, 180, 0.35);
    background: rgba(30, 30, 40, 0.75);
    color: #8a9288;
}

.psb-icon.miss {
    background: #6a7268;
    color: #1a1a28;
}

@keyframes pull-score-in {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.psb-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: #7ec8d8;
    color: #0a1a10;
    font-size: 0.75rem;
    font-weight: 800;
}

/* Host next-pack row under actual pull */
.next-pack-actions {
    position: relative;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(142, 200, 232, 0.2);
}

.next-pack-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: stretch;
}

.next-pack-primary {
    flex: 1 1 12rem;
    min-width: 0;
    font-weight: 750;
    box-shadow: 0 6px 20px rgba(100, 140, 255, 0.3);
    animation: cta-glow 1.8s ease-in-out infinite;
}

.next-pack-change {
    flex: 1 1 10rem;
    min-width: 0;
    white-space: nowrap;
}

.next-pack-hint {
    margin-top: 0.65rem !important;
}

@media (max-width: 480px) {
    .next-pack-actions-row {
        flex-direction: column;
    }

    .next-pack-primary,
    .next-pack-change {
        width: 100%;
        flex: none;
    }
}

.chase-gallery {
    align-items: flex-start;
}

.chase-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    max-width: 88px;
}

.chase-thumb {
    width: 72px;
    height: auto;
    border-radius: 0.4rem;
    background: #10141a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.chase-chip .chip {
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: normal;
}

.locked-guess {
    background: #1a2a22;
    border: 1px solid #2f5a45;
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
}

.guess-grid {
    display: grid;
    gap: 0.65rem;
}

.pull-result {
    font-size: 1.15rem;
}

.hint {
    color: #8a9288;
    font-size: 0.88rem;
    margin-top: 0.55rem;
    margin-bottom: 0;
}

.form-control, .form-select {
    background: #10141a;
    border-color: #2a323c;
    color: #e8ece6;
}

.form-control::placeholder {
    color: #7f88ad;
}

.form-control:focus, .form-select:focus {
    background: #10141a;
    color: #e8ece6;
    border-color: #5a6a50;
}

.form-label {
    color: #b4bcb0;
    font-weight: 600;
}

.alert {
    border-radius: 0.75rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #ff7b7b;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: 0.75rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Mobile-first sidebar feel on phones + Safari */
@media (max-width: 640.98px) {
    .content {
        padding-left: max(0.5rem, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(0.5rem, env(safe-area-inset-right, 0px)) !important;
        padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .action-row .btn {
        flex: 1 1 100%;
    }

    .room-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .room-header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .room-header-actions .btn {
        flex: 1 1 auto;
        min-width: 0;
    }

    .pack-current {
        flex-direction: column;
        align-items: stretch;
    }

    .pack-actions {
        justify-content: stretch;
    }

    .pack-actions .btn {
        flex: 1 1 auto;
    }

    .pull-result-showcase {
        flex-direction: column;
        text-align: center;
    }

    .pull-result-meta {
        max-width: none;
        align-items: center;
    }

    .pull-energy-showcase {
        align-items: center;
        margin-left: auto;
        margin-right: auto;
    }

    .timer-digits {
        font-size: clamp(1.6rem, 10vw, 2.4rem);
    }

    .card-pick-list,
    .card-pick-list-full {
        max-height: min(55dvh, 420px);
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .set-grid {
        grid-template-columns: 1fr;
    }

    .guest-wait-stage {
        width: 8rem;
        height: 8rem;
    }

    /* Bottom sheet safe for home indicator */
    .player-profile-overlay {
        align-items: flex-end;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .player-profile-sheet {
        max-height: min(88dvh, 40rem);
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
        -webkit-overflow-scrolling: touch;
    }

    .top-value-list {
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent fixed overlays from covering the notch badly */
    .reveal-overlay,
    .pull-logged-overlay {
        padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
                 env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    }
}

/* =========================================================
   SOCIAL — friends, player IDs, invites
   ========================================================= */
.social-page {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding-bottom: 1.5rem;
}

.social-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.social-kicker {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: #6eb6e0;
    margin-bottom: 0.25rem;
}

.social-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3dff8a;
    box-shadow: 0 0 8px #3dff8a;
}

.social-sub {
    color: #8a96a4;
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
}

.social-notify-btn {
    position: relative;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(110, 182, 224, 0.35);
    background: rgba(10, 16, 22, 0.9);
    color: #c8eaf8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.social-notify-btn.has-alerts {
    border-color: rgba(61, 255, 138, 0.55);
    box-shadow: 0 0 16px rgba(61, 255, 138, 0.2);
}

.social-bell-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #3dff8a;
    color: #04140a;
    font-family: "Orbitron", sans-serif;
    font-size: 0.58rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(61, 255, 138, 0.6);
}

.social-id-card {
    border-color: rgba(110, 182, 224, 0.35) !important;
}

.social-id-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8a96a4;
    margin-bottom: 0.4rem;
}

.social-id-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.social-id-tag {
    font-family: "Orbitron", sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #9ad4f0;
    background: rgba(0, 20, 30, 0.65);
    border: 1px solid rgba(110, 182, 224, 0.4);
    border-radius: 0.55rem;
    padding: 0.4rem 0.75rem;
    text-shadow: 0 0 12px rgba(110, 182, 224, 0.4);
}

.social-add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.social-add-row .form-control {
    flex: 1 1 12rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: "Orbitron", sans-serif;
    font-size: 0.85rem !important;
}

.social-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.social-section-head h2 {
    margin: 0 !important;
}

.social-inbox-pill {
    font-family: "Orbitron", sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(61, 255, 138, 0.15);
    border: 1px solid rgba(61, 255, 138, 0.45);
    color: #3dff8a;
}

.social-subhead {
    font-family: "Orbitron", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6eb6e0;
    margin: 0.75rem 0 0.45rem;
}

.social-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-list-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(110, 182, 224, 0.18);
    background: rgba(0, 0, 0, 0.25);
}

.social-list-item.invite {
    border-color: rgba(61, 255, 138, 0.3);
    background: linear-gradient(90deg, rgba(20, 40, 28, 0.5), rgba(0, 0, 0, 0.25));
}

.social-list-item.muted {
    opacity: 0.75;
}

.social-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.social-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 0.55rem;
    overflow: hidden;
    border: 1px solid rgba(110, 182, 224, 0.3);
}

.social-avatar svg {
    width: 40px;
    height: 40px;
    display: block;
}

.social-presence-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #0a1016;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.social-presence-dot.online {
    background: #3dff8a;
    box-shadow: 0 0 8px rgba(61, 255, 138, 0.85);
    animation: social-online-pulse 1.6s ease-in-out infinite;
}

.social-presence-dot.offline {
    background: #4a5560;
}

@keyframes social-online-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(61, 255, 138, 0.55), 0 0 8px rgba(61, 255, 138, 0.7); }
    50% { box-shadow: 0 0 0 4px rgba(61, 255, 138, 0), 0 0 12px rgba(61, 255, 138, 0.95); }
}

.social-list-item.is-online {
    border-color: rgba(61, 255, 138, 0.28);
    background: linear-gradient(90deg, rgba(16, 36, 24, 0.45), rgba(0, 0, 0, 0.25));
}

.social-friend-open {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: inherit;
    text-align: left;
}

.social-friend-open:hover strong,
.social-friend-open:focus-visible strong {
    color: #9ad4f0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.social-friend-open:focus-visible {
    outline: 1px solid rgba(110, 182, 224, 0.55);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

.social-presence-label {
    font-family: "Orbitron", sans-serif;
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.social-presence-label.online {
    color: #3dff8a;
    border-color: rgba(61, 255, 138, 0.45);
    background: rgba(61, 255, 138, 0.12);
}

.social-presence-label.offline {
    color: #7a8694;
    border-color: rgba(120, 130, 140, 0.35);
    background: rgba(40, 48, 56, 0.45);
}

.social-list-meta {
    flex: 1 1 8rem;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.social-list-meta strong {
    font-family: "Orbitron", sans-serif;
    font-size: 0.88rem;
    color: #e6ebf0;
}

.player-profile-identity .social-tag-chip,
.player-profile-identity .social-presence-label {
    margin-top: 0.25rem;
    margin-right: 0.35rem;
    display: inline-block;
}

.social-tag-chip {
    font-family: "Orbitron", sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(110, 182, 224, 0.4);
    color: #9ad4f0;
    background: rgba(0, 24, 36, 0.55);
}

.social-list-detail {
    width: 100%;
    font-size: 0.82rem;
    color: #8a96a4;
}

.social-list-detail .code {
    margin-left: 0.35rem;
    font-size: 0.75rem;
}

.social-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-left: auto;
}

.room-invite-friends {
    margin-bottom: 0.85rem;
}

.room-friend-invite-list {
    margin-top: 0.35rem;
}

@media (max-width: 640px) {
    .social-add-row .btn {
        width: 100%;
    }
    .social-list-actions {
        width: 100%;
        margin-left: 0;
    }
    .social-list-actions .btn {
        flex: 1;
    }
}
