/**
 * Trivia1.com Standalone App Styles
 * Extracted from inline layout CSS + view inline styles
 */

/* ========================================
   Base / Typography
   ======================================== */
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 100 900;
    font-display: optional;
    src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZ9hiA.woff2) format('woff2');
}

:root {
    --primary-color: #6366f1;
    --primary-color-rgb: 99, 102, 241;
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a35;
    --bg-tertiary: #2d2d50;
    --bg-hover: #3a3a5a;
    --text-primary: #f1f1f1;
    --text-secondary: #b0b0cc;
    --text-tertiary: #808099;
    --border-color: #2a2a4a;
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, .3);
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }

/* Disable tap highlight, tap-to-zoom, and text selection on interactive elements */
a, button, input, select, textarea, label, .trivia1-btn, .trivia-choice-btn {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ========================================
   App Shell
   ======================================== */
.trivia1-app {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   Header — Sticky with Hamburger Menu
   ======================================== */
.trivia1-header {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.trivia1-logo {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.15em;
    line-height: 1;
}

.trivia1-logo-word {
    font-family: 'Outfit', Inter, sans-serif;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

.trivia1-logo .trivia1-logo-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3em;
    height: 1.3em;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75em;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.trivia1-logo-inline {
    font-size: 0.85em;
    vertical-align: baseline;
}

/* Hamburger Button */
.trivia1-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.trivia1-menu-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Sparkle button — opens the T1 chatbot. Same hit-target as the
   menu button but tinted indigo so it reads as the AI affordance. */
.trivia1-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(139,92,246,0.18));
    border: 1px solid rgba(139,92,246,0.45);
    border-radius: 0.5rem;
    color: #c4b5fd;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s;
}

.trivia1-chat-btn:hover {
    background: linear-gradient(135deg, rgba(99,102,241,0.32), rgba(139,92,246,0.32));
    color: #fff;
    transform: translateY(-1px);
}

/* Slide-out Nav */
.trivia1-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
}

.trivia1-nav-overlay.active {
    display: block;
}

.trivia1-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 301;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.trivia1-nav.active {
    right: 0;
}

.trivia1-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.trivia1-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.trivia1-nav-close:hover {
    color: var(--text-primary);
}

.trivia1-nav-links {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

/* Apply the same look to anchor children AND any form>button child so the
   logout button (which can't be an anchor — POST + CSRF) shares styling
   instead of inheriting browser defaults. */
.trivia1-nav-links li a,
.trivia1-nav-links li form button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.15s;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

.trivia1-nav-links li a:hover,
.trivia1-nav-links li form button:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.trivia1-nav-links li a i,
.trivia1-nav-links li form button i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--primary-color);
}

/* Forms in the nav are layout-invisible — let the inner button fill the row. */
.trivia1-nav-links li form {
    margin: 0;
    padding: 0;
}

/* Subscribe CTA stands out from the rest of the nav. */
.trivia1-nav-links li a.trivia1-nav-cta {
    color: var(--primary-color);
    font-weight: 600;
}
.trivia1-nav-links li a.trivia1-nav-cta i {
    color: var(--primary-color);
}

/* ========================================
   Main Content
   ======================================== */
.trivia1-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

/* ========================================
   Footer
   ======================================== */
.trivia1-footer {
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    border-top: 1px solid var(--border-color);
}

.trivia1-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.trivia1-footer a:hover {
    color: var(--primary-color);
}

.trivia1-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.15em;
    color: var(--text-secondary);
    line-height: 1;
}

.trivia1-footer-logo .trivia1-logo-word {
    font-family: 'Outfit', Inter, sans-serif;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

.trivia1-footer-logo .trivia1-logo-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7em;
    font-weight: 800;
    line-height: 1;
}

/* ========================================
   Card
   ======================================== */
.trivia1-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.trivia1-card + .trivia1-card {
    margin-top: 1.5rem;
}

/* Registration / login form intro copy + fine-print under the
   submit button. Match the rest of the form's left-align rhythm. */
.t1-form-intro {
    margin: -0.25rem 0 1.25rem;
    text-align: left;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.t1-form-fineprint {
    margin: 0.75rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-tertiary);
}

/* Login page's "Don't have an account?" panel. Distinct card under
   the login form with a left-aligned icon + body + CTA stack so it
   doesn't read as a trailing footer line. */
