:root {
    --ink: #17211b;
    --muted: #68756f;
    --soft: #f6f2e8;
    --surface: #fffdf8;
    --surface-strong: #ffffff;
    --line: #e8dec8;
    --green: #0b6b3a;
    --green-2: #11834d;
    --green-soft: #e6f4ea;
    --gold: #f5c542;
    --gold-2: #ffe59b;
    --red: #d73a31;
    --red-soft: #ffe8e4;
    --black: #111111;
    --blue: #246bfe;
    --shadow-soft: 0 10px 28px rgba(23, 33, 27, 0.08);
    --shadow-lift: 0 18px 44px rgba(23, 33, 27, 0.14);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --tap: 48px;
    --speed: 180ms;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    background: var(--soft);
}

body {
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 197, 66, 0.2), transparent 32rem),
        radial-gradient(circle at 95% 18%, rgba(11, 107, 58, 0.14), transparent 24rem),
        linear-gradient(180deg, #fff9e8 0%, #f8f3e8 48%, #f5f0e5 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.45;
    overscroll-behavior-y: none;
}

button,
input {
    font: inherit;
}

button {
    touch-action: manipulation;
}

.app-container {
    width: min(100%, 620px);
    min-height: 100vh;
    margin: 0 auto;
    background:
        linear-gradient(180deg, rgba(255, 253, 248, 0.86), rgba(255, 253, 248, 0.94)),
        repeating-linear-gradient(135deg, rgba(11, 107, 58, 0.035) 0 1px, transparent 1px 16px);
    box-shadow: 0 0 0 1px rgba(232, 222, 200, 0.78);
    display: flex;
    flex-direction: column;
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: white;
    background:
        linear-gradient(90deg, rgba(215, 58, 49, 0.95) 0 20%, rgba(245, 197, 66, 0.96) 20% 38%, rgba(17, 131, 77, 0.98) 38% 100%),
        var(--green);
    box-shadow: 0 10px 28px rgba(11, 107, 58, 0.2);
}

.logo-area,
.header-actions {
    display: flex;
    align-items: center;
}

.logo-area {
    gap: 0.75rem;
    min-width: 0;
}

.app-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: white;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    object-fit: cover;
    flex: 0 0 auto;
}

.logo-area h1 {
    font-size: 1.22rem;
    font-weight: 900;
    line-height: 1.05;
}

