/* ==========================================================================
   1. Base & Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: "fot-tsukuardgothic-std", sans-serif, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

/* ==========================================================================
   2. Layout Components (Scroll / Screens / Background)
   ========================================================================== */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, #897DB2 0%, #93C4DE 100%);
}

.scroller {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: none;
  overflow-anchor: none;
}

.screen {
  height: 100vh;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
}

/* ==========================================================================
   3. Home Section (Viewport / Stage / Stickers)
   ========================================================================== */
.viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: transparent;
}

.stage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: top left;
}

.bg {
  position: absolute; 
  top: 0;
  left: 0;
  width: 1440px; /* ここを制作時のデザイン（Figma等）の横幅に固定する */
  height: 900px; /* ここを制作時のデザインの縦幅に固定する */
  z-index: 1;
  background-image: url("../assets/web.png");
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: contain; /* 100% 100% ではなく contain に */
  pointer-events: none;
}

/* Stickers */
.sticker {
  position: absolute;
  z-index: 2;
  display: block;
  transition: opacity .18s ease, filter .18s ease;
}

.sticker img {
  width: 100%;
  height: 100%;
  display: block;
}

/* Spotlight Effect */
.viewport.spotlight .bg {
  filter: brightness(.55) saturate(.9);
  transition: filter .18s ease;
}

.viewport.spotlight .sticker:not(.active) {
  opacity: .35;
}

.sticker.active {
  opacity: 1 !important;
}

/* Edit Mode */
.viewport.edit .sticker {
  outline: 2px dashed rgba(255,255,255,.8);
  outline-offset: 4px;
  cursor: move;
}

.viewport.edit .sticker::after {
  content: "";
  position: absolute;
  right: -10px; bottom: -10px;
  width: 16px; height: 16px;
  background: rgba(255,255,255,.9);
  border-radius: 3px;
}



/* ==========================================================================
   4. ABOUT Section
   ========================================================================== */
#about {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.about-stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#about .about-wrap {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(22px, 5vw, 72px);
  padding-bottom: 32px;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: auto;
  min-height: 0;
}

#about.is-scrollable .about-wrap {
  overflow-y: auto;
}

/* Layout */
.about-left {
  flex: 0 0 min(440px, 46vw);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 48px;
  min-height: 0;
}

.about-right {
  flex: 1;
  min-width: 0;
  min-height: 0;
  color: rgba(0,0,0,.86);
  margin-top: -20px;
}

/* Decoration Stars */
.about-star {
  position: absolute;
  width: 123px;
  height: 95px;
  object-fit: contain;
  display: block;
}

.about-star.star-1 { top: 10%; right: 7%; transform: rotate(8deg); }
.about-star.star-2 { bottom: 10%; left: 6%; transform: rotate(-10deg); }

/* Typography */
.about-title {
  margin: 0 0 18px 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: .04em;
}

.about-basic {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.about-line {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.about-label {
  width: 64px;
  font-weight: 700;
  opacity: .75;
}

.about-value {
  font-weight: 600;
}

/* Photo Card */
.photo-card {
  position: relative;
  width: min(420px, 42vw);
  max-width: 480px;
  background: #fff;
  padding: 16px 16px 64px;
}

.about-photo {
  width: 100%;
  height: auto;
  display: block;
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 10px 10px 58px 10px;
  border: 1px solid rgba(0,0,0,.06);
  pointer-events: none;
}

.photo-card .tape {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 150px;
  height: 44px;
  background: #e9dfc9;
  z-index: 3;
  background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.05) 0px, rgba(0,0,0,.05) 2px, rgba(255,255,255,.08) 2px, rgba(255,255,255,.08) 7px);
}

.photo-card .tape::before,
.photo-card .tape::after {
  content: "";
  position: absolute;
  top: 0;
  width: 10px;
  height: 100%;
  opacity: .22;
  background: radial-gradient(circle at 2px 6px, rgba(0,0,0,.18) 2px, transparent 3px) repeat-y;
  background-size: 10px 12px;
}

.photo-card .tape::before { left: -6px; }
.photo-card .tape::after { right: -6px; transform: scaleX(-1); }

/* UI Elements (Toggles / Blocks) */
.about-toggle {
  margin: 14px 0;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(0,0,0,.08);
}

.about-toggle > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.about-toggle > summary::-webkit-details-marker { display: none; }

.about-toggle > summary::before {
  content: "▸";
  display: inline-block;
  width: 1em;
  color: rgba(0,0,0,.65);
  transform: translateY(1px);
  transition: transform .18s ease;
}

