/* =========================================
   Cafe Surreal — style.css
   - 背景：#E9DECE
   - メイン/テキスト：#3D1E0F
   - アクセント：#E8407A
   - スマホ：全幅 / デスクトップ：max-width 480px・中央寄せ
   - ページ全体が常にビューポート内に収まる（スクロールバーなし）
   - 円のサイズは何があっても固定
   - Homeに戻るボタンは visibility で切替（レイアウト保持）
   ========================================= */

:root {
  --bg: #E9DECE;
  --ink: #3D1E0F;
  --ink-soft: #6F4A35;
  --ink-mute: rgba(61, 30, 15, 0.55);
  --accent: #E8407A;
  --cream: #F5EFE6;
  --container-max: 480px;
  --radius-pill: 999px;
  --radius-md: 16px;
}

/* --- リセット & 基本 --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  /* スクロールバーは一切表示しない */
  overflow: hidden;
}

body {
  font-family: 'Inter', 'Noto Sans JP', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================
   ページ：ビューポート全体
   ========================================= */
.page {
  width: 100%;
  height: 100vh;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
}

/* =========================================
   コンテナ
   - スマホ：全幅
   - デスクトップ（700px以上）：max-width 480px・中央寄せ
   - transform-origin は top center（JavaScript で scale）
   ========================================= */
.container {
  width: 100%;
  max-width: 100%;
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg);
  transform-origin: top center;
  overflow: hidden;
}

@media (min-width: 700px) {
  .container {
    max-width: var(--container-max);
    padding: 22px 26px 26px;
  }
}

/* =========================================
   1. ヘッダー
   ========================================= */
.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
  padding: 2px 0 0;
}

.menu-btn {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 4px;
  width: 32px;
  align-items: flex-start;
  justify-self: start;
}

.menu-btn span {
  width: 22px;
  height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
}

.header-spacer {
  display: block;
  width: 32px;
  height: 1px;
  justify-self: end;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  /* ボタンリセット */
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  /* ツールチップ用 */
  position: relative;
}

/* ロゴツールチップ（ムード選択と同スタイル） */
.brand::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--cream);
  background: var(--ink);
  padding: 3px 8px 4px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 10;
}

.brand:hover::before,
.brand.is-tooltip-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.brand-logo {
  /* 背景透過の logo_cup.png をそのまま使用（現在の1.5倍：56px → 84px） */
  width: 84px;
  height: auto;
  display: block;
  transition: opacity 0.15s ease;
}

.brand:active .brand-logo {
  opacity: 0.7;
}

/* =========================================
   2. キャッチコピー
   ========================================= */
.hero {
  text-align: center;
  margin: 4px 0 0;
}

.hero-jp {
  margin: 0 0 6px;
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  /* 1.3倍に拡大：13px → 17px */
  font-size: 17px;
  letter-spacing: 0.22em;
  color: var(--ink);
}

.hero-en {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--ink);
  text-transform: uppercase;
}

/* =========================================
   3. 円形アートエリア
   直径：画面幅の 80%（コンテナ幅基準で常に固定）
   サイズは何があっても変わらない
   ========================================= */
.art-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2px 0;
}

.art-circle {
  /* 80% に固定。中身のアニメーションでは絶対にこのサイズが変わらない */
  width: 80%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: var(--ink);
  flex-shrink: 0;
  box-shadow:
    0 22px 44px -18px rgba(61, 30, 15, 0.4),
    inset 0 0 0 1px rgba(245, 239, 230, 0.06);
  /* レコード回転：常時アタッチして paused で待機。
     is-spinning クラスで running に切り替えることで、
     停止時も現在の角度をキープできる（0度に戻らない）。 */
  animation: recordSpin 20s linear infinite;
  animation-play-state: paused;
}

.art-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transform-origin: 50% 50%;
  /* transform は animation の責務のため、ここでは transition せず instant */
}

/* 渦巻きアニメ（image にのみ適用、circle のサイズは変わらない） */
.art-circle.is-swirling .art-image {
  animation: artSwirl 1.4s cubic-bezier(0.65, 0.05, 0.35, 1) forwards;
}

