/* =========================================================
   スマイル矯正歯科クリニック  症例ギャラリー
   スマホ基準 390px / 外部ライブラリなし
   ========================================================= */

/* ---------- デザイントークン ---------- */
:root {
  color-scheme: light;
  --navy: #1b365d;
  --navy-deep: #13284a;
  --blue: #2b7de9;
  --blue-dark: #1f63c4;
  --blue-soft: #e4effc;
  --blue-pale: #f1f7fe;
  --page-bg: #eef4fb;
  --white: #ffffff;
  --gold: #c7a56a;
  --gold-deep: #a9874a;
  --text: #2a3a52;
  --text-sub: #68788f;
  --line: #dde7f2;
  --before: #d9545f;
  --after: #2b7de9;

  --radius-card: 16px;
  --radius-large: 26px;
  --radius-pill: 999px;

  --shadow-card: 0 4px 14px rgba(27, 54, 93, 0.08);
  --shadow-soft: 0 8px 22px rgba(27, 54, 93, 0.10);

  --app-max: 430px;
  --nav-height: 66px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "YuGothic", "Meiryo", system-ui, sans-serif;
  --font-serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --font-hand: "Klee One", "Hiragino Maru Gothic ProN", "Yu Gothic", cursive, sans-serif;
}

/* ---------- リセット ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #d9e4f1; /* PCで開いた時の外側の色 */
  line-height: 1.6;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}
body.is-modal-open { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

/* ---------- アプリ枠：スマホ縦1画面に収める ----------
   .app を画面の高さぴったりにして、縦に並べた各ブロックのうち
   症例グリッドだけが余った高さを使って伸び縮みします。
   画面が極端に低い端末では .page の中だけがスクロールします（はみ出し防止の保険）。 */
html, body { height: 100%; }
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: var(--app-max);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--page-bg);
  box-shadow: 0 0 40px rgba(27, 54, 93, 0.12);
}
.page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* =========================================================
   ヘッダー
   ========================================================= */
.site-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 50px;
  padding: 0 12px 0 12px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header__brand { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--blue); }
.site-header__logo { flex: 0 0 auto; width: 24px; height: 24px; }
.site-header__name { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.site-header__name-ja { font-size: 16px; font-weight: 800; color: var(--navy); white-space: nowrap; letter-spacing: .04em; }
.site-header__name-en { font-size: 7px; letter-spacing: .08em; color: var(--blue); white-space: nowrap; }
.site-header__actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.btn-reserve {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--blue);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(43, 125, 233, .3);
  transition: transform .15s ease;
}
.btn-reserve:active { transform: scale(.97); }
.site-header__menu {
  display: grid;
  gap: 4.5px;
  padding: 10px 6px;
  background: none;
  border: none;
}
.site-header__menu span { display: block; width: 20px; height: 1.8px; border-radius: 2px; background: var(--navy); }

/* ---------- メニュー（ヘッダー直下に開く） ---------- */
.site-menu {
  position: absolute;
  top: 50px; left: 0; right: 0;
  z-index: 40;
  display: grid;
  gap: 10px;
  padding: 8px 16px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(27, 54, 93, .12);
}
.site-menu[hidden] { display: none; }
.site-menu__clinic { padding: 8px 4px 4px; }
.site-menu__clinic-name { font-size: 15px; font-weight: 800; color: var(--navy); }
.site-menu__clinic-info { margin-top: 4px; font-size: 11.5px; line-height: 1.6; color: var(--text-sub); }
.site-menu__list { display: grid; }
a[aria-disabled="true"] { cursor: default; }
.site-menu__list a {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}
.site-menu__tel, .site-menu__reserve {
  display: block;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}
.site-menu__tel { border: 1.5px solid var(--blue); color: var(--blue); font-variant-numeric: tabular-nums; }
.site-menu__reserve { background: var(--blue); color: var(--white); }

/* =========================================================
   FV（画面の高さに応じて縮む）
   ========================================================= */
