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

body {
    font-family: 'Source Code Pro', 'Arial', sans-serif;
    background: #161d29;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
}

/* All paragraphs: Arial, light weight */
p {
    font-family: 'Arial', sans-serif;
    font-weight: 300;
}

/* Ensure fonts are applied */
html {
    font-family: 'Source Code Pro', 'Arial', sans-serif;
}

:root {
    --footer-ad-h: 50px;
    --privacy-h: 32px;
}

@media (min-width: 768px) {
    :root {
        --footer-ad-h: 90px;
    }
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    margin-top: 20px;
    position: relative;
    z-index: 2;
    padding: 50px 20px 20px 20px;
    min-height: calc(100vh - 50px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: visible;
    box-sizing: border-box;
    background-color: #161d29;
}

.container > .main-content {
    min-width: 0;
}

/* (nav is sticky by default; no special 768+ override needed) */

@media (min-width: 1024px) {
    .container {
        padding: 10px 20px 20px 20px;
    }
}

.container > .header {
    order: 1;
}

.container > .row-title {
    order: 1;
}

.container > .main-content {
    order: 2;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    margin-top: 10px;
    padding-top: 0px;
    flex-shrink: 0;
    position: relative;
    z-index: 100;
    width: 100%;
}

.title {
    font-family: 'Source Code Pro', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 40px;
    color: #ffffff;
    margin: 0;
    flex-shrink: 0;
}

.tagline {
    font-family: 'Source Code Pro', 'Arial', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    flex-shrink: 0;
    text-align: right;
}

.header-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: -10px 0 20px;
    color: rgba(255, 255, 255, 0.75);
}

.hint-title {
    font-family: 'Source Code Pro', 'Arial', sans-serif;
    font-size: 13px;
    line-height: 18px;
}

