.game-detail-page {
    --page-bg: #0d1118;
    --page-surface: #151c26;
    --page-surface-soft: #111720;
    --page-text: #f7f8fa;
    --page-muted: #bdc7d4;
    --page-accent: #4cc9f0;
    --page-accent-strong: #227c9d;
    --page-border: rgba(255, 255, 255, 0.13);
    --page-glow: rgba(76, 201, 240, 0.22);
    --page-header: rgba(13, 17, 24, 0.94);
    background: var(--page-bg);
    color: var(--page-text);
}

.game-detail-page.hikkoshi-page {
    --page-bg: #111a22;
    --page-surface: #192733;
    --page-surface-soft: #14212b;
    --page-muted: #c4d5df;
    --page-accent: #43c7a4;
    --page-accent-strong: #176f65;
    --page-border: rgba(111, 224, 192, 0.2);
    --page-glow: rgba(67, 199, 164, 0.24);
    --page-header: rgba(17, 26, 34, 0.94);
}

.game-detail-page.heroine-page {
    --page-bg: #0e1018;
    --page-surface: #1a1d28;
    --page-surface-soft: #141720;
    --page-muted: #c4c7d0;
    --page-accent: #f05278;
    --page-accent-strong: #be3658;
    --page-border: #343846;
    --page-glow: transparent;
    --page-header: rgba(14, 16, 24, 0.96);
}

.game-detail-page header {
    background-color: var(--page-header);
    border-bottom-color: var(--page-border);
}

.game-detail-page .logo,
.game-detail-page header a,
.game-detail-page footer a {
    color: var(--page-text);
}

.game-detail-page .logo span,
.game-detail-page .app-subtitle {
    color: var(--page-accent);
}

.game-detail-page a:hover {
    color: var(--page-accent);
}

.game-detail-page .app-detail-section {
    position: relative;
    overflow: hidden;
    background: var(--page-bg);
}

.game-detail-page .app-detail-section::before {
    content: none;
}

.app-detail-container {
    position: relative;
    z-index: 1;
    max-width: 1040px;
    margin: 0 auto;
    padding: 52px 20px 60px;
}

.app-hero {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    margin-bottom: 44px;
}

.app-icon {
    width: 160px;
    height: 160px;
    border-radius: 24px;
    box-shadow: none;
    object-fit: cover;
    background: var(--page-surface);
    border: 1px solid var(--page-border);
}

.app-icon.app-icon-wide {
    width: 190px;
    height: 128px;
    border-radius: 14px;
}

.app-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 9px;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.app-subtitle {
    font-size: 1.05rem;
    margin-bottom: 18px;
    font-weight: 700;
}

.app-desc {
    max-width: 760px;
    font-size: 1rem;
    color: var(--page-muted);
    line-height: 1.85;
}

.store-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.store-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    min-height: 62px;
    padding: 11px 20px;
    border-radius: 9px;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.15;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    background: var(--page-accent-strong);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.store-badge:hover {
    transform: translateY(-3px);
    background: var(--page-accent);
    color: #fff;
}

.store-badge span {
    font-size: 0.76rem;
    font-weight: 400;
    margin-top: 5px;
}

.store-badge.is-outline {
    background: transparent;
    border-color: var(--page-accent);
    color: var(--page-text);
}

.store-badge.is-muted {
    cursor: default;
    background: var(--page-surface);
    border-color: var(--page-border);
    color: var(--page-muted);
}

.section-label {
    margin: 0 0 15px;
    color: var(--page-accent);
    font-family: var(--font-en);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 44px;
}

.feature-card {
    min-height: 205px;
    border: 1px solid var(--page-border);
    border-radius: 12px;
    padding: 20px;
    background: var(--page-surface-soft);
    text-align: left;
}

.feature-card .symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 42px;
    padding: 0 10px;
    border-radius: 8px;
    margin-bottom: 14px;
    color: #fff;
    font-family: var(--font-en);
    font-size: 0.82rem;
    font-weight: 700;
    background: var(--page-accent-strong);
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--page-muted);
    line-height: 1.65;
}

.game-loop-panel {
    position: relative;
    overflow: hidden;
    margin: 0 0 44px;
    padding: 30px;
    border: 1px solid var(--page-border);
    border-radius: 16px;
    background: var(--page-surface-soft);
}

.loop-heading {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    max-width: 830px;
    margin: 0 auto 28px;
}

.loop-count {
    display: flex;
    min-height: 134px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--page-border);
    border-radius: 14px;
    background: var(--page-surface);
    box-shadow: none;
}

.loop-count strong {
    color: var(--page-accent);
    font-family: var(--font-en);
    font-size: 4.6rem;
    line-height: 0.9;
}

