/* =========================================================
   公演ページ styles.css（公演フォルダ専用）— 安定版＋PCのbr抑制＋ロゴ動作
   - html margin は使わない（iOS Safariで崩れる要因）
   - body padding（safe-area対応）で左右余白を確保
   - link-tree（丸アイコン仕様）は崩さない
   - box27（LINE色）は変更しない
   - slide/fade と button-container を保持
   - 画像・ボタンが絶対にはみ出さないように制御
   - 「崩れた」原因になりやすい all:unset / 論理プロパティのみ依存は不使用
   - ★追加：PC表示で .content p 内 <br> を抑制（間延び防止：必要な場合のみ）
   - ★追加：ロゴ（丸アイコン）を「ほんの少し動く」＋prefers-reduced-motion対応
   ========================================================= */

:root{
  --bg: #FFFF77;
  --ink: #3c3642;

  --card: rgba(255,255,255,.92);
  --card-border: rgba(60,54,66,.10);

  --radius-xl: 22px;
  --shadow-soft: 0 10px 30px rgba(0,0,0,.12);
  --shadow-card: 0 14px 30px rgba(0,0,0,.10);
}

*,
*::before,
*::after{ box-sizing: border-box; }

html{
  margin: 0;           /* ★重要：html margin は使わない */
  padding: 0;
}

body{
  margin: 0;

  /* ★左右余白：safe-area込み（ノッチ端末も安全） */
  padding-left: calc(8px + env(safe-area-inset-left));
  padding-right: calc(8px + env(safe-area-inset-right));
  padding-top: 0;
  padding-bottom: 0;

  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);

  overflow-x: hidden;
}

/* 背景ドット */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 90, 95, .25) 0 3px, transparent 4px),
    radial-gradient(circle at 70% 30%, rgba(60, 170, 255, .22) 0 3px, transparent 4px),
    radial-gradient(circle at 40% 70%, rgba(90, 210, 150, .22) 0 3px, transparent 4px),
    radial-gradient(circle at 85% 75%, rgba(255, 175, 55, .22) 0 3px, transparent 4px);
  background-size: 260px 260px;
}

/* メディアはみ出し防止（最重要） */
img,
iframe,
video,
canvas,
svg{
  max-width: 100%;
  height: auto;
  display: block;
}

/* 長いURL/電話番号などのはみ出し防止 */
p, a, li, h1, h2, h3{
  overflow-wrap: anywhere;
  word-break: break-word;
}

a{ color: #111; text-decoration: underline; }
a:hover{ text-decoration: none; }

/* ===== Logo (link-tree) ===== */
.link-tree{
  text-align: center;
  padding: 22px 0 6px;
}
.link-tree a{ display: inline-block; text-decoration: none; }
.link-tree img{
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: var(--shadow-soft);

  /* ★ロゴを動かす前提の安定化 */
  transform: translateZ(0);
  transform-origin: 50% 50%;
}

/* ===== Container ===== */
.container{
  width: 100%;
  max-width: 920px;
  margin: 0 auto 24px;
  padding: 18px 18px 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  position: relative;

  /* ★ここは維持：中身のはみ出しを確実に止める（ただし影は中で完結させる） */
  overflow: hidden;
}

.container::before{
  content:"";
  position:absolute;
  left: 0; right: 0; top: 0;
  height: 8px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: linear-gradient(90deg,#FF4D4D,#FFB000,#FFE100,#10B981,#2C7BFF);
}

/* ===== Headings ===== */
h1{
  margin: 18px 0 10px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: .01em;
  text-align: left;
  font-weight: 900;
}
h1 > span{
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: #ff2d55;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

/* 公演ページのh2：青背景 */
h2{
  display: inline-block;
  margin: 8px 0 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #eaf2ff;
  border: 1px solid rgba(47,58,86,.18);
  color: #243149;
  font-weight: 900;
  font-size: 18px;
}

h3{
  font-size: 18px;
  font-weight: 900;
  margin: 22px 0 10px;
  position: relative;
  padding-bottom: 10px;
}
h3::after{
  content:"";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(45, 212, 191, .80),
    rgba(45, 212, 191, .80) 3px,
    rgba(255,255,255, 0) 3px,
    rgba(255,255,255, 0) 6px
  );
}

/* ===== Content ===== */
.content{ overflow: hidden; }
.content p{ margin: 10px 0; color: rgba(60,54,66,.92); }

/* ★通常の本文内画像も「欠け・はみ出し」防止（公演チラシ/写真用） */
.content img{
  max-width: 100%;
  height: auto;
}

/* box2-10（感想枠） */
.box2-10{
  margin: 14px auto 18px;
  padding: 18px 18px;
  position: relative;
  border-radius: 14px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(60,54,66,.10);
  overflow: hidden;
}
.box2-10:before{
  border-bottom: 24px solid transparent;
  border-left: 24px solid #c6d4c6;
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}
.box2-10:after{
  border-left: 24px solid transparent;
  border-bottom: 24px solid #c6d4c6;
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  right: 0;
}

/* ===== Lists ===== */
ul, ol{
  list-style: none;
  margin: 12px 0 16px;
  padding: 12px 14px 12px 18px;
  background: rgba(255,255,255,.75);
  border-radius: 14px;
  border: 1px solid rgba(60,54,66,.10);
  box-shadow: 0 10px 18px rgba(0,0,0,.06);
}
ul li, ol li{
  position: relative;
  padding-left: 16px;
  margin: 7px 0;
}
ul li::before, ol li::before{
  content:"•";
  position:absolute;
  left: 0;
  top: 0;
  color: #ff2d55;
  font-weight: 900;
}

/* ===== Slideshow ===== */
.slideshow-container{
  width: 100%;
  max-width: 100%;
  position: relative;
  margin: 10px auto 14px;
  text-align: center;

  overflow: hidden;     /* ★スライド画像のはみ出しを物理的に止める */
  border-radius: 16px;
}

/* slide / fade */
.slide{ display: none; width: 100%; }
.fade{ animation: fade 1.0s ease; }
@keyframes fade{
  from{ opacity: .35; }
  to{ opacity: 1; }
}

.slideshow-container a{ display: block; width: 100%; }
.slideshow-container img{
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;

  /* ★角丸は container 側で持つ（画像側でズレない） */
  border-radius: 0;

  /* ★影は「内側完結」させる（overflow hidden で不自然に切れない値） */
  box-shadow: 0 10px 18px rgba(0,0,0,.12);
}

/* ===== Button Container ===== */
.button-container{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 14px 0 18px;

  /* ★端ギリギリ回避（iOSで欠けやすい） */
  padding: 0 10px;
}
.button-container .button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 180px;
  padding: 12px 14px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: .02em;
  text-decoration: none;
  color: #1f2a44;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(60,54,66,.14);
  box-shadow: 0 12px 18px rgba(0,0,0,.10);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.button-container .button:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 22px rgba(0,0,0,.12);
  filter: saturate(1.05);
}
.button-container .button:active{
  transform: translateY(1px);
  box-shadow: 0 10px 16px rgba(0,0,0,.10);
}

/* ===== Toggle ===== */
.toggle-button{
  margin: 12px 0 6px;
  display: inline-block;
  cursor: pointer;
  user-select: none;
  font-weight: 900;
  color: #1f2a44;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(60,54,66,.12);
  box-shadow: 0 10px 18px rgba(0,0,0,.08);
}
.toggle-content{
  display: none;
  margin: 8px 0 18px;
  padding: 14px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.75);
  border: 1px dashed rgba(60,54,66,.18);
}

