/*
Theme Name: まんまるテーマリデザイン
Theme URI: https://troupemanmaru.com/
Author: 劇団まんまる
Description: 劇団まんまる公式サイト専用テーマ。「面白い奴が偉い。」をコンセプトにしたオリジナルデザイン。カスタム投稿タイプ stage（公演）/ member（劇団員）と ACF に対応。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: manmaru
*/

/* =========================================================
   劇団まんまる — Custom Styles
   (Tailwind CDN と併用するカスタムレイヤー)
========================================================= */

:root {
  --brand: #e3007f;
  --brand-dark: #b60066;
  --ink: #171214;
  --paper: #faf6f0;
  --lemon: #ffc531;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

/* 斜めマーキー等のはみ出しを完全に遮断 */
html, body {
  overflow-x: clip;
}

::selection {
  background: var(--brand);
  color: #fff;
}

/* ---------- Preloader ---------- */
#preloader {
  transition: opacity .6s ease, visibility .6s ease;
}
#preloader.is-done {
  opacity: 0;
  visibility: hidden;
}
.loader-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, .15);
  border-top-color: var(--brand);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Custom cursor（ネイティブカーソルの代替） ---------- */
/* マウス環境ではネイティブカーソルを隠し、ブランドカラーの丸を唯一のポインタにする */
@media (pointer: fine) {
  * { cursor: none !important; }
  /* フォーム入力はテキスト選択の使い勝手を優先してネイティブを残す */
  input, textarea, select { cursor: auto !important; }
}
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  /* ピンク背景・暗部でも見えるよう白リングを付ける */
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .75);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: width .2s ease, height .2s ease, opacity .2s ease, background .2s ease;
}
.cursor-dot.is-hover {
  width: 40px;
  height: 40px;
  background: rgba(255, 197, 49, .55);
}
@media (pointer: coarse) {
  .cursor-dot { display: none; }
}

/* ---------- Header ---------- */
#header.is-scrolled {
  background: rgba(250, 246, 240, .9);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(23, 18, 20, .08);
}
#header.is-scrolled .flex { padding-top: .65rem; padding-bottom: .65rem; }

.nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ink);
  transition: color .25s ease;
}
/* ヒーロー(暗部)に被っている間は白文字 */
#header:not(.is-scrolled) .nav-link { color: #fff; }
.nav-link span {
  font-family: "Baloo 2", sans-serif;
  font-size: 9px;
  letter-spacing: .25em;
  color: var(--brand);
}
#header:not(.is-scrolled) .nav-link span { color: var(--lemon); }
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  transform: translateX(-50%) scale(0);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
.nav-link:hover::after { transform: translateX(-50%) scale(1); }

/* Hamburger */
.menu-line {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform .3s ease, opacity .3s ease;
}
#menu-btn.is-open { background: transparent; }
#menu-btn.is-open .menu-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#menu-btn.is-open .menu-line:nth-child(2) { opacity: 0; }
#menu-btn.is-open .menu-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

#mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}
.m-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform .25s ease;
}
.m-link:active { transform: scale(.95); }

/* ---------- Hero ---------- */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  /* 非アクティブ時の基準値をズーム完了値に合わせておくことで、
     is-active が外れた瞬間に拡大率がリセットされて見えるのを防ぐ。
     ズーム時間(9s)はJSのスライド切替間隔と一致させること。 */
  transform: scale(1.08);
  transition: opacity 1.6s ease;
}
.hero-slide.is-active {
  opacity: 1;
  animation: kenburns 9s ease-out forwards;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

/* FVスライド: PC用・スマホ用で別画像。
   URLはCSS変数ではなく子要素のインラインstyleで指定する
   （CSS変数経由のurl()はCSSファイル基準で解決されるブラウザ仕様があり、
     相対パス・file://直開きで画像が読めなくなるため） */
.hero-slide-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}


.spotlight {
  background:
    radial-gradient(ellipse 60% 50% at 30% 35%, rgba(255, 197, 49, .14), transparent 70%),
    radial-gradient(ellipse 45% 40% at 75% 60%, rgba(227, 0, 127, .18), transparent 70%);
}

