/* drone168map · build 2026-05-12 ====
   DroneMap.tw — Custom theme (teal #005555)
   ============================================ */

:root {
  --brand: #005555;
  --brand-hover: #007575;
  --brand-active: #003E3E;
  --brand-soft: rgba(0, 85, 85, 0.08);
  --brand-line: rgba(0, 85, 85, 0.18);
  --brand-bg: #E6F1F0;
  --sidebar-w: 280px;
}

/* ── Body palette ────────────────────────────────── */
body { background: #C5E0DE !important; }

/* ── Sidebar host ─────────────────────────────────── */
.dm-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--brand-line);
  box-shadow: 0 0 30px rgba(0, 85, 85, 0.08);
  z-index: 1100;
  display: flex; flex-direction: column;
  font-family: -apple-system, "Noto Sans TC", "PingFang TC", sans-serif;
  overflow-y: auto;
  overflow-x: hidden;
}
.dm-sidebar::-webkit-scrollbar { width: 6px; }
.dm-sidebar::-webkit-scrollbar-thumb { background: var(--brand-line); border-radius: 3px; }

/* Brand ────────── */
.dm-brand {
  padding: 22px 22px 18px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--brand-line);
}
.dm-brand .mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brand);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 17px;
  box-shadow: 0 4px 12px rgba(0, 85, 85, 0.25);
  letter-spacing: -0.02em;
}
.dm-brand .name {
  font-size: 16px; font-weight: 700;
  color: #1a3a3a;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.dm-brand .name small {
  display: block;
  font-size: 11px; font-weight: 500;
  color: #5a7a78;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

/* Nav ──────────── */
.dm-nav {
  padding: 12px 12px;
  display: flex; flex-direction: column; gap: 2px;
  border-bottom: 1px solid var(--brand-line);
}
.dm-nav .group-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5a7a78;
  padding: 8px 12px 4px;
  font-weight: 600;
}
.dm-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: #1a3a3a;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  font-family: inherit;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.dm-nav-item:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.dm-nav-item .icon {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--brand);
  flex-shrink: 0;
}
.dm-nav-item.active {
  background: var(--brand);
  color: #fff;
}
.dm-nav-item.active .icon { color: #fff; }
.dm-nav-item .badge {
  margin-left: auto;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.dm-nav-item.active .badge {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

/* Weather card embedded in sidebar */
.dm-weather {
  margin: 14px 14px 12px;
  padding: 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-active) 100%);
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 85, 85, 0.25);
}
.dm-weather .h {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.78;
  margin-bottom: 6px;
}
.dm-weather .h .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #B6FF7A;
  box-shadow: 0 0 8px #B6FF7A;
  animation: dm-blink 2s ease-in-out infinite;
}
@keyframes dm-blink { 50% { opacity: 0.45; } }
.dm-weather .main {
  display: flex; align-items: flex-end; gap: 10px;
  margin: 4px 0 10px;
}
.dm-weather .temp {
  font-size: 38px;
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.03em;
  font-family: "SF Pro Display", -apple-system, sans-serif;
}
.dm-weather .icon {
  font-size: 30px;
  line-height: 1;
  margin-left: auto;
  opacity: 0.95;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}
.dm-weather .desc {
  font-size: 12px;
  opacity: 0.88;
  margin-bottom: 10px;
}
.dm-weather .grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.18);
  font-size: 12px;
}
.dm-weather .grid .k { opacity: 0.72; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.dm-weather .grid .v { font-size: 13px; font-weight: 600; margin-top: 1px; }
.dm-weather .loading {
  text-align: center;
  padding: 16px 0;
  opacity: 0.7;
  font-size: 12px;
}

/* Footer */
.dm-foot {
  margin-top: auto;
  padding: 14px 22px;
  border-top: 1px solid var(--brand-line);
  font-size: 11px;
  color: #5a7a78;
  line-height: 1.6;
}
.dm-foot a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.dm-foot a:hover { color: var(--brand-hover); text-decoration: underline; }
.dm-foot .src {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
}
.dm-foot-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 500;
  color: #1a3a3a;
}
.dm-foot-row > span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 10px;
  color: #5a7a78;
}
.dm-signout-btn {
  background: transparent;
  border: 1px solid var(--brand-line);
  color: var(--brand);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s;
}
.dm-signout-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ── Push original UI to the right of sidebar ───── */
.search-bar { left: calc(var(--sidebar-w) + 20px) !important; width: calc(100vw - var(--sidebar-w) - 40px) !important; }
/* Push MapLibre controls below the (now taller, 2-row) layer-tags so they don't overlap */
.maplibregl-ctrl-top-left {
  left: calc(var(--sidebar-w) + 10px) !important;
  top: 180px !important;
}

