/* Geometry L1: Shape Court */

.shape-page {
  --shape-ink: #241f1b;
  --shape-paper: #fff0d0;
  --shape-stone: #d7c0a0;
  --shape-gold: #d9a64a;
  --shape-blue: #557aa0;
  --shape-red: #b96257;
  --shape-green: #5d8b63;
  color: var(--shape-ink);
}

.shape-topbar {
  border-color: rgba(85, 122, 160, 0.28);
}

.shape-progressbar {
  background: rgba(255, 240, 208, 0.78);
  border: 1px solid rgba(85, 122, 160, 0.18);
  border-radius: 999px;
  height: 8px;
  margin: 0 auto 10px;
  max-width: 1180px;
  overflow: hidden;
}

.shape-progressbar span {
  background: linear-gradient(90deg, var(--shape-blue), var(--shape-gold), var(--shape-red));
  display: block;
  height: 100%;
  transition: width 320ms ease;
}

.shape-progress {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin: 0 auto 12px;
}

.shape-progress__dot {
  background: rgba(36, 31, 27, 0.32);
  border: 1px solid rgba(255, 240, 208, 0.72);
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.shape-progress__dot.is-current {
  background: var(--shape-paper);
  box-shadow: 0 0 0 3px rgba(217, 166, 74, 0.22);
}

.shape-progress__dot.is-filled {
  background: var(--shape-gold);
  box-shadow: 0 0 12px rgba(217, 166, 74, 0.44);
}

.shape-room {
  margin: 0 auto;
  max-width: 1180px;
}

.shape-room__scene {
  background:
    radial-gradient(circle at 16% 18%, rgba(217, 166, 74, 0.2), transparent 24%),
    radial-gradient(circle at 82% 30%, rgba(85, 122, 160, 0.24), transparent 24%),
    linear-gradient(180deg, rgba(255, 240, 208, 0.1), rgba(36, 31, 27, 0.2)),
    url("../img/arena-geometry-workshop.jpg") center center / cover no-repeat;
  border: 1px solid rgba(255, 240, 208, 0.3);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(36, 31, 27, 0.34);
  height: min(740px, calc(100vh - 130px));
  min-height: 680px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.shape-room__scene::before {
  background:
    repeating-linear-gradient(90deg, rgba(255, 240, 208, 0.055) 0 1px, transparent 1px 72px),
    radial-gradient(ellipse at 50% 76%, rgba(85, 122, 160, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(20, 20, 20, 0.08), transparent 48%);
  content: "";
  inset: 0;
  position: absolute;
  z-index: 1;
}

.shape-room__scene::after {
  background:
    repeating-linear-gradient(90deg, rgba(36, 31, 27, 0.12) 0 4px, transparent 4px 44px),
    linear-gradient(180deg, #717b83, #3a4147);
  border-top: 1px solid rgba(255, 240, 208, 0.2);
  bottom: -58px;
  box-shadow: 0 -20px 45px rgba(36, 31, 27, 0.3);
  content: "";
  height: 210px;
  left: -3%;
  position: absolute;
  right: -3%;
  transform: skewY(-2deg);
  z-index: -1;
}

.shape-room__arches {
  display: flex;
  gap: 18px;
  left: 6%;
  position: absolute;
  top: 28px;
  z-index: 2;
}

.shape-room__arches span {
  background: linear-gradient(180deg, rgba(255, 240, 208, 0.48), rgba(85, 122, 160, 0.46));
  border: 1px solid rgba(255, 248, 228, 0.28);
  border-radius: 28px 28px 4px 4px;
  height: 90px;
  width: 44px;
}

.shape-room__lamps {
  inset: auto 5% 72px 5%;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.shape-room__lamps span {
  background: radial-gradient(circle, #fff6ca 0 35%, var(--shape-gold) 36% 58%, rgba(217, 166, 74, 0.08) 59%);
  border-radius: 50%;
  bottom: 0;
  box-shadow: 0 0 40px rgba(217, 166, 74, 0.5);
  height: 54px;
  position: absolute;
  width: 54px;
}

.shape-room__lamps span:first-child { left: 0; }
.shape-room__lamps span:last-child { right: 0; }

.shape-room__prompt {
  left: 50%;
  max-width: min(720px, 66%);
  position: absolute;
  text-align: center;
  text-shadow: 0 3px 10px rgba(20, 18, 16, 0.56);
  top: 3%;
  transform: translateX(-50%);
  z-index: 5;
}

.shape-room__prompt span,
.shape-shelf__title span,
.shape-card__title span,
.shape-choice-panel > span,
.shape-why span {
  color: rgba(255, 248, 228, 0.84);
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.shape-room__prompt h1 {
  color: #fff7df;
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 2.35vw, 2rem);
  line-height: 1.04;
  margin: 3px 0 0;
}

.shape-shelf {
  background: linear-gradient(180deg, rgba(36, 31, 27, 0.9), rgba(51, 58, 63, 0.9));
  border: 2px solid rgba(255, 240, 208, 0.32);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(28, 26, 22, 0.28);
  left: 4%;
  padding: 9px 12px;
  position: absolute;
  right: 4%;
  top: 13%;
  z-index: 4;
}

.shape-shelf__title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}

.shape-shelf__title strong {
  color: #fff2c8;
  font-size: 0.82rem;
}

.shape-shelf__rail {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.shape-shelf__slot {
  background: rgba(255, 240, 208, 0.08);
  border: 1px dashed rgba(255, 240, 208, 0.28);
  border-radius: 6px;
  display: grid;
  min-height: 74px;
  padding: 6px;
  place-items: center;
}

.shape-shelf__slot.is-current {
  border-color: rgba(217, 166, 74, 0.62);
}

.shape-shelf__slot.is-filled {
  background: rgba(217, 166, 74, 0.13);
  border-style: solid;
}

.shape-token {
  background: linear-gradient(180deg, #bfb49d, #706550);
  border: 2px solid rgba(255, 248, 228, 0.18);
  border-radius: 7px;
  color: #fff7df;
  display: grid;
  min-height: 60px;
  padding: 7px;
  place-items: center;
  text-align: center;
  width: 100%;
}

.shape-token.is-filled {
  background: linear-gradient(180deg, #e8ca73, #8b6830);
  box-shadow: 0 0 18px rgba(217, 166, 74, 0.28);
}

.shape-token span {
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.shape-token strong {
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 1vw, 1rem);
  line-height: 1;
}

.shape-steps {
  display: flex;
  gap: 8px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 28%;
  transform: translateX(-50%);
  width: min(820px, 82%);
  z-index: 5;
}

.shape-step {
  background: rgba(255, 240, 208, 0.13);
  border: 1px solid rgba(255, 240, 208, 0.24);
  border-radius: 999px;
  color: rgba(255, 248, 228, 0.74);
  flex: 1;
  font-size: 0.62rem;
  font-weight: 900;
  min-height: 34px;
  padding: 9px 10px;
  text-align: center;
  text-transform: uppercase;
}

.shape-step--active {
  background: rgba(217, 166, 74, 0.92);
  color: #2a251b;
}

.shape-step--complete {
  background: rgba(85, 122, 160, 0.88);
  color: #fff7df;
}

.shape-step--pending {
  opacity: 0.58;
}

.shape-workbench {
  align-items: stretch;
  bottom: 8%;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr) minmax(180px, 0.54fr);
  left: 5%;
  position: absolute;
  right: 5%;
  top: 35%;
  z-index: 5;
}

.shape-card,
.shape-choice-panel {
  background: rgba(36, 31, 27, 0.84);
  border: 1px solid rgba(255, 240, 208, 0.24);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(28, 26, 22, 0.28);
  color: #fff7df;
}

.shape-card {
  align-content: start;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.shape-card__title {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.shape-card__title strong {
  color: #fff2c8;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.7vw, 1.55rem);
  line-height: 1;
}

.shape-card__body {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.1fr) minmax(160px, 0.72fr);
}

.shape-diagram {
  align-items: center;
  background: linear-gradient(180deg, rgba(255, 248, 228, 0.12), rgba(85, 122, 160, 0.18));
  border: 1px solid rgba(255, 248, 228, 0.2);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-height: 252px;
  padding: 8px;
}

.shape-svg {
  max-height: 260px;
  width: 100%;
}

.shape-svg__face {
  fill: rgba(122, 156, 184, 0.72);
  stroke: #fff2c8;
  stroke-linejoin: round;
  stroke-width: 5;
}

.shape-svg--equilateral .shape-svg__face,
.shape-svg--rhombus .shape-svg__face {
  fill: rgba(181, 104, 86, 0.7);
}

.shape-svg--trapezoid .shape-svg__face,
.shape-svg--parallelogram .shape-svg__face {
  fill: rgba(91, 139, 97, 0.72);
}

.shape-mark {
  fill: none;
  stroke: #ffe29b;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shape-mark--right {
  stroke-width: 5;
}

.shape-mark--tick {
  stroke-width: 6;
}

.shape-mark--tick-2 {
  stroke-width: 5;
}

.shape-mark--tick-3 {
  stroke-width: 4;
}

.shape-mark--parallel {
  marker-end: url("#geo1-arrow");
  marker-start: url("#geo1-arrow");
  stroke-width: 4;
}

.shape-svg marker path {
  fill: #ffe29b;
}

.shape-evidence {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.shape-evidence li {
  align-items: center;
  background: rgba(255, 248, 228, 0.1);
  border: 1px solid rgba(255, 248, 228, 0.18);
  border-radius: 8px;
  color: #fff7df;
  display: grid;
  font-size: 0.9rem;
  font-weight: 900;
  gap: 8px;
  grid-template-columns: 18px minmax(0, 1fr);
  line-height: 1.2;
  padding: 10px;
}

.shape-evidence li span {
  background: var(--shape-gold);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(217, 166, 74, 0.36);
  height: 12px;
  width: 12px;
}

.shape-card p {
  color: rgba(255, 248, 228, 0.82);
  line-height: 1.35;
  margin: 0;
}

.shape-choice-panel {
  align-content: start;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.shape-name-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.shape-name-tile {
  background: linear-gradient(180deg, rgba(255, 248, 228, 0.18), rgba(255, 248, 228, 0.08));
  border: 2px solid rgba(255, 248, 228, 0.2);
  border-radius: 8px;
  color: #fff7df;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 1.1vw, 1rem);
  min-height: 44px;
  padding: 9px;
  text-align: center;
}

.shape-name-tile.is-selected {
  border-color: rgba(217, 166, 74, 0.68);
  box-shadow: 0 0 14px rgba(217, 166, 74, 0.22);
}

.shape-name-tile.is-correct {
  background: linear-gradient(180deg, #e4bc59, #785b22);
  color: #241f18;
}

.shape-name-tile.is-wrong {
  background: linear-gradient(180deg, rgba(185, 86, 80, 0.76), rgba(83, 40, 39, 0.78));
}

.shape-lock {
  background: linear-gradient(180deg, #6f6b5e, #353127);
  border: 2px solid rgba(255, 240, 208, 0.28);
  border-radius: 8px;
  color: rgba(255, 248, 228, 0.72);
  cursor: default;
  display: grid;
  gap: 5px;
  min-height: 58px;
  padding: 9px;
  place-items: center;
}

.shape-lock span {
  background: currentColor;
  border-radius: 999px;
  height: 6px;
  opacity: 0.42;
  width: 48px;
}

.shape-lock strong {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.shape-lock.is-ready {
  background: linear-gradient(180deg, #e4bc59, #785b22);
  border-color: rgba(255, 247, 212, 0.76);
  box-shadow: 0 0 20px rgba(217, 166, 74, 0.38);
  color: #241f18;
  cursor: pointer;
}

.shape-solen {
  align-self: end;
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 0;
  position: relative;
}

.shape-solen__head {
  background: linear-gradient(180deg, #f1c88c, #a0664e);
  border-radius: 50%;
  height: 46px;
  position: relative;
  width: 46px;
  z-index: 2;
}

.shape-solen__head span {
  background: rgba(36, 31, 27, 0.28);
  border-radius: 999px;
  height: 6px;
  left: 12px;
  position: absolute;
  top: 25px;
  width: 22px;
}

.shape-solen__body {
  background: linear-gradient(180deg, #efe0bc, #5b6f87);
  border-radius: 26px 26px 8px 8px;
  height: 94px;
  margin-top: -10px;
  width: 66px;
}

.shape-solen__shield {
  background: linear-gradient(180deg, #d9a64a, #6d5124);
  border: 2px solid rgba(255, 248, 228, 0.4);
  border-radius: 50% 50% 44% 44%;
  height: 54px;
  position: absolute;
  right: 8px;
  top: 54px;
  width: 42px;
  z-index: 3;
}

.shape-solen__bubble {
  background: rgba(36, 31, 27, 0.86);
  border: 1px solid rgba(255, 240, 208, 0.24);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(28, 26, 22, 0.24);
  color: #fff7df;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.28;
  padding: 12px;
  text-align: center;
}

.shape-why {
  background: rgba(255, 248, 228, 0.12);
  border: 1px solid rgba(255, 248, 228, 0.18);
  border-radius: 8px;
  padding: 10px 12px;
}

.shape-why p {
  color: rgba(255, 248, 228, 0.86);
  line-height: 1.35;
  margin: 4px 0 0;
}

.shape-celebration {
  background: rgba(36, 31, 27, 0.9);
  border: 2px solid rgba(217, 166, 74, 0.56);
  border-radius: 8px;
  bottom: 24px;
  box-shadow: 0 18px 38px rgba(28, 26, 22, 0.34);
  color: #fff7df;
  display: grid;
  gap: 10px;
  left: 50%;
  max-width: 580px;
  padding: 16px;
  position: absolute;
  text-align: center;
  transform: translateX(-50%);
  width: min(580px, calc(100% - 44px));
  z-index: 14;
}

.shape-celebration > strong {
  color: #ffe29b;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.shape-celebration > span {
  color: rgba(255, 248, 228, 0.78);
  font-weight: 900;
}

.shape-reward {
  display: grid;
  height: 100%;
  padding: 34px;
  place-items: center;
  position: relative;
  z-index: 5;
}

.shape-reward__card {
  background: rgba(36, 31, 27, 0.9);
  border: 2px solid rgba(217, 166, 74, 0.5);
  border-radius: 8px;
  box-shadow: 0 24px 54px rgba(28, 26, 22, 0.38);
  color: #fff7df;
  display: grid;
  gap: 16px;
  max-width: 900px;
  padding: 24px;
  text-align: center;
  width: min(900px, 100%);
}

.shape-reward__copy span {
  color: #ffe29b;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shape-reward__copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.95;
  margin: 4px 0 6px;
}

.shape-reward__copy p {
  color: rgba(255, 248, 228, 0.82);
  margin: 0;
}

.shape-reward__tiles {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.shape-reward__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.shape-reward__badges span {
  background: rgba(255, 248, 228, 0.12);
  border: 1px solid rgba(255, 248, 228, 0.2);
  border-radius: 999px;
  color: #fff2c8;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 8px 12px;
}

.shape-reward__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

@media (max-width: 980px) {
  .shape-room__scene {
    height: auto;
    min-height: 1120px;
    overflow-y: auto;
  }

  .shape-workbench {
    grid-template-columns: 1fr;
    position: relative;
    inset: auto;
    margin: 250px 20px 30px;
  }

  .shape-solen {
    display: none;
  }
}

@media (max-width: 720px) {
  .shape-shelf__rail,
  .shape-reward__tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shape-steps {
    flex-direction: column;
    top: 24%;
  }

  .shape-card__body {
    grid-template-columns: 1fr;
  }

  .shape-room__prompt {
    max-width: calc(100% - 28px);
  }
}
