/* =============================================
   NAKIRI AYAME FAN SITE  — ONI THEME
   ============================================= */

/* --- Variables --- */
:root {
    --bg:          #08000a;
    --bg-2:        #110012;
    --red:         #cc1133;
    --red-light:   #ff3355;
    --red-dark:    #880022;
    --gold:        #d4af37;
    --gold-light:  #f0d060;
    --text:        #f0e6e8;
    --text-muted:  #9a7880;
    --card-bg:     #160010;
    --card-border: #2a0018;
    --glow-red:    0 0 32px rgba(204,17,51,.45);
    --glow-gold:   0 0 20px rgba(212,175,55,.35);
    --font-jp:     'Noto Serif JP', serif;
    --font-title:  'Cinzel', serif;
    --ease:        cubic-bezier(.4,0,.2,1);
    --radius:      8px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-jp);
    line-height: 1.75;
    overflow-x: hidden;

}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* --- Admin-configurable site background image (falls back to --bg solid) --- */
body.has-site-bg {
    background-color: var(--bg);
    background-image: linear-gradient(
        rgba(var(--site-bg-mask, 8,0,10), var(--site-bg-overlay,.85)),
        rgba(var(--site-bg-mask, 8,0,10), var(--site-bg-overlay,.85))), var(--site-bg);
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* --- Dark-text theme (for light background images): dark text + light overlay mask.
   Dark surfaces (navbar-scrolled, cards, modals, footer-less panels) re-assert the light
   palette by re-scoping --text / --text-muted, so only text sitting directly on the page
   background flips to dark. --- */
body.has-site-bg.site-text-dark {
    --site-bg-mask: 245,242,243;
    --text: #1c1418;
    --text-muted: #5c4b52;
}
/* Headings that hard-code white and sit on the page background. */
body.site-text-dark .title-jp,
body.site-text-dark .section-title { color: var(--text); }
/* Dark panels keep the original light palette regardless of the page background. */
body.site-text-dark .navbar.scrolled,
body.site-text-dark .nav-links.open,
body.site-text-dark .video-card,
body.site-text-dark .video-embed-card,
body.site-text-dark .event-card,
body.site-text-dark .event-modal-box,
body.site-text-dark .artwork-card,
body.site-text-dark .song-card,
body.site-text-dark .merch-card,
body.site-text-dark .timeline-content,
body.site-text-dark .x-embed-box,
body.site-text-dark .x-section,
body.site-text-dark .login-card,
body.site-text-dark .form-input,
body.site-text-dark .tab-btn {
    --text: #f0e6e8;
    --text-muted: #9a7880;
    /* 同時重設實際 color，連「純繼承 color、未使用 var(--text)」的文字（如 .login-title）也拉回亮色 */
    color: var(--text);
}

/* --- Canvas --- */
#particleCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Background artist credit --- */
.bg-credit {
    margin-top: .75rem;
    font-size: .8rem;
    color: var(--text-muted);
    opacity: .85;
}
.bg-credit a {
    color: var(--gold);
    text-decoration: underline;
}
.bg-credit a:hover { color: var(--gold-light); }


/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* --- Reveal animation --- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    padding: 1.5rem 2rem;
    transition: background .35s var(--ease), padding .35s var(--ease), border .35s;
}
.navbar.scrolled {
    background: rgba(8,0,10,.94);
    backdrop-filter: blur(18px);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 4px 28px rgba(204,17,51,.12);
}
.nav-inner {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.nav-logo { display: flex; align-items: center; gap: .75rem; }
.logo-kanji {
    font-size: 1.9rem;
    color: var(--red);
    font-weight: 700;
    line-height: 1;
    text-shadow: var(--glow-red);
}
.logo-text { font-size: .95rem; letter-spacing: .1em; }

.nav-links { display: flex; align-items: center; gap: 2rem; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    z-index: 101;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-link {
    font-size: .85rem;
    letter-spacing: .1em;
    color: var(--text-muted);
    position: relative;
    transition: color .25s;
    white-space: nowrap;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 1px;
    background: var(--red);
    transition: width .25s;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.nav-cta {
    padding: .45rem 1.25rem;
    border: 1px solid var(--red);
    border-radius: var(--radius);
    color: var(--red);
    transition: .25s;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--red); color: #fff; box-shadow: var(--glow-red); }

.nav-admin {
    padding: .45rem 1.25rem;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    color: var(--gold);
    transition: .25s;
}
.nav-admin::after { display: none; }
.nav-admin:hover { background: var(--gold); color: #111; box-shadow: var(--glow-gold); }

.nav-logout {
    padding: .45rem 1rem;
    border: 1px solid var(--text-muted);
    border-radius: var(--radius);
    color: var(--text);
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: .85rem;
    letter-spacing: .1em;
    transition: .25s;
}
.nav-logout::after { display: none; }
.nav-logout:hover {
    color: var(--red-light);
    border-color: var(--red);
    background: rgba(204,17,51,.08);
}

/* =============================================
   HERO
   ============================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1;
    overflow: hidden;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%,   rgba(204,17,51,.18)  0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(212,175,55,.06) 0%, transparent 70%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 860px;
    padding: 6rem 2rem 4rem;
}

.hero-eyebrow {
    display: inline-block;
    padding: .35rem 1.25rem;
    border: 1px solid var(--red-dark);
    border-radius: 50px;
    font-size: .72rem;
    letter-spacing: .22em;
    color: var(--red-light);
    text-transform: uppercase;
    background: rgba(204,17,51,.08);
    margin-bottom: 2rem;
}

.hero-titles { margin-bottom: 1.5rem; }
.title-jp {
    font-family: var(--font-jp);
    font-size: clamp(3rem, 9vw, 6.5rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    letter-spacing: .1em;
    text-shadow: 0 0 70px rgba(204,17,51,.55);
}
.title-en {
    font-family: var(--font-title);
    font-size: clamp(.9rem, 2.5vw, 1.6rem);
    letter-spacing: .55em;
    color: var(--text-muted);
    margin-top: .5rem;
}

.hero-rule {
    margin: 1.5rem 0;
    color: var(--gold);
    font-size: 1.2rem;
    letter-spacing: .5em;
}

.hero-quote { margin-bottom: 2.5rem; }
.q-jp {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    margin-bottom: .4rem;
}
.q-en {
    font-size: .88rem;
    color: var(--text-muted);
    font-style: italic;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 0rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    z-index: 2;
}
.scroll-hint span {
    font-size: .6rem;
    letter-spacing: .35em;
    color: var(--text-muted);
}
.scroll-line {
    width: 1px;
    height: 58px;
    background: linear-gradient(to bottom, var(--red), transparent);
    animation: lineDown 2s ease-in-out infinite;
    transform-origin: top;
}
@keyframes lineDown {
    0%,100% { transform: scaleY(0); opacity: 0; }
    50%      { transform: scaleY(1); opacity: 1; }
}

/* decorative kanji */
.deco {
    position: absolute;
    font-family: var(--font-jp);
    font-size: clamp(7rem, 22vw, 22rem);
    font-weight: 900;
    color: rgba(204,17,51,.04);
    user-select: none;
    pointer-events: none;
    line-height: 1;
    z-index: 0;
    top: 50%;
    transform: translateY(-50%);
}
.deco-l { left: -3%; }
.deco-r { right: -3%; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 2rem;
    border-radius: var(--radius);
    font-size: .875rem;
    font-family: var(--font-jp);
    letter-spacing: .08em;
    transition: .25s var(--ease);

    border: 1px solid transparent;
}
.btn-primary {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}
.btn-primary:hover {
    background: var(--red-light);
    box-shadow: var(--glow-red);
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--card-border);
}
.btn-outline:hover {
    border-color: var(--red);
    color: var(--red);
    transform: translateY(-2px);
}

/* =============================================
   WORLD-VIEW
   ============================================= */
.worldview {
    padding: 5rem 0;
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    background: linear-gradient(to right, var(--bg), rgba(204,17,51,.04), var(--bg));
}
.worldview-inner {
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}
.wv-icon { display: block; font-size: 2rem; margin-bottom: 1.25rem; }
.wv-text {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 2;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .75rem;
}
.wv-text-en {
    font-size: .85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* =============================================
   SECTION COMMON
   ============================================= */
.live-section, .x-section { padding: 6rem 0; position: relative; z-index: 1; }
.x-section { border-top: 1px solid var(--card-border); background: linear-gradient(to bottom, var(--bg), var(--bg-2)); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
    display: inline-block;
    font-size: .72rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: .75rem;
}
.section-title {
    font-family: var(--font-jp);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: .4rem;
}
.section-sub {
    font-family: var(--font-title);
    font-size: .7rem;
    letter-spacing: .5em;
    color: var(--text-muted);
    text-transform: uppercase;
}
.section-more { text-align: center; margin-top: 2rem; }

/* =============================================
   LIVE BANNER
   ============================================= */
.live-banner {
    background: rgba(204,17,51,.09);
    border: 1px solid rgba(204,17,51,.28);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}
.live-pulse { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.pulse-dot {
    width: 10px; height: 10px;
    background: var(--red);
    border-radius: 50%;
    animation: pulseDot 1.4s ease-in-out infinite;
}
@keyframes pulseDot {
    0%,100% { box-shadow: 0 0 0 0 rgba(204,17,51,.7); }
    50%      { box-shadow: 0 0 0 8px rgba(204,17,51,0); }
}
.pulse-label { font-size: .72rem; font-weight: 700; letter-spacing: .22em; color: var(--red-light); }

.live-card { display: flex; gap: 1.5rem; align-items: flex-start; }
.live-thumb {
    position: relative;
    width: 280px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
}
.live-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.live-meta { flex: 1; }
.live-tag { display: block; font-size: .72rem; color: var(--red-light); letter-spacing: .1em; margin-bottom: .75rem; }
.live-meta h3 { font-size: 1.15rem; font-weight: 600; line-height: 1.4; }

/* =============================================
   VIDEO GRID
   ============================================= */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.video-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.video-card:hover {
    transform: translateY(-5px);
    border-color: var(--red-dark);
    box-shadow: var(--glow-red), 0 20px 40px rgba(0,0,0,.5);
}
.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.video-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.video-card:hover .video-thumb img { transform: scale(1.06); }

/* hover overlay shared */
.thumb-hover {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s;
    font-size: 2rem;
    color: #fff;
}
.video-card:hover .thumb-hover,
.live-card:hover .thumb-hover { opacity: 1; }

.vbadge {
    position: absolute;
    top: .5rem; left: .5rem;
    padding: .2rem .6rem;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
}
.vbadge-live { background: var(--red); color: #fff; }
.vbadge-soon { background: rgba(212,175,55,.9); color: #111; }

.video-info { padding: 1rem 1.25rem; }
.video-title {
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: .4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-date { font-size: .72rem; color: var(--text-muted); }

/* =============================================
   VIDEO EMBED GRID
   ============================================= */
.video-embed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.video-embed-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .3s, box-shadow .3s;
}
.video-embed-card:hover {
    border-color: var(--red-dark);
    box-shadow: var(--glow-red), 0 20px 40px rgba(0,0,0,.5);
}
.video-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.video-embed-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}
.video-embed-title {
    padding: .75rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* 精華ツールバー：タイプ tab（左）＋ 言語 select（右） */
.highlights-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: 2rem;
}
.highlights-toolbar .tabs { margin-bottom: 0; }

/* lite-youtube facade：クリックするまで本物の iframe を読み込まない */
.lite-yt { cursor: pointer; background: #000; }
.lite-yt-thumb {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    border: 0;
}
.lite-yt-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 68px; height: 48px; border-radius: 12px;
    background: rgba(204,17,51,.85);
    transition: background .2s, transform .2s;
    pointer-events: none;
}
.lite-yt-play::before {
    content: ""; position: absolute; top: 50%; left: 50%;
    transform: translate(-40%, -50%);
    border-style: solid; border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
}
.lite-yt:hover .lite-yt-play { background: var(--red); transform: translate(-50%, -50%) scale(1.08); }

/* no API fallback */
.no-api { text-align: center; padding: 4rem 0; }
.no-api-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.no-api p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* =============================================
   X / TWITTER
   ============================================= */
.x-wrap { max-width: 600px; margin: 0 auto; text-align: center; }
.x-embed-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 500px;
    margin-bottom: 1.25rem;
}
.x-direct { margin-top: .75rem; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--card-border);
    position: relative;
    z-index: 1;
}
.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.footer-kanji {
    font-family: var(--font-jp);
    font-size: 3rem;
    font-weight: 900;
    color: var(--red);
    text-shadow: var(--glow-red);
    line-height: 1;
}
.footer-names { display: flex; flex-direction: column; }
.footer-jp { font-size: 1.1rem; font-weight: 600; }
.footer-en {
    font-family: var(--font-title);
    font-size: .6rem;
    letter-spacing: .45em;
    color: var(--text-muted);
}

.social-row { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.social-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.5rem;
    border-radius: var(--radius);
    font-size: .875rem;
    border: 1px solid transparent;
    transition: .25s;
}
.yt-btn { background: rgb(252 2 52); border-color: rgb(252 2 52); color: #ffffff; }
.yt-btn:hover { background: rgba(255,0,0,.2); box-shadow: 0 0 20px rgba(255,0,0,.2); transform: translateY(-2px); }
.x-btn  { background: rgb(0, 0, 0); border-color: rgb(0, 0, 0); color: #fff; }
.x-btn:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }

.footer-links { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.footer-links a { font-size: .8rem; color: var(--text-muted); transition: color .2s; }
.footer-links a:hover { color: var(--red); }

.disclaimer { text-align: center; font-size: .72rem; color: var(--text-muted); opacity: .55; line-height: 1.9; }

/* Background-effect (particle) toggle — per-visitor, stored in localStorage */
.particle-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: fit-content;
    margin: 1.5rem auto 0;
    padding: .4rem .95rem;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: .72rem;
    letter-spacing: .05em;
    cursor: pointer;
    transition: color .2s, border-color .2s, opacity .2s;
}
.particle-toggle:hover { color: var(--gold); border-color: var(--gold); }
.particle-toggle-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 8px var(--red);
    transition: background .2s, box-shadow .2s;
}
.particle-toggle.is-off { opacity: .6; }
.particle-toggle.is-off .particle-toggle-dot { background: var(--text-muted); box-shadow: none; }

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red-dark); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 960px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: -2rem;
        right: -2rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(8,0,10,.97);
        backdrop-filter: blur(18px);
        border-top: 1px solid var(--card-border);
        border-bottom: 1px solid var(--card-border);
        padding: .5rem 0;
    }
    .nav-links.open { display: flex; }
    .nav-links > span,
    .nav-links form { display: block; width: 100%; }
    .nav-link {
        display: block;
        padding: .85rem 2rem;
    }
    .nav-links > a.nav-link {
        border-bottom: 1px solid rgba(42,0,24,.6);
    }
    .nav-links > a.nav-link:last-of-type { border-bottom: none; }
    .nav-cta, .nav-admin, .nav-logout {
        width: auto;
        margin: .75rem 1.5rem;
        text-align: center;
        border-radius: var(--radius);
    }
}
@media (max-width: 768px) {
    .deco { display: none; }
    .live-card { flex-direction: column; }
    .live-thumb { width: 100%; }
    .videos-grid { grid-template-columns: 1fr; }
    .video-embed-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
    .title-jp { font-size: 2.8rem; }
    .section-title { font-size: 1.6rem; }
}

/* ==============================================
   EXTENDED UI — Multi-page / new components
   ============================================== */

/* Page sections */
.page-section { padding: 6rem 0 4rem; min-height: 60vh; position: relative; z-index: 1; }

/* Timeline */
.timeline { position: relative; padding: 2rem 0; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--red-dark), var(--gold)); transform: translateX(-50%); }
.timeline-item { display: flex; align-items: flex-start; gap: 2rem; margin-bottom: 3rem; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }
.timeline-date { flex: 0 0 140px; text-align: right; color: var(--gold); font-size: .85rem; padding-top: .25rem; }
.timeline-item:nth-child(even) .timeline-date { text-align: left; }
.timeline-dot { flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; background: var(--red); box-shadow: var(--glow-red); margin-top: .35rem; position: relative; z-index: 1; }
.timeline-content { flex: 1; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.timeline-content h3 { font-size: 1.05rem; color: var(--text); margin-bottom: .25rem; }
.timeline-en { color: var(--text-muted); font-size: .85rem; }
.timeline-badge { display: inline-block; margin-top: .5rem; background: var(--red-dark); color: var(--gold); font-size: .75rem; padding: .15rem .6rem; border-radius: 999px; }

/* Tabs */
.tabs { display: flex; gap: .5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.tab-btn { padding: .5rem 1.5rem; border: 1px solid var(--card-border); border-radius: 999px; background: var(--card-bg); color: var(--text-muted); cursor: pointer; transition: all .2s; }
.tab-btn:hover, .tab-btn.tab-active { border-color: var(--red); color: var(--red); background: rgba(204,17,51,.1); }

/* Events */
.events-list { display: flex; flex-direction: column; gap: 1.25rem; }
.event-card { display: flex; gap: 1.5rem; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 1.5rem; }
.event-date { flex: 0 0 70px; text-align: center; font-size: 1.25rem; font-weight: 700; color: var(--gold); display: flex; flex-direction: column; }
.event-year { font-size: .75rem; color: var(--text-muted); }
.event-badge { font-size: .75rem; padding: .2rem .6rem; border-radius: 999px; }
.event-badge-ongoing { background: rgba(204,17,51,.2); color: var(--red-light); }
.event-info h3 { font-size: 1rem; margin-bottom: .25rem; }
.event-location { font-size: .85rem; color: var(--gold); }
.event-desc { font-size: .85rem; color: var(--text-muted); margin-top: .35rem; }
.events-ended .event-card { opacity: .65; }
.btn-sm { padding: .3rem .9rem; font-size: .8rem; }

/* Event modal */
.event-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.75); backdrop-filter: blur(4px); }
.event-modal-box { background: var(--card-bg); border: none; border-radius: 12px; padding: 2rem 2.5rem; width: 80%; max-width: 80vw; max-height: 88vh; overflow-y: auto; box-shadow: var(--glow-red); }
.event-modal-title { font-size: 1.25rem; color: var(--red-light); margin-bottom: .5rem; }
.event-modal-date { font-size: .85rem; color: var(--gold); margin-bottom: 1rem; }
.event-modal-desc { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.5rem; }
.event-modal-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Artwork feed (Twitter/FB 風の単一カラム・縦スクロール) */
.artwork-grid { display: flex; flex-direction: column; align-items: center; max-width: 560px; margin: 0 auto; }
.artwork-card { width: 100%; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; }

