/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #f4efe6;
  --color-white: #fdfaf5;
  --color-dark: #1c1814;
  --color-dark-mid: #2c2620;
  --color-gray: #6a6258;
  --color-gray-light: #d2c9bc;
  --color-gray-pale: #ebe4da;
  --color-accent: #968c82;
  --color-gold: #c4973a;
  --color-gold-dim: rgba(196,151,58,0.45);
  --font-serif: 'Cormorant Garamond', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-sans: 'Raleway', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-body: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  --radius: 3px;
  --transition: 0.25s ease;
  --shadow: 0 4px 28px rgba(28,24,20,0.12);
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  overflow-x: hidden; /* 横スクロール禁止（ルートレベル） */
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-dark);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* デスクトップ：上ナビ分の余白 */
  padding-top: 62px;
  padding-bottom: 0;
  overflow-x: hidden;           /* 横スクロール禁止 */
  overscroll-behavior-x: none;  /* iOS Safari のラバーバンド横方向を無効化 */
}

/* .page-scroll は全画面幅でフレックスコンテナ — .main-content { flex:1 } を機能させるため */
.page-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* 横スクロール完全禁止 */
}

/* ===== Tab Navigation bar（デスクトップ：上固定 / スマホ：下固定） ===== */
.bottom-tab-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 62px;
  z-index: 100;
  color: var(--color-white);
  background: linear-gradient(to bottom, #221e1a 0%, var(--color-dark) 100%);
  border-bottom: 1px solid rgba(196,151,58,0.28);
  box-shadow: 0 2px 24px rgba(0,0,0,0.55), 0 1px 0 rgba(196,151,58,0.2);
}

.bottom-tab-nav .tab-list {
  height: 62px;
  max-width: 640px;
  margin: 0 auto;
}

/* ===== Tab Navigation ===== */

.tab-list {
  display: flex;
  list-style: none;
  height: 100%;
  position: relative;
}

/* ゴールドグラス インジケーター */
.tab-indicator {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 38px;
  transform: translateY(-50%);
  background: linear-gradient(135deg, rgba(196,151,58,0.22) 0%, rgba(245,224,96,0.12) 50%, rgba(196,151,58,0.18) 100%);
  backdrop-filter: blur(12px) saturate(2);
  -webkit-backdrop-filter: blur(12px) saturate(2);
  border: 1px solid rgba(196,151,58,0.55);
  border-radius: 22px;
  box-shadow:
    0 0 18px rgba(196,151,58,0.35),
    0 2px 10px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(196,151,58,0.2);
  pointer-events: none;
  z-index: 0;
  transition: left 0.42s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: indicator-glow 3s ease-in-out infinite;
}

@keyframes indicator-glow {
  0%, 100% { box-shadow: 0 0 18px rgba(196,151,58,0.35), 0 2px 10px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.18), inset 0 -1px 0 rgba(196,151,58,0.2); }
  50%       { box-shadow: 0 0 32px rgba(196,151,58,0.6),  0 2px 14px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -1px 0 rgba(196,151,58,0.3); }
}

.tab-item { flex: 1; }

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 8px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-sans);
  font-size: 13px; /* ナビバーはhtmlスケール対象外：元の0.82rem×16px相当に固定 */
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.12em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition), border-color var(--transition), background-color var(--transition), text-shadow var(--transition);
}

@media (hover: hover) {
  .tab-btn:hover {
    color: rgba(255,255,255,0.85);
    background-color: rgba(255,255,255,0.04);
  }
}

.tab-btn.active {
  color: var(--color-gold);
  font-weight: 700;
  border-bottom-color: transparent;
  text-shadow: 0 0 18px rgba(196,151,58,0.75), 0 0 36px rgba(196,151,58,0.35);
}

.tab-btn { position: relative; z-index: 1; }

