/* header-footer.css */
/* ═══════════════════════════════════════════════════════
   WordlyPlay — Global Header & Footer v2 (Glassmorphism)
   ═══════════════════════════════════════════════════════ */

/* ── Floating Header (transparent → solid on scroll) ── */
.header {
    transition: background var(--transition-base),
                box-shadow var(--transition-base),
                border-color var(--transition-base);
}

.header--scrolled {
    background: var(--glass-bg-strong) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    box-shadow: var(--shadow-md);
}

/* Sign up button: gradient */
.header__actions .btn--primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--purple, #8B5CF6) 100%);
    border: none;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.25);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.header__actions .btn--primary:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

/* Nav link animated underline */
.gnav__link::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--purple, #8B5CF6));
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

.gnav__link:hover::before {
    width: 60%;
}

/* Slide-up animation */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ── Desktop Navigation ─────────────────────────────── */
.gnav {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.gnav__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: color 0.2s, background 0.2s, text-shadow 0.2s;
    white-space: nowrap;
    position: relative;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    line-height: 1;
}

.gnav__link:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.gnav__link.is-active {
    color: var(--accent-primary);
    font-weight: var(--weight-bold);
}

.gnav__link.is-active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, var(--tile-gradient-from), var(--tile-gradient-to));
    border-radius: 3px;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.gnav__chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* ── Dropdown (Glass) ───────────────────────────────── */
.gnav__dropdown {
    position: relative;
}

.gnav__dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: calc(var(--z-sticky) + 10);
}

.gnav__dropdown:hover .gnav__dropdown-menu,
.gnav__dropdown:focus-within .gnav__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.gnav__dropdown:hover .gnav__chevron {
    transform: rotate(180deg);
}

.gnav__dropdown-item {
    display: block;
    padding: 10px 14px;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
}

.gnav__dropdown-item:hover {
    color: var(--text-primary);
    background: var(--accent-primary-light);
}

.gnav__dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 6px;
}

/* ── Header Actions (right side) ────────────────────── */
.header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header__profile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.header__profile-link:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.header__logout-btn {
    font-size: var(--text-xs) !important;
    padding: 0.4rem 0.8rem !important;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.header__logout-btn:hover {
    opacity: 1;
}

/* ── Hamburger Button ───────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.hamburger:hover {
    background: var(--accent-primary-light);
}

.hamburger__line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.is-active .hamburger__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-active .hamburger__line:nth-child(2) {
    opacity: 0;
}

.hamburger.is-active .hamburger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Overlay ─────────────────────────────────── */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: calc(var(--z-sticky) + 50);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.mobile-nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ── Mobile Slide-out Nav (Glass) ───────────────────── */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh; /* dynamic viewport height for mobile browsers */
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-left: var(--glass-border);
    z-index: calc(var(--z-sticky) + 100);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* prevent whole nav from scrolling; links section scrolls */
}

.mobile-nav.is-open {
    transform: translateX(0);
}

.mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-tertiary);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.15s, color 0.15s;
}

.mobile-nav__close:hover {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
}

.mobile-nav__links {
    flex: 1;
    min-height: 0; /* critical: allows flex child to shrink and scroll */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-md) var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-nav__link {
    display: block;
    padding: 12px 16px;
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.mobile-nav__link:hover {
    color: var(--text-primary);
    background: var(--accent-primary-light);
}

.mobile-nav__link.is-active {
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--tile-gradient-from), var(--tile-gradient-to));
    box-shadow: var(--shadow-sm);
}

.mobile-nav__divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-xs) 0;
}

.mobile-nav__section-title {
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    padding: 8px 16px 4px;
}

.mobile-nav__footer {
    padding: var(--space-md) var(--space-lg);
    padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.mobile-nav__gems {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-sm);
    font-weight: var(--weight-bold);
    color: var(--gem-gold);
    text-shadow: 0 0 8px var(--gem-glow);
}

