.expression-scriptorium-page {
  --scriptorium-ink: #1f1815;
  --scriptorium-umber: #3f261c;
  --scriptorium-wood: #6b3f29;
  --scriptorium-candle: #e5c76a;
  --scriptorium-gold: #d4af37;
  --scriptorium-paper: #f5edd8;
  --scriptorium-slate: #263538;
  --scriptorium-slate-dark: #141d20;
  --scriptorium-terracotta: #b56643;
  color: var(--scriptorium-ink);
}

.expression-scriptorium-topbar {
  border-color: rgba(229, 199, 106, 0.28);
}

.scriptorium-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.2);
}

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

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

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

.scriptorium-progress__dot.is-current {
  background: var(--scriptorium-paper);
  box-shadow: 0 0 0 3px rgba(229, 199, 106, 0.22);
}

.scriptorium-progress__dot.is-filled {
  border-color: rgba(245, 237, 216, 0.9);
  background: var(--scriptorium-candle);
  box-shadow: 0 0 12px rgba(229, 199, 106, 0.48);
}

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

.expression-scriptorium-room__scene {
  position: relative;
  min-height: 700px;
  overflow: hidden;
  border: 1px solid rgba(245, 237, 216, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 32% 18%, rgba(229, 199, 106, 0.2), transparent 18%),
    radial-gradient(circle at 78% 26%, rgba(229, 199, 106, 0.16), transparent 20%),
    linear-gradient(180deg, #41251c 0%, #281914 50%, #15100e 100%);
  box-shadow: 0 24px 60px rgba(15, 11, 8, 0.38);
  isolation: isolate;
}

.expression-scriptorium-room__scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.28)),
    repeating-linear-gradient(90deg, rgba(245, 237, 216, 0.04) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(0deg, rgba(245, 237, 216, 0.025) 0 1px, transparent 1px 72px);
}

.expression-scriptorium-room__scene::after {
  content: "";
  position: absolute;
  left: -7%;
  right: -7%;
  bottom: -105px;
  height: 260px;
  z-index: -1;
  background:
    repeating-linear-gradient(90deg, rgba(245, 237, 216, 0.05) 0 2px, transparent 2px 84px),
    linear-gradient(180deg, #6a442d 0%, #291811 100%);
  transform: perspective(720px) rotateX(44deg);
  transform-origin: bottom;
}

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

.scriptorium-candles span {
  position: absolute;
  bottom: 0;
  width: 20px;
  height: 78px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #f7e7b3, #d0aa65);
  box-shadow: 0 0 38px rgba(229, 199, 106, 0.52);
}

.scriptorium-candles span::before {
  content: "";
  position: absolute;
  left: 6px;
  top: -24px;
  width: 9px;
  height: 24px;
  border-radius: 50% 50% 50% 50%;
  background: radial-gradient(circle at 50% 65%, #fff4a7, #e68a34 70%);
  animation: candleFlicker 1300ms ease-in-out infinite alternate;
}

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

.scriptorium-candles span:nth-child(2) {
  left: 18%;
  height: 98px;
}

.scriptorium-candles span:nth-child(3) {
  right: 11%;
  height: 86px;
}

.slate-bench-arch {
  position: absolute;
  top: 166px;
  left: 4%;
  width: 116px;
  height: 178px;
  border: 8px solid rgba(47, 31, 23, 0.94);
  border-bottom: 0;
  border-radius: 58px 58px 4px 4px;
  background: linear-gradient(180deg, #171311, #0f0c0b);
  box-shadow: inset 0 0 26px rgba(229, 199, 106, 0.08), 0 16px 30px rgba(10, 7, 5, 0.24);
}

.slate-bench-arch span,
.slate-bench-arch i,
.slate-bench-arch b {
  position: absolute;
  display: block;
  background: rgba(245, 237, 216, 0.74);
}

.slate-bench-arch span {
  left: 26px;
  top: 58px;
  width: 62px;
  height: 38px;
  border-radius: 3px;
  background: #27383b;
  transform: rotate(4deg);
}

.slate-bench-arch i {
  left: 34px;
  top: 104px;
  width: 48px;
  height: 7px;
  border-radius: 999px;
  background: rgba(229, 199, 106, 0.52);
}

.slate-bench-arch b {
  left: 24px;
  top: 130px;
  width: 66px;
  height: 12px;
  border-radius: 999px;
  background: rgba(245, 237, 216, 0.56);
}

.scriptorium-shelf {
  position: absolute;
  top: 54px;
  right: 5%;
  width: min(610px, 58%);
  color: var(--scriptorium-paper);
}

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

.scriptorium-shelf__slots {
  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(80, 47, 30, 0.95), rgba(43, 26, 19, 0.96)),
    repeating-linear-gradient(90deg, rgba(245, 237, 216, 0.035) 0 2px, transparent 2px 28px);
  box-shadow: inset 0 -8px 0 rgba(18, 11, 8, 0.35), 0 20px 35px rgba(10, 7, 5, 0.22);
}

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

.scriptorium-shelf__slot.is-current {
  border-color: rgba(229, 199, 106, 0.5);
}

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

.phrase-tablet {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  width: 78px;
  min-height: 88px;
  padding: 12px 7px 8px;
  border: 1px solid rgba(84, 47, 30, 0.24);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 252, 236, 0.96), rgba(230, 206, 162, 0.92)),
    repeating-linear-gradient(0deg, rgba(31, 24, 21, 0.08) 0 1px, transparent 1px 13px);
  color: rgba(31, 24, 21, 0.78);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.16);
  transform: rotate(-1deg);
}

