.ostia-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(15px, 2vw, 32px);
  align-items: start;
}
.ostia-setting {
  overflow: hidden;
  border: 1px solid #70624e;
  border-radius: 6px;
  background: #1c292b;
}
.ostia-picture {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #273133;
}
.ostia-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ostia-caption {
  padding: clamp(18px, 2.2vw, 32px);
}
.ostia-caption h2 {
  font: 400 clamp(29px, 3.5vw, 48px) / 1.1 var(--serif);
  letter-spacing: -0.035em;
  margin: 8px 0 10px;
}
.ostia-caption p:last-of-type {
  color: var(--muted);
  max-width: 65ch;
}
.ostia-workspace .case-heading h1 {
  color: #ffedcf;
}
.ostia-workspace .wide-panel {
  background: linear-gradient(140deg, #243036, #19272b);
}
.ostia-desk h3 {
  font: 400 clamp(24px, 2.2vw, 34px) / 1.15 var(--serif);
  margin: 0 0 14px;
}
.ostia-desk > p,
.ostia-reading p {
  color: var(--muted);
  margin: 9px 0 14px;
}
.ostia-desk .primary {
  margin-top: 18px;
}
.ostia-paper {
  position: relative;
  background: linear-gradient(110deg, #f1e1bf, #ddcfad);
  color: #352d24;
  border: 1px solid #beae87;
  border-left: 5px solid #a68252;
  border-radius: 2px;
  padding: 16px 18px;
  margin: 13px 0;
}
.ostia-paper small,
.wax-tablet small {
  display: block;
  font: 600 10px/1.45 var(--mono);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.ostia-paper strong {
  display: block;
  font: 600 clamp(18px, 2vw, 25px) / 1.3 var(--mono);
}
.ostia-paper p,
.end-card .ostia-paper p {
  color: #463b2e;
  line-height: 1.42;
  margin: 8px 0 0;
}
.ostia-desk fieldset {
  margin-top: 15px;
}
.ostia-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: #203136;
  border-radius: 3px;
  padding: 10px 12px;
  margin: 5px 0;
  cursor: pointer;
}
.ostia-choice:has(input:checked) {
  border-color: var(--gold);
  background: #343a34;
}
.ostia-choice input {
  accent-color: var(--red);
  height: 18px;
  width: 18px;
}
.ostia-choice small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.ostia-select {
  display: block;
  margin-top: 13px;
  font-weight: 600;
}
.ostia-select select {
  margin-top: 5px;
  font-weight: 400;
  max-width: none;
}
.ostia-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ostia-join {
  margin: 13px 0 8px;
  border: 1px solid #776d58;
  padding: 6px;
  background: #172021;
}
.ostia-join-frame {
  margin: auto;
  position: relative;
  max-height: 240px;
  aspect-ratio: 1.5;
  overflow: hidden;
  background: #141718;
}
.ostia-fixed,
.ostia-piece img {
  display: block;
  position: absolute;
  height: 100%;
  max-width: none;
}
.ostia-fixed {
  left: 0;
  width: 100%;
  clip-path: inset(0 50% 0 0);
}
.ostia-piece {
  position: absolute;
  inset: 0 0 0 50%;
  overflow: hidden;
  border-left: 1px dashed #f7d49a;
}
.ostia-piece img {
  right: 0;
  width: 200%;
}
.ostia-join figcaption {
  font: 11px/1.5 var(--mono);
  letter-spacing: 0.04em;
  color: var(--gold);
  padding: 7px 4px 0;
  text-align: center;
}
.ostia-offset {
  display: flex;
  justify-content: space-between;
  color: var(--paper);
  font-weight: 600;
}
.ostia-offset output {
  font: 600 14px var(--mono);
  color: var(--gold);
}
.ostia-desk .join-reading,
.ostia-fine {
  font-size: 14px;
  color: #c9c5b3;
}
.ostia-survey p {
  font-size: 15px;
  margin-top: 6px;
  line-height: 1.4;
}
.wax-tablet {
  background: linear-gradient(125deg, #654633, #3b2821);
  color: #f5dbb4;
  border: 7px ridge #956444;
  border-radius: 3px;
  padding: 20px 15px;
  margin: 16px 0;
  text-align: center;
}
.wax-tablet strong {
  font:
    400 clamp(19px, 2.2vw, 31px) Georgia,
    serif;
  letter-spacing: 0.07em;
}
.ostia-reading {
  max-width: 940px;
}
.ostia-desk .table-note {
  font-size: clamp(13px, 1.2vw, 17px);
}
.table-note caption {
  text-align: left;
  color: var(--gold);
  margin: 12px 0 6px;
}
.ostia-witnesses {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 17px;
}
.ostia-witnesses .secondary {
  font-size: 14px;
  min-height: 40px;
  padding: 8px 12px;
}
@media (max-width: 850px) {
  .ostia-stage {
    grid-template-columns: 1fr;
  }
  .ostia-picture {
    max-height: 320px;
  }
  .ostia-join-frame {
    max-height: 270px;
  }
}
@media (max-width: 550px) {
  .ostia-stage {
    gap: 12px;
  }
  .ostia-picture {
    max-height: 200px;
  }
  .ostia-pair {
    grid-template-columns: 1fr;
  }
  .ostia-workspace .tab {
    font-size: 14px;
  }
  .ostia-desk .table-note th,
  .ostia-desk .table-note td {
    padding: 6px 2px;
  }
  .ostia-join-frame {
    max-height: 190px;
  }
}

.ostia-reconstruction img {
  transform: scaleX(-1);
}