/* ═══════════════════════════════════════════════════════
   Global Footer (Glass)
   ═══════════════════════════════════════════════════════ */

.gfooter {
    margin-top: var(--space-4xl);
    padding: var(--space-3xl) 0 var(--space-xl);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--accent-primary), var(--purple, #8B5CF6), var(--accent-secondary)) 1;
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.gfooter__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.gfooter__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.gfooter__social-link:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
    transform: translateY(-2px);
}

.gfooter__heading {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gfooter__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.gfooter__list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s, text-shadow 0.15s;
    font-weight: var(--weight-medium);
}

.gfooter__list a:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.gfooter__seo {
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: var(--space-lg);
}

.gfooter__seo p {
    color: var(--text-tertiary);
    font-size: var(--text-xs);
    line-height: 1.7;
    max-width: 720px;
    margin: 0;
}

.gfooter__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    text-align: center;
    color: var(--text-tertiary);
    font-size: var(--text-xs);
}

.gfooter__bottom span {
    display: inline-flex;
    align-items: center;
}

.gfooter__developer { gap: .3em; }
@media (pointer: coarse), (max-width: 768px) { .gfooter a { display: inline-block; padding: 6px 0; margin: -6px 0; } }   /* a bigger touch area, the same look */   /* inline-flex dropped the space before the link */

.gfooter__bottom span:not(:last-child)::after {
    content: '·';
    margin-left: var(--space-sm);
    color: var(--text-tertiary);
    opacity: 0.5;
}

.gfooter__developer a,
.gfooter__contact a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: var(--weight-semibold);
    transition: color 0.15s, text-shadow 0.15s;
}

.gfooter__developer a:hover,
.gfooter__contact a:hover {
    color: var(--purple, #8B5CF6);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

/* ── Notification Bell ──────────────────────────────── */
.notif-bell {
    position: relative;
}

@keyframes bellPulse {
    0%,100% { transform: rotate(0); }
    25% { transform: rotate(-18deg); }
    75% { transform: rotate(18deg); }
}
.notif-bell.is-pulsing svg { animation: bellPulse 0.5s ease; }

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
    font-family: var(--font-body);
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    max-height: 420px;
    background: var(--bg-card-solid);   /* solid: a blur inside the header's own blur never applies, so the page showed through */
    border: 1px solid var(--border-light, rgba(255,255,255,0.1));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl, 0 20px 60px rgba(0,0,0,0.4));
    z-index: calc(var(--z-sticky) + 200);
    overflow: hidden;
    flex-direction: column;
}

.notif-dropdown.is-open { display: flex; }

.notif-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.07));
    flex-shrink: 0;
}

.notif-dropdown__title {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
}

.notif-dropdown__mark-all {
    background: none;
    border: none;
    font-size: var(--text-xs);
    color: var(--accent-primary);
    cursor: pointer;
    padding: 0;
    font-family: var(--font-body);
}
.notif-dropdown__mark-all:hover { text-decoration: underline; }

.notif-list {
    overflow-y: auto;
    flex: 1;
    max-height: 320px;
}

.notif-empty {
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-light, rgba(255,255,255,0.04));
}
.notif-item:hover { background: var(--glass-bg); }
.notif-item.is-unread { background: rgba(59,130,246,0.06); }

.notif-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-card);
}
.notif-avatar--emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.notif-body { flex: 1; min-width: 0; }

