:root {
    --ink: #102334;
    --ink-soft: #4b6171;
    --paper: #f7f4ec;
    --surface: rgba(255,255,255,.78);
    --surface-solid: #ffffff;
    --line: rgba(16,35,52,.12);
    --navy: #16324f;
    --navy-deep: #0c2135;
    --teal: #1b8a7a;
    --teal-soft: #d8f3ec;
    --gold: #d6a649;
    --gold-soft: #fff1cf;
    --rose: #c65b68;
    --shadow-sm: 0 8px 24px rgba(24,47,66,.08);
    --shadow-md: 0 22px 60px rgba(24,47,66,.14);
    --shadow-lg: 0 40px 100px rgba(11,32,49,.2);
    --radius-sm: 14px;
    --radius-md: 24px;
    --radius-lg: 36px;
    --max-width: 1240px;
    --ease: cubic-bezier(.2,.8,.2,1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--paper);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(216,243,236,.72), transparent 28rem),
        radial-gradient(circle at 92% 18%, rgba(255,241,207,.72), transparent 30rem),
        var(--paper);
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    color: inherit;
}

img,
svg {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(calc(100% - 40px), var(--max-width));
    margin: 18px auto 0;
    padding: 12px 14px 12px 18px;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 22px;
    background: rgba(255,255,255,.74);
    box-shadow: 0 12px 40px rgba(18,44,63,.08);
    backdrop-filter: blur(22px) saturate(150%);
    transition: transform .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
}

.site-header.is-scrolled {
    transform: translateY(-8px);
    background: rgba(255,255,255,.9);
    box-shadow: 0 18px 50px rgba(18,44,63,.13);
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, #1f4a68, #102c47);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 24px rgba(17,50,77,.22);
    font-size: 23px;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 16px;
}

.brand small {
    margin-top: -2px;
    color: var(--ink-soft);
    font-size: 11px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a,
.main-nav button {
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.main-nav a:hover,
.main-nav button:hover {
    color: var(--navy);
    background: rgba(22,50,79,.07);
    transform: translateY(-1px);
}

.install-button {
    color: #fff !important;
    background: var(--navy) !important;
}

.hero-section {
    position: relative;
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    align-items: center;
    min-height: 680px;
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 90px 30px 70px 0;
    animation: heroEnter .9s var(--ease) both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .03em;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.hero-content h1 {
    margin: 18px 0 22px;
    color: var(--navy-deep);
    font-size: clamp(52px, 7vw, 96px);
    line-height: 1.04;
    letter-spacing: -.045em;
}

.hero-content h1 span {
    color: transparent;
    background: linear-gradient(115deg, var(--teal), #26719a 62%, var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-content > p {
    max-width: 660px;
    margin: 0 0 30px;
    color: var(--ink-soft);
    font-size: clamp(17px, 2vw, 21px);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.primary-button,
.secondary-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 800;
    overflow: hidden;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s ease, border-color .25s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, #1d4967, #102d49);
    box-shadow: 0 12px 28px rgba(18,52,80,.22);
}

.primary-button::after {
    content: "";
    position: absolute;
    inset: -80% -30%;
    background: linear-gradient(110deg, transparent 38%, rgba(255,255,255,.3), transparent 62%);
    transform: translateX(70%);
    transition: transform .65s var(--ease);
}

.primary-button:hover::after {
    transform: translateX(-70%);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-3px);
}

.primary-button:hover {
    box-shadow: 0 18px 38px rgba(18,52,80,.3);
}

.secondary-button {
    color: var(--navy);
    border-color: var(--line);
    background: rgba(255,255,255,.68);
    box-shadow: var(--shadow-sm);
}

.secondary-button:hover {
    border-color: rgba(22,50,79,.28);
    background: #fff;
}

.wide-button {
    width: 100%;
}

.hero-metrics {
    display: flex;
    gap: 28px;
    margin-top: 48px;
}

.hero-metrics div {
    display: grid;
    gap: 2px;
}

.hero-metrics strong {
    color: var(--navy);
    font-size: 24px;
}

.hero-metrics span {
    color: var(--ink-soft);
    font-size: 12px;
}

.hero-visual {
    position: relative;
    min-height: 560px;
    animation: visualEnter 1.1s .15s var(--ease) both;
}

.central-emblem {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 42% 58% 52% 48% / 47% 39% 61% 53%;
    color: #fff;
    background:
        radial-gradient(circle at 30% 24%, rgba(255,255,255,.2), transparent 36%),
        linear-gradient(145deg, #1c8d7f, #163d5b 70%);
    box-shadow: inset 0 0 0 12px rgba(255,255,255,.05), 0 40px 90px rgba(14,57,74,.28);
    transform: translate(-50%, -50%);
    animation: morph 8s ease-in-out infinite;
}

.central-emblem span {
    font-size: 80px;
    font-weight: 900;
    line-height: 1;
}

.central-emblem small {
    margin-top: -38px;
    font-weight: 700;
    opacity: .72;
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(22,50,79,.13);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 8px rgba(214,166,73,.14);
}

.orbit-one {
    width: 380px;
    height: 380px;
    animation: rotateOrbit 18s linear infinite;
}

.orbit-two {
    width: 500px;
    height: 500px;
    animation: rotateOrbitReverse 28s linear infinite;
}

.floating-tile {
    position: absolute;
    z-index: 2;
    min-width: 112px;
    padding: 16px 22px;
    border: 1px solid rgba(255,255,255,.68);
    border-radius: 18px;
    color: var(--navy);
    background: rgba(255,255,255,.78);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(15px);
    text-align: center;
    font-size: 18px;
    font-weight: 800;
}

.tile-one {
    top: 15%;
    right: 8%;
    animation: floatTile 5s ease-in-out infinite;
}

.tile-two {
    top: 56%;
    left: 1%;
    animation: floatTile 6s .8s ease-in-out infinite;
}

.tile-three {
    right: 15%;
    bottom: 8%;
    animation: floatTile 5.5s 1.4s ease-in-out infinite;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
    pointer-events: none;
}

.hero-glow-one {
    top: 10%;
    left: 42%;
    width: 240px;
    height: 240px;
    background: rgba(64,178,157,.13);
}

.hero-glow-two {
    right: 2%;
    bottom: 8%;
    width: 320px;
    height: 320px;
    background: rgba(214,166,73,.1);
}

.content-section,
.levels-section {
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto;
    padding: 90px 0;
}

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

.section-heading h2 {
    margin: 8px 0 0;
    color: var(--navy-deep);
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.15;
}

.section-heading > p {
    max-width: 470px;
    margin: 0;
    color: var(--ink-soft);
}

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

.game-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
    min-height: 220px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,.76);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(18px);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s ease;
}

.game-card::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    top: -90px;
    left: -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(27,138,122,.16), transparent 70%);
    transition: transform .5s var(--ease);
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: rgba(27,138,122,.25);
    box-shadow: var(--shadow-md);
}