/* タイトル文字のせり上がり */
#hero-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) rotate(6deg);
  animation: charIn .7s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes charIn {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

.hero-sub {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .9s ease forwards;
  animation-delay: 1.1s;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.scroll-beam {
  display: block;
  width: 100%;
  height: 40%;
  background: var(--lemon);
  animation: beam 1.8s ease-in-out infinite;
}
@keyframes beam {
  0%   { transform: translateY(-150%); }
  100% { transform: translateY(400%); }
}

/* ---------- Marquee ---------- */
.marquee {
  display: flex;
  width: max-content;
}
.marquee span {
  animation: marquee 22s linear infinite;
}
.marquee-slow span { animation-duration: 36s; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ---------- Section common ---------- */
.section-en {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .35em;
  color: var(--brand);
  margin-bottom: .75rem;
}
.section-en::before {
  content: "●";
  font-size: .6rem;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.5); }
}

.section-ttl {
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  line-height: 1.2;
  position: relative;
  display: inline-block;
}
.section-ttl::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -14px;
  width: 64px;
  height: 6px;
  border-radius: 99px;
  background: var(--brand);
}

/* 背景の巨大英字 */
.giant-word {
  position: absolute;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: clamp(6rem, 18vw, 16rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px rgba(23, 18, 20, .06);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.giant-word-light {
  -webkit-text-stroke: 2px rgba(255, 255, 255, .12);
}

/* マーカー下線 */
.marker-line {
  background: linear-gradient(transparent 62%, rgba(255, 197, 49, .85) 62%);
  padding: 0 .1em;
}

/* 水玉背景 */
.dots-bg {
  background-image: radial-gradient(rgba(255, 255, 255, .9) 2px, transparent 2px);
  background-size: 26px 26px;
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-lemon,
.btn-ghost,
.btn-outline,
.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: .95rem;
  padding: .9rem 2.2rem;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 0 var(--brand-dark);
}
.btn-primary:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--brand-dark);
}
.btn-lemon {
  background: var(--lemon);
  color: var(--ink);
  box-shadow: 0 4px 0 #d19b12;
}
.btn-lemon:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #d19b12;
}
.btn-ghost {
  border: 2px solid rgba(255, 255, 255, .7);
  color: #fff;
}
.btn-ghost:hover {
  background: #fff;
  color: var(--ink);
}
.btn-outline {
  border: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover {
  background: var(--ink);
  color: #fff;
}
.btn-line {
  background: #06c755;
  color: #fff;
  box-shadow: 0 4px 0 #049a42;
}
.btn-line:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #049a42;
}

/* キラッと光る */
.shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine {
  0%, 60% { left: -80%; }
  100%    { left: 140%; }
}

/* ---------- About ---------- */
.stat-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.1rem .5rem;
  text-align: center;
  border: 2px solid rgba(23, 18, 20, .06);
  box-shadow: 0 6px 16px rgba(23, 18, 20, .05);
}

.collage-photo {
  position: absolute;
  border-radius: 1rem;
  background: #fff;
  padding: 10px 10px 26px;
  box-shadow: 0 14px 34px rgba(23, 18, 20, .18);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), z-index 0s;
}
.collage-photo:hover {
  transform: scale(1.05) rotate(0deg) !important;
  z-index: 10;
}
.collage-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: .5rem;
  aspect-ratio: 4 / 3;
}
.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 84px;
  height: 26px;
  background: rgba(255, 197, 49, .8);
  opacity: .9;
  border-left: 2px dashed rgba(255, 255, 255, .5);
  border-right: 2px dashed rgba(255, 255, 255, .5);
}

/* ---------- Join ---------- */
.ticket {
  position: relative;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  transform: translateY(-50%);
}
.ticket::before { left: -17px; }
.ticket::after  { right: -17px; }

.speech {
  position: relative;
  display: inline-block;
  align-self: flex-start;
  background: #fff;
  color: var(--ink);
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: clamp(.95rem, 2vw, 1.15rem);
  padding: .9rem 1.6rem;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.speech:hover { transform: scale(1.05) rotate(-1deg); }
.speech::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 30px;
  border-width: 10px 12px 0 0;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}

/* ---------- Blog ---------- */
.blog-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem;
  align-items: center;
  background: #fff;
  border-radius: 1.25rem;
  padding: .75rem;
  border: 2px solid rgba(23, 18, 20, .05);
  transition: transform .25s ease, box-shadow .25s ease;
}
.blog-row:hover {
  transform: translateX(6px);
  box-shadow: 0 10px 24px rgba(23, 18, 20, .08);
}
.blog-row img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: .75rem;
}
.blog-row-ttl {
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: .95rem;
  margin-top: .25rem;
  transition: color .25s ease;
}
.blog-row:hover .blog-row-ttl { color: var(--brand); }

