* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100%; background: #73472f; color-scheme: light; }
body { margin: 0; font-family: system-ui, "Malgun Gothic", sans-serif; -webkit-tap-highlight-color: transparent; }
#creative {
  position: relative;
  isolation: isolate;
  width: min(100%, 520px);
  height: 100vh;
  height: 100dvh;
  min-height: 360px;
  margin: auto;
  overflow: hidden;
  background: #eaa56e url("assets/mine.jpeg") center / cover no-repeat;
}
#scene, #actions, .overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
#scene { display: block; pointer-events: none; }
#actions { pointer-events: none; }
.tap {
  position: absolute; pointer-events: auto; touch-action: manipulation;
  border: 0; border-radius: 12%; padding: 0; background: transparent; cursor: pointer;
}
.tap:focus-visible { outline: 2px solid #fff1b5; outline-offset: 2px; }
.tap:disabled { cursor: default; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.overlay { display: grid; place-items: center; background: #171013a6; }
.dialog {
  width: min(87%, 365px);
  min-height: min(69vh, 485px);
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: clamp(7px, 2vh, 15px);
  padding: 15px 9% 19px;
  background: url("assets/dialog-shell.png") center / 100% 100% no-repeat;
  color: #fff0bc;
  text-align: center;
}
.dialog h1 { margin: 0; font-size: clamp(22px, 7vw, 37px); line-height: 1.15; text-shadow: 0 2px #731c2c; }
.inset { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 100px; background: url("assets/dialog-inset.png") center / 100% 100%; color: #592d20; font-size: clamp(15px, 4.3vw, 23px); font-weight: 850; }
.inset img { width: 43%; max-height: 160px; object-fit: contain; }
.inset p { margin: 8px 0; }
.result-button {
  width: 100%; min-height: 48px; border-radius: 12px; border: 2px solid #ecf3a8;
  color: #fff3c8; font: 900 clamp(16px, 5vw, 24px) system-ui, "Malgun Gothic", sans-serif;
  box-shadow: inset 0 2px #fff4c5a6, inset 0 -4px #160e2544;
  cursor: pointer; touch-action: manipulation;
}
.install { background: linear-gradient(#91cf2b, #4c8f09); text-shadow: 0 2px #3a621b; }
.replay { background: linear-gradient(#29aeb4, #077c89); text-shadow: 0 2px #144752; border-color: #b5e8d6; }
#exit-note { margin: 0; font-size: 12px; }

.tool-hint{position:absolute;left:7%;right:7%;top:7%;z-index:4;margin:0;padding:10px 14px;border-radius:12px;background:#fff8dfed;color:#542b25;text-align:center;font-size:clamp(12px,3.4vw,18px);font-weight:800;pointer-events:none;box-shadow:0 4px 12px #0002}
.tap[aria-pressed=true]{outline:3px solid #fff3a1;outline-offset:3px}
