:root {
    color-scheme: dark;
    --bg: #120f0d;
    --surface: #1c1814;
    --surface-soft: #262019;
    --line: rgba(255, 234, 198, 0.16);
    --text: #fff8ec;
    --muted: #c8bbab;
    --gold: #ffb13b;
    --gold-bright: #ffd178;
    --ember: #d55a29;
    --blue: #4ba8e8;
    --red: #ef694f;
    --max: 1120px;
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 50% -10%, rgba(187, 99, 30, 0.18), transparent 34rem),
        var(--bg);
    color: var(--text);
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
    line-height: 1.75;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
    background-size: 64px 64px;
    content: "";
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

a {
    color: var(--gold-bright);
}

a:hover {
    color: #ffe6b3;
}

img {
    display: block;
    max-width: 100%;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--gold-bright);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 100;
    padding: 0.65rem 1rem;
    border-radius: 0.6rem;
    background: var(--text);
    color: var(--bg);
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: absolute;
    top: 0;
    z-index: 10;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(to bottom, rgba(10, 8, 7, 0.82), transparent);
}

.site-header--solid {
    position: sticky;
    background: rgba(18, 15, 13, 0.94);
    backdrop-filter: blur(18px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(calc(100% - 2rem), var(--max));
    min-height: 72px;
    margin: auto;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    line-height: 1.1;
    text-decoration: none;
}

.brand img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    box-shadow: 0 7px 22px rgba(0,0,0,0.35);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-links .lang-link {
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    color: var(--gold-bright);
}

.hero {
    position: relative;
    display: grid;
    min-height: 760px;
    overflow: hidden;
    place-items: center;
    isolation: isolate;
}

.hero::before {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url("images/hero.webp") center / cover;
    content: "";
    transform: scale(1.02);
}

.hero::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to bottom, rgba(8,7,6,0.3), rgba(8,7,6,0.42) 50%, var(--bg) 100%),
        linear-gradient(90deg, rgba(8,7,6,0.8), transparent 60%);
    content: "";
}

.hero-content {
    width: min(calc(100% - 2rem), var(--max));
    padding-top: 6rem;
}

.eyebrow {
    margin: 0 0 0.6rem;
    color: var(--gold-bright);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 10vw, 6.6rem);
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 0.96;
    text-shadow: 0 4px 28px rgba(0,0,0,0.72);
}

.hero-copy {
    max-width: 620px;
    margin: 1.4rem 0 0;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    text-shadow: 0 3px 16px rgba(0,0,0,0.85);
}

.hero-subcopy {
    max-width: 570px;
    color: #eee4d6;
    font-size: 1rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.8rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0.75rem 1.2rem;
    border: 1px solid var(--gold);
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #ffbd50, #e47a25);
    box-shadow: 0 10px 28px rgba(185, 83, 22, 0.28);
    color: #23150a;
    font-weight: 900;
    text-decoration: none;
}

.button:hover {
    background: linear-gradient(135deg, #ffd178, #f39133);
    color: #23150a;
    transform: translateY(-1px);
}

.button--ghost {
    border-color: rgba(255,255,255,0.4);
    background: rgba(14, 12, 10, 0.62);
    box-shadow: none;
    color: var(--text);
}

.button--ghost:hover {
    background: rgba(30, 25, 20, 0.88);
    color: var(--text);
}

.store-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    background: rgba(15,12,9,0.6);
    color: #e7dccb;
    font-size: 0.8rem;
    font-weight: 700;
}

.store-note::before {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--gold);
    content: "";
    box-shadow: 0 0 16px var(--gold);
}

.section {
    width: min(calc(100% - 2rem), var(--max));
    margin: 0 auto;
    padding: 5.5rem 0;
}

.section--tight {
    padding-top: 2.5rem;
}

.section-header {
    max-width: 740px;
    margin-bottom: 2.2rem;
}

.section h2,
.content-card h2 {
    margin: 0 0 0.8rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.lead {
    color: var(--muted);
    font-size: 1.05rem;
}

.steps,
.feature-grid,
.character-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.step,
.feature,
.character-card,
.content-card,
.status-card {
    border: 1px solid var(--line);
    border-radius: 1.2rem;
    background: linear-gradient(145deg, rgba(39,32,25,0.86), rgba(24,20,17,0.9));
    box-shadow: var(--shadow);
}

.step,
.feature,
.character-card {
    padding: 1.5rem;
}

.step-number {
    display: grid;
    width: 2.2rem;
    height: 2.2rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,177,59,0.45);
    border-radius: 50%;
    color: var(--gold-bright);
    font-family: Georgia, serif;
    place-items: center;
}

.step h3,
.feature h3,
.character-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.12rem;
}

.step p,
.feature p,
.character-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.screens {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: start;
}

.screen {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1.4rem;
    background: #090806;
    box-shadow: var(--shadow);
}

.screen img {
    width: 100%;
    aspect-ratio: 9 / 19.5;
    object-fit: cover;
}

.screen--character img {
    object-position: 50% 100%;
}

.screen figcaption {
    padding: 0.9rem 1rem 1rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.feature-icon {
    display: grid;
    width: 3.2rem;
    height: 3.2rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,177,59,0.34);
    border-radius: 1rem;
    background: rgba(255,177,59,0.08);
    color: var(--gold-bright);
    font-size: 1.45rem;
    place-items: center;
}

