/* ========================================================================= */
/* トラベルスタジオ PRO - スタイリングシステム & 3大ライフサイクル車載レイアウト */
/* ========================================================================= */

:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #e0f2fe;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --base-font-size: 15px;
  --line-height: 1.55;
  --app-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--app-font-family);
  background-color: var(--bg);
  color: var(--text);
  font-size: var(--base-font-size);
  line-height: var(--line-height);
  padding-bottom: 100px;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.app-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========================================================================= */
/* 1. リアルタイム・トースト通知システム                                       */
/* ========================================================================= */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  padding: 12px 18px;
  border-radius: 14px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.85em;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.success { border-left: 5px solid var(--success); }
.toast.info { border-left: 5px solid var(--primary); }
.toast.warn { border-left: 5px solid var(--accent); }
.toast.danger { border-left: 5px solid var(--danger); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========================================================================= */
/* 2. 厳格セキュリティ認証ゲート                                             */
/* ========================================================================= */
#authGateOverlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: #ffffff;
}

.auth-card {
  background: #1e293b;
  border: 1px solid #334155;
  padding: 36px 26px;
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.auth-icon {
  font-size: 2.8em;
  margin-bottom: 12px;
}

.auth-card h2 {
  font-size: 1.4em;
  font-weight: 800;
  margin-bottom: 8px;
  color: #38bdf8;
}

.auth-desc {
  font-size: 0.85em;
  color: #94a3b8;
  margin-bottom: 24px;
  line-height: 1.6;
}

.google-btn {
  width: 100%;
  background: #ffffff;
  color: #0f172a;
  border: none;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 0.95em;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease;
  min-height: 48px;
}

.google-btn:active {
  transform: scale(0.98);
}

.auth-status-box {
  margin-top: 16px;
  font-size: 0.8em;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #334155;
}

/* ========================================================================= */
/* 3. ヘッダー & 最上位3大ライフサイクル大タブ                                */
/* ========================================================================= */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 6px;
  flex-wrap: wrap;
  gap: 10px;
}

.trip-selector-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trip-label {
  font-size: 0.8em;
  font-weight: bold;
  opacity: 0.9;
}

.trip-select-dropdown {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.9em;
  font-weight: bold;
  outline: none;
  cursor: pointer;
  min-height: 38px;
}

.trip-select-dropdown option {
  color: #0f172a;
  background: #ffffff;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.role-badge {
  background: #0f172a;
  color: #38bdf8;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 800;
  border: 1px solid #38bdf8;
  display: inline-flex;
  align-items: center;
}

.h-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: background 0.2s ease;
  min-height: 36px;
}

.h-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.admin-btn {
  background: #0f172a !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
}

.header-titles {
  padding: 6px 0 10px;
}

.editable-field {
  cursor: pointer;
  position: relative;
  display: inline-block;
  border-radius: 6px;
  padding: 2px 6px;
  margin: -2px -6px;
  transition: background 0.2s ease;
}

.editable-field:hover {
  background: rgba(255, 255, 255, 0.18);
  outline: 1px dashed rgba(255, 255, 255, 0.6);
}