.hint-edit {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 13px;
    line-height: 18px;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.hint-edit:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Intro section (top of page) */
.intro {
    width: 100%;
    max-width: 100%;
    margin-bottom: 24px;
    padding: 0;
}

.intro h1 {
    font-family: 'Source Code Pro', 'Arial', sans-serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.3;
    color: #ffffff;
    margin: 0 0 12px;
}

.intro p {
    font-family: 'Jost', 'Arial', sans-serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 16px;
}

.intro h2 {
    font-family: 'Source Code Pro', 'Arial', sans-serif;
    font-weight: 500;
    font-size: 1.15rem;
    color: #ffffff;
    margin: 20px 0 8px;
}

.intro h2:first-of-type {
    margin-top: 0;
}

.intro ul {
    margin: 0 0 16px;
    padding-left: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

.intro li {
    margin-bottom: 4px;
}

.main-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px 300px;
    gap: 10px;
    align-items: start;
    justify-content: start;
    width: 100%;
    margin: 0 auto;
    min-height: 0;
}

/* Row title: full-width bar above main content, title left, Connect to Claude flushed right */
.row-title {
    margin: 0;
    padding: 0;
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Connect to Claude button — hidden */
.connect-claude-btn {
    display: none !important;
    margin-left: auto;
    align-items: center;
    gap: 7px;
    padding: 4px 10px 4px 6px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #111827;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    cursor: pointer;
    transition: box-shadow 0.15s, background 0.15s;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
    flex-shrink: 0;
}
.connect-claude-btn:hover {
    background: #f3f4f6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}
.connect-claude-btn__icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
.connect-claude-btn__label {
    flex-shrink: 0;
}
/* Toggle pill */
.connect-claude-btn__toggle {
    width: 26px;
    height: 15px;
    border-radius: 8px;
    background: #d1d5db;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}
.connect-claude-btn__toggle::after {
    content: '';
    position: absolute;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.connect-claude-btn--on .connect-claude-btn__toggle {
    background: #22c55e;
}
.connect-claude-btn--on .connect-claude-btn__toggle::after {
    transform: translateX(11px);
}

/* Connect to Claude modal — light mode */
.claude-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.claude-modal[hidden] { display: none; }
.claude-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}
.claude-modal__dialog {
    position: relative;
    background: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 28px 24px 24px;
    width: min(400px, 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    color: #111827;
    font-family: 'Jost', 'Arial', sans-serif;
}
.claude-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.claude-modal__close:hover { color: #111827; background: #f3f4f6; }
/* Brand header */
.claude-modal__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
}
.claude-modal__brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}
.claude-modal__title {
    margin: 0 0 2px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    font-family: 'Jost', 'Arial', sans-serif;
}
.claude-modal__subtitle {
    margin: 0;
    font-size: 0.78rem;
    color: #6b7280;
}
/* Sections */
.claude-modal__section { margin-bottom: 4px; }
.claude-modal__text {
    margin: 0 0 16px;
    font-size: 0.88rem;
    line-height: 1.55;
    color: #374151;
}
.claude-modal__text strong { color: #111827; }
.claude-modal__text code {
    padding: 1px 5px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'Source Code Pro', monospace;
    color: #374151;
}
/* Continue with Anthropic CTA */
.claude-modal__continue-btn {
    width: 100%;
    padding: 11px 16px;
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: 'Jost', 'Arial', sans-serif;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background 0.15s;
    margin-bottom: 16px;
}
.claude-modal__continue-btn:hover { background: #374151; }
/* Key step (revealed after Continue) */
.claude-modal__key-step {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
}
.claude-modal__step-label {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #374151;
}
.claude-modal__key-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.claude-modal__key-input {
    flex: 1;
    min-width: 0;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.82rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 7px 10px;
    background: #ffffff;
    color: #111827;
    outline: none;
}
.claude-modal__key-input:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.15);
}
.claude-modal__save-btn {
    padding: 7px 16px;
    background: #111827;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.84rem;
    font-family: 'Jost', 'Arial', sans-serif;
    white-space: nowrap;
    transition: background 0.15s;
}
.claude-modal__save-btn:hover { background: #374151; }
.claude-modal__hint {
    margin: 0;
    font-size: 0.78rem;
    color: #9ca3af;
}
.claude-modal__error {
    margin: 8px 0 0;
    font-size: 0.82rem;
    color: #dc2626;
}
/* Connected state */
.claude-modal__success {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #16a34a;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
}
.claude-modal__success svg { width: 20px; height: 20px; }
.claude-modal__disconnect-btn {
    margin-top: 16px;
    padding: 7px 16px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 0.82rem;
    color: #6b7280;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.claude-modal__disconnect-btn:hover {
    color: #dc2626;
    border-color: #fca5a5;
}

/* Share button in row-title — light mode pill, flushed right */
.share-title-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px 4px 8px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: #111827;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    cursor: pointer;
    transition: box-shadow 0.15s, background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10);
}
.share-title-btn:hover {
    background: #f3f4f6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}
.share-title-btn svg {
    width: 13px;
    height: 13px;
    color: #111827;
}

/* Share modal close button positioning */
.share-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 8px;
    line-height: 1;
}

/* With AI modal (MCP instructions) */
.with-ai-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}
.with-ai-modal[hidden] { display: none; }
.with-ai-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.with-ai-modal__dialog {
    position: relative;
    background: #161d29;
    color: rgba(255, 255, 255, 0.92);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.with-ai-modal__title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}
.with-ai-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 4px;
}
.with-ai-modal__text {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
}
.with-ai-modal__text kbd {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-size: 0.85em;
}
.with-ai-modal__btn {
    margin-top: 0.5rem;
}

.main-content .wheel-section {
    grid-row: 1;
    grid-column: 1;
    position: relative;
    z-index: 0;
}

.main-content .modal-section {
    grid-row: 1;
    grid-column: 2;
    position: relative;
    z-index: 2;
}

.main-content .ad-section {
    grid-row: 1;
    grid-column: 3;
}

.main-content .content-sections-wrap {
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
}

/* Item-style row: About, How to use, FAQ in one row, share ~30% each (equal thirds) */
.content-items-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* iOS-style glass effect for article cards */
.content-item {
    min-width: 0;
    border-radius: 12px;
    padding: 1.25rem 1.25rem 1.5rem;
    scroll-margin-top: 70px;
}

/* Dark mode: article cards when no background image */
.container:not(.has-background) .content-item {
    background: rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
}
.container:not(.has-background) .content-item__title {
    color: #ffffff;
}
.container:not(.has-background) .content-item__content,
.container:not(.has-background) .content-item__content p,
.container:not(.has-background) .content-item .how-to-use-steps li,
.container:not(.has-background) .content-item__content h3,
.container:not(.has-background) .content-item__content a {
    color: rgba(255, 255, 255, 0.92);
}
.container:not(.has-background) .content-item__content a:hover {
    color: #ffffff;
}

/* Light mode: article cards when has background image */
.container.has-background .content-item {
    background: rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #333;
}

.content-item__title {
    font-family: 'Source Code Pro', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0 0 20px 0;
}
.container.has-background .content-item__title {
    color: #333;
}

.content-item__content {
    font-family: 'Arial', sans-serif;
    font-weight: 300;
}
.container.has-background .content-item__content {
    color: #333;
}

.content-item__content p,
.content-item .how-to-use-steps li {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
}
.container.has-background .content-item__content p,
.container.has-background .content-item .how-to-use-steps li {
    color: #333;
}

.content-item__content p:last-child,
.content-item .how-to-use-steps li:last-child {
    margin-bottom: 0;
}

.content-item__content h3 {
    font-family: 'Source Code Pro', sans-serif;
    font-size: 1rem;
    margin: 1rem 0 0.35rem 0;
}
.container.has-background .content-item__content h3 {
    color: #333;
}

.content-item__content h3:first-of-type {
    margin-top: 0;
}

.content-item__content a {
    text-decoration: underline;
}
.container.has-background .content-item__content a {
    color: #333;
}
.container.has-background .content-item__content a:hover {
    color: #111;
}

.content-item .how-to-use-steps {
    margin: 0 0 0 1.25rem;
    padding: 0;
    list-style: decimal;
}

.content-item .how-to-use-steps li {
    margin: 0 0 0.5rem 0;
}

/* Tablet: stack items in one column */
@media (max-width: 900px) {
    .content-items-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {
    .main-content .content-sections-wrap {
        width: 100%;
        max-width: 100%;
    }
    .content-item {
        width: 100%;
        max-width: 100%;
    }
}



/* Upload icon button (same style family as add-btn) */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    height: 32px;
    min-height: 32px;
    min-width: 32px;
    background: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    transition: background 0.2s, color 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.icon-btn i,
.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Upload button: ensure always visible */
.icon-btn--upload {
    flex-shrink: 0;
    opacity: 1;
    visibility: visible;
}

/* Tooltip: white background, black text, rounded, arrow pointing down, above upload button */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
}

.tooltip-content {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1.4;
    color: #000000;
    background: #ffffff;
    border-radius: 8px;
    white-space: normal;
    width: 300px;
    min-width: 100px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 9999;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #ffffff;
}

.tooltip-wrapper:hover .tooltip-content,
.tooltip-wrapper:focus-within .tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* Programmatic show for onboarding tooltips (dismiss after 3s) */
.tooltip-content--visible {
    opacity: 1;
    visibility: visible;
}

/* Full-width wrapper for Clear All so button stays full width, at bottom of list */
.tooltip-wrapper--clear {
    width: 100%;
    display: block;
    order: 4;
    flex-shrink: 0;
}

.tooltip-wrapper--clear .tooltip-content {
    left: 50%;
    transform: translateX(-50%);
}

.site-footer {
    width: 100%;
    margin: 0;
    padding: 10px 0;
    border-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.site-footer a {
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.created-by {
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 13px; /* match Privacy Policy */
    color: rgba(255, 255, 255, 0.8);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-logo-link {
    display: inline-flex;
    align-items: center; /* vertical align with text */
    justify-content: center;
    line-height: 0;
}

.footer-logo {
    width: 20px;
    height: 20px;
    display: inline-block;
    object-fit: contain;
}

.site-footer a:hover {
    text-decoration: underline;
    color: rgba(255, 255, 255, 0.95);
}

/* Ad rail (300x250) */
.ad-section {
    width: 300px;
    min-width: 300px;
    max-width: 300px;
    min-height: 250px;
    display: none; /* shown when consent */
    align-items: flex-start;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
}

.ad-container {
    min-width: 300px;
    min-height: 100px;
    flex-shrink: 0;
    background: transparent;
}

.ad-section ins.adsbygoogle {
    display: inline-block;
    width: 300px;
    height: 250px;
}

/* Modal Section (glass same as articles; no top padding) */
.modal-section {
    flex: 0 0 auto;
    padding-top: 0;
    border-radius: 12px;
}

/* Dark mode: when container has no background image */
.container:not(.has-background) .modal-section {
    background: rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.container:not(.has-background) .modal {
    background: transparent;
    color: #ffffff;
}
.container:not(.has-background) .modal .label-input,
.container:not(.has-background) .modal-section .label-input {
    color: #ffffff;
}
.container:not(.has-background) .modal .label-input::placeholder,
.container:not(.has-background) .modal-section .label-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.container:not(.has-background) .modal .input-container,
.container:not(.has-background) .modal-section .input-container {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.container:not(.has-background) .modal .labels-list,
.container:not(.has-background) .modal-section .labels-list,
.container:not(.has-background) .modal .labels-list li,
.container:not(.has-background) .modal-section .labels-list li {
    color: #ffffff;
}
.container:not(.has-background) .modal .add-btn,
.container:not(.has-background) .modal-section .add-btn,
.container:not(.has-background) .modal .clear-btn,
.container:not(.has-background) .modal-section .clear-btn {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}
.container:not(.has-background) .modal .add-btn:hover,
.container:not(.has-background) .modal-section .add-btn:hover,
.container:not(.has-background) .modal .clear-btn:hover,
.container:not(.has-background) .modal-section .clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.container:not(.has-background) .modal .icon-btn,
.container:not(.has-background) .modal-section .icon-btn {
    color: rgba(255, 255, 255, 0.9);
}
.container:not(.has-background) .modal .icon-btn:hover,
.container:not(.has-background) .modal-section .icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.container:not(.has-background) .modal .best-of-label,
.container:not(.has-background) .modal-section .best-of-label {
    color: rgba(255, 255, 255, 0.9);
}
.container:not(.has-background) .modal .label-item,
.container:not(.has-background) .modal-section .label-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}
.container:not(.has-background) .modal .label-item span,
.container:not(.has-background) .modal-section .label-item span,
.container:not(.has-background) .modal .label-item a.label-item__link,
.container:not(.has-background) .modal-section .label-item a.label-item__link {
    color: #ffffff;
}
.container:not(.has-background) .modal .remove-btn,
.container:not(.has-background) .modal-section .remove-btn {
    color: rgba(255, 255, 255, 0.6);
}
.container:not(.has-background) .modal .remove-btn:hover,
.container:not(.has-background) .modal-section .remove-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Light mode: when container has background image (has-background) */
.container.has-background .modal-section {
    background: rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.modal {
    background: transparent;
    width: 450px;
    max-width: 450px;
    height: 100%;
    max-height: calc(100vh - 150px);
    border-radius: 10px;
    padding: 25px 25px 25px 25px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: visible;
}
.container.has-background .modal {
    color: #333;
}
.container.has-background .modal .label-input,
.container.has-background .modal-section .label-input {
    color: #333;
}
.container.has-background .modal .label-input::placeholder,
.container.has-background .modal-section .label-input::placeholder {
    color: rgba(51, 51, 51, 0.5);
}
.container.has-background .modal .input-container,
.container.has-background .modal-section .input-container {
    border-bottom-color: rgba(51, 51, 51, 0.2);
}
.container.has-background .modal .labels-list,
.container.has-background .modal-section .labels-list,
.container.has-background .modal .labels-list li,
.container.has-background .modal-section .labels-list li {
    color: #333;
}
.container.has-background .modal .add-btn,
.container.has-background .modal-section .add-btn,
.container.has-background .modal .clear-btn,
.container.has-background .modal-section .clear-btn {
    color: #333;
    border-color: rgba(51, 51, 51, 0.3);
}
.container.has-background .modal .add-btn:hover,
.container.has-background .modal-section .add-btn:hover,
.container.has-background .modal .clear-btn:hover,
.container.has-background .modal-section .clear-btn:hover {
    background: rgba(51, 51, 51, 0.08);
    color: #333;
}
.container.has-background .modal .icon-btn,
.container.has-background .modal-section .icon-btn {
    color: #333;
}
.container.has-background .modal .icon-btn:hover,
.container.has-background .modal-section .icon-btn:hover {
    background: rgba(51, 51, 51, 0.1);
    color: #333;
}
.container.has-background .modal .best-of-label,
.container.has-background .modal-section .best-of-label,
.container.has-background .modal .label-input,
.container.has-background .modal-section .label-input {
    color: #333;
}
.container.has-background .modal .label-item,
.container.has-background .modal-section .label-item {
    border-bottom-color: rgba(51, 51, 51, 0.2);
}
.container.has-background .modal .label-item span,
.container.has-background .modal-section .label-item span,
.container.has-background .modal .label-item a.label-item__link,
.container.has-background .modal-section .label-item a.label-item__link {
    color: #333;
}
.container.has-background .modal .remove-btn,
.container.has-background .modal-section .remove-btn {
    color: #333;
}
.container.has-background .modal .remove-btn:hover,
.container.has-background .modal-section .remove-btn:hover {
    color: #333;
    background: rgba(51, 51, 51, 0.1);
}

@media (min-width: 1024px) {
    .modal {
        width: 338px;
        max-width: 338px;
    }
}

.modal-title {
    display: none;
}

.divider {
    display: none;
}

.input-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
    flex-shrink: 0;
    order: 1;
    height: 40px;
    min-height: 40px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Row title: no white highlight on focus */
.row-title .label-input:focus,
.row-title .page-title-input:focus {
    outline: none;
    border-bottom-color: transparent;
    box-shadow: none;
}

.row-title:focus-within {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.page-title-hint {
    flex: 0 1 auto;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 18px;
    color: var(--ds-title-hint, #9ca3af);
    cursor: default;
}

.container.has-background {
    padding-top: 30px;
    margin-top: 0;
}
.container.has-background .page-title-hint,
.container.has-background .row-title .icon-btn--edit {
    color: var(--ds-title-hint-light, #4b5563);
}
.container.has-background .share-title-btn {
    color: #1f2937;
    border-color: rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.92);
}
.container.has-background .row-title .icon-btn--edit {
    color: #1f2937;
}
.container.has-background .connect-claude-btn {
    display: none;
}

.row-title--editing .page-title-hint {
    display: none;
}

.row-title .page-title-input {
    flex: 1;
    min-width: 0;
    display: none;
    max-width: 100%;
}

.row-title--editing .page-title-input {
    display: block;
}

.row-title .icon-btn--edit {
    flex-shrink: 0;
    margin-left: 0;
}

.input-container__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.input-container .add-btn {
    margin-top: 0;
    margin-bottom: 0;
}

.label-input {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: none;
    border-bottom: none;
    border-radius: 0;
    font-size: 18px;
    transition: border-color 0.3s;
    font-family: 'Jost', 'Arial', sans-serif;
    background: transparent;
    color: #ffffff;
    text-align: left;
}

.label-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: clamp(11px, 2.5vw, 18px);
}

@media (max-width: 768px) {
    .label-input::placeholder {
        font-size: clamp(10px, 3vw, 16px);
    }
}

@media (max-width: 480px) {
    .label-input::placeholder {
        font-size: clamp(10px, 3.5vw, 14px);
    }
}

@media (max-width: 360px) {
    .label-input::placeholder {
        font-size: 10px;
    }
}

.label-input:focus {
    outline: none;
    border-bottom-color: transparent;
}

/* Remove white highlight when entering names in the list */
.container:not(.has-background) .modal .label-input:focus,
.container:not(.has-background) .modal-section .label-input:focus {
    outline: none;
    border-bottom-color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
}
.container.has-background .modal .label-input:focus,
.container.has-background .modal-section .label-input:focus {
    outline: none;
    border-bottom-color: rgba(51, 51, 51, 0.3);
    box-shadow: none;
}

.add-btn {
    padding: 0 18px;
    height: 36px;
    min-height: 36px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.3s, opacity 0.3s;
    font-family: 'Jost', 'Arial', sans-serif;
    align-self: flex-end;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.add-btn:hover {
    background: #e8e8e8;
    opacity: 0.95;
}

.add-btn:active {
    opacity: 0.8;
}

.shuffle-container {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    order: 2;
}

.labels-list {
    margin-bottom: 15px;
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
    max-height: 300px;
    order: 3;
}

.label-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    margin-bottom: 5px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideIn 0.3s ease-out;
    gap: 15px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.label-item span,
.label-item a.label-item__link {
    flex: 1;
    color: #ffffff;
    font-family: 'Jost', 'Arial', sans-serif;
    font-weight: 400;
    font-size: 18px;
    text-align: left;
}
.label-item a.label-item__link {
    text-decoration: none;
}
.label-item a.label-item__link:hover {
    text-decoration: underline;
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: none;
}

.color-dot::-webkit-color-swatch {
  border-radius: 50%;
  border: none;
}

.color-dot::-webkit-color-swatch-wrapper {
  padding: 0;
}

.remove-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 0;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-family: 'Jost', 'Arial', sans-serif;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:focus {
    outline: none;
}

.remove-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.remove-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.clear-btn {
    width: 100%;
    height: 32px;
    min-height: 32px;
    padding: 0 15px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Jost', 'Arial', sans-serif;
    margin-top: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    order: 4;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
}

.clear-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Wheel Section */
.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    flex: 1;
    margin-top: 0;
    min-width: 0;
    min-height: 0;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .wheel-section {
        align-items: center;
    }
}

.view-selector {
    display: flex;
    gap: 30px;
    margin-bottom: 10px;
    z-index: 10;
    justify-content: flex-start;
    width: 100%;
    overflow: visible;
}

.view-selector.centered-toggle {
    padding-top: 10px;
    padding-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.best-of-row {
    display: flex;
    align-items: center;
    gap: 30px;
}

.best-of-label {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    white-space: nowrap;
}

.sound-toggle-btn {
  font: inherit;
  font-size: 13px;
  padding: 0 12px;
  height: 32px;
  min-height: 32px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.sound-toggle-btn:hover {
  background: #e8e8e8;
  opacity: 0.95;
}

.sound-toggle-btn[aria-pressed="false"] {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.9);
}

.sound-toggle-btn[aria-pressed="false"]:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.best-of-select {
  font: inherit;
  padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #ddd);
    background: var(--bg, #fff);
    color: var(--text, #161d29);
    min-width: 4ch;
    cursor: pointer;
}

@media (min-width: 1024px) {
    .view-selector {
        justify-content: flex-start;
    }
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 180px;
    height: 40px;
    cursor: pointer;
    flex-shrink: 0;
    min-width: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #161d29;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    transition: 0.3s;
    overflow: hidden;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 32px;
    width: 88px;
    left: 4px;
    bottom: 3px;
    background-color: #ffffff;
    border-radius: 16px;
    transition: 0.3s;
    z-index: 1;
}

.toggle-switch input:checked + .toggle-slider:before {
    left: calc(100% - 88px - 4px);
}

.toggle-label-left,
.toggle-label-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    transition: 0.3s;
    z-index: 2;
    pointer-events: none;
    width: 88px;
    text-align: center;
}

.toggle-label-left {
    left: 4px;
}

.toggle-label-right {
    left: calc(100% - 88px - 4px);
}

.toggle-switch input:checked + .toggle-slider .toggle-label-left,
.toggle-switch input:not(:checked) + .toggle-slider .toggle-label-right {
    color: rgba(255, 255, 255, 0.88);
}

.toggle-switch input:checked + .toggle-slider .toggle-label-right {
    color: #000000;
}

.toggle-switch input:not(:checked) + .toggle-slider .toggle-label-left {
    color: #000000;
}

.shape-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 auto;
    max-width: none;
    min-height: 520px;
    overflow: hidden;
    position: relative;
    z-index: 0;
}

.shape-container .wheel-actions {
    flex-shrink: 0;
    margin-top: -20px; /* 30px higher than default in 3D view */
}

#shape3d {
    width: min(520px, 85vw);
    height: min(520px, 85vw);
    max-width: 520px;
    max-height: 520px;
    aspect-ratio: 1 / 1;
    position: relative;
    margin: 0 auto;
    flex-shrink: 0;
    overflow: hidden;
}

#shape3d canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

@media (min-width: 1024px) {
    #shape3d {
        width: 520px;
        height: 520px;
        max-width: 520px;
        max-height: 520px;
    }
}

.wheel-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    width: 100%;
    min-width: 0;
    min-height: 0;
    margin-bottom: 20px;
}

.wheel-outer {
    position: relative;
    width: min(520px, 42vw);
    height: min(520px, 42vw);
    max-width: 520px;
    max-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Prevent canvas overflowing when inline style hasn't cleared yet */
    overflow: hidden;
}

.wheel-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    z-index: 1;
    pointer-events: none;
}

.wheel-loading[hidden] {
    display: none;
}

@media (min-width: 1024px) {
    .wheel-outer {
        width: 520px;
        height: 520px;
        max-width: 520px;
        max-height: 520px;
    }
}

#wheelCanvas {
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.1s linear;
    position: relative;
    z-index: 10;
    /* Always fill .wheel-outer exactly — JS sets the buffer size,
       CSS sets the display size via the parent dimensions. */
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    display: block;
    cursor: pointer;
}

.wheel-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 40px 30px 0 30px;
    border-color: #ffffff transparent transparent transparent;
    z-index: 100;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

.spin-btn {
    padding: 0 30px;
    height: 36px;
    min-height: 36px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.3s, opacity 0.3s;
    font-family: 'Source Code Pro', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spin-btn:hover:not(:disabled) {
    background: #e8e8e8;
    opacity: 0.95;
}

.spin-btn:active:not(:disabled) {
    opacity: 0.8;
}

.spin-btn:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
    opacity: 0.5;
}

.wheel-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
    font-size: 12px; /* 6px smaller than previous 18px */
}

/* Spin button only in 3D view; wheel view uses center click only */
.wheel-container .wheel-actions {
    display: none;
}

/* stat‑of‑the‑day banner below the view controls */
.stat-of-day {
    margin-top: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
}

/* ensure mobile menu fullscreen button spans full width */
.nav-menu__link#fullscreenBtnMenu {
    width: 100%;
    text-align: left;
}

.fullscreen-btn {
    padding: 6px 14px;
    font-size: 0.9rem;
    font-family: 'Jost', 'Arial', sans-serif;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.exit-fullscreen-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 100;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-family: 'Jost', 'Arial', sans-serif;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
}

.exit-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Fullscreen mode: center wheel section, scale wheel to use viewport */
#wheelSectionForFullscreen:fullscreen,
#wheelSectionForFullscreen:-webkit-full-screen,
#wheelSectionForFullscreen:-moz-full-screen,
#wheelSectionForFullscreen:-ms-fullscreen,
#wheelSectionForFullscreen.simulated-fullscreen {
    background: #161d29;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
}

