/* #region zone:disaster.style.card — การ์ดพยากรณ์ที่ปักหมุดใกล้จุดที่แตะ */
@media (prefers-reduced-motion: reduce) {
  .tube-fill {
    transition: none;
  }
  .hour-tip {
    transition: none;
  }
  .hour-col.hovered {
    transform: none;
  }
}

.forecast-daily {
  display: flex;
  flex-direction: column;
  margin-top: var(--u-space-1);
}
.day-item {
  border-top: 1px solid var(--card-line);
}
.day-item:first-child {
  border-top: 0;
}
.day-item .day-row {
  width: 100%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  min-height: 44px;
  border: 0;
}
.day-row[aria-expanded='true'] {
  background: var(--track);
}
.day-row:focus-visible {
  outline: 2px solid var(--hz-flood-ink);
  outline-offset: 2px;
}
.day-detail {
  padding: var(--u-space-3) 2px var(--u-space-4);
  font-size: var(--fs-xs);
  line-height: 1.7;
}
.day-detail[hidden] {
  display: none;
}
.day-detail h4 {
  font-size: var(--fs-sm);
  margin: 0 0 var(--u-space-2);
}
.day-detail p {
  margin: var(--u-space-2) 0;
  color: var(--muted);
}
.day-detail-table {
  overflow-x: auto;
  border: 1px solid var(--card-line);
  border-radius: 10px;
}
.day-detail table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.day-detail th,
.day-detail td {
  padding: var(--u-space-2) 6px;
  text-align: right;
  border-bottom: 1px solid var(--card-line);
}
.day-detail th:first-child,
.day-detail td:first-child {
  text-align: left;
}
.day-detail th {
  font-weight: 600;
  background: var(--track);
}
.day-row {
  display: grid;
  grid-template-columns: 44px 22px 32px 1fr 32px 52px;
  align-items: center;
  gap: var(--u-space-2);
  padding: 6px 0;
  font-size: var(--fs-sm);
  border-top: 1px solid var(--card-line);
  font-variant-numeric: tabular-nums;
}
.day-row:first-child {
  border-top: 0;
}
.day-name {
  color: var(--text);
}
.day-icon {
  display: flex;
  color: var(--muted);
}
.day-lo {
  color: var(--faint);
  text-align: right;
}
.day-range {
  position: relative;
  height: 5px;
  border-radius: 3px;
  background: var(--track);
}
.day-range i {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #53b7d3, #f4d46b, #e9824b);
}
.day-rain {
  font-size: var(--fs-xs);
  color: var(--hz-flood-ink);
  font-weight: 650;
  text-align: right;
}
.forecast-source {
  margin: 0;
  padding: 0 2px;
  font-size: var(--u-text-note);
  color: var(--faint);
}
.forecast-source[data-stale] {
  color: var(--hz-warn-ink);
}
/* #endregion */

/* #region zone:disaster.style.state — โหลด/ว่าง/ผิดพลาด และประตูเข้าสู่ระบบ */

.gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--u-space-5);
}
.gate[hidden] {
  display: none;
}
.gate-card {
  width: 100%;
  max-width: 340px;
  padding: var(--u-space-6) 28px;
  border-radius: var(--r-panel);
  text-align: center;
}

.gate-card h1 {
  font-size: var(--fs-xl);
  margin: 0 0 var(--u-space-2);
}
.gate-card p {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.5;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--u-space-2);
  width: 100%;
  border-radius: var(--r-control);
  border: 0;
  padding: 13px 18px;
  font-size: var(--fs-sm);
  font-weight: 700;
  transition:
    transform var(--t-fast) var(--ease-out),
    background var(--t-fast) var(--ease-out);
}
.button.primary {
  background: var(--accent);
  color: var(--on-accent);
}
.button.primary:hover {
  background: var(--accent-strong);
}
.button.primary:active {
  transform: scale(0.98);
}
/* The rain-card source line keeps 12px+ above the reload button (the sheet grid gap alone is 8px). */
#app .sheet-source + .sheet-action {
  margin-top: var(--sheet-space);
}
/* #endregion */