/* スマホ：ナビをフッター固定に切り替え */
@media (max-width: 540px) {
  body {
    display: block; /* flex-grow が page-scroll を 100dvh まで拡張してしまうのを防ぐ */
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    height: 100dvh;
  }
  /* ページ全体のスクロールコンテナ（window.scrollTo を使わないため Safari のブラウザクロームを出さない） */
  /* flex ではなく block にすることで flex-grow によるサイズ計算の問題を回避し、正しく overflow-y scroll が効く */
  .page-scroll {
    height: calc(100dvh - 70px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overflow-x: hidden;          /* 横スクロール完全禁止 */
    overscroll-behavior-x: none; /* iOS Safari ラバーバンド横方向を無効化 */
    -webkit-overflow-scrolling: touch;
    display: block;
  }
  .bottom-tab-nav {
    top: auto;
    bottom: 0;
    height: 70px;
    background: linear-gradient(to top, #181410 0%, #221e1a 60%, var(--color-dark) 100%);
    border-top: 1px solid rgba(196,151,58,0.28);
    border-bottom: none;
    box-shadow: 0 -2px 24px rgba(0,0,0,0.55), 0 -1px 0 rgba(196,151,58,0.2);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bottom-tab-nav .tab-list { height: 70px; }
  .tab-btn { font-size: 11px; letter-spacing: 0.03em; padding: 0 4px; }
  .tab-indicator { height: 44px; }
}

/* ===== Hero ===== */
#profile.tab-panel { padding-top: 0; }

.hero {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: visible;
  clip-path: inset(-600px 0px 0px 0px); /* 下端でクリップ、上は600px余裕 */
  background:
    radial-gradient(ellipse 50% 80% at 72% 110%, rgba(196,151,58,0.45) 0%, transparent 55%),
    radial-gradient(ellipse 40% 55% at 10% 40%,  rgba(90,55,20,0.60)   0%, transparent 65%),
    repeating-linear-gradient(
       45deg,
       rgba(196,151,58,0.18) 0px,
       rgba(196,151,58,0.18) 1px,
       transparent           1px,
       transparent           26px
    ),
    repeating-linear-gradient(
      -45deg,
       rgba(196,151,58,0.18) 0px,
       rgba(196,151,58,0.18) 1px,
       transparent           1px,
       transparent           26px
    ),
    linear-gradient(150deg, #4a3520 0%, #5e4428 50%, #3e2c18 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(30,18,8,0.55) 0%,
    rgba(30,18,8,0.25) 38%,
    rgba(30,18,8,0.00) 62%
  );
  z-index: 2;
  pointer-events: none;
}

/* スポットライト：固定位置（3枚全員が明るい範囲に入る位置） */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: none; /* スポットライト削除 */
  z-index: 0;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent 0%, #f5ede0 100%);
  z-index: 10;
  pointer-events: none;
}

/* 画像ラッパー：全幅（クリップなし） */
.hero-image-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 全端末共通：top・height比率はデスクトップと同一（下部カット位置が一致） */
.hero-person {
  position: absolute;
  right: 0;         /* モバイル：ラッパー右端 */
  bottom: auto;
  top: 60%;
  transform: translateY(-50%);
  height: 140%;
  width: auto;
  user-select: none;
  z-index: 1;
  filter: brightness(1.0);
}

/* ヒーロー画像スライダー：ドット・ザザ溶け込みエフェクト */
.hero-person.hero-slide        { opacity: 0; }
.hero-person.hero-slide.is-active  { opacity: 1; }
.hero-person.hero-slide.is-leaving { animation: heroFadeOut 0.9s ease forwards; }

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

/* 各画像：top・heightをデスクトップと同比率で統一、right=0（ラッパー基準） */
.hero-person.hero-1 { filter: brightness(0.92);  top: 70%; height: 162%; }
.hero-person.hero-2 { filter: brightness(0.83) sepia(0.22) saturate(1.65); top: 59.5%; height: 170%; }
.hero-person.hero-3 { filter: brightness(1.15);  height: 155%; }

/* 背景あり宣材写真スライド */
.hero-person.hero-photo {
  filter: brightness(1.0);
  object-fit: cover;
}

/* ===== デスクトップ（>1180px）：rightをヒーロー基準に ===== */
@media (min-width: 1181px) {
  .hero-text { left: 15%; max-width: 56%; padding: 0 32px; }
  .hero-person      { right: 15%; }
  .hero-person.hero-1 { right: 18%; }
  .hero-person.hero-2 { right: 17%; }
  .hero-person.hero-3 { right: 18%; }
}

.hero-section-label {
  position: absolute;
  top: 28px;
  left: 52px;
  z-index: 12;
  pointer-events: none;
}

.hero-label-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.90);
  margin: 0;
  line-height: 1;
}

.hero-label-divider {
  width: 36px;
  height: 2px;
  background: var(--color-gold);
  margin-top: 10px;
}

.hero-text {
  position: absolute;
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 11;
  max-width: 44%;
}