/* Simulated fullscreen overlay (iOS Safari / browsers without Fullscreen API).
   Covers the whole viewport with a fixed overlay matching the native look. */
#wheelSectionForFullscreen.simulated-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
    /* Use dvh where supported so the address-bar shy of height is excluded */
    height: 100dvh;
    overflow: hidden;
}

/* In fullscreen hide view selector so wheel gets full space */
#wheelSectionForFullscreen:fullscreen .view-selector,
#wheelSectionForFullscreen:-webkit-full-screen .view-selector,
#wheelSectionForFullscreen:-moz-full-screen .view-selector,
#wheelSectionForFullscreen:-ms-fullscreen .view-selector,
#wheelSectionForFullscreen.simulated-fullscreen .view-selector {
    display: none;
}

#wheelSectionForFullscreen:fullscreen .wheel-container,
#wheelSectionForFullscreen:-webkit-full-screen .wheel-container,
#wheelSectionForFullscreen:-moz-full-screen .wheel-container,
#wheelSectionForFullscreen:-ms-fullscreen .wheel-container,
#wheelSectionForFullscreen.simulated-fullscreen .wheel-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

/* Fullscreen: same wheel/3D size as main screen (520px or smaller on narrow viewports), centered */
#wheelSectionForFullscreen:fullscreen .wheel-outer,
#wheelSectionForFullscreen:-webkit-full-screen .wheel-outer,
#wheelSectionForFullscreen:-moz-full-screen .wheel-outer,
#wheelSectionForFullscreen:-ms-fullscreen .wheel-outer,
#wheelSectionForFullscreen.simulated-fullscreen .wheel-outer {
    width: min(520px, 95vmin);
    height: min(520px, 95vmin);
    min-width: 0;
    min-height: 0;
    max-width: 520px;
    max-height: 520px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    margin: auto;
}