.t1-noaccount-card {
    text-align: left;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(139, 92, 246, 0.10));
    border-color: rgba(99, 102, 241, 0.28);
}
.t1-noaccount-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.t1-noaccount-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.6rem;
    background: rgba(99, 102, 241, 0.18);
    color: var(--primary-color);
    font-size: 1rem;
}
.t1-noaccount-body {
    flex: 1 1 auto;
    min-width: 0;
}
.t1-noaccount-heading {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}
.t1-noaccount-text {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.t1-noaccount-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.t1-noaccount-actions .trivia1-btn {
    margin: 0;
}
@media (max-width: 480px) {
    .t1-noaccount-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    .t1-noaccount-actions .trivia1-btn {
        width: 100%;
    }
}

.trivia1-card h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.trivia1-card h2 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.trivia1-card p {
    margin: 0 0 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   Form Elements
   ======================================== */
.trivia1-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.trivia1-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Selects: draw our own chevron so the field doesn't render with the
   browser default (invisible on dark themes) or, worse, get clipped
   because appearance:none stripped it. */
select.trivia1-input {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 1.1rem;
    cursor: pointer;
}

/* Number inputs: hide the awkward native up/down spinner buttons
   (they're tiny, dark, and impossible to hit on mobile). */
input[type="number"].trivia1-input {
    -moz-appearance: textfield;
}
input[type="number"].trivia1-input::-webkit-outer-spin-button,
input[type="number"].trivia1-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.trivia1-input-code {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.trivia1-input-lg {
    font-size: 1.1rem;
    text-align: center;
}

.trivia1-btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    margin-top: 1rem;
}

/* When .trivia1-btn lives in a flex row, the default width:100% +
   margin-top:1rem fight the layout. Use .trivia1-btn-inline alongside
   to opt out of those defaults. */
.trivia1-btn.trivia1-btn-inline {
    width: auto;
    margin-top: 0;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Compact vertical form stack — labels above inputs, snug spacing.
   Used on the admin dashboard's Impersonate + Grant cards. */
.t1-stack-sm > * + * {
    margin-top: 0.75rem;
}
.t1-field {
    display: block;
}
.t1-field-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}
.t1-field-label-hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    opacity: 0.7;
}
/* Buttons inside a t1-stack-sm shouldn't have the default top margin
   since the stack itself handles spacing. */
.t1-stack-sm .trivia1-btn {
    margin-top: 0.25rem;
}

/* ========================================
   Admin chrome — sidebar + header layout
   ======================================== */
.t1-admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 4rem);
    width: 100%;
}
.t1-admin-sidebar {
    background: var(--bg-secondary, #1a1a2e);
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 1.25rem 0.5rem 2rem;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}
.t1-admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 1rem 1.5rem;
    color: var(--text-primary, #fff);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
}
.t1-admin-sidebar-brand-tag {
    margin-left: 0.25rem;
    padding: 0.1rem 0.5rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(251,191,36,0.18);
    color: #fbbf24;
    border-radius: 0.25rem;
    font-weight: 700;
}
.t1-admin-sidebar-nav { display: flex; flex-direction: column; }
.t1-admin-sidebar-section {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    margin: 1.2rem 0 0.35rem 1rem;
}
.t1-admin-sidebar-section:first-of-type { margin-top: 0; }
.t1-admin-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 1rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.4rem;
    margin: 0 0.25rem;
    transition: background 0.15s, color 0.15s;
    border: none;
    background: none;
    width: calc(100% - 0.5rem);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}
.t1-admin-link i {
    width: 16px;
    text-align: center;
    color: var(--primary-color, #6366f1);
    opacity: 0.85;
}
.t1-admin-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.t1-admin-link.is-active { background: rgba(99,102,241,0.18); color: #fff; }
.t1-admin-link.is-active i { color: #a5b4fc; opacity: 1; }
.t1-admin-link-form { margin: 0; padding: 0; }

.t1-admin-main { display: flex; flex-direction: column; min-width: 0; }
.t1-admin-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-secondary, #1a1a2e);
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: 0 1px 0 rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.15);
}
.t1-admin-burger {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary, #fff);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
}
.t1-admin-header-titles { flex: 1; min-width: 0; }
.t1-admin-eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
    margin: 0;
}
.t1-admin-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.15rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.t1-admin-header-actions { display: flex; align-items: center; gap: 0.5rem; }
.t1-admin-user-chip {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    color: rgba(255,255,255,0.75);
}
.t1-admin-user-chip i { margin-right: 0.3rem; opacity: 0.6; }

.t1-admin-content {
    padding: 1.5rem 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}
/* Automatic vertical spacing between top-level sections — cards,
   grids, paragraphs alike. The `> * + *` pattern matches every
   child after the first. */
.t1-admin-content > * + * {
    margin-top: 1rem;
}
/* Cards inside admin chrome should fill the available width and
   left-align. The marketing .trivia1-card variant caps at 420px
   and centers text, which is wrong for tables and forms. */
.t1-admin-content .trivia1-card {
    max-width: none;
    text-align: left;
}

/* Tier filter chips on the Users page. */
.t1-admin-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.t1-admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.75);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}
.t1-admin-chip:hover { background: rgba(255,255,255,0.07); color: #fff; }
.t1-admin-chip.is-active {
    background: var(--primary-color, #6366f1);
    border-color: var(--primary-color, #6366f1);
    color: #fff;
}
.t1-admin-chip-count {
    font-size: 0.7rem;
    opacity: 0.7;
    padding: 0.05rem 0.4rem;
    background: rgba(0,0,0,0.25);
    border-radius: 999px;
}
.t1-admin-chip.is-active .t1-admin-chip-count { background: rgba(255,255,255,0.25); opacity: 1; }

/* Tables in the admin chrome. */
.t1-admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.t1-admin-table thead tr { text-align: left; border-bottom: 1px solid rgba(255,255,255,0.15); }
.t1-admin-table th {
    padding: 0.6rem 0.75rem 0.6rem 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}
.t1-admin-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.06); }
.t1-admin-table td { padding: 0.7rem 0.75rem 0.7rem 0; vertical-align: middle; }
.t1-admin-table-actions { text-align: right; white-space: nowrap; }
.t1-admin-user-cell { display: flex; flex-direction: column; }
.t1-admin-user-email { font-weight: 500; }
.t1-admin-user-name { font-size: 0.75rem; opacity: 0.55; margin-top: 0.1rem; }

.t1-admin-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.4);
    color: #c7d2fe;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}