.pop-card {
  position: relative;
  display: block;
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 2px solid rgba(23, 18, 20, .05);
  transition: transform .3s ease, box-shadow .3s ease;
}
.pop-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(23, 18, 20, .12);
}
.pop-card > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.rank {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Footer ---------- */
.f-link {
  color: rgba(255, 255, 255, .75);
  transition: color .25s ease, transform .25s ease;
  display: inline-block;
}
.f-link:hover {
  color: var(--lemon);
  transform: translateX(4px);
}

/* =========================================================
   下層ページ共通
========================================================= */

/* 明色ページではヘッダー文字を最初からインク色に */
#header.on-light .nav-link { color: var(--ink); }
#header.on-light .nav-link span { color: var(--brand); }

/* 現在地表示 */
.nav-link.is-current::after { transform: translateX(-50%) scale(1); }

/* ---------- Page hero ---------- */
.page-hero {
  position: relative;
  padding: 10.5rem 0 5rem;
  overflow: hidden;
}
.page-hero .giant-word {
  top: 4rem;
  right: -2rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .75rem;
  font-weight: 700;
  color: rgba(23, 18, 20, .45);
}
.breadcrumb a { color: var(--brand); }
.breadcrumb a:hover { text-decoration: underline; }

.page-ttl {
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  line-height: 1.15;
  margin-top: 1rem;
}
.page-lead {
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  margin-top: 1.25rem;
  color: rgba(23, 18, 20, .65);
}

/* ---------- Timeline (あゆみ) ---------- */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: repeating-linear-gradient(to bottom, var(--brand) 0 10px, rgba(227, 0, 127, .25) 10px 20px);
}
.timeline-item { position: relative; padding-bottom: 2.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--paper);
  border: 4px solid var(--brand);
}
.timeline-year {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--brand);
  line-height: 1;
}
.timeline-body {
  margin-top: .6rem;
  font-size: .92rem;
  line-height: 1.9;
  color: rgba(23, 18, 20, .8);
}

/* ---------- Activity cards ---------- */
.act-card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem 1.5rem;
  border: 2px solid rgba(23, 18, 20, .06);
  box-shadow: 0 6px 16px rgba(23, 18, 20, .05);
  transition: transform .3s ease, box-shadow .3s ease;
  text-align: center;
}
.act-card:hover {
  transform: translateY(-6px) rotate(-.5deg);
  box-shadow: 0 16px 32px rgba(23, 18, 20, .1);
}
.act-card .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(227, 0, 127, .08);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Stage filter ---------- */
.filter-btn {
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: .85rem;
  padding: .55rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: all .25s ease;
}
.filter-btn:hover { background: rgba(23, 18, 20, .06); }
.filter-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 0 var(--brand-dark);
}

