:root {
  color-scheme: dark;
  --bg: #05060a;
  --bg-elevated: #0a1020;
  --card: rgba(8, 14, 28, 0.82);
  --card-solid: #0b1224;
  --text: #e8f7ff;
  --muted: #8fb3c9;
  --primary: #00f5ff;
  --primary-soft: rgba(0, 245, 255, 0.12);
  --accent: #ff2d95;
  --accent-2: #b8ff3c;
  --warn: #ff6b35;
  --ok: #39ff14;
  --border: rgba(0, 245, 255, 0.28);
  --border-strong: rgba(255, 45, 149, 0.45);
  --glow-cyan: 0 0 18px rgba(0, 245, 255, 0.45);
  --glow-magenta: 0 0 18px rgba(255, 45, 149, 0.4);
  --input-accent: #ffc400;
  --input-accent-strong: #ff9f1c;
  --input-accent-glow: rgba(255, 196, 0, 0.28);
  --msn-sky-top: #06101f;
  --msn-sky-mid: #0a1a33;
  --msn-sky-bottom: #03060d;
  --msn-glass: rgba(6, 16, 36, 0.72);
  --msn-glass-border: rgba(0, 245, 255, 0.35);
  --msn-text: #e8f7ff;
  --msn-muted: rgba(143, 179, 201, 0.9);
  --freeway-link: #39ff14;
  --font-display: "Orbitron", "Rajdhani", "Noto Sans TC", sans-serif;
  --font-ui: "Rajdhani", "Noto Sans TC", sans-serif;
  --font-mono: "Share Tech Mono", "Noto Sans TC", monospace;
  --font-body: "Noto Sans TC", "Rajdhani", sans-serif;
  --fluid-base: clamp(14px, 0.42vw + 12px, 17px);
  --fluid-small: clamp(11px, 0.28vw + 10px, 13px);
  --fluid-h1: clamp(1.55rem, 4.8vw + 0.85rem, 2.75rem);
  --fluid-h2: clamp(0.98rem, 1.8vw + 0.65rem, 1.45rem);
  --fluid-caption: clamp(1.05rem, 2.2vw + 0.55rem, 1.75rem);
  --fluid-map-height: min(78vh, 860px);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
iframe:not(.windy-embed),
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.is-overlay-locked,
html.is-overlay-locked body {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

html.is-overlay-locked body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

html.is-overlay-locked .in-page-alert,
html.is-overlay-locked .in-page-alert-close,
html.is-overlay-locked .eq-detail-sheet,
html.is-overlay-locked .eq-detail-sheet-panel,
html.is-overlay-locked .eq-detail-sheet-toolbar,
html.is-overlay-locked .cctv-monitor-lightbox,
html.is-overlay-locked .cctv-monitor-lightbox-panel,
html.is-overlay-locked .cctv-monitor-lightbox-close {
  touch-action: manipulation;
}

html.is-overlay-locked .in-page-alert-body,
html.is-overlay-locked .eq-detail-sheet-body,
html.is-overlay-locked .cctv-monitor-lightbox-media {
  touch-action: pan-y;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 90% 55% at 80% -10%, rgba(255, 45, 149, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 10% 20%, rgba(0, 245, 255, 0.14), transparent 50%),
    linear-gradient(180deg, #070b14 0%, var(--bg) 40%, #03040a 100%);
  color: var(--text);
  max-width: 100%;
  width: 100%;
  position: relative;
  overflow-x: hidden;
  font-size: var(--fluid-base);
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cyber-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 245, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 85%);
  animation: cyberGridDrift 28s linear infinite;
}

.cyber-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 4px
  );
  opacity: 0.35;
}

.cyber-horizon {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 8%;
  height: 42%;
  background:
    linear-gradient(180deg, transparent, rgba(0, 245, 255, 0.05) 40%, rgba(255, 45, 149, 0.08)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 38px,
      rgba(0, 245, 255, 0.12) 38px,
      rgba(0, 245, 255, 0.12) 39px
    );
  transform: perspective(420px) rotateX(58deg);
  transform-origin: center bottom;
  opacity: 0.55;
  animation: cyberHorizonPulse 6s ease-in-out infinite alternate;
}

.ambient-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(56px);
  opacity: 0.42;
  animation: ambientFloat 16s ease-in-out infinite alternate;
}

.ambient-orb-a {
  width: 300px;
  height: 300px;
  top: -80px;
  right: -50px;
  background: #00f5ff;
}

.ambient-orb-b {
  width: 240px;
  height: 240px;
  bottom: 10%;
  left: -60px;
  background: #ff2d95;
  animation-delay: -6s;
}

.ambient-orb-c {
  width: 200px;
  height: 200px;
  top: 40%;
  right: 12%;
  background: #b8ff3c;
  opacity: 0.22;
  animation-delay: -10s;
}

@keyframes cyberGridDrift {
  from { background-position: 0 0; }
  to { background-position: 48px 48px; }
}

@keyframes cyberHorizonPulse {
  from { opacity: 0.4; }
  to { opacity: 0.7; }
}

@keyframes ambientFloat {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(0, -18px, 0) scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-flow-layer,
  .hero-flow-ribbon,
  .hero::after,
  .ambient-orb,
  .cyber-grid,
  .cyber-horizon,
  .locate-btn-pulse,
  .locate-btn.locate-btn-pulse {
    animation: none !important;
  }

  .locate-btn-pulse::before,
  .locate-btn-pulse::after,
  .locate-btn.locate-btn-pulse::before,
  .locate-btn.locate-btn-pulse::after {
    display: none;
  }

  .refresh-progress {
    animation: none;
  }
}

.app {
  --field-col-width: min(86%, 32rem);
  width: 100%;
  max-width: min(1240px, 100%);
  margin: 24px auto 48px;
  padding-left: 12px;
  padding-right: 12px;
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
  min-width: 0;
}

.app > * {
  min-width: 0;
  max-width: 100%;
}

.app .control-grid,
.app .auto-refresh-row,
.app .subscription-form,
.app .metrics,
.app .rain-forecast-inline,
.app .air-details,
.app .closure-list,
.app .earthquake-list,
.app .earthquake-list-details,
.app .earthquake-head,
.app .earthquake-summary,
.app .earthquake-meta,
.app .analysis-list,
.app .notice-details,
.app .map-category-filters,
.app .camera-card > .timestamp,
.app .freeway-details > .timestamp {
  width: var(--field-col-width);
  max-width: 32rem;
  margin-inline: auto;
  justify-self: center;
  box-sizing: border-box;
}

.app .weekly-forecast-details,
.app .weekly-forecast-details .weekly-forecast-list,
.app .air-details .metrics,
.app .rain-forecast-inline .rain-timeline,
.app .camera-controls {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.app .closure-list.is-empty,
.app .closure-list.is-empty .closure-empty-msg {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  justify-self: center;
}

.app .control-grid > div,
.app .camera-controls-grid > div,
.app .auto-refresh-controls {
  text-align: center;
}

.app .control-grid label,
.app .camera-controls label,
.app .camera-controls .camera-field-label,
.app .subscription-form > label[for] {
  display: block;
  width: 100%;
  text-align: center;
}

.app .metrics,
.app .metrics dt,
.app .metrics dd,
.app .closure-meta,
.app .earthquake-head,
.app .earthquake-summary,
.app .earthquake-meta,
.app .camera-card > .timestamp,
.app .freeway-details > .timestamp,
.app .rain-forecast-inline .weather-subheading,
.app .rain-forecast-inline .timestamp,
.app .air-inline-summary,
.app .air-details > summary,
.app #regionMemoryMeta,
.app #lastUpdated {
  text-align: center;
}

.app .map-category-filters {
  justify-content: center;
}

.app .map-legend,
.app .map-legend-below,
.app .map-legend-below .legend-list {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  justify-self: stretch;
  justify-content: flex-start;
  justify-items: stretch;
  text-align: left;
}

.app .control-grid select,
.app .camera-controls select,
.app .camera-controls input,
.app .auto-refresh-controls select,
.app .subscription-form input[type="email"] {
  text-align: left;
}

#citySelect,
#townshipSelect {
  text-align: center;
  text-align-last: center;
}

#citySelect option,
#townshipSelect option {
  text-align: center;
}

.visual-break {
  position: relative;
  min-height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #040814;
  background-image: var(--visual-image);
  background-size: cover;
  background-position: center;
  box-shadow: var(--glow-cyan);
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.visual-break.section-title-bar {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  min-height: 52px;
  border: 1px solid var(--border);
  background-color: #040814;
  background-image: var(--visual-image);
  background-size: cover;
  background-position: center;
  animation: visualKenBurns 22s ease-in-out infinite alternate;
}

.visual-break-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(0, 20, 40, 0.88), rgba(80, 0, 50, 0.55) 55%, rgba(0, 40, 50, 0.75)),
    linear-gradient(180deg, rgba(0, 245, 255, 0.08), rgba(5, 6, 10, 0.55));
  pointer-events: none;
}

.visual-break-caption {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em 0.55em;
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: #e8f7ff;
  font-family: var(--font-display);
  font-size: var(--fluid-caption);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-shadow: 0 0 12px rgba(0, 245, 255, 0.55), 0 2px 10px rgba(0, 0, 0, 0.55);
  overflow-wrap: anywhere;
}

.visual-break-caption a {
  color: #e8f0ff;
  font-size: 0.32em;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.visual-break-caption a:hover {
  text-decoration: underline;
}

@keyframes visualKenBurns {
  from {
    background-size: 100% auto;
    transform: scale(1);
  }
  to {
    background-size: 112% auto;
    transform: scale(1.03);
  }
}

.pwa-install-banner {
  position: relative;
  z-index: 50;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 227, 138, 0.4);
  border-radius: 0;
  background: rgba(12, 22, 36, 0.96);
  color: #f4efe6;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.pwa-install-inner {
  width: 100%;
  max-width: min(1240px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 10px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
}

.pwa-install-banner[hidden] {
  display: none;
}

.torch-video {
  position: fixed;
  left: -9999px;
  width: 2px;
  height: 2px;
  opacity: 0;
  pointer-events: none;
}

.android-shade-prompt {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 10, 18, 0.72);
}

.android-shade-prompt[hidden] {
  display: none !important;
}

.android-shade-prompt-card {
  width: min(420px, 100%);
  padding: 18px 16px 14px;
  border: 1px solid rgba(255, 227, 138, 0.35);
  border-radius: 16px;
  background: #121a28;
  color: #f4efe6;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.android-shade-prompt-card strong {
  display: block;
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.android-shade-prompt-card p {
  margin: 0 0 14px;
  color: #d8cfc0;
  line-height: 1.5;
}

.android-shade-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pwa-install-copy {
  flex: 1 1 220px;
}

.pwa-install-copy strong,
.pwa-panel-title {
  display: block;
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.pwa-install-copy p {
  margin: 0;
  color: #d8cfc0;
  line-height: 1.45;
}

.pwa-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pwa-history-block,
.pwa-test-details {
  margin-top: 12px;
}

.pwa-history-details > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pwa-history-details > summary::-webkit-details-marker {
  display: none;
}

.pwa-history-details > summary::marker {
  content: "";
}

.pwa-history-details > summary .pwa-panel-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0;
  padding: 4px 16px;
  border-radius: 999px;
  background: var(--btn-bg, #c2a36b);
  color: var(--btn-text, #161d27);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pwa-history-details > summary::after {
  content: "▾";
  font-size: 0.85em;
  font-weight: 800;
  line-height: 1;
  color: inherit;
}

.pwa-history-details[open] > summary::after {
  content: "▴";
}

.pwa-history-list,
.pwa-test-list {
  margin: 6px 0 0;
  padding-left: 1.2em;
  display: grid;
  gap: 6px;
  color: inherit;
}

.pwa-history-list {
  font-size: 12px;
  padding: 14px 22px;
  list-style: none;
  background: #e8eaed;
  border-radius: 999px;
}

.pwa-history-list li,
.pwa-test-list li {
  line-height: 1.35;
}

.pwa-history-list li {
  padding: 6px 8px;
  border-radius: 999px;
  background: transparent;
  color: #2b2924;
}

.pwa-test-list li.is-ok::marker {
  color: #39ff14;
}

.pwa-test-list li.is-warn::marker {
  color: #ffba08;
}

.pwa-test-list li.is-off::marker {
  color: #e57373;
}

@media (max-width: 860px) {
  .pwa-install-inner,
  .pwa-install-banner,
  .subscription-actions {
    width: 100%;
  }

  .pwa-install-actions,
  .subscription-actions {
    width: 100%;
  }

  .pwa-install-actions .refresh-btn,
  .pwa-install-actions .ghost-btn,
  .subscription-actions .refresh-btn,
  .subscription-actions .ghost-btn {
    flex: 1 1 auto;
  }
}

.hero {
  --hero-title-size: clamp(2.1rem, 7.6vw, 3.5rem);
  background:
    linear-gradient(135deg, rgba(0, 245, 255, 0.16), transparent 42%),
    linear-gradient(225deg, rgba(255, 45, 149, 0.22), transparent 48%),
    linear-gradient(180deg, #071426 0%, #050914 100%);
  color: #e8f7ff;
  border-radius: var(--radius-lg);
  padding: 18px 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  box-shadow: var(--glow-cyan), inset 0 0 40px rgba(0, 245, 255, 0.06);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.hero-flow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-flow-layer {
  position: absolute;
  inset: -40% -60%;
  opacity: 0.7;
  mix-blend-mode: screen;
  animation: heroFlowDrift 18s linear infinite;
}

.hero-flow-ribbon {
  inset: -10% -80%;
  opacity: 0.85;
  mix-blend-mode: normal;
  background: linear-gradient(
    105deg,
    #0e1622 0%,
    #1c314c 12%,
    #c2a36b 26%,
    #1a5368 40%,
    #2ec8d4 54%,
    #24364e 68%,
    #d4ba86 82%,
    #0e1622 100%
  );
  background-size: 220% 100%;
  animation: heroFlowRibbon 14s linear infinite;
  filter: none;
}

.hero-flow-a {
  background:
    radial-gradient(ellipse 50% 40% at 18% 40%, rgba(194, 163, 107, 0.42), transparent 58%),
    radial-gradient(ellipse 40% 34% at 78% 62%, rgba(0, 245, 255, 0.36), transparent 62%),
    linear-gradient(115deg, rgba(194, 163, 107, 0.2), transparent 42%, rgba(0, 245, 255, 0.28) 68%, transparent 88%);
  background-size: 220% 220%;
  animation-duration: 16s;
}

.hero-flow-b {
  background:
    radial-gradient(ellipse 46% 36% at 82% 30%, rgba(46, 200, 212, 0.4), transparent 60%),
    linear-gradient(250deg, transparent 20%, rgba(194, 163, 107, 0.3) 48%, rgba(122, 240, 248, 0.2) 72%, transparent 88%);
  background-size: 240% 240%;
  animation-duration: 22s;
  animation-direction: reverse;
  opacity: 0.48;
}

.hero-flow-c {
  background:
    radial-gradient(ellipse 42% 30% at 50% 85%, rgba(194, 163, 107, 0.22), transparent 62%),
    repeating-linear-gradient(
      105deg,
      transparent 0 46px,
      rgba(46, 200, 212, 0.1) 46px 48px,
      transparent 48px 94px,
      rgba(255, 255, 255, 0.06) 94px 96px
    );
  animation-duration: 28s;
  opacity: 0.35;
}

@keyframes heroFlowDrift {
  0% {
    transform: translate3d(-10%, 4%, 0) rotate(0deg);
    background-position: 0% 40%;
  }
  50% {
    transform: translate3d(12%, -6%, 0) rotate(6deg);
    background-position: 100% 60%;
  }
  100% {
    transform: translate3d(-10%, 4%, 0) rotate(0deg);
    background-position: 0% 40%;
  }
}

@keyframes heroFlowRibbon {
  0% {
    transform: translate3d(0, 0, 0);
    background-position: 0% 50%;
  }
  100% {
    transform: translate3d(-12%, 0, 0);
    background-position: 100% 50%;
  }
}

.hero::before {
  content: "ALERT";
  position: absolute;
  top: 10px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-shadow: var(--glow-magenta);
  opacity: 0.9;
  z-index: 2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(0, 245, 255, 0.18) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: heroShine 9s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroShine {
  0%,
  100% {
    transform: translateX(-120%);
  }
  50% {
    transform: translateX(120%);
  }
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.08em;
  font-size: 12px;
  opacity: 0.85;
}

.hero-centered {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.hero-content {
  width: 90%;
  max-width: 90%;
  min-width: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin-inline: auto;
  text-align: center;
}

.hero .eyebrow {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 0 8px;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
  font-size: var(--hero-heading-size, clamp(1.5rem, 5.4vw, 2.5rem));
  line-height: 1.25;
  opacity: 0.95;
  white-space: nowrap;
  overflow: visible;
  color: var(--primary);
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.55);
}

.hero-tagline {
  margin: 8px 0 0;
  font-family: var(--font-ui);
  font-size: clamp(12px, 2.2vw, 16px);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  text-shadow: 0 0 8px rgba(184, 255, 60, 0.35);
}

.hero h1,
.hero .subtitle {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  line-height: 1.12;
  min-width: 0;
}

.hero h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: var(--hero-title-size, clamp(2.1rem, 7.6vw, 3.5rem));
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 0 16px rgba(0, 245, 255, 0.35);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.18;
  width: 100%;
  max-width: 100%;
  text-align: center;
}

.hero-title-lead,
.hero-title-tail {
  display: block;
  width: 100%;
  white-space: nowrap;
  text-align: center;
}

.hero .subtitle {
  font-size: clamp(10px, 2.4vw, 16px);
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.hero .locate-wrap {
  width: 100%;
  position: relative;
  z-index: 1;
  padding: 8px 8px 12px;
}

.controls > .refresh-btn {
  width: 50%;
  max-width: 50%;
  justify-self: center;
  align-self: center;
  box-sizing: border-box;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 800;
  padding: 12px 16px;
  line-height: 1.25;
  position: relative;
  z-index: 1;
}

h2 {
  margin: 0 0 10px;
  font-size: var(--fluid-h2);
}

.section-head h2 {
  margin: 0;
}

.subtitle {
  margin: 0;
  line-height: 1.6;
}

.refresh-btn {
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(255, 45, 149, 0.18));
  color: var(--primary);
  padding: 10px 14px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: var(--glow-cyan);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.refresh-btn:hover {
  filter: brightness(1.15);
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 245, 255, 0.35), rgba(255, 45, 149, 0.3));
}

.refresh-progress-host {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  background: rgba(10, 14, 20, 0.38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  pointer-events: none;
}

.refresh-progress-host[hidden] {
  display: none !important;
}

.refresh-progress {
  --refresh-pie-fill: var(--primary, #c2a36b);
  --refresh-pie-track: rgba(255, 255, 255, 0.14);
  --refresh-pie-hole: #1f2834;
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: refresh-progress-pop 220ms ease-out;
}

.refresh-progress-pie {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--refresh-pie-fill) calc(var(--pct, 0) * 1%),
    var(--refresh-pie-track) 0
  );
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--refresh-pie-fill) 35%, transparent),
    0 10px 28px rgba(0, 0, 0, 0.28);
}

.refresh-progress-pie::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: var(--refresh-pie-hole);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.refresh-progress-pct {
  position: relative;
  z-index: 1;
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f4efe6;
  line-height: 1;
}

@keyframes refresh-progress-pop {
  from {
    transform: scale(0.86);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.card {
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 0 0 1px rgba(0, 245, 255, 0.05), 0 12px 32px rgba(0, 0, 0, 0.45);
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.7;
  pointer-events: none;
}

.controls {
  display: grid;
  gap: 6px;
}

.controls.card {
  overflow: visible;
}

.theme-elegant .controls.card {
  overflow: visible !important;
}

.controls #regionMemoryMeta,
.controls #lastUpdated {
  width: 100%;
  text-align: center;
}

label {
  font-size: 14px;
  color: var(--muted);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.region-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.region-grid .locate-wrap {
  grid-column: 1 / -1;
}

.locate-wrap {
  display: grid;
  gap: 6px;
  justify-items: center;
  overflow: visible;
  padding: 16px 8px;
}

.locate-label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ok);
}

.locate-icon {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 1;
}

.locate-btn .locate-icon svg,
.locate-icon svg {
  width: 20px;
  height: 20px;
  fill: #ff2d95;
  filter: drop-shadow(0 0 6px rgba(255, 45, 149, 0.65));
}

.locate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 52%;
  max-width: 52%;
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  border: 2px solid #0b7a45;
  border-radius: 8px;
  background: #0f9d58;
  color: #fff;
  font-size: clamp(16px, 4vw, 19px);
  font-weight: 800;
  cursor: pointer;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  flex-wrap: nowrap;
  padding: 0 12px;
  line-height: 1.05;
}

.locate-btn-label {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  font-size: clamp(16px, 4vw, 19px);
  font-weight: 800;
  letter-spacing: 0;
}

.locate-btn-pulse,
.locate-btn.locate-btn-pulse {
  overflow: visible;
  isolation: isolate;
  animation: locate-glow 2.4s ease-in-out infinite;
  box-shadow:
    0 0 0 0 rgba(46, 204, 113, 0.32),
    0 0 10px 1px rgba(15, 157, 88, 0.4);
}

.locate-btn-pulse::before,
.locate-btn.locate-btn-pulse::before,
.locate-btn-pulse::after,
.locate-btn.locate-btn-pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 1.5px solid rgba(88, 255, 170, 0.42);
  box-shadow: 0 0 12px 2px rgba(15, 157, 88, 0.22);
  background: transparent;
  animation: locate-ripple 2.8s ease-out infinite;
  pointer-events: none;
  z-index: 0;
  transform-origin: center;
}