.notif-msg {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.notif-msg strong { color: var(--text-primary); }

.notif-time {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: 2px;
}

.notif-actions {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.btn--xs {
    padding: 0.25rem 0.6rem !important;
    font-size: var(--text-xs) !important;
    border-radius: var(--radius-md) !important;
}

.notif-dropdown__footer {
    display: block;
    padding: 10px 16px;
    text-align: center;
    font-size: var(--text-xs);
    color: var(--accent-primary);
    text-decoration: none;
    border-top: 1px solid var(--border-light, rgba(255,255,255,0.07));
    flex-shrink: 0;
    transition: background 0.15s;
}
.notif-dropdown__footer:hover { background: var(--glass-bg); }

@media (max-width: 480px) {
    .notif-dropdown { width: calc(100vw - 24px); right: -48px; max-width: 320px; }
}
/* small phones: the bell is about 47 px from the edge, so this keeps the panel 12 px or more inside the screen */
@media (max-width: 400px) {
    .notif-dropdown { right: -35px; }
}

/* ═══════════════════════════════════════════════════════
   Theme Toggle (borderless)
   ═══════════════════════════════════════════════════════ */

.header__theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
    cursor: pointer;
    padding: 0;
}

.header__theme-toggle:hover {
    color: var(--accent-primary);
    background: var(--accent-primary-light);
}

/* ═══════════════════════════════════════════════════════
   Mobile Menu — User Section
   ═══════════════════════════════════════════════════════ */

.mobile-nav__user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    background: var(--accent-primary-light);
}

.mobile-nav__user-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}

.mobile-nav__avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent-primary), var(--purple, #8B5CF6));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.mobile-nav__user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mobile-nav__username {
    font-weight: var(--weight-bold);
    font-size: var(--text-sm);
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-nav__user-gems {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    color: var(--gem-gold);
    font-weight: var(--weight-semibold);
}

.mobile-nav__notif-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.mobile-nav__notif-link:hover {
    color: var(--accent-primary);
    background: var(--glass-bg);
}

.mobile-nav__notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 99px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════
   Mobile Menu — Theme Toggle Switch
   ═══════════════════════════════════════════════════════ */

.mobile-nav__theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-sm);
}

.mobile-nav__theme-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
}

.mobile-nav__theme-switch {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.mobile-nav__theme-switch-track {
    display: block;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--border-color, #ccc);
    position: relative;
    transition: background 0.3s ease;
}

.mobile-nav__theme-switch.is-active .mobile-nav__theme-switch-track {
    background: var(--accent-primary);
}

.mobile-nav__theme-switch-thumb {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.mobile-nav__theme-switch.is-active .mobile-nav__theme-switch-thumb {
    transform: translateX(20px);
}

/* ═══════════════════════════════════════════════════════
   Mobile Login Button (non-logged-in users)
   ═══════════════════════════════════════════════════════ */

.header__mobile-login {
    display: none; /* Hidden on desktop by default */
}

/* ═══════════════════════════════════════════════════════
   Responsive: Mobile
   ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .gnav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Hide desktop-only header elements on mobile */
    .header__desktop-only {
        display: none !important;
    }

    /* Show mobile login button for non-logged-in users */
    .header__mobile-login {
        display: inline-flex !important;
    }

    /* Shrink header action icons for mobile */
    .header__actions {
        gap: var(--space-xs);
    }

    .header__gem-count {
        padding: 4px 10px;
        font-size: var(--text-xs);
    }

    .header__gem-icon {
        width: 14px;
        height: 14px;
    }

    .header__profile-link svg,
    .notif-bell svg {
        width: 18px;
        height: 18px;
    }

    .header__profile-link {
        padding: 4px;
    }

    .notif-bell {
        width: 32px;
        height: 32px;
        padding: 0;
    }

    .gfooter__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }
}

/* ── Extra-small phones (≤ 375px) — compact mobile menu ── */
@media (max-width: 375px) {
    .mobile-nav__link {
        padding: 10px 14px;
        font-size: var(--text-sm);
    }

    .mobile-nav__section-title {
        padding: 6px 14px 2px;
    }

    .mobile-nav__footer {
        padding: var(--space-sm) var(--space-md);
        padding-bottom: calc(var(--space-sm) + env(safe-area-inset-bottom, 0px));
    }

    .mobile-nav__user {
        padding: var(--space-sm) var(--space-md);
    }

    .mobile-nav__header {
        padding: var(--space-sm) var(--space-md);
    }
}

