#room.receiving {
  --stage-width: min(100vw, 177.7778dvh);
  --stage-height: calc(var(--stage-width) * .5625);
  --stage-top: calc((100dvh - var(--stage-height)) * .5);
  --stage-left: calc((100vw - var(--stage-width)) * .5);
  --ledge: calc(var(--stage-top) + var(--stage-height) * .71);
  background: #211208;
}
#room.receiving > :is(.beam, #window, .sill, #tool-dock, .room-finish) { visibility: hidden; }
#room.receiving #table { background: transparent; box-shadow: none; pointer-events: none; }
.receiving:not(.file-open) #props { visibility: hidden; }
.receiving #props { z-index: 25; }

#reception-stage, .reception-tools {
  position: absolute; left: var(--stage-left); top: var(--stage-top);
  width: var(--stage-width); aspect-ratio: 16 / 9; container-type: inline-size; isolation: isolate; overflow: hidden;
}
#reception-stage { z-index: 3; pointer-events: none; }
.reception-backdrop, .reception-mask, .reception-actors, #atmosphere-canvas { position: absolute; inset: 0; pointer-events: none; }
.reception-backdrop, .reception-mask, #atmosphere-canvas { width: 100%; height: 100%; }
#atmosphere-canvas { z-index: 0; }
.reception-backdrop { object-fit: cover; }
.reception-mask { inset: .13889% auto auto .15625%; width: 100.078125%; height: 100.27778%; object-fit: contain; z-index: 2; }
.reception-actors { clip-path: inset(0 50% 0 0); z-index: 1; }
#room.conflict-flash::after {
  content: ""; position: absolute; inset: 0; z-index: 41; pointer-events: none;
  background: radial-gradient(circle at 46% 52%, #b72e1f48, transparent 62%);
  animation: conflict-flash .55s ease-out forwards;
}
@keyframes conflict-flash { from { opacity: 1; } to { opacity: 0; } }
#reception-stage .portrait {
  position: absolute; left: 13.515625%; top: 8.19444%; bottom: auto;
  width: 26.015625%; height: 79.72222%; filter: none; translate: none;
  animation: reception-enter 1s ease both;
}
#reception-stage .portrait img, #reception-stage .portrait .puppet-svg svg { object-position: center; }
#reception-stage .portrait:not(:has(img:not([hidden]), .puppet-svg:not([hidden]))) { left: 17.82%; width: 17.4%; }
#reception-stage .portrait .puppet-svg { animation: puppet-sway 4.4s ease-in-out infinite; transform-origin: 50% 92%; }
#room.caught #reception-stage .portrait .puppet-svg { filter: saturate(.84) contrast(1.06); }
@keyframes puppet-sway { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(.55deg) translateY(-1.5px); } }
#room[data-verdict="admitted"] #reception-stage .portrait { animation: reception-exit-right .65s ease-in both; }
#room[data-verdict="refused"] #reception-stage .portrait { animation: reception-exit-left .65s ease-in both; }
@keyframes reception-enter { from { transform: translateX(-28.83%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes reception-exit-right { to { transform: translateX(135%); opacity: 0; } }
@keyframes reception-exit-left { to { transform: translateX(-150%); opacity: 0; } }

.reception-tools { --unit: .078125cqw; z-index: 16; pointer-events: none; }
.reception-tools .reception-tool {
  position: absolute; left: calc(var(--tool-x) * 100% / 1280); top: calc(var(--tool-y) * 100% / 720);
  width: max(34px, calc(var(--tool-width) * var(--unit)));
  height: max(40px, calc(var(--tool-height) * var(--unit)));
  translate: -50% -100%; touch-action: none; pointer-events: auto; cursor: grab;
}
.reception-tools .reception-tool.is-moving { z-index: 5; cursor: grabbing; }
.reception-tools .reception-tool.recently-moved { z-index: 4; }
.reception-tools .reception-tool::before {
  content: ""; position: absolute; left: 50%; translate: -50% 0; pointer-events: none;
  background-position: center; background-size: contain; background-repeat: no-repeat;
}
.reception-tools .reception-tool:hover::before { filter: brightness(1.09); }
.reception-candle { --tool-width: 76; --tool-height: 118; }
.reception-candle::before {
  bottom: calc(-2 * var(--unit)); width: calc(116 * var(--unit)); aspect-ratio: 1;
  background-image: url("assets/reception/candle-burning.png");
}
.reception-candle[data-spent]::before {
  width: calc(122 * var(--unit)); background-image: url("assets/reception/candle-out.png");
}
.reception-tools #pen {
  --tool-width: 110; --tool-height: 103;
  z-index: 2; min-width: 0; padding: 0;
}
.reception-tools #pen i { display: none; }
.reception-tools #pen span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.reception-tools #pen::before {
  left: calc(50% + var(--unit)); bottom: calc(-3 * var(--unit)); height: auto;
  width: calc(177 * var(--unit)); aspect-ratio: 1672 / 941; filter: none;
  background-image: url("assets/reception/brush-on-stand.png");
}
.reception-tools #pen[aria-pressed="true"]::before {
  left: calc(50% + 3 * var(--unit)); bottom: calc(-1 * var(--unit)); width: calc(169 * var(--unit));
  background-image: url("assets/reception/brush-stand.png");
}
.receiving.inspecting.has-pen-pointer, .receiving.inspecting.has-pen-pointer * { cursor: none; }
#reception-pen-pointer {
  position: absolute; z-index: 60; width: clamp(62px, 6vw, 88px); aspect-ratio: 1;
  translate: -23.7% -97.7%; pointer-events: none;
}
#room.receiving > #questions {
  z-index: 33; bottom: clamp(12px, calc(100% - var(--question-y) + 8px), calc(100% - 60px));
  left: clamp(12px, calc(var(--question-x) - 2.1em), calc(100% - 12.5em));
}

