body.game-theme #app :is(.stage-workshop138,.poster-studio138) {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.game-theme #app .activity-heading138 {
  position: absolute !important;
  z-index: 5;
  inset: var(--play-top, 140px) auto auto var(--play-left, 225px) !important;
  display: block !important;
  width: min(495px, calc(100% - var(--play-left, 225px) - var(--play-right, 20px)));
  height: auto !important;
  min-height: 0 !important;
  padding: 10px 14px;
  margin: 0;
  box-sizing: border-box;
  color: #fff0d6;
  background: #211927ed;
  border: 1px solid #b197a6;
  border-top: 2px solid #efc481;
  box-shadow: 3px 4px #18121b9e;
}

body.game-theme #app .activity-heading138 h1 {
  margin: 0 0 5px !important;
  font: 850 clamp(18px, 2.55vw, 32px)/1.12 system-ui, sans-serif !important;
}

body.game-theme #app .activity-heading138 p {
  margin: 0;
  font: 550 clamp(11px, 1.2vw, 14px)/1.35 system-ui, sans-serif;
}

body.game-theme #app .activity-heading138 .stage-status138 {
  color: #ffdb99;
  margin-top: 5px;
}

body.game-theme #app .activity-footer138 {
  position: absolute !important;
  z-index: 7;
  inset: auto var(--play-right, 20px) var(--play-bottom, 18px) auto !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  height: auto !important;
  min-height: 0 !important;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
}

body.game-theme #app :is(.activity-footer138, .stage-pan138) button {
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 7px 11px !important;
  font: 740 clamp(11px, 1.1vw, 14px)/1.2 system-ui, sans-serif !important;
  text-transform: none;
  letter-spacing: normal;
}

body.game-theme #app .activity-footer138 button:disabled {
  opacity: 1;
  color: #c8bac4;
  background: #312837eb;
  border-color: #857382;
  cursor: default;
}

.stage-window138 {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: auto hidden;
  overscroll-behavior: contain;
  touch-action: pan-x;
  scrollbar-width: none;
}

.stage-window138::-webkit-scrollbar { display: none; }
.stage-window138:focus-visible { outline: 2px solid #f4c984; outline-offset: -4px; }

.stage-plane138 {
  position: absolute;
  inset: 50% auto auto 0;
  translate: 0 -50%;
  width: max(100%, 177.6833dvh);
  height: max(100%, 56.2799vw);
  overflow: hidden;
  container-type: inline-size;
}

.stage-plane138 > img, .stage-plane138 > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: fill;
  pointer-events: none;
}

.stage-beam138 {
  opacity: 0;
  mix-blend-mode: screen;
  z-index: 3;
  transition: opacity .3s ease-out;
}

.stage-plane138[data-light="true"] .stage-beam138 { opacity: 1; }
.stage-wires138 { stroke-linecap: round; stroke-linejoin: round; z-index: 4; }
.stage-wires138 g[data-stage-preview138] { opacity: .75; }