/* ── Ultra-small / foldables (≤ 320px) — minimal menu ── */
@media (max-width: 320px) {
    .mobile-nav__link {
        padding: 8px 12px;
        font-size: var(--text-xs);
    }

    .mobile-nav__divider {
        margin: 2px 0;
    }

    .mobile-nav__section-title {
        padding: 4px 12px 2px;
        font-size: 0.6rem;
    }

    .mobile-nav__links {
        padding: var(--space-xs) var(--space-sm);
        gap: 1px;
    }

    .mobile-nav__footer .btn {
        padding: 8px;
        font-size: var(--text-sm);
    }
}

@media (max-width: 480px) {
    .gfooter__grid {
        grid-template-columns: 1fr;
    }
}
/* 2026-10-21: "New" pill beside a menu item (Royale) */
.gnav__new{display:inline-block;margin-left:6px;padding:2px 6px;border-radius:999px;background:linear-gradient(90deg,#F59E0B,#FBBF24);color:#1a1200;font:900 10px/1.2 var(--font-body,'Nunito'),sans-serif;letter-spacing:.04em;text-transform:uppercase;vertical-align:middle}
/* ── Menus v2 (2026-10): Games mega menu, Tournaments menu, tile drawer on phones ── */
.gnav__soon{display:inline-block;margin-left:5px;padding:1px 6px;border-radius:999px;background:var(--border-light);color:var(--text-tertiary);font:800 9.5px/1.4 var(--font-body,'Nunito'),sans-serif;letter-spacing:.06em;text-transform:uppercase;vertical-align:1px}
.gnav__gold{color:#B45309}[data-theme=dark] .gnav__gold{color:#FBBF24}
.gnav__mega{display:grid;grid-template-columns:repeat(3,max-content);gap:4px 14px;padding:12px 14px;left:0;transform:translateY(4px)}
.gnav__dropdown:hover .gnav__mega,.gnav__dropdown:focus-within .gnav__mega{transform:translateY(0)}
@media (max-width:1100px){.gnav__mega{left:-72px}}   /* iPad landscape, small laptops: the right column stayed past the screen edge and made the page scroll sideways (961-1100 px: the bar is tighter there) */
.gnav__tmenu{min-width:230px}
.gnav__col{display:grid;align-content:start;gap:1px}
.gnav__col>b{font:900 10.5px/1 var(--font-body,'Nunito'),sans-serif;letter-spacing:.1em;text-transform:uppercase;color:var(--text-tertiary);padding:6px 10px 8px}
.gnav__mi{display:flex;gap:9px;align-items:flex-start;padding:8px 10px;border-radius:var(--radius-md);color:var(--text-primary);text-decoration:none;font-weight:800;font-size:var(--text-sm);line-height:1.25;white-space:nowrap}
.gnav__mi>em{font-style:normal;width:20px;flex:none;text-align:center}
.gnav__mi>span>small:last-child{display:block;font-weight:600;font-size:12px;color:var(--text-tertiary)}
a.gnav__mi:hover,a.gnav__mi:focus-visible{background:var(--accent-primary-light)}
.gnav__mi.is-soon{opacity:.62;cursor:default}
/* phone drawer */
.mnav{gap:12px!important}
.mnav-play{display:flex;justify-content:center;align-items:center;gap:8px;padding:12px;border-radius:14px;font:400 18px/1 var(--font-heading);color:#fff!important;text-decoration:none;background:linear-gradient(180deg,#60A5FA,#2563EB);box-shadow:0 4px 0 #1E40AF}
.mnav-grp{display:grid;gap:6px}.mnav-grp .mobile-nav__section-title{padding:0 2px}
.mnav-tiles{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.mnav-tile{position:relative;display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 10px;border-radius:12px;background:var(--bg-card);border:1px solid var(--border-color);color:var(--text-primary);font-weight:800;font-size:14px;line-height:1.15;text-decoration:none;min-width:0}
.mnav-tile>em{font-style:normal;font-size:18px;flex:none}
.mnav-tile>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.mnav-tile>span small{display:block;font-weight:700;font-size:11px;color:var(--text-tertiary)}
.mnav-tile.wide{grid-column:span 2}
.mnav-tile.gold{border-color:rgba(217,119,6,.45);background:linear-gradient(90deg,rgba(251,191,36,.16),var(--bg-card))}
.mnav-tile>.gnav__new,.mnav-tile>.gnav__soon{position:absolute;top:-7px;right:6px;margin:0}
.mnav-tile.is-soon{opacity:.6}
a.mnav-tile:hover,a.mnav-tile:focus-visible{border-color:var(--accent-primary)}
/* "More word lengths" (4/6/7 Letter Wordle): one menu row with three pill links */
.gnav__lens{cursor:default}
.gnav__lens-row{display:flex;gap:6px;margin-top:7px}
.gnav__lens-row a,.mnav-lens a{border-radius:999px;background:var(--accent-primary-light);color:var(--accent-primary-hover);font-weight:800;text-decoration:none;white-space:nowrap}
.gnav__lens-row a{padding:5px 11px;font-size:12.5px}
.gnav__lens-row a:hover,.gnav__lens-row a:focus-visible,.mnav-lens a:hover,.mnav-lens a:focus-visible{background:var(--accent-primary);color:#fff}
.mnav-tile.lens{flex-wrap:wrap;row-gap:8px;padding-bottom:9px}
.mnav-tile>.mnav-lens{display:flex;gap:6px;flex:1 0 100%;overflow:visible}
.mnav-lens a{flex:1;display:grid;place-items:center;min-height:38px;border-radius:10px;font-size:14px}
[data-theme="dark"] .gnav__lens-row a,[data-theme="dark"] .mnav-lens a{background:rgba(96,165,250,.16);color:#93C5FD}
.mnav-icons{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.mnav-icons.is-6{grid-template-columns:repeat(3,1fr)}
.mnav-icons a{display:grid;justify-items:center;gap:2px;padding:8px 0;border-radius:12px;background:var(--bg-card);border:1px solid var(--border-color);font-size:11.5px;font-weight:800;color:var(--text-secondary);text-decoration:none}
.mnav-icons a em{font-style:normal;font-size:18px}.mnav-icons a.is-active{border-color:var(--accent-primary);color:var(--accent-primary)}
@media (max-width:340px){.mnav-tile{font-size:13px;padding:7px 8px}.mnav-tile>em{font-size:16px}}
.gnav__mega,.gnav__tmenu{background:var(--bg-secondary);backdrop-filter:none;-webkit-backdrop-filter:none}
/* 961–1100 px: the two dropdowns made the bar ~60px wider; drop the trophy icon and tighten the links so nothing spills off-screen */
@media (min-width:961px) and (max-width:1100px){.gnav__ico{display:none}.gnav__link{padding:6px 10px}}

/* a signed-in header on a 320 px phone: the icons give back the few px that made the whole page slide sideways (2026-11-03) */
@media (max-width:340px){.header__actions{gap:2px}.header__inner{padding-left:8px;padding-right:6px}.header__gem-count{padding:4px 7px}}

/* premium-layout.css */
/* ═══════════════════════════════════════════════════════
   WordDuel — Premium Layout System
   Astros-inspired layout patterns (theme-agnostic)
   ═══════════════════════════════════════════════════════ */

/* ── Premium Hero ─────────────────────────────────── */
.premium-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-2xl) 0 var(--space-lg);
    position: relative;
    overflow: hidden;
}

.premium-hero::before,
.premium-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
    opacity: 0.5;
}

.premium-hero::before {
    width: 600px;
    height: 600px;
    top: -10%;
    left: -10%;
    background: radial-gradient(circle, var(--accent-primary-light) 0%, transparent 70%);
}

.premium-hero::after {
    width: 500px;
    height: 500px;
    bottom: -5%;
    right: -10%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
}

.premium-hero > * {
    position: relative;
    z-index: 1;
}

.premium-hero__title {
    font-size: var(--text-6xl);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

.premium-hero__subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    line-height: var(--leading-relaxed);
}

.premium-hero__actions {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Premium Section ──────────────────────────────── */
.premium-section {
    padding: var(--space-xl) 0;
    position: relative;
}

.premium-section--compact {
    padding: var(--space-md) 0;
}

.premium-section__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.premium-section__title {
    font-size: var(--text-4xl);
    font-weight: 900;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.premium-section__subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
}

/* ── Premium Card ─────────────────────────────────── */
.premium-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: transform var(--transition-smooth),
                box-shadow var(--transition-smooth),
                border-color var(--transition-base);
    position: relative;
    overflow: hidden;
}

.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 30px var(--accent-primary-light);
    border-color: var(--accent-primary);
}

.premium-card--interactive {
    cursor: pointer;
}

.premium-card--no-hover:hover {
    transform: none;
    box-shadow: none;
}

.premium-card--centered {
    text-align: center;
}

/* ── Premium Badge (Pill) ─────────────────────────── */
.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.premium-badge--primary {
    background: var(--accent-primary);
    color: #FFFFFF;
}

.premium-badge--success {
    background: var(--correct);
    color: #052E16;   /* white on bright green was 2.3:1 */
}

.premium-badge--warning {
    background: var(--present);
    color: #0F172A;
}

.premium-badge--purple {
    background: var(--purple);
    color: #FFFFFF;
}

.premium-badge--outline {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.premium-badge--live {
    background: #DC2626;
    color: #FFFFFF;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.88; }
}

/* ── Premium Stat ─────────────────────────────────── */
.premium-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    padding: var(--space-xl) 0;
}

.premium-stat {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-lg) var(--space-xl);
    text-align: center;
    min-width: 140px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.premium-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.premium-stat__value {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--weight-extrabold);
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.premium-stat__label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: var(--weight-medium);
}

/* ── Premium Grid ─────────────────────────────────── */
.premium-grid {
    display: grid;
    gap: var(--space-xl);
}

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

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

.premium-grid--auto {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ── Premium CTA Banner ──────────────────────────── */
.premium-cta {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    background: linear-gradient(135deg, 
        var(--accent-primary-light) 0%, 
        rgba(139, 92, 246, 0.08) 50%,
        rgba(0, 214, 143, 0.06) 100%
    );
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.premium-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, var(--accent-primary-light) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0.5;
}

.premium-cta > * {
    position: relative;
    z-index: 1;
}

.premium-cta__title {
    font-size: var(--text-4xl);
    font-weight: 900;
    margin-bottom: var(--space-sm);
}

.premium-cta__desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    font-size: var(--text-lg);
}

/* ── Premium Button (gradient) ────────────────────── */
.btn--gradient {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--purple) 100%);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.btn--gradient:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
}

.btn--glow {
    box-shadow: 0 0 20px var(--accent-primary-light), 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn--glow:hover {
    box-shadow: 0 0 30px var(--accent-primary-light), 0 6px 25px rgba(59, 130, 246, 0.4);
}

/* ── Premium Timeline (How to Play) ───────────────── */
.premium-timeline {
    display: flex;
    gap: var(--space-xl);
    position: relative;
    justify-content: center;
    flex-wrap: wrap;
}

.premium-timeline::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), var(--purple), transparent);
    opacity: 0.3;
    z-index: 0;
}

