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

:root {
    --bg: #1E1E22;
    --bg-light: #2A2A2F;
    --bg-card: #28282E;
    --accent: #F0C840;
    --accent-hover: #E0B830;
    --accent-soft: rgba(240, 200, 64, 0.12);
    --text: #F0ECE4;
    --text-sub: #9A968E;
    --text-light: #6B675F;
    --bubble-left: #33333A;
    --bubble-right: #F0C840;
    --white: #FFFFFF;
    --timeline-inactive: #44444A;
    --timeline-active: #F0C840;
    --font-serif: 'Noto Serif JP', serif;
    --font-sans: 'Noto Sans JP', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== ENTRANCE (MIONEERS Particle Crystallization) ===== */
.entrance {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: #0a0a0c;
    cursor: pointer;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

.entrance.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.entrance-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
    pointer-events: none;
}

.entrance-bg-initial {
    z-index: 0;
}

.entrance-bg-final {
    z-index: 0;
}

.entrance-bg.visible {
    opacity: 1;
}

.entrance-bg.fade-out {
    opacity: 0;
    transition: opacity 1.0s ease;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

.entrance-logo {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    max-height: 60vh;
    height: auto;
    object-fit: contain;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.entrance-logo.visible {
    opacity: 1;
}

.entrance-tap-hint {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.5s ease;
    animation: hint-pulse 2.5s ease-in-out infinite;
}

.entrance-tap-hint.hidden {
    opacity: 0;
}

.tap-ring {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.tap-ring-bg {
    fill: none;
    stroke: rgba(240, 200, 64, 0.15);
    stroke-width: 2.5;
}

.tap-ring-progress {
    fill: none;
    stroke: rgba(240, 200, 64, 0.85);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 213.63;
    stroke-dashoffset: 213.63;
    transition: stroke-dashoffset 0.15s ease-out;
    filter: drop-shadow(0 0 6px rgba(240, 200, 64, 0.5));
}

.tap-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.3em;
    color: rgba(240, 200, 64, 0.5);
    padding-left: 0.3em;
}

.tap-sub-label {
    position: absolute;
    top: calc(50% + 85px);
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: 500;
    color: rgba(240, 200, 64, 0.6);
    white-space: nowrap;
    letter-spacing: 0.05em;
    transition: opacity 0.1s ease;
}

.tap-sub-label.hidden {
    opacity: 0;
}

@keyframes hint-pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* Whiteout overlay */
.whiteout-overlay {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background-color: #c8c8c8;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whiteout-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.whiteout-overlay.fade-out {
    opacity: 0;
    transition: opacity 1.0s ease;
}

.whiteout-logo {
    width: 60%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
    opacity: 0.9;
}

/* Tap shake feedback */
.entrance.tap-shake {
    animation: entrance-shake 0.15s ease;
}

@keyframes entrance-shake {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(0, 3px);
    }

    50% {
        transform: translate(0, -2px);
    }

    75% {
        transform: translate(0, 2px);
    }

    100% {
        transform: translate(0, 0);
    }
}


/* ===== MAIN ===== */
.main {
    position: relative;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.main.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===== TIMELINE ===== */
.timeline {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.timeline.visible {
    opacity: 1;
}

.timeline-track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    position: relative;
}

/* Diamond-style dots like ZeroGrid */
.timeline-dot {
    width: 10px;
    height: 10px;
    background-color: var(--timeline-inactive);
    position: relative;
    z-index: 2;
    transition: all 0.4s ease;
    margin: 10px 0;
    cursor: pointer;
    transform: rotate(45deg);
    border-radius: 2px;
}

.timeline-dot.active {
    background-color: var(--timeline-active);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transform: rotate(0deg);
    box-shadow: 0 0 0 3px rgba(240, 200, 64, 0.3);
}

.timeline-dot.passed {
    background-color: var(--timeline-active);
    width: 10px;
    height: 10px;
}

.timeline-track::before {
    content: '';
    position: absolute;
    left: 50%;
    top: var(--track-top, 15px);
    transform: translateX(-50%);
    width: 3px;
    height: var(--track-height, calc(100% - 30px));
    background-color: var(--timeline-inactive);
    z-index: 0;
    border-radius: 2px;
}

/* Active line from top to current dot */
.timeline-track::after {
    content: '';
    position: absolute;
    left: 50%;
    top: var(--track-top, 15px);
    transform: translateX(-50%);
    width: 3px;
    height: var(--progress-px, 0px);
    background-color: var(--timeline-active);
    z-index: 1;
    border-radius: 2px;
    /* no transition — line follows scroll directly */
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 300;
    color: var(--accent);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.6s ease;
    font-style: italic;
}

.scroll-progress.visible {
    opacity: 1;
}

.progress-pct {
    font-size: 10px;
    vertical-align: super;
}

/* ===== INFO BUTTON ===== */
.info-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.6s ease, border-color 0.3s;
}

.info-button.visible {
    opacity: 1;
}

.info-button span {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 14px;
    color: var(--text-sub);
    transition: color 0.3s;
}

.info-button:hover {
    border-color: var(--accent);
}

.info-button:hover span {
    color: var(--accent);
}

/* ===== SECTIONS ===== */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px 80px 70px;
    position: relative;
    z-index: 2;
}

.section-content {
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
}

/* ===== HERO SECTION ===== */
.section-hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-bg-image {
    position: fixed;
    inset: 0;
    background-image: url('bg-main.webp');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-bg-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(30, 30, 34, 0.35) 0%,
            rgba(30, 30, 34, 0.50) 50%,
            rgba(30, 30, 34, 0.75) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.hero-label {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.4em;
    color: var(--accent);
}

.hero-heading {
    font-family: var(--font-serif);
    font-size: clamp(32px, 8vw, 52px);
    font-weight: 900;
    font-style: italic;
    line-height: 1.3;
    color: var(--text);
}

.hero-sub {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-sub);
    margin-bottom: 40px;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.scroll-text {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5em;
    color: var(--text-sub);
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--text-sub), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scaleY(1);
    }

    50% {
        opacity: 0.3;
        transform: scaleY(0.6);
    }
}

