.substitution-bench-page {
  --bench-ink: #211a17;
  --bench-stone: #2b3435;
  --bench-stone-dark: #161f20;
  --bench-paper: #f4ead2;
  --bench-gold: #d9b957;
  --bench-amber: #e8a84d;
  --bench-terracotta: #b96745;
  --bench-teal: #4f8f88;
  --bench-violet: #725a88;
  color: var(--bench-ink);
}

.substitution-bench-topbar {
  border-color: rgba(217, 185, 87, 0.28);
}

.substitution-progressbar {
  height: 8px;
  max-width: 1180px;
  margin: 0 auto 10px;
  overflow: hidden;
  border: 1px solid rgba(33, 26, 23, 0.18);
  border-radius: 999px;
  background: rgba(244, 234, 210, 0.74);
  box-shadow: inset 0 1px 4px rgba(33, 26, 23, 0.18);
}

.substitution-progressbar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bench-teal), var(--bench-gold));
  transition: width 320ms ease;
}

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

.substitution-progress__dot {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(244, 234, 210, 0.62);
  border-radius: 50%;
  background: rgba(33, 26, 23, 0.52);
}

.substitution-progress__dot.is-current {
  background: var(--bench-paper);
  box-shadow: 0 0 0 3px rgba(217, 185, 87, 0.24);
}

.substitution-progress__dot.is-filled {
  border-color: rgba(244, 234, 210, 0.92);
  background: var(--bench-gold);
  box-shadow: 0 0 12px rgba(217, 185, 87, 0.46);
}

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

.substitution-bench-room__scene {
  position: relative;
  height: min(730px, calc(100vh - 150px));
  min-height: 660px;
  overflow: hidden;
  border: 1px solid rgba(244, 234, 210, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 16%, rgba(217, 185, 87, 0.2), transparent 19%),
    radial-gradient(circle at 82% 25%, rgba(79, 143, 136, 0.22), transparent 20%),
    linear-gradient(180deg, #463126 0%, #2b211e 48%, #161312 100%);
  box-shadow: 0 24px 58px rgba(20, 14, 11, 0.36);
  isolation: isolate;
}

.substitution-bench-room__scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.26)),
    repeating-linear-gradient(90deg, rgba(244, 234, 210, 0.045) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(0deg, rgba(244, 234, 210, 0.03) 0 1px, transparent 1px 70px);
}

.substitution-bench-room__scene::after {
  content: "";
  position: absolute;
  left: -7%;
  right: -7%;
  bottom: -106px;
  height: 260px;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgba(244, 234, 210, 0.052) 0 2px, transparent 2px 86px),
    linear-gradient(180deg, #704936 0%, #2b1a15 100%);
  transform: perspective(760px) rotateX(45deg);
  transform-origin: bottom;
}

.substitution-candles {
  position: absolute;
  top: 38px;
  left: 5%;
  right: 5%;
  height: 130px;
  pointer-events: none;
}

.substitution-candles span {
  position: absolute;
  bottom: 0;
  width: 20px;
  height: 78px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #f8e7b8, #c99757);
  box-shadow: 0 0 36px rgba(217, 185, 87, 0.46);
}

.substitution-candles span::before {
  content: "";
  position: absolute;
  left: 6px;
  top: -23px;
  width: 9px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 66%, #fff5b6, #e28735 72%);
  animation: substitutionCandle 1300ms ease-in-out infinite alternate;
}

.substitution-candles span:nth-child(1) {
  left: 4%;
}

.substitution-candles span:nth-child(2) {
  right: 10%;
  height: 94px;
}

