/* =========================================================
   TOWNTUNE V3 GAMES
   Shared landing pages + locked app-style fullscreen player.
   ========================================================= */

html.tt-game-open,
html.tt-game-open body,
body.tt-game-open {
    overflow: hidden !important;
}

.game-page-main {
    width: min(1180px, calc(100% - 28px));
    margin: 24px auto 70px;
}

.game-launch-card {
    position: relative;
    min-height: 390px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 32px;
    background:
        radial-gradient(circle at 15% 18%, rgba(117, 226, 215, .13), transparent 25%),
        radial-gradient(circle at 88% 12%, rgba(117, 106, 255, .22), transparent 31%),
        linear-gradient(135deg, #112742, #171d4d 58%, #26395a);
    box-shadow: 0 24px 58px rgba(0,0,0,.25);
    cursor: pointer;
    outline: none;
}

.game-launch-card:focus-visible {
    box-shadow:
        0 0 0 3px rgba(112,224,211,.48),
        0 24px 58px rgba(0,0,0,.25);
}

.game-launch-art {
    position: relative;
    min-height: 320px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 34px;
}

.game-launch-art::before,
.game-launch-art::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.game-launch-art::before {
    width: 290px;
    height: 290px;
    left: -100px;
    bottom: -130px;
    background: rgba(255,255,255,.055);
}

.game-launch-art::after {
    width: 220px;
    height: 220px;
    right: -100px;
    top: -95px;
    background: rgba(255,255,255,.055);
}

.launch-demo {
    position: relative;
    z-index: 2;
    width: min(100%, 590px);
    min-height: 245px;
    display: grid;
    place-items: center;
}

.game-launch-copy {
    position: relative;
    z-index: 2;
    display: grid;
    align-content: center;
    gap: 26px;
    padding: clamp(30px, 5vw, 54px);
    background: rgba(4, 14, 30, .20);
    backdrop-filter: blur(10px);
}

.game-launch-kicker {
    color: #73e0d5;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.game-launch-copy h1 {
    margin: 8px 0 12px;
    color: #fff;
    font-size: clamp(42px, 5vw, 68px);
    line-height: .94;
    letter-spacing: -2.8px;
}

.game-launch-copy p {
    max-width: 520px;
    margin: 0;
    color: #b9c8da;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 650;
}

.game-launch-play {
    width: fit-content;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 20px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, #6ce0d3, #68a7ff);
    color: #07172c;
    font: inherit;
    font-size: 15px;
    font-weight: 950;
    box-shadow: 0 14px 28px rgba(54, 176, 191, .22);
    cursor: pointer;
}

.game-landing-section {
    margin-top: 56px;
}

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

.game-landing-heading h2 {
    margin: 5px 0 0;
    color: #fff;
    font-size: clamp(28px, 3vw, 38px);
}

.section-link {
    color: #73e0d5 !important;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

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

.related-game-grid > [hidden] {
    display: none !important;
}

.game-info-panel {
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 26px;
    background: #eef3f8;
    color: #12243a;
    box-shadow: 0 18px 42px rgba(0,0,0,.18);
}

.game-info-panel .about-label {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: #dce6f2;
    color: #31506d;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.game-info-panel h2 {
    margin: 12px 0 14px;
    color: #0b2036;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -1.5px;
}

.game-info-panel h3 {
    margin: 25px 0 8px;
    color: #122b45;
    font-size: 20px;
}

.game-info-panel p,
.game-info-panel li {
    color: #4a6177;
    font-size: 15px;
    line-height: 1.65;
}

.game-info-panel ul {
    padding-left: 20px;
}

.game-info-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 28px;
}

body.portal-v2 .game-info-panel .game-info-links a,
body.portal-v2 .game-info-panel .game-info-links a:visited {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 9px 13px;
    border-radius: 11px;
    background: #103250;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}


/* =========================================================
   LAUNCH ART
   ========================================================= */

.wyr-demo {
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
}

.wyr-demo .demo-choice {
    width: min(190px, 100%);
    aspect-ratio: 1 / .9;
    display: grid;
    place-items: center;
    border-radius: 28px;
    color: #fff;
    font-size: 58px;
    font-weight: 950;
    box-shadow: 0 18px 38px rgba(0,0,0,.22);
}

.wyr-demo .demo-choice:first-child {
    background: linear-gradient(135deg, #ff895f, #ff4f85);
    transform: rotate(-6deg);
}

.wyr-demo .demo-choice:last-child {
    background: linear-gradient(135deg, #665dff, #9d54d9);
    transform: rotate(6deg);
}

.wyr-demo b {
    color: #fff;
    font-size: 22px;
}

.quiz-demo {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    transform: rotate(-2deg);
}

.quiz-demo span {
    min-height: 92px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: rgba(255,255,255,.10);
    color: #fff;
    font-size: 22px;
    font-weight: 950;
    border: 1px solid rgba(255,255,255,.10);
}

.quiz-demo span:first-child {
    grid-column: 1 / -1;
    min-height: 120px;
    background: linear-gradient(135deg, #735dff, #4c9de8);
    font-size: 68px;
}

.maths-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.maths-demo span {
    min-width: 82px;
    min-height: 92px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, #20ba94, #248fc8);
    color: #fff;
    font-size: 46px;
    font-weight: 950;
    box-shadow: 0 16px 34px rgba(0,0,0,.20);
}

.maths-demo b {
    color: #fff;
    font-size: 46px;
}

.odd-demo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: min(360px, 100%);
}

.odd-demo span {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: rgba(255,255,255,.10);
    font-size: 55px;
    border: 1px solid rgba(255,255,255,.08);
}

.odd-demo span:last-child {
    background: linear-gradient(135deg, #ff9a54, #ff4d7c);
    transform: rotate(6deg);
}

.number-demo {
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    width: min(460px, 100%);
}

.number-demo span {
    aspect-ratio: .8;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #546cff, #8c5de3);
    color: #fff;
    font-size: 40px;
    font-weight: 950;
    box-shadow: 0 14px 30px rgba(0,0,0,.20);
}

.music-demo {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: min(360px, 100%);
}

.music-demo span {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 30px;
    font-size: 54px;
    box-shadow: 0 15px 34px rgba(0,0,0,.20);
}

.music-demo span:nth-child(1) { background: #e95b68; }
.music-demo span:nth-child(2) { background: #4387ed; }
.music-demo span:nth-child(3) { background: #37ae78; }
.music-demo span:nth-child(4) { background: #e4b63c; }

.alphabet-demo {
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    width: min(430px, 100%);
}

.alphabet-demo span {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(255,255,255,.09);
    color: #dbe7f5;
    font-size: 30px;
    font-weight: 950;
    border: 1px solid rgba(255,255,255,.08);
}

.alphabet-demo span.target {
    background: linear-gradient(135deg, #6ce0d3, #4c9de8);
    color: #061727;
    transform: rotate(-5deg);
}

.animal-demo {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: min(430px, 100%);
}

.animal-demo span {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: rgba(255,255,255,.09);
    font-size: 53px;
    border: 1px solid rgba(255,255,255,.08);
}

.animal-demo span:nth-child(2) {
    background: linear-gradient(135deg, #ff9759, #ef5e8c);
    transform: translateY(-8px);
}


/* =========================================================
   LOCKED APP PLAYER
   ========================================================= */

.tt-game-player {
    position: fixed;
    z-index: 7000;
    inset: 0;
    height: 100dvh;
    display: none;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, rgba(49, 91, 126, .20), transparent 33%),
        #061524;
}

.tt-game-player.open {
    display: grid;
}

.tt-player-topbar {
    position: relative;
    z-index: 5;
    min-height: calc(58px + env(safe-area-inset-top));
    padding:
        env(safe-area-inset-top)
        max(10px, env(safe-area-inset-right))
        0
        max(10px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) 74px;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    background: rgba(7, 23, 44, .96);
    backdrop-filter: blur(14px);
}

.tt-game-exit {
    width: 68px;
    min-height: 42px;
    padding: 0 9px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    background: rgba(255,255,255,.07);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
}

.tt-player-title {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: clamp(17px, 2.4dvh, 22px);
    font-weight: 950;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tt-player-spacer {
    width: 68px;
}

.tt-game-player-inner {
    min-height: 0;
    width: min(100%, 980px);
    margin: 0 auto;
    padding:
        clamp(6px, 1.2dvh, 11px)
        max(6px, env(safe-area-inset-right))
        max(6px, env(safe-area-inset-bottom))
        max(6px, env(safe-area-inset-left));
    overflow: hidden;
}

.tt-app-game {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: clamp(18px, 2.6dvh, 28px);
    background:
        radial-gradient(circle at 80% 0%, rgba(96, 164, 255, .10), transparent 28%),
        #102d4e;
    box-shadow: 0 20px 50px rgba(0,0,0,.30);
}

.app-game-head {
    padding: clamp(8px, 1.4dvh, 14px);
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.app-status-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.app-status-row::-webkit-scrollbar,
.app-mode-row::-webkit-scrollbar {
    display: none;
}

.app-status-pill {
    flex: 0 0 auto;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.075);
    color: #c9d8e9;
    font-size: clamp(10px, 1.55dvh, 12px);
    font-weight: 800;
}

.app-status-pill strong {
    color: #fff;
}

.app-mode-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: clamp(6px, 1dvh, 10px);
    overflow-x: auto;
    scrollbar-width: none;
}

.app-mode {
    flex: 0 0 auto;
    min-height: clamp(31px, 4.5dvh, 39px);
    padding: 6px 11px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 11px;
    background: rgba(255,255,255,.055);
    color: #d6e2ef;
    font: inherit;
    font-size: clamp(10px, 1.55dvh, 12px);
    font-weight: 850;
    cursor: pointer;
}

.app-mode.active {
    border-color: rgba(108,224,211,.38);
    background: rgba(108,224,211,.15);
    color: #fff;
}

.app-game-stage {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    gap: clamp(4px, .9dvh, 9px);
    overflow: hidden;
    padding:
        clamp(7px, 1.3dvh, 13px)
        clamp(9px, 2vw, 18px)
        clamp(8px, 1.4dvh, 14px);
}

.game-prompt {
    width: min(100%, 760px);
    margin: 0;
    color: #e9f2fb;
    font-size: clamp(15px, 2.5dvh, 24px);
    line-height: 1.25;
    font-weight: 950;
    text-align: center;
}

.game-subprompt {
    width: min(100%, 720px);
    margin: 0;
    color: #9fb2c8;
    font-size: clamp(10px, 1.65dvh, 13px);
    line-height: 1.35;
    text-align: center;
}

.feedback-panel {
    width: min(100%, 760px);
    min-height: clamp(40px, 7dvh, 58px);
    max-height: clamp(50px, 8.5dvh, 70px);
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: clamp(7px, 1.1dvh, 10px) 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.065);
    color: #d8e5f3;
    font-size: clamp(10px, 1.65dvh, 13px);
    line-height: 1.3;
    font-weight: 750;
    text-align: center;
}

.game-action-row {
    width: min(100%, 760px);
    display: flex;
    justify-content: center;
    gap: 7px;
}

.game-action {
    min-width: 120px;
    min-height: clamp(34px, 5.2dvh, 44px);
    padding: 6px 13px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: rgba(255,255,255,.07);
    color: #fff;
    font: inherit;
    font-size: clamp(10px, 1.7dvh, 13px);
    font-weight: 900;
    cursor: pointer;
}

.game-action.primary {
    border-color: transparent;
    background: linear-gradient(135deg, #6374ff, #795be0);
}

.game-action.accent {
    border-color: transparent;
    background: linear-gradient(135deg, #42c7b5, #3196c7);
}


/* =========================================================
   COMMON ANSWER GRIDS
   ========================================================= */

.answer-grid-v3 {
    width: min(100%, 760px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(6px, 1.1dvh, 10px);
}

.answer-button-v3 {
    min-width: 0;
    min-height: clamp(52px, 9.5dvh, 86px);
    padding: clamp(7px, 1.2dvh, 12px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: clamp(12px, 2dvh, 18px);
    background: rgba(255,255,255,.075);
    color: #fff;
    font: inherit;
    font-size: clamp(13px, 2.2dvh, 19px);
    line-height: 1.2;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    transition: transform .14s ease, background .14s ease, border-color .14s ease;
}

.answer-button-v3:hover:not(:disabled) {
    transform: translateY(-2px);
    background: rgba(255,255,255,.11);
}

.answer-button-v3.correct {
    border-color: rgba(77, 219, 139, .55);
    background: rgba(47, 184, 111, .28);
}

.answer-button-v3.wrong {
    border-color: rgba(255, 111, 125, .55);
    background: rgba(225, 75, 91, .24);
}

.answer-button-v3.selected {
    border-color: rgba(116, 220, 210, .52);
    background: rgba(80, 172, 188, .25);
}

.answer-button-v3:disabled {
    cursor: default;
}


/* =========================================================
   WOULD YOU RATHER
   ========================================================= */

.wyr-question {
    color: #aabdd1;
    font-size: clamp(12px, 1.8dvh, 14px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.wyr-choice-grid {
    width: min(100%, 820px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 1.6dvh, 14px);
}

.wyr-choice {
    min-height: clamp(120px, 25dvh, 220px);
    padding: clamp(14px, 2.8dvh, 24px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: clamp(18px, 3dvh, 28px);
    color: #fff;
    font: inherit;
    font-size: clamp(18px, 3.1dvh, 29px);
    line-height: 1.15;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 16px 35px rgba(0,0,0,.19);
}

.wyr-choice-a {
    background: linear-gradient(135deg, #f27d57, #ec4f80);
}

.wyr-choice-b {
    background: linear-gradient(135deg, #5d6df3, #8d50d2);
}

.wyr-choice.selected {
    box-shadow:
        inset 0 0 0 3px rgba(255,255,255,.55),
        0 16px 35px rgba(0,0,0,.19);
}


/* =========================================================
   QUIZ / ODD ONE OUT
   ========================================================= */

.quiz-card-question,
.odd-card-question {
    width: min(100%, 760px);
    min-height: clamp(56px, 10dvh, 92px);
    display: grid;
    place-items: center;
    padding: clamp(9px, 1.5dvh, 15px);
    border-radius: 17px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,.09), transparent 55%),
        rgba(255,255,255,.055);
    color: #fff;
    font-size: clamp(17px, 2.8dvh, 25px);
    line-height: 1.25;
    font-weight: 950;
    text-align: center;
}

.odd-answer-grid .answer-button-v3 {
    font-size: clamp(16px, 2.7dvh, 24px);
}


/* =========================================================
   QUICK MATHS
   ========================================================= */

.math-equation {
    min-width: min(100%, 430px);
    min-height: clamp(76px, 15dvh, 130px);
    display: grid;
    place-items: center;
    padding: 10px 18px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,.11), transparent 55%),
        linear-gradient(135deg, rgba(74, 183, 158, .27), rgba(75, 126, 212, .24));
    color: #fff;
    font-size: clamp(34px, 7dvh, 62px);
    font-weight: 950;
    letter-spacing: -1px;
}


/* =========================================================
   NUMBER MEMORY
   ========================================================= */

.memory-sequence-board {
    width: min(100%, 760px);
    min-height: clamp(64px, 12dvh, 105px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(5px, 1vw, 9px);
    padding: 8px;
    border-radius: 19px;
    background: rgba(255,255,255,.05);
}

.memory-number {
    width: clamp(42px, 8dvh, 66px);
    height: clamp(48px, 9dvh, 72px);
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, #596af2, #8d54d8);
    color: #fff;
    font-size: clamp(21px, 4dvh, 32px);
    font-weight: 950;
    box-shadow: 0 8px 18px rgba(0,0,0,.16);
}

.memory-hidden {
    color: #a8bbcf;
    font-size: clamp(14px, 2.1dvh, 18px);
    font-weight: 900;
}

.memory-answer {
    width: min(100%, 760px);
    min-height: clamp(40px, 6.7dvh, 54px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    overflow: hidden;
}

.memory-answer span {
    min-width: 30px;
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
}

.number-pad-v3 {
    width: min(100%, 620px);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.number-key {
    min-height: clamp(38px, 6.5dvh, 52px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: rgba(255,255,255,.075);
    color: #fff;
    font: inherit;
    font-size: clamp(15px, 2.4dvh, 20px);
    font-weight: 950;
    cursor: pointer;
}


/* =========================================================
   MUSICAL MEMORY
   ========================================================= */

.music-board-v3 {
    width: min(56dvh, 470px, 88vw);
    aspect-ratio: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(7px, 1.3dvh, 12px);
}

.music-pad-v3 {
    min-width: 0;
    border: 0;
    border-radius: clamp(20px, 3.5dvh, 34px);
    font-size: clamp(30px, 6dvh, 54px);
    cursor: pointer;
    opacity: .92;
    box-shadow: inset 0 -8px 16px rgba(0,0,0,.14), 0 10px 26px rgba(0,0,0,.16);
    transition: transform .12s ease, filter .12s ease, opacity .12s ease;
}

.music-pad-v3:nth-child(1) { background: #dc4e5c; }
.music-pad-v3:nth-child(2) { background: #3f7fd7; }
.music-pad-v3:nth-child(3) { background: #319c69; }
.music-pad-v3:nth-child(4) { background: #d5a932; }

.music-pad-v3.active-note {
    transform: scale(.95);
    filter: brightness(1.45);
    opacity: 1;
    box-shadow:
        inset 0 0 0 5px rgba(255,255,255,.58),
        0 0 28px rgba(255,255,255,.28);
}

.music-pad-v3:disabled {
    cursor: default;
}


/* =========================================================
   ALPHABET HUNT
   ========================================================= */

.alphabet-target {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #a8bbcf;
    font-size: clamp(12px, 1.8dvh, 14px);
    font-weight: 850;
}

.alphabet-target strong {
    min-width: clamp(44px, 7dvh, 60px);
    min-height: clamp(44px, 7dvh, 60px);
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #64ddd0, #5aa7eb);
    color: #07182a;
    font-size: clamp(22px, 4dvh, 34px);
    font-weight: 950;
}

.alphabet-grid-v3 {
    width: min(100%, 610px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(5px, .9dvh, 8px);
}

.letter-card-v3 {
    min-height: clamp(47px, 8.2dvh, 66px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 13px;
    background: rgba(255,255,255,.075);
    color: #fff;
    font: inherit;
    font-size: clamp(20px, 3.6dvh, 30px);
    font-weight: 950;
    cursor: pointer;
}

.letter-card-v3.correct {
    border-color: rgba(81, 222, 144, .52);
    background: rgba(48, 186, 112, .29);
}

.letter-card-v3.wrong {
    border-color: rgba(255, 107, 123, .50);
    background: rgba(219, 72, 88, .25);
}


/* =========================================================
   ANIMAL MATCH
   ========================================================= */

.animal-display-v3 {
    display: grid;
    justify-items: center;
    gap: 4px;
}

.animal-emoji-v3 {
    width: clamp(78px, 14dvh, 118px);
    height: clamp(78px, 14dvh, 118px);
    display: grid;
    place-items: center;
    border-radius: 25%;
    background: linear-gradient(135deg, rgba(255, 146, 88, .24), rgba(111, 83, 217, .25));
    font-size: clamp(43px, 8dvh, 70px);
    box-shadow: 0 12px 28px rgba(0,0,0,.15);
}

.animal-name-v3 {
    color: #fff;
    font-size: clamp(18px, 3dvh, 26px);
    font-weight: 950;
}

.animal-question-v3 {
    width: min(100%, 740px);
    color: #dfeaf5;
    font-size: clamp(13px, 2dvh, 16px);
    font-weight: 850;
    text-align: center;
}


/* =========================================================
   TABLET / MOBILE LANDING
   ========================================================= */

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

    .game-launch-art {
        min-height: 285px;
    }

    .game-launch-copy {
        padding: 28px 24px;
    }

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

@media (max-width: 600px) {
    .game-page-main {
        width: min(100% - 18px, 1180px);
        margin-top: 14px;
    }

    .game-launch-card {
        min-height: 0;
        border-radius: 23px;
    }

    .game-launch-art {
        min-height: 225px;
        padding: 20px;
    }

    .launch-demo {
        min-height: 190px;
    }

    .game-launch-copy h1 {
        font-size: 45px;
        letter-spacing: -2.2px;
    }

    .game-launch-copy p {
        font-size: 14px;
    }

    .related-game-grid {
        gap: 10px;
    }

    .game-landing-heading {
        align-items: flex-start;
    }

    .game-info-panel {
        border-radius: 20px;
    }

    .tt-player-topbar {
        min-height: calc(52px + env(safe-area-inset-top));
        grid-template-columns: 62px minmax(0, 1fr) 62px;
        padding-left: max(6px, env(safe-area-inset-left));
        padding-right: max(6px, env(safe-area-inset-right));
    }

    .tt-game-exit {
        width: 58px;
        min-height: 38px;
        border-radius: 12px;
        font-size: 11px;
    }

    .tt-player-spacer {
        width: 58px;
    }

    .tt-player-title {
        font-size: 15px;
    }

    .tt-game-player-inner {
        padding: 5px max(4px, env(safe-area-inset-right))
            max(4px, env(safe-area-inset-bottom))
            max(4px, env(safe-area-inset-left));
    }

    .tt-app-game {
        border-radius: 17px;
    }

    .app-game-head {
        padding: 6px;
    }

    .app-status-row,
    .app-mode-row {
        justify-content: flex-start;
    }

    .app-game-stage {
        padding: 5px 7px 7px;
        gap: 3px;
    }

    .wyr-choice-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .wyr-choice {
        min-height: clamp(76px, 15dvh, 112px);
        padding: 10px 13px;
        border-radius: 16px;
        font-size: clamp(16px, 2.6dvh, 21px);
    }

    .answer-grid-v3 {
        gap: 5px;
    }

    .answer-button-v3 {
        min-height: clamp(49px, 8.4dvh, 69px);
        padding: 6px 8px;
        border-radius: 12px;
        font-size: clamp(12px, 2dvh, 16px);
    }

    .game-action-row {
        gap: 5px;
    }

    .game-action {
        min-width: 0;
        flex: 1 1 0;
        padding-inline: 7px;
    }

    .music-board-v3 {
        width: min(47dvh, 78vw);
    }

    .alphabet-grid-v3 {
        width: min(100%, 470px);
    }

    .letter-card-v3 {
        min-height: clamp(42px, 7.1dvh, 55px);
    }

    .number-pad-v3 {
        gap: 4px;
    }

    .number-key {
        min-height: clamp(35px, 5.8dvh, 46px);
    }
}

@media (max-height: 650px) {
    .tt-player-topbar {
        min-height: 46px;
    }

    .app-game-head {
        padding: 5px 7px;
    }

    .app-status-pill {
        min-height: 25px;
        padding: 4px 7px;
        font-size: 9px;
    }

    .app-mode {
        min-height: 28px;
        padding: 4px 8px;
        font-size: 9px;
    }

    .app-mode-row {
        margin-top: 4px;
    }

    .app-game-stage {
        padding: 4px 7px 5px;
        gap: 2px;
    }

    .feedback-panel {
        min-height: 32px;
        max-height: 40px;
        padding: 4px 8px;
        font-size: 9px;
    }

    .game-action {
        min-height: 31px;
    }

    .wyr-choice {
        min-height: 72px;
    }

    .music-board-v3 {
        width: min(41dvh, 340px, 72vw);
    }

    .animal-emoji-v3 {
        width: 72px;
        height: 72px;
        font-size: 42px;
    }

    .alphabet-grid-v3 {
        max-width: 470px;
    }

    .letter-card-v3 {
        min-height: 38px;
    }
}


/* =========================================================
   MEMORY MATCH - V3
   ========================================================= */

.memory-launch-demo {
    width: min(420px, 100%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    transform: rotate(-2deg);
}

.memory-launch-demo span {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #596af2, #8d54d8);
    color: #fff;
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 950;
    box-shadow: 0 12px 28px rgba(0,0,0,.20);
}

.memory-launch-demo span.revealed {
    background: rgba(255,255,255,.13);
}

.memory-grid-v3 {
    width: min(70dvh, 690px, 94vw);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(5px, 1dvh, 9px);
}

.memory-card-v3 {
    aspect-ratio: 1;
    min-width: 0;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: clamp(12px, 2.1dvh, 19px);
    background:
        radial-gradient(circle at 50% 18%, rgba(255,255,255,.10), transparent 38%),
        linear-gradient(135deg, #5d65ec, #9a4ec8);
    color: #fff;
    font: inherit;
    font-size: clamp(22px, 4.2dvh, 34px);
    font-weight: 950;
    cursor: pointer;
    box-shadow:
        inset 0 -7px 13px rgba(0,0,0,.12),
        0 7px 17px rgba(0,0,0,.14);
    transition:
        transform .14s ease,
        background .14s ease,
        border-color .14s ease;
}

.memory-card-v3:hover:not(:disabled) {
    transform: translateY(-2px);
}

.memory-card-v3.flipped {
    background: rgba(255,255,255,.11);
    border-color: rgba(255,255,255,.19);
}

.memory-card-v3.matched {
    background: rgba(53, 190, 115, .25);
    border-color: rgba(84, 225, 145, .44);
    box-shadow:
        inset 0 0 0 2px rgba(84,225,145,.12),
        0 7px 17px rgba(0,0,0,.12);
}


/* Bigger revealed Memory Match symbols */
.memory-card-v3.flipped,
.memory-card-v3.matched {
    font-size: clamp(52px, 10.5dvh, 96px);
    line-height: 1;
}


/* =========================================================
   COLOUR MATCH - V3
   ========================================================= */

.colour-launch-demo {
    position: relative;
    width: min(420px, 100%);
    height: 250px;
}

.colour-launch-demo .colour-orb {
    position: absolute;
    width: 135px;
    aspect-ratio: 1;
    border: 7px solid rgba(255,255,255,.78);
    border-radius: 50%;
    box-shadow: 0 16px 34px rgba(0,0,0,.20);
}

.colour-launch-demo .colour-orb:nth-child(1) {
    left: 9%;
    top: 17%;
    background: #ff4d5f;
}

.colour-launch-demo .colour-orb:nth-child(2) {
    left: 34%;
    top: 2%;
    background: #ffdd00;
}

.colour-launch-demo .colour-orb:nth-child(3) {
    right: 9%;
    top: 19%;
    background: #5a68f5;
}

.colour-launch-demo strong {
    position: absolute;
    left: 50%;
    bottom: 7px;
    transform: translateX(-50%);
    color: #fff;
    font-size: 30px;
    font-weight: 950;
}

.colour-game-question {
    width: min(100%, 760px);
    margin: 0;
    color: #fff;
    font-size: clamp(17px, 2.9dvh, 26px);
    line-height: 1.22;
    font-weight: 950;
    text-align: center;
}

.colour-preview-v3 {
    width: clamp(88px, 17dvh, 145px);
    aspect-ratio: 1;
    flex: 0 0 auto;
    border: clamp(5px, .9dvh, 8px) solid #fff;
    border-radius: 50%;
    box-shadow:
        0 15px 32px rgba(0,0,0,.22),
        inset 0 0 0 1px rgba(0,0,0,.08);
}

.colour-answer-grid-v3 {
    width: min(100%, 720px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(6px, 1.1dvh, 10px);
}

.colour-answer-v3 {
    min-height: clamp(50px, 8.8dvh, 76px);
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: clamp(12px, 2dvh, 17px);
    background: rgba(255,255,255,.075);
    color: #fff;
    font: inherit;
    font-size: clamp(14px, 2.25dvh, 19px);
    font-weight: 950;
    cursor: pointer;
    transition:
        transform .14s ease,
        background .14s ease,
        border-color .14s ease;
}

.colour-answer-v3:hover:not(:disabled) {
    transform: translateY(-2px);
    background: rgba(255,255,255,.11);
}

.colour-answer-v3.correct {
    border-color: rgba(80, 225, 144, .52);
    background: rgba(48, 186, 112, .28);
}

.colour-answer-v3.wrong {
    border-color: rgba(255, 105, 122, .52);
    background: rgba(221, 70, 88, .25);
}

.colour-answer-v3:disabled {
    cursor: default;
}

@media (max-width: 600px) {
    .memory-grid-v3 {
        width: min(62dvh, 92vw);
        gap: 5px;
    }

    .memory-card-v3 {
        border-radius: 11px;
        font-size: clamp(20px, 4.1dvh, 31px);
    }

    .memory-card-v3.flipped,
    .memory-card-v3.matched {
        font-size: clamp(38px, 8.2dvh, 66px);
    }

    .colour-answer-grid-v3 {
        gap: 5px;
    }

    .colour-answer-v3 {
        min-height: clamp(45px, 7.6dvh, 62px);
        border-radius: 12px;
        font-size: clamp(13px, 2dvh, 16px);
    }

    .colour-preview-v3 {
        width: clamp(76px, 14.5dvh, 112px);
    }
}

@media (max-height: 650px) {
    .memory-grid-v3 {
        width: min(58dvh, 540px, 84vw);
    }

    .memory-card-v3 {
        border-radius: 10px;
    }

    .colour-preview-v3 {
        width: clamp(70px, 13dvh, 90px);
    }

    .colour-game-question {
        font-size: clamp(14px, 2.5dvh, 19px);
    }

    .colour-answer-v3 {
        min-height: 38px;
    }
}


/* =========================================================
   SHAPE MATCH - V3
   ========================================================= */

.shape-launch-demo {
    position: relative;
    width: min(470px, 100%);
    height: 270px;
}

.shape-launch-piece {
    position: absolute;
    width: 126px;
    height: 126px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 76px;
    line-height: 1;
    filter: drop-shadow(0 15px 22px rgba(0,0,0,.18));
}

.shape-launch-circle {
    left: 4%;
    top: 15%;
    color: #ff5d75;
}

.shape-launch-triangle {
    left: 36%;
    top: 2%;
    color: #6ee0d3;
    transform: rotate(-5deg);
}

.shape-launch-star {
    right: 3%;
    top: 19%;
    color: #ffd653;
    transform: rotate(8deg);
}

.shape-launch-names {
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: min(92%, 420px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    transform: translateX(-50%);
}

.shape-launch-names b {
    min-height: 42px;
    display: grid;
    place-items: center;
    padding: 6px 8px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(7px);
}

.shape-match-prompt {
    width: min(100%, 740px);
    margin: 0;
    color: #dce9f6;
    font-size: clamp(13px, 2.1dvh, 17px);
    line-height: 1.25;
    font-weight: 900;
    text-align: center;
}

.shape-match-board-v3 {
    width: min(100%, 760px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(8px, 1.4dvh, 13px);
}

.shape-match-column-v3 {
    min-width: 0;
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: clamp(7px, 1.2dvh, 11px);
}

.shape-match-button-v3 {
    min-width: 0;
    min-height: clamp(70px, 14dvh, 116px);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: clamp(14px, 2.6dvh, 22px);
    color: #fff;
    font: inherit;
    font-weight: 950;
    cursor: pointer;
    box-shadow:
        inset 0 -7px 14px rgba(0,0,0,.10),
        0 9px 20px rgba(0,0,0,.13);
    transition:
        transform .14s ease,
        border-color .14s ease,
        background .14s ease,
        opacity .14s ease;
}

.shape-match-button-v3:hover:not(:disabled) {
    transform: translateY(-2px);
}

.shape-symbol-button-v3 {
    background:
        radial-gradient(circle at 50% 16%, rgba(255,255,255,.11), transparent 42%),
        linear-gradient(135deg, #665ff0, #9d50ce);
    font-size: clamp(40px, 8.6dvh, 74px);
    line-height: 1;
}

.shape-name-button-v3 {
    padding: 8px 12px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,.08), transparent 55%),
        rgba(255,255,255,.075);
    font-size: clamp(14px, 2.6dvh, 22px);
    line-height: 1.12;
}

.shape-match-button-v3.selected {
    border-color: rgba(108,224,211,.75);
    background:
        radial-gradient(circle at 50% 16%, rgba(255,255,255,.13), transparent 42%),
        linear-gradient(135deg, #287f91, #4259bc);
    box-shadow:
        inset 0 0 0 3px rgba(108,224,211,.17),
        0 0 0 2px rgba(108,224,211,.11),
        0 10px 22px rgba(0,0,0,.15);
}

.shape-match-button-v3.correct {
    border-color: rgba(81,224,145,.55);
    background: rgba(46, 183, 108, .28);
    color: #fff;
}

.shape-match-button-v3.wrong {
    border-color: rgba(255,105,122,.58);
    background: rgba(220, 72, 89, .28);
}

.shape-match-button-v3:disabled {
    cursor: default;
}

.shape-match-button-v3.correct:disabled {
    opacity: .66;
}

@media (max-width: 600px) {
    .shape-match-board-v3 {
        gap: 6px;
    }

    .shape-match-column-v3 {
        gap: 6px;
    }

    .shape-match-button-v3 {
        min-height: clamp(60px, 11.7dvh, 82px);
        border-radius: 13px;
    }

    .shape-symbol-button-v3 {
        font-size: clamp(35px, 7.2dvh, 54px);
    }

    .shape-name-button-v3 {
        padding: 6px 7px;
        font-size: clamp(12px, 2.05dvh, 16px);
    }
}

@media (max-height: 650px) {
    .shape-match-prompt {
        font-size: 11px;
    }

    .shape-match-board-v3 {
        width: min(100%, 650px);
        gap: 6px;
    }

    .shape-match-column-v3 {
        gap: 5px;
    }

    .shape-match-button-v3 {
        min-height: 54px;
        border-radius: 11px;
    }

    .shape-symbol-button-v3 {
        font-size: clamp(31px, 7dvh, 46px);
    }

    .shape-name-button-v3 {
        font-size: 12px;
    }
}