.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(2.9rem, 5.5vw, 4.4rem);
  font-weight: 400;
  letter-spacing: 0.52em;
  font-style: italic;
  background: linear-gradient(90deg, #c4973a 0%, #f5e060 38%, #ecd055 62%, #c4973a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(220, 170, 40, 0.45));
  margin-bottom: 14px;
}

.hero-name-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3.8rem, 13vw, 10rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--color-white);
  line-height: 1;
  margin: 0;
}

.hero-divider {
  width: 100%;
  max-width: 340px;
  height: 1px;
  background: rgba(255,255,255,0.35);
  margin: 18px 0 0;
}

.hero-reading {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2rem, 7vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.82);
}

/* ===== モバイル・タブレット共通：オーバーレイをテキスト側で強くする ===== */
@media (max-width: 1180px) {
  .hero-overlay {
    background: linear-gradient(
      to right,
      rgba(30,18,8,0.80) 0%,
      rgba(30,18,8,0.70) 35%,
      rgba(30,18,8,0.25) 55%,
      rgba(30,18,8,0.00) 68%
    );
  }
}

/* ===== スマホ：宣材写真を縮小して名前との重なりを防ぐ ===== */
/* right: -18px はレイアウト上のはみ出しを生じさせスクロール時に横ズレするため
   transform: translateX で視覚的に同位置へ（レイアウトに影響しない） */
@media (max-width: 540px) {
  .hero-person         { height: 115%; transform: translateY(-50%) translateX(18px); }
  .hero-person.hero-1  { height: 132%; }
  .hero-person.hero-2  { height: 137%; }
  .hero-person.hero-3  { height: 127%; }
}

/* 小タブレット（541〜699px）：中程度に縮小 */
@media (min-width: 541px) and (max-width: 699px) {
  .hero-person         { height: 135%; transform: translateY(-50%) translateX(18px); }
  .hero-person.hero-1  { height: 150%; }
  .hero-person.hero-2  { height: 155%; }
  .hero-person.hero-3  { height: 145%; }
}

/* iPhone（〜540px） */
@media (max-width: 540px) {
  .hero { height: 300px; }
  .hero-reading { font-size: 1.4rem; }
  .hero-text { left: 4%; max-width: 42%; }
  .hero-sub { font-size: clamp(1.1rem, 6.0vw, 1.55rem); letter-spacing: 0.28em; }
  .hero-section-label { left: 16px; }
}

/* 小さいタブレット（541〜699px） */
@media (min-width: 541px) and (max-width: 699px) {
  .hero { height: 320px; }
  .hero-text { left: 5%; max-width: 42%; }
  .hero-sub { font-size: clamp(1.2rem, 4.4vw, 1.75rem); letter-spacing: 0.32em; }
  .hero-section-label { left: 16px; }
}

/* iPad mini / iPad 縦向き（700〜960px） */
@media (min-width: 700px) and (max-width: 960px) {
  .hero { height: 390px; }
  .hero-text { left: 7%; max-width: 43%; }
  .hero-section-label { left: 28px; }
}

/* iPad 横向き（961〜1180px） */
@media (min-width: 961px) and (max-width: 1180px) {
  .hero { height: 460px; }
  .hero-text { left: 8%; max-width: 43%; }
  .hero-sub  { font-size: clamp(2.0rem, 3.3vw, 2.9rem); }
}

/* ===== Main Content ===== */
.main-content { flex: 0 0 auto; position: relative; }

.tab-panel {
  display: none;
  padding: 48px 0 0;
}

.tab-panel.active { display: block; }

