body {
    font-family: 'Noto Sans CJK JP', 'Hiragino Kaku Gothic Pro', 'Meiryo', 'Yu Gothic', sans-serif;
    margin: 0;
    padding: 0.75rem 1rem; /* 画面端に余白を追加 */
    background-color: #f5f5f5;
    color: #333;
}

#map {
    height: 500px;
    margin: 20px auto;
    max-width: 1000px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 20px auto;
    max-width: 800px;
}

.form-container h1 {
    color: #0d47a1;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #455a64;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="time"]:focus,
.form-group select:focus {
    border-color: #2196f3;
    outline: none;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.3);
}

/* 従来のボタンスタイル（特定のコンテキストのみ） */
.form-container button:not([class*="border-"]):not([class*="bg-"]) {
    background-color: #0d47a1;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    display: block;
    margin: 20px auto 0;
    width: 200px;
    transition: background-color 0.3s;
}

.form-container button:not([class*="border-"]):not([class*="bg-"]):hover {
    background-color: #1565c0;
}

#output {
    margin: 20px auto;
    max-width: 1000px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.route-info {
    line-height: 1.6;
}

.route-point {
    margin: 15px 0;
    padding: 10px;
    border-radius: 4px;
}

.start-point {
    background-color: #e8f5e9;
    border-left: 5px solid #43a047;
}

.waypoint {
    background-color: #e3f2fd;
    border-left: 5px solid #1e88e5;
}

.end-point {
    background-color: #fce4ec;
    border-left: 5px solid #e91e63;
}

.route-segment {
    margin: 10px 0;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.segment-info {
    font-size: 0.9em;
}

.route-summary {
    margin-top: 20px;
    padding: 15px;
    background-color: #fffde7;
    border-radius: 4px;
    font-weight: 600;
}

.environment-info {
    background-color: #e0f7fa;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.8em;
    color: #00838f;
}

.debug-info {
    background-color: #fff3e0;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.8em;
    color: #e65100;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* コンテンツに応じて列幅 */
    margin: 0 auto 1rem;
}

.comparison-table th,
.comparison-table td {
    border: 1px solid #dee2e6;
    padding: 0.4rem 0.75rem;
    text-align: center;
    white-space: nowrap; /* 折り返し防止 */
}

.comparison-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.comparison-table tr:hover {
    background-color: #f1f3f5;
}

@media (min-width: 768px) {
    body {
        padding: 1.5rem 2rem; /* タブレット以上でゆったり */
    }
}

@media (max-width: 768px) {
    .form-container, #map, #output {
        margin: 10px;
        max-width: none;
    }
    
    #map {
        height: 300px;
    }
    
    button {
        width: 100%;
    }
}

/* ==== Responsive Header Update (2025-06-30) ==== */
.site-header {
  background-color: #fff;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap; /* 小画面で折り返し */
}

.header-logo {
  height: auto;
  max-height: 60px; /* 基本サイズ */
  width: auto;
}

.header-title h1 {
  margin: 0;
  font-size: 1.5rem;
}

.header-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

/* コンテンツの最大幅を統一 */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .header-logo {
    max-height: 48px; /* モバイルで少し小さく */
  }
  .header-title h1 {
    font-size: 1.25rem;
  }
}

/* カルーセルカード高さ統一 */
.h-\[700px\] {
  height: 700px !important;
  min-height: 700px !important;
}


.min-h-0 {
  min-height: 0 !important;
}

/* 削除ボタン用カスタムクラス（Tailwind preflightを上書き） */
.btn-delete-red {
  background-color: #dc2626 !important; /* Tailwind red-600 */
}

/* Tom Select optgroup-header カスタムスタイル */
.ts-dropdown .optgroup-header {
  background-color: #e6f7f5 !important; /* bg-primary-50 */
  color: #005a4b !important; /* text-primary-700 */
  border-left: 4px solid #00af93 !important; /* border-l-4 border-primary-500 */
  padding: 0.5rem 0.75rem !important; /* px-3 py-2 */
  font-weight: 600 !important;
  cursor: default;
}

/* 即時表示ツールチップ */
.tooltip-instant {
  position: relative;
  display: inline-block;
}

.tooltip-instant::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background-color: #374151;
  color: white;
  font-size: 12px;
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease-in-out;
  z-index: 1000;
  pointer-events: none;
  margin-bottom: 4px;
}

.tooltip-instant::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #374151;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease-in-out;
  z-index: 1000;
  margin-bottom: -6px;
}

.tooltip-instant:hover::after,
.tooltip-instant:hover::before {
  opacity: 1;
  visibility: visible;
}

