/* ===================================================
   ぽぽりん 公式サイト — testver "POPORIN" design
   完全独立デザイン (kasaneteto.jp 参考)
   =================================================== */

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== DESIGN TOKENS ===== */
:root {
    --p-blue:      #2d6bc4;
    --p-blue-dk:   #1f52a0;
    --p-blue-lt:   #e8f0fd;
    --p-orange:    #f0a030;
    --p-orange-dk: #c8841a;
    --p-orange-lt: #fff3e0;
    --p-green:     #1e9b6b;
    --p-green-lt:  #e6f7f0;
    --p-red:       #d63b3b;
    --p-red-lt:    #fde8e8;
    --p-bg:        #f5f8ff;
    --p-surface:   #ffffff;
    --p-text:      #0d1526;
    --p-muted:     #6272a0;
    --p-grad:      linear-gradient(90deg, var(--p-blue), var(--p-orange));
    --p-grad-diag: linear-gradient(135deg, var(--p-blue), var(--p-orange));
    --nav-h:       64px;
    --font-en:     'Barlow Condensed', sans-serif;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }

body {
    font-family: 'M PLUS 1p', sans-serif;
    background: var(--p-bg);
    color: var(--p-text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===================================================
   NAVIGATION — 数字付き水平バー
   =================================================== */
.kv-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: rgba(255, 255, 255, 0.96);
    z-index: 1000;
    transition: background 0.35s, box-shadow 0.35s;
}

/* グラデーションの細線（下端） */
.kv-nav::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--p-grad);
    opacity: 0.5;
    transition: opacity 0.35s;
}

.kv-nav.scrolled {
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 24px rgba(13, 21, 38, 0.08);
}

.kv-nav.scrolled::after { opacity: 1; }

/* ロゴ */
.kv-nav__logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--p-text);
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.kv-nav__logo:hover { opacity: 0.65; }

/* リンクリスト */
.kv-nav__links {
    display: flex;
    list-style: none;
    gap: 0;
}

/* 個別リンク */
.kv-nav__item {
    display: flex;
    align-items: center;
    gap: 5px;
    height: var(--nav-h);
    padding: 0 10px;
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--p-muted);
    text-decoration: none;
    position: relative;
    transition: color 0.25s;
}

.kv-nav__item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10px; right: 10px;
    height: 2px;
    background: var(--p-blue);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 2px 2px 0 0;
}

.kv-nav__item:hover { color: var(--p-blue); }
.kv-nav__item.active { color: var(--p-blue); font-weight: 800; }
.kv-nav__item.active::after { transform: scaleX(1); }

/* 数字 */
.kv-nav__num {
    font-family: var(--font-en);
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--p-blue);
    opacity: 0.3;
    letter-spacing: 0.05em;
    transition: opacity 0.25s;
}

.kv-nav__item.active .kv-nav__num,
.kv-nav__item:hover  .kv-nav__num { opacity: 0.8; }

/* ハンバーガー */
.kv-nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.kv-nav__hamburger:hover { background: var(--p-blue-lt); }

.kv-nav__hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--p-text);
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s;
}

/* ===================================================
   FULLSCREEN MOBILE MENU
   =================================================== */
.fullscreen-menu {
    position: fixed;
    inset: 0;
    background: var(--p-surface);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.fullscreen-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.fullscreen-menu::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--p-grad);
}

.fullscreen-menu__close {
    position: absolute;
    top: 18px; right: 24px;
    width: 44px; height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    gap: 0;
}

.fullscreen-menu__close span {
    display: block;
    width: 24px; height: 2px;
    background: var(--p-text);
    border-radius: 2px;
}

.fullscreen-menu__close span:nth-child(1) { transform: rotate(45deg)  translateY(1px); }
.fullscreen-menu__close span:nth-child(2) { transform: rotate(-45deg) translateY(-1px); }

.fullscreen-menu__logo {
    position: absolute;
    top: 20px; left: 24px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--p-text);
}

.fullscreen-menu__nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fmenu-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
    text-decoration: none;
    transition: opacity 0.2s;
}

.fmenu-link:hover { opacity: 0.55; }

.fmenu-num {
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--p-blue);
    opacity: 0.45;
    width: 26px;
    letter-spacing: 0.08em;
}

.fmenu-label {
    font-size: 2rem;
    font-weight: 800;
    color: var(--p-text);
    transition: background 0.2s;
}

