:root {
    --bg: #0f1117;
    --bg-card: #1a1d27;
    --bg-hover: #242836;
    --text: #e4e6ed;
    --text-muted: #8b8fa3;
    --primary: #6c5ce7;
    --primary-hover: #5a4bd1;
    --secondary: #2d3142;
    --accent: #00cec9;
    --success: #00b894;
    --error: #e17055;
    --warning: #fdcb6e;
    --ctf: #e84393;
    --border: #2d3142;
    --radius: 12px;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.nav-brand a {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}
.nav-logo {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}
.nav-brand-short { display: none; }
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-hover);
    color: var(--text);
    cursor: pointer;
}
.nav-toggle-bar {
    display: block;
    width: 1.1rem;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links > a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.nav-links > a:hover { color: var(--text); }
.nav-locked-link {
    color: var(--text-muted);
    opacity: 0.72;
    font-size: 0.95rem;
    cursor: not-allowed;
}

.nav-user-menu {
    position: relative;
    margin-left: 0.25rem;
}
.nav-user-menu::before {
    content: '';
    position: absolute;
    inset: 100% 0 auto 0;
    height: 0.5rem;
}
.nav-links .nav-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.35;
    box-sizing: border-box;
    overflow: visible;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.nav-links .nav-user-trigger::after {
    content: '';
    flex-shrink: 0;
    width: 0.45rem;
    height: 0.45rem;
    margin-top: -0.1rem;
    border-right: 1.5px solid var(--text-muted);
    border-bottom: 1.5px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.nav-links .nav-user-trigger:hover,
.nav-user-menu:hover .nav-user-trigger,
.nav-user-menu:focus-within .nav-user-trigger {
    background: var(--bg-hover);
    border-color: var(--border);
    color: var(--text);
    text-decoration: none;
}
.nav-user-menu:hover .nav-user-trigger::after,
.nav-user-menu:focus-within .nav-user-trigger::after {
    border-color: var(--text);
    margin-top: 0.15rem;
    transform: rotate(225deg);
}
.nav-user-name {
    max-width: 10rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    min-width: 11.5rem;
    padding: 0.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 200;
}
.nav-user-menu:hover .nav-user-dropdown,
.nav-user-menu:focus-within .nav-user-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}
.nav-user-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}
.nav-user-item svg {
    flex-shrink: 0;
    color: var(--text-muted);
}
.nav-user-item:hover {
    color: var(--text);
    background: var(--bg-hover);
    text-decoration: none;
}
.nav-user-item:hover svg {
    color: var(--accent);
}
.nav-user-item-danger:hover {
    color: var(--error);
}
.nav-user-item-danger:hover svg {
    color: var(--error);
}

.approval-page { max-width: 760px; }
.approval-page > .subtitle {
    margin-bottom: 2rem;
    line-height: 1.55;
}
.approval-section {
    margin-bottom: 2.75rem;
}
.approval-list { display: flex; flex-direction: column; gap: 1.1rem; }
.approval-section-title {
    margin: 0 0 0.45rem;
    font-size: 1.2rem;
}
.approval-section-note {
    margin: 0 0 1.15rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}