/* ===== タブスライドアニメーション ===== */
@keyframes tabSlideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-56px); }
}
@keyframes tabSlideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(56px); }
}
@keyframes tabSlideInRight {
  from { opacity: 0; transform: translateX(56px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes tabSlideInLeft {
  from { opacity: 0; transform: translateX(-56px); }
  to   { opacity: 1; transform: translateX(0); }
}

.tab-panel.is-leaving-left,
.tab-panel.is-leaving-right {
  display: block !important;
  position: absolute;
  top: 0; left: 0; right: 0;
  pointer-events: none;
}
.tab-panel.is-leaving-left  { animation: tabSlideOutLeft  0.32s ease forwards; }
.tab-panel.is-leaving-right { animation: tabSlideOutRight 0.32s ease forwards; }

.tab-panel.is-entering-right,
.tab-panel.is-entering-left  { display: block !important; }
.tab-panel.is-entering-right { animation: tabSlideInRight 0.32s ease forwards; }
.tab-panel.is-entering-left  { animation: tabSlideInLeft  0.32s ease forwards; }

.container {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 28px;
}

/* セクションタイトル */
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--color-dark);
  margin-bottom: 14px;
}

.section-title-divider {
  width: 56px;
  height: 2px;
  background: linear-gradient(to right, var(--color-gold) 0%, var(--color-gold-dim) 70%, transparent 100%);
  margin-bottom: 48px;
}

/* ===== Section Title Letter-by-letter Animation ===== */
@keyframes letterSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes sectionTitleSlideIn {
  from { opacity: 0; transform: translateX(-36px); }
  to   { opacity: 1; transform: translateX(0); }
}
/* divider は文字アニメ完了後にスライドイン */
.section-title-divider.title-anim {
  animation: sectionTitleSlideIn 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) 0.55s both;
}

/* ===== Profile ===== */
.profile-layout {
  display: flex;
  gap: 52px;
  align-items: flex-start;
}

.profile-photo { flex-shrink: 0; }

.profile-img {
  width: 210px;
  height: 270px;
  object-fit: cover;
  object-position: center top;
  display: block;
  box-shadow: var(--shadow);
}

.profile-text { flex: 1; }

.profile-name {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
  line-height: 1.2;
}

.name-reading {
  font-family: var(--font-sans);
  font-size: 0.48em;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--color-gold);
  margin-left: 12px;
  vertical-align: middle;
}

.profile-divider {
  width: 28px;
  height: 1px;
  background: linear-gradient(to right, var(--color-gold), transparent);
  margin: 14px 0 22px;
}

.profile-body {
  color: var(--color-gray);
  /* font-size は JS (fitProfileText) が動的にセット */
  line-height: 1.9;
  margin-bottom: 0;
  overflow: visible;
}

/* 各行：折り返し禁止・ブロック表示 */
.profile-line {
  display: block;
  white-space: nowrap;
}

/* ===== Medal (月桂樹 SVG) ===== */
.medal-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 36px;
  justify-content: center;
  margin-top: -45px;
  margin-bottom: 52px;
  position: relative;
  z-index: 20;
}

.medal {
  position: relative;
  width: 210px;
  height: 210px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
  pointer-events: none;
}


.medal-gold {
  filter: drop-shadow(0 4px 12px rgba(180,130,20,0.3));
}


.medal svg {
  width: 100%;
  height: 100%;
  display: block;
}

.medal-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30% 18%;
  overflow: hidden;
  clip-path: circle(47% at 50% 50%);
}

.medal-event {
  font-size: 0.88rem;
  font-weight: 700;
  color: #4a4a4a;
  letter-spacing: 0.02em;
  line-height: 1.35;
  margin-bottom: 3px;
}

