:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif;
  font-synthesis: none;
  text-autospace: normal;
  --paper: #fcfbf6;
  --ink: #1f1d1a;
  --muted: #77736b;
  --green: #426e60;
  --blue: #2b6cc8;
  --button-radius: 5px;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  width: 100%;
  max-width: 438px;
  margin: auto;
  min-height: 100svh;
  padding: max(20px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
header {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 29px;
}
header img {
  border-radius: 8px;
  flex-shrink: 0;
}
.brand-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 23px;
}
.brand-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}
h1 {
  font-size: clamp(24px, 7.7vw, 30px);
  font-weight: 700;
  line-height: 42px;
  margin: 20px 0 16px;
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.scene {
  --scene-tint: var(--door-theme);
  position: relative;
  flex-shrink: 0;
  width: calc(100% + 48px);
  margin-inline: -24px;
  align-self: center;
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--scene-tint) 35%, transparent) 90.385%,
    transparent
  );
  overflow: hidden;
}
@supports (color: hsl(from red h 55% 72%)) {
  .scene {
    --scene-tint: hsl(from var(--door-theme) h 55% 72%);
  }
}
.door-artwork {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 352;
}
.door {
  position: absolute;
  left: 22.564%;
  top: 1.989%;
  width: 55.128%;
  height: 91.777%;
  object-fit: contain;
  object-position: center bottom;
  transform: scale(var(--door-image-scale, 1));
  transform-origin: center bottom;
  filter: drop-shadow(0 12px 3.3px #24433530);
}
.light {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: #ffffff2e;
}
.left {
  width: 8.718%;
  aspect-ratio: 1;
  left: 19.744%;
  top: 19.318%;
}
.right {
  width: 13.846%;
  aspect-ratio: 1;
  left: 72.564%;
  top: 37.216%;
}
.door-hanger {
  position: absolute;
  left: 19.05%;
  top: 51.7%;
  width: 12.48%;
  aspect-ratio: 48.6731 / 146.019;
  transform: rotate(-5.64deg);
  transform-origin: top left;
  container-type: inline-size;
}
.door-hanger img {
  display: block;
  width: 100%;
  height: 100%;
}
.door-hanger span {
  position: absolute;
  left: 22.6%;
  top: 27.2%;
  width: 49.3%;
  text-align: center;
  font-size: 36.77cqw;
  font-weight: 700;
  line-height: 1.056;
  color: #4e3e10;
}
.description {
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  color: #5e5a53;
  margin: 16px 0 0;
}
.actions {
  margin-top: 24px;
}
a,
button {
  -webkit-tap-highlight-color: transparent;
}
a {
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: 1.3px solid #e2ddd1;
  width: 100%;
  color: var(--blue);
  border-radius: var(--button-radius);
  min-height: 48px;
  padding: 12px;
}
.primary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 13px 15px;
  background: var(--blue);
  color: var(--paper);
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--button-radius);
  line-height: 1.4;
}
.download {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--blue);
  text-align: center;
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
  padding: 10px 0 6px;
}
.hint {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 20px;
  margin: 0;
}
#open-help,
#copy-result {
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 4px;
}
[hidden] {
  display: none;
}
@media (hover: hover) {
  .primary:hover {
    background: #245fb3;
  }
  .download:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  h1 {
    animation: arrive 260ms ease-out both;
  }
  .scene {
    animation: arrive 360ms ease-out both;
  }
  .primary {
    transition: transform 150ms ease-out;
  }
  .primary:active {
    transform: scale(0.98);
  }
  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
