/* ========================================
   川犬 — VTuber Official Site
   Theme: Dark × Neon Green
   ======================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    /* スクロールバー常時表示（ブート演出のガタつき防止） */
}

body {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    background: #050508;
    color: #e0e0e0;
    overflow-x: hidden;
    line-height: 1.7;
}

/* --- パーティクル背景 --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- ナビゲーション --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.4s ease;
    background: transparent;
}

#navbar.scrolled {
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 255, 100, 0.08);
    padding: 10px 0;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: #00ff6a;
    text-decoration: none;
    text-shadow: 0 0 20px rgba(0, 255, 106, 0.4);
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
    line-height: 1;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00ff6a;
    box-shadow: 0 0 8px rgba(0, 255, 106, 0.5);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #00ff6a;
}

.nav-links a:hover::after {
    width: 100%;
}

/* --- ナビ ドロップダウン --- */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-dropdown-toggle {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    padding-bottom: 2px;
    margin: 0;
    position: relative;
    transition: color 0.3s ease;
    line-height: 1;
    vertical-align: baseline;
}

.nav-dropdown-toggle::after {
    content: '▾';
    font-size: 0.7em;
    opacity: 0.5;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: inline-block;
    margin-left: 4px;
    transform-origin: center center;
}

.nav-dropdown.open .nav-dropdown-toggle::after {
    transform: rotate(180deg) translateY(1px);
    opacity: 0.8;
}

.nav-dropdown-toggle::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00ff6a;
    box-shadow: 0 0 8px rgba(0, 255, 106, 0.5);
    transition: width 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown.open .nav-dropdown-toggle {
    color: #00ff6a;
}

.nav-dropdown:hover .nav-dropdown-toggle::before,
.nav-dropdown.open .nav-dropdown-toggle::before {
    width: 100%;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 160px;
    background: rgba(10, 10, 14, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 106, 0.12);
    border-radius: 14px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 255, 106, 0.04);
    z-index: 1001;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 22px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    color: #00ff6a;
    background: rgba(0, 255, 106, 0.06);
    padding-left: 26px;
}

.nav-dropdown-menu a::after {
    display: none;
}

/* --- ハンバーガーメニュー（デフォルト非表示） --- */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1002;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: #00ff6a;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 0 6px rgba(0, 255, 106, 0.4);
}

/* ☰ → × アニメーション */
.nav-hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Section 共通 --- */
section {
    position: relative;
    z-index: 1;
}

.section-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 100px 24px;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    color: #00ff6a;
    text-shadow: 0 0 30px rgba(0, 255, 106, 0.3);
    margin-bottom: 48px;
    text-align: center;
    letter-spacing: 0.1em;
}

.section-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: -36px;
    margin-bottom: 48px;
}

/* --- Reveal Animation --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 255, 106, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-avatar-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 32px;
}

.hero-avatar-glow {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #00ff6a, #00cc55, #00ff6a);
    opacity: 0.6;
    animation: glowSpin 4s linear infinite;
    filter: blur(12px);
}

@keyframes glowSpin {
    to {
        transform: rotate(360deg);
    }
}

.hero-avatar {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0, 255, 106, 0.5);
    box-shadow: 0 0 40px rgba(0, 255, 106, 0.2);
    z-index: 1;
}

.hero-name {
    margin-bottom: 12px;
}

.hero-name-jp {
    display: block;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.2em;
    text-shadow: 0 0 40px rgba(0, 255, 106, 0.3);
}

.hero-name-en {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(0, 255, 106, 0.6);
    letter-spacing: 0.5em;
    margin-top: 4px;
}

.hero-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.15em;
    margin-bottom: 60px;
}

.hero-scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: floatUp 2s ease-in-out infinite;
}

.hero-scroll-hint span {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid rgba(0, 255, 106, 0.4);
    border-bottom: 2px solid rgba(0, 255, 106, 0.4);
    transform: rotate(45deg);
}

@keyframes floatUp {

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

    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

/* --- Visitor Counter (Retro Odometer) --- */
.visitor-counter {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.visitor-counter-label {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
}

.visitor-counter-digits {
    display: flex;
    gap: 3px;
    perspective: 600px;
}

.visitor-digit {
    width: 28px;
    height: 40px;
    background: #0a0a0f;
    border: 1px solid rgba(0, 255, 106, 0.25);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    box-shadow:
        inset 0 1px 4px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(0, 255, 106, 0.06);
}

/* 桁の内部：数字ストリップ */
.visitor-digit-inner {
    display: flex;
    flex-direction: column;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.visitor-digit-char {
    width: 28px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 1.15rem;
    font-weight: 700;
    color: #00ff6a;
    text-shadow: 0 0 8px rgba(0, 255, 106, 0.5);
    flex-shrink: 0;
}

/* 上下のハイライトライン */
.visitor-digit::before,
.visitor-digit::after {
    content: '';
    position: absolute;
    left: 2px;
    right: 2px;
    height: 1px;
    z-index: 2;
    pointer-events: none;
}

.visitor-digit::before {
    top: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 106, 0.15), transparent);
}