.medal-gold .medal-event { color: #7a5510; }

.medal-year {
  font-family: 'DM Sans', 'Helvetica Neue', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.04em;
  line-height: 1.4;
  margin-bottom: 4px;
}

.medal-gold .medal-year { color: #b08020; }

.medal-rank {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: #3a3a3a;
  line-height: 1.15;
  white-space: nowrap;
  min-height: 1.9rem;  /* medal-num（1.65rem）がある行に高さを合わせる */
  display: flex;
  align-items: center;
  justify-content: center;
}

.medal-gold .medal-rank { color: #7a5510; }

.medal-num {
  font-family: 'EB Garamond', serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1;
  display: inline-block;
  padding: 0 2px;
}

@media (max-width: 480px) {
  .medal { width: 140px; height: 140px; }
  .medal-text { padding: 32% 10%; }
  .medal-rank { font-size: 0.60rem; }
  .medal-event { font-size: 0.68rem; }
  .medal-year { font-size: 0.52rem; white-space: nowrap; }
}
@keyframes medalGoldGlowSm {
  0%, 100% {
    filter:
      drop-shadow(0 3px 11px rgba(180, 130, 20, 0.34))
      drop-shadow(0 0 14px rgba(220, 170, 30, 0.26));
  }
  50% {
    filter:
      drop-shadow(0 3px 18px rgba(200, 150, 20, 0.52))
      drop-shadow(0 0 28px rgba(255, 205, 45, 0.46));
  }
}

/* ===== Medal Gold Glow ===== */
@keyframes medalGoldGlow {
  0%, 100% {
    filter:
      drop-shadow(0 4px 14px rgba(180, 130, 20, 0.32))
      drop-shadow(0 0 20px rgba(220, 170, 30, 0.22));
  }
  50% {
    filter:
      drop-shadow(0 4px 24px rgba(200, 150, 20, 0.55))
      drop-shadow(0 0 42px rgba(255, 205, 45, 0.48))
      drop-shadow(0 0 70px rgba(255, 185, 15, 0.24));
  }
}

/* ===== Medal Spin-In（初期表示・Y軸コマ回転＋スムーズオーバーシュート） ===== */
/* スピン：transform のみ（translateY なし） */
@keyframes medalSpinIn {
  0%   { transform: perspective(500px) rotateY(-720deg) scale(0.5); opacity: 0; animation-timing-function: cubic-bezier(0.2, 0, 0.4, 1); }
  55%  { transform: perspective(500px) rotateY(-45deg)  scale(1.03); opacity: 1; animation-timing-function: cubic-bezier(0.34, 1.2, 0.64, 1); }
  75%  { transform: perspective(500px) rotateY(16deg)   scale(1.01); animation-timing-function: ease-in-out; }
  87%  { transform: perspective(500px) rotateY(-5deg)   scale(1.00); animation-timing-function: ease-in-out; }
  95%  { transform: perspective(500px) rotateY(2deg)    scale(1.00); animation-timing-function: ease-out; }
  100% { transform: perspective(500px) rotateY(0deg)    scale(1); }
}

/* 落下：translate のみ（transform と干渉しない） */
/* 前半：超スロー（距離の半分を約0.35sかけてゆっくり） */
/* 後半：現行と同スピードで一気に落下 → 小バウンド → 停止 */
@keyframes medalDrop {
  0%   { translate: 0px -3px;   animation-timing-function: linear; }
  78%  { translate: 0px -1.5px; animation-timing-function: cubic-bezier(0.0, 0, 1, 1); }
  90%  { translate: 0px 1px;    animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  100% { translate: 0px 0px; }
}

.medal-halo {
  position: relative;
  width: 210px;
  height: 210px;
  flex-shrink: 0;
  /* spin：元のラグつきで個別スタート */
  /* drop：2枚同時 (= delay1 + spin + pause = delay2 + spin + pause) */
  /* medal1: 0.25 + 1.5 + 0.8 = 2.55s  /  medal2: 0.55 + 1.5 + 0.5 = 2.55s */
  animation:
    medalSpinIn 1.5s cubic-bezier(0.22, 1, 0.36, 1) both,
    medalDrop   0.45s linear both;
}
.medal-halo:nth-child(1) { animation-delay: 0.25s, 2.55s; }
.medal-halo:nth-child(2) { animation-delay: 0.55s, 2.55s; }

/* 床に落ちる柔らかい光 */
.medal-halo::after {
  content: '';
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 50, 0.22) 0%, transparent 68%);
  filter: blur(18px);
  pointer-events: none;
  z-index: 0;
}

/* メダル本体 */
.medal-halo .medal {
  position: relative;
  z-index: 1;
}

/* メダルのシルエットに沿ってゴールドに光る */
.medal-halo .medal-gold {
  animation: medalGoldGlow 3.2s ease-in-out infinite;
}
.medal-halo:nth-child(2) .medal-gold { animation-delay: -1.6s; }


/* スマホ：基本ルールより後ろに置くことで確実に上書き */
@media (max-width: 480px) {
  .medal-halo { width: 140px; height: 140px; }
  .medal-halo::after { inset: -6%; filter: blur(8px); }
  .medal-halo .medal-gold { animation-name: medalGoldGlowSm; }
}

/* ===== Tab Footer（SNS + PDF + フォト） ===== */
.tab-footer {
  flex-shrink: 0;
  margin-top: auto;
  background: linear-gradient(to bottom, #5a3e22 0%, #2c1e12 55%, #1c1410 100%);
  padding: 16px 0 14px;
  border-top: 1px solid rgba(196,151,58,0.18);
}

.tab-footer .profile-sns {
  margin-bottom: 0;
  flex-wrap: wrap;
  gap: 10px;
}

/* ダーク背景上のボタン色 */
.tab-footer .sns-btn {
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.75);
  background: transparent;
}
.tab-footer .sns-instagram { color: #e1306c; }
.tab-footer .sns-x { color: rgba(255,255,255,0.75); }

@media (hover: hover) {
  .tab-footer .sns-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.28);
    color: #fff;
  }
  .tab-footer .sns-instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: transparent;
    color: #fff;
  }
  .tab-footer .sns-x:hover {
    background: #000;
    border-color: #000;
    color: #fff;
  }
}
.tab-footer .sns-instagram:active {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-color: transparent;
  color: #fff;
}
.tab-footer .sns-x:active {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}

