.inequality-gate-page {
  --gate-ink: #211815;
  --gate-iron: #1f1815;
  --gate-iron-2: #2a211d;
  --gate-brass: #d4a35c;
  --gate-brass-dark: #8f5e2d;
  --gate-purple: #5b2a86;
  --gate-flame: #d75a2e;
  --gate-ember: #f19a48;
  --gate-cream: #f5edd8;
  --gate-green: #74865d;
  color: var(--gate-ink);
}

.inequality-gate-topbar {
  border-color: rgba(212, 163, 92, 0.24);
}

.gate-progressbar {
  height: 8px;
  max-width: 1180px;
  margin: 0 auto 10px;
  overflow: hidden;
  border: 1px solid rgba(31, 24, 21, 0.18);
  border-radius: 999px;
  background: rgba(245, 237, 216, 0.72);
  box-shadow: inset 0 1px 4px rgba(31, 24, 21, 0.18);
}

.gate-progressbar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gate-flame), var(--gate-brass));
  transition: width 360ms ease;
}

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

.gate-progress__dot {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(245, 237, 216, 0.62);
  border-radius: 50%;
  background: rgba(31, 24, 21, 0.56);
  box-shadow: inset 0 0 0 2px rgba(31, 24, 21, 0.28);
}

.gate-progress__dot.is-current {
  background: var(--gate-cream);
  box-shadow: 0 0 0 3px rgba(215, 90, 46, 0.18);
}

.gate-progress__dot.is-filled {
  border-color: rgba(245, 237, 216, 0.88);
  background: var(--gate-flame);
  box-shadow: 0 0 12px rgba(215, 90, 46, 0.46);
}

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

.inequality-gate-room__scene {
  position: relative;
  min-height: 700px;
  overflow: hidden;
  border: 1px solid rgba(245, 237, 216, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 78%, rgba(215, 90, 46, 0.28), transparent 18%),
    radial-gradient(circle at 58% 44%, rgba(212, 163, 92, 0.13), transparent 28%),
    linear-gradient(118deg, rgba(91, 42, 134, 0.28), transparent 38%),
    linear-gradient(180deg, #342723 0%, #201917 54%, #12100f 100%);
  box-shadow: 0 24px 60px rgba(15, 13, 27, 0.36);
  isolation: isolate;
}

.inequality-gate-room__scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    repeating-linear-gradient(90deg, rgba(245, 237, 216, 0.035) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(0deg, rgba(245, 237, 216, 0.025) 0 1px, transparent 1px 72px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.22));
}

.inequality-gate-room__scene::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -96px;
  height: 260px;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgba(245, 237, 216, 0.07) 0 2px, transparent 2px 80px),
    repeating-linear-gradient(0deg, rgba(245, 237, 216, 0.05) 0 2px, transparent 2px 80px),
    linear-gradient(180deg, #49372f 0%, #261d19 100%);
  transform: perspective(720px) rotateX(44deg);
  transform-origin: bottom;
}

.inequality-gate-room__windows {
  position: absolute;
  top: 44px;
  left: 6%;
  display: flex;
  gap: 14px;
  opacity: 0.76;
}

.inequality-gate-room__windows span {
  width: 58px;
  height: 136px;
  border: 5px solid rgba(12, 10, 10, 0.82);
  border-bottom-width: 10px;
  border-radius: 28px 28px 4px 4px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(12, 10, 10, 0.52) 45% 55%, transparent 55%),
    linear-gradient(180deg, transparent 32%, rgba(12, 10, 10, 0.42) 32% 38%, transparent 38% 68%, rgba(12, 10, 10, 0.38) 68% 73%, transparent 73%),
    linear-gradient(150deg, #c6b8d8 0%, #6f5a8c 46%, #302642 100%);
  box-shadow: 0 0 34px rgba(215, 90, 46, 0.14);
}

.gate-forge {
  position: absolute;
  left: 4%;
  bottom: 110px;
  width: 120px;
  height: 96px;
  border: 1px solid rgba(245, 237, 216, 0.12);
  border-radius: 56px 56px 8px 8px;
  background: linear-gradient(180deg, #2c211d, #0f0d0c);
  box-shadow: inset 0 -18px 0 rgba(0, 0, 0, 0.24), 0 18px 28px rgba(0, 0, 0, 0.22);
}

.gate-forge span {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 12px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 90, 46, 0.72), rgba(215, 90, 46, 0.08) 66%, transparent 70%);
}