.visitor-digit::after {
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 106, 0.1), transparent);
}

/* 3桁ごとのセパレーター（カンマ風） */
.visitor-digit-sep {
    width: 8px;
    height: 40px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4px;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    color: rgba(0, 255, 106, 0.3);
}

/* ロールアニメーション */
@keyframes digitRoll {
    0% {
        transform: translateY(-400px);
    }

    100% {
        transform: translateY(0);
    }
}

.visitor-digit-inner.rolling {
    animation: digitRoll 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ローディング状態 */
.visitor-digit.loading .visitor-digit-inner {
    opacity: 0;
}

.visitor-digit.loading::before {
    content: '';
    position: absolute;
    inset: 4px;
    background: linear-gradient(110deg,
            rgba(0, 255, 106, 0.03) 30%,
            rgba(0, 255, 106, 0.08) 50%,
            rgba(0, 255, 106, 0.03) 70%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 3px;
    z-index: 1;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

/* エラー状態 */
.visitor-digit.error .visitor-digit-char {
    color: rgba(255, 255, 255, 0.15);
}

/* カウンター全体のCRTグロー */
.visitor-counter-digits::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.visitor-counter-digits.loaded::after {
    opacity: 1;
    box-shadow: 0 0 20px rgba(0, 255, 106, 0.08);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .visitor-digit {
        width: 24px;
        height: 34px;
    }

    .visitor-digit-char {
        width: 24px;
        height: 34px;
        font-size: 1rem;
    }

    .visitor-digit-sep {
        height: 34px;
        width: 6px;
        font-size: 0.7rem;
    }

    .visitor-counter-label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .visitor-digit {
        width: 20px;
        height: 30px;
    }

    .visitor-digit-char {
        width: 20px;
        height: 30px;
        font-size: 0.85rem;
    }

    .visitor-digit-sep {
        height: 30px;
        width: 5px;
        font-size: 0.65rem;
    }

    .visitor-counter-digits {
        gap: 2px;
    }

    .visitor-counter-label {
        font-size: 0.78rem;
    }
}

/* --- About Section --- */
#about {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 255, 106, 0.02) 50%, transparent 100%);
}

.about-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 106, 0.1);
    border-radius: 20px;
    padding: 48px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 700px;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.75);
}

.about-greeting {
    font-size: 1.3rem !important;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 24px !important;
}

.highlight {
    color: #00ff6a;
    font-weight: 900;
    text-shadow: 0 0 12px rgba(0, 255, 106, 0.4);
}

.about-note {
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.35) !important;
    font-style: italic;
}



.about-closing {
    font-size: 1.1rem !important;
    font-weight: 700;
    color: #00ff6a !important;
    text-shadow: 0 0 16px rgba(0, 255, 106, 0.3);
    margin-top: 24px !important;
}

/* --- Links Section (Category + Carousel) --- */
#links-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