.logo-area .subtitle {
    margin-top: 0.1rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.header-actions {
    gap: 0.55rem;
    flex: 0 0 auto;
}

.offline-pill {
    display: none;
    align-items: center;
    min-height: 32px;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.16);
    font-size: 0.76rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.icon-btn {
    width: var(--tap);
    height: var(--tap);
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    color: white;
    background: rgba(0, 0, 0, 0.14);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform var(--speed) ease, background var(--speed) ease;
}

.icon-btn:active {
    transform: scale(0.94);
}

.content-area {
    flex: 1;
}

.view {
    display: none;
    min-height: calc(100vh - 72px);
    padding: 1rem;
}

.view.active {
    display: block;
    animation: viewIn 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes viewIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-hero {
    position: relative;
    min-height: 212px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    overflow: hidden;
    color: white;
    background:
        linear-gradient(135deg, rgba(11, 107, 58, 0.98), rgba(17, 131, 77, 0.9)),
        var(--green);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: auto -18% -38% 8%;
    height: 160px;
    border-radius: 50%;
    background: rgba(245, 197, 66, 0.34);
    transform: rotate(-4deg);
}

.home-hero::after {
    content: "";
    position: absolute;
    right: 0.85rem;
    top: 0.85rem;
    width: 74px;
    height: 18px;
    border-top: 5px solid var(--red);
    border-bottom: 5px solid var(--gold);
    opacity: 0.75;
}

.hero-copy,
.hero-orb {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    color: var(--green);
    background: rgba(255, 229, 155, 0.94);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.home-hero .eyebrow {
    color: #18331f;
}

.hero-copy h2 {
    max-width: 10ch;
    margin: 0.72rem 0 0.5rem;
    font-size: 2.45rem;
    line-height: 0.95;
    font-weight: 950;
}

.hero-copy p {
    max-width: 28rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.98rem;
    font-weight: 650;
}

.hero-orb {
    width: 112px;
    aspect-ratio: 1;
    border-radius: 32px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    transform: rotate(5deg);
}

.hero-orb img {
    width: 86%;
    height: 86%;
    object-fit: contain;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin: 0.9rem 0 1rem;
}

.quick-stats div {
    min-height: 72px;
    padding: 0.85rem 0.65rem;
    border: 1px solid rgba(232, 222, 200, 0.9);
    border-radius: var(--radius-md);
    background: rgba(255, 253, 248, 0.86);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.quick-stats strong,
.quick-stats span {
    display: block;
}

.quick-stats strong {
    color: var(--green);
    font-size: 1.2rem;
    font-weight: 950;
}

.quick-stats span {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card {
    border: 1px solid rgba(232, 222, 200, 0.95);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: rgba(255, 253, 248, 0.95);
    box-shadow: var(--shadow-soft);
}

.instructions-card {
    margin-bottom: 1rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.section-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--gold-2);
}

.section-title h3 {
    font-size: 1.05rem;
    font-weight: 950;
}

.step-list {
    display: grid;
    gap: 0.55rem;
    list-style: none;
}

.step-list li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    color: #2f3a34;
    font-weight: 700;
}

.step-list li span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--green);
    font-size: 0.78rem;
    font-weight: 950;
}

.team-inputs {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.input-group label,
.game-mode-label {
    display: block;
    margin-bottom: 0.42rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.input-group input {
    width: 100%;
    min-height: 54px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--ink);
    background: var(--surface-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    font-size: 1.04rem;
    font-weight: 800;
    outline: none;
    transition: border-color var(--speed) ease, box-shadow var(--speed) ease, transform var(--speed) ease;
}

.input-group input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(11, 107, 58, 0.12);
}

.game-mode-selector {
    margin-bottom: 1rem;
}

.game-mode-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #eee4d1;
}

.game-mode-btn {
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    color: var(--muted);
    background: transparent;
    font-size: 0.95rem;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    transition: transform var(--speed) ease, background var(--speed) ease, color var(--speed) ease, box-shadow var(--speed) ease;
}

.game-mode-btn.active {
    color: var(--ink);
    background: var(--surface-strong);
    box-shadow: 0 8px 20px rgba(23, 33, 27, 0.1);
}

.game-mode-btn:active,
.cat-btn:active,
.btn:active {
    transform: scale(0.97);
}

.game-mode-hint {
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 650;
    text-align: center;
}

.btn {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--ink);
    background: var(--surface-strong);
    box-shadow: 0 8px 18px rgba(23, 33, 27, 0.08);
    font-size: 1rem;
    font-weight: 950;
    text-transform: none;
    transition: transform var(--speed) ease, box-shadow var(--speed) ease, filter var(--speed) ease;
}

.btn:hover {
    filter: brightness(1.015);
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--green), var(--green-2));
    box-shadow: 0 12px 24px rgba(11, 107, 58, 0.24);
}

.btn-large {
    min-height: 60px;
    font-size: 1.08rem;
}

.btn-secondary {
    color: var(--ink);
    background: #efe6d3;
}