.about-toggle[open] > summary::before {
  transform: rotate(90deg) translateY(1px);
}

.sum-left {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.sum-title { font-weight: 800; }
.sum-tags { font-weight: 600; opacity: .75; }

.toggle-body {
  padding: 0 14px 14px 14px;
  margin-left: calc(1em + 10px);
  line-height: 1.75;
  font-weight: 500;
  white-space: pre-line;
}

.about-block {
  margin-top: 14px;
  padding: 14px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.08);
}

.block-title { font-weight: 800; margin-bottom: 8px; }
.block-body { line-height: 1.8; }
.about-mail { color: inherit; text-decoration: underline; text-underline-offset: 4px; }

/* ==========================================================================
   5. HOBBY Section (Film Carousel)
   ========================================================================== */
#hobby {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hobby-wrap {
  width: 100%;
  height: 100%;
  padding: clamp(18px, 4vw, 64px);
  color: rgba(255,255,255,.92);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 2.4vh, 26px);
}

.hobby-title {
  margin: 40px 0 10px 0 !important; 
  
  /* 文字自体の位置を左寄せ */
  text-align: left !important;

  /* ABOUTセクションと全く同じ余白計算を適用 */
  padding-left: clamp(22px, 5vw, 72px); 
  
  font-size: clamp(26px, 3.2vw, 42px);
  letter-spacing: .06em;
  width: 100%;
  box-sizing: border-box;
}

/* Film Frame */
.film {
  position: relative;
  width: 100vw;
  height: min(660px, 70vh);
  margin-left: calc(50% - 50vw);
  background: rgba(10,10,12,.92);
  padding: 78px clamp(20px, 5vw, 72px) 70px;
  box-sizing: border-box;
  overflow: hidden;
}

.film::before {
  content: "MONOFILM A601    21A    MONOFILM A601    MONOFILM A601";
  position: absolute;
  top: 18px;
  left: 22px;
  right: 22px;
  color: rgba(255,255,255,.65);
  font-size: 12px;
  letter-spacing: .14em;
  opacity: .9;
  white-space: nowrap;
  overflow: hidden;
}

.film::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(255,255,255,.22) 2px, transparent 3px) left 26px top 90px / 26px 26px repeat-y,
    radial-gradient(circle, rgba(255,255,255,.22) 2px, transparent 3px) right 26px top 90px / 26px 26px repeat-y;
  opacity: .95;
}

/* Film Carousel Item */
.film-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(320px, 44vw, 780px);
  aspect-ratio: 16 / 10;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 22px;
  overflow: hidden;
  opacity: .74;
  filter: saturate(.95) brightness(.95);
  transition: transform .38s ease, filter .38s ease, opacity .38s ease;
  will-change: transform;
  isolation: isolate;
}

.film-item img { width: 100%; height: 100%; display: block; object-fit: cover; }

.film-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  pointer-events: none;
  font-family: "fot-tsukuardgothic-std", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: clamp(20px, 2.4vw, 34px);
  font-weight: 800;
  letter-spacing: .08em;
  color: rgba(255,255,255,.92);
  text-shadow: 0 10px 26px rgba(0,0,0,.55);
}

.film-item::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0,0,0,.18); }

/* Positions */
.film-item.pos-center { z-index: 3; transform: translate(-50%, -50%) scale(1.06); opacity: 1; filter: none; }
.film-item.pos-left { z-index: 2; transform: translate(-50%, -50%) translateX(clamp(-760px, -42vw, -520px)) scale(.92); }
.film-item.pos-right { z-index: 2; transform: translate(-50%, -50%) translateX(clamp(520px, 42vw, 760px)) scale(.92); }
.film-item:focus-visible { outline: 3px solid rgba(255,255,255,.65); outline-offset: 4px; }

/* ==========================================================================
   6. CONTACT Section (最終修正版：左寄せ・ズレ解消)
   ========================================================================== */

#contact {
  min-height: 100vh;
  display: flex;
  align-items: center;    
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#contact .contact-container {
  width: 90%;
  max-width: 900px; /* フォームの最大幅 */
  margin: 0 auto;
  z-index: 10;
  display: block; /* 中央寄せを解除して縦に並べる */
}

#contact .contact-title-side {
  writing-mode: horizontal-tb !important;
  font-family: "fot-tsukuardgothic-std", sans-serif !important;
  font-size: clamp(32px, 4vw, 48px) !important;
  color: #ffffff !important;
  margin-bottom: 30px !important;
  text-align: left !important; /* 左寄せに変更 */
  letter-spacing: 0.1em;
  font-weight: 800;
  display: block;
}