.tab-footer .download-btn {
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.55);
  background: transparent;
}
@media (hover: hover) {
  .tab-footer .download-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.28);
    color: rgba(255,255,255,0.85);
  }
}
.tab-footer .download-btn:active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* tab-footer の上線を消す（リール直後のシームレス接続） */
.tab-footer {
  border-top: none;
}

/* SNS */
.profile-sns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.sns-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border: 1px solid var(--color-gray-light);
  border-radius: 20px;
  font-size: 13px; /* フッター内：元の0.8rem×16px相当に固定 */
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: border-color var(--transition), color var(--transition), background-color var(--transition);
}

.sns-instagram { color: #c13584; }
.sns-x { color: var(--color-dark); }

/* ホバー: マウスがある端末のみ（スマホのスティッキーホバー防止） */
@media (hover: hover) {
  .sns-btn:hover {
    background-color: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-white);
  }
  .sns-instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: transparent;
    color: #fff;
  }
}

/* タップ・クリック瞬間: スマホ・PC共通 */
.sns-instagram:active {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-color: transparent;
  color: #fff;
}
.sns-x:active {
  background-color: #000;
  border-color: #000;
  color: #fff;
}

.sns-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ダウンロードボタン */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background-color: transparent;
  border: 1px solid var(--color-dark);
  border-radius: var(--radius);
  color: var(--color-dark);
  font-family: var(--font-sans);
  font-size: 13px; /* フッター内：元の0.82rem×16px相当に固定 */
  font-weight: 400;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}

.download-btn:hover {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.download-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .profile-layout {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }
  .profile-img { width: 180px; height: 230px; }
  .profile-text { width: 100%; }
}

/* ===== Career ===== */
.career-block {
  margin-bottom: 0;
  padding-bottom: 32px;
}

.career-block + .career-block {
  padding-top: 28px;
  border-top: 1px solid var(--color-gray-pale);
}

.career-block-title {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-dark);
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 2px solid var(--color-gold);
}

.career-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 4px;
}

.career-list li {
  font-size: 0.93rem;
  color: var(--color-gray);
  padding-left: 20px;
  position: relative;
  line-height: 1.8;
}

.career-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(196,151,58,0.5);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.career-link:visited {
  color: inherit; /* 訪問済みでも元の色を維持 */
}
@media (hover: hover) {
  .career-link:hover {
    color: var(--color-gold);
    text-decoration-color: var(--color-gold);
  }
}

.career-etc {
  font-size: 0.82rem;
  color: var(--color-gold-dim);
  letter-spacing: 0.1em;
  font-style: italic;
}

.career-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 1px;
  background-color: var(--color-gold-dim);
}

/* レギュラー出演中バッジ */
.nowrap-badge { white-space: nowrap; }

.badge-regular {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 9px;
  font-size: 0.65rem;
  font-family: var(--font-sans);
  letter-spacing: 0.06em;
  color: var(--color-gold);
  border: 1px solid var(--color-gold-dim);
  border-radius: 100px;
  vertical-align: middle;
  white-space: nowrap;
  animation: badge-pulse 2.8s ease-in-out infinite,
             badge-wiggle 3s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 rgba(196,151,58,0); }
  50%       { opacity: 0.75; box-shadow: 0 0 8px rgba(196,151,58,0.3); }
}

@keyframes badge-wiggle {
  0%    { transform: rotate(0deg); }
  3%    { transform: rotate(-10deg); }
  6%    { transform: rotate(10deg); }
  9%    { transform: rotate(-7deg); }
  12%   { transform: rotate(7deg); }
  15%   { transform: rotate(0deg); }
  100%  { transform: rotate(0deg); }
}

/* タイムライン */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--color-gold-dim), var(--color-gray-light) 80%);
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 28px;
  padding-bottom: 36px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--color-white);
  border: 2px solid var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.timeline-year {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-dark);
  min-width: 44px;
  padding-top: 4px;
}

