/* カスタムスタイル */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --secondary: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg: #f0f9ff;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
}

/* ヘッダー */
.app-header {
  background: linear-gradient(135deg, #0c4a6e, #0ea5e9);
  color: white;
  padding: 0;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo .fish-icon {
  font-size: 1.8rem;
}

/* ナビゲーション */
.nav-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 4px;
}

.nav-tab {
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
  color: rgba(255,255,255,0.8);
  border: none;
  background: transparent;
}

.nav-tab:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

.nav-tab.active {
  background: white;
  color: var(--primary-dark);
  font-weight: 600;
}

/* メインコンテンツ */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* ページ（タブ切り替え） */
.page {
  display: none;
}
.page.active {
  display: block;
}

/* カード */
.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

/* 統計カード */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* フォーム */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-label .required {
  color: var(--danger);
  margin-left: 4px;
}

.form-input, .form-select, .form-textarea {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

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

/* ボタン */
.btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-success {
  background: var(--secondary);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
}

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

.btn-secondary {
  background: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* 釣果リスト */
.catch-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.catch-card {
  background: white;
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
  cursor: pointer;
}

.catch-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.catch-fish-icon {
  font-size: 2.5rem;
  min-width: 52px;
  text-align: center;
}

.catch-main {
  flex: 1;
}

.catch-fish-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.catch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.catch-tag {
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.catch-size {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  text-align: right;
  min-width: 80px;
}

.catch-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

/* 検索バー */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-bar .form-input {
  flex: 1;
  min-width: 200px;
}

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.page-btn {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.page-btn:hover, .page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* モーダル */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: white;
  border-radius: 20px;
  padding: 28px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 6px;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* トースト通知 */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #1e293b;
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
}

.toast.success { border-left: 4px solid var(--secondary); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ローディング */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 空状態 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 8px;
}

/* チャートコンテナ */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.chart-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--border);
}

.chart-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

/* 詳細ビュー */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.detail-item {
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px;
}

.detail-key {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* ========== 魚 AI 識別パネル ========== */
.fish-ai-panel {
  background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
  border: 2px dashed #a5b4fc;
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.fish-ai-panel:focus-within {
  border-color: var(--primary);
}

/* アップロードゾーン */
.fish-upload-zone {
  padding: 24px 20px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
  user-select: none;
}

.fish-upload-zone:hover,
.fish-upload-zone.dragover {
  background: rgba(99, 102, 241, 0.06);
}

.fish-upload-zone.dragover {
  border-color: #6366f1;
}

.fish-upload-icon {
  font-size: 2.8rem;
  margin-bottom: 10px;
  line-height: 1;
}

.fish-upload-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  color: #475569;
}

.fish-upload-text strong {
  color: #1e293b;
  font-size: 0.95rem;
}

.fish-upload-text span {
  font-size: 0.78rem;
  color: #94a3b8;
}

.fish-upload-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.fish-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: white;
  border: 1.5px solid #c7d2fe;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4f46e5;
  transition: all 0.15s;
  pointer-events: auto;
}

.fish-upload-btn:hover {
  background: #eef2ff;
  border-color: #6366f1;
}

/* 識別結果エリア */
.fish-result-wrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  border-top: 2px dashed #a5b4fc;
}

@media (max-width: 540px) {
  .fish-result-wrap { grid-template-columns: 1fr; }
}

/* プレビュー */
.fish-preview {
  position: relative;
  background: #0f172a;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fish-preview img {
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

.fish-preview-change {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}
.fish-preview-change:hover { background: rgba(0,0,0,0.8); }

/* 識別結果 */
.fish-result-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ローディング */
.fish-loading {
  padding: 32px;
  text-align: center;
  color: #6366f1;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.fish-loading-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #e0e7ff;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* 識別結果カード */
.fish-id-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.fish-id-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
}

.fish-id-scientific {
  font-size: 0.75rem;
  color: #94a3b8;
  font-style: italic;
  margin-top: 2px;
}

/* 信頼度バー */
.confidence-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.confidence-label {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

.confidence-bar-bg {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.confidence-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.confidence-value {
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 38px;
  text-align: right;
}

/* 信頼度カラー */
.conf-high   { background: #10b981; }
.conf-mid    { background: #f59e0b; }
.conf-low    { background: #ef4444; }

/* 詳細グリッド */
.fish-id-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fish-id-tag {
  background: #f1f5f9;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.78rem;
  color: #475569;
}

.fish-id-desc {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.6;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 3px solid #a5b4fc;
}

.fish-id-tips {
  font-size: 0.8rem;
  color: #0369a1;
  background: #f0f9ff;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

/* 適用ボタン */
.fish-apply-btn {
  padding: 9px 18px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
}
.fish-apply-btn:hover { opacity: 0.88; }
.fish-apply-btn:active { transform: scale(0.97); }

/* エラー */
.fish-error {
  padding: 20px;
  text-align: center;
  color: #dc2626;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* 魚でない場合 */
.fish-not-fish {
  padding: 20px;
  text-align: center;
  color: #d97706;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ========== 天気 GPS ボタン ========== */
.btn-weather-gps {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: white;
  border: none;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  white-space: nowrap;
}

.btn-weather-gps:hover {
  opacity: 0.88;
}

.btn-weather-gps:active {
  transform: scale(0.95);
}

.btn-weather-gps.loading {
  background: #94a3b8;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-weather-gps.loading #weather-gps-icon {
  display: inline-block;
  animation: spin 1s linear infinite;
}

/* 天気詳細パネル */
.weather-panel {
  margin-top: 10px;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.85rem;
}

.weather-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.weather-panel-emoji {
  font-size: 2.4rem;
  line-height: 1;
}

.weather-panel-main {
  flex: 1;
}

.weather-panel-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.weather-panel-temp {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 2px;
}

.weather-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.weather-panel-item {
  background: white;
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
}

.weather-panel-item-label {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-bottom: 2px;
}

.weather-panel-item-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
}

.weather-panel-apply {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-apply {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-apply-weather {
  background: #dbeafe;
  color: #1d4ed8;
}
.btn-apply-weather:hover { background: #bfdbfe; }

.btn-apply-temp {
  background: #fef3c7;
  color: #92400e;
}
.btn-apply-temp:hover { background: #fde68a; }

.btn-apply-all {
  background: #dcfce7;
  color: #166534;
}
.btn-apply-all:hover { background: #bbf7d0; }

/* 水温ヒント */
.water-temp-hint {
  margin-top: 6px;
  padding: 7px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========== GPS ボタン ========== */
.location-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.location-input-wrap .form-input {
  padding-right: 88px; /* ボタン分の余白 */
}

.btn-gps {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
  z-index: 2;
}

.btn-gps:hover {
  background: var(--primary-dark);
}

.btn-gps:active {
  transform: translateY(-50%) scale(0.95);
}

.btn-gps.loading {
  background: #94a3b8;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-gps.loading .gps-icon {
  display: inline-block;
  animation: spin 1s linear infinite;
}

.gps-icon {
  font-size: 0.9rem;
  line-height: 1;
}

/* GPS 位置情報カード（フォーム内） */
.gps-result {
  margin-top: 6px;
  padding: 8px 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #0369a1;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
}

.gps-result.error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* レスポンシブ */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
  }
  
  .nav-tabs {
    width: 100%;
    justify-content: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .catch-card {
    flex-wrap: wrap;
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }
}

/* テーブル */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.data-table th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table tr:hover td {
  background: #f8fafc;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}

.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }

/* セクションタイトル */
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ========== 写真添付機能 ========== */

/* 釣果カードのサムネイル */
.catch-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

/* 写真添付パネル */
.photo-attach-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
}

/* アップロードゾーン（既存 .fish-upload-zone を流用） */
.fish-upload-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
}
.fish-upload-zone:hover,
.fish-upload-zone.dragover {
  border-color: var(--primary);
  background: #e0f2fe;
}
.fish-upload-icon { font-size: 2rem; margin-bottom: 6px; }
.fish-upload-text { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.fish-upload-text strong { color: var(--text); font-size: 0.9rem; }
.fish-upload-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.fish-upload-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary); color: white;
  border-radius: 8px; padding: 6px 14px;
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s;
}
.fish-upload-btn:hover { background: var(--primary-dark); }
.fish-upload-btn-camera { background: var(--secondary); }
.fish-upload-btn-camera:hover { background: #059669; }

/* プレビューラッパー */
.photo-preview-wrap {
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.photo-preview-img {
  max-width: 100%;
  max-height: 280px;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.photo-preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 詳細モーダルの写真 */
.detail-photo-wrap {
  position: relative;
  margin-bottom: 8px;
  border-radius: 12px;
  overflow: hidden;
}
.detail-photo {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  background: #0f172a;
  border-radius: 12px;
  cursor: zoom-in;
  display: block;
}
.detail-photo-del {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,0.55);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px; height: 28px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.detail-photo-del:hover { background: var(--danger); }

/* ライトボックス */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-lightbox-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.88);
}
.photo-lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.photo-lightbox-inner img {
  max-width: 95vw;
  max-height: 85vh;
  border-radius: 10px;
  object-fit: contain;
}
.photo-lightbox-close {
  position: absolute;
  top: -14px; right: -14px;
  background: white;
  color: #1e293b;
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.photo-lightbox-caption {
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

/* ========== ルアー写真パネル ========== */
.lure-photo-panel {
  margin-top: 4px;
}

.lure-upload-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  background: #f8fafc;
  transition: border-color 0.2s, background 0.2s;
}

.lure-upload-zone:hover,
.lure-upload-zone.dragover {
  border-color: #f59e0b;
  background: #fffbeb;
}

.lure-upload-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #64748b;
}

.lure-upload-icon { font-size: 1.3rem; }

.lure-upload-text { font-weight: 500; flex: 1; }

.lure-upload-cam {
  font-size: 1.2rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: #e2e8f0;
  cursor: pointer;
  transition: background 0.15s;
}
.lure-upload-cam:hover { background: #cbd5e1; }

.lure-preview-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.lure-preview-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  transition: opacity 0.15s;
}
.lure-preview-img:hover { opacity: 0.85; }

.lure-preview-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 一覧カードのルアー写真バッジ */
.lure-photo-badge {
  cursor: pointer;
  background: #fff7ed !important;
  color: #92400e !important;
  border: 1px solid #fed7aa !important;
}
.lure-photo-badge:hover { opacity: 0.8; }

/* 詳細モーダルのルアー写真セクション */
.detail-lure-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.detail-lure-photo-wrap {
  position: relative;
  display: inline-block;
}

.detail-lure-photo {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  cursor: pointer;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  transition: opacity 0.15s;
}
.detail-lure-photo:hover { opacity: 0.9; }

/* ========== 潮見パネル ========== */
.tide-panel {
  margin-top: 10px;
  background: linear-gradient(135deg, #eff6ff, #ecfdf5);
  border: 1px solid #93c5fd;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.85rem;
}

.tide-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.tide-panel-station {
  font-size: 0.82rem;
  color: #475569;
}

.tide-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.tide-type-大潮 { background: #fee2e2; color: #991b1b; }
.tide-type-中潮 { background: #fef3c7; color: #92400e; }
.tide-type-小潮 { background: #dbeafe; color: #1e40af; }
.tide-type-長潮 { background: #d1fae5; color: #065f46; }
.tide-type-若潮 { background: #ede9fe; color: #4c1d95; }

.tide-extremes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.tide-extreme-item {
  background: white;
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.tide-extreme-type {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-bottom: 2px;
}

.tide-extreme-time {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.tide-extreme-height {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

.tide-extreme-high .tide-extreme-time { color: #1d4ed8; }
.tide-extreme-low .tide-extreme-time { color: #dc2626; }

/* 潮汐グラフキャンバス */
.tide-chart-wrap {
  position: relative;
  height: 120px;
  margin-bottom: 10px;
}

/* 潮見詳細（釣果詳細モーダル内） */
.detail-tide-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.detail-tide-section h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tide-info-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tide-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f1f5f9;
  border-radius: 20px;
  font-size: 0.78rem;
  color: #334155;
  font-weight: 500;
}

@media (max-width: 480px) {
  .catch-thumb { width: 52px; height: 52px; }
  .photo-preview-img { max-height: 200px; }
  .detail-photo { max-height: 220px; }
  .tide-extremes-grid { grid-template-columns: repeat(2, 1fr); }
}