.btn-success {
    color: white;
    background: linear-gradient(135deg, #0c8a4c, #20b869);
    box-shadow: 0 12px 26px rgba(12, 138, 76, 0.25);
}

.btn-skip {
    color: #9f2f29;
    background: var(--red-soft);
}

.btn-danger {
    color: white;
    background: linear-gradient(135deg, #c9332b, #ef5b51);
}

.btn-text {
    min-height: 46px;
    color: var(--muted);
    background: transparent;
    box-shadow: none;
    font-size: 0.95rem;
}

.share-action {
    margin-top: 0.35rem;
}

.secondary-action {
    margin-top: 0.2rem;
}

.screen-heading,
.turn-indicator {
    margin-bottom: 1rem;
}

.screen-heading h2,
.turn-indicator h2,
.settings-heading h2 {
    margin-top: 0.55rem;
    font-size: 2rem;
    line-height: 1;
    font-weight: 950;
}

.screen-heading p,
.turn-indicator p {
    margin-top: 0.5rem;
    color: var(--muted);
    font-weight: 700;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.78rem;
    padding-bottom: 1.5rem;
}

.cat-btn {
    position: relative;
    min-height: 132px;
    border: 1px solid rgba(232, 222, 200, 0.92);
    border-radius: var(--radius-md);
    padding: 1rem 0.75rem;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
    color: var(--ink);
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
    transition: transform var(--speed) ease, box-shadow var(--speed) ease, border-color var(--speed) ease;
}

.cat-btn:hover {
    box-shadow: var(--shadow-lift);
}

.cat-btn::after {
    content: "";
    position: absolute;
    inset: auto -18px -24px auto;
    width: 72px;
    height: 72px;
    border-radius: 28px;
    background: rgba(245, 197, 66, 0.22);
    transform: rotate(18deg);
}

.cat-btn.ghanaian {
    color: white;
    background:
        linear-gradient(150deg, rgba(11, 107, 58, 0.98), rgba(17, 131, 77, 0.94)),
        var(--green);
    border-color: rgba(11, 107, 58, 0.3);
}

.cat-btn.ghanaian::after {
    background: rgba(245, 197, 66, 0.36);
}

.cat-btn.general {
    background: linear-gradient(150deg, #ffffff, #f9f3e4);
}

.cat-btn.nsfw {
    color: #7f221d;
    background: linear-gradient(150deg, #fffafa, #ffe8e4);
    border-color: rgba(215, 58, 49, 0.28);
}

.cat-icon {
    position: relative;
    z-index: 1;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 1.65rem;
}

.general .cat-icon {
    background: var(--green-soft);
}

.cat-name {
    position: relative;
    z-index: 1;
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.1;
    font-weight: 950;
}

.ready-screen-content {
    min-height: calc(100vh - 112px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}

.ready-orbit {
    width: 126px;
    height: 126px;
    border-radius: 38px;
    display: grid;
    place-items: center;
    background: var(--surface-strong);
    box-shadow: var(--shadow-lift);
    animation: floatBadge 3s ease-in-out infinite;
}

.ready-orbit img {
    width: 88%;
    height: 88%;
    object-fit: contain;
}

@keyframes floatBadge {
    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }
    50% {
        transform: translateY(-8px) rotate(2deg);
    }
}

.ready-team-name {
    max-width: 12ch;
    color: var(--ink);
    font-size: 2.55rem;
    line-height: 0.96;
    font-weight: 950;
}

.ready-category-badge,
.category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.42rem 0.78rem;
    border: 1px solid rgba(11, 107, 58, 0.14);
    border-radius: 999px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 0.82rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ready-hint {
    color: var(--muted);
    font-weight: 750;
}

.ready-start-btn {
    margin-top: 0.65rem;
    animation: callToPlay 1.8s ease-in-out infinite;
}

@keyframes callToPlay {
    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 12px 24px rgba(11, 107, 58, 0.24);
    }
    50% {
        transform: translateY(-3px);
        box-shadow: 0 16px 32px rgba(11, 107, 58, 0.28);
    }
}

.countdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, rgba(245, 197, 66, 0.28), transparent 18rem),
        rgba(12, 26, 18, 0.9);
    backdrop-filter: blur(8px);
}

.countdown-overlay.active {
    display: flex;
}

.countdown-number {
    min-width: 190px;
    min-height: 190px;
    display: grid;
    place-items: center;
    border-radius: 50px;
    color: white;
    background: linear-gradient(135deg, var(--red), var(--green));
    font-size: 5.5rem;
    font-weight: 950;
    opacity: 0;
    transform: scale(0.62);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.36);
}

.countdown-number.pop {
    animation: countdownPop 700ms cubic-bezier(0.2, 0.9, 0.15, 1.2) forwards;
}