.hero { flex: 0 0 auto; background: linear-gradient(180deg, #eaf3fc 0%, var(--page-bg) 100%); }
.hero__inner {
  position: relative;
  height: clamp(92px, 17dvh, 170px);
  padding: clamp(10px, 2.4dvh, 22px) 0 0 16px;
  overflow: hidden;
}
.hero__copy { position: relative; z-index: 1; width: 56%; }
.hero__lead {
  font-family: var(--font-hand);
  font-size: clamp(15px, 2.4dvh, 19px);
  font-weight: 600;
  color: var(--blue);
  letter-spacing: .1em;
  line-height: 1.6;
  text-shadow: 0 0 10px rgba(255, 255, 255, .9);
}
.hero__sub {
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.65;
  text-shadow: 0 0 8px rgba(255, 255, 255, .95);
}
/* 写真は右側に大きく敷き、左端と下端をふんわり消してコピーと重ねる */
.hero__visual { position: absolute; top: 0; right: 0; bottom: 0; width: 66%; }
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 22%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 18%, #000 38%), linear-gradient(180deg, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 18%, #000 38%), linear-gradient(180deg, #000 80%, transparent 100%);
  mask-composite: intersect;
}
.hero__note {
  position: absolute;
  right: 10px; bottom: 12px;
  font-family: var(--font-hand);
  font-size: 9px;
  line-height: 1.55;
  color: var(--navy);
  text-align: right;
  letter-spacing: .04em;
  transform: rotate(-8deg);
  transform-origin: right bottom;
  text-shadow: 0 0 6px #fff, 0 0 10px #fff;
}
.hero__headline { padding: clamp(6px, 1.2dvh, 12px) 12px clamp(4px, 1dvh, 10px); text-align: center; }
.hero__title {
  font-family: var(--font-serif);
  font-size: min(17px, 4.4vw);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  letter-spacing: .02em;
  white-space: nowrap;
}
.hero__desc { margin-top: 3px; font-size: 10.5px; color: var(--navy); font-weight: 600; }


/* =========================================================
   症例一覧（3×3、余った高さをすべて使う）
   ========================================================= */
.case-gallery {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}
.section-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px 6px;
}
.section-head__title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap;
}
.section-head__icon { color: var(--blue); }
.section-head__memo {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-hand);
  font-size: 10px;
  color: var(--blue);
  white-space: nowrap;
}
.section-head__memo-line { display: block; width: 14px; height: 1.5px; background: var(--blue); transform: rotate(-30deg); opacity: .8; }

.case-grid {
  flex: 1 1 0; /* 高さを「残り」で確定させ、3行を均等に割る */
  min-height: 236px; /* これ未満の画面では .page 内スクロールに切り替わる */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 8px;
}

/* ---------- 症例カード ---------- */
.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 4px 4px 0;
  text-align: center;
  color: inherit;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 13px;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.case-card:active { transform: scale(.97); }
.case-card:active, .case-card.is-active { border-color: var(--blue); box-shadow: 0 6px 18px rgba(43, 125, 233, .22); }
.case-card:focus-visible { outline: none; border-color: var(--blue); }

/* 写真部分はカードの残り高さいっぱいに伸びる */
.case-card__flip {
  position: relative;
  flex: 1 1 auto;
  min-height: 36px;
  perspective: 700px;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.4, 0, .2, 1);
}
.case-card.is-flipped .case-card__flip { transform: rotateY(180deg); }
.case-card__face {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.case-card__face--back { transform: rotateY(180deg); }
.case-card__img { width: 100%; height: 100%; object-fit: cover; }
.case-card__label {
  position: absolute;
  top: 4px; right: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1.3;
  color: var(--white);
}
.case-card__label--before { background: var(--before); }
.case-card__label--after { background: var(--after); }
.case-card__sparkle {
  position: absolute;
  right: 6px; bottom: 3px;
  color: #ffd23f;
  font-size: 14px;
  text-shadow: 0 0 6px rgba(255, 255, 255, .9);
  animation: sparkle 1.2s ease-in-out infinite;
}
@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: .9; }
  50% { transform: scale(1.25) rotate(20deg); opacity: 1; }
}

