:root {
  --guide-ink: var(--town-ink, #52584d);
  --guide-matcha: var(--town-accent, #75805f);
  --guide-paper: rgba(252, 250, 244, .96);
  --guide-line: rgba(117, 128, 95, .42);
}

.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  pointer-events: none;
  font-family: 'LXGW WenKai', system-ui, -apple-system, sans-serif;
}
.guide-mask {
  position: fixed;
  background: rgba(66, 72, 64, .42);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  pointer-events: auto;
}
.guide-mask,
.guide-card { touch-action: none; }
.guide-spotlight {
  position: fixed;
  border: 1px solid rgba(255, 253, 248, .96);
  border-radius: 20px;
  box-shadow:
    0 0 0 3px rgba(117, 128, 95, .38),
    0 0 22px rgba(255, 250, 230, .66);
  pointer-events: none;
  transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease;
}
.guide-target-guard {
  position: fixed;
  pointer-events: auto;
  background: transparent;
}
.guide-target-guard.allow-target { pointer-events: none; }
.guide-card {
  position: fixed;
  width: min(330px, calc(100vw - 24px));
  padding: 18px 19px 16px;
  border: 2px solid var(--guide-line);
  border-radius: 25px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.36), transparent 58%),
    var(--guide-paper);
  color: var(--guide-ink);
  box-shadow: 0 18px 48px rgba(82, 88, 77, .14);
  pointer-events: auto;
}
.guide-progress {
  display: block;
  margin-bottom: 5px;
  color: #8d9988;
  font-size: 10px;
  letter-spacing: .08em;
}
.guide-title {
  margin: 0 0 7px;
  color: #4d584b;
  font-size: 16px;
  line-height: 1.35;
}
.guide-copy {
  margin: 0;
  color: #667061;
  font-size: 13px;
  line-height: 1.75;
}
.guide-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 14px;
}
.guide-actions button {
  min-height: 36px;
  padding: 7px 15px;
  border: 1px solid rgba(117, 128, 95, .28);
  border-radius: 999px;
  background: rgba(250, 248, 239, .94);
  color: #687363;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.guide-actions .guide-next {
  border-color: #788875;
  background: #788875;
  color: #fffaf0;
}
.guide-actions .guide-next.guide-waiting-action {
  border-color: rgba(120, 136, 113, .35);
  background: rgba(231, 233, 221, .78);
  color: #7f897a;
  cursor: default;
}

.wish-gesture-guide {
  position: absolute;
  inset: 0;
  z-index: 32;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  opacity: 1;
  transition: opacity .34s ease;
}
.wish-gesture-guide.is-leaving { opacity: 0; }
.wish-gesture-arrow {
  position: absolute;
  top: 49%;
  color: rgba(83, 100, 76, .82);
  font: 52px/1 Georgia, serif;
  text-shadow: 0 2px 0 rgba(255, 250, 229, .9), 0 4px 15px rgba(63, 75, 56, .22);
}
.wish-gesture-arrow.left {
  left: clamp(12px, 4vw, 38px);
  animation: wish-guide-left 1.25s ease-in-out infinite;
}
.wish-gesture-arrow.right {
  right: clamp(12px, 4vw, 38px);
  animation: wish-guide-right 1.25s ease-in-out infinite;
}
.wish-gesture-copy {
  position: absolute;
  left: 50%;
  bottom: 12%;
  max-width: calc(100% - 110px);
  padding: 8px 16px;
  border: 2px solid rgba(120, 136, 113, .46);
  border-radius: 999px;
  background: rgba(250, 248, 239, .9);
  color: #586452;
  box-shadow: 0 8px 22px rgba(59, 70, 53, .15);
  font-size: 12px;
  text-align: center;
  transform: translateX(-50%);
}
@keyframes wish-guide-left {
  0%,100% { transform: translateX(7px); opacity: .58; }
  50% { transform: translateX(-5px); opacity: 1; }
}
@keyframes wish-guide-right {
  0%,100% { transform: translateX(-7px); opacity: .58; }
  50% { transform: translateX(5px); opacity: 1; }
}

@media (max-width: 700px), (max-height: 520px) {
  .guide-card {
    width: min(300px, calc(100vw - 18px));
    padding: 14px 15px 13px;
    border-radius: 21px;
  }
  .guide-title { font-size: 14px; }
  .guide-copy { font-size: 12px; line-height: 1.6; }
  .guide-actions { margin-top: 10px; }
  .guide-actions button { min-height: 32px; padding: 5px 12px; }
  .wish-gesture-arrow { font-size: 42px; }
  .wish-gesture-copy { bottom: 9%; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-spotlight { transition: none; }
  .wish-gesture-arrow { animation: none; }
}