.premium-timeline__step {
    flex: 1;
    min-width: 200px;
    max-width: 260px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.premium-timeline__number {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--purple) 100%);
    color: #FFFFFF;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    font-size: var(--text-xl);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.premium-timeline__title {
    font-weight: var(--weight-bold);
    font-size: var(--text-lg);
    margin-bottom: var(--space-xs);
}

.premium-timeline__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--leading-relaxed);
}

/* ── Premium Feature (side-by-side) ───────────────── */
.premium-feature {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
}

.premium-feature__icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary-light);
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
    transition: transform var(--transition-base);
}

.premium-card:hover .premium-feature__icon {
    transform: scale(1.1);
}

.premium-feature__title {
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-xs);
}

.premium-feature__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--leading-relaxed);
}

/* ── Premium FAQ Accordion ────────────────────────── */
.premium-faq {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.premium-faq__item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: border-color var(--transition-base);
}

.premium-faq__item.is-open {
    border-color: var(--accent-primary);
    border-left: 3px solid var(--accent-primary);
}

.premium-faq__question {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: var(--weight-semibold);
    font-size: var(--text-base);
    color: var(--text-primary);
    cursor: pointer;
    background: none;
    text-align: left;
    transition: color var(--transition-fast);
}

.premium-faq__question:hover {
    color: var(--accent-primary);
}