.approval-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 1.15rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.approval-card h2,
.approval-card h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.approval-card p { margin: 0; color: var(--text-muted); }
.approval-meta { font-size: 0.85rem; margin-top: 0.45rem !important; }
.approval-badge {
    display: inline-block;
    margin-top: 0.55rem !important;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.approval-badge-ready {
    background: rgba(0, 184, 148, 0.18);
    color: var(--success);
}
.approval-badge-waiting {
    background: rgba(253, 203, 110, 0.18);
    color: var(--warning, #fdcb6e);
}
.approval-badge-active {
    background: rgba(108, 92, 231, 0.18);
    color: var(--accent);
}
.approval-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    flex-shrink: 0;
}
.approval-card-actions .btn-danger {
    background: rgba(225, 112, 85, 0.18);
    color: var(--error);
    border: 1px solid rgba(225, 112, 85, 0.45);
}
.approval-card-actions .btn-danger:hover {
    background: var(--error);
    color: #fff;
    border-color: var(--error);
}
.approval-empty {
    color: var(--text-muted);
    padding: 1.15rem 1.25rem;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
@media (max-width: 640px) {
    .approval-card {
        flex-direction: column;
        align-items: stretch;
    }
    .approval-card-actions .btn { width: 100%; }
}

.container { flex: 1; padding: 2rem; max-width: 1200px; margin: 0 auto; width: 100%; }
.footer { text-align: center; padding: 0.85rem 1rem; color: var(--text-muted); font-size: 0.78rem; border-top: 1px solid var(--border); }
.footer p { margin: 0; }
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem !important;
}
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

/* Legal pages */
.legal-doc {
    max-width: 760px;
    margin: 0 auto 2rem;
}
.legal-doc h1 {
    margin-bottom: 0.35rem;
}
.legal-meta {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
}
.legal-doc section {
    margin-bottom: 1.35rem;
}
.legal-doc h2 {
    font-size: 1.15rem;
    margin: 0 0 0.45rem;
}
.legal-doc p,
.legal-doc li {
    color: var(--text-muted);
    line-height: 1.55;
}
.legal-doc ul {
    margin: 0.4rem 0 0;
    padding-left: 1.2rem;
}
.legal-doc li + li {
    margin-top: 0.3rem;
}
.legal-doc a {
    color: var(--accent, #38bdf8);
}
.legal-nav {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.4rem; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.subtitle { color: var(--text-muted); margin-bottom: 2rem; }

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--secondary); color: var(--text); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-danger { background: #b91c1c; color: white; }
.btn-danger:hover { background: #991b1b; }
.btn-ctf { background: var(--ctf); color: white; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.back-link { display: inline-block; margin-bottom: 1rem; color: var(--text-muted); }

/* Auth */
.auth-container { max-width: 400px; margin: 3rem auto; }
.auth-container--with-meme { max-width: 420px; }
.auth-meme {
    margin: 0 0 1.35rem;
    text-align: center;
}
.auth-meme--below {
    margin: 2.5rem 0 0;
}
.auth-meme-frame {
    display: inline-block;
    max-width: 100%;
    padding: 0.45rem;
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    transform: rotate(-1.5deg);
    transition: transform 0.25s ease;
    animation: auth-meme-pop 0.55s ease-out both;
}
.auth-meme:hover .auth-meme-frame {
    transform: rotate(0.8deg) scale(1.02);
}
.auth-meme-frame img {
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    border-radius: 8px;
}
.auth-meme-caption {
    margin-top: 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.auth-meme--noob .auth-meme-frame {
    transform: rotate(1.8deg);
    border-color: rgba(255, 90, 90, 0.35);
    box-shadow: 0 12px 28px rgba(180, 30, 30, 0.22);
}
.auth-meme--noob:hover .auth-meme-frame {
    transform: rotate(-0.6deg) scale(1.02);
}
.auth-meme--noob .auth-meme-caption {
    color: #ff7b7b;
}
@keyframes auth-meme-pop {
    from {
        opacity: 0;
        transform: translateY(10px) rotate(-4deg) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(-1.5deg) scale(1);
    }
}
@media (prefers-reduced-motion: reduce) {
    .auth-meme-frame,
    .auth-meme:hover .auth-meme-frame,
    .auth-meme--noob .auth-meme-frame,
    .auth-meme--noob:hover .auth-meme-frame {
        animation: none;
        transition: none;
        transform: none;
    }
}
.auth-form .alert { margin: 0 0 1rem; }
.auth-form .alert p { margin: 0; }
.auth-form .alert p + p { margin-top: 0.35rem; }
.auth-form .form-group { margin-bottom: 1rem; }
.auth-form label { display: block; margin-bottom: 0.3rem; color: var(--text-muted); font-size: 0.9rem; }
.auth-form input:not([type="radio"]):not([type="checkbox"]), .form-input {
    width: 100%; padding: 0.7rem; border: 1px solid var(--border);
    border-radius: 8px; background: var(--bg); color: var(--text); font-size: 1rem;
}
.auth-form .radio-list {
    list-style: none;
    margin: 0.2rem 0 0.45rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.auth-form .radio-list li {
    margin: 0;
}
.auth-form .radio-list label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    width: auto;
}
.auth-form .radio-list input[type="radio"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}
.auth-form .checkbox-list {
    list-style: none;
    margin: 0.35rem 0 0.45rem;
    padding: 0.65rem 0.75rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    max-height: 11rem;
    overflow-y: auto;
}
.auth-form .checkbox-list li {
    margin: 0;
    min-width: 0;
}
.auth-form .checkbox-list label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.25;
    cursor: pointer;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.auth-form .checkbox-list input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}
@media (max-width: 900px) {
    .auth-form .checkbox-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .auth-form .checkbox-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 420px) {
    .auth-form .checkbox-list {
        grid-template-columns: 1fr;
    }
}
.auth-link { text-align: center; margin-top: 1.5rem; color: var(--text-muted); }
.auth-intro { color: var(--text-muted); font-size: 0.92rem; line-height: 1.45; margin: 0 0 1rem; }
.error { color: var(--error); font-size: 0.85rem; }
.help-text { color: var(--text-muted); font-size: 0.8rem; }

/* Dashboard */
.stats-row { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.stat-card { flex: 1; min-width: 140px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.total-leaderboard-section {
    background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius);
    border: 1px solid var(--border); margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius);
    border: 1px solid var(--border); flex: 1; text-align: center;
}
.stat-card.ctf { border-color: var(--ctf); }
.stat-value { display: block; font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { color: var(--text-muted); font-size: 0.85rem; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.game-card {
    background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius);
    border: 1px solid var(--border); transition: border-color 0.2s;
}
.game-card:hover { border-color: var(--primary); }
.best-score { color: var(--accent); margin: 0.5rem 0; }
.score-points { color: var(--text-muted); margin: 0.35rem 0 0.75rem; font-size: 0.9rem; }
.no-score { color: var(--text-muted); margin: 0.5rem 0; }
.play-count { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.mini-leaderboard { margin: 1rem 0; font-size: 0.85rem; }
.mini-points { color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }
.entry-points { color: var(--text-muted); }
.mini-leaderboard .rank { color: var(--accent); font-weight: 700; }
.mini-leaderboard ol { padding-left: 1.2rem; color: var(--text-muted); }
.card-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

.ctf-banner {
    background: linear-gradient(135deg, #2d1b69, #e84393);
    padding: 2rem; border-radius: var(--radius); text-align: center;
}
.ctf-banner h2 { margin-bottom: 0.5rem; }
.ctf-banner p { margin-bottom: 1rem; opacity: 0.9; }

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.85rem;
}
.category-card {
    background: var(--bg-card); padding: 0.9rem 1rem; border-radius: var(--radius);
    border: 1px solid var(--border);
}
.category-card h2 {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
}
.category-desc {
    margin: 0 0 0.55rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}
.game-links { list-style: none; margin-top: 0; }
.game-links li { margin: 0.25rem 0; }
.game-links a { color: var(--accent); }

/* Game common */
.game-header { margin-bottom: 1.5rem; }
.game-container { background: var(--bg-card); padding: 2rem; border-radius: var(--radius); border: 1px solid var(--border); }
.game-stats-bar {
    display: flex; gap: 2rem; margin-bottom: 1.5rem; padding: 0.8rem 1rem;
    background: var(--bg); border-radius: 8px; font-size: 0.95rem;
}
.game-stats-bar strong { color: var(--accent); }
.instruction { color: var(--text-muted); margin-bottom: 1rem; }

/* Fullscreen game layout (desktop 1920x1080+) */
body.game-page {
    height: 100vh;
    overflow: hidden;
}

body.game-page .footer {
    display: none;
}

body.game-page .navbar {
    padding: 0.5rem 2rem;
    flex-shrink: 0;
}

body.game-page .container {
    max-width: min(96vw, 1920px);
    width: 100%;
    padding: 0.5rem 1.5rem 1rem;
    margin: 0 auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.game-page .game-page-layout {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.game-page .game-header {
    margin-bottom: 0.35rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

body.game-page .game-header h1 {
    font-size: 1.35rem;
    margin: 0;
}

body.game-page .game-header .back-link {
    margin: 0;
    font-size: 0.9rem;
    white-space: nowrap;
}

body.game-page .game-container {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    overflow: hidden;
}

body.game-page .game-play-area {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.game-page .game-play-area > * {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.game-page .instruction {
    flex-shrink: 0;
    margin-bottom: 0.5rem;
}

body.game-page .game-stats-bar {
    flex-shrink: 0;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
}

body.game-page #score-result {
    flex-shrink: 0;
    margin-top: 0.5rem;
}

body.game-page .aim-game,
body.game-page .pubg-shooter,
body.game-page .minesweeper-game,
body.game-page .csgo-memory-game,
body.game-page .random-game,
body.game-page #popup-game,
body.game-page #retro-desktop,
body.game-page #defrag-game {
    min-height: 0;
}

body.game-page .typing-game {
    min-height: 0;
    min-width: 0;
    width: 100%;
}

body.game-page .ten-seconds-game {
    flex: 1;
    min-height: 0;
}

body.game-page .drunk-maze-game {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

body.game-page .drunk-maze-status {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

body.game-page .drunk-maze-wrap {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0.35rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background:
        radial-gradient(circle at 20% 20%, rgba(108, 92, 231, 0.18), transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(0, 206, 201, 0.12), transparent 28%),
        #0a0c12;
    position: relative;
}

body.game-page #drunk-maze-canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    max-height: min(74vh, 820px);
    border-radius: 14px;
    background: #0a0c12;
    cursor: crosshair;
    touch-action: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

body.game-page .drunk-maze-debug {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.04);
}

body.game-page .drunk-maze-debug.hidden {
    display: none;
}

body.game-page .drunk-maze-debug-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

body.game-page .drunk-maze-debug-toolbar .btn.is-active {
    border-color: var(--accent);
    color: #fff;
    background: rgba(108, 92, 231, 0.35);
}

body.game-page .drunk-maze-debug-hint {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

body.game-page .drunk-maze-debug-export {
    width: 100%;
    min-height: 7rem;
    resize: vertical;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #0a0c12;
    color: #d8dee9;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.78rem;
    line-height: 1.4;
}

body.game-page .drunk-maze-game.is-route-debug #drunk-maze-canvas {
    cursor: default;
}

body.game-page .drunk-maze-game.is-route-debug.is-route-edit #drunk-maze-canvas {
    cursor: crosshair;
}

body.game-page .drunk-maze-screamer {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
}

body.game-page .drunk-maze-screamer.hidden {
    display: none;
}

body.game-page .drunk-maze-screamer-flash {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(255, 0, 0, 0.85) 0%, rgba(120, 0, 0, 0.95) 45%, #000 100%);
    animation: drunk-screamer-flash 0.18s steps(2, end) infinite;
}

body.game-page .drunk-maze-screamer-face {
    position: relative;
    z-index: 2;
    font-size: clamp(5rem, 24vw, 12rem);
    line-height: 1;
    filter: drop-shadow(0 0 24px rgba(255, 0, 0, 0.8));
    animation: drunk-screamer-shake 0.12s linear infinite;
}

body.game-page .drunk-maze-screamer-message {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 12%;
    transform: translateX(-50%);
    width: min(90%, 560px);
    margin: 0;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    text-align: center;
    font-size: clamp(1rem, 2.4vw, 1.35rem);
    line-height: 1.45;
}

body.game-page .drunk-maze-screamer-message.hidden {
    display: none;
}

@keyframes drunk-screamer-flash {
    0% { opacity: 1; }
    50% { opacity: 0.35; }
    100% { opacity: 1; }
}

@keyframes drunk-screamer-shake {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-8px, 4px) scale(1.04); }
    50% { transform: translate(8px, -4px) scale(1.02); }
    75% { transform: translate(-4px, -6px) scale(1.05); }
    100% { transform: translate(0, 0) scale(1); }
}

body.game-page .ten-seconds-stage {
    --ten-seconds-bg: none;
    position: relative;
    flex: 1;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #0f1117;
    isolation: isolate;
}

body.game-page .ten-seconds-backdrop,
body.game-page .ten-seconds-overlay {
    position: absolute;
    inset: 0;
}

body.game-page .ten-seconds-backdrop {
    background-image: var(--ten-seconds-bg);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
    opacity: 0.95;
}

body.game-page .ten-seconds-overlay {
    background: linear-gradient(rgba(10, 12, 18, 0.28), rgba(10, 12, 18, 0.7));
}

body.game-page .ten-seconds-content {
    position: relative;
    z-index: 1;
    width: min(100%, 720px);
    padding: 2rem;
    text-align: center;
}

body.game-page .ten-seconds-status,
body.game-page .ten-seconds-hint {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

body.game-page .ten-seconds-status {
    margin-bottom: 1rem;
    font-size: 1rem;
    letter-spacing: 0.03em;
}

body.game-page .ten-seconds-timer {
    margin: 0 0 1rem;
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 800;
    line-height: 1;
    color: #fff;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    font-variant-numeric: tabular-nums;
}

body.game-page .ten-seconds-hint {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

body.game-page .ten-seconds-result {
    margin: 0 auto 1rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(15, 17, 23, 0.62);
    color: #fff;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

body.game-page .aim-canvas-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
}

body.game-page .pubg-canvas-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
}

body.game-page #aim-canvas {
    flex: 1;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    margin-bottom: 0.5rem;
}

body.game-page #pubg-canvas {
    flex: 1;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    margin-bottom: 0.5rem;
}

body.game-page .aim-game .btn,
body.game-page .pubg-shooter .btn,
body.game-page .typing-game .btn,
body.game-page .random-game .btn {
    flex-shrink: 0;
    align-self: flex-start;
}

body.game-page .text-display {
    flex: 1;
    min-height: 120px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: 1.35rem;
    line-height: 2;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

body.game-page .typing-input {
    flex-shrink: 0;
    height: 100px;
    font-size: 1.2rem;
}

body.game-page .minesweeper-game {
    flex: 0 1 auto;
    max-width: none;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    min-height: 0;
}

body.game-page .csgo-memory-game {
    flex: 1 1 auto;
    align-self: center;
    width: min(100%, calc(var(--memory-card-size, 96px) * 6 + 2.5rem));
    max-width: min(96vw, 828px);
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    overflow: hidden;
    min-height: 0;
    --memory-card-size: min(
        96px,
        calc((100vh - 24rem) / 4),
        calc((min(96vw, 828px) - 2.5rem) / 6)
    );
}

body.game-page .csgo-memory-game .instruction {
    margin-bottom: 0;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
    flex-shrink: 0;
    line-height: 1.35;
}

body.game-page .csgo-memory-game .memory-toolbar {
    width: 100%;
    flex-shrink: 0;
    margin-bottom: 0;
    padding: 0.45rem 0.75rem;
    gap: 1rem;
}

body.game-page .csgo-memory-game .memory-counter strong {
    font-size: 1.1rem;
}

body.game-page .csgo-memory-game .memory-grid {
    --memory-card-size: min(
        96px,
        calc((100vh - 24rem) / 4),
        calc((min(96vw, 828px) - 2.5rem) / 6)
    );
    display: grid;
    grid-template-columns: repeat(6, var(--memory-card-size));
    grid-template-rows: repeat(4, var(--memory-card-size));
    gap: 0.4rem;
    width: fit-content;
    height: fit-content;
    max-width: none;
    margin: 0 auto;
    flex: 0 0 auto;
}

body.game-page .csgo-memory-game .memory-card {
    width: var(--memory-card-size);
    height: var(--memory-card-size);
    aspect-ratio: 1;
}

body.game-page .csgo-memory-game .memory-card-front::after {
    font-size: clamp(0.75rem, calc(var(--memory-card-size) * 0.28), 1.35rem);
}

body.game-page .csgo-memory-game .memory-status {
    margin-top: 0;
    flex-shrink: 0;
    font-size: 0.9rem;
}

body.game-page .minesweeper-game .ms-toolbar {
    flex-shrink: 0;
    margin-bottom: 0.65rem;
    padding: 0.55rem 0.9rem;
}

body.game-page .minesweeper-game .ms-counter strong {
    font-size: 1.2rem;
}

body.game-page .minesweeper-grid {
    --cell-size: min(
        42px,
        calc((100vh - 26rem) / 9),
        calc((100vw - 4rem) / 9)
    );
    display: grid;
    gap: 2px;
    width: fit-content;
    height: fit-content;
    grid-template-columns: repeat(9, var(--cell-size));
    grid-template-rows: repeat(9, var(--cell-size));
    flex: 0 0 auto;
    flex-shrink: 0;
    margin: 0 auto;
    padding: 4px;
}

body.game-page .ms-cell {
    width: var(--cell-size);
    height: var(--cell-size);
    min-width: var(--cell-size);
    min-height: var(--cell-size);
    max-width: var(--cell-size);
    max-height: var(--cell-size);
    aspect-ratio: 1;
    font-size: clamp(0.7rem, calc(var(--cell-size) * 0.42), 1.1rem);
    box-sizing: border-box;
}

body.game-page .ms-status,
body.game-page .ms-hint {
    flex-shrink: 0;
    text-align: center;
}

body.game-page .minesweeper-game .ms-status {
    margin-top: 0.65rem;
    font-size: 0.9rem;
}

body.game-page .minesweeper-game .ms-hint {
    margin-top: 0.35rem;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

body.game-page .click-area {
    flex: 1;
    width: auto;
    height: auto;
    max-width: min(68vh, 640px);
    max-height: min(68vh, 640px);
    aspect-ratio: 1;
    margin: 0 auto;
    font-size: clamp(2rem, 4vw, 3.5rem);
}

body.game-page .drag-area,
body.game-page .sort-area {
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    gap: 1rem;
}

body.game-page .drag-block,
body.game-page .sort-block {
    width: clamp(72px, 8vw, 120px);
    height: clamp(72px, 8vw, 120px);
    font-size: clamp(1.2rem, 2vw, 2rem);
}

body.game-page .tower-area {
    flex: 1;
    min-height: 0;
    align-items: flex-end;
}

body.game-page .tower-base {
    min-height: calc(100vh - 18rem);
    max-height: calc(100vh - 14rem);
}

body.game-page .tower-block {
    width: clamp(72px, 8vw, 120px);
    min-height: 40px;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
}

body.game-page .logic-game {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.75rem;
    overflow: auto;
    min-height: 0;
}

body.game-page #sudoku-game.logic-game {
    align-items: center;
    justify-content: center;
}

body.game-page #sudoku-game .game-stats-bar {
    width: min(280px, 70vmin);
    justify-content: space-between;
}

body.game-page .sudoku-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 3px;
    width: min(280px, 70vmin);
    height: min(280px, 70vmin);
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    align-self: center;
    margin: 0;
    padding: 3px;
    box-sizing: border-box;
    background: var(--border);
    border-radius: 8px;
}

body.game-page .sudoku-cell {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border-radius: 4px;
    font-size: clamp(1rem, 5vmin, 1.75rem);
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
}

body.game-page .logic-game > .btn {
    flex: 0 0 auto;
    align-self: center;
    width: auto;
}

body.game-page .lights-grid {
    grid-template-columns: repeat(5, clamp(56px, 8vw, 100px));
    gap: 8px;
    margin: 0 auto 1rem;
    width: fit-content;
}

body.game-page .light-cell {
    width: clamp(56px, 8vw, 100px);
    height: clamp(56px, 8vw, 100px);
}

body.game-page #cables-game .game-stats-bar {
    width: 100%;
}

body.game-page #cables-game .cables-intro,
body.game-page #cables-game #cables-status {
    max-width: none;
    width: 100%;
    flex-shrink: 0;
}

body.game-page .cables-board {
    flex: 1 1 auto;
    width: 100%;
    min-height: 280px;
    gap: clamp(1.5rem, 5vw, 4rem);
    padding: clamp(0.75rem, 2vw, 1.5rem) clamp(1rem, 3vw, 2rem);
}

body.game-page .cable-column {
    min-width: 0;
    width: max-content;
}

body.game-page .cable-plug,
body.game-page .cable-port {
    width: clamp(112px, 13vw, 168px);
    min-height: clamp(52px, 6.5vh, 70px);
    font-size: clamp(0.85rem, 1.2vw, 1.05rem);
    padding: 0.3rem 0.5rem;
}

body.game-page #password-game {
    min-height: 0;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.game-page .password-input {
    flex-shrink: 0;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

body.game-page #password-game .btn {
    flex-shrink: 0;
    align-self: flex-start;
}

body.game-page #password-game .rules-list {
    flex: 1;
    min-height: 8rem;
    overflow-y: auto;
    margin-bottom: 1rem;
}

body.game-page .math-school-game {
    min-height: 0;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

body.game-page .math-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

body.game-page .math-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    align-items: center;
}

body.game-page .math-row label {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

body.game-page .math-input {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
}

body.game-page .math-input.math-correct {
    border-color: var(--success);
    box-shadow: 0 0 0 1px var(--success);
}

body.game-page .math-input.math-wrong {
    border-color: var(--error);
    box-shadow: 0 0 0 1px var(--error);
}

body.game-page .math-feedback {
    margin-top: 1rem;
    color: var(--text-muted);
}

body.game-page .math-feedback.error {
    color: var(--error);
}

.hidden { display: none !important; }

.score-result {
    margin-top: 1rem; padding: 1rem; border-radius: 8px;
    background: var(--success); color: white; text-align: center;
}
.score-result.hidden { display: none; }
.score-result.error { background: var(--error); }

/* Typing */
.text-display {
    font-size: 1.2rem; line-height: 1.8; padding: 1.5rem;
    background: var(--bg); border-radius: 8px; margin-bottom: 1rem;
    font-family: 'Courier New', monospace; min-height: 80px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}
.text-display span { display: inline; }
.text-display .correct { color: var(--success); }
.text-display .incorrect { color: var(--error); background: rgba(225,112,85,0.2); }
.text-display .current { border-bottom: 2px solid var(--accent); }
.typing-input {
    width: 100%; padding: 1rem; font-size: 1.1rem; border: 1px solid var(--border);
    border-radius: 8px; background: var(--bg); color: var(--text);
    font-family: 'Courier New', monospace; margin-bottom: 1rem; resize: none; height: 80px;
}

/* Aim */
#aim-canvas {
    display: block; width: 100%; max-width: 800px; height: 500px;
    background: var(--bg); border-radius: 8px; cursor: crosshair; margin-bottom: 1rem;
}

#pubg-canvas {
    display: block; width: 100%; max-width: 1280px; height: 720px;
    background: #06080d; border-radius: 8px; cursor: crosshair; margin-bottom: 1rem;
}

.pubg-debug-note {
    margin-bottom: 0.75rem;
    color: var(--warning);
}

/* Password */
.password-input {
    width: 100%; padding: 1rem; font-size: 1.1rem; border: 1px solid var(--border);
    border-radius: 8px; background: var(--bg); color: var(--text); margin-bottom: 1rem;
}
.rules-list { margin-bottom: 1rem; }
.rule { padding: 0.5rem 0; font-size: 0.95rem; }
.rule-pass { color: var(--success); }
.rule-fail { color: var(--text-muted); }
.level-display { font-size: 1.2rem; margin-bottom: 1rem; }

/* Logic */
.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 2px;
    width: min(280px, 70vmin);
    height: min(280px, 70vmin);
    aspect-ratio: 1 / 1;
    margin: 0 auto 1rem;
    padding: 2px;
    box-sizing: border-box;
    background: var(--border);
    border-radius: 8px;
}
.sudoku-cell {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    text-align: center;
    font-size: clamp(1rem, 5vmin, 1.75rem);
    line-height: 1;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
}
.sudoku-cell.fixed { background: var(--secondary); font-weight: 700; }
.sudoku-cell:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.sudoku-border-right { border-right: 3px solid var(--text-muted) !important; }
.sudoku-border-bottom { border-bottom: 3px solid var(--text-muted) !important; }

.lights-grid {
    display: grid; grid-template-columns: repeat(5, 50px); gap: 4px;
    margin-bottom: 1rem; width: fit-content;
}
.light-cell {
    width: 50px; height: 50px; border-radius: 8px; cursor: pointer;
    border: 2px solid var(--border); transition: background 0.15s;
    padding: 0; font: inherit; color: inherit;
}
.light-on { background: var(--warning); box-shadow: 0 0 12px var(--warning); }
.light-off { background: var(--secondary); }

.cables-board {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: stretch;
    gap: clamp(1rem, 4vw, 3rem);
    margin-bottom: 1rem;
    min-height: 0;
    width: 100%;
    position: relative;
    padding: 0.75rem 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.015) 0 1px,
            transparent 1px 18px
        ),
        var(--bg);
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}
.cable-lines {
    grid-column: 1 / -1;
    grid-row: 1;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}