#wheelSectionForFullscreen:fullscreen .shape-container,
#wheelSectionForFullscreen:-webkit-full-screen .shape-container,
#wheelSectionForFullscreen:-moz-full-screen .shape-container,
#wheelSectionForFullscreen:-ms-fullscreen .shape-container,
#wheelSectionForFullscreen.simulated-fullscreen .shape-container {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    margin: auto;
}

#wheelSectionForFullscreen:fullscreen #shape3d,
#wheelSectionForFullscreen:-webkit-full-screen #shape3d,
#wheelSectionForFullscreen:-moz-full-screen #shape3d,
#wheelSectionForFullscreen:-ms-fullscreen #shape3d,
#wheelSectionForFullscreen.simulated-fullscreen #shape3d {
    width: min(520px, 95vmin);
    height: min(520px, 95vmin);
    max-width: 520px;
    max-height: 520px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

/* Winner modal – always on top of list, wheel, and all other content */
.winner-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
    padding: 20px;
    isolation: isolate;
}

/* Customize background: button bottom right of wheel section */
.customize-bg-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 13px;
    font-family: 'Jost', 'Arial', sans-serif;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    cursor: pointer;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}
.customize-bg-btn:hover {
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
}

/* Customize background modal */
.customize-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
    box-sizing: border-box;
}
.customize-modal.show {
    display: flex;
}
.customize-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.customize-modal__dialog {
    position: relative;
    width: min(400px, 100%);
    background: #161d29;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 24px 20px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}
.customize-modal__title {
    margin: 0 0 16px;
    font-family: 'Source Code Pro', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #ffffff;
}
.customize-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    border-radius: 8px;
}
.customize-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.customize-modal__options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
.customize-modal__option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    text-align: left;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.92);
    font-family: 'Jost', 'Arial', sans-serif;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.customize-modal__option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}
