/* ==========================================================================
   10th Anniversary — Tokyo Afterschool Summoners
   Complete Stylesheet v2.0
   ========================================================================== */

/* フォント変更 */
/* 簡体字のみ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@200..900&display=swap');

/* ------------------------------------------------------------------
   1. CSS Variables & Fonts
   ------------------------------------------------------------------ */
:root {
  --white: #FDFBF9;
  --bg: #F7F3F0;
  --sakura-light: #FDEEF2;
  --sakura: #F2A7BB;
  --sakura-deep: #E87A9E;
  --blue-light: #E8F0FA;
  --blue: #5B8EC9;
  --blue-deep: #3A6BA8;
  --blue-dark: #2C4D73;
  --gold: #C9A84C;
  --gold-light: #E8D48B;
  --text: #2A2A2A;
  --text-light: #6B6B6B;
  --text-faint: #A0A0A0;
}

/* ------------------------------------------------------------------
   2. Reset & Base (scoped to .tenth-wrap)
   ------------------------------------------------------------------ */
body {
  margin: 0;
  background: #fff!important;
}
.tenth-wrap, .tenth-wrap * { margin: 0; padding: 0; box-sizing: border-box; }
.tenth-wrap {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--white);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
.tenth-wrap a { text-decoration: none; border: none; }
.tenth-wrap img { max-width: 100%; height: auto; display: block; }


/* ------------------------------------------------------------------
   3. Loading Screen
   ------------------------------------------------------------------ */
#tenth-loading {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 24px;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#tenth-loading.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#tenth-loading .logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 48px; font-weight: 900;
  background: linear-gradient(135deg, var(--blue-deep), var(--sakura-deep));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
#tenth-loading .loading-logo-img {
  max-width: 200px; max-height: 120px; object-fit: contain;
}
#tenth-loading .bar-container { width: 200px; height: 2px; background: #eee; border-radius: 2px; overflow: hidden; }
#tenth-loading .bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--blue), var(--sakura)); animation: tenthLoadBar 2s ease forwards; }
@keyframes tenthLoadBar { to { width: 100%; } }

/* ------------------------------------------------------------------
   3b. Staging banner（top は CSS で管理 → ログイン時 body.admin-bar で上書き可能）
   ------------------------------------------------------------------ */
#tenth-staging-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: linear-gradient(90deg, #e85d75, #c94c8a);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* ------------------------------------------------------------------
   4. Navigation
   ------------------------------------------------------------------ */
/* ログイン時の管理バー（#wpadminbar）の下に固定ナビ・ステージング帯を下げる */
body.admin-bar #tenth-nav {
  top: 32px;
}
body.admin-bar #tenth-staging-banner {
  top: 32px;
}
/* ステージング時は PHP で nav に margin-top:34px が付くが、管理バー時は top でまとめてずらす */
body.admin-bar.tenth-staging #tenth-nav {
  margin-top: 0 !important;
  top: calc(32px + 34px);
}
@media screen and (max-width: 782px) {
  body.admin-bar #tenth-nav {
    top: 46px;
  }
  body.admin-bar #tenth-staging-banner {
    top: 46px;
  }
  body.admin-bar.tenth-staging #tenth-nav {
    top: calc(46px + 34px);
  }
  body.admin-bar #tenth-nav .nav-links {
    top: 46px;
    height: calc(100vh - 46px);
    padding-top: 72px;
  }
}

#tenth-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(253, 251, 249, 0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(91, 142, 201, 0.1);
  transition: box-shadow 0.4s ease, transform 0.35s ease;
}
#tenth-nav.is-hidden {
  transform: translateY(-100%);
}
#tenth-nav.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.06); }
#tenth-nav .nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center;
}
#tenth-nav .nav-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 900; font-size: 18px;
  background: linear-gradient(135deg, var(--blue-deep), var(--sakura-deep));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center;
}
#tenth-nav .nav-logo-img {
  height: 32px; width: auto; display: block;
}
#tenth-nav .nav-links {
  display: flex; gap: 28px; list-style: none;
  margin-left: auto; margin-right: 24px;
}
#tenth-nav .nav-links a {
  color: var(--text-light);
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em;
  position: relative; transition: color 0.3s; cursor: pointer;
}
#tenth-nav .nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--sakura));
  transition: width 0.3s ease;
}
#tenth-nav .nav-links a:hover { color: var(--blue-deep); }
#tenth-nav .nav-links a:hover::after { width: 100%; }