#contact .contact-form-modern {
  width: 100%;
  background: rgba(0, 0, 0, 0.2); 
  padding: clamp(25px, 5vw, 50px);
  border-radius: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box; /* これがないと枠線がズレます */
}

/* お名前・メールの横並び */
@media screen and (min-width: 769px) {
  #contact .contact-row {
    display: flex; 
    gap: 30px;
    margin-bottom: 5px;
  }
}

.contact-group {
  flex: 1;
  margin-bottom: 25px;
  text-align: left;
}

.contact-label-white {
  display: block;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-family: "fot-tsukuardgothic-std", sans-serif !important;
}

/* 入力ボックスのカクカク（ズレ）を直す設定 */
#contact .contact-input-modern {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 15px;
  color: #fff;
  font-family: "fot-tsukuardgothic-std", sans-serif !important;
  outline: none;
  box-sizing: border-box; /* 必須：パディングを含めた幅計算にする */
  display: block;
}

#contact textarea.contact-input-modern {
  resize: none; /* 勝手に大きくならないように固定 */
}

.contact-btn-white {
  background: #ffffff;
  color: #333;
  font-weight: 800;
  padding: 14px 60px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: "fot-tsukuardgothic-std", sans-serif !important;
  transition: transform 0.2s, background-color 0.2s;
  display: inline-block;
}

.contact-btn-white:hover {
  transform: translateY(-2px);
  background-color: #f0f0f0;
}
/* ==========================================================================
   7. VIDEO BASE Section (Work Pages)
   ========================================================================== */
body.video-bg {
  margin: 0;
  background: #000;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(to bottom, #897db2 0px, #2a1966 151px, #2a1966 calc(100% - 120px), #897db2 100%) !important;
  background-attachment: fixed !important; /* スクロールしても背景を固定 */
}

.video-page {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 64px);
  padding-bottom: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
  /* backgroundの指定を削除、または透明にする */
  background: transparent !important; 
  position: relative;
  z-index: 1; /* 星より手前に設定 */
}

.video-content {
  position: relative;
  z-index: 2;
  width: min(1100px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-title {
  margin: 8px 0 18px;
  font-size: clamp(26px, 3.2vw, 42px);
  letter-spacing: .06em;
  color: rgba(255,255,255,.92);
  text-align: center;
  font-family: "fot-tsukuardgothic-std", sans-serif;
}

.video-wrap { width: 100%; margin: 18px auto 0; }

.video-player {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  max-height: 70vh;
  background: transparent;
}

/* Theater Style */
.theater-stage {
  width: min(820px, 86vw);
  position: relative;
  padding: 8% 6% 10%;
}

.theater-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url("../assets/gaku.png") center / contain no-repeat;
  pointer-events: none;
}

/* Video Typography */
.video-work-title {
  width: min(900px, 92vw);
  margin: 0 auto;
  text-align: center;
  color: rgba(255,255,255,.92);
  letter-spacing: .10em;
  font-family: "fot-tsukuardgothic-std", sans-serif;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
}

.video-desc {
  width: min(880px, 92vw);
  margin: 18px auto 0;
  color: rgba(255,255,255,.9);
}

.video-desc p {
  margin: 0;
  line-height: 1.9;
  letter-spacing: .04em;
  font-weight: 500;
  font-family: "fot-tsukuardgothic-std", sans-serif;
  font-size: clamp(14px, 1.2vw, 16px);
  text-align: justify;
}

/* ==========================================================================
   8. VIDEO 2-COLUMN LAYOUT (Side-by-Side Sections)
   ========================================================================== */
.video-2col {
  width: 92vw;
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin: 100px auto 0;
}

/* Left Column */
.video-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
  margin-left: -150px;
}

.yt-side-block {
  width: 100%;
  margin-top: 90px;
  color: rgba(255,255,255,.92);
}

.yt-title {
  margin: 0 0 20px 0;
  font-size: clamp(16px, 1.6vw, 18px);
  font-weight: 800;
  letter-spacing: .06em;
}

.yt-desc {
  margin: 0;
  line-height: 1.9;
  font-weight: 500;
  font-size: clamp(14px, 1.2vw, 16px);
  text-align: justify;
  letter-spacing: .04em;
}

/* Right Column */
.video-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding-left: clamp(12px, 2vw, 28px);
  color: rgba(255,255,255,.92);
  min-width: 0;
}

