* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ヘッダー */
#header {
  background: #1a1a1a;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

#header h1 {
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* フィルター */
#filter-bar {
  background: #f5f5f5;
  padding: 8px 16px;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  overflow-x: auto;
}

.filter-btn {
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.filter-btn.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* タブ */
#tab-bar {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: #888;
}

.tab-btn.active {
  border-bottom-color: #1a1a1a;
  color: #1a1a1a;
  font-weight: bold;
}

/* 地図 */
#map {
  flex: 1;
}

/* 検索バー */
#search-bar {
  display: none;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

#search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
}

#search-input:focus {
  border-color: #1a1a1a;
}

/* 一覧 */
#list-view {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.list-item:active {
  background: #f5f5f5;
}

.list-category {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: bold;
  flex-shrink: 0;
}

.cat-gourmet {
  background: #ffe0e0;
  color: #c00;
}

.cat-other {
  background: #ddeeff;
  color: #006;
}

.list-info {
  overflow: hidden;
}

.list-name {
  font-size: 14px;
  font-weight: bold;
  color: #1a1a1a;
}

.list-address {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 情報パネル */
#info-panel {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 20px 16px 32px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
  z-index: 100;
}

#info-panel.visible {
  display: block;
}

#info-panel .close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

#info-panel .spot-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}

#info-panel .spot-address {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

#info-panel .spot-description {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 12px;
}

#info-panel .video-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ff0000;
  color: #fff;
  padding: 0;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 8px;
  overflow: hidden;
}

#info-panel .video-thumbnail {
  width: 120px;
  height: 68px;
  object-fit: cover;
  flex-shrink: 0;
}

#info-panel .video-link span {
  padding: 0 10px;
}

#info-panel .maps-link {
  display: block;
  background: #f5f5f5;
  color: #333;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}

#info-panel .map-jump-btn {
  display: none;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

/* フィルターオーバーレイ */
#filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 150;
}

#filter-overlay.visible {
  display: block;
}

/* フィルターパネル */
#filter-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 0 0 16px 16px;
  padding: 20px 16px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  z-index: 200;
}

#filter-panel.visible {
  display: block;
}

.filter-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.filter-panel-title {
  font-size: 16px;
  font-weight: bold;
}

.filter-panel-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

.filter-section-title {
  font-size: 12px;
  font-weight: bold;
  color: #888;
  margin-bottom: 10px;
}

#category-buttons,
#region-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.region-btn,
.category-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.region-btn.active,
.category-btn.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

#filter-reset-btn {
  width: 100%;
  padding: 10px;
  background: #f5f5f5;
  color: #333;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

#filter-panel-btn.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* 動画タブ */
#video-view {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#video-list {
  flex: 1;
  overflow-y: auto;
}

.video-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.video-card:active {
  background: #f5f5f5;
}

.video-card-thumb {
  width: 100px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: #eee;
}

.video-card-info {
  overflow: hidden;
}

.video-card-title {
  font-size: 13px;
  font-weight: bold;
  color: #1a1a1a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-count {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* 動画スポット一覧パネル */
#video-spots-panel {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 60%;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
  z-index: 10;
  flex-direction: column;
}

#video-spots-panel.visible {
  display: flex;
}

#video-spots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

#video-spots-title {
  font-size: 14px;
  font-weight: bold;
  color: #1a1a1a;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
  padding-right: 12px;
}

#video-spots-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  flex-shrink: 0;
}

#video-spots-list {
  overflow-y: auto;
}

/* リクエストフッター */
#footer {
  display: none;
}