/* カテゴリブロック */
.link-category {
    border: 1px solid rgba(0, 255, 106, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: border-color 0.4s ease;
    scroll-margin-top: 100px;
}

.link-category:hover {
    border-color: rgba(0, 255, 106, 0.18);
}

/* カテゴリヘッダー */
.link-category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 255, 106, 0.06);
}

.link-category-icon {
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.link-category[data-cat="youtube"] .link-category-icon {
    background: rgba(255, 0, 0, 0.15);
    color: #ff4444;
}

.link-category[data-cat="x"] .link-category-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.link-category[data-cat="booth_trpg"] .link-category-icon,
.link-category[data-cat="booth_goods"] .link-category-icon {
    background: rgba(252, 77, 80, 0.12);
    color: #fc4d50;
}

.link-category-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
    flex: 1;
}

.link-category-more {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(0, 255, 106, 0.55);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.link-category-more:hover {
    color: #00ff6a;
    text-shadow: 0 0 12px rgba(0, 255, 106, 0.3);
}

.link-category-more.highlight {
    color: #00ff6a;
    font-size: 0.9rem;
    text-shadow: 0 0 20px rgba(0, 255, 106, 0.6), 0 0 40px rgba(0, 255, 106, 0.3);
    animation: morePulse 1.2s ease-in-out infinite;
    background: rgba(0, 255, 106, 0.1);
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 106, 0.4);
}

@keyframes morePulse {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(0, 255, 106, 0.2);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 24px rgba(0, 255, 106, 0.5);
        transform: scale(1.08);
    }
}

/* カルーセルラッパー */
.carousel-wrapper {
    position: relative;
    padding: 16px 0;
}

/* カルーセルトラック */
.carousel-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-left: 32px;
    padding: 4px 32px 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-track.dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
}

/* コンテンツカード */
.content-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    display: block;
}

.content-card:hover {
    border-color: rgba(0, 255, 106, 0.3);
    background: rgba(0, 255, 106, 0.04);
    box-shadow: 0 8px 32px rgba(0, 255, 106, 0.08);
    transform: translateY(-3px);
}

.content-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

/* BOOTH: サムネイルは1:1比率 */
.link-category[data-cat="booth_trpg"] .content-card-thumb,
.link-category[data-cat="booth_goods"] .content-card-thumb {
    aspect-ratio: 1 / 1;
}

.content-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.content-card:hover .content-card-thumb img {
    transform: scale(1.05);
}

.content-card-info {
    padding: 12px 14px;
}

.content-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    margin-bottom: 6px;
}

.content-card-meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: rgba(0, 255, 106, 0.5);
    letter-spacing: 0.03em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 矢印ボタン */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 106, 0.2);
    background: rgba(5, 5, 8, 0.85);
    color: rgba(0, 255, 106, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
}

.carousel-btn.visible {
    opacity: 1;
    pointer-events: all;
}

.carousel-btn:hover {
    background: rgba(0, 255, 106, 0.15);
    border-color: rgba(0, 255, 106, 0.5);
    color: #00ff6a;
    box-shadow: 0 0 16px rgba(0, 255, 106, 0.15);
}

.carousel-btn-left {
    left: 12px;
}

.carousel-btn-right {
    right: 12px;
}

/* X リンクのみカード */
.link-card-simple {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 28px;
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}

.link-card-simple:hover {
    background: rgba(0, 255, 106, 0.04);
}

.link-card-simple .link-arrow {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    margin-left: auto;
}

.link-card-simple:hover .link-arrow {
    color: #00ff6a;
    transform: translateX(4px);
}

/* リビールアニメ */
.link-category {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease, border-color 0.4s ease;
}

.link-category.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Games (Contents内 link-category) --- */
.link-category[data-cat="games"] .link-category-icon {
    background: rgba(0, 255, 106, 0.12);
    color: #00ff6a;
}

/* ゲームサムネイル（絵文字ビジュアル） */
.game-thumb-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 255, 106, 0.08) 0%, rgba(0, 80, 40, 0.15) 100%) !important;
}

.game-thumb-emoji {
    font-size: 2.4rem;
}