.case-card__meta {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 2px 5px;
}
.case-card__name { font-size: 12.5px; font-weight: 800; color: var(--navy); line-height: 1.25; white-space: nowrap; }
.case-card__sub {
  max-width: 100%;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 丸矢印は写真の右下に重ねて、文字の幅を確保 */
.case-card__arrow {
  position: absolute;
  right: 3px; top: -20px;
  display: grid;
  place-items: center;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}
.case-card__arrow svg { width: 10px; height: 10px; }

/* ---------- 使い方動画カード（3×3の中央） ---------- */
.guide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  min-height: 0;
  padding: 0 4px 6px;
  border: 1.5px solid #9cc3f2;
  border-radius: 13px;
  background: linear-gradient(160deg, #e9f2fd 0%, #cfe2fa 100%);
  box-shadow: 0 6px 16px rgba(43, 125, 233, .22);
  color: var(--white);
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease;
}
.guide-card:active { transform: scale(.97); }
.guide-card:focus-visible { outline: 3px solid rgba(43, 125, 233, .45); outline-offset: 2px; }
/* 動画が読み込まれるまでの代わりの絵 */
.guide-card__phone {
  position: absolute;
  left: 50%; top: 10%;
  width: 34%;
  height: auto;
  transform: translateX(-50%);
  color: var(--blue);
}
.guide-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.guide-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(27, 54, 93, 0) 30%, rgba(27, 54, 93, .78) 100%);
}
.guide-card__play {
  position: absolute;
  left: 50%; top: 38%;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  border: 2px solid var(--white);
  box-shadow: 0 3px 10px rgba(43, 125, 233, .45);
  transform: translate(-50%, -50%);
  animation: guide-pulse 2s ease-in-out infinite;
}
@keyframes guide-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(43, 125, 233, .5); }
  50% { box-shadow: 0 0 0 7px rgba(43, 125, 233, 0); }
}
.guide-card__text { position: relative; display: grid; gap: 1px; }
.guide-card__title { font-size: 11.5px; font-weight: 800; line-height: 1.25; text-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.guide-card__sub {
  justify-self: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
}

/* ---------- 使い方動画（全画面） ---------- */
.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(19, 40, 74, .82);
  backdrop-filter: blur(3px);
  opacity: 1;
  transition: opacity .25s ease;
}
.guide-overlay.is-hidden { opacity: 0; pointer-events: none; }
.guide-player {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
  width: 100%;
  max-width: 400px;
}
.guide-player__frame {
  position: relative;
  width: auto;
  height: min(74dvh, 680px);
  aspect-ratio: 9 / 16;
  max-width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: #eaf3fc;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.guide-player__video { display: block; width: 100%; height: 100%; object-fit: contain; background: #eaf3fc; }
.guide-player__toggle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--white);
}
.guide-player__toggle .icon-play {
  width: 64px; height: 64px;
  padding: 16px;
  border-radius: 50%;
  background: rgba(43, 125, 233, .9);
  opacity: 0;
  transition: opacity .2s ease;
}
.guide-player.is-paused .guide-player__toggle .icon-play { opacity: 1; }
.guide-player__bar {
  position: absolute;
  left: 16px; right: 16px; top: 10px;
  height: 3px;
  border-radius: 2px;
  background: rgba(27, 54, 93, .15);
  overflow: hidden;
}
.guide-player__bar span { display: block; width: 0; height: 100%; background: var(--blue); }
.guide-player__close {
  position: absolute;
  top: -6px; right: -4px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.guide-player__start { max-width: 320px; }

/* =========================================================
   CTA（細い帯）
   ========================================================= */
.cta-section {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 8px 16px;
  background: linear-gradient(180deg, var(--page-bg) 0%, #f6f9fd 100%);
}
.cta-section__text {
  flex: 0 0 auto;
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.45;
  letter-spacing: .02em;
}
/* 公式LINEボタン（LINEのブランドカラー） */
.btn-line {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px 0 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #07cf5a 0%, #06b14d 100%);
  color: var(--white);
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(6, 199, 85, .35);
  transition: transform .15s ease;
}
.btn-line:active { transform: scale(.97); }
.btn-line__icon { flex: 0 0 auto; }
.btn-line__text { display: grid; line-height: 1.2; text-align: left; }
.btn-line__sub { font-size: 10px; font-weight: 700; opacity: .95; }
.btn-line__main { font-size: 14px; font-weight: 800; }

/* =========================================================
   下部ナビ（5項目・画面下に固定）
   ========================================================= */
.bottom-nav {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 2px calc(5px + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1px solid var(--line);
}
.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: var(--navy);
  opacity: .75;
}
.bottom-nav__item svg { width: 20px; height: 20px; transition: transform .15s ease; }
.bottom-nav__item.is-active { opacity: 1; color: var(--blue); }
.bottom-nav__item:active svg { transform: scale(.9); }

/* =========================================================
   画面の高さ別の調整（基本ルールより後に置くこと）
   ========================================================= */
/* 背の低い画面では、FVの補足を省いてグリッドに高さを回す */
@media (max-height: 720px) {
  .hero__sub, .hero__note { display: none; }
  .guide-card__play { width: 26px; height: 26px; top: 34%; }
}
@media (max-height: 600px) {
  .hero__desc { display: none; }
  .guide-card__title br { display: none; }
  .cta-section { padding-block: 4px 6px; }
  .btn-line { height: 40px; }
  .btn-line__main { font-size: 13px; }
  .hero__inner { height: 76px; padding-top: 8px; }
  .hero__lead { font-size: 14px; }
  .case-grid { gap: 6px; }
  .case-card__flip { min-height: 28px; }
  .case-card__meta { padding: 2px 2px 3px; }
  .case-card__name { font-size: 11.5px; }
  .case-card__sub { font-size: 8px; }
}

/* 背の高い画面では、カード内の文字とプレイヤーを少し大きく */
@media (min-height: 780px) {
  .case-card__name { font-size: 13.5px; }
  .case-card__sub { font-size: 9.5px; }
  .case-card__label { font-size: 8.5px; }
  .guide-card__title { font-size: 13px; }
  .guide-card__sub { font-size: 9px; }
  .guide-card__play { width: 38px; height: 38px; }
}

/* =========================================================
   モーダル
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(27, 54, 93, .55);
  backdrop-filter: blur(2px);
  opacity: 1;
  transition: opacity .25s ease;
}
.modal-overlay.is-hidden { opacity: 0; pointer-events: none; }

.case-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--app-max);
  max-height: 90dvh;
  background: var(--white);
  border-radius: var(--radius-large) var(--radius-large) 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
  transform: translateY(0);
  transition: transform .32s cubic-bezier(.2, .8, .2, 1);
}
.modal-overlay.is-hidden .case-modal { transform: translateY(40px); }
@media (min-width: 600px) {
  .modal-overlay { align-items: center; padding: 24px; }
  .case-modal { border-radius: var(--radius-large); max-height: 88vh; }
}

.case-modal__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 14px 12px 18px;
  background: var(--white);
  border-radius: var(--radius-large) var(--radius-large) 0 0;
}
.case-modal__kicker { font-size: 15px; font-weight: 800; color: var(--navy); }
.case-modal__head-actions { display: flex; align-items: center; gap: 6px; }
.btn-others {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px 8px 10px;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}
.case-modal__close {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border: none;
  background: none;
  color: var(--navy);
}

.case-modal__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 18px 26px;
}
.case-modal__title { font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1.4; }

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--blue-pale);
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
}

/* BEFORE / AFTER */
.ba {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.ba__item { position: relative; }
/* 口腔内写真は元画像の比率（3:2）、動画は背景色の上に表示 */
.ba--intraoral .ba__img { aspect-ratio: 3 / 2; background: #f3e6e6; }
.ba__img--video { display: block; width: 100%; object-fit: cover; }
.ba__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}
.ba__label {
  position: absolute;
  top: 8px; right: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--white);
}
.ba__label--before { background: var(--before); }
.ba__label--after { background: var(--after); }
.ba__cap { margin-top: 8px; text-align: center; font-size: 12px; color: var(--navy); font-weight: 600; }
.ba__arrow {
  position: absolute;
  left: 50%;
  top: calc((100% - 28px) / 2 - 6px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  border: 2px solid var(--white);
  box-shadow: 0 3px 10px rgba(43, 125, 233, .4);
  z-index: 1;
}

/* 同じタイプの症例を前後に送る */
.case-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 14px;
  padding: 6px;
  border-radius: 12px;
  background: var(--blue-pale);
}
.case-nav[hidden] { display: none; }
.case-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #cfe1f7;
  border-radius: 9px;
  background: var(--white);
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.case-nav__counter { font-size: 11px; color: var(--text-sub); font-weight: 600; text-align: center; }
.case-nav__counter b { color: var(--navy); font-variant-numeric: tabular-nums; }
.ba--smile { margin-top: 12px; }
.ba--smile[hidden] { display: none; }

/* 一覧カードの件数バッジ */
.case-card__count {
  position: absolute;
  left: 4px; top: -20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(27, 54, 93, .75);
  color: var(--white);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.5;
}

/* ---------- 料金プラン パネル ---------- */
.price-modal__title { font-size: 21px; font-weight: 800; color: var(--navy); line-height: 1.4; }
.price-modal__lead { margin-top: 6px; font-size: 12.5px; line-height: 1.7; color: var(--text-sub); }
.price-plans { display: grid; gap: 10px; margin-top: 16px; }
.price-plan {
  position: relative;
  padding: 14px 16px 14px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.price-plan--main { border-color: var(--blue); background: linear-gradient(180deg, var(--blue-pale) 0%, var(--white) 70%); }
.price-plan__en { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--blue); text-transform: uppercase; }
.price-plan__name { margin-top: 2px; font-size: 15px; font-weight: 800; color: var(--navy); }
.price-plan__price { margin-top: 6px; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; color: var(--navy); }
.price-plan__yen { font-size: 15px; font-weight: 800; }
.price-plan__num { font-size: 28px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.price-plan__unit { font-size: 12px; font-weight: 700; color: var(--text-sub); }
.price-plan__note { margin-top: 4px; font-size: 11.5px; color: var(--text-sub); }
.price-plan__badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 10px;
  font-weight: 800;
}
.price-modal__text { margin-top: 10px; font-size: 13px; line-height: 1.8; color: var(--navy); }
.price-modal__notes { display: grid; gap: 4px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--blue-pale); }
.price-modal__notes li { font-size: 11.5px; line-height: 1.6; color: var(--text-sub); }
.price-modal__more { display: inline-block; margin-top: 14px; font-size: 12.5px; font-weight: 700; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* ブロック共通 */
.modal-block { margin-top: 22px; }
.modal-block__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  font-weight: 800;
  color: var(--navy);
}
.modal-block__title svg { color: var(--blue); }

.check-list { display: grid; gap: 9px; margin-top: 12px; }
.check-list li {
  position: relative;
  padding-left: 30px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--navy);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 1px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--blue);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 7px; top: 5px;
  width: 5px; height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.doctor { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; }