#tenth-nav .hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  z-index: 1001; background: none; border: none; padding: 0;
}
#tenth-nav .hamburger span {
  width: 24px; height: 2px; background: var(--text); transition: all 0.3s; display: block;
}
#tenth-nav .hamburger.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
#tenth-nav .hamburger.is-open span:nth-child(2) { opacity: 0; }
#tenth-nav .hamburger.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  #tenth-nav .hamburger { display: flex; }
  #tenth-nav .nav-links {
    position: fixed; top: 0; right: -100%;
    width: 70%; height: 100vh; background: var(--white);
    flex-direction: column; padding: 80px 40px; gap: 32px;
    transition: right 0.4s ease; box-shadow: -10px 0 40px rgba(0,0,0,0.1);
    margin-right: 0;
  }
  #tenth-nav .nav-links.is-open { right: 0; }
  #tenth-nav .nav-links a { font-size: 16px; }
}

/* ------------------------------------------------------------------
   5. Language Switcher
   ------------------------------------------------------------------ */
.lang-switcher { position: relative; flex-shrink: 0; }
.lang-current {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid rgba(91,142,201,0.25); border-radius: 50px;
  padding: 6px 14px; cursor: pointer; font-size: 12px; color: var(--text);
  transition: background 0.2s, border-color 0.3s;
}
.lang-current:hover { background: var(--sakura-light); border-color: var(--sakura); }
.lang-icon { font-size: 14px; }
.lang-label { font-weight: 600; letter-spacing: 0.05em; }
.lang-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--white); border-radius: 12px;
  list-style: none !important; margin: 0 !important; padding: 8px 0 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12); min-width: 140px; z-index: 1001;
}
.lang-dropdown li {
  list-style: none !important; margin: 0 !important; padding: 0 !important;
}
.lang-dropdown li::before,
.lang-dropdown li::marker { content: none !important; display: none !important; }
.lang-dropdown.is-open { display: block; }
.lang-option {
  display: block; width: 100%; text-align: left;
  background: none; border: none; padding: 10px 20px;
  font-size: 13px; color: var(--text); cursor: pointer; transition: background 0.2s;
}
.lang-option:hover { background: var(--sakura-light); }
.lang-option.is-active { color: var(--blue-deep); font-weight: 700; }
/* Nav scrolled state */
#tenth-nav.scrolled .lang-current { border-color: rgba(91,142,201,0.15); }
/* SP */
@media (max-width: 720px) {
  .lang-switcher { margin-left: auto; margin-right: 4px; }
  .lang-current { padding: 5px 10px; font-size: 11px; }
  .lang-dropdown { right: -20px; }
}

/* ------------------------------------------------------------------
   6. View Switching (V2 structural addition)
   ------------------------------------------------------------------ */
.tenth-view {
  display: none;
}

.tenth-view.is-active {
  display: block;
}

.tenth-view.fade-out {
  animation: tenthFadeOut 0.3s ease forwards;
}

.tenth-view.fade-in {
  animation: tenthFadeIn 0.3s ease forwards;
}

@keyframes tenthFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes tenthFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ------------------------------------------------------------------
   7. Hero
   ------------------------------------------------------------------ */
#tenth-hero {
  width: 100%; aspect-ratio: 16 / 9;
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--white) 0%, var(--sakura-light) 40%, var(--blue-light) 100%);
  margin-bottom: calc(-1 * clamp(100px, 15vw, 175px));
  z-index: 1;
}
#tenth-hero .hero-bg-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
}
#tenth-hero .hero-bg-sp { display: none; }
#particle-canvas { position: absolute; inset: 0; pointer-events: none; z-index: 1; }

/* ------------------------------------------------------------------
   8. Hero Info
   ------------------------------------------------------------------ */