.phrase-tablet.is-filled {
  animation: tabletCopy 420ms ease both;
}

.phrase-tablet__pins {
  position: absolute;
  top: 5px;
  left: 9px;
  right: 9px;
  display: flex;
  justify-content: space-between;
}

.phrase-tablet__pins span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--scriptorium-gold);
  box-shadow: inset 0 0 0 1px rgba(31, 24, 21, 0.18);
}

.phrase-tablet strong {
  max-width: 64px;
  font-family: "Spectral", Georgia, serif;
  font-size: 0.62rem;
  line-height: 1.04;
  text-align: center;
}

.phrase-tablet em {
  margin-top: 5px;
  color: #5b301f;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.scriptorium-desk {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 3;
  width: min(900px, 78%);
  padding: 18px 18px 20px;
  border: 1px solid rgba(245, 237, 216, 0.14);
  border-radius: 10px;
  background:
    radial-gradient(circle at 16% 30%, rgba(229, 199, 106, 0.14), transparent 25%),
    linear-gradient(180deg, #72472d, #351f17);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
}

.scriptorium-desk__grain {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    repeating-linear-gradient(0deg, rgba(245, 237, 216, 0.035) 0 2px, transparent 2px 28px),
    repeating-linear-gradient(90deg, rgba(31, 24, 21, 0.08) 0 1px, transparent 1px 96px);
  pointer-events: none;
}

.scriptorium-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 14px;
  z-index: 1;
}

.scriptorium-board__main {
  display: grid;
  gap: 12px;
}

.story-parchment {
  min-height: 190px;
  padding: 18px;
  border: 1px solid rgba(31, 24, 21, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.1), transparent 38%),
    linear-gradient(180deg, #fff7df, #ead6a6);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.16), 0 16px 24px rgba(0, 0, 0, 0.18);
}

.story-parchment__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: rgba(31, 24, 21, 0.72);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.story-parchment__lines {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--scriptorium-ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 1.16rem;
  line-height: 1.45;
}

.story-phrase {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 10px;
  border: 2px solid rgba(212, 175, 55, 0.64);
  border-radius: 999px;
  background: rgba(255, 248, 222, 0.64);
  color: var(--scriptorium-ink);
  cursor: pointer;
  font: inherit;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
  transition: opacity 180ms ease, transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.story-phrase:hover:not(:disabled),
.story-phrase:focus-visible:not(:disabled) {
  border-color: rgba(229, 199, 106, 0.95);
  background: rgba(255, 251, 231, 0.9);
  transform: translateY(-2px);
}

.story-phrase.is-translated {
  border-color: rgba(31, 24, 21, 0.12);
  background: rgba(245, 237, 216, 0.24);
  color: rgba(31, 24, 21, 0.28);
  cursor: default;
  opacity: 0.42;
  transform: translateY(2px);
}

.story-phrase.is-locked {
  opacity: 0.5;
}

.expression-slate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(245, 237, 216, 0.12);
  border-radius: 8px;
  background: rgba(31, 24, 21, 0.5);
}