/* ===== STORY SECTIONS ===== */
.bg-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-serif);
    font-size: clamp(200px, 40vw, 400px);
    font-weight: 900;
    font-style: italic;
    color: rgba(240, 200, 64, 0.04);
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.story-heading {
    font-family: var(--font-serif);
    font-size: clamp(28px, 7vw, 44px);
    font-weight: 900;
    font-style: italic;
    line-height: 1.5;
    margin-top: 0;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

.section-chat .story-heading {
    line-height: 1.2;
    margin-bottom: 8px;
}

.story-body {
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 300;
    line-height: 2.2;
    color: var(--text);
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.story-sub {
    font-size: 14px;
    font-weight: 300;
    font-style: italic;
    color: var(--text-sub);
    position: relative;
    z-index: 1;
}

.accent-text {
    color: var(--accent);
}

.stat-number {
    font-family: var(--font-serif);
    font-size: clamp(70px, 15vw, 120px);
    font-weight: 900;
    font-style: italic;
    color: var(--accent);
    line-height: 1.1;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.stat-pct {
    font-size: 0.6em;
    vertical-align: super;
}

.story-citation {
    font-size: 14px;
    font-weight: 400;
    color: var(--accent);
    font-style: italic;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.section-divider {
    width: 20px;
    height: 3px;
    background-color: var(--accent);
    margin: 40px auto 0;
    border-radius: 2px;
}

/* ===== COMMUNITY ===== */
.community-logo {
    display: inline-flex;
    align-items: baseline;
    margin-bottom: 20px;
}

.community-brand {
    font-family: var(--font-serif);
    font-size: clamp(36px, 8vw, 56px);
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(240, 200, 64, 0.3);
}

.community-heading {
    font-family: var(--font-serif);
    font-size: clamp(28px, 7vw, 44px);
    font-weight: 900;
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 28px;
}

/* ===== CHAT UI ===== */
.section-chat {
    padding: 24px 20px 24px 70px;
    min-height: auto;
    align-items: flex-start;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section-chat.hidden-section {
    opacity: 0;
    transform: translateY(40px);
    pointer-events: none;
}

.section-chat.visible-section {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-section-content {
    max-width: 100%;
    text-align: left;
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.chat-msg-right {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: auto;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}

.chat-avatar-gray {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}

.chat-bubble-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 65%;
}

.chat-name {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
}

.chat-name.accent {
    color: #ffffff;
}

.chat-bubble {
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
    width: fit-content;
}

.chat-bubble-left {
    background-color: var(--bubble-left);
    border-top-left-radius: 4px;
    color: var(--text);
}

.chat-bubble-right {
    background-color: var(--accent);
    border-top-right-radius: 4px;
    color: #1E1E22;
    font-weight: 500;
}

/* Reactions floating below bubble — left messages: bottom-right */
.chat-reactions {
    font-size: 13px;
    padding: 2px 8px;
    background-color: #2e2e34;
    border-radius: 12px;
    display: inline-block;
    align-self: flex-end;
    margin-top: -14px;
    position: relative;
    z-index: 1;
}

/* Right messages: reaction at bottom-left of bubble */
.chat-reactions-right {
    font-size: 13px;
    padding: 2px 8px;
    background-color: #2e2e34;
    border-radius: 12px;
    display: inline-block;
    margin-top: -14px;
    align-self: flex-start;
    position: relative;
    z-index: 1;
}

/* Chat Link Preview */
.chat-link-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    border-radius: 12px;
    margin-top: 4px;
}

.chat-link-icon {
    font-size: 20px;
}

.chat-link-text {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.chat-link-text strong {
    font-weight: 700;
    color: var(--text);
}

.chat-link-text span {
    font-size: 10px;
    color: var(--text-sub);
}

/* Chat Location */
.chat-location {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 14px;
    margin-top: 4px;
}

.location-pin {
    font-size: 22px;
}

.location-text {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.location-text strong {
    font-weight: 700;
}

.location-text span {
    font-size: 11px;
    color: var(--text-sub);
}

/* Chat Voice */
.chat-voice {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 18px;
    margin-top: 4px;
}

.voice-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--accent);
    color: #1E1E22;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    font-weight: 700;
}

.voice-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.voice-wave span {
    display: block;
    width: 3px;
    background-color: var(--accent);
    border-radius: 2px;
    animation: wave-anim 1s ease-in-out infinite;
}

.voice-wave span:nth-child(1) {
    height: 12px;
    animation-delay: 0s;
}

.voice-wave span:nth-child(2) {
    height: 20px;
    animation-delay: 0.1s;
}

.voice-wave span:nth-child(3) {
    height: 8px;
    animation-delay: 0.2s;
}

.voice-wave span:nth-child(4) {
    height: 24px;
    animation-delay: 0.3s;
}

.voice-wave span:nth-child(5) {
    height: 14px;
    animation-delay: 0.4s;
}

.voice-wave span:nth-child(6) {
    height: 10px;
    animation-delay: 0.5s;
}

.voice-wave span:nth-child(7) {
    height: 22px;
    animation-delay: 0.6s;
}

.voice-wave span:nth-child(8) {
    height: 6px;
    animation-delay: 0.7s;
}

.voice-wave span:nth-child(9) {
    height: 18px;
    animation-delay: 0.8s;
}

.voice-wave span:nth-child(10) {
    height: 11px;
    animation-delay: 0.9s;
}

@keyframes wave-anim {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(0.4);
    }
}

.voice-time {
    font-size: 13px;
    color: var(--text-sub);
    flex-shrink: 0;
}

/* Typing indicator */
.typing-bubble {
    padding: 14px 22px !important;
}

.typing-dots {
    display: flex;
    gap: 5px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-sub);
    animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ===== CTA ===== */
.section-cta {
    min-height: 60vh;
}

.cta-heading {
    font-family: var(--font-serif);
    font-size: clamp(20px, 5vw, 30px);
    font-weight: 700;
    font-style: italic;
    color: var(--accent);
    line-height: 1.8;
    margin-bottom: 48px;
}

.cta-sub {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-sub);
    margin-bottom: 44px;
}

.cta-button {
    display: inline-block;
    padding: 18px 80px;
    background-color: var(--accent);
    color: #1E1E22;
    border: none;
    border-radius: 40px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(240, 200, 64, 0.3);
}

.cta-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 32px rgba(240, 200, 64, 0.45);
}

.cta-button:active {
    transform: translateY(0);
}

/* ===== FORM OVERLAY (Typeform-style) ===== */
.form-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background-color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.form-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.form-container {
    width: 100%;
    height: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    position: relative;
}

.form-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--timeline-inactive);
}