.cable-column {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    z-index: 2;
    width: max-content;
    max-width: 100%;
    justify-content: space-evenly;
    grid-row: 1;
}
#cable-left {
    grid-column: 1;
    justify-self: start;
    align-items: stretch;
}
#cable-right {
    grid-column: 3;
    justify-self: end;
    align-items: stretch;
}
.cable-port,
.cable-plug {
    --cable-color: var(--accent);
    width: clamp(108px, 14vw, 168px);
    min-height: clamp(52px, 7vh, 68px);
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: color-mix(in srgb, var(--bg-card) 92%, #000);
    gap: 0.2rem;
    padding: 0.35rem 0.55rem 0.4rem;
    transition: outline 0.15s, opacity 0.15s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.cable-port {
    border-style: dashed;
}
.cable-port.connected {
    border-color: var(--cable-color);
    border-style: solid;
    opacity: 0.85;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cable-color) 35%, transparent);
}
.cable-port.cable-error { animation: cable-shake 0.3s; border-color: var(--error); }
.cable-plug:hover:not(.connected),
.cable-port:hover:not(.connected) {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--cable-color) 55%, var(--border));
}
.cable-plug.selected {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.cable-plug.connected { opacity: 0.55; cursor: default; }
.cable-plug-body,
.cable-port-jack {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
.cable-jacket {
    width: 14px;
    height: 14px;
    margin-right: -2px;
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 45%),
        var(--cable-color);
    box-shadow:
        inset 0 -2px 0 rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}
.cable-plug-img,
.cable-port-img {
    width: clamp(48px, 7vw, 64px);
    height: auto;
    display: block;
    pointer-events: none;
    user-select: none;
}
.cable-port-led {
    position: absolute;
    top: 18%;
    right: 14%;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--cable-color);
    box-shadow: 0 0 8px color-mix(in srgb, var(--cable-color) 70%, transparent);
    border: 1px solid rgba(0, 0, 0, 0.45);
}
.cable-plug small, .cable-port small {
    font-size: clamp(0.58rem, 0.9vw, 0.75rem);
    color: var(--text-muted);
    line-height: 1.1;
}
.cables-intro {
    max-width: none;
}
@keyframes cable-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

