* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ink: #172033;
    --muted: #64748b;
    --line: #dbe4ef;
    --blue: #2563eb;
    --green: #16a34a;
    --orange: #f97316;
    --rose: #e11d48;
    --shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

body {
    min-height: 100vh;
    color: var(--ink);
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    background:
        radial-gradient(circle at 14% 18%, rgba(22, 163, 74, 0.16), transparent 28%),
        radial-gradient(circle at 82% 8%, rgba(249, 115, 22, 0.18), transparent 30%),
        linear-gradient(180deg, #f0fdfa 0%, #fff7ed 100%);
    touch-action: manipulation;
    user-select: none;
}

button,
a {
    font: inherit;
}

.game-shell {
    width: min(1120px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 28px;
}

.game-header {
    display: grid;
    grid-template-columns: 54px 1fr 54px;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.home-link,
.sound-btn,
.listen-btn,
.check-btn,
.clear-btn,
.next-btn {
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-link,
.sound-btn {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 18px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    font-size: 24px;
}

button:hover,
.home-link:hover {
    transform: translateY(-2px);
}

.eyebrow {
    color: #0f766e;
    font-size: 14px;
    font-weight: 900;
}

h1 {
    font-size: clamp(34px, 7vw, 62px);
    line-height: 1;
    letter-spacing: 0;
}

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

.task-panel,
.play-panel {
    border: 1px solid rgba(219, 228, 239, 0.95);
    border-radius: 22px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.task-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.task-title span,
.progress span {
    color: var(--muted);
    font-weight: 800;
}

.task-title strong {
    border-radius: 999px;
    padding: 8px 12px;
    color: #166534;
    background: #dcfce7;
}

.task-panel h2 {
    margin-top: 22px;
    font-size: 32px;
    line-height: 1.25;
}

.task-panel p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.7;
}

.progress {
    margin-top: 20px;
    border-radius: 18px;
    padding: 16px;
    background: #eff6ff;
}

.progress strong {
    display: block;
    margin-top: 8px;
    color: var(--blue);
    font-size: 34px;
}

.listen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 16px;
    border-radius: 16px;
    padding: 0 16px;
    color: white;
    background: var(--blue);
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 14px;
}

.item-card {
    min-height: 138px;
    border: 3px solid transparent;
    border-radius: 20px;
    padding: 12px;
    background: #f8fafc;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.item-card.selected {
    border-color: var(--green);
    background: #ecfdf5;
}

.item-card.right {
    border-color: var(--green);
    background: #dcfce7;
}

.item-card.wrong {
    border-color: var(--rose);
    background: #ffe4e6;
}

.item-emoji {
    display: grid;
    height: 58px;
    place-items: center;
    font-size: 42px;
}

.item-name {
    margin-top: 8px;
    text-align: center;
    font-size: 19px;
    font-weight: 900;
}

.item-desc {
    margin-top: 6px;
    text-align: center;
    color: var(--muted);
    font-weight: 800;
}

.feedback {
    min-height: 58px;
    margin-top: 16px;
    border-radius: 16px;
    padding: 14px;
    background: #f8fafc;
    color: var(--muted);
    font-weight: 900;
    line-height: 1.5;
}

.feedback.good {
    color: #166534;
    background: #dcfce7;
}

.feedback.try {
    color: #9a3412;
    background: #ffedd5;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

.check-btn,
.clear-btn,
.next-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    flex: 1;
    border-radius: 18px;
    padding: 0 16px;
    color: white;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.check-btn {
    background: var(--green);
}

.clear-btn {
    background: #64748b;
}

.next-btn {
    display: none;
    background: var(--orange);
}

@media (max-width: 860px) {
    .game-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .game-shell {
        width: min(100% - 16px, 1120px);
        padding-top: 10px;
    }

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

    .home-link,
    .sound-btn {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .task-panel,
    .play-panel {
        border-radius: 18px;
        padding: 16px;
    }

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

    .actions {
        flex-direction: column;
    }

    .check-btn,
    .clear-btn,
    .next-btn {
        width: 100%;
    }
}