/* Coming Soon カード */
.content-card.game-card-coming {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

/* (旧 game-card スタイルは content-card に統一済み) */

/* --- Achievements / Timeline (Zigzag) --- */
#achievements {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 255, 106, 0.02) 50%, transparent 100%);
}

.timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Timeline Group (左右交互) --- */
.timeline-group {
    position: relative;
    display: flow-root;
    /* マージン折り畳み防止→縦線の途切れを解消 */
    scroll-margin-top: 100px;
}

.timeline-group.tl-left {
    padding-left: 40px;
}

.timeline-group.tl-right {
    padding-right: 40px;
}

/* 縦ライン (グループ別) */
.timeline-group::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0, 255, 106, 0.35);
    box-shadow: 0 0 8px rgba(0, 255, 106, 0.15);
}

.timeline-group.tl-left::before {
    left: 12px;
}

.timeline-group.tl-right::before {
    right: 12px;
}

/* --- コネクタ (グループ間の橋渡し) --- */
.timeline-connector {
    position: relative;
    height: 50px;
    /* 不透明等価色: rgba(0,255,106,0.35) on #050508 → 重なっても色が濃くならない */
    --conn-line: #035d2a;
}

/* 左→右 コネクタ */
.timeline-connector-lr::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    width: calc(50% - 12px + 2px);
    height: calc(50% + 1px);
    border-left: 2px solid var(--conn-line);
    border-bottom: 2px solid var(--conn-line);
    border-bottom-left-radius: 18px;
    border-right: none;
    border-top: none;
}

.timeline-connector-lr::after {
    content: '';
    position: absolute;
    top: calc(50% - 1px);
    right: 12px;
    width: calc(50% - 12px + 2px);
    height: calc(50% + 1px);
    border-right: 2px solid var(--conn-line);
    border-top: 2px solid var(--conn-line);
    border-top-right-radius: 18px;
    border-left: none;
    border-bottom: none;
}

/* 右→左 コネクタ */
.timeline-connector-rl::before {
    content: '';
    position: absolute;
    top: 0;
    right: 12px;
    width: calc(50% - 12px + 2px);
    height: calc(50% + 1px);
    border-right: 2px solid var(--conn-line);
    border-bottom: 2px solid var(--conn-line);
    border-bottom-right-radius: 18px;
    border-left: none;
    border-top: none;
}

.timeline-connector-rl::after {
    content: '';
    position: absolute;
    top: calc(50% - 1px);
    left: 12px;
    width: calc(50% - 12px + 2px);
    height: calc(50% + 1px);
    border-left: 2px solid var(--conn-line);
    border-top: 2px solid var(--conn-line);
    border-top-left-radius: 18px;
    border-right: none;
    border-bottom: none;
}

/* --- 年マーカー --- */
.timeline-year {
    position: relative;
    margin-bottom: 24px;
    padding-top: 16px;
}

.timeline-year-label {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: #00ff6a;
    text-shadow: 0 0 16px rgba(0, 255, 106, 0.4);
    letter-spacing: 0.1em;
    line-height: 1;
}

.tl-right .timeline-year-label {
    text-align: right;
    display: block;
}

/* 年の●ドット — テキストの垂直中央に動的配置 */
.timeline-year::before {
    content: '';
    position: absolute;
    /* padding-top(16px) + テキスト高さの半分をターゲット */
    top: 16px;
    bottom: 0;
    margin-top: auto;
    margin-bottom: auto;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: #00ff6a;
    box-shadow: 0 0 12px rgba(0, 255, 106, 0.6), 0 0 24px rgba(0, 255, 106, 0.3);
    border: 2px solid #050508;
    z-index: 2;
}

.tl-left .timeline-year::before {
    left: -34px;
}

.tl-right .timeline-year::before {
    right: -34px;
    left: auto;
}

/* --- 実績アイテム --- */
.timeline-item {
    position: relative;
    margin-bottom: 16px;
}

.tl-left .timeline-item {
    margin-left: 4px;
}