.locate-btn-pulse::after,
.locate-btn.locate-btn-pulse::after {
  animation-delay: 1.4s;
}

.locate-btn-pulse > *,
.locate-btn.locate-btn-pulse > * {
  position: relative;
  z-index: 1;
}

.locate-btn-pulse:hover,
.locate-btn.locate-btn-pulse:hover {
  filter: brightness(1.06);
  box-shadow:
    0 0 0 2px rgba(46, 204, 113, 0.35),
    0 0 18px 4px rgba(15, 157, 88, 0.7),
    0 0 34px 8px rgba(88, 255, 170, 0.45);
}

.locate-status {
  margin: 0;
  min-height: 1.35em;
  color: #1f5ae1;
  font-weight: 700;
  font-size: clamp(18px, 4.8vw, 24px);
  line-height: 1.45;
}

.locate-status:empty {
  display: none;
  min-height: 0;
}

.locate-status-error {
  color: var(--warn);
}

.theme-elegant #regionMemoryMeta.locate-status-error {
  color: var(--warn) !important;
}

.locate-btn:disabled,
.locate-btn-pulse:disabled {
  animation: none;
  opacity: 0.72;
  cursor: wait;
  box-shadow: none;
  filter: none;
}

.locate-btn:disabled::before,
.locate-btn:disabled::after,
.locate-btn-pulse:disabled::before,
.locate-btn-pulse:disabled::after {
  display: none;
}

@keyframes locate-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(46, 204, 113, 0.28),
      0 0 10px 1px rgba(15, 157, 88, 0.38);
  }
  50% {
    box-shadow:
      0 0 0 7px rgba(46, 204, 113, 0),
      0 0 16px 5px rgba(15, 157, 88, 0.42);
  }
}

@keyframes locate-ripple {
  0% {
    transform: scale(1);
    opacity: 0.48;
  }
  100% {
    transform: scale(1.28);
    opacity: 0;
  }
}

@keyframes locate-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(15, 157, 88, 0.55);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(15, 157, 88, 0);
  }
}

.weather-metrics,
.air-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.weather-air-grid {
  align-items: stretch;
}

.weather-air-card,
.forecast-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
}

.forecast-card .rain-timeline {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
}

.forecast-card #rainProjection {
  margin-top: auto;
}

.air-inline {
  margin-top: 14px;
  padding: 12px;
  border-top: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  gap: 10px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.rain-forecast-inline {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.weather-subheading {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  font-weight: 800;
  color: #1f5ae1;
  line-height: 1.3;
}

.air-metrics div {
  background: #eef2f8;
  border: 1px solid #d5deec;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.air-metrics dt,
.weather-block .air-metrics dt,
.msn-weather-card .air-metrics dt,
#aqiMetric dt,
#pm25Metric dt,
#pm10Metric dt,
#ozoneMetric dt {
  color: #ffe38a !important;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255, 214, 80, 0.45);
}

.air-level-good {
  background: #b7e4c7 !important;
  border-color: #52b788 !important;
  color: #1b4332;
}

.air-level-good dd {
  color: #1b4332;
}

.air-level-moderate {
  background: #fde68a !important;
  border-color: #f59e0b !important;
  color: #78350f;
}

.air-level-moderate dd {
  color: #78350f;
}

.air-level-sensitive {
  background: #fdba74 !important;
  border-color: #ea580c !important;
  color: #7c2d12;
}

.air-level-sensitive dd {
  color: #7c2d12;
}

.air-level-unhealthy {
  background: #fca5a5 !important;
  border-color: #dc2626 !important;
  color: #7f1d1d;
}

.air-level-unhealthy dd {
  color: #7f1d1d;
}

.air-level-very-unhealthy {
  background: #d8b4fe !important;
  border-color: #9333ea !important;
  color: #581c87;
}

.air-level-very-unhealthy dd {
  color: #581c87;
}

.air-level-hazardous {
  background: #c4b5fd !important;
  border-color: #6b21a8 !important;
  color: #3b0764;
}

.air-level-hazardous dd {
  color: #3b0764;
}

.air-level-unknown {
  background: #eef2f8 !important;
  border-color: #d5deec !important;
}

.typhoon-wide {
  width: 100%;
}

.typhoon-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 2fr);
  gap: 12px;
  align-items: start;
}

.typhoon-panel {
  display: grid;
  gap: 8px;
}

.typhoon-wide h2,
.analysis-list {
  font-size: 13px;
}

.windy-wrap-large {
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f1622;
  position: relative;
  width: min(100%, 560px);
  max-width: 560px;
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 0;
  max-height: none;
  flex: 0 0 auto;
  flex-shrink: 0;
  align-self: start;
  margin-inline: auto;
}

html.is-map-day .windy-wrap-large,
.windy-wrap.is-map-day {
  background: #dce6ef;
}

html.is-map-evening .windy-wrap-large,
.windy-wrap.is-map-evening {
  background: #0f1622;
}

.windy-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: #0f1622;
  display: block;
  pointer-events: auto;
}

html.is-map-day .windy-embed,
.windy-wrap.is-map-day .windy-embed {
  background: #dce6ef;
  filter: none;
}

html.is-map-evening .windy-embed,
.windy-wrap.is-map-evening .windy-embed {
  background: #0f1622;
  filter: brightness(0.78) saturate(0.92);
}

.windy-locate-btn {
  position: absolute;
  /* Sit on Windy embed wordmark (top-left); sized to cover, not dominate. */
  top: 4px;
  left: 4px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid #b71c1c;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.windy-locate-btn .locate-icon svg {
  width: 12px;
  height: 12px;
  fill: #fff;
  filter: none;
}

.windy-locate-btn:hover,
.windy-locate-btn:focus-visible {
  background: #e53935;
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 1px;
}

.windy-locate-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.map-clock-badge {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 520;
  transform: translateX(-50%);
  pointer-events: none;
  box-sizing: border-box;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(22, 29, 39, 0.18);
  background: rgba(244, 239, 230, 0.92);
  color: #161d27;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 6px rgba(15, 22, 34, 0.18);
}

