/* ==========================================================================
   Games: management pages (gm-*), arena screens (ga-*), shared themes (gx-*)
   ========================================================================== */

/* Display font: rounded on the management pages, a game face in the arena (see .ga-body). */
:root { --ga-display: 'Fredoka'; }

/* ---------- Themes (game cover + arena background) ---------- */
.gx-theme-violet   { --gx-a: #4c1fd6; --gx-b: #9b3cf2; --gx-c: #ff6fd8; }
.gx-theme-ocean    { --gx-a: #0a47c2; --gx-b: #0fa4d6; --gx-c: #5cf2d6; }
.gx-theme-sunset   { --gx-a: #e2304d; --gx-b: #f77f35; --gx-c: #ffd166; }
.gx-theme-forest   { --gx-a: #08704f; --gx-b: #34ad66; --gx-c: #c6f36b; }
.gx-theme-berry    { --gx-a: #a3145a; --gx-b: #6c1ea8; --gx-c: #ff8ab8; }
.gx-theme-midnight { --gx-a: #0e1433; --gx-b: #283a96; --gx-c: #6c8cff; }

.gx-cover {
    background:
        radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--gx-c) 70%, transparent) 0, transparent 42%),
        radial-gradient(circle at 8% 100%, rgba(255, 255, 255, 0.18) 0, transparent 38%),
        linear-gradient(135deg, var(--gx-a), var(--gx-b));
}

/* Answer colours: one colour + shape per option. The first three are the ReallyLesson logo's blue, gold and
   navy (shades dark enough for white text); the rest stay clearly apart from them. */
.ga-c0 { --tile: #1268b3; } .ga-c1 { --tile: #b87400; } .ga-c2 { --tile: #1f3e78; } .ga-c3 { --tile: #0f8a73; }
.ga-c4 { --tile: #4472c4; } .ga-c5 { --tile: #b45309; } .ga-c6 { --tile: #be185d; } .ga-c7 { --tile: #475569; }
/* True or false: green tick / red cross. */
.ga-ctrue { --tile: #15803d; } .ga-cfalse { --tile: #dc2626; }

/* ==========================================================================
   Management pages (inside the app layout)
   ========================================================================== */
.gm-page {
    --gm-blue: #3b63e9;
    --gm-blue-dark: #2f54d0;
    --gm-ink: #0f172a;
    --gm-muted: #64748b;
    --gm-line: #e8eef6;
    --gm-soft: #f8fafc;
    padding: 0.75rem 0 2.5rem;
    color: var(--gm-ink);
}

.gm-display { font-family: var(--ga-display), 'Inter', system-ui, sans-serif; letter-spacing: 0.2px; }

/* Hero */
.gm-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: 1.4rem 1.5rem;
    border-radius: 20px;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(76, 31, 214, 0.22);
}
.gm-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 28px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
.gm-hero-main { display: flex; align-items: center; gap: 1rem; position: relative; z-index: 1; }
.gm-hero-icon {
    width: 56px; height: 56px; border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.18); backdrop-filter: blur(6px);
    font-size: 1.6rem; flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.gm-hero h1 { margin: 0; font-size: 1.9rem; font-weight: 700; color: #fff; }
.gm-hero p { margin: 0.2rem 0 0; color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }
.gm-hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; position: relative; z-index: 1; }

/* Buttons */
.gm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    min-height: 42px; padding: 0.55rem 1.1rem;
    border: 0; border-radius: 12px;
    font-weight: 700; font-size: 0.9rem; line-height: 1.2;
    cursor: pointer; text-decoration: none !important; white-space: nowrap;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.gm-btn:hover { transform: translateY(-1px); }
.gm-btn:active { transform: translateY(0); }
.gm-btn--primary { background: var(--gm-blue); color: #fff !important; box-shadow: 0 8px 18px rgba(59, 99, 233, 0.28); }
.gm-btn--primary:hover { background: var(--gm-blue-dark); }
.gm-btn--play { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff !important; box-shadow: 0 8px 18px rgba(22, 163, 74, 0.3); }
.gm-btn--white { background: #fff; color: #3b1fb0 !important; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18); }
.gm-btn--glass { background: rgba(255, 255, 255, 0.16); color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.gm-btn--glass:hover { background: rgba(255, 255, 255, 0.26); }
.gm-btn--light { background: #fff; color: var(--gm-ink) !important; box-shadow: inset 0 0 0 1.5px #dbe2ea; }
.gm-btn--light:hover { box-shadow: inset 0 0 0 1.5px #b9c6d8; background: var(--gm-soft); }
.gm-btn--danger { background: #fff; color: #dc2626 !important; box-shadow: inset 0 0 0 1.5px #fecaca; }
.gm-btn--danger:hover { background: #fef2f2; }
.gm-btn--sm { min-height: 34px; padding: 0.35rem 0.75rem; font-size: 0.8rem; border-radius: 10px; }
.gm-btn--block { width: 100%; }
.gm-btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Stats */
.gm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; margin-bottom: 1.4rem; }
.gm-stat {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 1rem 1.1rem; background: #fff;
    border: 1px solid var(--gm-line); border-radius: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.gm-stat-icon {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
    background: #eef2ff; color: #4c1fd6;
}
.gm-stat:nth-child(2) .gm-stat-icon { background: #e0f2fe; color: #0369a1; }
.gm-stat:nth-child(3) .gm-stat-icon { background: #dcfce7; color: #15803d; }
.gm-stat:nth-child(4) .gm-stat-icon { background: #ffe4e6; color: #e11d48; }
.gm-stat-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--gm-muted); }
.gm-stat-value { display: block; font-size: 1.45rem; font-weight: 800; color: var(--gm-ink); line-height: 1.2; }

/* Game cards */
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.gm-card {
    display: flex; flex-direction: column; min-width: 0;
    background: #fff; border: 1px solid var(--gm-line); border-radius: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gm-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1); }
.gm-card-cover {
    position: relative; height: 128px; padding: 0.9rem 1rem;
    display: flex; flex-direction: column; justify-content: space-between;
    color: #fff; text-decoration: none !important;
}
.gm-card-cover .gm-card-glyph {
    position: absolute; right: 14px; bottom: -12px;
    font-size: 5.2rem; opacity: 0.22; transform: rotate(-12deg);
    transition: transform 0.25s ease;
}
.gm-card:hover .gm-card-glyph { transform: rotate(-4deg) scale(1.08); }
.gm-chip {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.25rem 0.65rem; border-radius: 999px;
    font-size: 0.74rem; font-weight: 700; line-height: 1.3;
    background: rgba(255, 255, 255, 0.2); color: #fff;
    backdrop-filter: blur(4px); width: fit-content;
}
.gm-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.gm-live-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.25rem 0.65rem; border-radius: 999px;
    background: #fff; color: #e11d48; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
}
.gm-live-badge::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e11d48;
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.6); animation: gm-pulse 1.6s infinite;
}
@keyframes gm-pulse { 70% { box-shadow: 0 0 0 8px rgba(225, 29, 72, 0); } 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); } }
.gm-card-body { padding: 1rem 1.1rem 0.6rem; flex: 1; }
.gm-card-title { margin: 0; font-size: 1.12rem; font-weight: 700; color: var(--gm-ink); line-height: 1.3; }
.gm-card-title a { color: inherit; text-decoration: none; }
.gm-card-desc {
    margin: 0.35rem 0 0; color: var(--gm-muted); font-size: 0.86rem; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gm-card-meta { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 0.7rem; font-size: 0.78rem; color: #94a3b8; font-weight: 600; }
.gm-card-meta i { margin-right: 0.25rem; }
.gm-card-foot { display: flex; gap: 0.5rem; align-items: center; padding: 0.8rem 1.1rem 1rem; }
.gm-card-foot form { margin: 0; }
.gm-card-foot .gm-btn--play { flex: 1; }

.gm-menu-btn {
    width: 38px; height: 38px; border-radius: 10px; border: 0;
    background: var(--gm-soft); color: var(--gm-muted); cursor: pointer;
    box-shadow: inset 0 0 0 1.5px #e2e8f0;
}
.gm-menu-btn:hover { color: var(--gm-ink); }
.gm-menu.dropdown-menu { border: 1px solid var(--gm-line); border-radius: 12px; box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12); padding: 0.4rem; }
.gm-menu .dropdown-item { border-radius: 8px; font-size: 0.86rem; font-weight: 600; padding: 0.5rem 0.75rem; display: flex; gap: 0.55rem; align-items: center; }
.gm-menu .dropdown-item i { width: 16px; color: var(--gm-muted); }
.gm-menu .gm-menu-danger, .gm-menu .gm-menu-danger i { color: #dc2626; }

.gm-empty {
    text-align: center; padding: 3.5rem 1rem; background: #fff;
    border: 1.5px dashed #c7d2fe; border-radius: 20px; color: var(--gm-muted);
}
.gm-empty-icon {
    width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff;
}
.gm-empty p { margin: 0 0 1.1rem; font-size: 0.98rem; }
.gm-pagination { margin-top: 1.4rem; display: flex; justify-content: center; }

/* Panels & sections */
.gm-panel {
    background: #fff; border: 1px solid var(--gm-line); border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04); padding: 1.25rem 1.35rem; margin-bottom: 1.25rem;
}
.gm-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.gm-panel-title { margin: 0; font-size: 1.08rem; font-weight: 800; color: var(--gm-ink); display: flex; align-items: center; gap: 0.55rem; }
.gm-panel-title i { color: var(--gm-blue); }
.gm-panel-sub { margin: 0.2rem 0 0; color: var(--gm-muted); font-size: 0.85rem; }
.gm-back { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--gm-muted) !important; font-weight: 700; font-size: 0.88rem; margin-bottom: 0.85rem; text-decoration: none !important; }
.gm-back:hover { color: var(--gm-ink) !important; }

.gm-alert {
    display: flex; gap: 0.65rem; align-items: flex-start;
    padding: 0.8rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-size: 0.88rem; line-height: 1.45;
}
.gm-alert--warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.gm-alert--error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.gm-alert--info { background: #eff6ff; border: 1px solid #dbeafe; color: #1e3a8a; }
.gm-alert ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }

/* Show page banner */
.gm-banner {
    position: relative; border-radius: 22px; padding: 1.6rem 1.6rem 1.4rem; color: #fff; overflow: hidden;
    margin-bottom: 1.25rem; box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}
.gm-banner-glyph { position: absolute; right: 24px; top: 50%; transform: translateY(-50%) rotate(-10deg); font-size: 8rem; opacity: 0.16; }
.gm-banner h1 { margin: 0.65rem 0 0.35rem; font-size: 2rem; font-weight: 700; color: #fff; max-width: 760px; }
.gm-banner p { margin: 0; color: rgba(255, 255, 255, 0.88); max-width: 760px; }
.gm-banner-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.2rem; position: relative; z-index: 1; }
.gm-banner-actions form { margin: 0; }

.gm-two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }

/* Tables */
.gm-table-wrap { overflow-x: auto; }
.gm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.88rem; }
.gm-table th {
    text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 800;
    color: #94a3b8; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--gm-line); white-space: nowrap;
}
.gm-table td { padding: 0.75rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: #334155; }
.gm-table tr:last-child td { border-bottom: 0; }
.gm-table tbody tr:hover td { background: #fafbff; }
.gm-pin { font-family: var(--ga-display), monospace; font-weight: 700; font-size: 1.02rem; letter-spacing: 1.5px; color: var(--gm-ink); }
.gm-row-actions { display: flex; gap: 0.4rem; justify-content: flex-end; flex-wrap: wrap; }
.gm-row-actions form { margin: 0; }

.gm-badge {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.6rem; border-radius: 999px;
    font-size: 0.74rem; font-weight: 800; white-space: nowrap;
}
.gm-badge--live { background: #ffe4e6; color: #e11d48; }
.gm-badge--open { background: #dcfce7; color: #15803d; }
.gm-badge--wait { background: #fef3c7; color: #b45309; }
.gm-badge--done { background: #f1f5f9; color: #64748b; }
.gm-badge--mode { background: #eef2ff; color: #4338ca; }

/* Question list on show page */
.gm-qlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.gm-qitem { display: flex; gap: 0.75rem; align-items: center; padding: 0.7rem 0.8rem; border: 1px solid #eef2f7; border-radius: 14px; background: var(--gm-soft); }
.gm-qnum {
    width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; box-shadow: inset 0 0 0 1.5px #e2e8f0; font-weight: 800; font-size: 0.82rem; color: var(--gm-ink);
}
.gm-qtext { flex: 1; min-width: 0; }
.gm-qtext strong { display: block; font-size: 0.9rem; color: var(--gm-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-qtype { font-size: 0.76rem; color: var(--gm-muted); font-weight: 600; }
.gm-qtype i { color: #7c3aed; margin-right: 0.25rem; }
.gm-qmeta { font-size: 0.76rem; color: #94a3b8; font-weight: 700; white-space: nowrap; }

/* Forms */
.gm-field { margin-bottom: 1rem; }
.gm-label { display: block; font-size: 0.82rem; font-weight: 800; color: #334155; margin-bottom: 0.4rem; }
.gm-hint { font-size: 0.78rem; color: var(--gm-muted); margin-top: 0.35rem; line-height: 1.45; }
.gm-input, .gm-select, .gm-textarea {
    width: 100%; min-height: 44px; padding: 0.6rem 0.85rem;
    border: 1.5px solid #e2e8f0; border-radius: 12px; background: #fff;
    font-size: 0.92rem; color: var(--gm-ink); outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gm-textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.gm-input:focus, .gm-select:focus, .gm-textarea:focus { border-color: var(--gm-blue); box-shadow: 0 0 0 3px rgba(59, 99, 233, 0.13); }
.gm-input--lg { font-size: 1.05rem; font-weight: 700; min-height: 50px; }
.gm-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }

.gm-switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; font-weight: 700; font-size: 0.88rem; color: #334155; margin: 0 1.2rem 0.4rem 0; }
.gm-switch input { position: absolute; opacity: 0; pointer-events: none; }
.gm-switch-track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #cbd5e1; transition: background 0.15s ease; flex-shrink: 0; }
.gm-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.18s ease; }
.gm-switch input:checked + .gm-switch-track { background: var(--gm-blue); }
.gm-switch input:checked + .gm-switch-track::after { transform: translateX(18px); }
.gm-switch input:focus-visible + .gm-switch-track { outline: 2px solid var(--gm-blue); outline-offset: 2px; }

.gm-swatches { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.gm-swatch { position: relative; cursor: pointer; margin: 0; }
.gm-swatch input { position: absolute; opacity: 0; }
.gm-swatch span { display: block; width: 44px; height: 44px; border-radius: 14px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.gm-swatch input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--gm-blue); transform: scale(1.05); }
.gm-swatch input:focus-visible + span { outline: 2px solid var(--gm-blue); outline-offset: 4px; }

/* Share & embed panel */
.gm-copy-row { display: flex; gap: 0.4rem; align-items: center; }
.gm-copy-row .gm-input { min-width: 0; flex: 1; font-size: 0.84rem; background: var(--gm-soft); }
.gm-code { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 0.78rem; line-height: 1.5; background: #0f172a; color: #e2e8f0; border-color: #0f172a; min-height: 96px; }
.gm-code:focus { border-color: var(--gm-blue); }
.gm-copy-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 0.5rem; }

/* Assign panel + audience picker (shared educator-announcements partial) */
.gm-assign .ea-audience { margin-top: 0.5rem; }
.gm-assign .ea-audience-intro h2 { margin: 0 0 0.2rem; font-size: 0.92rem; font-weight: 800; color: var(--gm-ink); }
.gm-assign .ea-audience-intro p { margin: 0 0 0.75rem; font-size: 0.8rem; color: var(--gm-muted); line-height: 1.5; }
.gm-assign .ea-audience-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
.gm-assign .ea-audience-card { border: 1px solid var(--gm-line); border-radius: 14px; overflow: hidden; background: #fff; }
.gm-assign .ea-audience-card-head { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.85rem 0.5rem; }
.gm-assign .ea-audience-card-head > div { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex: 1; flex-wrap: wrap; }
.gm-assign .ea-audience-card-icon { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #3b63e9, #6d5bf5); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; }
.gm-assign .ea-audience-card-head strong { font-size: 0.84rem; }
.gm-assign .ea-audience-count { padding: 0.15rem 0.55rem; border-radius: 999px; background: #f1f5f9; color: var(--gm-muted); font-size: 0.72rem; font-weight: 700; }
.gm-assign .ea-audience-card:has(.ea-audience-list input:checked) .ea-audience-count { background: #e8efff; color: var(--gm-blue); }
.gm-assign .ea-audience-search { position: relative; padding: 0 0.85rem 0.6rem; }
.gm-assign .ea-audience-search i { position: absolute; left: calc(0.85rem + 13px); top: 19px; transform: translateY(-50%); color: #94a3b8; font-size: 0.8rem; }
.gm-assign .ea-audience-search .form-control { min-height: 38px; padding-left: 2.2rem; border-radius: 10px; border: 1.5px solid #e2e8f0; background: var(--gm-soft); font-size: 0.85rem; box-shadow: none; }
.gm-assign .ea-audience-list { display: flex; flex-wrap: wrap; gap: 0.4rem; max-height: 170px; overflow-y: auto; padding: 0.65rem 0.85rem 0.85rem; border-top: 1px solid #f1f5f9; background: #fbfcfe; }
.gm-assign .ea-audience-row { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; padding: 0.32rem 0.65rem 0.32rem 0.5rem; border: 1px solid #e2e8f0; border-radius: 9px; background: #fff; font-size: 0.8rem; font-weight: 600; color: #334155; cursor: pointer; max-width: 100%; }
.gm-assign .ea-audience-row:has(input:checked) { border-color: #a9bff8; background: #eef3ff; color: #1e3a8a; }
.gm-assign .ea-audience-row input { accent-color: var(--gm-blue); margin: 0; }
.gm-assign .ea-audience-row span { overflow-wrap: anywhere; }
.gm-assign .ea-audience-empty { margin: 0; width: 100%; text-align: center; color: #94a3b8; font-size: 0.82rem; }

/* ---------- Builder ---------- */
.gm-builder-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.gm-builder-top h1 { margin: 0; font-size: 1.6rem; font-weight: 700; }
.gm-builder { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.gm-side { position: sticky; top: 90px; }
.gm-side-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: calc(100vh - 260px); overflow-y: auto; padding: 2px; margin-bottom: 0.75rem; }
.gm-qcard {
    display: flex; align-items: center; gap: 0.65rem; width: 100%; text-align: left;
    padding: 0.65rem 0.7rem; border: 1.5px solid transparent; border-radius: 14px;
    background: #fff; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05); cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.gm-qcard:hover { transform: translateX(2px); }
.gm-qcard.is-active { border-color: var(--gm-blue); box-shadow: 0 8px 20px rgba(59, 99, 233, 0.16); }
.gm-qcard.has-error { border-color: #f87171; }
.gm-qcard-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 0.85rem;
    background: linear-gradient(135deg, #6d28d9, #3b63e9);
}
.gm-qcard-text { flex: 1; min-width: 0; }
.gm-qcard-text small { display: block; font-size: 0.7rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.4px; }
.gm-qcard-text span { display: block; font-size: 0.84rem; font-weight: 700; color: var(--gm-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-qcard-text span.is-empty { color: #cbd5e1; font-style: italic; font-weight: 600; }

.gm-add-q {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; min-height: 48px;
    border: 1.5px dashed #a5b4fc; border-radius: 14px; background: #f5f7ff; color: #4338ca;
    font-weight: 800; font-size: 0.9rem; cursor: pointer;
}
.gm-add-q:hover { background: #eef2ff; }

/* Generate with AI */
.gm-builder-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.gm-btn--ai { background: linear-gradient(135deg, #7c3aed, #db2777); color: #fff !important; box-shadow: 0 8px 18px rgba(124, 58, 237, 0.28); }
.gm-btn--ai:hover { filter: brightness(1.06); }
.gm-add-q--ai { margin-top: 0.55rem; border-color: #f0abfc; background: linear-gradient(135deg, #faf5ff, #fdf2f8); color: #86198f; }
.gm-add-q--ai:hover { background: #fae8ff; }
.gm-qcard { position: relative; }
.gm-qcard-ai { position: absolute; top: 6px; right: 8px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.62rem; color: #fff; background: linear-gradient(135deg, #7c3aed, #db2777); }
.gm-alert--ai { background: linear-gradient(135deg, #faf5ff, #fdf2f8); border: 1px solid #f0abfc; color: #701a75; }
.gm-ai-card { width: min(720px, 100%); position: relative; }
.gm-ai-badge { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-right: 0.35rem; border-radius: 10px; color: #fff; font-size: 0.95rem; vertical-align: middle; background: linear-gradient(135deg, #7c3aed, #db2777); }
.gm-ai-intro { margin: -0.4rem 0 1.1rem; color: var(--gm-muted); font-size: 0.9rem; line-height: 1.5; }
.gm-optional { font-weight: 600; color: #94a3b8; margin-left: 0.25rem; }
.gm-ai-file { display: flex; align-items: center; gap: 0.6rem; margin: 0.55rem 0 0; padding: 0.65rem 0.85rem; border: 1.5px dashed #cbd5e1; border-radius: 12px; color: var(--gm-muted); font-weight: 700; font-size: 0.85rem; cursor: pointer; }
.gm-ai-file:hover { border-color: #a78bfa; color: #6d28d9; background: #faf5ff; }
.gm-ai-file:focus-within { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); }
.gm-ai-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gm-ai-file span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-ai-file .gm-icon-btn { width: 30px; height: 30px; }
.gm-ai-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.85rem; }
.gm-ai-types { border: 0; padding: 0; min-width: 0; }
.gm-ai-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.gm-ai-chip { margin: 0; cursor: pointer; }
.gm-ai-chip input, .gm-ai-seg input { position: absolute; opacity: 0; pointer-events: none; }
.gm-ai-chip span { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.8rem; border-radius: 999px; border: 1.5px solid #e2e8f0; background: #fff; font-weight: 700; font-size: 0.82rem; color: #475569; transition: all 0.15s; }
.gm-ai-chip span i { color: #94a3b8; }
.gm-ai-chip input:checked + span { border-color: #7c3aed; background: #f5f3ff; color: #5b21b6; }
.gm-ai-chip input:checked + span i { color: #7c3aed; }
.gm-ai-chip input:focus-visible + span, .gm-ai-seg input:focus-visible + span { outline: 2px solid #7c3aed; outline-offset: 2px; }
.gm-ai-seg { margin: 0; cursor: pointer; }
.gm-ai-seg span { display: block; padding: 0.45rem 0.9rem; border-radius: 9px; font-weight: 800; font-size: 0.82rem; color: var(--gm-muted); }
.gm-ai-seg input:checked + span { background: #fff; color: var(--gm-ink); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }
.gm-ai-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--gm-line); }
.gm-ai-foot .gm-hint { margin: 0; flex: 1 1 220px; }
.gm-ai-foot-actions { display: flex; gap: 0.6rem; margin-left: auto; }
.gm-ai-loading { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 3rem 1rem; text-align: center; }
.gm-ai-loading[hidden] { display: none; }
.gm-ai-loading strong { font-size: 1.1rem; color: var(--gm-ink); }
.gm-ai-loading span { color: var(--gm-muted); font-size: 0.88rem; }
.gm-ai-orb { width: 76px; height: 76px; margin-bottom: 0.6rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.7rem; background: linear-gradient(135deg, #7c3aed, #db2777, #f59e0b); background-size: 200% 200%; animation: gm-ai-orb 2.4s ease-in-out infinite; box-shadow: 0 14px 34px rgba(124, 58, 237, 0.35); }
@keyframes gm-ai-orb {
    0%, 100% { background-position: 0% 50%; transform: scale(1) rotate(0deg); }
    50% { background-position: 100% 50%; transform: scale(1.08) rotate(8deg); }
}
@media (max-width: 575px) {
    .gm-ai-row { grid-template-columns: 1fr; }
    .gm-ai-foot-actions { width: 100%; }
    .gm-ai-foot-actions .gm-btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .gm-ai-orb { animation: none; }
}

.gm-editor { min-height: 420px; }
.gm-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.gm-type-pill {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.8rem 0.35rem 0.4rem;
    border-radius: 999px; background: #f5f3ff; color: #5b21b6; font-weight: 800; font-size: 0.84rem;
}
.gm-type-pill i { width: 28px; height: 28px; border-radius: 50%; background: #7c3aed; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; }
.gm-type-pill small { font-weight: 600; color: #7c3aed; margin-left: 0.2rem; }
.gm-icon-btn {
    width: 36px; height: 36px; border-radius: 10px; border: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--gm-soft); color: var(--gm-muted); box-shadow: inset 0 0 0 1.5px #e2e8f0;
    transition: color 0.15s ease, background 0.15s ease;
}
.gm-icon-btn:hover { color: var(--gm-ink); background: #fff; }
.gm-icon-btn--danger:hover { color: #dc2626; background: #fef2f2; }
.gm-icon-btn[disabled] { opacity: 0.4; cursor: default; }
.gm-editor-actions { display: flex; gap: 0.4rem; }

.gm-dropzone {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    min-height: 92px; border: 1.5px dashed #cbd5e1; border-radius: 14px; background: var(--gm-soft);
    color: var(--gm-muted); font-weight: 700; font-size: 0.86rem; cursor: pointer; overflow: hidden;
}
.gm-dropzone:hover { border-color: var(--gm-blue); color: var(--gm-blue); }
.gm-dropzone img { max-height: 180px; max-width: 100%; display: block; border-radius: 10px; }
.gm-dropzone.has-image { padding: 0.5rem; cursor: default; }
.gm-dropzone-remove { position: absolute; top: 8px; right: 8px; }

.gm-option-list { display: flex; flex-direction: column; gap: 0.55rem; }
.gm-option {
    display: flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0.45rem 0.4rem 0.4rem;
    border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px #e2e8f0;
    transition: box-shadow 0.15s ease, background 0.15s ease;
}
.gm-option.is-correct { box-shadow: inset 0 0 0 2px #22c55e; background: #f0fdf4; }
.gm-option-shape {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; background: var(--tile, #64748b); font-size: 0.85rem;
}
.gm-option .gm-input { border: 0; min-height: 38px; padding: 0.3rem 0.35rem; box-shadow: none !important; background: transparent; }
.gm-option-badge { font-weight: 800; color: #94a3b8; font-size: 0.8rem; width: 26px; text-align: center; flex-shrink: 0; }
.gm-correct-toggle {
    display: inline-flex; align-items: center; gap: 0.35rem; flex-shrink: 0; cursor: pointer;
    padding: 0.4rem 0.65rem; border-radius: 10px; border: 0; background: var(--gm-soft);
    color: var(--gm-muted); font-weight: 800; font-size: 0.76rem; box-shadow: inset 0 0 0 1.5px #e2e8f0;
}
.gm-correct-toggle.is-on { background: #22c55e; color: #fff; box-shadow: none; }
.gm-add-row {
    display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.7rem; padding: 0.45rem 0.85rem;
    border-radius: 10px; border: 0; background: #eef2ff; color: #4338ca; font-weight: 800; font-size: 0.82rem; cursor: pointer;
}
.gm-add-row:hover { background: #e0e7ff; }
.gm-add-row[disabled] { opacity: 0.45; cursor: default; }

.gm-tf { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.gm-tf button {
    min-height: 82px; border-radius: 16px; border: 0; cursor: pointer; color: #fff; font-weight: 800; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center; gap: 0.6rem; opacity: 0.45; transition: opacity 0.15s ease, transform 0.15s ease;
}
.gm-tf button.is-on { opacity: 1; transform: scale(1.02); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18); }
.gm-tf .gm-tf-true { background: #15803d; }
.gm-tf .gm-tf-false { background: #dc2626; }

.gm-segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: #f1f5f9; gap: 4px; }
.gm-segmented button { border: 0; background: transparent; padding: 0.45rem 0.9rem; border-radius: 9px; font-weight: 800; font-size: 0.82rem; color: var(--gm-muted); cursor: pointer; }
.gm-segmented button.is-on { background: #fff; color: var(--gm-ink); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }

.gm-sentence-preview { margin-top: 0.75rem; padding: 0.85rem 1rem; border-radius: 12px; background: var(--gm-soft); border: 1px solid #eef2f7; line-height: 2.1; font-size: 0.92rem; color: #334155; }
.gm-sentence-preview .gm-blank-chip { display: inline-block; padding: 0 0.6rem; border-radius: 8px; background: #ede9fe; color: #5b21b6; font-weight: 800; line-height: 1.8; }
.gm-sentence-preview .gm-blank-chip small { color: #8b5cf6; font-weight: 600; }

.gm-pair { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 36px; align-items: center; gap: 0.45rem; }
.gm-pair-link { text-align: center; color: #a78bfa; }
.gm-cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.gm-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px 36px; gap: 0.45rem; align-items: center; }

.gm-builder-foot { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1rem; }

/* Type picker modal */
.gm-modal { position: fixed; inset: 0; z-index: 1060; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(4px); }
.gm-modal.is-open { display: flex; animation: gm-fade 0.15s ease; }
.gm-modal-card { width: min(860px, 100%); max-height: calc(100vh - 2rem); overflow-y: auto; background: #fff; border-radius: 22px; padding: 1.4rem; box-shadow: 0 30px 60px rgba(15, 23, 42, 0.3); animation: gm-pop 0.2s ease; }
.gm-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.gm-modal-head h3 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.gm-type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.gm-type-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; text-align: left;
    padding: 1rem; border-radius: 16px; border: 1.5px solid #eef2f7; background: var(--gm-soft); cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.gm-type-card:hover { transform: translateY(-3px); border-color: #c4b5fd; background: #fff; box-shadow: 0 12px 26px rgba(91, 33, 182, 0.12); }
.gm-type-card i { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem; background: linear-gradient(135deg, #7c3aed, #3b63e9); }
.gm-type-card:nth-child(3n+2) i { background: linear-gradient(135deg, #0ea5e9, #14b8a6); }
.gm-type-card:nth-child(3n) i { background: linear-gradient(135deg, #f97316, #e11d48); }
.gm-type-card strong { font-size: 0.95rem; color: var(--gm-ink); }
.gm-type-card span { font-size: 0.76rem; font-weight: 700; color: var(--gm-muted); }
@keyframes gm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gm-pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- Results ---------- */
.gm-mini-podium { display: flex; align-items: flex-end; justify-content: center; gap: 0.75rem; padding: 0.5rem 0 0; min-height: 190px; }
.gm-mini-podium-col { display: flex; flex-direction: column; align-items: center; width: 130px; }
.gm-mini-podium-name { font-weight: 800; font-size: 0.88rem; color: var(--gm-ink); text-align: center; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-mini-podium-score { font-size: 0.78rem; color: var(--gm-muted); font-weight: 700; margin-bottom: 0.4rem; }
.gm-mini-podium-block { width: 100%; border-radius: 14px 14px 6px 6px; color: #fff; display: flex; align-items: flex-start; justify-content: center; padding-top: 0.5rem; font-family: var(--ga-display), sans-serif; font-size: 1.6rem; font-weight: 700; }
.gm-mini-podium-col.r1 .gm-mini-podium-block { height: 120px; background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.gm-mini-podium-col.r2 .gm-mini-podium-block { height: 90px; background: linear-gradient(180deg, #cbd5e1, #94a3b8); }
.gm-mini-podium-col.r3 .gm-mini-podium-block { height: 66px; background: linear-gradient(180deg, #fdba74, #ea8a4a); }
.gm-rank { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; font-size: 0.82rem; background: #f1f5f9; color: var(--gm-ink); }
.gm-rank.r1 { background: #fef3c7; color: #b45309; } .gm-rank.r2 { background: #e2e8f0; color: #475569; } .gm-rank.r3 { background: #ffedd5; color: #c2410c; }
.gm-meter { height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; min-width: 80px; }
.gm-meter span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22c55e, #16a34a); }
.gm-meter.is-mid span { background: linear-gradient(90deg, #f59e0b, #d97706); }
.gm-meter.is-low span { background: linear-gradient(90deg, #f87171, #dc2626); }
.gm-qresults { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.9rem; }
.gm-qresult { border: 1px solid var(--gm-line); border-radius: 16px; padding: 1rem; background: #fff; }
.gm-qresult-head { display: flex; gap: 0.65rem; align-items: flex-start; margin-bottom: 0.75rem; }
.gm-qresult-head p { margin: 0.15rem 0 0; font-weight: 700; font-size: 0.9rem; color: var(--gm-ink); line-height: 1.4; }
.gm-qresult-stats { display: flex; gap: 1rem; font-size: 0.78rem; color: var(--gm-muted); font-weight: 700; margin-bottom: 0.65rem; flex-wrap: wrap; }
.gm-dist { display: flex; flex-direction: column; gap: 0.35rem; }
.gm-dist-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 28px; gap: 0.5rem; align-items: center; font-size: 0.8rem; color: #334155; }
.gm-dist-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-dist-row.is-correct span:first-child { color: #15803d; font-weight: 800; }
.gm-dist-bar { height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.gm-dist-bar i { display: block; height: 100%; background: #a5b4fc; border-radius: 999px; }
.gm-dist-row.is-correct .gm-dist-bar i { background: #22c55e; }
.gm-words { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.gm-words span { padding: 0.2rem 0.6rem; border-radius: 999px; background: #f5f3ff; color: #5b21b6; font-weight: 700; font-size: 0.8rem; }

/* ---------- Learner games page ---------- */
.gm-join {
    position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem; align-items: center;
    padding: 1.8rem; border-radius: 24px; color: #fff; overflow: hidden; margin-bottom: 1.5rem;
    box-shadow: 0 20px 44px rgba(76, 31, 214, 0.25);
}
.gm-join h2 { margin: 0 0 0.35rem; font-size: 1.7rem; font-weight: 700; color: #fff; }
.gm-join p { margin: 0; color: rgba(255, 255, 255, 0.88); }
.gm-join-form { display: flex; gap: 0.6rem; position: relative; z-index: 1; }
.gm-join-input {
    flex: 1; min-width: 0; min-height: 64px; border: 0; border-radius: 16px; padding: 0 1rem; text-align: center;
    font-family: var(--ga-display), sans-serif; font-size: 2rem; font-weight: 700; letter-spacing: 0.4em; color: #1e1b4b;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2); outline: none;
}
.gm-join-input::placeholder { color: #c4b5fd; letter-spacing: 0.15em; font-size: 1.3rem; }
.gm-join-input:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5), 0 10px 24px rgba(15, 23, 42, 0.2); }
.gm-join .gm-btn { min-height: 64px; padding: 0 1.6rem; font-size: 1.05rem; border-radius: 16px; }
.gm-join-floaters { position: absolute; inset: 0; pointer-events: none; }
.gm-join-floaters span { position: absolute; color: rgba(255, 255, 255, 0.12); font-size: 3rem; animation: gm-float 6s ease-in-out infinite; }
@keyframes gm-float { 50% { transform: translateY(-12px) rotate(8deg); } }
.gm-section-title { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.9rem; font-size: 1.2rem; font-weight: 700; color: var(--gm-ink); }
.gm-section-title i { color: #7c3aed; }
.gm-progress-chip { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 800; padding: 0.25rem 0.6rem; border-radius: 999px; }
.gm-progress-chip--new { background: #eef2ff; color: #4338ca; }
.gm-progress-chip--doing { background: #fef3c7; color: #b45309; }
.gm-progress-chip--done { background: #dcfce7; color: #15803d; }
.gm-history { display: flex; flex-direction: column; gap: 0.55rem; }
.gm-history-row { display: flex; align-items: center; gap: 0.85rem; padding: 0.75rem 0.9rem; background: #fff; border: 1px solid var(--gm-line); border-radius: 14px; }
.gm-history-dot { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.gm-history-main { flex: 1; min-width: 0; }
.gm-history-main strong { display: block; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-history-main small { color: var(--gm-muted); font-weight: 600; }
.gm-history-score { text-align: right; font-weight: 800; color: var(--gm-ink); }
.gm-history-score small { display: block; color: var(--gm-muted); font-weight: 700; font-size: 0.75rem; }

@media (max-width: 991px) {
    .gm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gm-builder, .gm-two-col, .gm-join { grid-template-columns: 1fr; }
    .gm-side { position: static; }
    .gm-side-list { max-height: none; flex-direction: row; overflow-x: auto; }
    .gm-side-list .gm-qcard { min-width: 220px; }
    .gm-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
    .gm-hero, .gm-banner, .gm-join { padding: 1.2rem; border-radius: 18px; }
    .gm-hero h1, .gm-banner h1 { font-size: 1.45rem; }
    .gm-row, .gm-cat-grid { grid-template-columns: 1fr; }
    .gm-type-grid { grid-template-columns: 1fr; }
    .gm-item-row { grid-template-columns: minmax(0, 1fr) 36px; }
    .gm-item-row select { grid-column: 1 / -1; grid-row: 2; }
    .gm-join-form { flex-direction: column; }
    .gm-join-input { font-size: 1.6rem; }
}

/* ==========================================================================
   Arena: host + player screens (standalone, full screen)
   ========================================================================== */
/*
 * Arcade look in the ReallyLesson colours (the logo's blue, gold and navy): a light arena, white
 * panels with a chunky blue edge, cut-corner panels and buttons (--ga-cut*), hexagon badges
 * (--ga-hex) and slanted motion. Clip-paths cut outer shadows, so depth comes from inset shadows.
 */
.ga-body {
    --ga-display: 'Exo 2';
    --ga-ink: #0f2b4c;
    --ga-ink-soft: #475569;
    --ga-glow: #1b88e3;
    --ga-gold: #e49a00;
    --ga-line: color-mix(in srgb, var(--ga-glow) 22%, #e2e8f0);
    --ga-cut: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
    --ga-cut-sm: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    --ga-hex: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--ga-ink); overflow-x: hidden;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
.ga-body.gx-cover {
    background:
        radial-gradient(ellipse 55% 45% at 0% 0%, rgba(27, 136, 227, 0.2), transparent 70%),
        radial-gradient(ellipse 50% 42% at 100% 6%, rgba(228, 154, 0, 0.18), transparent 70%),
        radial-gradient(ellipse 55% 45% at 92% 100%, rgba(68, 114, 196, 0.18), transparent 70%),
        radial-gradient(ellipse 50% 42% at 4% 100%, rgba(246, 178, 27, 0.16), transparent 70%),
        linear-gradient(180deg, #f2f8fe, #fffaf0);
    background-attachment: fixed;
}
.ga-body *, .ga-body *::before, .ga-body *::after { box-sizing: border-box; }
.ga-display { font-family: var(--ga-display), 'Inter', sans-serif; }

/* Arena backdrop: drifting confetti in the brand colours, a board-grid floor and two soft glows. */
.ga-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.ga-bg span { position: absolute; pointer-events: none; }
.ga-bg span:nth-child(1) {
    inset: 0; opacity: 0.5; animation: ga-confetti 60s linear infinite;
    background-image:
        radial-gradient(circle at 12% 18%, #1b88e3 0 5px, transparent 6px), radial-gradient(circle at 33% 62%, #e49a00 0 4px, transparent 5px),
        radial-gradient(circle at 58% 12%, #27548a 0 6px, transparent 7px), radial-gradient(circle at 71% 44%, #f6b21b 0 4px, transparent 5px),
        radial-gradient(circle at 88% 27%, #4472c4 0 5px, transparent 6px), radial-gradient(circle at 46% 36%, #e49a00 0 3px, transparent 4px),
        radial-gradient(circle at 22% 80%, #0f8a73 0 5px, transparent 6px), radial-gradient(circle at 92% 70%, #1b88e3 0 4px, transparent 5px);
    background-size: 460px 460px;
}
.ga-bg span:nth-child(2) {
    left: -50%; right: -50%; bottom: 0; height: 60%;
    background-image:
        linear-gradient(color-mix(in srgb, var(--ga-glow) 22%, transparent) 2px, transparent 2px),
        linear-gradient(90deg, color-mix(in srgb, var(--ga-glow) 22%, transparent) 2px, transparent 2px);
    background-size: 72px 72px;
    transform: perspective(500px) rotateX(58deg); transform-origin: 50% 100%;
    -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 70%); mask-image: linear-gradient(to top, #000 10%, transparent 70%);
    animation: ga-grid 3s linear infinite;
}
.ga-bg span:nth-child(3), .ga-bg span:nth-child(4) { width: 36vmax; height: 36vmax; border-radius: 50%; filter: blur(60px); opacity: 0.25; animation: ga-drift 22s ease-in-out infinite; }
.ga-bg span:nth-child(3) { top: 20%; left: -16vmax; background: #f6b21b; }
.ga-bg span:nth-child(4) { top: 10%; right: -16vmax; background: #7fb5ea; animation-delay: -11s; }
@keyframes ga-confetti { to { background-position: 460px 920px; } }
@keyframes ga-grid { to { background-position: 0 72px; } }
@keyframes ga-drift { 50% { transform: translate(6vmax, 4vmax); } }

.ga-app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.ga-top {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.85rem 1.25rem; position: relative; z-index: 2;
}
.ga-brand { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.ga-brand-icon { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, 0.18); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ga-brand strong { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ga-top-right { display: flex; align-items: center; gap: 0.5rem; }
.ga-pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; border-radius: 999px; background: rgba(0, 0, 0, 0.22); font-weight: 800; font-size: 0.85rem; white-space: nowrap; }
.ga-pill--light { background: #fff; color: #0f2b4c; }
.ga-round-btn {
    width: 40px; height: 40px; border-radius: 12px; border: 0; cursor: pointer; color: #fff;
    background: rgba(255, 255, 255, 0.16); display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none !important; transition: background 0.15s ease;
}
.ga-round-btn:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }
.ga-body .ga-round-btn, .ga-body .ga-brand-icon { border-radius: 0; clip-path: var(--ga-cut-sm); }
.ga-body .ga-round-btn { color: var(--ga-ink); background: #fff; box-shadow: inset 0 -3px 0 var(--ga-line); }
.ga-body .ga-round-btn:hover { background: #fff; color: var(--ga-glow); }
.ga-body .ga-brand-icon { background: var(--ga-glow); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
.ga-body .ga-pill { background: #fff; color: var(--ga-ink); box-shadow: inset 0 0 0 2px var(--ga-line); }

.ga-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem 1.25rem 1.5rem; width: 100%; }
.ga-enter { animation: ga-enter 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes ga-enter { from { opacity: 0; transform: translateY(18px) scale(0.97); } to { opacity: 1; transform: none; } }

.ga-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 54px; padding: 0 1.6rem 4px; border: 0; border-radius: 0; cursor: pointer; clip-path: var(--ga-cut-sm);
    font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: 1.1rem; letter-spacing: 0.6px; text-transform: uppercase;
    background: linear-gradient(180deg, #fff, #eef2f7); color: var(--ga-ink, #0f2b4c); text-decoration: none !important;
    box-shadow: inset 0 0 0 2px var(--ga-line, #e2e8f0), inset 0 -5px 0 var(--ga-line, #e2e8f0); transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s ease;
}
.ga-btn:hover { color: var(--ga-ink, #0f2b4c); filter: brightness(1.04); }
.ga-btn:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px var(--ga-line, #e2e8f0), inset 0 -2px 0 var(--ga-line, #e2e8f0); }
.ga-btn--go { background: linear-gradient(180deg, #3aa0f0, #1268b3); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2); }
.ga-btn--go:hover { color: #fff; }
.ga-btn--ghost { background: rgba(255, 255, 255, 0.6); color: var(--ga-ink, #0f2b4c); box-shadow: inset 0 0 0 2px var(--ga-line, #e2e8f0); }
.ga-btn--ghost:hover { color: var(--ga-ink, #0f2b4c); }
.ga-btn--ghost:active { box-shadow: inset 0 0 0 2px var(--ga-line, #e2e8f0); }
.ga-btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.ga-card { background: #fff; color: #0f2b4c; border-radius: 22px; box-shadow: 0 10px 30px rgba(31, 37, 71, 0.12); }
.ga-muted { color: var(--ga-ink-soft); }

/* Host lobby */
.ga-lobby { width: min(1180px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: stretch; }
.ga-join-card {
    padding: 1.6rem 1.8rem; display: flex; flex-direction: column; justify-content: center; text-align: center;
    border-radius: 0; clip-path: var(--ga-cut); background: #fff; color: var(--ga-ink);
    box-shadow: inset 0 0 0 2px var(--ga-line), inset 0 -8px 0 var(--ga-glow);
}
.ga-join-card .ga-join-label { font-weight: 700; color: var(--ga-ink-soft); font-size: 1.05rem; }
.ga-join-card .ga-join-url { font-family: var(--ga-display), sans-serif; font-size: clamp(1.3rem, 2.6vw, 2rem); font-weight: 700; color: var(--ga-ink); word-break: break-all; }
.ga-pin { font-family: var(--ga-display), sans-serif; font-size: clamp(3.6rem, 9vw, 6.5rem); font-weight: 800; font-style: italic; letter-spacing: 0.08em; line-height: 1; color: var(--ga-glow); text-shadow: 0 5px 0 #f6b21b; margin: 0.4rem 0 0.2rem; }
.ga-qr { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; color: var(--ga-ink-soft); font-weight: 700; font-size: 0.9rem; }
.ga-qr img { width: 120px; height: 120px; border-radius: 6px; border: 6px solid #fff; background: #fff; box-shadow: 0 0 0 2px var(--ga-line); }
.ga-players-card { padding: 1.4rem; display: flex; flex-direction: column; border-radius: 0; clip-path: var(--ga-cut); background: rgba(255, 255, 255, 0.65); color: var(--ga-ink); box-shadow: inset 0 0 0 2px var(--ga-line); backdrop-filter: blur(8px); }
.ga-players-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.ga-players-count { font-family: var(--ga-display), sans-serif; font-size: 2.6rem; font-weight: 700; line-height: 1; }
.ga-players { display: flex; flex-wrap: wrap; gap: 0.6rem; align-content: flex-start; flex: 1; min-height: 160px; max-height: 46vh; overflow-y: auto; }
.ga-player-chip {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.95rem 0.5rem 0.5rem; border-radius: 999px;
    background: #fff; color: #0f2b4c; font-weight: 800; font-size: 1rem; box-shadow: 0 0 0 2px var(--ga-line, #e2e8f0), 0 3px 0 var(--ga-line, #e2e8f0); animation: ga-pop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.ga-avatar { width: 36px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 0.78rem; font-weight: 800; flex-shrink: 0; }
.ga-body .ga-avatar { border-radius: 0; clip-path: var(--ga-hex); }
/* Animal avatars (drawn by games-ui.js) fill their hexagon. */
.ga-avatar-pic { overflow: hidden; }
.ga-avatar-pic svg { display: block; width: 100%; height: 100%; }
.ga-player-chip .ga-avatar { width: 44px; height: 41px; margin: -0.3rem 0; }
@keyframes ga-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
.ga-waiting { display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex: 1; font-weight: 700; color: var(--ga-ink-soft); font-size: 1.1rem; }
.ga-dots span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin: 0 2px; animation: ga-bounce 1.2s infinite; }
.ga-dots span:nth-child(2) { animation-delay: 0.15s; } .ga-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ga-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-8px); opacity: 1; } }

/* Question stage (host) */
.ga-q { width: min(1180px, 100%); display: flex; flex-direction: column; gap: 1.1rem; flex: 1; }
.ga-q-prompt { padding: 1.3rem 1.6rem; text-align: center; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: clamp(1.4rem, 3vw, 2.4rem); line-height: 1.25; }
/* Question prompt: a cut-corner game panel with a chunky theme-coloured edge. */
.ga-card.ga-q-prompt, .ga-card.ga-phone-prompt {
    position: relative; border-radius: 0; clip-path: var(--ga-cut); color: var(--ga-ink); background: #fff; padding-bottom: calc(1.3rem + 4px);
    box-shadow: inset 0 0 0 2px var(--ga-line), inset 0 -7px 0 var(--ga-glow);
}
.ga-card.ga-phone-prompt { padding-bottom: calc(1.1rem + 4px); }
.ga-q-middle { display: grid; grid-template-columns: 140px minmax(0, 1fr) 140px; gap: 1rem; align-items: center; flex: 1; min-height: 160px; }
.ga-q-media { display: flex; align-items: center; justify-content: center; min-height: 120px; }
.ga-q-media img { max-width: 100%; max-height: 34vh; border-radius: 18px; box-shadow: 0 10px 26px rgba(31, 37, 71, 0.18); background: #fff; }
.ga-q-hint { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.15rem; color: var(--ga-ink-soft); text-align: center; }
.ga-q-hint i { font-size: 3rem; color: var(--ga-glow); }
.ga-counter { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; font-weight: 800; }
.ga-counter strong { font-family: var(--ga-display), sans-serif; font-size: 3rem; line-height: 1; }
.ga-counter span { font-size: 0.9rem; opacity: 0.85; }

/* Countdown: a segmented energy ring around a white core. */
.ga-timer { position: relative; width: 120px; height: 120px; margin: 0 auto; }
.ga-timer::before { content: ''; position: absolute; inset: 15px; border-radius: 50%; background: #fff; box-shadow: inset 0 -5px 0 var(--ga-line), 0 6px 18px rgba(31, 37, 71, 0.12); }
.ga-timer svg { position: relative; width: 100%; height: 100%; transform: rotate(-90deg); -webkit-mask: repeating-conic-gradient(#000 0 12deg, transparent 12deg 15deg); mask: repeating-conic-gradient(#000 0 12deg, transparent 12deg 15deg); }
.ga-timer circle { fill: none; stroke-width: 12; }
.ga-timer .ga-timer-track { stroke: color-mix(in srgb, var(--ga-glow) 14%, #fff); }
.ga-timer .ga-timer-fill { stroke: var(--ga-glow); transition: stroke 0.3s ease; }
.ga-timer.is-low .ga-timer-fill { stroke: #e11d48; }
.ga-timer-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--ga-display), sans-serif; font-weight: 800; font-style: italic; font-size: 2.6rem; color: var(--ga-glow); }
.ga-timer.is-low .ga-timer-num { color: #e11d48; }
.ga-timer.is-low .ga-timer-num { animation: ga-throb 1s infinite; }
@keyframes ga-throb { 50% { transform: scale(1.12); } }

/* Answer tiles (host + player): glossy cut-corner buttons that slide in from the sides, a shine
   sweeping across, and the answer shape in a hexagon socket. */
.ga-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; width: 100%; }
.ga-tile {
    position: relative; display: flex; align-items: center; gap: 0.9rem; min-height: 86px; padding: 0.9rem 1.2rem 1.1rem;
    border: 0; border-radius: 0; clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 48%), var(--tile); color: #fff; text-align: left;
    font-weight: 800; font-size: clamp(1rem, 2vw, 1.35rem); line-height: 1.25; cursor: pointer; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.2s ease, filter 0.2s ease;
    animation: ga-tile-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15) backwards;
}
.ga-tile:nth-child(even) { animation-name: ga-tile-in-right; }
.ga-tile::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.28) 50%, transparent 62%);
    transform: translateX(-110%); animation: ga-shine 4.5s ease-in-out 1s infinite;
}
@keyframes ga-tile-in { from { opacity: 0; transform: translateX(-60px) skewX(-14deg); } to { opacity: 1; transform: none; } }
@keyframes ga-tile-in-right { from { opacity: 0; transform: translateX(60px) skewX(-14deg); } to { opacity: 1; transform: none; } }
@keyframes ga-shine { 0% { transform: translateX(-110%); } 30%, 100% { transform: translateX(110%); } }
.ga-tile:nth-child(2) { animation-delay: 0.05s; } .ga-tile:nth-child(3) { animation-delay: 0.1s; } .ga-tile:nth-child(4) { animation-delay: 0.15s; }
.ga-tile:nth-child(5) { animation-delay: 0.2s; } .ga-tile:nth-child(6) { animation-delay: 0.25s; }
.ga-tile:nth-child(2)::after { animation-delay: 1.3s; } .ga-tile:nth-child(3)::after { animation-delay: 1.6s; } .ga-tile:nth-child(4)::after { animation-delay: 1.9s; }
@media (hover: hover) { button.ga-tile:not([disabled]):hover { filter: brightness(1.12); transform: translateY(-2px); } }
.ga-tile:active:not([disabled]) { transform: translateY(3px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.3); }
.ga-tile .ga-tile-shape {
    width: 48px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem;
    clip-path: var(--ga-hex); background: rgba(0, 0, 0, 0.24); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.ga-tile .ga-tile-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ga-tile .ga-tile-check { width: 32px; height: 32px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.85); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.ga-tile.is-selected .ga-tile-check { background: #fff; color: var(--tile); }
.ga-tile.is-selected { filter: brightness(1.1); box-shadow: inset 0 0 0 4px #fff, inset 0 -6px 0 rgba(0, 0, 0, 0.3); }
.ga-tile[disabled] { cursor: default; }
.ga-tiles.is-locked .ga-tile:not(.is-selected) { opacity: 0.35; filter: grayscale(0.4); }
.ga-tiles--host .ga-tile { cursor: default; min-height: 96px; }
.ga-tiles--tf .ga-tile { min-height: 120px; justify-content: center; font-size: 1.6rem; }

/* Reveal */
.ga-reveal { width: min(1180px, 100%); display: flex; flex-direction: column; gap: 1.1rem; }
.ga-bars { display: flex; align-items: flex-end; justify-content: center; gap: 1rem; min-height: 260px; padding: 0 1rem; }
.ga-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.4rem; width: 120px; max-width: 22%; }
.ga-bar-count { font-family: var(--ga-display), sans-serif; font-size: 1.8rem; font-weight: 700; display: flex; align-items: center; gap: 0.35rem; }
.ga-bar-fill {
    width: 100%; min-height: 14px; height: 0; transition: height 0.9s cubic-bezier(0.2, 0.9, 0.3, 1);
    clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 45%), repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 0 10px, transparent 10px 20px), var(--tile);
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35);
}
.ga-bar-label { display: flex; align-items: center; gap: 0.4rem; font-weight: 800; font-size: 0.95rem; text-align: center; max-width: 100%; }
.ga-bar-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-bar.is-wrong { opacity: 0.4; }
.ga-acc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.ga-acc-tile { padding: 1.2rem; border-radius: 0; clip-path: var(--ga-cut); text-align: center; background: #fff; box-shadow: inset 0 0 0 2px var(--ga-line), inset 0 -6px 0 rgba(0, 0, 0, 0.15); }
.ga-acc-tile strong { display: block; font-family: var(--ga-display), sans-serif; font-weight: 800; font-style: italic; font-size: 3rem; line-height: 1.05; }
.ga-acc-tile span { font-weight: 800; opacity: 0.9; }
.ga-acc-tile.is-good, .ga-acc-tile.is-mid, .ga-acc-tile.is-bad { color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.18), inset 0 3px 0 rgba(255, 255, 255, 0.3); }
.ga-acc-tile.is-good { background: #16a34a; } .ga-acc-tile.is-mid { background: #d97706; } .ga-acc-tile.is-bad { background: #e11d48; }
.ga-cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.4rem 1rem; padding: 1.5rem; min-height: 220px; }
.ga-cloud span { font-family: var(--ga-display), sans-serif; font-weight: 700; line-height: 1.1; animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }

/* Answer key (reveal + feedback) */
.ga-key { padding: 1rem 1.2rem; }
.ga-key-title { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: #64748b; margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.4rem; }
.ga-key-title i { color: #22c55e; }
.ga-key-list { display: flex; flex-direction: column; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.ga-key-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; border-radius: 12px; background: #f8fafc; font-weight: 700; font-size: 0.95rem; color: #0f2b4c; }
.ga-key-item.is-right { background: #dcfce7; color: #14532d; }
.ga-key-item.is-wrong { background: #ffe4e6; color: #881337; }
.ga-key-item .ga-key-num { width: 26px; height: 26px; border-radius: 8px; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 800; flex-shrink: 0; }
.ga-key-item .ga-key-mark { margin-left: auto; flex-shrink: 0; }
.ga-key-sentence { line-height: 2.2; font-size: 1rem; color: #0f2b4c; font-weight: 600; }
.ga-key-chip { display: inline-block; padding: 0 0.6rem; border-radius: 8px; background: #dcfce7; color: #14532d; font-weight: 800; line-height: 1.8; }
.ga-key-chip del { color: #be123c; margin-right: 0.35rem; font-weight: 700; }
.ga-key-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.6rem; }
.ga-key-group { background: #f8fafc; border-radius: 14px; padding: 0.65rem; }
.ga-key-group strong { display: block; margin-bottom: 0.4rem; font-size: 0.88rem; }
.ga-key-group span { display: inline-block; margin: 0 0.3rem 0.3rem 0; padding: 0.15rem 0.55rem; border-radius: 8px; background: #fff; font-size: 0.82rem; font-weight: 700; }

/* Leaderboard */
.ga-board { width: min(820px, 100%); display: flex; flex-direction: column; gap: 0.6rem; }
.ga-board-title { text-align: center; font-family: var(--ga-display), sans-serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 0.6rem; color: var(--ga-glow); text-shadow: 0 4px 0 #f6b21b; }
/* Scoreboard rows: white with a theme-coloured edge, like a high-score table. */
.ga-board-row {
    display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 1.1rem 0.8rem 1.3rem; border-radius: 0; clip-path: var(--ga-cut-sm);
    background: #fff; color: var(--ga-ink); font-weight: 800; font-size: 1.15rem;
    box-shadow: inset 6px 0 0 var(--ga-glow), inset 0 0 0 2px var(--ga-line), inset 0 -4px 0 var(--ga-line);
    animation: ga-slide 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.ga-board-row:nth-of-type(2) { animation-delay: 0.08s; } .ga-board-row:nth-of-type(3) { animation-delay: 0.16s; }
.ga-board-row:nth-of-type(4) { animation-delay: 0.24s; } .ga-board-row:nth-of-type(5) { animation-delay: 0.32s; }
.ga-board-row:nth-of-type(n+6) { animation-delay: 0.4s; }
.ga-board-row.is-me { background: linear-gradient(90deg, #f6b21b, #e49a00); color: #0f2b4c; box-shadow: inset 5px 0 0 #a16207, inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
@keyframes ga-slide { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
.ga-board-rank { width: 42px; height: 38px; clip-path: var(--ga-hex); display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--ga-glow) 12%, #f1f5f9); color: var(--ga-glow); font-family: var(--ga-display), sans-serif; font-style: italic; flex-shrink: 0; }
.ga-board-row.is-me .ga-board-rank { background: rgba(0, 0, 0, 0.14); color: #0f2b4c; }
/* Medal colours follow the rank (ties share a medal), not the row position. */
.ga-board-row.r1 .ga-board-rank { background: linear-gradient(180deg, #fde68a, #f59e0b); color: #fff; }
.ga-board-row.r2 .ga-board-rank { background: linear-gradient(180deg, #e2e8f0, #94a3b8); color: #fff; }
.ga-board-row.r3 .ga-board-rank { background: linear-gradient(180deg, #fdba74, #ea8a4a); color: #fff; }
.ga-board-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-board-streak { color: #ea580c; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.25rem; }
.ga-board-score { font-family: var(--ga-display), sans-serif; font-style: italic; font-size: 1.35rem; color: var(--ga-glow); }
.ga-board-row.is-me .ga-board-score { color: #0f2b4c; }

/* Podium */
.ga-podium-wrap { width: min(900px, 100%); display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.ga-podium { display: flex; align-items: flex-end; justify-content: center; gap: 1rem; width: 100%; min-height: 380px; }
.ga-podium-col { display: flex; flex-direction: column; align-items: center; width: 31%; max-width: 230px; }
.ga-podium-name { font-family: var(--ga-display), sans-serif; font-size: clamp(1.1rem, 2.2vw, 1.6rem); font-weight: 700; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-podium-score { font-weight: 800; opacity: 0.9; margin-bottom: 0.6rem; }
.ga-podium-block {
    width: 100%; display: flex; justify-content: center; padding-top: 0.8rem; clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%, 0 18px);
    font-family: var(--ga-display), sans-serif; font-size: 3.4rem; font-weight: 800; font-style: italic; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.22);
    box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.45); transform-origin: bottom; animation: ga-rise 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.ga-podium-col.r1 .ga-podium-block { height: 240px; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.12) 0 12px, transparent 12px 24px), linear-gradient(180deg, #fcd34d, #f59e0b); animation-delay: 1.2s; }
.ga-podium-col.r2 .ga-podium-block { height: 180px; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.12) 0 12px, transparent 12px 24px), linear-gradient(180deg, #e2e8f0, #94a3b8); animation-delay: 0.6s; }
.ga-podium-col.r3 .ga-podium-block { height: 130px; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.12) 0 12px, transparent 12px 24px), linear-gradient(180deg, #fdba74, #ea8a4a); animation-delay: 0.1s; }
.ga-podium-avatar { width: 68px; height: 63px; margin-bottom: 0.35rem; }
.ga-podium-col .ga-podium-name, .ga-podium-col .ga-podium-score, .ga-podium-col .ga-podium-crown, .ga-podium-col .ga-podium-avatar { animation: ga-enter 0.5s ease both; }
.ga-podium-col.r1 .ga-podium-name, .ga-podium-col.r1 .ga-podium-score, .ga-podium-col.r1 .ga-podium-crown, .ga-podium-col.r1 .ga-podium-avatar { animation-delay: 1.9s; }
.ga-podium-col.r2 .ga-podium-name, .ga-podium-col.r2 .ga-podium-score, .ga-podium-col.r2 .ga-podium-avatar { animation-delay: 1.3s; }
.ga-podium-col.r3 .ga-podium-name, .ga-podium-col.r3 .ga-podium-score, .ga-podium-col.r3 .ga-podium-avatar { animation-delay: 0.8s; }
.ga-podium-crown { color: #f59e0b; font-size: 2.2rem; margin-bottom: 0.2rem; filter: drop-shadow(0 3px 0 #b45309); }
@keyframes ga-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Host controls (fixed bottom-right; the stage keeps clear of them) */
.ga-host .ga-stage { padding-bottom: 96px; }
.ga-sound-prompt {
    position: fixed; left: 1.25rem; bottom: 1.25rem; z-index: 6;
    display: inline-flex; align-items: center; gap: 0.55rem; min-height: 50px; padding: 0 1.2rem;
    border: 0; border-radius: 0; clip-path: var(--ga-cut-sm); background: #f6b21b; color: #0f2b4c; cursor: pointer;
    font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: 1.05rem;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18); animation: ga-sound-pulse 1.6s ease-in-out infinite;
}
.ga-sound-prompt[hidden] { display: none; }
@keyframes ga-sound-pulse { 50% { transform: scale(1.06); filter: brightness(1.08); } }
.ga-countdown { opacity: 0.7; font-variant-numeric: tabular-nums; }
.ga-auto.is-on { background: #16a34a; color: #fff; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2); }
.ga-auto.is-on:hover { color: #fff; }
.ga-controls { position: fixed; right: 1.25rem; bottom: 1.25rem; display: flex; gap: 0.6rem; z-index: 5; }
.ga-host-status { position: fixed; left: 1.25rem; bottom: 1.25rem; z-index: 5; }

/* ---------- Player (phone-first) ---------- */
.ga-phone { width: min(640px, 100%); display: flex; flex-direction: column; gap: 1rem; }
.ga-phone-prompt { padding: 1.1rem 1.2rem; font-family: var(--ga-display), sans-serif; font-weight: 600; font-size: clamp(1.15rem, 4.2vw, 1.5rem); line-height: 1.3; text-align: center; }
.ga-phone-prompt img { display: block; max-width: 100%; max-height: 28vh; margin: 0.75rem auto 0; border-radius: 14px; }
.ga-type-tag { display: inline-flex; align-items: center; gap: 0.4rem; align-self: center; padding: 0.3rem 0.8rem; border-radius: 999px; background: #fff; color: var(--ga-ink); box-shadow: inset 0 0 0 2px var(--ga-line); font-weight: 800; font-size: 0.8rem; }
.ga-type-tag i { color: var(--ga-glow); }
/* Timer: a segmented energy bar that drains. */
.ga-timerbar { height: 16px; padding: 3px; clip-path: var(--ga-cut-sm); background: #fff; box-shadow: inset 0 0 0 2px var(--ga-line); overflow: hidden; }
.ga-timerbar i {
    display: block; height: 100%; width: 100%; transform-origin: left;
    background: linear-gradient(90deg, #1268b3, #3aa0f0);
    -webkit-mask: repeating-linear-gradient(90deg, #000 0 16px, transparent 16px 19px); mask: repeating-linear-gradient(90deg, #000 0 16px, transparent 16px 19px);
}
.ga-timerbar.is-low i { background: linear-gradient(90deg, #e11d48, #fb7185); }
.ga-submit { width: 100%; min-height: 58px; }
.ga-instructions { text-align: center; font-weight: 700; font-size: 0.9rem; color: var(--ga-ink-soft); }

.ga-sentence { padding: 1.1rem 1.2rem; font-size: 1.1rem; line-height: 2.6; font-weight: 600; color: #0f2b4c; }
.ga-sentence input, .ga-sentence select {
    display: inline-block; min-width: 110px; max-width: 100%; height: 42px; padding: 0 0.7rem; margin: 0 0.15rem; vertical-align: middle;
    border: 0; border-bottom: 3px solid #1b88e3; border-radius: 10px 10px 4px 4px; background: #f0f7fd; color: #0f2b4c;
    font: inherit; font-weight: 800; outline: none;
}
.ga-sentence select { cursor: pointer; padding-right: 1.8rem; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%237c3aed' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.5rem center; background-size: 14px; }
.ga-sentence input:focus, .ga-sentence select:focus { background-color: #e6f2fc; border-bottom-color: #0f2b4c; }

.ga-word { display: flex; gap: 0.6rem; }
.ga-word input { flex: 1; min-width: 0; min-height: 60px; border: 0; border-radius: 16px; padding: 0 1rem; font-size: 1.2rem; font-weight: 700; color: #0f2b4c; outline: none; box-shadow: 0 0 0 2px var(--ga-line, #e2e8f0), 0 6px 0 var(--ga-line, #e2e8f0); }

.ga-order { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.ga-order-item {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.6rem 0.6rem 0.4rem; border-radius: 14px; background: #fff; color: #0f2b4c;
    font-weight: 800; box-shadow: 0 0 0 2px var(--ga-line, #e2e8f0), 0 5px 0 var(--ga-line, #e2e8f0); touch-action: none; user-select: none;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.ga-order-item.is-dragging { transform: scale(1.03); box-shadow: 0 16px 28px rgba(0, 0, 0, 0.3); z-index: 3; position: relative; }
.ga-order-handle { width: 36px; height: 40px; display: inline-flex; align-items: center; justify-content: center; color: #7fb5ea; cursor: grab; flex-shrink: 0; }
.ga-order-num { width: 30px; height: 30px; border-radius: 9px; background: #e6f2fc; color: #1268b3; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; }
.ga-order-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ga-order-arrows { display: flex; flex-direction: column; gap: 2px; }
.ga-order-arrows button { width: 32px; height: 22px; border: 0; border-radius: 6px; background: #f1f5f9; color: #64748b; cursor: pointer; font-size: 0.7rem; }

.ga-match { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem 0.75rem; }
.ga-match-col { display: flex; flex-direction: column; gap: 0.55rem; }
.ga-match-item {
    position: relative; display: flex; align-items: center; gap: 0.5rem; min-height: 56px; padding: 0.55rem 0.7rem; border: 0; border-radius: 14px;
    background: #fff; color: #0f2b4c; font-weight: 800; font-size: 0.95rem; text-align: left; cursor: pointer; box-shadow: 0 0 0 2px var(--ga-line, #e2e8f0), 0 5px 0 var(--ga-line, #e2e8f0);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.ga-match-item .ga-match-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ga-match-item.is-active { transform: translateY(-3px); box-shadow: 0 0 0 4px #f6b21b, 0 8px 0 rgba(0, 0, 0, 0.18); }
.ga-match-item.is-paired { background: var(--tile); color: #fff; }
.ga-match-tag { width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, 0.12); display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; flex-shrink: 0; }
.ga-match-item.is-paired .ga-match-tag { background: rgba(255, 255, 255, 0.3); }

.ga-cat-pool { display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 56px; padding: 0.75rem; border-radius: 18px; background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 2px var(--ga-line); border: 2px dashed color-mix(in srgb, var(--ga-glow) 30%, transparent); }
.ga-cat-pool:empty::after { content: attr(data-empty); color: var(--ga-ink-soft); font-weight: 700; font-size: 0.9rem; margin: auto; }
.ga-chip {
    display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.55rem 0.85rem; border: 0; border-radius: 12px; background: #fff; color: #0f2b4c;
    font-weight: 800; font-size: 0.92rem; cursor: pointer; box-shadow: 0 0 0 2px var(--ga-line, #e2e8f0), 0 4px 0 var(--ga-line, #e2e8f0); user-select: none; max-width: 100%;
    transition: transform 0.12s ease, box-shadow 0.12s ease; animation: ga-pop 0.3s ease both;
}
.ga-chip.is-active { transform: translateY(-3px); box-shadow: 0 0 0 4px #f6b21b, 0 6px 0 rgba(0, 0, 0, 0.18); }
.ga-cat-buckets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.7rem; }
.ga-bucket { min-height: 120px; padding: 0.7rem; border-radius: 18px; background: #fff; box-shadow: 0 0 0 2px var(--ga-line), 0 5px 0 var(--ga-line); color: #0f2b4c; display: flex; flex-direction: column; gap: 0.5rem; cursor: pointer; border: 3px dashed transparent; transition: border-color 0.15s ease, transform 0.15s ease; }
.ga-bucket.is-target, .ga-bucket.is-over { border-color: #f6b21b; transform: scale(1.02); }
.ga-bucket-title { display: flex; align-items: center; gap: 0.45rem; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: 1.05rem; }
.ga-bucket-title i { width: 12px; height: 12px; border-radius: 4px; background: var(--tile); display: inline-block; }
.ga-bucket-items { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ga-bucket .ga-chip { background: var(--tile); color: #fff; font-size: 0.85rem; padding: 0.4rem 0.7rem; }

/* Player status screens */
.ga-status { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.9rem; padding: 1rem 0; }
.ga-status-icon { width: 120px; height: 110px; clip-path: var(--ga-hex); display: flex; align-items: center; justify-content: center; font-size: 3rem; background: var(--ga-glow); color: #fff; box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.2), inset 0 4px 0 rgba(255, 255, 255, 0.25); animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.ga-status h2 { margin: 0; font-family: var(--ga-display), sans-serif; font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 800; font-style: italic; color: var(--ga-ink); }
.ga-status p { margin: 0; color: var(--ga-ink-soft); font-weight: 600; font-size: 1.05rem; }
.ga-me-avatar { width: 104px; height: 96px; clip-path: var(--ga-hex); display: flex; align-items: center; justify-content: center; font-family: var(--ga-display), sans-serif; font-size: 2.6rem; font-weight: 800; font-style: italic; color: #fff; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.22), inset 0 3px 0 rgba(255, 255, 255, 0.3); animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }

/* Answer result: a striped "level clear" banner. */
.ga-result {
    position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 1.6rem 1.2rem 1.9rem; text-align: center; color: #fff;
    clip-path: var(--ga-cut); box-shadow: inset 0 -7px 0 rgba(0, 0, 0, 0.22), inset 0 3px 0 rgba(255, 255, 255, 0.3); animation: ga-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.ga-result::before { content: ''; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.08) 0 16px, transparent 16px 32px); }
.ga-result--correct { background: linear-gradient(135deg, #22c55e, #15803d); }
.ga-result--partial { background: linear-gradient(135deg, #f59e0b, #d97706); }
.ga-result--incorrect { background: linear-gradient(135deg, #f43f5e, #be123c); }
.ga-result--timeout { background: linear-gradient(135deg, #64748b, #334155); }
.ga-result--poll { background: linear-gradient(135deg, #4472c4, #27548a); }
.ga-result-icon { width: 84px; height: 76px; clip-path: var(--ga-hex); background: rgba(255, 255, 255, 0.24); display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.ga-result h2 { margin: 0; font-family: var(--ga-display), sans-serif; font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 800; font-style: italic; text-transform: uppercase; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.22); }
.ga-result-points { font-family: var(--ga-display), sans-serif; font-size: 1.6rem; font-weight: 800; font-style: italic; padding: 0.2rem 1.2rem; clip-path: var(--ga-cut-sm); background: rgba(0, 0, 0, 0.22); color: #f6b21b; }
.ga-result-streak { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 800; background: rgba(255, 255, 255, 0.2); padding: 0.25rem 0.75rem; border-radius: 999px; }
.ga-score-strip { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.85rem 1.1rem; clip-path: var(--ga-cut-sm); background: #fff; box-shadow: inset 6px 0 0 var(--ga-glow), inset 0 0 0 2px var(--ga-line); font-weight: 800; }
.ga-score-strip strong { font-family: var(--ga-display), sans-serif; font-style: italic; font-size: 1.4rem; color: var(--ga-glow); }

.ga-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; width: 100%; }
.ga-summary div { padding: 0.9rem; clip-path: var(--ga-cut-sm); background: #fff; text-align: center; box-shadow: inset 0 0 0 2px var(--ga-line), inset 0 -5px 0 var(--ga-line); }
.ga-summary strong { display: block; font-family: var(--ga-display), sans-serif; font-weight: 800; font-style: italic; font-size: 2rem; line-height: 1.1; color: var(--ga-glow); }
.ga-summary span { font-weight: 700; font-size: 0.85rem; opacity: 0.85; }

.ga-summary--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ga-summary--3 strong { font-size: 1.7rem; }

/* Learning path quiz: pass mark and the pass / fail result */
.ga-intro-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.ga-pill .ga-avatar { width: 28px; height: 26px; margin: -0.25rem 0 -0.25rem -0.45rem; }
.ga-pill--pass { background: #f6b21b; color: #422006; }
.ga-quiz-result { display: flex; align-items: center; gap: 0.9rem; width: 100%; padding: 0.9rem 1rem; border-radius: 20px; background: #fff; color: #0f2b4c; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.ga-quiz-result-icon { flex: 0 0 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #fff; }
.ga-quiz-result.is-pass .ga-quiz-result-icon { background: #16a34a; }
.ga-quiz-result.is-fail .ga-quiz-result-icon { background: #f97316; }
.ga-quiz-result-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; text-align: left; }
.ga-quiz-result-copy strong { font-family: var(--ga-display), sans-serif; font-size: 1.3rem; line-height: 1.2; }
.ga-quiz-result-copy span { font-weight: 600; font-size: 0.9rem; color: #64748b; }
.ga-quiz-result-score { font-family: var(--ga-display), sans-serif; font-size: 2rem; font-weight: 700; line-height: 1; }
.ga-quiz-result.is-pass .ga-quiz-result-score { color: #16a34a; }
.ga-quiz-result.is-fail .ga-quiz-result-score { color: #ea580c; }

/* ---------- Transitions ---------- */

/* Screen change: slanted colour bands slash in from alternate sides, meet, then carry on out.
   The overlay is oversized and tilted so the bands always cover the screen. */
.ga-wipe { position: fixed; inset: -50vmax; z-index: 60; display: flex; flex-direction: column; pointer-events: none; transform: rotate(-16deg); }
.ga-wipe span {
    flex: 1; background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 30%), var(--tile); transform: translateX(-101%);
    box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.2);
    animation: ga-wipe 1s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
.ga-wipe span:nth-child(even) { transform: translateX(101%); animation-name: ga-wipe-back; }
.ga-wipe span:nth-child(4n+2) { animation-delay: 0.04s; }
.ga-wipe span:nth-child(4n+3) { animation-delay: 0.08s; }
.ga-wipe span:nth-child(4n+4) { animation-delay: 0.12s; }
@keyframes ga-wipe { 0% { transform: translateX(-101%); } 42%, 58% { transform: translateX(0); } 100% { transform: translateX(101%); } }
@keyframes ga-wipe-back { 0% { transform: translateX(101%); } 42%, 58% { transform: translateX(0); } 100% { transform: translateX(-101%); } }
.ga-wipe-logo {
    position: absolute; left: 50%; top: 50%; width: 112px; height: 100px; margin: -50px 0 0 -56px; clip-path: var(--ga-hex);
    background: linear-gradient(180deg, #fff, #e2e8f0); color: var(--ga-glow); display: flex; align-items: center; justify-content: center; font-size: 2.6rem;
    animation: ga-wipe-logo 1s cubic-bezier(0.2, 0.9, 0.3, 1.3) forwards; opacity: 0;
}
/* The overlay is tilted -16deg, so the logo turns +16deg to sit level. */
@keyframes ga-wipe-logo { 0%, 20% { opacity: 0; transform: scale(0.3) rotate(-40deg); } 45%, 60% { opacity: 1; transform: scale(1) rotate(16deg); } 85%, 100% { opacity: 0; transform: scale(1.5) rotate(40deg); } }

/* Question intro: badge, the question zooming in, ring countdown, filling bar. */
.ga-intro {
    position: fixed; inset: 0; z-index: 50; overflow: hidden; padding: 1.5rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.3rem; text-align: center;
    color: var(--ga-ink, #1f2547);
    background: radial-gradient(circle at 50% 42%, #fff, transparent 60%), linear-gradient(180deg, #eaf4fd, #fff6e3);
    animation: ga-intro-in 0.35s ease both;
}
.ga-intro.is-leaving { animation: ga-intro-out 0.38s ease forwards; }
@keyframes ga-intro-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes ga-intro-out { to { opacity: 0; transform: scale(1.08); } }
.ga-intro-stripes {
    position: absolute; inset: -50%; z-index: -1; opacity: 0.16;
    background: repeating-linear-gradient(-45deg, #1b88e3 0 40px, transparent 40px 110px, #e49a00 110px 150px, transparent 150px 220px, #27548a 220px 260px, transparent 260px 330px, #4472c4 330px 370px, transparent 370px 440px);
    animation: ga-stripes 12s linear infinite;
}
@keyframes ga-stripes { to { transform: translate(440px, 440px); } }
.ga-intro-badge {
    display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1.5rem 0.8rem; clip-path: var(--ga-cut-sm);
    background: var(--ga-glow, #1b88e3); color: #fff; font-family: var(--ga-display), sans-serif; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 0.5px; font-size: clamp(1rem, 2.2vw, 1.5rem);
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.22); animation: ga-badge-drop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}
.ga-intro-badge i { color: #f6b21b; }
@keyframes ga-badge-drop { from { opacity: 0; transform: translateY(-60px) scale(0.6); } to { opacity: 1; transform: none; } }
.ga-intro-prompt {
    max-width: 1100px; font-family: var(--ga-display), sans-serif; font-weight: 700; line-height: 1.2;
    font-size: clamp(1.7rem, 4.6vw, 3.6rem); text-shadow: 0 4px 0 rgba(255, 255, 255, 0.9);
    animation: ga-prompt-zoom 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.25s both;
}
@keyframes ga-prompt-zoom { from { opacity: 0; transform: scale(0.6); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.ga-intro-ring { position: relative; width: 132px; height: 132px; animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.45s both; }
.ga-intro-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); -webkit-mask: repeating-conic-gradient(#000 0 12deg, transparent 12deg 15deg); mask: repeating-conic-gradient(#000 0 12deg, transparent 12deg 15deg); }
.ga-intro-ring circle { fill: none; stroke-width: 14; }
.ga-intro-track { stroke: color-mix(in srgb, var(--ga-glow, #1b88e3) 14%, #fff); }
.ga-intro-arc { stroke: var(--ga-glow, #1b88e3); stroke-dashoffset: 0; animation: ga-ring-drain linear forwards; }
@keyframes ga-ring-drain { to { stroke-dashoffset: var(--ga-circ); } }
.ga-intro-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: 3.6rem; color: var(--ga-glow, #1b88e3); font-weight: 800; font-style: italic; }
.ga-intro-num.is-pop { animation: ga-num-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.5); }
@keyframes ga-num-pop { from { transform: scale(1.8); opacity: 0; } to { transform: none; opacity: 1; } }
.ga-intro-label { font-weight: 800; text-transform: uppercase; letter-spacing: 3px; color: var(--ga-ink-soft, #5b6385); }
.ga-intro-bar { width: min(560px, 80vw); height: 16px; padding: 3px; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); background: #fff; box-shadow: inset 0 0 0 2px var(--ga-line, #e2e8f0); overflow: hidden; }
.ga-intro-bar i {
    display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #e49a00, #f6b21b); transform-origin: left; animation: ga-bar-fill linear forwards; transform: scaleX(0);
    -webkit-mask: repeating-linear-gradient(90deg, #000 0 16px, transparent 16px 19px); mask: repeating-linear-gradient(90deg, #000 0 16px, transparent 16px 19px);
}
@keyframes ga-bar-fill { to { transform: scaleX(1); } }
.ga-intro--compact { gap: 1rem; }
.ga-intro--compact .ga-intro-prompt { font-size: clamp(1.4rem, 6vw, 2.2rem); }
.ga-intro--compact .ga-intro-ring { width: 108px; height: 108px; }
.ga-intro--compact .ga-intro-num { font-size: 3rem; }

/* Leaderboard: rows glide from their old rank to the new one. */
.ga-board-row.is-flip { animation: none; transition: transform 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) 0.35s; }
.ga-board-row.is-rising { z-index: 2; position: relative; box-shadow: inset 0 0 0 3px #f6b21b, inset 5px 0 0 #f6b21b; }

/* Public / embedded play */
.ga-join-name { display: flex; flex-direction: column; gap: 0.75rem; }
.ga-join-name input {
    min-height: 60px; border: 0; border-radius: 16px; padding: 0 1.1rem; text-align: center;
    font-family: var(--ga-display), sans-serif; font-size: 1.4rem; font-weight: 600; color: #0f2b4c;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2); outline: none;
}
.ga-join-name input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ga-glow) 35%, transparent), 0 6px 0 var(--ga-line); }
.ga-embed .ga-top { padding: 0.55rem 0.85rem; }
.ga-embed .ga-brand-icon { width: 32px; height: 32px; border-radius: 10px; }

.ga-toast { position: fixed; left: 50%; top: 1rem; transform: translateX(-50%); z-index: 50; padding: 0.6rem 1rem; border-radius: 12px; background: #0f2b4c; color: #fff; font-weight: 700; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); display: none; }
.ga-toast.is-on { display: block; animation: ga-enter 0.25s ease; }
.ga-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

@media (max-width: 860px) {
    .ga-lobby { grid-template-columns: 1fr; }
    .ga-q-middle { grid-template-columns: 90px minmax(0, 1fr) 90px; }
    .ga-timer { width: 86px; height: 86px; }
    .ga-timer-num { font-size: 1.8rem; }
    .ga-counter strong { font-size: 2.2rem; }
    .ga-acc { grid-template-columns: 1fr; }
    .ga-bars { gap: 0.5rem; }
}
@media (max-width: 560px) {
    .ga-top { padding: 0.7rem 0.85rem; }
    .ga-stage { padding: 0.5rem 0.85rem 1.2rem; justify-content: flex-start; }
    .ga-tile { min-height: 74px; padding: 0.7rem 0.8rem; gap: 0.6rem; }
    .ga-tile .ga-tile-shape { width: 38px; height: 34px; font-size: 1.05rem; }
    .ga-tiles--tf .ga-tile { min-height: 110px; }
    .ga-match { gap: 0.45rem; }
    .ga-match-item { font-size: 0.86rem; min-height: 52px; padding: 0.5rem; }
    .ga-podium { min-height: 300px; gap: 0.5rem; }
    .ga-podium-col.r1 .ga-podium-block { height: 180px; }
    .ga-podium-col.r2 .ga-podium-block { height: 130px; }
    .ga-podium-col.r3 .ga-podium-block { height: 96px; }
    .ga-podium-block { font-size: 2.4rem; }
}
@media (prefers-reduced-motion: reduce) {
    .ga-body *, .gm-page * { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Tap the picture, Closest guess, Team battle
   ========================================================================== */

/* ---------- Management: host dialog ---------- */
.gm-host-card { width: min(680px, 100%); }
.gm-host-game { margin: -0.5rem 0 1rem; color: var(--gm-muted, #64748b); font-weight: 700; font-size: 0.9rem; }
.gm-host-game:empty { display: none; }
.gm-host-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.gm-host-mode, .gm-host-assign-opt, .gm-host-count label { position: relative; margin: 0; cursor: pointer; }
.gm-host-mode input, .gm-host-assign-opt input, .gm-host-count input { position: absolute; opacity: 0; pointer-events: none; }
.gm-host-mode-card { display: flex; flex-direction: column; gap: 0.35rem; height: 100%; padding: 1rem; border-radius: 16px; border: 2px solid #e2e8f0; background: #f8fafc; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.gm-host-mode-card strong { font-size: 1rem; color: #0f172a; }
.gm-host-mode-card small { color: #64748b; font-weight: 600; font-size: 0.8rem; line-height: 1.45; }
.gm-host-mode-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #3b63e9, #6d5bf5); margin-bottom: 0.2rem; }
.gm-host-mode-icon--teams { background: linear-gradient(135deg, #1268b3, #b87400 55%, #1f3e78); }
.gm-host-mode input:checked + .gm-host-mode-card { border-color: #3b63e9; background: #fff; box-shadow: 0 10px 24px rgba(59, 99, 233, 0.16); }
.gm-host-mode input:focus-visible + .gm-host-mode-card, .gm-host-assign-opt input:focus-visible + span, .gm-host-count input:focus-visible + span { outline: 2px solid #3b63e9; outline-offset: 2px; }
.gm-host-teams { padding: 1rem; border-radius: 16px; background: #f8fafc; border: 1px solid #e8eef6; margin-bottom: 0.5rem; }
.gm-host-teams[hidden], .gm-host-teams .gm-field[hidden] { display: none; }
.gm-host-teams .gm-field:last-child { margin-bottom: 0; }
.gm-host-assign { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.gm-host-assign-opt span { display: flex; flex-direction: column; gap: 0.2rem; height: 100%; padding: 0.7rem 0.75rem; border-radius: 12px; border: 1.5px solid #e2e8f0; background: #fff; }
.gm-host-assign-opt i { color: #94a3b8; margin-bottom: 0.15rem; }
.gm-host-assign-opt strong { font-size: 0.86rem; color: #0f172a; }
.gm-host-assign-opt small { font-size: 0.74rem; color: #64748b; font-weight: 600; line-height: 1.4; }
.gm-host-assign-opt input:checked + span { border-color: #3b63e9; background: #eef3ff; }
.gm-host-assign-opt input:checked + span i { color: #3b63e9; }
.gm-host-count { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.gm-host-count label > span { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.8rem; border-radius: 12px; border: 1.5px solid #e2e8f0; background: #fff; font-weight: 800; font-size: 0.9rem; color: #334155; }
.gm-host-count input:checked + span { border-color: #3b63e9; background: #eef3ff; color: #1e3a8a; }
.gm-host-dots { display: inline-flex; gap: 2px; }
.gm-host-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--tile); }

/* ---------- Management: results ---------- */
.gm-team-tag { display: inline-block; margin-left: 0.4rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--tile); color: #fff; font-size: 0.7rem; font-weight: 800; vertical-align: middle; }
.gm-teams { display: flex; flex-direction: column; gap: 0.6rem; }
.gm-team-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.75rem; border-radius: 14px; background: #f8fafc; border-left: 5px solid var(--tile); }
.gm-team-main { flex: 1; min-width: 0; }
.gm-team-line { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.88rem; }
.gm-team-line span { font-weight: 800; color: #0f172a; white-space: nowrap; }
.gm-team-bar { height: 8px; border-radius: 999px; background: #e8eef6; overflow: hidden; margin: 0.35rem 0 0.25rem; }
.gm-team-bar i { display: block; height: 100%; border-radius: 999px; background: var(--tile); }
.gm-team-main small { color: #64748b; font-weight: 600; font-size: 0.74rem; }
.gm-taps { position: relative; border-radius: 12px; overflow: hidden; background: #f1f5f9; line-height: 0; }
.gm-taps img { width: 100%; display: block; }
.gm-taps-zone { position: absolute; border: 2px solid #22c55e; background: rgba(34, 197, 94, 0.18); border-radius: 6px; }
.gm-taps i { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #e11d48; box-shadow: 0 0 0 2px #fff; }
.gm-taps i.is-hit { background: #16a34a; }
.gm-numbers { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 70px; padding: 0 1px; border-bottom: 2px solid #cbd5e1; }
.gm-numbers i { flex: 1; background: #a5b4fc; border-radius: 3px 3px 0 0; }
.gm-numbers-answer { position: absolute; top: 0; bottom: -2px; width: 3px; margin-left: -1px; background: #16a34a; border-radius: 2px; }
.gm-numbers-scale { display: flex; justify-content: space-between; font-size: 0.74rem; color: #94a3b8; font-weight: 700; margin-top: 0.25rem; }

/* ---------- Builder: tap the picture ---------- */
.gm-dropzone--hotspot { width: 100%; min-height: 160px; flex-direction: column; border-width: 2px; }
.gm-dropzone--hotspot strong { font-size: 0.95rem; }
.gm-hotspot-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.gm-hotspot-wrap { display: flex; justify-content: center; margin-bottom: 1rem; padding: 0.75rem; border-radius: 16px; background: #0f172a; }
.gm-hotspot { position: relative; display: inline-block; line-height: 0; cursor: crosshair; touch-action: none; user-select: none; }
.gm-hotspot.is-full { cursor: default; }
.gm-hotspot img { max-width: 100%; max-height: 460px; display: block; border-radius: 8px; pointer-events: none; }
.gm-hotspot-zone { position: absolute; border: 3px solid #22c55e; background: rgba(34, 197, 94, 0.25); border-radius: 8px; cursor: move; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7); }
.gm-hotspot-zone span { position: absolute; top: -12px; left: -12px; width: 24px; height: 24px; border-radius: 50%; background: #22c55e; color: #fff; font-size: 0.75rem; font-weight: 800; line-height: 24px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.gm-hotspot-list { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.gm-hotspot-chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.25rem 0.3rem 0.25rem 0.4rem; border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; font-weight: 700; font-size: 0.82rem; color: #14532d; }
.gm-hotspot-chip b { width: 22px; height: 22px; border-radius: 50%; background: #22c55e; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.72rem; }
.gm-hotspot-chip .gm-icon-btn { width: 28px; height: 28px; }

/* ---------- Builder: closest guess ---------- */
.gm-slider-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.gm-slider-preview { margin-top: 1.4rem; padding: 2.6rem 1.2rem 0.8rem; border-radius: 14px; background: #f8fafc; border: 1px solid #eef2f7; }
.gm-slider-preview:empty { display: none; }
.gm-slider-track { position: relative; height: 12px; border-radius: 999px; background: #e2e8f0; }
.gm-slider-band { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: rgba(34, 197, 94, 0.35); }
.gm-slider-flag { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px #fff, 0 4px 10px rgba(15, 23, 42, 0.2); }
.gm-slider-flag b { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 0.15rem 0.55rem; border-radius: 8px; background: #16a34a; color: #fff; font-size: 0.78rem; display: inline-flex; gap: 0.35rem; align-items: center; }
.gm-slider-scale { display: flex; justify-content: space-between; margin-top: 0.6rem; font-size: 0.78rem; font-weight: 700; color: #64748b; }

@media (max-width: 767px) {
    .gm-host-modes, .gm-host-assign { grid-template-columns: 1fr; }
    .gm-slider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Arena: tap the picture ---------- */
.ga-hotspot-wrap { display: flex; justify-content: center; }
.ga-hotspot { position: relative; display: inline-block; line-height: 0; border-radius: 18px; overflow: hidden; cursor: crosshair; touch-action: manipulation; user-select: none; -webkit-user-select: none; box-shadow: 0 0 0 4px #fff, 0 14px 30px rgba(0, 0, 0, 0.25); background: #fff; outline: none; }
.ga-hotspot:focus-visible { box-shadow: 0 0 0 4px #f6b21b, 0 14px 30px rgba(0, 0, 0, 0.25); }
.ga-hotspot img { display: block; max-width: 100%; max-height: 52vh; pointer-events: none; }
.is-locked .ga-hotspot { cursor: default; }
.ga-pin-marker { position: absolute; width: 0; height: 0; z-index: 2; pointer-events: none; }
.ga-pin-marker[hidden] { display: none; }
.ga-pin-marker i { position: absolute; left: -15px; bottom: -3px; font-size: 34px; color: #dc2626; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.3)); }
.ga-pin-marker.is-drop i { animation: ga-pin-drop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.ga-pin-marker.is-mine i { color: #1b88e3; font-size: 30px; left: -13px; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 3px 0 rgba(0, 0, 0, 0.3)); }
@keyframes ga-pin-drop { from { transform: translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.ga-q-media--big img { max-height: 46vh; }
.ga-tapmap-wrap { display: flex; justify-content: center; }
.ga-tapmap { position: relative; display: inline-block; line-height: 0; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 0 0 4px #fff, 0 14px 30px rgba(0, 0, 0, 0.25); }
.ga-tapmap img { display: block; max-width: 100%; max-height: 48vh; }
.ga-tapmap-wrap--key .ga-tapmap { box-shadow: none; border-radius: 12px; }
.ga-tapmap-wrap--key .ga-tapmap img { max-height: 34vh; }
.ga-zone { position: absolute; border: 4px solid #22c55e; border-radius: 10px; background: rgba(34, 197, 94, 0.22); animation: ga-pop 0.5s ease both; }
.ga-tap { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(0, 0, 0, 0.35); animation: ga-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.5) both; }
.ga-tap.is-hit { background: #22c55e; }
.ga-acc--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Arena: closest guess ---------- */
.ga-slider { padding: 1.2rem 1.2rem 1rem; display: flex; flex-direction: column; gap: 1rem; }
.ga-slider-value { text-align: center; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: clamp(2.4rem, 11vw, 3.6rem); line-height: 1; color: #0f2b4c; font-variant-numeric: tabular-nums; }
.ga-slider-row { display: flex; align-items: center; gap: 0.7rem; }
.ga-slider-nudge { flex-shrink: 0; width: 48px; height: 48px; border: 0; border-radius: 14px; background: #e6f2fc; color: #1268b3; font-size: 1rem; cursor: pointer; box-shadow: 0 4px 0 #b9d8f5; }
.ga-slider-nudge:active { transform: translateY(3px); box-shadow: 0 1px 0 #b9d8f5; }
.ga-slider input[type="range"] {
    --pct: 50%;
    flex: 1; min-width: 0; height: 18px; margin: 0; border-radius: 999px; outline: none; cursor: pointer;
    -webkit-appearance: none; appearance: none;
    background: linear-gradient(90deg, #1b88e3 0, #1b88e3 var(--pct), #e2e8f0 var(--pct), #e2e8f0 100%);
}
.ga-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 6px solid #1b88e3; box-shadow: 0 4px 10px rgba(76, 29, 149, 0.35); }
.ga-slider input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 6px solid #1b88e3; box-shadow: 0 4px 10px rgba(76, 29, 149, 0.35); }
.ga-slider input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px #f6b21b; }
.ga-slider-scale { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; font-weight: 800; font-size: 0.85rem; color: #64748b; }
.ga-guess-card { padding: 3.2rem 1.4rem 1rem; }
.ga-guess { position: relative; height: 180px; border-bottom: 4px solid #cbd5e1; }
.ga-guess-bins { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 3px; }
.ga-guess-bins i { flex: 1; height: 0; border-radius: 6px 6px 0 0; background: #4472c4; transition: height 0.9s cubic-bezier(0.2, 0.9, 0.3, 1); }
.ga-guess-band { position: absolute; top: 0; bottom: 0; background: rgba(34, 197, 94, 0.16); border-left: 2px dashed rgba(22, 163, 74, 0.5); border-right: 2px dashed rgba(22, 163, 74, 0.5); }
.ga-guess-flag { position: absolute; top: 0; bottom: -4px; width: 4px; margin-left: -2px; background: #16a34a; border-radius: 2px; z-index: 2; animation: ga-enter 0.5s ease 0.6s both; }
.ga-guess-flag b { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -6px); white-space: nowrap; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.8rem; border-radius: 10px; background: #16a34a; color: #fff; font-family: var(--ga-display), sans-serif; font-size: 1.15rem; }
.ga-guess-avg strong { color: #0f2b4c; }
.ga-key-line { position: relative; height: 12px; margin: 1.4rem 0.6rem 0.9rem; border-radius: 999px; background: #e2e8f0; }
.ga-key-band { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: rgba(34, 197, 94, 0.35); }
.ga-key-dot { position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px #fff, 0 3px 8px rgba(0, 0, 0, 0.25); }
.ga-key-dot.is-mine { background: #1b88e3; width: 16px; height: 16px; margin: -8px 0 0 -8px; }
.ga-key-values { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-weight: 800; color: #0f2b4c; }
.ga-key-values .is-right { color: #15803d; display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--ga-display), sans-serif; font-size: 1.25rem; }
.ga-key-values .is-mine { color: #1268b3; }

/* ---------- Arena: teams ---------- */
.ga-team-chip, .ga-team-badge, .ga-team-option-name, .ga-lobby-team-name { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 0; }
.ga-team-chip { padding: 0.25rem 0.75rem 0.25rem 0.55rem; border-radius: 999px; background: var(--tile); color: #fff; font-weight: 800; font-size: 0.9rem; }
.ga-team-chip span, .ga-team-option-name span, .ga-lobby-team-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-team-badge { padding: 0.55rem 1.2rem 0.55rem 0.9rem; border-radius: 16px; background: var(--tile); color: #fff; font-family: var(--ga-display), sans-serif; font-size: 1.5rem; font-weight: 700; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.22); animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.ga-my-team { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.ga-my-team small { font-weight: 800; text-transform: uppercase; letter-spacing: 1px; opacity: 0.85; }
.ga-team-picker { width: 100%; display: flex; flex-direction: column; gap: 0.6rem; }
.ga-team-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.ga-team-option { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; min-height: 74px; padding: 0.75rem 0.9rem; border: 0; border-radius: 16px; background: var(--tile); color: #fff; cursor: pointer; text-align: left; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.2s; }
.ga-team-option-name { font-family: var(--ga-display), sans-serif; font-size: 1.15rem; font-weight: 700; max-width: calc(100% - 30px); }
.ga-team-option small { font-weight: 700; opacity: 0.85; }
.ga-team-option:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.ga-team-pick:has(.is-selected) .ga-team-option:not(.is-selected) { opacity: 0.72; }
.ga-team-option.is-selected { outline: 4px solid #fff; outline-offset: -4px; }
.ga-team-option.is-selected::after { content: "\2713"; position: absolute; top: 10px; right: 12px; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--tile); font-weight: 900; display: flex; align-items: center; justify-content: center; }
.ga-result-team { display: inline-flex; }
.ga-result-team .ga-team-chip { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85); }
.ga-team-result { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; width: 100%; padding: 1rem; border-radius: 20px; background: rgba(0, 0, 0, 0.2); text-align: center; animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.ga-team-result strong { font-family: var(--ga-display), sans-serif; font-size: 1.5rem; }
.ga-team-result span { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 0.3rem; font-weight: 700; }
.ga-team-result.is-winner { background: #f6b21b; color: #422006; }
.ga-board-title--sm { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.2rem; }

.ga-race { display: flex; flex-direction: column; gap: 0.7rem; width: 100%; }
.ga-race-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.8rem 1rem; border-radius: 18px; background: #fff; color: #0f2b4c; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18); animation: ga-slide 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.ga-race-row.is-mine { box-shadow: 0 0 0 4px #f6b21b, 0 6px 0 rgba(0, 0, 0, 0.18); }
.ga-race-rank { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--tile); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--ga-display), sans-serif; font-size: 1.3rem; font-weight: 700; }
.ga-race-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.ga-race-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.ga-race-name { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 0; font-weight: 800; font-size: 1.15rem; }
.ga-race-name i { color: var(--tile); }
.ga-race-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-race-head small { color: #64748b; font-weight: 700; white-space: nowrap; }
.ga-race-track { height: 16px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.ga-race-track i { display: block; height: 100%; border-radius: 999px; background: var(--tile); transition: width 1.1s cubic-bezier(0.2, 0.9, 0.3, 1); }
.ga-race-score { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; min-width: 70px; }
.ga-race-score strong { font-family: var(--ga-display), sans-serif; font-size: 1.5rem; line-height: 1.05; }
.ga-race-score small { color: #64748b; font-weight: 700; font-size: 0.75rem; }
.ga-race--compact .ga-race-row { padding: 0.6rem 0.75rem; gap: 0.6rem; }
.ga-race--compact .ga-race-rank { width: 32px; height: 32px; font-size: 1.05rem; }
.ga-race--compact .ga-race-name { font-size: 1rem; }
.ga-race--compact .ga-race-track { height: 10px; }
.ga-race--compact .ga-race-score strong { font-size: 1.2rem; }
.ga-team-board { width: min(1180px, 100%); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.ga-team-board .ga-board { width: 100%; }
.ga-team-board .ga-board-row { font-size: 1rem; padding: 0.6rem 0.85rem; }

.ga-players.ga-lobby-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-rows: max-content; gap: 0.7rem; align-content: start; }
.ga-lobby-team { display: flex; flex-direction: column; border-radius: 16px; background: rgba(255, 255, 255, 0.95); color: #0f2b4c; overflow: hidden; }
.ga-lobby-team-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.55rem 0.8rem; background: var(--tile); color: #fff; }
.ga-lobby-team-name { font-family: var(--ga-display), sans-serif; font-size: 1.1rem; font-weight: 700; }
.ga-lobby-team-head strong { font-family: var(--ga-display), sans-serif; font-size: 1.3rem; }
.ga-lobby-team--waiting .ga-lobby-team-head { background: rgba(30, 27, 75, 0.75); }
.ga-lobby-team-players { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.55rem 0.6rem; min-height: 48px; }
.ga-lobby-name { display: flex; align-items: center; gap: 0.45rem; font-weight: 800; font-size: 0.92rem; min-width: 0; }
.ga-lobby-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-lobby-name .ga-avatar { width: 30px; height: 28px; font-size: 0.66rem; }
.ga-lobby-name.is-new { animation: ga-pop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4); }

.ga-podium-col--team .ga-podium-block { background: var(--tile) !important; }
.ga-mvp { display: inline-flex; align-items: center; gap: 0.7rem; padding: 0.6rem 1.2rem 0.6rem 0.6rem; border-radius: 999px; background: #fff; color: #0f2b4c; font-weight: 800; font-size: 1.1rem; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2); animation: ga-enter 0.5s ease 2.3s both; }
.ga-mvp-tag { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; border-radius: 999px; background: #f6b21b; color: #422006; font-family: var(--ga-display), sans-serif; }

@media (max-width: 860px) {
    .ga-team-board { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .ga-hotspot img { max-height: 46vh; }
    .ga-guess { height: 140px; }
    .ga-guess-flag b { font-size: 0.95rem; }
    .ga-race-row { padding: 0.6rem 0.7rem; gap: 0.6rem; }
}

/* ==========================================================================
   Survival and Respond to the customer
   ========================================================================== */

/* ---------- Management ---------- */
.gm-host-card { width: min(780px, 100%); }
.gm-host-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gm-host-mode-icon--survival { background: linear-gradient(135deg, #e11d48, #f97316); }
.gm-host-hearts { display: inline-flex; gap: 2px; color: #e11d48; font-size: 0.78rem; }
.gm-survival-tag { display: inline-block; margin-left: 0.4rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 0.7rem; font-weight: 800; vertical-align: middle; }
.gm-survival-tag.is-alive { background: #ffe4e6; color: #be123c; }
.gm-responses { margin-top: 0.4rem; }
.gm-responses summary { cursor: pointer; font-weight: 800; font-size: 0.8rem; color: var(--gm-blue, #3b63e9); }
.gm-response { position: relative; margin-top: 0.5rem; padding: 0.55rem 0.7rem 0.55rem 3.4rem; border-radius: 10px; background: #f8fafc; border: 1px solid #eef2f7; }
.gm-response-score { position: absolute; left: 0.6rem; top: 0.6rem; font-weight: 800; font-size: 0.8rem; color: #15803d; }
.gm-response p { margin: 0; font-size: 0.82rem; color: #334155; white-space: pre-line; }
.gm-response small { display: block; margin-top: 0.3rem; color: #64748b; }
@media (max-width: 767px) {
    .gm-host-modes { grid-template-columns: 1fr; }
}

/* ---------- Arena: respond to the customer ---------- */
.ga-response { padding: 0.9rem; display: flex; flex-direction: column; gap: 0.35rem; }
.ga-response-input { width: 100%; min-height: 150px; resize: vertical; border: 0; border-radius: 14px; padding: 0.85rem 1rem; background: #f0f7fd; color: #0f2b4c; font: inherit; font-size: 1.05rem; font-weight: 600; line-height: 1.45; outline: none; box-shadow: inset 0 0 0 2px #d3e7fa; }
.ga-response-input:focus { box-shadow: inset 0 0 0 3px #1b88e3; background: #fff; }
.ga-response-input[disabled] { opacity: 0.7; }
.ga-response-count { align-self: flex-end; font-size: 0.78rem; font-weight: 700; color: #94a3b8; }
.ga-coach { display: flex; gap: 0.7rem; align-items: flex-start; margin-bottom: 0.7rem; padding: 0.75rem 0.85rem; border-radius: 14px; background: #f0f7fd; color: #3b0764; }
.ga-coach > i { margin-top: 0.15rem; color: #1b88e3; font-size: 1.1rem; }
.ga-coach strong { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.6px; color: #1b88e3; }
.ga-coach span { font-weight: 600; line-height: 1.45; }
.ga-response-quote { margin-top: 0.7rem; padding: 0.6rem 0.8rem; border-left: 4px solid #cbd5e1; border-radius: 6px; background: #f8fafc; }
.ga-response-quote.is-model { border-left-color: #22c55e; background: #f0fdf4; }
.ga-response-quote small { display: block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; }
.ga-response-quote p { margin: 0.2rem 0 0; font-weight: 600; color: #0f2b4c; white-space: pre-line; line-height: 1.45; }
.ga-coverage { padding: 1rem 1.3rem; display: flex; flex-direction: column; gap: 0.7rem; }
.ga-coverage-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; font-weight: 800; font-size: clamp(0.95rem, 1.6vw, 1.2rem); color: #0f2b4c; }
.ga-coverage-text { overflow-wrap: anywhere; }
.ga-coverage-bar { height: 18px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.ga-coverage-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #22c55e, #16a34a); transition: width 1s cubic-bezier(0.2, 0.9, 0.3, 1); }
.ga-model-answer { margin: 0; font-size: 1.1rem; font-weight: 600; color: #0f2b4c; line-height: 1.5; white-space: pre-line; }
.ga-marking { align-self: center; display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.5rem 1.1rem; border-radius: 999px; background: rgba(0, 0, 0, 0.22); font-weight: 800; }
.ga-marking[hidden] { display: none; }
.ga-status-icon--think { background: rgba(124, 58, 237, 0.45); animation: ga-throb 1.4s infinite; }

/* ---------- Arena: survival ---------- */
.ga-hearts { display: inline-flex; gap: 3px; color: #fb7185; }
.ga-type-tag .ga-hearts { margin-left: 0.3rem; color: #fecdd3; }
.ga-board-row .ga-hearts { font-size: 0.9rem; color: #e11d48; }
.ga-survival-badge { font-size: 1.8rem; }
.ga-survival-badge .ga-hearts { gap: 6px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.2)); }
.ga-survival-strip { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.75rem 1.1rem; border-radius: 18px; background: rgba(255, 255, 255, 0.95); color: #0f2b4c; font-weight: 800; animation: ga-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) 0.3s both; }
.ga-survival-strip .ga-hearts { font-size: 1.3rem; color: #e11d48; }
.ga-survival-strip.is-hit { box-shadow: 0 0 0 3px #fb7185; }
.ga-survival-strip.is-hit .ga-hearts i:last-child { animation: ga-heart-break 0.8s ease 0.7s both; }
.ga-survival-strip.is-out { background: #0f2b4c; color: #fff; }
@keyframes ga-heart-break { 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
.ga-status-icon--out { background: rgba(15, 23, 42, 0.55); }
.ga-board-row.is-out { opacity: 0.6; }
.ga-board-out { font-size: 0.8rem; font-weight: 800; color: #64748b; background: #f1f5f9; padding: 0.15rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.ga-counter-sub { display: block; margin-top: 0.4rem; font-size: 0.85rem; font-weight: 800; opacity: 0.9; }
.ga-knockout { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem; padding: 0.8rem 1.2rem; border-radius: 18px; background: rgba(34, 197, 94, 0.9); font-weight: 800; animation: ga-pop 0.45s ease both; }
.ga-knockout.has-out { background: rgba(15, 23, 42, 0.8); }
.ga-knockout strong { font-family: var(--ga-display), sans-serif; font-size: 1.35rem; }
.ga-knockout-names { flex: 1; min-width: 0; opacity: 0.9; }
.ga-knockout-left { margin-left: auto; padding: 0.25rem 0.75rem; border-radius: 999px; background: rgba(255, 255, 255, 0.2); white-space: nowrap; }
.ga-standing-count { display: inline-block; padding: 0 0.7rem; border-radius: 14px; background: rgba(255, 255, 255, 0.2); font-size: 0.7em; vertical-align: middle; }
.ga-standing { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.ga-standing-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem 0.5rem 0.5rem; border-radius: 999px; background: #fff; color: #0f2b4c; font-weight: 800; font-size: 1.05rem; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18); animation: ga-pop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }
.ga-standing-chip .ga-hearts { color: #e11d48; font-size: 0.85rem; }

@media (max-width: 560px) {
    .ga-coverage-row { grid-template-columns: 1fr auto; }
    .ga-coverage-bar { grid-column: 1 / -1; grid-row: 2; }
    .ga-knockout-left { margin-left: 0; }
}

/* ==========================================================================
   Drag onto the picture
   ========================================================================== */

/* ---------- Builder ---------- */
.gm-labelboard.is-placing { cursor: crosshair; }
.gm-labelboard:not(.is-placing) { cursor: default; }
.gm-label-pin { position: absolute; display: flex; align-items: center; gap: 0.3rem; transform: translate(-14px, -14px); padding: 2px 9px 2px 2px; border-radius: 999px; background: #fff; color: #0f172a; font-size: 0.78rem; font-weight: 800; line-height: 1; white-space: nowrap; max-width: 190px; cursor: move; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35); }
.gm-label-pin b { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: #7c3aed; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; }
.gm-label-pin span { overflow: hidden; text-overflow: ellipsis; }
.gm-label-pin.is-active { box-shadow: 0 0 0 3px #fde047, 0 2px 8px rgba(15, 23, 42, 0.35); }
.gm-label-row.is-picking { box-shadow: inset 0 0 0 2px #7c3aed; background: #faf5ff; }
.gm-label-todo { flex-shrink: 0; color: #b45309; font-weight: 700; font-size: 0.74rem; white-space: nowrap; }
.gm-label-spot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #7c3aed; color: #fff; font-size: 0.7rem; font-weight: 800; line-height: 22px; text-align: center; box-shadow: 0 0 0 2px #fff; }
@media (max-width: 575px) {
    .gm-label-todo { display: none; }
}

/* ---------- Arena ---------- */
.ga-labelmap-wrap { display: flex; justify-content: center; }
.ga-labelmap { position: relative; display: inline-block; line-height: 0; border-radius: 18px; overflow: visible; background: #fff; box-shadow: 0 0 0 4px #fff, 0 14px 30px rgba(0, 0, 0, 0.25); }
.ga-labelmap img { display: block; max-width: 100%; max-height: 48vh; border-radius: 16px; }
.ga-spot { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 0.3rem; padding: 0; border: 0; background: none; cursor: pointer; line-height: 1; font: inherit; z-index: 1; }
.ga-spot b { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: #1268b3; font-family: var(--ga-display), sans-serif; font-size: 1.05rem; box-shadow: 0 0 0 3px #1b88e3, 0 4px 10px rgba(0, 0, 0, 0.3); }
.ga-spot.is-target b { animation: ga-throb 1s infinite; box-shadow: 0 0 0 3px #f6b21b, 0 4px 10px rgba(0, 0, 0, 0.3); }
.ga-spot.is-over b { transform: scale(1.2); }
.ga-spot.is-filled b { background: #1b88e3; color: #fff; }
.ga-spot-label { position: absolute; left: 50%; top: calc(100% + 4px); transform: translateX(-50%); padding: 0.25rem 0.55rem; line-height: 1.25; border-radius: 9px; background: #0f2b4c; color: #fff; font-size: 0.78rem; font-weight: 800; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3); }
.ga-spot-label:empty { display: none; }
.ga-spot-label small { opacity: 0.75; font-weight: 700; }
.ga-spot[disabled] { cursor: default; }
.ga-spot--key { cursor: default; }
.ga-spot--key.is-right b { background: #16a34a; color: #fff; box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(0, 0, 0, 0.3); }
.ga-spot--key.is-right .ga-spot-label { background: #15803d; }
.ga-spot--key.is-wrong b { background: #e11d48; color: #fff; box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(0, 0, 0, 0.3); }
.ga-spot--key.is-wrong .ga-spot-label { background: #be123c; }
.ga-label-pool { justify-content: center; }
.ga-label-pool .ga-chip { font-size: 1rem; }
.ga-label-host { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; padding-bottom: 0.4rem; }
.ga-label-host .ga-tapmap img { max-height: 40vh; }
.ga-label-host-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.ga-label-host-chips .ga-chip { cursor: default; }
.ga-tapmap .ga-spot-label { line-height: 1.2; }
@media (max-width: 560px) {
    .ga-spot b { width: 28px; height: 28px; font-size: 0.9rem; }
    .ga-spot-label { font-size: 0.7rem; max-width: 110px; }
}
.ga-tapmap:has(.ga-spot) { overflow: visible; }
.ga-tapmap:has(.ga-spot) img { border-radius: 14px; }

/* ------------------------------------------------------------------ results & next steps */

/* Builder: levels and topic recommendations */
.gm-outcomes { margin-top: 1.25rem; }
.gm-outcomes-intro { margin: -0.25rem 0 1rem; }
.gm-outcomes-sub { display: flex; align-items: center; gap: 0.5rem; margin: 1.1rem 0 0.7rem; font-size: 1rem; font-weight: 800; color: var(--gm-ink); }
.gm-outcomes-sub i { color: var(--gm-blue); }
#gbLevels > .gm-outcomes-sub { margin-top: 0; }
.gm-outcomes-empty { padding: 1rem 1.1rem; border: 1.5px dashed #cbd5e1; border-radius: 16px; background: var(--gm-soft); }
.gm-outcomes-empty p { margin: 0 0 0.75rem; color: var(--gm-muted); font-weight: 600; }
.gm-outcomes-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.gm-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.85rem; margin-bottom: 0.75rem; }
.gm-level { padding: 0.9rem 1rem 0.4rem; border: 1px solid var(--gm-line); border-radius: 16px; background: #fff; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04); }
.gm-level.has-error { border-color: #fca5a5; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }
.gm-level-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.gm-level-head .gm-icon-btn { margin-left: auto; }
.gm-level-badge { flex: 0 0 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; }
.gm-level-badge--1 { background: #f97316; }
.gm-level-badge--2 { background: #eab308; }
.gm-level-badge--3 { background: #16a34a; }
.gm-level-badge--4 { background: #0ea5e9; }
.gm-level-badge--5 { background: #7c3aed; }
.gm-level-range { font-weight: 700; font-size: 0.86rem; color: var(--gm-muted); }
.gm-level-row { grid-template-columns: minmax(0, 1fr) 120px; }
.gm-level-min:disabled { background: var(--gm-soft); color: var(--gm-muted); }
.gm-level-enrol { margin: -0.25rem 0 0.6rem; }
.gm-level-enrol .gm-hint { margin: 0.2rem 0 0; }
.gm-target { display: grid; grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.4fr); gap: 0.5rem; }
.gm-target > :only-child { grid-column: 1 / -1; max-width: 220px; }
.gm-target .gm-target-label { grid-column: 2; }
/* Level cards are narrow: one control per line there. */
.gm-level .gm-target { grid-template-columns: minmax(0, 1fr); }
.gm-level .gm-target .gm-target-label { grid-column: auto; }
.gm-level .gm-target > :only-child { max-width: none; }
.gm-topic-list { display: flex; flex-direction: column; gap: 0.5rem; }
.gm-topic-row { display: grid; grid-template-columns: minmax(150px, 0.6fr) minmax(0, 1.4fr); gap: 0.75rem; align-items: center; padding: 0.7rem 0.9rem; border: 1px solid var(--gm-line); border-radius: 14px; background: #fff; }
.gm-topic-name { display: flex; flex-direction: column; min-width: 0; }
.gm-topic-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-topic-name small { color: var(--gm-muted); font-weight: 600; }
@media (max-width: 575px) {
    .gm-levels { grid-template-columns: minmax(0, 1fr); }
    .gm-level-row, .gm-target, .gm-topic-row { grid-template-columns: minmax(0, 1fr); }
    .gm-target .gm-target-label { grid-column: auto; }
    .gm-target > :only-child { max-width: none; }
}

/* Player end screen: level card, next step, topics */
.ga-level { width: 100%; padding: 1rem 1.1rem; border-radius: 20px; background: #fff; color: #0f2b4c; text-align: left; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); --ga-level: #1b88e3; }
.ga-level--1 { --ga-level: #f97316; }
.ga-level--2 { --ga-level: #eab308; }
.ga-level--3 { --ga-level: #16a34a; }
.ga-level--4 { --ga-level: #0ea5e9; }
.ga-level-top { display: flex; align-items: center; gap: 0.75rem; }
.ga-level-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ga-level-copy small { font-weight: 800; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }
.ga-level-copy strong { font-family: var(--ga-display), sans-serif; font-size: 1.75rem; line-height: 1.15; color: var(--ga-level); overflow-wrap: anywhere; }
.ga-level-percent { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; padding: 0.4rem 0.7rem; border-radius: 14px; background: #f1f5f9; }
.ga-level-percent strong { font-family: var(--ga-display), sans-serif; font-size: 1.6rem; line-height: 1; }
.ga-level-percent span { font-size: 0.75rem; font-weight: 700; color: #64748b; }
.ga-level-steps { display: flex; gap: 0.3rem; margin-top: 0.7rem; }
.ga-level-steps span { flex: 1; height: 8px; border-radius: 99px; background: #e2e8f0; }
.ga-level-steps span.is-on { background: var(--ga-level); }
.ga-level-message { margin: 0.75rem 0 0; font-weight: 600; line-height: 1.45; color: #334155; }
.ga-next { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.85rem; padding: 0.75rem 0.85rem; border-radius: 16px; background: #f0f7fd; color: #0f2b4c; text-align: left; }
.ga-next-icon { flex: 0 0 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #1b88e3; color: #fff; font-size: 1.05rem; }
.ga-next-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.ga-next-copy small { font-weight: 800; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: #1268b3; }
.ga-next-copy strong { font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.ga-next-enrolled { font-weight: 700; font-size: 0.82rem; color: #15803d; }
.ga-next-note { font-weight: 600; font-size: 0.82rem; color: #64748b; }
.ga-next-open { flex: 0 0 auto; width: auto; min-height: 0; padding: 0.6rem 0.95rem; font-size: 0.95rem; white-space: nowrap; text-decoration: none; }
.ga-next-open--sm { padding: 0.4rem 0.75rem; font-size: 0.85rem; background: #1b88e3; color: #fff; }
.ga-next--compact { margin-top: 0.55rem; padding: 0.5rem 0.6rem; }
.ga-next--compact .ga-next-icon { flex-basis: 30px; height: 30px; border-radius: 9px; font-size: 0.85rem; }
.ga-next--compact .ga-next-copy strong { font-size: 0.9rem; }
.ga-topics { width: 100%; padding: 1rem 1.1rem; border-radius: 20px; background: #fff; color: #0f2b4c; text-align: left; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); }
.ga-topics h3 { margin: 0 0 0.6rem; font-family: var(--ga-display), sans-serif; font-size: 1.2rem; }
.ga-topic + .ga-topic { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid #eef2f7; }
.ga-topic-head { display: flex; align-items: center; gap: 0.5rem; }
.ga-topic-head strong { flex: 1; min-width: 0; font-size: 0.98rem; overflow-wrap: anywhere; }
.ga-topic-tag { flex: 0 0 auto; padding: 0.15rem 0.5rem; border-radius: 99px; font-size: 0.72rem; font-weight: 800; background: #dcfce7; color: #166534; }
.ga-topic.is-weak .ga-topic-tag { background: #ffedd5; color: #9a3412; }
.ga-topic-percent { flex: 0 0 3rem; text-align: right; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: 1.1rem; }
.ga-topic-bar { height: 8px; margin-top: 0.4rem; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.ga-topic-bar span { display: block; height: 100%; border-radius: inherit; background: #16a34a; }
.ga-topic.is-weak .ga-topic-bar span { background: #f97316; }
@media (max-width: 420px) {
    .ga-next { flex-wrap: wrap; }
    .ga-next-open { width: 100%; justify-content: center; }
}

/* Results page: levels and topics */
.gm-level-tag { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.55rem; border-radius: 99px; font-size: 0.76rem; font-weight: 800; color: #fff; white-space: nowrap; background: #7c3aed; }
.gm-level-tag--1 { background: #f97316; }
.gm-level-tag--2 { background: #ca8a04; }
.gm-level-tag--3 { background: #16a34a; }
.gm-level-tag--4 { background: #0284c7; }
.gm-enrolled-tag { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.35rem; font-size: 0.74rem; font-weight: 700; color: #15803d; white-space: nowrap; }
.gm-practise { display: block; margin-top: 0.15rem; font-size: 0.76rem; font-weight: 600; color: #9a3412; }
.gm-level-bars { display: flex; flex-direction: column; gap: 0.7rem; }
.gm-level-bar-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; font-size: 0.88rem; font-weight: 700; }
.gm-level-bar-head small { margin-left: auto; color: var(--gm-muted); font-weight: 600; }
.gm-meter.gm-meter--level span { background: #7c3aed; }
.gm-meter.gm-meter--l1 span { background: #f97316; }
.gm-meter.gm-meter--l2 span { background: #eab308; }
.gm-meter.gm-meter--l3 span { background: #16a34a; }
.gm-meter.gm-meter--l4 span { background: #0ea5e9; }
.gm-outcome-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }

/* Game certificate: earned / claim form (guests) / missed — end screen */
.ga-cert { width: 100%; padding: 1rem 1.1rem; border-radius: 20px; background: #fff; color: #0f2b4c; text-align: left; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.ga-cert-head { display: flex; align-items: center; gap: 0.8rem; }
.ga-cert-icon { flex: 0 0 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 6px 14px rgba(217, 119, 6, 0.35); }
.ga-cert.is-missed .ga-cert-icon { background: #cbd5e1; box-shadow: none; }
.ga-cert-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.ga-cert-copy strong { font-family: var(--ga-display), sans-serif; font-size: 1.35rem; line-height: 1.2; }
.ga-cert-copy span { font-weight: 700; color: #334155; overflow-wrap: anywhere; }
.ga-cert-copy small { font-weight: 600; font-size: 0.8rem; color: #64748b; overflow-wrap: anywhere; }
.ga-cert-download { margin-top: 0.85rem; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.ga-cert-linkedin { margin-top: 0.6rem; text-decoration: none; display: flex; align-items: center; justify-content: center; background: #0a66c2; color: #fff; }
.ga-cert-linkedin:hover { color: #fff; background: #004182; }
.ga-cert-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; font-size: 0.82rem; font-weight: 600; color: #64748b; }
.ga-cert-foot span { overflow-wrap: anywhere; }
.ga-cert-foot a { color: #1268b3; font-weight: 700; text-decoration: none; }
.ga-cert-sub { margin: 0.7rem 0 0.4rem; font-weight: 600; font-size: 0.92rem; color: #475569; }
.ga-cert-label { display: block; margin: 0.55rem 0 0.25rem; font-weight: 800; font-size: 0.85rem; color: #334155; }
.ga-cert input { width: 100%; min-height: 48px; padding: 0.6rem 0.85rem; border: 2px solid #e2e8f0; border-radius: 14px; font: inherit; font-weight: 600; color: #0f172a; background: #f8fafc; }
.ga-cert input:focus { outline: none; border-color: #1b88e3; background: #fff; box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15); }
.ga-cert-error { min-height: 1.2rem; margin: 0.4rem 0 0.1rem; font-weight: 700; font-size: 0.85rem; color: #dc2626; }
.ga-cert.is-claim .ga-submit { margin-top: 0.3rem; }

/* Builder: certificate settings */
.gm-cert-settings { margin-top: 0.4rem; }
.gm-cert-settings [hidden] { display: none !important; }
.gm-cert-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) 170px minmax(0, 1.4fr); gap: 0.85rem; }
@media (max-width: 767px) { .gm-cert-grid { grid-template-columns: minmax(0, 1fr); } }
.gm-cert-tag { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.35rem; font-size: 0.74rem; font-weight: 700; color: #b45309; white-space: nowrap; text-decoration: none; }
.gm-cert-tag:hover { color: #92400e; }

/* Builder: tester feedback round — resize handles, field checks, assessment duration */
.gm-hotspot-handle { position: absolute; width: 14px; height: 14px; border-radius: 4px; background: #fff; border: 2.5px solid #16a34a; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35); }
.gm-hotspot-handle--nw { top: -8px; left: -8px; cursor: nwse-resize; }
.gm-hotspot-handle--se { bottom: -8px; right: -8px; cursor: nwse-resize; }
.gm-hotspot-handle--ne { top: -8px; right: -8px; cursor: nesw-resize; }
.gm-hotspot-handle--sw { bottom: -8px; left: -8px; cursor: nesw-resize; }
@media (pointer: coarse) { .gm-hotspot-handle { width: 22px; height: 22px; } .gm-hotspot-handle--nw, .gm-hotspot-handle--ne { top: -12px; } .gm-hotspot-handle--sw, .gm-hotspot-handle--se { bottom: -12px; } .gm-hotspot-handle--nw, .gm-hotspot-handle--sw { left: -12px; } .gm-hotspot-handle--ne, .gm-hotspot-handle--se { right: -12px; } }
/* The number badge sits on the top-left corner; keep the handle reachable above it. */
.gm-hotspot-zone > span { z-index: 1; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.gm-hotspot-handle { z-index: 2; }
.gm-input.is-invalid { border-color: #f87171 !important; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important; }
.gm-field-hint { display: block; margin: 0.3rem 0 0; font-size: 0.76rem; line-height: 1.35; }
.gm-field-errors:empty { display: none; }
.gm-field-errors { margin: -0.2rem 0 0.9rem; padding: 0.6rem 0.8rem; border-radius: 12px; background: #fef2f2; color: #b91c1c; font-size: 0.85rem; font-weight: 600; line-height: 1.4; }
.gm-field-errors div + div { margin-top: 0.3rem; }
.gm-link-btn { margin-left: auto; padding: 0; border: 0; background: none; color: var(--gm-blue); font-weight: 700; font-size: 0.8rem; cursor: pointer; white-space: nowrap; }
.gm-link-btn:hover { text-decoration: underline; }
.gm-duration:empty { display: none; }
.gm-duration { margin-top: 0.75rem; padding: 0.7rem 0.75rem; border-radius: 14px; background: var(--gm-soft); border: 1px solid var(--gm-line); }
.gm-duration-total { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; font-size: 0.85rem; font-weight: 700; color: #334155; }
.gm-duration-total i { color: var(--gm-blue); }
.gm-duration-form { margin-top: 0.7rem; }
.gm-duration-form .gm-field { margin-bottom: 0.5rem; }
.gm-duration-form .gm-btn { width: 100%; justify-content: center; }
.gm-duration-form .gm-hint { margin: 0.5rem 0 0; font-size: 0.76rem; }
.gm-duration-msg { margin-top: 0.5rem; font-size: 0.8rem; font-weight: 700; color: #b91c1c; }
.gm-duration-msg.is-ok { color: #15803d; }

/* Player: self-paced without a time limit */
.ga-untimed { display: inline-flex; align-self: center; align-items: center; gap: 0.4rem; padding: 0.35rem 0.9rem; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 2px var(--ga-line); font-weight: 800; font-size: 0.85rem; }

/* ------------------------------------------------------------------ study decks (flashcard swipe, flip cards) */
.ga-flash-progress { display: flex; justify-content: center; align-items: center; gap: 0.8rem; font-weight: 800; font-size: 0.95rem; }
.ga-flash-tally { display: inline-flex; gap: 0.5rem; }
.ga-flash-tally b { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.15rem 0.55rem; border-radius: 99px; font-size: 0.82rem; }
.ga-flash-tally .is-know { background: rgba(34, 197, 94, 0.9); }
.ga-flash-tally .is-learn { background: rgba(249, 115, 22, 0.9); }
.ga-flash-stack { position: relative; width: 100%; max-width: 440px; height: clamp(240px, 46vh, 340px); margin: 0 auto; perspective: 1200px; }
.ga-flash-stack:has(.ga-flash-photo) { max-width: 480px; height: clamp(300px, 56vh, 440px); }
.ga-flash { position: absolute; inset: 0; cursor: pointer; touch-action: pan-y; user-select: none; transition: transform 0.25s ease, opacity 0.25s ease; outline: none; }
.ga-flash:focus-visible .ga-flash-face { box-shadow: 0 0 0 4px #f6b21b, 0 18px 40px rgba(0, 0, 0, 0.25); }
.ga-flash--peek { transform: translateY(12px) scale(0.95); opacity: 0.55; background: #fff; border-radius: 24px; pointer-events: none; }
.ga-flash-inner { position: relative; width: 100%; height: 100%; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); transform-style: preserve-3d; }
.ga-flash.is-flipped .ga-flash-inner { transform: rotateY(180deg); }
.ga-flash-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.8rem; padding: 1.4rem; border-radius: 24px; backface-visibility: hidden; -webkit-backface-visibility: hidden; text-align: center; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25); overflow-wrap: anywhere; }
.ga-flash-front { background: #fff; color: #0f2b4c; font-family: var(--ga-display), sans-serif; font-weight: 600; font-size: clamp(1.3rem, 5vw, 1.9rem); line-height: 1.25; }
.ga-flash-back { background: linear-gradient(135deg, #0f2b4c, #1b88e3); color: #fff; transform: rotateY(180deg); font-weight: 600; font-size: clamp(1rem, 3.8vw, 1.25rem); line-height: 1.45; }
.ga-flash-hint { position: absolute; bottom: 0.9rem; right: 1rem; color: #a5b4fc; font-size: 1rem; }
.ga-flash-stamp { position: absolute; top: 1.1rem; padding: 0.25rem 0.7rem; border: 3px solid currentColor; border-radius: 10px; font-weight: 900; font-size: 1.05rem; text-transform: uppercase; opacity: 0; transition: opacity 0.15s; z-index: 2; background: rgba(255, 255, 255, 0.92); }
.ga-flash-stamp.is-know { left: 1.1rem; color: #16a34a; transform: rotate(-10deg); }
.ga-flash-stamp.is-learn { right: 1.1rem; color: #ea580c; transform: rotate(10deg); }
.ga-flash.lean-know .ga-flash-stamp.is-know, .ga-flash.lean-learn .ga-flash-stamp.is-learn { opacity: 1; }
.ga-flash.fly-right { transform: translateX(130%) rotate(18deg) !important; opacity: 0; }
.ga-flash.fly-left { transform: translateX(-130%) rotate(-18deg) !important; opacity: 0; }
.ga-flash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; width: 100%; max-width: 440px; margin: 0 auto; }
.ga-flash-btn { min-height: 56px; justify-content: center; font-size: 1.05rem; color: #fff; }
.ga-flash-btn.is-know { background: #16a34a; }
.ga-flash-btn.is-learn { background: #ea580c; }
.ga-flip-bar { display: flex; align-items: center; justify-content: center; gap: 0.8rem; }
.ga-flip-nav { width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, 0.95); color: #0f2b4c; }
.ga-flip-nav:disabled { opacity: 0.35; }
.ga-flip-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; max-width: 240px; }
.ga-flip-dots i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--ga-glow) 20%, #e2e8f0); }
.ga-flip-dots i.is-seen { background: var(--ga-glow); }
.ga-flip-dots i.is-current { box-shadow: 0 0 0 3px #f6b21b; }
.ga-deck-list { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; text-align: left; }
.ga-deck-list li { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.6rem 0.8rem; border-radius: 14px; background: #f0f7fd; }
.ga-deck-list strong { font-size: 0.98rem; }
.ga-deck-list span { font-size: 0.88rem; color: #475569; font-weight: 600; }
.ga-deck-heading { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.7rem; font-weight: 800; color: #c2410c; }
.ga-deck-note { margin: 0.6rem 0 0; font-weight: 700; color: #15803d; }
.ga-split-bar { display: flex; height: 18px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.ga-split-bar i.is-learn { background: #f97316; }
.ga-split-bar i.is-know { background: #22c55e; }
.ga-split-learn { color: #ea580c; }
.ga-split-know { color: #16a34a; }
.ga-acc-tile > i { display: block; font-size: 1.6rem; margin-bottom: 0.3rem; }

/* ------------------------------------------------------------------ crossword */
.ga-cw-wrap { display: flex; justify-content: center; width: 100%; overflow-x: auto; }
.ga-cw { display: grid; gap: 2px; width: min(100%, calc(var(--cw-cols, 12) * 44px)); max-width: 560px; padding: 4px; border-radius: 12px; background: #0f2b4c; }
.ga-cw-cell { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 3px; min-width: 0; }
.ga-cw-cell.is-block { background: transparent; }
.ga-cw-cell small { position: absolute; top: 1px; left: 3px; font-size: clamp(0.5rem, 1.6vw, 0.66rem); font-weight: 800; color: #475569; line-height: 1; pointer-events: none; }
.ga-cw-cell span { font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: clamp(0.7rem, 3vw, 1.25rem); color: #0f2b4c; }
.ga-cw-input { width: 100%; height: 100%; padding: 0; border: 0; background: transparent; text-align: center; text-transform: uppercase; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: clamp(0.8rem, 3.4vw, 1.35rem); color: #0f2b4c; caret-color: transparent; outline: none; border-radius: 3px; }
.ga-cw-cell.is-word { background: #d3e7fa; }
.ga-cw-cell.is-focus { background: #f6b21b; }
.ga-cw-cell.is-right { background: #bbf7d0; }
.ga-cw-cell.is-wrong { background: #fecaca; }
.ga-cw--static { width: min(100%, 420px); }
.ga-cw-clue { display: flex; gap: 0.6rem; align-items: baseline; width: 100%; min-height: 3rem; padding: 0.65rem 0.9rem; border-radius: 16px; background: #fff; color: #0f2b4c; font-weight: 600; line-height: 1.35; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15); }
.ga-cw-clue strong { flex: 0 0 auto; color: #1b88e3; font-weight: 900; }
.ga-cw-clues { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.8rem; width: 100%; padding: 0.9rem; border-radius: 18px; background: rgba(255, 255, 255, 0.95); color: #0f2b4c; text-align: left; }
.ga-cw-clues h4 { margin: 0 0 0.4rem; font-family: var(--ga-display), sans-serif; font-size: 1.05rem; }
.ga-cw-clues ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.ga-cw-clues li { display: flex; gap: 0.5rem; padding: 0.3rem 0.45rem; border-radius: 8px; cursor: pointer; font-size: 0.9rem; font-weight: 600; line-height: 1.35; }
.ga-cw-clues li b { flex: 0 0 1.4rem; color: #1b88e3; }
.ga-cw-clues li:hover, .ga-cw-clues li.is-active { background: #e6f2fc; }

/* ------------------------------------------------------------------ word search */
.ga-ws-wrap { display: flex; justify-content: center; width: 100%; }
.ga-ws { display: grid; gap: 2px; width: min(100%, 520px); padding: 6px; border-radius: 16px; background: #fff; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); }
.ga-ws-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 6px; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: clamp(0.72rem, 3.3vw, 1.3rem); color: #0f2b4c; cursor: pointer; transition: background 0.12s; min-width: 0; }
.ga-ws-cell.is-sel { background: #f6b21b; }
.ga-ws-cell.is-start { background: #f6b21b; box-shadow: inset 0 0 0 2px #ca8a04; }
.ga-ws-cell.is-found { color: #fff; }
.ga-ws-cell.is-missed { background: #fed7aa; color: #9a3412; }
.ga-ws-f0 { background: #1b88e3; } .ga-ws-f1 { background: #0ea5e9; } .ga-ws-f2 { background: #16a34a; }
.ga-ws-f3 { background: #db2777; } .ga-ws-f4 { background: #ea580c; } .ga-ws-f5 { background: #0d9488; }
.ga-ws.is-miss { animation: ga-ws-shake 0.3s; }
@keyframes ga-ws-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.ga-ws--static { width: min(100%, 400px); box-shadow: none; border: 1px solid #e2e8f0; }
.ga-ws-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; }
.ga-ws-word { padding: 0.3rem 0.75rem; border-radius: 99px; background: rgba(255, 255, 255, 0.95); color: #0f2b4c; font-weight: 800; font-size: 0.9rem; letter-spacing: 0.04em; }
.ga-ws-word.is-found { background: rgba(255, 255, 255, 0.35); color: #fff; text-decoration: line-through; }
@media (prefers-reduced-motion: reduce) { .ga-flash, .ga-flash-inner { transition: none; } .ga-ws.is-miss { animation: none; } }

/* ------------------------------------------------------------------ builder: cards, word lists, grid preview */
.gm-card-rows { display: flex; flex-direction: column; gap: 0.6rem; }
.gm-card-row { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.6rem; border: 1px solid var(--gm-line); border-radius: 14px; background: #fff; }
.gm-card-num { flex: 0 0 28px; height: 28px; margin-top: 0.35rem; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--gm-soft); color: var(--gm-muted); font-weight: 800; font-size: 0.82rem; }
.gm-card-sides { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.gm-word-sides { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1.4fr); gap: 0.5rem; }
.gm-cw-answer { text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em; }
.gm-word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem; }
.gm-word-grid .gm-input { text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.gm-grid-preview { padding: 0.9rem; border: 1px dashed #cbd5e1; border-radius: 16px; background: var(--gm-soft); }
.gm-grid-preview .gm-field-errors { margin: 0 0 0.75rem; }
@media (max-width: 575px) { .gm-word-sides { grid-template-columns: minmax(0, 1fr); } }
.gm-dist-bar--split { display: flex; }
.gm-dist-bar--split i { border-radius: 0 !important; }
.gm-dist-bar--split i.is-learn { background: #f97316 !important; }
.gm-dist-bar--split i.is-know { background: #22c55e !important; }

/* ------------------------------------------------------------------ photos on options, items, pairs and cards */
.ga-photo { display: block; background: #fff; }
.ga-thumb { width: 72px; height: 72px; flex-shrink: 0; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08); }
.ga-tiles--photos .ga-tile.has-photo { flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 0.5rem; padding: 0.55rem 0.55rem 0.7rem; text-align: center; }
.ga-tiles--photos .ga-tile.has-photo .ga-tile-shape { position: absolute; top: 0.4rem; left: 0.4rem; z-index: 1; width: 32px; height: 32px; font-size: 1rem; border-radius: 50%; background: var(--tile); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.ga-tiles--photos .ga-tile.has-photo .ga-tile-check { position: absolute; top: 0.4rem; right: 0.4rem; z-index: 1; background: rgba(0, 0, 0, 0.25); }
.ga-tile-photo { width: 100%; aspect-ratio: 1 / 1; max-height: 34vh; object-fit: contain; border-radius: 11px; }
.ga-tiles--photos .ga-tile .ga-tile-text { font-size: clamp(0.92rem, 1.8vw, 1.15rem); }
.ga-tiles--host.ga-tiles--photos .ga-tile-photo { aspect-ratio: 4 / 3; max-height: 34vh; }
.ga-match-item:has(.ga-thumb) { flex-wrap: wrap; align-content: flex-start; }
.ga-match-item .ga-thumb { order: -1; width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: 150px; object-fit: contain; background: #fff; }
.ga-match-item:has(.ga-thumb) .ga-match-text:empty { display: none; }
.ga-chip.has-photo { flex-direction: column; gap: 0.25rem; padding: 0.35rem 0.35rem 0.45rem; }
.ga-chip-photo { width: 140px; height: 105px; object-fit: cover; border-radius: 10px; }
.ga-chip.has-photo span { max-width: 140px; font-size: 0.88rem; text-align: center; overflow-wrap: anywhere; }
.ga-bucket .ga-chip-photo { width: 110px; height: 82px; }
.ga-flash-face.has-photo { gap: 0.6rem; }
.ga-flash-photo { max-width: 100%; max-height: 74%; object-fit: contain; border-radius: 14px; background: transparent; }
.ga-flash-back .ga-flash-photo { background: #fff; }
.ga-flash-face.has-photo span { font-size: 0.85em; }
.ga-deck-list li.has-photo { flex-direction: row; align-items: center; gap: 0.6rem; }
.ga-deck-list li > div { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1; }
.ga-key-group span.has-photo { display: inline-flex; align-items: center; gap: 0.4rem; }
.ga-key-group .ga-thumb { width: 56px; height: 56px; }
.ga-bar-label .ga-thumb { width: 44px; height: 44px; border-radius: 8px; }
.ga-coverage-text .ga-thumb { display: inline-block; width: 44px; height: 44px; margin-right: 0.5rem; vertical-align: middle; }
.gm-dist-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 7px; vertical-align: middle; }

/* Builder: photo slot next to an option / item / pair side / card side */
.gm-photo { display: inline-flex; flex-shrink: 0; }
.gm-photo-slot { position: relative; width: 56px; height: 56px; flex-shrink: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--gm-muted); }
.gm-photo-add { width: 100%; height: 100%; border: 1.5px dashed #cbd5e1; border-radius: 10px; background: #f8fafc; color: #64748b; cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.gm-photo-add:hover, .gm-photo-add:focus-visible { border-color: var(--gm-blue); color: var(--gm-blue); }
.gm-photo-slot.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12); }
.gm-photo-remove { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: #ef4444; color: #fff; font-size: 0.65rem; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.gm-photo-slot.is-busy { border: 1.5px dashed #cbd5e1; background: #f8fafc; }
.gm-pair-side { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.gm-pair-side > .gm-input, .gm-pair-side > .gm-textarea { flex: 1; min-width: 0; }
.gm-pair-side--top { align-items: flex-start; }

.gm-dist-row:has(.gm-dist-thumb) { min-height: 40px; }
.gm-dist-row:has(.gm-dist-thumb) span:first-child { white-space: normal; }

/* Player phone: "tap for sound" sits bottom-centre, clear of the answer buttons' edges. */
.ga-sound-prompt--player { left: 0; right: 0; bottom: 1rem; width: max-content; margin: 0 auto; min-height: 44px; font-size: 0.95rem; }

/* ================================================================== 10 more games */

/* Picture reveal */
.ga-reveal-wrap { display: flex; justify-content: center; width: 100%; }
.ga-reveal-pic { position: relative; display: inline-block; line-height: 0; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 0 0 4px #fff, 0 14px 30px rgba(0, 0, 0, 0.25); max-width: 100%; }
.ga-reveal-pic img { display: block; max-width: 100%; max-height: 40vh; }
.ga-q-media--big .ga-reveal-pic img { max-height: 50vh; }
.ga-reveal-cover { position: absolute; inset: 0; display: grid; }
.ga-reveal-tile { background: var(--tile, #1b88e3); border: 1px solid rgba(255, 255, 255, 0.35); transition: opacity 0.45s ease, transform 0.45s ease; }
.ga-reveal-tile.is-gone { opacity: 0; transform: scale(0.6) rotate(8deg); }

/* Lightning round */
.ga-lightning-card { display: flex; align-items: center; justify-content: center; min-height: 160px; padding: 1.4rem; text-align: center; font-family: var(--ga-display), sans-serif; font-weight: 600; font-size: clamp(1.25rem, 4.6vw, 1.7rem); line-height: 1.3; }
.ga-lightning-in { animation: ga-pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.ga-lightning-btn { min-height: 72px; justify-content: center; font-size: 1.25rem; color: #fff; }
.ga-lightning-btn.is-true { background: #16a34a; }
.ga-lightning-btn.is-false { background: #dc2626; }
.ga-tf-badge { flex-shrink: 0; padding: 0.15rem 0.55rem; border-radius: 99px; font-size: 0.75rem; font-weight: 900; color: #fff; }
.ga-tf-badge.is-true { background: #16a34a; }
.ga-tf-badge.is-false { background: #dc2626; }

/* Word scramble */
.ga-scramble-list { display: flex; flex-direction: column; gap: 0.75rem; }
.ga-scramble { padding: 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; }
.ga-scramble-head { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; color: #334155; }
.ga-scramble-head b { flex: 0 0 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: #e6f2fc; color: #1268b3; font-size: 0.8rem; }
.ga-scramble-head span { flex: 1; min-width: 0; }
.ga-scramble-hint { flex-shrink: 0; border: 0; border-radius: 99px; padding: 0.3rem 0.7rem; background: #fef9c3; color: #854d0e; font-weight: 800; font-size: 0.8rem; cursor: pointer; }
.ga-scramble-hint:disabled { opacity: 0.45; cursor: default; }
.ga-scramble-slots, .ga-scramble-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; }
.ga-scramble-slot, .ga-scramble-tile { width: clamp(30px, 9vw, 42px); height: clamp(36px, 10vw, 48px); border: 0; border-radius: 9px; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: clamp(1rem, 4vw, 1.3rem); cursor: pointer; }
.ga-scramble-slot { background: #f1f5f9; box-shadow: inset 0 -3px 0 #cbd5e1; color: #0f2b4c; }
.ga-scramble-slot.is-filled { background: #e6f2fc; box-shadow: inset 0 -3px 0 #7fb5ea; }
.ga-scramble-slot.is-hint { background: #fef9c3; box-shadow: inset 0 -3px 0 #e49a00; cursor: default; }
.ga-scramble-tile { background: #1b88e3; color: #fff; box-shadow: 0 4px 0 #1268b3; }
.ga-scramble-tile:disabled { opacity: 0.2; box-shadow: none; cursor: default; }
.ga-key-word { letter-spacing: 0.05em; }
.ga-key-item del { color: #be123c; font-weight: 700; }
.ga-key-item small { color: #64748b; font-weight: 600; }
.ga-key-hint { color: #ca8a04; }

/* Find the error */
.ga-find-text { padding: 1rem 1.1rem; font-size: 1.08rem; line-height: 2.1; text-align: left; color: #0f2b4c; }
.ga-find-word { border: 0; padding: 0.1rem 0.25rem; margin: 0 -0.05rem; border-radius: 6px; background: transparent; font: inherit; color: inherit; cursor: pointer; box-shadow: inset 0 -2px 0 #e2e8f0; }
.ga-find-word:hover { background: #f1f5f9; }
.ga-find-word.is-picked { background: #fecaca; box-shadow: inset 0 -2px 0 #ef4444; text-decoration: line-through; text-decoration-color: #ef4444; }
.ga-find-text--key { padding: 0.4rem 0 0; font-size: 0.98rem; line-height: 1.9; }
.ga-find-key { border-radius: 6px; padding: 0.05rem 0.25rem; }
.ga-find-key.is-error { background: #fef3c7; }
.ga-find-key.is-error.is-found { background: #dcfce7; }
.ga-find-key.is-error.is-missed { background: #fee2e2; }
.ga-find-key del { color: #be123c; }
.ga-find-key ins { margin-left: 0.25rem; color: #15803d; font-weight: 800; text-decoration: none; }
.ga-find-key.is-wrongpick { background: #fee2e2; text-decoration: underline wavy #ef4444; }

/* Memory match */
.ga-memory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; width: 100%; }
.ga-memory--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ga-memory-card { position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; background: transparent; perspective: 900px; cursor: pointer; }
.ga-memory-inner { position: absolute; inset: 0; transition: transform 0.4s ease; transform-style: preserve-3d; }
.ga-memory-card.is-open .ga-memory-inner, .ga-memory-card.is-matched .ga-memory-inner { transform: rotateY(180deg); }
.ga-memory-back, .ga-memory-front { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; padding: 0.4rem; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2); }
.ga-memory-back { background: linear-gradient(135deg, #1b88e3, #0f2b4c); color: rgba(255, 255, 255, 0.85); font-size: 1.6rem; }
.ga-memory-front { background: #fff; color: #0f2b4c; transform: rotateY(180deg); font-weight: 800; font-size: clamp(0.72rem, 2.6vw, 0.95rem); line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.ga-memory-card.is-matched .ga-memory-front { background: #dcfce7; box-shadow: 0 0 0 3px #22c55e; }
.ga-memory-photo { max-width: 100%; max-height: 62%; object-fit: contain; border-radius: 8px; }

/* Spot the mistakes */
.ga-spot-map { cursor: crosshair; }
.ga-spot-map.is-full { cursor: default; }
.ga-spot-mark { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid #fff; border-radius: 50%; background: #dc2626; color: #fff; font-weight: 900; font-size: 0.9rem; line-height: 1; cursor: pointer; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); animation: ga-pop 0.25s ease; }
.ga-pin-marker.is-hit i { color: #16a34a; font-size: 28px; left: -12px; filter: drop-shadow(0 0 2px #fff); }
.ga-pin-marker.is-miss i { color: #dc2626; font-size: 28px; left: -12px; filter: drop-shadow(0 0 2px #fff); }

/* Customer scenario */
.ga-chat { display: flex; flex-direction: column; gap: 0.6rem; width: 100%; }
.ga-chat-row { display: flex; align-items: flex-end; gap: 0.5rem; animation: ga-pop 0.3s ease; }
.ga-chat-row.is-me { justify-content: flex-end; }
.ga-chat-avatar { flex: 0 0 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #f6b21b; color: #0f2b4c; }
.ga-chat-bubble { max-width: 82%; padding: 0.7rem 0.9rem; border-radius: 18px 18px 18px 4px; background: #fff; color: #0f2b4c; font-weight: 600; line-height: 1.4; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); display: flex; flex-direction: column; gap: 0.45rem; }
.ga-chat-row.is-me .ga-chat-bubble { border-radius: 18px 18px 4px 18px; background: #1b88e3; color: #fff; }
.ga-chat-photo { max-width: 100%; max-height: 180px; object-fit: contain; border-radius: 12px; }
.ga-chat-typing { padding: 0.6rem 0.9rem; }
.ga-chat-replies { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; margin-top: 0.4rem; }
.ga-chat-choice { width: 100%; padding: 0.85rem 1rem; border: 0; border-radius: 16px; background: rgba(255, 255, 255, 0.95); color: #0f2b4c; font-weight: 800; font-size: 1rem; text-align: left; cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); animation: ga-pop 0.3s ease both; }
.ga-chat-choice:hover { background: #fff; transform: translateY(-1px); }
.ga-route { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; text-align: left; }
.ga-route li { padding: 0.6rem 0.75rem; border-radius: 14px; background: #f8fafc; }
.ga-route-customer { display: flex; gap: 0.45rem; align-items: baseline; color: #475569; font-weight: 600; font-size: 0.9rem; }
.ga-route-reply { display: flex; gap: 0.45rem; align-items: baseline; margin-top: 0.35rem; color: #0f2b4c; }
.ga-route-chip { flex-shrink: 0; padding: 0.1rem 0.5rem; border-radius: 99px; font-size: 0.72rem; font-weight: 900; color: #fff; background: #94a3b8; }
.ga-route-chip.is-good, .ga-route-reply.is-good .ga-route-chip { background: #16a34a; }
.ga-route-chip.is-ok, .ga-route-reply.is-ok .ga-route-chip { background: #ca8a04; }
.ga-route-chip.is-bad, .ga-route-reply.is-bad .ga-route-chip { background: #dc2626; }
.ga-route-feedback { margin: 0.3rem 0 0; font-size: 0.86rem; color: #475569; font-style: italic; }

/* Voice pitch */
.ga-voice { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; padding: 1.2rem 1rem; text-align: center; }
.ga-voice-record { width: 92px; height: 92px; border: 0; border-radius: 50%; background: #dc2626; color: #fff; font-size: 2.1rem; cursor: pointer; box-shadow: 0 6px 0 #9f1239, 0 0 0 8px rgba(220, 38, 38, 0.15); transition: transform 0.12s ease; }
.ga-voice-record:active { transform: translateY(3px); }
.ga-voice-record:disabled { opacity: 0.5; cursor: wait; }
.ga-voice.is-recording .ga-voice-record { animation: ga-voice-pulse 1.2s ease-in-out infinite; }
@keyframes ga-voice-pulse { 50% { box-shadow: 0 6px 0 #9f1239, 0 0 0 18px rgba(220, 38, 38, 0.25); } }
.ga-voice-status { font-weight: 800; color: #334155; }
.ga-voice-status.is-live { color: #dc2626; }
.ga-voice-status.is-error { color: #dc2626; }
.ga-voice-status.is-busy { color: #1b88e3; }
.ga-voice-transcript { width: 100%; padding: 0.7rem 0.9rem; border-radius: 14px; background: #f0f7fd; text-align: left; }
.ga-voice-transcript small { font-weight: 800; color: #1268b3; }
.ga-voice-transcript p { margin: 0.25rem 0 0; font-weight: 600; color: #0f2b4c; line-height: 1.45; }
.ga-voice .ga-response-input { width: 100%; }
.ga-voice-type { border: 0; background: none; color: #1268b3; font-weight: 800; cursor: pointer; }

/* Quiz board, bonus wheel */
.ga-bonus-banner { display: inline-flex; align-self: center; align-items: center; flex-wrap: wrap; justify-content: center; gap: 0.6rem; padding: 0.35rem 0.95rem; border-radius: 99px; background: rgba(255, 255, 255, 0.2); font-weight: 900; }
.ga-bonus-banner.is-bonus { background: #f6b21b; color: #422006; animation: ga-sound-pulse 1.6s ease-in-out infinite; }
.ga-bonus-banner--host { margin: 0 auto 0.6rem; font-size: 1.15rem; }
.ga-board-mini { display: grid; gap: 0.35rem; width: 100%; }
.ga-board-mini-col { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.ga-board-mini-col strong { font-size: 0.7rem; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ga-board-mini-col span { padding: 0.3rem 0; border-radius: 7px; background: rgba(255, 255, 255, 0.92); color: #0f2b4c; text-align: center; font-weight: 900; font-size: 0.8rem; min-height: 1.6rem; }
.ga-board-mini-col span.is-used { background: rgba(31, 37, 71, 0.08); }
.ga-qboard-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; width: min(100%, 1100px); margin: 0 auto; }
.ga-qboard { display: grid; gap: 0.7rem; width: 100%; }
.ga-qboard-col { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.ga-qboard-topic { padding: 0.7rem 0.4rem; border-radius: 14px; background: var(--tile); color: #fff; text-align: center; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: clamp(0.9rem, 1.6vw, 1.25rem); overflow-wrap: anywhere; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.22); }
.ga-qboard-tile { min-height: clamp(54px, 9vh, 86px); border: 0; border-radius: 14px; background: #fff; color: #0f2b4c; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: clamp(1.4rem, 2.8vw, 2.3rem); cursor: pointer; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.22); transition: transform 0.12s ease; }
.ga-qboard-tile:hover:not(:disabled) { transform: translateY(-3px) scale(1.03); background: #f6b21b; }
.ga-qboard-tile.is-used { background: rgba(31, 37, 71, 0.07); box-shadow: none; cursor: default; }
.ga-qboard-tile.is-picked { animation: ga-pop 0.4s ease; background: #f6b21b; }
.ga-qboard-turn { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 800; font-size: 1.1rem; }
.ga-qboard-left { margin: 0; font-weight: 700; opacity: 0.85; }
.ga-btn--wheel { background: #f6b21b; color: #422006; }
.ga-wheel-overlay { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem; background: rgba(15, 23, 42, 0.78); animation: ga-pop 0.3s ease; }
.ga-wheel { position: relative; width: min(70vmin, 420px); height: min(70vmin, 420px); }
.ga-wheel-title { margin-bottom: 1.4rem; padding: 0 1rem; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: clamp(1.4rem, 3.6vw, 2.4rem); color: #fff; text-align: center; animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.ga-wheel-title .fas { color: #f6b21b; }
.ga-wheel-spinner { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 8px #fff, 0 18px 40px rgba(0, 0, 0, 0.45); transition: transform 4s cubic-bezier(0.12, 0.8, 0.2, 1); }
.ga-wheel-svg { width: 100%; height: 100%; display: block; }
.ga-wheel-label { fill: #fff; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: 34px; }
.ga-wheel-pointer { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 4rem; color: #f6b21b; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.35)); }
.ga-wheel-hub { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: #fff; color: #ca8a04; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
.ga-wheel-result { min-height: 3rem; font-family: var(--ga-display), sans-serif; font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.6rem); color: #f6b21b; text-align: center; opacity: 0; transition: opacity 0.3s ease; }
.ga-wheel-overlay.is-done .ga-wheel-result { opacity: 1; animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
@media (prefers-reduced-motion: reduce) { .ga-wheel-spinner { transition-duration: 0.6s; } .ga-reveal-tile, .ga-memory-inner { transition: none; } }

/* Builder: these types */
.gm-tf--sm { grid-template-columns: auto auto; gap: 0.35rem; }
.gm-tf--sm button { padding: 0.35rem 0.6rem; font-size: 0.8rem; min-height: 0; }
.gm-find-preview { padding: 0.8rem 0.9rem; border-radius: 12px; background: var(--gm-soft); line-height: 1.9; white-space: pre-wrap; }
.gm-find-mark { padding: 0.05rem 0.25rem; border-radius: 6px; background: #fef3c7; }
.gm-find-mark del { color: #be123c; }
.gm-find-mark ins { margin-left: 0.25rem; color: #15803d; font-weight: 800; text-decoration: none; }
.gm-reveal-preview { display: flex; justify-content: center; margin-bottom: 1rem; }
.gm-reveal-preview img { max-width: 100%; max-height: 260px; border-radius: 14px; box-shadow: 0 0 0 1px var(--gm-line); }
.gm-scenes { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 0.7rem; }
.gm-scene { padding: 0.9rem; border: 1px solid var(--gm-line); border-radius: 16px; background: #fff; display: flex; flex-direction: column; gap: 0.6rem; }
.gm-scene-head { display: flex; align-items: center; gap: 0.5rem; }
.gm-scene-head .gm-icon-btn { margin-left: auto; }
.gm-scene-head small { color: var(--gm-muted); font-weight: 700; }
.gm-scene-badge { padding: 0.2rem 0.65rem; border-radius: 99px; background: #ede9fe; color: #5b21b6; font-weight: 800; font-size: 0.82rem; }
.gm-choices { display: flex; flex-direction: column; gap: 0.5rem; }
.gm-choice { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.55rem; border-radius: 12px; background: var(--gm-soft); }
.gm-choice-main { display: grid; grid-template-columns: minmax(0, 1fr) 110px 190px 36px; gap: 0.4rem; align-items: center; }
.gm-quality.is-good { color: #15803d; font-weight: 800; }
.gm-quality.is-ok { color: #a16207; font-weight: 800; }
.gm-quality.is-bad { color: #b91c1c; font-weight: 800; }
@media (max-width: 767px) { .gm-choice-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.gm-host-board { margin: 0.4rem 0 0.2rem; }
.gm-host-board .gm-switch i { color: var(--gm-blue); }
.gm-host-board[hidden] { display: none; }
.gm-host-wheel { margin: 0.8rem 0 0.2rem; }
.gm-host-wheel[hidden], .gm-host-wheel .gm-field[hidden] { display: none; }
.gm-host-wheel .gm-label i { color: #ca8a04; }
.gm-host-wheel .gm-host-assign { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gm-host-wheel .gm-field { margin-bottom: 0.6rem; }
@media (max-width: 720px) { .gm-host-wheel .gm-host-assign { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Game cover photo */
.gm-card-cover.has-photo .gm-card-glyph, .gm-banner.has-photo .gm-banner-glyph { display: none; }
.gm-card-cover.has-photo, .gm-banner.has-photo { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.gm-cover-pick { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.gm-cover-preview { position: relative; width: 240px; height: 120px; flex-shrink: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08); }
.gm-cover-empty { padding: 0.35rem 0.75rem; border-radius: 99px; background: rgba(255, 255, 255, 0.92); color: #1e1b4b; font-weight: 700; font-size: 0.82rem; }
.gm-cover-empty[hidden] { display: none; }
.gm-cover-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex: 1; min-width: 220px; }
.gm-cover-actions .gm-hint { flex-basis: 100%; margin: 0; }
.gm-cover-actions [hidden] { display: none; }
.ga-intro-cover { width: min(100%, 420px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 14px 30px rgba(0, 0, 0, 0.25); animation: ga-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4); }

/* Builder: drafts, restore, grouped type picker, dropdown editor */
.gb-draft-status { font-size: 0.8rem; font-weight: 700; color: var(--gm-muted); align-self: center; white-space: nowrap; }
.gb-draft-banner, .gb-restore { align-items: center; }
.gb-draft-banner > div, .gb-restore > div { flex: 1; }
.gb-restore[hidden] { display: none; }
.gm-dropzone.is-busy { cursor: progress; opacity: 0.8; }
.gb-type-search { margin-bottom: 0.9rem; }
.gb-type-group { margin-bottom: 1.1rem; }
.gb-type-group[hidden], .gm-type-card[hidden] { display: none; }
.gb-type-group-title { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; font-size: 0.95rem; font-weight: 800; color: var(--gm-ink); margin: 0 0 0.55rem; }
.gb-type-group-title i { color: #f59e0b; }
.gb-type-group-title small { font-weight: 600; color: var(--gm-muted); font-size: 0.8rem; }
.gb-type-group[data-type-group=popular] .gm-type-card { background: #fffbeb; }
.gb-dd-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.75rem; }
.gb-dd { border: 1px solid var(--gm-line); border-radius: 14px; padding: 0.75rem 0.85rem; background: #fff; }
.gb-dd-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; font-weight: 800; font-size: 0.88rem; }
.gb-dd-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; margin-bottom: 0.4rem; }
.gb-dd-row label { margin: 0; display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; font-weight: 700; color: var(--gm-muted); white-space: nowrap; cursor: pointer; }
.gb-dd-row label input { accent-color: #16a34a; width: 16px; height: 16px; }
.gb-dd-row.is-correct .gm-input { border-color: #86efac; background: #f0fdf4; }
.gb-dd-empty { padding: 0.75rem; border: 1.5px dashed #c7d2fe; border-radius: 12px; color: var(--gm-muted); font-size: 0.85rem; }
.gb-draft-chip { background: #fef3c7 !important; color: #92400e !important; text-decoration: none !important; }
/* Grouped picker: compact cards (icon beside the name) so all 25 types fit with little scrolling. */
.gb-type-group .gm-type-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.gb-type-group .gm-type-card { display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 0.6rem; row-gap: 0.1rem; align-items: center; padding: 0.6rem 0.7rem; border-radius: 12px; }
.gb-type-group .gm-type-card i { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 10px; font-size: 0.85rem; }
.gb-type-group .gm-type-card strong { font-size: 0.86rem; line-height: 1.2; }
.gb-type-group .gm-type-card span { font-size: 0.7rem; line-height: 1.2; }
.gb-type-group .gm-type-card:hover { transform: translateY(-2px); }
#gbTypePicker .gm-modal-card { width: min(1000px, 100%); }
@media (max-width: 900px) { .gb-type-group .gm-type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .gb-type-group .gm-type-grid { grid-template-columns: 1fr; } }

/* Explanation ("why") with the answer key, and in results */
.ga-explain { padding: 0.85rem 1rem; color: #0f2b4c; margin-top: 0.6rem; }
.ga-explain-title { display: flex; align-items: center; gap: 0.4rem; font-weight: 800; font-size: 0.85rem; color: #a16207; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.3rem; }
.ga-explain p { margin: 0; white-space: pre-line; line-height: 1.45; font-weight: 600; }
.gm-explain { margin-top: 0.4rem; padding: 0.45rem 0.65rem; border-radius: 10px; background: #fffbeb; color: #78350f; font-size: 0.84rem; white-space: pre-line; }
.gm-explain i { color: #d97706; margin-right: 0.25rem; }
.gb-explain-field { margin-top: 1rem; }
/* Preview */
.ga-preview-pill { background: #f6b21b !important; color: #713f12 !important; }
/* Who can see this game? */
.gm-visibility { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.gm-visibility li { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9rem; color: #334155; }
.gm-visibility li i { width: 18px; text-align: center; margin-top: 0.2rem; }
.gm-visibility .is-on i { color: #16a34a; }
.gm-visibility .is-off i { color: #94a3b8; }
.gm-visibility .is-warn i { color: #d97706; }

/* Video / audio clips on scenario questions (players) */
.ga-media { width: 100%; margin-top: 0.75rem; border-radius: 14px; overflow: hidden; }
.ga-media--video { background: #0f172a; }
.ga-media--video video { display: block; width: 100%; max-height: 52vh; background: #0f172a; }
.ga-media--audio { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 0.9rem; background: rgba(99, 102, 241, 0.08); }
.ga-media--audio img { max-width: 100%; max-height: 30vh; border-radius: 10px; }
.ga-media--audio audio { width: 100%; max-width: 480px; }
.ga-media-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #4472c4; color: #fff; font-size: 1.35rem; }
.ga-phone-prompt .ga-media { margin-top: 0.8rem; }
.ga-chat-media { margin: 0 0 0.45rem; min-width: min(260px, 60vw); }
.ga-chat-media.ga-media--video video { max-height: 36vh; }
.ga-host-media { max-width: min(900px, 100%); margin: 0 auto; }
.ga-host-media.ga-media--video video { max-height: 56vh; }
/* Builder: clip field */
.gb-media { display: flex; flex-direction: column; gap: 0.45rem; }
.gb-media-add { display: flex; align-items: center; justify-content: center; gap: 0.55rem; padding: 0.95rem; border: 2px dashed #c7d2fe; border-radius: 12px; background: #f8faff; color: #4338ca; font-weight: 700; cursor: pointer; }
.gb-media-add:hover { background: #eef2ff; }
.gb-media--compact .gb-media-add { padding: 0.5rem 0.75rem; justify-content: flex-start; font-size: 0.85rem; border-width: 1px; }
.gb-media-preview { display: flex; align-items: flex-start; gap: 0.6rem; }
.gb-media-preview video { width: min(420px, 100%); max-height: 240px; border-radius: 10px; background: #0f172a; }
.gb-media-preview audio { flex: 1; min-width: 0; }
.gb-media-preview.is-audio { align-items: center; }
.gb-media-busy { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; color: #4338ca; font-weight: 700; font-size: 0.88rem; padding: 0.6rem 0.8rem; border-radius: 12px; background: #eef2ff; }
.gb-media-bar { flex-basis: 100%; height: 6px; border-radius: 99px; background: #c7d2fe; overflow: hidden; }
.gb-media-bar span { display: block; height: 100%; background: #4f46e5; transition: width 0.2s; }
.gb-media-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.gb-media-note.is-warn { color: #b45309; font-weight: 600; }
.gb-media-note .gm-link-btn { margin-left: 0.25rem; }
/* Builder: questions per player */
.gb-draw { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid #eef2f7; }
.gb-draw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; }
.gb-draw-head .gm-label { margin: 0; }
.gb-draw-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0.65rem 0 0.25rem; color: #334155; font-size: 0.9rem; }
.gb-draw-num { width: 5.2rem !important; display: inline-block; text-align: center; }
.gb-draw-topics { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.65rem; }
.gb-draw-topic { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.55rem 0.35rem 0.75rem; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; margin: 0; }
.gb-draw-topic-name { font-weight: 700; color: #1e293b; font-size: 0.88rem; }
.gb-draw-sum { color: #1e293b; }
@media (max-width: 575px) {
    .gb-draw-topic { width: 100%; }
    .gb-draw-topic-name { flex: 1; }
    .gb-media-preview { flex-direction: column; }
}