.tl-right .timeline-item {
    margin-right: 4px;
}

/* アイテムの小●ドット — カードの垂直中央に配置 */
.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    margin-top: auto;
    margin-bottom: auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 255, 106, 0.35);
    border: 1.5px solid rgba(0, 255, 106, 0.5);
    z-index: 2;
}

.tl-left .timeline-item::before {
    left: -35px;
}

.tl-right .timeline-item::before {
    right: -35px;
    left: auto;
}

/* --- カード --- */
.timeline-card {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: #e0e0e0;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    overflow: hidden;
}

.tl-left .timeline-card:hover {
    border-color: rgba(0, 255, 106, 0.25);
    background: rgba(0, 255, 106, 0.04);
    box-shadow: 0 4px 24px rgba(0, 255, 106, 0.08);
    transform: translateX(6px);
}

.tl-right .timeline-card:hover {
    border-color: rgba(0, 255, 106, 0.25);
    background: rgba(0, 255, 106, 0.04);
    box-shadow: 0 4px 24px rgba(0, 255, 106, 0.08);
    transform: translateX(-6px);
}

/* サムネイル */
.timeline-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(0, 255, 106, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* アイコンフォールバック */
.timeline-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.5rem;
    background: rgba(0, 255, 106, 0.06);
    border: 1px solid rgba(0, 255, 106, 0.1);
}

.timeline-body {
    flex: 1;
    min-width: 0;
}

.timeline-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    line-height: 1.4;
}

.timeline-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}

.timeline-date {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: rgba(0, 255, 106, 0.5);
    margin-top: 6px;
    letter-spacing: 0.05em;
}

.timeline-card .link-arrow {
    align-self: center;
    flex-shrink: 0;
}

/* --- 現在に至る エンドマーカー --- */
.timeline-end {
    position: relative;
    padding-top: 16px;
    padding-bottom: 8px;
}

.timeline-end::before {
    content: '';
    position: absolute;
    top: 16px;
    bottom: 0;
    margin-top: auto;
    margin-bottom: auto;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #050508;
    border: 3px solid #00ff6a;
    box-shadow: 0 0 12px rgba(0, 255, 106, 0.5), 0 0 24px rgba(0, 255, 106, 0.2);
    z-index: 2;
}

.tl-left .timeline-end::before {
    left: -34px;
}

.tl-right .timeline-end::before {
    right: -34px;
    left: auto;
}

.tl-right .timeline-end-label {
    text-align: right;
    display: block;
}

.timeline-end-label {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(0, 255, 106, 0.6);
    letter-spacing: 0.1em;
}

/* --- リビールアニメ --- */
.timeline-year,
.timeline-item,
.timeline-end,
.timeline-connector {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.timeline-year.revealed,
.timeline-item.revealed,
.timeline-end.revealed,
.timeline-connector.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- タイムライン非表示（展開前） --- */
.timeline-hidden {
    display: none !important;
}

/* --- 展開アニメーション --- */
.timeline-revealing {
    animation: timelineRevealIn 0.5s ease-out forwards;
}

@keyframes timelineRevealIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* --- 「以前の歩みを見る」ボタン --- */
.timeline-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 14px 28px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: #00ff6a;
    background: rgba(0, 255, 106, 0.06);
    border: 1px solid rgba(0, 255, 106, 0.25);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    letter-spacing: 0.04em;
    position: relative;
    overflow: visible;
    z-index: 1;
}

.timeline-expand-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 255, 106, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
}

.timeline-expand-btn:hover {
    background: rgba(0, 255, 106, 0.12);
    border-color: rgba(0, 255, 106, 0.5);
    box-shadow: 0 4px 24px rgba(0, 255, 106, 0.15), 0 0 30px rgba(0, 255, 106, 0.08);
    transform: translateY(-2px);
}

.timeline-expand-btn:hover::before {
    opacity: 1;
}

.timeline-expand-arrow {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    display: inline-block;
}

.timeline-expand-btn:hover .timeline-expand-arrow {
    transform: translateY(3px);
}

