@font-face {
  font-family: CafeHand;
  src: url(assets/ui/fonts/cafe-hand.woff2) format("woff2");
  font-display: swap;
}
.cafe-opening {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  overflow: hidden;
  background: #fff6e5;
  color: #70566c;
  font-family:
    CafeHand,
    "Microsoft YaHei",
    sans-serif;
  isolation: isolate;
}
.cafe-opening[hidden],
.cafe-opening [hidden] {
  display: none !important;
}
.opening-loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  background: #fff6e5;
}
.opening-background {
  position: absolute;
  left: 50%;
  top: 47%;
  --xhs-width:100%;
  width: 100%;
  --xhs-height:auto;
  height: auto;
  --xhs-transform:translate(-50%,-50%);
  transform: translate(-50%, -50%);
  -webkit-mask-image:
    linear-gradient(
      transparent,
      #000 10%,
      #000 88%,
      transparent);
  mask-image:
    linear-gradient(
      transparent,
      #000 10%,
      #000 88%,
      transparent);
}
.opening-heading {
  position: absolute;
  top: var(--xhs-local-46);
  top: max(5%, var(--safe-area-inset-top,env(safe-area-inset-top,0px)));
  left: 0;
  right: 0;
  text-align: center;
  color: #69506a;
  text-shadow: 0 2px 0 #fffaf4, 0 0 16px #fff6e5;
}
.opening-heading small {
  font-size: 12px;
  letter-spacing: .22em;
}
.opening-heading h1 {
  font: 700 var(--xhs-math-18)/1.2 CafeHand, sans-serif;
  font: 700 clamp(28px, 8vw, 40px)/1.2 CafeHand, sans-serif;
  margin: 6px 0;
}
.opening-heading p {
  font-size: 13px;
  margin: 8px 0;
}
.opening-load-bottom {
  position: absolute;
  bottom: var(--xhs-local-47);
  bottom: max(3.5%, var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));
  left: 9%;
  right: 9%;
  text-align: center;
}
.opening-progress-copy {
  display: flex;
  justify-content: flex-end;
  --xhs-row-gap:8px;
  --xhs-column-gap:8px;
  grid-gap: 8px;
  gap: 8px;
  font-size: 13px;
  margin: 0 0 8px;
  color: #644b5c;
  text-shadow: 0 1px #fff;
}
.opening-meter {
  --xhs-height:16px;
  height: 16px;
  padding: 3px;
  border: 2px solid #9b7d7e;
  border-radius: 20px;
  background: #fffaf0;
  box-shadow: 0 3px 0 rgba(203, 179, 153, .5);
}
.opening-meter-fill {
  --xhs-height:100%;
  height: 100%;
  --xhs-width:0;
  width: 0;
  border-radius: 12px;
  background:
    repeating-linear-gradient(
      110deg,
      #a7b883 0,
      #a7b883 12px,
      #c1ce9b 12px,
      #c1ce9b 24px);
  transition: width .2s ease-out;
}
.opening-track {
  position: relative;
  --xhs-height:67px;
  height: 67px;
  margin: 0 12px;
  border-bottom: 1px dashed #ad98726b;
}
.opening-runner {
  position: absolute;
  top: 7px;
  left: 0;
  --xhs-width:52px;
  width: 52px;
  --xhs-height:57px;
  height: 57px;
  --xhs-transform:translateX(-50%);
  transform: translateX(-50%);
  transition: left .2s ease-out;
}
.opening-runner canvas {
  --xhs-width:100%;
  width: 100%;
  --xhs-height:100%;
  height: 100%;
}
.cafe-opening button {
  font: 600 15px/1.3 CafeHand, sans-serif;
  min-height: 44px;
  border: 2px solid #9a7a7f;
  border-radius: 22px;
  padding: 10px 23px;
  background: #fff8e7;
  color: #70566c;
  box-shadow: 0 3px 0 #d0b79b;
  cursor: pointer;
}
.cafe-opening button:focus {
  outline: 3px solid #7c9170;
  outline-offset: 4px;
}
.cafe-opening button:focus-visible {
  outline: 3px solid #7c9170;
  outline-offset: 4px;
}
.cafe-opening button:active {
  --xhs-transform:translateY(2px);
  transform: translateY(2px);
  box-shadow: 0 1px 0 #d0b79b;
}
.opening-action {
  margin-top: 12px;
  min-width: 80%;
  background: #f8dfaa !important;
}
.opening-hint {
  font-size: 12px;
  line-height: 1.5;
  min-height: 18px;
  margin: 10px 0 0;
  text-shadow: 0 1px #fff;
}
.opening-story {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #fff6e5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 0 42px;
  box-sizing: border-box;
}
.opening-film {
  --xhs-width:100%;
  width: 100%;
  --xhs-height:100%;
  height: 100%;
  object-fit: contain;
  display: block;
  -webkit-user-select: none;
  user-select: none;
}
.opening-swipe-hint {
  position: absolute;
  bottom: 9px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: #8e7180;
  margin: 0;
  pointer-events: none;
}
.opening-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  top: var(--xhs-local-20);
  top: max(8px, var(--safe-area-inset-top,env(safe-area-inset-top,0px)));
  display: flex;
  justify-content: space-between;
  --xhs-row-gap:8px;
  --xhs-column-gap:8px;
  grid-gap: 8px;
  gap: 8px;
}
.opening-controls button {
  padding: 7px 13px;
  font-size: 12px;
  min-height: 40px;
  background: rgba(255, 248, 231, .93);
  box-shadow: 0 2px 0 #d0b79b;
}
.opening-next {
  position: absolute;
  bottom: var(--xhs-local-48);
  bottom: max(12px, var(--safe-area-inset-bottom,env(safe-area-inset-bottom,0px)));
  left: 50%;
  --xhs-transform:translateX(-50%);
  transform: translateX(-50%);
  white-space: nowrap;
}
.cafe-opening .opening-next:active {
  --xhs-transform:translate(-50%,2px);
  transform: translate(-50%, 2px);
}
.opening-live {
  position: absolute;
  --xhs-width:1px;
  width: 1px;
  --xhs-height:1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.opening-leaving {
  animation: opening-close .4s ease both;
  pointer-events: none;
}
@keyframes opening-close {
  to {
    opacity: 0;
  }
}
@media (max-height: 650px) {
  .opening-heading {
    top: 4%;
  }
  .opening-heading h1 {
    font-size: 29px;
  }
  .opening-heading p {
    font-size: 12px;
    margin: 4px;
  }
  .opening-load-bottom {
    bottom: 2.5%;
  }
  .opening-track {
    --xhs-height:55px;
    height: 55px;
  }
  .opening-runner {
    --xhs-width:45px;
    width: 45px;
    --xhs-height:49px;
    height: 49px;
    top: 4px;
  }
  .opening-action {
    margin-top: 8px;
    padding: 8px 12px;
  }
  .opening-hint {
    margin-top: 6px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .opening-meter-fill,
  .opening-runner {
    transition: none;
  }
  .opening-leaving {
    animation: none;
    opacity: 0;
  }
}
.opening-heading h1 {
  margin: 0 auto;
  --xhs-width:88%;
  width: 88%;
  max-width: 390px;
  line-height: 0;
}
.opening-title-art {
  display: block;
  --xhs-width:100%;
  width: 100%;
  --xhs-height:auto;
  height: auto;
}
.cafe-opening .story-entry {
  position: absolute;
  z-index: 2;
  right: var(--xhs-local-49);
  right: max(10px, var(--safe-area-inset-right,env(safe-area-inset-right,0px)));
  top: var(--xhs-local-20);
  top: max(8px, var(--safe-area-inset-top,env(safe-area-inset-top,0px)));
  min-width: 64px;
  min-height: 44px;
  padding: 8px 14px;
  border: 2px solid #9a7a7f;
  border-radius: 16px;
  background: #fff8e7;
  color: #70566c;
  font: 600 14px/1.3 CafeHand, sans-serif;
  box-shadow: 0 3px 0 #d0b79b;
  cursor: pointer;
  touch-action: manipulation;
}
.story-entry:focus {
  outline: 3px solid #7c9170;
  outline-offset: 3px;
}
.story-entry:focus-visible {
  outline: 3px solid #7c9170;
  outline-offset: 3px;
}
.story-entry:active {
  --xhs-transform:translateY(2px);
  transform: translateY(2px);
}