@keyframes artSwirl {
  0% {
    transform: rotate(0deg) scale(1);
    filter: blur(0px);
    opacity: 1;
  }
  50% {
    transform: rotate(450deg) scale(0.7);
    filter: blur(3px);
    opacity: 0.5;
  }
  100% {
    transform: rotate(900deg) scale(0.55);
    filter: blur(8px);
    opacity: 0;
  }
}

/* ブルーミング（新画像が逆方向から登場） */
.art-circle.is-blooming .art-image {
  animation: artBloom 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes artBloom {
  0% {
    transform: rotate(-180deg) scale(0.55);
    filter: blur(10px);
    opacity: 0;
  }
  65% {
    opacity: 1;
  }
  100% {
    transform: rotate(0deg) scale(1);
    filter: blur(0px);
    opacity: 1;
  }
}

/* オーバーレイ（渦中にコニックグラデで混ざる感を出す） */
.art-swirl-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(
    from 0deg,
    rgba(245, 239, 230, 0) 0deg,
    rgba(245, 239, 230, 0.45) 90deg,
    rgba(232, 64, 122, 0.3) 180deg,
    rgba(245, 239, 230, 0.45) 270deg,
    rgba(245, 239, 230, 0) 360deg
  );
  mix-blend-mode: screen;
  transition: opacity 0.2s ease;
}

.art-circle.is-swirling .art-swirl-overlay {
  opacity: 0.85;
  animation: overlaySpin 1.4s linear forwards;
}

.art-circle.is-blooming .art-swirl-overlay {
  opacity: 0;
}

@keyframes overlaySpin {
  0%   { transform: rotate(0deg);    opacity: 0; }
  20%  { opacity: 0.9; }
  100% { transform: rotate(-540deg); opacity: 0; }
}

/* =========================================
   レコード回転（プレーヤー再生中のみ連動）
   - animation は .art-circle 本体に常時アタッチ済み（上記）
   - is-spinning クラスで running / paused を切り替えるだけ
   - 停止時は animation-play-state: paused でその場の角度をキープ
   - is-spinning クラスは togglePlay() が制御する
   ========================================= */
.art-circle.is-spinning {
  animation-play-state: running;
}

/* 渦巻き中・ブルーミング中はレコード回転を止めて swirl 演出を際立たせる */
.art-circle.is-spinning.is-swirling,
.art-circle.is-spinning.is-blooming {
  animation-play-state: paused;
}

@keyframes recordSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* =========================================
   4. ムード選択
   ヒント + テキストのみのムードボタン
   ========================================= */
.mood-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mood-hint {
  margin: 0;
  align-self: center;          /* flex column 内でコンテンツ幅に縮む */
  padding: 6px 14px;
  border: 1px solid rgba(61, 30, 15, 0.18);
  border-radius: var(--radius-pill);
  background: transparent;
  text-align: center;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* ムード選択後は visibility で隠す（スペース保持） */
.mood-hint.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.moods {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.mood {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 2px;
  position: relative;
}

.mood-label {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 500; /* 未選択時もフルカラーで視覚的に誘導 */
  letter-spacing: 0.02em;
  color: var(--ink);
  transition: color 0.2s ease, font-weight 0.2s ease;
}

/* =========================================
   ムード ツールチップ（日本語ポップアップ）
   - デスクトップ：ホバー時に表示
   - スマホ：タップ時に .is-tooltip-visible クラスで表示
   ========================================= */

/* ツールチップ本体 */
.mood::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--cream);
  background: var(--ink);
  padding: 3px 8px 4px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 10;
}

/* ホバー（デスクトップ）またはタッチ選択（スマホ）で表示 */
.mood:hover::before,
.mood.is-tooltip-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 選択中：ピンク（#E8407A）＋アンダーライン */
.mood.is-active .mood-label {
  color: var(--accent);
  font-weight: 500;
}

.mood.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
}

/* =========================================
   5. タップボタン
   ムード未選択時は is-disabled でグレーアウト
   ========================================= */
.tap-btn {
  display: block;
  width: 100%;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-pill);
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  transition:
    transform 0.15s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.25s ease;
  box-shadow: 0 6px 16px -8px rgba(61, 30, 15, 0.4);
}

.tap-btn:hover {
  transform: translateY(-1px);
  background: #2A1408;
}

.tap-btn:active {
  transform: translateY(1px) scale(0.99);
}

/* ムード未選択時：グレーアウト */
.tap-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  box-shadow: none;
}