.game-card:hover::before {
    transform: scale(1.4);
}

.game-card-icon {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(145deg, var(--teal), #13645f);
    box-shadow: 0 18px 35px rgba(27,138,122,.25);
    font-size: 38px;
    font-weight: 900;
    transform: rotate(-3deg);
    transition: transform .35s var(--ease);
}

.game-card:hover .game-card-icon {
    transform: rotate(2deg) scale(1.05);
}

.status-pill {
    display: inline-flex;
    width: max-content;
    padding: 5px 10px;
    border-radius: 999px;
    color: #13685d;
    background: var(--teal-soft);
    font-size: 11px;
    font-weight: 800;
}

.status-muted {
    color: var(--ink-soft);
    background: rgba(75,97,113,.1);
}

.game-card h3 {
    margin: 10px 0 6px;
    color: var(--navy);
    font-size: 28px;
}

.game-card p {
    margin: 0;
    color: var(--ink-soft);
}

.game-card-meta {
    display: flex;
    gap: 16px;
    margin-top: 18px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
}

.card-arrow {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: #fff;
    background: var(--navy);
    transition: transform .35s var(--ease);
}

.game-card:hover .card-arrow {
    transform: translateX(-7px);
}

.reveal-card {
    opacity: 0;
    transform: translateY(24px);
}

.reveal-card.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .65s var(--ease) var(--delay), transform .65s var(--ease) var(--delay), box-shadow .35s var(--ease);
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto 100px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(16,45,73,.98), rgba(20,77,87,.96));
    box-shadow: var(--shadow-lg);
}

.feature-strip article {
    position: relative;
    min-height: 240px;
    padding: 38px;
    color: #fff;
}

.feature-strip article + article {
    border-right: 1px solid rgba(255,255,255,.12);
}

.feature-strip span {
    color: #86d6c7;
    font-size: 12px;
    font-weight: 800;
}

.feature-strip h3 {
    margin: 28px 0 10px;
    font-size: 23px;
}

.feature-strip p {
    margin: 0;
    color: rgba(255,255,255,.67);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto;
    padding: 28px 0 40px;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 13px;
}

.game-intro {
    display: grid;
    grid-template-columns: 1fr .85fr;
    align-items: center;
    min-height: 560px;
    width: min(calc(100% - 40px), var(--max-width));
    margin: 0 auto;
    padding: 70px 0;
}

.back-link {
    display: inline-flex;
    margin-bottom: 22px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.back-link:hover {
    color: var(--teal);
}

.game-intro h1 {
    margin: 8px 0 4px;
    color: var(--navy-deep);
    font-size: clamp(72px, 11vw, 140px);
    line-height: 1;
    letter-spacing: -.06em;
}

.game-intro-copy > p {
    max-width: 650px;
    margin: 22px 0;
    color: var(--ink-soft);
    font-size: 20px;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-pills span {
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.55);
    font-size: 12px;
    font-weight: 800;
}

.sentence-sculpture {
    position: relative;
    min-height: 420px;
}

.sentence-sculpture::before,
.sentence-sculpture::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.sentence-sculpture::before {
    width: 360px;
    height: 360px;
    border: 1px dashed rgba(22,50,79,.18);
    animation: rotateOrbit 35s linear infinite;
}

.sentence-sculpture::after {
    width: 230px;
    height: 230px;
    background: linear-gradient(145deg, rgba(27,138,122,.18), rgba(214,166,73,.16));
    filter: blur(2px);
}

.sentence-sculpture span {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    min-width: 130px;
    padding: 18px 22px;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 18px;
    background: rgba(255,255,255,.86);
    box-shadow: var(--shadow-md);
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r));
    animation: sculptureFloat 5s ease-in-out infinite alternate;
}

.sentence-sculpture span:nth-child(2) { animation-delay: .5s; }
.sentence-sculpture span:nth-child(3) { animation-delay: 1s; }
.sentence-sculpture span:nth-child(4) { animation-delay: 1.5s; }

.level-map {
    display: grid;
    gap: 18px;
}

.level-card {
    position: relative;
    display: grid;
    grid-template-columns: 110px 1fr auto;
    align-items: center;
    gap: 26px;
    min-height: 180px;
    padding: 26px 30px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,.72);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(24px);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s ease;
}

.level-card.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .65s var(--ease) calc(var(--level-index) * 90ms), transform .65s var(--ease) calc(var(--level-index) * 90ms), box-shadow .35s var(--ease);
}

.level-card:hover {
    transform: translateY(-5px);
    background: #fff;
    box-shadow: var(--shadow-md);
}

.level-number {
    color: rgba(22,50,79,.14);
    font-size: 52px;
    font-weight: 900;
    letter-spacing: -.06em;
}

.level-copy h3 {
    margin: 8px 0 4px;
    color: var(--navy);
    font-size: 25px;
}

.level-copy p {
    margin: 0;
    color: var(--ink-soft);
}

.level-stats {
    display: flex;
    gap: 20px;
    margin-top: 14px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
}