.premium-faq__question::after {
    content: '+';
    font-size: var(--text-xl);
    color: var(--text-tertiary);
    transition: transform var(--transition-base);
    flex-shrink: 0;
    margin-left: var(--space-md);
}

.premium-faq__item.is-open .premium-faq__question::after {
    content: '−';
    color: var(--accent-primary);
}

.premium-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth);
}

.premium-faq__item.is-open .premium-faq__answer {
    max-height: 400px;
}

.premium-faq__answer-inner {
    padding: 0 var(--space-xl) var(--space-xl);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* ── Mini Leaderboard ─────────────────────────────── */
.mini-leaderboard {
    max-width: 600px;
    margin: 0 auto;
}

.mini-leaderboard__row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.mini-leaderboard__row:nth-child(odd) {
    background: var(--glass-bg-subtle);
}

.mini-leaderboard__row--gold {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.02) 100%) !important;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.mini-leaderboard__rank {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    width: 32px;
    text-align: center;
}

.mini-leaderboard__name {
    flex: 1;
    font-weight: var(--weight-semibold);
}

.mini-leaderboard__score {
    font-family: var(--font-heading);
    color: var(--accent-primary);
    font-weight: var(--weight-bold);
}

/* ── Testimonial Card ─────────────────────────────── */
.testimonial-card {
    padding: var(--space-xl);
    text-align: left;
}

