/* =========================================================
   TOWNTUNE V2
   Experimental portal stylesheet.
   Safe to run beside the current /styles.css
   ========================================================= */

:root {
    --tt-bg: #08172d;
    --tt-bg-soft: #0d213f;
    --tt-panel: rgba(17, 42, 76, 0.76);
    --tt-panel-solid: #102b50;
    --tt-line: rgba(255, 255, 255, 0.09);
    --tt-text: #f7f9ff;
    --tt-muted: #aebbd0;
    --tt-accent: #68e0d3;
    --tt-accent-2: #6d7cff;
    --tt-white: #ffffff;
    --tt-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    --tt-radius-xl: 28px;
    --tt-radius-lg: 22px;
    --tt-radius-md: 16px;
    --tt-max: 1320px;
    --partner-strip-h: 36px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 98px;
}

body.portal-v2 {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% -10%, rgba(83, 99, 255, 0.28), transparent 30%),
        radial-gradient(circle at 90% 8%, rgba(48, 224, 204, 0.16), transparent 24%),
        var(--tt-bg);
    color: var(--tt-text);
    font-family:
        Inter,
        ui-rounded,
        "SF Pro Rounded",
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    line-height: 1.45;
    overflow-x: hidden;
}

body.portal-v2 img {
    max-width: 100%;
}

body.portal-v2 a {
    color: inherit;
}

body.portal-v2 button,
body.portal-v2 input {
    font: inherit;
}




/* =========================================================
   PARTNER STRIP
   One line only. Swipe/scroll horizontally on small screens.
   ========================================================= */

.partner-strip {
    position: sticky;
    top: 0;
    z-index: 1100;
    width: 100%;
    height: var(--partner-strip-h);
    overflow-x: auto;
    overflow-y: hidden;
    background: #050b14;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.partner-strip::-webkit-scrollbar {
    display: none;
}

.partner-strip-track {
    width: max-content;
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding:
        0 max(18px, env(safe-area-inset-right))
        0 max(18px, env(safe-area-inset-left));
    white-space: nowrap;
}

.partner-strip a {
    color: #f4f7fb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
}

.partner-strip a:hover {
    color: var(--tt-accent);
}

.partner-strip span {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
}

@media (max-width: 760px) {
    .partner-strip-track {
        justify-content: flex-start;
        gap: 12px;
    }

    .partner-strip a {
        font-size: 12px;
    }
}


/* =========================================================
   HEADER
   ========================================================= */

.portal-header {
    position: sticky;
    top: var(--partner-strip-h);
    z-index: 1000;
    padding: max(10px, env(safe-area-inset-top)) 18px 10px;
    background: linear-gradient(to bottom, rgba(8, 23, 45, 0.96), rgba(8, 23, 45, 0.82));
    border-bottom: 1px solid var(--tt-line);
    backdrop-filter: blur(18px);
}

.portal-header-inner {
    width: min(100%, var(--tt-max));
    min-height: 58px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    flex: 0 0 auto;
}

.portal-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.02)),
        linear-gradient(135deg, #6879ff, #44dccc);
    box-shadow:
        0 8px 24px rgba(70, 109, 255, 0.28),
        inset 0 1px rgba(255,255,255,0.3);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.portal-brand-name {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -0.8px;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--tt-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
}

.main-nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.main-nav > a {
    padding: 10px 13px;
    border-radius: 12px;
    color: #dce6f7;
    text-decoration: none;
    font-size: 15px;
    font-weight: 800;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.main-nav > a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-1px);
}

.nav-search {
    position: relative;
    width: min(310px, 28vw);
    margin-left: 8px;
}

.nav-search input {
    width: 100%;
    min-height: 42px;
    padding: 9px 15px 9px 16px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    outline: none;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: inset 0 1px rgba(255,255,255,0.03);
}

.nav-search input::placeholder {
    color: #9eabc0;
}