.t1-admin-action-btn:hover { background: rgba(99,102,241,0.3); color: #fff; border-color: rgba(99,102,241,0.7); }
.t1-admin-action-btn i { font-size: 0.7rem; }

.t1-admin-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: capitalize;
}
.t1-admin-tier-badge i { font-size: 0.65rem; }
.t1-admin-tier-free     { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); }
.t1-admin-tier-pro      { background: rgba(99,102,241,0.18); color: #a5b4fc; }
.t1-admin-tier-pro_plus { background: rgba(251,191,36,0.18); color: #fcd34d; }
.t1-admin-tier-admin    { background: rgba(239,68,68,0.18); color: #fca5a5; }

/* Choice rows on the bank-question add form — radio + text input live
   on one row, radio left-aligned, text input fills the rest. Replaces
   the old "pick a numeric index" UX. */
.t1-choice-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.4rem 0;
}
.t1-choice-row input[type="radio"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary-color, #6366f1);
    flex: 0 0 auto;
    cursor: pointer;
}
.t1-choice-row .trivia1-input {
    flex: 1;
}

/* Native <dialog> modals — used for edit forms on category tables.
   The browser-default styling is harsh white on dark; theme it to
   match the admin chrome. ::backdrop dims everything behind. */
.t1-admin-dialog {
    background: var(--bg-secondary, #1a1a2e);
    color: var(--text-primary, #fff);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 480px;
    width: calc(100% - 2rem);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.t1-admin-dialog::backdrop {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

/* Pagination links (Laravel's default Bootstrap-style). */
.t1-admin-content nav[role="navigation"] {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}
.t1-admin-content nav[role="navigation"] svg { width: 1rem; height: 1rem; }

/* Mobile: sidebar collapses to a slide-in drawer toggled by the burger. */
@media (max-width: 768px) {
    .t1-admin-shell { grid-template-columns: 1fr; }
    .t1-admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 50;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.2s ease-out;
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
        height: 100vh;
    }
    .t1-admin-sidebar.is-open { transform: translateX(0); }
    .t1-admin-burger { display: inline-flex; align-items: center; justify-content: center; }
    .t1-admin-content { padding: 1rem; }
    .t1-admin-user-chip { display: none; }
}

.trivia1-btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.trivia1-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.trivia1-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.trivia1-btn-secondary:hover {
    background: var(--bg-hover);
}

.trivia1-btn i {
    margin-right: 0.5rem;
}

.trivia1-label {
    display: block;
    text-align: left;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.trivia1-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: left;
}

.trivia1-code-error {
    color: #ef4444;
    font-size: 0.9rem;
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 0.5rem;
    text-align: center;
}

/* ========================================
   Join Page — Teams List
   ======================================== */
.trivia1-teams-joined {
    margin-top: 1.5rem;
    text-align: left;
}

.trivia1-teams-joined h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
    font-weight: 600;
    text-align: center;
}

.trivia1-team-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.trivia1-team-row:last-child {
    border-bottom: none;
}

.trivia1-team-row i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* ========================================
   Play Page — Game Phases
   ======================================== */
/* Play page needs bottom padding for fixed score bar */
.trivia1-play-container {
    width: 100%;
    max-width: 500px;
    padding-bottom: 4rem;
}

.trivia1-phase-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.trivia1-team-label {
    margin-bottom: 0.5rem;
}

/* Team-name inline edit (waiting screen). Pencil button sits flush
   next to the team name; clicking swaps in the input form below. */
.t1-team-name-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.4rem;
    padding: 0.25rem 0.4rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.t1-team-name-edit-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-color: rgba(99, 102, 241, 0.4);
}

.t1-team-name-form {
    display: flex;
    gap: 0.4rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
    justify-content: center;
}
.t1-team-name-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.4rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    max-width: 18rem;
}
.t1-team-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.t1-team-name-save,
.t1-team-name-cancel {
    flex: 0 0 auto;
    padding: 0.5rem 0.85rem;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
}
.t1-team-name-save {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.t1-team-name-save:hover { filter: brightness(1.05); }
.t1-team-name-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.t1-team-name-cancel {
    background: transparent;
    color: var(--text-secondary);
}
.t1-team-name-cancel:hover {
    background: rgba(148, 163, 184, 0.1);
}
.t1-team-name-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin: 0.25rem 0 0;
}

.trivia1-subtitle {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* Question phase */
.trivia1-question-card {
    text-align: left;
}

.trivia1-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.trivia1-q-number {
    font-weight: 700;
    color: var(--text-secondary);
}

.trivia1-timer {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.trivia1-q-text {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.trivia1-answer-submitted {
    text-align: center;
    padding: 1rem 0;
}

.trivia1-answer-submitted i {
    color: #22c55e;
}

.trivia1-answer-submitted p {
    margin: 0.5rem 0 0;
    font-weight: 600;
}

/* Echo of the player's chosen answer ("Your answer: B — Tokyo") so
   they can verify their selection without unsubmitting. */
.trivia1-submitted-answer {
    margin: 0.4rem 0.5rem 0.25rem !important;
    padding: 0.45rem 0.75rem;
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.32);
    border-radius: 8px;
    font-weight: 500 !important;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
    word-break: break-word;
}
.trivia1-submitted-answer:empty {
    display: none;
}

/* Leaderboard heading */
.trivia1-leaderboard-heading {
    text-align: center;
}

.trivia1-leaderboard-heading i {
    color: #f59e0b;
}

/* Final phase */
.trivia1-final-icon {
    color: #f59e0b;
    margin-bottom: 1rem;
}

.trivia1-final-leaderboard {
    text-align: left;
    margin: 1rem 0;
}

.trivia1-final-winner {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.75rem 0 0.25rem;
    color: #f59e0b;
}

/* Time's Up */
.trivia-times-up {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1.25rem;
    animation: timesUpPulse 0.5s ease-out;
}

.trivia-times-up .times-up-icon {
    color: #f59e0b;
}

.trivia-times-up .times-up-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
    color: #f59e0b;
}

.trivia-times-up .times-up-subtitle {
    margin-top: 0.25rem;
    opacity: 0.7;
    font-size: 0.95rem;
}

@keyframes timesUpPulse {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Timer expired */
.trivia1-timer.timer-expired {
    color: #ef4444;
}

/* Full-screen video with question drawer overlay */
#phase-question.has-video {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 130px);
    min-height: calc(100dvh - 130px);
}

.trivia-video-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: #000;
    overflow: hidden;
}

.trivia-video-fullscreen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    transform: scale(1.1);
}

/* Header bar — round info + Q number + timer pinned at top */
.trivia-player-header-bar {
    display: none;
}

#phase-question .trivia-player-header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary, #9ca3af);
}