.form-progress-fill {
    height: 100%;
    background-color: var(--accent);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 0 2px 2px 0;
}

.form-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-sub);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    z-index: 10;
}

.form-close:hover {
    color: var(--text);
}

/* Steps */
.form-step {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    width: 100%;
    animation: step-in 0.4s ease;
}

.form-step.active {
    display: flex;
}

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

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

.form-quote {
    font-family: var(--font-serif);
    font-size: 48px;
    color: var(--text-sub);
    line-height: 1;
}

.form-welcome-text {
    font-family: var(--font-serif);
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 400;
    color: var(--text);
    line-height: 1.8;
    max-width: 400px;
}

.form-question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background-color: var(--accent);
    color: #1E1E22;
    font-size: 14px;
    font-weight: 700;
}

.form-question {
    font-family: var(--font-serif);
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 700;
    color: var(--text);
}

.form-required {
    font-size: 14px;
    color: var(--text-sub);
}

.form-choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 360px;
    margin: 8px 0;
}

.form-choice {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border: none;
    border-radius: 30px;
    background-color: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.form-choice:hover {
    background-color: rgba(240, 200, 64, 0.22);
    transform: translateX(4px);
}

.form-choice.selected {
    background-color: var(--accent);
    color: #1E1E22;
}

.form-choice.selected .choice-letter {
    background-color: #1E1E22;
    color: var(--accent);
    border-color: #1E1E22;
}

.choice-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s;
}