.hero-info {
  position: relative; text-align: center;
  padding: 0 0 48px;
  background: linear-gradient(180deg, transparent 0%, var(--white) clamp(100px, 15vw, 175px), var(--sakura-light) 100%);
  z-index: 2;
}
.hero-info-logo {
  width: 30svw; height: auto;
  margin: 0 auto; display: block; position: relative;
  margin-top: -15svw;
  z-index: 3;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.15));
}
.hero-info-body { padding-top: 16px; }
.hero-info-title {
  font-family: 'Zen Antique Soft', serif;
  font-size: clamp(16px, 3vw, 28px); letter-spacing: 0.2em;
  color: var(--blue-dark); margin-bottom: 8px;
}
.hero-info-subtitle {
  font-size: clamp(10px, 1.5vw, 13px); color: var(--text-light);
  letter-spacing: 0.15em; margin-bottom: 24px;
}

@media (max-width: 768px) {
  #tenth-hero { aspect-ratio: 3 / 4; margin-bottom: calc(-1 * clamp(75px, 20vw, 125px)); }
  #tenth-hero .hero-bg-pc { display: none; }
  #tenth-hero .hero-bg-sp { display: block; }
  .scroll-indicator { display: none; }
  .hero-info-logo { width: 40svw; margin-top: -20svw; }
}
/* countdown styles removed (countdown機能は削除) */

.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; animation: tenthFadeUp 0.8s 3.4s ease forwards;
}
.scroll-indicator span { font-size: 10px; letter-spacing: 0.2em; color: var(--text-faint); }
.scroll-line { width: 1px; height: 40px; background: var(--sakura); animation: tenthScrollPulse 2s ease-in-out infinite; }
@keyframes tenthScrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.3; }
  50% { transform: scaleY(1.5); opacity: 1; }
}

/* ------------------------------------------------------------------
   9. Section Common
   ------------------------------------------------------------------ */
.tenth-section { padding: 120px 24px; position: relative; }
.tenth-section-inner { max-width: 1100px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  font-size: 11px; letter-spacing: 0.3em; color: var(--sakura-deep);
  font-weight: 500; margin-bottom: 12px; display: block;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 6vw, 56px); font-weight: 900;
  background: linear-gradient(135deg, var(--blue-deep), var(--sakura-deep));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 16px;
}
.section-desc { font-size: 14px; color: var(--text-light); line-height: 2; max-width: 600px; margin: 0 auto; }

/* ------------------------------------------------------------------
   10. News
   ------------------------------------------------------------------ */
#tenth-news { background: var(--white); }
.news-list { display: flex; flex-direction: column; }
.news-item {
  display: flex; align-items: baseline; gap: 20px;
  padding: 12px;
  color: inherit;
  transition: all 0.4s ease;
}
.news-item:hover { background: var(--sakura-light);}
.news-item__wrap {
  display: contents;
}
.news-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px; color: var(--text-faint); white-space: nowrap; min-width: 90px;
}
.news-category {
  font-size: 10px; letter-spacing: 0.1em; padding: 3px 10px; border-radius: 50px;
  background: var(--blue-light); color: var(--blue-deep); font-weight: 500; white-space: nowrap;
}
.news-text { font-size: 14px; color: var(--text); line-height: 1.5; }
@media (max-width: 768px) {
  .news-item {
    flex-direction: column;
    gap: 8px;
  }
  .news-item__wrap {
    display: flex;
    gap: 8px;
    align-items: center;
  }
}

/* ------------------------------------------------------------------
   11. Letter
   ------------------------------------------------------------------ */
#tenth-letter { background: linear-gradient(180deg, var(--sakura-light) 0%, var(--white) 100%); }
.letter-card {
  max-width: 720px; margin: 0 auto; background: var(--white);
  border-radius: 20px; padding: 64px 48px;
  box-shadow: 0 20px 60px rgba(242, 167, 187, 0.15);
  position: relative; overflow: hidden;
}
.letter-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--sakura), var(--gold-light));
}
.letter-card::after {
  content: '✿'; position: absolute; top: 24px; right: 32px;
  font-size: 24px; color: var(--sakura); opacity: 0.3;
}
.letter-from {
  font-family: 'Zen Antique Soft', serif;
  font-size: 20px; color: var(--blue-deep); margin-bottom: 32px; text-align: center;
}
.letter-body { font-size: 14px; line-height: 2.4; color: var(--text); font-weight: 300; }
.letter-body p { margin-bottom: 24px; }
.letter-signature {
  text-align: right; font-family: 'Zen Antique Soft', serif;
  color: var(--blue-deep); margin-top: 40px;
}
@media (max-width: 768px) {
  .letter-card {
    padding: 50px 20px;
  }
}

