.ss-science-game {
  box-sizing: border-box;
  width: min(640px, 100%);
  margin: 10px auto 18px;
  font-family: Arial, Helvetica, sans-serif;
  color: #1b2634;
}

.ss-science-card {
  border: 1px solid #b7c5d6;
  background: #f8fbff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(27, 38, 52, 0.12);
  overflow: hidden;
}

.ss-science-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #fff;
  background: linear-gradient(135deg, #244a7a, #287a6e);
}

.ss-science-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.ss-science-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

.ss-science-scoreboard {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ss-science-stat {
  min-width: 58px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  text-align: center;
  font-size: 11px;
}

.ss-science-stat strong {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  line-height: 1;
}

.ss-science-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  padding: 14px;
}

.ss-earth-diagram {
  position: relative;
  min-height: 250px;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  background: linear-gradient(#cbe9ff 0 42%, #e8f7ed 42% 100%);
  overflow: hidden;
}

.ss-earth-cross {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 178px;
  height: 178px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #7dc3e8;
  box-shadow: inset -18px -14px 0 rgba(26, 80, 116, 0.22);
}

.ss-earth-layer {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.ss-earth-layer.mantle {
  width: 126px;
  height: 126px;
  background: #f08b37;
}

.ss-earth-layer.outer-core {
  width: 78px;
  height: 78px;
  background: #e54731;
}

.ss-earth-layer.inner-core {
  width: 38px;
  height: 38px;
  background: #ffd95a;
}

.ss-earth-label {
  position: absolute;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #cbd7e5;
  font-size: 11px;
  white-space: nowrap;
}

.ss-earth-label.atmosphere { left: 10px; top: 14px; }
.ss-earth-label.crust { right: 10px; bottom: 96px; }
.ss-earth-label.mantle { left: 12px; bottom: 66px; }
.ss-earth-label.outer-core { right: 10px; bottom: 42px; }
.ss-earth-label.inner-core { left: 42px; bottom: 26px; }

.ss-science-play {
  min-width: 0;
}

.ss-science-instruction {
  margin: 0 0 9px;
  font-size: 14px;
}

.ss-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ss-order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-bottom: 7px;
  padding: 7px 9px;
  border: 1px solid #c7d3e0;
  border-radius: 7px;
  background: #fff;
  cursor: grab;
  user-select: none;
}

.ss-order-item:focus {
  outline: 2px solid #287a6e;
  outline-offset: 2px;
}

.ss-order-item.is-selected {
  border-color: #287a6e;
  box-shadow: 0 0 0 2px rgba(40, 122, 110, 0.16);
}

.ss-order-item.is-correct {
  border-color: #2f8f4f;
  background: #f0fbf2;
}

.ss-order-item.is-wrong {
  border-color: #c95045;
  background: #fff5f3;
}

.ss-order-rank {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e8eef5;
  color: #244a7a;
  text-align: center;
  line-height: 26px;
  font-weight: bold;
}

.ss-order-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: bold;
}

.ss-order-handle {
  flex: 0 0 auto;
  color: #5f7187;
  font-size: 18px;
}

.ss-science-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.ss-science-actions button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #9eb0c3;
  border-radius: 6px;
  background: #fff;
  color: #17324f;
  font-weight: bold;
  cursor: pointer;
}

.ss-science-actions button.primary {
  border-color: #287a6e;
  background: #287a6e;
  color: #fff;
}

.ss-science-actions button:disabled {
  cursor: default;
  opacity: 0.48;
}

.ss-science-message {
  min-height: 22px;
  margin-top: 9px;
  font-size: 14px;
  font-weight: bold;
  color: #244a7a;
}

.ss-science-fact {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 4px solid #287a6e;
  background: #eef8f5;
  font-size: 13px;
  line-height: 1.35;
}

.ss-layer-label-game .ss-science-body {
  grid-template-columns: 360px 1fr;
}

.ss-layer-label-game .ss-earth-diagram {
  min-height: 330px;
  background: linear-gradient(#cbe9ff 0 32%, #e9f6e7 32% 100%);
}

.ss-layer-label-game .ss-earth-cross {
  bottom: 42px;
  width: 214px;
  height: 214px;
}

.ss-layer-label-game .ss-earth-layer.mantle {
  width: 156px;
  height: 156px;
}

.ss-layer-label-game .ss-earth-layer.outer-core {
  width: 96px;
  height: 96px;
}

.ss-layer-label-game .ss-earth-layer.inner-core {
  width: 46px;
  height: 46px;
}

.ss-layer-zone {
  position: absolute;
  z-index: 2;
  width: 118px;
  min-height: 34px;
  padding: 6px 8px;
  border: 2px dashed #68839f;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: #244a7a;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
}

.ss-layer-zone[data-zone="atmosphere"] { left: 16px; top: 18px; }
.ss-layer-zone[data-zone="crust"] { right: 14px; top: 122px; }
.ss-layer-zone[data-zone="mantle"] { left: 18px; top: 176px; }
.ss-layer-zone[data-zone="outer-core"] { right: 14px; top: 222px; }
.ss-layer-zone[data-zone="inner-core"] { left: 34px; bottom: 18px; }

.ss-layer-zone.is-filled {
  border-style: solid;
  background: #fff;
}

.ss-layer-zone.is-correct {
  border-color: #2f8f4f;
  background: #f0fbf2;
}

.ss-layer-zone.is-wrong {
  border-color: #c95045;
  background: #fff5f3;
}

.ss-layer-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 10px;
}

.ss-layer-chip {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #b8c6d5;
  border-radius: 999px;
  background: #fff;
  color: #17324f;
  font-weight: bold;
  cursor: grab;
}

.ss-layer-chip.is-selected {
  border-color: #287a6e;
  box-shadow: 0 0 0 2px rgba(40, 122, 110, 0.18);
}