/* Twitter embed in artwork grid */
.twitter-artwork-embed { display: flex; justify-content: center; padding: .5rem; }
.twitter-artwork-embed .twitter-tweet { margin: 0 !important; }
.twitter-fallback-card { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 120px; background: #16202a; border: 1px solid #253341; border-radius: 12px; color: #1d9bf0; text-decoration: none; font-size: .95rem; padding: 1.25rem; transition: background .2s; }
.twitter-fallback-card:hover { background: #1e2d3d; }

/* X / Twitter embeds on /info (固定寬度、置中；不沿用 artwork 樣式) */
.tweet-embed-grid { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; }
.tweet-embed { width: 500px; max-width: 100%; }
.tweet-embed .twitter-tweet { margin: 0 auto !important; }
.tweet-embed iframe { max-width: 100% !important; }

/* Songs */
.songs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.songs-subtitle { grid-column: 1/-1; font-size: 1rem; color: var(--gold); margin: 1.5rem 0 .5rem; }
.song-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; }
.song-info { padding: .75rem; }
.song-info h4 { font-size: .85rem; }

/* Merch */
.merch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
.merch-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; }
.merch-info { padding: .75rem; }
.merch-info h4 { font-size: .9rem; }
.merch-date { font-size: .75rem; color: var(--text-muted); }

