/* Public GES alliance map — builder look, view-only */
:root {
  --navy: #071923;
  --navy2: #0d2c3d;
  --ink: #f2f6f7;
  --muted: #aabcc3;
  --line: rgba(234, 245, 246, 0.14);
  --amber: #f4b63f;
  --orange: #e27538;
  --teal: #59c6ba;
  --display: "Bebas Neue", Impact, sans-serif;
  --body: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box }
html, body { height: 100%; margin: 0 }
body {
  color: var(--ink);
  background: var(--navy);
  font-family: var(--body);
  overflow: hidden;
}

a { color: inherit; text-decoration: none }
button { font-family: inherit }

.gm-app {
  display: grid;
  grid-template-columns: minmax(300px, 400px) 1fr;
  min-height: 100svh;
  height: 100svh;
}

.gm-panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 1.3rem 1.1rem;
  background:
    linear-gradient(165deg, rgba(13, 44, 61, 0.97) 0%, rgba(7, 25, 35, 0.98) 55%),
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(244, 182, 63, 0.12), transparent 55%);
  border-right: 1px solid var(--line);
  overflow: auto;
}

.gm-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
}
.gm-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(244, 182, 63, 0.35);
}
.gm-brand strong {
  display: block;
  font: 1.45rem/0.95 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gm-brand em {
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gm-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.gm-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.gm-field > span,
.gm-stats-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}

.worldgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}
.worldgrid button {
  min-height: 38px;
  cursor: pointer;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 700 0.72rem var(--body);
}
.worldgrid button:hover,
.worldgrid button[aria-pressed="true"] {
  color: var(--navy);
  background: var(--amber);
  border-color: var(--amber);
}

.gm-world-select {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.55rem;
}
.gm-world-flag {
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(234, 245, 246, 0.2);
  background: rgba(0, 0, 0, 0.25);
}
#world-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.22);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: 0.92rem/1.3 var(--body);
  cursor: pointer;
}
/* Native <option> lists use a light system panel — keep ink dark there. */
#world-select option,
#world-select optgroup {
  color: var(--navy);
  background-color: #f2f6f7;
}
#world-select:focus {
  outline: none;
  border-color: rgba(244, 182, 63, 0.55);
  box-shadow: 0 0 0 2px rgba(244, 182, 63, 0.15);
}

.search {
  width: 100%;
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 0.9rem var(--body);
}
.search:focus {
  outline: none;
  border-color: rgba(244, 182, 63, 0.55);
  box-shadow: 0 0 0 2px rgba(244, 182, 63, 0.15);
}

.gm-field-heading {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}
.gm-field-heading #type-heading {
  color: inherit;
}
.gm-translate-hint {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}
.typelist { display: grid; gap: 0.28rem }
.typeopt-copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  flex: 1 1 auto;
}
.typeopt-local {
  font-size: 0.92rem;
  line-height: 1.2;
}
.typeopt-en {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
  font-weight: 500;
}
.typeopt.is-bilingual {
  align-items: flex-start;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}
.typeopt.is-bilingual .ico {
  margin-top: 0.12rem;
}
.typeopt.is-bilingual .count {
  align-self: center;
}
.typeopt {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
}
.typeopt:hover { border-color: rgba(244, 182, 63, 0.45) }
.typeopt[aria-pressed="true"] {
  border-color: var(--amber);
  box-shadow: inset 3px 0 0 var(--amber);
}
.typeopt .ico {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--amber);
  text-align: center;
}
.typeopt .ico img {
  width: auto;
  height: 22px;
  max-width: 22px;
  object-fit: contain;
  display: block;
}
.typeopt .ico-ges img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(244, 182, 63, 0.45);
}
.typeopt .count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
}
.typeopt[aria-pressed="true"] .count { color: var(--amber) }

.hotzone-list .typeopt.is-hotzone[aria-pressed="true"] {
  border-color: rgba(225, 29, 72, 0.65);
  box-shadow: 0 0 0 1px rgba(225, 29, 72, 0.2);
}
.hotzone-list .typeopt.is-hotzone-area {
  opacity: 0.92;
}
.hotzone-list .typeopt.is-hotzone-area .typeopt-local {
  font-size: 0.88rem;
}

.gm-stats {
  margin-top: 0.25rem;
  padding: 0.75rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}
.gm-stats ul { margin: 0.4rem 0 0; padding: 0 }
.gm-stats li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0.12rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.gm-stats b { color: var(--ink); font-weight: 600 }

.gm-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.gm-nav a:hover { color: var(--ink) }

.gm-map-wrap {
  position: relative;
  min-height: 100svh;
  background: #d9e2e8;
}

#ges-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #d9e2e8;
}
.leaflet-container {
  font-family: var(--body);
  background: #d9e2e8;
}

