@layer reset, tokens, base, layout, themes, components, responsive, motion;

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

    html {
        scroll-behavior: smooth;
        scroll-padding-top: 86px;
    }

    body,
    h1,
    h2,
    h3,
    h4,
    p,
    figure,
    dl,
    dd,
    ol,
    ul {
        margin: 0;
    }

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

    img,
    picture,
    svg {
        display: block;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    button,
    input,
    textarea,
    select {
        font: inherit;
    }
}

@layer tokens {
    :root {
        --night-950: #040810;
        --night-900: #07101d;
        --night-850: #0a1524;
        --night-800: #0d1a2b;
        --night-700: #142438;
        
        /* 統一カラーパレット */
        --gold: #d4af37;
        --gold-light: #f1dfa0;
        --gold-faint: rgba(212, 175, 55, 0.1);
        --sage: #8fa997;
        --line-green: #06c755;
        
        --font-serif: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
        --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
        
        --content: 1180px;
        --reading: 720px;
        --header-height: 74px;
        --shadow-soft: 0 16px 48px rgba(0, 0, 0, 0.28);
        --ease: cubic-bezier(0.22, 1, 0.36, 1);

        /* Default Dark Theme Variables */
        --bg-color: #07101d;
        --ink: #f7f3e8;         /* 1段階: 大見出し・最明 */
        --ink-soft: #d7d4cb;    /* 2段階: 通常本文・中明 */
        --ink-muted: #8e9cae;   /* 3段階: 補足・注記・暗 */
        --line: rgba(212, 175, 55, 0.22);
        --line-soft: rgba(255, 255, 255, 0.08);
        
        /* カード階層定義 */
        --card-bg: #0d1a2b;          /* 通常カード */
        --card-bg-raised: #142438;   /* 強調カード */
        --card-bg-flat: #07101d;     /* 同色フラット */
        --accent-gold: #f1dfa0;
        --accent-glow: rgba(212, 175, 55, 0.02);
    }
}

@layer themes {
    /* 交互の背景リズムと自動配色切り替え */
    .theme-dark {
        --bg-color: #07101d;
        --ink: #f7f3e8;
        --ink-soft: #d7d4cb;
        --ink-muted: #8e9cae;
        --line: rgba(212, 175, 55, 0.22);
        --line-soft: rgba(255, 255, 255, 0.08);
        --card-bg: #0d1a2b;
        --card-bg-raised: #142438;
        --card-bg-flat: #07101d;
        --accent-gold: #f1dfa0;
        --accent-glow: rgba(212, 175, 55, 0.02);
    }

    .theme-light {
        --bg-color: #f9f6f0;
        --ink: #1c2430;
        --ink-soft: #374354;
        --ink-muted: #647385;
        --line: rgba(191, 161, 57, 0.18);
        --line-soft: rgba(0, 0, 0, 0.06);
        --card-bg: #ffffff;
        --card-bg-raised: #f3ede2;
        --card-bg-flat: #f9f6f0;
        --accent-gold: #ab8e2c;
        --accent-glow: rgba(171, 142, 44, 0.02);
    }

    .theme-beige {
        --bg-color: #f3ede2;
        --ink: #1c2430;
        --ink-soft: #374354;
        --ink-muted: #647385;
        --line: rgba(191, 161, 57, 0.2);
        --line-soft: rgba(0, 0, 0, 0.06);
        --card-bg: #ffffff;
        --card-bg-raised: #e9e2d5;
        --card-bg-flat: #f3ede2;
        --accent-gold: #ab8e2c;
        --accent-glow: rgba(171, 142, 44, 0.02);
    }

    .theme-gray {
        --bg-color: #eceff3;
        --ink: #1c2430;
        --ink-soft: #374354;
        --ink-muted: #647385;
        --line: rgba(191, 161, 57, 0.16);
        --line-soft: rgba(0, 0, 0, 0.06);
        --card-bg: #ffffff;
        --card-bg-raised: #dfe4ec;
        --card-bg-flat: #eceff3;
        --accent-gold: #ab8e2c;
        --accent-glow: rgba(171, 142, 44, 0.02);
    }
}