.testimonial-card__stars {
    color: var(--gem-gold);
    font-size: var(--text-lg);
    margin-bottom: var(--space-md);
    letter-spacing: 0.1em;
}

.testimonial-card__text {
    font-size: var(--text-base);
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: var(--space-md);
    line-height: var(--leading-relaxed);
}

.testimonial-card__author {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: var(--weight-semibold);
}

/* ── Word of the Day ──────────────────────────────── */
.wotd {
    display: flex;
    gap: var(--space-2xl);
    align-items: center;
}

.wotd__content {
    flex: 1;
}

.wotd__word {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.wotd__type {
    font-size: var(--text-sm);
    color: var(--accent-primary);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-sm);
}

.wotd__pronunciation {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    margin-bottom: var(--space-md);
}

.wotd__definition {
    font-size: var(--text-lg);
    color: var(--text-primary);
    font-weight: var(--weight-medium);
    margin-bottom: var(--space-md);
    line-height: var(--leading-relaxed);
}

.wotd__example {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-style: italic;
    padding-left: var(--space-lg);
    border-left: 3px solid var(--accent-primary);
    margin-bottom: var(--space-lg);
}

.wotd__decoration {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    opacity: 0.8;
}

/* ── Scroll Animations ────────────────────────────── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll[data-delay="1"] { transition-delay: 100ms; }
.animate-on-scroll[data-delay="2"] { transition-delay: 200ms; }
.animate-on-scroll[data-delay="3"] { transition-delay: 300ms; }
.animate-on-scroll[data-delay="4"] { transition-delay: 400ms; }
.animate-on-scroll[data-delay="5"] { transition-delay: 500ms; }

/* ── Explore Games Hub ────────────────────────────── */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.explore-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    text-decoration: none;
    color: inherit;
}

.explore-card__icon {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary-light);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.explore-card:hover .explore-card__icon {
    transform: scale(1.1) rotate(-5deg);
}

