:root {
    color-scheme: light;
    --bg: #f6f2e7;
    --bg-top: #faf7ef;
    --ink: #1c2f5a;
    --ink-soft: #2f6fcc;
    --card: #ffffff;
    --paper: #ffffff;
    --surface-soft: #eef4ff;
    --accent: #f2b84b;
    --danger: #c93a49;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.46);
    --glass-border: rgba(255, 255, 255, 0.58);
    --glass-blur: blur(16px);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1726;
    --bg-top: #182338;
    --ink: #e6edf7;
    --ink-soft: #9fc4ff;
    --card: #16243b;
    --paper: #16243b;
    --surface-soft: #1b2a43;
    --accent: #e6bf57;
    --danger: #ef7a8b;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(26, 36, 59, 0.5);
    --glass-border: rgba(164, 193, 255, 0.28);
    --glass-blur: blur(18px);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Open Sans", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% 12%, rgba(47, 111, 204, 0.24), transparent 42%),
        radial-gradient(circle at 82% 10%, rgba(242, 184, 75, 0.22), transparent 40%),
        radial-gradient(circle at 75% 90%, rgba(30, 168, 164, 0.16), transparent 44%),
        radial-gradient(circle at top, var(--bg-top) 0%, var(--bg) 72%);
    display: flex;
    justify-content: center;
    padding: 20px 16px 28px;
}

.page {
    width: min(100%, 720px);
    text-align: center;
    padding-bottom: 84px;
}

h1 {
    margin: 0;
    font-size: clamp(1.8rem, 2.8vw, 2.5rem);
}

.instructions {
    margin: 10px auto 16px;
    max-width: 560px;
    color: var(--ink-soft);
}

.top-actions {
    width: min(100%, 520px);
    margin: 0 auto 12px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(47, 111, 204, 0.18);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 999px;
    padding: 6px 12px 6px 6px;
    box-shadow: 0 6px 18px rgba(12, 27, 58, 0.12);
}

#compactProfileStatus {
    font-weight: 700;
    font-size: 0.9rem;
}

.profile-chip-button {
    border: none;
    cursor: pointer;
}

.hub-icon-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(47, 111, 204, 0.24);
    background: var(--surface-soft);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-view {
    width: min(100%, 520px);
    margin: 0 auto;
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 1100;
    padding: max(84px, calc(env(safe-area-inset-top) + 12px)) 12px 12px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 16, 31, 0.56);
}

.modal-card {
    position: relative;
    width: min(92vw, 620px);
    max-height: min(calc(100vh - 108px), 760px);
    overflow: auto;
    margin: 0 auto;
    border-radius: 16px;
    padding: 12px;
    background: linear-gradient(160deg, var(--glass-bg), rgba(255, 255, 255, 0.24));
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.modal-head h2 {
    margin: 0;
}

.modal-close {
    border: 1px solid rgba(47, 111, 204, 0.24);
    border-radius: 8px;
    background: var(--card);
    color: var(--ink);
    padding: 6px 10px;
    cursor: pointer;
}

.compact-league-overview {
    margin-top: 0;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: min(96vw, 560px);
    border-radius: 999px;
    padding: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 18px 32px rgba(12, 27, 58, 0.22);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    z-index: 20;
}

.bottom-nav-button {
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: var(--ink-soft);
    font-weight: 700;
    padding: 8px 6px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.bottom-nav-button.active {
    background: linear-gradient(135deg, rgba(242, 184, 75, 0.95), rgba(255, 216, 141, 0.85));
    color: #102543;
    box-shadow: 0 8px 24px rgba(242, 184, 75, 0.4);
}

.quick-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 auto 14px;
}

.quick-links a {
    text-decoration: none;
    color: var(--ink);
    border: 1px solid rgba(47, 111, 204, 0.2);
    background: var(--card);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
}

.hud {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.account-panel,
.league-overview,
.shop,
.leaderboard {
    width: 100%;
    margin: 14px auto 0;
    background: linear-gradient(165deg, var(--glass-bg), rgba(255, 255, 255, 0.18));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 12px 14px;
    box-shadow: var(--shadow);
    text-align: left;
}

.account-header,
.leaderboard-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.account-header h2,
.league-copy h2,
.shop h2,
.leaderboard h2 {
    margin: 0 0 6px;
    text-align: left;
    font-size: 1.1rem;
}

.account-header p,
.league-copy p,
.leaderboard-head p,
.auth-status {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.45;
}

.auth-badge,
.leaderboard-meta {
    align-self: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 800;
    background: rgba(47, 111, 204, 0.12);
    color: var(--ink);
}

.auth-badge.online {
    background: rgba(49, 153, 96, 0.14);
    color: #1f6d47;
}

.auth-badge.syncing {
    background: rgba(242, 184, 75, 0.22);
    color: #7a5400;
}

.auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 10px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 700;
}

.auth-field input {
    width: 100%;
    border: 1px solid rgba(47, 111, 204, 0.22);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: var(--paper);
    color: var(--ink);
}

.auth-field input:disabled,
.auth-field input[readonly] {
    background: rgba(47, 111, 204, 0.08);
    color: var(--ink);
}

.auth-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: end;
    grid-column: 1 / -1;
}