/* ------------------------------------------------------------------
   12. Message Carousel
   ------------------------------------------------------------------ */
#tenth-message { background: var(--white); overflow: hidden; }
.carousel-container { position: relative; margin: 0 -24px; padding: 0 24px; }
.carousel-track {
  display: flex; gap: 24px; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding: 20px 48px 40px; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

.message-card {
  flex: 0 0 300px; scroll-snap-align: start;
  background: var(--white); border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  transition: transform 0.4s ease, box-shadow 0.4s ease; cursor: pointer;
}
.message-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(91, 142, 201, 0.15);
}
.message-card-img {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, var(--blue-light), var(--sakura-light));
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.message-card-img img { width: 100%; height: 100%; object-fit: cover; }
.message-card-img.no-img::after { content: '仮画像'; font-size: 13px; color: var(--text-faint); }
.message-card-body { padding: 24px; }
.message-card-name { font-weight: 700; font-size: 15px; margin-bottom: 8px; color: var(--text); }
.message-card-role { font-size: 11px; color: var(--text-faint); letter-spacing: 0.1em; margin-bottom: 16px; }
.message-card-text {
  font-size: 13px; color: var(--text-light); line-height: 1.9;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

.carousel-controls { display: flex; justify-content: center; gap: 16px; margin-top: 24px; }
.carousel-btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--sakura); background: var(--white);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; color: var(--sakura-deep); font-size: 18px;
}
.carousel-btn:hover { background: var(--sakura); color: var(--white); }

.view-all-btn {
  display: block; margin: 40px auto 0; padding: 14px 40px;
  border: 1px solid var(--blue); border-radius: 50px;
  background: transparent; color: var(--blue-deep);
  font-size: 13px; font-weight: 500; letter-spacing: 0.1em;
  cursor: pointer; transition: all 0.3s;
}
.view-all-btn:hover { background: var(--blue-deep); color: white; }
@media (max-width: 768px) {
  .carousel-track {
    padding: 20px 20px 40px;
  }
  .carousel-container {
    padding: 0;
  }
  .message-card {
    flex: 0 0 280px;
    scroll-snap-align: center;
  }
}

/* ------------------------------------------------------------------
   13. Campaign Grid
   ------------------------------------------------------------------ */
#tenth-campaign { background: linear-gradient(180deg, var(--blue-light) 0%, var(--white) 100%); }
.campaign-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px;
}
.campaign-card {
  background: var(--white); border-radius: 20px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.05);
  transition: transform 0.5s ease, box-shadow 0.5s ease; cursor: pointer;
}
.campaign-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 16px 48px rgba(91, 142, 201, 0.12);
}
.campaign-card-img {
  width: 100%; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--sakura-light), var(--blue-light));
  display: flex; align-items: center; justify-content: center; position: relative;
  overflow: hidden;
}
.campaign-card-img img { width: 100%; height: 100%; object-fit: cover; }
.campaign-card-img.no-img::after { content: '施策ビジュアル (仮)'; font-size: 13px; color: var(--text-faint); }
.campaign-card-badge {
  position: absolute; top: 16px; left: 16px;
  padding: 6px 14px; border-radius: 50px;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(10px);
  font-size: 11px; font-weight: 700; color: var(--blue-deep); letter-spacing: 0.05em;
}
.campaign-card-body { padding: 28px; }
.campaign-card-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.campaign-card-desc { font-size: 13px; color: var(--text-light); line-height: 1.9; }
.campaign-card-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 20px;
  font-size: 12px; color: var(--blue-deep); font-weight: 500;
  letter-spacing: 0.05em; transition: gap 0.3s;
}
.campaign-card-link:hover { gap: 12px; }
@media (max-width: 768px) {
  .campaign-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  .campaign-card-body {
    padding: 12px;
  }
}