.stage-card-item {
  display: block;
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 2px solid rgba(23, 18, 20, .06);
  transition: transform .3s ease, box-shadow .3s ease, opacity .35s ease;
}
.stage-card-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(23, 18, 20, .12);
}
.stage-card-item.is-hidden { display: none; }
.stage-card-item .thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #efe9e0;
}
.stage-card-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.stage-card-item:hover .thumb img { transform: scale(1.06); }
.cat-badge {
  display: inline-block;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: .68rem;
  padding: .25rem .8rem;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
}
.cat-badge[data-cat="main"]    { background: var(--brand); }
.cat-badge[data-cat="comedy"]  { background: #f5a300; }
.cat-badge[data-cat="reading"] { background: #7b5cd6; }
.cat-badge[data-cat="impro"]   { background: #0aa07f; }
.cat-badge[data-cat="fes"]     { background: #2f6fd6; }
.cat-badge[data-cat="other"]   { background: #6b6462; }

/* ---------- Member cards ---------- */
.member-card {
  display: block;
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #fff;
  border: 2px solid rgba(23, 18, 20, .06);
  transition: transform .3s ease, box-shadow .3s ease;
}
.member-card:hover {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 0 20px 40px rgba(23, 18, 20, .15);
}
.member-card .photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.member-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.member-card:hover .photo img { transform: scale(1.08); }
.member-card .role-en {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: .68rem;
  letter-spacing: .18em;
  background: var(--ink);
  color: var(--lemon);
  padding: .3rem .9rem;
  border-radius: 999px;
}

/* ---------- Steps (入団までの流れ) ---------- */
.step-card {
  position: relative;
  background: #fff;
  border-radius: 1.5rem;
  padding: 2.2rem 1.6rem 1.8rem;
  border: 2px solid rgba(23, 18, 20, .07);
  box-shadow: 0 6px 16px rgba(23, 18, 20, .05);
  height: 100%;
}
.step-num {
  position: absolute;
  top: -22px;
  left: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 var(--brand-dark);
}

/* ---------- FAQ accordion ---------- */
.faq-item {
  background: #fff;
  border-radius: 1.25rem;
  border: 2px solid rgba(23, 18, 20, .07);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  padding: 1.2rem 1.4rem;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: .98rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--ink);
}
.faq-q .q-mark {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.faq-q .chevron {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform .3s ease;
}
.faq-item.is-open .chevron { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.faq-a-inner {
  padding: 0 1.4rem 1.3rem 4.4rem;
  font-size: .92rem;
  line-height: 1.9;
  color: rgba(23, 18, 20, .75);
}

/* ---------- Contact form ---------- */
.form-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .6rem;
}
.req-badge, .opt-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: .15rem .6rem;
  border-radius: 999px;
  color: #fff;
}
.req-badge { background: var(--brand); }
.opt-badge { background: #a8a09b; }
.form-input {
  width: 100%;
  background: #fff;
  border: 2px solid rgba(23, 18, 20, .12);
  border-radius: 1rem;
  padding: .9rem 1.2rem;
  font-size: .95rem;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(227, 0, 127, .12);
}
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 2px solid rgba(23, 18, 20, .15);
  border-radius: 999px;
  padding: .6rem 1.3rem;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: all .25s ease;
  background: #fff;
}
.radio-pill:has(input:checked) {
  border-color: var(--brand);
  background: rgba(227, 0, 127, .07);
  color: var(--brand);
}
.radio-pill input { accent-color: var(--brand); }

/* ---------- Photo gallery (稽古・本番の様子) ---------- */
.gallery-img {
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.gallery-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.gallery-img:hover img { transform: scale(1.07); }

/* =========================================================
   詳細ページ（公演詳細・ブログ詳細）
========================================================= */

/* ---------- 公演情報テーブル ---------- */
.info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 2px solid rgba(23, 18, 20, .07);
}
.info-table th,
.info-table td {
  padding: 1.1rem 1.4rem;
  text-align: left;
  font-size: .92rem;
  line-height: 1.8;
  border-bottom: 1px solid rgba(23, 18, 20, .07);
}
.info-table tr:last-child th,
.info-table tr:last-child td { border-bottom: none; }
.info-table th {
  width: 30%;
  min-width: 110px;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  color: var(--brand);
  background: rgba(227, 0, 127, .05);
  vertical-align: top;
  white-space: nowrap;
}

/* ---------- 演目カード ---------- */
.program-card {
  background: #fff;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 2px solid rgba(23, 18, 20, .06);
  box-shadow: 0 6px 16px rgba(23, 18, 20, .05);
  transition: transform .3s ease, box-shadow .3s ease;
}
.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(23, 18, 20, .1);
}
.program-card .photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.program-card .photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.program-card .photos a { display: block; }
.program-num {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  color: var(--brand);
  font-size: 1.4rem;
  line-height: 1;
}

/* ---------- 動画 ---------- */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--brand);
  background: #000;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- 記事本文 ---------- */
.article-body {
  font-size: 1rem;
  line-height: 2.1;
}
.article-body p { margin-bottom: 1.6em; }
.article-body strong { font-weight: 700; }
.article-body .article-img {
  border-radius: 1.25rem;
  overflow: hidden;
  margin: 2.2em 0;
  box-shadow: 0 10px 30px rgba(23, 18, 20, .12);
}
.article-body .article-img img { width: 100%; display: block; }
.article-body .article-img figcaption {
  font-size: .78rem;
  color: rgba(23, 18, 20, .5);
  text-align: center;
  padding: .6rem 1rem;
  background: #fff;
}

/* 記事内の告知ボックス */
.notice-box {
  background: #fff;
  border: 3px dashed var(--brand);
  border-radius: 1.5rem;
  padding: 2rem 1.8rem;
  margin: 2.5em 0;
  position: relative;
}
.notice-box::before {
  content: "COMING SOON!?";
  position: absolute;
  top: -14px;
  left: 1.5rem;
  background: var(--brand);
  color: #fff;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .2em;
  padding: .3rem 1rem;
  border-radius: 999px;
}

/* ---------- 著者・メタ ---------- */
.author-chip {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: #fff;
  border: 2px solid rgba(23, 18, 20, .08);
  border-radius: 999px;
  padding: .4rem 1.1rem .4rem .5rem;
  font-weight: 700;
  font-size: .85rem;
}
.author-chip img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- シェアボタン ---------- */
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: .85rem;
  padding: .7rem 1.6rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  transition: all .25s ease;
}
.share-btn:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- 前後記事ナビ ---------- */
.post-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 2px solid rgba(23, 18, 20, .07);
  border-radius: 1.25rem;
  padding: 1rem 1.2rem;
  transition: transform .25s ease, box-shadow .25s ease;
}
.post-nav:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(23, 18, 20, .08);
}
.post-nav img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: .6rem;
  flex-shrink: 0;
}