.timeline-expand-btn-hidden {
    display: none !important;
}

/* --- Contact Section --- */
#contact {
    background: linear-gradient(180deg, transparent 0%, rgba(0, 255, 106, 0.02) 50%, transparent 100%);
}

.contact-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 106, 0.1);
    border-radius: 20px;
    padding: 48px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.form-required {
    color: #00ff6a;
    font-weight: 700;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 0.92rem;
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.form-input:focus {
    border-color: rgba(0, 255, 106, 0.5);
    background: rgba(0, 255, 106, 0.03);
    box-shadow: 0 0 20px rgba(0, 255, 106, 0.08), inset 0 0 20px rgba(0, 255, 106, 0.02);
}

/* カスタムセレクト（ナビバー風） */
.form-custom-select {
    position: relative;
}

.form-custom-select-toggle {
    width: 100%;
    padding: 14px 18px;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 0.92rem;
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    text-align: left;
}

.form-custom-select-toggle:hover {
    border-color: rgba(0, 255, 106, 0.3);
}

.form-custom-select.open .form-custom-select-toggle {
    border-color: rgba(0, 255, 106, 0.5);
    background: rgba(0, 255, 106, 0.03);
    box-shadow: 0 0 20px rgba(0, 255, 106, 0.08);
}

.form-custom-select-arrow {
    font-size: 1.1em;
    color: rgba(0, 255, 106, 0.5);
    transition: transform 0.3s ease;
}

.form-custom-select.open .form-custom-select-arrow {
    transform: rotate(180deg);
}

.form-custom-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(10, 10, 14, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 106, 0.12);
    border-radius: 12px;
    padding: 6px 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 255, 106, 0.04);
}

.form-custom-select.open .form-custom-select-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.form-custom-select-option {
    padding: 12px 18px;
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-custom-select-option:hover {
    color: #00ff6a;
    background: rgba(0, 255, 106, 0.06);
    padding-left: 22px;
}

.form-custom-select-option.selected {
    color: #00ff6a;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.7;
}

.form-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 32px;
    margin-top: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #050508;
    background: linear-gradient(135deg, #00ff6a 0%, #00cc55 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    letter-spacing: 0.04em;
    position: relative;
    overflow: hidden;
}

.form-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 255, 106, 0.3), 0 0 40px rgba(0, 255, 106, 0.15);
}

.form-submit:hover::before {
    opacity: 1;
}

.form-submit:active {
    transform: translateY(0);
}

.form-submit-icon {
    transition: transform 0.3s ease;
    font-size: 1.1rem;
}

.form-submit:hover .form-submit-icon {
    transform: translateX(4px);
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 送信完了 */
.contact-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.contact-success.show {
    display: block;
    animation: successFade 0.5s ease;
}

@keyframes successFade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: rgba(0, 255, 106, 0.1);
    border: 2px solid #00ff6a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #00ff6a;
    text-shadow: 0 0 20px rgba(0, 255, 106, 0.5);
}

.success-title {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.success-message {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.8;
}

.contact-note {
    margin-top: -28px;
    margin-bottom: 28px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    text-align: center;
}

/* ハニーポット（ボット対策） */
.form-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* --- Footer --- */
#footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px;
    text-align: center;
}