/* ------------------------------------------------------------------
   14. Timeline
   ------------------------------------------------------------------ */
#tenth-timeline { background: var(--white); }

.timeline-toggle-wrapper { text-align: center; margin-bottom: 40px; }
.timeline-toggle-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 32px; border-radius: 50px;
  border: 1px solid var(--blue); background: transparent;
  color: var(--blue-deep); font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; cursor: pointer; transition: all 0.3s;
}
.timeline-toggle-btn:hover { background: var(--blue-light); }
.timeline-toggle-btn .toggle-icon {
  display: inline-block; transition: transform 0.4s ease; font-size: 12px;
}
.timeline-toggle-btn.is-open .toggle-icon { transform: rotate(180deg); }

.timeline-collapsible {
  max-height: 0; overflow: hidden;
  transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.timeline-collapsible.is-open { max-height: 8000px; }

.timeline-container { position: relative; max-width: 800px; margin: 0 auto; }
.timeline-line {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--blue), var(--sakura));
  transform: translateX(-50%);
}
.timeline-item { position: relative; display: flex; margin-bottom: 64px; }
.timeline-spacer { width: 50%; }
.timeline-item.tl-left .timeline-content { width: 50%; padding-right: 60px; text-align: right; }
.timeline-item.tl-right .timeline-content { width: 50%; padding-left: 60px; text-align: left; }
.timeline-item.tl-left .timeline-img { margin-left: auto; }
.timeline-item.tl-right .timeline-img { margin-right: auto; }
.timeline-content { }
.timeline-dot {
  position: absolute; left: 50%; top: 8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--blue);
  transform: translateX(-50%); z-index: 1;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.timeline-item:hover .timeline-dot {
  background: var(--sakura); border-color: var(--sakura-deep);
  transform: translateX(-50%) scale(1.3);
}
.timeline-year {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 700; color: var(--blue-deep); margin-bottom: 16px;
}
.timeline-body { font-size: 14px; color: var(--text-light); line-height: 1.9; }
.timeline-body p { margin: 0 0 0.8em; }
.timeline-body img {
  max-width: var(--tl-img-max, 280px) !important; width: 100% !important; height: auto !important;
  border-radius: 12px; margin: 8px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.timeline-item.tl-left .timeline-body img { margin-left: auto; display: block; }
.timeline-item.tl-right .timeline-body img { margin-right: auto; display: block; }

@media (max-width: 768px) {
  .timeline-line { left: 20px; }
  .timeline-item, .timeline-item.tl-left, .timeline-item.tl-right { flex-direction: column; }
  .timeline-spacer { display: none; }
  .timeline-item.tl-left .timeline-content,
  .timeline-item.tl-right .timeline-content {
    width: 100%; padding-left: 52px !important; padding-right: 0 !important; text-align: left !important;
  }
  .timeline-dot { left: 20px; }
  .timeline-body img { width: 100% !important; max-width: var(--tl-img-max, 280px) !important; }
  .timeline-item.tl-left .timeline-body img,
  .timeline-item.tl-right .timeline-body img { margin-left: 0; margin-right: 0; }
}

/* ------------------------------------------------------------------
   15. Ending
   ------------------------------------------------------------------ */
.tenth-ending-section { padding-top: 0; margin-top: -40px; }
.timeline-ending { text-align: center; padding: 0 24px 40px; position: relative; }
.timeline-ending-line {
  width: 2px; height: 100px; margin: 0 auto 32px;
  background: linear-gradient(180deg, var(--sakura), transparent);
}
.ending-before .ending-text {
  font-family: 'Zen Antique Soft', serif;
  font-size: clamp(20px, 4vw, 32px); color: var(--blue-deep); line-height: 1.8; margin-bottom: 16px;
}
.ending-before .ending-subtext { font-size: 13px; color: var(--text-faint); letter-spacing: 0.15em; }
.ending-after .ending-text {
  font-family: 'Zen Antique Soft', serif;
  font-size: clamp(20px, 4vw, 32px); color: var(--sakura-deep); line-height: 1.8; margin-bottom: 24px;
}
.ending-after-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 40px; border-radius: 50px;
  background: linear-gradient(135deg, var(--blue-deep), var(--sakura-deep));
  color: white; font-size: 14px; font-weight: 500; letter-spacing: 0.1em;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 8px 24px rgba(232, 122, 158, 0.3);
}
.ending-after-link:hover {
  transform: translateY(-2px); color: white;
  box-shadow: 0 12px 32px rgba(232, 122, 158, 0.4);
}
.ending-after-img-link, .ending-after-img {
  display: block; margin: 24px auto 0; max-width: 600px; text-align: center;
}
.ending-after-img-link img, .ending-after-img img {
  max-width: 100%; height: auto; border-radius: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
  margin: 0 auto;
}
.ending-after-img-link:hover img {
  transform: translateY(-4px); box-shadow: 0 8px 30px rgba(91,142,201,0.3);
}
.hidden-state { display: none; }