.stage-projection138 {
  position: absolute;
  z-index: 2;
  inset: 30.35% 30.75% 43.75% 45.5%;
  display: grid;
  place-items: center;
  color: #fff3da;
  border-radius: 1%;
  box-shadow: 0 0 38px #a2ecff5c;
  background: radial-gradient(ellipse at 24% 20%, #497f87 0, #254c69 48%, #38294a 100%);
  opacity: 0;
  transition: opacity .28s ease-out;
}

.stage-projection138 span {
  font: 900 3.65cqw/1.1 system-ui, sans-serif;
  text-shadow: 0 3px #263758;
}

.stage-plane138[data-screen="true"] .stage-projection138 { opacity: 1; }

.stage-sound138 {
  position: absolute;
  inset: 43.65% auto auto 72.3%;
  display: flex;
  align-items: flex-end;
  gap: .24cqw;
  height: 2.1%;
  opacity: 0;
}

.stage-sound138 i {
  width: .27cqw;
  height: 100%;
  border-radius: 2px;
  background: #9af5dc;
  box-shadow: 0 0 5px #99f1dc;
  transform-origin: bottom;
  animation: stage-level138 .55s ease-in-out infinite alternate;
}

.stage-sound138 i:nth-child(2) { animation-delay: -.28s; }
.stage-sound138 i:nth-child(3) { animation-delay: -.43s; }
.stage-sound138 i:nth-child(4) { animation-delay: -.12s; }
.stage-plane138[data-sound="true"] .stage-sound138 { opacity: 1; }
@keyframes stage-level138 { from { scale: 1 .2; } to { scale: 1 1; } }

body.game-theme #app .stage-workshop138 button.stage-spot138 {
  position: absolute !important;
  z-index: 5;
  left: var(--stage-x);
  top: var(--stage-y);
  display: grid;
  place-items: center;
  width: clamp(35px, 3.8cqw, 54px);
  height: clamp(37px, 4.2cqw, 58px);
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
  translate: -50% -50%;
  transform: none !important;
  cursor: pointer;
}

body.game-theme #app button.stage-spot138::before,
body.game-theme #app button.stage-spot138::after { content: none !important; }

.stage-jack138 {
  display: grid;
  place-items: center;
  width: clamp(24px, 2.7cqw, 40px);
  aspect-ratio: 1;
  box-sizing: border-box;
  border: 1px solid var(--stage-color);
  border-radius: 50%;
  background: #211a25f0;
  color: var(--stage-color);
  box-shadow: 0 2px 5px #180e18ce;
}

.stage-jack138 svg { width: 61%; height: 61%; pointer-events: none; }
.stage-plug138 { touch-action: none; }

.stage-spot138:is(:hover,:focus-visible,[aria-pressed="true"],[data-matches="true"]) .stage-jack138 {
  box-shadow: 0 0 0 2px #fff5d0, 0 0 16px var(--stage-color);
}

.stage-spot138[data-connected="true"] .stage-jack138 {
  color: #26212c;
  background: var(--stage-color);
}

.stage-tag138 {
  position: absolute;
  left: 50%;
  top: calc(100% - 3px);
  translate: -50% 0;
  color: #fff0d8;
  background: #211a25f0;
  border: 1px solid var(--stage-color);
  border-radius: 3px;
  padding: 4px 8px;
  box-shadow: 0 2px 6px #181221ad;
  font: 740 13px/1 system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}

.stage-pan138 {
  position: absolute;
  z-index: 6;
  left: var(--play-left, 225px);
  bottom: calc(var(--play-bottom, 18px) + 54px);
  display: none;
  gap: 4px;
}

.stage-result138 {
  position: absolute;
  z-index: 6;
  box-sizing: border-box;
  bottom: var(--play-bottom, 18px);
  right: var(--play-right, 20px);
  width: min(490px, calc(100% - var(--play-left, 225px) - var(--play-right, 20px)));
  padding: 17px 19px;
  background: #211926f2;
  border: 1px solid #ab97a7;
  border-top: 2px solid #edc487;
  box-shadow: 4px 5px #120d17;
}

.stage-result138 h2 {
  margin: 0 0 9px;
  color: #f4c985;
  font: 750 16px/1.3 system-ui, sans-serif;
  text-transform: none;
}

.stage-result138 p { margin: 0 0 12px; }
.stage-result138 .novel-actions { margin: 0; }

.poster-table138 {
  position: absolute;
  z-index: 5;
  inset: max(32dvh,calc(var(--play-top,140px) + 100px)) max(22px, 12vw) max(69px,calc(var(--play-bottom,18px) + 56px)) max(var(--play-left,225px),22vw);
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(185px,.72fr);
  gap: clamp(12px, 3vw, 61px);
  align-items: center;
  pointer-events: none;
}

.poster-board138 { min-width: 0; pointer-events: auto; }