.gm-map-chrome {
  position: absolute;
  z-index: 500;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0 1rem 1rem;
  pointer-events: none;
}
.gm-layer-toggles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  pointer-events: auto;
  max-width: min(100%, 42rem);
}
.gm-layer {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(232, 241, 245, 0.22);
  border-radius: 999px;
  padding: 0.38rem 0.45rem 0.38rem 0.55rem;
  background: rgba(7, 25, 35, 0.9);
  color: rgba(232, 241, 245, 0.72);
  font: 650 0.72rem/1 var(--body);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.gm-layer-logo {
  width: auto;
  height: 18px;
  max-width: 18px;
  border-radius: 0;
  object-fit: contain;
  opacity: 0.7;
}
.gm-layer-label { white-space: nowrap }
.gm-layer-state {
  min-width: 2.1rem;
  padding: 0.22rem 0.42rem;
  border-radius: 999px;
  background: rgba(232, 241, 245, 0.1);
  color: rgba(232, 241, 245, 0.55);
  font: 700 0.62rem/1 var(--body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}
.gm-layer.is-active {
  color: var(--ink);
  border-color: rgba(244, 182, 63, 0.75);
  box-shadow: 0 0 0 1px rgba(244, 182, 63, 0.25), 0 2px 12px rgba(0, 0, 0, 0.35);
}
.gm-layer.is-active .gm-layer-logo { opacity: 1 }
.gm-layer.is-active .gm-layer-state {
  background: var(--amber);
  color: var(--navy);
}
.gm-layer:not(.is-active):hover {
  color: var(--ink);
  border-color: rgba(244, 182, 63, 0.45);
}

.gm-map-badge {
  margin: 0;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(7, 25, 35, 0.88);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  pointer-events: none;
}
.gm-map-badge[hidden] { display: none }

.hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 15;
  transform: translate(-50%, -50%);
  max-width: 420px;
  padding: 1.1rem 1.25rem;
  text-align: center;
  background: rgba(7, 25, 35, 0.94);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  color: var(--ink);
}
.hint[hidden] { display: none }
.hint h2 {
  margin: 0 0 0.35rem;
  font: 2.2rem/0.9 var(--display);
  text-transform: uppercase;
}
.hint p { margin: 0; color: var(--muted) }

/* Crest pins */
.gm-owned-marker {
  background: transparent !important;
  border: 0 !important;
}
.gm-owned-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 64px;
  pointer-events: none;
}
.gm-owned-pin img {
  width: auto;
  height: 36px;
  max-width: 40px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  border: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  image-rendering: auto;
}
.gm-owned-pin em {
  display: inline-block;
  margin: 0;
  max-width: 7.8rem;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: rgba(7, 25, 35, 0.94);
  border: 1px solid rgba(244, 182, 63, 0.55);
  color: #f4b63f;
  font: 700 0.55rem/1 var(--body);
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.gm-owned-marker.is-hospital .gm-owned-pin em {
  border-color: rgba(229, 57, 53, 0.7);
  color: #ffcdd2;
}
.gm-owned-marker.is-prison .gm-owned-pin em {
  border-color: rgba(171, 71, 188, 0.7);
  color: #e1bee7;
}
.gm-owned-marker.is-training .gm-owned-pin em {
  border-color: rgba(244, 182, 63, 0.75);
  color: #ffe082;
}
.gm-owned-marker.is-dispatch .gm-owned-pin em {
  border-color: rgba(89, 198, 186, 0.7);
  color: #b2dfdb;
}
.gm-layer-emoji {
  font-size: 0.95rem;
  line-height: 1;
  width: 16px;
  text-align: center;
}
.gm-owned-pin.is-fire .gm-fire {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  /* box-shadow follows the image rect and looks like a beige square — use drop-shadow only */
  box-shadow: none !important;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 10px rgba(255, 120, 40, 0.65));
}
.gm-owned-marker.is-hotzone .gm-owned-pin em {
  background: linear-gradient(180deg, #f43f5e 0%, #be123c 100%);
  color: #fff;
  border-color: rgba(255, 200, 120, 0.45);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 0 12px rgba(225, 29, 72, 0.35);
}
.ico-hotzone-flame,
.gm-layer-flame {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255, 120, 40, 0.45));
}
.gm-layer-flame {
  width: 1.1rem;
  height: 1.1rem;
}
.ico-emoji,
.ico-emoji-glyph {
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.sheet-type-emoji {
  font-size: 1.6rem;
  line-height: 1;
  width: 28px;
  text-align: center;
}
/* —— Emergency Hot Zone popup (heat sheet) —— */
.leaflet-popup.ges-bubble-hotzone .leaflet-popup-content-wrapper {
  background:
    radial-gradient(120% 80% at 12% -10%, rgba(255, 120, 40, 0.28), transparent 52%),
    radial-gradient(90% 70% at 100% 110%, rgba(225, 29, 72, 0.22), transparent 55%),
    linear-gradient(165deg, #1a0e12 0%, #0c1820 48%, #07131a 100%);
  border: 1px solid rgba(251, 113, 133, 0.38);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255, 176, 64, 0.12) inset,
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(225, 29, 72, 0.28);
  overflow: hidden;
  animation: hz-popup-in 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.leaflet-popup.ges-bubble-hotzone .leaflet-popup-tip {
  background: #0c1820;
  box-shadow: 0 0 18px rgba(225, 29, 72, 0.35);
}
.leaflet-popup.ges-bubble-hotzone .leaflet-popup-content {
  margin: 0;
  width: 300px !important;
  max-height: none;
  overflow: visible;
  position: relative;
}
.leaflet-popup.ges-bubble-hotzone a.leaflet-popup-close-button {
  color: rgba(242, 246, 247, 0.7);
  z-index: 3;
  top: 10px;
  right: 10px;
}
.leaflet-popup.ges-bubble-hotzone a.leaflet-popup-close-button:hover {
  color: #ffe082;
}

@keyframes hz-popup-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hz-flame-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(255, 140, 40, 0.55)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(255, 80, 40, 0.85)); }
}
@keyframes hz-ember-drift {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}
@keyframes hz-rail-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.ges-popup.is-hotzone {
  position: relative;
  gap: 0;
  padding: 0.95rem 1rem 0.9rem 1.05rem;
  isolation: isolate;
}
.ges-popup.is-hotzone .hz-ember {
  pointer-events: none;
  position: absolute;
  inset: -20% -10% auto auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 140, 50, 0.35), transparent 68%);
  animation: hz-ember-drift 3.2s ease-in-out infinite;
  z-index: 0;
}
.ges-popup.is-hotzone .hz-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    #ffb347 0%,
    #e11d48 45%,
    #fb7185 100%
  );
  background-size: 100% 200%;
  animation: hz-rail-shimmer 2.8s linear infinite;
  z-index: 1;
}
.ges-popup.is-hotzone .hz-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: start;
  padding-right: 1.1rem;
}
.ges-popup.is-hotzone .hz-flame {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
  margin-top: 0.1rem;
  padding: 0;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: 0;
  animation: hz-flame-pulse 1.8s ease-in-out infinite;
}
.ges-popup.is-hotzone .hz-head-copy {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}
.ges-popup.is-hotzone .sheet-kicker {
  color: #fb7185;
  text-shadow: 0 0 18px rgba(251, 113, 133, 0.35);
}
.ges-popup.is-hotzone .sheet-name {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.05;
}
.ges-popup.is-hotzone .sheet-owner {
  margin-top: 0.15rem;
  color: rgba(242, 246, 247, 0.72);
}
.ges-popup.is-hotzone .hz-total {
  display: grid;
  place-items: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.4rem;
  margin-top: 0.05rem;
  border-radius: 999px;
  background: linear-gradient(145deg, #e11d48, #9f1239);
  color: #fff;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  box-shadow:
    0 0 0 2px rgba(255, 176, 64, 0.25),
    0 6px 16px rgba(225, 29, 72, 0.45);
}
.ges-popup.is-hotzone .hotzone-block {
  position: relative;
  z-index: 1;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(251, 113, 133, 0.22);
}
.ges-popup.is-hotzone .hotzone-block h3 {
  margin: 0 0 0.5rem;
  color: #ffb347;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hotzone-breakdown {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.hotzone-breakdown .hz-stat {
  display: grid;
  gap: 0.12rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(7, 25, 35, 0.55);
  border: 1px solid rgba(234, 245, 246, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.hotzone-breakdown .hz-stat.is-event {
  border-color: rgba(251, 113, 133, 0.35);
  background: rgba(225, 29, 72, 0.14);
}
.hotzone-breakdown .hz-stat b {
  color: #fb7185;
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
}
.hotzone-breakdown .hz-stat span {
  color: rgba(242, 246, 247, 0.78);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hotzone-cta {
  margin: 0;
  color: #ffe082;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 0 20px rgba(255, 224, 130, 0.25);
}
.hotzone-blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}
.hotzone-count {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.05rem;
}
.hotzone-count b { color: #fb7185; font-size: 1.25rem }

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(244, 182, 63, 0.25);
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: #f4b63f;
  color: #071923;
  font-weight: 700;
}

/* Sheet popup (extensions / classrooms) */
.leaflet-popup.ges-bubble .leaflet-popup-content-wrapper {
  background: rgba(10, 35, 48, 0.97);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 0;
}
.leaflet-popup.ges-bubble .leaflet-popup-tip {
  background: rgba(10, 35, 48, 0.97);
}
.leaflet-popup.ges-bubble .leaflet-popup-content {
  margin: 10px 12px 12px;
  width: 312px !important;
  max-height: min(70vh, 460px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 182, 63, 0.55) rgba(255, 255, 255, 0.06);
}
.leaflet-popup.ges-bubble .leaflet-popup-content::-webkit-scrollbar {
  width: 8px;
}
.leaflet-popup.ges-bubble .leaflet-popup-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}
.leaflet-popup.ges-bubble .leaflet-popup-content::-webkit-scrollbar-thumb {
  background: rgba(244, 182, 63, 0.55);
  border-radius: 999px;
}
.leaflet-popup.ges-bubble .leaflet-popup-content::-webkit-scrollbar-thumb:hover {
  background: rgba(244, 182, 63, 0.8);
}
.leaflet-popup.ges-bubble a.leaflet-popup-close-button {
  color: var(--muted);
  top: 8px;
  right: 8px;
  font-size: 18px;
  width: 24px;
  height: 24px;
}
.leaflet-popup.ges-bubble a.leaflet-popup-close-button:hover { color: var(--ink) }

.ges-popup { display: grid; gap: 0.35rem; color: var(--ink) }
.preview-note {
  margin: 0.55rem 0 0;
  color: var(--orange);
  font-size: 0.72rem;
  line-height: 1.35;
}
.sheet-top {
  min-height: 0;
  padding-right: 1.35rem;
}
.sheet-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.sheet-type-icon {
  width: auto;
  height: 32px;
  max-width: 32px;
  object-fit: contain;
  flex: 0 0 auto;
  margin-top: 0.1rem;
}
.sheet-title-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}
.sheet-kicker {
  margin: 0;
  color: var(--amber);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sheet-name {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}
.sheet-owner {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}
.sheet-cap {
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.35;
}
.sheet-cap-text { min-width: 0 }
.sheet-cap b { font-weight: 700 }
.sheet-count { color: var(--amber) }
.type-en-inline {
  display: block;
  margin-top: 0.08rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
}
.sheet-group { margin-top: 0.2rem }
.sheet-group h3 {
  margin: 0 0 0.22rem;
  color: var(--amber);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.staging-countdown {
  margin: 0.15rem 0 0.45rem;
  color: var(--ink);
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: baseline;
}
.staging-countdown-label { color: var(--muted); font-size: 0.78rem }
.staging-countdown-value { color: #c9a6e8; font-variant-numeric: tabular-nums }
.staging-blurb {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}
.pills-slots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.28rem;
}
.pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.3rem 0.72rem;
  border: 0;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-align: center;
}
.pills-slots .pill {
  min-height: 34px;
  padding: 0.35rem 0.25rem;
  font-size: 0.92rem;
  border-radius: 8px;
}
.pill .fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pct, 0%);
  background: rgba(255, 255, 255, 0.28);
}
.pill .txt { position: relative; z-index: 1 }
.pill.built {
  color: #04221c;
  background: #3dd6c3;
}
.pill.ip {
  color: #1a1404;
  background: #f4b63f;
}
.pill.n {
  color: #fff7f2;
  background: #e27538;
}
.slot-summary {
  display: grid;
  gap: 0.35rem;
}
.slot-summary-top {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.slot-summary-unit {
  color: var(--muted);
  font-size: 0.78rem;
}
.slot-meter {
  display: flex;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.slot-meter .seg {
  display: block;
  height: 100%;
  min-width: 0;
}
.slot-meter .seg.built { background: #3dd6c3 }
.slot-meter .seg.ip { background: #f4b63f }
.slot-meter .seg.n { background: #e27538 }
.slot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}
.slot-legend .lg::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  margin-right: 0.28rem;
  vertical-align: -0.05rem;
}
.slot-legend .lg.built::before { background: #3dd6c3 }
.slot-legend .lg.ip::before { background: #f4b63f }
.slot-legend .lg.n::before { background: #e27538 }
.slot-details {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}
.slot-row {
  display: grid;
  gap: 0.12rem;
  padding: 0.42rem 0.55rem;
  border-radius: 8px;
  background: rgba(244, 182, 63, 0.12);
  border: 1px solid rgba(244, 182, 63, 0.28);
}
.slot-num {
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
}
.slot-due {
  color: #f0d9a0;
  font-size: 0.78rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.slot-bar {
  display: block;
  height: 4px;
  margin-top: 0.18rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.slot-bar > span {
  display: block;
  height: 100%;
  background: #f4b63f;
}
.sheet-empty { color: var(--muted); font-size: 0.76rem; margin: 0.2rem 0 0 }

@media (max-width: 860px) {
  .gm-app {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(42vh, auto) 1fr;
    height: auto;
    min-height: 100svh;
    overflow: auto;
  }
  body { overflow: auto }
  .gm-panel { max-height: none; border-right: 0; border-bottom: 1px solid var(--line) }
  .gm-map-wrap { min-height: 58svh }
}