/* =========================================
   6. Homeに戻るボタン
   - 「Tap for New Art」の真下
   - visibility で表示切替（スペース確保）
   ========================================= */
.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: center;
  padding: 6px 14px;
  border: 1px solid rgba(61, 30, 15, 0.18);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition:
    opacity 0.4s ease,
    visibility 0s linear 0s,
    background 0.2s ease,
    border-color 0.2s ease;
  /* Tap for New Art ボタンとの間に程よい余白 */
  margin-top: -4px;
}

.home-btn:hover {
  background: rgba(61, 30, 15, 0.05);
  border-color: var(--ink);
}

/* 非表示：visibility のみで隠してレイアウトは保持 */
.home-btn.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* =========================================
   6.5. マグカップ注文ボタン
   - 円形アートとムード選択の間に配置
   - Homeに戻るボタンと同タイミングで visibility 制御
   ========================================= */
.mug-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  padding: 6px 16px;
  border: 1px solid rgba(61, 30, 15, 0.18);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition:
    opacity 0.4s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.mug-btn:hover {
  background: rgba(61, 30, 15, 0.05);
  border-color: var(--ink);
}

/* 非表示：visibility のみで隠してレイアウトは保持 */
.mug-btn.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* =========================================
   7. 説明テキスト（英日2行）
   ========================================= */
.caption {
  margin: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  line-height: 1.55;
  color: var(--ink);
}

.caption-en {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.caption-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

/* =========================================
   8. プレーヤー
   波形 → 3ボタン → 曲名
   ========================================= */
.play-hint {
  display: none;
  text-align: center;
  font-size: 0.75rem;
  color: #E8407A;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.play-hint.is-visible {
  opacity: 1;
}
@media (hover: none) and (pointer: coarse) {
  .play-hint {
    display: block;
  }
}

.player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* ピンクの波形（縦棒が上下に動く） */
.wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 56px;
  width: 100%;
  max-width: 320px;
}

.wave span {
  display: inline-block;
  width: 4px;
  height: 7px;
  background: var(--accent);
  border-radius: 3px;
  animation: waveBeat 0.9s ease-in-out infinite;
  animation-play-state: paused; /* デフォルトは静止 */
}

/* 再生中のみアニメーション動作 */
.player.is-playing .wave span {
  animation-play-state: running;
}

/* ベルカーブ風の高さプロファイル（ピーク値を約2倍に拡大） */
.wave span:nth-child(13),
.wave span:nth-child(14),
.wave span:nth-child(15),
.wave span:nth-child(16),
.wave span:nth-child(17),
.wave span:nth-child(18) {
  --wave-peak: 44px;
}

.wave span:nth-child(10),
.wave span:nth-child(11),
.wave span:nth-child(12),
.wave span:nth-child(19),
.wave span:nth-child(20),
.wave span:nth-child(21) {
  --wave-peak: 36px;
}

.wave span:nth-child(7),
.wave span:nth-child(8),
.wave span:nth-child(9),
.wave span:nth-child(22),
.wave span:nth-child(23),
.wave span:nth-child(24) {
  --wave-peak: 26px;
}

.wave span:nth-child(4),
.wave span:nth-child(5),
.wave span:nth-child(6),
.wave span:nth-child(25),
.wave span:nth-child(26),
.wave span:nth-child(27) {
  --wave-peak: 18px;
}

.wave span:nth-child(1),
.wave span:nth-child(2),
.wave span:nth-child(3),
.wave span:nth-child(28),
.wave span:nth-child(29),
.wave span:nth-child(30) {
  --wave-peak: 12px;
}