#phase-question.has-video .trivia-player-header-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.trivia-player-header-bar .header-round-info { opacity: 0.85; }
.trivia-player-header-bar .header-q-number { opacity: 0.9; }
.trivia-player-header-bar .header-timer {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary-color);
}
#phase-question.has-video .trivia-player-header-bar .header-timer {
    color: #fbbf24;
}
.trivia-player-header-bar .header-timer i { margin-right: 0.15rem; }

/* Drawer overlay — slides up from bottom over video */
#phase-question.has-video .trivia1-question-card {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 0.75rem 0.75rem 0 0;
    margin: 0;
    max-height: 50%;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    animation: drawerSlideUp 0.4s ease-out;
}

@keyframes drawerSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

#phase-question.has-video .trivia1-q-text {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0 0 0.375rem;
    line-height: 1.25;
}

/* Fade out choices after answer submitted or time expired */
.trivia-choices.choices-faded {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transition: opacity 0.4s ease, max-height 0.4s ease;
}

/* Question image */
.trivia-image-wrap {
    text-align: center;
    margin: 0.5rem 0;
}
.trivia-question-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 0.5rem;
    object-fit: contain;
}

.trivia-choices {
    transition: opacity 0.4s ease, max-height 0.4s ease;
    max-height: 500px;
}

#phase-question.has-video .trivia-choice-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

#phase-question.has-video .trivia-choice-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

#phase-question.has-video .trivia1-answer-submitted,
#phase-question.has-video .trivia-times-up {
    color: #fff;
}

/* Disable zoom, pinch, text selection on player pages */
.trivia1-play-container {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    overscroll-behavior: none;
}

.trivia1-play-container * {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.trivia-enable-sound-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid #fbbf24;
    border-radius: 2rem;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.trivia-enable-sound-btn:hover {
    background: rgba(251, 191, 36, 0.3);
}

.trivia-enable-sound-btn i {
    margin-right: 0.4rem;
}

/* Score Bar */
.trivia1-score-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    z-index: 100;
}

.trivia1-score-value {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Footer round chip — left side of the persistent score bar so the
   player always sees "Round 2 of 3 · Q4/10" without scrolling. */
.t1-score-bar-round {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.t1-score-bar-divider {
    color: var(--text-secondary);
    opacity: 0.5;
    margin: 0 0.4rem;
}

.t1-score-bar-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-right: 0.4rem;
    font-size: 0.85rem;
}

/* Play view subheader — sits below the global site header and shows
   game title / venue / team so the player always knows which game
   they're in (the global header is just the brand logo). */
.t1-play-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 1rem;
    margin: 0 0 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
}

.t1-play-subheader-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.t1-play-subheader-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t1-play-subheader-venue {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.t1-play-subheader-team {
    flex-shrink: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

@media (max-width: 480px) {
    .t1-play-subheader {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    .t1-play-subheader-title { font-size: 0.85rem; }
    .t1-play-subheader-venue { font-size: 0.72rem; }
    .t1-play-subheader-team { font-size: 0.72rem; padding: 0.2rem 0.5rem; }
}

/* Round transition banner — drops above the leaderboard during the
   round_complete phase so the player gets a clear visual beat between
   rounds. Hidden by default; rendered by player.js renderRoundBanner(). */
.t1-round-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    margin: 0 0 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.18));
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 0.75rem;
    text-align: center;
}

