/* ============================================
   DAIKO METER — タクシーメーター風 運転代行メーター
   デザインシステム: ダークテーマ + ネオン + グラスモーフィズム
   ============================================ */

/* --- Google Fonts: HTML <link> タグで読み込み --- */

/* --- CSS Variables --- */
:root {
  /* カラーパレット */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);

  /* ネオンカラー */
  --neon-green: #00ff88;
  --neon-green-dim: #00cc6a;
  --neon-green-glow: rgba(0, 255, 136, 0.3);
  --neon-amber: #ffb800;
  --neon-amber-dim: #cc9400;
  --neon-amber-glow: rgba(255, 184, 0, 0.3);
  --neon-red: #ff3355;
  --neon-red-glow: rgba(255, 51, 85, 0.3);
  --neon-blue: #00aaff;
  --neon-blue-glow: rgba(0, 170, 255, 0.3);
  --neon-purple: #aa55ff;
  --neon-purple-glow: rgba(170, 85, 255, 0.3);

  /* テキスト */
  --text-primary: #f0f4ff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-fare: #00ff88;

  /* ボーダー */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(0, 255, 136, 0.2);

  /* フォント */
  --font-display: 'Share Tech Mono', 'Courier New', monospace;
  --font-body: 'Inter', 'Noto Sans JP', sans-serif;

  /* サイズ */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* シャドウ */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow-green: 0 0 20px var(--neon-green-glow), 0 0 60px rgba(0, 255, 136, 0.1);
  --shadow-glow-amber: 0 0 20px var(--neon-amber-glow), 0 0 60px rgba(255, 184, 0, 0.1);
  --shadow-glow-red: 0 0 20px var(--neon-red-glow), 0 0 60px rgba(255, 51, 85, 0.1);

  /* トランジション */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- リセット --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- 背景パターン --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(0, 255, 136, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(0, 170, 255, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* --- アプリコンテナ --- */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* --- ヘッダー --- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-logo-icon {
  font-size: 1.5rem;
}

.app-logo-text {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-transform: uppercase;
}

.app-header-actions {
  display: flex;
  gap: 8px;
}

.header-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.header-btn:hover,
.header-btn:active {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

/* --- ステータスバー --- */
.status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background var(--transition-normal);
}

.status-dot.active {
  background: var(--neon-green);
  box-shadow: 0 0 6px var(--neon-green-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-dot.warning {
  background: var(--neon-amber);
  box-shadow: 0 0 6px var(--neon-amber-glow);
}

.status-dot.error {
  background: var(--neon-red);
  box-shadow: 0 0 6px var(--neon-red-glow);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.company-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.company-badge.cebu {
  background: rgba(0, 170, 255, 0.15);
  color: var(--neon-blue);
  border: 1px solid rgba(0, 170, 255, 0.3);
}

.company-badge.paris {
  background: rgba(170, 85, 255, 0.15);
  color: var(--neon-purple);
  border: 1px solid rgba(170, 85, 255, 0.3);
}

.time-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.time-badge.night {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-secondary);
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.time-badge.day {
  background: rgba(255, 184, 0, 0.15);
  color: var(--neon-amber);
  border: 1px solid rgba(255, 184, 0, 0.3);
}

/* --- メーター表示 --- */
.meter-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0;
}

/* 料金表示（メイン） */
.fare-display {
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(10, 14, 26, 0.95));
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 28px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-glow-green);
  transition: box-shadow var(--transition-slow);
}

.fare-display::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
  opacity: 0.6;
}

.fare-display.waiting {
  border-color: rgba(255, 184, 0, 0.2);
  box-shadow: var(--shadow-glow-amber);
}

.fare-display.waiting::before {
  background: linear-gradient(90deg, transparent, var(--neon-amber), transparent);
}

.fare-display.stopped {
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.fare-display.stopped::before {
  background: linear-gradient(90deg, transparent, var(--text-muted), transparent);
  opacity: 0.3;
}

.fare-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.fare-amount {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-fare);
  line-height: 1;
  letter-spacing: 2px;
  text-shadow: 0 0 20px var(--neon-green-glow);
  transition: color var(--transition-normal), text-shadow var(--transition-normal);
}

.fare-display.waiting .fare-amount {
  color: var(--neon-amber);
  text-shadow: 0 0 20px var(--neon-amber-glow);
}

.fare-display.stopped .fare-amount {
  color: var(--text-secondary);
  text-shadow: none;
}

.fare-yen {
  font-size: 1.8rem;
  font-weight: 600;
  opacity: 0.7;
  margin-right: 4px;
}

.fare-sub {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.fare-sub-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fare-sub-value {
  color: var(--text-secondary);
  font-weight: 500;
}

/* メトリクスグリッド */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.metric-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  transition: all var(--transition-fast);
}

.metric-card:hover {
  background: var(--bg-glass-hover);
}

.metric-icon {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.metric-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- 号車セレクター --- */
.car-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.car-selector-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.car-selector select {
  flex: 1;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

/* --- コントロールボタン --- */
.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 4px;
}

.controls-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.15), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:active::after {
  opacity: 1;
}

/* 実車ボタン */
.btn-start {
  background: linear-gradient(135deg, #00cc6a, #00aa55);
  color: #fff;
  font-size: 1.1rem;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0, 204, 106, 0.3);
}

.btn-start:hover {
  background: linear-gradient(135deg, #00e077, #00bb60);
  box-shadow: 0 6px 24px rgba(0, 204, 106, 0.4);
  transform: translateY(-1px);
}

.btn-start:active {
  transform: translateY(0);
}

.btn-start.running {
  background: linear-gradient(135deg, #cc2244, #aa1133);
  box-shadow: 0 4px 16px rgba(204, 34, 68, 0.3);
}

.btn-start.running:hover {
  background: linear-gradient(135deg, #dd3355, #bb2244);
  box-shadow: 0 6px 24px rgba(204, 34, 68, 0.4);
}

/* 待機ボタン */
.btn-wait {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 1.1rem;
  padding: 18px;
}

.btn-wait:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.btn-wait.active {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.2), rgba(204, 148, 0, 0.15));
  border-color: rgba(255, 184, 0, 0.4);
  color: var(--neon-amber);
  box-shadow: 0 4px 16px rgba(255, 184, 0, 0.15);
}

.btn-wait:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* オプションボタン */
.btn-option {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.btn-option:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.btn-option.active {
  background: rgba(0, 170, 255, 0.1);
  border-color: rgba(0, 170, 255, 0.3);
  color: var(--neon-blue);
}

/* --- オプションパネル --- */
.options-panel {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height var(--transition-slow), opacity var(--transition-normal), padding var(--transition-slow);
  padding: 0 16px;
}

.options-panel.open {
  max-height: 600px;
  opacity: 1;
  padding: 16px;
}

.options-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.option-row:last-child {
  border-bottom: none;
}

.option-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.option-value {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* トグルスイッチ */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle input {
  display: none;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(100, 116, 139, 0.3);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.toggle input:checked + .toggle-slider {
  background: rgba(0, 204, 106, 0.4);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: var(--neon-green);
}

/* 数値入力 */
.input-number {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  padding: 4px 8px;
  width: 80px;
  text-align: right;
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-number:focus {
  border-color: var(--neon-green);
}

/* --- フッター --- */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.footer-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.footer-btn:hover,
.footer-btn:active {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.footer-btn.active {
  color: var(--neon-green);
}

.footer-btn-icon {
  font-size: 1.25rem;
}

/* --- 履歴画面 --- */
.history-screen {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px 0;
}

.history-screen.visible {
  display: flex;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.history-clear-btn {
  font-size: 0.75rem;
  color: var(--neon-red);
  background: rgba(255, 51, 85, 0.1);
  border: 1px solid rgba(255, 51, 85, 0.2);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.history-clear-btn:hover {
  background: rgba(255, 51, 85, 0.2);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background var(--transition-fast);
}

.history-item:hover {
  background: var(--bg-glass-hover);
}

.history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.history-item-fare {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neon-green);
}

.history-item-details {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.history-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- 設定画面 --- */
.settings-screen {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0;
}

.settings-screen.visible {
  display: flex;
}

.settings-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.settings-group {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.settings-group-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.setting-input {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  padding: 6px 10px;
  width: 200px;
  outline: none;
  font-family: var(--font-body);
  transition: border-color var(--transition-fast);
}

.setting-input:focus {
  border-color: var(--neon-green);
}

/* --- トースト通知 --- */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 448px;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease-out;
  pointer-events: auto;
}

.toast.success {
  border-color: rgba(0, 204, 106, 0.3);
}

.toast.error {
  border-color: rgba(255, 51, 85, 0.3);
}

.toast.info {
  border-color: rgba(0, 170, 255, 0.3);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}

/* --- メーター走行アニメーション --- */
@keyframes fare-tick {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.fare-amount.tick {
  animation: fare-tick 0.2s ease-out;
}

/* 走行中のパルスリング */
.fare-display.running::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-xl);
  border: 2px solid var(--neon-green);
  opacity: 0;
  animation: ring-pulse 3s ease-out infinite;
}

@keyframes ring-pulse {
  0% { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.02); }
}

.fare-display.waiting.running::after {
  border-color: var(--neon-amber);
}

/* --- モーダル --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 500;
  backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease-out;
}

.modal-overlay.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  width: calc(100% - 48px);
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
}

.modal-btn-cancel {
  background: var(--bg-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.modal-btn-cancel:hover {
  background: var(--bg-glass-hover);
}

.modal-btn-confirm {
  background: linear-gradient(135deg, #00cc6a, #00aa55);
  color: #fff;
}

.modal-btn-confirm:hover {
  background: linear-gradient(135deg, #00e077, #00bb60);
}

.modal-btn-danger {
  background: linear-gradient(135deg, #cc2244, #aa1133);
  color: #fff;
}

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

/* --- リザルト画面 --- */
.result-summary {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row-label {
  color: var(--text-secondary);
}

.result-row-value {
  color: var(--text-primary);
  font-weight: 600;
}

.result-total {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--neon-green);
  font-weight: 800;
}

/* --- レスポンシブ --- */
@media (max-width: 360px) {
  .fare-amount {
    font-size: 2.8rem;
  }

  .metrics-grid {
    gap: 6px;
  }

  .metric-value {
    font-size: 1rem;
  }
}

@media (min-width: 481px) {
  .app-container {
    padding-top: 16px;
  }
}

/* --- 安全領域対応 --- */
@supports (padding: env(safe-area-inset-bottom)) {
  .app-container {
    padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
  }
}

/* --- スクロールバー --- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* --- セレクション --- */
::selection {
  background: rgba(0, 255, 136, 0.2);
  color: var(--text-primary);
}