.investigation-arch {
  position: absolute;
  top: 156px;
  left: 4%;
  width: 118px;
  height: 178px;
  border: 8px solid rgba(40, 29, 24, 0.95);
  border-bottom: 0;
  border-radius: 60px 60px 4px 4px;
  background: linear-gradient(180deg, #171412, #0f0c0b);
  box-shadow: inset 0 0 26px rgba(217, 185, 87, 0.08), 0 16px 30px rgba(10, 7, 5, 0.24);
}

.investigation-arch span,
.investigation-arch i,
.investigation-arch b {
  position: absolute;
  display: block;
}

.investigation-arch span {
  left: 26px;
  top: 54px;
  width: 64px;
  height: 40px;
  border: 2px solid rgba(244, 234, 210, 0.56);
  border-radius: 3px;
  background: #28383a;
  transform: rotate(-3deg);
}

.investigation-arch i {
  left: 35px;
  top: 105px;
  width: 48px;
  height: 7px;
  border-radius: 999px;
  background: rgba(217, 185, 87, 0.54);
}

.investigation-arch b {
  left: 23px;
  top: 128px;
  width: 68px;
  height: 12px;
  border-radius: 999px;
  background: rgba(244, 234, 210, 0.54);
}

.substitution-shelf {
  position: absolute;
  top: 46px;
  right: 4.5%;
  width: min(610px, 58%);
  color: var(--bench-paper);
}

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

.substitution-shelf__slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(76px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(244, 234, 210, 0.16);
  border-radius: 8px;
  background: rgba(22, 17, 15, 0.64);
  box-shadow: inset 0 -8px 18px rgba(0, 0, 0, 0.18);
}

.substitution-shelf__slot {
  position: relative;
}

.substitution-shelf__slot.is-current .filled-slate {
  border-color: rgba(217, 185, 87, 0.74);
}

.filled-slate {
  position: relative;
  min-height: 104px;
  padding: 18px 8px 8px;
  overflow: hidden;
  border: 1px solid rgba(244, 234, 210, 0.18);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(43, 52, 53, 0.76), rgba(22, 31, 32, 0.92));
  color: rgba(244, 234, 210, 0.48);
  text-align: center;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.18);
}

.filled-slate.is-filled {
  border-color: rgba(217, 185, 87, 0.58);
  color: var(--bench-paper);
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 185, 87, 0.2), transparent 48%),
    linear-gradient(180deg, #385154, #1a292b);
  box-shadow: 0 0 20px rgba(217, 185, 87, 0.22), inset 0 0 18px rgba(0, 0, 0, 0.22);
}

.filled-slate__clips {
  position: absolute;
  top: 7px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
}

.filled-slate__clips span {
  width: 14px;
  height: 8px;
  border-radius: 999px;
  background: rgba(217, 185, 87, 0.74);
}

.filled-slate strong,
.filled-slate em,
.filled-slate b {
  display: block;
}

.filled-slate strong {
  margin-top: 6px;
  font-size: 0.82rem;
}

.filled-slate em {
  margin-top: 5px;
  font-size: 0.66rem;
  font-style: normal;
  opacity: 0.82;
}

.filled-slate b {
  margin-top: 4px;
  font-size: 1.05rem;
  color: var(--bench-gold);
}

.substitution-workbench {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: min(1050px, 94%);
  min-height: 424px;
  padding: 24px;
  border: 1px solid rgba(244, 234, 210, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(111, 72, 52, 0.96), rgba(57, 35, 27, 0.98)),
    repeating-linear-gradient(90deg, rgba(244, 234, 210, 0.08) 0 1px, transparent 1px 76px);
  box-shadow: 0 24px 44px rgba(12, 8, 6, 0.34);
  transform: translateX(-50%);
}

.substitution-workbench__grain {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.16));
}

.substitution-workbench__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 250px;
  gap: 18px;
  align-items: stretch;
}