.t1-round-banner-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    opacity: 0.85;
}

.t1-round-banner-headline {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.t1-round-banner-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ========================================
   Resume Game Banner
   ======================================== */
.trivia1-resume-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border-color: rgba(99, 102, 241, 0.3);
}

.trivia1-resume-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

/* ========================================
   Share Team Link
   ======================================== */
.trivia1-share-bar {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

.trivia1-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.trivia1-share-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.trivia1-share-btn.copied {
    border-color: #22c55e;
    color: #22c55e;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 480px) {
    .trivia1-card {
        padding: 1.5rem;
    }

    .trivia1-main {
        padding: 1.5rem 1rem;
    }
}

/* ========================================
   SEO Landing Sections
   ======================================== */
.trivia1-landing-sections {
    width: 100%;
    max-width: 600px;
    margin-top: 3rem;
}

.trivia1-section {
    text-align: center;
    padding: 3rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.trivia1-section:last-child {
    border-bottom: 1px solid var(--border-color);
}

.trivia1-section-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.trivia1-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.trivia1-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 1.25rem;
}

.trivia1-section p:last-child {
    margin-bottom: 0;
}

.trivia1-feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: left;
    margin-top: 1.5rem;
}

.trivia1-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.trivia1-feature-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.trivia1-feature-item div {
    flex: 1;
}

.trivia1-feature-item strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.trivia1-feature-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========================================
   Host / About Pages
   ======================================== */
.trivia1-page-container {
    width: 100%;
    max-width: 520px;
}

.trivia1-page-container h1 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
}

.trivia1-page-container p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.trivia1-steps {
    text-align: left;
    margin: 1.5rem 0;
}

.trivia1-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.trivia1-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.trivia1-step-content h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.trivia1-step-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Change answer button */
.trivia1-change-answer-btn {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
}

.trivia1-change-answer-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ============================================
   Pricing Table
   ============================================ */
.t1-pricing-table {
    width: 100%;
}
.t1-pricing-header {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color, #2a2a3e);
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
}
.t1-pricing-feature-label {
    text-align: left;
}
.t1-pricing-pro {
    color: var(--primary-color);
}
.t1-pricing-row {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color, #2a2a3e);
    font-size: 0.85rem;
    align-items: center;
}
.t1-pricing-feature {
    text-align: left;
    color: var(--text-secondary);
}
.t1-pricing-feature i {
    width: 1.2rem;
    text-align: center;
    margin-right: 0.3rem;
    color: var(--text-tertiary, #6b7280);
}
.t1-pricing-value {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
}
.t1-pricing-highlight {
    color: var(--primary-color);
    font-weight: 600;
}

/* Upgrade prompt banner */
.t1-upgrade-banner {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.t1-upgrade-banner a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}
.t1-upgrade-banner a:hover {
    text-decoration: underline;
}

/* ============================================
   Registration — Plan Selector & Modal
   ============================================ */
.t1-plan-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-primary);
    border: 1px solid var(--border-color, #374151);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.t1-plan-trigger:hover { border-color: var(--primary-color); }
.t1-plan-trigger-icon {
    width: 2rem; height: 2rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-color);
    color: #fff; border-radius: 0.4rem; font-size: 0.85rem;
}
.t1-plan-trigger-name { font-weight: 600; font-size: 0.95rem; }
.t1-plan-trigger-price { font-size: 0.8rem; color: var(--text-secondary); }