@layer base {
    body {
        min-width: 320px;
        color: var(--ink-soft);
        background: var(--bg-color);
        font-family: var(--font-sans);
        font-size: 16px;
        line-height: 1.85;
        overflow-x: hidden;
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
        transition: background-color 0.4s ease, color 0.4s ease;
    }

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

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

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

    ::selection {
        color: #000;
        background: var(--gold-light);
    }

    h1,
    h2,
    h3,
    h4 {
        font-family: var(--font-serif);
        font-weight: 500;
        line-height: 1.45;
        letter-spacing: 0.02em;
        color: var(--ink);
    }

    .skip-link {
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1000;
        padding: 10px 16px;
        color: var(--night-950);
        background: var(--gold-light);
        border-radius: 4px;
        transform: translateY(-160%);
        transition: transform 0.2s ease;
    }

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

@layer layout {
    .section-inner,
    .header-inner,
    .hero-inner,
    .footer-inner {
        width: min(calc(100% - 48px), var(--content));
        margin-inline: auto;
    }

    /* 余白の再調整（大テーマ間のゆったりとした余白） */
    .section {
        position: relative;
        padding: clamp(96px, 8vw, 140px) 0;
        background-color: var(--bg-color);
        border-bottom: 1px solid var(--line);
    }

    #madam {
        scroll-margin-top: calc(var(--header-height) + 16px);
    }

    .section-heading {
        max-width: var(--reading);
        margin-bottom: 52px;
    }

    .section-label {
        color: var(--gold);
        font-family: var(--font-serif);
        font-size: 0.8rem;
        letter-spacing: 0.18em;
    }

    .section-title {
        margin-top: 10px;
        color: var(--accent-gold);
        font-size: clamp(1.85rem, 3.2vw, 2.5rem);
        text-wrap: balance;
        line-break: strict;
    }

    .section-heading > p:last-child {
        margin-top: 18px;
        color: var(--ink-soft);
        font-size: 1rem;
    }

    .section-lead {
        color: var(--ink) !important;
        font-family: var(--font-serif);
        font-size: 1.15rem !important;
    }

    .section-divider {
        border: 0;
        height: 1px;
        background: var(--line);
        margin-block: 64px;
    }
}

