.surfarea-typhoon-page {
  background: #fff;
  border: 1px solid #d9e5df;
  border-radius: 12px;
  padding: 20px;
  color: #1f2f29;
}

.surfarea-typhoon-hero__title,
.surfarea-typhoon-summary__title,
.surfarea-typhoon-active__title,
.surfarea-typhoon-track__title,
.surfarea-typhoon-source-notice__title {
  color: #1b4a3c;
}

.surfarea-typhoon-summary__grid,
.surfarea-typhoon-active__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.surfarea-typhoon-card {
  border: 1px solid #d9e5df;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.surfarea-typhoon-track-table-wrap {
  overflow-x: auto;
}

.surfarea-typhoon-track-table {
  width: 100%;
  border-collapse: collapse;
}

.surfarea-typhoon-track-table--wide {
  min-width: 1100px;
}

.surfarea-typhoon-track-table th,
.surfarea-typhoon-track-table td {
  border: 1px solid #d9e5df;
  padding: 8px;
  font-size: 14px;
  white-space: nowrap;
}

.surfarea-typhoon-list-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.surfarea-typhoon-mini-card {
  border: 1px solid #d9e5df;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.surfarea-typhoon-mini-card__title {
  margin: 0 0 6px;
  font-weight: 700;
}

.surfarea-typhoon-mini-card__sub,
.surfarea-typhoon-mini-card__meta {
  margin: 0 0 4px;
  font-size: 13px;
  color: #4f5f58;
}

.surfarea-typhoon-map iframe {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: 12px;
}

.surfarea-typhoon-source-notice {
  margin-top: 20px;
  border: 1px solid #d9e5df;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
  font-size: 13px;
  color: #42524d;
}

.surfarea-typhoon-source-notice p {
  margin: 0 0 8px;
  line-height: 1.65;
}

.surfarea-typhoon-source-notice p:last-child {
  margin-bottom: 0;
}

.surfarea-typhoon-source-notice a {
  color: #2563eb;
  text-decoration: underline;
}

.surfarea-typhoon-svg {
  width: 100%;
  height: auto;
  border: 1px solid #d9e5df;
  border-radius: 12px;
  background: #f8fbff;
}

.surfarea-typhoon-legend {
  margin-top: 10px;
  font-size: 13px;
  color: #42524d;
  line-height: 1.6;
}

.surfarea-typhoon-map-meta {
  margin: 6px 0 10px;
  padding: 12px;
  border: 1px solid #d8e2ea;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6fb 100%);
  color: #334155;
  font-size: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.surfarea-typhoon-map-meta__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid #d6e2ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  min-width: 0;
}

.surfarea-typhoon-map-meta__item strong {
  color: #1e3a48;
  font-size: 11px;
}

.surfarea-typhoon-map-meta__cursor {
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  border: 1px dashed #c7d2de;
  border-radius: 8px;
  color: #5b6b7a;
}

.surfarea-typhoon-map-cursor {
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px dashed #c7d2de;
  border-radius: 8px;
  color: #5b6b7a;
  font-size: 12px;
  background: #f8fafc;
}

.surfarea-typhoon-map-note {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
}

.surfarea-typhoon-admin-note {
  margin-top: 10px;
  padding: 10px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  border-radius: 8px;
  font-size: 12px;
}

.surfarea-typhoon-maplibre-map {
  width: 100%;
  height: 500px;
  border: 1px solid #d9e5df;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.surfarea-typhoon-layer-panel {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d9e5df;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 12px;
  color: #3e5567;
}

.surfarea-typhoon-layer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.surfarea-typhoon-layer-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/*
 * チェックボックスが不可視のため、キーボード操作時にフォーカス位置が視認できない。
 * :focus-within で親要素にフォーカスリングを表示し、キーボードユーザーが現在位置を把握できるようにする。
 * :focus-visible ではなく :focus-within を使うことで、子inputのフォーカス状態を親に委譲する。
 */
.surfarea-typhoon-layer-chip:focus-within {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.surfarea-typhoon-layer-chip__label {
  font-weight: 600;
  color: #475569;
}

.surfarea-typhoon-layer-chip__dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  flex: 0 0 11px;
}

.surfarea-typhoon-layer-chip__dot--track,
.surfarea-typhoon-layer-chip__dot--past {
  background: #2563eb;
}

.surfarea-typhoon-layer-chip__dot--latest {
  background: #ef4444;
}

.surfarea-typhoon-layer-chip__dot--gale {
  background: rgba(245, 158, 11, 0.28);
  border-color: #f97316;
}

.surfarea-typhoon-layer-chip__dot--storm {
  background: rgba(124, 58, 237, 0.2);
  border-color: #7c3aed;
}

.surfarea-typhoon-layer-chip__dot--forecast {
  background: #fff;
  border-color: #6d28d9;
  border-style: dashed;
}

.surfarea-typhoon-layer-chip__dot--grid {
  background: #fff;
  border-color: #5f7388;
  border-style: dashed;
}

.surfarea-typhoon-layer-chip:has(input:checked) {
  background: #ecfdf3;
  border-color: #34d399;
}

.surfarea-typhoon-layer-chip:has(input:checked) .surfarea-typhoon-layer-chip__label {
  color: #166534;
}

.surfarea-typhoon-layer-chip:has(input:disabled) {
  background: #f1f5f9;
  border-color: #d1d5db;
  cursor: not-allowed;
}

.surfarea-typhoon-layer-chip:has(input:disabled) .surfarea-typhoon-layer-chip__label {
  color: #9ca3af;
}

.surfarea-typhoon-map-card .maplibregl-ctrl-top-right {
  top: 10px;
  right: 10px;
  z-index: 3;
}

.surfarea-typhoon-map-card .maplibregl-ctrl-group {
  background: #fff !important;
  border-radius: 6px !important;
  border: 1px solid #d7e2ea !important;
  box-shadow: 0 1px 6px rgba(24, 39, 75, 0.14) !important;
  overflow: hidden;
}

.surfarea-typhoon-map-card .maplibregl-ctrl-group button {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #2f3d48 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.surfarea-typhoon-map-card .maplibregl-ctrl-group button:hover {
  background: #f1f5f9 !important;
}

@media (max-width: 767px) {
  .surfarea-typhoon-page {
    padding: 14px;
  }

  .surfarea-typhoon-maplibre-map {
    height: 340px;
  }

  .surfarea-typhoon-map-meta__item {
    min-width: 140px;
    grid-column: 1 / -1;
  }

  .surfarea-typhoon-map-meta__cursor {
    width: 100%;
  }

  .surfarea-typhoon-map-card .maplibregl-ctrl-group button {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }
}