.expression-slate__label {
  grid-column: 1 / -1;
  color: rgba(245, 237, 216, 0.78);
  font-family: "Cinzel", serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.expression-slate__surface {
  display: grid;
  min-height: 82px;
  padding: 16px 18px;
  border: 4px solid rgba(31, 24, 21, 0.34);
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, var(--scriptorium-slate), var(--scriptorium-slate-dark));
  place-items: center start;
  box-shadow: inset 0 0 0 2px rgba(245, 237, 216, 0.06);
}

.expression-slate__expression {
  color: #f6f0df;
  font-family: "Spectral", Georgia, serif;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  animation: slateTokenSettle 240ms ease both;
}

.expression-slate__placeholder {
  color: rgba(245, 237, 216, 0.42);
  font-family: "Spectral", Georgia, serif;
  font-size: 1rem;
}

.scriptorium-lock {
  min-width: 146px;
  min-height: 82px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: rgba(245, 237, 216, 0.34);
  color: rgba(31, 24, 21, 0.54);
  cursor: default;
  font-family: "Cinzel", serif;
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
}

.scriptorium-lock.is-ready {
  background: linear-gradient(180deg, #f2d36f, #b87739);
  color: #221511;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(229, 199, 106, 0.38);
  animation: lockPulse 1000ms ease-in-out infinite;
}

.expression-slate.is-locked .scriptorium-lock {
  animation: none;
}

.translation-key {
  align-self: stretch;
  padding: 14px;
  border: 1px solid rgba(31, 24, 21, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 225, 0.96), rgba(224, 190, 130, 0.94));
  box-shadow: 0 16px 24px rgba(0, 0, 0, 0.16);
}

.translation-key__title {
  margin-bottom: 12px;
  color: rgba(31, 24, 21, 0.76);
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
}

.translation-key__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(31, 24, 21, 0.1);
  color: rgba(31, 24, 21, 0.72);
  font-family: "Spectral", Georgia, serif;
  font-weight: 800;
}

.translation-key__row:first-of-type {
  border-top: 0;
}

.translation-key__row i {
  color: rgba(31, 24, 21, 0.34);
  font-style: normal;
}

.translation-key__row strong {
  min-width: 32px;
  color: #5b301f;
  text-align: right;
}

.scriptorium-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(700px, 100%);
  margin: 12px auto 0;
}

.scriptorium-steps span {
  padding: 8px 10px;
  border: 1px solid rgba(245, 237, 216, 0.14);
  border-radius: 999px;
  background: rgba(31, 24, 21, 0.5);
  color: rgba(245, 237, 216, 0.78);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.scriptorium-pellan {
  position: absolute;
  right: 3%;
  bottom: 68px;
  z-index: 2;
  width: 160px;
  height: 270px;
}

.scriptorium-pellan__head {
  position: absolute;
  top: 0;
  left: 50px;
  width: 58px;
  height: 66px;
  border-radius: 44% 44% 48% 48%;
  background: #a97962;
  box-shadow: inset 0 -8px 0 rgba(77, 48, 38, 0.18);
}

.scriptorium-pellan__head::before {
  content: "";
  position: absolute;
  inset: -9px 6px 30px;
  border-radius: 28px 28px 10px 10px;
  background: #2b1a15;
}

.scriptorium-pellan__head span {
  position: absolute;
  left: 13px;
  top: 34px;
  width: 34px;
  height: 7px;
  border-top: 2px solid rgba(31, 24, 21, 0.9);
  border-bottom: 2px solid rgba(31, 24, 21, 0.3);
}

.scriptorium-pellan__body {
  position: absolute;
  top: 70px;
  left: 28px;
  width: 100px;
  height: 154px;
  border-radius: 30px 30px 18px 18px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(229, 199, 106, 0.72) 48% 53%, transparent 53%),
    linear-gradient(180deg, #f0d7a5, #a95f3d);
}

.scriptorium-pellan__arm {
  position: absolute;
  left: 18px;
  top: 126px;
  width: 80px;
  height: 18px;
  border-radius: 999px;
  background: #a97962;
  transform: rotate(-18deg);
}

.scriptorium-pellan__ink {
  position: absolute;
  left: 44px;
  top: 130px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(31, 24, 21, 0.62);
  box-shadow: 18px 7px 0 rgba(31, 24, 21, 0.36), 46px -1px 0 rgba(31, 24, 21, 0.26);
}

.scriptorium-pellan__line {
  position: absolute;
  right: 94px;
  bottom: 20px;
  width: 240px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 237, 216, 0.18);
  border-radius: 8px;
  background: rgba(245, 237, 216, 0.96);
  color: rgba(31, 24, 21, 0.78);
  font-family: "Spectral", Georgia, serif;
  font-size: 0.96rem;
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18);
}