.form-input {
    width: 100%;
    max-width: 360px;
    padding: 14px 0;
    border: none;
    border-bottom: 2px solid var(--timeline-inactive);
    background-color: transparent;
    font-family: var(--font-sans);
    font-size: 18px;
    color: var(--text);
    transition: border-color 0.3s;
    outline: none;
    text-align: center;
}

.form-input::placeholder {
    color: var(--accent);
    opacity: 0.4;
}

.form-input:focus {
    border-bottom-color: var(--accent);
}

.form-next-btn {
    padding: 16px 72px;
    background-color: var(--accent);
    color: #1E1E22;
    border: none;
    border-radius: 40px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    letter-spacing: 0.1em;
}

.form-next-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.form-done-emoji {
    font-size: 56px;
    margin-bottom: 8px;
}

.form-done-sub {
    font-size: 14px;
    color: var(--text-sub);
}

.form-footer {
    position: absolute;
    bottom: 24px;
    font-size: 12px;
    color: var(--text-light);
}

/* ===== FADE-UP ANIMATION ===== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition-property: opacity, transform;
    transition-duration: 0.6s;
    transition-timing-function: ease;
    transition-delay: 0s;
    will-change: opacity, transform;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Chat messages get slightly different animation */
.chat-container .fade-up {
    transform: translateY(20px);
}

