html, body {
  height: 100%;
  margin: 0;
  font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

.panel {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
}

.layer-panel label {
  display: block;
  margin: 4px 0;
  white-space: nowrap;
}

.layer-panel input {
  margin-right: 6px;
}

.favorite-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f7f7f7;
  cursor: pointer;
}

.favorite-btn.active {
  background: #e6b800;
  border-color: #7a5c00;
  color: #fff;
  font-weight: bold;
}

#bathy-legend {
  max-width: 200px;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
}

#info-panel {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  max-width: 420px;
  z-index: 10;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
}

.panel-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: bold;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.panel-toggle .chevron {
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.collapsible.collapsed .panel-body {
  display: none;
}

.collapsible.collapsed .chevron {
  transform: rotate(-90deg);
}

.collapsible .panel-body {
  margin-top: 8px;
}

#info-panel h3 {
  margin: 0 0 6px 0;
  font-size: 15px;
}

#wind-box {
  font-size: 20px;
  font-weight: bold;
}

.trend-chart {
  width: 100%;
  height: 70px;
}

#sst-box {
  font-size: 20px;
  font-weight: bold;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  margin: 2px 0;
}

.swatch {
  display: inline-block;
  width: 16px;
  height: 12px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.note {
  color: #666;
  font-size: 11px;
}

.updated {
  color: #888;
  font-size: 11px;
}

.location-btn {
  width: 40px;
  height: 40px;
  margin: 10px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  font-size: 18px;
  cursor: pointer;
}

.location-btn:hover {
  background: #f1f1f1;
}

@media (max-width: 480px) {
  #info-panel {
    max-width: none;
  }
  .panel {
    font-size: 13px;
  }
}
