@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, #fffaf2 0%, #f7fff9 45%, #f4fbff 100%);
    --ink: #31424f;
    --ink-soft: #61717d;
    --line: rgba(90, 126, 147, 0.18);
    --white: rgba(255, 255, 255, 0.84);
    --white-strong: rgba(255, 255, 255, 0.92);
    --orange: #f39a4d;
    --blue: #79c6f5;
    --green: #7fcf97;
    --yellow: #f7d96d;
    --shadow: 0 24px 56px rgba(122, 150, 170, 0.16);
    --radius-lg: 34px;
    --radius-md: 24px;
    --radius-sm: 16px;
    --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(255, 227, 186, 0.45), transparent 30%),
        radial-gradient(circle at top right, rgba(151, 220, 255, 0.35), transparent 26%),
        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.64), transparent 16%),
        radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.5), transparent 14%),
        radial-gradient(circle at 74% 76%, rgba(255, 255, 255, 0.42), transparent 14%);
}

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

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

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

p,
ul,
ol {
    margin: 0;
}

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

:focus-visible {
    outline: 3px solid rgba(121, 198, 245, 0.82);
    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.16);
    font-size: 0.9rem;
}

.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.72);
    transform: translateY(-1px);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 100svh;
    padding: 112px 0 56px;
}

.hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
    gap: clamp(28px, 5vw, 58px);
    align-items: center;
    min-height: calc(100svh - 168px);
}

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

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

.hero__eyebrow::before,
.section__eyebrow::before,
.legal-hero__eyebrow::before {
    content: '';
    width: 42px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(243, 154, 77, 0.9), rgba(121, 198, 245, 0.9));
}

.hero__title {
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 4.6rem);
    line-height: 1.08;
}

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

.hero__subtitle {
    margin-top: 12px;
    font-size: clamp(1rem, 2vw, 1.26rem);
}

.hero__status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: #bc6f17;
    font-weight: 700;
}

.hero__status::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffbe6b, #f18c43);
    box-shadow: 0 0 0 6px rgba(241, 140, 67, 0.12);
}

.hero__lead {
    margin-top: 22px;
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
}

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

.hero__meta {
    margin-top: 24px;
}

.link-chip {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--line);
    font-size: 0.86rem;
}

.hero__actions {
    margin-top: 28px;
}

.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, #ffaf57, #f18c43);
    box-shadow: 0 18px 28px rgba(243, 154, 77, 0.22);
}

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

.hero__note {
    margin-top: 16px;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.hero__art {
    position: relative;
    min-height: 520px;
    animation: rise-in 980ms cubic-bezier(0.2, 0.65, 0.2, 1) 80ms both;
}

.hero__badge,
.hero__mascot-frame,
.game-showcase__item,
.guardian,
.paper {
    box-shadow: var(--shadow);
}

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

.hero__orb--one {
    top: 20px;
    right: 70px;
    width: 170px;
    height: 170px;
    background: rgba(127, 207, 151, 0.18);
}

.hero__orb--two {
    left: 18px;
    bottom: 50px;
    width: 230px;
    height: 230px;
    background: rgba(121, 198, 245, 0.18);
}

.hero__orb--three {
    right: 18px;
    bottom: 28px;
    width: 110px;
    height: 110px;
    background: rgba(247, 217, 109, 0.24);
}

.hero__mascot-frame {
    position: absolute;
    inset: 58px 42px 12px;
    border-radius: 42px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.76)),
        linear-gradient(135deg, rgba(234, 247, 255, 0.88), rgba(255, 240, 222, 0.88));
}

.hero__mascot-frame::before {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 30px;
    border: 1px dashed rgba(121, 198, 245, 0.24);
}

.hero__mascot {
    position: absolute;
    inset: auto 72px 18px;
    max-height: 400px;
    width: auto;
    margin: 0 auto;
    animation: float-gentle 5.8s ease-in-out infinite;
}

.hero__badge {
    position: absolute;
    display: grid;
    gap: 8px;
    justify-items: center;
    width: 118px;
    padding: 14px 12px 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.84);
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--ink-soft);
}

.hero__badge img,
.game-showcase__icon img {
    object-fit: contain;
}

.hero__badge img {
    width: 58px;
    height: 58px;
}

.hero__badge--one {
    top: 18px;
    left: 8px;
    animation: float-gentle 6.2s ease-in-out infinite;
}