.video-right .video-desc {
  width: 100%;
  max-width: 680px;
  text-align: justify;
  letter-spacing: .04em;
  margin: 0;
}

/* YouTube Thumbnail */
.yt-thumb-link {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 170px 30% 0 auto;
  text-decoration: none;
}

.yt-thumb {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
  transition: transform .18s ease, filter .18s ease;
}

.yt-thumb-link:hover .yt-thumb { transform: translateY(-2px); filter: brightness(1.05); }

/* Note Section Specific Styles */
.video-left .note-thumb-link {
  display: block;
  width: 100%;
  max-width: 520px;
  margin-top: 150px;
  text-decoration: none;
}

.video-left .note-thumb {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
  transition: transform .18s ease, filter .18s ease;
}

.video-right .note-side-block { width: 100%; margin-top: 150px; color: rgba(255,255,255,.92); }
.note-title { margin: 0 0 30px 0; font-size: clamp(16px, 1.6vw, 18px); font-weight: 800; letter-spacing: .06em; }
.note-desc { margin: 0; line-height: 1.9; font-weight: 500; font-size: clamp(14px, 1.2vw, 16px); text-align: justify; letter-spacing: .04em; font-feature-settings: "palt"; word-break: break-all; }

/* Haru Image Specialized */
.haru-container { width: 100%; max-width: 520px; margin: 100px 0 0 0; text-align: left; }
.haru-img { width: 100%; height: auto; margin-left: 0 !important; margin-right: auto !important; }
.haru-text-block { width: 100%; margin-top: 100px; text-align: left; }
.haru-container a { display: block; transition: transform 0.3s ease, filter 0.3s ease; }
.haru-container a:hover { transform: translateY(-5px); filter: brightness(1.1); }

/* Layout Adjustments (Snow Title etc.) */
.video-2col .video-right .video-work-title,
.video-2col .video-right .video-desc {
  margin-left: -40px !important;
  text-align: left !important;
  width: 100% !important;
  max-width: 720px !important;
}

/* ==========================================================================
   DANCE PAGE OPTIMIZED (最終統合版)
   ========================================================================== */

/* 1. HTML/BODYのスクロールロックを解除 (ダンスページのみ) */
html:has(.dance-page-body), 
html:has(.dance-page-body) body {
  overflow: auto !important;
  height: auto !important;
}

/* 2. 背景とスクロールの基本設定 */
.dance-page-body {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  min-height: 100vh !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box;

  /* 背景グラデーション設定 */
  background: linear-gradient(
    to bottom, 
    #cde2e7 0px, 
    #051637 151px, 
    #051637 calc(100% - 120px), 
    #cde2e7 100%
  ) !important;
  background-attachment: scroll !important;
}

/* 3. 不要な背景レイヤーを隠す */
.dance-page-body .bg-gradient,
.dance-page-body .video-page {
  display: none !important;
}

/* 4. タイトル（ダンス）の位置と装飾 */
.dance-main-title {
  margin: 8px 0 18px;
  font-size: clamp(26px, 3.2vw, 42px);
  letter-spacing: .06em;
  color: rgba(255,255,255,.92);
  text-align: center;
  font-family: "fot-tsukuardgothic-std", sans-serif;
}

/* 5. 動画ステージの設定 */
.theater-stage.no-gaku {
  width: min(820px, 86vw);
  margin: 50px auto !important;
  padding: 0;
  background: none;
  position: relative;
}

.theater-stage.no-gaku::after {
  display: none !important;
}

.theater-stage.no-gaku .video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

/* 6. テキストブロック（Rougelatte 等） */
.dance-text-block {
  width: min(820px, 86vw);
  margin: 30px auto 100px;
  text-align: left;
}

.dance-text-block .note-title {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #ffffff;
}

.dance-text-block .note-desc {
  font-size: 1rem;
  line-height: 1.8;
  color: #f0f0f0;
}