.pawn {
    --pawn-color: #ad8b45;
    position: relative;
    width: 66px;
    height: 76px;
    margin: 0 auto 1rem;
}

.pawn::before {
    position: absolute;
    top: 2px;
    left: 20px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: var(--pawn-color);
    box-shadow: inset 0 -4px 7px rgba(0,0,0,0.2), 0 0 18px color-mix(in srgb, var(--pawn-color) 55%, transparent);
    content: "";
}

.pawn::after {
    position: absolute;
    right: 6px;
    bottom: 3px;
    left: 6px;
    height: 22px;
    border-radius: 50%;
    background: var(--pawn-color);
    box-shadow: 0 -22px 0 -5px var(--pawn-color), inset 0 -5px 8px rgba(0,0,0,0.22);
    content: "";
}

.pawn--speed { --pawn-color: #48b8d4; }
.pawn--bomber { --pawn-color: #e06d4d; }

.character-card {
    text-align: center;
}

.character-meta {
    display: inline-block;
    margin-top: 0.8rem;
    color: var(--gold-bright);
    font-size: 0.78rem;
    font-weight: 800;
}

.cta-panel {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 7vw, 4.5rem);
    border: 1px solid rgba(255,177,59,0.28);
    border-radius: 1.5rem;
    background:
        linear-gradient(100deg, rgba(18,14,10,0.96), rgba(35,21,13,0.78)),
        url("images/hero.webp") center / cover;
    box-shadow: var(--shadow);
}

.cta-panel p {
    max-width: 650px;
    color: #e0d4c5;
}

.page-hero {
    padding: 9rem 1rem 4.5rem;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(rgba(13,11,9,0.75), var(--bg)),
        url("images/hero.webp") center 45% / cover;
}

.page-hero-inner,
.content-wrap {
    width: min(100%, 860px);
    margin: auto;
}

.page-hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.8rem);
}

.content-wrap {
    padding: 3rem 1rem 6rem;
}

.content-card {
    padding: clamp(1.4rem, 4vw, 2.5rem);
}

.content-card + .content-card,
.status-card + .content-card {
    margin-top: 1rem;
}

.content-card h2 {
    margin-top: 2.2rem;
    font-size: clamp(1.5rem, 4vw, 2.15rem);
}

.content-card h2:first-child {
    margin-top: 0;
}

.content-card h3 {
    margin: 1.6rem 0 0.4rem;
}

.content-card p,
.content-card li {
    color: #d7cbbb;
}

.content-card strong {
    color: var(--text);
}

.status-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.25rem;
}

.status-dot {
    width: 0.8rem;
    height: 0.8rem;
    margin-top: 0.4rem;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 18px rgba(255,177,59,0.85);
}

.status-card p {
    margin: 0;
    color: var(--muted);
}

.join-steps {
    margin: 1.5rem 0;
    padding: 0;
    counter-reset: join-step;
    list-style: none;
}

.join-steps li {
    position: relative;
    min-height: 3.4rem;
    padding: 0.55rem 0 1.2rem 3.7rem;
    counter-increment: join-step;
}

.join-steps li::before {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    width: 2.7rem;
    height: 2.7rem;
    border: 1px solid rgba(255,177,59,0.4);
    border-radius: 0.85rem;
    background: rgba(255,177,59,0.08);
    color: var(--gold-bright);
    content: counter(join-step);
    font-family: Georgia, serif;
    place-items: center;
}

.contact-box {
    margin-top: 1.6rem;
    padding: 1.25rem;
    border: 1px solid rgba(75,168,232,0.32);
    border-radius: 1rem;
    background: rgba(75,168,232,0.07);
}

.contact-box code {
    display: block;
    margin: 0.35rem 0 0.8rem;
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: clamp(0.72rem, 3.5vw, 0.96rem);
    overflow-wrap: anywhere;
    user-select: all;
}

.faq details {
    border-top: 1px solid var(--line);
}

.faq details:last-child {
    border-bottom: 1px solid var(--line);
}

.faq summary {
    padding: 1.05rem 0;
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
}

.faq details p {
    margin-top: 0;
    padding: 0 0 1rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #0c0a09;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    width: min(calc(100% - 2rem), var(--max));
    margin: auto;
    padding: 2.5rem 0;
    gap: 1.5rem;
}

.footer-inner p {
    margin: 0.4rem 0 0;
    color: #8f8579;
    font-size: 0.8rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem 1rem;
}

.footer-links a {
    color: #d4c8b8;
    font-size: 0.85rem;
    text-decoration: none;
}

.error-page {
    display: grid;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
    place-items: center;
}

.error-code {
    margin: 0;
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: clamp(5rem, 25vw, 11rem);
    line-height: 1;
}

@media (max-width: 760px) {
    .nav {
        min-height: 64px;
    }

    .nav-links a:not(.lang-link) {
        display: none;
    }

    .hero {
        min-height: 700px;
        align-items: end;
    }

    .hero-content {
        padding: 7rem 0 6rem;
    }

    .steps,
    .feature-grid,
    .character-grid {
        grid-template-columns: 1fr;
    }

    .screens {
        gap: 0.55rem;
    }

    .screen {
        border-radius: 0.8rem;
    }

    .screen figcaption {
        display: none;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 390px) {
    .brand span {
        font-size: 0.92rem;
    }

    .hero h1 {
        font-size: 2.85rem;
    }

    .button-row .button {
        width: 100%;
    }

    .section {
        padding: 4rem 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