/* ------------------------------------------------------------------
   16. Message List Page
   ------------------------------------------------------------------ */
.page-back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 40px; padding: 10px 24px; border-radius: 50px;
  border: 1px solid var(--blue); background: transparent;
  color: var(--blue-deep); font-size: 13px; font-weight: 500;
  letter-spacing: 0.05em; cursor: pointer; transition: all 0.3s;
}
.page-back-btn:hover { background: var(--blue-light); }

.message-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.message-grid .message-card { flex: none; width: 100%; }
@media (max-width: 1024px) { .message-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .message-grid { grid-template-columns: 1fr; } }

/* Message filter (message-all view) */
.msg-filter {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-bottom: 48px;
}
.msg-filter-btn {
  padding: 8px 20px; border-radius: 50px;
  border: 1px solid var(--blue); background: transparent;
  color: var(--blue-deep); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; cursor: pointer; transition: all 0.3s;
}
.msg-filter-btn:hover { background: var(--blue-light); }
.msg-filter-btn.is-active { background: var(--blue-deep); color: white; border-color: var(--blue-deep); }

/* Message grid in message-all view */
#tenth-view-message-all .message-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
#tenth-view-message-all .message-grid .message-card {
  flex: none; width: 100%;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#tenth-view-message-all .message-grid .message-card.is-filtered {
  display: none;
}

.msg-all-back { text-align: center; margin-top: 64px; }

@media (max-width: 1024px) {
  #tenth-view-message-all .message-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  #tenth-view-message-all .message-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   17. Footer
   ------------------------------------------------------------------ */
.tenth-footer {
  background: var(--blue-dark); color: rgba(255,255,255,0.7);
  padding: 64px 24px; text-align: center;
}
.tenth-footer .footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px; font-weight: 900; color: white; margin-bottom: 24px;
  text-align: center;
}
.tenth-footer .footer-logo-img {
  height: 40px; width: auto; margin: 0 auto 24px; display: block;
}
.tenth-footer .footer-links {
  display: flex; justify-content: center; gap: 32px;
  list-style: none; margin-bottom: 32px; flex-wrap: wrap;
}
.tenth-footer .footer-links a {
  color: rgba(255,255,255,0.6); font-size: 12px; letter-spacing: 0.1em; transition: color 0.3s;
}
.tenth-footer .footer-links a:hover { color: var(--sakura); }
.tenth-footer .copyright { font-size: 11px; color: rgba(255,255,255,0.3); letter-spacing: 0.1em; }

/* ------------------------------------------------------------------
   18. Animations & Scroll Reveal
   ------------------------------------------------------------------ */
@keyframes tenthFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes tenthFadeScale {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
.tenth-reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.tenth-reveal.is-visible { opacity: 1; transform: translateY(0); }
.tenth-reveal-left { opacity: 0; transform: translateX(-60px); transition: opacity 0.8s ease, transform 0.8s ease; }
.tenth-reveal-left.is-visible { opacity: 1; transform: translateX(0); }
.tenth-reveal-right { opacity: 0; transform: translateX(60px); transition: opacity 0.8s ease, transform 0.8s ease; }
.tenth-reveal-right.is-visible { opacity: 1; transform: translateX(0); }

/* Floating petals */
.floating-petal {
  position: absolute; width: 12px; height: 12px;
  background: var(--sakura); border-radius: 50% 0 50% 0;
  opacity: 0.15; pointer-events: none; animation: tenthFloatPetal linear infinite;
}
@keyframes tenthFloatPetal {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.15; } 90% { opacity: 0.15; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}
.petal-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* ------------------------------------------------------------------
   19. Popup (Message & Campaign) — Magazine Style
   ------------------------------------------------------------------ */
[data-popup] { cursor: pointer; }
.message-card[data-popup]:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(91,142,201,0.15); }
.campaign-card[data-popup]:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(91,142,201,0.18); }