.ticket-back {
  display: inline-block;
  margin: 28px auto 0;
  background: transparent;
  border: 0;
  text-decoration: none;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.ticket-back img { width: min(720px, 112vw); height: auto; display: block; }

.ticket-back:hover { transform: translateY(-5px); filter: brightness(1.2); }
.ticket-back:active { transform: translateY(-1px); filter: brightness(1.0); }

/* ==========================================================================
   10. Components (Tickets / Stars / Special Effects)
   ========================================================================== */

/* Ticket Back Button */
.ticket-back {
  display: inline-block;
  margin: 28px auto 0;
  background: transparent;
  border: 0;
  text-decoration: none;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.ticket-back img { width: min(720px, 112vw); height: auto; display: block; }

.ticket-back:hover { transform: translateY(-5px); filter: brightness(1.2); }
.ticket-back:active { transform: translateY(-1px); filter: brightness(1.0); }

/* Snowdome Styling */
.snowdome {
  width: min(350px, 45vw);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
  margin-left: -50px;
}

.snowdome-video { width: 100%; height: 100%; object-fit: cover; display: block; transform: translateZ(0); }
.snowdome-video::-webkit-media-controls { display: none !important; }

/* ==========================================================================
   12. Overrides & Specific Fixes
   ========================================================================== */
.video-2col .video-left { align-items: flex-start !important; text-align: left !important; margin-left: 0 !important; padding-left: 0 !important; }
.video-2col .video-left .work-title,
.video-2col .video-right .video-work-title { text-align: left !important; width: 100% !important; margin-left: 0 !important; padding-left: 0 !important; }
.video-2col .video-left .yt-side-block,
.video-2col .video-right .video-desc { text-align: justify !important; margin-left: 0 !important; padding-left: 0 !important; }

/* Transition Helpers */
.page-flash { position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0; background: rgba(255,255,255,0); mix-blend-mode: screen; }
.is-transitioning { cursor: progress; }
.is-transitioning .scroller { pointer-events: none; }
.film.is-shutter { filter: brightness(.92) saturate(.98); }
.film-item.is-expose { filter: brightness(1.06) contrast(1.02) saturate(1.02); }

/* --- 流れ星のアニメーション本体 --- */
@keyframes animate {
  0% {
    transform: rotate(315deg) translateX(0);
    opacity: 0;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: rotate(315deg) translateX(-1000px);
    opacity: 0;
  }
}

/* --- チケットボタン（ticket2.png）の調整 --- */
.ticket-back {
  display: inline-block;
  margin: 40px auto 100px; /* 下に余白を多めに取る */
  cursor: pointer;
  transition: transform 0.3s ease;
}

.ticket-back img {
  width: min(600px, 95vw); /* サイズはお好みで調整してください */
  height: auto;
}

.ticket-back:hover {
  transform: scale(1.05); /* ホバーで少し大きく */
}

/* ==========================================================================
   流れ星 統合版（どのページでも動く設定）
   ========================================================================== */
@keyframes shooting-animate {
  0% {
    transform: rotate(315deg) translateX(0);
    opacity: 0;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: rotate(315deg) translateX(-1000px);
    opacity: 0;
  }
}

.shooting-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0; /* 背景に配置。もし消えたら 0 か 1 に上げてください */
  pointer-events: none;
  overflow: hidden;
}

.shooting-stars span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff, 0 0 20px #fff;
  animation: shooting-animate 3s linear infinite;
  opacity: 0;
}

