@font-face {
    font-family: 'Mochiy Pop P One';
    src: url('../fonts/MochiyPopPOne-Regular.ttf') format('truetype');
    font-display: swap;
}

:root {
    --bg-main: linear-gradient(180deg, #fff9f0 0%, #fff3e2 55%, #ffeeda 100%);
    --ink: #3f4a54;
    --ink-soft: #5f6a75;
    --line: rgba(190, 150, 90, 0.22);
    --white: rgba(255, 255, 255, 0.86);
    --white-strong: rgba(255, 255, 255, 0.96);
    --orange: #f39a4d;
    --orange-deep: #e8792a;
    --accent-text: #a4551a;
    --sun: #f7cf5f;
    --mint: #8fd6a8;
    --sky: #86c8ef;
    --pink: #f4a8b8;
    --shadow: 0 8px 24px rgba(190, 150, 90, 0.18);
    --shadow-lg: 0 24px 56px rgba(196, 148, 84, 0.2);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --site-width: min(1120px, calc(100% - 40px));
    --transition: 180ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    overflow-x: hidden;
    color: var(--ink);
    font-family: 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', sans-serif;
    line-height: 1.75;
    background:
        radial-gradient(circle at top left, rgba(247, 207, 95, 0.28), transparent 32%),
        radial-gradient(circle at top right, rgba(244, 168, 184, 0.2), transparent 28%),
        var(--bg-main);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.6), transparent 16%),
        radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.46), transparent 14%),
        radial-gradient(circle at 74% 76%, rgba(255, 255, 255, 0.4), transparent 14%);
}

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

.mobile-break {
    display: none;
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    padding: 0.1em 0.45em;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    font-family: inherit;
    font-size: 0.92em;
}

p,
ul,
ol {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 3px solid #c05f16;
    outline-offset: 3px;
}

.site-header__inner,
.hero__inner,
.section__inner,
.site-footer__inner,
.legal-hero__content,
.paper {
    width: var(--site-width);
    margin: 0 auto;
}

.site-header {
    position: relative;
    z-index: 20;
}

.page-home .site-header {
    position: absolute;
    inset: 0 0 auto;
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 0 0;
}

.page-legal .site-header__inner {
    padding: 18px 0;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-brand__mark,
.hero__title,
.section__title,
.legal-hero__title,
.button,
.site-brand__name,
.doc-section h2,
.doc-meta__title {
    font-family: 'Mochiy Pop P One', 'Hiragino Sans', sans-serif;
}

.site-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffd59c, #fff2d8);
    box-shadow: 0 10px 24px rgba(243, 154, 77, 0.22);
    font-size: 0.9rem;
    color: var(--accent-text);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
}

.site-nav a,
.link-chip {
    padding: 10px 14px;
    border-radius: 999px;
    transition: transform var(--transition), background-color var(--transition), color var(--transition);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.link-chip:hover,
.link-chip:focus-visible {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 128px 0 64px;
    background: linear-gradient(180deg, #fff9f0 0%, #ffeeda 100%);
}

.hero__sky {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero__sun-glow {
    position: absolute;
    top: -220px;
    left: 50%;
    width: 900px;
    height: 900px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247, 207, 95, 0.5) 0%, rgba(247, 207, 95, 0.22) 42%, transparent 70%);
}

.hero__cloud {
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 246, 228, 0.55);
    filter: blur(16px);
}

.hero__cloud--one {
    top: 88px;
    left: -60px;
    width: 260px;
    height: 92px;
    animation: drift-right 32s linear infinite;
}

.hero__cloud--two {
    top: 210px;
    right: -100px;
    width: 320px;
    height: 108px;
    animation: drift-left 38s linear infinite;
}

.hero__dot {
    position: absolute;
    border-radius: 50%;
}

.hero__dot--one {
    top: 140px;
    left: 12%;
    width: 18px;
    height: 18px;
    background: rgba(143, 214, 168, 0.55);
    animation: float-gentle 6.2s ease-in-out infinite;
}