.value-box,
.answer-counter,
.fitted-seal-panel {
  border: 1px solid rgba(244, 234, 210, 0.18);
  border-radius: 8px;
  background: rgba(244, 234, 210, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.value-box {
  padding: 16px 14px;
}

.value-box__title,
.substitution-slate__label,
.answer-counter__label,
.substitution-line > span,
.substitution-why > span {
  font-family: "Cinzel", serif;
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(33, 26, 23, 0.72);
}

.value-box__tiles {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.value-tile {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 8px;
  border: 1px solid rgba(33, 26, 23, 0.14);
  border-radius: 8px;
  background: #fff7df;
  text-align: center;
}

.value-tile span,
.value-tile strong {
  font-size: 1.28rem;
  line-height: 1;
}

.value-tile span {
  font-family: "Cinzel", serif;
  color: var(--bench-violet);
}

.value-tile strong {
  color: var(--bench-teal);
}

.value-tile b {
  color: rgba(33, 26, 23, 0.62);
}

.substitution-slate {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(244, 234, 210, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(48, 64, 66, 0.98), rgba(20, 29, 30, 0.98));
  color: var(--bench-paper);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.22);
}

.substitution-slate.is-ready {
  box-shadow: 0 0 26px rgba(217, 185, 87, 0.28), inset 0 0 30px rgba(0, 0, 0, 0.22);
}

.substitution-slate__label {
  color: rgba(244, 234, 210, 0.78);
}

.substitution-slate__surface {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid rgba(244, 234, 210, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 185, 87, 0.12), transparent 55%),
    rgba(16, 25, 26, 0.82);
}

.substitution-expression,
.substitution-line__work {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--bench-paper);
  font-family: "Cinzel", serif;
  font-size: 2.35rem;
  line-height: 1.15;
}