.editable-field::after {
  content: " ✏️";
  font-size: 0.7em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.editable-field:hover::after {
  opacity: 1;
}

.header-titles h1 {
  font-size: 1.35em;
  font-weight: 800;
}

.header-titles p {
  font-size: 0.85em;
  opacity: 0.95;
  margin-top: 4px;
}

/* --- 最上位：3大ライフサイクル大タブバー --- */
.lifecycle-tabs-bar {
  display: flex;
  background: rgba(15, 23, 42, 0.3);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 8px;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lifecycle-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88em;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
}

.lifecycle-tab-btn.active {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 日程別サブタブバー（計画モード用） */
.tab-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0 10px;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 18px;
  font-size: 0.85em;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 38px;
}

.tab-btn.active {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tab-btn.pool-tab {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fef08a;
}

.tab-btn.pool-tab.active {
  background: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
}

/* ========================================================================= */
/* 4. モード1: 計画しおりモード 専用スタイル                                  */
/* ========================================================================= */
.day-departure-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.day-dep-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.day-dep-label {
  font-size: 0.85em;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.dep-input {
  padding: 8px 12px;
  font-size: 0.85em;
  border-radius: 8px;
  min-height: 40px;
}

.transit-connector {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -4px 0 10px;
  padding: 6px 0;
}

.transit-line {
  position: absolute;
  top: 50%;
  left: 30px;
  right: 30px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--border), var(--border) 6px, transparent 6px, transparent 12px);
  z-index: 1;
}

.transit-badge-box {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  font-size: 0.8em;
  min-height: 38px;
}

.transit-mode-select {
  border: none;
  background: transparent;
  font-size: 1.1em;
  cursor: pointer;
  outline: none;
  padding: 2px 4px;
}

.transit-time-input {
  border: none;
  outline: none;
  font-size: 0.9em;
  font-weight: bold;
  color: var(--text);
  width: 95px;
  text-align: center;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 4px 6px;
  min-height: 30px;
}

.transit-note-text {
  font-size: 0.8em;
  color: var(--text-muted);
}

.pool-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .pool-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

.pool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.pool-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #cbd5e1;
  cursor: pointer;
}

.pool-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pool-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pool-proposer-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 800;
}

.pool-likes-btn {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
}

.pool-likes-btn:hover {
  background: #fca5a5;
}