.timeline-event {
  color: var(--color-gray);
  font-size: 0.93rem;
  margin-bottom: 4px;
  line-height: 1.75;
}

.timeline-event:last-child { margin-bottom: 0; }

.timeline-rank {
  font-weight: 600;
  color: var(--color-dark);
}

.timeline-sub,
.career-sub {
  font-size: 0.72rem;
  color: #b0a596;
  line-height: 1.6;
  padding-left: 0.5em;
  margin-top: 2px;
  margin-bottom: 4px;
  font-style: italic;
  letter-spacing: 0.01em;
}


/* 受賞歴タイムライン：モバイルで年を上・受賞名をフル幅で重ねて表示 */
@media (max-width: 768px) {
  .timeline { padding-left: 14px; }
  .timeline-item {
    display: block;
    gap: 0;
    padding-bottom: 20px;
  }
  .timeline-year {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--color-gold);
    min-width: auto;
    padding-top: 0;
    margin-bottom: -5px; /* 受賞名と少し重ねる */
    position: relative;
    z-index: 1;
  }
  .timeline-event {
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 2px;
  }
  .timeline-item::before {
    top: 5px;
    left: -18px;
  }
}

/* ===== Contact ===== */
#contact.tab-panel {
  padding-bottom: 80px;
}

/* Contact コンテナを直接 600px に絞って中央寄せ */
#contact .container {
  max-width: 600px;
}

/* Career / Performance コンテンツを中央配置 */
.section-content {
  max-width: 640px;
  margin: 0 auto;
}

.contact-header {
  max-width: none;
}

.contact-lead {
  color: var(--color-gray);
  margin-bottom: 32px;
  font-size: 0.93rem;
  line-height: 1.9;
  max-width: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: none;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.form-error {
  font-family: var(--font-body);
  font-size: 0.68rem;
  color: #a04040;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.form-error.is-visible { opacity: 1; }

.required {
  color: #a04040;
  margin-left: 3px;
  font-size: 1.5em;
  line-height: 1;
  vertical-align: middle;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius);
  background-color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.93rem;
  color: var(--color-dark);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 225px;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236a6258' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.submit-btn {
  align-self: center;
  padding: 13px 48px;
  background: linear-gradient(135deg, #6b3e25 0%, #4e2b18 100%);
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(196,151,58,0.25);
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.submit-btn:hover {
  background: linear-gradient(135deg, #7a4830 0%, #5c3520 100%);
  box-shadow: 0 4px 18px rgba(92,53,32,0.35);
  transform: translateY(-1px);
}

.submit-btn:active { transform: translateY(0); box-shadow: none; }

@media (max-width: 480px) {
  .submit-btn { text-align: center; }
}

/* ===== 確認パネル ===== */
.confirm-panel {
  max-width: none;
  margin: 0;
  padding: 40px;
  background: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius);
  animation: fadeIn 0.3s ease;
}

.confirm-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--color-dark);
  margin-bottom: 10px;
}

.confirm-divider {
  width: 36px;
  height: 1px;
  background: var(--color-gold);
  margin-bottom: 32px;
}

.confirm-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px 20px;
  margin-bottom: 40px;
}

.confirm-list dt {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  padding-top: 3px;
}

.confirm-list dd {
  font-size: 0.93rem;
  color: var(--color-dark);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  border-bottom: 1px solid var(--color-gray-pale);
  padding-bottom: 14px;
}

.confirm-list dt:last-of-type + dd,
.confirm-list dd:last-child {
  border-bottom: none;
}

.confirm-actions {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.back-btn {
  background: none;
  border: none;
  color: var(--color-accent);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 0;
  transition: color var(--transition);
}

.back-btn:hover { color: var(--color-dark); }

.confirm-thanks {
  font-size: 0.95rem;
  color: var(--color-gray);
  line-height: 2;
  padding: 20px 0 8px;
}
.confirm-email-note {
  font-size: 0.8rem;
  color: var(--color-gray);
  opacity: 0.7;
  line-height: 1.8;
  padding-bottom: 20px;
}

@media (max-width: 480px) {
  .confirm-panel { padding: 24px 20px; }
  .confirm-list { grid-template-columns: 1fr; gap: 2px 0; }
  .confirm-list dt { margin-top: 14px; border-bottom: none; padding-bottom: 0; }
  .confirm-list dd { border-bottom: 1px solid var(--color-gray-pale); }
  .confirm-actions { flex-direction: column-reverse; align-items: stretch; }
  .confirm-actions .submit-btn { width: 100%; text-align: center; }
  .back-btn { text-align: center; }
}

/* ===== Photo Reel ===== */
.photo-reel {
  overflow: hidden;
  margin-top: 40px;
  background: var(--color-dark);
  border-top: 1px solid rgba(255,255,255,0.07);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 7%,
    black 93%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 7%,
    black 93%,
    transparent 100%
  );
}