.substitution-expression__static,
.substitution-line__static {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.substitution-letter {
  min-width: 54px;
  height: 58px;
  border: 2px solid rgba(244, 234, 210, 0.76);
  border-radius: 8px;
  background: rgba(244, 234, 210, 0.08);
  color: var(--bench-paper);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.substitution-letter:hover,
.substitution-letter:focus-visible {
  border-color: var(--bench-gold);
  background: rgba(217, 185, 87, 0.18);
  transform: translateY(-2px);
  outline: none;
}

.substitution-expression__value,
.substitution-line__value {
  min-width: 54px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(217, 185, 87, 0.18);
  color: #f8dc8a;
  box-shadow: inset 0 0 0 1px rgba(217, 185, 87, 0.32);
  animation: chalkWrite 260ms ease;
}

.substitution-slate__answer {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--bench-gold);
}

.substitution-slate__answer span {
  font-size: 0.74rem;
  text-transform: uppercase;
}

.substitution-slate__answer strong {
  font-size: 1.4rem;
}

.substitution-slate__answer i {
  font-style: normal;
}

.substitution-line {
  min-height: 92px;
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed rgba(244, 234, 210, 0.22);
  border-radius: 8px;
  background: rgba(10, 17, 18, 0.38);
}

.substitution-line__blank {
  display: grid;
  place-items: center;
  min-height: 46px;
  margin-top: 8px;
  color: rgba(244, 234, 210, 0.5);
  font-size: 0.95rem;
}

.substitution-line__work {
  min-height: 58px;
  margin-top: 8px;
  font-size: 1.72rem;
}

.substitution-line__hole {
  width: 48px;
  height: 36px;
  border-bottom: 3px solid rgba(244, 234, 210, 0.48);
}

.substitution-tools {
  display: grid;
  gap: 14px;
  align-content: stretch;
}

.answer-counter {
  padding: 15px;
  text-align: center;
}

.answer-counter__value {
  display: grid;
  place-items: center;
  width: 104px;
  height: 84px;
  margin: 12px auto;
  border: 1px solid rgba(33, 26, 23, 0.16);
  border-radius: 8px;
  background: #fff7df;
  color: var(--bench-stone);
  font-family: "Cinzel", serif;
  font-size: 2.15rem;
  box-shadow: inset 0 3px 8px rgba(33, 26, 23, 0.12);
}

.answer-counter.is-correct .answer-counter__value {
  border-color: rgba(79, 143, 136, 0.56);
  box-shadow: 0 0 16px rgba(79, 143, 136, 0.24), inset 0 3px 8px rgba(33, 26, 23, 0.12);
}

.answer-counter__buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.answer-counter__button {
  min-height: 48px;
  border: 1px solid rgba(33, 26, 23, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff5d8, #e6c878);
  color: var(--bench-ink);
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
}

.answer-counter__button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.answer-counter__hint {
  min-height: 34px;
  margin-top: 10px;
  color: rgba(33, 26, 23, 0.72);
  font-size: 0.86rem;
  line-height: 1.25;
}

.fitted-seal-panel {
  display: grid;
  place-items: center;
  padding: 16px;
}

.fitted-seal {
  position: relative;
  width: 100%;
  min-height: 124px;
  border: 2px solid rgba(33, 26, 23, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, #ede0c1, #d0aa65);
  color: var(--bench-ink);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.fitted-seal:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.fitted-seal.is-ready {
  opacity: 1;
  box-shadow: 0 0 20px rgba(217, 185, 87, 0.42);
}

.fitted-seal.is-ready:hover,
.fitted-seal.is-ready:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.fitted-seal__chalk {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 54px;
  height: 12px;
  border-radius: 999px;
  background: #fff7df;
  transform: rotate(-12deg);
}

.fitted-seal__glyph {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 10px auto 8px;
  border-radius: 50%;
  background: var(--bench-violet);
  color: #fff7df;
  font-family: "Cinzel", serif;
  font-size: 1.8rem;
}

.fitted-seal strong {
  display: block;
  font-size: 0.95rem;
}

.substitution-steps {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.substitution-steps span {
  padding: 7px 10px;
  border: 1px solid rgba(244, 234, 210, 0.18);
  border-radius: 999px;
  background: rgba(22, 17, 15, 0.46);
  color: rgba(244, 234, 210, 0.86);
  font-size: 0.82rem;
}

.substitution-pellan {
  position: absolute;
  right: 34px;
  top: 218px;
  width: 178px;
  height: 270px;
  pointer-events: none;
}

.substitution-pellan__bench {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 56px;
  border-radius: 8px 8px 12px 12px;
  background: linear-gradient(180deg, #896045, #493025);
}

.substitution-pellan__head {
  position: absolute;
  left: 60px;
  top: 10px;
  width: 58px;
  height: 64px;
  border-radius: 42% 42% 48% 48%;
  background: #c78d65;
  box-shadow: inset -8px -6px 0 rgba(108, 63, 43, 0.2);
}

.substitution-pellan__head span {
  position: absolute;
  left: 14px;
  top: 28px;
  width: 30px;
  height: 6px;
  border-radius: 999px;
  background: #3b2a23;
}

.substitution-pellan__body {
  position: absolute;
  left: 43px;
  top: 78px;
  width: 92px;
  height: 118px;
  border-radius: 28px 28px 16px 16px;
  background: linear-gradient(180deg, #6e5b87, #463a5e);
}

.substitution-pellan__arm {
  position: absolute;
  left: 24px;
  top: 108px;
  width: 86px;
  height: 22px;
  border-radius: 999px;
  background: #bd815c;
  transform: rotate(-20deg);
}

.substitution-pellan__chalk {
  position: absolute;
  left: 8px;
  top: 100px;
  width: 30px;
  height: 8px;
  border-radius: 999px;
  background: #fff7df;
  transform: rotate(-20deg);
}

.substitution-pellan__line {
  position: absolute;
  right: 0;
  top: -88px;
  width: 244px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 234, 210, 0.22);
  border-radius: 8px;
  background: rgba(244, 234, 210, 0.94);
  color: var(--bench-ink);
  font-size: 0.94rem;
  line-height: 1.24;
  box-shadow: 0 12px 24px rgba(12, 8, 6, 0.2);
}

.substitution-pellan__line::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: -10px;
  width: 18px;
  height: 18px;
  background: inherit;
  border-right: 1px solid rgba(244, 234, 210, 0.22);
  border-bottom: 1px solid rgba(244, 234, 210, 0.22);
  transform: rotate(45deg);
}

.substitution-celebration {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 18px;
  width: min(720px, calc(100% - 48px));
  padding: 16px 18px;
  border: 1px solid rgba(217, 185, 87, 0.44);
  border-radius: 8px;
  background: rgba(244, 234, 210, 0.98);
  color: var(--bench-ink);
  box-shadow: 0 18px 34px rgba(12, 8, 6, 0.26);
  transform: translateX(-50%);
}

.substitution-celebration > span {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--bench-violet);
}

.substitution-celebration p {
  margin: 6px 0 10px;
}

.substitution-why {
  display: grid;
  gap: 5px;
  margin: 10px 0 12px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(79, 143, 136, 0.12);
}

.substitution-why p {
  margin: 0;
  font-size: 0.92rem;
}

.substitution-bench-room__scene--reward {
  overflow-y: auto;
}

.fitted-reward {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.fitted-reward__card {
  position: relative;
  width: min(900px, 96%);
  padding: 24px;
  border: 1px solid rgba(244, 234, 210, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 185, 87, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(244, 234, 210, 0.98), rgba(228, 207, 163, 0.98));
  color: var(--bench-ink);
  box-shadow: 0 24px 50px rgba(12, 8, 6, 0.32);
}

.fitted-reward__copy span {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--bench-violet);
}

.fitted-reward__copy h2 {
  margin: 4px 0 6px;
  font-family: "Cinzel", serif;
  font-size: 2rem;
  line-height: 1.1;
}

.fitted-reward__copy p {
  max-width: 560px;
  margin: 0;
  color: rgba(33, 26, 23, 0.74);
}

.fitted-reward__slates {
  display: grid;
  grid-template-columns: repeat(6, minmax(76px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.fitted-reward__glyph {
  position: absolute;
  right: 24px;
  top: 24px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle, #f8dc8a 0 38%, #725a88 39% 62%, transparent 63%);
  opacity: 0.92;
}

.fitted-reward__glyph span,
.fitted-reward__glyph i {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: rgba(244, 234, 210, 0.84);
  transform: translate(-50%, -50%) rotate(40deg);
}

.fitted-reward__glyph i {
  transform: translate(-50%, -50%) rotate(-40deg);
}

.fitted-reward__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.fitted-reward__badges span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(79, 143, 136, 0.16);
  color: rgba(33, 26, 23, 0.82);
  font-size: 0.86rem;
}

.fitted-reward .reward-stars {
  margin: 10px 0 16px;
  font-size: 1.5rem;
  color: rgba(33, 26, 23, 0.24);
}

.fitted-reward .reward-stars span.is-filled {
  color: var(--bench-gold);
}

.fitted-reward__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@keyframes substitutionCandle {
  from {
    transform: translateY(0) scaleX(0.88);
  }
  to {
    transform: translateY(-3px) scaleX(1.08);
  }
}

@keyframes chalkWrite {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1060px) {
  .substitution-bench-room__scene {
    height: auto;
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
  }

  .substitution-shelf,
  .substitution-workbench,
  .substitution-pellan {
    position: relative;
    inset: auto;
  }

  .substitution-shelf {
    width: 100%;
    margin: 0 0 18px;
  }

  .substitution-workbench {
    left: auto;
    width: 100%;
    min-height: 0;
    transform: none;
  }

  .substitution-workbench__grid {
    grid-template-columns: 1fr;
  }

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

  .substitution-pellan {
    width: 100%;
    height: 118px;
    margin-top: 18px;
  }

  .substitution-pellan__line {
    left: 190px;
    right: auto;
    top: 16px;
    width: min(420px, calc(100% - 205px));
  }

  .substitution-pellan__bench,
  .substitution-pellan__head,
  .substitution-pellan__body,
  .substitution-pellan__arm,
  .substitution-pellan__chalk {
    transform: scale(0.72);
    transform-origin: left bottom;
  }

  .investigation-arch,
  .substitution-candles {
    display: none;
  }
}

@media (max-width: 760px) {
  .substitution-shelf__slots,
  .fitted-reward__slates {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .substitution-workbench {
    padding: 16px;
  }

  .substitution-expression {
    font-size: 1.8rem;
  }

  .substitution-line__work {
    font-size: 1.36rem;
  }

  .substitution-tools {
    grid-template-columns: 1fr;
  }

  .substitution-pellan {
    display: none;
  }

  .fitted-reward {
    align-items: start;
    padding: 16px;
  }

  .fitted-reward__glyph {
    position: relative;
    right: auto;
    top: auto;
    margin: 12px 0;
  }
}