/* ---------- モバイル対応パララックス背景 ----------
   background-attachment: fixed の代替。上下に余白を持たせた背景レイヤーを
   JS（data-parallax）がスクロールに応じてtransformで動かす */
.parallax-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  /* セクション高ではなく「ビューポート＋可動域(上下250px)」に合わせることで、
     縦長セクションでも画像が画面スケールのまま表示される（過剰ズーム防止）。
     可動域を変える場合はJS側の PARALLAX_TRAVEL も合わせて変更すること */
  height: calc(100vh + 500px);
  background-size: cover;
  background-position: center;
  will-change: transform;
}

/* ---------- ライトボックス（data-lightbox属性のリンクをグループ化して拡大表示） ---------- */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(23, 18, 20, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.lb-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lb-figure {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
}
.lb-figure img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.lb-caption {
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: .85rem;
  color: rgba(255, 255, 255, .85);
}
.lb-counter {
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .2em;
  color: var(--lemon);
}
.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: var(--brand);
}
.lb-close { top: 20px; right: 20px; }
.lb-prev  { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Back to top ---------- */
#to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  #hero-title .char { opacity: 1; transform: none; }
  .hero-sub { opacity: 1; transform: none; }
}

/* =========================================================
   WordPress 固有スタイル
========================================================= */

/* ---------- 本文コンテンツ（ブロックエディタ出力） ---------- */
.wp-content h2 {
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  margin: 2em 0 1em;
  padding-bottom: .5em;
  border-bottom: 3px solid var(--brand);
}
.wp-content h3 {
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 1.8em 0 .8em;
  padding-left: .75em;
  border-left: 5px solid var(--brand);
}
.wp-content ul, .wp-content ol { margin: 1.2em 0; padding-left: 1.6em; }
.wp-content ul li { list-style: disc; margin-bottom: .4em; }
.wp-content ol li { list-style: decimal; margin-bottom: .4em; }
.wp-content a { color: var(--brand); text-decoration: underline; }
.wp-content a:hover { opacity: .75; }
.wp-content img { border-radius: 1rem; height: auto; max-width: 100%; }
.wp-content figure { margin: 2em 0; }
.wp-content figcaption { font-size: .78rem; color: rgba(23,18,20,.5); text-align: center; margin-top: .5em; }
.wp-content blockquote {
  border-left: 4px solid var(--brand);
  background: #fff;
  border-radius: 0 1rem 1rem 0;
  padding: 1em 1.4em;
  margin: 1.5em 0;
  color: rgba(23,18,20,.75);
}
.wp-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.wp-content table th, .wp-content table td { border: 1px solid rgba(23,18,20,.12); padding: .7em 1em; }
.wp-content table th { background: rgba(227,0,127,.06); font-weight: 700; }
.wp-content iframe { max-width: 100%; }

/* ---------- ページネーション ---------- */
.blog-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 .8rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font-family: "Baloo 2", "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  color: var(--ink);
  transition: all .25s ease;
}
.blog-pagination .page-numbers:hover { background: rgba(23,18,20,.06); }
.blog-pagination .page-numbers.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 0 var(--brand-dark);
}
.blog-pagination .page-numbers.dots { border: none; }