.reel-track {
  display: flex;
  width: max-content; /* offsetWidth = scrollWidth にして translateX(-50%) = -halfW を正確に */
  /* animation は JS で動的に設定（画像枚数に応じて速度計算） */
  touch-action: pan-y; /* 縦スクロールはブラウザ、横スワイプはJSで処理 */
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;          /* GPUレイヤーに昇格 → ループリセット時のリペイント黒フラッシュを防止 */
  backface-visibility: hidden;     /* GPU合成を確実にするための補助 */
  -webkit-backface-visibility: hidden;
}

.reel-track {
  cursor: grab;
}
.reel-track:active {
  cursor: grabbing;
}

@keyframes reel-move {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.reel-set {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
  padding-right: 3px; /* セット末尾にも3px追加してループ境界のギャップを内部と統一 */
}

.reel-img {
  height: 220px;
  width: auto;
  aspect-ratio: 3/2; /* 画像ロード前から幅を確保 → scrollWidth が正確に計算される */
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}

.reel-img:hover { opacity: 0.85; }

/* ===== 依頼〜当日の流れ ===== */
.flow-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--color-gray-pale);
}
.flow-heading {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--color-gold);
  text-align: center;
  margin: 0 0 10px;
}
.flow-heading-rule {
  width: 32px;
  height: 1px;
  background: var(--color-gold-dim);
  margin: 0 auto 40px;
}

.flow-steps {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 12px;
  /* center on wide screens where all steps fit */
  padding-left: max(0px, calc((100% - 600px) / 2));
  padding-right: max(0px, calc((100% - 600px) / 2));
}
.flow-steps::-webkit-scrollbar { display: none; }

.flow-step {
  flex: 0 0 auto;
  width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 矢印 */
.flow-arrow {
  flex: 0 0 28px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 27px;
  color: var(--color-gold);
  opacity: 0.45;
  font-size: 0.55rem;
  letter-spacing: -0.05em;
}

/* アイコン枠（ひし形） */
.flow-icon-wrap {
  width: 60px;
  height: 60px;
  border: 1px solid rgba(196,151,58,0.4);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  position: relative;
  background: rgba(196,151,58,0.04);
  flex-shrink: 0;
}
.flow-icon-wrap svg {
  transform: rotate(-45deg);
  width: 26px;
  height: 26px;
  stroke: var(--color-gold);
  fill: none;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flow-step--last .flow-icon-wrap {
  background: rgba(196,151,58,0.12);
  border-color: rgba(196,151,58,0.7);
}
.flow-step--last .flow-icon-wrap svg {
  stroke-width: 1.4;
}

/* ステップ番号 */
.flow-num {
  position: absolute;
  top: -9px;
  right: -9px;
  transform: rotate(-45deg);
  width: 17px;
  height: 17px;
  background: var(--color-gold);
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* テキスト */
.flow-label {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-dark);
  line-height: 1.35;
  margin: 0 0 5px;
  letter-spacing: 0.03em;
}
.flow-desc {
  font-size: 0.6rem;
  color: var(--color-gray);
  line-height: 1.6;
  letter-spacing: 0.01em;
  margin: 0;
}

@media (max-width: 540px) {
  .flow-step { width: 86px; }
  .flow-icon-wrap { width: 52px; height: 52px; }
  .flow-icon-wrap svg { width: 22px; height: 22px; }
  .flow-arrow { flex: 0 0 20px; padding-top: 23px; font-size: 0.5rem; }
  .flow-label { font-size: 0.7rem; }
  .flow-desc { font-size: 0.56rem; }
}


/* ===== Footer ===== */
.tab-footer .footer-text {
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.18em;
  margin: 10px 0 0;
}

/* ===== PDF生成用コンテンツ（参考PDF準拠） ===== */
/* pdf-content は削除済み（既成PDFを直接ダウンロードする方式に変更） */
