:root {
    --bg: #f5f3f0;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --text: #2c2c2c;
    --text-muted: #777;
    --accent: #2e8b7b;
    --accent-hover: #267a6b;
    --danger: #d94a5a;
    --danger-hover: #c43a4a;
    --border: rgba(0, 0, 0, 0.1);
    --border-active: rgba(46, 139, 123, 0.4);
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "SF Mono", "Cascadia Code", "Fira Code", monospace;
}

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

html {
    font-size: 18px;
    -webkit-text-size-adjust: 100%;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button, a, input, select {
    touch-action: manipulation;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--accent-hover);
}

/* ========================================
   Landing
   ======================================== */

.landing {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Leave room for the leaderboard ticker so it never covers the card */
    padding: calc(1.5rem + env(safe-area-inset-top)) 1rem calc(5.5rem + env(safe-area-inset-bottom));
}

.mosaic-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position-y: 100%;
    animation: scrollMosaic 40s linear infinite;
    z-index: 0;
}

@keyframes scrollMosaic {
    0%   { background-position-y: 100%; }
    100% { background-position-y: 0%; }
}

.landing-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(245,243,240,0.6) 0%, rgba(245,243,240,0.82) 50%, rgba(245,243,240,0.95) 100%);
    z-index: 1;
}

.landing-card {
    position: relative;
    z-index: 2;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem 2.5rem;
    max-width: 560px;
    width: 100%;
    box-shadow: var(--shadow);
}

.landing-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.02em;
    color: var(--accent);
}

.landing-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.landing-form {
    margin-top: 2rem;
}

fieldset {
    border: none;
    min-width: 0;
    margin-bottom: 1.5rem;
}

legend {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.mode-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1.25rem 0.5rem;
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

@media (hover: hover) {
    .mode-card:hover {
        background: rgba(0,0,0,0.04);
        border-color: rgba(0,0,0,0.2);
    }
}

.mode-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-card:has(input:checked) {
    border-color: var(--accent);
    background: rgba(46, 139, 123, 0.06);
}

.mode-icon {
    font-size: 1.5rem;
}

.mode-label {
    font-weight: 700;
    font-size: 0.95rem;
}

.mode-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.rounds-pills {
    display: flex;
    gap: 0.5rem;
}

.round-pill {
    flex: 1;
}

.round-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.round-pill span {
    display: block;
    text-align: center;
    padding: 0.6rem;
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 600;
    transition: border-color 0.2s, background 0.2s;
}

@media (hover: hover) {
    .round-pill span:hover {
        background: rgba(0,0,0,0.04);
        border-color: rgba(0,0,0,0.2);
    }
}

.round-pill:has(input:checked) span {
    border-color: var(--accent);
    background: rgba(46, 139, 123, 0.06);
    color: var(--accent);
}

/* Organ scope selector */

.organ-scope {
    margin-top: -0.5rem;
}

.scope-hint {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.scope-select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23777' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.scope-select:focus {
    outline: none;
    border-color: var(--accent);
}

.start-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem;
    margin-top: 0.5rem;
    background: var(--accent);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

@media (hover: hover) {
    .start-btn:hover {
        background: var(--accent-hover);
        transform: translateY(-1px);
    }
}

.start-btn:active {
    transform: translateY(0);
}

/* Name input */

.name-selector {
    margin-top: -0.75rem;
}

.name-row {
    display: flex;
    gap: 0.5rem;
}

.name-input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.75rem;
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--text);
}

.name-input:focus {
    outline: none;
    border-color: var(--accent);
}

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

.dice-btn {
    padding: 0.6rem 0.9rem;
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    line-height: 1;
}

@media (hover: hover) {
    .dice-btn:hover {
        background: rgba(46, 139, 123, 0.08);
        border-color: var(--accent);
    }
}

/* Leaderboard ticker */