/* Contributor button & section actions */
.section-actions { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }
.btn-contributor {
    padding: .5rem 1.4rem;
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    color: var(--gold);
    background: rgba(212,175,55,.06);
    font-family: var(--font-jp);
    font-size: .85rem;
    letter-spacing: .06em;
    cursor: pointer;
    transition: .25s;
}
.btn-contributor:hover { background: var(--gold); color: #111; box-shadow: var(--glow-gold); }

/* Submit modal */
.submit-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.78);
    backdrop-filter: blur(4px);
}
.submit-modal-box {
    background: var(--card-bg);
    border: 1px solid var(--gold);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 36px rgba(212,175,55,.2);
}
.submit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.submit-modal-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 1rem;
    color: var(--text);
}
.submit-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color .2s;
    padding: 0;
}
.submit-modal-close:hover { color: var(--text); }
.submit-modal-fields { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }
.submit-modal-actions { display: flex; gap: .75rem; justify-content: flex-end; }

/* Submit badge */
.submit-badge {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .18em;
    padding: .2rem .7rem;
    border: 1px solid var(--gold);
    border-radius: 50px;
    color: var(--gold);
    background: rgba(212,175,55,.08);
}

/* Form inputs */
.form-input { width: 100%; background: var(--bg-2); border: 1px solid var(--card-border); border-radius: var(--radius); color: var(--text); padding: .5rem 1rem; font-family: var(--font-jp); font-size: .9rem; }
.form-input:focus { outline: none; border-color: var(--gold); }

