/* ═══════════════════════════════════════════
   SmaTraLive — Travel UI v1.2.0
   コンセプト：旅の高揚感・青空・大地
═══════════════════════════════════════════ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body { height: 100%; }
/* 下地（安全領域スペーサー）を背景グラデーションの下端と同色にして一体化 */
html { background: #38BDF8; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Segoe UI', sans-serif;
  background: #38BDF8;
  min-height: 100%;
  margin: 0;
  color: #fff;
}

/* メイン画面：デバイスの可視画面ぴったりに収める */
#app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;        /* 内部は字幕エリアだけスクロール */
  background: linear-gradient(160deg, #1E3A8A 0%, #1D4ED8 35%, #0EA5E9 70%, #38BDF8 100%);
}

/* 安全領域スペーサー：画面外（下）に置き、スクロールで現れる。背景と同色 */
#safe-spacer {
  height: env(safe-area-inset-bottom, 0px);
  background: #38BDF8;
}

/* ── バージョンアップ通知バナー ── */
#update-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #1D4ED8;
  color: #fff;
  text-align: center;
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  animation: slide-down 0.3s ease;
}

@keyframes slide-down {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* ── ヘッダー（iPhone safe area対応） ── */
header {
  padding-top: max(22px, env(safe-area-inset-top, 22px));
  padding-bottom: 14px;
  padding-left: max(20px, env(safe-area-inset-left, 20px));
  padding-right: max(20px, env(safe-area-inset-right, 20px));
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.18);
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.header-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.header-text { flex-shrink: 0; }
.header-text p {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.05em;
  margin-top: 1px;
  white-space: nowrap;   /* REAL-TIME TRANSLATION を折り返さず一行表示 */
}

/* ヘッダー右側：バージョン（上段）＋使い方（下段）を縦並び */
.header-right {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

/* バージョン表示：囲いなし・文字だけ */
.version {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}

/* ヘッダーの「使い方」リンク（バージョンの下段）*/
.help-link {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0f172a;
  background: #38BDF8;
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid #38BDF8;
  text-decoration: none;
  white-space: nowrap;
}
.help-link:active { transform: scale(0.94); }

/* ── 言語ペア選択（カード型・洗練デザイン） ── */
#lang-selector {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#lang-selector label {
  font-size: 0.95rem;
  white-space: nowrap;
}

#lang-pair {
  flex: 1;
  background: rgba(255,255,255,0.18);
  border: 1.5px solid rgba(255,255,255,0.45);
  color: #fff;
  padding: 12px 40px 12px 16px;
  border-radius: 16px;
  font-size: 1.0rem;
  font-weight: 700;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' stroke='white' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  transition: background 0.15s, border-color 0.15s;
}

#lang-pair:active { background: rgba(255,255,255,0.26); }
#lang-pair option { background: #1E3A8A; color: #fff; font-weight: 600; }

/* カスタム言語 */
#custom-lang {
  padding: 12px 16px;
  background: rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  display: none;
  flex-direction: column;
  gap: 10px;
}

.custom-lang-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-lang-row label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
  white-space: nowrap;
  width: 42px;
}

.custom-lang-row select {
  flex: 1;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.30);
  color: #fff;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  cursor: pointer;
  appearance: none;
  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='white' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.custom-lang-row select option {
  background: #1E3A8A;
  color: #fff;
}

.custom-lang-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* 適用後サマリーバー */
#custom-applied {
  padding: 8px 16px;
  background: rgba(255,255,255,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#custom-applied-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

.custom-applied-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.custom-applied-actions button {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-apply {
  background: rgba(255,255,255,0.28);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
}

.btn-reset {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.70);
  border: 1px solid rgba(255,255,255,0.22);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ── 会話ログ（字幕スタイル） ── */
#conversation {
  flex: 1;
  min-height: 0;            /* フレックス内で正しくスクロールさせる */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 流れる翻訳字幕：1つの連続テキストブロック */
#live-transcript {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.65;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.35);
  word-break: break-word;
}

/* 各翻訳セグメント（順序保持・追記される） */
#live-transcript .seg {
  display: block;            /* 1文＝1ブロック（改行して表示）*/
  margin-bottom: 1.0em;      /* 文と文の間隔（従来0.5em→2倍で読みやすく） */
  transition: opacity 0.3s ease;
}

#live-transcript .seg.pending {
  opacity: 0.35;
  font-style: italic;
}

/* 新しく確定した訳文をふわっと表示 */
#live-transcript .seg.appear {
  animation: seg-fade 0.4s ease;
}

@keyframes seg-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 現在聞き取り中のソース音声（薄く下部に） */
#live-interim {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.5);
  font-style: italic;
  line-height: 1.5;
  margin-top: 14px;
  min-height: 1.2em;
  word-break: break-word;
}

#live-interim:not(:empty)::before {
  content: '🎤 ';
  font-style: normal;
}

/* ── ツールバー ── */
#toolbar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  flex-wrap: wrap;
  justify-content: center;
}