.league-overview {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.league-current-card {
    border-radius: 12px;
    padding: 14px;
    background:
        radial-gradient(circle at top left, rgba(242, 184, 75, 0.26), transparent 42%),
        linear-gradient(145deg, rgba(47, 111, 204, 0.08), color-mix(in srgb, var(--paper) 94%, transparent));
    border: 1px solid rgba(47, 111, 204, 0.16);
    text-align: center;
}

.league-eyebrow {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.league-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 124px;
    min-height: 46px;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 800;
    color: #102543;
    background: linear-gradient(135deg, #d3b271, #f7df99);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.league-range {
    margin: 10px 0 0;
    font-weight: 700;
    color: var(--ink-soft);
}

[data-league="bronze"] {
    background: linear-gradient(135deg, #a86a3b, #d99d6c);
    color: #fff8ef;
}

[data-league="guest"] {
    background: linear-gradient(135deg, #2d7a6b, #8fdcc8);
    color: #f4fffb;
}

[data-league="silver"] {
    background: linear-gradient(135deg, #9da7b4, #d9e0e7);
}

[data-league="gold"] {
    background: linear-gradient(135deg, #c5921f, #f4d16a);
}

[data-league="sapphire"] {
    background: linear-gradient(135deg, #2767b3, #7eb8ff);
    color: #eff6ff;
}

[data-league="ruby"] {
    background: linear-gradient(135deg, #b73052, #f3859f);
    color: #fff0f4;
}

[data-league="emerald"] {
    background: linear-gradient(135deg, #198a5f, #7be1b5);
    color: #effff8;
}

[data-league="amethyst"] {
    background: linear-gradient(135deg, #7a49c3, #c6a0ff);
    color: #fbf6ff;
}

[data-league="pearl"] {
    background: linear-gradient(135deg, #cec7d3, #fffefb);
}

[data-league="obsidian"] {
    background: linear-gradient(135deg, #243142, #66768f);
    color: #f4f7fb;
}

[data-league="diamond"] {
    background: linear-gradient(135deg, #8ec9ff, #f9fcff);
}

.hud-item {
    background: linear-gradient(165deg, var(--glass-bg), rgba(255, 255, 255, 0.12));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 10px 8px;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.hud-item-wide {
    grid-column: span 4;
}

#game {
    width: min(100%, 520px);
    height: 560px;
    margin: 0 auto;
    border: 3px solid var(--ink);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--paper) 0%, color-mix(in srgb, var(--bg) 76%, var(--paper)) 46%, var(--surface-soft) 100%);
    box-shadow: var(--shadow);
    touch-action: none;
}

#player {
    position: absolute;
    bottom: 14px;
    left: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    z-index: 3;
}

#player::before {
    content: "";
    width: 100%;
    height: 100%;
    background-image: var(--cart-image, url('einkaufswagen/Klassisch.png'));
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.16));
}

#player.cart-skin-classic { --cart-image: url('einkaufswagen/Klassisch.png'); }
#player.cart-skin-sky { --cart-image: url('einkaufswagen/Himmelblau.png'); }
#player.cart-skin-mint { --cart-image: url('einkaufswagen/Mint.png'); }
#player.cart-skin-rose { --cart-image: url('einkaufswagen/Rose.png'); }
#player.cart-skin-violet { --cart-image: url('einkaufswagen/Violett.png'); }
#player.cart-skin-jumper { --cart-image: url('einkaufswagen/Springer.png'); }

.item {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 2rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    will-change: transform;
    user-select: none;
}

.item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.emoji-item {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}


.shabbat-item {
    border: none;
    box-shadow: none;
    background: transparent;
}

.bubble-item {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.95) 0%, rgba(173, 222, 255, 0.88) 52%, rgba(110, 165, 243, 0.88) 100%);
    box-shadow: 0 8px 16px rgba(0, 32, 78, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px;
    line-height: 1.05;
}

.bubble-emoji {
    font-size: 1.2rem;
}

.bubble-text {
    font-size: 0.56rem;
    font-weight: 700;
    text-align: center;
    color: #0c2a4f;
    text-wrap: balance;
}

.shabbat-item-forbidden .bubble-text {
    color: #681515;
}

.shabbat-item-allowed {
    background: radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.96) 0%, rgba(193, 241, 215, 0.92) 52%, rgba(109, 206, 152, 0.9) 100%);
}

.powerup {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.powerup-shield {
    background: #6ab1ff;
}

.powerup-slow {
    background: #73d8c4;
}

.powerup-double {
    background: #f0c44d;
}

.powerup-life {
    background: #e8818d;
}

.powerup-grow {
    background: #9acb6f;
}

.powerup-magnet {
    background: #c38af2;
}

.overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: rgba(14, 28, 51, 0.92);
    color: #fff;
    z-index: 5;
    padding: 20px;
    text-align: center;
}

#shabbatIntroScreen {
    background: var(--paper);
    color: #102543;
}

#shabbatIntroTitle,
#shabbatIntroText {
    color: #102543;
    text-shadow: none;
}

#startScreen h2 {
    margin: 0 0 6px;
}

#startScreen p {
    margin: 0 0 12px;
    max-width: 360px;
    line-height: 1.45;
}