.shooting-stars span::before {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 300px;
  height: 1px;
  background: linear-gradient(90deg, #fff, transparent);
}

/* 各星の配置（ここがないと一箇所に固まります） */
.shooting-stars span:nth-child(1) { top: 10%; left: 80%; animation-delay: 0s; }
.shooting-stars span:nth-child(2) { top: 20%; left: 40%; animation-delay: 1s; }
.shooting-stars span:nth-child(3) { top: 0%; left: 100%; animation-delay: 2s; }
.shooting-stars span:nth-child(4) { top: 15%; left: 90%; animation-delay: 1.5s; }
.shooting-stars span:nth-child(5) { top: 30%; left: 50%; animation-delay: 3s; }
.shooting-stars span:nth-child(6) { top: 40%; left: 20%; animation-delay: 0.5s; }
.shooting-stars span:nth-child(7) { top: 5%; left: 70%; animation-delay: 4s; }
.shooting-stars span:nth-child(8) { top: 25%; left: 30%; animation-delay: 2.5s; }
.shooting-stars span:nth-child(9) { top: 50%; left: 90%; animation-delay: 1.2s; }
.shooting-stars span:nth-child(10) { top: 0%; left: 20%; animation-delay: 5s; }

.video-content, 
.dance-text-block, 
.theater-stage,
.ticket-back {
  position: relative; 
  z-index: 10; /* 星(-1)や背景(-2)よりずっと手前へ */
}

/* 共通の準備中スタイル */
.sticker.coming-soon {
  filter: brightness(0.4) grayscale(0.3); /* 明るさを40%に、少し色を抜く */
  cursor: default !important;           /* 指マークを禁止 */
  pointer-events: none;                 /* クリック判定を完全に無効化 */
  position: absolute;                   /* 位置指定(data-x等)が効くように保持 */
}

/* ホバー時に明るくなるエフェクトなどを無効化 */
.sticker.coming-soon:hover {
  filter: brightness(0.4) grayscale(0.3) !important;
  opacity: 1 !important;
  transform: none !important; /* 他のJS等で動く場合も止める */
}

/* 「Coming soon...」というテキストを画像の上に重ねる（任意） */
.sticker.coming-soon::after {
  content: "Coming soon...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-family: "fot-tsukuardgothic-std", sans-serif;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
  white-space: nowrap;
  opacity: 0.8;
}

/* --- 既存のコードの末尾、@mediaが始まる手前あたりから下をこれに差し替え --- */

/* 1. 全ページ共通の基本設定 */
html, body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* 2. ホーム画面（viewportがあるページ）専用：JSでの縮小を助ける設定 */
.viewport {
  height: 100vh !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;  /* 横幅を固定 */
  height: 100vh; /* 高さを固定 */
  transform-origin: top left;
}


/* 3. スマホ・タブレット（共通）のレスポンシブ設定 */
@media (max-width: 900px) {
  
  /* --- ABOUTページを縦にする --- */
  #about .about-wrap {
    flex-direction: column !important; /* 強制的に縦並び */
    padding: 40px 20px !important;
    height: auto !important;
    overflow-y: visible !important;
  }

  .about-left, .about-right {
    width: 100% !important;
    flex: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .photo-card {
    width: 80% !important;
    max-width: 400px;
    margin: 0 auto 40px !important;
  }

  /* --- HOBBYページ（フィルム）の重なりを解消 --- */
  .film {
    height: 60vh !important;
    padding: 40px 10px !important;
  }

  .film-item {
    width: 90vw !important; /* 画面幅いっぱいに */
  }

  /* 左右のフィルムを画面外に飛ばして、中央だけ見せる */
  .film-item.pos-left { transform: translate(-50%, -50%) translateX(-150%) scale(0.7) !important; }
  .film-item.pos-right { transform: translate(-50%, -50%) translateX(150%) scale(0.7) !important; }
}

/* 4. さらに小さいスマホ用の微調整 */
@media (max-width: 480px) {
  .about-right h2 { font-size: 24px; }
  .about-desc { font-size: 14px; }
}

/* PCではスマホ用ステッカーを隠す */
.mobile-stickers {
  display: none;
}

/* スマホ版の設定 */
@media (max-width: 768px) {
  .m-sticker.coming-soon {
    filter: brightness(0.4) grayscale(0.3) !important; /* 暗くする */
    cursor: default !important;
    pointer-events: none !important; /* タップしても反応しないようにする */
  }

  /* 「Coming soon...」という文字を画像の中央に表示 */
  .m-sticker.coming-soon::after {
    content: "Coming soon...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 10px; /* スマホ用に少し小さく調整 */
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 0 5px rgba(0,0,0,1);
    opacity: 0.9;
    z-index: 102;
  }

  html {
  scroll-behavior: smooth;
  }

/* スマホ版でスクロール先が隠れないように調整（必要に応じて） */
#about, #hobby, #contact {
  scroll-margin-top: 20px; /* ヘッダーなどがある場合に重なりを防ぐ余白 */
}
  .mobile-stickers {
    display: block; /* スマホの時だけ表示 */
    position: absolute;
    inset: 0;
    z-index: 100;
  }

  .m-sticker img {
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  /* 例：Aboutステッカーの位置（%で指定するとズレにくい） */
  .m-sticker:nth-child(1) {
    top: 12% !important; 
    left: 0% !important;
    width: 77% !important;
  }

  .m-sticker {
    position: absolute;
    display: block;
    max-width: none !important; /* 以前の制限を確実に解除 */
    transition: transform 0.2s;
  }

  /* 例：Hobbyステッカーの位置 */
  .m-sticker:nth-child(2) {
    top: 53%;
    left: 54%;
    width: 45%;
  }

  /* 例：Projectステッカーの位置 */
  .m-sticker:nth-child(3) {
    bottom: 15%;
    left: 3%;
    width: 50%;
  }

  /* タップした時に少し沈む演出（UX向上） */
  .m-sticker:active {
    transform: scale(0.95);
  }

  #about {
    height: auto !important; 
    min-height: 0 !important;
    padding-bottom: 0 !important;
  }

  /* 2. 中のラッパーも縦に伸びるように設定 */
  #about .about-wrap {
    height: auto !important;
    padding-bottom: 20px !important;
  }

  /* 3. 各パーツの幅を調整 */
  .about-left, .about-right {
    width: 100% !important;
    display: block !important;
    margin-bottom: 30px;
  }

  /* 4. 写真カードのサイズ調整 */
  .photo-card {
    width: 90% !important;
    margin: 0 auto 40px !important;
  }

  #hobby {
    height: auto !important;
    min-height: 0 !important;
    padding: 40px 0 !important;
    display: block !important;
  }

  .hobby-wrap {
    height: auto !important;
    padding: 0 !important;
    display: block !important;
  }

  /* --- 3. フィルムの土台：ここが重要 --- */
  .film {
    position: relative !important;
    width: 100% !important;
    height: auto !important; /* 中身に合わせて伸びるように */
    min-height: 400px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important; /* フィルム同士の間隔 */
    padding: 60px 0 !important; /* 上下のフィルム穴の余白 */
    background: #0a0a0c !important;
    overflow: visible !important;
  }

  /* --- 4. フィルム1枚ずつの設定：位置をリセット --- */
  .film-item {
    position: relative !important; /* 浮いているのをやめて、順番に並べる */
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 90vw !important; /* 画面幅の90% */
    max-width: 500px;
    aspect-ratio: 16 / 10; /* 横長を維持 */
    margin: 0 auto !important;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
  }

  /* PC版の特殊な位置計算をすべて無効化 */
  .film-item.pos-left, 
  .film-item.pos-right,
  .film-item.pos-center {
    position: relative !important;
    transform: none !important;
    margin: 0 auto !important;
  }

  /* フィルムの穴の装飾を縦にリピート */
  .film::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(circle, rgba(255,255,255,.2) 3px, transparent 4px) left 15px top 0 / 20px 30px repeat-y,
      radial-gradient(circle, rgba(255,255,255,.2) 3px, transparent 4px) right 15px top 0 / 20px 30px repeat-y !important;
  }
}