.ticker-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    background: rgba(10, 14, 20, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 0.55rem 0 calc(0.55rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    overflow: hidden;
}

.ticker-track {
    display: inline-block;
    white-space: nowrap;
    animation: ticker 45s linear infinite;
}

.ticker-track:nth-child(2) {
    animation-duration: 38s;
    animation-direction: reverse;
}

.ticker-item {
    display: inline-block;
    padding: 0 2.5rem;
    font-size: 0.95rem;
    font-family: var(--font-mono);
    font-weight: 600;
    color: rgba(255,255,255,0.6);
}

.ticker-rank-0 {
    color: #ffd700;
    font-size: 1.05rem;
}

.ticker-rank-1 {
    color: #c0c0c0;
    font-size: 1rem;
}

.ticker-rank-2 {
    color: #cd7f32;
    font-size: 0.97rem;
}

@keyframes ticker {
    0%   { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

.ticker-empty {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    padding: 0.3rem;
}

.btn-arrow {
    transition: transform 0.2s;
}

@media (hover: hover) {
    .start-btn:hover .btn-arrow {
        transform: translateX(4px);
    }
}

.landing-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
}

/* ========================================
   Game — image stage + controls panel
   Portrait: image on top, controls below.
   Landscape / desktop: controls in a sidebar.
   ======================================== */

.game {
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "header" "stage" "controls";
    background: #141414;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

.game-stage {
    grid-area: stage;
    position: relative;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-bg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.game-header {
    grid-area: header;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: #1c1c1c;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.menu-btn {
    flex-shrink: 0;
    padding: 0.4rem 0.9rem;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.menu-btn:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.round-counter {
    min-width: 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.round-counter strong {
    font-size: 1.05rem;
}

.mode-badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 1rem;
}

/* ========================================
   Controls panel
   ======================================== */

.game-controls {
    grid-area: controls;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-height: 52dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
    background: #1c1c1c;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.controls-bar {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: flex-end;
}

.skip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.4rem 0.6rem 0.4rem 1rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 2rem;
    font-size: 0.85rem;
    font-family: var(--font);
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.skip-count {
    padding: 0.1rem 0.5rem;
    background: rgba(255,255,255,0.12);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.skip-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.skip-btn.htmx-request {
    opacity: 0.5;
    pointer-events: none;
}

/* Organ picker */

.organ-picker {
    width: 100%;
    max-width: 600px;
}

.picker-grid,
.organ-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
}

.picker-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.picker-step.hidden {
    display: none;
}

.system-btn,
.organ-item {
    min-height: 48px;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font);
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
    hyphens: auto;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background 0.15s;
}

.system-btn:active,
.organ-item:active {
    transform: scale(0.97);
}

.organ-item.selected {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.back-btn {
    align-self: flex-start;
    min-height: 40px;
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-family: var(--font);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
}

/* Age picker */

.age-picker {
    width: 100%;
    max-width: 300px;
}

.both-form {
    display: none;
}

.age-wheel-wrapper {
    position: relative;
    width: 120px;
    margin: 0 auto;
}

.age-wheel-highlight {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 44px;
    transform: translateY(-50%);
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    background: rgba(46, 139, 123, 0.06);
    pointer-events: none;
    z-index: 1;
    border-radius: 2px;
}

.age-wheel {
    height: 220px;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
    padding: 88px 0;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    outline: none;
}

.age-wheel:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.age-wheel::-webkit-scrollbar {
    display: none;
}

.age-option {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    transition: color 0.15s, font-size 0.15s, font-weight 0.15s;
}

.age-option.selected {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
}

.confirm-btn {
    display: block;
    min-height: 48px;
    margin: 0.75rem auto 0;
    padding: 0.7rem 2.2rem;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-family: var(--font);
    font-weight: 700;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    box-shadow: var(--shadow);
}

.confirm-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

.confirm-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (hover: hover) {
    .skip-btn:hover:not(:disabled) {
        background: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.5);
    }
    .system-btn:hover,
    .organ-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.25);
        border-color: var(--accent);
    }
    .back-btn:hover {
        background: rgba(255,255,255,0.2);
    }
}

/* Portrait phones: keep the image as big as possible */

@media (max-width: 639px) and (orientation: portrait) {
    .player-name {
        display: none;
    }
    .game-header {
        padding: 0.5rem 0.75rem;
    }
    /* Compact 3-row wheel with the confirm button beside it */
    .age-form,
    .mode-both .age-picker {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        max-width: none;
    }
    .age-wheel-wrapper {
        margin: 0;
    }
    .age-wheel {
        height: 132px;
        padding: 44px 0;
    }
    .confirm-btn {
        margin: 0;
        padding: 0.7rem 1.4rem;
    }
}

/* Landscape (phones on their side, tablets, desktop): controls in a sidebar */

@media (orientation: landscape) and (min-width: 640px) {
    .game {
        grid-template-columns: minmax(0, 1fr) clamp(300px, 30vw, 440px);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas: "header header" "stage controls";
        padding-bottom: env(safe-area-inset-bottom);
    }
    .game-controls {
        max-height: none;
        justify-content: safe center;
        border-top: none;
        border-left: 1px solid rgba(255,255,255,0.08);
    }
    .picker-grid,
    .organ-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Short landscape screens (phones): tighter wheel */

@media (orientation: landscape) and (max-height: 500px) {
    .game-header {
        padding: 0.35rem 0.75rem;
    }
    .game-controls {
        gap: 0.5rem;
        padding-top: 0.5rem;
    }
    .system-btn,
    .organ-item {
        min-height: 40px;
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }
    .age-wheel {
        height: 132px;
        padding: 44px 0;
    }
}

/* ========================================
   Feedback overlay
   ======================================== */

.feedback-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.feedback-overlay.correct {
    background: rgba(46, 139, 123, 0.9);
}

.feedback-overlay.incorrect {
    background: rgba(217, 74, 90, 0.9);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.feedback-content {
    text-align: center;
    color: #fff;
}

.feedback-icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.feedback-result {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feedback-truth {
    font-size: 1rem;
    opacity: 0.85;
}

.feedback-guessed {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    font-style: italic;
}

/* ========================================
   Results & Stats
   ======================================== */

.results, .stats {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.results-card, .stats-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow);
}

.stats-card {
    max-width: 800px;
}

.results-title, .stats-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.25rem;
}

.results-mode, .stats-count {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

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

.score-card {
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.5rem 1rem;
    text-align: center;
}

.score-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

.score-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.25rem;
}

.score-breakdown {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.progress-section {
    margin-bottom: 2rem;
}

.progress-section h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.progress-table-wrap {
    max-height: 300px;
    overflow: auto;
}

.progress-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.progress-table th {
    text-align: left;
    padding: 0.4rem 0.6rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-card);
}

.progress-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.progress-table .current-session {
    background: rgba(46, 139, 123, 0.05);
}

.no-progress {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

.results-actions, .stats-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.play-again-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: background 0.2s, transform 0.15s;
}

@media (hover: hover) {
    .play-again-btn:hover {
        background: var(--accent-hover);
        transform: translateY(-1px);
        color: #fff;
    }
}

.stats-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: border-color 0.2s, color 0.2s;
}

@media (hover: hover) {
    .stats-link:hover {
        border-color: rgba(0,0,0,0.3);
        color: var(--text);
    }
}

/* Session blocks (stats page) */

.session-block {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.session-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.session-num {
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
}

.session-mode {
    font-weight: 600;
}

.session-rounds, .session-date {
    color: var(--text-muted);
}

.session-score {
    font-family: var(--font-mono);
    font-weight: 600;
}

.session-date {
    margin-left: auto;
    font-size: 0.75rem;
}

.session-details {
    border-top: 1px solid var(--border);
}

.session-details summary {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-muted);
    user-select: none;
}

.session-details summary:hover {
    color: var(--text);
}

.rounds-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.rounds-table th {
    text-align: left;
    padding: 0.4rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,0.02);
}

.rounds-table td {
    padding: 0.35rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.correct-cell { color: var(--accent); }
.wrong-cell { color: var(--danger); }

.no-sessions {
    text-align: center;
    color: var(--text-muted);
    margin: 2rem 0;
}

/* ========================================
   HTMX
   ======================================== */

.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.organ-btn { opacity: 0.5; pointer-events: none; }

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 640px) {
    .landing-card {
        padding: 1.75rem 1.25rem;
    }
    .landing-form {
        margin-top: 1.25rem;
    }
    .ticker-item {
        font-size: 0.8rem;
        padding: 0 1.5rem;
    }
    .results, .stats {
        padding: 1rem;
    }
    .progress-table th, .progress-table td {
        padding: 0.4rem;
    }
    .landing-title {
        font-size: 1.6rem;
    }
    .mode-selector {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .mode-card {
        flex-direction: row;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    .results-card, .stats-card {
        padding: 1.75rem 1.25rem;
    }
    .scores {
        grid-template-columns: 1fr;
    }
    .session-header {
        gap: 0.5rem;
    }
    .session-date {
        margin-left: 0;
        width: 100%;
    }
}
