[data-problem-id="54"] {
  --screen-ink: #292638;
  --screen-violet: #58487a;
  --screen-brass: #b9853f;
  --screen-mist: #ece8f2;
  --screen-panel: #786997;
}

[data-problem-id="54"] .screen-intro {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 1.1rem;
  align-items: stretch;
}

[data-problem-id="54"] .screen-setup {
  border-left: 0.34rem solid var(--screen-brass);
  background: linear-gradient(135deg, #f5f0e4, #f1eef7 76%);
}

[data-problem-id="54"] .screen-setup p {
  margin: 0.44rem 0 0;
}

[data-problem-id="54"] .screen-hero {
  margin: 0;
  overflow: hidden;
  border: 2px solid #746d82;
  border-radius: 0.7rem;
  background: #d7d2df;
}

[data-problem-id="54"] .screen-hero img {
  display: block;
  width: 100%;
  height: 11.7rem;
  object-fit: cover;
  object-position: center 41%;
}

[data-problem-id="54"] .screen-hero figcaption {
  padding: 0.35rem 0.55rem;
  color: #514b5d;
  background: #f4f1f7;
  font-size: 0.78rem;
  line-height: 1.25;
}

[data-problem-id="54"] .screen-question {
  margin-top: 0.9rem;
}

[data-problem-id="54"] .screen-workspace {
  display: grid;
  grid-template-columns: 1fr auto 1.12fr;
  gap: 1rem;
  align-items: center;
  margin-top: 0.8rem;
  padding: 0.9rem;
  border: 2px solid #aaa1b5;
  border-radius: 0.7rem;
  background: #fbfafc;
}

[data-problem-id="54"] .panel-figure {
  margin: 0;
}

[data-problem-id="54"] .panel-figure figcaption {
  margin-bottom: 0.55rem;
  color: var(--screen-violet);
  font-weight: 800;
  text-align: center;
}

[data-problem-id="54"] .panel-grid--original {
  display: grid;
  grid-template-columns: repeat(5, 2.65rem);
  grid-template-rows: repeat(2, 2.65rem);
  justify-content: center;
}

[data-problem-id="54"] .panel-cell {
  width: 2.65rem;
  height: 2.65rem;
  box-sizing: border-box;
}

[data-problem-id="54"] .panel-cell--filled {
  border: 2px solid #332b45;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.3), transparent 46%),
    var(--screen-panel);
}

[data-problem-id="54"] .panel-cell--gap {
  border: 1px dashed #bbb4c3;
  background: repeating-linear-gradient(135deg, #faf9fb 0, #faf9fb 0.34rem, #f0edf3 0.36rem, #f0edf3 0.7rem);
}

[data-problem-id="54"] .measure-tags {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  font-size: 0.75rem;
  font-weight: 800;
}

[data-problem-id="54"] .measure-tags span {
  padding: 0.24rem 0.42rem;
  border: 1px solid #82778d;
  border-radius: 999px;
  background: #fff;
}

[data-problem-id="54"] .workspace-arrow {
  color: var(--screen-brass);
  font-size: 2rem;
  font-weight: 900;
}

[data-problem-id="54"] .reconstruction-grid {
  display: grid;
  grid-template-columns: repeat(6, 1.82rem);
  grid-template-rows: repeat(4, 1.82rem);
  justify-content: center;
}

[data-problem-id="54"] .reconstruction-grid span {
  border-right: 1px solid #91899a;
  border-bottom: 1px solid #91899a;
}

[data-problem-id="54"] .reconstruction-grid span:nth-child(-n+6) {
  border-top: 1px solid #91899a;
}

[data-problem-id="54"] .reconstruction-grid span:nth-child(6n+1) {
  border-left: 1px solid #91899a;
}

[data-problem-id="54"] .grid-note {
  margin: 0.42rem 0 0;
  color: #5d5664;
  font-size: 0.78rem;
  text-align: center;
}

[data-problem-id="54"] .screen-continue {
  margin: 0.8rem 0 0;
  padding: 0.55rem 0.75rem;
  border-top: 2px solid #d2b06d;
  color: #5b4a2d;
  background: #fbf5e8;
  font-weight: 750;
  text-align: center;
}

[data-problem-id="54"] .screen-page-two {
  margin-top: 1rem;
}

[data-problem-id="54"] .screen-reminder {
  margin-bottom: 0.9rem;
  padding: 0.72rem 0.9rem;
  border: 2px solid var(--screen-brass);
  border-radius: 0.65rem;
  background: #fbf5e8;
}

[data-problem-id="54"] .measure-answer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin: 0.8rem 0;
}

[data-problem-id="54"] .measure-answer-grid > div {
  min-height: 5.2rem;
  padding: 0.7rem;
  border: 2px solid #93899d;
  border-radius: 0.55rem;
  background: #fbfafc;
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: flex-end;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
}

[data-problem-id="54"] .screen-field {
  display: inline-block;
  width: 4rem;
  height: 1.65rem;
  border: 2px solid var(--screen-ink);
  border-radius: 0.25rem;
  background: #fff;
}

[data-problem-id="54"] .screen-field--small {
  width: 2.8rem;
}

[data-problem-id="54"] .calculation-space {
  min-height: 3.2rem;
  border-bottom: 1px solid #a7a0ad;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 1.42rem, #b7b0bd 1.46rem, transparent 1.5rem);
}

[data-problem-id="54"] .neighbor-organizer {
  display: grid;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

[data-problem-id="54"] .neighbor-organizer > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  padding: 0.55rem 0.65rem;
  border-left: 0.28rem solid var(--screen-violet);
  background: var(--screen-mist);
}

[data-problem-id="54"] .neighbor-label {
  width: 7rem;
  color: var(--screen-violet);
  font-weight: 800;
}

[data-problem-id="54"] .writing-lines {
  border-radius: 0.35rem;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 1.42rem, #aaa3b0 1.46rem, transparent 1.5rem);
}

[data-problem-id="54"] .writing-lines--five {
  height: 7.55rem;
}

@media (max-width: 760px) {
  [data-problem-id="54"] .screen-intro,
  [data-problem-id="54"] .screen-workspace,
  [data-problem-id="54"] .measure-answer-grid {
    grid-template-columns: 1fr;
  }

  [data-problem-id="54"] .workspace-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }
}