.customize-modal__option--active {
    border-color: rgba(74, 222, 128, 0.6);
    background: rgba(74, 222, 128, 0.08);
}
.customize-modal__option--active:hover {
    background: rgba(74, 222, 128, 0.12);
}
.customize-modal__preview {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    background-size: cover;
    background-position: center;
}
.customize-modal__preview--default {
    background-color: #161d29;
    background-image: none;
}
.customize-modal__preview--easter {
    background-image: url('assets/backgrounds/Easter.jpg');
}
.customize-modal__preview--oscars {
    background-image: url('../assets/backgrounds/Oscars.jpg');
    background-size: cover;
    background-position: center;
}
.customize-modal__preview--upload {
    background: rgba(255, 255, 255, 0.12);
    background-image: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.customize-modal__option-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.customize-modal__option-label {
    font-weight: 500;
    font-size: 16px;
}
.customize-modal__option-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}
.customize-modal__upload-wrap {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.customize-modal__upload-wrap .customize-modal__btn {
    padding: 8px 16px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    font-family: 'Jost', 'Arial', sans-serif;
}
.customize-modal__upload-wrap .customize-modal__btn:hover {
    background: rgba(255, 255, 255, 0.2);
}
.customize-modal__error {
    margin: 10px 0 0;
    font-size: 13px;
    color: #f87171;
}

#wheelSectionForFullscreen .winner-modal {
    z-index: 2147483647;
}

.winner-modal.show {
    display: flex;
}

.winner-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.winner-modal__dialog {
    position: relative;
    width: min(520px, calc(100vw - 40px));
    background: #161d29;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.winner-modal__title {
    margin: 0 0 10px;
    font-family: 'Source Code Pro', sans-serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 1.2;
}

.winner-modal__text {
    margin: 0 0 10px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 18px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
}

.winner-modal__link {
    margin: 0 0 18px;
    font-size: 16px;
}

.winner-modal__link a {
    color: #ffffff;
    text-decoration: underline;
    font-size: 14px;
}

.winner-modal__link a:hover {
    opacity: 0.9;
    word-break: break-word;
}

.winner-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.winner-modal__btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 0 16px;
    height: 36px;
    min-height: 36px;
    font-family: 'Source Code Pro', sans-serif;
    font-size: 14px;
    line-height: 18px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.winner-modal__btn--primary {
    background: #ffffff;
    border-color: transparent;
    color: #000000;
}

.winner-modal__btn--primary:hover {
    background: #e8e8e8;
}

.winner-modal__btn--secondary {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.95);
}

.winner-modal__btn:active {
    opacity: 0.9;
}

/* Share modal */
.share-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483646;
    padding: 20px;
}

.share-modal.show {
    display: flex;
}

.share-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.share-modal__dialog {
    position: relative;
    width: min(520px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #161d29;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.share-modal__title {
    margin: 0 0 16px;
    font-family: 'Source Code Pro', sans-serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 1.2;
}

.share-modal__block {
    margin-bottom: 18px;
}

.share-modal__block--hidden {
    display: none;
}

.share-modal__block--hidden.show {
    display: block;
}

.share-modal__text {
    margin: 0 0 8px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}

.share-modal__label {
    display: block;
    margin: 0 0 6px;
    font-family: 'Source Code Pro', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.share-modal__input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 15px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    box-sizing: border-box;
}

.share-modal__input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.share-modal__url-input {
    font-size: 13px;
}

.share-modal__link-wrap {
    margin: 0 0 10px;
}

.share-modal__link {
    color: #7fb0ff;
    text-decoration: underline;
    word-break: break-all;
}

.share-modal__link:hover {
    color: #9fc7ff;
}

.share-modal__checkbox-wrap,
.share-modal__radio-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
}

.share-modal__checkbox,
.share-modal__radio {
    flex-shrink: 0;
}

.share-modal__radios {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.share-modal__url-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
}

.share-modal__url-row .share-modal__input {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.share-modal__hint {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.share-modal__btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 6px 14px;
    height: 32px;
    min-height: 32px;
    font-family: 'Source Code Pro', sans-serif;
    font-size: 14px;
    cursor: pointer;
    touch-action: manipulation;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.share-modal__btn--primary {
    background: #ffffff;
    border-color: transparent;
    color: #000000;
}

.share-modal__btn--secondary {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.95);
}

.share-modal__actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

/* Settings modal */
.settings-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483646;
    padding: 20px;
}

.settings-modal.show {
    display: flex;
}