.nav-search input:focus {
    border-color: rgba(104, 224, 211, 0.72);
    box-shadow: 0 0 0 3px rgba(104, 224, 211, 0.12);
}

.site-search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1200;
    display: none;
    width: min(360px, 88vw);
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 18px;
    background: #102746;
    box-shadow: var(--tt-shadow);
}

.site-search-results.open {
    display: block;
}

.main-nav .site-search-results a {
    display: block;
    padding: 13px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: #eef5ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 750;
}

.main-nav .site-search-results a:last-child {
    border-bottom: 0;
}

.main-nav .site-search-results a:hover {
    background: rgba(255,255,255,0.08);
}

.site-search-message {
    padding: 14px 15px;
    color: var(--tt-muted);
    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   LAYOUT
   ========================================================= */

.portal-main {
    width: min(100%, var(--tt-max));
    margin: 0 auto;
    padding: 30px 22px 70px;
}

.portal-section {
    margin-top: 54px;
}

.compact-section {
    margin-top: 38px;
}

.section-row-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-row-heading h2 {
    margin: 3px 0 0;
    font-size: clamp(25px, 3vw, 38px);
    line-height: 1.06;
    letter-spacing: -1.25px;
}

.section-kicker,
.eyebrow {
    display: block;
    color: var(--tt-accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.section-link {
    padding: 8px 2px;
    color: #dbe6f8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.section-link:hover {
    color: var(--tt-accent);
}


/* =========================================================
   FEATURED
   ========================================================= */

.featured-game {
    margin-top: 10px;
}

.featured-game-link {
    position: relative;
    min-height: 360px;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: var(--tt-radius-xl);
    background:
        linear-gradient(135deg, rgba(45, 72, 130, 0.4), rgba(18, 44, 79, 0.15)),
        #112b4f;
    box-shadow: var(--tt-shadow);
    text-decoration: none;
    isolation: isolate;
}

.featured-game-link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px rgba(255,255,255,0.12);
    pointer-events: none;
}

.featured-art {
    position: relative;
    min-height: 360px;
    overflow: hidden;
}

.featured-art-memory {
    background:
        radial-gradient(circle at 26% 25%, rgba(255,255,255,0.15), transparent 24%),
        linear-gradient(135deg, #5d63ff 0%, #805be6 44%, #22c9ba 100%);
}

.featured-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(1px);
    opacity: 0.55;
}

.orb-one {
    width: 270px;
    height: 270px;
    left: -60px;
    bottom: -70px;
    background: rgba(255, 255, 255, 0.16);
}

.orb-two {
    width: 190px;
    height: 190px;
    top: -50px;
    right: 8%;
    background: rgba(0, 0, 0, 0.12);
}

.featured-cards {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, 118px);
    grid-auto-rows: 118px;
    gap: 15px;
    align-content: center;
    justify-content: center;
    transform: rotate(-7deg);
}

.featured-cards span {
    display: grid;
    place-items: center;
    border: 4px solid rgba(255,255,255,0.65);
    border-radius: 23px;
    background: rgba(255,255,255,0.18);
    box-shadow: 0 18px 30px rgba(10, 17, 42, 0.22);
    color: #fff;
    font-size: 48px;
    font-weight: 900;
    backdrop-filter: blur(6px);
}

.featured-copy {
    padding: 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        radial-gradient(circle at 100% 0%, rgba(104,224,211,0.11), transparent 34%),
        rgba(8,23,45,0.55);
}

.featured-copy h1 {
    margin: 7px 0 10px;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 0.98;
    letter-spacing: -2.4px;
}

.featured-copy p {
    margin: 0 0 24px;
    max-width: 440px;
    color: #c4d0e2;
    font-size: 17px;
}

.play-pill {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 17px;
    border-radius: 999px;
    background: #fff;
    color: #0b1c34;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}


/* =========================================================
   GAME GRID
   ========================================================= */

.game-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.game-tile {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    background: rgba(255,255,255,0.055);
    box-shadow: 0 8px 24px rgba(0,0,0,0.16);
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.game-tile:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 18px 34px rgba(0,0,0,0.24);
}

.game-art {
    position: relative;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.game-art::before,
.game-art::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
}

.game-art::before {
    width: 150px;
    height: 150px;
    top: -70px;
    right: -55px;
}

.game-art::after {
    width: 110px;
    height: 110px;
    left: -45px;
    bottom: -50px;
}

.art-memory {
    background: linear-gradient(135deg, #596cff, #8558dc);
}

.art-difference {
    background: linear-gradient(135deg, #ff8d5d, #ff4e83);
}

.art-maths {
    background: linear-gradient(135deg, #20b790, #0f8b8d);
}

.art-words {
    background: linear-gradient(135deg, #f7b733, #fc4a1a);
}

.art-quiz {
    background: linear-gradient(135deg, #4b79ff, #24c6dc);
}

.art-draw {
    background: linear-gradient(135deg, #e55d87, #5fc3e4);
}

.art-icon {
    position: relative;
    z-index: 2;
    font-size: clamp(42px, 5vw, 68px);
    filter: drop-shadow(0 12px 18px rgba(0,0,0,0.2));
    transform: translateY(2px);
}

.game-badge {
    position: absolute;
    z-index: 3;
    top: 10px;
    left: 10px;
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 999px;
    background: rgba(4, 17, 38, 0.32);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    backdrop-filter: blur(7px);
}

.game-meta {
    padding: 13px 13px 15px;
}

.game-meta h3 {
    margin: 0;
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-meta p {
    margin: 5px 0 0;
    overflow: hidden;
    color: #93a3bb;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   PRINTABLE CATEGORIES
   ========================================================= */

.printables-section {
    padding-top: 2px;
}

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

.category-card {
    position: relative;
    min-height: 154px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--tt-radius-lg);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(0,0,0,0.16);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 34px rgba(0,0,0,0.22);
}

.category-books {
    background: linear-gradient(135deg, #b74eff, #6259ff);
}

.category-generators {
    background: linear-gradient(135deg, #ff8364, #ff4e8b);
}

.category-tools {
    background: linear-gradient(135deg, #18a886, #127991);
}

.category-icon {
    position: relative;
    z-index: 2;
    font-size: 42px;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.15));
}

.category-copy {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.category-copy strong {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 20px;
    line-height: 1.1;
}

.category-copy small {
    display: block;
    color: rgba(255,255,255,0.78);
    font-size: 13px;
    line-height: 1.35;
}

.category-arrow {
    position: relative;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}


/* =========================================================
   BOOK STRIP
   ========================================================= */

.book-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.book-tile {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    background: rgba(255,255,255,0.055);
    text-decoration: none;
    box-shadow: 0 9px 24px rgba(0,0,0,0.16);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.book-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 17px 34px rgba(0,0,0,0.23);
}

.book-tile img {
    width: 100%;
    aspect-ratio: 4 / 5;
    display: block;
    object-fit: cover;
    background: #fff;
}

.book-tile span {
    display: block;
    padding: 13px 12px 14px;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   DISCOVER CARD
   ========================================================= */

.discover-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--tt-radius-xl);
    background:
        radial-gradient(circle at 95% 20%, rgba(104,224,211,0.08), transparent 30%),
        rgba(255,255,255,0.045);
}

.discover-card h2 {
    margin: 4px 0 8px;
    font-size: 28px;
    letter-spacing: -0.7px;
}

.discover-card p {
    margin: 0;
    max-width: 620px;
    color: var(--tt-muted);
}

.discover-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.discover-links a {
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
}

.discover-links a:hover {
    background: rgba(255,255,255,0.11);
}




/* =========================================================
   ABOUT / SEO PANEL
   Useful content kept below the visual portal experience.
   ========================================================= */

.about-towntune {
    margin-top: 62px;
}

.about-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 4vw, 54px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    background:
        radial-gradient(circle at 100% 0%, rgba(104, 224, 211, 0.16), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
    color: #10233f;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.about-panel::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    left: -120px;
    bottom: -140px;
    border-radius: 50%;
    background: rgba(93, 99, 255, 0.08);
    pointer-events: none;
}

.about-label {
    display: inline-block;
    margin-bottom: 10px;
    color: #3f62e9;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.about-panel > h2 {
    max-width: 760px;
    margin: 0 0 30px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.02;
    letter-spacing: -2px;
    color: #0c2747;
}

.about-lead {
    max-width: 900px;
    margin-bottom: 34px;
}

.about-lead h3,
.about-block h3,
.about-bottom h3 {
    margin: 0 0 10px;
    color: #0e3158;
    font-size: 22px;
    line-height: 1.15;
}

.about-lead p,
.about-block p,
.about-bottom p {
    margin: 0;
    color: #3c5877;
    font-size: 16px;
    line-height: 1.75;
}

.about-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.about-block {
    position: relative;
    z-index: 1;
    padding: 24px;
    border: 1px solid rgba(18, 54, 91, 0.08);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 10px 28px rgba(32, 70, 111, 0.08);
}

.about-block p + p {
    margin-top: 14px;
}

.about-panel a {
    color: #3659d9;
    font-weight: 850;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.about-panel a:hover {
    color: #1638ba;
}

.about-bottom {
    position: relative;
    z-index: 1;
    margin-top: 22px;
    padding: 26px;
    border-radius: 22px;
    background: #0d2948;
    color: #fff;
}

.about-bottom h3 {
    color: #fff;
}

.about-bottom p {
    color: #c5d4e5;
}

.about-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.about-cta-row a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.about-cta-row a:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

@media (max-width: 900px) {
    .about-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .about-towntune {
        margin-top: 48px;
    }

    .about-panel {
        padding: 27px 20px 20px;
        border-radius: 24px;
    }

    .about-panel > h2 {
        margin-bottom: 24px;
        font-size: 38px;
        letter-spacing: -1.4px;
    }

    .about-lead h3,
    .about-block h3,
    .about-bottom h3 {
        font-size: 19px;
    }

    .about-lead p,
    .about-block p,
    .about-bottom p {
        font-size: 15px;
        line-height: 1.65;
    }

    .about-block {
        padding: 19px;
        border-radius: 18px;
    }

    .about-bottom {
        padding: 20px;
        border-radius: 19px;
    }

    .about-cta-row {
        flex-direction: column;
    }

    .about-cta-row a {
        justify-content: center;
        width: 100%;
        text-align: center;
    }
}


/* =========================================================
   FOOTER
   ========================================================= */

.portal-footer {
    border-top: 1px solid var(--tt-line);
    background: #071427;
}

.portal-footer-inner {
    width: min(100%, var(--tt-max));
    margin: 0 auto;
    padding:
        28px 22px
        max(28px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #8697b1;
    font-size: 13px;
}

.portal-footer-inner > div:first-child {
    display: flex;
    align-items: baseline;
    gap: 9px;
    flex-wrap: wrap;
}

.portal-footer strong {
    color: #fff;
    font-size: 15px;
}

.portal-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
}

.portal-footer a {
    color: #a8b5c8;
    text-decoration: none;
    font-weight: 750;
}

.portal-footer a:hover {
    color: #fff;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

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

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

    .featured-game-link {
        grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    }

}


/* =========================================================
   SMALL TABLET / LARGE MOBILE
   ========================================================= */

@media (max-width: 820px) {

    html {
        scroll-padding-top: 82px;
    }

    .portal-header {
        padding-left: 14px;
        padding-right: 14px;
    }

    .portal-header-inner {
        min-height: 54px;
    }

    .portal-brand-mark {
        width: 40px;
        height: 40px;
    }

    .portal-brand-name {
        font-size: 21px;
    }

    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 14px;
        right: 14px;
        display: none;
        align-items: stretch;
        padding: 12px;
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 18px;
        background: rgba(10, 29, 55, 0.98);
        box-shadow: var(--tt-shadow);
        backdrop-filter: blur(18px);
    }

    .main-nav.open {
        display: flex;
        flex-direction: column;
    }

    .main-nav > a {
        width: 100%;
        padding: 12px 13px;
        background: rgba(255,255,255,0.04);
        text-align: left;
    }

    .nav-search {
        width: 100%;
        margin: 2px 0 0;
    }

    .site-search-results {
        position: static;
        width: 100%;
        max-height: 280px;
        margin-top: 8px;
    }

    .portal-main {
        padding: 22px 14px 54px;
    }

    .featured-game-link {
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .featured-art {
        min-height: 300px;
    }

    .featured-copy {
        padding: 26px;
    }

    .featured-copy h1 {
        font-size: 42px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 118px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .portal-main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .portal-section {
        margin-top: 42px;
    }

    .section-row-heading {
        margin-bottom: 14px;
    }

    .section-row-heading h2 {
        font-size: 27px;
    }

    .featured-art {
        min-height: 240px;
    }

    .featured-cards {
        grid-template-columns: repeat(2, 82px);
        grid-auto-rows: 82px;
        gap: 11px;
    }

    .featured-cards span {
        border-radius: 17px;
        font-size: 34px;
    }

    .featured-copy {
        padding: 22px 20px 23px;
    }

    .featured-copy h1 {
        margin-top: 5px;
        font-size: 38px;
        letter-spacing: -1.6px;
    }

    .featured-copy p {
        font-size: 15px;
    }

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

    .game-tile {
        border-radius: 17px;
    }

    .game-meta {
        padding: 11px 11px 13px;
    }

    .game-meta h3 {
        font-size: 14px;
    }

    .game-meta p {
        font-size: 11px;
    }

    .game-badge {
        top: 8px;
        left: 8px;
    }

    .category-card {
        min-height: 105px;
        gap: 13px;
        padding: 18px;
        border-radius: 19px;
    }

    .category-icon {
        font-size: 34px;
    }

    .category-copy strong {
        font-size: 18px;
    }

    .category-copy small {
        font-size: 12px;
    }

    .category-arrow {
        width: 34px;
        height: 34px;
    }

    .book-strip {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        padding-bottom: 4px;
        margin-right: -12px;
    }

    .book-strip::-webkit-scrollbar {
        display: none;
    }

    .book-tile {
        flex: 0 0 44vw;
        max-width: 190px;
        scroll-snap-align: start;
        border-radius: 17px;
    }

    .book-tile span {
        font-size: 13px;
    }

    .discover-card {
        align-items: stretch;
        flex-direction: column;
        padding: 22px;
        border-radius: 22px;
    }

    .discover-links {
        justify-content: flex-start;
    }

    .portal-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-footer-links {
        justify-content: flex-start;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .portal-brand-name {
        font-size: 19px;
    }

    .featured-copy h1 {
        font-size: 34px;
    }

    .section-link {
        font-size: 12px;
    }

    .category-copy small {
        display: none;
    }

}


/* =========================================================
   PHP V2: GENERIC ROTATING FEATURED ART
   ========================================================= */

.featured-art-generic {
    display: grid;
    place-items: center;
}

.featured-game-icon {
    position: relative;
    z-index: 3;
    font-size: clamp(92px, 12vw, 170px);
    line-height: 1;
    filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.24));
    transform: rotate(-5deg);
}

.featured-art-generic::before,
.featured-art-generic::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.featured-art-generic::before {
    width: 310px;
    height: 310px;
    left: -90px;
    bottom: -110px;
}

.featured-art-generic::after {
    width: 220px;
    height: 220px;
    right: -45px;
    top: -70px;
}

@media (max-width: 600px) {
    .featured-game-icon {
        font-size: 100px;
    }
}