.toolbar-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.85);
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.toolbar-btn:hover { background: rgba(255,255,255,0.22); }
.toolbar-btn:active { transform: scale(0.93); }   /* タップが伝わったことを示す押下感 */
.toolbar-btn { transition: background 0.15s, transform 0.08s; }
.toolbar-btn.muted { opacity: 0.45; }

/* 状態ON（まとめ読み再生中など）：水色＋脈動で「動作中」を明示 */
.toolbar-btn.active {
  background: #38BDF8;
  color: #0f172a;
  border-color: #38BDF8;
  font-weight: 700;
  animation: btn-pulse 1.2s ease-in-out infinite;
}
@keyframes btn-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(56,189,248,0.5); }
  50%     { box-shadow: 0 0 0 7px rgba(56,189,248,0.0); }
}

/* 完了フラッシュ（コピー等）：緑で一瞬「✓」表示 */
.toolbar-btn.flash-ok {
  background: #22C55E;
  color: #08210f;
  border-color: #22C55E;
  font-weight: 700;
}

.toolbar-btn.danger:hover { background: rgba(239,68,68,0.4); }

/* ── モード選択 ── */
#mode-selector {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0,0,0,0.12);
  border-top: 1px solid rgba(255,255,255,0.08);
  justify-content: center;
}

.mode-btn {
  flex: 1;
  max-width: 130px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  color: rgba(255,255,255,0.65);
  padding: 8px 6px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.mode-btn .mode-icon { font-size: 1.2rem; line-height: 1; }
.mode-btn .mode-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; }

.mode-btn.active {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* VADアクティブ表示 */
.mode-btn[data-mode="vad"].active {
  background: rgba(239,68,68,0.35);
  border-color: rgba(239,68,68,0.7);
  animation: vad-pulse 2s ease-in-out infinite;
}

@keyframes vad-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(239,68,68,0.0); }
}

/* ── メインコントロール ── */
#controls {
  padding: 12px 16px 12px;   /* 安全領域はスペーサーが担うのでここは通常余白 */
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* 著作権表示（下部パネルに小さく溶け込ませる） */
.copyright {
  font-size: 0.66rem;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

/* 話者選択の案内文（コンパクト） */
.speaker-prompt {
  font-size: 0.80rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 2px;
}

/* 認識中テキスト */
.interim-text {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  font-style: italic;
  text-align: center;
  min-height: 0;
  line-height: 1.3;
}

/* ── 話者ボタン（コンパクト化） ── */
.speak-buttons {
  display: flex;
  gap: 14px;
  width: 100%;
  max-width: 380px;
}

.btn-speak {
  flex: 1;
  border: none;
  border-radius: 20px;
  padding: 14px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;   /* タップ遅延・ダブルタップズームを無効化（標準タップ判定を活かす）*/
  position: relative;
  overflow: hidden;
}

.btn-speak::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: rgba(255,255,255,0.15);
  border-radius: 20px 20px 50% 50%;
  pointer-events: none;
}

/* タップ時の軽い押下フィードバック */
.btn-speak:active { transform: scale(0.97); }

.btn-speak.a {
  background: linear-gradient(160deg, #D96C5C, #B5403A);  /* 彩度・明度を下げ、緑ボタンと釣り合う落ち着いた赤 */
  color: #fff;
  box-shadow: 0 6px 20px rgba(181,64,58,0.35);
}

.btn-speak.b {
  background: linear-gradient(160deg, #10B981, #059669);
  color: #fff;
  box-shadow: 0 6px 20px rgba(16,185,129,0.40);
}

.btn-flag { font-size: 1.5rem; line-height: 1; }
.btn-icon { font-size: 1.3rem; line-height: 1; }

.btn-label {
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.btn-hint {
  font-size: 0.62rem;
  opacity: 0.72;
}

/* 録音中 */
.btn-speak.a.recording {
  transform: scale(0.95);
  animation: pulse-a 1s ease-in-out infinite;
}

.btn-speak.b.recording {
  transform: scale(0.95);
  animation: pulse-b 1s ease-in-out infinite;
}

@keyframes pulse-a {
  0%,100% { box-shadow: 0 0 0 4px rgba(181,64,58,0.3), 0 0 28px rgba(181,64,58,0.5); }
  50%     { box-shadow: 0 0 0 12px rgba(181,64,58,0.1), 0 0 44px rgba(181,64,58,0.7); }
}

@keyframes pulse-b {
  0%,100% { box-shadow: 0 0 0 4px rgba(16,185,129,0.3), 0 0 28px rgba(16,185,129,0.5); }
  50%     { box-shadow: 0 0 0 12px rgba(16,185,129,0.1), 0 0 44px rgba(16,185,129,0.7); }
}

/* VAD待機中ボタン */
.btn-speak.vad-active {
  opacity: 0.6;
  transform: scale(0.97);
}

.btn-speak.vad-listening {
  opacity: 1;
}

.btn-speak:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  animation: none !important;
}

/* ── モード切替トグル（自動 / 手動）── */
#mode-toggle {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  justify-content: center;
}
#mode-toggle .mode-btn {
  flex-direction: row;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 6px;
}