.fmenu-link.active .fmenu-label {
    background: var(--p-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================================
   PAGE SYSTEM
   =================================================== */
main { padding-top: var(--nav-h); }

.scene {
    display: none;
    min-height: calc(100vh - var(--nav-h));
    min-height: calc(100dvh - var(--nav-h));
}

.scene.active {
    display: block;
    animation: sceneIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.scene.scene-exit {
    display: block;
    animation: sceneOut 0.18s ease forwards;
    pointer-events: none;
}

@keyframes sceneIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes sceneOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* ===================================================
   APPEAR ANIMATIONS (JS driven)
   =================================================== */
.appear-up {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity  0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.appear-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================
   HOME / KEY VISUAL
   =================================================== */
.scene-kv { background: var(--p-surface); }

.kv {
    position: relative;
    min-height: calc(100vh - var(--nav-h));
    min-height: calc(100dvh - var(--nav-h));
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* 対角スプリット背景 */
.kv__split {
    position: absolute;
    inset: 0;
    background: var(--p-blue-lt);
    clip-path: polygon(0 0, 58% 0, 44% 100%, 0 100%);
    pointer-events: none;
}

/* POPORIN ウォーターマーク */
.kv__watermark {
    font-family: var(--font-en);
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16vw;
    font-weight: 800;
    color: rgba(45, 107, 196, 0.04);
    letter-spacing: -0.04em;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

/* コピーテキスト（左） */
.kv__copy {
    position: relative;
    z-index: 2;
    padding: 60px 0 60px 72px;
    width: 46%;
    flex-shrink: 0;
}

.kv__copy-sub {
    font-family: var(--font-en);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.32em;
    color: var(--p-blue);
    margin-bottom: 14px;
    opacity: 0;
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.kv__copy-rule {
    width: 44px;
    height: 3px;
    background: var(--p-grad);
    border-radius: 2px;
    margin-bottom: 20px;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    animation: ruleExpand 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
}

.kv__copy-title {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.05;
    color: var(--p-text);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.kv__copy-tag {
    font-family: var(--font-en);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    color: var(--p-muted);
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}

/* アウトラインボタン（ホバーで塗りつぶし） */
.kv-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border: 2px solid var(--p-blue);
    color: var(--p-blue);
    font-weight: 800;
    font-size: 0.88rem;
    text-decoration: none;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: color 0.35s;
    opacity: 0;
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

.kv-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--p-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
}

.kv-btn > * { position: relative; z-index: 1; }
.kv-btn:hover { color: white; }
.kv-btn:hover::before { transform: scaleX(1); }

.kv-btn svg {
    transition: transform 0.28s;
}
.kv-btn:hover svg { transform: translateX(4px); }

/* キャラクター画像 */
.kv__char {
    position: absolute;
    right: 3%;
    bottom: 0;
    height: 94%;
    display: flex;
    align-items: flex-end;
    z-index: 1;
    opacity: 0;
    animation: charIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.kv__char-float {
    height: 100%;
    display: flex;
    align-items: flex-end;
    animation: charFloat 6.5s ease-in-out 1.1s infinite;
}

.kv__char img {
    height: 100%;
    max-height: 86vh;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 24px 56px rgba(45, 107, 196, 0.22));
}

/* スクロールインジケーター */
.kv__scroll {
    position: absolute;
    bottom: 36px;
    left: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
    opacity: 0;
    animation: fadeUp 0.6s ease 1.0s forwards;
}

.kv__scroll-text {
    font-family: var(--font-en);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    color: var(--p-muted);
}

.kv__scroll-line {
    width: 1px;
    height: 52px;
    background: linear-gradient(to bottom, transparent 0%, var(--p-blue) 40%, var(--p-blue) 60%, transparent 100%);
    animation: scrollDown 2.2s ease-in-out 1.2s infinite;
}

/* KVアニメーション keyframes */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes ruleExpand {
    to { opacity: 1; transform: scaleX(1); }
}

@keyframes charIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes charFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-18px); }
}

@keyframes scrollDown {
    0%   { transform: translateY(-40%); opacity: 0; }
    25%  { opacity: 1; }
    75%  { opacity: 1; }
    100% { transform: translateY(40%); opacity: 0; }
}

/* ===================================================
   HOME SCROLL SECTIONS
   =================================================== */
.home-sections {
    background: var(--p-bg);
    border-top: 1px solid rgba(45, 107, 196, 0.08);
}

.home-section {
    display: flex;
    align-items: center;
    gap: 48px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 64px 72px;
    border-bottom: 1px solid rgba(45, 107, 196, 0.07);
}

.home-section--alt {
    flex-direction: row-reverse;
    background: var(--p-surface);
    border-bottom: none;
}

/* 番号装飾 */
.home-section__label-col {
    flex-shrink: 0;
    width: 80px;
    display: flex;
    justify-content: center;
}

.home-section__num {
    font-family: var(--font-en);
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(45, 107, 196, 0.10);
    letter-spacing: -0.03em;
    user-select: none;
}

.home-section--alt .home-section__num {
    color: rgba(240, 160, 48, 0.14);
}

/* 本文 */
.home-section__body {
    flex: 1;
}

.home-section__en {
    font-family: var(--font-en);
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    color: var(--p-blue);
    margin-bottom: 8px;
}

.home-section--alt .home-section__en {
    color: var(--p-orange-dk);
}

.home-section__title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--p-text);
    margin-bottom: 14px;
}

.home-section__rule {
    width: 36px;
    height: 3px;
    background: var(--p-grad);
    border-radius: 2px;
    margin-bottom: 16px;
}

.home-section__text {
    font-size: 0.92rem;
    color: var(--p-muted);
    line-height: 1.85;
}

/* アイコン */
.home-section__icon {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    color: var(--p-blue);
    opacity: 0.22;
}

.home-section--alt .home-section__icon {
    color: var(--p-orange);
    opacity: 0.28;
}

/* スクロール reveal（IntersectionObserver で .revealed を付与） */
.scroll-reveal {
    opacity: 0;
    transform: translateY(36px);
    transition:
        opacity  0.72s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================
   ABOUT — Chapter レイアウト
   =================================================== */
.scene-about {
    background: var(--p-bg);
    padding: 60px 0 80px;
}

.chapters {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.chapter {
    display: flex;
    min-height: 230px;
}

.chapter-sep {
    height: 1px;
    background: var(--p-grad);
    opacity: 0.12;
}

.chapter__body {
    flex: 1;
    padding: 48px 64px;
    background: var(--p-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

/* 斜めの装飾パネル */
.chapter__accent {
    width: 200px;
    flex-shrink: 0;
    background: var(--p-blue-lt);
    clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
    position: relative;
    overflow: hidden;
}

.chapter__accent--orange {
    background: var(--p-orange-lt);
    clip-path: polygon(0 0, 78% 0, 100% 100%, 0 100%);
}

/* 大きな番号装飾 */
.chapter__accent-num {
    font-family: var(--font-en);
    position: absolute;
    bottom: 8px; right: 12px;
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(45, 107, 196, 0.12);
    pointer-events: none;
    user-select: none;
}

.chapter__accent--orange .chapter__accent-num {
    color: rgba(240, 160, 48, 0.2);
    right: auto; left: 10px;
}

/* 画像入りアクセントパネル共通 */
.chapter__accent--img {
    width: 280px;
    clip-path: none;
    overflow: hidden;
}

/* 左三角オーバーレイ（Chapter 1・3） */
.chapter__accent--img::after {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(0 0, 22% 0, 0 100%);
    background: rgba(232, 240, 253, 0.95);
    z-index: 2;
    pointer-events: none;
}

/* 右三角オーバーレイ（Chapter 2） */
.chapter__accent--orange.chapter__accent--img::after {
    clip-path: polygon(78% 0, 100% 0, 100% 100%);
    background: rgba(232, 240, 253, 0.95);
}

.chapter__accent-img {
    position: absolute;
    bottom: 0;
    right: -8px;
    height: 115%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(-6px 0 18px rgba(45, 107, 196, 0.14));
    pointer-events: none;
    z-index: 1;
}

/* orange（flip）の画像は左側に配置 */
.chapter__accent--orange .chapter__accent-img {
    right: auto;
    left: -8px;
    filter: drop-shadow(6px 0 18px rgba(240, 160, 48, 0.18));
}

/* ロゴ画像: 全体が収まるよう中央配置 */
.chapter__accent--logo {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--p-blue-lt);
}

.chapter__accent--logo .chapter__accent-img {
    position: relative;
    z-index: 1;
    width: 115%;
    height: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(45, 107, 196, 0.16));
}

/* Flip: アクセントを左・本文を右に */
.chapter--flip .chapter__body   { order: 2; }
.chapter--flip .chapter__accent { order: 1; }

/* Chapter 内テキスト */
.chapter__label {
    font-family: var(--font-en);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    color: var(--p-blue);
    display: block;
}

.chapter--flip .chapter__label { color: var(--p-orange); }

.chapter__title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--p-text);
}

.chapter__rule {
    width: 36px;
    height: 3px;
    background: var(--p-grad);
    border-radius: 2px;
}

.chapter__text {
    font-size: 0.94rem;
    color: var(--p-muted);
    line-height: 1.9;
}

/* ===================================================
   EMPTY PAGES (グッズ・ダウンロード)
   =================================================== */
.scene-empty {
    background: var(--p-bg);
    align-items: center;
    justify-content: center;
}

.scene-empty.active { display: flex; }

.empty {
    text-align: center;
    position: relative;
    padding: 60px 40px;
}

.empty__watermark {
    font-family: var(--font-en);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(4rem, 18vw, 14rem);
    font-weight: 800;
    color: rgba(45, 107, 196, 0.03);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    letter-spacing: 0.06em;
}

.empty__svg {
    width: 80px; height: 80px;
    color: var(--p-blue);
    opacity: 0.35;
    margin: 0 auto 24px;
    display: block;
}

.empty__en {
    font-family: var(--font-en);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: var(--p-blue);
    display: block;
    margin-bottom: 12px;
}

.empty__title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--p-text);
    margin-bottom: 16px;
}