.countdown-number.go {
    background: linear-gradient(135deg, var(--green), #25c56f);
    font-size: 3.8rem;
}

@keyframes countdownPop {
    0% {
        opacity: 0;
        transform: scale(0.62);
    }
    58% {
        opacity: 1;
        transform: scale(1.08);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.game-hud {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.hud-chip {
    min-height: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 253, 248, 0.92);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.hud-label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hud-chip strong {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 950;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.score-chip {
    align-items: center;
    text-align: center;
    background: var(--black);
}

.score-chip .hud-label,
.score-chip strong {
    color: white;
}

.score-chip strong {
    font-size: 1.45rem;
}

.score-pop {
    animation: scorePop 260ms ease;
}

@keyframes scorePop {
    50% {
        transform: scale(1.08);
    }
}

.timer-bar {
    margin-bottom: 0.9rem;
    padding: 0.85rem;
    border-radius: var(--radius-md);
    background: rgba(255, 253, 248, 0.9);
    box-shadow: var(--shadow-soft);
}

.timer-display {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.timer-value {
    color: var(--green);
    font-size: 2.05rem;
    line-height: 1;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

.timer-value.warning {
    color: var(--red);
    animation: warningPulse 700ms ease-in-out infinite;
}

.timer-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.timer-progress-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7dcc7;
}

.timer-progress-fill {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), var(--gold));
    transition: width 1s linear, background var(--speed) ease;
}

.timer-progress-fill.warning {
    background: linear-gradient(90deg, var(--red), #ff8b5d);
}

@keyframes warningPulse {
    50% {
        transform: scale(1.08);
    }
}

.game-card-container {
    perspective: 1000px;
}

.game-card {
    position: relative;
    min-height: 44vh;
    margin-bottom: 0.85rem;
    padding: 1.25rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    text-align: center;
    border: 1px solid rgba(232, 222, 200, 0.94);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 232, 0.96)),
        var(--surface-strong);
    box-shadow: var(--shadow-lift);
}

.game-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, var(--red) 0 22%, var(--gold) 22% 42%, var(--green) 42% 100%);
    height: 7px;
}

.game-card.correct-flash {
    animation: correctCard 360ms ease;
}

.game-card.skip-flash {
    animation: skipCard 320ms ease;
}

@keyframes correctCard {
    45% {
        transform: translateY(-4px) rotateX(2deg);
        box-shadow: 0 22px 54px rgba(11, 107, 58, 0.2);
    }
}

@keyframes skipCard {
    35% {
        transform: translateX(-6px) rotate(-1deg);
    }
    70% {
        transform: translateX(6px) rotate(1deg);
    }
}

.card-header {
    display: flex;
    justify-content: center;
}

.main-word {
    margin: 0.4rem 0;
    color: var(--ink);
    font-size: 2.45rem;
    line-height: 1;
    font-weight: 950;
    overflow-wrap: anywhere;
}

.taboo-section {
    border: 1px solid rgba(215, 58, 49, 0.14);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: #fff4ee;
    transition: opacity var(--speed) ease, transform var(--speed) ease, padding var(--speed) ease;
}

.taboo-section h4 {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.8rem;
    color: #a4312b;
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.taboo-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.taboo-item {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.7rem;
    border: 1px solid rgba(215, 58, 49, 0.15);
    border-radius: 999px;
    color: #8f2a25;
    background: white;
    font-size: 0.86rem;
    font-weight: 850;
    box-shadow: 0 5px 14px rgba(215, 58, 49, 0.07);
}

.taboo-section.taboo-hidden {
    padding: 0;
    border-color: transparent;
    background: transparent;
}

.taboo-section.taboo-hidden h4,
.taboo-section.taboo-hidden .taboo-list {
    display: none;
}

.taboo-toggle-btn {
    min-height: 42px;
    width: fit-content;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.52rem;
    margin: 0 auto;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: white;
    font-size: 0.82rem;
    font-weight: 900;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: #c7ccca;
    transition: background var(--speed) ease;
}

.toggle-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
    transition: transform var(--speed) ease;
}

.toggle-switch.on {
    background: var(--green);
}

.toggle-switch.on::after {
    transform: translateX(14px);
}

.game-controls {
    position: sticky;
    bottom: 0.75rem;
    z-index: 20;
    display: grid;
    grid-template-columns: 0.9fr 1.25fr;
    gap: 0.7rem;
    padding: 0.3rem 0;
}

.game-controls .btn {
    min-height: 64px;
    font-size: 1.08rem;
}

.round-end-hero {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    text-align: center;
}

.reward-burst {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: var(--gold-2);
    box-shadow: var(--shadow-soft);
    font-size: 2rem;
    animation: rewardIn 540ms cubic-bezier(0.2, 0.9, 0.15, 1.2);
}

@keyframes rewardIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.82) rotate(-8deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0);
    }
}

