.globe-page {
  margin-top: 0.75rem;
}

.standalone-globe-root,
.standalone-globe-page {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.standalone-globe-page {
  --md-text-font: "Roboto";
  --md-code-font: "Roboto Mono";
  min-height: 100vh;
  margin: 0;
  color: #d7e9f7;
  font-family: var(--md-text-font), sans-serif;
  background:
    radial-gradient(circle at top, rgba(79, 195, 247, 0.18), transparent 32%),
    linear-gradient(180deg, #04131f 0%, #061726 100%);
}

.standalone-globe-page button,
.standalone-globe-page input,
.standalone-globe-page select,
.standalone-globe-page textarea {
  font: inherit;
}

.standalone-globe-shell {
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.standalone-globe-header {
  position: absolute;
  top: 1rem;
  right: 1rem;
  left: 1rem;
  z-index: 2;
  display: grid;
  gap: 1rem;
  grid-template-columns: max-content auto;
  align-items: start;
  justify-content: space-between;
}

.standalone-globe-header__content {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
  width: max-content;
  max-width: min(36rem, calc(100vw - 12rem));
  padding: 0.95rem 1.1rem;
  border: 1px solid rgba(124, 200, 255, 0.16);
  border-radius: 20px;
  backdrop-filter: blur(18px);
  background:
    radial-gradient(circle at top right, rgba(79, 195, 247, 0.12), transparent 35%),
    rgba(5, 20, 32, 0.76);
}

.standalone-globe-header__eyebrow {
  display: inline-block;
  max-width: 100%;
  color: #7cc8ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
}

.standalone-globe-header__title {
  margin: 0;
  max-width: 100%;
  font-size: clamp(1.75rem, 2vw + 1rem, 2.7rem);
  line-height: 1.1;
}

.standalone-globe-header__text {
  margin: 0;
  max-width: min(34rem, 100%);
  color: rgba(215, 233, 247, 0.82);
  white-space: pre-line;
}

.standalone-globe-links {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.standalone-globe-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.8rem 1.15rem;
  border: 1px solid rgba(124, 200, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f4fbff;
  text-decoration: none;
  font-weight: 700;
  backdrop-filter: blur(18px);
}

.standalone-globe-back-link:hover,
.standalone-globe-back-link:focus {
  background: rgba(255, 255, 255, 0.1);
}

.globe-cinematic-exit {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(124, 200, 255, 0.28);
  border-radius: 999px;
  background: rgba(5, 20, 32, 0.82);
  color: #f4fbff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(18px);
}

.globe-cinematic-exit:hover,
.globe-cinematic-exit:focus {
  background: rgba(255, 255, 255, 0.1);
}

.globe-cinematic-exit[hidden] {
  display: none;
}

.standalone-globe-page .globe-page {
  min-height: 100vh;
  margin-top: 0;
}

.globe-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
}

.globe-stage.is-cinematic .standalone-globe-header,
.globe-stage.is-cinematic .globe-toolbar,
.globe-stage.is-cinematic .globe-legend-stack {
  display: none;
}

.globe-toolbar {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: stretch;
  width: min(18rem, calc(100% - 2rem));
  max-width: calc(100% - 2rem);
  padding: 0.85rem 0.95rem;
  box-sizing: border-box;
  border: 1px solid rgba(124, 200, 255, 0.16);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  background:
    radial-gradient(circle at top right, rgba(79, 195, 247, 0.12), transparent 35%),
    rgba(5, 20, 32, 0.76);
}

.globe-toolbar__header {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  justify-content: space-between;
}

.globe-toolbar__content {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  max-width: 100%;
}

.globe-toolbar.is-collapsed .globe-toolbar__content {
  display: none;
}

.globe-toolbar__sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: start;
  max-width: 100%;
}

.globe-layer-section {
  display: grid;
  gap: 0.45rem;
}

.globe-layer-section__controls {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.globe-layer-section__controls--vector {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.globe-toolbar__group {
  display: grid;
  gap: 0.45rem;
  align-items: stretch;
}

.globe-toolbar__group--depth {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  width: 100%;
}

.globe-toolbar__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  align-items: center;
  justify-content: stretch;
}

.globe-toolbar__actions .globe-reset-button {
  width: 100%;
}

.globe-toolbar__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7cc8ff;
  font-weight: 700;
}

.globe-toolbar__collapse-button {
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(124, 200, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f4fbff;
  font-weight: 700;
  cursor: pointer;
}

.globe-toolbar__collapse-button:hover {
  filter: brightness(1.08);
}

.globe-toggle {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.globe-toolbar__group--variable {
  justify-content: stretch;
}

.globe-variable-toggle,
.globe-segmented-toggle {
  display: inline-flex;
  max-width: 100%;
  box-sizing: border-box;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid rgba(124, 200, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.globe-variable-toggle,
.globe-segmented-toggle--raster {
  width: 100%;
}

.globe-segmented-toggle--raster {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 16px;
}

.globe-segmented-toggle--raster .globe-segmented-toggle__option span {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  border-radius: 12px;
}

.globe-variable-toggle__option,
.globe-segmented-toggle__option {
  display: inline-flex;
  cursor: pointer;
}

.globe-variable-toggle__option input,
.globe-segmented-toggle__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.globe-variable-toggle__option span,
.globe-segmented-toggle__option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  color: rgba(234, 248, 255, 0.84);
  font-size: 0.82rem;
  font-weight: 700;
}

.globe-variable-toggle__option input:checked + span,
.globe-segmented-toggle__option input:checked + span {
  background: linear-gradient(135deg, #1e5c89, #3f9ed7);
  color: #f4fbff;
}

.globe-variable-toggle__option input:focus-visible + span,
.globe-segmented-toggle__option input:focus-visible + span {
  outline: 2px solid #7cc8ff;
  outline-offset: 2px;
}

.globe-toggle input:disabled + span,
.globe-segmented-toggle__option input:disabled + span {
  opacity: 0.68;
}

.globe-segmented-toggle--binary .globe-segmented-toggle__option span {
  min-width: 2.75rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
}

.globe-vector-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.globe-vector-toggle__name {
  color: rgba(234, 248, 255, 0.88);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.globe-range {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.globe-range__header {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  justify-content: space-between;
}

.globe-range__value {
  color: rgba(234, 248, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 700;
}

.globe-range__control {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.globe-range__control input {
  width: 100%;
}

.globe-depth-ticks {
  position: relative;
  min-height: 1rem;
  color: rgba(234, 248, 255, 0.82);
  font-size: 0.68rem;
  font-weight: 700;
}

.globe-depth-ticks__tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.globe-depth-ticks__tick:first-child {
  transform: translateX(0);
}

.globe-depth-ticks__tick:last-child {
  transform: translateX(-100%);
}

.globe-depth-ticks__tick:only-child {
  transform: translateX(0);
}

.globe-legend-stack {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.globe-legend {
  display: grid;
  gap: 0.45rem;
  min-width: 13rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(124, 200, 255, 0.16);
  border-radius: 16px;
  backdrop-filter: blur(18px);
  background:
    radial-gradient(circle at top right, rgba(79, 195, 247, 0.12), transparent 35%),
    rgba(5, 20, 32, 0.76);
}

.globe-legend__title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7cc8ff;
  font-weight: 700;
}

.globe-legend__bar {
  height: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgb(18, 38, 140) 0%,
    rgb(30, 86, 196) 16%,
    rgb(44, 140, 255) 32%,
    rgb(58, 212, 255) 48%,
    rgb(255, 238, 98) 66%,
    rgb(255, 172, 54) 80%,
    rgb(240, 84, 32) 92%,
    rgb(180, 16, 26) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.globe-legend__labels {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(234, 248, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 600;
}

.globe-legend__bar--salinity {
  background: linear-gradient(
    90deg,
    rgb(49, 54, 149) 0%,
    rgb(69, 117, 180) 20%,
    rgb(116, 173, 209) 40%,
    rgb(171, 221, 164) 60%,
    rgb(253, 224, 71) 80%,
    rgb(168, 85, 36) 100%
  );
}

.globe-legend__bar--error {
  background: linear-gradient(90deg, rgb(34, 197, 94) 0%, rgb(250, 204, 21) 50%, rgb(220, 38, 38) 100%);
}

.globe-legend[hidden],
.globe-legend--points[hidden],
.globe-legend--error[hidden] {
  display: none;
}

.globe-point-legend {
  display: grid;
  gap: 0.55rem;
  color: rgba(234, 248, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 600;
}

.globe-point-legend__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.globe-point-legend__marker {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
}

.globe-point-legend__marker::before,
.globe-point-legend__marker::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.globe-point-legend__marker--argo::before {
  top: 0.14rem;
  width: 0.74rem;
  height: 0.74rem;
  border: 2px solid #7cf5ff;
  border-radius: 999px;
  background: rgba(6, 23, 38, 0.82);
}

.globe-point-legend__marker--argo::after {
  top: 0.32rem;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: #dffcff;
}

.globe-point-legend__marker--full-depth::before {
  top: 0.02rem;
  width: 0.95rem;
  height: 0.95rem;
  clip-path: polygon(50% 0%, 100% 28%, 82% 76%, 50% 100%, 18% 76%, 0% 28%);
  border: 2px solid #ffd166;
  background: rgba(9, 34, 56, 0.9);
  box-sizing: border-box;
}

.globe-point-legend__marker--full-depth::after {
  top: 0.29rem;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: #fff4cf;
  border: 1px solid #ffd166;
}

.globe-reset-button {
  width: fit-content;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #1e5c89, #3f9ed7);
  color: #f4fbff;
  font-weight: 700;
  cursor: pointer;
}

.globe-reset-button:hover {
  filter: brightness(1.08);
}

.globe-reset-button:disabled {
  cursor: wait;
  filter: saturate(0.72);
  opacity: 0.78;
}

.globe-reset-button[aria-pressed="true"] {
  background: linear-gradient(135deg, #7ed8ff, #42aef0);
  color: #041625;
}

.globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  border: 1px solid rgba(124, 200, 255, 0.18);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #04131f, #061726);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

.globe-canvas,
.globe-canvas .cesium-viewer,
.globe-canvas .cesium-viewer-cesiumWidgetContainer,
.globe-canvas .cesium-widget,
.globe-canvas canvas {
  width: 100%;
  height: 100%;
}

.globe-canvas .cesium-viewer,
.globe-canvas .cesium-viewer-cesiumWidgetContainer,
.globe-canvas .cesium-widget {
  position: absolute;
  inset: 0;
}

.globe-canvas canvas {
  display: block;
}

.globe-profile-popup {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(2, 10, 18, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.globe-profile-popup[hidden] {
  display: none !important;
}

.globe-profile-popup.is-open,
.globe-profile-popup.is-closing {
  display: grid;
}

.globe-profile-popup.is-open {
  opacity: 1;
  pointer-events: auto;
}

.globe-profile-popup__card {
  width: min(52rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: auto;
  padding: 0.95rem;
  border: 1px solid rgba(124, 200, 255, 0.16);
  border-radius: 20px;
  backdrop-filter: blur(18px);
  background:
    radial-gradient(circle at top right, rgba(79, 195, 247, 0.12), transparent 35%),
    rgba(5, 20, 32, 0.94);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.globe-profile-popup.is-open .globe-profile-popup__card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.globe-profile-popup__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.globe-profile-popup__subtitle {
  margin-top: 0.2rem;
  color: rgba(234, 248, 255, 0.82);
  font-size: 0.86rem;
  white-space: pre-line;
}

.globe-profile-popup__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.globe-mobile-block {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top, rgba(79, 195, 247, 0.16), transparent 30%),
    rgba(3, 12, 20, 0.9);
}

.globe-mobile-block[hidden] {
  display: none !important;
}

.globe-mobile-block__card {
  display: grid;
  gap: 0.85rem;
  width: min(34rem, 100%);
  padding: 1.4rem;
  border: 1px solid rgba(124, 200, 255, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(79, 195, 247, 0.12), transparent 35%),
    rgba(5, 20, 32, 0.94);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

.globe-mobile-block__eyebrow {
  color: #7cc8ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
}

.globe-mobile-block__title {
  margin: 0;
  font-size: clamp(1.4rem, 1.5vw + 1rem, 2rem);
  line-height: 1.15;
}

.globe-mobile-block__text {
  margin: 0;
  color: rgba(215, 233, 247, 0.84);
}

@media screen and (max-width: 900px) {
  .standalone-globe-shell {
    padding: 0;
  }

  .standalone-globe-header {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .standalone-globe-header__content {
    width: auto;
    max-width: none;
  }

  .globe-toolbar {
    position: static;
    width: auto;
    max-width: none;
  }

  .globe-toolbar__content {
    width: auto;
  }

  .globe-toolbar__sections {
    grid-template-columns: 1fr;
  }

  .globe-toolbar__group--depth {
    grid-template-columns: 1fr;
  }

  .globe-toolbar__actions {
    justify-content: flex-start;
  }

  .globe-legend-stack {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .globe-legend {
    min-width: 0;
  }

  .globe-stage {
    display: grid;
    gap: 0.85rem;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    padding: 1rem;
    box-sizing: border-box;
  }

  .globe-canvas {
    position: static;
    inset: auto;
    height: 100%;
    min-height: 68vh;
  }

  .globe-profile-popup {
    position: fixed;
  }

  .globe-profile-popup__header {
    flex-direction: column;
  }
}

.globe-toolbar--temporal .globe-layer-section__controls--vector {
  align-items: center;
}

.globe-toolbar__group--temporal-week {
  gap: 12px;
}

.globe-temporal-speed {
  align-items: center;
  display: flex;
  gap: 8px;
}

.globe-temporal-speed select {
  background: rgba(4, 19, 31, 0.86);
  border: 1px solid rgba(124, 200, 255, 0.28);
  border-radius: 8px;
  color: #eaf8ff;
  font: inherit;
  min-height: 34px;
  padding: 0 28px 0 10px;
}

.standalone-temporal-globe-page .globe-range__control input[type="range"] {
  min-width: 220px;
}