/* ── 単一マイクボタン（言語自動判定）── */
.btn-mic {
  width: 100%;
  max-width: 320px;
  border: none;
  border-radius: 22px;
  padding: 20px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(160deg, #2563EB, #1D4ED8);
  box-shadow: 0 6px 22px rgba(37,99,235,0.40);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
}
.btn-mic::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: rgba(255,255,255,0.15);
  border-radius: 22px 22px 50% 50%;
  pointer-events: none;
}
.btn-mic:active { transform: scale(0.97); }
.btn-mic .btn-icon  { font-size: 2.0rem; }
.btn-mic .btn-label { font-size: 1.0rem; font-weight: 800; letter-spacing: 0.02em; }
.btn-mic .btn-hint  { font-size: 0.68rem; opacity: 0.78; }

/* 自動モード稼働中（緑・脈動） */
.btn-mic.listening {
  background: linear-gradient(160deg, #10B981, #059669);
  animation: pulse-listen 1.4s ease-in-out infinite;
}
@keyframes pulse-listen {
  0%,100% { box-shadow: 0 0 0 4px rgba(16,185,129,0.30), 0 0 26px rgba(16,185,129,0.5); }
  50%     { box-shadow: 0 0 0 12px rgba(16,185,129,0.08), 0 0 42px rgba(16,185,129,0.7); }
}

/* 手動モード録音中（赤・脈動） */
.btn-mic.recording {
  background: linear-gradient(160deg, #EF4444, #B91C1C);
  animation: pulse-rec 1s ease-in-out infinite;
}
@keyframes pulse-rec {
  0%,100% { box-shadow: 0 0 0 4px rgba(239,68,68,0.30), 0 0 26px rgba(239,68,68,0.5); }
  50%     { box-shadow: 0 0 0 12px rgba(239,68,68,0.08), 0 0 42px rgba(239,68,68,0.7); }
}

/* ステータスバー */
.status-bar {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.9);
  text-align: center;
  min-height: 0;
  line-height: 1.3;
}

.status-bar.active { color: #9AE0FF; }

/* エラー */
.error-msg {
  background: rgba(239,68,68,0.25);
  border: 1px solid rgba(239,68,68,0.5);
  color: #FCA5A5;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  text-align: center;
}

/* ══════════════════════════════════════════
   フルスクリーン翻訳オーバーレイ
══════════════════════════════════════════ */
#fs-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 60, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fs-in 0.25s ease;
}

#fs-overlay.hidden { display: none; }

@keyframes fs-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

#fs-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 28px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.fs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.fs-speaker-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}

.fs-close {
  background: rgba(255,255,255,0.12);
  border: none;
  color: rgba(255,255,255,0.7);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fs-body {
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.fs-original {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.55);
  text-align: center;
  line-height: 1.5;
  font-weight: 400;
}

.fs-arrow {
  font-size: 1.5rem;
  color: rgba(255,255,255,0.35);
}

/* 翻訳テキスト：大きく・くっきり */
.fs-translated {
  font-size: clamp(2rem, 8vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  text-align: center;
  line-height: 1.3;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  word-break: break-word;
}

.fs-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px 24px;
  justify-content: center;
}

/* 読み上げボタン（大・目立つ） */
.fs-tts-btn {
  flex: 1;
  max-width: 200px;
  background: linear-gradient(135deg, #F97316, #DC2626);
  color: #fff;
  border: none;
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(249,115,22,0.4);
  transition: transform 0.1s ease;
}

.fs-tts-btn:active { transform: scale(0.96); }

/* iOS自動再生ブロック時：🔊を点滅してタップを促す */
.fs-tts-btn.flash {
  animation: tts-flash 0.6s ease-in-out 5;
}
@keyframes tts-flash {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.06); box-shadow: 0 0 24px rgba(249,115,22,0.8); }
}

.fs-close-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.75);
  padding: 16px 20px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

/* ── iOS PWAバナー ── */
#ios-pwa-banner {
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10));
  border-top: 1px solid rgba(255,255,255,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 16px;
  animation: slide-down 0.4s ease;
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ios-pwa-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ios-pwa-icon { font-size: 1.5rem; flex-shrink: 0; }

.ios-pwa-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ios-pwa-text strong {
  font-size: 0.82rem;
  color: #fff;
}

.ios-pwa-text span {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.4;
}

.ios-pwa-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: rgba(255,255,255,0.75);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
}

.android-install-btn {
  background: #38BDF8;
  color: #0f172a;
  border: none;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── フッター ── */
footer {
  text-align: center;
  padding: 10px 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: #0e1f52;          /* 不透明の濃色：安全領域まで隙間なく覆う */
  flex-shrink: 0;
}

/* ── レスポンシブ ── */
@media (max-width: 380px) {
  .speak-buttons { gap: 10px; }
  .btn-speak { padding: 14px 8px 12px; border-radius: 20px; }
  .btn-flag { font-size: 1.5rem; }
  .btn-icon { font-size: 1.4rem; }
  .fs-translated { font-size: 1.8rem; }
}