.popup-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  align-items: center; justify-content: center; padding: 32px;
}
.popup-overlay::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(20, 20, 30, 0.65);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.popup-overlay.is-open { display: flex; }

/* Floating petals */
@keyframes tenthPopupPetal {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-20vh) rotate(360deg); opacity: 0; }
}
.popup-overlay .popup-petal {
  position: absolute; pointer-events: none; z-index: 0;
  border-radius: 50% 0 50% 0;
  background: rgba(242,181,200,0.25);
  animation: tenthPopupPetal linear infinite;
}

/* Close button — outside the modal */
.popup-close {
  position: absolute; z-index: 10;
  top: max(env(safe-area-inset-top, 0px), 12px);
  right: max(env(safe-area-inset-right, 0px), 12px);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s; backdrop-filter: blur(8px);
}
.popup-close:hover {
  background: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.5);
  transform: scale(1.1);
}

/* Modal container */
.popup-modal {
  position: relative; z-index: 1;
  background: var(--white);
  border-radius: 16px;
  max-width: 720px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
  animation: tenthPopupIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes tenthPopupIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero image — full bleed at top */
.popup-inner .popup-hero {
  width: 100%; aspect-ratio: 16 / 10; position: relative;
  overflow: hidden; background: linear-gradient(135deg, var(--blue-light), var(--sakura-light));
}
.popup-inner .popup-hero img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.popup-inner .popup-hero iframe {
  width: 100%; aspect-ratio: 16/9; border: none; display: block;
}
.popup-inner .popup-hero.has-video { aspect-ratio: 16 / 9; }
/* Gradient overlay on bottom of hero for readability */
.popup-inner .popup-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(transparent, rgba(0,0,0,0.04));
  pointer-events: none;
}

/* Article body */
.popup-inner .popup-article {
  padding: 36px 40px 44px; position: relative;
}
/* Accent line at top of article area */
.popup-inner .popup-article::before {
  content: ''; position: absolute; top: 0; left: 40px; right: 40px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--sakura), var(--blue), transparent);
}

.popup-inner .popup-tag {
  display: inline-block; padding: 4px 14px; border-radius: 2px;
  background: var(--blue-deep); color: #fff;
  font-size: 10px; letter-spacing: 0.15em; font-weight: 600;
  margin-bottom: 16px; text-transform: uppercase;
}
.popup-inner .popup-name {
  font-family: 'Zen Antique Soft', serif;
  font-size: 26px; font-weight: 700; color: var(--text);
  line-height: 1.5; margin-bottom: 4px;
}
.popup-inner .popup-role {
  font-size: 12px; color: var(--text-faint); letter-spacing: 0.12em;
  margin-bottom: 28px; font-weight: 400;
}

/* Divider between header and content */
.popup-inner .popup-divider {
  width: 40px; height: 2px; margin-bottom: 28px;
  background: linear-gradient(90deg, var(--blue), var(--sakura));
}

.popup-inner .popup-content {
  font-size: 15px; line-height: 2.1; color: var(--text);
}
.popup-inner .popup-content p { margin: 0 0 1.4em; }
.popup-inner .popup-content img {
  max-width: 100%; height: auto; margin: 20px 0;
}

.popup-inner .popup-action {
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid rgba(91,142,201,0.1);
}
.popup-inner .popup-action a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  background: var(--text); color: #fff;
  font-size: 13px; font-weight: 500; letter-spacing: 0.08em;
  text-decoration: none; transition: all 0.3s;
}
.popup-inner .popup-action a:hover {
  background: var(--blue-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(91,142,201,0.2);
}

/* Scrollbar */
.popup-modal::-webkit-scrollbar { width: 4px; }
.popup-modal::-webkit-scrollbar-track { background: transparent; }
.popup-modal::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15); border-radius: 2px;
}
.popup-modal::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.3); }