/* ── Recolor existing components to teal ────────── */
/* Ant Design primary button (search submit) */
.ant-btn-primary {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
}
.ant-btn-primary:hover, .ant-btn-primary:focus {
  background: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
}
/* Links */
a { color: var(--brand) !important; }
a:hover { color: var(--brand-hover) !important; filter: none; }

/* Input focus accent */
.ant-input:focus, .ant-input-focused, .ant-select-focused .ant-select-selector {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 2px rgba(0, 85, 85, 0.12) !important;
}
/* Select on hover */
.ant-select:not(.ant-select-disabled):hover .ant-select-selector {
  border-color: var(--brand) !important;
}

/* zone-type blue swatch → teal */
.uav-zone-type.blue { background-color: var(--brand) !important; }

/* MapLibre compass red triangle keep, but compass background unchanged */

/* GPS dot stays blue or shift to teal */
.gps-dot {
  background: #4DBFBF !important;
  box-shadow: 0 0 0 2px #fff, 0 0 10px rgba(0,0,0,0.4);
}
@keyframes gps-dot {
  50% {
    background: #2E9E9E;
    box-shadow: 0 0 0 2px #fff, 0 0 10px rgba(0,0,0,0.4);
  }
}

/* Hide the original weather-card inside bottom sheet — we have our own */
.weather-card { display: none !important; }

/* ============================================
   AUTH GATE (full screen)
   ============================================ */
.dm-gate {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #C5E0DE 0%, #E0F2F1 50%, #B5D8D6 100%);
  z-index: 99999;
  display: grid; place-items: center;
  padding: 20px;
  animation: dm-fade 0.25s ease-out;
}
.dm-gate::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0,85,85,0.06), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(0,85,85,0.05), transparent 50%);
  pointer-events: none;
}
.dm-gate-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  border: 1px solid var(--brand-line);
  border-radius: 20px;
  padding: 38px 36px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 50px rgba(0, 85, 85, 0.18);
  position: relative;
  z-index: 1;
}
.dm-gate-mark {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-active));
  color: #fff;
  font-size: 28px; font-weight: 800;
  display: grid; place-items: center;
  margin-bottom: 22px;
  box-shadow: 0 8px 20px rgba(0, 85, 85, 0.3);
  letter-spacing: -0.04em;
}
.dm-gate-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #1a3a3a;
  letter-spacing: -0.02em;
}
.dm-gate-card .sub {
  margin: 0 0 24px;
  font-size: 13px;
  color: #5a7a78;
  line-height: 1.5;
}

/* ============================================
   CASES DRAWER (right side)
   ============================================ */
.dm-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.88));
  backdrop-filter: blur(24px);
  border-left: 1px solid var(--brand-line);
  box-shadow: -8px 0 30px rgba(0, 85, 85, 0.1);
  z-index: 1200;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.dm-drawer.open { transform: translateX(0); }