/* Login */
.login-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; padding: 3rem 2.5rem; text-align: center; max-width: 420px; width: 100%; box-shadow: var(--glow-red); }
.login-icon { font-size: 3rem; margin-bottom: 1rem; }
.login-title { font-family: var(--font-title); font-size: 1.3rem; margin-bottom: .5rem; }
.login-sub { color: var(--text-muted); font-size: .9rem; margin-bottom: 2rem; }
.login-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; margin-bottom: 1.5rem; }
.login-note { font-size: .8rem; color: var(--text-muted); }

/* Submit hint / credits */
.submit-hint { font-size: .8rem; color: var(--text-muted); margin-bottom: .75rem; }
.artwork-credit, .clip-credit { font-size: .8rem; color: var(--text-muted); margin-top: .4rem; text-align: center; }

/* 投稿フラッシュメッセージ（前台） */
.flash-banner { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: .9rem; border: 1px solid; }
.flash-error { color: var(--red-light); border-color: var(--red-dark); background: rgba(204,17,51,.08); }
.flash-success { color: var(--gold); border-color: var(--gold); background: rgba(212,175,55,.08); }

/* 精華絞り込み */
.clip-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin-bottom: 1.5rem; }
.clip-filter-field { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--text-muted); }
.clip-filter-field select { min-width: 130px; }