/* Plan modal */
.t1-plan-modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s;
}
.t1-plan-modal-overlay.active { opacity: 1; pointer-events: auto; }
.t1-plan-modal {
    background: var(--bg-secondary, #1e1e2e);
    border-radius: 1rem 1rem 0 0;
    padding: 1.25rem;
    width: 100%; max-width: 520px;
    max-height: 85vh; overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.t1-plan-modal-overlay.active .t1-plan-modal { transform: translateY(0); }

/* Billing toggle */
.t1-billing-toggle {
    display: flex; gap: 0;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 0.2rem;
    margin-bottom: 1rem;
}
.t1-billing-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0.4rem;
    transition: all 0.2s;
}
.t1-billing-btn.active {
    background: var(--primary-color);
    color: #fff;
}

/* Plan cards */
.t1-plan-card {
    background: var(--bg-primary);
    border: 2px solid transparent;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.t1-plan-card:hover { border-color: var(--border-color, #374151); }
.t1-plan-card.selected { border-color: var(--primary-color); background: rgba(99,102,241,0.08); }
.t1-plan-card.featured { border-color: var(--primary-color); }
.t1-plan-badge {
    position: absolute; top: -0.5rem; right: 0.75rem;
    background: var(--primary-color); color: #fff;
    font-size: 0.65rem; font-weight: 700;
    padding: 0.15rem 0.5rem; border-radius: 0.25rem;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.t1-plan-card-top {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.t1-plan-card-icon {
    width: 2.25rem; height: 2.25rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-secondary, #1e1e2e);
    border-radius: 0.5rem; font-size: 0.9rem;
    color: var(--primary-color);
}
.t1-plan-card-name { font-weight: 700; font-size: 1rem; }
.t1-plan-card-price { font-size: 0.85rem; color: var(--text-secondary); }
.t1-plan-card-features {
    display: flex; flex-direction: column; gap: 0.3rem;
    font-size: 0.8rem; color: var(--text-secondary);
    margin-bottom: 0.75rem;
}
.t1-plan-select-btn {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color, #374151);
    background: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
}
.t1-plan-select-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.t1-plan-card.selected .t1-plan-select-btn {
    background: var(--primary-color); color: #fff; border-color: var(--primary-color);
}

/* ========================================
   Host (/host): Rounds & Question Banks
   ========================================
   The setup form's busiest section. Stacks each round in its own
   card, and each bank assignment in a labelled sub-card so every
   control has a visible name. */
.t1-host-rounds-fieldset {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    padding: 1.25rem 1.25rem 1.1rem;
    margin: 0;
    background: rgba(15, 14, 27, 0.55);
}
.t1-host-rounds-legend {
    padding: 0 0.55rem;
    margin: 0 0 0.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary, #fff);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.t1-host-rounds-legend i { color: #a5b4fc; }
.t1-host-rounds-intro {
    margin: 0 0 1rem;
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.65);
}
.t1-host-rounds-intro a { color: #a5b4fc; }

/* Iconed upgrade CTA inside the rounds fieldset. Replaces the
   previous inline "Upgrade" hyperlink so the call-to-action is a
   visually distinct button. */
.t1-host-cta-row {
    margin: 0 0 1.25rem;
}
.t1-host-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: #c4b5fd;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    margin: 0;
    width: auto;
}
.t1-host-upgrade-btn:hover {
    background: rgba(99, 102, 241, 0.28);
    color: #ddd6fe;
}
.t1-host-upgrade-btn-sm {
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    margin-top: 0.5rem;
}
.t1-host-add-bank-hint .t1-host-upgrade-btn {
    margin-left: calc(1.25rem + 0.4rem);
}

/* ============================================
   /host — desktop / tablet 2-column layout
   ============================================
   Mobile (default): cards stack vertically inside the t1-stack
   shell. Desktop: form on the left, sticky "How It Works" panel
   on the right. The form card grows to fill its column; the help
   panel sticks so the steps stay visible while the host scrolls
   the (taller) form. */
@media (min-width: 1024px) {
    .t1-host-layout {
        max-width: 1180px;
        display: grid;
        grid-template-columns: minmax(0, 1.5fr) minmax(280px, 360px);
        align-items: start;
        gap: 1.75rem;
    }
    .t1-host-layout > * + * {
        /* override t1-stack's stack-spacing — grid handles gap */
        margin-top: 0;
    }
    .t1-host-form-card {
        max-width: 100%;
    }
    .t1-host-help-card {
        position: sticky;
        top: 1.5rem;
        max-width: 100%;
    }
}

@media (min-width: 1440px) {
    .t1-host-layout {
        max-width: 1320px;
        grid-template-columns: minmax(0, 1.6fr) minmax(300px, 400px);
        gap: 2rem;
    }
}
.t1-host-rounds-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    flex-wrap: wrap;
}
.t1-host-rounds-stepper-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}
.t1-host-rounds-stepper-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.t1-host-rounds-stepper-controls span {
    min-width: 1.75em;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
}

/* Each round card. Subtle indigo-tinted bg + accent border to read as
   a level below the outer card. */
.t1-host-round-card {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.06), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 12px;
    padding: 1rem 1.1rem 1.1rem;
    margin-bottom: 1rem;
}
.t1-host-round-card:last-of-type { margin-bottom: 0; }
.t1-host-round-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}
.t1-host-round-tag {
    font-size: 11px;
    font-weight: 700;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.t1-host-round-chip {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.22);
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: #c4b5fd;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* A single labelled field within a round/bank card. */
.t1-host-field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.75rem; }
.t1-host-field:last-child { margin-bottom: 0; }
.t1-host-field-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.65);
}
.t1-host-field-label .opt {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.45);
    margin-left: 0.25rem;
}
.t1-host-field-help {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

/* Two fields side-by-side: count + difficulty. Collapses to stacked
   on narrow viewports. */
.t1-host-field-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(140px, 1fr);
    gap: 0.75rem;
    margin-bottom: 0;
}
.t1-host-field-row > .t1-host-field { margin-bottom: 0; }
@media (max-width: 460px) {
    .t1-host-field-row { grid-template-columns: 1fr; }
}

/* Bank sub-card inside a round. Slight tint, accent border. */
.t1-host-bank-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-left: 3px solid rgba(99, 102, 241, 0.6);
    border-radius: 9px;
    padding: 0.85rem 0.9rem 0.9rem 1rem;
    margin-bottom: 0.65rem;
}
.t1-host-bank-card:last-of-type { margin-bottom: 0; }
.t1-host-bank-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}
.t1-host-bank-num {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a5b4fc;
}
.t1-host-bank-remove {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s;
}
.t1-host-bank-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.55);
}