.hero__badge--two {
    top: 42px;
    right: 0;
    animation: float-gentle 5.2s ease-in-out infinite 500ms;
}

.hero__badge--three {
    left: -10px;
    bottom: 110px;
    animation: float-gentle 6.8s ease-in-out infinite 220ms;
}

.hero__badge--four {
    right: 8px;
    bottom: 138px;
    animation: float-gentle 5.8s ease-in-out infinite 900ms;
}

.hero__badge--five {
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    animation: float-gentle-center 6.5s ease-in-out infinite 340ms;
}

.section {
    padding: 84px 0;
}

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

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

.section__title {
    font-size: clamp(1.75rem, 3vw, 2.6rem);
}

.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.82), rgba(255, 255, 255, 0.66));
}

.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;
}

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

.play-lane {
    padding-top: 18px;
    border-top: 4px solid transparent;
}

.play-lane:nth-child(1) { border-top-color: var(--orange); }
.play-lane:nth-child(2) { border-top-color: var(--blue); }
.play-lane:nth-child(3) { border-top-color: var(--green); }
.play-lane:nth-child(4) { border-top-color: var(--yellow); }

.play-lane h3,
.game-showcase__copy h3,
.guardian__summary h3,
.doc-note__title {
    margin: 0;
    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);
}

.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: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.66));
}

.game-showcase__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 229, 0.78));
}

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

.game-showcase__icon--math {
    color: #bc6f17;
    font-family: 'Mochiy Pop P One', 'Hiragino Sans', sans-serif;
    font-size: 1.12rem;
}

.game-showcase__tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-bottom: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(121, 198, 245, 0.16);
    color: var(--ink-soft);
    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 rgba(90, 126, 147, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    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(243, 154, 77, 0.55);
    background: rgba(255, 249, 239, 0.92);
}

.guardian {
    padding: 34px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.74)),
        linear-gradient(135deg, rgba(255, 240, 222, 0.62), rgba(234, 247, 255, 0.56));
}

.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), #f6b568);
}

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

.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(49, 66, 79, 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.72);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 252, 246, 0.94)),
        var(--bg-main);
    box-shadow: 0 26px 72px rgba(49, 66, 79, 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 rgba(90, 126, 147, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    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(--ink-soft);
    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;
}

.page-legal {
    background:
        radial-gradient(circle at top left, rgba(255, 240, 222, 0.48), transparent 28%),
        linear-gradient(180deg, #fffaf2 0%, #f7fcff 100%);
}

.page-legal .site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 250, 242, 0.72);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(90, 126, 147, 0.1);
}

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

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

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

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

.paper {
    margin-bottom: 44px;
    padding: 32px clamp(22px, 3.4vw, 44px) 42px;
    border-radius: 34px;
    background: var(--white-strong);
}

.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;
}

.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);
}

@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 float-gentle-center {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

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

@media (max-width: 980px) {
    .hero {
        min-height: auto;
    }

    .hero__inner,
    .intro,
    .guardian {
        grid-template-columns: 1fr;
    }

    .hero__art {
        max-width: 520px;
        width: 100%;
        margin: 0 auto;
    }

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

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

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

    .hero__art {
        min-height: 390px;
    }

    .hero__mascot-frame {
        inset: 48px 28px 14px;
    }

    .hero__mascot {
        inset: auto 44px 18px;
        max-height: 300px;
    }

    .hero__badge {
        width: 98px;
        padding: 12px 10px 10px;
        font-size: 0.74rem;
    }

    .hero__badge img {
        width: 48px;
        height: 48px;
    }

    .play-lanes,
    .game-showcase {
        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(100% - 24px, 1120px);
    }

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

    .site-nav {
        width: 100%;
        gap: 8px;
    }

    .site-nav a {
        padding: 9px 11px;
    }

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

    .hero {
        padding-top: 154px;
    }

    .hero__meta,
    .hero__actions,
    .guardian__links,
    .site-footer__links {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .hero__art {
        min-height: 360px;
    }

    .hero__badge--one {
        left: 0;
    }

    .hero__badge--two {
        right: 0;
    }

    .hero__badge--three {
        left: 6px;
        bottom: 106px;
    }

    .hero__badge--four {
        right: 4px;
        bottom: 122px;
    }
}