.gate-workshop-arch {
  position: absolute;
  top: 164px;
  right: 4%;
  width: 112px;
  height: 178px;
  border: 8px solid rgba(48, 34, 26, 0.92);
  border-bottom: 0;
  border-radius: 58px 58px 4px 4px;
  background: linear-gradient(180deg, #17120f, #0d0b0a);
  box-shadow: inset 0 0 24px rgba(212, 163, 92, 0.08), 0 16px 30px rgba(10, 8, 14, 0.22);
}

.gate-workshop-arch span,
.gate-workshop-arch i,
.gate-workshop-arch b {
  position: absolute;
  display: block;
  border: 3px solid rgba(212, 163, 92, 0.25);
  border-radius: 50%;
}

.gate-workshop-arch span {
  left: 30px;
  top: 52px;
  width: 42px;
  height: 42px;
}

.gate-workshop-arch i {
  left: 20px;
  top: 88px;
  width: 26px;
  height: 26px;
}

.gate-workshop-arch b {
  right: 20px;
  top: 92px;
  width: 24px;
  height: 24px;
}

.gate-shelf {
  position: absolute;
  top: 62px;
  right: 5%;
  width: min(560px, 52%);
  color: var(--gate-cream);
}

.gate-shelf__label {
  margin: 0 0 8px 10px;
  font-family: "Cinzel", serif;
  font-size: 0.76rem;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.82;
}

.gate-shelf__rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(245, 237, 216, 0.14);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(74, 47, 35, 0.94), rgba(42, 29, 24, 0.96)),
    repeating-linear-gradient(90deg, rgba(245, 237, 216, 0.04) 0 2px, transparent 2px 26px);
  box-shadow: inset 0 -8px 0 rgba(18, 13, 11, 0.35), 0 20px 35px rgba(10, 8, 14, 0.2);
}

.gate-shelf__slot {
  display: grid;
  min-height: 96px;
  padding: 6px;
  border: 1px dashed rgba(245, 237, 216, 0.22);
  border-radius: 5px;
  background: rgba(31, 24, 21, 0.22);
  place-items: center;
}

.gate-shelf__slot.is-current {
  border-color: rgba(215, 90, 46, 0.46);
}

.gate-shelf__slot.is-filled {
  border-style: solid;
  background: rgba(245, 237, 216, 0.08);
}

.open-gate-mini {
  position: relative;
  width: 70px;
  height: 70px;
  color: var(--gate-cream);
}

.open-gate-mini__arch {
  position: absolute;
  left: 11px;
  top: 6px;
  width: 48px;
  height: 54px;
  border: 5px solid rgba(212, 163, 92, 0.42);
  border-bottom: 0;
  border-radius: 28px 28px 2px 2px;
}

.open-gate-mini__bar {
  position: absolute;
  left: 22px;
  top: 34px;
  width: 30px;
  height: 7px;
  border-radius: 999px;
  background: rgba(245, 237, 216, 0.42);
  transform: rotate(0deg);
  transition: transform 480ms ease, background 240ms ease;
}

.open-gate-mini.is-open .open-gate-mini__arch {
  border-color: rgba(212, 163, 92, 0.9);
  box-shadow: 0 0 14px rgba(215, 90, 46, 0.36);
}

.open-gate-mini.is-open .open-gate-mini__bar {
  background: var(--gate-flame);
}

.open-gate-mini--right .open-gate-mini__bar {
  transform: rotate(24deg) translateX(8px);
}

.open-gate-mini--left .open-gate-mini__bar {
  transform: rotate(-24deg) translateX(-8px);
}

