.dorm-panel {
  position: absolute;
  inset: 26.3% 19% 17.8% 19.4%;
  border-radius: 1cqw;
  background: linear-gradient(160deg, #ffeac5, #ffdfa9);
  box-shadow: 0 0 0.75cqw 0.25cqw #ffe2b2;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: .65cqw;
  padding: .8cqw 1.03cqw .7cqw;
}

#dorm-heading {
  position: absolute;
  inset: 18.65% auto auto 42%;
  width: 16%;
  height: 5.2%;
  margin: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(#c34c30, #a93723);
  color: #fff3dd;
  font-size: 2.65cqw;
  line-height: 1;
  text-shadow: 0 0.16cqw #652e1e;
}

#dorm-heading:focus {
  outline: none;
}

.dorm-preview {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: .21cqw solid #633418;
  box-shadow: 0 0 0 .15cqw #e4ac63, inset 0 0 0 .12cqw #ffd98a;
  color: #663b27;
  background: #ecc789;
}

#dorm-preview-status {
  position: absolute;
  margin: 0;
  font-size: clamp(9px, 1.6cqw, 22px);
}

.dorm-actions,
.dorm-options {
  display: flex;
  align-items: center;
  gap: .55cqw;
}

.dorm-actions {
  justify-content: space-between;
}

.dorm-button {
  padding: .5cqw .85cqw;
  border: max(1px, .15cqw) solid #6f391c;
  border-radius: .5cqw;
  color: #542d17;
  background: linear-gradient(#ffe4ac, #f2bd74);
  box-shadow: inset 0 0 0 .16cqw #fff0c3, 0 .14cqw #865228;
  font: 750 clamp(9px, 1.51cqw, 22px) / 1.2 system-ui, sans-serif;
  white-space: nowrap;
  touch-action: manipulation;
}

.dorm-button[aria-pressed="true"] {
  color: #fff1c7;
  background: linear-gradient(#8a4d2d, #64371f);
  box-shadow: inset 0 0 0 .15cqw #cf9353, 0 .14cqw #542d17;
}

.dorm-move-in {
  padding-inline: 1.35cqw;
  background: linear-gradient(#ffde7b, #efa83a);
}

.dorm-button:disabled { opacity: .65; }
.dorm-button:focus-visible {
  outline: max(2px, .3cqw) solid #215e88;
  outline-offset: max(1px, .15cqw);
}


.residence-scene {
  --scene-ratio: 1672 / 819;
  aspect-ratio: var(--scene-ratio);
  overflow: clip;
}

.residence-scene:focus { outline: none; }

.dorm-street-artwork {
  position: absolute;
  inset: auto 0 0;
  container-type: inline-size;
}

.dorm-street-artwork img {
  display: block;
  width: 100%;
  height: auto;
}

/* The crop removes the sample toolbar baked into each source image. */
.dorm-preview .dorm-street-artwork {
  clip-path: inset(13% 0 0);
}

.dorm-street-artwork[data-area="yau-ma-tei"] {
  --sign-x: 58.3%;
  --sign-y: 38.5%;
  --sign-width: 11.9%;
  --sign-height: 5.3%;
  --sign-text-width: 11.1cqw;
  --sign-color: #79352a;
}

.dorm-street-artwork[data-area="sham-shui-po"] {
  --sign-x: 57.1%;
  --sign-y: 42.35%;
  --sign-width: 12.9%;
  --sign-height: 5.4%;
  --sign-text-width: 12.1cqw;
  --sign-color: #78372a;
}

.dorm-street-artwork[data-area="yuen-long"] {
  --sign-x: 54.2%;
  --sign-y: 40.35%;
  --sign-width: 17.1%;
  --sign-height: 6.45%;
  --sign-text-width: 16.3cqw;
  --sign-color: #773020;
}

.dorm-nameplate {
  position: absolute;
  top: var(--sign-y);
  left: var(--sign-x);
  width: var(--sign-width);
  height: var(--sign-height);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #ffe5a8;
  background: var(--sign-color);
  font: 750 min(2.16cqw, calc(var(--sign-text-width) / var(--name-length))) / 1 system-ui, sans-serif;
  text-shadow: 0 .08cqw #57271a;
  white-space: nowrap;
  pointer-events: none;
}