/* Empty / add-bank states. */
.t1-host-empty-banks {
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.65rem;
    background: rgba(251, 191, 36, 0.10);
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: 8px;
    font-size: 12.5px;
    color: #fcd34d;
}
.t1-host-add-bank {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 9px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed rgba(99, 102, 241, 0.45);
    color: #c4b5fd;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.t1-host-add-bank:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.7);
}
.t1-host-add-bank:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-style: solid;
}
.t1-host-add-bank-hint {
    margin: 0.45rem 0 0;
    font-size: 11.5px;
    color: #fcd34d;
}

/* Section-divider between the title/venue group and the rounds group
   on /host. Adds visible airspace without an extra card. */
.t1-host-section-rule {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    margin: 1.1rem 0 1rem;
    border: 0;
}

/* ========================================
   New-game notice (end-game screen)
   ========================================
   Shown when the host has created a successor session with
   "keep teams". Players still polling on the old session see it
   inside their Game Over screen with a pulsing border + glow so
   the call to action survives the celebration. */
.t1-new-game-notice {
    position: relative;
    display: none;            /* JS toggles to "block" */
    margin: 0 0 1rem;
    padding: 1.4rem 1.25rem;
    border-radius: 18px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #ec4899 100%);
    box-shadow: 0 16px 40px -10px rgba(99, 102, 241, 0.45);
    overflow: hidden;
    animation: t1NewGamePulse 2.4s ease-in-out infinite;
    isolation: isolate;
}
.t1-new-game-notice-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.22), transparent 60%);
    z-index: -1;
    animation: t1NewGameGlow 4s ease-in-out infinite;
}
.t1-new-game-notice-eyebrow {
    display: inline-block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    opacity: 0.88;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.t1-new-game-notice-join {
    background: #fff !important;
    color: #4338ca !important;
    border: 0 !important;
    font-weight: 700 !important;
    padding: 0.65rem 1.25rem !important;
}
.t1-new-game-notice-stay {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    color: #fff !important;
    padding: 0.65rem 1rem !important;
}
@keyframes t1NewGamePulse {
    0%, 100% { box-shadow: 0 16px 40px -10px rgba(99, 102, 241, 0.45); }
    50%      { box-shadow: 0 16px 40px -10px rgba(139, 92, 246, 0.75); }
}
@keyframes t1NewGameGlow {
    0%, 100% { transform: scale(1)   rotate(0deg); }
    50%      { transform: scale(1.15) rotate(180deg); }
}

/* ========================================
   Home / Join landing — polished hero + feature cards
   ========================================
   Replaces the old border-stripe `.trivia1-section` layout with a
   real card grid + a louder hero so the entry point feels like a
   product, not a wireframe. */

.t1-join-hero {
    text-align: center;
    padding: 2rem 1.5rem 1.75rem;
}
.t1-join-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #c4b5fd;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.85rem;
}
.t1-join-hero-eyebrow i { color: #fcd34d; }
.t1-join-hero-title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.7rem, 5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}
.t1-join-hero-sub {
    margin: 0 auto 1.3rem;
    max-width: 36ch;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.7);
}
.t1-join-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 420px;
    margin: 0 auto;
}
.t1-join-code-input {
    text-align: center;
    text-transform: uppercase;
    font-family: 'Poppins', 'SF Mono', Menlo, monospace;
    font-size: clamp(1.5rem, 6vw, 1.85rem);
    letter-spacing: 0.3em;
    font-weight: 700;
    padding: 0.85rem 1rem;
}
.t1-join-code-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.3em;
}
.t1-join-submit {
    font-size: 1rem;
    padding: 0.85rem 1.25rem;
    font-weight: 700;
}

/* "or" divider between the join form and the host link. */
.t1-join-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem auto 1rem;
    max-width: 420px;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.t1-join-divider::before,
.t1-join-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.t1-join-host-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    max-width: 420px;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: var(--text-primary, #fff);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, border-color 0.15s;
}
.t1-join-host-link:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(139, 92, 246, 0.45);
}
.t1-join-host-link > i:first-child {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
}
.t1-join-host-link strong { font-weight: 700; }

/* Feature grid — proper cards instead of the old border-stripe
   sections. Auto-fit so 1 column on phones, 2 on tablets+. */
.t1-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}
.t1-feature-card {
    padding: 1.1rem 1.15rem 1.15rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.t1-feature-card:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}
.t1-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.t1-feature-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
}
.t1-feature-card p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
}

/* Final loud "host?" CTA. Gradient bg, pulsing glow, two buttons. */
.t1-host-cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 1.75rem 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #ec4899 100%);
    color: #fff;
    text-align: center;
    box-shadow: 0 18px 40px -12px rgba(99, 102, 241, 0.5);
}
.t1-host-cta-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.18), transparent 60%);
    z-index: -1;
    animation: t1HostCtaGlow 6s ease-in-out infinite;
}
@keyframes t1HostCtaGlow {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50%      { transform: scale(1.15) rotate(180deg); }
}
.t1-host-cta-icon {
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
    color: rgba(255, 255, 255, 0.95);
}
.t1-host-cta h2 {
    margin: 0 0 0.45rem;
    font-size: 1.45rem;
    font-weight: 800;
}
.t1-host-cta p {
    margin: 0 auto 1.1rem;
    max-width: 38ch;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}