.open-gate-mini strong {
  position: absolute;
  left: 50%;
  bottom: -7px;
  min-width: 54px;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(245, 237, 216, 0.92);
  color: var(--gate-ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 0.68rem;
  text-align: center;
  transform: translateX(-50%);
}

.gate-bench {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  width: min(840px, 76%);
  padding: 18px 18px 20px;
  border: 1px solid rgba(245, 237, 216, 0.13);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 24%, rgba(215, 90, 46, 0.16), transparent 24%),
    linear-gradient(180deg, #3c2a23, #211714);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
}

.gate-prompt {
  width: min(650px, 100%);
  margin: 0 auto 10px;
  padding: 12px 16px;
  border: 1px solid rgba(245, 237, 216, 0.16);
  border-radius: 8px;
  background: rgba(245, 237, 216, 0.94);
  text-align: center;
}

.gate-prompt span {
  display: block;
  color: var(--gate-flame);
  font-family: "Cinzel", serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gate-prompt h1 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  margin: 3px 0 5px;
  color: #241b18;
  font-family: "Spectral", Georgia, serif;
  font-size: 2.2rem;
  line-height: 1;
}

.gate-equation__variable {
  color: var(--gate-purple);
  font-style: italic;
  text-shadow: 0 1px 0 rgba(90, 53, 35, 0.16);
}

.gate-prompt p {
  margin: 0;
  color: rgba(33, 24, 21, 0.7);
  font-size: 0.92rem;
  font-weight: 800;
}

.inequality-gate-room__scene--correct {
  min-height: 730px;
}

.inequality-gate-room__scene--correct .gate-bench {
  bottom: 16px;
  padding: 14px 16px 16px;
}

.inequality-gate-room__scene--correct .gate-prompt {
  margin-bottom: 8px;
  padding: 10px 14px;
}

.inequality-gate-room__scene--correct .gate-prompt h1 {
  font-size: 1.95rem;
}

.gate-scale {
  position: relative;
  height: 205px;
  margin: 0 auto 8px;
}

.gate-scale__beam {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 62px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f2c977, var(--gate-brass-dark));
  box-shadow: inset 0 2px 0 rgba(255, 244, 200, 0.34), 0 10px 18px rgba(0, 0, 0, 0.24);
  transform-origin: center;
  transition: transform 300ms ease;
}

.gate-scale--greater .gate-scale__beam {
  transform: rotate(4deg);
}

.gate-scale--less .gate-scale__beam {
  transform: rotate(-4deg);
}

.gate-scale.is-locked .gate-scale__beam {
  box-shadow: inset 0 2px 0 rgba(255, 244, 200, 0.34), 0 0 0 4px rgba(215, 90, 46, 0.16), 0 10px 18px rgba(0, 0, 0, 0.24);
}