body.game-theme.version74 #app .poster-studio138 .poster-paper74 {
  width: min(100%, clamp(126px, 35dvh, 336px));
  box-shadow: 0 8px 14px #311c12b3, 0 1px 3px #281917b3;
  border-width: 1px;
  border-color: #f3daba;
}

.poster-tools138 {
  display: grid;
  gap: 7px;
  pointer-events: none;
}

.poster-inventory138, .poster-inks138 > strong,
.poster-status138 {
  justify-self: start;
  padding: 5px 8px;
  color: #fff0d7;
  background: #211927ea;
  box-shadow: 0 2px 5px #25191d7c;
  border: 1px solid #a88d8a;
  font: 730 12px/1.2 system-ui, sans-serif;
}

.poster-inventory138 {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}

.poster-inventory138 span { color: #f1c783; }

.poster-studio138 .poster-tray74 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  align-items: stretch;
  pointer-events: auto;
}

body.game-theme.version74 #app .poster-studio138 .poster-tray74 button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  min-width: 0 !important;
  min-height: 42px !important;
  padding: 5px !important;
  margin: 0 !important;
  border-color: #f6d8aa !important;
  background: #f0ddba !important;
  color: #322437 !important;
  box-shadow: 1px 3px 4px #2114108f !important;
  font: 720 clamp(10px, 1vw, 13px)/1.15 system-ui, sans-serif !important;
  letter-spacing: 0;
  text-shadow: none !important;
  text-transform: none;
  white-space: normal;
}

body.game-theme.version74 #app .poster-studio138 .poster-tray74 button:is(:hover,.chosen) {
  background: #f5c780 !important;
  border-color: #fff0c8 !important;
  outline: 1px solid #69472e;
}

.poster-tray74 button img {
  display: block;
  width: min(33%, 48px);
  aspect-ratio: 1.35;
  object-fit: cover;
  border-radius: 2px;
  pointer-events: none;
}

.poster-inks138 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

body.game-theme #app .poster-studio138 .poster-palettes74 { margin: 0; gap: 4px; }
body.game-theme #app .poster-studio138 .poster-palettes74 button,
body.game-theme #app .poster-studio138 .poster-tools74 button { margin: 0 !important; }

.poster-tools74 { pointer-events: auto; }
.poster-status138 { margin: 0; }
.poster-status138:empty { display: none; }

@media (max-aspect-ratio: 7/5) {
  .stage-pan138 { display: flex; }
}

@media (max-width: 760px) {
  body.game-theme #app .activity-heading138 {
    width: calc(100% - var(--play-left, 8px) - var(--play-right, 8px));
    padding: 8px 9px;
  }
  .poster-table138 {
    inset: max(30dvh,calc(var(--play-top,130px) + 64px)) 10px max(74px,calc(var(--play-bottom,18px) + 54px)) 10px;
    grid-template-columns: minmax(0,1fr) minmax(0,.94fr);
    gap: 9px;
  }
  .poster-tools138 { gap: 5px; }
  body.game-theme.version74 #app .poster-studio138 .poster-tray74 button {
    min-height: 35px !important;
    padding: 3px 4px !important;
  }
  .poster-inks138 .poster-palettes74 button { min-width: 28px !important; min-height: 29px !important; padding: 3px !important; }
  .poster-inks138 .poster-palettes74 i { width: 16px; height: 16px; }
}

@media (max-height: 540px) and (orientation: landscape) {
  .poster-table138 { top: max(31dvh,calc(var(--play-top,70px) + 57px)); bottom: 57px; }
  body.game-theme.version74 #app .poster-studio138 .poster-paper74 {
    width: min(100%, clamp(105px, 38dvh, 175px));
  }
  .poster-tools138 { gap: 4px; }
  body.game-theme.version74 #app .poster-studio138 .poster-tray74 button { min-height: 29px !important; }
  .poster-inventory138, .poster-status138 { font-size: 10px; padding: 4px 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .stage-beam138, .stage-projection138 { transition: none; }
  .stage-sound138 i { animation: none; }
}