.ss-atmosphere-diagram {
  min-height: 270px;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  overflow: hidden;
  background: #d9f1ff;
}

.ss-atmosphere-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 8px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  color: #17324f;
  font-weight: bold;
}

.ss-atmosphere-band small {
  display: block;
  margin-top: 3px;
  color: #425b73;
  font-size: 11px;
  font-weight: normal;
}

.ss-atmosphere-band.thermosphere {
  background: linear-gradient(90deg, #243b75, #6b78bd);
  color: #fff;
}

.ss-atmosphere-band.thermosphere small {
  color: rgba(255, 255, 255, 0.82);
}

.ss-atmosphere-band.mesosphere {
  background: linear-gradient(90deg, #4a72b8, #7fa4df);
}

.ss-atmosphere-band.stratosphere {
  background: linear-gradient(90deg, #8ec9ed, #b7def4);
}

.ss-atmosphere-band.troposphere {
  min-height: 72px;
  background: linear-gradient(#cdefff 0 62%, #9bd37d 62% 100%);
}

.ss-vitamin-game .ss-science-body {
  grid-template-columns: 1fr;
}

.ss-match-board {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 12px;
}

.ss-match-column {
  min-width: 0;
}

.ss-match-column h3 {
  margin: 0 0 7px;
  color: #244a7a;
  font-size: 15px;
}

.ss-match-card {
  display: block;
  width: 100%;
  min-height: 40px;
  margin: 0 0 7px;
  padding: 8px 10px;
  border: 1px solid #b8c6d5;
  border-radius: 7px;
  background: #fff;
  color: #17324f;
  text-align: left;
  font-weight: bold;
  cursor: pointer;
}

.ss-match-card small {
  display: block;
  margin-top: 3px;
  color: #5f7187;
  font-size: 11px;
  font-weight: normal;
  line-height: 1.25;
}

.ss-match-card.is-selected {
  border-color: #287a6e;
  box-shadow: 0 0 0 2px rgba(40, 122, 110, 0.18);
}

.ss-match-card.is-matched {
  border-color: #2f8f4f;
  background: #f0fbf2;
  color: #2b5e35;
  cursor: default;
}

.ss-life-cycle-game .ss-science-body {
  grid-template-columns: 350px 1fr;
}

.ss-life-diagram {
  position: relative;
  min-height: 330px;
  border: 1px solid #d7e0eb;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(#d9f1ff 0 48%, #9ed6f2 48% 100%);
}

.ss-life-water {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background: linear-gradient(#84c8ed, #4c9ccd);
}

.ss-life-reed {
  position: absolute;
  bottom: 70px;
  width: 8px;
  height: 150px;
  border-radius: 8px;
  background: #3f8e46;
}

.ss-life-reed.r1 { left: 40px; transform: rotate(-6deg); }
.ss-life-reed.r2 { right: 55px; transform: rotate(7deg); }

.ss-life-stage-art {
  position: absolute;
  z-index: 1;
  color: rgba(23, 50, 79, 0.82);
  font-weight: bold;
  text-align: center;
}

.ss-life-stage-art.egg { left: 38px; bottom: 115px; }
.ss-life-stage-art.larva { left: 130px; bottom: 58px; }
.ss-life-stage-art.pupa { right: 88px; bottom: 72px; }
.ss-life-stage-art.adult { right: 42px; top: 32px; }

.ss-life-icon {
  display: block;
  width: 44px;
  height: 28px;
  margin: 0 auto 3px;
  border: 2px solid rgba(23, 50, 79, 0.65);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.ss-life-stage-art.larva .ss-life-icon {
  width: 60px;
  height: 20px;
  border-radius: 999px;
  transform: rotate(-12deg);
}

.ss-life-stage-art.pupa .ss-life-icon {
  width: 38px;
  height: 42px;
  border-radius: 60% 60% 46% 46%;
}

.ss-life-stage-art.adult .ss-life-icon {
  width: 56px;
  height: 34px;
  border-radius: 50% 50% 42% 42%;
}

.ss-life-zone {
  position: absolute;
  z-index: 3;
  width: 116px;
  min-height: 34px;
  padding: 6px 8px;
  border: 2px dashed #68839f;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  color: #244a7a;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
}

.ss-life-zone[data-zone="egg"] { left: 12px; top: 44px; }
.ss-life-zone[data-zone="larva"] { left: 86px; bottom: 16px; }
.ss-life-zone[data-zone="pupa"] { right: 14px; bottom: 18px; }
.ss-life-zone[data-zone="adult"] { right: 18px; top: 104px; }

.ss-life-zone.is-filled {
  border-style: solid;
  background: #fff;
}

.ss-life-zone.is-correct {
  border-color: #2f8f4f;
  background: #f0fbf2;
}

.ss-life-zone.is-wrong {
  border-color: #c95045;
  background: #fff5f3;
}

.ss-life-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 10px;
}

.ss-life-chip {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #b8c6d5;
  border-radius: 999px;
  background: #fff;
  color: #17324f;
  font-weight: bold;
  cursor: grab;
}

.ss-life-chip.is-selected {
  border-color: #287a6e;
  box-shadow: 0 0 0 2px rgba(40, 122, 110, 0.18);
}

@media (max-width: 620px) {
  .ss-science-head,
  .ss-science-body {
    display: block;
  }

  .ss-science-scoreboard {
    margin-top: 10px;
    justify-content: flex-start;
  }

  .ss-earth-diagram {
    margin-bottom: 12px;
  }

  .ss-match-board {
    grid-template-columns: 1fr;
  }

  .ss-life-cycle-game .ss-science-body {
    display: block;
  }

  .ss-life-diagram {
    margin-bottom: 12px;
  }
}
