:root {
    --ink: #253235;
    --muted: #65767a;
    --line: #dbeae6;
    --mint: #68b89c;
    --mint-dark: #2f8a72;
    --paper: #fffefb;
    --soft: #f6fbf9;
    --sky: #7ec7df;
    --pale-sky: #eefaff;
    --yellow: #f3d46f;
    --shadow: 0 18px 48px rgba(36, 77, 79, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.75;
    background:
        radial-gradient(circle at 16% 18%, rgba(126, 199, 223, 0.18), transparent 28%),
        radial-gradient(circle at 88% 20%, rgba(104, 184, 156, 0.13), transparent 30%),
        #fff;
}

a {
    color: inherit;
}

.site-header,
.site-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.site-header {
    min-height: 70px;
}

.site-logo {
    color: var(--mint-dark);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.site-nav,
.site-footer {
    flex-wrap: wrap;
}

.site-nav {
    display: flex;
    gap: 14px;
    color: var(--muted);
    font-size: 0.86rem;
}

.site-nav a,
.site-footer a {
    text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
    color: var(--mint-dark);
}

.touch-page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto 64px;
}

.touch-hero {
    min-height: 430px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: clamp(26px, 5vw, 70px);
    padding: 34px 0 44px;
}

.series-label {
    margin: 0 0 12px;
    color: var(--mint-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.15;
}

.hero-copy p:last-child {
    max-width: 620px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.8vw, 1.12rem);
}

.mini-lab {
    position: relative;
    min-height: 300px;
}

.mini-lab img {
    position: absolute;
    display: block;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 24px rgba(47, 84, 73, 0.12));
}

.lab-button {
    width: min(44%, 200px);
    left: 8%;
    bottom: 18%;
}

.lab-gloves {
    width: min(34%, 156px);
    right: 12%;
    top: 14%;
    animation: floaty 4s ease-in-out infinite;
}

.lab-timer {
    width: min(34%, 150px);
    right: 18%;
    bottom: 12%;
}

.game-shell {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
    padding: clamp(18px, 3vw, 32px);
}

.status-panel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.status-panel div {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    padding: 12px;
}

.status-panel span {
    display: block;
    color: var(--mint-dark);
    font-size: 0.72rem;
    font-weight: 800;
}

.status-panel strong {
    display: block;
    margin-top: 2px;
    font-size: clamp(1.1rem, 2.7vw, 1.6rem);
    line-height: 1.2;
}

.battle-board {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(126, 199, 223, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(126, 199, 223, 0.08) 1px, transparent 1px),
        var(--paper);
    background-size: 34px 34px;
    padding: clamp(18px, 4vw, 34px);
    text-align: center;
}

.instruction-text {
    min-height: 2em;
    margin: 0 auto 18px;
    color: var(--mint-dark);
    font-weight: 900;
}

.touch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(14px, 3vw, 26px);
}

.touch-pad {
    appearance: none;
    min-height: clamp(150px, 28vw, 260px);
    border: 1px solid #cfdfdd;
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font: 900 clamp(1.8rem, 6vw, 4.6rem) system-ui, sans-serif;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
    touch-action: manipulation;
}

.touch-pad span {
    display: block;
}

.touch-pad.is-active {
    border-color: rgba(47, 138, 114, 0.5);
    background: linear-gradient(180deg, #fff, var(--pale-sky));
    color: var(--mint-dark);
    box-shadow: 0 14px 30px rgba(47, 138, 114, 0.16);
    transform: translateY(-2px);
}

.touch-pad.is-hit {
    background: #f2fbf7;
}

.touch-pad.is-miss {
    background: #fff5ef;
}

.hint-text {
    margin: 16px 0 0;
    color: var(--muted);
}

.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 18px;
}

.primary-button,
.ghost-button {
    appearance: none;
    min-height: 48px;
    border-radius: 8px;
    padding: 0 22px;
    border: 0;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.primary-button {
    background: var(--mint-dark);
    color: #fff;
    box-shadow: 0 10px 22px rgba(47, 138, 114, 0.22);
}

.ghost-button {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
}

.result-panel {
    margin-top: 20px;
    border-top: 1px dashed #c9dfd7;
    padding-top: 18px;
}

.result-panel h2 {
    margin: 0 0 4px;
    font-size: clamp(1.25rem, 3vw, 1.7rem);
}

.result-panel p {
    margin: 0;
    color: var(--muted);
}

.log-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.log-list li {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--pale-sky);
    padding: 4px 10px;
    color: #3c7e95;
    font-size: 0.86rem;
}

.info-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.info-section article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    padding: 20px;
}

.info-section h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.info-section p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.info-section a {
    color: var(--mint-dark);
    font-weight: 700;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 26px 0 38px;
    color: var(--muted);
    font-size: 0.86rem;
}

@keyframes floaty {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@media (max-width: 820px) {
    .touch-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        text-align: center;
    }

    .hero-copy p:last-child {
        margin-left: auto;
        margin-right: auto;
    }

    .mini-lab {
        min-height: 220px;
    }

    .status-panel {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-section {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 540px) {
    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .touch-grid {
        gap: 12px;
    }

    .touch-pad {
        min-height: 140px;
    }

    .info-section {
        grid-template-columns: 1fr;
    }
}
