.sosd-electricity-map-mount {
  margin-top: clamp(2rem, 5vw, 4rem);
}

.sose-shell {
  --sose-blue: #2478a8;
  --sose-blue-dark: #155577;
  --sose-blue-deep: #0d3f5b;
  --sose-blue-soft: #edf8ff;
  --sose-sky: #7bc6eb;
  --sose-ink: #102f43;
  --sose-muted: #5e7483;
  --sose-border: #cfe7f4;
  overflow: hidden;
  border: 1px solid var(--sose-border);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 89, 125, 0.16);
  color: var(--sose-ink);
}

.sose-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.4rem, 4vw, 2.4rem);
  background: linear-gradient(130deg, var(--sose-blue-deep), var(--sose-blue), #49a8d8);
  color: #fff;
}

.sose-kicker {
  margin: 0 0 0.35rem;
  color: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: 0.78;
}

.sose-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.sose-subtitle {
  max-width: 720px;
  margin: 0.65rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.98rem;
  line-height: 1.55;
}

.sose-count {
  flex: 0 0 auto;
  min-width: 128px;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  text-align: right;
  backdrop-filter: blur(8px);
}

.sose-count strong,
.sose-count span {
  display: block;
  color: #fff;
}

.sose-count strong {
  font-size: 1.65rem;
  line-height: 1;
}

.sose-count span {
  margin-top: 0.25rem;
  font-size: 0.76rem;
  opacity: 0.82;
}

.sose-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: clamp(1.1rem, 3vw, 1.8rem);
  border-bottom: 1px solid var(--sose-border);
  background: #fff;
}

.sose-field {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.sose-field label {
  color: var(--sose-blue-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sose-field select {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--sose-border);
  border-radius: 11px;
  background: #fff;
  color: var(--sose-ink);
  font: inherit;
  font-size: 0.92rem;
  outline: none;
}

.sose-field select:focus {
  border-color: var(--sose-blue);
  box-shadow: 0 0 0 3px rgba(36, 120, 168, 0.13);
}

.sose-stage {
  position: relative;
  min-height: 620px;
  background: #eaf4f9;
}

#sose-electricity-map {
  z-index: 1;
  width: 100%;
  height: 620px;
  background: #eaf4f9;
}

.sose-message {
  position: absolute;
  z-index: 600;
  inset: 50% auto auto 50%;
  max-width: min(460px, calc(100% - 2rem));
  transform: translate(-50%, -50%);
  padding: 0.95rem 1.15rem;
  border: 1px solid var(--sose-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 35px rgba(19, 78, 109, 0.17);
  color: var(--sose-ink);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.sose-message[hidden] {
  display: none;
}

.sose-map-key {
  position: absolute;
  z-index: 500;
  right: 1rem;
  bottom: 1.4rem;
  max-width: 230px;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(207, 231, 244, 0.95);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 7px 24px rgba(15, 71, 99, 0.16);
  backdrop-filter: blur(7px);
}

.sose-map-key strong {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--sose-blue-deep);
  font-size: 0.69rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.sose-map-key-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.34rem 0.55rem;
}

.sose-map-key-list span,
.sose-energy-name {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sose-map-key-list span {
  min-width: 0;
  color: var(--sose-muted);
  font-size: 0.66rem;
  line-height: 1.25;
}

.sose-swatch {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--swatch);
}

.sose-detail {
  padding: clamp(1.2rem, 3vw, 1.9rem);
  border-top: 1px solid var(--sose-border);
  background: #fff;
}

.sose-detail-empty {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0;
  color: var(--sose-muted);
  font-size: 0.9rem;
}

.sose-detail-empty::before {
  content: "↖";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--sose-blue-soft);
  color: var(--sose-blue);
  font-size: 1.05rem;
  font-weight: 900;
}

.sose-detail-content[hidden],
.sose-detail-empty[hidden] {
  display: none;
}

.sose-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
}

.sose-detail-head h4 {
  margin: 0;
  color: var(--sose-blue-deep);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.2;
}

.sose-detail-meta {
  margin: 0.3rem 0 0;
  color: var(--sose-muted);
  font-size: 0.8rem;
}

.sose-detail-total {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: var(--sose-blue-soft);
  color: var(--sose-blue-dark);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: right;
}

.sose-share-bar {
  display: flex;
  overflow: hidden;
  height: 22px;
  margin: 1rem 0;
  border-radius: 999px;
  background: #e9f2f6;
  box-shadow: inset 0 0 0 1px rgba(13, 63, 91, 0.08);
}

.sose-share-segment {
  min-width: 0;
  height: 100%;
  background: var(--segment-color);
}

.sose-energy-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sose-energy-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #e8f1f5;
  color: var(--sose-muted);
  font-size: 0.78rem;
}

.sose-energy-name {
  min-width: 0;
}

.sose-energy-value {
  flex: 0 0 auto;
  color: var(--sose-ink);
  font-weight: 800;
}

.sose-method {
  padding: 1rem clamp(1.2rem, 3vw, 1.9rem);
  border-top: 1px solid var(--sose-border);
  background: var(--sose-blue-soft);
  color: var(--sose-muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.sose-method strong {
  color: var(--sose-blue-deep);
}

.sose-sources {
  padding: clamp(1.25rem, 3vw, 1.9rem);
  border-top: 1px solid var(--sose-border);
  background: linear-gradient(145deg, #fff 0%, #f2faff 100%);
}

.sose-sources-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.sose-sources h4 {
  margin: 0;
  color: var(--sose-blue-deep);
  font-size: 1.25rem;
}

.sose-retrieved {
  margin: 0;
  color: var(--sose-muted);
  font-size: 0.75rem;
}

.sose-retrieved time {
  color: var(--sose-blue-dark);
  font-weight: 800;
}

.sose-source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sose-source-list li {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--sose-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.sose-source-list a {
  color: var(--sose-blue-dark) !important;
  font-size: 0.85rem;
  font-weight: 800;
  text-underline-offset: 3px;
}

.sose-source-list p {
  margin: 0.3rem 0 0;
  color: var(--sose-muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.sose-shell .leaflet-tooltip {
  border: 1px solid var(--sose-border);
  border-radius: 9px;
  color: var(--sose-blue-deep);
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(15, 71, 99, 0.16);
}

.sose-shell .leaflet-bar {
  box-shadow: 0 5px 18px rgba(15, 71, 99, 0.18);
}

@media (max-width: 900px) {
  .sose-stage,
  #sose-electricity-map {
    height: 560px;
    min-height: 560px;
  }

  .sose-map-key {
    max-width: 210px;
  }
}

@media (max-width: 650px) {
  .sose-shell {
    border-radius: 18px;
  }

  .sose-head,
  .sose-detail-head,
  .sose-sources-head {
    display: block;
  }

  .sose-count {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
    margin-top: 1rem;
    text-align: left;
  }

  .sose-count span {
    margin-top: 0;
  }

  .sose-controls,
  .sose-energy-list,
  .sose-source-list {
    grid-template-columns: 1fr;
  }

  .sose-stage,
  #sose-electricity-map {
    height: 470px;
    min-height: 470px;
  }

  .sose-stage {
    height: auto;
    min-height: 0;
  }

  .sose-map-key {
    position: static;
    max-width: none;
    margin: 0;
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
  }

  .sose-map-key-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sose-detail-total,
  .sose-retrieved {
    margin-top: 0.7rem;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sose-shell *,
  .sose-shell *::before,
  .sose-shell *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