.difficulty {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.difficulty-intro,
.difficulty-easy { color: #12665b; background: var(--teal-soft); }
.difficulty-medium { color: #7e5a14; background: var(--gold-soft); }
.difficulty-advanced,
.difficulty-challenge { color: #8a3341; background: #f9dde1; }

.level-play {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 14px;
    color: #fff;
    background: var(--navy);
    font-weight: 800;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.level-play span {
    transition: transform .3s var(--ease);
}

.level-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(22,50,79,.22);
}

.level-play:hover span {
    transform: translateX(-4px);
}

.game-screen {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(49,168,149,.12), transparent 25rem),
        radial-gradient(circle at 90% 90%, rgba(214,166,73,.13), transparent 30rem),
        #f8f6ef;
}

.game-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto auto minmax(220px, 1fr) auto;
    align-items: center;
    gap: 22px;
    min-height: 82px;
    padding: 14px max(24px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid rgba(16,35,52,.08);
    background: rgba(248,246,239,.84);
    backdrop-filter: blur(18px);
}

.game-exit,
.sound-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.68);
    cursor: pointer;
    font-size: 22px;
    transition: transform .25s ease, background .25s ease;
}

.game-exit:hover,
.sound-toggle:hover {
    transform: scale(1.05);
    background: #fff;
}

.game-title {
    display: grid;
}

.game-title small {
    color: var(--teal);
    font-size: 11px;
    font-weight: 800;
}

.game-title strong {
    color: var(--navy);
    font-size: 16px;
}

.progress-cluster {
    width: min(100%, 600px);
    margin-inline: auto;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(22,50,79,.1);
}

.progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), #4bbca9);
    transition: width .55s var(--ease);
}

.game-stage {
    width: min(calc(100% - 40px), 1080px);
    margin: 0 auto;
    padding: 58px 0 80px;
}

.question-panel {
    max-width: 820px;
    margin: 0 auto 34px;
    text-align: center;
}

.question-kicker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
}

.timer {
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--navy);
    background: rgba(22,50,79,.08);
    font-variant-numeric: tabular-nums;
}

.question-panel h1 {
    margin: 12px 0 8px;
    color: var(--navy-deep);
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.3;
}

.question-panel p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 17px;
}

.play-board {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 18px;
}

.zone {
    min-height: 330px;
    padding: 22px;
    border: 1px solid rgba(16,35,52,.1);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,.66);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s var(--ease);
}

.zone.is-drop-active {
    border-color: rgba(27,138,122,.55);
    box-shadow: 0 0 0 5px rgba(27,138,122,.08), var(--shadow-md);
    transform: scale(1.01);
}

.zone-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.zone-heading span {
    color: var(--navy);
    font-weight: 900;
}

.zone-heading small {
    color: var(--ink-soft);
    font-size: 11px;
}

.tile-list {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 11px;
    min-height: 230px;
}

.order-tile {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    max-width: 100%;
    padding: 11px 17px;
    border: 1px solid rgba(22,50,79,.13);
    border-radius: 14px;
    color: var(--navy-deep);
    background: linear-gradient(180deg, #fff, #f8fbfa);
    box-shadow: 0 8px 18px rgba(23,52,72,.09), inset 0 1px 0 #fff;
    cursor: grab;
    user-select: none;
    touch-action: none;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.55;
    text-align: center;
    transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s ease, opacity .2s ease;
    animation: tileAppear .42s var(--ease) both;
}

.order-tile:hover,
.order-tile:focus-visible {
    z-index: 2;
    border-color: rgba(27,138,122,.42);
    outline: none;
    box-shadow: 0 14px 26px rgba(23,52,72,.14), 0 0 0 4px rgba(27,138,122,.08);
    transform: translateY(-3px);
}

.order-tile:active {
    cursor: grabbing;
}

.order-tile.is-dragging {
    z-index: 100;
    opacity: .96;
    box-shadow: 0 24px 50px rgba(14,42,61,.24);
    transform: scale(1.04) rotate(-1deg);
}

.order-tile.is-correct-position {
    border-color: rgba(27,138,122,.5);
    background: linear-gradient(180deg, #f8fffc, #e7f8f3);
}

.order-tile.is-wrong-shake {
    animation: wrongShake .42s ease;
}

.drag-placeholder {
    min-width: 80px;
    min-height: 52px;
    border: 2px dashed rgba(27,138,122,.34);
    border-radius: 14px;
    background: rgba(27,138,122,.06);
}

.answer-list {
    position: relative;
    align-content: flex-start;
}

.answer-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    color: rgba(75,97,113,.55);
    text-align: center;
    pointer-events: none;
}

.answer-placeholder strong,
.answer-placeholder span {
    display: block;
}

.answer-placeholder strong {
    font-size: 18px;
}

.answer-placeholder span {
    margin-top: 4px;
    font-size: 12px;
}

.flow-indicator {
    display: grid;
    place-items: center;
}

.flow-indicator span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: var(--teal);
    background: rgba(27,138,122,.1);
    font-size: 22px;
    animation: pulseArrow 2.2s ease-in-out infinite;
}

.game-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
}

.game-actions button {
    min-height: 50px;
    padding: 11px 18px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    transition: transform .25s var(--ease), box-shadow .25s ease, opacity .25s ease;
}

.game-actions button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.game-actions button:disabled {
    cursor: not-allowed;
    opacity: .42;
}

.hint-button,
.reset-button {
    border: 1px solid var(--line);
    background: rgba(255,255,255,.7);
}

.hint-button span {
    color: var(--rose);
    font-size: 11px;
}

.check-button {
    min-width: 230px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), #136b64);
    box-shadow: 0 14px 30px rgba(27,138,122,.22);
}

.feedback-panel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    margin-top: 26px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-md);
    animation: feedbackEnter .48s var(--ease) both;
}

