:root {
    --color-bg: #f7f7f4;
    --color-primary: #38565c;
    --color-primary-dark: #20383d;
    --color-accent: #53c1d8;
    --color-text: #111;
    --color-white: #fff;

    --header-height: 76px;
    --bottom-nav-height: 72px;

    --space-xs: 0.4rem;
    --space-s: 0.75rem;
    --space-m: 1rem;
    --space-l: 1.4rem;

    --radius-s: 12px;
    --radius-m: 20px;
    --radius-pill: 999px;

    --shadow-soft: 0 14px 35px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    overflow: hidden;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-height);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 1rem;
    background: rgba(247, 247, 244, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--color-primary);
}

.logo {
    width: 88px;
    height: auto;
    flex-shrink: 0;
}

.eyebrow {
    margin: 0;
    font-weight: 900;
    color: var(--color-primary);
    font-size: 0.82rem;
    line-height: 1;
}

h1 {
    margin: 0.12rem 0 0;
    font-size: clamp(1rem, 4.7vw, 1.35rem);
    line-height: 1.05;
    color: var(--color-primary-dark);
}

.snap-container {
    height: 100dvh;
    overflow-y: hidden;
    scroll-behavior: auto;
    overscroll-behavior-y: contain;
    touch-action: none;
}

.snap-container.is-programmatic-scrolling {
    scroll-snap-type: none;
}

.challenge-section {
    height: 100dvh;
    min-height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;

    display: flex;
    align-items: stretch;

    padding:
        calc(var(--header-height) + 0.7rem) 1rem calc(var(--bottom-nav-height) + 0.9rem);
}

.card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;

    height: 100%;

    background: var(--color-white);
    border-radius: var(--radius-m);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.question-head {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.85rem 1rem 0.95rem;
}

.question-head,
.info {
    flex-shrink: 0;
}

.question-head span {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.78rem;
    font-weight: 800;
    opacity: 0.82;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.question-head h2 {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1;
}

.card img {
    display: block;
    width: 100%;

    flex: 1;

    min-height: 0;

    object-fit: cover;
    object-position: center;
}

.info {
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    font-size: 0.98rem;
    line-height: 1.35;
}

.info p {
    margin: 0;
    padding: 0.75rem 0.8rem;
    background: #f1f4f3;
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius-s);
}

.bottom-nav {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.7rem;
    height: var(--bottom-nav-height);
    z-index: 25;
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0.35rem;
    align-items: center;
    padding: 0.55rem;
    background: rgba(247, 247, 244, 0.94);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(56, 86, 92, 0.25);
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

.nav-dot {
    aspect-ratio: 1;
    width: 100%;
    max-width: 43px;
    justify-self: center;
    border-radius: var(--radius-pill);
    border: 2px solid var(--color-primary);
    background: var(--color-white);
    color: var(--color-primary);
    font-weight: 900;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-dot.active {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.12);
}

.symbol-example {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.symbol-example p {
    margin: 0;
    flex: 1;
}

.symbol-example img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.symbol-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.symbol-hint img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

@media (min-width: 700px) {
    :root {
        --header-height: 88px;
    }

    .site-header {
        padding-inline: 2rem;
    }

    .logo {
        width: 125px;
    }

    .challenge-section {
        padding-inline: 2rem;
    }

    .card {
        max-width: 620px;
    }

    .card img {
        aspect-ratio: 16 / 10;
    }

    .bottom-nav {
        max-width: 560px;
        margin: 0 auto;
    }
}