.dm-drawer-h {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--brand-line);
  background: linear-gradient(135deg, var(--brand), var(--brand-active));
  color: #fff;
}
.dm-drawer-h .title {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.01em;
}
.dm-drawer-h .title .ic { display: grid; place-items: center; opacity: 0.85; }
.dm-drawer-h .count {
  background: rgba(255,255,255,0.2);
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.dm-drawer-refresh, .dm-drawer-close {
  width: 30px; height: 30px;
  background: rgba(255,255,255,0.18);
  border: 0; border-radius: 8px;
  color: #fff; cursor: pointer;
  font-size: 16px; line-height: 1;
  display: grid; place-items: center;
  transition: 0.15s;
}
.dm-drawer-refresh:hover, .dm-drawer-close:hover {
  background: rgba(255,255,255,0.32);
}
.dm-drawer-close { font-size: 20px; }
.dm-drawer-filter {
  display: flex;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--brand-line);
  background: #f7f9f8;
  overflow-x: auto;
}
.dm-drawer-filter::-webkit-scrollbar { display: none; }
.dm-fpill {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--brand-line);
  background: #fff;
  color: #5a7a78;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.15s;
}
.dm-fpill:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.dm-fpill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.dm-fpill .n {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}
.dm-fpill.active .n {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

.dm-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.dm-drawer-body::-webkit-scrollbar { width: 6px; }
.dm-drawer-body::-webkit-scrollbar-thumb { background: var(--brand-line); border-radius: 3px; }
.dm-drawer-section-h {
  font-size: 10px;
  font-weight: 700;
  color: #5a7a78;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 12px 6px 8px;
}
.dm-drawer-section-h:first-child { margin-top: 4px; }

/* When drawer open, push the right-edge maplibre controls slightly */
.dm-drawer-open .maplibregl-ctrl-bottom-right { right: 440px; transition: right 0.28s cubic-bezier(0.32, 0.72, 0, 1); }

/* Auth form */
.dm-auth {
  padding: 6px 4px 14px;
}
.dm-auth .field { margin-bottom: 8px; }
.dm-auth label {
  display: block;
  font-size: 11px;
  color: #5a7a78;
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.dm-auth input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  color: #1a3a3a;
  transition: 0.15s;
}
.dm-auth input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 85, 85, 0.12);
}
.dm-auth .btn {
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px;
  background: var(--brand);
  color: #fff;
  border: 0; border-radius: 8px;
  font-family: inherit; font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
}
.dm-auth .btn:hover:not(:disabled) { background: var(--brand-hover); }
.dm-auth .btn:disabled { opacity: 0.6; cursor: wait; }
.dm-auth .err {
  margin-top: 6px;
  font-size: 11px;
  color: #C53030;
  background: #FFF5F5;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #FED7D7;
}
.dm-auth .hint {
  margin-top: 8px;
  font-size: 10px;
  color: #8a8a92;
  line-height: 1.5;
}

