@charset "UTF-8";

/* Reset & Base Variables */
:root {
    --color-bg: #050505;
    --color-red-deep: #7a0000;
    --color-red-bright: #d30000;
    --color-red-glow: rgba(211, 0, 0, 0.4);
    --color-text-main: #ffffff;
    --color-text-sub: #b3b3b3;
    --color-cta-bg: rgba(15, 15, 15, 0.95);
    
    --max-width: 500px;
    --safe-bottom: env(safe-area-inset-bottom, 20px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Allow vertical scroll, prevent horizontal overflow */
}

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

/* Container for Mobile Center alignment */
.swipe-container {
    display: flex;
    width: 100vw;
    max-width: var(--max-width);
    height: 100dvh;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: none;
}

/* Hide Scrollbar */
.swipe-container::-webkit-scrollbar {
    display: none;
}

.card {
    flex: 0 0 100%;
    width: 100%;
    height: 100dvh;
    scroll-snap-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #111;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Since aspect ratio is 9:16, we fit it in viewport */
    background-color: #000; /* Fallback for empty placeholder images */
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Fallback inner content indicating image placeholder if image is empty/broken */
.card::after {
    content: "画像枠（9:16）";
    position: absolute;
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 0;
    pointer-events: none;
}

.card img {
    position: relative;
    z-index: 1;
}


/* Swipe Indicator UI */
.swipe-indicator {
    position: fixed;
    top: 75%;
    right: max(10px, calc(50vw - (var(--max-width) / 2) + 10px));
    transform: translateY(-50%);
    background: rgba(40, 0, 0, 0.7);
    border: 1px solid rgba(255, 60, 0, 0.5);
    color: #ffedd6;
    padding: 12px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: bold;
    backdrop-filter: blur(4px);
    pointer-events: auto !important; /* Allow tapping */
    cursor: pointer;
    user-select: none; /* Prevent text selection from swallowing click */
    -webkit-user-select: none;
    transition: opacity 0.5s ease;
    z-index: 1000; /* Ensure it stays above EVERYTHING */
    animation: drift 2s infinite ease-in-out, flameFlicker 1.2s infinite alternate ease-in-out;
}

@keyframes drift {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(-6px); }
}

@keyframes flameFlicker {
    0% {
        box-shadow: 0 0 4px rgba(255, 0, 0, 0.3), inset 0 0 2px rgba(255, 100, 0, 0.1);
        background: rgba(30, 0, 0, 0.6);
        border-color: rgba(255, 50, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 12px rgba(255, 30, 0, 0.8), inset 0 0 6px rgba(255, 150, 0, 0.5);
        background: rgba(60, 5, 0, 0.85);
        border-color: rgba(255, 100, 0, 0.8);
    }
}

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

/* CTA Banner Area */
.cta-banner {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--max-width);
    background: var(--color-cta-bg);
    border-top: 1px solid rgba(211, 0, 0, 0.3);
    padding: 14px 16px calc(14px + var(--safe-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8);
    z-index: 50;
    text-align: center;
    transition: all 0.5s ease;
}

.cta-microcopy {
    color: var(--color-text-sub);
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    transition: color 0.5s ease;
}

.cta-button {
    display: block;
    width: 82%;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--color-red-deep), var(--color-red-bright));
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    padding: 14px 0;
    border-radius: 16px;
    box-shadow: 0 0 15px var(--color-red-glow);
    animation: pulseGlow 6s infinite ease-in-out;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:active {
    transform: scale(0.97);
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(211, 0, 0, 0.3); }
    50% { box-shadow: 0 0 25px rgba(211, 0, 0, 0.7); }
}

.cta-conditions {
    color: #888;
    font-size: 0.7rem;
    margin-top: 10px;
    line-height: 1.4;
}

/* Final Card State Modifiers */
.is-final-card .cta-banner {
    border-top: 1px solid rgba(211, 0, 0, 0.6);
    background: rgba(20, 10, 10, 0.95);
}

.is-final-card .cta-microcopy {
    color: #fff;
}

.is-final-card .cta-button {
    animation: none;
    box-shadow: 0 0 20px rgba(211, 0, 0, 0.8);
}

/* SEO Content Section */
.seo-content {
    width: 100vw;
    max-width: var(--max-width);
    margin: 0 auto;
    background: var(--color-bg);
    padding: 40px 20px;
    line-height: 1.8;
}

.seo-inner h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(90deg, #fff, #ffcfcf);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 2px solid var(--color-red-deep);
    padding-bottom: 15px;
}

.seo-inner h2.sub-heading {
    font-size: 1.1rem;
    color: var(--color-text-sub);
    margin-bottom: 30px;
    border: none;
    padding: 0;
}

.seo-inner .seo-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    margin: 15px auto 30px;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 60, 0, 0.2);
}

.seo-inner h2 {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 40px 0 20px;
    padding-left: 12px;
    border-left: 4px solid var(--color-red-bright);
    color: #fff;
}

.seo-inner h3 {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 30px 0 15px;
    color: #ffcfcf;
}

.seo-inner h4 {
    font-size: 1.05rem;
    font-weight: bold;
    margin: 20px 0 10px;
    color: var(--color-text-main);
}

.seo-inner p {
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #dedede;
}

.seo-inner strong {
    color: #ff9999;
}

.seo-inner ul {
    margin: 0 0 25px 20px;
}

.seo-inner li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #dedede;
}

.seo-inner hr {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    margin: 40px 0;
}

.seo-inner a {
    color: #ff9999;
    text-decoration: underline;
}

.seo-buffer {
    height: 140px; /* Space for the fixed CTA banner at the bottom */
}