@media (max-width: 768px) {
  /* 共通：仕切りを透明化して自由に並べ替える */
  .video-2col, .video-left, .video-right, .video-content, .dance-text-block {
    display: contents !important;
  }

  /* 全体の土台を一本の柱にする */
  body.video-bg, .video-page, .dance-page-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  @media (max-width: 768px) {
  /* --- 1. 土台の共通設定 --- */
  /* --- 1. 親要素の仕切りを透明化（バラバラに並べ替え可能にする） --- */
  .video-2col, .video-left, .video-right, .video-text, 
  .yt-side-block, .note-side-block, .dance-text-block {
    display: contents !important;
  }

  /* 土台を一列のフレックスボックスにする */
  .video-content, .video-page, .dance-page-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* --- 2. 映像制作ページ (video-page) の順番 --- */
  .video-page .video-title { order: 1 !important; font-size: 32px !important; margin: 40px 0 20px !important; }
  .video-page .theater-stage:not(.no-gaku) { order: 2 !important; }
  .video-page .video-work-title:first-of-type { order: 3 !important; }
  .video-page .video-desc:first-of-type { order: 4 !important; margin-bottom: 80px !important; }

  /* Snowセクション */
  .video-page .video-right .video-work-title { order: 10 !important; }
  .video-page .snowdome { order: 11 !important; margin: 20px auto !important; }
  .video-page .video-right .video-desc { order: 12 !important; margin-bottom: 80px !important; }

  /* インド研修セクション */
  .video-page .yt-title { order: 20 !important; }
  .video-page .yt-thumb-link { order: 21 !important; margin: 20px auto !important; }
  .video-page .yt-desc { order: 22 !important; margin-bottom: 80px !important; }

  /* Noteセクション */
  .video-page .note-title { order: 30 !important; }
  .video-page .haru-container { order: 31 !important; margin: 20px auto !important; }
  .video-page .note-desc { order: 32 !important; margin-bottom: 80px !important; }

  /* --- 3. ダンスページ (dance-page-body) の順番 --- */
  .video-2col, .video-left, .video-right, .video-text, 
  .yt-side-block, .note-side-block, .dance-text-block {
    display: contents !important;
  }

  /* 親要素を一本の柱にする */
  .video-content, .video-page, .dance-page-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* --- ページごとの順番指定 --- */
  /* 映像制作 */
  .video-page .video-title { order: 1 !important; }
  .video-page .theater-stage { order: 2 !important; }
  .video-page .video-work-title { order: 3 !important; }
  .video-page .video-desc { order: 4 !important; }

  /* --- 映像制作ページ内のすべての説明文を調整 --- */
  .video-page .video-desc, 
  .video-page .yt-desc, 
  .video-page .note-desc { 
    font-size: 13.5px !important;  /* ダンスページと同じ大きさに統一 */
    line-height: 1.7 !important;   /* 行間を調整して読みやすく */
    color: #e0e0e0 !important;     /* 文字色を少し柔らかく */
    text-align: justify !important;
    width: 90% !important;         /* 左右の余白を確保 */
    margin: 15px auto 80px !important; /* 下にしっかり余白を取って次への区切りを明確に */
  }

  /* pタグが含まれている場合の微調整 */
  .video-page .video-desc p {
    font-size: 13.5px !important;
    line-height: 1.7 !important;
    margin: 0 !important;
  }

  /* ダンス */
  .dance-page-body .dance-main-title { order: 1 !important; }
  .dance-page-body .theater-stage.no-gaku { order: 2 !important; }
  .dance-page-body .note-title { order: 3 !important; }
  .dance-page-body .note-desc { order: 4 !important; }

  .dance-page-body .dance-text-block .note-desc { 
    order: 4 !important; 
    width: 88% !important; 
    margin: 0 auto 60px !important; 
    
    /* 文字サイズの調整 */
    font-size: 13.5px !important;  /* 15pxから少し小さく */
    line-height: 1.7 !important;   /* 行間をわずかに詰め、小文字でも読みやすく */
    color: #e0e0e0 !important;     /* わずかにグレーに寄せることでタイトルの白を際立たせる */
    text-align: justify !important; /* 両端を揃えて綺麗に見せる */
  }

  /* --- チケット：絶対命令 --- */
  .ticket-back {
    display: block !important;
    order: 999 !important; /* 同じ親要素内にいれば、これで確実に最下部へ */
    margin: 60px auto 100px !important;
    width: 85% !important;
    max-width: 450px !important;
    position: static !important;
    transform: none !important;
    text-align: center;
  }

  .ticket-back img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }
}
}
  /* ==========================================
     C. 共通：戻るボタン（チケット）の中央寄せ
     ========================================== */
  .ticket-back { 
    order: 100 !important; /* 常に一番最後にする */
    display: block !important;
    width: 85% !important;
    max-width: 450px !important;
    margin: 60px auto 100px !important;
    position: static !important;
    left: auto !important;
    transform: none !important;
  }

  .ticket-back img { width: 100% !important; height: auto !important; display: block; }

  /* 共通の文字スタイル */
  .note-title, .video-work-title, .yt-title, .dance-main-title {
    font-size: 24px !important;
    text-align: center !important;
    line-height: 1.4 !important;
  }

  .note-desc, .video-desc, .yt-desc {
    font-size: 15px !important;
    line-height: 1.8 !important;
    text-align: justify !important;
    white-space: normal !important;
  }

  /* --- 1. PC/タブレット画面（幅が広い時）の設定 --- */
