/* Decorative background for the cookie reservation pages only. */
body.ck-nyako-background #christmas-cookie-demo {
  position: relative;
  z-index: 1;
  background: transparent;
}

.ck-nyako-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  contain: strict;
}

.ck-nyako-sky[hidden] { display: none; }

.ck-falling-nyako {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  height: auto;
  opacity: 0;
  pointer-events: none;
  transform-origin: center;
  will-change: transform;
}

.ck-nyako-chimney {
  position: absolute;
  right: max(12px, env(safe-area-inset-right));
  bottom: -6px;
  width: clamp(92px, 24vw, 132px);
  height: auto;
  pointer-events: none;
  user-select: none;
}

.ck-nyako-chimney-back { z-index: 1; }
.ck-nyako-chimney-front { z-index: 3; }

#christmas-cookie-demo .ck-nyako-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px 10px;
  padding: 6px 5% 0;
  position: relative;
}

#christmas-cookie-demo .ck-nyako-controls.ck-nyako-has-hint { padding-bottom: 88px; }

#christmas-cookie-demo .ck-nyako-tilt { position: relative; }

#christmas-cookie-demo .ck-nyako-hint {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  width: 220px;
  max-width: 68vw;
  transform: translateX(-50%);
  text-align: center;
  color: #f3dfb6;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  pointer-events: none;
}

#christmas-cookie-demo .ck-nyako-hint[hidden] { display: none; }

#christmas-cookie-demo .ck-nyako-hint svg {
  display: block;
  width: 84px;
  height: 50px;
  margin: 0 auto 2px;
  fill: none;
  stroke: #f06b59;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#christmas-cookie-demo .ck-nyako-control {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #78988a66;
  border-radius: 24px;
  background: #152c27;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  touch-action: manipulation;
}

#christmas-cookie-demo .ck-nyako-control:hover,
#christmas-cookie-demo .ck-nyako-control[aria-pressed="true"] {
  background: #345747;
  border-color: #d6b980;
}

#christmas-cookie-demo .ck-nyako-status {
  flex-basis: 100%;
  text-align: right;
  font-size: 11px;
  line-height: 1.5;
  opacity: .82;
}

#christmas-cookie-demo .ck-nyako-status:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ck-nyako-sky,
  #christmas-cookie-demo .ck-nyako-controls { display: none; }
}