.round-end-hero h2 {
    font-size: 2.1rem;
    line-height: 1;
    font-weight: 950;
}

.round-end-subtitle {
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 750;
}

.final-score-card {
    margin-bottom: 0.85rem;
    padding: 1.25rem;
    border: 1px solid rgba(245, 197, 66, 0.45);
    border-radius: var(--radius-lg);
    text-align: center;
    background:
        linear-gradient(180deg, #fffefa, #fff5da),
        var(--surface-strong);
    box-shadow: var(--shadow-lift);
}

.final-score-label {
    color: var(--green);
    font-size: 0.74rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.final-score-number {
    color: var(--green);
    font-size: 4rem;
    line-height: 0.98;
    font-weight: 950;
}

.final-score-total {
    margin: 0.25rem 0 1rem;
    color: var(--muted);
    font-weight: 750;
}

.final-score-stats {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    align-items: center;
    gap: 1rem;
}

.final-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.final-stat-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 1rem;
}

.final-stat-icon.correct {
    color: var(--green);
    background: var(--green-soft);
}

.final-stat-icon.skipped {
    color: var(--red);
    background: var(--red-soft);
}

.final-stat-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.final-stat-value {
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 950;
}

.final-stat-label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.final-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--line);
}

.scoreboard {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 0.85rem;
}

.team-score-box {
    min-height: 104px;
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.team-score-box h3 {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-score-box span {
    display: block;
    margin-top: 0.25rem;
    color: var(--ink);
    font-size: 2.35rem;
    line-height: 1;
    font-weight: 950;
}

.round-summary-card {
    margin-bottom: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 253, 248, 0.94);
    box-shadow: var(--shadow-soft);
}

.round-summary-title {
    margin-bottom: 0.7rem;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.round-summary-list {
    max-height: 220px;
    overflow-y: auto;
    list-style: none;
    display: grid;
    gap: 0.4rem;
}

.round-summary-item {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 800;
}

.round-summary-item.correct {
    color: #195d36;
    background: var(--green-soft);
}

.round-summary-item.skipped {
    color: #8f2a25;
    background: var(--red-soft);
}

.round-summary-item .result-mark {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    font-weight: 950;
}

#settingsScreen {
    padding-bottom: 2rem;
}

.setting-item {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
}

.setting-item label {
    color: var(--ink);
    font-weight: 850;
}

.setting-item input[type="checkbox"] {
    width: 44px;
    height: 26px;
    accent-color: var(--green);
}

.setting-item input[type="radio"] {
    accent-color: var(--green);
}

.about-card h3,
.modal-content h3 {
    font-size: 1.25rem;
    font-weight: 950;
}

.setting-actions {
    margin-top: 1rem;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(16, 24, 19, 0.58);
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
}

.modal-content {
    width: min(100%, 410px);
    padding: 1.25rem;
    border: 1px solid rgba(232, 222, 200, 0.95);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    box-shadow: var(--shadow-lift);
    text-align: center;
    animation: modalIn 240ms ease;
}

.modal-content p,
.modal-content ol {
    margin: 0.8rem 0 1rem;
    color: var(--muted);
    font-weight: 700;
}

.modal-content ol {
    text-align: left;
}

.modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (min-width: 440px) {
    .view {
        padding: 1.25rem;
    }

    .offline-pill {
        display: inline-flex;
    }

    .team-inputs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cat-btn {
        min-height: 144px;
    }
}

@media (max-width: 360px) {
    .home-hero {
        grid-template-columns: 1fr;
    }

    .hero-orb {
        display: none;
    }

    .hero-copy h2,
    .main-word,
    .ready-team-name {
        font-size: 2rem;
    }

    .quick-stats {
        gap: 0.45rem;
    }

    .quick-stats div {
        padding-inline: 0.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}