#startScreen h2,
#startScreen p,
#gameOverTitle,
#resultText {
    color: #f8fbff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

#resultText {
    font-weight: 700;
    line-height: 1.5;
    max-width: 34ch;
}


.mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
    max-width: 460px;
    text-align: left;
}

.mode-toggle input {
    margin: 0;
    accent-color: var(--accent);
}

#startButton,
#restartButton,
#saveLeaderboardButton,
#skipLeaderboardButton,
.auth-actions button {
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #102543;
    font-weight: 800;
    padding: 10px 18px;
    cursor: pointer;
}

.status {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(28, 47, 90, 0.95);
    color: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 4;
}

.danger {
    background: rgba(201, 58, 73, 0.94);
}

.shop-tabs {
    display: flex;
    gap: 8px;
    margin: 8px 0 10px;
}

.shop-tab {
    flex: 1;
    border: 1px solid rgba(47, 111, 204, 0.22);
    border-radius: 999px;
    padding: 8px 10px;
    background: color-mix(in srgb, var(--paper) 55%, transparent);
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
}

.shop-tab.active {
    background: linear-gradient(135deg, rgba(242, 184, 75, 0.95), rgba(255, 216, 141, 0.85));
}

.shop-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.shop-item {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 10px;
    background: color-mix(in srgb, var(--paper) 48%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.shop-item h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.shop-cart-preview {
    margin: 0 0 8px;
    border-radius: 8px;
    background: linear-gradient(160deg, rgba(47, 111, 204, 0.08), rgba(242, 184, 75, 0.14));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    padding: 6px;
}

.shop-cart-preview img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.shop-power,
.shop-description,
.shop-status {
    margin: 0 0 6px;
    font-size: 0.85rem;
}

.shop-item button {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--accent);
    color: #102543;
    font-weight: 700;
    cursor: pointer;
}

.shop-item.selected {
    border-color: #58b77f;
    background: #ebfff2;
}

.shop-item.locked {
    opacity: 0.68;
}

.coin-result {
    margin: 0 0 8px;
    font-weight: 700;
    color: #f8d37f;
}

.leaderboard-head {
    margin-bottom: 10px;
}

.league-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.league-tab {
    border: 1px solid rgba(47, 111, 204, 0.18);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(47, 111, 204, 0.06);
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.league-tab:hover,
.league-tab:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(47, 111, 204, 0.3);
    box-shadow: 0 4px 12px rgba(28, 47, 90, 0.12);
}

.league-tab.active {
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(28, 47, 90, 0.16);
}

.leaderboard ol {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.leaderboard li {
    margin: 4px 0;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 10px;
}

.leaderboard li.current-user {
    background: rgba(242, 184, 75, 0.22);
}

.leaderboard li.promotion-zone {
    background: rgba(53, 164, 97, 0.2);
    border: 1px solid rgba(53, 164, 97, 0.35);
}

.leaderboard li.demotion-zone {
    background: rgba(194, 61, 74, 0.2);
    border: 1px solid rgba(194, 61, 74, 0.35);
}

.leaderboard li.bot-entry {
    font-style: italic;
}


.developer-options {
    width: min(100%, 820px);
    margin: 0 auto 16px;
    background: rgba(8, 18, 35, 0.08);
    border: 1px solid rgba(47, 111, 204, 0.24);
    border-radius: 14px;
    padding: 14px;
}

.developer-options-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.developer-options h2 {
    margin: 0;
    font-size: 1.1rem;
}

.developer-options p {
    margin: 10px 0 0;
}

.developer-badge {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(47, 111, 204, 0.16);
    border: 1px solid rgba(47, 111, 204, 0.28);
}

.developer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}


.mobile-controls {
    margin: 16px auto 0;
    width: min(100%, 520px);
    display: none;
    gap: 12px;
}

.mobile-controls button {
    flex: 1;
    border: 2px solid var(--ink);
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    font-size: 1.4rem;
    font-weight: 700;
    padding: 10px;
    touch-action: none;
}

.hidden {
    display: none;
}

.leaderboard-optin.hidden {
    display: none !important;
}

#score,
#lives {
    display: inline-flex;
    min-width: 1.8em;
    justify-content: center;
}