.hero__dot--two {
    top: 320px;
    right: 10%;
    width: 24px;
    height: 24px;
    background: rgba(134, 200, 239, 0.5);
    animation: float-gentle 5.4s ease-in-out infinite 400ms;
}

.hero__dot--three {
    bottom: 120px;
    left: 8%;
    width: 14px;
    height: 14px;
    background: rgba(244, 168, 184, 0.6);
    animation: float-gentle 5.8s ease-in-out infinite 180ms;
}

.hero__dot--four {
    bottom: 60px;
    right: 16%;
    width: 20px;
    height: 20px;
    background: rgba(247, 207, 95, 0.6);
    animation: float-gentle 6.6s ease-in-out infinite 640ms;
}

.hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 22px;
    text-align: center;
}

.hero__stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    max-width: 640px;
    animation: rise-in 900ms cubic-bezier(0.2, 0.65, 0.2, 1) both;
}

.hero__logo {
    width: min(100%, 460px);
    height: auto;
    filter: drop-shadow(0 18px 30px rgba(196, 148, 84, 0.28));
}

.hero__taiyo {
    position: absolute;
    right: -6%;
    bottom: -18px;
    width: min(34%, 168px);
    height: auto;
    filter: drop-shadow(0 12px 18px rgba(196, 148, 84, 0.24));
    animation: float-gentle 5.6s ease-in-out infinite 260ms;
}

.hero__headline {
    max-width: 720px;
    animation: rise-in 900ms cubic-bezier(0.2, 0.65, 0.2, 1) 70ms both;
}

.hero__title {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.3;
    color: var(--ink);
}

.hero__subtitle {
    max-width: 620px;
    margin: 14px auto 0;
    color: var(--ink-soft);
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.hero__copy {
    display: grid;
    justify-items: center;
    animation: rise-in 900ms cubic-bezier(0.2, 0.65, 0.2, 1) 140ms both;
}

.hero__actions,
.guardian__links,
.site-footer__links,
.doc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero__actions--main {
    justify-content: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 14px 22px;
    border-radius: 999px;
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.button--primary {
    color: #fff;
    background: linear-gradient(135deg, #df6c15, #c85c12);
    box-shadow: 0 16px 30px rgba(200, 92, 18, 0.32);
}

.button--secondary {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    color: var(--ink);
}

.button--store {
    background: #fff;
    border: 2px solid rgba(63, 74, 84, 0.14);
    box-shadow: var(--shadow);
    color: var(--ink);
}

.button--large {
    min-height: 72px;
    padding: 20px 30px;
    border-radius: 28px;
    font-size: 1.08rem;
    width: min(100%, 330px);
}

.hero__note {
    max-width: 420px;
    margin-top: 18px;
    color: var(--ink-soft);
    font-size: 0.98rem;
}

.hero__screenshots {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    margin-top: 18px;
    max-width: 100%;
    min-width: 0;
    animation: rise-in 900ms cubic-bezier(0.2, 0.65, 0.2, 1) 200ms both;
}

.hero-phone {
    position: relative;
    overflow: hidden;
    margin: 0;
    width: 168px;
    border: 8px solid rgba(255, 255, 255, 0.96);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

.hero-phone:nth-child(1) { transform: rotate(-3deg); }
.hero-phone:nth-child(2) { transform: rotate(1.5deg); margin-top: 14px; }
.hero-phone:nth-child(3) { transform: rotate(4deg); }

.hero-phone img {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
}

.hero-phone figcaption {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 20px);
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.72rem;
    line-height: 1.2;
}

/* ---------- Sections ---------- */

.section {
    padding: 84px 0;
}

.section--compact {
    padding-top: 34px;
}

.section__eyebrow,
.legal-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--accent-text);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section__eyebrow::before,
.legal-hero__eyebrow::before {
    content: '';
    width: 42px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--orange), var(--sun));
}