.t1-host-cta-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.t1-host-cta-actions .trivia1-btn-primary {
    background: #fff !important;
    color: #4338ca !important;
    border: 0 !important;
    font-weight: 700 !important;
    padding: 0.7rem 1.2rem !important;
}
.t1-host-cta-secondary {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 0.7rem 1rem !important;
}

/* Scan-QR button under the join form. Same width as the join
   submit so the column reads as one stack. */
.t1-join-scan-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 420px;
    margin: 0.6rem auto 0;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    color: var(--text-primary, #fff);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.t1-join-scan-btn i {
    color: #a5b4fc;
}
.t1-join-scan-btn:hover {
    background: rgba(99, 102, 241, 0.14);
    border-color: rgba(139, 92, 246, 0.55);
    border-style: solid;
    color: #fff;
}
.t1-join-scan-btn:active { transform: translateY(1px); }

/* QR scanner dialog — small modal that holds the live video. */
.t1-qr-dialog {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--bg-secondary, #161620);
    color: var(--text-primary, #fff);
    padding: 0;
    border-radius: 14px;
    max-width: 420px;
    width: calc(100% - 2rem);
    overflow: hidden;
}
.t1-qr-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}
.t1-qr-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}
.t1-qr-dialog-header i { color: #a5b4fc; margin-right: 4px; }
.t1-qr-dialog-close {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
}
.t1-qr-dialog-close:hover { color: #fff; }
.t1-qr-dialog-stage {
    position: relative;
    min-height: 280px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.t1-qr-dialog-status {
    margin: 0;
    padding: 1rem;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}
.t1-qr-dialog-status[data-kind="error"] { color: #fca5a5; }
.t1-qr-reader {
    width: 100%;
}
.t1-qr-reader video {
    width: 100% !important;
    height: auto !important;
    border-radius: 0;
}
.t1-qr-dialog-help {
    margin: 0;
    padding: 0.65rem 1rem 0.85rem;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
}

/* Loading / permission placeholder inside the QR dialog stage.
   Replaces the bare paragraph-on-black look with a centred,
   readable hint block — what the visitor sees BEFORE the camera
   feed arrives (or if it never does). */
.t1-qr-dialog-placeholder {
    width: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1.25rem;
    text-align: center;
    background: linear-gradient(160deg, rgba(99,102,241,0.10), rgba(0,0,0,0.7));
    color: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
}
.t1-qr-dialog-placeholder i { color: #c4b5fd; }
.t1-qr-dialog-placeholder .t1-qr-dialog-status {
    margin: 0;
    padding: 0;
    font-size: 13.5px;
    max-width: 32ch;
    line-height: 1.5;
}
.t1-qr-dialog-placeholder .t1-qr-dialog-status[data-kind="error"] {
    color: #fca5a5;
}
.t1-qr-dialog-placeholder .t1-qr-dialog-status strong {
    color: #fff;
}
/* When the live video kicks in, lock the reader to a sane height. */
.t1-qr-reader {
    width: 100%;
    background: #000;
}

/* ========================================
   /host on mobile — squeeze the padding stack
   ========================================
   Outer card (32px) + fieldset (20px) + round (17px) + bank (17px)
   eats >100px of horizontal width on a 375px phone. Override the
   desktop-friendly numbers under 480px so the form fields breathe
   and the bank-picker chevron stops fighting long category names. */
@media (max-width: 480px) {
    /* Outer marketing card: still cushion the top/bottom, but kill
       the horizontal hug so nested cards can use the real screen. */
    .trivia1-card {
        padding: 1.25rem 0.85rem;
    }

    /* Fieldset around the rounds section. */
    .t1-host-rounds-fieldset {
        padding: 0.85rem 0.7rem 0.95rem;
    }
    .t1-host-rounds-legend {
        font-size: 0.9rem;
    }

    /* Each round card. Bank-card is nested inside this. */
    .t1-host-round-card {
        padding: 0.75rem 0.7rem 0.85rem;
        margin-bottom: 0.75rem;
    }
    .t1-host-round-header {
        margin-bottom: 0.7rem;
        padding-bottom: 0.45rem;
    }

    /* Bank sub-card: flatten it. On desktop the box has its own
       background, border, and 1rem inner padding so each bank reads
       as a card-in-a-card. On mobile that nesting wastes width — drop
       to a left-border accent only and reclaim ~30px per row. */
    .t1-host-bank-card {
        background: transparent;
        border: 0;
        border-left: 2px solid rgba(99, 102, 241, 0.55);
        border-radius: 0;
        padding: 0.25rem 0 0.4rem 0.6rem;
        margin-bottom: 0.85rem;
    }
    .t1-host-bank-card-header {
        margin-bottom: 0.5rem;
    }

    /* Two-up Questions/Difficulty grid keeps falling to one column
       below 460px (existing rule); make sure the gap is tight too. */
    .t1-host-field-row {
        gap: 0.5rem;
    }

    /* Ensure the bank picker has room for its chevron + can show the
       full category name before truncating. Reset the per-input inline
       padding shenanigans for selects specifically, then let the
       chevron's 2.5rem right reserve do its job. */
    .t1-host-bank-card select.trivia1-input {
        padding-left: 0.75rem;
        padding-right: 2.4rem;
        background-position: right 0.7rem center;
    }
}
