/* Shared palette and type, with the reference's distinct mobile and desktop surfaces. */
:root {
  --regional-blue: #091e97;
  --regional-paper: #f0f4ff;
  --regional-tint: #e8eefb;
  --regional-type: "Noto Sans Thai Looped", Tahoma, sans-serif;
  --regional-shadow: 0 4px 15px rgb(0 0 0 / 3%);
  --ink: #191919;
  --muted: #636776;
  --blue: var(--regional-blue);
  --deep: #001e62;
}
html body, body .mobile-dashboard, body .flood-forecast, body .md-bottom-nav, body dialog {
  font-family: var(--regional-type);
}
html body, body .mobile-dashboard, .mobile-dashboard .md-home, body .flood-forecast {
  background: var(--regional-paper) !important;
  color: var(--ink);
}
.mobile-dashboard .md-hero {
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  height: 64px;
  border-radius: 0;
}
.md-hero .md-brand, .md-hero .md-header-actions {
  position: static;
  width: auto;
  transform: none;
}
.md-hero .md-brand img { display: block; width: auto; height: 54px; filter: none; }
.md-hero .md-header-actions button { background: white; color: var(--regional-blue); box-shadow: none; }
.overview-links { display: none; }
.water-coverage, .md-home .md-search-panel, .md-home .md-map-key,
.md-home .md-reports, .ff-layout .ff-card, .sidebar .filter-block {
  background: white;
  border: 0;
  border-radius: 20px;
  box-shadow: var(--regional-shadow);
}
.water-coverage { margin: 20px; padding: 20px; }
.water-coverage h2 { display: inline-block; margin: 0; padding: 5px 13px; border-radius: 24px; background: var(--regional-tint); color: var(--regional-blue); font-size: 14px; }
.coverage-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-top: 18px; }
.coverage-row div { flex: 1; min-width: 0; }
.coverage-row p { margin: 0 0 8px; color: #53596a; font-size: 14px; }
.coverage-row strong { font-size: clamp(26px, 5vw, 44px); line-height: 1.15; white-space: nowrap; }
.coverage-row progress { width: 100%; height: 10px; border: 0; appearance: none; border-radius: 20px; overflow: hidden; background: var(--regional-tint); color: var(--regional-blue); }
.coverage-row progress::-webkit-progress-bar { background: var(--regional-tint); }
.coverage-row progress::-webkit-progress-value { background: var(--regional-blue); border-radius: inherit; }
.coverage-row progress::-moz-progress-bar { background: var(--regional-blue); }
.md-home .md-search-panel h1 { font-size: clamp(24px, 5vw, 42px); line-height: 1.25; color: var(--ink); }
.md-home .md-quick-places button, .md-home .md-resource-tabs button {
  color: var(--regional-blue); border: 1px solid var(--regional-blue); background: white; border-radius: 99px;
}
.md-home .md-quick-places .md-my-location, .md-home .md-resource-tabs button[aria-pressed=true],
body .primary, .fe-form .fe-submit, .ff-primary, .bottom-dock .chapter-tabs button[aria-selected=true] {
  background: var(--regional-blue); color: white; border-radius: 32px;
}
.md-home .md-shortcuts button { background: white; border: 0; border-radius: 20px; color: var(--regional-blue); box-shadow: var(--regional-shadow); }
.md-home .md-section-heading h2, .sidebar .sidebar-title h2, .chapter-heading h1, .fe-heading h1 { color: #191919; }
body .forecast-entry, body .flood-forecast { --fe-blue: var(--regional-blue); --fe-ink: #191919; --ff-blue: var(--regional-blue); --ff-ink: #191919; }
.forecast-entry .fe-hero, .ff-wrap .ff-intro, .app-shell .chapter-heading { background: linear-gradient(120deg,#e8eefb,#f4f3ff 65%,#ccbef3); }
.fe-heading h1 em, .forecast-entry .fe-kicker, .ff-wrap .ff-eyebrow { color: var(--regional-blue); }
body .md-real-toolbar, .app-shell .topbar, .app-shell .bottom-dock,
body .modal-heading, body .news-header { background: white; }
body .md-bottom-nav button[aria-current=page], .md-real-toolbar button[aria-pressed=true] { background: var(--regional-tint); color: var(--regional-blue); }
@media(max-width:680px) {
  .mobile-dashboard .md-home { margin-top: 0; }
  .md-home .md-search-panel, .md-home .md-map-key, .md-home .md-reports { margin-inline: 16px; }
  .md-home .md-search-panel { padding: 18px; }
  .md-home .md-shortcuts { margin: 16px; }
}
@media(min-width:681px) {
  :root {
    --regional-paper: #fffaf3;
    --regional-blue: #003399;
    --regional-type: "Anuphan", Tahoma, sans-serif;
    --regional-shadow: 0 10px 40px rgb(0 0 0 / 4%);
  }
  body .mobile-dashboard { max-width: 1440px; margin: auto; padding: 12px clamp(18px,5vw,80px) 32px; border: 0; border-radius: 0; box-shadow: none; }
  .mobile-dashboard .md-hero, .app-shell .topbar {
    border-radius: 100px; height: 88px; padding: 14px clamp(22px,3vw,48px); box-shadow: 0 8px 20px rgb(0 0 0 / 6%);
  }
  .md-hero .md-brand img { height: 68px; }
  .overview-links { display: flex; gap: clamp(12px,2.5vw,40px); margin-left: auto; margin-right: 24px; }
  .overview-links button { border: 0; background: transparent; color: #626779; font-size: 16px; }
  .overview-links button:hover, .overview-links [aria-current] { color: var(--regional-blue); font-weight: 700; }
  .water-coverage { margin: 28px 0 20px; padding: 24px 40px; border-radius: 24px; }
  .water-coverage h2 { color: white; background: #013afd; }
  .mobile-dashboard .md-home { padding: 0; margin: 0; }
  .md-home .dd-service-nav { background: white; border-radius: 32px; box-shadow: var(--regional-shadow); }
  .md-home .dd-service-nav button { color: var(--regional-blue); }
}

/* The artwork and its HTML buttons share one coordinate space, including in fullscreen. */
.md-home .md-overview {
  background: #e8f4ff;
  border: 1px solid #c4d9ed;
  border-radius: 24px;
}
.md-overview .md-illustrated-map {
  inset: 0 0 86px;
  background: url("dashboard/south-plane.svg?v=2") center / 100% 100% no-repeat;
}
.md-overview .md-map-label {
  color: #183776;
  background: #fff;
  border: 1px solid #9ab9df;
  border-radius: 12px;
  box-shadow: 0 2px 5px #23488124;
}
.md-overview .md-map-label:is(:hover,:focus-visible) { background: #edf3ff; outline: 2px solid #315bcd; }
.md-home .md-overview .md-province-panel {
  inset: auto 0 33px;
  width: auto;
  height: 53px;
  padding: 8px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  overflow: auto hidden;
  gap: 5px;
  border-radius: 0;
  border: 0;
  border-top: 1px solid #c5daee;
}
.md-province-panel > :is(h2,button) { flex: none; }
.md-overview .md-province-panel h2 { margin: 0 6px 0 0; }
.md-overview .md-province-panel > button { flex: none; padding: 5px 8px; }
.md-overview .md-sea { z-index: 2; color: #517aa3; text-shadow: none; pointer-events: none; }
.md-overview .md-gulf { right: 21%; top: 19%; }
.md-overview .md-andaman { left: 6%; bottom: 30%; }
.md-overview .md-map-disclaimer { bottom: 91px; left: 12px; color: #35577a; text-shadow: none; }
.md-overview .md-update { bottom: 5px; right: 10px; background: #193c78; max-width: 95%; }
.md-overview .md-compass { background: #244882; }
.md-home .md-overview .md-map-controls { top: 52px; right: 8px; }
@media(max-width:680px) {
  .md-home .md-overview:not(.md-expanded) { height: clamp(445px,113vw,590px); margin-inline: 8px; }
  .md-home .md-overview .md-map-controls { top: 10px; right: 9px; display: flex; gap: 0; padding: 3px; }
  .md-overview .md-map-controls button { min-width: 29px; padding: 3px; font-size: 9px; }
  .md-overview .md-map-controls svg { width: 15px; height: 15px; }
  .md-overview .md-compass { left: 10px; right: auto; }
}

.md-illustrated-map svg.md-province-fills {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.md-illustrated-map [data-risk] { --province-color: #91a5b5; }
.md-illustrated-map [data-risk="green"] { --province-color: #35d58f; }
.md-illustrated-map [data-risk="yellow"] { --province-color: #ffda37; }
.md-illustrated-map [data-risk="orange"] { --province-color: #ff8a25; }
.md-illustrated-map [data-risk="red"] { --province-color: #ff285b; }
.md-illustrated-map .md-map-label[data-risk] .md-risk-dot { background: var(--province-color); }
.md-province-fills [data-fill-province] {
  fill: var(--province-color);
  fill-opacity: .78;
  stroke: #f6fbff;
  stroke-width: 2;
  stroke-linejoin: round;
}

/* Space the home feed sections independently of the cards inside each carousel. */
@media (max-width: 680px) {
  .md-home > .md-alert-banner { margin-top: 20px; }
  .md-home > .md-reports { margin-top: 24px; padding-block: 18px; }
}
@media (min-width: 681px) {
  .md-home > .md-community-section { margin-top: 12px; }
}