.section__title,
.legal-hero__title {
    margin: 0;
    line-height: 1.2;
}

.section__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(1.75rem, 3vw, 2.6rem);
}

.section__title-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex: 0 0 auto;
}

.section__lede,
.legal-hero__lead,
.doc-section__body,
.doc-meta__grid {
    color: var(--ink-soft);
}

.section__lede {
    max-width: 640px;
    margin-top: 18px;
}

.intro,
.guardian {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 30px;
    align-items: start;
}

.intro__aside,
.guardian__panel {
    padding: 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 250, 240, 0.72));
    box-shadow: var(--shadow);
}

.intro__list,
.guardian__list {
    display: grid;
    gap: 16px;
}

.intro__list li {
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.intro__list li:first-child {
    padding-top: 0;
    border-top: 0;
}

.intro__list strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
}

.play-lanes {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    margin-top: 34px;
}

.play-lane {
    padding: 20px 18px 18px;
    border-top: 4px solid transparent;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

.play-lane:hover {
    transform: translateY(-4px);
}

.play-lane:nth-child(1) { border-top-color: var(--orange); }
.play-lane:nth-child(2) { border-top-color: var(--sun); }
.play-lane:nth-child(3) { border-top-color: var(--mint); }
.play-lane:nth-child(4) { border-top-color: var(--sky); }
.play-lane:nth-child(5) { border-top-color: var(--pink); }

.play-lane h3,
.game-showcase__copy h3,
.guardian__summary h3,
.doc-note__title {
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
}

.play-lane p,
.game-showcase__copy p,
.guardian__summary p,
.guardian__meta,
.doc-note p {
    margin-top: 10px;
    color: var(--ink-soft);
}

.play-entry {
    position: relative;
}

.play-entry__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 238, 218, 0.6));
    box-shadow: var(--shadow-lg);
}

.play-entry__points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.play-entry__points span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.play-entry__points span::before {
    content: '';
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--orange), var(--sun));
}

.play-entry__actions {
    display: grid;
    gap: 12px;
    justify-items: stretch;
}

.play-entry__button {
    width: 100%;
    white-space: nowrap;
}

.game-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    margin-top: 34px;
}

.game-showcase__item {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 14px;
    padding: 22px 18px 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 236, 0.72));
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.game-showcase__item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.game-detail-index {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 34px;
}

.game-detail-index article {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.76);
}

.game-detail-index h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 1.02rem;
}

.game-detail-index p {
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.8;
}

.support-grid,
.guardian-faq {
    display: grid;
    gap: 16px;
}

.support-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 34px;
}

.support-grid article,
.guardian-faq article {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.76);
}

.support-grid h3,
.guardian-faq h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 1.02rem;
}

.support-grid p,
.guardian-faq p {
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.8;
}

.game-showcase__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff8ec, #ffe6c2);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.7);
}

.game-showcase__icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.game-showcase__icon--math {
    color: var(--accent-text);
    font-family: 'Mochiy Pop P One', 'Hiragino Sans', sans-serif;
    font-size: 1.12rem;
    background: linear-gradient(145deg, #fff3e6, #ffd9a8);
}

.game-showcase__icon--knowledge {
    color: #2f7a52;
    font-family: 'Mochiy Pop P One', 'Hiragino Sans', sans-serif;
    font-size: 1.5rem;
    background: linear-gradient(145deg, #f2fbf5, #cdeed9);
}

.game-showcase__icon--typing {
    color: #b23c6b;
    font-family: 'Mochiy Pop P One', 'Hiragino Sans', sans-serif;
    font-size: 1.5rem;
    background: linear-gradient(145deg, #fef1f4, #f9d3de);
}

.game-showcase__tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-bottom: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(243, 154, 77, 0.16);
    color: var(--accent-text);
    font-size: 0.78rem;
    font-weight: 700;
}

.game-showcase__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    width: 100%;
    margin-top: 2px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
    cursor: pointer;
    font: 700 0.9rem/1.3 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', sans-serif;
    letter-spacing: 0;
    transition: transform var(--transition), border-color var(--transition), background-color var(--transition);
}

.game-showcase__button:hover,
.game-showcase__button:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(232, 121, 42, 0.55);
    background: #fff;
}