.empty__rule {
    width: 44px; height: 3px;
    background: var(--p-grad);
    border-radius: 2px;
    margin: 0 auto 20px;
}

.empty__sub {
    font-size: 1rem;
    color: var(--p-muted);
    font-weight: 700;
}

/* ===================================================
   DOWNLOAD PAGE
   =================================================== */
.scene-download {
    background: var(--p-bg);
    padding: 64px 40px 80px;
}

.scene-download.active { display: block; }

.dl-page-wrap {
    max-width: 960px;
    margin: 0 auto;
}

.dl-page-note {
    font-size: 0.9rem;
    color: var(--p-muted);
    margin-bottom: 40px;
}

.dl-page-note__link {
    color: var(--p-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dl-voice-wait {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 24px;
    background: var(--p-surface);
    border-radius: 16px;
    border: 1.5px dashed rgba(45, 107, 196, 0.25);
    margin-bottom: 48px;
    text-align: center;
}

.dl-voice-wait__icon {
    color: var(--p-blue);
    opacity: 0.5;
    width: 48px;
    height: 48px;
}

.dl-voice-wait__icon svg {
    width: 100%;
    height: 100%;
}

.dl-voice-wait__title {
    font-family: var(--font-en);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--p-blue);
}

.dl-voice-wait__text {
    font-size: 0.92rem;
    color: var(--p-muted);
    line-height: 1.8;
}

.dl-section-sep {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(45, 107, 196, 0.2) 20%, rgba(240, 160, 48, 0.2) 80%, transparent);
    margin-bottom: 48px;
}