.explore-card__title {
    font-weight: var(--weight-bold);
    font-size: var(--text-base);
    margin-bottom: 2px;
}

.explore-card__desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* ── About Section ────────────────────────────────── */
.about-section {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-section p {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

/* ── Daily Challenge Widget ───────────────────────── */
.daily-widget {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.daily-widget__info {
    flex: 1;
    min-width: 250px;
}

.daily-widget__label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-xs);
}

.daily-widget__stat {
    font-size: var(--text-2xl);
    font-weight: var(--weight-extrabold);
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.daily-widget__sub {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.daily-widget__yesterday {
    padding: var(--space-md) var(--space-lg);
    background: var(--glass-bg-subtle);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .premium-hero__title {
        font-size: var(--text-4xl);
    }

    .premium-section {
        padding: var(--space-lg) 0;
    }

    .premium-section__title {
        font-size: var(--text-3xl);
    }

    .premium-grid--2,
    .premium-grid--3 {
        grid-template-columns: 1fr;
    }

    .premium-timeline {
        flex-direction: column;
        align-items: center;
    }

    .premium-timeline::before {
        display: none;
    }

    .premium-timeline__step {
        max-width: 100%;
    }

    .premium-cta__title {
        font-size: var(--text-3xl);
    }

    .wotd {
        flex-direction: column;
        text-align: center;
    }

    .wotd__example {
        text-align: left;
    }

    .wotd__decoration {
        width: 120px;
        height: 120px;
        font-size: 4rem;
    }

    .daily-widget {
        flex-direction: column;
        text-align: center;
    }

    .premium-hero {
        min-height: auto;
        padding: var(--space-2xl) 0 var(--space-lg);
    }
}

@media (max-width: 480px) {
    .premium-hero__title {
        font-size: var(--text-3xl);
    }

    .premium-stats {
        gap: var(--space-sm);
    }

    .premium-stat {
        min-width: 0;
        flex: 1 1 45%;
        padding: var(--space-md);
    }

    .premium-stat__value {
        font-size: var(--text-2xl);
    }
}

/* Short screens (school Chromebooks at 1366x650, small phones): Play Now stays on the first screen. Same pieces and words, less air. */
@media (max-height: 720px) {
    .premium-hero { min-height: 0; padding-top: var(--space-md); padding-bottom: var(--space-md); }
    .premium-hero .premium-badge { margin-bottom: var(--space-sm) !important; }
    .premium-hero .hero__demo { margin-bottom: var(--space-md); }
    .premium-hero .hero__demo-tile { width: 44px; height: 44px; font-size: var(--text-lg); }
    .premium-hero__title { font-size: var(--text-4xl); margin-bottom: var(--space-sm); }
    .premium-hero__subtitle { font-size: var(--text-base); margin-bottom: var(--space-md); }
    .premium-hero__actions { gap: var(--space-sm); }
}
@media (max-height: 720px) and (max-width: 480px) {
    .premium-hero .hero__demo-tile { width: 36px; height: 36px; font-size: var(--text-base); }
    .premium-hero__title { font-size: var(--text-2xl); }
    .premium-hero__subtitle { font-size: var(--text-sm); line-height: 1.4; }
}
/* a phone on its side: the demo tiles step aside, so Play Now is still on the first screen */
@media (max-height: 480px) {
    .premium-hero .hero__demo { display: none; }
}
/* the badge stays on one line on small phones */
@media (max-width: 360px) {
    .premium-hero .premium-badge { font-size: 11px; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
}
/* small phones: long buttons wrap inside their card instead of pushing the content off-centre */
@media (max-width: 390px) {
    .daily-widget__info, .wotd__content { min-width: 0; width: 100%; }
    .daily-widget .btn, .wotd .btn { white-space: normal; }
}
@media (max-width: 640px) {
    .wotd__decoration { width: 72px; height: 72px; font-size: 2.4rem; }
}