/* 各バーに少しずつ delay を与えてうねらせる */
.wave span:nth-child(1)  { animation-delay: 0.00s; }
.wave span:nth-child(2)  { animation-delay: 0.05s; }
.wave span:nth-child(3)  { animation-delay: 0.10s; }
.wave span:nth-child(4)  { animation-delay: 0.15s; }
.wave span:nth-child(5)  { animation-delay: 0.20s; }
.wave span:nth-child(6)  { animation-delay: 0.25s; }
.wave span:nth-child(7)  { animation-delay: 0.30s; }
.wave span:nth-child(8)  { animation-delay: 0.35s; }
.wave span:nth-child(9)  { animation-delay: 0.40s; }
.wave span:nth-child(10) { animation-delay: 0.45s; }
.wave span:nth-child(11) { animation-delay: 0.50s; }
.wave span:nth-child(12) { animation-delay: 0.55s; }
.wave span:nth-child(13) { animation-delay: 0.60s; }
.wave span:nth-child(14) { animation-delay: 0.65s; }
.wave span:nth-child(15) { animation-delay: 0.70s; }
.wave span:nth-child(16) { animation-delay: 0.65s; }
.wave span:nth-child(17) { animation-delay: 0.60s; }
.wave span:nth-child(18) { animation-delay: 0.55s; }
.wave span:nth-child(19) { animation-delay: 0.50s; }
.wave span:nth-child(20) { animation-delay: 0.45s; }
.wave span:nth-child(21) { animation-delay: 0.40s; }
.wave span:nth-child(22) { animation-delay: 0.35s; }
.wave span:nth-child(23) { animation-delay: 0.30s; }
.wave span:nth-child(24) { animation-delay: 0.25s; }
.wave span:nth-child(25) { animation-delay: 0.20s; }
.wave span:nth-child(26) { animation-delay: 0.15s; }
.wave span:nth-child(27) { animation-delay: 0.10s; }
.wave span:nth-child(28) { animation-delay: 0.06s; }
.wave span:nth-child(29) { animation-delay: 0.03s; }
.wave span:nth-child(30) { animation-delay: 0.00s; }

@keyframes waveBeat {
  0%, 100% { height: 7px; }
  50%      { height: var(--wave-peak, 24px); }
}

/* 3ボタン（中央寄せ、ボタン形状なし） */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.player-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

/* ムード未選択・音楽未開始時のグレーアウト */
.player-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.player-btn:disabled:hover {
  opacity: 0.25;
}

.player-btn:not(:disabled):hover {
  opacity: 1;
}

.player-btn:active {
  transform: scale(0.92);
}

.play-btn {
  width: 39px;
  height: 39px;
  opacity: 1;
}

.play-btn svg {
  width: 27px;
  height: 27px;
}

/* 再生 / 一時停止アイコンの切替 */
.icon-pause {
  display: none;
}
.player.is-playing .icon-play {
  display: none;
}
.player.is-playing .icon-pause {
  display: block;
}

/* 曲名（タップで Spotify リンク） */
.player-track {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  opacity: 0.75;
  text-align: center;
  transition: opacity 0.2s ease;
}

.player-track:hover {
  opacity: 1;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* =========================================
   9. フッター（メールアドレス削除済み・スペース保持のみ）
   ========================================= */
.footer {
  margin-top: 2px;
  min-height: 4px;
}

/* =========================================
   ナビゲーション オーバーレイ
   - container の外側に配置し、scale の影響を受けない
   - 音楽・回転は継続（overlay は UI のみ）
   ========================================= */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition: opacity 0.35s ease, visibility 0s linear 0s;
}

/* × 閉じるボタン */
.nav-close {
  position: absolute;
  top: 24px;
  right: 28px;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  opacity: 0.65;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 4px 8px;
}

/* メニュー → モーダル切り替え中：メニュー内容だけ素早くフェードアウト。
   オーバーレイ背景（var(--bg)）は維持するので HOME は一切見えない。 */
.nav-overlay.is-switching .nav-close,
.nav-overlay.is-switching .nav-menu {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

/* About → Contact 切り替え①：modal-box だけを 0.18s でフェードアウト。
   フェードアウト完了後に About ごと即座に非表示にし、
   そのあとで Contact を開くので About が Contact の裏に透けない。 */
.modal.is-switching .modal-box {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.nav-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

/* メニューリスト */
.nav-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.nav-item {
  font-family: 'Inter', sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  position: relative;
  transition: color 0.2s ease;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.25s ease;
}

.nav-item:hover {
  color: var(--accent);
}

.nav-item:hover::after {
  width: 100%;
}

/* =========================================
   モーダル 共通
   ========================================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(61, 30, 15, 0.55);
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease, visibility 0s linear 0.32s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transition: opacity 0.32s ease, visibility 0s linear 0s;
}

.modal-box {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 36px 28px 32px;
  max-width: 460px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 56px -12px rgba(61, 30, 15, 0.35);
}

/* モーダル × 閉じるボタン */
.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 4px 6px;
}

.modal-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

/* =========================================
   About モーダル
   ========================================= */
.about-content {
  padding-top: 4px;
}

/* JP / EN 言語切り替えトグル */
.about-lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
}