.dl-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.dl-card {
    background: var(--p-surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(45, 107, 196, 0.08);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.dl-card:hover {
    box-shadow: 0 6px 24px rgba(45, 107, 196, 0.16);
    transform: translateY(-3px);
}

.dl-card__thumb {
    height: 200px;
    background: var(--p-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.dl-card__thumb--logo {
    background: #eef3fb;
}

.dl-card__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 16px;
}

.dl-card__body {
    padding: 20px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.dl-card__label {
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--p-blue);
    opacity: 0.7;
}

.dl-card__name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--p-text);
}

.dl-card__desc {
    font-size: 0.82rem;
    color: var(--p-muted);
    margin-bottom: 10px;
}

.dl-card .dl-btn {
    margin-top: auto;
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
    padding: 10px 16px;
}

/* ===================================================
   SCENE HEADER（利用規約・ガイドライン共通）
   =================================================== */
.scene-header { margin-bottom: 28px; }

.scene-header__en {
    font-family: var(--font-en);
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: var(--p-blue);
    margin-bottom: 8px;
}

.scene-header__title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--p-text);
    margin-bottom: 16px;
}

.scene-header__rule {
    width: 44px; height: 3px;
    background: var(--p-grad);
    border-radius: 2px;
}

/* ===================================================
   TERMS & GUIDELINES
   =================================================== */