.settings-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.settings-modal__dialog {
    position: relative;
    width: min(520px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #161d29;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.settings-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.settings-modal__title {
    margin: 0;
    font-family: 'Source Code Pro', sans-serif;
    font-weight: 500;
    font-size: 22px;
    line-height: 1.2;
}

.settings-modal__close-x {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.settings-modal__close-x:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.settings-modal__close-x i,
.settings-modal__close-x svg {
    width: 24px;
    height: 24px;
}

.settings-modal__cta-wrap {
    margin-bottom: 16px;
}

.settings-modal__cta {
    width: 100%;
    text-decoration: none;
    font-family: 'Source Code Pro', sans-serif;
    font-size: 15px;
    height: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.settings-modal__subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 12px;
}

.settings-modal__tab {
    appearance: none;
    padding: 8px 14px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.settings-modal__tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
}

.settings-modal__tab.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 500;
}

.settings-modal__panel {
    display: none;
    margin-bottom: 20px;
}

.settings-modal__panel.is-active {
    display: block;
}

.settings-modal__section-title {
    margin: 0 0 6px;
    font-family: 'Source Code Pro', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.settings-modal__text {
    margin: 0 0 10px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.settings-modal__file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

.settings-modal__row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.settings-modal__radios {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-modal__radio-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
}

.settings-modal__radio {
    flex-shrink: 0;
}

.settings-modal__select {
    width: 100%;
    max-width: 280px;
    padding: 10px 12px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    box-sizing: border-box;
}

.settings-modal__color-bar {
    margin-top: 14px;
}

.settings-modal__color-bar[aria-hidden="true"] {
    display: none;
}

.settings-modal__color-bar-label {
    display: block;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 8px;
}

.settings-modal__color-swatches {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 280px;
}

.settings-modal__color-swatch {
    flex: 1;
    min-height: 32px;
    display: block;
}

.settings-modal__coming-soon {
    font-weight: 500;
}

.settings-modal__badge {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
}

.settings-modal__hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.settings-modal__btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 6px 14px;
    height: 32px;
    min-height: 32px;
    font-family: 'Source Code Pro', sans-serif;
    font-size: 14px;
    cursor: pointer;
    touch-action: manipulation;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.settings-modal__btn--primary {
    background: #ffffff;
    border-color: transparent;
    color: #000000;
}

.settings-modal__btn--secondary {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.95);
}

/* Login modal (SSO) */
.login-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.login-modal[aria-hidden="true"] {
    pointer-events: none;
    visibility: hidden;
}
.login-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}
.login-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: #1e2735;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
.login-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.login-modal__title {
    font-family: 'Source Code Pro', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    margin: 0;
}
.login-modal__close-x {
    appearance: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    border-radius: 8px;
}
.login-modal__close-x:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.login-modal__text {
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 20px;
    line-height: 1.5;
}
.login-modal__choices {
    margin-bottom: 16px;
}
.login-modal__choice-btn {
    appearance: none;
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 10px;
    font-family: 'Source Code Pro', sans-serif;
    font-size: 15px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.15s, border-color 0.15s;
}
.login-modal__choice-btn--primary {
    background: #ffffff;
    color: #161d29;
    font-weight: 500;
}
.login-modal__choice-btn--primary:hover {
    background: #e8e8e8;
}
.login-modal__choice-btn--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
}
.login-modal__choice-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}
.login-modal__sso-wrap[hidden] {
    display: none !important;
}
.login-modal__sso-wrap .login-modal__text {
    margin-bottom: 12px;
}
.login-modal__sso {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.login-modal__sso-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    font-family: 'Source Code Pro', sans-serif;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.95);
    transition: background 0.15s, border-color 0.15s;
}
.login-modal__sso-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
}
.login-modal__sso-icon {
    flex-shrink: 0;
}
.login-modal__sso-btn--google { }
.login-modal__sso-btn--apple { }

.settings-history-cta { margin-top: 0; }
.settings-history-list-wrap { margin-top: 0; }
.settings-wheel-history-list {
    list-style: none;
    margin: 12px 0;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}
.settings-wheel-history-li {
    list-style: none;
}
.settings-wheel-history-item {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.settings-wheel-history-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
.settings-wheel-history-item:last-child { border-bottom: none; }
.settings-wheel-history-title { font-weight: 500; }
.settings-wheel-history-meta {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.settings-modal__actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.nav-link--settings i,
.nav-link--settings svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

body.settings-hidden #settingsBtnNav,
body.settings-hidden #settingsBtnMenu,
#settingsBtnNav,
#settingsBtnMenu {
    display: none !important;
}

/* Hide Login for now */
#loginBtnNav,
#loginBtnMenu {
    display: none !important;
}

/* Ads */
.ad-slot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ad-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Jost', 'Arial', sans-serif;
}

.is-hidden {
    display: none !important;
}

/* Footer banner wrapper (in-flow) */
.footer-ad {
    position: static;
    width: 100%;
    display: none;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 0;
}

/* Hide footer ad under 780px */
@media (max-width: 779px) {
    .footer-ad {
        display: none !important;
    }
    
    .footer-ad--inflow {
        display: none !important;
    }
}

.footer-ad--inflow {
    display: flex;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 0;
}

/* Minimal 728×90 banner placeholder */
.footer-ad--inflow {
    background: #161d29;
    width: min(728px, 100%);
    height: 90px;
    margin: 0 auto;
    display: none; /* shown when consent */
}

.footer-ad--inflow .adsbygoogle.footer-banner {
    display: inline-block;
    width: 728px;
    height: 90px;
}

/* Desktop and tablet: keep 728x90 */
@media (min-width: 768px) {
    .footer-ad--inflow {
        width: 728px;
        height: 90px;
    }
    .footer-ad--inflow .adsbygoogle.footer-banner {
        width: 728px;
        height: 90px;
    }
}

/* Mobile: responsive */
@media (max-width: 767px) {
    .footer-ad--inflow {
        height: auto;
        width: 100%;
    }
    .footer-ad--inflow .adsbygoogle.footer-banner {
        width: 100%;
        max-width: 728px;
        height: auto;
    }
}

/* Confetti */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    animation: confetti-fall linear;
    z-index: 1000;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive */

@media (min-width: 1201px) {
    .row-title {
        width: calc(100% - 310px);
    }
}

@media (max-width: 1200px) {
    .main-content {
        margin-top: 0;
        grid-template-columns: minmax(0, 1fr) 360px;
        gap: 10px;
    }

    .wheel-section {
        margin-top: 0;
    }

    .ad-section {
        display: none !important;
    }

    .wheel-outer {
        width: min(520px, 70vw);
        height: min(520px, 70vw);
        max-width: 520px;
        max-height: 520px;
    }

    #shape3d {
        width: min(520px, 70vw);
        height: min(520px, 70vw);
        max-width: 520px;
        max-height: 520px;
        aspect-ratio: 1 / 1;
    }

    .modal {
        width: 100%;
        max-width: 450px;
        max-height: calc(100vh - 300px);
    }

    .divider {
        display: none;
    }
}