@media screen and (min-width: 769px) {
  .mobile-stickers {
    display: none !important; /* スマホ用エリアを完全に隠す */
  }
  .stage {
    display: block !important; /* PC用ステージを表示 */
  }
}

/* ==========================================================================
   スマホ専用：重複を排除し、配置を確定させる（最優先）
   ========================================================================== */
@media screen and (max-width: 768px) {
  /* PC用の要素を徹底的に隠す */
  .stage, 
  #stage, 
  .viewport:not(.edit) .sticker { 
    display: none !important; 
    opacity: 0 !important; 
    pointer-events: none !important; 
  }

  img[src*="sticker-job.png"] {
    display: none !important;
  }

  /* スマホ版の土台を設定 */
  .viewport {
    background-image: url('../assets/sumaho.png') !important;
    background-size: cover;
    background-position: center top;
    height: 100dvh;
    width: 100vw;
    overflow: hidden !important;
    position: relative;
  }

  /* スマホ用ステッカー（m-sticker）だけを強制表示 */
  .mobile-stickers {
    display: block !important;
    position: absolute;
    inset: 0;
    z-index: 100;
  }

  .m-sticker {
    display: block !important;
    position: absolute !important;
    z-index: 101;
  }

  .m-sticker img {
    width: 100% !important;
    height: auto !important;
  }

  .contact-wrap-horizontal {
    padding: 40px 20px;
  }
  .contact-inputs-row {
    display: block;
  }
  .hobby-title {
    text-align: center;
    margin-bottom: 30px;
  }
}