.guardian {
    padding: 36px;
    border-radius: var(--radius-lg);
    background: var(--white-strong);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(190, 150, 90, 0.14);
}

.guardian__list li {
    position: relative;
    padding-left: 18px;
}

.guardian__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--orange), var(--sun));
}

.guardian-faq {
    margin-top: 22px;
}

.guardian-faq article {
    background: rgba(255, 250, 240, 0.7);
}

.guardian__meta {
    display: grid;
    gap: 6px;
    font-size: 0.96rem;
    overflow-wrap: anywhere;
}

.site-footer {
    padding: 28px 0 48px;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--ink-soft);
    font-size: 0.94rem;
}

.game-modal-open {
    overflow: hidden;
}

.game-modal[hidden] {
    display: none;
}

.game-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    overflow-x: hidden;
    padding: 20px;
}

.game-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(63, 74, 84, 0.46);
    backdrop-filter: blur(10px);
}

.game-modal__panel {
    position: fixed;
    top: 50%;
    left: 20px;
    right: 20px;
    left: max(20px, calc((100vw - 680px) / 2));
    right: max(20px, calc((100vw - 680px) / 2));
    transform: translateY(-50%);
    z-index: 1;
    width: auto;
    max-width: none;
    max-height: min(760px, calc(100svh - 40px));
    overflow: auto;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 249, 240, 0.96)),
        var(--bg-main);
    box-shadow: 0 26px 72px rgba(63, 74, 84, 0.28);
}

.game-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--ink);
    cursor: pointer;
    font: 700 0.86rem/1.2 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', sans-serif;
    letter-spacing: 0;
}