.scene-terms,
.scene-guidelines {
    background: var(--p-bg);
    padding: 64px 40px 80px;
}

.terms-wrap,
.gl-wrap {
    max-width: 880px;
    margin: 0 auto;
}

.terms-lead {
    font-size: 0.9rem;
    color: var(--p-muted);
    line-height: 1.85;
    margin-bottom: 32px;
}

/* タブ UI */
.rule-tabs {
    background: var(--p-surface);
    border-radius: 18px;
    box-shadow: 0 4px 28px rgba(13, 21, 38, 0.08);
    overflow: hidden;
    margin-bottom: 40px;
}

.rule-tabs__header {
    display: flex;
    position: relative;
    border-bottom: 1px solid rgba(13, 21, 38, 0.06);
}

.rule-tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 22px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'M PLUS 1p', sans-serif;
    font-weight: 700;
    color: var(--p-muted);
    transition: color 0.25s, background 0.25s;
    position: relative;
}

.rule-tab-btn:hover {
    background: var(--p-bg);
}

.rule-tab-btn.active[data-tab="ok"]   { color: var(--p-green); }
.rule-tab-btn.active[data-tab="ng"]   { color: var(--p-red); }
.rule-tab-btn.active[data-tab="note"] { color: var(--p-orange); }

.rule-tab-btn__sym {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
}

.rule-tab-btn__label {
    font-size: 0.76rem;
}

/* スライドするカラーバー */
.rule-tabs__bar {
    position: absolute;
    bottom: 0; left: 0;
    width: 33.333%;
    height: 3px;
    background: var(--p-green);
    border-radius: 3px 3px 0 0;
    transition:
        left       0.38s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.28s;
}

.rule-tabs__header[data-active="ok"]   .rule-tabs__bar { left: 0;        background: var(--p-green); }
.rule-tabs__header[data-active="ng"]   .rule-tabs__bar { left: 33.333%;  background: var(--p-red); }
.rule-tabs__header[data-active="note"] .rule-tabs__bar { left: 66.667%;  background: var(--p-orange); }

/* タブパネル */
.rule-tab-panel {
    display: none;
    padding: 32px 40px;
}

.rule-tab-panel.active {
    display: block;
    animation: panelIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rule-tab-panel ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rule-tab-panel li {
    font-size: 0.9rem;
    color: var(--p-muted);
    padding: 14px 20px 14px 48px;
    background: var(--p-bg);
    border-radius: 10px;
    position: relative;
    line-height: 1.65;
    transition: background 0.2s;
}

.rule-tab-panel li:hover { background: #edf2fb; }

.rule-tab-panel li::before {
    content: '—';
    position: absolute;
    left: 18px;
    color: var(--p-blue);
    font-weight: 700;
}

/* タブごとのマーカー色 */
.rule-tab-panel[data-panel="ng"]   li::before { color: var(--p-red); }
.rule-tab-panel[data-panel="note"] li::before { color: var(--p-orange); }

/* ダウンロードボタン */
.dl-wrap {
    text-align: center;
    margin-top: 8px;
}

.dl-lead {
    font-size: 0.9rem;
    color: var(--p-muted);
    margin-bottom: 20px;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 44px;
    border: 2px solid var(--p-blue);
    color: var(--p-blue);
    background: transparent;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    transition: color 0.35s;
}

.dl-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--p-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}
.dl-btn:hover { color: white; }
.dl-btn:hover::before { transform: scaleX(1); }

.dl-btn__icon {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.dl-btn:hover .dl-btn__icon { transform: translateY(3px); }

/* ガイドライン詳細カード — エディトリアルスタイル */
.gl-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* gap ではなく背景色でグリッド線を表現 */
    gap: 2px;
    margin-top: 24px;
    background: rgba(45, 107, 196, 0.10);
    overflow: hidden;
}

.gl-card {
    background: var(--p-surface);
    padding: 36px 32px;
    position: relative;
    overflow: hidden;
    /* shadow・radius なし — 平面的でシャープ */
    transition: background 0.35s;
}

.gl-card:hover         { background: #f6f9ff; }
.gl-card--orange:hover { background: #fffcf4; }

/* ホバーで上から伸びるアクセントライン */
.gl-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--p-blue);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.gl-card--orange::before  { background: var(--p-orange); }
.gl-card:hover::before    { transform: scaleY(1); }

/* タイトル: ダッシュ前置き＋大文字スタイル */
.gl-card__title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    color: var(--p-blue);
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gl-card__title::before {
    content: '';
    flex-shrink: 0;
    width: 22px;
    height: 2px;
    background: currentColor;
}

.gl-card--orange .gl-card__title { color: var(--p-orange-dk); }

.gl-card p,
.gl-card li {
    font-size: 0.875rem;
    color: var(--p-muted);
    line-height: 1.85;
}

.gl-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.gl-card li {
    padding-left: 16px;
    position: relative;
}

.gl-card li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--p-blue);
    font-weight: 700;
}