.loop-count span {
    margin-top: 10px;
    color: var(--page-muted);
    font-family: var(--font-en);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.loop-heading .section-label {
    margin-bottom: 8px;
}

.loop-heading h2 {
    margin-bottom: 10px;
    font-size: clamp(1.65rem, 3.2vw, 2.4rem);
    line-height: 1.35;
}

.loop-heading p:last-child {
    color: var(--page-muted);
    line-height: 1.75;
}

.loop-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.loop-step {
    position: relative;
    grid-column: span 2;
    min-height: 186px;
    padding: 21px 20px;
    border: 1px solid var(--page-border);
    border-radius: 11px;
    background: var(--page-surface);
    box-shadow: none;
}

.loop-step:nth-child(4) {
    grid-column: 2 / span 2;
}

.loop-step:nth-child(5) {
    grid-column: 4 / span 2;
}

.loop-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 26px;
    margin-bottom: 17px;
    padding: 3px 8px;
    border: 1px solid var(--page-border);
    border-radius: 999px;
    background: var(--page-glow);
    color: #fff;
    font-family: var(--font-en);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.loop-step > .loop-step-title {
    display: block;
    margin-bottom: 11px;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.45;
}

.loop-step p {
    color: #e1dfee;
    font-size: 0.9rem;
    line-height: 1.8;
}

.loop-step p strong {
    color: var(--page-accent);
    font-weight: 700;
}

.loop-step-final {
    border-color: var(--page-accent);
    background: var(--page-surface);
}

.loop-footer {
    display: flex;
    gap: 22px;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--page-border);
    color: var(--page-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.loop-footer p strong {
    color: #fff;
    font-weight: 700;
}

.loop-footer a {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid var(--page-accent);
    border-radius: 8px;
    background: var(--page-accent-strong);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.loop-footer a:hover {
    transform: translateY(-2px);
    background: var(--page-accent-strong);
    color: #fff;
}

.game-movie {
    display: grid;
    grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.45fr);
    gap: 28px;
    align-items: center;
    margin: 0 0 44px;
    padding: 28px;
    border: 1px solid var(--page-border);
    border-radius: 16px;
    background: var(--page-surface-soft);
}

.game-movie-copy h2 {
    margin-bottom: 12px;
    color: #fff;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    line-height: 1.45;
}

.game-movie-copy > p:last-of-type {
    color: var(--page-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.game-movie-copy a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 20px;
    padding: 10px 14px;
    border: 1px solid var(--page-accent);
    border-radius: 8px;
    background: var(--page-accent-strong);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.game-movie-copy a:hover {
    transform: translateY(-2px);
    background: var(--page-accent-strong);
    color: #fff;
}

.game-movie-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--page-border);
    border-radius: 12px;
    background: #050510;
    box-shadow: none;
}

.game-movie-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.screenshots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 42px;
}

.screenshot {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    border: 1px solid var(--page-border);
    display: block;
    object-fit: cover;
    object-position: center;
    background: var(--page-surface-soft);
}

.disclaimer {
    font-size: 0.85rem;
    color: var(--page-muted);
    border: 1px solid var(--page-border);
    border-radius: 10px;
    padding: 15px 17px;
    margin-bottom: 36px;
    text-align: left;
    line-height: 1.7;
    background: var(--page-surface-soft);
}

.game-detail-page .more-link a {
    background: transparent;
    color: var(--page-text);
    border-color: var(--page-accent);
}

.game-detail-page .more-link a:hover {
    background: var(--page-accent-strong);
    color: #fff;
    border-color: var(--page-accent-strong);
}

.game-detail-page footer {
    background: var(--page-surface-soft);
    color: var(--page-muted);
}

@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .loop-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .loop-step {
        grid-column: auto;
        min-height: 155px;
    }

    .loop-step:nth-child(4),
    .loop-step:nth-child(5) {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .app-detail-container {
        padding-top: 38px;
    }

    .app-hero {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        gap: 23px;
    }

    .app-desc {
        text-align: left;
    }

    .store-badges {
        justify-content: center;
    }

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

    .game-loop-panel {
        padding: 22px 18px;
    }

    .game-movie {
        padding: 22px 18px;
    }

    .loop-heading {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .loop-count {
        width: 132px;
        min-height: 112px;
    }

    .loop-count strong {
        font-size: 3.8rem;
    }

    .loop-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        min-height: 0;
    }

    .loop-steps {
        grid-template-columns: 1fr;
    }

    .loop-step {
        grid-column: auto;
        min-height: 0;
    }

    .loop-step:nth-child(4),
    .loop-step:nth-child(5) {
        grid-column: auto;
    }

    .store-badge {
        width: 100%;
    }
}