.pool-card-title {
  font-size: 1.1em;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.pool-card-desc {
  font-size: 0.85em;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.pool-card-actions {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.assign-day-select {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.8em;
  font-weight: bold;
  background: #f8fafc;
  color: var(--primary-dark);
  outline: none;
  cursor: pointer;
  min-height: 38px;
}

.route-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.current-day-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.day-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.85em;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
}

.day-theme-text {
  font-size: 0.95em;
  font-weight: bold;
  color: var(--text);
}

.route-buttons-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.launch-route-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
  transition: transform 0.1s ease;
  min-height: 44px;
}

.launch-route-btn:active {
  transform: scale(0.98);
}

.toggle-map-btn {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: bold;
  cursor: pointer;
  min-height: 44px;
}

.inline-map-wrapper {
  display: none;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.inline-map-wrapper.open {
  display: block;
}

#routeMap {
  width: 100%;
  height: 380px;
  z-index: 10;
}

.dropzone-card {
  background: var(--card-bg);
  border: 2px dashed var(--primary-light);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.dropzone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-add-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-add-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 0.88em;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.1s ease;
  min-height: 44px;
}

.primary-add-btn:active {
  transform: scale(0.98);
}

.dropzone-subtext {
  font-size: 0.8em;
  color: var(--text-muted);
}

.gemini-btn {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 0.82em;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.input-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.drop-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.9em;
  outline: none;
  background: #ffffff;
  min-height: 44px;
}

.drop-input:focus {
  border-color: var(--primary);
}

.drop-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.85em;
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.drop-btn:hover {
  background: var(--primary-dark);
}

.upload-btn-label {
  background: #0f172a;
  color: #ffffff;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.8em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
}

.action-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.view-toggles {
  display: flex;
  gap: 6px;
}

.view-btn {
  background: #e2e8f0;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8em;
  font-weight: bold;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 38px;
}

.view-btn.active {
  background: var(--primary-dark);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.role-filter-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-label {
  font-size: 0.8em;
  color: var(--text-muted);
  font-weight: bold;
}

.role-select {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.85em;
  background: #ffffff;
  font-weight: bold;
  outline: none;
  color: var(--text);
  min-height: 40px;
}

.category-chip-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.cat-chip {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 0.82em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
}

.cat-chip.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.spot-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  position: relative;
  transition: box-shadow 0.2s ease;
}

.spot-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.spot-summary-header {
  padding: 14px 18px;
  cursor: pointer;
  background: #ffffff;
  user-select: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background-color 0.15s ease;
}

.spot-summary-header:hover {
  background: #f8fafc;
}

.spot-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.spot-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.route-index-badge {
  background: #0f172a;
  color: #ffffff;
  font-size: 0.75em;
  font-weight: 800;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.badge-time {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.8em;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
}

.badge-cat {
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 0.75em;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 600;
}

.spot-ops {
  display: flex;
  align-items: center;
  gap: 4px;
}

.move-btn-group {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.move-btn {
  background: transparent;
  border: none;
  padding: 6px 10px;
  font-size: 0.85em;
  cursor: pointer;
  color: var(--text);
  min-height: 34px;
}

.move-btn:hover {
  background: #e2e8f0;
}

.move-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.op-btn {
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75em;
  font-weight: bold;
  cursor: pointer;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 34px;
}

.op-btn:hover {
  background: #e2e8f0;
}

.op-btn.del:hover {
  background: #fee2e2;
  color: var(--danger);
  border-color: #fca5a5;
}

.spot-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spot-title {
  font-size: 1.15em;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}

.accordion-chevron {
  font-size: 0.8em;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.spot-card.open .accordion-chevron {
  transform: rotate(180deg);
}

.spot-brief-desc {
  font-size: 0.85em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-detail-content {
  display: none;
  border-top: 1px solid var(--border);
  background: #ffffff;
  animation: fadeIn 0.2s ease;
}

.spot-card.open .spot-detail-content {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.spot-hero-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: #cbd5e1;
  cursor: pointer;
}

.spot-body {
  padding: 18px;
}

.spot-full-desc {
  font-size: 0.9em;
  color: var(--text);
  line-height: 1.6;
}

.spot-free-memo-box {
  margin-top: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 12px;
}

.spot-free-memo-header {
  font-size: 0.8em;
  font-weight: 800;
  color: #b45309;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.spot-free-memo-textarea {
  width: 100%;
  border: 1px solid #fcd34d;
  background: #ffffff;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.85em;
  outline: none;
  font-family: inherit;
  resize: vertical;
}

.spot-free-memo-textarea:focus {
  border-color: #f59e0b;
}

.role-notes-box {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0;
  font-size: 0.85em;
  line-height: 1.5;
}

.plan-b-box {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px dashed #f87171;
  border-radius: 10px;
  font-size: 0.85em;
  color: #991b1b;
  line-height: 1.5;
}

.yt-embed-box {
  margin-top: 14px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.yt-embed-box iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.tips-actions {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.timeline-stream {
  position: relative;
  border-left: 3px solid var(--primary);
  margin-left: 20px;
  padding-left: 24px;
}

.timeline-node {
  position: relative;
  margin-bottom: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.media-gallery-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  cursor: pointer;
}

.media-gallery-img {
  width: 100%;
  height: 135px;
  object-fit: cover;
  display: block;
}

.video-indicator-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 0.7em;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.media-gallery-caption {
  padding: 8px 10px;
  font-size: 0.8em;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================================================= */
/* 5. モード2: 🚗 進行・車載ナビPRO 車内特化UIスタイル                        */
/* ========================================================================= */
.live-hud-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  margin-bottom: 16px;
}

.hud-status-badge-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hud-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.78em;
  font-weight: 800;
}

.hud-pill.live-blinking {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: #34d399;
  animation: pulseBlink 2s infinite;
}

@keyframes pulseBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.hud-grid-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 860px) {
  .hud-grid-main {
    grid-template-columns: 1fr 1fr;
  }
}

.hud-spot-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hud-spot-box.current {
  border-left: 6px solid var(--accent);
}

.hud-spot-box.next {
  border-left: 6px solid #38bdf8;
  background: rgba(56, 189, 248, 0.05);
}

.hud-box-label {
  font-size: 0.8em;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 6px;
}

.hud-spot-title {
  font-size: 1.35em;
  font-weight: 800;
  margin-bottom: 10px;
  color: #ffffff;
  line-height: 1.3;
}

.hud-meta-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hud-time-badge {
  background: #334155;
  color: #e2e8f0;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.82em;
  font-weight: bold;
}

.hud-remain-badge {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid #f59e0b;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.82em;
  font-weight: 800;
}

.hud-transit-badge {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid #38bdf8;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.82em;
  font-weight: 800;
}

.hud-brief-memo {
  font-size: 0.85em;
  color: #cbd5e1;
  line-height: 1.5;
}

.hud-nav-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.9em;
  font-weight: 800;
  cursor: pointer;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  min-height: 48px;
  width: 100%;
}

.hud-nav-btn:active {
  transform: scale(0.98);
}

/* 遅延分析 ＆ 巻き返しカード */
.live-delay-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.delay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.delay-title {
  font-size: 0.95em;
  font-weight: 800;
  color: var(--text);
}

.delay-status-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.8em;
  font-weight: 800;
}

.delay-desc {
  font-size: 0.88em;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 12px;
}

.delay-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 現場クイック記録（大型ボタン群） */
.live-quick-record-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.quick-record-title {
  font-size: 0.95em;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
}

.quick-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .quick-btn-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.quick-rec-btn {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  min-height: 72px;
  transition: all 0.15s ease;
}

.quick-rec-btn:hover {
  background: #f1f5f9;
  border-color: var(--primary);
}

.quick-rec-btn:active {
  transform: scale(0.96);
  background: var(--primary-light);
}

.rec-icon {
  font-size: 1.6em;
}

.rec-text {
  font-size: 0.82em;
  font-weight: 800;
  color: var(--text);
}

.recorded-notes-stream {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.quick-note-pill {
  background: #f1f5f9;
  border-left: 4px solid var(--primary);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
  font-size: 0.82em;
  display: flex;
  justify-content: space-between;
}

/* 車内豆知識カード */
.live-trivia-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 16px 20px;
  color: #78350f;
  margin-bottom: 20px;
}

.trivia-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 0.9em;
  margin-bottom: 8px;
}

.trivia-content {
  font-size: 0.9em;
  line-height: 1.6;
}

/* ========================================================================= */
/* 6. モード3: 📖 思い出アルバムモード 専用スタイル                           */
/* ========================================================================= */
.album-hero-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.album-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.album-badge {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.78em;
  font-weight: 800;
  display: inline-block;
  margin-bottom: 6px;
}

.album-title {
  font-size: 1.4em;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.album-sub {
  font-size: 0.88em;
  color: var(--text-muted);
}

/* 家族旅アワード表彰カード */
.family-awards-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.awards-title {
  font-size: 0.95em;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.awards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .awards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.award-member-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.award-member-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 0.85em;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.award-spot-name {
  font-size: 0.92em;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 4px;
}

.award-comment {
  font-size: 0.8em;
  color: var(--text-muted);
  line-height: 1.4;
}

/* メディアフィルターバー */
.album-day-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.album-day-filter-bar::-webkit-scrollbar {
  display: none;
}

.album-filter-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82em;
  font-weight: bold;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  min-height: 38px;
}

.album-filter-btn.active {
  background: var(--primary-dark);
  color: #ffffff;
  border-color: var(--primary-dark);
}

/* メディアグリッドギャラリー */
.album-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .album-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
  }
}

.album-grid-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.album-grid-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.album-grid-item:hover .album-grid-thumb {
  transform: scale(1.05);
}

.album-grid-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  font-size: 0.72em;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 完走フォトジャーナル */
.album-journal-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.journal-heading {
  font-size: 1.1em;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.journal-stream {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.journal-entry {
  border-left: 3px solid var(--primary);
  padding-left: 16px;
  position: relative;
}

.journal-entry-time {
  font-size: 0.8em;
  font-weight: 800;
  color: var(--primary-dark);
}

.journal-entry-title {
  font-size: 1.05em;
  font-weight: 800;
  color: var(--text);
  margin: 2px 0 6px;
}

.journal-entry-memo {
  font-size: 0.88em;
  color: var(--text);
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.journal-media-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.journal-mini-thumb {
  width: 90px;
  height: 65px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}

/* ========================================================================= */
/* 7. Gemini最新リサーチ ＆ 旅程監査専用UI                                  */
/* ========================================================================= */
.gemini-steps-bar {
  display: flex;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.step-item {
  flex: 1;
  min-width: 160px;
  font-size: 0.78em;
  font-weight: bold;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-num {
  background: var(--primary);
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
  font-weight: 800;
  flex-shrink: 0;
}

.gemini-mode-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.mode-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 16px;
  font-size: 0.85em;
  font-weight: bold;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.15s ease;
  white-space: nowrap;
  min-height: 42px;
}

.mode-tab-btn.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.research-theme-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.theme-chip {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 0.8em;
  font-weight: bold;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s ease;
  min-height: 40px;
}

.theme-chip.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.gemini-copy-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 14px;
  font-size: 0.8em;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  min-height: 38px;
}

.merge-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
}

.merge-item-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.merge-item-card input[type="checkbox"] {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--success);
  flex-shrink: 0;
}

.merge-item-body {
  flex: 1;
}

.merge-item-title {
  font-size: 0.88em;
  font-weight: 800;
  color: var(--text);
}

.merge-item-desc {
  font-size: 0.82em;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.45;
}

/* ========================================================================= */
/* 8. サイドバー & モーダルダイアログ（共通「✕」ボタン完全配備）            */
/* ========================================================================= */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.side-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.side-card-title {
  font-weight: 800;
  font-size: 0.95em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.badge-count {
  font-size: 0.75em;
  color: var(--text-muted);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.media-thumb-box {
  position: relative;
  width: 100%;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #0f172a;
}

.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.15s ease;
}

.media-thumb-box:hover .photo-thumb {
  transform: scale(1.06);
}

.chat-box {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding-right: 4px;
}

.msg-item {
  font-size: 0.85em;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f1f5f9;
}

.msg-item.system {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.msg-meta {
  font-weight: bold;
  color: var(--primary-dark);
  font-size: 0.8em;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
}

.chat-form {
  display: flex;
  gap: 6px;
}

.chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.85em;
  outline: none;
  min-height: 44px;
}

.chat-send-btn {
  padding: 0 16px;
  min-height: 44px;
}

.pack-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-top: 6px;
  font-size: 0.85em;
  cursor: pointer;
  transition: background 0.15s ease;
  min-height: 44px;
}

.pack-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.pack-item.done {
  background: #f8fafc;
  color: #94a3b8;
  text-decoration: line-through;
}

.add-btn-sm {
  background: #f1f5f9 !important;
  color: var(--text) !important;
  border: none !important;
  padding: 4px 10px !important;
  min-height: 32px;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 600px;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}

.modal-title {
  font-size: 1.2em;
  font-weight: 800;
  color: var(--text);
  flex: 1;
}

.modal-close-x {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.15em;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  line-height: 1;
}

.modal-close-x:hover {
  background: #fee2e2;
  color: var(--danger);
  border-color: #fca5a5;
  transform: scale(1.05);
}

.modal-close-x:active {
  transform: scale(0.95);
}

.modal-subtext {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.setting-section {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.setting-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.setting-title {
  font-size: 0.9em;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.setting-value-badge {
  font-size: 0.8em;
  font-weight: normal;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 6px;
}

.custom-range {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  accent-color: var(--primary);
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.native-color-picker {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: transparent;
}

.color-presets-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.preset-chip {
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 0.8em;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  min-height: 40px;
}

.preset-chip.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.font-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.85em;
  font-weight: bold;
  outline: none;
  background: #ffffff;
  color: var(--text);
  min-height: 44px;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85em;
  cursor: pointer;
  min-height: 38px;
}

.toggle-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-member-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: #f8fafc;
}

.admin-member-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 6px;
}

.prompt-preview-box {
  background: #f1f5f9;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.8em;
  margin-bottom: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  border: 1px solid var(--border);
  max-height: 180px;
  overflow-y: auto;
}

.custom-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.85em;
  outline: none;
  font-family: inherit;
}

.input-label {
  font-size: 0.8em;
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.cancel-btn {
  background: #e2e8f0 !important;
  color: var(--text) !important;
  border: none !important;
}

/* ========================================================================= */
/* 9. レスポンシブ & タブレット/車載スプリットレイアウト                      */
/* ========================================================================= */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 900px) {
  .workspace-grid {
    grid-template-columns: 1.45fr 0.85fr;
    align-items: start;
  }
}

@media (min-width: 1180px) {
  .workspace-grid {
    grid-template-columns: 1.5fr 0.9fr;
    gap: 24px;
  }
  .inline-map-wrapper {
    position: sticky;
    top: 90px;
  }
}

/* ========================================================================= */
/* 10. 印刷専用A4レイアウト（計画表 ＆ 思い出記念誌兼用）                     */
/* ========================================================================= */
@media print {
  @page {
    size: A4 portrait;
    margin: 14mm 12mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    font-size: 10pt !important;
    line-height: 1.4 !important;
  }

  header,
  #authGateOverlay,
  #toastContainer,
  .lifecycle-tabs-bar,
  .route-action-bar,
  .inline-map-wrapper,
  .dropzone-card,
  .action-toolbar,
  .modal-overlay,
  #chatBox,
  .chat-form,
  .upload-btn-label,
  .tips-actions,
  .h-btn,
  .spot-ops,
  .spot-free-memo-box,
  .pool-card-actions,
  .album-day-filter-bar,
  .live-hud-card,
  .live-delay-card,
  .live-quick-record-card,
  .live-trivia-card {
    display: none !important;
  }

  .lifecycle-view-container {
    display: block !important;
  }

  .spot-detail-content {
    display: block !important;
  }

  .app-layout {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .workspace-grid {
    display: block !important;
  }

  .print-header {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
    margin-bottom: 18px;
  }

  .print-title-box h1 {
    font-size: 17pt;
    font-weight: 800;
    margin-bottom: 2px;
  }

  .print-title-box p {
    font-size: 9.5pt;
    color: #333333;
  }

  .print-meta-box {
    font-size: 8pt;
    text-align: right;
  }

  .spot-card, .pool-card, .album-hero-card, .journal-entry {
    page-break-inside: avoid;
    border: 1px solid #777777 !important;
    border-radius: 8px !important;
    margin-bottom: 14px !important;
    box-shadow: none !important;
    background: #ffffff !important;
  }

  .spot-hero-img, .pool-card-img {
    height: 130px !important;
    object-fit: cover !important;
  }

  .spot-body, .pool-card-body {
    padding: 12px !important;
  }

  .spot-title, .pool-card-title {
    font-size: 12.5pt !important;
  }

  .role-notes-box {
    background: #f8fafc !important;
    border-left: 3px solid #555555 !important;
    padding: 6px 10px !important;
    margin-top: 8px !important;
    font-size: 8.5pt !important;
  }

  .plan-b-box {
    background: #ffffff !important;
    border: 1px dashed #555555 !important;
    color: #000000 !important;
    padding: 6px 10px !important;
    margin-top: 8px !important;
    font-size: 8.5pt !important;
  }

  .yt-embed-box {
    display: none !important;
  }

  .sidebar-panel {
    page-break-before: always;
    display: block !important;
  }

  .side-card {
    border: 1px solid #777777 !important;
    box-shadow: none !important;
    margin-bottom: 14px !important;
  }

  .album-grid-container {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
}

.print-header {
  display: none;
}