.footer-logo {
    height: 80px;
    width: auto;
    margin: 0 auto 16px;
    display: block;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-copy {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.05em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-name-jp {
        font-size: 2.8rem;
    }

    .hero-name-en {
        font-size: 0.8rem;
    }

    .section-inner {
        padding: 72px 20px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 36px;
    }

    .section-subtitle {
        margin-top: -24px;
        margin-bottom: 36px;
    }

    .about-card {
        padding: 32px 24px;
    }

    /* ナビバー: ハンバーガーメニュー化 */
    .nav-logo {
        font-size: 1rem;
        letter-spacing: 0.05em;
        white-space: nowrap;
    }

    .nav-inner {
        padding: 0 16px;
    }

    .nav-hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(5, 5, 8, 0.96);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        padding: 80px 24px 40px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.35s ease, visibility 0.35s ease;
        z-index: 1001;
        overflow-y: auto;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 16px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        text-transform: uppercase;
        letter-spacing: 0.12em;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* ドロップダウン → アコーディオン化 */
    .nav-dropdown {
        flex-direction: column;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-dropdown-toggle {
        font-size: 1rem;
        padding: 16px 0;
        text-align: left;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        letter-spacing: 0.12em;
    }

    .nav-dropdown-toggle::before {
        display: none;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        min-width: 0;
        width: 100%;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.35s ease;
        opacity: 0;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
        pointer-events: all;
        transform: none;
        padding-bottom: 8px;
    }

    .nav-dropdown-menu a {
        padding: 12px 0 12px 20px;
        font-size: 0.9rem;
        border-bottom: none;
        color: rgba(255, 255, 255, 0.5);
    }

    .nav-dropdown-menu a:hover {
        padding-left: 24px;
        background: transparent;
    }

    /* 訪問者カウンター: 縦配置 */
    .visitor-counter {
        flex-direction: column;
        gap: 8px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .content-card {
        flex: 0 0 180px;
    }

    .carousel-track {
        padding: 4px 16px 12px;
    }

    .link-category-header {
        padding: 14px 16px;
    }

    .timeline-card {
        padding: 12px 14px;
    }

    .timeline-thumb {
        width: 56px;
        height: 56px;
    }

    .contact-card {
        padding: 32px 24px;
    }

    .hero-tagline {
        font-size: 0.85rem;
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .hero-name-jp {
        font-size: 2.2rem;
    }

    .hero-name-en {
        letter-spacing: 0.3em;
    }

    .hero-avatar-wrapper {
        width: 140px;
        height: 140px;
        margin-bottom: 24px;
    }

    .hero-avatar {
        width: 140px;
        height: 140px;
    }

    .section-inner {
        padding: 56px 16px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 28px;
    }

    .section-subtitle {
        font-size: 0.85rem;
        margin-top: -18px;
        margin-bottom: 28px;
    }

    .hero-tagline {
        font-size: 0.78rem;
        letter-spacing: 0.1em;
        margin-bottom: 36px;
    }

    /* ナビバー: 小画面さらに調整 */
    .nav-logo {
        font-size: 0.85rem;
        letter-spacing: 0.03em;
    }

    .nav-inner {
        padding: 0 12px;
    }

    /* About */
    .about-card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .about-greeting {
        font-size: 1.1rem !important;
    }

    .about-text p {
        font-size: 0.9rem;
        line-height: 1.8;
    }

    /* カルーセル */
    .content-card {
        flex: 0 0 160px;
    }

    .carousel-btn {
        display: none;
    }

    .carousel-track {
        padding: 4px 12px 12px;
        gap: 10px;
    }

    .link-category-header {
        padding: 12px 14px;
        gap: 10px;
    }

    .link-category-icon {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
        border-radius: 10px;
    }

    .link-category-title {
        font-size: 0.92rem;
    }

    .link-category-more {
        font-size: 0.7rem;
    }

    /* 480px以下: ジグザグ無効→左直線に統一 */
    .timeline-group.tl-right {
        padding-right: 0;
        padding-left: 28px;
    }

    .timeline-group.tl-left {
        padding-left: 28px;
    }

    .timeline-group.tl-right::before {
        right: auto;
        left: 8px;
    }

    .timeline-group.tl-left::before {
        left: 8px;
    }

    .tl-right .timeline-year-label,
    .tl-right .timeline-end-label {
        text-align: left;
    }

    .tl-right .timeline-year::before,
    .tl-right .timeline-end::before {
        right: auto;
        left: -25px;
    }

    .tl-left .timeline-year::before,
    .tl-left .timeline-end::before {
        left: -25px;
        width: 12px;
        height: 12px;
    }

    .tl-right .timeline-item::before {
        right: auto;
        left: -25px;
    }

    .tl-left .timeline-item::before {
        left: -25px;
        width: 6px;
        height: 6px;
    }

    .tl-right .timeline-item {
        margin-right: 0;
        margin-left: 4px;
    }

    .tl-right .timeline-card:hover {
        transform: translateX(6px);
    }

    .timeline-connector {
        height: 20px;
    }

    .timeline-connector-lr::before,
    .timeline-connector-lr::after,
    .timeline-connector-rl::before,
    .timeline-connector-rl::after {
        display: none;
    }

    .timeline-connector::before {
        display: block !important;
        content: '';
        position: absolute;
        left: 8px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: rgba(0, 255, 106, 0.35);
        border: none;
        border-radius: 0;
    }

    .timeline-year-label {
        font-size: 1.2rem;
    }

    .timeline-thumb {
        width: 48px;
        height: 48px;
    }

    .timeline-title {
        font-size: 0.82rem;
    }

    .timeline-desc {
        font-size: 0.72rem;
    }

    /* Contact */
    .contact-card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .form-label {
        font-size: 0.8rem;
    }

    .form-input {
        font-size: 0.85rem;
        padding: 12px 14px;
    }

    /* Footer */
    .footer-inner {
        padding: 28px 16px;
    }

    .footer-logo {
        font-size: 1.2rem;
    }
}

/* --- Monitor Boot Sequence (SVG Zoom-In) --- */
body.monitor-booting {
    overflow: hidden;
}

#boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    /* 微かなアンビエントライト */
    background: radial-gradient(ellipse at 50% 40%, #0a0a12 0%, #020204 70%);
}

.boot-monitor {
    position: relative;
    width: min(70vw, 600px);
    /* transform-originはJSで画面中央に動的設定 */
    transform-origin: 50% 40%;
    opacity: 0;
    animation: monitorAppear 0.6s ease-out 0.2s forwards;
}

.monitor-svg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.8));
}

/* --- 画面内iframe --- */
.monitor-screen-content {
    position: absolute;
    /* 位置・サイズはJSで動的設定（SVGアスペクト比に連動） */
    left: 10.25%;
    top: 6.77%;
    width: 79.5%;
    height: 63.87%;
    overflow: hidden;
    border-radius: 4px;
    opacity: 0;
    background: #050508;
}

.screen-iframe {
    /* サイズはJSで実ビューポートサイズに動的設定 */
    border: none;
    transform-origin: top left;
    pointer-events: none;
    background: #050508;
}

/* --- LED & グロー制御 --- */
.monitor-led {
    transition: fill 0.3s ease;
}

.screen-glow {
    transition: opacity 0.5s ease;
}

/* --- フェーズクラスによるアニメーション --- */

/* Phase 1: モニター出現 */
@keyframes monitorAppear {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Phase 2: 電源ON — JSでクラス付与 */
#boot-overlay.phase-power-on .monitor-led {
    fill: #00ff6a;
    filter: drop-shadow(0 0 6px #00ff6a) drop-shadow(0 0 12px rgba(0, 255, 106, 0.5));
}

#boot-overlay.phase-power-on .screen-glow {
    opacity: 1;
    animation: screenFlicker 0.12s steps(2) 2;
}

#boot-overlay.phase-power-on .monitor-screen {
    fill: #080810;
    transition: fill 0.4s ease;
}

@keyframes screenFlicker {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Phase 3: 画面表示 — iframeが表示 */
#boot-overlay.phase-screen-on .monitor-screen-content {
    opacity: 1;
    transition: opacity 0.5s ease;
}

#boot-overlay.phase-screen-on .monitor-screen {
    fill: #050508;
}

/* Phase 4: ズームイン — 画面に向かってズーム */
#boot-overlay.phase-zoom-in .boot-monitor {
    animation: zoomIntoScreen 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes zoomIntoScreen {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(var(--zoom-scale, 4));
        opacity: 1;
    }
}

/* Phase 5: オーバーレイフェードアウト */
#boot-overlay.phase-fade-out {
    animation: overlayFadeOut 0.4s ease-out forwards;
    pointer-events: none;
}

@keyframes overlayFadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}