.feedback-panel.is-success {
    border-color: rgba(27,138,122,.3);
    background: linear-gradient(135deg, #fff, #f2fcf8);
}

.feedback-panel.is-error {
    border-color: rgba(198,91,104,.28);
    background: linear-gradient(135deg, #fff, #fff5f6);
}

.feedback-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    color: #fff;
    background: var(--teal);
    font-size: 25px;
    font-weight: 900;
}

.feedback-panel.is-error .feedback-icon {
    background: var(--rose);
}

.feedback-panel h2 {
    margin: 0 0 2px;
    color: var(--navy);
    font-size: 20px;
}

.feedback-panel p {
    margin: 0;
    color: var(--ink-soft);
}

.feedback-explanation {
    margin-top: 6px !important;
    font-size: 13px;
}

.celebration-canvas {
    position: fixed;
    inset: 0;
    z-index: 100;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.level-complete {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(8,27,43,.66);
    backdrop-filter: blur(14px);
    animation: fadeIn .35s ease both;
}

.complete-card {
    position: relative;
    width: min(100%, 560px);
    padding: 52px 34px 34px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 34px;
    background: #fff;
    box-shadow: 0 50px 120px rgba(0,0,0,.28);
    text-align: center;
    animation: completePop .65s var(--ease) both;
}

.complete-halo {
    position: absolute;
    top: -150px;
    left: 50%;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(214,166,73,.28), transparent 67%);
    transform: translateX(-50%);
}

.complete-card h2 {
    position: relative;
    margin: 12px 0;
    color: var(--navy-deep);
    font-size: 36px;
}

.stars {
    color: var(--gold);
    font-size: 48px;
    letter-spacing: 8px;
    text-shadow: 0 8px 20px rgba(214,166,73,.2);
}

.final-score {
    display: block;
    margin-top: 10px;
    color: var(--navy);
    font-size: 58px;
    line-height: 1;
}

.complete-card > p {
    margin: 14px 0 26px;
    color: var(--ink-soft);
}

.install-guide {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: end center;
    padding: 20px;
    background: rgba(8,27,43,.52);
    backdrop-filter: blur(10px);
}

.install-guide-card {
    position: relative;
    width: min(100%, 520px);
    padding: 30px;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    animation: sheetEnter .5s var(--ease) both;
}

.install-guide-card h2 {
    margin: 0 0 8px;
    color: var(--navy);
}

.install-guide-card p {
    margin: 0 0 20px;
    color: var(--ink-soft);
}

.icon-button {
    position: absolute;
    top: 16px;
    left: 16px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(16,35,52,.07);
    cursor: pointer;
    font-size: 20px;
}

.install-page {
    display: grid;
    place-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #102d49, #14535d);
}

.install-layout {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    width: min(100%, 1180px);
    min-height: 680px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 36px;
    background: #fff;
    box-shadow: 0 50px 120px rgba(0,0,0,.28);
}

.install-hero {
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 54px;
    color: #fff;
    background:
        radial-gradient(circle at 20% 18%, rgba(100,213,190,.35), transparent 16rem),
        linear-gradient(155deg, #16324f, #0f4c56);
}

.install-hero .eyebrow {
    color: #83ddcd;
}

.install-hero h1 {
    margin: 18px 0;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.12;
}

.install-hero p {
    color: rgba(255,255,255,.7);
}

.install-panel {
    padding: 48px;
    overflow: auto;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.form-section {
    display: grid;
    gap: 14px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.form-section h2,
.form-section h3 {
    margin: 0;
    color: var(--navy);
}

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

label {
    display: grid;
    gap: 7px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
}

label small {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(16,35,52,.14);
    border-radius: 13px;
    color: var(--ink);
    background: rgba(249,250,248,.82);
    outline: none;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

input,
select {
    min-height: 48px;
    padding: 10px 13px;
}

textarea {
    padding: 12px 13px;
    resize: vertical;
    line-height: 1.65;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(27,138,122,.55);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(27,138,122,.09);
}

.check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.check-label input {
    width: 20px;
    min-height: 20px;
    accent-color: var(--teal);
}

.flash {
    width: min(calc(100% - 40px), var(--max-width));
    margin: 14px auto;
    padding: 13px 16px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 700;
}

.flash-error {
    color: #842f3d;
    border: 1px solid rgba(198,91,104,.25);
    background: #fff1f3;
}

.flash-success {
    color: #12665b;
    border: 1px solid rgba(27,138,122,.22);
    background: #effbf7;
}

.success-state {
    display: grid;
    place-items: center;
    min-height: 520px;
    text-align: center;
}

.success-orb {
    display: grid;
    place-items: center;
    width: 100px;
    height: 100px;
    border-radius: 32px;
    color: #fff;
    background: linear-gradient(145deg, var(--teal), #12655e);
    box-shadow: 0 28px 60px rgba(27,138,122,.26);
    font-size: 44px;
    animation: completePop .75s var(--ease) both;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 70vh;
    text-align: center;
}

@keyframes heroEnter {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes visualEnter {
    from { opacity: 0; transform: scale(.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes morph {
    0%,100% { border-radius: 42% 58% 52% 48% / 47% 39% 61% 53%; transform: translate(-50%,-50%) rotate(0deg); }
    50% { border-radius: 57% 43% 41% 59% / 58% 53% 47% 42%; transform: translate(-50%,-50%) rotate(5deg); }
}

@keyframes rotateOrbit {
    to { transform: translate(-50%,-50%) rotate(360deg); }
}

@keyframes rotateOrbitReverse {
    to { transform: translate(-50%,-50%) rotate(-360deg); }
}

@keyframes floatTile {
    0%,100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-14px) rotate(1.5deg); }
}

@keyframes sculptureFloat {
    from { margin-top: -5px; }
    to { margin-top: 8px; }
}

@keyframes tileAppear {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wrongShake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-7px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

@keyframes pulseArrow {
    0%,100% { transform: translateX(0); box-shadow: 0 0 0 0 rgba(27,138,122,.2); }
    50% { transform: translateX(-4px); box-shadow: 0 0 0 9px rgba(27,138,122,0); }
}

@keyframes feedbackEnter {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes completePop {
    0% { opacity: 0; transform: scale(.82) translateY(26px); }
    65% { transform: scale(1.03) translateY(-3px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes sheetEnter {
    from { opacity: 0; transform: translateY(80px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
    .hero-section,
    .game-intro,
    .install-layout {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 80px 0 0;
        text-align: center;
    }

    .hero-content > p {
        margin-inline: auto;
    }

    .hero-content .button-row,
    .hero-metrics,
    .skill-pills {
        justify-content: center;
    }

    .hero-visual {
        min-height: 520px;
    }

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

    .feature-strip {
        grid-template-columns: 1fr;
    }

    .feature-strip article + article {
        border-top: 1px solid rgba(255,255,255,.12);
        border-right: 0;
    }

    .game-intro-copy {
        text-align: center;
    }

    .sentence-sculpture {
        min-height: 460px;
    }

    .play-board {
        grid-template-columns: 1fr;
    }

    .flow-indicator span {
        transform: rotate(-90deg);
    }

    .flow-indicator {
        height: 18px;
    }

    .install-hero {
        min-height: 340px;
    }
}

@media (max-width: 720px) {
    .site-header {
        width: calc(100% - 20px);
        margin-top: 10px;
        padding: 10px;
    }

    .brand small,
    .main-nav a:not(:last-of-type) {
        display: none;
    }

    .main-nav {
        gap: 3px;
    }

    .main-nav a,
    .main-nav button {
        padding: 9px 10px;
        font-size: 12px;
    }

    .hero-section,
    .content-section,
    .game-intro,
    .levels-section,
    .feature-strip,
    .site-footer {
        width: calc(100% - 24px);
    }

    .hero-section {
        min-height: auto;
    }

    .hero-content {
        padding-top: 70px;
    }

    .hero-content h1 {
        font-size: 52px;
    }

    .hero-metrics {
        gap: 18px;
    }

    .hero-visual {
        min-height: 420px;
        transform: scale(.85);
        margin: -20px -40px 0;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
        gap: 12px;
    }

    .game-card {
        grid-template-columns: auto 1fr;
        min-height: 190px;
        padding: 22px;
    }

    .game-card-icon {
        width: 68px;
        height: 68px;
        border-radius: 20px;
        font-size: 28px;
    }

    .card-arrow {
        display: none;
    }

    .game-card h3 {
        font-size: 22px;
    }

    .feature-strip article {
        min-height: 200px;
        padding: 28px;
    }

    .site-footer {
        flex-direction: column;
        gap: 6px;
    }

    .game-intro {
        min-height: auto;
        padding-top: 70px;
    }

    .game-intro h1 {
        font-size: 84px;
    }

    .sentence-sculpture {
        transform: scale(.78);
        margin: -20px -60px;
    }

    .level-card {
        grid-template-columns: 58px 1fr;
        padding: 20px;
    }

    .level-number {
        font-size: 36px;
    }

    .level-play {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .game-topbar {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        padding: 10px 12px;
    }

    .game-title {
        display: none;
    }

    .game-stage {
        width: calc(100% - 24px);
        padding-top: 34px;
    }

    .question-panel h1 {
        font-size: 28px;
    }

    .zone {
        min-height: 250px;
        padding: 16px;
    }

    .tile-list {
        min-height: 170px;
    }

    .order-tile {
        min-height: 48px;
        padding: 9px 13px;
        font-size: 15px;
    }

    .game-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .check-button {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .feedback-panel {
        grid-template-columns: auto 1fr;
    }

    .feedback-panel .primary-button {
        grid-column: 1 / -1;
    }

    .install-page {
        padding: 12px;
    }

    .install-layout {
        border-radius: 24px;
    }

    .install-hero,
    .install-panel {
        padding: 28px;
    }

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e8f0f3;
        --ink-soft: #a9bbc5;
        --paper: #091824;
        --surface: rgba(16,37,52,.82);
        --surface-solid: #102536;
        --line: rgba(221,239,245,.12);
        --navy: #dcecf2;
        --navy-deep: #f3fafc;
        --shadow-sm: 0 8px 24px rgba(0,0,0,.18);
        --shadow-md: 0 22px 60px rgba(0,0,0,.28);
        --shadow-lg: 0 40px 100px rgba(0,0,0,.38);
    }

    body,
    .game-screen {
        background:
            radial-gradient(circle at 10% 0%, rgba(27,138,122,.18), transparent 28rem),
            radial-gradient(circle at 92% 18%, rgba(214,166,73,.12), transparent 30rem),
            var(--paper);
    }

    .site-header,
    .site-header.is-scrolled,
    .game-card,
    .level-card,
    .zone,
    .secondary-button,
    .game-exit,
    .sound-toggle,
    .hint-button,
    .reset-button {
        background: rgba(16,37,52,.82);
        border-color: rgba(221,239,245,.12);
    }

    .game-topbar {
        background: rgba(9,24,36,.86);
    }

    .order-tile,
    .feedback-panel,
    .complete-card,
    .install-guide-card {
        color: var(--ink);
        background: #102536;
        border-color: rgba(221,239,245,.12);
    }

    .order-tile.is-correct-position {
        background: #123c38;
    }

    input,
    select,
    textarea {
        color: var(--ink);
        background: rgba(5,19,29,.7);
        border-color: rgba(221,239,245,.14);
    }

    input:focus,
    select:focus,
    textarea:focus {
        background: #0b1f2e;
    }
}

.game-screen {
    --game-surface: rgba(255,255,255,.82);
    --game-border: rgba(15,42,61,.11);
    --game-shadow: 0 24px 70px rgba(18,45,64,.12);
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    overflow-x: clip;
    background:
        radial-gradient(circle at 8% 4%, rgba(27,138,122,.17), transparent 28rem),
        radial-gradient(circle at 92% 86%, rgba(214,166,73,.18), transparent 34rem),
        linear-gradient(145deg, #f9f7f0 0%, #f4f8f5 52%, #f8f3e8 100%);
}

.game-screen::before,
.game-screen::after {
    position: fixed;
    z-index: -1;
    width: 320px;
    height: 320px;
    border: 1px solid rgba(27,138,122,.08);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.game-screen::before {
    top: 12%;
    right: -190px;
    box-shadow: 0 0 0 42px rgba(27,138,122,.025), 0 0 0 88px rgba(27,138,122,.018);
}

.game-screen::after {
    bottom: 5%;
    left: -210px;
    border-color: rgba(214,166,73,.12);
    box-shadow: 0 0 0 54px rgba(214,166,73,.025), 0 0 0 105px rgba(214,166,73,.015);
}

.game-topbar {
    min-height: 88px;
    padding-block: 13px;
    border-bottom: 1px solid rgba(16,35,52,.07);
    background: rgba(250,249,244,.88);
    box-shadow: 0 8px 32px rgba(14,42,61,.06);
    backdrop-filter: blur(24px) saturate(160%);
}

.game-exit,
.sound-toggle {
    width: 46px;
    height: 46px;
    border-color: rgba(22,50,79,.12);
    border-radius: 15px;
    background: rgba(255,255,255,.82);
    box-shadow: 0 8px 22px rgba(20,46,65,.08);
}

.game-exit:focus-visible,
.sound-toggle:focus-visible {
    outline: 3px solid rgba(27,138,122,.22);
    outline-offset: 3px;
}

.progress-track {
    height: 9px;
    padding: 2px;
    background: rgba(22,50,79,.09);
    box-shadow: inset 0 1px 3px rgba(9,31,47,.1);
}

.progress-track span {
    background: linear-gradient(90deg, #136f67, #2aaa97 55%, #70d5bf);
    box-shadow: 0 3px 10px rgba(27,138,122,.28);
}

.game-stage {
    width: min(calc(100% - 40px), 1160px);
    padding: 44px 0 92px;
}

.question-panel {
    position: relative;
    max-width: 930px;
    margin-bottom: 28px;
    padding: 26px 34px 30px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(255,255,255,.67));
    box-shadow: 0 18px 55px rgba(21,49,68,.09);
    backdrop-filter: blur(18px);
}

.question-panel::after {
    position: absolute;
    top: -95px;
    left: -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(214,166,73,.18), transparent 68%);
    content: "";
    pointer-events: none;
}

.question-kicker {
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.question-kicker > span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(27,138,122,.09);
}

.question-kicker .selection-guide {
    color: #76551a;
    background: rgba(214,166,73,.14);
}

.question-panel h1 {
    position: relative;
    z-index: 1;
    margin-top: 15px;
    font-size: clamp(27px, 4.2vw, 43px);
    letter-spacing: -.025em;
}

.question-panel p {
    position: relative;
    z-index: 1;
    font-size: 16px;
}

.play-board {
    position: relative;
    grid-template-columns: minmax(0, .88fr) 52px minmax(0, 1.12fr);
    gap: 16px;
    transition: filter .25s ease, opacity .25s ease;
}

.play-board[aria-busy="true"] {
    filter: saturate(.72);
    opacity: .78;
}

.zone {
    position: relative;
    min-height: 315px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--game-border);
    border-radius: 27px;
    background: var(--game-surface);
    box-shadow: var(--game-shadow);
    backdrop-filter: blur(22px) saturate(130%);
    transform: translateZ(0);
    transition: border-color .2s ease, box-shadow .25s ease, transform .25s var(--ease), background .25s ease;
}

.answer-zone {
    border-color: rgba(27,138,122,.2);
    background: linear-gradient(145deg, rgba(255,255,255,.91), rgba(235,248,243,.78));
}

.zone::before {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.35) 48%, transparent 72%);
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: translateX(70%);
}

.zone.is-drop-active {
    transform: translateY(-2px);
}

.zone.is-drop-target {
    border-color: rgba(27,138,122,.7);
    background: linear-gradient(145deg, rgba(245,255,251,.96), rgba(221,246,238,.88));
    box-shadow: 0 0 0 5px rgba(27,138,122,.1), 0 28px 72px rgba(18,91,79,.18);
    transform: translateY(-4px) scale(1.008);
}

.zone.is-drop-target::before {
    opacity: 1;
    animation: zoneSheen .75s ease both;
}

.zone.is-drop-blocked {
    border-color: rgba(198,91,104,.68);
    background: linear-gradient(145deg, rgba(255,250,250,.96), rgba(255,229,233,.88));
    box-shadow: 0 0 0 5px rgba(198,91,104,.1), 0 24px 64px rgba(137,54,68,.16);
}

.zone-heading {
    position: relative;
    z-index: 2;
    min-height: 46px;
    margin-bottom: 16px;
}

.zone-heading > div {
    display: flex;
    align-items: center;
    gap: 11px;
}

.zone-heading > div > div {
    display: grid;
    gap: 1px;
}

.zone-heading strong {
    color: var(--navy-deep);
    font-size: 16px;
    font-weight: 900;
}

.zone-heading small {
    color: var(--ink-soft);
    font-size: 11px;
}

.zone-index {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, #1f4f6c, #112f49);
    box-shadow: 0 8px 18px rgba(22,50,79,.18);
    font-size: 13px;
    font-weight: 900;
}

.answer-zone .zone-index {
    background: linear-gradient(145deg, #269b89, #126a61);
    box-shadow: 0 8px 18px rgba(27,138,122,.22);
}

.zone-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(22,50,79,.08);
    border-radius: 999px;
    color: var(--navy);
    background: rgba(255,255,255,.7);
    font-size: 11px;
    font-weight: 900;
}

.tile-list {
    position: relative;
    z-index: 2;
    min-height: 220px;
    gap: 12px;
    padding: 3px;
    border-radius: 18px;
}

.answer-list {
    counter-reset: answer-order;
    min-height: 220px;
    padding: 12px;
    border: 1px dashed rgba(27,138,122,.22);
    background: rgba(255,255,255,.35);
    transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}

.answer-list.is-complete {
    border-color: rgba(27,138,122,.5);
    background: rgba(232,248,242,.55);
    box-shadow: inset 0 0 0 3px rgba(27,138,122,.04);
}

.order-tile {
    min-height: 54px;
    padding: 10px 15px 10px 12px;
    gap: 10px;
    overflow: visible;
    border-color: rgba(22,50,79,.14);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff 0%, #f6faf8 100%);
    box-shadow: 0 8px 18px rgba(23,52,72,.085), inset 0 1px 0 rgba(255,255,255,.9);
    touch-action: none;
    will-change: transform;
}

.order-tile::before {
    position: absolute;
    inset: 1px;
    border-radius: 14px;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.72) 50%, transparent 70%);
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: translateX(65%);
}

.order-tile:hover::before,
.order-tile:focus-visible::before {
    opacity: 1;
    animation: tileSheen .7s ease both;
}

.tile-content {
    position: relative;
    z-index: 2;
}

.tile-grip {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, 3px);
    gap: 3px;
    flex: 0 0 auto;
    padding: 3px;
    opacity: .34;
    transition: opacity .2s ease;
}

.tile-grip i {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
}

.order-tile:hover .tile-grip,
.order-tile:focus-visible .tile-grip {
    opacity: .72;
}

.answer-list .order-tile {
    counter-increment: answer-order;
    padding-inline-start: 15px;
    padding-inline-end: 42px;
    border-color: rgba(27,138,122,.22);
    background: linear-gradient(180deg, #fff, #edf9f5);
}

.answer-list .order-tile::after {
    position: absolute;
    top: 50%;
    inset-inline-end: 10px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(145deg, #279c8a, #126c62);
    box-shadow: 0 5px 11px rgba(27,138,122,.2);
    content: counter(answer-order);
    font-size: 10px;
    font-weight: 900;
    transform: translateY(-50%);
}

.order-tile.is-correct-position {
    border-color: rgba(20,146,112,.62);
    background: linear-gradient(180deg, #f8fffc, #dff6ed);
    box-shadow: 0 10px 24px rgba(20,146,112,.15), inset 0 0 0 1px rgba(255,255,255,.8);
}

.order-tile.is-correct-position::after {
    background: linear-gradient(145deg, #22a37e, #0f7459);
}

.drag-origin {
    border: 2px dashed rgba(27,138,122,.36) !important;
    background: rgba(27,138,122,.07) !important;
    box-shadow: none !important;
    pointer-events: none;
}

.drag-origin .tile-content,
.drag-origin .tile-grip,
.answer-list .drag-origin::after {
    opacity: 0;
}

.drag-ghost {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1000 !important;
    margin: 0 !important;
    pointer-events: none !important;
    opacity: .98;
    box-shadow: 0 28px 65px rgba(9,34,51,.28), 0 0 0 5px rgba(255,255,255,.65) !important;
    transform-origin: center;
    animation: none !important;
}

.is-sorting,
.is-sorting body {
    cursor: grabbing !important;
    user-select: none !important;
    overscroll-behavior: contain;
}

.answer-placeholder {
    padding: 28px;
}

.placeholder-icon {
    display: grid !important;
    place-items: center;
    width: 46px;
    height: 46px;
    margin: 0 auto 10px;
    border: 1px dashed rgba(27,138,122,.34);
    border-radius: 15px;
    color: var(--teal);
    background: rgba(27,138,122,.07);
    font-size: 21px !important;
}

.answer-placeholder strong {
    color: rgba(22,50,79,.62);
    font-size: 17px;
}

.answer-placeholder span:last-child {
    color: rgba(75,97,113,.62);
}

.flow-indicator span {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(27,138,122,.12);
    background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(216,243,236,.78));
    box-shadow: 0 10px 24px rgba(27,138,122,.12);
}

.game-actions {
    margin-top: 22px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 22px;
    background: rgba(255,255,255,.55);
    box-shadow: 0 16px 44px rgba(20,46,65,.08);
    backdrop-filter: blur(18px);
}

.game-actions button {
    position: relative;
    min-height: 52px;
    overflow: hidden;
}

.hint-button,
.reset-button {
    border-color: rgba(22,50,79,.12);
    background: rgba(255,255,255,.86);
}

.check-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-width: 270px;
    background: linear-gradient(135deg, #1d9a86, #12675f 62%, #0d504c);
    box-shadow: 0 15px 35px rgba(20,119,105,.27), inset 0 1px 0 rgba(255,255,255,.25);
}

.check-button::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 22%, rgba(255,255,255,.22) 48%, transparent 72%);
    content: "";
    transform: translateX(100%);
}

.check-button:hover:not(:disabled)::before {
    animation: buttonSheen .75s ease both;
}

.check-button b {
    font-size: 19px;
    transition: transform .25s var(--ease);
}

.check-button:hover:not(:disabled) b {
    transform: translateX(-5px);
}

.feedback-panel {
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    box-shadow: 0 22px 62px rgba(18,45,64,.14);
}

.feedback-panel::before {
    position: absolute;
    top: -70px;
    inset-inline-start: -55px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(27,138,122,.17), transparent 68%);
    content: "";
    pointer-events: none;
}

.feedback-panel.is-error::before {
    background: radial-gradient(circle, rgba(198,91,104,.16), transparent 68%);
}

.feedback-panel > * {
    position: relative;
    z-index: 1;
}

.feedback-icon {
    box-shadow: 0 10px 25px rgba(27,138,122,.24);
}

.feedback-panel.is-error .feedback-icon {
    box-shadow: 0 10px 25px rgba(198,91,104,.22);
}

.game-toast {
    position: fixed;
    right: 50%;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 150;
    max-width: min(calc(100% - 30px), 520px);
    padding: 13px 18px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 15px;
    color: #fff;
    background: rgba(18,50,73,.94);
    box-shadow: 0 18px 55px rgba(5,25,39,.28);
    opacity: 0;
    text-align: center;
    transform: translate(50%, 18px) scale(.96);
    transition: opacity .22s ease, transform .22s var(--ease);
    backdrop-filter: blur(16px);
    font-size: 13px;
    font-weight: 800;
}

.game-toast[data-tone="warning"] {
    background: rgba(139,91,17,.95);
}

.game-toast[data-tone="error"] {
    background: rgba(139,49,64,.95);
}

.game-toast.is-visible {
    opacity: 1;
    transform: translate(50%, 0) scale(1);
}

.screen-reader-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.play-board.is-success-pulse .answer-zone {
    animation: boardSuccess .82s var(--ease) both;
}

.play-board.is-error-pulse .answer-zone {
    animation: boardError .55s ease both;
}

.play-board.is-limit-pulse .answer-zone {
    animation: boardLimit .42s ease both;
}

.order-tile.is-success-wave {
    animation: successWave .64s var(--ease) both;
}

.level-complete {
    background: rgba(7,25,39,.72);
    backdrop-filter: blur(20px) saturate(130%);
}

.complete-card {
    border-radius: 38px;
    box-shadow: 0 55px 140px rgba(0,0,0,.34), 0 0 0 1px rgba(255,255,255,.4);
}

.stars {
    animation: starsGlow 1.4s ease-in-out infinite alternate;
}

@keyframes zoneSheen {
    from { transform: translateX(70%); }
    to { transform: translateX(-70%); }
}

@keyframes tileSheen {
    from { transform: translateX(65%); }
    to { transform: translateX(-65%); }
}

@keyframes buttonSheen {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

@keyframes boardSuccess {
    0% { transform: scale(1); box-shadow: var(--game-shadow); }
    38% { transform: scale(1.018); box-shadow: 0 0 0 8px rgba(27,138,122,.1), 0 32px 90px rgba(27,138,122,.2); }
    100% { transform: scale(1); box-shadow: var(--game-shadow); }
}

@keyframes boardError {
    0%, 100% { transform: translateX(0); }
    22% { transform: translateX(7px); }
    45% { transform: translateX(-6px); }
    68% { transform: translateX(4px); }
}

@keyframes boardLimit {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(.985); }
}

@keyframes successWave {
    0% { transform: translateY(0) scale(1); }
    38% { transform: translateY(-10px) scale(1.055); }
    72% { transform: translateY(2px) scale(.99); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes starsGlow {
    from { filter: drop-shadow(0 4px 7px rgba(214,166,73,.1)); transform: scale(1); }
    to { filter: drop-shadow(0 9px 18px rgba(214,166,73,.34)); transform: scale(1.035); }
}

@media (max-width: 980px) {
    .play-board {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .flow-indicator {
        height: 24px;
    }

    .flow-indicator span {
        width: 42px;
        height: 42px;
        transform: rotate(-90deg);
    }

    .zone {
        min-height: 240px;
    }

    .tile-list,
    .answer-list {
        min-height: 145px;
    }
}

@media (max-width: 720px) {
    .game-topbar {
        min-height: 72px;
    }

    .game-stage {
        width: calc(100% - 18px);
        padding: 24px 0 72px;
    }

    .question-panel {
        margin-bottom: 16px;
        padding: 20px 17px 22px;
        border-radius: 22px;
    }

    .question-kicker {
        gap: 7px;
    }

    .question-kicker > span {
        min-height: 27px;
        padding: 4px 9px;
        font-size: 10px;
    }

    .question-panel h1 {
        margin-top: 12px;
        font-size: 26px;
    }

    .question-panel p {
        font-size: 14px;
    }

    .zone {
        min-height: 220px;
        padding: 15px;
        border-radius: 22px;
    }

    .zone-heading {
        margin-bottom: 12px;
    }

    .zone-heading small {
        display: block;
    }

    .zone-index {
        width: 31px;
        height: 31px;
        border-radius: 10px;
    }

    .tile-list,
    .answer-list {
        min-height: 135px;
        gap: 9px;
    }

    .answer-list {
        padding: 9px;
    }

    .order-tile {
        min-height: 48px;
        padding: 8px 11px 8px 9px;
        gap: 7px;
        border-radius: 14px;
        font-size: 14px;
    }

    .answer-list .order-tile {
        padding-inline-end: 37px;
    }

    .answer-list .order-tile::after {
        inset-inline-end: 8px;
        width: 22px;
        height: 22px;
        border-radius: 7px;
    }

    .game-actions {
        gap: 8px;
        margin-top: 15px;
        padding: 9px;
        border-radius: 18px;
    }

    .game-actions button {
        min-height: 47px;
        padding: 9px 11px;
        font-size: 13px;
    }

    .check-button {
        min-width: 0;
    }

    .feedback-panel {
        margin-top: 16px;
        padding: 17px;
        border-radius: 21px;
    }

    .feedback-icon {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }
}

@media (prefers-color-scheme: dark) {
    .game-screen {
        --game-surface: rgba(16,37,52,.84);
        --game-border: rgba(221,239,245,.12);
        --game-shadow: 0 24px 70px rgba(0,0,0,.24);
        background:
            radial-gradient(circle at 8% 4%, rgba(27,138,122,.22), transparent 28rem),
            radial-gradient(circle at 92% 86%, rgba(214,166,73,.13), transparent 34rem),
            linear-gradient(145deg, #071722 0%, #0a1d28 52%, #101d25 100%);
    }

    .game-topbar {
        background: rgba(8,24,35,.9);
        border-color: rgba(221,239,245,.08);
    }

    .question-panel,
    .game-actions {
        border-color: rgba(221,239,245,.1);
        background: linear-gradient(145deg, rgba(17,39,54,.94), rgba(12,31,44,.76));
    }

    .answer-zone,
    .zone.is-drop-target {
        background: linear-gradient(145deg, rgba(16,46,54,.94), rgba(12,39,45,.83));
    }

    .zone.is-drop-blocked {
        background: linear-gradient(145deg, rgba(61,30,39,.94), rgba(48,25,33,.86));
    }

    .zone-status,
    .game-exit,
    .sound-toggle,
    .hint-button,
    .reset-button {
        color: var(--ink);
        background: rgba(16,37,52,.92);
        border-color: rgba(221,239,245,.12);
    }

    .answer-list {
        background: rgba(3,20,29,.22);
    }

    .answer-list.is-complete {
        background: rgba(13,73,64,.25);
    }

    .order-tile,
    .answer-list .order-tile {
        color: var(--ink);
        background: linear-gradient(180deg, #132d3e, #0e2534);
        border-color: rgba(221,239,245,.14);
        box-shadow: 0 8px 20px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.05);
    }

    .order-tile.is-correct-position,
    .answer-list .order-tile.is-correct-position {
        background: linear-gradient(180deg, #15483f, #103a34);
    }

    .answer-placeholder strong {
        color: rgba(232,240,243,.66);
    }

    .answer-placeholder span:last-child {
        color: rgba(169,187,197,.68);
    }

    .flow-indicator span {
        background: linear-gradient(145deg, rgba(20,48,62,.96), rgba(16,66,64,.75));
    }
}