.hud-roll {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    overflow: hidden;
    height: 1em;
}

.hud-roll-old,
.hud-roll-new {
    display: block;
}

.hud-roll.rolling-up {
    animation: hudRollUp 0.28s ease forwards;
}

.hud-roll.rolling-down {
    animation: hudRollDown 0.28s ease forwards;
}

.hud-glow.hud-flash-green {
    animation: hudGlowGreen 0.3s ease;
}

.hud-glow.hud-flash-red {
    animation: hudGlowRed 0.3s ease;
}

@keyframes hudRollUp {
    from { transform: translateY(0); }
    to { transform: translateY(-1em); }
}

@keyframes hudRollDown {
    from { transform: translateY(0); }
    to { transform: translateY(1em); }
}

@keyframes hudGlowGreen {
    0% { color: inherit; text-shadow: none; }
    50% { color: #2ca460; text-shadow: 0 0 10px rgba(44, 164, 96, 0.65); }
    100% { color: inherit; text-shadow: none; }
}

@keyframes hudGlowRed {
    0% { color: inherit; text-shadow: none; }
    50% { color: #c93a49; text-shadow: 0 0 10px rgba(201, 58, 73, 0.65); }
    100% { color: inherit; text-shadow: none; }
}

@media (max-width: 760px) {
    .profile-chip {
        margin-left: auto;
    }

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

    .auth-grid,
    .league-overview {
        grid-template-columns: 1fr;
    }

    .hud-item-wide {
        grid-column: span 2;
    }

    #game {
        height: 500px;
    }

    .mobile-controls {
        display: flex;
    }

    .shop-list {
        grid-template-columns: 1fr;
    }

}


.secondary {
    background: #c7d5ee;
}

.ghost {
    background: transparent;
    border: 1px solid rgba(47, 111, 204, 0.28);
    color: var(--ink);
}

.leaderboard-optin {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(100%, 320px);
    background: rgba(8, 18, 35, 0.7);
    border: 1px solid rgba(233, 244, 255, 0.34);
    border-radius: 12px;
    padding: 12px;
}

.leaderboard-optin p {
    margin: 0;
    color: #f2f8ff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#playerNameLabel {
    color: #f2f8ff;
    font-weight: 600;
}

.leaderboard-optin input {
    width: 100%;
    border: 1px solid rgba(47, 111, 204, 0.22);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: var(--paper);
    color: var(--ink);
}

.leaderboard-optin input[readonly] {
    background: rgba(47, 111, 204, 0.08);
}

.leaderboard-auth-hint {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(242, 248, 255, 0.9);
}

.auth-status.error,
.leaderboard-auth-hint.error {
    color: var(--danger);
}

.optin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}


.quick-links .theme-toggle-link {
    border: 1px solid rgba(47, 111, 204, 0.24);
    background: var(--paper, var(--card, #fff));
    color: var(--ink);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at 18% 12%, rgba(112, 167, 255, 0.22), transparent 42%),
        radial-gradient(circle at 82% 10%, rgba(230, 191, 87, 0.18), transparent 40%),
        radial-gradient(circle at 75% 90%, rgba(68, 208, 181, 0.16), transparent 44%),
        radial-gradient(circle at top, var(--bg-top) 0%, var(--bg) 72%);
}

[data-theme="dark"] .league-current-card,
[data-theme="dark"] .shop-tab,
[data-theme="dark"] .shop-item,
[data-theme="dark"] .auth-field input,
[data-theme="dark"] .leaderboard-optin input,
[data-theme="dark"] .hub-icon-button {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] #shabbatIntroScreen,
[data-theme="dark"] #shabbatIntroTitle,
[data-theme="dark"] #shabbatIntroText {
    color: var(--ink);
}
}