/* Between 940px and 769px: stack wheel and list for mobile-friendly layout */
@media (max-width: 940px) and (min-width: 769px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .main-content .wheel-section {
        grid-row: 1;
        grid-column: 1;
    }
    .main-content .modal-section {
        grid-row: 2;
        grid-column: 1;
    }
    .main-content .content-sections-wrap {
        grid-row: 3;
        grid-column: 1;
        position: relative;
        z-index: 0;
    }
    .main-content .ad-section {
        grid-row: 4;
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .main-nav {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 0 15px;
        z-index: 2000;
        background: #161d29;
    }

    .container {
        padding: 20px;
        min-height: calc(100vh - 50px);
        overflow-x: visible;
        overflow-y: visible;
    }

    .header {
        padding-top: 10px;
        margin-bottom: 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 5px;
    }

    .title {
        font-size: 28px;
        line-height: 36px;
        margin-bottom: 0;
    }

    .tagline {
        font-size: 20px;
        line-height: 26px;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .main-content .wheel-section {
        grid-row: 1;
        grid-column: 1;
        width: 100%;
        order: 0;
    }

    .main-content .modal-section {
        grid-row: 2;
        grid-column: 1;
        position: relative;
        z-index: 0;
    }

    .main-content .content-sections-wrap {
        grid-row: 3;
        grid-column: 1;
        position: relative;
        z-index: 0;
        width: 100%;
        max-width: 100%;
    }

    .main-content .ad-section {
        grid-row: 4;
        grid-column: 1;
    }
    
    .side-ad-mobile {
        max-width: 100%;
        margin-bottom: 15px;
    }

    .wheel-container {
        width: 100%;
        align-items: center;
    }

    .wheel-outer {
        width: min(352px, 85vw);
        height: min(352px, 85vw);
        max-width: 352px;
        max-height: 352px;
    }

    #shape3d {
        width: min(352px, 85vw);
        height: min(352px, 85vw);
        max-width: 352px;
        max-height: 352px;
        aspect-ratio: 1 / 1;
        margin: 0 auto;
    }
    
    .shape-container {
        width: 100%;
        max-width: 100%;
        min-height: 352px;
        overflow: hidden;
        align-items: center;
    }

    .wheel-pointer {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        border-width: 30px 25px 0 25px;
        z-index: 100;
    }

    .spin-btn {
        padding: 6px 35px;
        height: 32px;
        min-height: 32px;
        font-size: 16px;
        width: auto;
        min-width: 120px;
    }

    .modal-section {
        width: 100%;
        order: 2;
    }

    .modal {
        width: 100%;
        max-width: 100%;
        max-height: none;
        padding: 0 15px 20px 15px;
        min-height: auto;
    }

    .modal-title {
        display: none;
    }

    .divider {
        display: none;
    }

    .input-container {
        margin-bottom: 15px;
    }

    .label-input {
        font-size: 16px;
        padding: 12px 15px;
    }

    .add-btn {
        padding: 6px 12px;
        height: 32px;
        min-height: 32px;
        font-size: 12px;
    }

    .label-item {
        padding: 0;
    }

    .label-item span { font-size: 18px; }

    .remove-btn {
        padding: 0;
        height: 32px;
        min-height: 32px;
        font-size: 12px;
    }

    .clear-btn {
        padding: 6px 12px;
        height: 32px;
        min-height: 32px;
        font-size: 16px;
    }

    .labels-list {
        max-height: 250px;
    }

    .winner-announcement {
        font-size: 1.2rem;
        padding: 12px 20px;
        min-height: 50px;
        top: 10px;
        left: 10px;
        right: 10px;
        transform: translateX(-50%) scale(0.9);
        width: calc(100% - 20px);
        max-width: none;
    }

    .winner-announcement.show {
        transform: translateX(-50%) scale(1);
    }
}

/* 850px → 769px: prevent wheel/list overlap by stacking */
@media (max-width: 850px) and (min-width: 769px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .main-content .wheel-section {
        grid-row: 1;
        grid-column: 1;
    }
    .main-content .modal-section {
        grid-row: 2;
        grid-column: 1;
    }
    .main-content .content-sections-wrap {
        grid-row: 3;
        grid-column: 1;
        position: relative;
        z-index: 0;
    }
    .main-content .ad-section {
        grid-row: 4;
        grid-column: 1;
    }

    .wheel-outer {
        width: min(520px, 85vw);
        height: min(520px, 85vw);
        max-width: 520px;
        max-height: 520px;
    }

    #shape3d {
        width: min(520px, 85vw);
        height: min(520px, 85vw);
        max-width: 520px;
        max-height: 520px;
        aspect-ratio: 1 / 1;
    }

    .ad-section {
        display: none !important;
    }
}

/* Mobile phones - smaller screens */
@media (max-width: 480px) {
    .main-nav {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 0 15px;
        z-index: 2000;
        background: #161d29;
    }

    .container {
        padding: 20px;
        overflow-x: visible;
        overflow-y: visible;
    }

    .header {
        padding-top: 5px;
        margin-bottom: 15px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 3px;
    }

    .title {
        font-size: 24px;
        line-height: 32px;
    }

    .tagline {
        font-size: 18px;
        line-height: 24px;
    }

    .main-content {
        gap: 20px;
    }

    .wheel-outer {
        width: min(308px, 90vw);
        height: min(308px, 90vw);
        max-width: 308px;
        max-height: 308px;
    }

    #shape3d {
        width: min(308px, 90vw);
        height: min(308px, 90vw);
        max-width: 308px;
        max-height: 308px;
        aspect-ratio: 1 / 1;
    }

    .shape-container {
        min-height: 308px;
        overflow: hidden;
    }

    .wheel-pointer {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        border-width: 25px 20px 0 20px;
        z-index: 100;
    }

    .spin-btn {
        padding: 6px 30px;
        height: 32px;
        min-height: 32px;
        font-size: 14px;
    }

    .modal {
        padding: 0 12px 15px 12px;
    }

    .modal-title {
        display: none;
    }

    .label-input {
        font-size: 16px;
        padding: 10px 12px;
    }

    .add-btn {
        padding: 6px 10px;
        height: 32px;
        min-height: 32px;
        font-size: 11px;
    }

    .label-item span { font-size: 18px; }

    .remove-btn {
        padding: 0;
        height: 32px;
        min-height: 32px;
        font-size: 11px;
    }

    .clear-btn {
        padding: 6px 10px;
        height: 32px;
        min-height: 32px;
        font-size: 14px;
    }

    .labels-list {
        max-height: 200px;
    }

    .winner-announcement {
        font-size: 1rem;
        padding: 10px 15px;
        min-height: 45px;
        top: 5px;
        left: 5px;
        right: 5px;
        width: calc(100% - 10px);
    }
}

/* Very small phones */
@media (max-width: 360px) {
    .main-nav {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 0 10px;
        z-index: 2000;
        background: #161d29;
    }

    .container {
        padding: 20px;
        overflow-x: visible;
        overflow-y: visible;
    }

    .title {
        font-size: 20px;
        line-height: 28px;
    }

    .tagline {
        font-size: 16px;
        line-height: 22px;
    }

    .wheel-outer {
        width: min(275px, 95vw);
        height: min(275px, 95vw);
        max-width: 275px;
        max-height: 275px;
    }

    #shape3d {
        width: min(275px, 95vw);
        height: min(275px, 95vw);
        max-width: 275px;
        max-height: 275px;
        aspect-ratio: 1 / 1;
        margin: 0 auto;
    }

    .shape-container {
        min-height: 275px;
        overflow: hidden;
    }

    .wheel-pointer {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        border-width: 22px 18px 0 18px;
        z-index: 100;
    }
}

/* Ad Styles */
.ad-slot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.ad-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-family: 'Jost', 'Arial', sans-serif;
}