.gl-card--orange li::before { color: var(--p-orange-dk); }

/* R18 注記 */
.gl-card__r18 {
    margin-top: 20px;
    padding-top: 16px;
    padding-left: 16px;
    border-top: 1px solid rgba(13, 21, 38, 0.06);
    font-size: 0.81rem;
    color: var(--p-muted);
    line-height: 1.8;
    position: relative;
    font-style: italic;
}

.gl-card__r18::before {
    content: '※';
    position: absolute;
    left: 0;
    color: var(--p-red);
    font-style: normal;
    font-weight: 700;
}

/* ===================================================
   CONTACT
   =================================================== */
.scene-contact {
    background: var(--p-bg);
    padding: 72px 40px 80px;
}

.contact-block {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

/* 背景装飾円 */
.contact-block__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.contact-block__orb--blue {
    width: 420px; height: 420px;
    background: rgba(45, 107, 196, 0.10);
    top: -100px; right: -100px;
}

.contact-block__orb--orange {
    width: 300px; height: 300px;
    background: rgba(240, 160, 48, 0.10);
    bottom: -80px; left: -80px;
}

.contact-block__inner {
    position: relative;
    z-index: 1;
}

.contact-block__en {
    font-family: var(--font-en);
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: var(--p-blue);
    margin-bottom: 8px;
}

.contact-block__title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--p-text);
    margin-bottom: 16px;
}

.contact-block__rule {
    width: 44px; height: 3px;
    background: var(--p-grad);
    border-radius: 2px;
    margin-bottom: 20px;
}

.contact-block__lead {
    font-size: 0.92rem;
    color: var(--p-muted);
    margin-bottom: 48px;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 横長リンクブロック（左からグラデーション塗りつぶし） */
.contact-link {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 84px;
    padding: 0 32px;
    background: var(--p-surface);
    border: 1.5px solid rgba(45, 107, 196, 0.14);
    border-radius: 12px;
    text-decoration: none;
    color: var(--p-text);
    position: relative;
    overflow: hidden;
    transition: border-color 0.35s, box-shadow 0.35s;
}

.contact-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--p-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
}

.contact-link:hover {
    border-color: transparent;
    box-shadow: 0 8px 32px rgba(45, 107, 196, 0.22);
}

.contact-link:hover::before { transform: scaleX(1); }

.contact-link > * {
    position: relative;
    z-index: 1;
}

.contact-link__icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: var(--p-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.35s;
}

.contact-link:hover .contact-link__icon { background: rgba(255, 255, 255, 0.22); }

.contact-link__icon svg {
    width: 22px; height: 22px;
    color: var(--p-blue);
    transition: color 0.35s;
}

.contact-link:hover .contact-link__icon svg { color: white; }

.contact-link__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.contact-link__label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--p-blue);
    text-transform: uppercase;
    transition: color 0.35s;
}

.contact-link:hover .contact-link__label { color: rgba(255, 255, 255, 0.75); }

.contact-link__value {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--p-text);
    transition: color 0.35s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-link:hover .contact-link__value { color: white; }

.contact-link__arrow {
    font-size: 1.3rem;
    color: var(--p-muted);
    transition: transform 0.32s, color 0.35s;
}

.contact-link:hover .contact-link__arrow {
    transform: translateX(6px);
    color: white;
}

/* ===================================================
   FOOTER
   =================================================== */
.kv-footer {
    background: var(--p-surface);
    border-top: 1px solid rgba(13, 21, 38, 0.06);
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.kv-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--p-grad);
}