@layer components {
    /* Header */
    .site-header {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 100;
        height: var(--header-height);
        background: rgba(4, 8, 16, 0.78);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    }

    .site-header.is-scrolled {
        background: rgba(4, 8, 16, 0.94);
        border-color: var(--line);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    }

    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 100%;
    }

    .brand {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .brand-copy {
        display: flex;
        flex-direction: column;
    }

    .brand-name {
        color: var(--gold-light);
        font-family: var(--font-serif);
        font-size: 0.95rem;
        letter-spacing: 0.08em;
    }

    .brand-place {
        color: var(--ink-muted);
        font-size: 0.72rem;
        letter-spacing: 0.08em;
    }

    .site-navigation {
        display: flex;
        align-items: center;
        gap: 28px;
    }

    .navigation-list {
        display: flex;
        align-items: center;
        gap: 22px;
    }

    .navigation-list a {
        display: inline-flex;
        align-items: center;
        padding: 6px 0;
        color: var(--ink-soft);
        font-size: 0.88rem;
        letter-spacing: 0.04em;
        transition: color 0.25s ease;
    }

    .navigation-list a:hover,
    .navigation-list a[aria-current='true'] {
        color: var(--gold-light);
    }

    .header-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        padding: 0 18px;
        color: var(--gold-light);
        background: var(--gold-faint);
        border: 1px solid var(--line);
        border-radius: 4px;
        font-size: 0.84rem;
        font-weight: 500;
        transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    }

    .header-cta:hover {
        color: var(--night-950);
        background: var(--gold-light);
        border-color: var(--gold-light);
    }

    .menu-toggle {
        display: none;
        width: 44px;
        height: 44px;
        padding: 0;
        background: transparent;
        border: 0;
        cursor: pointer;
        position: relative;
    }

    .menu-toggle span {
        position: absolute;
        left: 10px;
        width: 24px;
        height: 1px;
        background: var(--gold-light);
        transition: transform 0.3s var(--ease), opacity 0.2s ease, top 0.3s var(--ease);
    }

    .menu-toggle span:nth-child(1) { top: 16px; }
    .menu-toggle span:nth-child(2) { top: 21px; }
    .menu-toggle span:nth-child(3) { top: 26px; }

    .menu-toggle[aria-expanded='true'] span:nth-child(1) {
        top: 21px;
        transform: rotate(45deg);
    }

    .menu-toggle[aria-expanded='true'] span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded='true'] span:nth-child(3) {
        top: 21px;
        transform: rotate(-45deg);
    }

    /* Buttons */
    .button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 52px;
        padding: 0 28px;
        border-radius: 4px;
        font-size: 0.94rem;
        font-weight: 500;
        line-height: 1;
        cursor: pointer;
        transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
    }

    .button-line {
        color: #fff !important;
        background: #06b94f;
        border: 1px solid #06b94f;
    }

    .button-line:hover {
        background: #05a646;
        border-color: #05a646;
        transform: translateY(-1px);
    }

    .button-x {
        color: var(--ink);
        background: var(--card-bg);
        border: 1px solid var(--line);
    }

    .button-x:hover {
        color: var(--accent-gold);
        border-color: var(--accent-gold);
        transform: translateY(-1px);
    }

    .button-quiet {
        color: var(--ink-soft);
        background: transparent;
        border: 1px solid var(--line-soft);
    }

    .button-quiet:hover {
        color: var(--accent-gold);
        border-color: var(--line);
    }

    .button-large {
        min-height: 56px;
        padding: 0 34px;
        font-size: 1rem;
    }

    .button-medium {
        min-height: 46px;
        padding: 0 22px;
        font-size: 0.88rem;
    }

    /* Hero */
    .luna-hero {
        position: relative;
        width: 100%;
        min-height: clamp(720px, calc(100svh - 72px), 1080px);
        display: flex;
        align-items: center;
        padding-top: var(--header-height);
        overflow: hidden;
        isolation: isolate;
    }

    .hero-media {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
    }

    .luna-hero-image {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
        object-position: 72% center;
        z-index: 0;
        filter: brightness(0.82) contrast(1.04) saturate(0.95);
    }

    .luna-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background:
            radial-gradient(
                circle at 78% 45%,
                rgba(218, 185, 125, 0.08) 0%,
                rgba(218, 185, 125, 0.02) 30%,
                transparent 55%
            ),
            linear-gradient(
                90deg,
                rgba(5, 8, 17, 0.94) 0%,
                rgba(5, 8, 17, 0.82) 40%,
                rgba(5, 8, 17, 0.50) 72%,
                rgba(5, 8, 17, 0.38) 100%
            ),
            linear-gradient(
                180deg,
                rgba(5, 8, 17, 0.25) 0%,
                rgba(5, 8, 17, 0.78) 100%
            );
    }

    .luna-hero-content {
        position: relative;
        z-index: 2;
        padding-block: 72px 84px;
    }

    .hero-copy {
        max-width: 650px;
    }

    .eyebrow {
        color: var(--gold);
        font-family: var(--font-serif);
        font-size: 0.82rem;
        letter-spacing: 0.22em;
        margin-bottom: 12px;
    }

    .hero-brand-name {
        color: var(--gold-light);
        font-size: 1rem;
        font-family: var(--font-sans);
        letter-spacing: 0.08em;
        margin-bottom: 18px;
    }

    /* ヒーロータイトルの折り返し自然化 */
    .hero-title {
        font-size: clamp(2.2rem, 4.4vw, 3.25rem);
        margin-bottom: 24px;
        text-wrap: balance;
        line-break: strict;
        overflow-wrap: normal;
    }

    .title-unit {
        display: inline-block;
    }

    .hero-title .title-unit:nth-child(2) {
        color: var(--gold-light);
    }

    .hero-lead {
        font-size: 1.05rem;
        line-height: 1.85;
        margin-bottom: 36px;
        color: var(--ink-soft);
    }

    .hero-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        align-items: center;
    }

    .line-prompt-hero {
        margin-top: 18px;
        color: var(--gold-light);
        font-size: 0.86rem;
        line-height: 1.6;
        opacity: 0.95;
    }

    /* Assurance */
    .assurance {
        background: #02050a;
        border-bottom: 1px solid var(--line);
    }

    .assurance-inner {
        width: min(calc(100% - 48px), var(--content));
        margin-inline: auto;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
        padding: 24px 0;
    }

    .assurance-inner p {
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--ink-soft);
        font-size: 0.92rem;
    }

    .assurance-inner span {
        color: var(--gold);
        font-family: var(--font-serif);
        font-size: 0.82rem;
        letter-spacing: 0.08em;
    }

    /* 3-Step Flow Diagram (LUNAとは) */
    .step-flow {
        display: grid;
        grid-template-columns: 1fr auto 1fr auto 1fr;
        gap: 12px;
        align-items: center;
        margin: 40px 0 52px;
    }

    .step-card {
        padding: 36px 28px;
        background: var(--card-bg);
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.02);
        position: relative;
        text-align: center;
        transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
    }

    .step-card:hover {
        transform: translateY(-3px);
        border-color: var(--accent-gold);
    }

    .step-icon-svg {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--accent-gold);
        opacity: 0.9;
        margin-bottom: 14px;
    }

    .step-num-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: var(--accent-gold);
        color: var(--bg-color);
        font-family: var(--font-serif);
        font-weight: 600;
        font-size: 0.84rem;
        border-radius: 50%;
        margin-bottom: 12px;
    }

    .step-card h3 {
        color: var(--ink);
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .step-card p {
        color: var(--ink-soft);
        font-size: 0.88rem;
        line-height: 1.65;
    }

    .step-connector {
        color: var(--accent-gold);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0.45;
    }

    .about-footer-visual {
        max-width: 900px;
        margin: 0 auto;
    }

    .about-visual picture,
    .about-visual img {
        width: 100%;
        border-radius: 4px;
        box-shadow: var(--shadow-soft);
    }

    .about-visual figcaption {
        margin-top: 12px;
        color: var(--ink-muted);
        font-size: 0.78rem;
        text-align: right;
    }

    /* Madam Section */
    .madam-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
        gap: 64px;
        align-items: center;
    }

    .madam-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 12px;
        margin: 20px 0 24px;
    }

    .madam-tag {
        display: inline-block;
        padding: 4px 12px;
        border: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.03);
        border-radius: 20px;
        font-size: 0.78rem;
        color: var(--gold-light);
    }

    .theme-light .madam-tag {
        background: rgba(0, 0, 0, 0.02);
        color: var(--accent-gold);
    }

    .madam-intro-highlight {
        font-size: 1.1rem;
        line-height: 1.9;
        font-family: var(--font-serif);
        color: var(--gold-light);
        padding-left: 18px;
        border-left: 2px solid var(--gold);
        margin: 24px 0 28px;
    }

    .theme-light .madam-intro-highlight {
        color: var(--accent-gold);
    }

    .madam-copy p + p {
        margin-top: 16px;
        color: var(--ink-soft);
    }

    .madam-copy .en-name {
        font-family: var(--font-serif);
        font-size: 0.95rem;
        color: var(--sage);
        margin-left: 12px;
    }

    /* Details Accordion Styles (ネイティブ開閉) */
    .luna-details {
        border-block: 1px solid var(--line-soft);
        margin-block: 28px 20px;
        padding: 8px 0;
    }

    .luna-details summary {
        cursor: pointer;
        padding: 12px 0;
        font-family: var(--font-serif);
        color: var(--accent-gold);
        font-size: 0.94rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .luna-details summary::after {
        content: '';
        display: inline-block;
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid currentColor;
        transition: transform 0.25s ease;
    }

    .luna-details[open] summary::after {
        transform: rotate(180deg);
    }

    .details-content {
        padding-block: 12px 20px;
    }

    .name-judgement {
        margin-top: 24px;
        padding: 16px 20px;
        background: var(--accent-glow);
        border: 1px dashed var(--line);
        border-radius: 6px;
    }

    .judgement-label {
        display: block;
        font-size: 0.78rem;
        color: var(--gold);
        font-family: var(--font-serif);
        margin-bottom: 6px;
    }

    .name-judgement p {
        font-size: 0.88rem !important;
        line-height: 1.7 !important;
        margin-top: 0 !important;
    }

    .madam-visual {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
    }

    .madam-visual-box {
        position: relative;
        width: 100%;
        max-width: 360px;
        padding: 56px 36px;
        background: rgba(13, 26, 43, 0.45);
        border: 1px solid var(--line);
        border-radius: 8px;
        text-align: center;
        box-shadow: var(--shadow-soft);
    }

    .madam-visual-box::before {
        content: '';
        position: absolute;
        inset: 12px;
        border: 1px dashed var(--line-soft);
        border-radius: 6px;
        pointer-events: none;
    }

    .luna-crescent-svg {
        color: var(--gold);
        display: inline-flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .visual-quote {
        color: var(--gold-light);
        font-family: var(--font-serif);
        font-size: 1.15rem;
        line-height: 1.8;
        letter-spacing: 0.05em;
    }

    .visual-deco {
        display: block;
        margin-top: 28px;
        font-family: var(--font-serif);
        font-size: 0.8rem;
        color: var(--ink-muted);
        letter-spacing: 0.2em;
        text-transform: uppercase;
    }

    /* 6 Icon Topic Cards (相談テーマ) */
    .topic-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
        margin-top: 40px;
    }

    .topic-card-new {
        display: flex;
        flex-direction: column;
        padding: 32px 28px;
        background: var(--card-bg);
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.02);
        transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
    }

    .topic-card-new:hover {
        border-color: var(--accent-gold);
        transform: translateY(-3px);
    }

    .topic-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
    }

    .topic-icon-svg {
        display: inline-flex;
        color: var(--accent-gold);
        opacity: 0.85;
    }

    .topic-card-new h3 {
        color: var(--ink);
        font-size: 1.15rem;
        margin: 0;
    }

    .topic-desc {
        color: var(--ink-soft);
        font-size: 0.88rem;
        line-height: 1.6;
        margin-bottom: 12px;
        flex-grow: 1;
    }

    .topic-details {
        border-top: 1px dashed var(--line-soft);
        margin-top: auto;
        padding-top: 10px;
    }

    .topic-details summary {
        cursor: pointer;
        font-size: 0.8rem;
        color: var(--accent-gold);
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .topic-details summary::after {
        content: '+';
        font-size: 0.8rem;
        margin-left: auto;
    }

    .topic-details[open] summary::after {
        content: '-';
    }

    .topic-expanded {
        margin-top: 8px;
        font-size: 0.82rem;
        line-height: 1.6;
        color: var(--ink-muted);
    }

    /* Before/After Visualization Grid */
    .comparison-grid {
        display: grid;
        grid-template-columns: minmax(0, 0.9fr) auto minmax(0, 1.15fr);
        gap: 24px;
        align-items: center;
        margin-top: 48px;
    }

    .comp-badge {
        display: inline-block;
        padding: 5px 14px;
        border-radius: 20px;
        font-size: 0.76rem;
        font-weight: 600;
        letter-spacing: 0.05em;
        margin-bottom: 16px;
    }

    .badge-before {
        color: var(--ink-soft);
        background: rgba(0, 0, 0, 0.05);
        border: 1px solid var(--line);
    }

    .badge-after {
        color: #fff;
        background: #ab8e2c;
    }

    /* Beforeのモヤモヤした吹き出し強調 */
    .speech-bubble-before-new {
        position: relative;
        padding: 32px;
        background: rgba(255, 255, 255, 0.82);
        border: 1.5px dashed var(--line);
        border-radius: 12px;
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.02);
    }

    .speech-bubble-before-new .quote-title {
        color: #ab8e2c;
        font-size: 1.05rem;
        margin-bottom: 10px;
        font-family: var(--font-serif);
    }

    .speech-bubble-before-new .quote-body {
        color: #2d3748;
        font-size: 0.9rem;
        line-height: 1.8;
    }

    .bubble-pin-svg {
        position: absolute;
        top: -12px;
        left: 24px;
        color: #ab8e2c;
    }

    .comp-flow-arrow {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        color: var(--accent-gold);
    }

    .arrow-line {
        width: 1px;
        height: 64px;
        background: var(--line);
    }

    .arrow-text {
        font-family: var(--font-serif);
        font-size: 0.82rem;
        white-space: nowrap;
        writing-mode: vertical-rl;
        letter-spacing: 0.1em;
    }

    .arrow-icon-holder {
        display: inline-flex;
        transform: rotate(90deg);
    }

    /* Afterの6小カード化 */
    .after-grid-container {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .after-card {
        background: #ffffff;
        border: 1px solid rgba(171, 142, 44, 0.35);
        border-radius: 6px;
        padding: 20px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
        transition: border-color 0.25s ease;
    }

    .after-card:hover {
        border-color: #ab8e2c;
    }

    .after-card-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        border-bottom: 1px solid rgba(171, 142, 44, 0.15);
        padding-bottom: 6px;
    }

    .card-icon {
        display: inline-flex;
        color: #ab8e2c;
    }

    .after-card h4 {
        font-size: 0.88rem;
        color: #1a202c;
        margin: 0;
        font-family: var(--font-serif);
        font-weight: 600;
    }

    .after-card p {
        color: #374354;
        font-size: 0.82rem;
        line-height: 1.6;
    }

    /* 注意書きの統合スタイル */
    .sample-disclaimer-box {
        margin-top: 36px;
        padding: 20px 24px;
        background: var(--card-bg-raised);
        border-left: 2.5px solid var(--accent-gold);
        border-radius: 0 6px 6px 0;
        display: flex;
        align-items: start;
        gap: 16px;
    }

    .disclaimer-icon {
        color: var(--accent-gold);
        flex-shrink: 0;
        margin-top: 2px;
    }

    .sample-disclaimer-box p {
        color: var(--ink-soft);
        font-size: 0.82rem;
        line-height: 1.7;
    }

    .memo-box-new {
        margin-top: 48px;
        padding: 36px;
        background: var(--card-bg);
        border: 1px solid var(--line);
        border-radius: 8px;
    }

    .memo-box-new h3 {
        color: var(--ink);
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .memo-box-new p {
        color: var(--ink-soft);
        font-size: 0.9rem;
        line-height: 1.75;
        margin-bottom: 18px;
    }

    .prep-details summary {
        cursor: pointer;
        color: var(--accent-gold);
        font-size: 0.86rem;
        font-family: var(--font-serif);
    }

    .prep-expanded {
        margin-top: 18px;
        padding-top: 18px;
        border-top: 1px dashed var(--line-soft);
    }

    .prep-expanded ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 24px;
        padding-left: 20px;
        list-style-type: disc;
    }

    .prep-expanded li {
        color: var(--ink-soft);
        font-size: 0.84rem;
        line-height: 1.6;
    }

    /* A/B 再編構造 */
    #system-group {
        display: flex;
        flex-direction: column;
    }

    .block-subtitle {
        max-width: var(--reading);
        margin-bottom: 32px;
    }

    .block-subtitle h3 {
        font-size: 1.25rem;
        color: var(--accent-gold);
        margin-bottom: 10px;
    }

    .block-subtitle p {
        color: var(--ink-soft);
        font-size: 0.94rem;
        line-height: 1.7;
    }

    /* AI Support Section */
    .ai-principles {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
        margin-top: 24px;
    }

    .principle-card {
        padding: 32px 24px;
        background: var(--card-bg);
        border: 1px solid var(--line);
        border-radius: 8px;
        transition: transform 0.3s var(--ease);
    }

    .principle-card:hover {
        transform: translateY(-2px);
    }

    .p-num-svg {
        display: inline-flex;
        color: var(--gold);
        margin-bottom: 14px;
    }

    .principle-card h3 {
        color: var(--accent-gold);
        font-size: 1.05rem;
        margin-bottom: 12px;
    }

    .principle-card p {
        color: var(--ink-soft);
        font-size: 0.84rem;
        line-height: 1.65;
    }

    .ai-warning {
        margin-top: 24px;
        color: var(--ink-muted);
        font-size: 0.8rem;
    }

    /* Promises section (安心の約束) */
    .promises-block {
        margin-top: 24px;
    }

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

    .promise-highlight-card {
        padding: 24px 20px;
        background: var(--card-bg);
        border: 1px solid var(--line);
        border-radius: 6px;
    }

    .ph-num-svg {
        display: inline-flex;
        color: var(--gold);
        margin-bottom: 12px;
    }

    .promise-highlight-card h4 {
        color: var(--ink);
        font-size: 0.96rem;
        margin-bottom: 8px;
    }

    .promise-highlight-card p {
        color: var(--ink-soft);
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .promises-details {
        margin-top: 28px;
        border-block: 1px solid var(--line-soft);
        padding: 8px 0;
    }

    .promises-details summary {
        cursor: pointer;
        padding: 12px 0;
        font-family: var(--font-serif);
        color: var(--accent-gold);
        font-size: 0.9rem;
    }

    .promises-expanded {
        padding: 14px 20px 20px;
    }

    .promises-expanded ol {
        list-style-type: decimal;
        padding-left: 20px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 24px;
    }

    .promises-expanded li {
        color: var(--ink-soft);
        font-size: 0.84rem;
        line-height: 1.6;
    }

    .emergency-note-new {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        margin-top: 32px;
        padding: 16px 20px;
        border-left: 2.5px solid var(--sage);
        background: rgba(255, 255, 255, 0.02);
    }

    .note-icon-svg {
        color: var(--gold-light);
        flex-shrink: 0;
        margin-top: 2px;
    }

    .emergency-note-new p {
        color: var(--ink-soft);
        font-size: 0.82rem;
        line-height: 1.65;
    }

    /* Scope block (専門家との境界) */
    .scope-block {
        margin-top: 56px;
    }

    .scope-compare-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
        margin-top: 24px;
    }

    .compare-card {
        padding: 32px;
        border-radius: 8px;
        background: var(--card-bg);
        border: 1px solid var(--line);
    }

    .compare-luna {
        border-color: var(--accent-gold);
        background: linear-gradient(180deg, var(--card-bg), rgba(212, 175, 55, 0.02));
    }

    .compare-card h4 {
        font-size: 1.1rem;
        margin-bottom: 20px;
        color: var(--accent-gold);
    }

    .compare-card ul {
        list-style-type: disc;
        padding-left: 20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .compare-card li {
        font-size: 0.88rem;
        color: var(--ink-soft);
        line-height: 1.6;
    }

    .scope-details {
        margin-top: 24px;
        border-block: 1px solid var(--line-soft);
        padding: 8px 0;
    }

    .scope-details summary {
        cursor: pointer;
        padding: 12px 0;
        font-family: var(--font-serif);
        color: var(--accent-gold);
        font-size: 0.9rem;
    }

    .scope-expanded {
        padding: 12px 20px;
    }

    .scope-expanded p {
        font-size: 0.84rem;
        line-height: 1.7;
        color: var(--ink-soft);
    }

    /* Small Gatherings (女性向けの小さな交流) */
    .activity-restructure {
        margin-top: 32px;
    }

    .activity-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 12px;
        margin-bottom: 24px;
        justify-content: center;
    }

    .activity-tag {
        display: inline-block;
        padding: 6px 16px;
        background: var(--card-bg);
        border: 1px solid var(--line);
        border-radius: 20px;
        font-size: 0.84rem;
        font-weight: 500;
        color: var(--accent-gold);
    }

    .activity-intro-text {
        max-width: var(--reading);
        margin: 0 auto;
        text-align: center;
    }

    .activity-intro-text p {
        font-size: 0.94rem;
        line-height: 1.8;
        color: var(--ink-soft);
    }

    .activity-intro-text p + p {
        margin-top: 14px;
    }

    .activity-notice {
        font-size: 0.82rem !important;
        color: var(--ink-muted) !important;
    }

    /* 3 SNS Role Cards */
    .sns-grid-new {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
        margin-top: 40px;
    }

    .sns-card-new {
        display: flex;
        flex-direction: column;
        padding: 36px 28px;
        background: var(--card-bg);
        border: 1px solid var(--line);
        border-radius: 8px;
        position: relative;
    }

    .sns-card-new.highlight-card {
        border-color: var(--gold);
        background: linear-gradient(180deg, var(--card-bg), rgba(212, 175, 55, 0.04));
    }

    .sns-card-new.private-card {
        background: rgba(13, 26, 43, 0.02);
        border-color: var(--line-soft);
    }

    .sns-badge-new {
        align-self: flex-start;
        display: inline-block;
        padding: 4px 10px;
        background: rgba(212, 175, 55, 0.08);
        color: var(--gold-light);
        border: 1px solid rgba(212, 175, 55, 0.15);
        border-radius: 4px;
        font-size: 0.72rem;
        font-weight: 500;
        letter-spacing: 0.05em;
        margin-bottom: 20px;
    }

    .sns-badge-new.private-badge-new {
        background: rgba(0, 0, 0, 0.03);
        color: var(--ink-muted);
        border-color: var(--line-soft);
    }

    .sns-card-new h3 {
        color: var(--ink);
        font-size: 1.25rem;
        font-family: var(--font-serif);
        margin-bottom: 12px;
    }

    .sns-card-new p {
        color: var(--ink-soft);
        font-size: 0.88rem;
        line-height: 1.7;
        margin-bottom: 18px;
        flex-grow: 1;
    }

    .sns-detail-new {
        font-size: 0.8rem !important;
        color: var(--ink-muted) !important;
        margin-top: auto;
        padding-top: 14px;
        border-top: 1px dashed var(--line-soft);
    }

    .sns-card-new .button {
        width: 100%;
        margin-top: 16px;
    }

    .private-status-badge {
        width: 100%;
        padding: 10px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px dashed var(--line-soft);
        border-radius: 6px;
        color: var(--ink-muted);
        font-size: 0.8rem;
        font-family: var(--font-serif);
        text-align: center;
        letter-spacing: 0.05em;
        margin-top: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .inline-svg {
        display: inline-flex;
    }

    /* Contact Layer */
    .contact {
        position: relative;
        min-height: 740px;
        display: grid;
        place-items: center;
        padding: 100px 28px;
        overflow: hidden;
        isolation: isolate;
        border-bottom: 1px solid var(--line);
    }

    .contact-media,
    .contact-media img,
    .contact-shade {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: -2;
    }

    .contact-media img {
        object-fit: cover;
        object-position: center;
    }

    .contact-shade {
        background: rgba(4, 8, 16, 0.88);
        backdrop-filter: blur(13px);
        -webkit-backdrop-filter: blur(13px);
    }

    .contact-inner {
        max-width: var(--reading);
        text-align: center;
    }

    .contact h2 {
        margin-top: 12px;
        color: var(--gold-light);
        font-size: 2.7rem;
    }

    .contact-phrases {
        margin-top: 24px;
        color: var(--ink);
        font-family: var(--font-serif);
        font-size: 1.1rem;
        line-height: 1.9;
    }

    .contact-sublead {
        margin-top: 10px;
        color: var(--ink-soft);
        font-size: 0.94rem;
    }

    .msg-example-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 28px 0 20px;
    }

    .msg-example-card {
        padding: 14px 18px;
        background: rgba(7, 16, 29, 0.9);
        border: 1px solid var(--line);
        border-radius: 6px;
        color: var(--gold-light);
        font-size: 0.88rem;
        text-align: center;
        transition: border-color 0.25s ease;
    }

    .msg-example-card:hover {
        border-color: var(--gold-light);
    }

    .msg-example-note {
        color: var(--ink-muted);
        font-size: 0.82rem;
        margin-bottom: 24px;
    }

    .contact-actions {
        display: flex;
        justify-content: center;
        margin-top: 24px;
    }

    .contact-x-area {
        margin-top: 16px;
    }

    .contact-x-link {
        font-size: 0.88rem;
        color: var(--ink-muted);
        text-decoration: underline;
        transition: color 0.25s ease;
    }

    .contact-x-link:hover {
        color: var(--accent-gold);
    }

    .contact-note {
        max-width: 600px;
        margin: 20px auto 0;
        color: var(--ink-muted);
        font-size: 0.8rem;
        line-height: 1.6;
    }

    /* FAQ (アコーディオン グループ分け) */
    .faq-layout-new {
        display: grid;
        grid-template-columns: minmax(240px, 0.32fr) minmax(0, 0.68fr);
        gap: 64px;
        align-items: start;
    }

    .faq-intro-new {
        position: sticky;
        top: 112px;
    }

    .faq-groups {
        display: flex;
        flex-direction: column;
        gap: 36px;
    }

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

    /* カテゴリー見出しを小さなラベルとして表示 */
    .faq-group-label {
        display: inline-block;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--accent-gold);
        background: rgba(171, 142, 44, 0.08);
        padding: 3px 8px;
        border-radius: 3px;
        margin-bottom: 12px;
    }

    .faq-group details {
        border-bottom: 1.5px solid var(--line-soft); /* 質問間の線を細く */
    }

    .faq-group summary {
        position: relative;
        padding: 16px 40px 16px 0; /* 質問文の上下余白調整 */
        color: var(--ink);
        font-family: var(--font-serif);
        font-size: 0.96rem;
        cursor: pointer;
        list-style: none;
    }

    .faq-group summary::-webkit-details-marker {
        display: none;
    }

    /* 開閉矢印アイコンのSVG化 */
    .faq-group summary::after {
        content: '';
        position: absolute;
        top: 50%;
        right: 8px;
        width: 6px;
        height: 6px;
        border-right: 1.5px solid var(--accent-gold);
        border-bottom: 1.5px solid var(--accent-gold);
        transform: translateY(-50%) rotate(45deg);
        transition: transform 0.25s ease;
    }

    .faq-group details[open] summary::after {
        transform: translateY(-25%) rotate(-135deg);
    }

    .faq-group details p {
        padding: 0 24px 20px 0;
        color: var(--ink-soft);
        font-size: 0.88rem;
        line-height: 1.75;
        max-width: 620px; /* 最大幅の制限 */
    }

    /* Footer */
    .site-footer {
        padding: 72px 0 38px;
        background: #02050a;
        border-top: 1px solid var(--line);
    }

    .footer-inner {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }

    .footer-brand {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .footer-brand p {
        font-size: 0.84rem;
        color: var(--ink-soft);
    }

    .footer-navigation {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 24px;
        border-block: 1px solid var(--line-soft);
        padding-block: 20px;
    }

    .footer-navigation a {
        font-size: 0.84rem;
        color: var(--ink-soft);
    }

    .footer-navigation a:hover {
        color: var(--gold-light);
    }

    .footer-disclaimer {
        font-size: 0.78rem;
        color: var(--ink-muted);
        line-height: 1.6;
    }

    .copyright {
        font-size: 0.74rem;
        color: var(--ink-muted);
    }
}