/* ---------- 公演ギャラリーグリッド（Fancybox組み替え後） ---------- */
.stage-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 768px) {
  .stage-gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
.stage-gallery-grid a {
  display: block;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.stage-gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.stage-gallery-grid a:hover img { transform: scale(1.06); }

/* ---------- フォームプラグイン汎用スタイル（CF7 / MW WP Form等） ---------- */
.manmaru-form input[type="text"],
.manmaru-form input[type="email"],
.manmaru-form input[type="tel"],
.manmaru-form input[type="number"],
.manmaru-form select,
.manmaru-form textarea {
  width: 100%;
  background: #fff;
  border: 2px solid rgba(23, 18, 20, .12);
  border-radius: 1rem;
  padding: .9rem 1.2rem;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.manmaru-form input:focus,
.manmaru-form select:focus,
.manmaru-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(227, 0, 127, .12);
}
.manmaru-form textarea { min-height: 160px; }
.manmaru-form label { font-weight: 700; }
.manmaru-form p { margin-bottom: 1.5rem; }
.manmaru-form input[type="radio"],
.manmaru-form input[type="checkbox"] { accent-color: var(--brand); width: auto; }
.manmaru-form input[type="submit"],
.manmaru-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 1rem 3.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 0 var(--brand-dark);
  transition: transform .2s ease, box-shadow .2s ease;
}
.manmaru-form input[type="submit"]:hover,
.manmaru-form button[type="submit"]:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--brand-dark);
}
/* CF7のバリデーションメッセージ */
.manmaru-form .wpcf7-not-valid-tip { color: var(--brand); font-size: .8rem; margin-top: .3rem; }
.manmaru-form .wpcf7-response-output {
  border: 2px solid var(--brand) !important;
  border-radius: 1rem;
  padding: 1em 1.4em !important;
  font-weight: 700;
}

/* ---------- MW WP Form 出力部品（フォーム内容側のクラスと対応） ---------- */
.manmaru-form .mwform-item { margin-bottom: 1.75rem; }
/* MW WP Formはフィールド群をwpautopの<p>で包むため、
   その<p>をflex化してレイアウトを明示的に制御する */