#reception-actions {
  position: absolute; z-index: 32; left: 50%; translate: -50% 0;
  bottom: calc(var(--stage-top) + max(4px, .65dvh)); display: flex; align-items: center; gap: 8px;
}
#reception-actions button, #reception-actions #drawer-handle {
  position: static; min-width: 4.4em; width: auto; min-height: 40px; padding: .28em .9em;
  display: grid; place-items: center; border: 1px solid #91643b85; border-radius: 2px;
  color: #f8d9a9; background: #2c180fe8; writing-mode: horizontal-tb; letter-spacing: .12em;
}
#reception-actions button:hover, #reception-actions button[aria-expanded="true"] { background: #624027; }
#reception-actions #drawer-handle { cursor: pointer; }
#reception-file {
  position: absolute; z-index: 9;
  left: calc(var(--stage-left) + var(--stage-width) * .542);
  top: calc(var(--stage-top) + var(--stage-height) * .148);
  width: calc(var(--stage-width) * .405); max-height: calc(var(--stage-height) * .495);
  display: flex; flex-direction: column; gap: .46em;
  color: #f6e4be; background: linear-gradient(158deg, #2d1910f2, #1b0e08f4);
  box-shadow: 0 10px 26px #0b0502cc, inset 0 0 0 1px #d19d6044;
  border: 1px solid #a87544c4; outline: 1px solid #4c2d1a; outline-offset: 2px; border-radius: 3px; padding: .68em .92em .84em;
}
.reception-file-meta {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .1em .8em;
  font-size: .84em; color: #e4bf87; padding-bottom: .36em; border-bottom: 1px solid #9e6b3f55;
}
.reception-file-meta button { min-height: 34px; }
.reception-file-meta button:hover { color: #ffdfae; }
.reception-file-story { min-height: 0; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-color: #956544 #2a160e; padding-right: 2px; }
#reception-file #visitor-column { display: grid; gap: .65em; }
#reception-file #visitor-column :is(.speech, #notice-board), #reception-file #proof-note {
  position: relative; inset: auto; width: auto; max-width: none; box-sizing: border-box;
}
#reception-file .speech { padding: 0 0 .25em; background: none; }
#reception-file .tacked { transform: none; }
#reception-file #proof-note { margin-top: .55em; }

@media (prefers-reduced-motion: reduce) {
  #reception-stage .portrait { animation-duration: .001ms !important; }
}