.kv-footer__logo {
    font-size: 1rem;
    font-weight: 800;
    background: var(--p-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kv-footer__copy {
    font-size: 0.78rem;
    color: var(--p-muted);
    font-weight: 700;
}

/* ===================================================
   SWIPE HINT（モバイル・ホームのみ）
   =================================================== */
.kv__swipe-hint {
    display: none; /* デスクトップ非表示 */
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 1024px) {
    .kv__copy { padding-left: 48px; }
    .kv__char { right: 1%; }
}

@media (max-width: 840px) {
    .kv__copy { width: 55%; padding-left: 36px; }
    .kv__char { height: 80%; }
    .kv__copy-title { font-size: 3.8rem; }
}

@media (max-width: 768px) {
    :root { --nav-h: 58px; }

    /* === NAV === */
    .kv-nav__links { display: none; }
    .kv-nav__hamburger { display: flex; }
    .kv-nav { padding: 0 20px; }

    /* === KV === */
    .kv {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 0;
    }

    .kv__split {
        clip-path: polygon(0 0, 100% 0, 100% 38%, 0 52%);
    }

    .kv__watermark { display: none; }

    /* キャラクター: 上部に大きく */
    .kv__char {
        position: relative;
        right: auto; bottom: auto;
        height: auto;
        width: 100%;
        justify-content: center;
        order: 1;
        padding: 16px 0 0;
    }

    .kv__char-float { animation: none; }

    .kv__char img {
        max-height: 60vw;
        width: auto;
        filter: drop-shadow(0 20px 44px rgba(45, 107, 196, 0.30));
    }

    /* コピー: キャラの下 */
    .kv__copy {
        width: 100%;
        padding: 24px 28px 36px;
        order: 2;
    }

    .kv__copy-title { font-size: 2.8rem; }
    .kv__scroll { display: flex; left: 20px; bottom: 20px; }

    /* スワイプヒント */
    .kv__swipe-hint {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        position: absolute;
        right: 18px;
        bottom: 36px;
        z-index: 3;
        padding: 10px 12px 10px 10px;
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(45, 107, 196, 0.18);
        border-radius: 12px;
        color: var(--p-blue);
        opacity: 0;
        animation: swipeHintIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 2.0s forwards;
    }

    .kv__swipe-hint-arrows {
        display: flex;
        gap: -2px;
    }

    .kv__swipe-hint-arrows svg:nth-child(1) {
        opacity: 0.35;
        animation: swipeChevron 1.3s ease-in-out 2.5s infinite;
    }

    .kv__swipe-hint-arrows svg:nth-child(2) {
        animation: swipeChevron 1.3s ease-in-out 2.7s infinite;
    }

    .kv__swipe-hint-text {
        font-family: var(--font-en);
        font-size: 0.55rem;
        font-weight: 800;
        letter-spacing: 0.22em;
        color: var(--p-muted);
    }

    @keyframes swipeHintIn {
        from { opacity: 0; transform: translateX(10px); }
        to   { opacity: 1; transform: translateX(0); }
    }

    @keyframes swipeChevron {
        0%, 100% { transform: translateX(0);    opacity: 0.6; }
        50%       { transform: translateX(-5px); opacity: 1; }
    }

    /* === HOME SCROLL SECTIONS === */
    .home-section,
    .home-section--alt {
        flex-direction: column;
        padding: 40px 24px;
        gap: 20px;
        text-align: center;
    }
    .home-section--alt { flex-direction: column; }
    .home-section__label-col { width: auto; }
    .home-section__num { font-size: 3.5rem; }
    .home-section__rule { margin-left: auto; margin-right: auto; }
    .home-section__icon { width: 64px; height: 64px; }

    /* === ABOUT CHAPTERS — カード型レイアウト === */
    .scene-about { padding: 28px 16px 60px; }

    .chapters { gap: 16px; }
    .chapter-sep { display: none; }

    /* 各章をカード化 */
    .chapter {
        flex-direction: column;
        min-height: auto;
        border-radius: 18px;
        overflow: hidden;
        background: var(--p-surface);
        box-shadow: 0 3px 20px rgba(13, 21, 38, 0.07);
    }
    .chapter--flip .chapter__body   { order: 0; }
    .chapter--flip .chapter__accent { order: 1; }

    /* アクセント → カラーヘッダー帯 */
    .chapter__accent {
        width: 100%;
        height: 64px;
        clip-path: none;
        background: var(--p-blue-lt);
        opacity: 1;
        overflow: hidden;
        position: relative;
        display: flex;
        align-items: center;
        padding: 0 20px;
    }
    .chapter__accent--orange {
        clip-path: none;
        background: var(--p-orange-lt);
    }

    /* ゴースト数字を復活（カードヘッダー内に） */
    .chapter__accent-num {
        display: block;
        font-size: 5rem;
        line-height: 1;
        color: rgba(45, 107, 196, 0.13);
        position: absolute;
        right: 10px;
        bottom: -10px;
        transform: none;
        top: auto;
    }
    .chapter__accent--orange .chapter__accent-num {
        color: rgba(240, 160, 48, 0.22);
        left: auto;
        right: 10px;
    }

    /* ボディ: ボーダーなし・シンプルに */
    .chapter__body {
        padding: 24px 24px 32px;
        border-left: none;
        background: var(--p-surface);
    }
    .chapter--flip .chapter__body { border-left-color: transparent; }

    /* グラデーション上線（カード天面） */
    .chapter::before {
        content: '';
        display: block;
        height: 3px;
        background: var(--p-grad);
        flex-shrink: 0;
    }
    .chapter--flip::before {
        background: linear-gradient(90deg, var(--p-orange), var(--p-blue));
    }

    /* 画像入りアクセントパネル (chapter 1) */
    .chapter__accent--img {
        width: 100%;
        height: 220px;
        background: var(--p-blue-lt);
        opacity: 1;
        overflow: hidden;
        display: flex;
        align-items: flex-end;
        justify-content: center;
    }
    .chapter__accent-img {
        height: 105%;
        width: auto;
        position: relative;
        right: auto;
        left: auto;
        bottom: auto;
        transform: none;
        filter: drop-shadow(0 -6px 24px rgba(45, 107, 196, 0.16));
    }

    .chapter__accent--orange .chapter__accent-img {
        filter: drop-shadow(0 -6px 24px rgba(240, 160, 48, 0.18));
        left: auto;
    }

    .chapter__accent--logo .chapter__accent-img {
        position: relative;
        height: auto;
        width: 60%;
        max-height: 75%;
        top: auto; right: auto; bottom: auto; left: auto;
        transform: none;
    }

    /* === DOWNLOAD === */
    .scene-download { padding: 40px 20px 56px; }
    .dl-card-grid { grid-template-columns: 1fr; gap: 16px; }
    .dl-card__thumb { height: 180px; }

    /* === TERMS & GUIDELINES === */
    .scene-terms, .scene-guidelines { padding: 40px 20px 56px; }
    .rule-tab-btn__label { font-size: 0.7rem; }
    .rule-tab-panel { padding: 24px 20px; }
    .gl-details { grid-template-columns: 1fr; }

    /* === CONTACT === */
    .scene-contact { padding: 48px 20px 64px; overflow: hidden; }
    .contact-block__orb--blue   { width: 200px; height: 200px; top: -60px; right: -60px; }
    .contact-block__orb--orange { width: 160px; height: 160px; bottom: -50px; left: -50px; }
    .contact-link { height: auto; min-height: 72px; padding: 16px 20px; gap: 14px; }
    .contact-link__icon { width: 36px; height: 36px; flex-shrink: 0; }
    .contact-link__icon svg { width: 18px; height: 18px; }
    .contact-link__value { font-size: 0.82rem; }
    .contact-block__title { font-size: 2.2rem; }

    /* === FOOTER === */
    .kv-footer { padding: 16px 20px; flex-direction: column; gap: 6px; text-align: center; }
}

@media (max-width: 480px) {
    .kv__char img { max-height: 64vw; }
    .kv__copy { padding: 20px 20px 28px; }
    .kv__copy-title { font-size: 2.3rem; }
    .kv__copy-sub,
    .kv__copy-tag { letter-spacing: 0.18em; }

    .scene-about { padding: 20px 12px 52px; }
    .chapters { gap: 12px; }
    .chapter__body { padding: 20px 20px 28px; }
    .chapter__title { font-size: 1.6rem; }
    .chapter__accent { height: 56px; }
    .chapter__accent--img { height: 180px; }

    .scene-header__title { font-size: 1.9rem; }
    .scene-download { padding: 32px 16px 48px; }
    .dl-card__thumb { height: 160px; }
    .scene-terms, .scene-guidelines { padding: 32px 16px 48px; }
    .scene-contact { padding: 40px 16px 52px; }
    .contact-block__title { font-size: 1.9rem; }
    .rule-tab-btn { padding: 16px 8px; }
    .rule-tab-btn__sym { font-size: 1.5rem; }
    .home-section__title { font-size: 1.7rem; }
    .home-section, .home-section--alt { padding: 32px 20px; }
}
