/* Geometry L3: Composite Floor */

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

.comp-topbar {
  border-color: rgba(93, 139, 99, 0.28);
}

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

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

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

.comp-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;
}

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

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

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

.comp-room__scene {
  background:
    radial-gradient(circle at 16% 18%, rgba(217, 166, 74, 0.2), transparent 24%),
    radial-gradient(circle at 82% 30%, rgba(93, 139, 99, 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;
}

.comp-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(93, 139, 99, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(20, 20, 20, 0.08), transparent 48%);
  content: "";
  inset: 0;
  position: absolute;
  z-index: 1;
}

.comp-room__scene::after {
  background:
    repeating-linear-gradient(90deg, rgba(36, 31, 27, 0.12) 0 4px, transparent 4px 44px),
    linear-gradient(180deg, #657767, #354139);
  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;
}

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

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

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

.comp-room__lamps span {
  background: radial-gradient(circle, #fff6ca 0 35%, var(--comp-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;
}

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

.comp-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;
}

.comp-room__prompt span,
.comp-shelf__title span,
.comp-card__title span,
.comp-counter span,
.comp-formula span,
.comp-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;
}

.comp-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;
}

.comp-shelf {
  background: linear-gradient(180deg, rgba(36, 31, 27, 0.9), rgba(48, 64, 51, 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;
}

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

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

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

.comp-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;
}

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

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

.comp-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%;
}

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

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

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

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

.comp-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;
}

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

.comp-step--complete {
  background: rgba(93, 139, 99, 0.88);
  color: #fff7df;
}

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

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

.comp-card,
.comp-control-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;
}

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

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

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

.comp-model {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.34fr);
}

.comp-svg {
  background: linear-gradient(180deg, rgba(255, 248, 228, 0.12), rgba(93, 139, 99, 0.14));
  border: 1px solid rgba(255, 248, 228, 0.2);
  border-radius: 8px;
  min-height: 250px;
  width: 100%;
}

.comp-grid-line {
  stroke: rgba(255, 248, 228, 0.13);
  stroke-width: 1;
}

.comp-floor-fill {
  fill: rgba(93, 139, 99, 0.54);
}

.comp-floor-outline {
  fill: none;
  stroke: #fff2c8;
  stroke-linejoin: round;
  stroke-width: 5;
}

.comp-subrect {
  stroke: rgba(255, 248, 228, 0.72);
  stroke-width: 2;
}

.comp-subrect--a {
  fill: rgba(85, 122, 160, 0.5);
}

.comp-subrect--b {
  fill: rgba(185, 98, 87, 0.48);
}

.comp-split-line {
  stroke: #ffe29b;
  stroke-linecap: round;
  stroke-width: 6;
}

.comp-label {
  fill: #fff7df;
  font-family: var(--font-display);
  font-size: 24px;
  text-anchor: middle;
}

.comp-split-control {
  align-content: center;
  display: grid;
  gap: 10px;
}

.comp-split-button {
  background: linear-gradient(180deg, #e4bc59, #785b22);
  border: 2px solid rgba(255, 247, 212, 0.76);
  border-radius: 8px;
  color: #241f18;
  cursor: pointer;
  font-family: var(--font-display);
  min-height: 58px;
  padding: 10px;
}

.comp-split-button.is-drawn {
  background: linear-gradient(180deg, #7ca169, #3c5f3f);
  color: #fff7df;
  cursor: default;
}

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

.comp-control-panel {
  align-content: start;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.comp-formula {
  background: rgba(255, 248, 228, 0.1);
  border: 1px solid rgba(255, 248, 228, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 9px;
  text-align: center;
}

.comp-formula strong {
  color: rgba(255, 248, 228, 0.78);
  font-family: var(--font-display);
}

.comp-formula.is-lit {
  background: rgba(217, 166, 74, 0.16);
}

.comp-formula.is-lit strong {
  color: #ffe29b;
}

.comp-counter {
  display: grid;
  gap: 7px;
  text-align: center;
}

.comp-counter.is-disabled {
  opacity: 0.54;
}

.comp-counter__row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
}

.comp-counter__row button,
.comp-counter__quick button {
  background: linear-gradient(180deg, #eee0bb, #b8a06c);
  border: 2px solid rgba(36, 31, 27, 0.22);
  border-radius: 8px;
  color: #29251a;
  cursor: pointer;
  font-family: var(--font-display);
  min-height: 36px;
}

.comp-counter__row button {
  font-size: 1.2rem;
}

.comp-counter__row button:disabled,
.comp-counter__quick button:disabled {
  cursor: default;
  opacity: 0.45;
}

.comp-counter__row strong {
  align-items: center;
  background: rgba(255, 248, 228, 0.12);
  border: 1px solid rgba(255, 248, 228, 0.22);
  border-radius: 8px;
  color: #ffe29b;
  display: flex;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.1vw, 2.2rem);
  justify-content: center;
  line-height: 0.9;
  min-height: 46px;
}

.comp-counter__quick {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.comp-counter__quick button {
  font-size: 0.82rem;
}

.comp-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: 52px;
  padding: 8px;
  place-items: center;
}

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

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

.comp-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;
}

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

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

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

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

.comp-pellan__tool {
  background: linear-gradient(180deg, #d9a64a, #6d5124);
  border: 2px solid rgba(255, 248, 228, 0.4);
  border-radius: 8px;
  height: 50px;
  position: absolute;
  right: 3px;
  top: 56px;
  transform: rotate(-12deg);
  width: 50px;
  z-index: 3;
}

.comp-pellan__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;
}

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

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

.comp-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;
}

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

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

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

.comp-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%);
}

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

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

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

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

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

.comp-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;
}

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

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

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

  .comp-pellan {
    display: none;
  }
}

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

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

  .comp-model {
    grid-template-columns: 1fr;
  }

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