/* Canonical scene stylesheet. Generated from the approved final cascade. */
* {
  box-sizing:border-box;
}
html,body {
  margin:0;
  min-height:100%;
  background:#130e17;
  color:#ffedd2;
  font-family:Georgia,"Times New Roman",serif;
}
.top {
  width:min(1300px,96%);
  margin:auto;
  padding:14px 0 9px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  font:13px system-ui;
}
.stage {
  width:min(1300px,96%);
  aspect-ratio:1672/941;
  min-height:580px;
  position:relative;
  margin:auto;
  border:1px solid #ae8248;
  border-radius:15px;
  background:url(assets/bg.webp)center/cover no-repeat;
  overflow:hidden;
  padding:20px;
}
.stage:before {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(18,10,16,.14),rgba(18,10,16,.08) 30%,rgba(18,10,16,.10) 70%,rgba(18,10,16,.15));
  pointer-events:none;
}
.stage:after {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  box-shadow:inset 0 0 78px rgba(19,10,23,.46);
}
.scene {
  position:relative;
  z-index:1;
  width:100%;
  height:100%;
}
.title-art {
  position:absolute;
  left:50%;
  top:2%;
  transform:translateX(-50%);
  width:min(58%,760px);
  filter:drop-shadow(0 10px 16px rgba(0,0,0,.34));
  user-select:none;
  pointer-events:none;
}
.envelope-wrap {
  position:absolute;
  left:50%;
  top:62.5%;
  transform:translate(-50%,-50%);
  width:min(49%,690px);
  cursor:pointer;
  transition:transform .28s ease,filter .28s ease;
  filter:drop-shadow(0 22px 22px rgba(0,0,0,.22));
  background:none;
  border:none;
  padding:0;
  appearance:none;
}
.envelope-wrap:hover {
  transform:translate(-50%,-51.1%);
}
.envelope-wrap:active {
  transform:translate(-50%,-50.4%) scale(.99);
}
.envelope-img {
  display:block;
  width:100%;
  height:auto;
}
.hint {
  position:absolute;
  left:50%;
  bottom:6%;
  transform:translateX(-50%);
  padding:10px 18px;
  border-radius:16px;
  background:rgba(30,14,25,.64);
  border:1px solid rgba(222,183,119,.45);
  font:14px system-ui;
  color:#f6e2c2;
  backdrop-filter:blur(2px);
}
.letter-screen {
  position:absolute;
  inset:0;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  flex-direction:column;
  padding:10px 18px 14px;
}
.letter-panel {
  position:relative;
  width:min(85%,1060px);
  max-height:94%;
  display:grid;
  place-items:center;
  animation:fadeIn .35s ease;
  transform:translateY(-10px);
}
.letter-bg {
  display:block;
  width:100%;
  height:auto;
  max-height:88vh;
  filter:drop-shadow(0 24px 30px rgba(0,0,0,.28));
}
.letter-copy {
  position:absolute;
  left:8.8%;
  right:8.8%;
  top:37.5%;
  bottom:2.4%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  text-align:center;
  color:#563226;
  overflow:hidden;
  padding:0 8px;
}
.letter-copy h2 {
  display:none;
}
.letter-copy .sub {
  display:none;
}
.letter-copy p {
  font-size:clamp(17px,1.35vw,21px);
  line-height:1.22;
  margin:4px auto;
  max-width:88%;
}
.letter-copy strong {
  font-weight:700;
}
.sign {
  margin:12px 12% 8px auto;
  text-align:right;
  align-self:flex-end;
}
.sign b {
  display:block;
  font-size:clamp(18px,1.22vw,23px);
  font-weight:normal;
}
.sign em {
  font-size:clamp(13px,.92vw,16px);
}
.cta {
  margin-top:16px;
  font:600 clamp(16px,1.14vw,19px) Georgia;
  padding:12px 24px;
  background:linear-gradient(#7c344e,#431b32);
  border:2px solid #c79b61;
  color:#fff0d3;
  border-radius:11px;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
}
.cta:hover {
  transform:translateY(-1px);
}
.opening-out {
  opacity:0;
  transform:translateY(14px);
  pointer-events:none;
  transition:opacity .32s ease,transform .32s ease;
}
@keyframes fadeIn {
  from {
    opacity:0;
    transform:translateY(12px) scale(.985);
  }
  to {
    opacity:1;
    transform:none;
  }
}
@media (max-width:1100px) {
  .title-art {
    width:min(65%,720px);
  }
  .envelope-wrap {
    width:min(56%,650px);
    top:61.5%;
  }
  .letter-panel {
    width:min(88%,1000px);
    transform:translateY(-6px);
  }
  .letter-copy {
    left:8.5%;
    right:8.5%;
    top:36%;
    bottom:2.8%;
  }
  .letter-copy p {
    max-width:90%;
    font-size:clamp(17px,1.48vw,21px);
    line-height:1.2;
    margin:4px auto;
  }
  .sign {
    margin-top:10px;
    margin-right:10%;
  }
}
@media (max-width:730px) {
  .stage {
    aspect-ratio:9/16;
    min-height:780px;
    padding:10px;
  }
  .top {
    width:min(96%,700px);
  }
  .title-art {
    width:min(80%,560px);
    top:2.2%;
  }
  .envelope-wrap {
    width:min(84%,540px);
    top:50.8%;
  }
  .hint {
    bottom:3.7%;
    width:min(90%,500px);
    text-align:center;
  }
  .letter-screen {
    padding:8px 8px 12px;
  }
  .letter-panel {
    width:min(96%,700px);
    transform:translateY(-2px);
  }
  .letter-copy {
    left:7.2%;
    right:7.2%;
    top:33%;
    bottom:2.8%;
  }
  .letter-copy p {
    font-size:clamp(16px,3.65vw,19px);
    max-width:96%;
    line-height:1.18;
    margin:4px auto;
  }
  .sign {
    margin-top:9px;
    margin-right:9%;
  }
  .sign b {
    font-size:clamp(17px,3.8vw,22px);
  }
  .sign em {
    font-size:clamp(12px,2.7vw,15px);
  }
  .cta {
    margin-top:16px;
    padding:11px 20px;
    font-size:clamp(15px,3.2vw,18px);
  }
}
@media (prefers-reduced-motion:reduce) {
  .envelope-wrap,.cta {
    transition:none;
  }
  .letter-panel {
    animation:none;
  }
}
html,body {
  margin:0!important;
  padding:0!important;
  width:100%;
  min-height:100dvh;
  background:#130e17!important;
  overflow-x:hidden;
}
.top,.header,body>header,.foot,.tools,.note,.card-hint,.status {
  display:none!important;
}
body {
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:100dvh;
}
@media (min-width:741px) {
  .stage,.scene,.wrap {
    width:min(100vw,calc(100dvh*1672/941))!important;
    max-width:100vw!important;
    min-height:0!important;
    max-height:none!important;
    height:auto!important;
    aspect-ratio:1672/941!important;
    margin:0 auto!important;
    border:0!important;
    border-radius:0!important;
  }
  .wrap .stage {
    width:100%!important;
    max-width:100%!important;
    height:100%!important;
  }
}
@media (max-width:740px) {
  body {
    justify-content:flex-start;
  }
  .stage,.scene,.wrap {
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
  }
}
.top,.header,body>header,.tools,.note,.foot,.card-hint,.status {
  display:none!important;
}
[hidden] {
  display:none!important;
}
html.assets-loading main,html.assets-loading .wrap {
  visibility:hidden!important;
}
.scene-loader {
  position:fixed;
  inset:0;
  z-index:999998;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  background:#130e17;
  color:#f5dfb3;
  font:18px/1.5 Georgia;
  text-align:center;
  padding:24px;
}
.scene-loader:before {
  content:"";
  width:24px;
  height:24px;
  border:2px solid #8c633e;
  border-top-color:#f7d499;
  border-radius:50%;
  animation:sceneSpin .8s linear infinite;
}
.scene-loader button {
  padding:12px;
  border:1px solid #c99856;
  background:#4e2439;
  color:#fff1d3;
  border-radius:10px;
}
@keyframes sceneSpin {
  to {
    transform:rotate(360deg);
  }
}
@media (prefers-reduced-motion:reduce) {
  .scene-loader:before {
    animation:none;
  }
}
.actor,.character,.char,#finalHarbu,#finalShurh,.feedback,.dialog {
  transition:none!important;
  will-change:auto!important;
}
#hotspots {
  position:absolute;
  inset:0;
  z-index:5;
  pointer-events:none;
}
#hotspots .hot,#hotspots .hot:before {
  pointer-events:auto;
  cursor:pointer;
}
.stage:not(.on) #hotspots .hot,.stage:not(.on) #hotspots .hot:before {
  pointer-events:none;
}
@media (min-width:741px) {
  .mobile-avatar,.mobile-guide,.mobile-portrait,.mobile-dismiss {
    display:none!important;
  }
}
#gifts .replay-area {
  margin:5px auto 0!important;
  position:relative;
  flex-shrink:0;
}
#gifts .replay-game {
  display:flex!important;
  align-items:center;
  justify-content:center;
  line-height:1.3;
  padding:10px 22px;
}
@media (max-width:740px) {
  html {
    font-size:16px;
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
  }
  body[data-mobile-scene] {
    display:block!important;
    min-height:100dvh!important;
    overflow-x:hidden!important;
    touch-action:pan-y;
    background:#21141b!important;
  }
  body[data-mobile-scene] button,body[data-mobile-scene] .btn,body[data-mobile-scene] a.btn {
    min-height:46px;
    touch-action:manipulation;
  }
  body[data-mobile-scene] .stage,body[data-mobile-scene] .scene,body[data-mobile-scene] .wrap {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    border:0!important;
    border-radius:0!important;
    max-height:none!important;
    min-height:100dvh!important;
  }
  body[data-mobile-scene="1"] .stage {
    height:auto!important;
    aspect-ratio:auto!important;
    padding:0!important;
  }
  body[data-mobile-scene="1"] #opening {
    height:max(640px,100dvh)!important;
    min-height:0!important;
    aspect-ratio:auto!important;
  }
  body[data-mobile-scene="1"] .title-art {
    width:94%;
    top:65px;
  }
  body[data-mobile-scene="1"] .envelope-wrap {
    width:92%;
    top:59%;
  }
  body[data-mobile-scene="1"] .hint {
    width:88%;
    bottom:30px;
    line-height:1.5;
    font-size:15px;
  }
  body[data-mobile-scene="1"] .stage:has(#letter:not([hidden])) #opening {
    display:none!important;
  }
  body[data-mobile-scene="1"] .letter-screen {
    position:relative;
    inset:auto;
    min-height:100dvh;
    padding:72px 14px 24px;
  }
  body[data-mobile-scene="1"] .letter-panel {
    display:block;
    width:100%;
    max-height:none;
    transform:none;
    animation:none;
    border:4px double #b98a52;
    border-radius:20px;
    background:radial-gradient(#fff9e8,#e9d1ae);
    box-shadow:0 12px 32px #0007;
    padding:25px 18px;
  }
  body[data-mobile-scene="1"] .letter-bg {
    display:none;
  }
  body[data-mobile-scene="1"] .letter-copy {
    position:relative;
    inset:auto;
    padding:0;
    overflow:visible;
  }
  body[data-mobile-scene="1"] .letter-copy p {
    font-size:18px;
    line-height:1.5;
    max-width:100%;
    margin:0 0 14px;
  }
  body[data-mobile-scene="1"] .sign {
    margin:8px 0 18px auto;
  }
  body[data-mobile-scene="1"] .cta {
    font-size:18px;
    width:100%;
    padding:13px 12px;
    margin-top:6px;
  }
}