/* Case cards */
.dm-cases { padding: 4px; display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; }
.dm-case {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: 0.15s;
  position: relative;
}
.dm-case:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(0, 85, 85, 0.08);
  transform: translateY(-1px);
}
.dm-case.no-geo {
  background: #fafafa;
  cursor: default;
  opacity: 0.78;
}
.dm-case.no-geo:hover { transform: none; box-shadow: none; border-color: var(--brand-line); }
.dm-case .row1 {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.dm-case .ord {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 10px;
  color: #5a7a78;
  background: var(--brand-soft);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.dm-case .status {
  font-size: 10px;
  color: #5a7a78;
  margin-left: auto;
  flex-shrink: 0;
}
.dm-case .title {
  font-size: 13px;
  font-weight: 600;
  color: #1a3a3a;
  line-height: 1.3;
  margin-bottom: 3px;
  word-break: break-word;
}
.dm-case .addr {
  font-size: 11px;
  color: #5a7a78;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dm-case .row3 {
  display: flex; align-items: center; gap: 8px;
}
.dm-case .sched {
  font-size: 10px;
  color: #5a7a78;
  font-family: ui-monospace, "SF Mono", monospace;
}
.dm-case .sched.urgent { color: #C53030; font-weight: 700; }

/* LARM badge */
.dm-rbadge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px;
  font-family: ui-monospace, "SF Mono", monospace;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.dm-rbadge .ic { font-size: 11px; line-height: 1; }
.dm-rbadge.r0, .dm-rbadge.r1 { background: #DCFCE7; color: #166534; }
.dm-rbadge.r2.go         { background: #FEF3C7; color: #92400E; }
.dm-rbadge.r2.cond       { background: #FEF3C7; color: #92400E; }
.dm-rbadge.r3            { background: #FFEDD5; color: #9A3412; }
.dm-rbadge.r4, .dm-rbadge.nogo { background: #FEE2E2; color: #991B1B; }
.dm-rbadge.loading       { background: #F3F4F6; color: #6B7280; }
.dm-rbadge.fail          { background: #F3F4F6; color: #9CA3AF; }

.dm-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 11px;
  color: #8a8a92;
  background: #f7f9f8;
  border-radius: 8px;
  margin: 4px;
}

/* ============================================
   CASE DETAIL MODAL
   ============================================ */
.dm-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 22, 22, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1300; /* above sidebar(1100) + drawer(1200) but visually transparent over them */
  display: grid; place-items: center;
  animation: dm-fade 0.18s ease-out;
  pointer-events: none; /* let drawer + sidebar + markers stay clickable */
}
.dm-modal {
  pointer-events: auto; /* but the modal itself receives clicks */
}
@keyframes dm-fade { from { opacity: 0; } }
.dm-modal {
  background: #fff;
  width: min(560px, 92vw);
  max-height: 85vh;
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  animation: dm-slide 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes dm-slide {
  from { transform: translateY(12px); opacity: 0; }
}
.dm-modal-h {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-active) 100%);
  color: #fff;
}
.dm-modal-h .ord {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 11px;
  background: rgba(255,255,255,0.18);
  padding: 3px 8px;
  border-radius: 4px;
}
.dm-modal-h .title {
  font-size: 16px; font-weight: 700;
  flex: 1; min-width: 0;
}
.dm-modal-h .close {
  width: 28px; height: 28px;
  border: 0; border-radius: 8px;
  background: rgba(255,255,255,0.18);
  color: #fff; cursor: pointer;
  font-size: 18px; line-height: 1;
}
.dm-modal-h .close:hover { background: rgba(255,255,255,0.28); }

.dm-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex; flex-direction: column; gap: 14px;
}
.dm-modal-body .grp {
  background: #f7f9f8;
  border-radius: 10px;
  padding: 12px 14px;
}
.dm-modal-body .grp .h {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5a7a78;
  margin-bottom: 8px;
}
.dm-modal-body .grp .row {
  display: flex; align-items: baseline;
  font-size: 13px;
  margin-bottom: 4px;
  line-height: 1.5;
}
.dm-modal-body .grp .row .k {
  width: 64px;
  flex-shrink: 0;
  font-size: 11px;
  color: #5a7a78;
  font-weight: 600;
}
.dm-modal-body .grp .row .v {
  color: #1a3a3a;
  flex: 1;
  word-break: break-word;
}

.dm-larm-summary {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border-radius: 12px;
  border: 2px solid;
}
.dm-larm-summary .badge {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 22px; font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.dm-larm-summary .meta { line-height: 1.4; flex: 1; }
.dm-larm-summary .meta .decision {
  font-size: 16px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dm-larm-summary .meta .score {
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", monospace;
  margin-top: 2px;
  opacity: 0.8;
}
.dm-larm-summary.r0, .dm-larm-summary.r1 { background: #DCFCE7; border-color: #86EFAC; color: #166534; }
.dm-larm-summary.r2 { background: #FEF3C7; border-color: #FCD34D; color: #92400E; }
.dm-larm-summary.r3 { background: #FFEDD5; border-color: #FB923C; color: #9A3412; }
.dm-larm-summary.r4, .dm-larm-summary.nogo { background: #FEE2E2; border-color: #F87171; color: #991B1B; }

.dm-larm-controls li {
  font-size: 12px;
  color: #1a3a3a;
  padding: 6px 0;
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
  border-bottom: 1px dashed #e5e7eb;
}
.dm-larm-controls li:last-child { border-bottom: 0; }
.dm-larm-controls li::before {
  content: "→"; position: absolute; left: 0; top: 6px;
  color: var(--brand); font-weight: 700;
}

.dm-larm-explain {
  font-size: 11px;
  color: #5a7a78;
  font-family: ui-monospace, "SF Mono", monospace;
}
.dm-larm-explain .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed #e5e7eb;
}
.dm-larm-explain .row:last-child { border-bottom: 0; }
.dm-larm-explain .row .factor { color: #1a3a3a; font-family: inherit; font-size: 12px; }
.dm-larm-explain .row .score { font-weight: 700; color: var(--brand); }
.dm-larm-explain .row .note { grid-column: 1 / -1; color: #8a8a92; font-size: 10px; padding-top: 1px; }

.dm-modal-actions {
  display: flex; gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--brand-line);
  background: #f7f9f8;
}
.dm-modal-actions a, .dm-modal-actions button {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--brand-line);
  background: #fff;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: #1a3a3a;
  cursor: pointer;
  transition: 0.15s;
}
.dm-modal-actions a.primary, .dm-modal-actions button.primary {
  background: var(--brand) !important;
  color: #fff !important;
  border-color: var(--brand) !important;
}
.dm-modal-actions a:hover, .dm-modal-actions button:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.dm-modal-actions a.primary:hover, .dm-modal-actions button.primary:hover {
  background: var(--brand-hover) !important;
  color: #fff !important;
}

.dm-warn {
  font-size: 11px;
  color: #92400E;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.5;
}

/* ============================================
   CASE LAYER TAGS (siblings of bundle's ant-tags)
   Matches bundle's airspace tag style EXACTLY:
   saturated colored fill · white text · white × circle prefix · same dimensions.
   ============================================ */
.dm-case-tag {
  --bg: #5a7a78;        /* tag fill — overridden per category */
  cursor: pointer;
  user-select: none;
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  padding: 0 9px 0 4px !important;
  border-radius: 100px !important;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  height: 24px;          /* matches the bundle's ant-tag.selected height */
  color: #fff !important;
  background: var(--bg) !important;
  border: 1px solid var(--bg) !important;
  transition: opacity 0.15s, filter 0.15s, transform 0.1s, box-shadow 0.15s;
  box-sizing: border-box;
}
/* white close-circle-outlined icon at left, drawn into a slightly-darker circle */
.dm-case-tag::before {
  content: "";
  width: 14px; height: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1024 1024' fill='%23ffffff'><path d='M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
/* Saturated palette — visually distinct from bundle's red/orange/green/blue */
.dm-case-tag.dm-cat-survey   { --bg: #08979c; } /* cyan-teal */
.dm-case-tag.dm-cat-applying { --bg: #722ed1; } /* purple    */
.dm-case-tag.dm-cat-active   { --bg: #d4380d; } /* volcano   */
.dm-case-tag:hover { filter: brightness(1.08); }
.dm-case-tag.off {
  opacity: 0.55;
  filter: grayscale(0.6);
}

/* Google Maps API key issue banner */
.dm-banner {
  margin: 10px 14px;
  padding: 10px 12px;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  border-radius: 10px;
  font-size: 11px;
  color: #78350F;
  line-height: 1.55;
}
.dm-banner b { color: #92400E; }
.dm-banner code {
  background: rgba(0,0,0,0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 10px;
}
.dm-banner a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: underline;
}

/* Hide the bundle's 「問題回報」 button — rendered as <a class="ant-btn">
   with the unique Google Form href. Targeting by href is more reliable
   than text match because AntD Button-with-href renders as an anchor. */
a[href*="1VxPMHf6WL44mxhbh-d-v6dG7l0JMBCgl0bKgBQeeJ64"] {
  display: none !important;
}

/* 民航局空域 button — injected into the zone-info bottom sheet */
.dm-caa-btn {
  margin-top: 8px;
  font-weight: 500;
}
.dm-caa-btn::before {
  content: "↗ ";
  opacity: 0.6;
}

/* ============================================
   FAVORITES MODAL
   ============================================ */
.dm-fav-list {
  display: flex; flex-direction: column;
  gap: 8px;
}
.dm-fav-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dm-fav-row:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(0, 85, 85, 0.08);
}
.dm-fav-row .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--brand-line);
}
.dm-fav-row .body { flex: 1; min-width: 0; }
.dm-fav-row .desc {
  font-size: 14px; font-weight: 600;
  color: #1a3a3a;
  margin-bottom: 2px;
  word-break: break-word;
}
.dm-fav-row .addr {
  font-size: 12px; color: #5a7a78;
  word-break: break-word;
}
.dm-fav-row .addr-loading { font-style: italic; opacity: 0.6; }
.dm-fav-row .coords {
  font-size: 10px;
  color: #8a8a92;
  font-family: ui-monospace, "SF Mono", monospace;
  margin-top: 2px;
}
.dm-fav-row .actions {
  display: flex; gap: 4px;
  flex-shrink: 0;
}
.dm-fav-row .actions button {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--brand-line);
  background: #fff;
  color: #5a7a78;
  cursor: pointer;
  font-size: 14px;
  transition: 0.15s;
}
.dm-fav-row .dm-fav-go:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.dm-fav-row .dm-fav-del:hover {
  background: #FEE2E2;
  color: #991B1B;
  border-color: #F87171;
}

/* ============================================
   FORECAST MODAL
   ============================================ */
.dm-fc-form {
  display: flex; flex-direction: column; gap: 10px;
  background: #f7f9f8;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--brand-line);
}
.dm-fc-row { display: flex; }
.dm-fc-row.two { gap: 8px; }
.dm-fc-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: #1a3a3a;
  background: #fff;
  transition: 0.15s;
}
.dm-fc-row input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 85, 85, 0.12);
}
.dm-fc-submit {
  padding: 10px;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
}
.dm-fc-submit:hover:not(:disabled) { background: var(--brand-hover); }
.dm-fc-submit:disabled { opacity: 0.6; cursor: wait; }

.dm-fc-meta {
  margin: 14px 0 12px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px;
  padding: 10px 14px;
  background: #f7f9f8;
  border-radius: 10px;
  border: 1px solid var(--brand-line);
}
.dm-fc-meta > div { display: flex; gap: 8px; }
.dm-fc-meta .k { color: #5a7a78; min-width: 56px; font-weight: 600; }
.dm-fc-meta .v { color: #1a3a3a; }

.dm-fc-list {
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  overflow: hidden;
  font-size: 12px;
}
.dm-fc-row-h {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 1.1fr 0.8fr 0.7fr;
  gap: 8px;
  padding: 10px 14px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.dm-fc-item {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 1.1fr 0.8fr 0.7fr;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--brand-line);
  align-items: center;
  background: #fff;
  transition: background 0.15s;
}
.dm-fc-item:last-child { border-bottom: 0; }
.dm-fc-item:hover { background: #f7f9f8; }
.dm-fc-item .month {
  font-weight: 600;
  color: #1a3a3a;
  display: flex; align-items: center; gap: 6px;
}
.dm-fc-item .month .ic { font-size: 16px; }
.dm-fc-item .num {
  font-family: ui-monospace, "SF Mono", monospace;
  text-align: right;
  font-weight: 500;
  color: #1a3a3a;
}
.dm-fc-item .num.small { font-size: 11px; color: #5a7a78; }
.dm-fc-item .num.wet   { color: #1d4ed8; font-weight: 700; }
.dm-fc-item .num.dry   { color: #92400e; }
.dm-fc-item .num.windy { color: #b91c1c; font-weight: 700; }

/* Month tabs */
.dm-fc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 14px 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--brand-line);
}
.dm-fc-tab {
  flex: 0 0 auto;
  padding: 6px 11px;
  background: #f7f9f8;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #5a7a78;
  cursor: pointer;
  transition: 0.15s;
  display: inline-flex; align-items: center; gap: 4px;
}
.dm-fc-tab small { opacity: 0.5; font-weight: 400; }
.dm-fc-tab:hover { border-color: var(--brand); color: var(--brand); }
.dm-fc-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.dm-fc-tab.active small { opacity: 0.7; }

/* Daily list */
.dm-fc-day-h, .dm-fc-day {
  display: grid;
  grid-template-columns: 78px 28px 50px 80px 70px 60px;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  font-size: 12px;
}
.dm-fc-day-h {
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 8px 8px 0 0;
}
.dm-fc-day-list {
  border: 1px solid var(--brand-line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.dm-fc-day {
  border-bottom: 1px solid var(--brand-line);
  background: #fff;
  transition: background 0.12s;
}
.dm-fc-day:last-child { border-bottom: 0; }
.dm-fc-day:hover { background: #f7f9f8; }
.dm-fc-day.weekend { background: #FEFBF3; }
.dm-fc-day.weekend:hover { background: #FCF6E5; }

.dm-fc-day .d-date {
  display: flex; flex-direction: column;
  line-height: 1.1;
}
.dm-fc-day .d-date .md {
  font-family: ui-monospace, "SF Mono", monospace;
  font-weight: 700;
  color: #1a3a3a;
  font-size: 12px;
}
.dm-fc-day .d-date .wk {
  font-size: 10px;
  color: #8a8a92;
}
.dm-fc-day.weekend .d-date .wk { color: #C53030; font-weight: 600; }
.dm-fc-day .d-ic { font-size: 16px; text-align: center; }
.dm-fc-day .d-tmean,
.dm-fc-day .d-trange,
.dm-fc-day .d-rain,
.dm-fc-day .d-wind {
  font-family: ui-monospace, "SF Mono", monospace;
  text-align: right;
}
.dm-fc-day .d-tmean { font-weight: 600; color: #1a3a3a; }
.dm-fc-day .d-trange { color: #5a7a78; font-size: 11px; }
.dm-fc-day .d-trange.hot { color: #B91C1C; font-weight: 700; }
.dm-fc-day .d-trange.cold { color: #1D4ED8; font-weight: 700; }
.dm-fc-day .d-rain.wet { color: #1D4ED8; font-weight: 700; }
.dm-fc-day .d-rain.lightwet { color: #2563EB; }
.dm-fc-day .d-wind.windy { color: #B91C1C; font-weight: 700; }

/* Mobile fallback */
@media (max-width: 640px) {
  :root { --sidebar-w: 64px; }
  .dm-sidebar { width: 64px; }
  .dm-brand .name, .dm-nav-item .label, .dm-nav .group-label,
  .dm-weather, .dm-forecast, .dm-foot, .dm-nav-item .badge,
  .dm-section, .dm-cases, .dm-auth { display: none; }
  .dm-brand { padding: 18px 12px; justify-content: center; }
  .dm-nav-item { justify-content: center; padding: 12px; }
}