.game-modal__eyebrow {
    color: var(--accent-text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.game-modal__title {
    margin: 8px 78px 0 0;
    font-family: 'Mochiy Pop P One', 'Hiragino Sans', sans-serif;
    font-size: clamp(1.55rem, 4vw, 2.35rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.game-modal__content {
    display: grid;
    gap: 22px;
    margin-top: 18px;
}

.game-modal__lead {
    color: var(--ink-soft);
    font-size: 1.04rem;
    line-break: strict;
    overflow-wrap: anywhere;
    word-break: normal;
}

.game-detail-list {
    display: grid;
    gap: 14px;
}

.game-detail-list div {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.game-detail-list dt {
    color: var(--ink);
    font-weight: 700;
}

.game-detail-list dd {
    margin: 0;
    color: var(--ink-soft);
    line-break: strict;
    overflow-wrap: anywhere;
    word-break: normal;
}

.game-detail-screenshot {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.game-detail-screenshot img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.about-screenshot {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

.about-screenshot figure {
    margin: 0;
    max-width: 240px;
    text-align: center;
}

.about-screenshot img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.about-screenshot figcaption {
    margin-top: 10px;
    color: var(--ink-soft);
    font-size: 0.86rem;
}

/* ---------- Legal pages ---------- */

.page-legal {
    background:
        radial-gradient(circle at top left, rgba(247, 207, 95, 0.22), transparent 30%),
        linear-gradient(180deg, #fff9f0 0%, #fffdf8 100%);
}

.page-legal .site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 249, 240, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.legal-hero {
    padding: 48px 0 24px;
}

.legal-hero__content,
.paper {
    max-width: 860px;
}

.legal-hero__title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: var(--ink);
}

.legal-hero__lead {
    margin-top: 14px;
    max-width: 680px;
}

.paper {
    margin-bottom: 44px;
    padding: 32px clamp(22px, 3.4vw, 44px) 42px;
    border-radius: 28px;
    background: var(--white-strong);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.doc-meta {
    display: grid;
    gap: 10px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.doc-meta__grid {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 6px 18px;
}

.doc-section {
    padding-top: 30px;
}

.doc-section h2 {
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    line-height: 1.3;
    color: var(--ink);
}

.doc-section__body {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.doc-note {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    color: var(--ink-soft);
    transition: transform var(--transition), color var(--transition);
}

.back-link::before {
    content: '←';
}

.back-link:hover,
.back-link:focus-visible {
    transform: translateX(-2px);
    color: var(--ink);
}

/* ---------- Motion ---------- */

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float-gentle {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes drift-right {
    from { transform: translateX(0); }
    to { transform: translateX(120px); }
}

@keyframes drift-left {
    from { transform: translateX(0); }
    to { transform: translateX(-120px); }
}

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

    .hero__stage,
    .hero__headline,
    .hero__copy,
    .hero__screenshots,
    .hero__taiyo,
    .hero__cloud,
    .hero__dot,
    .play-lane,
    .game-showcase__item,
    .button,
    .site-nav a,
    .link-chip,
    .game-showcase__button,
    .back-link {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
    .intro,
    .guardian {
        grid-template-columns: 1fr;
    }

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

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

    .game-detail-index,
    .support-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .hero {
        padding-top: 116px;
        padding-bottom: 48px;
    }

    .hero__taiyo {
        right: 2px;
        bottom: -8px;
        width: min(24%, 96px);
    }

    .hero__screenshots {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .hero-phone {
        width: clamp(88px, 27vw, 120px);
        flex: 0 0 auto;
        border-width: 5px;
        border-radius: 22px;
    }

    .hero-phone:nth-child(2) {
        margin-top: 8px;
    }

    .hero-phone figcaption {
        bottom: 6px;
        padding: 4px 8px;
        font-size: 0.6rem;
    }

    .play-lanes,
    .game-showcase,
    .game-detail-index,
    .support-grid,
    .play-entry__inner {
        grid-template-columns: 1fr;
    }

    .play-entry__button {
        justify-self: stretch;
    }

    .play-entry__points {
        display: grid;
        grid-template-columns: 1fr;
    }

    .guardian {
        padding: 26px;
    }

    .doc-meta__grid {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .game-modal__panel {
        border-radius: 24px;
    }

    .game-detail-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 520px) {
    :root {
        --site-width: min(1120px, calc(100% - 24px));
    }

    .site-header__inner,
    .hero__inner {
        width: min(366px, calc(100vw - 24px));
        max-width: min(366px, calc(100vw - 24px));
    }

    .section__inner,
    .site-footer__inner {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
    }

    .site-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-home .site-header {
        position: relative;
    }

    .site-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 7px;
    }

    .site-nav a {
        min-width: 0;
        padding: 8px 4px;
        text-align: center;
        font-size: 0.86rem;
        white-space: nowrap;
    }

    .game-modal__panel {
        left: 16px;
        right: auto;
        width: min(320px, calc(100vw - 32px));
    }

    .hero {
        padding-top: 40px;
    }

    .hero__headline {
        width: 100%;
        max-width: calc(100vw - 48px);
    }

    .hero__title {
        font-size: 1.3rem;
    }

    .hero__subtitle {
        font-size: 1.02rem;
        line-height: 1.75;
        word-break: break-all;
    }

    .mobile-break {
        display: block;
    }

    .hero__actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .button,
    .link-chip {
        width: 100%;
    }

    .button--large {
        min-height: 66px;
        padding: 18px 20px;
        font-size: 1rem;
    }

    .section__title {
        gap: 8px;
    }

    .section__title-icon {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 380px) {
    .site-nav {
        gap: 6px;
    }

    .site-nav a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        font-size: 0.78rem;
        line-height: 1.35;
        white-space: normal;
    }

    .hero__subtitle {
        font-size: 0.92rem;
    }

    .hero__title {
        font-size: 1.16rem;
    }

    .link-chip {
        font-size: 0.82rem;
    }
}