html.is-map-evening .map-clock-badge,
.map-clock-badge.is-map-evening {
  border-color: rgba(244, 239, 230, 0.22);
  background: rgba(15, 22, 34, 0.82);
  color: #f4efe6;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.map-clock-badge-windy,
.windy-wrap .map-clock-badge {
  top: 6px;
  right: 8px;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: 7;
}

.typhoon-wind-map {
  width: 100%;
  min-height: 580px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0f1622;
  overflow: hidden;
}

.typhoon-wind-map.leaflet-container {
  background: #0f1622;
}

.typhoon-wind-meta {
  margin: 0;
  text-align: center;
}

.notice-card ul {
  margin: 8px 0 0 18px;
  padding: 0;
  line-height: 1.45;
  font-size: 11px;
  color: #f4efe6;
}

.notice-details {
  margin: 0;
}

.notice-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.notice-details summary::-webkit-details-marker {
  display: none;
}

.notice-details summary::marker {
  content: "";
}

.section-head-link-only {
  justify-content: flex-end;
  margin-bottom: 8px;
}

.notice-summary-title {
  font-size: clamp(14px, 2vw, 16px);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notice-summary-title::after {
  content: "▾";
  font-size: 0.72em;
  font-weight: 800;
  line-height: 1;
  color: var(--primary, #c2a36b);
}

.notice-details[open] .notice-summary-title::after {
  content: "▴";
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px calc(18px + env(safe-area-inset-bottom));
  text-align: center;
  position: relative;
  z-index: 1;
}

html.has-channel-talk .site-footer {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

#ch-plugin-entry,
#ch-plugin {
  display: none !important;
}

.channel-talk-overlay {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  place-items: end center;
  padding: 0 12px calc(12px + env(safe-area-inset-bottom));
}

.channel-talk-overlay[hidden] {
  display: none !important;
}

.channel-talk-overlay-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(8, 12, 20, 0.58);
  cursor: pointer;
}

.channel-talk-overlay-backdrop::after {
  content: "點空白處回到主畫面";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: #f4f7ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  white-space: nowrap;
}

.channel-talk-overlay-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(440px, calc(100vw - 24px));
  height: min(680px, 78dvh);
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.channel-talk-overlay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  padding: 10px 12px;
  background: #1f5ae1;
  color: #fff;
}

.channel-talk-overlay-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.channel-talk-overlay-close {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.channel-talk-overlay-close:hover,
.channel-talk-overlay-close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.channel-talk-overlay-frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

html.channel-talk-open,
html.channel-talk-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.channel-talk-open .channel-talk-overlay,
html.channel-talk-open .channel-talk-overlay-panel,
html.channel-talk-open .channel-talk-overlay-close {
  touch-action: manipulation;
}

.footer-audience {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.footer-stats {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 6px 10px;
  border: 0.5px solid #b8c4dc;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #35538f;
  font-weight: 600;
}

.visitor-counter-label {
  white-space: nowrap;
}

.visitor-counter-value {
  display: inline-block;
  min-width: 7ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid #e2a3b0;
  border-radius: 8px;
  background: #fff5f7;
  color: #b42318;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
}

.like-btn:hover,
.like-btn:focus-visible {
  background: #ffe8ed;
  outline: none;
}

.like-btn.is-liked {
  background: #e53935;
  border-color: #c62828;
  color: #fff;
}

.like-btn:disabled {
  cursor: default;
  opacity: 0.92;
}

.like-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  line-height: 1;
}

.like-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

.like-btn-label {
  white-space: nowrap;
}

.like-count-value {
  display: inline-block;
  min-width: 7ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.site-credit {
  margin: 4px 0 0;
  font-size: 13px;
  text-align: center;
  width: 100%;
  color: #f4efe6;
  font-weight: 700;
}

.channel-talk-footer {
  width: min(100%, 560px);
  margin: 6px 0 0;
}

.channel-talk-footer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #1f5ae1;
  border-radius: 14px;
  background: linear-gradient(180deg, #2f6ff0 0%, #1f5ae1 100%);
  color: #fff;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 18px rgba(31, 90, 225, 0.28);
}

.channel-talk-footer-btn:hover,
.channel-talk-footer-btn:focus-visible {
  filter: brightness(1.06);
  outline: none;
}

.channel-talk-footer-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.channel-talk-footer-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.channel-talk-footer-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.channel-talk-footer-copy strong {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.channel-talk-footer-copy small {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  opacity: 0.92;
}

.footer-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  width: 100%;
}

.footer-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
}

.footer-share-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.footer-share-facebook {
  background: #1877f2;
}

.footer-share-facebook:hover,
.footer-share-facebook:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.footer-share-line {
  background: #06c755;
}

.footer-share-line:hover,
.footer-share-line:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.notification-hint {
  margin-top: 6px;
  color: #5a6787;
  font-size: 12px;
  line-height: 1.45;
}

.in-page-alert-host {
  position: fixed;
  left: 50%;
  top: 50%;
  bottom: auto;
  right: auto;
  transform: translate(-50%, -50%);
  width: min(92%, 420px);
  max-width: calc(100% - 24px);
  display: grid;
  gap: 8px;
  z-index: 2800;
  pointer-events: none;
}

.in-page-alert {
  pointer-events: auto;
  touch-action: pan-y;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #9eb6e8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(15, 22, 34, 0.18);
  color: #1d4ed8;
  animation: alertSlideUp 0.25s ease-out;
}

.in-page-alert strong,
.in-page-alert-title {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  color: #1d4ed8;
}

.in-page-alert p,
.in-page-alert-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  color: #1d4ed8;
}

.in-page-alert-body {
  display: grid;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.in-page-alert-refresh-done {
  border-color: #7ec8ff;
}

.in-page-alert-refresh-done .in-page-alert-title,
.in-page-alert-refresh-done .in-page-alert-line {
  color: #1d4ed8;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.in-page-alert-refresh-done .in-page-alert-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.in-page-alert-refresh-done .in-page-alert-line {
  font-size: 13px;
  line-height: 1.45;
}

.in-page-alert-host:has(.in-page-alert-refresh-done):not(.is-fullscreen-mode) {
  width: min(94%, 560px);
}

.in-page-alert-host.is-fullscreen-mode:has(.in-page-alert-refresh-done) {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 95vw;
  max-width: 95vw;
  height: 95dvh;
  max-height: 95dvh;
  z-index: 2600;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done {
  overflow: hidden;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done .in-page-alert-title {
  font-size: clamp(18px, 7vw, 64px);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap !important;
  overflow: hidden !important;
  flex: 0 0 auto;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done .in-page-alert-body {
  overflow: hidden !important;
  align-content: start;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done .in-page-alert-line {
  font-size: clamp(11px, 4.2vw, 36px);
  line-height: 1.35;
  font-weight: 700;
  white-space: normal;
  overflow: hidden;
}

.in-page-alert-subscribe-tip .in-page-alert-line {
  font-size: 16px;
  line-height: 1.45;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.in-page-alert-host:has(.in-page-alert-readable-tip) {
  width: min(94%, 560px);
}

.in-page-alert-readable-tip {
  padding: 16px 18px;
}

.in-page-alert-readable-tip .in-page-alert-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
}

.in-page-alert-readable-tip .in-page-alert-line {
  font-size: 18px;
  line-height: 1.5;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.in-page-alert-readable-tip .in-page-alert-close {
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 16px;
}

.in-page-alert-not-open .in-page-alert-title {
  font-size: 22px;
}

.in-page-alert-not-open .in-page-alert-line {
  font-size: 20px;
  line-height: 1.55;
  font-weight: 600;
}

.in-page-alert-close {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  border: 0;
  background: #1f5ae1;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

@keyframes alertSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.text-short {
  display: none;
}

.mobile-only {
  display: none;
}

.camera-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.city-camera-controls,
.freeway-camera-controls {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.city-camera-controls {
  align-items: start;
}

.city-camera-controls > div {
  display: grid;
  grid-template-rows: auto auto;
  grid-template-areas:
    "field"
    "label";
  align-items: stretch;
  gap: 6px;
}

.city-camera-controls > div > label {
  grid-area: label;
  order: 2;
  margin: 0;
  padding-top: 0;
}

.city-camera-controls > div > select,
.city-camera-controls > div > input {
  grid-area: field;
  order: 1;
}

.camera-controls-grid label {
  white-space: normal;
  line-height: 1.25;
}

.camera-controls-grid select,
.camera-controls-grid input {
  width: 100%;
  min-width: 0;
}

.freeway-details {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.freeway-details summary,
.freeway-summary-link {
  cursor: pointer;
  color: #12b76a !important;
  font-weight: 700;
  margin-bottom: 10px;
  list-style: none;
}

.freeway-details summary::-webkit-details-marker {
  display: none;
}

.freeway-details summary::marker {
  content: "";
}

.freeway-details summary::after {
  content: " ▾";
  color: #12b76a;
  font-weight: 700;
}

.freeway-details[open] summary::after {
  content: " ▴";
}

.freeway-details summary:hover,
.freeway-summary-link:hover {
  color: #039855 !important;
}

.freeway-list-wrap {
  position: relative;
  min-height: 220px;
}

.camera-list-wrap {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 220px;
}

.freeway-load-progress-host {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(16, 22, 30, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.camera-load-progress-host {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(16, 22, 30, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.freeway-load-progress-host[hidden],
.camera-load-progress-host[hidden] {
  display: none !important;
}

.freeway-load-progress {
  width: 96px;
  height: 96px;
}

.camera-load-progress {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.camera-load-progress .refresh-progress-pie::after {
  inset: 14px;
}

.camera-load-progress .refresh-progress-pct {
  font-size: 1.05rem;
  color: #fff;
}

.freeway-load-progress-label {
  margin: 0;
  color: #f4efe6;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.camera-load-progress-label {
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.freeway-monitor {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.freeway-monitor-pair {
  display: grid;
  gap: 12px;
}

@media (min-width: 720px) {
  .freeway-monitor-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.freeway-monitor-bezel {
  padding: 10px 10px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #121821;
  box-shadow: inset 0 0 0 1px rgba(194, 163, 107, 0.22);
}

.freeway-monitor-label {
  margin: 0 0 8px;
  color: #c2a36b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.freeway-monitor-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #0b0f14;
}

.freeway-monitor-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 12px;
  text-align: center;
}

.freeway-monitor-feed,
.freeway-monitor-screen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #0b0f14;
}

.freeway-monitor-caption {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.freeway-monitor-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.freeway-channel-btn {
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-solid, var(--card));
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.freeway-channel-btn.is-active,
.freeway-channel-btn:hover,
.freeway-channel-btn:focus-visible {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 18%, var(--card-solid, var(--card)));
  color: var(--heading, var(--text));
  outline: none;
}

.camera-more-details {
  margin-top: 10px;
}

.camera-list > .camera-more-details {
  display: contents;
  margin-top: 0;
}

.camera-list > .camera-more-details[hidden] {
  display: none !important;
}

.camera-list > .camera-more-details > .camera-more-summary {
  align-self: start;
  width: 100%;
  margin: 0;
  justify-content: center;
  box-sizing: border-box;
}

.camera-list > .camera-more-details > .camera-list {
  grid-column: 1 / -1;
  margin-top: 0;
}

.camera-more-details[hidden] {
  display: none !important;
}

.camera-more-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  color: #1f5ae1;
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 1px solid #9fc9ee;
  border-radius: 10px;
  background: #eef6ff;
  user-select: none;
}

.camera-more-summary::-webkit-details-marker {
  display: none;
}

.camera-more-summary::marker {
  content: "";
}

.camera-more-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  font-size: 1.05em;
  line-height: 1;
  transition: transform 0.18s ease;
}

.camera-more-details[open] > .camera-more-summary .camera-more-toggle-icon {
  transform: rotate(90deg);
}

.camera-more-summary::after {
  content: none;
}

.camera-more-details[open] > .camera-more-summary::after {
  content: none;
}

.camera-more-summary:hover {
  background: #e2f0ff;
  text-decoration: none;
}

.camera-card > .camera-more-details-bottom {
  display: block;
  margin-top: 12px;
}

.camera-card > .camera-more-details-bottom[hidden] {
  display: none !important;
}

.camera-card > .camera-more-details-bottom > .camera-more-summary {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

.freeway-camera-card {
  margin-top: 0;
}

.closure-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 0.15em;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  white-space: normal;
  overflow: visible;
  text-align: center;
}

.closure-meta-primary,
.closure-meta-source {
  display: inline;
  font-size: inherit;
  line-height: 1.4;
  white-space: nowrap;
}

.closure-meta-source {
  color: var(--muted);
}

.closure-meta-link {
  color: var(--primary, #c2a36b);
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  white-space: nowrap;
}

.closure-meta-link:hover,
.closure-meta-link:focus-visible {
  color: var(--hero-eyebrow, var(--primary, #c2a36b));
  text-decoration: underline;
}

.closure-list {
  max-height: none;
  overflow: visible;
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding-bottom: 22px;
}

.closure-card {
  padding-bottom: 22px;
}

.closure-list.is-empty {
  width: 100%;
  max-width: 100%;
  min-height: 7rem;
  max-height: none;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  padding-bottom: 0;
}

.closure-list > .status-ok,
.closure-empty-msg {
  margin: 8px auto;
  width: 100%;
  max-width: 100%;
  text-align: center;
  font-size: calc(var(--fluid-caption) * 1.1);
  font-weight: 700;
  line-height: 1.25;
  justify-self: center;
}

.auto-refresh-row {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
  max-width: 100%;
  min-width: 0;
}

.auto-refresh-controls {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.auto-refresh-controls label {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
}

.auto-refresh-controls select,
.auto-refresh-countdown {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  padding: 8px 10px;
  box-sizing: border-box;
  border-width: 2px;
  border-style: solid;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auto-refresh-controls select {
  border-color: #e6b800;
  color: #8a6d00;
  background: #fffdf3;
  appearance: auto;
  font-size: 16px;
  font-weight: 700;
}

.auto-refresh-controls select option {
  font-size: 16px;
  font-weight: 700;
}

.auto-refresh-countdown {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: #0a1628;
  color: #0a1628;
  background: #f4efe6;
  text-align: center;
}

.ghost-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
  color: #35538f;
  cursor: pointer;
}

select {
  border: 2px solid var(--input-accent);
  border-radius: 10px;
  padding: 10px;
  font-size: 16px;
  background: #fffef8;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

select:focus,
input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--input-accent-strong);
  box-shadow: 0 0 0 3px var(--input-accent-glow);
}

input[type="text"],
input[type="email"] {
  border: 2px solid var(--input-accent);
  border-radius: 10px;
  padding: 10px;
  font-size: 16px;
  background: #fffef8;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="checkbox"] {
  accent-color: var(--input-accent-strong);
}

.timestamp {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.triple-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.big-text {
  margin: 8px 0 12px;
  font-size: clamp(22px, 6vw, 40px);
  font-weight: 700;
  color: var(--primary);
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.weather-block .big-text {
  font-size: 20px;
}

.weather-block .air-inline-summary,
.weather-block .air-details > summary {
  font-size: 28px;
}

.weather-block .metrics dt {
  font-size: clamp(17px, 4.4vw, 21px);
  font-weight: 800;
}

.weather-block .metrics dd {
  font-size: clamp(24px, 6vw, 32px);
}

.weather-block .weather-metrics dt,
.msn-weather-card .weather-metrics dt {
  font-size: clamp(18px, 4.6vw, 22px);
  color: #ffe38a;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255, 214, 80, 0.45);
}

.weather-block .weather-metrics dd,
.msn-weather-card .weather-metrics dd {
  font-size: clamp(20px, 5.1vw, 26px);
}

.weather-block #rainProjection,
.weather-block .timestamp {
  font-size: 12px;
}

.msn-weather-card {
  background: linear-gradient(165deg, #cfe8ff 0%, #e3f2ff 48%, #f2f8ff 100%);
  border: 1px solid #7eb6e8;
  color: #0b2f55;
  box-shadow: 0 10px 24px rgba(31, 90, 225, 0.12);
  backdrop-filter: none;
}

.weather-now {
  --weather-icon-col: clamp(88px, 22vw, 120px);
  margin-bottom: 10px;
  display: grid;
  gap: 12px;
}

.weather-now-main {
  display: grid;
  grid-template-columns: var(--weather-icon-col) minmax(0, 1fr);
  gap: 12px 14px;
  align-items: start;
}

.weather-now-side {
  display: grid;
  gap: 6px;
  min-width: 0;
  align-content: start;
}

.weather-icon {
  width: var(--weather-icon-col, clamp(88px, 22vw, 120px));
  height: var(--weather-icon-col, clamp(88px, 22vw, 120px));
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.weather-icon svg,
.weather-icon img,
.weather-status-icon-img {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  object-fit: contain;
  background: transparent;
}

.weather-icon-picker {
  display: none;
}

.weather-icon-theme-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.weather-icon-theme-btn {
  margin: 0;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--msn-text);
  font-size: var(--fluid-small);
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
}

.weather-icon-theme-btn:hover,
.weather-icon-theme-btn:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  outline: none;
}

.weather-icon-theme-btn.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: #0b3fad;
  border-color: rgba(255, 255, 255, 0.95);
}

.weather-icon-theme-flat {
  background: linear-gradient(160deg, #f8fafc, #e2e8f0);
  border-color: #cbd5e1;
}

.weather-icon-theme-line {
  background: #fff;
  border-color: #94a3b8;
}

.weather-icon-theme-glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(186, 230, 253, 0.35));
  border-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(6px);
}

.weather-icon-theme-vivid {
  background: linear-gradient(145deg, #fff7ed, #fef3c7);
  border-color: #fdba74;
}

.weather-icon-theme-vivid .sun-core,
.weekly-forecast-icon.weather-icon-theme-vivid .sun-core {
  transform-box: fill-box;
  transform-origin: center;
  animation: sunPulse 2.4s ease-in-out infinite;
}

.weather-icon-theme-vivid .sun-rays,
.weekly-forecast-icon.weather-icon-theme-vivid .sun-rays {
  transform-box: fill-box;
  transform-origin: center;
  animation: sunSpin 10s linear infinite;
}

.weather-icon-theme-vivid .rain-drop,
.weekly-forecast-icon.weather-icon-theme-vivid .rain-drop {
  animation: rainFall 0.95s ease-in infinite;
}

.weather-icon-theme-vivid .rain-drop:nth-of-type(2),
.weekly-forecast-icon.weather-icon-theme-vivid .rain-drop:nth-of-type(2) {
  animation-delay: 0.18s;
}

.weather-icon-theme-vivid .rain-drop:nth-of-type(3),
.weekly-forecast-icon.weather-icon-theme-vivid .rain-drop:nth-of-type(3) {
  animation-delay: 0.36s;
}

.weather-icon-theme-vivid .cloud-body,
.weekly-forecast-icon.weather-icon-theme-vivid .cloud-body {
  animation: cloudDrift 3.2s ease-in-out infinite alternate;
}

.weather-icon-theme-vivid .bolt,
.weekly-forecast-icon.weather-icon-theme-vivid .bolt {
  transform-box: fill-box;
  transform-origin: center;
  animation: boltFlash 1.35s ease-in-out infinite;
}

.weather-icon-theme-vivid .snow-flake,
.weekly-forecast-icon.weather-icon-theme-vivid .snow-flake {
  animation: snowFall 2.1s linear infinite;
}

.weather-icon-theme-vivid .snow-flake:nth-of-type(2) {
  animation-delay: 0.35s;
}

.weather-icon-theme-vivid .snow-flake:nth-of-type(3) {
  animation-delay: 0.7s;
}

.weather-icon-theme-motion {
  background: linear-gradient(160deg, #fff8ec, #e8f4ff);
  border-color: #d4b56a;
}

.weather-icon-theme-motion .sun-glow,
.weekly-forecast-icon.weather-icon-theme-motion .sun-glow {
  transform-box: fill-box;
  transform-origin: center;
  animation: sunGlow 2.6s ease-in-out infinite;
}

.weather-icon-theme-motion .sun-core,
.weekly-forecast-icon.weather-icon-theme-motion .sun-core {
  transform-box: fill-box;
  transform-origin: center;
  animation: sunPulse 2.4s ease-in-out infinite;
}

.weather-icon-theme-motion .sun-rays,
.weekly-forecast-icon.weather-icon-theme-motion .sun-rays {
  transform-box: fill-box;
  transform-origin: center;
  animation: sunSpin 12s linear infinite;
}

.weather-icon-theme-motion .cloud-body,
.weekly-forecast-icon.weather-icon-theme-motion .cloud-body {
  animation: cloudDrift 3.4s ease-in-out infinite alternate;
}

.weather-icon-theme-motion .cloud-back,
.weekly-forecast-icon.weather-icon-theme-motion .cloud-back {
  animation-duration: 4.2s;
  animation-direction: alternate-reverse;
}

.weather-icon-theme-motion .rain-drop,
.weekly-forecast-icon.weather-icon-theme-motion .rain-drop {
  animation: rainFall 0.9s ease-in infinite;
}

.weather-icon-theme-motion .rain-drop:nth-of-type(2),
.weekly-forecast-icon.weather-icon-theme-motion .rain-drop:nth-of-type(2) {
  animation-delay: 0.12s;
}

.weather-icon-theme-motion .rain-drop:nth-of-type(3),
.weekly-forecast-icon.weather-icon-theme-motion .rain-drop:nth-of-type(3) {
  animation-delay: 0.24s;
}

.weather-icon-theme-motion .rain-drop:nth-of-type(4),
.weekly-forecast-icon.weather-icon-theme-motion .rain-drop:nth-of-type(4) {
  animation-delay: 0.36s;
}

.weather-icon-theme-motion .rain-drop:nth-of-type(5),
.weekly-forecast-icon.weather-icon-theme-motion .rain-drop:nth-of-type(5) {
  animation-delay: 0.48s;
}

.weather-icon-theme-motion .bolt,
.weekly-forecast-icon.weather-icon-theme-motion .bolt {
  transform-box: fill-box;
  transform-origin: center;
  animation: boltFlash 1.3s ease-in-out infinite;
}

.weather-icon-theme-motion .snow-flake,
.weekly-forecast-icon.weather-icon-theme-motion .snow-flake {
  animation: snowSway 2.2s linear infinite;
}

.weather-icon-theme-motion .snow-flake:nth-of-type(2) {
  animation-delay: 0.3s;
}

.weather-icon-theme-motion .snow-flake:nth-of-type(3) {
  animation-delay: 0.6s;
}

.weather-icon-theme-motion .snow-flake:nth-of-type(4) {
  animation-delay: 0.9s;
}

@keyframes sunGlow {
  0%,
  100% {
    opacity: 0.22;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.08);
  }
}

@keyframes snowSway {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  50% {
    transform: translate(3px, 6px);
    opacity: 0.7;
  }
  100% {
    transform: translate(-2px, 12px);
    opacity: 0.2;
  }
}

@keyframes sunPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes sunSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rainFall {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(10px);
    opacity: 0.2;
  }
}

@keyframes cloudDrift {
  from {
    transform: translateX(-3px);
  }
  to {
    transform: translateX(3px);
  }
}

@keyframes boltFlash {
  0%,
  70%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  78% {
    opacity: 0.15;
    transform: scale(0.92);
  }
  86% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes snowFall {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(8px);
    opacity: 0.25;
  }
}

.weather-temp-main {
  margin: 0;
  font-size: clamp(2.1rem, 8vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #072445;
}

.weather-feel-line {
  margin: 0;
  font-size: clamp(1.15rem, 4.6vw, 1.45rem);
  color: #f5e14a;
  font-weight: 800;
  line-height: 1.35;
}

#feelValue {
  color: #f5e14a;
}

.weather-place-line {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
  line-height: 1.4;
}

.weather-place-sep {
  color: #7b93b3;
  font-weight: 700;
  font-size: clamp(1.22rem, 5vw, 1.55rem);
}

.weather-place {
  margin: 0;
  font-size: clamp(1.32rem, 5.4vw, 1.7rem);
  font-weight: 800;
  line-height: 1.35;
  color: #0a3564;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.weather-condition {
  margin: 0;
  font-size: clamp(1.32rem, 5.4vw, 1.7rem);
  font-weight: 700;
  line-height: 1.35;
  color: #1f5ae1;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.weekly-forecast-below {
  margin-top: 0;
  padding: 4px 0;
  border: 1px solid #9fc9ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  gap: 6px;
  min-height: 0;
  clip-path: none;
  transform: none;
}

.weekly-forecast-below:not([open]) {
  padding: 4px 0;
  overflow: visible;
  clip-path: none;
  transform: none;
  border-radius: 8px;
}

.weekly-forecast-below > summary {
  display: grid;
  grid-template-columns: 1em minmax(0, 1fr) 1em;
  align-items: center;
  justify-items: center;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  font-size: clamp(24px, 6.2vw, 32px);
  font-weight: 800;
  padding: 6px 8px;
  line-height: 1.2;
  min-height: 1.2em;
  position: relative;
  white-space: nowrap;
  overflow: visible;
  letter-spacing: 0;
  font-style: normal;
  font-stretch: normal;
}

.msn-weather-card .metrics {
  color: #0b2f55;
}

.msn-weather-card .metrics div {
  background: #ffffff;
  border: 1px solid #9fc9ee;
}

.msn-weather-card .metrics dt {
  color: #2f5f8d;
  font-weight: 800;
  font-size: clamp(17px, 4.4vw, 21px);
}

.msn-weather-card .metrics dd {
  color: #072445;
  font-size: clamp(24px, 6vw, 32px);
}

.msn-weather-card .weather-metrics dt {
  font-size: clamp(18px, 4.6vw, 22px);
  color: #ffe38a;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(255, 214, 80, 0.45);
}

.msn-weather-card .weather-metrics dd {
  font-size: clamp(20px, 5.1vw, 26px);
}

.msn-weather-card .weather-subheading,
.msn-weather-card .timestamp,
.msn-weather-card .air-inline-summary {
  color: #184872;
}

.msn-weather-card .weather-subheading {
  color: #0a3564;
  font-weight: 800;
}

.rain-forecast-inline .weather-subheading,
.rain-forecast-inline #rainProjection,
.rain-forecast-inline .timestamp,
.msn-weather-card .rain-forecast-inline .weather-subheading,
.msn-weather-card .rain-forecast-inline .timestamp {
  color: var(--primary);
}

.msn-weather-card .rain-timeline {
  color: var(--primary);
}

.msn-weather-card .rain-row span,
.msn-weather-card .rain-row strong {
  color: var(--primary);
}

.msn-weather-card .rain-row-time,
.msn-weather-card .rain-row-probability {
  color: #2f2f2f;
}

.weekly-forecast-details {
  margin-top: 14px;
  padding: 8px 0;
  border-top: 1px solid #8ebce6;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 12px;
  clip-path: none;
  transform: none;
}

.weekly-forecast-details > summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: 1em minmax(0, 1fr) 1em;
  align-items: center;
  justify-items: center;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  font-size: clamp(24px, 6.2vw, 32px);
  font-weight: 800;
  color: #072445;
  padding: 6px 8px;
  position: relative;
  white-space: nowrap;
  overflow: visible;
  letter-spacing: 0;
  font-style: normal;
  font-stretch: normal;
}

.weekly-forecast-details > summary::-webkit-details-marker {
  display: none;
}

.weekly-forecast-details > summary::marker {
  content: "";
}

.weekly-forecast-details > summary::before {
  content: "";
  grid-column: 1;
  width: 1em;
}

#weeklyForecastSummaryText,
.weekly-forecast-summary-text {
  grid-column: 2;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  overflow-wrap: normal;
  word-break: normal;
  letter-spacing: 0;
  font-style: normal;
  line-height: 1.2;
}

.weekly-forecast-details > summary::after {
  content: "▾";
  color: #1f5ae1;
  font-weight: 800;
  grid-column: 3;
  position: static;
  transform: none;
  justify-self: center;
}

.weekly-forecast-details[open] > summary::after {
  content: " ▴";
}

.weekly-forecast-list {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.weekly-forecast-row {
  --weekly-date-col: 3.6em;
  --weekly-weekday-col: 2.8em;
  --weekly-status-col: 4.6em;
  display: grid;
  grid-template-columns:
    var(--weekly-date-col)
    var(--weekly-weekday-col)
    var(--weekly-status-col)
    max-content
    minmax(4.2em, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  padding: 8px 22px 8px 10px;
  border-radius: 12px;
  background: rgba(238, 244, 255, 0.85);
  border: 1px solid #c7daf8;
  min-width: 0;
}

.weekly-forecast-row.is-today {
  background: rgba(255, 248, 230, 0.95);
  border-color: #e6c56b;
}

.weekly-forecast-date,
.weekly-forecast-weekday {
  min-width: 0;
  color: #0b3fad;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weekly-forecast-date {
  justify-self: start;
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.weekly-forecast-weekday {
  justify-self: start;
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 900;
}

.weekly-forecast-icon {
  width: 48px;
  height: 48px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.weekly-forecast-icon svg,
.weekly-forecast-icon-img {
  width: 44px;
  height: 44px;
  display: block;
  background: transparent;
  object-fit: contain;
}

.weekly-forecast-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  text-align: center;
}

.weekly-forecast-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  width: 100%;
  font-size: clamp(12px, 3.2vw, 15px);
  font-weight: 700;
  color: #1f2a44;
  line-height: 1.15;
  min-width: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.weekly-forecast-temps {
  justify-self: start;
  font-size: clamp(17px, 4.2vw, 22px);
  font-weight: 800;
  color: #0b3fad;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
  min-width: max-content;
}

.weekly-forecast-rain {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  justify-self: end;
  margin-right: 4px;
  gap: 1px;
  font-size: clamp(12px, 3vw, 15px);
  color: #5b6b86;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 0;
}

.weekly-forecast-rain-prob,
.weekly-forecast-rain-sum {
  white-space: nowrap;
}

.air-details {
  appearance: none;
  -webkit-appearance: none;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #8ebce6;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 8px;
  overflow: hidden;
  box-sizing: border-box;
}

.air-details:not([open]) {
  padding: 0;
  gap: 0;
  min-height: 0;
  height: auto;
  border: 1px solid #8ebce6;
  border-radius: 18px;
  overflow: hidden;
}

.air-details:not([open]) > summary,
.air-details:not([open]) .air-inline-summary {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 28px;
  margin: 0;
  min-height: 0;
  height: auto;
  max-height: none;
  border: 0;
  border-radius: 18px;
  box-sizing: border-box;
}

.air-details > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  font-size: 28px;
  font-weight: 800;
  color: #072445;
  line-height: 1.35;
  padding: 6px 28px;
  position: relative;
}

.air-details > summary::-webkit-details-marker {
  display: none;
}

.air-details > summary::marker {
  content: "";
}

.air-details > summary::after {
  content: " ▾";
  color: #1f5ae1;
  font-weight: 800;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.air-details[open] > summary::after {
  content: " ▴";
}

.air-details-body {
  padding-top: 4px;
}

.air-inline-summary {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  padding: 6px 28px;
  border-radius: 18px;
  border: 1px solid transparent;
  text-align: center;
}

.subscription-status-box {
  margin-top: 10px;
  padding: 8px 10px;
  border: 2px solid #1a1a1a;
  border-radius: 10px;
  background: #f3f3f3;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.08);
}

.subscription-status-box:empty {
  display: none;
}

.subscription-email-note {
  margin: 8px 0 0;
  color: #111;
  font-size: 11px;
  line-height: 1.4;
}

.subscription-card,
.subscription-card .subscription-form,
.subscription-card label,
.subscription-card .topic-option,
.subscription-card .topic-option-text,
.subscription-card .timestamp,
.subscription-card .subscription-status-box,
.subscription-card .subscription-email-note,
.subscription-card .notification-hint {
  color: #111;
}

.alert-block .subscription-form > label[for="subscriberEmail"] {
  font-size: 13px;
}

.alert-block .topic-option,
.alert-block .topic-option-text {
  font-size: clamp(1rem, 3.5vw, 1.18rem);
  color: #111;
}

.alert-block .subscription-status-box {
  font-size: 12px;
}

#notifyPermissionStatus {
  line-height: 1.4;
  white-space: normal;
}

.alert-block .subscription-email-note,
.alert-block .notification-hint {
  font-size: 11px;
}

/* Match 地震通報 / ai-alert-top title+body scale for all realtime alert items. */
.alert-block .ai-alert-item {
  font-size: 12px;
}

.alert-block .ai-alert-body {
  font-size: 16px;
}

.alert-block .ai-alert-item .ai-alert-tag,
.alert-block .ai-alert-item.ai-alert-top .ai-alert-tag,
.ai-alert-item .ai-alert-tag,
.ai-alert-item.ai-alert-top .ai-alert-tag {
  font-size: 18px;
}

.topic-option-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow: visible;
  line-height: 1.45;
  font-size: clamp(1rem, 3.5vw, 1.18rem);
  font-weight: 700;
  color: #111;
}

#notificationHint.subscription-status-box {
  margin-top: 8px;
  border-color: #111;
  background: #f3f3f3;
  color: #111;
}

@keyframes weatherSunSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes weatherSunGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(180, 83, 9, 0));
  }
  50% {
    filter: drop-shadow(0 0 7px rgba(180, 83, 9, 0.55));
  }
}

@keyframes weatherCloudDrift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(5px, -3px);
  }
  50% {
    transform: translate(-3px, 2px);
  }
  75% {
    transform: translate(4px, 1px);
  }
}

@keyframes weatherRainFall {
  0% {
    transform: translateY(-8px);
    opacity: 0.12;
  }
  28% {
    opacity: 1;
  }
  100% {
    transform: translateY(16px);
    opacity: 0.15;
  }
}

@keyframes weatherBoltFlash {
  0%,
  62%,
  100% {
    opacity: 0.38;
    transform: scale(0.92) translateY(0);
  }
  68% {
    opacity: 1;
    transform: scale(1.16) translateY(2px);
  }
  76% {
    opacity: 0.5;
    transform: scale(0.96) translateY(0);
  }
  84% {
    opacity: 1;
    transform: scale(1.1) translateY(1px);
  }
}

.weather-icon svg .sun-core,
.weather-icon svg .cloud-body,
.weather-icon svg .bolt,
.weekly-forecast-icon svg .sun-core,
.weekly-forecast-icon svg .cloud-body,
.weekly-forecast-icon svg .bolt {
  paint-order: stroke fill;
}

.weather-icon .sun-core,
.weekly-forecast-icon .sun-core {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherSunSpin 8s linear infinite, weatherSunGlow 2.1s ease-in-out infinite;
}

.weather-icon .cloud-body,
.weekly-forecast-icon .cloud-body {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherCloudDrift 2.6s ease-in-out infinite;
}

.weather-icon .rain-drop,
.weekly-forecast-icon .rain-drop {
  animation: weatherRainFall 0.62s linear infinite;
}

.weather-icon .rain-drop:nth-of-type(1),
.weekly-forecast-icon .rain-drop:nth-of-type(1) {
  animation-delay: 0s;
}

.weather-icon .rain-drop:nth-of-type(2),
.weekly-forecast-icon .rain-drop:nth-of-type(2) {
  animation-delay: 0.1s;
}

.weather-icon .rain-drop:nth-of-type(3),
.weekly-forecast-icon .rain-drop:nth-of-type(3) {
  animation-delay: 0.22s;
}

.weather-icon .rain-drop:nth-of-type(4),
.weekly-forecast-icon .rain-drop:nth-of-type(4) {
  animation-delay: 0.34s;
}

.weather-icon .rain-drop:nth-of-type(5),
.weekly-forecast-icon .rain-drop:nth-of-type(5) {
  animation-delay: 0.46s;
}

.weather-icon .rain-drop:nth-of-type(6),
.weekly-forecast-icon .rain-drop:nth-of-type(6) {
  animation-delay: 0.18s;
}

.weather-icon .bolt,
.weekly-forecast-icon .bolt {
  transform-box: fill-box;
  transform-origin: center;
  animation: weatherBoltFlash 1.15s ease-in-out infinite;
}

.weather-icon .kawaii-blink {
  transform-origin: center;
  animation: weatherKawaiiBlink 5s ease-in-out infinite;
}

.weather-icon .kawaii-sparkle {
  animation: weatherBoltFlash 2.8s ease-in-out infinite;
}

@keyframes weatherKawaiiBlink {
  0%,
  42%,
  48%,
  100% {
    transform: scaleY(1);
  }
  45% {
    transform: scaleY(0.12);
  }
}

@media (max-width: 560px) {
  .weather-now-main {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .weather-now-side {
    gap: 8px;
    container-type: inline-size;
  }

  .weather-now-meta {
    grid-column: auto;
  }

  .weather-icon {
    width: 104px;
    height: 104px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .weather-icon svg {
    width: 90px;
    height: 90px;
  }

  .weather-feel-line {
    font-size: clamp(1.1rem, 5vw, 1.35rem);
    line-height: 1.4;
  }

  .weather-place-line {
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
  }

  .weather-place,
  .weather-condition,
  .weather-place-sep {
    font-size: clamp(1.02rem, 9.2cqi, 1.42rem);
    line-height: 1.25;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
    flex: 0 1 auto;
    min-width: 0;
  }

  .weather-place-sep {
    flex: 0 0 auto;
  }

  .weather-place,
  .weather-condition {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .weekly-forecast-below > summary {
    font-size: clamp(22px, 5.8vw, 28px);
    padding: 6px 0;
    justify-items: center;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
  }

  .weekly-forecast-row {
    --weekly-date-col: 3.2em;
    --weekly-weekday-col: 2.6em;
    --weekly-status-col: 4.2em;
    column-gap: 6px;
    padding: 8px 18px 8px 8px;
  }

  .weekly-forecast-icon {
    width: 42px;
    height: 42px;
  }

  .weekly-forecast-icon svg,
  .weekly-forecast-icon-img {
    width: 40px;
    height: 40px;
  }

  .weekly-forecast-rain {
    font-size: clamp(11px, 3vw, 13px);
    line-height: 1;
    white-space: nowrap;
  }
}

.camera-source-link {
  display: none;
}

#cameraMeta {
  display: block;
}

.camera-switching {
  display: none;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  gap: 10px;
}

.metrics div {
  background: var(--primary-soft);
  border-radius: 10px;
  padding: 10px;
}

.metrics dt {
  font-size: 16px;
  color: var(--muted);
}

.metrics dd {
  margin: 6px 0 0;
  font-size: 38px;
  font-weight: 700;
}

.rain-timeline {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #9fc9ee;
}

.weather-air-grid .forecast-card .rain-timeline {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.rain-row {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  font-size: 17px;
}

.rain-row .bar-bg {
  width: 100%;
  min-width: 0;
}

.rain-row span,
.rain-row strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}

.rain-row-time,
.rain-row-probability,
.rain-row span.rain-row-time,
.rain-row strong.rain-row-probability,
.msn-weather-card .rain-row-time,
.msn-weather-card .rain-row-probability,
.msn-weather-card .rain-row span.rain-row-time,
.msn-weather-card .rain-row strong.rain-row-probability {
  color: #2f2f2f;
}

.msn-weather-card .rain-row span,
.msn-weather-card .rain-row strong {
  color: var(--primary);
}

.msn-weather-card .rain-row-time,
.msn-weather-card .rain-row-probability {
  color: #2f2f2f;
}

.rain-empty {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--muted);
}

.bar-bg {
  height: 24px;
  background: #d7e7fb;
  border: 1px solid #7eafdf;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15, 47, 85, 0.12);
}

.bar {
  height: 100%;
  min-width: 0;
  background: linear-gradient(90deg, #4ea0ff, #1f5ae1 55%, #0b3fad);
  box-shadow: 0 0 0 1px rgba(31, 90, 225, 0.15);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.card-section-title {
  margin-bottom: 10px;
}

.card-section-title h2 {
  margin: 0;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  line-height: 1.45;
}

.card-section-title h2 a {
  font-size: 0.88em;
  font-weight: 600;
  color: #1f5ae1;
  text-decoration: none;
  white-space: nowrap;
}

.card-section-title h2 a:hover {
  text-decoration: underline;
}

.section-block > .grid {
  margin: 0;
  gap: 12px;
}

.section-head a {
  font-size: 14px;
  color: #1f5ae1;
  text-decoration: none;
}

.camera-controls {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.camera-controls input {
  border: 2px solid var(--input-accent);
  border-radius: 10px;
  padding: 10px;
  font-size: 15px;
  background: #fffef8;
}

.camera-list {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.camera-list > .status-warn {
  grid-column: 1 / -1;
}

.camera-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  background: #fff;
}

.camera-item-pending {
  display: none !important;
}

.camera-item-live {
  display: grid;
}

.camera-item-freeway img {
  object-fit: contain;
  background: #111;
}

.camera-item img,
.camera-frame,
.camera-fallback {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e7ecf7;
  border: 0;
}

.camera-fallback {
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: #5a6787;
  font-size: 14px;
}

.camera-fallback a {
  color: #1f5ae1;
  text-decoration: none;
  font-weight: 700;
}

.camera-body {
  padding: 10px;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.camera-body h3 {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.camera-body p {
  margin: 0;
  font-size: 13px;
  color: #2d3856;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.camera-maps-link {
  color: #1f5ae1;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

.camera-body a {
  color: #1f5ae1;
  text-decoration: none;
  font-size: 13px;
}

.map-layout {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

.map-category-filters {
  display: none;
}

.map-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-solid, var(--card)) 88%, var(--text) 12%);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.map-category-chip[aria-pressed="true"] {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
  background: color-mix(in srgb, var(--primary) 16%, var(--card-solid, var(--card)));
}

.map-category-chip[aria-pressed="false"] {
  opacity: 0.45;
}

.map-category-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(15, 22, 34, 0.28);
  flex: 0 0 auto;
}

.map-category-count {
  min-width: 1.2em;
  font-size: 12px;
  color: var(--muted);
}

.map-card-live .warning-map,
.map-card-live .map-pane {
  --fluid-map-height: min(78vh, 860px);
  min-height: var(--fluid-map-height);
  height: var(--fluid-map-height);
}

.map-card-live .layer-panel .timestamp,
.map-card-live .map-status-note {
  display: block;
}

.map-pane-wrap .map-alert-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 500;
  max-width: none;
  padding: 0;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  background: none;
  border: none;
}

.map-pane-wrap .map-alert-badges .map-alert-badge {
  pointer-events: auto;
}

.map-pane-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.map-legend-below {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-solid, var(--card));
  color: var(--text);
  box-shadow: none;
  text-align: left;
}

.map-legend-below h4 {
  margin: 0 0 2px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: left;
}

.map-legend-hint {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
  text-align: left;
}

.map-legend-empty {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.map-legend-below .legend-list-always li:has(.legend-item-empty):not(:has(.legend-item-fixed)),
.map-legend-below .legend-list li[hidden] {
  display: none;
}

.legend-active-block {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(183, 28, 28, 0.35);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card-solid, var(--card)) 88%, #b71c1c 12%);
}

.legend-disaster-group > .legend-active-block {
  margin: 10px 0 8px;
}

.legend-active-block[hidden] {
  display: none;
}

.legend-active-block .legend-group-label {
  margin-top: 0;
  color: var(--text);
}

.legend-disaster-group .legend-group-label[hidden],
.legend-disaster-group .legend-list[hidden] {
  display: none;
}

.legend-disaster-group {
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--card-solid, var(--card)) 92%, var(--text) 8%);
}

.legend-disaster-group > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.legend-disaster-group > summary::-webkit-details-marker {
  display: none;
}

.legend-disaster-group > summary::after {
  content: "▾";
  color: var(--muted);
}

.legend-disaster-group[open] > summary::after {
  content: "▴";
}

.legend-disaster-group.is-empty > summary {
  color: var(--muted);
}

#legendDisasterSummary {
  font-weight: 700;
  color: var(--muted);
}

.legend-group-label {
  margin: 10px 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.legend-disaster-group .legend-item-empty {
  opacity: 0.55;
}

.map-legend-below .legend-list {
  display: grid;
  gap: 6px;
}

.map-legend-below .legend-list li {
  color: var(--text);
}

.legend-item-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: 8px;
  width: 100%;
}

.legend-layer-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}

.legend-layer-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.legend-switch-ui {
  position: relative;
  display: block;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #8a8175;
  box-shadow: inset 0 0 0 1px rgba(18, 18, 18, 0.28);
  transition: background 0.2s ease;
}

.legend-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f4efe6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease;
}

.legend-layer-switch input:checked + .legend-switch-ui {
  background: #12b76a;
}

.legend-layer-switch input:checked + .legend-switch-ui::after {
  transform: translateX(16px);
}

.legend-layer-switch input:disabled + .legend-switch-ui {
  opacity: 0.38;
  cursor: not-allowed;
}

.legend-layer-switch input:focus-visible + .legend-switch-ui {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.map-legend-below .legend-item-btn {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  gap: 2px 6px;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-solid, var(--card)) 88%, var(--text) 12%);
  color: var(--text);
  align-items: center;
}

.map-legend-below .legend-list-always > li > .legend-item-btn.legend-item-locked {
  width: calc(100% - 44px);
  margin-left: 44px;
}

.map-legend-below .legend-item-btn:hover,
.map-legend-below .legend-item-btn:focus-visible {
  background: color-mix(in srgb, var(--primary) 18%, var(--card-solid, var(--card)));
}

.map-legend-below .legend-count {
  color: var(--muted);
}

.map-legend-below .legend-place {
  grid-column: 2 / -1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.leaflet-div-icon.map-legend-callout,
.leaflet-marker-icon.map-legend-callout {
  background: transparent;
  border: 0;
  overflow: visible !important;
}

.map-legend-callout-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--legend-dot, #12b76a);
  border: 2px solid #ecfdf3;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--legend-dot, #12b76a) 45%, transparent);
}

.map-legend-callout-dot-flash {
  animation: map-legend-dot-flash 1.15s ease-in-out infinite;
}

@keyframes map-legend-dot-flash {
  0%,
  100% {
    opacity: 1;
    background: #16d67a;
    box-shadow:
      0 0 0 2px var(--legend-dot, rgba(18, 183, 106, 0.45)),
      0 0 10px rgba(18, 183, 106, 0.85);
  }
  50% {
    opacity: 0.28;
    background: #0d5c36;
    box-shadow:
      0 0 0 2px var(--legend-dot, rgba(18, 183, 106, 0.2)),
      0 0 2px rgba(18, 183, 106, 0.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-legend-callout-dot-flash {
    animation: none;
    opacity: 1;
    background: #12b76a;
  }
}

.leaflet-pane path.eq-epicenter-blink,
.eq-epicenter-blink {
  animation: eq-epicenter-blink 1.05s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes eq-epicenter-blink {
  0%,
  100% {
    fill-opacity: 1;
    stroke-opacity: 1;
    filter: brightness(1.2);
  }
  50% {
    fill-opacity: 0.16;
    stroke-opacity: 0.4;
    filter: brightness(0.38);
  }
}

@media (prefers-reduced-motion: reduce) {
  .leaflet-pane path.eq-epicenter-blink,
  .eq-epicenter-blink {
    animation: none;
    fill-opacity: 1;
    stroke-opacity: 1;
    filter: none;
  }
}

.map-legend-callout-card {
  position: absolute;
  left: 12px;
  top: -16px;
  min-width: 96px;
  max-width: min(240px, 80vw);
  box-sizing: border-box;
  padding: 5px 9px 6px 10px;
  border-left: 3px solid var(--callout-color, #c2a36b);
  border-radius: 8px;
  background: rgba(18, 24, 33, 0.94);
  color: #f4efe6;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  line-height: 1.3;
  white-space: normal;
}

.map-legend-callout-card::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 12px;
  width: 8px;
  height: 2px;
  background: var(--callout-color, #c2a36b);
}

.map-legend-callout-card strong {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.map-legend-callout-place {
  display: block;
  max-width: 100%;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  font-size: 12px;
  color: #c2a36b;
}

.map-pane-wrap .map-live-count-btn {
  top: auto;
  bottom: 12px;
  right: 12px;
}

.map-pane,
.warning-map {
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: var(--fluid-map-height);
  height: var(--fluid-map-height);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.map-alert-badges {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 0;
}

.map-alert-badges-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: min(48%, 220px);
  pointer-events: none;
}

.map-alert-badges-left {
  align-items: flex-start;
}

.map-alert-badges-right {
  align-items: flex-end;
}

.map-alert-badges-right .map-alert-badge {
  margin-left: auto;
}

.map-alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  border: none;
  line-height: 1.3;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: opacity 0.2s;
}

.map-alert-badge:hover,
.map-alert-badge:focus-visible {
  opacity: 0.85;
  outline: none;
}

.map-alert-badge[data-empty="true"] {
  display: none;
}

.map-live-count-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(208, 0, 0, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.map-live-count-btn strong {
  font-size: 15px;
  font-weight: 900;
}

.map-live-count-btn:hover,
.map-live-count-btn:focus-visible {
  background: #9d0208;
  outline: none;
}

.map-live-count-btn.is-empty {
  background: rgba(71, 85, 105, 0.92);
  cursor: default;
}

.leaflet-focus-circle,
.leaflet-focus-circle-halo {
  --focus-ring-width: 6px;
  --focus-halo-width: 0.5mm;
}

.leaflet-focus-circle {
  stroke: #7af6ff !important;
  stroke-width: var(--focus-ring-width) !important;
  stroke-dasharray: none !important;
  fill: rgba(0, 212, 255, 0.22) !important;
}

.leaflet-focus-circle-halo {
  stroke: #ffffff !important;
  stroke-width: calc(var(--focus-ring-width) + (2 * var(--focus-halo-width))) !important;
  stroke-dasharray: none !important;
  fill: none !important;
}

.layer-panel {
  padding: 8px;
  background: #fbfdff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.layer-panel .timestamp {
  display: none;
}

.layer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.layer-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 5px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.layer-item label {
  font-size: 13px;
  line-height: 1.25;
}

.map-legend {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  text-align: left;
}

.map-legend h4 {
  margin: 0 0 4px;
  font-size: 13px;
  text-align: left;
}

.legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.legend-list li {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  color: #334155;
}

.legend-item-btn {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 3px 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.legend-item-btn:hover,
.legend-item-btn:focus-visible {
  background: rgba(31, 90, 225, 0.08);
  outline: none;
}

.legend-item-btn.is-category-hidden {
  opacity: 0.4;
}

.legend-item-btn.legend-item-locked,
.legend-item-btn.legend-item-locked.is-category-hidden {
  opacity: 1;
}

.legend-item-btn.legend-item-empty:hover {
  background: transparent;
}

.legend-count {
  min-width: 1.4em;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-align: right;
}

.legend-place {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: #334155;
  white-space: normal;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 22, 34, 0.25);
}

.legend-swatch.flood-level-4 {
  background: #d00000;
}

.legend-swatch.flood-level-3 {
  background: #e85d04;
}

.legend-swatch.flood-level-2 {
  background: #ffba08;
}

.legend-swatch.flood-level-1 {
  background: #ffd166;
}

.legend-swatch.cctv-point {
  background: transparent;
  border: 2px solid #00d4ff;
  box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.25);
}

.legend-swatch.earthquake-point {
  background: #ffe600;
  border-color: #fff8c4;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 230, 0, 0.45);
}

.legend-swatch.shelter-point {
  background: #15803d;
  border-color: #14532d;
}

.legend-swatch.water-outage-point {
  background: #0f766e;
  border-color: #115e59;
}

.legend-swatch.closure-point {
  background: #b71c1c;
  border-color: #7f1d1d;
}

.earthquake-card {
  display: grid;
  gap: 10px;
}

.earthquake-head {
  align-items: center;
}

.earthquake-meta {
  margin: 0;
  line-height: 1.5;
}

.earthquake-meta a {
  color: #1f5ae1;
  text-decoration: none;
  font-weight: 700;
}

.earthquake-meta a:hover,
.earthquake-meta a:focus-visible {
  text-decoration: underline;
}

.earthquake-summary {
  margin: 0;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  line-height: 1.35;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #94a3b8;
  color: #334155;
  background: #e8eef5;
}

.earthquake-summary.eq-level-gray,
.earthquake-summary.eq-level-gray .earthquake-place-label {
  color: #334155;
  background: #e8eef5;
  border-color: #94a3b8;
}

.earthquake-summary.eq-level-yellow,
.earthquake-summary.eq-level-yellow .earthquake-place-label {
  color: #854d0e;
  background: #fef3c7;
  border-color: #eab308;
}

.earthquake-summary.eq-level-orange,
.earthquake-summary.eq-level-orange .earthquake-place-label {
  color: #9a3412;
  background: #ffedd5;
  border-color: #f97316;
}

.earthquake-summary.eq-level-red,
.earthquake-summary.eq-level-red .earthquake-place-label {
  color: #991b1b;
  background: #fee2e2;
  border-color: #dc2626;
}

.earthquake-summary[hidden] {
  display: none !important;
}

.earthquake-list li.earthquake-item.earthquake-item-pinned {
  position: sticky;
  top: 0;
  z-index: 4;
  align-items: start;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.earthquake-list li.earthquake-item.earthquake-item-pinned .earthquake-item-main {
  align-items: start;
}

.earthquake-pinned-kicker {
  display: block;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  line-height: 1.35;
  font-weight: 800;
  margin: 0 0 4px;
}

.earthquake-list li.earthquake-item.earthquake-item-pinned.eq-level-gray {
  color: #334155;
  background: #e8eef5;
  border-color: #94a3b8;
}

.earthquake-list li.earthquake-item.earthquake-item-pinned.eq-level-yellow {
  color: #854d0e;
  background: #fef3c7;
  border-color: #eab308;
}

.earthquake-list li.earthquake-item.earthquake-item-pinned.eq-level-orange {
  color: #9a3412;
  background: #ffedd5;
  border-color: #f97316;
}

.earthquake-list li.earthquake-item.earthquake-item-pinned.eq-level-red {
  color: #991b1b;
  background: #fee2e2;
  border-color: #dc2626;
}

.earthquake-list li.earthquake-item.earthquake-item-pinned .earthquake-body strong,
.earthquake-list li.earthquake-item.earthquake-item-pinned .earthquake-body small,
.earthquake-list li.earthquake-item.earthquake-item-pinned .earthquake-place-label {
  color: inherit;
}

.earthquake-place-label,
.eq-located-label {
  display: block;
  font-size: clamp(13px, 3.6vw, 16px);
  font-weight: 700;
  color: #9a6b4a;
  margin-left: 0;
  padding-left: 0;
  line-height: 1.35;
}

.earthquake-item .earthquake-place-label,
.earthquake-item .earthquake-meta-line {
  display: block;
  padding-left: 0;
}

.earthquake-list {
  gap: 10px;
}

.earthquake-card > .earthquake-list {
  padding-left: 0;
  list-style: none;
}

.app .earthquake-card > .earthquake-list,
.app .earthquake-card > .earthquake-list-details {
  width: min(90%, 34rem);
  max-width: 34rem;
  margin-inline: auto;
  justify-self: center;
}

.app .earthquake-list-details .earthquake-list {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.earthquake-list-details {
  border: 1px solid var(--border, #dce4f4);
  border-radius: 12px;
  background: #f8fafc;
  padding: 0;
}

.earthquake-list-details[hidden] {
  display: none !important;
}

.earthquake-list-summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-weight: 700;
  color: #1f5ae1;
  user-select: none;
}

.earthquake-list-summary::-webkit-details-marker {
  display: none;
}

.earthquake-list-summary::marker {
  content: "";
}

.earthquake-list-details .earthquake-list {
  margin: 0;
  padding: 0 10px 10px;
  display: grid;
  gap: 10px;
}

.earthquake-list-collapse {
  display: block;
  width: calc(100% - 20px);
  margin: 0 10px 10px;
  border: 1px dashed #9eb6e8;
  border-radius: 10px;
  background: #eef4ff;
  color: #1f5ae1;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 12px;
  cursor: pointer;
}

.earthquake-list-collapse:hover,
.earthquake-list-collapse:focus-visible {
  background: #e0ebff;
}

.earthquake-list-collapse[hidden] {
  display: none !important;
}

.eq-detail-sheet[hidden] {
  display: none !important;
}

.eq-detail-sheet {
  position: fixed;
  inset: 0;
  z-index: 2700;
  display: flex;
  align-items: center;
  justify-content: center;
  overscroll-behavior: contain;
  pointer-events: none;
}

.eq-detail-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 22, 34, 0.28);
  pointer-events: auto;
}

.eq-detail-sheet-panel {
  position: relative;
  z-index: 1;
  width: 60%;
  max-width: 60vw;
  max-height: 60dvh;
  margin: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 22, 34, 0.28);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  min-height: 0;
  pointer-events: auto;
}

.eq-detail-sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
}

.eq-detail-sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
  padding-bottom: 28px;
}

.eq-detail-sheet-body .eq-popup {
  font-size: 15px;
  line-height: 1.55;
  display: grid;
  gap: 8px;
}

.eq-detail-sheet-body .eq-popup-report {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.eq-detail-sheet-body .eq-popup-links {
  padding-bottom: 8px;
}

body.eq-sheet-open {
  overflow: hidden;
}

.warning-map.leaflet-container .leaflet-popup,
.leaflet-container .disaster-map-popup {
  max-width: min(80%, 420px) !important;
  min-width: min(200px, 72vw);
  z-index: 820;
}

.warning-map.leaflet-container .leaflet-popup-pane {
  z-index: 820;
  overflow: visible;
}

.warning-map.leaflet-container .leaflet-popup-content-wrapper,
.leaflet-container .disaster-map-popup .leaflet-popup-content-wrapper {
  max-width: 100%;
  box-sizing: border-box;
}

.leaflet-container .eq-popup-wrap .leaflet-popup-content,
.leaflet-container .disaster-map-popup .leaflet-popup-content {
  margin: 12px 14px;
  max-width: 100% !important;
  width: auto !important;
  max-height: min(70vh, 420px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.warning-map.leaflet-container .eq-popup-wrap.leaflet-popup,
.leaflet-container .eq-popup-wrap.disaster-map-popup {
  max-width: 30% !important;
  min-width: 0;
  width: 30%;
}

.leaflet-container .eq-popup-wrap .leaflet-popup-content {
  margin: 8px 10px;
  max-height: min(48vh, 260px);
}

.leaflet-container .eq-popup-wrap .eq-popup {
  max-width: 100%;
  gap: 4px;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.leaflet-container .cctv-popup-wrap .leaflet-popup-content-wrapper,
.leaflet-container .cctv-popup-wrap .leaflet-popup-tip {
  background: #0b1220;
  color: #ffb020;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.leaflet-container .cctv-popup-wrap .leaflet-popup-content-wrapper {
  border: 1px solid #00d4ff;
  border-radius: 10px;
}

.leaflet-container .cctv-popup-wrap .leaflet-popup-content {
  margin: 10px 12px;
  max-width: 100% !important;
}

.shelter-map-popup {
  font-size: 14px;
  line-height: 1.4;
  color: #1f2a44;
}

.shelter-map-popup p {
  margin: 4px 0 0;
}

.shelter-map-source {
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
}

.map-gmaps-link {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #1d4ed8;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.map-gmaps-link:hover,
.map-gmaps-link:focus-visible {
  background: #1e40af;
}

.cctv-map-popup {
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
  color: #ffb020;
}

.cctv-map-popup-name-only {
  min-width: 0;
}

.cctv-map-popup-name-only .cctv-map-popup-line {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #ffb020;
}

.cctv-map-popup-road {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffb020;
  text-align: center;
}

.cctv-map-popup-preview {
  margin-top: 8px;
}

.leaflet-overlay-pane,
.leaflet-overlay-pane svg,
.leaflet-pane.leaflet-focusPane-pane,
.leaflet-pane.leaflet-focusPane-pane svg,
.leaflet-pane.leaflet-cameraPane-pane {
  overflow: visible !important;
}

.leaflet-div-icon.cctv-map-thumb-marker,
.leaflet-div-icon.shelter-map-marker {
  background: transparent;
  border: 0;
  overflow: visible !important;
}

.cctv-map-pin {
  position: relative;
  display: block;
}

.cctv-map-ring {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid #00d4ff;
  background: rgba(8, 18, 28, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 0 8px rgba(0, 212, 255, 0.35);
}

.cctv-map-road-label {
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  max-width: 168px;
  padding: 1px 6px;
  border: 1px solid #00d4ff;
  border-radius: 6px;
  background: rgba(8, 18, 28, 0.88);
  color: #e8fbff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.cctv-map-road-label-int {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 180px;
  overflow: visible;
  white-space: nowrap;
  text-overflow: clip;
}

.cctv-map-road-label-int span {
  display: block;
  max-width: 176px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cctv-map-thumb {
  display: block;
  width: 80px;
  height: 60px;
  overflow: hidden;
  border-radius: 6px;
  border: 2px solid #0096c7;
  background: #123;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  position: relative;
}

.cctv-map-thumb-media,
.cctv-map-thumb img,
.cctv-map-thumb iframe {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  pointer-events: none;
}

.cctv-map-thumb.cctv-map-thumb--frame iframe,
.cctv-map-thumb--frame iframe.cctv-map-thumb-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 240px;
  transform: scale(0.25);
  transform-origin: top left;
  pointer-events: none;
  border: 0;
  background: #111;
}

.cctv-map-thumb-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 10px;
  font-weight: 800;
  color: #b8f2ff;
  background: #0096c7;
}

.shelter-map-marker-dot {
  display: block;
  width: 16px;
  height: 16px;
  margin: 1px;
  border-radius: 50%;
  background: #15803d;
  border: 2px solid #dcfce7;
  box-shadow: 0 0 0 2px rgba(21, 128, 61, 0.35);
}

.map-legend-callout-name-only strong {
  display: none;
}

.cctv-map-popup-title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #ffb020;
}

.cctv-map-popup-line {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.4;
}

.cctv-map-popup-note {
  margin: 0 0 8px;
  font-size: 12px;
  color: #5b6b86;
  line-height: 1.35;
}

.cctv-map-popup-preview {
  margin: 0;
}

.cctv-map-popup-zoom {
  display: grid;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
}

.cctv-map-popup-zoom-hint {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #7dd3fc;
}

.cctv-monitor-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(8, 12, 20, 0.72);
}

.cctv-monitor-lightbox[hidden] {
  display: none;
}

.cctv-monitor-lightbox-panel {
  width: min(96vw, 920px);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #0b1220;
  border: 1px solid #00d4ff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.cctv-monitor-lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.cctv-monitor-lightbox-title {
  margin: 0;
  color: #ffb020;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

.cctv-monitor-lightbox-close {
  justify-self: start;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #7dd3fc;
  background: #102033;
  color: #e0f7ff;
  font-weight: 800;
  cursor: pointer;
}

.cctv-monitor-lightbox-media {
  min-height: 240px;
}

.cctv-monitor-lightbox-media img,
.cctv-monitor-lightbox-media iframe,
.cctv-monitor-lightbox-frame {
  display: block;
  width: 100%;
  height: min(70vh, 560px);
  border: 0;
  border-radius: 10px;
  background: #111;
  object-fit: contain;
  pointer-events: auto;
}

.cctv-map-popup-media,
.cctv-map-popup img {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: 8px;
  background: #111;
  border: 0;
}

.cctv-map-popup-frame {
  pointer-events: none;
}

.cctv-map-popup-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
  font-size: 13px;
}

.in-page-alert-host.is-fullscreen-mode {
  left: 50%;
  top: 50%;
  bottom: auto;
  right: auto;
  transform: translate(-50%, -50%);
  width: 95vw;
  max-width: 95vw;
  height: 95dvh;
  max-height: 95dvh;
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 2400;
  pointer-events: none;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-fullscreen {
  pointer-events: auto;
  width: 100%;
  height: 100%;
  max-height: 95dvh;
  margin: 0;
  box-sizing: border-box;
  border-radius: 18px;
  border: 1px solid #9eb6e8;
  padding: clamp(16px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(15, 22, 34, 0.3);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-title {
  font-size: clamp(20px, 4.8vw, 28px);
  font-weight: 800;
  line-height: 1.25;
  white-space: normal !important;
  overflow: visible !important;
  margin: 0;
  flex: 0 0 auto;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  gap: 16px;
  align-content: center;
  justify-items: stretch;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-line {
  white-space: normal !important;
  overflow: visible !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: clamp(16px, 4vw, 22px);
  line-height: 1.45;
  font-weight: 700;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-close {
  width: 100%;
  min-height: 56px;
  margin-top: auto;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: clamp(18px, 4.2vw, 24px);
  font-weight: 800;
  flex: 0 0 auto;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-locate-done {
  border: 3px solid #5a6478;
  box-shadow:
    0 0 0 2px #8b93a3,
    0 18px 48px rgba(15, 22, 34, 0.3);
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-locate-done .in-page-alert-title {
  font-size: clamp(32px, 8vw, 52px);
  font-weight: 400;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-locate-done .in-page-alert-line {
  font-size: clamp(26px, 6.8vw, 44px);
  font-weight: 400;
}

@media (min-width: 861px) {
  .subscription-card .topic-option,
  .subscription-card .topic-option-text,
  .alert-block .topic-option,
  .alert-block .topic-option-text {
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .subscription-card .subscription-status-box,
  .alert-block .subscription-status-box {
    font-size: 11px;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
  }

  .subscription-card .subscription-email-note,
  .subscription-card .notification-hint,
  .alert-block .subscription-email-note,
  .alert-block .notification-hint {
    font-size: 11px;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
  }

  .in-page-alert-host.is-fullscreen-mode:has(.in-page-alert-subscription) {
    width: min(560px, 90vw);
    height: auto;
    max-height: min(88dvh, 820px);
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription {
    height: auto;
    max-height: min(88dvh, 820px);
    gap: 8px;
    padding: 16px 18px;
    overflow: auto;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-title {
    font-size: 16px;
    line-height: 1.3;
    font-weight: 800;
    white-space: normal;
    overflow: visible;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-body {
    flex: 0 1 auto;
    align-content: start;
    overflow: visible;
    gap: 4px;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-line {
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
    white-space: normal;
    overflow: visible;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-close {
    min-height: 40px;
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 13px;
  }
}

.in-page-alert-host:has(.in-page-alert-subscription),
.in-page-alert-host.is-fullscreen-mode:has(.in-page-alert-subscription) {
  top: 50%;
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  width: min(94vw, 560px);
  max-width: min(94vw, 560px);
  height: auto;
  max-height: min(86dvh, 820px);
  z-index: 2600;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription {
  height: auto;
  max-height: min(86dvh, 820px);
  gap: 8px;
  padding: 16px 18px;
  overflow: auto;
}

.earthquake-list li.earthquake-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border, #dce4f4);
  border-radius: 12px;
  background: #fffaf5;
}

.earthquake-list li.earthquake-item.alert-yellow,
.earthquake-list li.earthquake-item.mag-watch {
  border-color: #fcd34d;
  background: #fffbeb;
}

.earthquake-list li.earthquake-item.alert-orange,
.earthquake-list li.earthquake-item.mag-high,
.earthquake-list li.earthquake-item.alert-red,
.earthquake-list li.earthquake-item.is-national {
  border-color: #fca5a5;
  background: #fef2f2;
}

.earthquake-list li.earthquake-item.intensity-3-plus {
  border: 2px solid #fca5a5;
  background: #fef2f2;
}

.earthquake-item.intensity-below-3 .earthquake-body strong,
.earthquake-item.intensity-below-3 .earthquake-body small,
.earthquake-item.intensity-below-3 .earthquake-place-label {
  color: #111;
}

.earthquake-item.intensity-3-plus .earthquake-body strong,
.earthquake-item.intensity-3-plus .earthquake-body small,
.earthquake-item.intensity-3-plus .earthquake-place-label {
  color: #dc2626;
}

.earthquake-item.intensity-3-plus .earthquake-links a {
  color: #b91c1c;
  font-weight: 700;
}

.earthquake-mag {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-self: start;
  align-self: center;
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  min-height: 60px;
  margin: 0;
  padding: 10px 4px;
  border-radius: 999px;
  background: #9a3412;
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
}

.earthquake-mag-value {
  display: block;
  font-size: 13px;
  line-height: 1.05;
}

.earthquake-mag-unit {
  display: block;
  font-size: 10px;
  line-height: 1.1;
  margin-top: 2px;
}

.earthquake-item.alert-gray .earthquake-mag,
.earthquake-item.mag-low .earthquake-mag {
  background: #1d4ed8;
}

.earthquake-item.alert-yellow .earthquake-mag,
.earthquake-item.mag-watch .earthquake-mag {
  background: #b45309;
}

.earthquake-item.alert-red .earthquake-mag,
.earthquake-item.intensity-3-plus .earthquake-mag {
  background: #7f1d1d;
}

.earthquake-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.earthquake-body strong {
  font-size: 15px;
  line-height: 1.35;
}

.earthquake-body small,
.earthquake-body .earthquake-meta-line {
  display: block;
  color: #63708a;
  font-size: 12px;
  line-height: 1.4;
}

.earthquake-body .earthquake-range-line {
  white-space: nowrap;
}

.earthquake-item-main {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  justify-items: start;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  font-size: inherit;
  white-space: normal;
}

.earthquake-item-main:hover,
.earthquake-item-main:focus-visible {
  color: inherit;
  text-decoration: none;
}

.earthquake-list li.earthquake-item:hover,
.earthquake-list li.earthquake-item:focus-within {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary, #c2a36b) 55%, transparent);
}

.earthquake-links {
  display: grid;
  gap: 4px;
}

.earthquake-links a {
  color: #1f5ae1;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

.eq-popup {
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.eq-popup-report {
  margin-top: 4px;
  padding: 7px 8px;
  border-radius: 6px;
  background: #d4d4d4;
  color: #1a1a1a;
  border: 1px solid #8d8d8d;
  font-weight: 600;
  line-height: 1.4;
}

.eq-popup-report,
.eq-popup-report * {
  color: #1a1a1a;
}

.eq-popup-areas {
  margin: 0;
  padding-left: 18px;
}

.eq-popup-links {
  display: grid;
  gap: 4px;
}

.eq-popup-links a {
  color: #1f5ae1;
}

.visual-break-earthquake {
  --visual-fallback: linear-gradient(120deg, #0f172a, #1e3a5f 48%, #0ea5e9);
}

.visual-break-map {
  --visual-fallback: linear-gradient(120deg, #0b1c2e, #1d4e89 46%, #c2a36b);
}

.legend-swatch.power-outage-disaster {
  background: #d00000;
  border-color: #9d0208;
}

.legend-swatch.power-outage-planned {
  background: #c77dff;
  border-color: #7b2cbf;
}

.warning-map {
  overflow: hidden;
  background: #dce6ef;
}

html.is-map-evening .warning-map,
.warning-map.is-map-evening {
  background: #0f1622;
}

html.is-map-day .warning-map,
.warning-map.is-map-day {
  background: #dce6ef;
}

.warning-map.leaflet-container {
  background: inherit;
}

.warning-map .disaster-map-base-tiles,
.warning-map .disaster-map-dark-tiles {
  filter: none;
}

html.is-map-evening .warning-map .disaster-map-nlsc-tiles,
html.is-map-evening .warning-map .disaster-map-dark-tiles,
.warning-map.is-map-evening .disaster-map-nlsc-tiles,
.warning-map.is-map-evening .disaster-map-dark-tiles {
  filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.92) saturate(0.55);
}

.warning-map .leaflet-interactive {
  cursor: pointer;
}

.high-contrast-tiles {
  filter: grayscale(1) contrast(1.35) brightness(0.8);
}

.risk-badge {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 10px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: clamp(22px, 6.2vw, 42px);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.risk-low {
  background: #e7f8ee;
  color: #0f9d58;
}

.risk-medium {
  background: #fff7e8;
  color: #c46b00;
}

.risk-high {
  background: #ffe8e8;
  color: #c1121f;
}

.analysis-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
  display: grid;
  gap: 6px;
}

.ai-alert-card .analysis-list {
  list-style: none;
  padding: 0;
  gap: 10px;
}

.ai-alert-item {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
  border: 2px solid #9aa7c2;
  border-radius: 10px;
  background: #f7f9fc;
  color: #243047;
  font-size: 12px;
  line-height: 1.55;
}

.ai-alert-item.ai-alert-top {
  font-size: 12px;
}

.ai-alert-item.ai-alert-top .ai-alert-body,
.ai-alert-body {
  font-size: 16px;
}

.ai-alert-tag {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.ai-alert-body {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ai-alert-more-details {
  margin-top: 6px;
}

.ai-alert-more-summary {
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  line-height: 1.45;
  user-select: none;
}

.ai-alert-more-summary::-webkit-details-marker {
  display: none;
}

.ai-alert-location-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: min(42vh, 360px);
  overflow: auto;
}

.ai-alert-location-list li {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.ai-alert-general {
  border-color: #5a9f74;
  background: #eef8f1;
}

.ai-alert-general .ai-alert-tag {
  background: #0f9d58;
  color: #fff;
}

.ai-alert-watch {
  border-color: #d4a017;
  background: #fff8e8;
}

.ai-alert-watch .ai-alert-tag {
  background: #c46b00;
  color: #fff;
}

.ai-alert-high {
  border-color: #c1121f;
  background: #ffe8e8;
}

.ai-alert-high .ai-alert-tag {
  background: #c1121f;
  color: #fff;
}

.ai-alert-typhoon-high,
.ai-alert-item.ai-alert-typhoon-high,
.alert-block .ai-alert-item.ai-alert-typhoon-high {
  border-color: #d4c2e8;
  background: #f7f3fb;
  color: #4a148c;
}

.ai-alert-typhoon-high .ai-alert-tag,
.ai-alert-item.ai-alert-typhoon-high .ai-alert-tag {
  background: #7b1fa2;
  color: #fff;
}

.ai-alert-typhoon-high .ai-alert-body,
.ai-alert-item.ai-alert-typhoon-high .ai-alert-body {
  color: #4a148c;
}

.ai-alert-air {
  border-color: #2a9d8f;
  background: #e8f7f5;
}

.ai-alert-air .ai-alert-tag {
  background: #2a9d8f;
  color: #fff;
}

.ai-alert-closure {
  border-color: #5c4d7a;
  background: #f3eef8;
}

.ai-alert-closure .ai-alert-tag {
  background: #5c4d7a;
  color: #fff;
}

.ai-alert-closure-stop,
.ai-alert-item.ai-alert-closure-stop,
.alert-block .ai-alert-item.ai-alert-closure-stop {
  border-color: #7f1d1d;
  background: #b71c1c;
  color: #fff;
}

.ai-alert-closure-stop .ai-alert-tag,
.ai-alert-item.ai-alert-closure-stop .ai-alert-tag {
  background: #7f1010;
  color: #fff;
}

.ai-alert-closure-stop .ai-alert-body,
.ai-alert-item.ai-alert-closure-stop .ai-alert-body {
  color: #fff;
}

.ai-alert-flood-1 {
  border-color: #c9a227;
  background: #fff8df;
}

.ai-alert-flood-1 .ai-alert-tag {
  background: #ffd166;
  color: #4a3b00;
}

.ai-alert-flood-2 {
  border-color: #d4a017;
  background: #fff4d6;
}

.ai-alert-flood-2 .ai-alert-tag {
  background: #ffba08;
  color: #4a3b00;
}

.ai-alert-flood-3 {
  border-color: #e85d04;
  background: #ffe8d6;
}

.ai-alert-flood-3 .ai-alert-tag {
  background: #e85d04;
  color: #fff;
}

.ai-alert-flood-4 {
  border-color: #d00000;
  background: #ffe0e0;
}

.ai-alert-flood-4 .ai-alert-tag {
  background: #d00000;
  color: #fff;
}

.ai-alert-neutral {
  border-color: #8a97b3;
  background: #f4f6fb;
}

.ai-alert-neutral .ai-alert-tag {
  background: #5a6787;
  color: #fff;
}

.subscription-form {
  display: grid;
  gap: 8px;
}

.subscription-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.subscription-actions .refresh-btn,
.subscription-actions .ghost-btn {
  min-height: 40px;
}

.subscription-form input[type="email"] {
  border: 2px solid var(--input-accent);
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  background: #fffef8;
}

.topic-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #111;
  min-width: 0;
  width: 100%;
  overflow: visible;
}

.topic-option input {
  flex: 0 0 auto;
  width: 1.2em;
  height: 1.2em;
  margin-top: 0.22em;
  accent-color: var(--primary, #c2a36b);
}

.topic-option-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow: visible;
  line-height: 1.45;
  font-size: clamp(1rem, 3.5vw, 1.18rem);
  font-weight: 700;
  color: #111;
}

.closure-group {
  display: grid;
  gap: 3px;
}

.closure-group-label {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.closure-group.closure-stop .closure-group-label {
  color: #b71c1c;
}

.closure-group.closure-normal .closure-group-label {
  color: #7dd8ff;
}

.closure-item {
  border-radius: 6px;
  padding: 6px 10px;
}

.closure-item h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.closure-item p {
  margin: 0;
  line-height: 1.3;
  font-size: 20px;
}

.closure-item.closure-stop {
  background: #b71c1c;
  border: 1px solid #7f1d1d;
}

.closure-item.closure-stop h3,
.closure-item.closure-stop p {
  color: #fff;
}

.closure-item .closure-date {
  font-weight: 800;
  letter-spacing: 0.01em;
}

.closure-item.closure-normal {
  background: #4fc3f7;
  border: 2px solid #29b6f6;
  box-shadow: 0 0 0 1px rgba(3, 155, 229, 0.35);
}

.closure-item.closure-normal h3,
.closure-item.closure-normal p {
  color: #04325c;
}

.legend-swatch.city-focus-swatch {
  background: #e11d48;
  border-color: #fff1f2;
}

.leaflet-div-icon.map-focus-pulse,
.leaflet-div-icon.eq-map-pulse,
.leaflet-div-icon.map-focus-range-label,
.leaflet-div-icon.map-closure-marker {
  background: transparent;
  border: 0;
  overflow: visible !important;
}

.map-closure-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -100%);
  pointer-events: auto;
}

.map-closure-card {
  display: grid;
  gap: 1px;
  min-width: 86px;
  max-width: 150px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #b71c1c;
  color: #fff;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(20, 8, 8, 0.4);
  border: 1px solid #7f1d1d;
}

.map-closure-card strong {
  font-size: 13px;
  font-weight: 800;
}

.map-closure-card span {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.map-focus-range-label-text {
  display: inline-block;
  transform: translate(-50%, -100%);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #00d4ff;
  background: rgba(8, 18, 28, 0.86);
  color: #e0f7ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.map-focus-pulse-dot {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e11d48;
  border: 2px solid #fff1f2;
  box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.5);
  animation: map-focus-pulse 1.6s ease-out infinite;
}

.map-focus-pulse-dot::before,
.map-focus-pulse-dot::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(225, 29, 72, 0.55);
  animation: map-focus-ring 1.8s ease-out infinite;
}

.map-focus-pulse-dot::after {
  animation-delay: 0.9s;
}

@keyframes map-focus-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.45);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(225, 29, 72, 0);
  }
}

@keyframes map-focus-ring {
  0% {
    transform: scale(0.72);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.eq-map-pulse-dot {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffe600;
  border: 2px solid #fffde8;
  box-shadow: 0 0 0 0 rgba(255, 230, 0, 0.55);
  animation: eq-map-pulse 1.6s ease-out infinite;
}

.eq-map-pulse-dot.is-latest {
  background: #d946ef;
  border-color: #f5d0fe;
  box-shadow: 0 0 0 0 rgba(217, 70, 239, 0.55);
  animation-name: eq-map-pulse-latest;
}

.eq-map-pulse-dot::before,
.eq-map-pulse-dot::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 230, 0, 0.7);
  animation: eq-map-ring 1.8s ease-out infinite;
}

.eq-map-pulse-dot.is-latest::before,
.eq-map-pulse-dot.is-latest::after {
  border-color: rgba(217, 70, 239, 0.7);
  animation-name: eq-map-ring-latest;
}

.eq-map-pulse-dot::after {
  animation-delay: 0.9s;
}

@keyframes eq-map-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 230, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(255, 230, 0, 0);
  }
}

@keyframes eq-map-pulse-latest {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(217, 70, 239, 0.5);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(217, 70, 239, 0);
  }
}

@keyframes eq-map-ring {
  0% {
    transform: scale(0.72);
    opacity: 0.75;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

@keyframes eq-map-ring-latest {
  0% {
    transform: scale(0.72);
    opacity: 0.75;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-focus-pulse-dot {
    animation: none;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.35);
  }

  .map-focus-pulse-dot::before,
  .map-focus-pulse-dot::after {
    animation: none;
    opacity: 0.32;
    transform: scale(1.08);
  }

  .eq-map-pulse-dot {
    animation: none;
    box-shadow: 0 0 0 3px rgba(255, 230, 0, 0.45);
  }

  .eq-map-pulse-dot.is-latest {
    box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.45);
  }

  .eq-map-pulse-dot::before,
  .eq-map-pulse-dot::after {
    animation: none;
    opacity: 0.4;
    transform: scale(1.08);
  }
}

.leaflet-focus-circle,
.leaflet-focus-circle-halo {
  --focus-ring-width: 6px;
  --focus-halo-width: 0.5mm;
}

.leaflet-focus-circle {
  stroke: #7af6ff;
  stroke-width: var(--focus-ring-width);
  fill: rgba(0, 212, 255, 0.22);
}

.leaflet-focus-circle-halo {
  stroke: #ffffff;
  stroke-width: calc(var(--focus-ring-width) + (2 * var(--focus-halo-width)));
  fill: none;
}

.status-ok {
  color: var(--ok);
}

.status-warn {
  color: var(--warn);
}

@media (max-width: 860px) {
  .app {
    --field-col-width: min(94%, 32rem);
    width: 100%;
    max-width: 100%;
    margin: 0 auto 24px;
    gap: 8px;
    padding: 8px max(8px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left, 0px));
    overflow-x: hidden;
  }

  .app > * {
    min-width: 0;
    max-width: 100%;
  }

  .app .closure-list.is-empty,
  .app .closure-list.is-empty .closure-empty-msg {
    width: 100%;
    max-width: 100%;
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 10px;
    padding: 14px 4px 12px;
    border-radius: 12px;
  }

  .hero .eyebrow {
    font-size: var(--hero-heading-size, clamp(1.5rem, 5.4vw, 2.5rem));
    margin-bottom: 6px;
    width: 100%;
    max-width: 100%;
    white-space: nowrap;
    overflow: visible;
    letter-spacing: 0.08em;
    text-align: center;
  }

  .hero h1 {
    margin-bottom: 6px;
    font-size: var(--hero-title-size, clamp(2.1rem, 7.6vw, 3.5rem));
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    letter-spacing: 0;
    line-height: 1.18;
    width: 100%;
    max-width: 100%;
    word-break: keep-all;
    overflow-wrap: normal;
    line-break: strict;
    text-align: center;
  }

  .hero .subtitle {
    opacity: 0.95;
  }

  .controls > .refresh-btn {
    width: 50%;
    max-width: 50%;
    padding: 11px 12px;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 800;
  }

  .card {
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(31, 69, 142, 0.06);
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: inline;
  }

  .text-full {
    display: none;
  }

  .text-short {
    display: inline;
  }

  .refresh-btn,
  .ghost-btn {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 14px;
  }

  .locate-btn {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0 10px;
    font-size: clamp(15px, 3.8vw, 18px);
  }

  .locate-wrap .locate-btn {
    width: 56%;
    max-width: 56%;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0 10px;
    white-space: nowrap;
    overflow: visible;
    flex-wrap: nowrap;
    font-size: clamp(15px, 3.8vw, 18px);
  }

  .locate-btn .locate-icon svg {
    width: 18px;
    height: 18px;
  }

  .locate-btn-label {
    white-space: nowrap;
    font-size: clamp(15px, 3.8vw, 18px);
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }

  .city-camera-controls,
  .freeway-camera-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .region-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .region-grid .locate-wrap {
    grid-column: 1 / -1;
  }

  .locate-label {
    display: none;
  }

  .weather-metrics,
  .air-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .metrics div {
    padding: 8px;
  }

  .metrics dt {
    font-size: 14px;
  }

  .metrics dd {
    margin: 4px 0 0;
    font-size: 30px;
  }

  .big-text {
    margin: 4px 0 8px;
    font-size: clamp(20px, 5.5vw, 28px);
    line-height: 1.25;
  }

  .weather-block .big-text {
    font-size: 16px;
  }

  .weather-block .air-inline-summary,
  .weather-block .air-details > summary,
  .air-inline-summary,
  .air-details > summary {
    font-size: 22px;
  }

  .weather-block .metrics dt,
  .msn-weather-card .metrics dt {
    font-size: clamp(16px, 4.6vw, 19px);
    font-weight: 800;
  }

  .weather-block .metrics dd,
  .msn-weather-card .metrics dd {
    font-size: clamp(22px, 5.8vw, 28px);
  }

  .weather-block .weather-metrics dt,
  .msn-weather-card .weather-metrics dt {
    font-size: clamp(17px, 4.6vw, 20px);
  }

  .weather-block .weather-metrics dd,
  .msn-weather-card .weather-metrics dd {
    font-size: clamp(18px, 5vw, 23px);
  }

  .timestamp {
    font-size: 12px;
    line-height: 1.3;
  }

  .auto-refresh-row {
    flex-direction: row;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 6px;
    overflow: hidden;
  }

  .auto-refresh-controls {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .auto-refresh-controls label {
    font-size: 13px;
    flex: 0 0 auto;
    letter-spacing: 0;
  }

  .auto-refresh-controls select,
  .auto-refresh-countdown {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    max-width: none;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding: 6px 8px;
    font-size: 13px;
    line-height: 1.2;
    border-width: 2px;
    border-radius: 10px;
  }

  .auto-refresh-controls select,
  .auto-refresh-controls select option {
    font-size: 14px;
    font-weight: 700;
  }

  .closure-list {
    max-height: none;
    gap: 4px;
    margin-top: 4px;
    padding-bottom: 20px;
  }

  .closure-card {
    padding-bottom: 20px;
  }

  .closure-list.is-empty .closure-empty-msg,
  .closure-list.is-empty > .status-ok {
    margin: 6px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    overflow: visible;
    line-height: 1.2;
    font-size: clamp(1.82rem, 7.3vw, 2.48rem);
    font-weight: 700;
  }

  .closure-item {
    padding: 5px 8px;
  }

  .closure-item h3 {
    font-size: 20px;
  }

  .closure-item p {
    font-size: 18px;
    line-height: 1.25;
  }

  .closure-group-label {
    font-size: 17px;
  }

  .section-head {
    flex-wrap: wrap;
    gap: 4px;
  }

  .card-section-title h2 {
    font-size: 14px;
    line-height: 1.4;
  }

  .card-section-title h2 a {
    font-size: 0.85em;
    white-space: normal;
  }

  .section-head a {
    font-size: 12px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .typhoon-layout {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .analysis-list {
    font-size: 13px;
    line-height: 1.35;
    padding-left: 16px;
  }

  .ai-alert-card .analysis-list {
    padding-left: 0;
    gap: 8px;
  }

  .ai-alert-item {
    padding: 10px 12px;
    font-size: 12px;
  }

  .ai-alert-item.ai-alert-top {
    font-size: 12px;
  }

  .ai-alert-item.ai-alert-top .ai-alert-body,
  .ai-alert-body {
    font-size: 16px;
  }

  .alert-block .ai-alert-item .ai-alert-tag,
  .alert-block .ai-alert-item.ai-alert-top .ai-alert-tag,
  .ai-alert-item .ai-alert-tag,
  .ai-alert-item.ai-alert-top .ai-alert-tag {
    font-size: 16px;
  }

  .alert-block .topic-option,
  .alert-block .topic-option-text {
    font-size: clamp(0.95rem, 3.6vw, 1.1rem);
  }

  .alert-block .ai-alert-item {
    font-size: 12px;
  }

  .alert-block .ai-alert-body {
    font-size: 16px;
  }

  .alert-block .subscription-status-box,
  .subscription-status-box.timestamp {
    font-size: 12px;
  }

  .alert-block .subscription-email-note,
  .alert-block .notification-hint,
  .subscription-email-note.timestamp,
  .notification-hint.timestamp {
    font-size: 11px;
  }

  .in-page-alert-subscribe-tip .in-page-alert-title,
  .in-page-alert-readable-tip .in-page-alert-title {
    font-size: clamp(22px, 5.5vw, 28px);
    white-space: normal;
    overflow: visible;
  }

  .in-page-alert-subscribe-tip .in-page-alert-line,
  .in-page-alert-readable-tip .in-page-alert-line {
    font-size: clamp(18px, 4.5vw, 22px);
    line-height: 1.45;
    white-space: normal;
    overflow: visible;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .in-page-alert-not-open .in-page-alert-title {
    font-size: clamp(24px, 6.5vw, 32px);
  }

  .in-page-alert-not-open .in-page-alert-line {
    font-size: clamp(20px, 5.5vw, 26px);
    line-height: 1.55;
    font-weight: 600;
  }

  .in-page-alert-host {
    left: 50%;
    top: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -50%);
    width: 92vw;
    max-width: 92vw;
    height: 92dvh;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 2400;
    pointer-events: none;
  }

  .in-page-alert-host.is-fullscreen-mode {
    width: 95vw;
    max-width: 95vw;
    height: 95dvh;
    max-height: 95dvh;
    z-index: 2400;
  }

  .in-page-alert-host:has(.in-page-alert-subscription),
  .in-page-alert-host.is-fullscreen-mode:has(.in-page-alert-subscription) {
    top: 50%;
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: min(94vw, 560px);
    max-width: min(94vw, 560px);
    height: auto;
    max-height: min(86dvh, 820px);
    z-index: 2600;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription {
    height: auto;
    max-height: min(86dvh, 820px);
  }

  .in-page-alert-host.is-fullscreen-mode:has(.in-page-alert-refresh-done) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95vw;
    max-width: 95vw;
    height: 95dvh;
    max-height: 95dvh;
    z-index: 2600;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done {
    overflow: hidden;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done .in-page-alert-title {
    font-size: clamp(18px, 8vw, 52px);
    white-space: nowrap !important;
    overflow: hidden !important;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done .in-page-alert-body {
    overflow: hidden !important;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done .in-page-alert-line {
    font-size: clamp(11px, 4.6vw, 28px);
    line-height: 1.35;
    font-weight: 700;
    white-space: normal;
    overflow: hidden;
  }

  .in-page-alert-host:empty {
    display: none;
  }

  .in-page-alert {
    pointer-events: auto;
    width: 100%;
    height: 100%;
    max-height: 92dvh;
    margin: 0;
    box-sizing: border-box;
    border-radius: 16px;
    border: 1px solid #9eb6e8;
    padding: 18px 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 40px rgba(15, 22, 34, 0.28);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-fullscreen {
    max-height: 95dvh;
  }

  .in-page-alert strong,
  .in-page-alert-title {
    font-size: clamp(18px, 5vw, 24px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-title {
    white-space: normal !important;
    overflow: visible !important;
    font-size: clamp(20px, 5vw, 26px);
    line-height: 1.25;
  }

  .in-page-alert-body {
    flex: 1 1 auto;
    align-content: start;
    overflow: hidden;
    gap: 8px;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-body {
    overflow: auto !important;
    min-height: 0;
  }

  .in-page-alert p,
  .in-page-alert-line {
    overflow: hidden;
    font-size: clamp(14px, 4vw, 18px);
    line-height: 1.2;
    white-space: nowrap;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-line {
    white-space: normal !important;
    overflow: visible !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: clamp(16px, 4.2vw, 22px);
    line-height: 1.45;
    font-weight: 700;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-locate-done {
    border: 3px solid #5a6478;
    box-shadow:
      0 0 0 2px #8b93a3,
      0 16px 40px rgba(15, 22, 34, 0.28);
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-locate-done .in-page-alert-title {
    font-size: clamp(32px, 8.5vw, 48px);
    font-weight: 400;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-locate-done .in-page-alert-line {
    font-size: clamp(26px, 7vw, 40px);
    font-weight: 400;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-close {
    min-height: 56px;
    font-size: clamp(18px, 4.5vw, 22px);
  }

  .in-page-alert-close {
    width: 100%;
    min-height: 48px;
    margin-top: auto;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 800;
  }

  .risk-badge {
    font-size: clamp(20px, 5.8vw, 38px);
    padding: 12px 14px;
    margin-bottom: 6px;
    width: 100%;
  }

  .map-layout {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 8px;
  }

  .map-pane,
  .warning-map {
    --fluid-map-height: min(62dvh, 520px);
    min-height: var(--fluid-map-height);
    height: var(--fluid-map-height);
  }

  .map-card-live .warning-map,
  .map-card-live .map-pane {
    --fluid-map-height: min(70dvh, 680px);
    min-height: var(--fluid-map-height);
    height: var(--fluid-map-height);
  }

  .map-card-responsive .layer-panel .timestamp,
  .map-card-responsive .flood-layer-meta-mobile-hide {
    display: none;
  }

  .map-card-responsive .map-legend-below {
    font-size: 12px;
    padding: 8px;
  }

  .map-card-responsive .map-legend-below .legend-item-btn {
    min-height: 28px;
    padding: 3px 6px;
  }

  .earthquake-links {
    display: none !important;
  }

  .earthquake-list li.earthquake-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .eq-popup-links,
  .eq-popup-areas,
  .eq-detail-sheet-body .eq-popup-links,
  .eq-detail-sheet-body .eq-popup-areas {
    display: none !important;
  }

  .eq-popup-report {
    font-size: var(--fluid-small);
    padding: 6px;
  }

  .layer-panel {
    min-height: 0;
    max-height: none;
    padding: 6px;
    overflow: visible;
  }

  .windy-wrap-large {
    width: min(100%, 520px);
    max-width: 520px;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 1 / 1;
  }

  .windy-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
  }

  .camera-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .camera-body h3 {
    font-size: 13px;
  }

  .camera-body p {
    font-size: 12px;
  }

  .subscription-form {
    gap: 6px;
  }

  .topic-option {
    font-size: clamp(0.95rem, 3.6vw, 1.1rem);
  }

  .weekly-forecast-details > summary {
    font-size: clamp(22px, 5.8vw, 28px);
    padding: 6px 0;
    justify-items: center;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
  }

  .weekly-forecast-row {
    --weekly-date-col: 3.1em;
    --weekly-weekday-col: 2.5em;
    --weekly-status-col: 4em;
    column-gap: 6px;
    padding: 8px 18px 8px 8px;
  }

  .weekly-forecast-icon {
    width: 40px;
    height: 40px;
  }

  .weekly-forecast-icon svg,
  .weekly-forecast-icon-img {
    width: 38px;
    height: 38px;
  }

  .weekly-forecast-date,
  .weekly-forecast-weekday {
    font-size: clamp(15px, 4vw, 18px);
  }

  .weekly-forecast-label {
    font-size: clamp(11px, 3.1vw, 14px);
  }

  .weekly-forecast-temps {
    font-size: clamp(16px, 4.2vw, 20px);
  }

  .weekly-forecast-rain {
    font-size: clamp(13px, 3.4vw, 15px);
    line-height: 1;
    white-space: nowrap;
  }

  .notice-card ul {
    margin: 6px 0 0 16px;
    font-size: 10px;
    line-height: 1.35;
  }

  .visual-break.section-title-bar {
    padding: 8px 12px;
    min-height: 46px;
    border-radius: 10px;
  }

  .visual-break-caption {
    font-size: clamp(1.65rem, 6.6vw, 2.25rem);
    line-height: 1.15;
  }

  .visual-break-caption a {
    font-size: 0.38em;
    white-space: normal;
  }

  select,
  .camera-controls input,
  .subscription-form input[type="email"] {
    font-size: 16px; /* avoid iOS zoom */
    padding: 8px;
  }

  .card,
  .hero,
  .section-head,
  .camera-item,
  .closure-item {
    max-width: 100%;
  }

  .hero h1 {
    max-width: 100%;
    overflow-wrap: normal;
    word-break: keep-all;
    line-break: strict;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: var(--hero-title-size, clamp(2.1rem, 7.6vw, 3.5rem));
    text-align: center;
  }

  .hero-fit-text {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero .eyebrow.hero-fit-text {
    overflow-wrap: normal;
    word-break: keep-all;
  }
}

@media (max-width: 480px) {
  .app {
    padding: 6px 8px calc(14px + env(safe-area-inset-bottom));
    gap: 8px;
    width: 100%;
    max-width: 100%;
  }

  h1:not(.hero-fit-text) {
    font-size: clamp(0.95rem, 4.8vw, 1.05rem);
  }

  .windy-wrap-large {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 1 / 1;
  }

  .windy-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
  }

  .region-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .region-grid .locate-wrap {
    grid-column: 1 / -1;
  }

  .weather-metrics,
  .air-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-pane,
  .warning-map,
  .typhoon-wind-map {
    --fluid-map-height: min(55dvh, 440px);
    min-height: var(--fluid-map-height);
    height: var(--fluid-map-height);
  }

  .map-card-live .warning-map,
  .map-card-live .map-pane {
    --fluid-map-height: min(64dvh, 560px);
    min-height: var(--fluid-map-height);
    height: var(--fluid-map-height);
  }

  .closure-list {
    max-height: none;
    padding-bottom: 18px;
  }

  .closure-card {
    padding-bottom: 18px;
  }

  .metrics dd {
    font-size: clamp(22px, 7vw, 28px);
  }

  .weather-block .weather-metrics dt,
  .msn-weather-card .weather-metrics dt {
    font-size: clamp(16px, 4.4vw, 19px);
  }

  .weather-block .weather-metrics dd,
  .msn-weather-card .weather-metrics dd {
    font-size: clamp(17px, 5.2vw, 21px);
  }

  .big-text {
    font-size: clamp(22px, 7vw, 28px);
  }

  .visual-break-caption {
    font-size: clamp(1.25rem, 6.2vw, 1.95rem);
  }

  .closure-list.is-empty .closure-empty-msg,
  .closure-list.is-empty > .status-ok {
    font-size: clamp(1.38rem, 6.8vw, 2.15rem);
  }

  .card-section-title h2 {
    font-size: 13px;
  }

  .camera-item img,
  .camera-frame,
  .camera-fallback {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 360px) {
  .app {
    padding: 4px 6px calc(12px + env(safe-area-inset-bottom));
    gap: 6px;
  }

  .card {
    padding: 8px;
  }

  .metrics dd {
    font-size: 20px;
  }

  .weather-block .weather-metrics dt,
  .msn-weather-card .weather-metrics dt {
    font-size: 16px;
  }

  .weather-block .weather-metrics dd,
  .msn-weather-card .weather-metrics dd {
    font-size: 17px;
  }

  .risk-badge {
    font-size: clamp(18px, 5.4vw, 34px);
    padding: 10px 12px;
    width: 100%;
  }

  .auto-refresh-controls label,
  .timestamp,
  .camera-body p {
    font-size: 12px;
  }

  .auto-refresh-row {
    gap: 5px;
  }

  .auto-refresh-controls {
    gap: 5px;
  }

  .auto-refresh-controls label {
    font-size: 12px;
  }

  .auto-refresh-controls select,
  .auto-refresh-countdown {
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    padding: 5px 6px;
    font-size: 12px;
    max-width: none;
  }

  .auto-refresh-controls select,
  .auto-refresh-controls select option {
    font-size: 13px;
    font-weight: 700;
  }

  .map-pane,
  .warning-map,
  .typhoon-wind-map {
    --fluid-map-height: min(50dvh, 400px);
    min-height: var(--fluid-map-height);
    height: var(--fluid-map-height);
  }
}

/* =========================================================
   YEAR 2700 · CYBERPUNK THEME OVERRIDES
   ========================================================= */

.theme-cyberpunk-2700 {
  color-scheme: dark;
}

.theme-cyberpunk-2700 h2,
.theme-cyberpunk-2700 .card-section-title h2 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  color: var(--text);
}

.theme-cyberpunk-2700 select,
.theme-cyberpunk-2700 input[type="text"],
.theme-cyberpunk-2700 input[type="email"] {
  background: rgba(4, 10, 22, 0.92) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-ui);
  font-weight: 600;
  box-shadow: inset 0 0 12px rgba(0, 245, 255, 0.06);
}

.theme-cyberpunk-2700 select:focus,
.theme-cyberpunk-2700 input[type="text"]:focus,
.theme-cyberpunk-2700 input[type="email"]:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(0, 245, 255, 0.25), var(--glow-cyan);
}

.theme-cyberpunk-2700 .timestamp,
.theme-cyberpunk-2700 .auto-refresh-countdown,
.theme-cyberpunk-2700 .locate-status {
  color: var(--primary) !important;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.theme-cyberpunk-2700 .locate-status-error {
  color: var(--accent) !important;
}

.theme-cyberpunk-2700 .locate-btn,
.theme-cyberpunk-2700 .locate-btn.locate-btn-pulse {
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.25), rgba(0, 245, 255, 0.2)) !important;
  border: 1px solid var(--ok) !important;
  color: #e8ffe8 !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-ui);
  letter-spacing: 0.06em;
  box-shadow: 0 0 16px rgba(57, 255, 20, 0.35) !important;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.theme-cyberpunk-2700 .locate-btn-pulse {
  animation: cyberLocateGlow 1.8s ease-in-out infinite !important;
}

@keyframes cyberLocateGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.35), 0 0 0 0 rgba(0, 245, 255, 0.35);
  }
  50% {
    box-shadow: 0 0 22px rgba(57, 255, 20, 0.55), 0 0 0 8px rgba(0, 245, 255, 0);
  }
}

.theme-cyberpunk-2700 .ghost-btn,
.theme-cyberpunk-2700 .windy-locate-btn,
.theme-cyberpunk-2700 button:not(.legend-item-btn):not(.map-alert-badge):not(.map-live-count-btn) {
  font-family: var(--font-ui);
}

.theme-cyberpunk-2700 .ghost-btn {
  background: rgba(0, 245, 255, 0.08) !important;
  color: var(--primary) !important;
  border: 1px solid var(--border) !important;
}

.theme-cyberpunk-2700 .layer-panel {
  background: rgba(6, 12, 26, 0.92) !important;
  border: 1px solid var(--border) !important;
  color: var(--text);
}

.theme-cyberpunk-2700 .map-legend h4,
.theme-cyberpunk-2700 .legend-label {
  color: var(--text) !important;
  font-family: var(--font-ui);
}

.theme-cyberpunk-2700 .legend-count {
  color: var(--primary) !important;
}

.theme-cyberpunk-2700 .legend-item-btn {
  background: transparent;
  color: var(--text);
}

.theme-cyberpunk-2700 .legend-item-btn:hover,
.theme-cyberpunk-2700 .legend-item-btn:focus-visible {
  background: rgba(0, 245, 255, 0.1) !important;
}

.theme-cyberpunk-2700 .risk-low {
  background: rgba(57, 255, 20, 0.12) !important;
  color: var(--ok) !important;
  border: 1px solid rgba(57, 255, 20, 0.45);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.2);
}

.theme-cyberpunk-2700 .risk-medium {
  background: rgba(255, 196, 0, 0.12) !important;
  color: #ffc400 !important;
  border: 1px solid rgba(255, 196, 0, 0.45);
}

.theme-cyberpunk-2700 .risk-high {
  background: rgba(255, 45, 149, 0.14) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(255, 45, 149, 0.5);
  box-shadow: var(--glow-magenta);
}

.theme-cyberpunk-2700 .ai-alert-item,
.theme-cyberpunk-2700 .closure-list,
.theme-cyberpunk-2700 .analysis-list li {
  color: var(--text);
}

.theme-cyberpunk-2700 .ai-alert-item {
  background: rgba(8, 16, 36, 0.9) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

.theme-cyberpunk-2700 .ai-alert-item.ai-alert-typhoon-high {
  background: #f7f3fb !important;
  border-color: #d4c2e8 !important;
  color: #4a148c !important;
}

.theme-cyberpunk-2700 .ai-alert-item.ai-alert-closure-stop {
  background: #b71c1c !important;
  border-color: #7f1d1d !important;
  color: #fff !important;
}

.theme-cyberpunk-2700 .metrics div,
.theme-cyberpunk-2700 .msn-weather-card .metrics div {
  background: rgba(4, 12, 28, 0.85) !important;
  border: 1px solid rgba(0, 245, 255, 0.18);
  border-radius: var(--radius-sm);
}

.theme-cyberpunk-2700 .metrics dt,
.theme-cyberpunk-2700 .msn-weather-card .metrics dt {
  color: var(--muted) !important;
}

.theme-cyberpunk-2700 .metrics dd,
.theme-cyberpunk-2700 .msn-weather-card .metrics dd,
.theme-cyberpunk-2700 .weather-temp-main,
.theme-cyberpunk-2700 .weather-place,
.theme-cyberpunk-2700 .weather-condition,
.theme-cyberpunk-2700 .weather-feel-line {
  color: var(--text) !important;
}

.theme-cyberpunk-2700 .msn-weather-card {
  background:
    linear-gradient(160deg, rgba(0, 245, 255, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(6, 16, 36, 0.92), rgba(3, 8, 18, 0.95)) !important;
  border: 1px solid var(--msn-glass-border) !important;
  color: var(--msn-text) !important;
}

.theme-cyberpunk-2700 .msn-weather-card .weather-subheading,
.theme-cyberpunk-2700 .msn-weather-card .timestamp,
.theme-cyberpunk-2700 .msn-weather-card .air-inline-summary,
.theme-cyberpunk-2700 .msn-weather-card .rain-row span,
.theme-cyberpunk-2700 .msn-weather-card .rain-row strong {
  color: var(--msn-muted) !important;
}

.theme-cyberpunk-2700 .earthquake-summary {
  color: #ff9ec8 !important;
  font-family: var(--font-ui);
}

.theme-cyberpunk-2700 .earthquake-summary.intensity-4-plus {
  background: rgba(255, 45, 149, 0.12) !important;
  border-color: var(--accent) !important;
  color: #ffd0e4 !important;
  box-shadow: var(--glow-magenta);
}

.theme-cyberpunk-2700 .earthquake-place-label {
  color: #ffb4d4 !important;
}

.theme-cyberpunk-2700 .air-inline,
.theme-cyberpunk-2700 .rain-forecast-inline,
.theme-cyberpunk-2700 .weekly-forecast-details {
  border-color: var(--border) !important;
  background: rgba(4, 10, 22, 0.45);
}

.theme-cyberpunk-2700 .weekly-forecast-details summary {
  color: var(--primary);
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.theme-cyberpunk-2700 .eq-detail-sheet-panel,
.theme-cyberpunk-2700 .eq-detail-sheet-toolbar {
  background: rgba(6, 12, 26, 0.96) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.theme-cyberpunk-2700 .map-pane-wrap,
.theme-cyberpunk-2700 .warning-map,
.theme-cyberpunk-2700 .map-pane {
  border: 1px solid var(--border);
  box-shadow: inset 0 0 30px rgba(0, 245, 255, 0.08);
}

.theme-cyberpunk-2700 .map-alert-badges {
  background: none;
  border: none;
}

.theme-cyberpunk-2700 .map-alert-badge {
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

.theme-cyberpunk-2700 .channel-talk-footer-btn {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(0, 245, 255, 0.28), rgba(0, 245, 255, 0.12));
  color: var(--primary);
  box-shadow: var(--glow-cyan, 0 0 16px rgba(0, 245, 255, 0.25));
}

.theme-cyberpunk-2700 .windy-wrap-large,
.theme-cyberpunk-2700 .windy-wrap {
  border: 1px solid var(--border);
  box-shadow: var(--glow-cyan);
}

.theme-cyberpunk-2700 .windy-locate-btn {
  background: rgba(0, 245, 255, 0.18) !important;
  border: 1px solid var(--primary) !important;
  color: var(--primary) !important;
}

.theme-cyberpunk-2700 a {
  color: var(--primary);
}

.theme-cyberpunk-2700 a:hover {
  color: var(--accent-2);
}

.theme-cyberpunk-2700 .status-warn {
  color: var(--accent) !important;
}

.theme-cyberpunk-2700 .closure-card,
.theme-cyberpunk-2700 .typhoon-card,
.theme-cyberpunk-2700 .earthquake-card,
.theme-cyberpunk-2700 .map-card,
.theme-cyberpunk-2700 .weather-block {
  background: var(--card);
}

.theme-cyberpunk-2700 .big-text {
  color: var(--text);
}

.theme-cyberpunk-2700 .freeway-link,
.theme-cyberpunk-2700 a.freeway-link {
  color: var(--freeway-link) !important;
}

/* Soft neon pulse on section bars */
.theme-cyberpunk-2700 .visual-break.section-title-bar {
  animation: visualKenBurns 22s ease-in-out infinite alternate, cyberTitleGlow 4.5s ease-in-out infinite alternate;
}

@keyframes cyberTitleGlow {
  from {
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.25);
  }
  to {
    box-shadow: 0 0 22px rgba(255, 45, 149, 0.35), 0 0 10px rgba(0, 245, 255, 0.35);
  }
}

/* Responsive cyberpunk tweaks */
@media (max-width: 820px) {
  .theme-cyberpunk-2700 .hero::before {
    top: 8px;
    right: 12px;
    font-size: 10px;
  }

  .theme-cyberpunk-2700 .controls > .refresh-btn,
  .theme-cyberpunk-2700 .locate-btn {
    width: min(88%, 320px);
    max-width: 88%;
  }

  .theme-cyberpunk-2700 .cyber-horizon {
    opacity: 0.35;
  }
}

@media (max-width: 560px) {
  .theme-cyberpunk-2700 .hero {
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    padding: 18px 14px;
  }

  .theme-cyberpunk-2700 .visual-break {
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  }

  .theme-cyberpunk-2700 .cyber-scanlines {
    opacity: 0.22;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-cyberpunk-2700 .cyber-grid,
  .theme-cyberpunk-2700 .cyber-horizon,
  .theme-cyberpunk-2700 .hero::after,
  .theme-cyberpunk-2700 .visual-break.section-title-bar,
  .theme-cyberpunk-2700 .locate-btn-pulse {
    animation: none !important;
  }
}

/* Legacy platform top navigation */
.legacy-top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: rgba(8, 14, 28, 0.72);
}

.legacy-top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--primary, #00f5ff);
  font-weight: 700;
  text-decoration: none;
}

.legacy-top-nav a[aria-current="page"] {
  background: rgba(0, 245, 255, 0.14);
  color: #fff;
}

.legacy-top-nav a:hover,
.legacy-top-nav a:focus-visible {
  background: rgba(0, 245, 255, 0.2);
  outline: none;
}

@media (max-width: 560px) {
  .legacy-top-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .legacy-top-nav a {
    width: 100%;
    justify-content: center;
  }
}

/* Desktop-only: floating message/notify boxes scale type with the window.
   First priority is seeing the full message — wrap and shrink, never clip. */
@media (min-width: 861px) {
  .in-page-alert-host {
    --notify-title: clamp(14px, 1.1vw + 1.1vmin, 28px);
    --notify-body: clamp(13px, 0.9vw + 0.9vmin, 22px);
    --notify-close: clamp(13px, 0.85vw + 0.75vmin, 20px);
    --notify-box-max: min(88dvh, 920px);
  }

  .in-page-alert-host,
  .in-page-alert-host.is-fullscreen-mode,
  .in-page-alert-host.is-fullscreen-mode:has(.in-page-alert-subscription),
  .in-page-alert-host.is-fullscreen-mode:has(.in-page-alert-refresh-done),
  .in-page-alert-host:has(.in-page-alert-subscription),
  .in-page-alert-host:has(.in-page-alert-refresh-done),
  .in-page-alert-host:has(.in-page-alert-readable-tip) {
    width: min(90vw, 720px);
    max-width: min(90vw, 720px);
    height: auto;
    max-height: var(--notify-box-max);
  }

  .in-page-alert,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-fullscreen,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done {
    height: auto;
    max-height: var(--notify-box-max);
    gap: clamp(6px, 0.7vw + 0.4vmin, 14px);
    padding: clamp(12px, 1.2vw + 0.5vmin, 24px);
    overflow: visible;
  }

  .in-page-alert-body,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-body,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-body,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done .in-page-alert-body {
    flex: 0 1 auto;
    min-height: 0;
    align-content: start;
    overflow: visible !important;
    gap: clamp(4px, 0.45vw + 0.25vmin, 10px);
  }

  .in-page-alert strong,
  .in-page-alert-title,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-title,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-title,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done .in-page-alert-title,
  .in-page-alert-subscribe-tip .in-page-alert-title,
  .in-page-alert-readable-tip .in-page-alert-title,
  .in-page-alert-not-open .in-page-alert-title,
  .in-page-alert-refresh-done .in-page-alert-title {
    font-size: var(--notify-title);
    line-height: 1.3;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset;
    word-break: break-word;
    overflow-wrap: anywhere;
    width: 100%;
    max-width: 100%;
  }

  .in-page-alert p,
  .in-page-alert-line,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-line,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-line,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-refresh-done .in-page-alert-line,
  .in-page-alert-subscribe-tip .in-page-alert-line,
  .in-page-alert-readable-tip .in-page-alert-line,
  .in-page-alert-not-open .in-page-alert-line,
  .in-page-alert-refresh-done .in-page-alert-line {
    font-size: var(--notify-body);
    line-height: 1.45;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset;
    word-break: break-word;
    overflow-wrap: anywhere;
    width: 100%;
    max-width: 100%;
  }

  .in-page-alert-close,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-close,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-close,
  .in-page-alert-readable-tip .in-page-alert-close {
    min-height: clamp(36px, 4.2vmin, 52px);
    margin-top: clamp(6px, 0.8vmin, 12px);
    padding: clamp(8px, 0.8vw, 14px) clamp(10px, 1vw, 16px);
    font-size: var(--notify-close);
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-locate-done .in-page-alert-title {
    font-size: clamp(16px, 1.4vw + 1.4vmin, 36px);
    font-weight: 400;
    white-space: normal !important;
    overflow: visible !important;
  }

  .in-page-alert-host.is-fullscreen-mode .in-page-alert-locate-done .in-page-alert-line {
    font-size: clamp(14px, 1.15vw + 1.15vmin, 28px);
    font-weight: 400;
    white-space: normal !important;
    overflow: visible !important;
  }

  .in-page-alert.is-notify-scroll,
  .in-page-alert-host.is-fullscreen-mode .in-page-alert-fullscreen.is-notify-scroll {
    overflow: auto;
  }
}

.in-page-alert-host.is-fullscreen-mode:has(.in-page-alert-subscription) {
  width: 95vw;
  max-width: 95vw;
  height: 95dvh;
  max-height: 95dvh;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription {
  height: 100%;
  max-height: 95dvh;
  overflow: hidden;
  gap: 8px;
  padding: 16px 18px;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-title {
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: hidden;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden !important;
  align-content: start;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-line {
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.in-page-alert-subscription .in-page-alert-line,
.in-page-alert-refresh-done .in-page-alert-line,
.in-page-alert-subscription .in-page-alert-line-status,
.in-page-alert-refresh-done .in-page-alert-line-status {
  color: #111;
}

.in-page-alert-subscription .in-page-alert-line-closure,
.in-page-alert-refresh-done .in-page-alert-line-closure {
  color: #b71c1c;
  font-weight: 800;
}

.in-page-alert-subscription .in-page-alert-line-change,
.in-page-alert-refresh-done .in-page-alert-line-change {
  color: #1d4ed8;
}

.in-page-alert-host.is-fullscreen-mode .in-page-alert-subscription .in-page-alert-close {
  flex: 0 0 auto;
}

/* Township weather module: centered heading and responsive card group (2026-10-22) */
.visual-break-weather .visual-break-caption {
  width: 100%;
  text-align: center;
}
.weather-block .weather-air-grid {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
}