@media (max-width: 640px) {
    .cables-board {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .cable-column {
        gap: 0.3rem;
    }

    .cable-plug,
    .cable-port {
        width: 86px;
        min-height: 44px;
        font-size: 0.72rem;
        padding: 0.25rem 0.35rem;
    }

    .cable-plug-img,
    .cable-port-img {
        width: 42px;
    }

    .cable-jacket {
        width: 10px;
        height: 11px;
    }

    .cable-port-led {
        width: 5px;
        height: 5px;
    }

    .cable-plug small,
    .cable-port small {
        font-size: 0.52rem;
    }
}

/* Random */
.click-area {
    width: 300px; height: 300px; font-size: 2rem; font-weight: 700;
    background: var(--primary); color: white; border: none; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    margin: 2rem auto; transition: transform 0.1s;
}
.click-area:active { transform: scale(0.95); }

.drag-area, .sort-area { display: flex; gap: 0.5rem; flex-wrap: wrap; min-height: 80px; margin-bottom: 1rem; }
.drag-block, .sort-block, .tower-block {
    width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: white; border-radius: 8px; font-size: 1.2rem;
    font-weight: 700; cursor: grab; user-select: none;
}
.sort-block { cursor: pointer; }
.tower-area { display: flex; gap: 2rem; align-items: flex-end; }
.tower-base {
    display: flex; gap: 4px; align-items: flex-end; min-height: 200px;
    padding: 1rem; background: var(--bg); border-radius: 8px; border: 2px solid var(--border);
    flex: 1;
}
.tower-pieces { display: flex; flex-direction: column-reverse; gap: 4px; }

/* Tower of Hanoi */
.hanoi-game {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.hanoi-board {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: clamp(0.75rem, 2vw, 2rem);
    flex: 1;
    min-height: 280px;
    padding: 1rem 0.5rem 0;
}

.hanoi-peg {
    position: relative;
    flex: 1;
    max-width: 220px;
    min-height: clamp(220px, 38vh, 360px);
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    transition: border-color 0.15s, background-color 0.15s;
}

.hanoi-peg:hover:not(:disabled) {
    border-color: rgba(108, 92, 231, 0.35);
    background: rgba(108, 92, 231, 0.06);
}

.hanoi-peg.selected {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.12);
}

.hanoi-peg.valid-target {
    border-color: var(--accent);
    background: rgba(0, 184, 148, 0.1);
}

.hanoi-peg-label {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hanoi-rod {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: calc(100% - 2.5rem);
    background: linear-gradient(180deg, #b2bec3, #636e72);
    border-radius: 4px;
    z-index: 0;
    pointer-events: none;
}

.hanoi-base {
    width: 100%;
    height: 18px;
    background: linear-gradient(180deg, #636e72, #2d3436);
    border-radius: 6px;
    z-index: 1;
    pointer-events: none;
}

.hanoi-stack {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-height: 0;
    margin-bottom: 18px;
}

.hanoi-disk {
    --disk-unit: clamp(18px, 3.5vw, 28px);
    width: calc(var(--disk-unit) * var(--disk-size));
    height: clamp(18px, 3vh, 26px);
    border: none;
    border-radius: 999px;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
    padding: 0;
}

.hanoi-disk:hover {
    transform: translateY(-2px);
}

.hanoi-disk.selected {
    transform: translateY(-8px);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 10px 16px rgba(0, 0, 0, 0.3);
}

.hanoi-peg.invalid-flash,
.hanoi-disk.invalid-flash {
    animation: hanoi-invalid-flash 0.55s ease;
}

@keyframes hanoi-invalid-flash {
    0%, 100% {
        box-shadow: none;
    }
    20%, 60% {
        box-shadow: 0 0 0 3px #d63031, 0 0 14px rgba(214, 48, 49, 0.55);
    }
}

.hanoi-peg.invalid-flash {
    border-color: #d63031;
    background: rgba(214, 48, 49, 0.12);
}

.hanoi-disk-floating {
    position: fixed;
    z-index: 1000;
    margin: 0;
    pointer-events: none;
    border: none;
    border-radius: 999px;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 10px 18px rgba(0, 0, 0, 0.35);
}

.hanoi-status {
    margin: 0;
    color: var(--accent);
    font-weight: 600;
}

.hanoi-message {
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(0, 184, 148, 0.12);
    color: var(--accent);
    font-weight: 600;
}

.hanoi-message.error {
    background: rgba(214, 48, 49, 0.12);
    color: #d63031;
}

body.game-page .hanoi-game {
    max-width: 640px;
    margin: 0 auto;
    flex: 0 1 auto;
}

body.game-page .hanoi-board {
    min-height: 0;
    max-height: 300px;
    flex: 0 0 auto;
    gap: 1rem;
    padding: 0.5rem 0 0;
}

body.game-page .hanoi-peg {
    min-height: 200px;
    max-height: 260px;
    max-width: 150px;
}

body.game-page .hanoi-disk {
    --disk-unit: 14px;
    height: 20px;
}

body.game-page .hanoi-rod {
    height: calc(100% - 2rem);
}

/* Leaderboard */
.leaderboard-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.leaderboard-table th, .leaderboard-table td {
    padding: 0.7rem 1rem; text-align: left; border-bottom: 1px solid var(--border);
}
.leaderboard-table th { color: var(--text-muted); font-size: 0.85rem; }
.leaderboard-table tr.highlight { background: rgba(108, 92, 231, 0.15); }

.total-games-section,
.total-ctf-section,
.total-playtime-section {
    margin-bottom: 2rem;
}

.total-games-section h2,
.total-ctf-section h2,
.total-playtime-section h2 {
    margin-bottom: 0.35rem;
}

.total-games-section .subtitle,
.total-ctf-section .subtitle,
.total-playtime-section .subtitle {
    margin-bottom: 0.25rem;
}

.playtime-games-cell {
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 36rem;
    white-space: normal;
}

.playtime-game-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}

.playtime-game-list li {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

.playtime-game-name {
    color: var(--text);
}

.playtime-game-hours {
    color: var(--text-muted);
    font-size: 0.9em;
}

.playtime-source {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    background: var(--bg-hover);
    color: var(--text-muted);
    white-space: nowrap;
}

.playtime-source.source-discord {
    color: #7289da;
}

.playtime-source.source-glampzone {
    color: var(--accent);
}

.playtime-source.source-mixed {
    color: var(--text);
}

.ctf-solve-details {
    max-width: 42rem;
}

.ctf-solve-details summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
    list-style: none;
}

.ctf-solve-details summary::-webkit-details-marker {
    display: none;
}

.ctf-solve-details[open] summary {
    margin-bottom: 0.5rem;
}

.ctf-solve-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.ctf-solve-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}

.ctf-solve-table th,
.ctf-solve-table td {
    padding: 0.4rem 0.55rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.ctf-solve-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
}

.compare-player-link {
    color: var(--accent);
    font-weight: 600;
}

.compare-player-link:hover {
    color: var(--primary);
}

.player-comparison-container {
    margin-top: 1.5rem;
}

.player-comparison {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.player-comparison-error {
    color: var(--error);
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comparison-header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.comparison-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.comparison-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comparison-stat {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    text-align: center;
}

.comparison-stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.comparison-stat strong {
    display: block;
    font-size: 1.5rem;
    color: var(--accent);
}

.comparison-stat-meta {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.comparison-stat.comparison-win {
    border-color: rgba(0, 184, 148, 0.45);
    background: rgba(0, 184, 148, 0.08);
}

.comparison-stat.comparison-loss {
    opacity: 0.85;
}

.comparison-meta {
    margin: 0 0 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.comparison-table .comparison-row-viewer td:nth-child(2) {
    color: var(--success);
    font-weight: 600;
}

.comparison-table .comparison-row-other td:nth-child(3) {
    color: var(--success);
    font-weight: 600;
}

.comparison-footer {
    margin: 1rem 0 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .comparison-summary {
        grid-template-columns: 1fr;
    }

    .comparison-header {
        flex-direction: column;
    }
}
.your-best { margin-top: 1rem; color: var(--accent); }

/* CTF */
.ctf-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.ctf-page-header h1 {
    margin: 0;
}

.ctf-admin-reset {
    margin: 0;
}

.ctf-intro {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.ctf-rules {
    margin: 1rem 0 1rem 1.25rem;
    color: var(--text-muted);
    line-height: 1.55;
}
.ctf-rules li { margin-bottom: 0.4rem; }
.ctf-rules-note {
    color: var(--warning);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}
.ctf-start-bar { margin-top: 0.5rem; }
.ctf-timer-live {
    display: inline-flex;
    gap: 0.6rem;
    align-items: baseline;
    font-size: 1.15rem;
}
.ctf-timer-live strong { color: var(--accent); font-size: 1.4rem; }
.ctf-timer-inline { color: var(--text-muted); margin-bottom: 1rem; }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1.05rem; }
.error-text { color: var(--error); margin-top: 0.5rem; }
.ctf-grid { display: grid; gap: 1rem; }
.ctf-card {
    background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius);
    border: 1px solid var(--border);
}
.ctf-card h3 { margin: 0 0 0.5rem; }
.ctf-card p { margin: 0 0 1rem; color: var(--text-muted); line-height: 1.45; }
.ctf-card .btn,
.ctf-card .badge { margin-top: 0.25rem; }
.ctf-card.solved { border-color: var(--success); }
.ctf-card.locked { opacity: 0.6; }
.ctf-challenge-content {
    background: var(--bg-card); padding: 2rem; border-radius: var(--radius);
    border: 1px solid var(--border); margin: 1.5rem 0;
}
.ctf-code {
    display: block; padding: 1rem; background: var(--bg); border-radius: 8px;
    font-family: monospace; margin: 1rem 0; word-break: break-all;
}
.ctf-submit { margin-top: 1.5rem; }
.ctf-flag-input {
    width: 100%; padding: 0.8rem; border: 1px solid var(--border);
    border-radius: 8px; background: var(--bg); color: var(--text); font-size: 1rem;
    margin-bottom: 1rem;
}
.hint-box {
    margin-top: 1rem; padding: 1rem; background: rgba(253,203,110,0.15);
    border-radius: 8px; color: var(--warning);
}
.badge { display: inline-block; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.85rem; }
.badge-success { background: rgba(0,184,148,0.2); color: var(--success); }
.badge-locked { background: var(--secondary); color: var(--text-muted); }

.alert { padding: 1rem; border-radius: 8px; margin: 1rem 0; }
.alert-success { background: rgba(0,184,148,0.2); color: var(--success); }
.alert-error { background: rgba(225,112,85,0.2); color: var(--error); }

.discord-prompt-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.discord-prompt-overlay.is-hidden {
    display: none;
}

.discord-prompt-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 16, 0.72);
    backdrop-filter: blur(3px);
}

.discord-prompt-dialog {
    position: relative;
    z-index: 1;
    width: min(26rem, 100%);
    padding: 1.75rem 1.5rem 1.5rem;
    border: 1px solid rgba(88, 101, 242, 0.4);
    border-radius: 16px;
    background:
        linear-gradient(160deg, rgba(88, 101, 242, 0.22), transparent 42%),
        var(--bg-card);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    text-align: center;
}

body.discord-prompt-open {
    overflow: hidden;
}

.discord-prompt-icon {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 1rem;
    border-radius: 14px;
    background: rgba(88, 101, 242, 0.22);
    color: #9aa4ff;
}

.discord-prompt-dialog h2 {
    margin: 0 0 0.65rem;
    font-size: 1.35rem;
    color: var(--text);
}

.discord-prompt-copy {
    margin: 0 auto;
    max-width: 22rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 0.98rem;
}

.discord-prompt-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.discord-prompt-dismiss-form {
    margin: 0;
    display: inline-flex;
}

.discord-prompt-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.discord-prompt-close:hover,
.discord-prompt-close:focus-visible {
    color: var(--text);
    background: var(--bg-hover);
    outline: none;
}

@media (max-width: 480px) {
    .discord-prompt-dialog {
        padding: 1.5rem 1.15rem 1.25rem;
    }

    .discord-prompt-actions {
        flex-direction: column;
    }

    .discord-prompt-actions .btn,
    .discord-prompt-dismiss-form,
    .discord-prompt-dismiss-form .btn {
        width: 100%;
    }
}

/* Profile */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.profile-section { background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); }
.ctf-solve-list { list-style: none; }
.ctf-solve-list li { padding: 0.4rem 0; border-bottom: 1px solid var(--border); }

/* Minesweeper */
.minesweeper-game { max-width: 360px; }
.ms-toolbar {
    display: flex; gap: 1.5rem; margin-bottom: 1rem;
    padding: 0.8rem 1rem; background: var(--bg); border-radius: 8px;
}
.ms-counter { display: flex; flex-direction: column; align-items: center; }
.ms-label { font-size: 0.75rem; color: var(--text-muted); }
.ms-counter strong { font-size: 1.4rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.minesweeper-grid {
    display: grid; gap: 2px; width: fit-content;
    padding: 4px; background: var(--border); border-radius: 6px;
    --cell-size: 32px;
    grid-template-columns: repeat(9, var(--cell-size));
    grid-template-rows: repeat(9, var(--cell-size));
}
.ms-cell {
    width: var(--cell-size);
    height: var(--cell-size);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; font-weight: 700; user-select: none; cursor: pointer;
    border-radius: 3px;
}
.ms-covered {
    background: linear-gradient(145deg, #4a5568, #2d3748);
    border: 2px outset #718096;
}
.ms-covered:hover { filter: brightness(1.1); }
.ms-revealed {
    background: #1a1d27; border: 1px solid var(--border);
    cursor: default;
}
.ms-flag, .ms-question { background: #2d3142; border: 2px inset #4a5568; }
.ms-mine { background: #e17055; border: 2px solid #c0392b; cursor: default; }
.ms-wrong-flag { background: #e17055; opacity: 0.8; cursor: default; }
.ms-num-1 { color: #3b82f6; }
.ms-num-2 { color: #22c55e; }
.ms-num-3 { color: #ef4444; }
.ms-num-4 { color: #6366f1; }
.ms-num-5 { color: #92400e; }
.ms-num-6 { color: #14b8a6; }
.ms-num-7 { color: #1f2937; }
.ms-num-8 { color: #6b7280; }
.ms-status { margin-top: 1rem; color: var(--text); font-weight: 500; }
.ms-hint { margin-top: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }

/* CS:GO Memory */
.csgo-memory-game { max-width: min(96vw, 828px); width: 100%; }
.csgo-memory-game .memory-toolbar {
    display: flex; gap: 1.25rem; margin-bottom: 0.75rem;
    padding: 0.65rem 0.9rem; background: var(--bg); border-radius: 8px;
    justify-content: center; flex-wrap: wrap;
}
.csgo-memory-game .memory-counter { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.csgo-memory-game .memory-label { font-size: 0.75rem; color: var(--text-muted); }
.csgo-memory-game .memory-counter strong { font-size: 1.25rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.csgo-memory-game .memory-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(58px, 1fr));
    gap: 0.45rem;
    width: 100%;
    max-width: 810px;
    margin: 0 auto;
}
.csgo-memory-game .memory-card {
    aspect-ratio: 1;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 9px;
    perspective: 800px;
}
.csgo-memory-game .memory-card:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}
.csgo-memory-game .memory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.35s ease;
    border-radius: 9px;
}
.csgo-memory-game .memory-card.flipped .memory-card-inner,
.csgo-memory-game .memory-card.matched .memory-card-inner {
    transform: rotateY(180deg);
}
.csgo-memory-game .memory-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    border-radius: 9px;
    overflow: hidden;
    border: 2px solid var(--border);
}
.csgo-memory-game .memory-card-front {
    background: linear-gradient(145deg, #f39c12, #d35400);
    display: flex;
    align-items: center;
    justify-content: center;
}
.csgo-memory-game .memory-card-front::after {
    content: 'CS';
    font-size: clamp(0.9rem, 2.2vw, 1.45rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.08em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.csgo-memory-game .memory-card-back {
    transform: rotateY(180deg);
    background: #1a1d27;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem;
}
.csgo-memory-game .memory-card-back img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}
.csgo-memory-game .memory-card.matched .memory-card-back {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}
.csgo-memory-game .memory-status { margin-top: 0.75rem; color: var(--text); font-weight: 500; text-align: center; }
.csgo-memory-game .memory-status.error { color: #e17055; }

@media (max-width: 768px) {
    body.game-page .csgo-memory-game {
        --memory-card-size: min(
            78px,
            calc((100vh - 22rem) / 6),
            calc((100vw - 3rem) / 4)
        );
        width: min(100%, calc(var(--memory-card-size) * 4 + 1.8rem));
    }

    body.game-page .csgo-memory-game .memory-grid {
        --memory-card-size: min(
            78px,
            calc((100vh - 22rem) / 6),
            calc((100vw - 3rem) / 4)
        );
        grid-template-columns: repeat(4, var(--memory-card-size));
        grid-template-rows: repeat(6, var(--memory-card-size));
        gap: 0.35rem;
    }

    .csgo-memory-game .memory-grid {
        grid-template-columns: repeat(4, minmax(58px, 1fr));
        gap: 0.4rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem 0.75rem;
        padding: 0.65rem 0.9rem;
    }

    .nav-brand a {
        gap: 0.5rem;
        font-size: 1.05rem;
    }

    .nav-brand-full { display: none; }
    .nav-brand-short { display: inline; }
    .nav-logo { height: 32px; }

    .nav-toggle { display: inline-flex; }

    .nav-links {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0.15rem;
        padding: 0.35rem 0 0.15rem;
        border-top: 1px solid var(--border);
        margin-top: 0.15rem;
    }

    .nav-links.is-open { display: flex; }

    .nav-links > a {
        display: block;
        padding: 0.7rem 0.65rem;
        border-radius: 8px;
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .nav-links > a:hover,
    .nav-links > a:focus-visible {
        background: var(--bg-hover);
        color: var(--text);
        text-decoration: none;
    }

    .nav-user-menu {
        margin: 0.25rem 0 0;
        width: 100%;
    }

    .nav-user-menu::before { display: none; }

    .nav-links .nav-user-trigger {
        width: 100%;
        min-height: 2.75rem;
        justify-content: space-between;
        padding: 0.65rem 0.7rem;
        border-radius: 8px;
        border-color: var(--border);
        background: var(--bg);
    }

    .nav-links .nav-user-trigger::after {
        display: none;
    }

    .nav-user-name { max-width: none; }

    .nav-user-dropdown {
        position: static;
        min-width: 0;
        width: 100%;
        margin-top: 0.2rem;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0;
    }

    .nav-user-item {
        padding: 0.7rem 0.7rem;
    }

    .ctf-layout, .profile-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    #aim-canvas { height: 300px; }

    .container {
        padding: 1.1rem 0.9rem;
    }

    .footer {
        padding: 1rem 0.9rem;
        font-size: 0.8rem;
    }

    body.game-page .navbar {
        padding: 0.5rem 0.9rem;
    }
}

/* Guess the Stars */
body.guess-stars-page .footer {
    display: none;
}

body.guess-stars-page .container {
    max-width: min(98vw, 1800px);
    width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

body.guess-stars-page .game-container {
    padding: 0.5rem 0.75rem;
}

body.guess-stars-page .game-header {
    margin-bottom: 0.25rem;
}

body.guess-stars-page .game-header h1 {
    font-size: 1.15rem;
}

.guess-stars-game {
    max-width: none;
    margin: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.guess-stars-game .game-stats-bar {
    margin-bottom: 0;
    padding: 0.45rem 0.75rem;
    gap: 1.25rem;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.gs-panel {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 0;
    flex: 1;
}

.gs-panel h2 {
    margin: 0;
    font-size: 1.15rem;
}

.gs-panel .instruction {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.gs-progress {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.85rem;
}

.gs-star-layout {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    min-height: 0;
    flex: 1;
}

.gs-photo-wrap {
    position: relative;
    width: 100%;
    max-height: min(42vh, 320px);
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
    aspect-ratio: 3 / 4;
}

.gs-photo {
    width: 100%;
    height: 100%;
    max-height: min(42vh, 320px);
    object-fit: cover;
    object-position: center top;
    display: block;
}

.gs-star-side {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}

.gs-party {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.gs-confetti {
    position: absolute;
    top: 45%;
    width: 10px;
    height: 14px;
    border-radius: 2px;
    animation: gs-burst 0.95s ease-out forwards;
}

@keyframes gs-burst {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
    100% { transform: translate(var(--dx), -140px) rotate(var(--rot)); opacity: 0; }
}

.gs-guess-form,
.gs-reveal {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.gs-guess-form label {
    font-size: 0.9rem;
}

.gs-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
}

.gs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gs-actions .btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.9rem;
}

.gs-feedback { margin: 0; min-height: 1.1rem; font-size: 0.9rem; }
.gs-feedback.ok { color: var(--success); font-weight: 600; }
.gs-feedback.error { color: var(--error); }
.gs-feedback.muted { color: var(--text-muted); }

.gs-reveal h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--accent);
}

.gs-blurb {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.85rem !important;
}

.gs-profile-link {
    margin: 0;
    font-size: 0.9rem;
}

.gs-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
}

.gs-rank-item {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.05rem 0.55rem;
    align-items: center;
    padding: 0.4rem 0.65rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: grab;
    user-select: none;
}

.gs-rank-item.dragging {
    opacity: 0.55;
    border-color: var(--primary);
}

.gs-rank-item.correct {
    border-color: var(--success);
    background: rgba(0, 184, 148, 0.08);
}

.gs-rank-item.wrong {
    border-color: rgba(225, 112, 85, 0.55);
}

.gs-rank-handle {
    grid-row: 1 / span 2;
    color: var(--text-muted);
    letter-spacing: -2px;
    font-size: 0.85rem;
}

.gs-rank-num {
    grid-row: 1 / span 2;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.75rem;
}

.gs-rank-label {
    font-weight: 700;
    font-size: 0.9rem;
}

.gs-rank-hint {
    grid-column: 3;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gs-results-ranking-title {
    margin: 0.75rem 0 0.35rem;
    font-size: 1.05rem;
}

.gs-correct-rank-list .gs-rank-item {
    cursor: default;
    grid-template-columns: auto 1fr;
}

.gs-correct-rank-list .gs-rank-hint {
    grid-column: 2;
}

.gs-assoc-flash-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.55rem;
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.gs-assoc-flash-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.65rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    background: rgba(253, 121, 168, 0.12);
    border: 1px solid rgba(253, 121, 168, 0.35);
    border-radius: 8px;
}

.gs-assoc-flash-thumb {
    width: 100%;
    max-width: 120px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    background: #111;
}

.gs-assoc-play-header {
    margin-bottom: 0;
    text-align: center;
    position: sticky;
    top: 0;
}

.gs-assoc-prompt {
    margin: 0.15rem 0 0.35rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.gs-assoc-category-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    margin: 0.25rem 0 0.65rem;
}

.gs-assoc-category-photo {
    width: min(280px, 100%);
    max-height: min(36vh, 280px);
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(253, 121, 168, 0.45);
    background: #111;
}

.gs-assoc-current-category {
    margin: 0;
    font-size: clamp(1.35rem, 3.5vw, 2.2rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fd79a8;
    letter-spacing: 0.01em;
}

.gs-assoc-timer-wrap {
    width: min(420px, 100%);
    height: 10px;
    margin: 0 auto 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    border: 1px solid var(--border);
}

.gs-assoc-timer-bar {
    height: 100%;
    width: 100%;
    transform-origin: left center;
    transform: scaleX(1);
    background: linear-gradient(90deg, #fd79a8, #a29bfe);
    will-change: transform;
}

.gs-assoc-timer-label {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}

.gs-assoc-play {
    overflow: auto;
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 1rem 1.25rem;
    align-items: start;
}

.gs-assoc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.65rem;
    min-height: 12rem;
    max-height: none;
    overflow: visible;
    padding-right: 0;
}

.gs-assoc-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.4rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.gs-assoc-card:hover:not(:disabled) {
    border-color: var(--accent);
}

.gs-assoc-card:disabled {
    opacity: 0.45;
    cursor: default;
}

.gs-assoc-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    background: #111;
}

.gs-assoc-card-name {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
}

.gs-assoc-card-cat {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.2;
    min-height: 1.5em;
}

.gs-assoc-card.is-assigned .gs-assoc-card-cat {
    color: var(--success);
    font-weight: 600;
}

.gs-results-assoc {
    margin-top: 0.35rem;
}

@media (max-width: 900px) {
    .gs-assoc-play {
        grid-template-columns: 1fr;
    }

    .gs-assoc-play-header {
        position: static;
    }

    .gs-assoc-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        max-height: min(48vh, 420px);
        overflow-y: auto;
    }
}

@media (max-width: 720px) {
    .gs-star-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .gs-photo-wrap {
        max-width: 220px;
        max-height: min(34vh, 240px);
    }

    .gs-photo {
        max-height: min(34vh, 240px);
    }

    .gs-star-side {
        width: 100%;
    }

    .gs-assoc-grid {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    }
}


/* Score modes */
.score-mode-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}
.dedicated-section {
    margin-bottom: 1.2rem;
}
.dedicated-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.dedicated-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}
.dedicated-card,
.server-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}
.dedicated-card h3,
.server-control-card h3 {
    margin-bottom: 0.3rem;
}
.dedicated-card-head,
.server-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.server-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    white-space: nowrap;
}
.server-status-online {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.45);
}
.server-status-offline,
.server-status-stopped {
    color: var(--text-muted);
}
.server-status-starting {
    color: var(--warning);
    border-color: rgba(253, 203, 110, 0.45);
}
.server-status-error {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.45);
}
.server-meta {
    display: grid;
    gap: 0.5rem;
    margin: 0.9rem 0;
}
.server-meta div {
    display: grid;
    grid-template-columns: minmax(90px, 120px) 1fr;
    gap: 0.65rem;
}
.server-meta dt {
    color: var(--text-muted);
}
.server-meta dd {
    margin: 0;
}
.server-status-message {
    margin: 0 0 1rem;
    color: var(--text-muted);
}
.server-inline-actions {
    display: flex;
    gap: 0.5rem;
}
.server-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.server-action-form,
.server-controls-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.server-config-form {
    display: grid;
    gap: 0.85rem;
}
.form-field {
    display: grid;
    gap: 0.35rem;
}
.form-control {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    padding: 0.65rem 0.75rem;
    font: inherit;
}
.form-control-mono {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.88rem;
}
.form-help {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.form-error {
    margin: 0;
    color: #f87171;
    font-size: 0.82rem;
}
.server-command-preview {
    margin-top: 1rem;
}
.server-command-preview code {
    display: block;
    margin-top: 0.45rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    white-space: pre-wrap;
    word-break: break-word;
}
.server-control-card {
    flex: 1 1 220px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem;
}
.server-control-card p {
    margin: 0;
    color: var(--text-muted);
}
.health-check-list {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
}
.score-mode-chip {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 0.82rem;
    line-height: 1.3;
    color: var(--text-muted);
}
.score-mode-chip strong {
    color: var(--text);
}
.score-mode-chip p {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}
.score-mode-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}
.score-mode-best {
    border-color: rgba(0, 206, 201, 0.35);
}
.score-mode-first {
    border-color: rgba(253, 203, 110, 0.4);
}
.game-links li {
    margin: 0.2rem 0;
}
.game-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-decoration: none;
    padding: 0.2rem 0;
    transition: color 0.15s ease, opacity 0.15s ease;
}
.game-link-row:hover {
    text-decoration: none;
}
.game-link-title {
    color: var(--accent);
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 0.15s ease;
}
.game-link-row:hover .game-link-title {
    color: #8ab4ff;
    text-decoration: none;
}
.game-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.7rem;
    white-space: nowrap;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: var(--bg);
}
.game-score-badge.score-mode-best {
    border-color: rgba(0, 206, 201, 0.4);
    color: var(--accent);
}
.game-score-badge.score-mode-first {
    border-color: rgba(253, 203, 110, 0.5);
    color: var(--warning);
}
.game-score-mode-banner {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    flex-shrink: 0;
    margin-bottom: 0.5rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.game-score-mode-banner p {
    margin: 0.15rem 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.game-score-mode-note {
    color: var(--warning) !important;
}
.score-mode-inline {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.score-result.practice {
    background: rgba(253, 203, 110, 0.2);
    color: var(--warning);
}

.game-start-gate {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.game-start-gate.hidden {
    display: none !important;
}

.game-start-gate-card {
    width: min(100%, 420px);
    padding: 1.5rem 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    text-align: center;
}

.game-start-gate-eyebrow {
    margin: 0 0 0.35rem;
    color: var(--warning);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.game-start-gate-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
}

.game-start-gate-card p {
    margin: 0 0 1.25rem;
    color: var(--text-muted);
    line-height: 1.45;
    font-size: 0.95rem;
}

.game-start-gate-card .btn {
    min-width: 10rem;
}

body.game-page .game-page-layout.game-awaiting-start .game-container {
    display: none;
}

body.game-page .game-page-layout.game-started .game-score-mode-banner {
    display: none;
}

body.game-page .game-page-layout.game-started .game-start-gate {
    display: none !important;
}

@media (max-width: 720px) {
    .score-mode-legend {
        grid-template-columns: 1fr;
    }
    .game-link-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ——— Compo's Blobby logo ——— */
.blobby-logo {
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
}
.blobby-logo--card {
    height: 3.25rem;
    width: auto;
    max-width: min(100%, 280px);
}
.blobby-logo--list {
    height: 1.55rem;
    width: auto;
    margin-right: 0.35rem;
}
.blobby-logo--title {
    height: 3rem;
    width: auto;
    max-width: min(100%, 260px);
}
.compos-module-heading {
    display: flex;
    align-items: center;
    margin: 0 0 0.25rem;
}
.compos-bracket-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}
body.compos-bracket-page .compos-bracket-top .back-link {
    margin-bottom: 0;
}
body.compos-bracket-page .compos-bracket-top .corvex-sponsor--compact {
    margin: 0;
}
body.compos-bracket-page .compos-bracket-top .corvex-sponsor-img--compact {
    max-height: 32px;
    max-width: min(100%, 180px);
}
.compos-tournament-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
body.compos-bracket-page .subtitle {
    margin-bottom: 1rem;
}
.corvex-sponsor--compact {
    display: inline-flex;
    align-items: center;
    margin: 0.1rem 0 0.15rem;
    max-width: 100%;
}
.corvex-sponsor-img--compact {
    display: block;
    width: auto;
    max-height: 40px;
    max-width: min(100%, 220px);
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

/* Corvex promo video modal */
body.corvex-promo-open {
    overflow: hidden;
}
.corvex-promo-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}
.corvex-promo-modal.is-hidden {
    display: none !important;
}
.corvex-promo-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
}
.corvex-promo-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(98vw, 1600px);
    height: min(96vh, 980px);
    max-height: 96vh;
    overflow: hidden;
    padding: 0.85rem 1rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.corvex-promo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    flex-shrink: 0;
}
.corvex-promo-header h2 {
    margin: 0;
    font-size: 1.15rem;
}
.corvex-promo-close-x {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.35rem;
}
.corvex-promo-close-x:hover {
    color: var(--text);
}
.corvex-promo-video-wrap {
    flex: 1 1 auto;
    min-height: 0;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.corvex-promo-video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000;
}
.corvex-promo-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 0.85rem;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .corvex-promo-modal {
        padding: 0.35rem;
    }
    .corvex-promo-dialog {
        width: 100%;
        height: 98vh;
        max-height: 98vh;
        border-radius: 10px;
        padding: 0.65rem 0.7rem 0.75rem;
    }
    .corvex-promo-actions {
        justify-content: stretch;
    }
    .corvex-promo-actions .btn {
        flex: 1 1 auto;
    }
}
.compos-module-heading-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}
.compos-module-heading-wrap .compos-module-heading {
    margin: 0;
}
.compos-module-heading-wrap .corvex-sponsor--compact {
    margin: 0;
}
.compos-delete-form {
    margin: 0;
}
.compos-delete-btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    background: rgba(225, 112, 85, 0.2);
    border: 1px solid rgba(225, 112, 85, 0.55);
    color: #ff9a86;
}
.compos-delete-btn:hover {
    background: var(--error);
    border-color: var(--error);
    color: #fff;
}
.compos-delete-section {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.compos-delete-section h2 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: var(--text-muted);
}
.compos-delete-note {
    margin: 0 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.compos-tournament-title {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0;
}
.compos-tournament-table {
    --compos-table-cols: minmax(10rem, 1.8fr) minmax(4.5rem, 0.75fr) minmax(8.5rem, 1.15fr) 5.5rem minmax(7rem, 1.2fr) 4.25rem minmax(6rem, 0.95fr);
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.35rem;
}
.compos-tournament-head,
.compos-tournament-row {
    display: grid;
    grid-template-columns: var(--compos-table-cols);
    gap: 0 0.85rem;
    align-items: center;
    padding: 0.55rem 0.35rem;
}
.compos-tournament-head {
    padding-top: 0;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.compos-tournament-col {
    min-width: 0;
}
.compos-tournament-head .compos-tournament-col {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.compos-tournament-row {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease;
}
.compos-tournament-row:hover {
    background: rgba(138, 180, 255, 0.06);
}
.compos-tournament-row.is-completed {
    opacity: 0.78;
}
.compos-tournament-row > .compos-tournament-col {
    display: flex;
    align-items: center;
    font-size: 0.82rem;
    line-height: 1.3;
    min-height: 2.4rem;
}
.compos-tournament-col-name {
    min-width: 0;
}
.compos-tournament-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    width: 100%;
}
.compos-tournament-icon,
.compos-tournament-name .blobby-logo--list {
    flex-shrink: 0;
    width: 1.55rem;
    height: 1.55rem;
    object-fit: contain;
}
.compos-tournament-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}
.compos-tournament-title-text {
    color: var(--accent);
    font-weight: 600;
    line-height: 1.25;
    word-break: break-word;
}
.compos-tournament-row:hover .compos-tournament-title-text {
    color: #8ab4ff;
}
.compos-tournament-owner {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.compos-tournament-owner.is-you {
    color: var(--accent);
    font-weight: 600;
}
.compos-tournament-col-date {
    color: var(--text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}
.compos-tournament-muted {
    opacity: 0.55;
}
.compos-status-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    border: 1px solid var(--border);
    color: var(--text-muted);
    white-space: nowrap;
}
.compos-status-badge--in_progress {
    border-color: rgba(0, 206, 201, 0.45);
    color: var(--accent);
}
.compos-status-badge--completed {
    border-color: rgba(253, 203, 110, 0.45);
    color: var(--warning);
}
.compos-tournament-col-format {
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.25;
}
.compos-tournament-col-players {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    justify-content: center;
}
.compos-tournament-head .compos-tournament-col-players {
    text-align: center;
}
.compos-tournament-col-winner.has-winner .compos-winner-name {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}
.compos-winner-empty {
    color: var(--text-muted);
    opacity: 0.5;
}
@media (max-width: 900px) {
    .compos-tournament-table {
        gap: 0.45rem;
    }
    .compos-tournament-head {
        display: none;
    }
    .compos-tournament-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        padding: 0.65rem 0.55rem;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.02);
        text-decoration: none;
    }
    .compos-tournament-row > .compos-tournament-col {
        display: grid;
        grid-template-columns: 5.5rem 1fr;
        gap: 0.5rem;
        align-items: center;
        min-height: 0;
    }
    .compos-tournament-row > .compos-tournament-col::before {
        content: attr(data-label);
        font-size: 0.65rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
    .compos-tournament-col-name {
        display: flex;
        grid-template-columns: none;
    }
    .compos-tournament-col-name::before {
        display: none;
    }
    .compos-tournament-col-players {
        justify-content: flex-start;
    }
}
.game-link-title .blobby-logo--list {
    position: relative;
    top: -0.05rem;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ——— Compo's bracket ——— */
body.compos-bracket-page .container {
    max-width: none;
    width: 100%;
    padding: 1rem 1.25rem 1.5rem;
}

body.compos-bracket-page .bracket-wrapper {
    width: 100%;
    overflow: hidden;
}

body.compos-bracket-page .bracket-round {
    min-width: clamp(150px, 14vw, 220px);
    flex: 0 0 auto;
}

body.compos-bracket-page .bracket {
    width: max-content;
}

body.compos-bracket-page .bracket-match-wrapper {
    padding: 0.35rem 0.75rem;
}

body.compos-bracket-page .bracket-participant {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
    min-height: 1.75rem;
}

/* ——— Boodschappen ——— */
body.shopping-page-body .container {
    max-width: none;
    width: 100%;
    padding: 1rem 1.25rem 1.5rem;
}

.shopping-page {
    width: 100%;
    max-width: none;
    margin: 0;
}

.shopping-header {
    margin-bottom: 0.85rem;
}

.shopping-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.shopping-header-top h1 {
    margin-bottom: 0;
}

.shopping-admin-reset {
    margin: 0;
}

.shopping-header h1 {
    font-size: 1.55rem;
    margin-bottom: 0.25rem;
}

.shopping-intro {
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
    font-size: 0.92rem;
}

.shopping-intro-mobile {
    display: none;
}

.shopping-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.shopping-expense-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.85rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.shopping-expense-qr-link {
    display: inline-flex;
    flex-shrink: 0;
}

.shopping-expense-qr {
    width: 240px;
    max-width: min(100%, 240px);
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.shopping-expense-copy .shopping-col-title {
    margin-bottom: 0.35rem;
}

.shopping-expense-copy .shopping-intro {
    margin-bottom: 0.65rem;
}

.shopping-col-title {
    margin: 0 0 0.55rem;
    font-size: 1.05rem;
}

.shopping-add-form {
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.shopping-add-grid {
    display: grid;
    grid-template-columns: 1fr 80px auto;
    gap: 0.55rem;
    align-items: end;
}

.shopping-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.shopping-field .form-input {
    width: 100%;
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
}

.shopping-qty-input {
    text-align: center;
}

.shopping-add-actions {
    display: flex;
    align-items: end;
}

.shopping-add-actions .btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
}

.shopping-add-note {
    margin: 0.45rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.shopping-error {
    color: var(--error);
    font-size: 0.75rem;
}

.shopping-section {
    margin-bottom: 1rem;
}

.shopping-section-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.shopping-section-head h2 {
    margin: 0;
    font-size: 0.98rem;
}

.shopping-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: rgba(0, 206, 201, 0.15);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
}

.shopping-section-done .shopping-count {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.shopping-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.shopping-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.shopping-item.is-done {
    opacity: 0.72;
}

.shopping-item.is-done .shopping-item-product {
    text-decoration: line-through;
    color: var(--text-muted);
}

.shopping-item-main {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
    margin: 0;
}

.shopping-check {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border-radius: 5px;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--bg);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shopping-item.is-done .shopping-check {
    background: var(--success);
    border-color: var(--success);
    color: #04140f;
}

.shopping-check:hover {
    background: rgba(0, 206, 201, 0.2);
}

.shopping-item.is-done .shopping-check:hover {
    filter: brightness(1.08);
}

.shopping-check-box {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.shopping-item-body {
    min-width: 0;
}

.shopping-item-product {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    word-break: break-word;
}

.shopping-item-qty {
    color: var(--accent);
    margin-right: 0.2rem;
}

.shopping-item.is-done .shopping-item-qty {
    color: var(--text-muted);
}

.shopping-item-meta {
    margin: 0.1rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.shopping-item-actions {
    margin: 0;
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.shopping-item-action-form {
    margin: 0;
}

.shopping-action-btn,
.shopping-delete-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.55rem;
}

.shopping-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

.shopping-icon-btn--danger:hover {
    border-color: rgba(225, 112, 85, 0.7);
    color: #ff9a86;
}

.shopping-item--editing {
    align-items: stretch;
}

.shopping-edit-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.shopping-edit-fields {
    display: flex;
    flex: 1 1 12rem;
    gap: 0.4rem;
    min-width: 0;
}

.shopping-edit-fields .shopping-qty-input {
    width: 4.25rem;
    flex-shrink: 0;
}

.shopping-edit-fields .form-input:not(.shopping-qty-input) {
    flex: 1 1 auto;
    min-width: 0;
}

.shopping-empty {
    margin: 0;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.duty-schedule {
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.duty-meta {
    margin: 0 0 0.5rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.duty-grid {
    display: grid;
    grid-template-columns: minmax(5.5rem, auto) 1fr 1fr;
    gap: 0.2rem 0.5rem;
    align-items: center;
}

.duty-grid-head {
    display: contents;
}

.duty-grid-col {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

.duty-grid-col-date {
    grid-column: 1;
}

.duty-grid-head .duty-grid-col:nth-child(2) {
    grid-column: 2;
}

.duty-grid-head .duty-grid-col:nth-child(3) {
    grid-column: 3;
}

.duty-row {
    display: contents;
}

.duty-row-date,
.duty-cell {
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.duty-row.is-today .duty-row-date,
.duty-row.is-today .duty-cell {
    background: rgba(0, 206, 201, 0.06);
}

.duty-row-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    font-weight: 600;
    font-size: 0.8rem;
    padding-right: 0.35rem;
}

.duty-date-text {
    line-height: 1.2;
}

.duty-today-badge {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.duty-cell {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    font-size: 0.8rem;
}

.duty-count {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    min-width: 1.6rem;
}

.duty-cell.is-full .duty-count {
    color: var(--warning);
}

.duty-names-inline {
    flex: 1;
    min-width: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.duty-name {
    color: var(--text);
}

.duty-empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.76rem;
}

.duty-cell-form {
    margin: 0;
    flex-shrink: 0;
}

.duty-cell-btn {
    font-size: 0.7rem;
    padding: 0.18rem 0.45rem;
    line-height: 1.2;
}

.duty-cell-btn.is-active {
    border-color: var(--accent);
    color: var(--accent);
}

.duty-full-label {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    border: 1px dashed var(--border);
}

@media (max-width: 960px) {
    .shopping-layout {
        grid-template-columns: 1fr;
    }

    .shopping-expense-card {
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    body.shopping-page-body .container {
        padding: 0.75rem 0.75rem 1.25rem;
    }

    .shopping-header {
        margin-bottom: 0.65rem;
    }

    .shopping-header h1 {
        font-size: 1.25rem;
        margin-bottom: 0.2rem;
    }

    .shopping-intro-desktop {
        display: none;
    }

    .shopping-intro-mobile {
        display: block;
        font-size: 0.85rem;
        line-height: 1.45;
    }

    .shopping-layout {
        gap: 1.15rem;
    }

    .shopping-expense-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .shopping-expense-qr {
        width: 180px;
        max-width: min(100%, 180px);
    }

    .shopping-col-title {
        font-size: 1rem;
        margin-bottom: 0.45rem;
    }

    .shopping-add-form {
        padding: 0.65rem 0.7rem;
        margin-bottom: 0.7rem;
    }

    .shopping-add-grid {
        grid-template-columns: 1fr 4.5rem;
        gap: 0.45rem;
    }

    .shopping-add-actions {
        grid-column: 1 / -1;
    }

    .shopping-add-actions .btn {
        width: 100%;
        min-height: 2.5rem;
        padding: 0.55rem 0.85rem;
    }

    .shopping-field .form-input {
        min-height: 2.5rem;
        font-size: 1rem;
    }

    .shopping-add-note {
        font-size: 0.74rem;
    }

    .shopping-section-head h2 {
        font-size: 0.92rem;
    }

    .shopping-item {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.45rem;
        padding: 0.55rem 0.6rem;
    }

    .shopping-item-main {
        width: 100%;
        gap: 0.55rem;
    }

    .shopping-check {
        width: 1.55rem;
        height: 1.55rem;
        margin-top: 0.1rem;
    }

    .shopping-item-product {
        font-size: 0.95rem;
    }

    .shopping-item-meta {
        font-size: 0.72rem;
        line-height: 1.35;
    }

    .shopping-item-actions {
        width: auto;
        display: flex;
        flex-wrap: nowrap;
        gap: 0.35rem;
        padding-left: 0;
        margin-left: auto;
    }

    .shopping-item-action-form {
        flex: 0 0 auto;
        min-width: 0;
    }

    .shopping-action-btn,
    .shopping-delete-btn {
        width: 100%;
        min-height: 2.25rem;
        padding: 0.4rem 0.5rem;
        font-size: 0.78rem;
    }

    .shopping-icon-btn {
        width: 2.35rem;
        height: 2.35rem;
        min-height: 2.35rem;
    }

    .shopping-edit-form {
        flex-direction: column;
        align-items: stretch;
    }

    .shopping-edit-fields {
        width: 100%;
    }

    .duty-schedule {
        padding: 0.55rem 0.6rem;
    }

    .duty-meta {
        font-size: 0.74rem;
        margin-bottom: 0.4rem;
    }

    .duty-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .duty-grid-head {
        display: none;
    }

    .duty-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.35rem;
        padding: 0.55rem 0.4rem;
        border-bottom: 1px solid var(--border);
    }

    .duty-row-date,
    .duty-cell {
        border-bottom: none;
        padding: 0;
    }

    .duty-row-date {
        font-size: 0.85rem;
        gap: 0.4rem;
    }

    .duty-row.is-today {
        background: rgba(0, 206, 201, 0.06);
        border-radius: 8px;
        padding: 0.55rem 0.45rem;
        border-bottom-color: transparent;
    }

    .duty-cell {
        flex-wrap: wrap;
        gap: 0.35rem 0.45rem;
        font-size: 0.82rem;
        padding: 0.35rem 0.4rem;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.02);
    }

    .duty-cell::before {
        content: attr(data-label);
        flex: 1 0 100%;
        font-size: 0.65rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        min-width: 0;
        margin-bottom: 0.05rem;
    }

    .duty-names-inline {
        white-space: normal;
        flex: 1 1 auto;
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .duty-cell-btn {
        min-height: 2rem;
        font-size: 0.75rem;
        padding: 0.3rem 0.55rem;
    }

    .duty-full-label {
        font-size: 0.72rem;
        padding: 0.25rem 0.4rem;
    }
}

/* Floating Spotify playlist */
[x-cloak] {
    display: none !important;
}

.spotify-fab {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 180;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
}

body.game-page .spotify-fab {
    display: none;
}

.spotify-fab-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: none;
    border-radius: 999px;
    padding: 0.7rem 0.95rem 0.7rem 0.75rem;
    background: #1db954;
    color: #04140a;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease, background 0.15s ease;
}

.spotify-fab-button:hover {
    background: #1ed760;
    transform: translateY(-1px);
}

.spotify-fab-button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.spotify-fab-icon {
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
}

.spotify-fab-panel[hidden] {
    display: none !important;
}

.spotify-fab-panel {
    width: min(22rem, calc(100vw - 2rem));
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.75rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.spotify-fab-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.spotify-fab-panel-header strong {
    font-size: 0.92rem;
}

.spotify-fab-close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.1rem 0.35rem;
}

.spotify-fab-close:hover {
    color: var(--text);
}

.spotify-fab-embed {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
}

.spotify-fab-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.65rem;
}

.spotify-fab-invite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.2rem;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    background: #1db954;
    color: #04110a;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.spotify-fab-invite:hover {
    background: #1ed760;
    color: #04110a;
    text-decoration: none;
}

.spotify-fab-add {
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1db954;
}

.spotify-fab-add:hover {
    color: #1ed760;
    text-decoration: underline;
}

.spotify-fab-web {
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.spotify-fab-web:hover {
    color: var(--text);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .spotify-fab {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .spotify-fab-label {
        display: none;
    }

    .spotify-fab-button {
        padding: 0.75rem;
        border-radius: 50%;
    }
}

/* Live activity dashboard */
.live-activity-section,
.recent-activity-section {
    margin: 1.75rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.live-activity-list,
.recent-session-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.live-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.live-dot {
    width: 0.55rem;
    height: 0.55rem;
    margin-top: 0.45rem;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.2);
    flex-shrink: 0;
}

.live-source {
    display: inline-block;
    margin-left: 0.4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.recent-activity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 0.75rem;
}

.recent-activity-grid h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.recent-session-list li {
    color: var(--text-muted);
}

.recent-session-list strong,
.recent-session-list em {
    color: var(--text);
    font-style: normal;
}

.profile-discord {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 36rem;
}

.profile-discord > h2 {
    margin: 0;
}

.discord-block {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.discord-block-manual {
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.discord-block-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.discord-block-note,
.discord-status {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.45;
}

.discord-status strong {
    color: var(--text);
}

.discord-via {
    color: var(--text-muted);
}

.discord-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: stretch;
}

.discord-actions .btn,
.discord-unlink-form,
.discord-unlink-form .btn {
    margin: 0;
}

.discord-unlink-form {
    display: inline-flex;
}

.discord-actions .btn,
.discord-username-form .btn {
    width: auto;
    min-width: 11rem;
}

.discord-username-form {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0;
}

.discord-username-form label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.discord-username-form .form-input,
.discord-username-form input {
    width: 100%;
    max-width: 100%;
}

.discord-username-form .form-help {
    margin: 0;
}

.discord-username-form .btn {
    align-self: flex-start;
}

@media (max-width: 480px) {
    .discord-actions {
        flex-direction: column;
    }

    .discord-actions .btn,
    .discord-unlink-form,
    .discord-unlink-form .btn,
    .discord-username-form .btn {
        width: 100%;
        min-width: 0;
    }
}

.approval-discord-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 12rem;
}

.text-muted {
    color: var(--text-muted);
}

/* Activity toast (chat-achtig, linksonder) */
.activity-toast-root {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 190;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.activity-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(26, 29, 39, 0.94);
    color: var(--text);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}

.activity-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.activity-toast-dot {
    width: 0.45rem;
    height: 0.45rem;
    margin-top: 0.4rem;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.activity-toast-body {
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
    line-height: 1.35;
}

.activity-toast-body em {
    font-style: normal;
    color: var(--accent);
}

.activity-toast-meta {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.activity-toast-close {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    margin: -0.15rem -0.2rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.activity-toast-close:hover,
.activity-toast-close:focus-visible {
    color: var(--text);
    background: var(--bg-hover);
    outline: none;
}

@media (max-width: 768px) {
    .recent-activity-grid {
        grid-template-columns: 1fr;
    }
}

/* Security / Passkeys / MFA */
.security-page { max-width: 960px; margin: 0 auto; }
.security-section h3 { margin-top: 1.25rem; font-size: 1.05rem; }
.security-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.security-list-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.security-list-item:last-child { border-bottom: none; }
.security-item-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.security-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.75rem; }
.security-actions .form-input { max-width: 16rem; }
.inline-form { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.recovery-code-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
}
.recovery-code-list code {
    display: block;
    padding: 0.45rem 0.55rem;
    border-radius: 6px;
    background: rgba(0,0,0,0.25);
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}
.mfa-setup-panel { margin-top: 1rem; }
.mfa-setup-panel img { display: block; margin: 0.75rem 0; border-radius: 8px; background: #fff; padding: 0.5rem; }
.mfa-recovery-details { margin-top: 1.25rem; color: var(--text-muted); }
.mfa-recovery-details summary { cursor: pointer; margin-bottom: 0.75rem; }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.1rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.12);
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