.manmaru-form .mwform-item p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin: 0;
}
.manmaru-form .mwform-item p.form-label { margin-bottom: .6rem; }
/* wpautopが挿入する<br>を無効化（flex内で崩れの原因になる） */
.manmaru-form .mwform-item br { display: none; }
/* ラジオボタンをピル型に */
.manmaru-form .mwform-radio-field {
  display: inline-block;
  margin: 0 !important;
}
.manmaru-form .mwform-radio-field label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: 2px solid rgba(23, 18, 20, .3);
  border-radius: 999px;
  padding: .6rem 1.3rem;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  background: #fff;
  transition: all .25s ease;
  white-space: nowrap;
}
.manmaru-form .mwform-radio-field label:hover { border-color: rgba(23, 18, 20, .55); }
.manmaru-form .mwform-radio-field label:has(input:checked) {
  border-color: var(--brand);
  background: rgba(227, 0, 127, .07);
  color: var(--brand);
}
.manmaru-form .mwform-radio-field input[type="radio"] {
  accent-color: var(--brand);
  width: auto;
  margin: 0;
}
/* MWデフォルトの横並びマージンを打ち消し */
.manmaru-form .horizontal-item + .horizontal-item { margin-left: 0 !important; }
/* 電話番号: mwform_telの3分割入力を横並びのコンパクトな箱に */
.manmaru-form .mwform-tel-field {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.manmaru-form .mwform-tel-field input[type="text"] {
  width: 6.5em;
  text-align: center;
}
/* 年齢セレクトは全幅だと間延びするため上限を設定 */
.manmaru-form select { max-width: 320px; }
/* バリデーションエラー（flex行内でも必ず独立した行になるよう全幅化） */
.manmaru-form .error {
  display: block;
  flex-basis: 100%;
  color: var(--brand);
  font-weight: 700;
  font-size: .8rem;
  margin-top: .2rem;
}
/* 送信ボタン行（確認画面では戻る/送信の2つ並び） */
.manmaru-form .form-submit {
  text-align: center;
  padding-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
/* 確認画面: 入力値の表示を整える */
.mw_wp_form_confirm .manmaru-form .mwform-item {
  background: #fff;
  border: 2px solid rgba(23, 18, 20, .07);
  border-radius: 1rem;
  padding: 1rem 1.3rem;
}

/* 告知ボックスのブロックスタイル（記事内グループブロック用） */
.wp-content .wp-block-group.is-style-manmaru-notice {
  background: #fff;
  border: 3px dashed var(--brand);
  border-radius: 1.5rem;
  padding: 2rem 1.8rem;
  margin: 2.5em 0;
  position: relative;
}
.wp-content .wp-block-group.is-style-manmaru-notice::before {
  content: "COMING SOON!?";
  position: absolute;
  top: -14px;
  left: 1.5rem;
  background: var(--brand);
  color: #fff;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .2em;
  padding: .3rem 1rem;
  border-radius: 999px;
}

/* ---------- 劇団員詳細: 公演履歴テーブル（本文由来・暗色セクション用） ---------- */
.history-table-wrap figure { margin: 0; }
.history-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}
.history-table-wrap th,
.history-table-wrap td {
  padding: 1rem 1.2rem;
  text-align: left;
  vertical-align: top;
  font-size: .92rem;
  line-height: 1.8;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
/* ヘッダー行（日付／公演名・役割） */
.history-table-wrap tr:first-child th,
.history-table-wrap tr:first-child td {
  font-family: "Baloo 2", "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .15em;
  color: var(--lemon);
  border-bottom: 2px solid rgba(255, 255, 255, .25);
}
/* 日付列 */
.history-table-wrap td:first-child {
  white-space: nowrap;
  font-family: "Baloo 2", "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  color: var(--lemon);
  width: 9em;
}
.history-table-wrap td { color: rgba(255, 255, 255, .9); }
@media (max-width: 640px) {
  .history-table-wrap th,
  .history-table-wrap td { padding: .8rem .6rem; }
  .history-table-wrap td:first-child { width: 7em; white-space: normal; }
}

/* ---------- 管理バー表示時のヘッダー位置調整 ---------- */
body.admin-bar #header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar #header { top: 46px; }
}

/* ---------- 劇団員詳細：本文内のSWELL系ブロックの装飾 ---------- */
/* 名前見出し（本文先頭の is-style-section_ttl） */
.member-content .is-style-section_ttl {
  border: none;
  padding: 0;
  margin: 0 0 .3em;
  text-align: center;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 900;
}
.member-content .swl-marker {
  background: linear-gradient(transparent 62%, rgba(255, 197, 49, .85) 62%);
  padding: 0 .1em;
}
/* ふりがな・役職 */
.member-content .mininote {
  display: block;
  text-align: center;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: rgba(23, 18, 20, .55);
}
/* SNSアイコン（コアのソーシャルリンクブロック） */
.member-content .wp-block-social-links {
  display: flex;
  justify-content: center;
  gap: .8rem;
  padding: 0;
  margin: 1.5rem 0 2rem;
}
.member-content .wp-block-social-links li { list-style: none; margin: 0; }
.member-content .wp-block-social-link-anchor {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: transform .25s ease, background .25s ease;
}
.member-content .wp-block-social-link-anchor:hover {
  background: var(--brand);
  transform: translateY(-3px);
}
.member-content .wp-block-social-link-anchor svg { fill: currentColor; }
.member-content .wp-block-social-link-label { display: none; }

/* ---------- タブ切替（トップ：新着/人気記事）
   ボタンと誤認されないよう、コンテンツに接続した下線式タブにする ---------- */
.tab-nav {
  display: flex;
  gap: .5rem;
  border-bottom: 2px solid rgba(23, 18, 20, .12);
}
.tab-btn {
  position: relative;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: .5rem 1.25rem .95rem;
  border: none;
  background: transparent;
  color: rgba(23, 18, 20, .45);
  cursor: pointer;
  transition: color .25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tab-btn .tab-en {
  font-family: "Baloo 2", sans-serif;
  font-size: .6rem;
  letter-spacing: .25em;
}
.tab-btn:hover { color: var(--ink); }
/* アクティブタブ: 濃色テキスト＋境界線に重なる太い下線 */
.tab-btn.is-active { color: var(--ink); }
.tab-btn.is-active .tab-en { color: var(--brand); }
.tab-btn::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -2px;
  height: 4px;
  border-radius: 99px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}
.tab-btn.is-active::after { transform: scaleX(1); }
.tab-panel { display: none; }
.tab-panel.is-active {
  display: block;
  animation: tabIn .35s ease;
}
@keyframes tabIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