/* ===== CINEMATIC BLUR EFFECT ===== */
.cinematic-blur {
    filter: blur(12px);
    transition-property: opacity, filter, transform !important;
    transition-duration: 1.5s !important;
    transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

.cinematic-blur.visible {
    filter: blur(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .section {
        padding: 60px 40px 60px 20px;
    }

    .section-chat {
        padding: 20px 32px 20px 20px;
        align-items: flex-start;
    }

    .timeline {
        left: 0;
    }

    .scroll-progress {
        bottom: 14px;
        right: 14px;
        font-size: 12px;
    }

    .info-button {
        bottom: 14px;
        left: 12px;
        width: 28px;
        height: 28px;
    }

    .info-button span {
        font-size: 12px;
    }

    .chat-bubble-wrapper {
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 40px 14px 40px 46px;
    }

    .section-chat {
        padding: 16px 10px 16px 46px;
        align-items: flex-start;
    }

    .timeline {
        left: 8px;
    }

    .timeline-dot {
        margin: 8px 0;
        width: 8px;
        height: 8px;
    }

    .timeline-dot.active {
        width: 14px;
        height: 14px;
    }

    .logo-z {
        font-size: 80px;
    }

    .logo-g {
        font-size: 70px;
    }
}
/* =====================================================
   v2 改善（トンマナは維持して、迷わず・読める・参加しやすく）
   ===================================================== */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.entrance:focus-visible { outline-offset: -6px; }

/* 入口：儀式は残し、急ぐ人の出口をつくる */
.entrance-skip {
    position: absolute;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 20;
    min-height: 44px;
    padding: 0 20px;
    background: rgba(30, 30, 34, 0.55);
    border: 1px solid rgba(240, 200, 64, 0.35);
    border-radius: 999px;
    color: var(--text-sub);
    font-family: var(--font-sans);
    font-size: 13px;
    letter-spacing: 0.12em;
    cursor: pointer;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: color .3s, border-color .3s;
}
.entrance-skip:hover { color: var(--accent); border-color: var(--accent); }

/* i ボタン：押せる大きさと意味を持たせる */
.info-button {
    width: 44px; height: 44px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: calc(14px + env(safe-area-inset-left, 0px));
    background: rgba(30, 30, 34, 0.6);
    padding: 0;
}
.info-button span { font-size: 16px; }

/* 途中からでも参加できるボタン */
.float-cta {
    position: fixed;
    right: calc(16px + env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 120;
    min-height: 48px;
    padding: 0 28px;
    border: none;
    border-radius: 999px;
    background: var(--accent);
    color: #1E1E22;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.15em;
    box-shadow: 0 10px 30px -8px rgba(240, 200, 64, 0.55);
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px) scale(.96);
    pointer-events: none;
    transition: opacity .5s cubic-bezier(.32,.72,0,1), transform .5s cubic-bezier(.32,.72,0,1);
}
.float-cta.show { opacity: 1; transform: none; pointer-events: auto; }
.float-cta:active, .cta-button:active { transform: scale(.97); transition-duration: .08s; }

.cta-note { margin-top: 14px; font-size: 13px; color: var(--text-sub); letter-spacing: .08em; }

/* フォーム */
.form-error { color: #FF8A80; font-size: 14px; margin-bottom: 8px; }
.form-help { margin-top: 10px; font-size: 13px; color: var(--text-sub); }
.form-question label { cursor: text; }
.form-choice[aria-pressed="true"] { border-color: var(--accent); }
.form-line-btn { display: inline-flex; align-items: center; justify-content: center; margin-top: 28px; text-decoration: none; padding: 16px 48px; }
.form-preview-note { margin-top: 14px; font-size: 12px; color: var(--text-light); }
.form-close { min-width: 44px; min-height: 44px; }

/* このページについて */
.about {
    position: fixed; inset: 0; z-index: 480;
    display: flex; align-items: flex-end; justify-content: center;
    background: rgba(10, 10, 12, 0.6);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    transition: opacity .4s ease, visibility .4s ease;
}
.about.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.about-panel {
    position: relative;
    width: 100%; max-width: 560px; max-height: 88vh; overflow: auto;
    background: var(--bg-light);
    border: 1px solid rgba(240, 200, 64, 0.18); border-bottom: none;
    border-radius: 24px 24px 0 0;
    padding: 36px 28px calc(32px + env(safe-area-inset-bottom, 0px));
    transform: translateY(0);
    transition: transform .55s cubic-bezier(.32,.72,0,1);
}
.about.hidden .about-panel { transform: translateY(40px); }
.about-eyebrow { font-family: var(--font-serif); font-style: italic; letter-spacing: .3em; font-size: 12px; color: var(--accent); }
.about-title { font-family: var(--font-serif); font-weight: 900; font-size: 34px; color: var(--accent); letter-spacing: .06em; margin-top: 6px; }
.about-title rt { font-size: 11px; letter-spacing: .4em; color: var(--text-sub); }
.about-lead { margin-top: 12px; color: var(--text); line-height: 1.9; font-weight: 500; }
.about-list { margin: 24px 0 0; display: grid; gap: 14px; }
.about-list div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.about-list dt { color: var(--text-sub); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.about-list dd { margin: 0; color: var(--text); font-size: 15px; line-height: 1.7; }
.about-join { margin-top: 28px; width: 100%; padding: 16px 0; }

/* 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .fade-up, .cinematic-blur { opacity: 1 !important; filter: none !important; }
    .fade-up:not(.cinematic-blur) { transform: none !important; }
}
#form-done-title:focus, .hero-heading:focus { outline: none; }
.float-cta { bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }

/* 左下の「i」：押しやすく、何のボタンか分かるように */
.info-button {
    width: auto;
    height: 48px;
    gap: 10px;
    padding: 0 18px 0 6px;
    border-radius: 999px;
    border: 1px solid rgba(240, 200, 64, 0.55);
    background: rgba(30, 30, 34, 0.78);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.6);
    transition: opacity .6s ease, border-color .3s, transform .16s cubic-bezier(.32,.72,0,1);
    -webkit-tap-highlight-color: transparent;
}
.info-button .info-icon {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #1E1E22;
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 700;
    font-size: 17px;
}
.info-button .info-label {
    font-family: var(--font-sans);
    font-style: normal;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--text);
}
.info-button:hover { border-color: var(--accent); }
.info-button:hover .info-icon { color: #1E1E22; }
.info-button:hover .info-label { color: var(--accent); }
.info-button:active { transform: scale(.96); transition-duration: .08s; }
/* 入った直後に2回だけ光って、存在に気づかせる */
.info-button.visible { animation: info-glow 1.6s ease-out .8s 2; }
@keyframes info-glow {
    0%   { box-shadow: 0 0 0 0 rgba(240, 200, 64, .55), 0 8px 24px -10px rgba(0,0,0,.6); }
    100% { box-shadow: 0 0 0 14px rgba(240, 200, 64, 0), 0 8px 24px -10px rgba(0,0,0,.6); }
}
/* 右下の「参加する」と高さをそろえる */
.info-button { bottom: calc(44px + env(safe-area-inset-bottom, 0px)); }
/* とても狭い画面では、ぶつからないよう文字を省く */
@media (max-width: 359px) {
    .info-button { gap: 6px; padding: 0 10px 0 5px; left: calc(10px + env(safe-area-inset-left, 0px)); }
    .info-button .info-icon { width: 32px; height: 32px; font-size: 16px; }
    .info-button .info-label { font-size: 11.5px; letter-spacing: .02em; }
    .float-cta { padding: 0 18px; letter-spacing: .08em; right: calc(10px + env(safe-area-inset-right, 0px)); }
}
/* 最後の章：左下のボタンと重ならないよう、下に余白を確保する */
.section-cta { padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)) !important; }

/* 説明パネル：スクロールしても「×」を押せるように固定する */
.about-panel > .form-close {
    position: sticky;
    top: 0;
    display: block;
    width: 44px;
    height: 44px;
    margin: -24px -10px 0 auto;
    border-radius: 50%;
    background: var(--bg-light);
    z-index: 5;
}
/* 説明パネル（改）：「×」の行は固定、本文だけがスクロールする */
.about-panel { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.about-panel > .form-close {
    position: static; align-self: flex-end; flex: none;
    width: 44px; height: 44px; margin: 8px 12px 0 0;
    background: none; border-radius: 0; display: block;
}
.about-scroll {
    flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain;
    padding: 0 28px calc(32px + env(safe-area-inset-bottom, 0px));
}