/* ===== Ticket Button（欠け対策：安定版） ===== */
.ticket-button{
  display: block;

  /* ★重要：親内で確実に収める（iOS Safari安定） */
  width: 100%;
  box-sizing: border-box;

  /* ★見栄え上限 */
  max-width: 520px;

  /* ★左右欠け防止：中央寄せ＋左右に少し逃がす */
  margin: 12px auto 0;
  padding: 16px 16px;

  border-radius: 18px;

  font-weight: 900;
  letter-spacing: .02em;
  text-decoration: none;
  text-align: center;

  border: 1px solid rgba(0,0,0,.10);
  color: #2a2400;
  background: linear-gradient(180deg, #FFE44D, #FFD84D);
  box-shadow: 0 14px 22px rgba(0,0,0,.14);

  min-width: 0;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.ticket-button:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 26px rgba(0,0,0,.16);
  filter: saturate(1.04);
}
.ticket-button:active{
  transform: translateY(1px);
  box-shadow: 0 12px 18px rgba(0,0,0,.14);
}

/* ===== Ad ===== */
.ad{
  width: 100%;
  max-width: 920px;
  margin: 18px auto 10px;
  padding: 0 18px;
  text-align: center;
  display: block;
  overflow: hidden;
}
.ad *{
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 100% !important;
}
.ad img,
.ad iframe{
  display: block;
  max-width: 100% !important;
  height: auto;
}

/* ===== Footer ===== */
#footer{
  text-align: center;
  margin-top: 18px;
  color: rgba(60,54,66,.70);
  font-size: 14px;
}

/* ===== box27（LINE色固定） ===== */
.box27{ position: relative; margin: 2em 0; padding: 0.5em 1em; border: 3px solid #06c755; }
.box27 .box-title{
  position: absolute; display: inline-block; top: -27px; left: -3px;
  padding: 0 9px; height: 25px; line-height: 25px; font-size: 17px;
  background: #06c755; color: #fff; font-weight: bold; border-radius: 5px 5px 0 0;
}

/* =========================================================
   Motion（ロゴ：控えめに動く）
   - hover可能環境：ホバーで少し持ち上げ
   - タッチ環境：初回だけ「ふわっ」と出現
   - prefers-reduced-motion 対応
   ========================================================= */
@keyframes logoPop{
  from{ opacity: 0; transform: translateY(6px) scale(.98); }
  to  { opacity: 1; transform: translateY(0) scale(1); }
}

/* タッチ環境（hover不可）では初回だけ */
@media (hover: none){
  .link-tree img{
    animation: logoPop .45s ease both;
  }
}

/* hover可能環境ではホバーでほんの少し */
@media (hover: hover) and (pointer: fine){
  .link-tree img{
    transition: transform .18s ease, box-shadow .18s ease;
  }
  .link-tree img:hover{
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0,0,0,.14);
  }
}

/* ===== Responsive ===== */
@media (max-width: 600px){
  .container{ padding: 16px 14px 20px; }
  h1{ font-size: 22px; }
  h2{ font-size: 16px; }
  h1 > span{ font-size: 13px; }

  .button-container .button{
    width: 100%;
    min-width: 0;
  }

  .ticket-button{
    max-width: 100%;
  }
}

/* ===== Motion safety ===== */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}