.doctor__avatar { flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--blue-soft); }
.doctor__text { min-width: 0; }
.doctor__meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.doctor__name { font-size: 15px; font-weight: 800; color: var(--navy); }
.doctor__role { font-size: 11px; color: var(--text-sub); font-weight: 600; }
.doctor__comment { margin-top: 6px; font-size: 12.5px; line-height: 1.8; color: var(--navy); }

.spec-list { display: grid; gap: 6px; margin-top: 12px; }
.spec-row {
  display: grid;
  grid-template-columns: 22px 92px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--blue-pale);
  font-size: 12.5px;
  color: var(--navy);
}
.spec-row__icon { display: grid; place-items: center; color: var(--blue); }
.spec-row__label { font-weight: 700; color: var(--text-sub); }
.spec-row__value { font-weight: 600; line-height: 1.5; }
.modal-note { margin-top: 10px; font-size: 10.5px; color: var(--text-sub); line-height: 1.6; }

.case-modal__cta { margin-top: 24px; text-align: center; }
.btn-primary {
  display: inline-flex;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 17px 20px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(43, 125, 233, .35);
  transition: transform .15s ease;
}
.btn-primary:active { transform: scale(.98); }
.case-modal__cta-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
}

/* ---------- アニメーション抑制設定への配慮 ---------- */
@media (prefers-reduced-motion: reduce) {
  .case-card__flip, .case-modal, .modal-overlay { transition: none; }
  .case-card__sparkle, .guide-card__play { animation: none; }
}
