.discovery-welcome,
.discovery-idea {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.discovery-welcome {
  background: linear-gradient(115deg, #e1f5e9, #f1edff);
}
.discovery-welcome p {
  max-width: 660px;
}
.discovery-worlds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 24px 0;
}
.discovery-world {
  padding: 26px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.discovery-world:nth-child(3n + 1) {
  background: #f4edff;
}
.discovery-world:nth-child(3n + 2) {
  background: #edf8f0;
}
.discovery-world:nth-child(3n) {
  background: #fff6dc;
}
.discovery-world h2,
.discovery-world p {
  margin: 0;
}
.discovery-world .btn {
  margin-top: auto;
}
.world-icon {
  font-size: 2.8rem;
}
.discovery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  align-items: start;
  gap: 24px;
  margin: 20px 0;
}
.discovery-lab {
  min-width: 0;
}
.discovery-lab .button-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.discovery-lab .btn {
  min-height: 44px;
}
.discovery-lab p {
  line-height: 1.7;
}
.lab-observation {
  background: #eee7fb;
  border-radius: 16px;
  padding: 18px;
  line-height: 1.7;
  margin: 18px 0;
}
.discovery-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 22px 0;
}
.discovery-tools span[role="status"] {
  font-size: 0.87rem;
  max-width: 380px;
}
.discovery-import {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.discovery-import input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.discovery-import:focus-within {
  outline: 3px solid #6b49ad;
  outline-offset: 3px;
}
.discovery-notebook textarea {
  width: 100%;
  resize: vertical;
}
.discovery-notebook .form-label {
  margin-top: 15px;
}
.discovery-scene {
  position: relative;
  min-height: 360px;
  border: 2px solid #c2dfb0;
  border-radius: 22px;
  background: linear-gradient(#e4f3ff 0 43%, #c9e8ac 43% 70%, #e3d4a8 70%);
  margin: 20px 0;
}
.scene-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid transparent;
  min-width: 54px;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: #ffffffd9;
  border-radius: 15px;
  color: #3e3059;
}
.scene-hotspot > span {
  font-size: 2rem;
  line-height: 1.1;
}
.scene-hotspot small {
  font-size: 0.72rem;
  max-width: 65px;
}
.scene-hotspot.noticed {
  border-color: #6b49ad;
}
.scene-hotspot[aria-pressed="true"] {
  box-shadow: 0 0 0 3px #e4d2f8;
}
.test-tank {
  height: 245px;
  position: relative;
  margin: 20px 0;
  border: 4px solid #b9cce2;
  border-top: 0;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(transparent 0 24%, #b5e6f9 24%);
  overflow: hidden;
}
.tank-waterline {
  position: absolute;
  top: 24%;
  left: 10px;
  font-size: 0.8rem;
  color: #345572;
}
.tank-object {
  position: absolute;
  left: 60%;
  font-size: 2.9rem;
  transition: top 0.5s ease;
}
.tank-object.floating {
  top: 15%;
}
.tank-object.sinking {
  top: 75%;
}
.tank-empty {
  position: absolute;
  left: 50%;
  top: 45%;
  font-size: 3rem;
}
.seed-model {
  height: 260px;
  background: #e6f3fd;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  margin: 20px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.seed-model.dark {
  background: #39354f;
}
.garden-light {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2.7rem;
}
.garden-soil {
  height: 50px;
  width: 100%;
  background: #aa7a58;
  text-align: center;
  position: absolute;
  bottom: 0;
  font-size: 1.5rem;
}
.plant-stem {
  position: absolute;
  bottom: 45px;
  width: 8px;
  background: #40874d;
  border-radius: 10px;
  transition: height 0.5s;
}
.plant-leaf {
  position: absolute;
  top: -30px;
  left: -27px;
  font-size: 4rem;
}
.seed-model.dark .plant-leaf {
  filter: sepia(0.6);
}
.habitat-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 390px;
  margin: 24px auto;
}
.habitat-board button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 88px;
  background: #e1efd7;
  border: 2px solid #aecb96;
  border-radius: 14px;
  color: #3c4e35;
}
.habitat-board button > span {
  font-size: 2.2rem;
}
.habitat-board small {
  text-transform: capitalize;
}
.shadow-scene,
.sound-wave {
  display: block;
  width: 100%;
  max-height: 320px;
  margin: 24px 0;
}
.sound-wave {
  background: #f5f0ff;
  border-radius: 18px;
}
.bridge-scene {
  background: linear-gradient(#e5f3fc 55%, #b6dff4 55%);
  padding: 36px 8px 24px;
  border-radius: 20px;
  margin: 24px 0;
}
.bridge-deck {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.bridge-deck button {
  min-height: 46px;
  padding: 2px;
  background: #f9f1df;
  border: 2px dashed #b7a48a;
  border-radius: 6px;
  color: #634c78;
  font-size: 1.3rem;
}
.bridge-deck button.built {
  background: #b47f56;
  border-style: solid;
}
.bridge-banks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: 14px;
}
.bridge-banks > span {
  font-size: 2.2rem;
}
.bridge-banks .btn {
  padding: 8px;
  font-size: 0.77rem;
}
.bridge-load {
  text-align: center;
  font-size: 1.6rem;
  min-height: 42px;
}
.bridge-brace {
  text-align: center;
  font-size: 2rem;
  color: #6b49ad;
  min-height: 42px;
}
.weather-chart {
  margin: 24px 0;
}
.weather-chart > div {
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr) 25px;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}
.weather-bar {
  height: 22px;
  width: calc(var(--count) * 100% / 31);
  max-width: 100%;
  min-width: 2px;
  background: #8c71bf;
  border-radius: 6px;
}
.weather-entries {
  padding-left: 20px;
}
.weather-entries li {
  padding: 10px 0;
  border-bottom: 1px solid #e9e3f0;
  overflow-wrap: anywhere;
}
.weather-entries .link-button {
  margin-left: 12px;
}
.discovery-lab details {
  margin-top: 16px;
}
.discovery-lab details li {
  margin: 8px 0;
}
.discovery-feature {
  background: linear-gradient(110deg, #ede4fb, #def3e8);
  margin: 24px 0;
}
.discovery-feature .button-wrap {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.discovery-lab button:focus-visible,
.discovery-world a:focus-visible {
  outline: 3px solid #7046af;
  outline-offset: 3px;
}
@media (max-width: 1000px) {
  .discovery-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .discovery-layout .right-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }
  .discovery-welcome,
  .discovery-idea {
    align-items: flex-start;
    flex-direction: column;
  }
  .discovery-worlds {
    gap: 16px;
  }
  .discovery-world {
    padding: 20px;
  }
}
@media (max-width: 600px) {
  .discovery-worlds {
    grid-template-columns: minmax(0, 1fr);
  }
  .discovery-layout {
    gap: 16px;
  }
  .discovery-lab {
    padding: 18px;
  }
  .discovery-scene {
    min-height: 330px;
  }
  .scene-hotspot {
    min-width: 44px;
    min-height: 44px;
  }
  .scene-hotspot > span {
    font-size: 1.5rem;
  }
  .scene-hotspot small {
    font-size: 0.65rem;
    max-width: 54px;
  }
  .discovery-tools {
    align-items: stretch;
  }
  .discovery-notebook textarea {
    font-size: 16px;
  }
  .discovery-idea h2 {
    font-size: 1.2rem;
  }
  .bridge-banks {
    gap: 3px;
  }
  .bridge-deck button {
    font-size: 1rem;
    min-height: 44px;
  }
  .weather-chart > div {
    grid-template-columns: 80px minmax(0, 1fr) 20px;
    gap: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tank-object,
  .plant-stem {
    transition: none;
  }
}