/* Event key-promotion carousel modal */
.event-modal-box { position: relative; }
.event-slides { position: relative; }
.event-slide { display: none; }
.event-slide.active { display: block; }
.event-slide-img { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 8px; margin-bottom: 1rem; }

/* 兩側切換箭頭 */
.event-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--card-border);
    background: rgba(0,0,0,.45); color: var(--text); font-size: 1.7rem; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center; }
.event-arrow:hover { background: var(--red); color: #fff; }
.event-arrow-prev { left: .75rem; }
.event-arrow-next { right: .75rem; }

/* フッター：中央の閉じる × と「今日は表示しない」チェックボックス */
.event-modal-footer { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 1.25rem; }
.event-modal-close-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--card-border);
    background: none; color: var(--text-muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.event-modal-close-btn:hover { color: var(--text); border-color: var(--red); }
.event-dismiss-check { display: inline-flex; align-items: center; gap: .5rem;
    color: var(--text-muted); font-size: .85rem; cursor: pointer; user-select: none; }
.event-dismiss-check input { width: 16px; height: 16px; accent-color: var(--red); cursor: pointer; }

#infiniteSentinel { height: 1px; width: 100%; }

@media (max-width: 768px) {
    .timeline::before { left: 24px; }
    .timeline-item, .timeline-item:nth-child(even) { flex-direction: column; padding-left: 3rem; }
    .timeline-date, .timeline-item:nth-child(even) .timeline-date { text-align: left; }
    .timeline-dot { position: absolute; left: 16px; }
    .event-card { flex-direction: column; gap: .75rem; }
    .artwork-grid { max-width: 100%; }
    .highlights-toolbar { flex-direction: column; align-items: stretch; }
}