@media print {
  [data-problem-id="54"] .screen-intro {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: start;
    gap: 0.12in;
  }

  [data-problem-id="54"] .screen-workspace {
    grid-template-columns: 1fr auto 1.12fr;
  }

  [data-problem-id="54"] .measure-answer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  [data-problem-id="54"] .workspace-arrow {
    transform: none;
  }

  [data-problem-id="54"] .screen-setup {
    margin-bottom: 0;
    padding: 0.1in 0.12in;
  }

  [data-problem-id="54"] .problem-content .screen-setup p {
    margin-top: 0.035in;
    font-size: 0.15in;
    line-height: 1.3;
  }

  [data-problem-id="54"] .screen-question {
    margin-top: 0.11in;
    padding: 0.1in 0.12in;
  }

  [data-problem-id="54"] .screen-question {
    min-height: 4.08in;
    box-sizing: border-box;
  }

  [data-problem-id="54"] .problem-content .screen-question .problem-part p {
    font-size: 0.17in;
    line-height: 1.3;
  }

  [data-problem-id="54"] .screen-workspace {
    gap: 0.1in;
    margin-top: 0.07in;
    padding: 0.09in;
  }

  [data-problem-id="54"] .screen-page-two {
    break-before: page;
    page-break-before: always;
    margin-top: 0;
    padding: 0.1in 0.12in;
    min-height: 9.05in;
    box-sizing: border-box;
  }

  [data-problem-id="54"] .screen-hero img {
    height: 2.08in;
  }

  [data-problem-id="54"] .screen-hero figcaption {
    padding: 0.035in 0.06in;
    font-size: 0.125in;
  }

  [data-problem-id="54"] .screen-reminder {
    margin-bottom: 0.07in;
    padding: 0.08in 0.11in;
    font-size: 0.155in;
    line-height: 1.32;
  }

  [data-problem-id="54"] .screen-page-two .problem-part {
    padding-top: 0.07in;
    padding-bottom: 0.07in;
  }

  [data-problem-id="54"] .problem-content .screen-page-two .problem-part p {
    font-size: 0.16in;
    line-height: 1.3;
  }

  [data-problem-id="54"] .measure-answer-grid {
    gap: 0.08in;
    margin: 0.07in 0;
  }

  [data-problem-id="54"] .measure-answer-grid > div {
    min-height: 1in;
    padding: 0.07in;
    font-size: 0.15in;
    line-height: 1.25;
  }

  [data-problem-id="54"] .calculation-space {
    min-height: 0.82in;
  }

  [data-problem-id="54"] .neighbor-organizer {
    gap: 0.035in;
    margin: 0.07in 0;
    font-size: 0.145in;
    line-height: 1.25;
  }

  [data-problem-id="54"] .neighbor-organizer > div {
    gap: 0.035in;
    min-height: 0.58in;
    box-sizing: border-box;
    padding: 0.07in 0.08in;
  }

  [data-problem-id="54"] .writing-lines--five {
    height: 2.55in;
  }

  [data-problem-id="54"] .problem-content .screen-continue {
    margin: 0.12in 0 0;
    padding: 0.075in 0.1in;
    font-size: 0.145in;
    line-height: 1.25;
  }

  [data-problem-id="54"] .screen-intro,
  [data-problem-id="54"] .screen-workspace,
  [data-problem-id="54"] .problem-part,
  [data-problem-id="54"] .neighbor-organizer {
    break-inside: avoid;
  }
}