@layer responsive {
    @media (max-width: 940px) {
        .site-header {
            background: rgba(4, 8, 16, 0.94);
        }

        .menu-toggle {
            display: block;
            z-index: 110;
        }

        .site-navigation {
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 100;
            flex-direction: column;
            align-items: stretch;
            gap: 28px;
            padding: 92px max(28px, calc((100vw - 620px) / 2));
            background: rgba(4, 8, 16, 0.98);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transform: translateY(-12px);
            transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s var(--ease);
        }

        .site-navigation.is-open {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            transform: translateY(0);
        }

        .navigation-list {
            display: grid;
            gap: 0;
            border-top: 1px solid var(--line);
        }

        .navigation-list li {
            border-bottom: 1px solid var(--line-soft);
        }

        .navigation-list a {
            width: 100%;
            min-height: 58px;
            font-family: var(--font-serif);
            font-size: 1rem;
        }

        .header-cta {
            min-height: 48px;
            font-size: 0.92rem;
        }

        .madam-layout,
        .faq-layout-new {
            grid-template-columns: 1fr;
            gap: 44px;
        }

        .faq-intro-new {
            position: static;
        }

        .step-flow {
            grid-template-columns: 1fr;
            gap: 16px;
        }

        .step-connector {
            transform: rotate(90deg);
            padding: 8px 0;
        }

    }

    @media (max-width: 1100px) {
        .luna-hero-image {
            object-position: 68% center;
        }
    }

    @media (max-width: 768px) {
        .section {
            padding: clamp(64px, 6vw, 88px) 0; /* スマホ時の広い余白調整 */
        }

        .assurance-inner {
            grid-template-columns: 1fr;
            gap: 12px;
        }

        .topic-grid,
        .ai-principles,
        .scope-compare-grid,
        .sns-grid-new,
        .msg-example-grid,
        .after-grid-container,
        .prep-expanded ul,
        .promises-expanded ol,
        .promise-highlight-grid {
            grid-template-columns: 1fr;
        }

        .comparison-grid {
            grid-template-columns: 1fr;
            gap: 32px;
        }

        .comp-flow-arrow {
            padding: 12px 0;
        }

        .arrow-icon-holder {
            transform: rotate(90deg);
        }

        .arrow-line {
            display: none;
        }

        .arrow-text {
            writing-mode: horizontal-tb;
        }

        .contact-actions {
            flex-direction: column;
        }

        .contact-actions .button {
            width: 100%;
        }

        /* 固定CTAの高さ+セーフエリアを含む下部余白確保 (PCに悪影響を及ぼさない) */
        body {
            padding-bottom: calc(58px + env(safe-area-inset-bottom) + 16px);
        }

        .mobile-action-bar {
            position: fixed;
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 90;
            display: grid;
            grid-template-columns: minmax(0, 1fr) 58px;
            gap: 8px;
            padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
            background: rgba(4, 8, 16, 0.94);
            border-top: 1px solid var(--line);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            transform: translateY(0);
            transition: transform 0.3s var(--ease), opacity 0.3s ease;
        }

        .mobile-action-bar.is-hidden {
            opacity: 0;
            pointer-events: none;
            transform: translateY(110%);
        }

        .mobile-action-bar a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 48px;
            border-radius: 4px;
            font-size: 0.84rem;
            font-weight: 600;
        }

        .mobile-line {
            gap: 8px;
            color: #fff !important;
            background: #06b94f;
        }

        .mobile-x {
            color: var(--gold-light);
            border: 1px solid var(--line);
        }

        .luna-hero {
            min-height: calc(100svh - 64px);
        }

        .luna-hero-image {
            object-position: 72% center;
        }

        .luna-hero::before {
            background:
                linear-gradient(
                    90deg,
                    rgba(5, 8, 17, 0.94) 0%,
                    rgba(5, 8, 17, 0.84) 55%,
                    rgba(5, 8, 17, 0.58) 100%
                );
        }
    }

    @media (max-width: 480px) {
        .section-inner,
        .header-inner,
        .luna-hero-content,
        .assurance-inner,
        .footer-inner {
            width: min(calc(100% - 32px), var(--content));
        }

        .brand-name {
            max-width: 180px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .luna-hero {
            min-height: 660px;
        }

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

        .hero-break-mobile {
            display: block;
        }

        .hero-actions {
            display: grid;
            grid-template-columns: 1fr;
            gap: 10px;
        }

        .hero-actions .button {
            width: 100%;
        }

        .footer-navigation {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px 18px;
        }
    }
}

@layer motion {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
    }

    .reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

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

        *,
        *::before,
        *::after {
            scroll-behavior: auto !important;
            transition-duration: 0.01ms !important;
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
        }

        .reveal {
            opacity: 1;
            transform: none;
        }
    }
}
