* { box-sizing: border-box; }
body {
    margin: 0;
    padding: 16px 12px 28px;
    font-family: 'Zen Maru Gothic', sans-serif;
    background: #fff8e7;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
}
.back-btn {
    align-self: flex-start;
    margin: 0 0 10px 4px;
    text-decoration: none;
    color: #2e7d32;
    font-weight: bold;
    font-size: 0.95rem;
}
.game-wrap {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(120, 80, 40, 0.12);
    padding: 16px 14px 18px;
    text-align: center;
}
h1 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    color: #6d4c2b;
}
.badge-new {
    display: inline-block;
    background: #ffd54f;
    color: #7a4a00;
    font-size: 0.6rem;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}
.lead {
    margin: 0 0 10px;
    font-size: 0.88rem;
    color: #777;
}
.hud {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 1rem;
}
.hud span {
    background: rgba(255, 248, 220, 0.95);
    padding: 4px 12px;
    border-radius: 999px;
    border: 2px solid #f0d9a0;
}
.stage {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 0 0 2px #e8d5a8;
    background: #87ceeb;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
#game {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
}
.overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 250, 235, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    z-index: 5;
}
.overlay.hidden { display: none; }
.overlay-msg {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #5d4037;
}
.overlay-bonus {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: #888;
    font-weight: 500;
}
.overlay-hint {
    margin: 0 0 6px;
    font-size: 0.9rem;
    color: #777;
}
.main-btn {
    appearance: none;
    border: none;
    background: #ff8a65;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 12px 28px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 0 #e0643c;
}
.main-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #e0643c; }

.touch-controls {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: none;
    justify-content: space-between;
    align-items: flex-end;
    padding: 8px 10px 10px;
    pointer-events: none;
    z-index: 4;
}
.touch-controls.visible { display: flex; }
.move-pad { display: flex; gap: 8px; pointer-events: auto; }
.pad-btn {
    pointer-events: auto;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 14px;
    background: rgba(255,255,255,0.72);
    color: #5d4037;
    font-size: 1.4rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    touch-action: none;
}
.pad-btn:active, .pad-btn.active { background: rgba(255, 200, 120, 0.9); }
.jump-btn {
    width: 64px;
    height: 64px;
    background: rgba(255, 180, 120, 0.85);
}

.seo-text-box {
    margin: 22px 8px 0;
    width: 100%;
    max-width: 520px;
    background: rgba(255,255,255,0.95);
    padding: 18px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #555;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    text-align: left;
}
.seo-text-box h2 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #6d4c2b;
}
.seo-text-box p { margin: 0; }

@media (max-width: 520px) {
    h1 { font-size: 1.15rem; }
    .pad-btn { width: 52px; height: 52px; }
    .jump-btn { width: 60px; height: 60px; }
}