.gate-scale__beam span {
  position: absolute;
  left: 50%;
  top: -12px;
  width: 58px;
  height: 36px;
  border-radius: 50% 50% 8px 8px;
  background: linear-gradient(180deg, #f2c977, #a86f35);
  transform: translateX(-50%);
}

.gate-scale__post {
  position: absolute;
  left: 50%;
  top: 74px;
  width: 18px;
  height: 94px;
  border-radius: 12px;
  background: linear-gradient(90deg, #f0c77a, #9d6a32);
  transform: translateX(-50%);
}

.gate-scale__base {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 158px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f2c977, #8f5e2d);
  transform: translateX(-50%);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.gate-pan {
  position: absolute;
  top: 82px;
  width: 248px;
}

.gate-pan--left {
  left: 6%;
}

.gate-pan--right {
  right: 6%;
}

.gate-pan__dish {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  min-height: 92px;
  padding: 12px 12px 18px;
  border: 2px solid rgba(245, 237, 216, 0.18);
  border-top: 0;
  border-radius: 0 0 76px 76px / 0 0 24px 24px;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(255, 244, 200, 0.44), transparent 52%),
    linear-gradient(180deg, #dcb36a, #9c6730);
  box-shadow: inset 0 -12px 0 rgba(77, 50, 35, 0.18), 0 14px 24px rgba(0, 0, 0, 0.24);
}

.gate-pan > span {
  display: block;
  margin-top: 5px;
  color: rgba(245, 237, 216, 0.72);
  font-family: "Cinzel", serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.gate-x-vials {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  max-width: 126px;
}

.gate-x-vial {
  position: relative;
  display: grid;
  width: 30px;
  height: 54px;
  border: 2px solid rgba(245, 237, 216, 0.24);
  border-radius: 14px 14px 8px 8px;
  background:
    linear-gradient(180deg, rgba(245, 237, 216, 0.22), transparent 28%),
    linear-gradient(180deg, #6c3a93, var(--gate-purple));
  color: #fff5d9;
  font-family: "Spectral", Georgia, serif;
  font-style: italic;
  font-weight: 800;
  place-items: center;
  box-shadow: inset 0 -8px 0 rgba(31, 24, 21, 0.2), 0 8px 12px rgba(0, 0, 0, 0.18);
}

.gate-x-vial::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 7px;
  width: 12px;
  height: 10px;
  border-radius: 4px 4px 1px 1px;
  background: rgba(245, 237, 216, 0.55);
}

.gate-constant {
  min-width: 74px;
}

.gate-weights {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  max-width: 132px;
}

.gate-weight {
  display: grid;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(77, 50, 35, 0.34);
  border-radius: 50% 50% 5px 5px;
  background: linear-gradient(180deg, #f2c977, var(--gate-brass-dark));
  box-shadow: inset 0 2px 0 rgba(255, 244, 200, 0.36), 0 6px 8px rgba(0, 0, 0, 0.16);
  place-items: center;
}

.gate-weight--red {
  background: linear-gradient(180deg, #e27a5d, #963d2c);
  color: #fff5d9;
}

.gate-weight b {
  font-family: "Cinzel", serif;
  font-size: 0.62rem;
}

.gate-answer-chip {
  display: grid;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(245, 237, 216, 0.26);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f2c977, var(--gate-flame) 72%);
  color: #211815;
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
  font-weight: 900;
  place-items: center;
  box-shadow: 0 0 18px rgba(215, 90, 46, 0.42);
}

.gate-chain {
  display: grid;
  gap: 9px;
  width: min(700px, 100%);
  margin: 0 auto 10px;
  padding: 12px;
  border: 1px solid rgba(245, 237, 216, 0.14);
  border-radius: 8px;
  background: rgba(31, 24, 21, 0.78);
}

.gate-chain__nodes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gate-chain__node {
  display: grid;
  min-width: 68px;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid rgba(245, 237, 216, 0.2);
  border-radius: 6px;
  background: rgba(245, 237, 216, 0.9);
  color: var(--gate-ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 800;
  place-items: center;
}

.gate-chain__node.is-spent {
  background: rgba(116, 134, 93, 0.34);
  color: rgba(245, 237, 216, 0.9);
}

.gate-chain__node--result {
  color: var(--gate-flame);
}

.gate-chain__arrow {
  color: rgba(245, 237, 216, 0.58);
  font-weight: 900;
}

.gate-chain__undos {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.gate-vial {
  display: grid;
  min-width: 110px;
  min-height: 54px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 237, 216, 0.18);
  border-radius: 8px 8px 18px 18px;
  background:
    linear-gradient(180deg, rgba(245, 237, 216, 0.18), transparent 32%),
    rgba(245, 237, 216, 0.22);
  color: rgba(245, 237, 216, 0.48);
  cursor: default;
  place-items: center;
  transition: transform 120ms ease, background 160ms ease, box-shadow 160ms ease;
}

.gate-vial span {
  font-family: "Cinzel", serif;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gate-vial strong {
  font-family: "Spectral", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1;
}

.gate-vial.is-enabled {
  border-color: rgba(245, 237, 216, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 244, 200, 0.28), transparent 32%),
    linear-gradient(180deg, #f19a48, var(--gate-flame));
  color: #211815;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(215, 90, 46, 0.13), 0 10px 18px rgba(0, 0, 0, 0.18);
  animation: gateVialReady 1000ms ease-in-out infinite;
}

.gate-vial.is-enabled:hover,
.gate-vial.is-enabled:focus-visible {
  transform: translateY(-2px);
}

.gate-vial.is-spent {
  background: rgba(116, 134, 93, 0.36);
  color: rgba(245, 237, 216, 0.88);
}

.gate-numberline {
  width: min(790px, 100%);
  margin: 0 auto;
  padding: 12px;
  border: 1px solid rgba(245, 237, 216, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(212, 163, 92, 0.18), rgba(212, 163, 92, 0.08)),
    rgba(31, 24, 21, 0.74);
}

.gate-numberline__question {
  min-height: 24px;
  margin-bottom: 8px;
  color: rgba(245, 237, 216, 0.82);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.gate-numberline.is-active .gate-numberline__question {
  color: #fff5d9;
}

.gate-numberline.is-solved .gate-numberline__question {
  color: #fff5d9;
}

.gate-numberline__rail {
  display: grid;
  grid-template-columns: repeat(21, minmax(0, 1fr));
  gap: 4px;
  padding-top: 10px;
  border-top: 3px solid rgba(212, 163, 92, 0.58);
}

.gate-chip {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(245, 237, 216, 0.18);
  border-radius: 50%;
  background: rgba(245, 237, 216, 0.86);
  color: var(--gate-ink);
  cursor: pointer;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 900;
  place-items: center;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.gate-chip::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 2px;
  height: 8px;
  background: rgba(212, 163, 92, 0.58);
  transform: translateX(-50%);
}

.gate-chip:hover:not(:disabled),
.gate-chip:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.22);
}

.gate-chip:disabled {
  cursor: default;
  opacity: 0.45;
}

.gate-numberline.is-solved .gate-chip.is-correct {
  opacity: 1;
}

.gate-chip.is-wrong {
  background: #d76d4c;
  color: #fff5d9;
  animation: chipFall 600ms ease both;
}

.gate-chip.is-correct {
  background: radial-gradient(circle at 35% 30%, #f2c977, var(--gate-flame) 72%);
  color: #211815;
  box-shadow: 0 0 16px rgba(215, 90, 46, 0.42);
}

.gate-aldra {
  position: absolute;
  right: 4%;
  bottom: 72px;
  z-index: 2;
  width: 152px;
  height: 268px;
}

.gate-aldra__head {
  position: absolute;
  top: 0;
  left: 47px;
  width: 58px;
  height: 66px;
  border-radius: 44% 44% 48% 48%;
  background: #a5765d;
  box-shadow: inset 0 -8px 0 rgba(74, 48, 41, 0.18);
}

.gate-aldra__head::before {
  content: "";
  position: absolute;
  inset: -10px 4px 28px;
  border-radius: 28px 28px 8px 8px;
  background: #241b18;
}

.gate-aldra__head span {
  position: absolute;
  left: 13px;
  top: 32px;
  width: 34px;
  height: 7px;
  border-top: 2px solid rgba(33, 24, 21, 0.9);
  border-bottom: 2px solid rgba(33, 24, 21, 0.35);
}

.gate-aldra__body {
  position: absolute;
  top: 70px;
  left: 28px;
  width: 96px;
  height: 152px;
  border-radius: 30px 30px 18px 18px;
  background:
    linear-gradient(90deg, transparent 47%, rgba(215, 90, 46, 0.72) 47% 53%, transparent 53%),
    linear-gradient(180deg, #3a2b25, #1d1714);
}

.gate-aldra__hourglass {
  position: absolute;
  left: 58px;
  top: 128px;
  width: 36px;
  height: 54px;
  border: 3px solid rgba(212, 163, 92, 0.9);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(245, 237, 216, 0.18), transparent);
}

.gate-aldra__hourglass span {
  position: absolute;
  left: 8px;
  top: 14px;
  width: 14px;
  height: 22px;
  background: linear-gradient(180deg, transparent 0 45%, var(--gate-brass) 45% 55%, transparent 55%);
}

.gate-aldra__line {
  position: absolute;
  right: 88px;
  bottom: 18px;
  width: 230px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 237, 216, 0.18);
  border-radius: 8px;
  background: rgba(245, 237, 216, 0.94);
  color: rgba(33, 24, 21, 0.78);
  font-family: "Spectral", Georgia, serif;
  font-size: 0.96rem;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18);
}

.gate-celebration {
  width: min(560px, 94%);
  margin: 10px auto 0;
  padding: 14px 18px;
  border: 1px solid rgba(212, 163, 92, 0.28);
  border-radius: 7px;
  background: rgba(245, 237, 216, 0.96);
  box-shadow: 0 18px 30px rgba(13, 9, 14, 0.22);
  text-align: center;
  animation: gateCelebrate 260ms ease both;
}

.gate-celebration span {
  color: var(--gate-flame);
  font-family: "Cinzel", serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gate-celebration p {
  max-width: 38rem;
  margin: 6px auto 12px;
  color: rgba(33, 24, 21, 0.74);
  font-family: "Spectral", Georgia, serif;
  font-size: 1rem;
}

.inequality-gate-room__scene--correct .gate-scale {
  height: 190px;
  margin-bottom: 6px;
}

.inequality-gate-room__scene--correct .gate-chain {
  margin-bottom: 8px;
  padding: 10px;
}

.inequality-gate-room__scene--correct .gate-numberline {
  padding: 10px;
}

.inequality-gate-room__scene--correct .gate-celebration {
  margin-top: 8px;
  padding: 12px 16px;
}

.inequality-gate-room__scene--correct .gate-celebration p {
  margin: 4px auto 10px;
}

.gate-reward {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  padding: 34px;
  background:
    linear-gradient(180deg, rgba(31, 24, 21, 0.18), rgba(31, 24, 21, 0.78)),
    transparent;
  place-items: center;
  animation: rewardRise 520ms ease both;
}

.gate-reward__card {
  width: min(830px, 94%);
  padding: 28px;
  border: 1px solid rgba(212, 163, 92, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(215, 90, 46, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 250, 236, 0.98), rgba(232, 218, 188, 0.98));
  box-shadow: 0 28px 60px rgba(7, 6, 12, 0.42);
}

.gate-reward__copy {
  text-align: center;
}

.gate-reward__copy span {
  color: var(--gate-flame);
  font-family: "Cinzel", serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gate-reward__copy h2 {
  margin: 4px 0 6px;
  color: #231914;
  font-family: "Cinzel", serif;
  font-size: 2.4rem;
}

.gate-reward__copy p {
  margin: 0;
  color: rgba(33, 24, 21, 0.72);
  font-family: "Spectral", Georgia, serif;
  font-size: 1.08rem;
}

.gate-reward__gates {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 22px auto;
}

.gate-reward__gates .open-gate-mini {
  width: 100%;
  height: 88px;
}

.gate-reward__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 12px;
}

.gate-reward__badges span {
  padding: 7px 11px;
  border: 1px solid rgba(33, 24, 21, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  color: rgba(33, 24, 21, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
}

.gate-reward .reward-stars {
  justify-content: center;
  margin: 8px 0 18px;
}

.gate-reward .reward-stars span {
  color: rgba(33, 24, 21, 0.2);
}

.gate-reward .reward-stars span.is-filled {
  color: var(--gate-flame);
}

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

@keyframes gateVialReady {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(215, 90, 46, 0.1), 0 10px 18px rgba(0, 0, 0, 0.18);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(215, 90, 46, 0.18), 0 12px 22px rgba(0, 0, 0, 0.22);
  }
}

@keyframes chipFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0.34;
    transform: translateY(24px) rotate(22deg);
  }
}

@keyframes gateCelebrate {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .inequality-gate-room__scene {
    min-height: 970px;
  }

  .inequality-gate-room__windows {
    opacity: 0.5;
  }

  .gate-forge,
  .gate-workshop-arch {
    display: none;
  }

  .gate-shelf {
    top: 28px;
    left: 4%;
    right: 4%;
    width: auto;
  }

  .gate-shelf__rail {
    gap: 6px;
    padding: 8px;
  }

  .gate-shelf__slot {
    min-height: 78px;
    padding: 4px;
  }

  .gate-bench {
    bottom: 26px;
    width: min(760px, 92%);
  }

  .gate-scale {
    height: 250px;
  }

  .gate-pan {
    top: 96px;
    width: 44%;
  }

  .gate-pan--left {
    left: 2%;
  }

  .gate-pan--right {
    right: 2%;
  }

  .gate-pan__dish {
    min-height: 118px;
  }

  .gate-aldra {
    display: none;
  }

  .gate-reward {
    position: relative;
    min-height: 790px;
    padding: 20px;
  }
}

@media (max-width: 680px) {
  .inequality-gate-room__scene {
    min-height: 1080px;
    border-radius: 0;
  }

  .gate-shelf__label {
    font-size: 0.66rem;
  }

  .gate-shelf__rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gate-shelf__slot {
    min-height: 70px;
  }

  .gate-bench {
    bottom: 16px;
    width: 94%;
    padding: 14px 12px;
  }

  .gate-prompt h1 {
    font-size: 1.78rem;
  }

  .gate-prompt p {
    font-size: 0.82rem;
  }

  .gate-scale {
    height: 330px;
  }

  .gate-scale__beam {
    left: 8%;
    right: 8%;
  }

  .gate-pan {
    width: 48%;
  }

  .gate-pan__dish {
    align-items: center;
    flex-direction: column;
    min-height: 166px;
    gap: 8px;
  }

  .gate-x-vials,
  .gate-weights {
    max-width: 112px;
  }

  .gate-chain__nodes {
    flex-wrap: wrap;
  }

  .gate-chain__node {
    min-width: 54px;
    min-height: 34px;
    padding: 5px 6px;
    font-size: 1rem;
  }

  .gate-chain__undos {
    flex-wrap: wrap;
  }

  .gate-vial {
    min-width: 98px;
  }

  .gate-numberline__rail {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    row-gap: 16px;
  }

  .gate-chip {
    min-height: 36px;
  }

  .gate-reward__card {
    width: 100%;
    padding: 20px;
  }

  .gate-reward__copy h2 {
    font-size: 1.9rem;
  }

  .gate-reward__gates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gate-reward__actions {
    align-items: stretch;
    flex-direction: column;
  }
}