.expression-scriptorium-room__scene--retry .story-parchment {
  animation: parchmentRetry 360ms ease both;
}

.scriptorium-celebration {
  position: relative;
  z-index: 1;
  width: min(560px, 94%);
  margin: 12px auto 0;
  padding: 14px 18px;
  border: 1px solid rgba(229, 199, 106, 0.34);
  border-radius: 7px;
  background: rgba(245, 237, 216, 0.97);
  box-shadow: 0 18px 30px rgba(13, 9, 7, 0.22);
  text-align: center;
  animation: phraseCelebrate 260ms ease both;
}

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

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

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

.phrase-reward__card {
  width: min(850px, 94%);
  padding: 28px;
  border: 1px solid rgba(229, 199, 106, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(181, 102, 67, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 250, 236, 0.98), rgba(232, 213, 174, 0.98));
  box-shadow: 0 28px 60px rgba(7, 5, 4, 0.42);
}

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

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

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

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

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

.phrase-reward__tablets .phrase-tablet {
  width: 104px;
  min-height: 116px;
  margin: 0 auto;
}

.phrase-reward__token {
  position: relative;
  display: grid;
  width: 94px;
  height: 46px;
  margin: -4px auto 18px;
  border: 3px solid rgba(31, 24, 21, 0.14);
  border-radius: 7px;
  background: linear-gradient(180deg, #f5edd8, #d9b868);
  place-items: center;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.12), 0 12px 18px rgba(0, 0, 0, 0.16);
}

.phrase-reward__token span {
  display: block;
  width: 56px;
  height: 3px;
  border-radius: 999px;
  background: rgba(31, 24, 21, 0.54);
}

.phrase-reward__token span + span {
  margin-top: -14px;
  width: 38px;
}

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

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

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

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

.phrase-reward .reward-stars span.is-filled {
  color: var(--scriptorium-candle);
}

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

@keyframes candleFlicker {
  0% {
    opacity: 0.7;
    transform: translateX(-1px) scaleY(0.92);
  }
  100% {
    opacity: 1;
    transform: translateX(1px) scaleY(1.06);
  }
}

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

@keyframes lockPulse {
  0%, 100% {
    box-shadow: 0 0 14px rgba(229, 199, 106, 0.32);
  }
  50% {
    box-shadow: 0 0 28px rgba(229, 199, 106, 0.58);
  }
}

@keyframes parchmentRetry {
  0%, 100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-8px);
  }
  60% {
    transform: translateX(8px);
  }
}

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

@keyframes tabletCopy {
  0% {
    opacity: 0.72;
    transform: translateY(10px) rotate(-4deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(-1deg);
  }
}

@media (max-width: 980px) {
  .expression-scriptorium-room__scene {
    min-height: 990px;
  }

  .slate-bench-arch {
    display: none;
  }

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

  .scriptorium-shelf__slots {
    gap: 6px;
    padding: 8px;
  }

  .scriptorium-shelf__slot {
    min-height: 92px;
    padding: 4px;
  }

  .phrase-tablet {
    width: 68px;
    min-height: 80px;
  }

  .scriptorium-desk {
    bottom: 26px;
    width: min(780px, 92%);
  }

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

  .translation-key {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .translation-key__title {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .translation-key__row {
    border-top: 1px solid rgba(31, 24, 21, 0.1);
  }

  .scriptorium-pellan {
    display: none;
  }

  .phrase-reward {
    position: relative;
    min-height: 820px;
    padding: 20px;
  }
}

@media (max-width: 680px) {
  .expression-scriptorium-room__scene {
    min-height: 1160px;
    border-radius: 0;
  }

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

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

  .scriptorium-shelf__slot {
    min-height: 82px;
  }

  .scriptorium-desk {
    bottom: 16px;
    width: 94%;
    padding: 14px 12px;
  }

  .story-parchment {
    padding: 14px;
  }

  .story-parchment__header {
    display: grid;
  }

  .story-parchment__lines {
    font-size: 1.02rem;
  }

  .story-phrase {
    width: 100%;
    justify-content: center;
    border-radius: 8px;
  }

  .expression-slate {
    grid-template-columns: 1fr;
  }

  .scriptorium-lock {
    min-height: 54px;
  }

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

  .scriptorium-steps {
    grid-template-columns: 1fr;
  }

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

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

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

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