.about-lang-btn {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  padding: 3px 10px 4px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  line-height: 1;
}

.about-lang-btn.is-active {
  color: var(--ink);
  border-color: rgba(61, 30, 15, 0.28);
}

.about-lang-btn:not(.is-active):hover {
  color: var(--accent);
}

.about-lang-sep {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--ink-mute);
  user-select: none;
}

/* hidden 属性が CSS リセットで上書きされないよう明示 */
.about-text[hidden] {
  display: none;
}

.about-text {
  font-family: 'Space Mono', 'Kaisei Opti', serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 2;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin: 0;
}

.about-text em {
  font-style: normal;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.about-contact-link {
  display: inline;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  letter-spacing: inherit;
  line-height: inherit;
  transition: opacity 0.2s ease;
}

.about-contact-link:hover {
  opacity: 0.75;
}

/* =========================================
   Members Only（Portfolio / Shop）
   ========================================= */
.members-box {
  text-align: center;
}

/* 小さいタイトル（ページ名） */
.members-eyebrow {
  margin: 0 0 8px;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.members-title {
  margin: 0 0 10px;
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.members-desc {
  margin: 0 0 22px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.members-input {
  display: block;
  width: 100%;
  padding: 12px 18px;
  margin-bottom: 12px;
  border: 1.5px solid rgba(61, 30, 15, 0.2);
  border-radius: var(--radius-pill);
  background: var(--cream);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease;
}

.members-input:focus {
  border-color: var(--accent);
}

.members-enter-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-pill);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
  transition: background 0.2s ease, transform 0.15s ease;
}

.members-enter-btn:hover {
  background: #2A1408;
}

.members-enter-btn:active {
  transform: scale(0.98);
}

/* =========================================
   Contact モーダル
   ========================================= */
.contact-box {
  text-align: left;
}

.contact-heading {
  margin: 0 0 22px;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.45;
}

.contact-heading-jp {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-top: 3px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-input,
.contact-textarea {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 12px;
  border: 1.5px solid rgba(61, 30, 15, 0.2);
  border-radius: 12px;
  background: var(--cream);
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease;
  resize: none;
}

.contact-input:focus,
.contact-textarea:focus {
  border-color: var(--accent);
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: var(--ink-mute);
}

/* 音声入力ボタン */
/* 音声入力ボタン行（voiceBtn + 言語選択を横並び） */
.voice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

/* JP / EN 言語選択ボタングループ */
.voice-lang-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.voice-lang-btn {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  padding: 3px 8px 4px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  line-height: 1;
  transition: color 0.2s ease, border-color 0.2s ease;
}

/* 選択中：アクセントカラー（#E8407A）でハイライト */
.voice-lang-btn.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.voice-lang-btn:not(.is-active):hover {
  color: var(--ink);
  border-color: rgba(61, 30, 15, 0.2);
}

.contact-voice-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 8px 16px;
  /* margin-bottom は .voice-row 側で管理 */
  border: 1.5px solid rgba(61, 30, 15, 0.2);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.contact-voice-btn:hover {
  border-color: var(--ink);
  background: rgba(61, 30, 15, 0.04);
}

.contact-voice-btn.is-recording {
  border-color: var(--accent);
  background: rgba(232, 64, 122, 0.08);
  color: var(--accent);
}

/* 送信ボタン */
.contact-submit-btn {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-pill);
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: center;
  transition: background 0.2s ease, transform 0.15s ease;
}

.contact-submit-btn:hover {
  background: #2A1408;
}

.contact-submit-btn:active {
  transform: scale(0.98);
}

/* 送信後のサンクスメッセージ */
.contact-thanks {
  display: none;
  text-align: center;
  padding: 16px 0 8px;
}

.contact-thanks.is-visible {
  display: block;
}

.contact-thanks p {
  margin: 0 0 6px;
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.contact-thanks p:last-child {
  margin-top: 10px;
}

.contact-thanks-sub {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px !important;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink-soft) !important;
  line-height: 1.8;
}

/* =========================================
   Spotify IFrame（非表示）
   ========================================= */
#spotify-player-wrapper {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