@media (max-width: 768px) {
  .popup-overlay { padding: 0 15px; align-items: center; }
  .popup-modal {
    max-width: 100%; max-height: 95vh;
    animation: tenthPopupInMobile 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes tenthPopupInMobile {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
  }
  .popup-close { top: 12px; right: 12px; width: 40px; height: 40px; font-size: 18px; }
  .popup-inner .popup-hero { aspect-ratio: 4 / 3; }
  .popup-inner .popup-article { padding: 28px 24px 36px; }
  .popup-inner .popup-article::before { left: 24px; right: 24px; }
  .popup-inner .popup-name { font-size: 22px; }
  .popup-inner .popup-content { font-size: 14px; }
}

/* ------------------------------------------------------------------
   20. Timeline Banner (トップから年表ページへの導線)
   ------------------------------------------------------------------ */
#tenth-timeline-banner { background: linear-gradient(180deg, var(--white) 0%, var(--sakura-light) 100%); }
.timeline-banner {
  display: block; text-decoration: none;
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(91, 142, 201, 0.12);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.timeline-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 56px rgba(91, 142, 201, 0.22);
}
.timeline-banner-img {
  display: block; width: 100%; height: auto;
  border-radius: 20px;
}

/* ------------------------------------------------------------------
   21. Timeline Page (年表専用ページ)
   ------------------------------------------------------------------ */
.timeline-page-header { padding-top: 140px; }
.timeline-back-wrap { margin: 16px 0 8px; }
.timeline-back-bottom { margin-top: 64px; text-align: center; }
.timeline-back-link {
  display: inline-block; text-decoration: none;
  font-size: 13px; letter-spacing: 0.1em;
  color: var(--blue-deep); padding: 10px 20px;
  border: 1px solid rgba(91, 142, 201, 0.3); border-radius: 50px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.timeline-back-link:hover { background: var(--blue-deep); color: #fff; border-color: var(--blue-deep); }
.timeline-empty { text-align: center; color: var(--text-faint); padding: 80px 0; }

/* ナビ activeマーカー */
#tenth-nav .nav-links a.is-active { color: var(--blue-deep); font-weight: 700; }
#tenth-nav .nav-links a.is-active::after {
  content: ''; display: block; margin: 4px auto 0; width: 18px; height: 2px;
  background: var(--blue-deep); border-radius: 2px;
}

/* ------------------------------------------------------------------
   22. SPA Seamless Transition
   ------------------------------------------------------------------ */
#tenth-main {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.28s ease, transform 0.32s ease;
  will-change: opacity, transform;
  padding: 0 8px;
}
#tenth-main.spa-leaving { opacity: 0; transform: translateY(8px); }
#tenth-main.spa-entering { opacity: 0; transform: translateY(-8px); animation: tenthSpaEnter 0.42s ease forwards; }
@keyframes tenthSpaEnter {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  #tenth-main, #tenth-main.spa-leaving, #tenth-main.spa-entering { transition: none; animation: none; transform: none; }
}

/* ------------------------------------------------------------------
   23. Print & Reduced Motion (V2 structural additions)
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .tenth-reveal,
  .tenth-reveal-left,
  .tenth-reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .tenth-view.fade-out,
  .tenth-view.fade-in {
    animation: none;
  }

  #tenth-loading .loading-logo-img {
    animation: none;
  }

  .scroll-indicator {
    animation: none;
  }
}

@media print {
  #tenth-loading,
  #tenth-nav,
  .popup-overlay,
  .scroll-indicator,
  .carousel-controls,
  #particle-canvas,
  .petal-overlay {
    display: none !important;
  }

  .tenth-section {
    padding: 32px 0;
  }

  .tenth-wrap {
    background: #fff;
  }
}

/* 簡体字のみフォント上書き */
:lang(zh-Hans) body * {
  font-family: "Noto Serif SC", serif!important;
}