.ad-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    font-family: 'Jost', 'Arial', sans-serif;
}

.side-ad {
    width: 300px;
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: none;
    z-index: 998;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .side-ad {
        display: flex;
    }
}

.side-ad-mobile {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px auto;
    display: flex;
}

@media (min-width: 1024px) {
    .side-ad-mobile {
        display: none;
    }
}

.result-ad {
    margin-top: 20px;
    min-height: 100px;
    max-width: 400px;
    display: none;
}

.result-ad.show {
    display: flex;
}

/* Privacy Banner */
.privacy-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(22, 29, 41, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 20px;
    z-index: 10000;
    display: none;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* --- Requested additions (app shell) --- */
.main-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: 'Jost', 'Arial', sans-serif;
  background: #161d29;
  z-index: 2000;
  margin: 0;
  padding: 0 15px;
  box-sizing: border-box;
}

.main-nav h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(18px, 3.6vw, 26px);
  line-height: 1.1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.nav-icon {
  height: 57px;
  width: auto;
  display: block;
  object-fit: contain;
  max-width: min(504px, calc(100vw - 60px));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
}

.nav-hamburger:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-hamburger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.12);
}

.nav-page-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  font-family: 'Jost', 'Arial', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: #fff;
  text-decoration: underline;
}

.nav-link--btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  padding: 0;
  gap: 6px;
}

.nav-link--btn:hover {
  text-decoration: underline;
}

.nav-link--fullscreen,
.nav-link--share,
.nav-link--settings {
  gap: 6px;
}

.nav-link--share i,
.nav-link--share svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-fullscreen-icon {
  display: block;
  flex-shrink: 0;
  opacity: 0.9;
}

.nav-link--fullscreen:hover .nav-fullscreen-icon {
  opacity: 1;
}

.nav-link--login {
  background: #ffffff;
  color: #161d29;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 500;
}
.nav-link--login:hover {
  background: #e8e8e8;
  color: #161d29;
  text-decoration: none;
}

/* Fullscreen nav button now shown by default.  The old hiding rule has been removed. */

/* Desktop: keep 30px gap */
@media (min-width: 769px) {
  .nav-links {
    gap: 30px;
  }
  .nav-page-links {
    gap: 30px;
  }
}

/* Nav menu (tablet/mobile) */
.nav-menu {
  position: fixed;
  inset: 0;
  z-index: 9999;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.2s ease;
}

.nav-menu.nav-menu--open {
  visibility: visible;
  pointer-events: auto;
}

.nav-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-menu.nav-menu--open .nav-menu__backdrop {
  opacity: 1;
}

.nav-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(280px, 85vw);
  height: 100%;
  background: #161d29;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  padding: 60px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.nav-menu.nav-menu--open .nav-menu__panel {
  transform: translateX(0);
}

.nav-menu__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  border-radius: 8px;
}

.nav-menu__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-menu__link {
  display: block;
  padding: 12px 16px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 16px;
  font-family: 'Source Code Pro', 'Arial', sans-serif;
  border-radius: 8px;
}

.nav-menu__link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

#loginBtnMenu.nav-menu__link {
  background: #ffffff;
  color: #161d29;
  font-weight: 500;
  text-align: center;
  border-radius: 8px;
  margin-top: 4px;
}
#loginBtnMenu.nav-menu__link:hover {
  background: #e8e8e8;
  color: #161d29;
}

/* Tablet and mobile: show hamburger, hide About/How-to in bar; Login/Settings only in menu */
@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }
  .nav-page-links {
    display: none;
  }
  #loginBtnNav,
  #settingsBtnNav {
    display: none !important;
  }
}

/* Mobile: Fullscreen only in nav bar (same style with icon), not in hamburger menu */
@media (max-width: 768px) {
  #fullscreenBtnMenu {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .nav-links {
    gap: 30px;
  }
  .nav-page-links {
    gap: 30px;
  }
  .nav-link {
    font-size: 16px;
  }
  .nav-fullscreen-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .main-nav {
    padding-top: 12px;
    gap: 12px;
  }
  .nav-links {
    gap: 30px;
  }
  .nav-page-links {
    gap: 30px;
  }
  .nav-link {
    font-size: 16px;
  }
  .nav-icon {
    max-height: 44px;
  }
}

@media (max-width: 360px) {
  .nav-links {
    gap: 30px;
  }
  .nav-page-links {
    gap: 30px;
  }
  .nav-link {
    font-size: 16px;
  }
  .nav-fullscreen-icon {
    width: 16px;
    height: 16px;
  }
}

/* Breakpoint: 600px – view selector and best-of */
@media (max-width: 600px) {
  .view-selector.centered-toggle {
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
  }
  .best-of-row {
    width: 100%;
    justify-content: center;
    gap: 30px;
  }
  .content-section {
    padding: 1.25rem 0;
  }
}

/* Breakpoint: 768px – content sections */
@media (max-width: 768px) {
  .content-section h2 {
    font-size: 1.2rem;
  }
  .content-section p,
  .content-section .how-to-use-steps li {
    font-size: 0.9rem;
  }
}

/* Below-the-fold content sections (About, How-to) - nav-style colors */
.content-section {
  max-width: 100%;
  margin-top: 0;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  scroll-margin-top: 70px;
}

@media (min-width: 900px) {
  .content-section {
    padding: 1.5rem 1rem 1.5rem 0;
  }
}

.content-section h2 {
  font-family: 'Source Code Pro', sans-serif;
  font-size: 1.35rem;
  margin: 0 0 0.75rem 0;
  color: #fff;
}

.content-section h3 {
  font-family: 'Source Code Pro', sans-serif;
  font-size: 1.1rem;
  margin: 1rem 0 0.35rem 0;
  color: #fff;
}

.content-section h3:first-of-type {
  margin-top: 0;
}

.content-section p {
  font-family: 'Arial', sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
  color: #fff;
}

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

.content-section a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
}

.content-section a:hover {
  color: #fff;
  text-decoration: underline;
}

.content-section .how-to-use-steps {
  margin: 0 0 0 1.25rem;
  padding: 0;
  list-style: decimal;
}

.content-section .how-to-use-steps li {
  font-family: 'Arial', sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 0.5rem 0;
  color: #fff;
}

.content-section .how-to-use-steps li:last-child {
  margin-bottom: 0;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.centered-toggle {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .centered-toggle {
    justify-content: center;
  }
}

#confettiContainer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.privacy-banner.show {
    display: block;
}

.privacy-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.privacy-banner-content p {
    font-family: 'Jost', 'Arial', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0;
    flex: 1;
    min-width: 250px;
}

.privacy-banner-content a {
    color: #ffffff;
    text-decoration: underline;
}

.privacy-banner-content a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.privacy-btn {
    padding: 6px 24px;
    height: 32px;
    min-height: 32px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Jost', 'Arial', sans-serif;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.privacy-btn:hover {
    background: #e8e8e8;
}

.privacy-btn:active {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .privacy-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .privacy-btn {
        width: 100%;
    }

    .footer-ad {
        min-height: 50px;
        max-height: 50px;
        padding: 8px 15px;
    }

    .footer-ad .ad-content {
        min-height: 50px;
    }
}
