/* 座位安排頁：座位圖、桌位光圈、姓名＋桌位提示（照原版 WeddingWeb .seat-map／.seat-mark／.seat-tag；字 ≥16px、按鈕 ≥44px） */

.seat-map {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}

.seat-map .page-photo {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
}

.seat-mark {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: var(--d, 26%);
  aspect-ratio: 1;
  box-sizing: border-box;
  border-radius: 50%;
  border: 3px solid #e3b95f;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 9999px rgba(36, 49, 43, 0.42),
    0 0 12px 2px rgba(255, 219, 150, 0.85),
    inset 0 0 12px 2px rgba(255, 236, 190, 0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.seat-mark.is-on { opacity: 1; }

.seat-ripple {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(255, 228, 170, 0.95);
  box-shadow: 0 0 10px rgba(255, 220, 150, 0.7);
  opacity: 0;
  animation: seat-ripple 2.4s ease-out infinite;
}

.seat-ripple:nth-child(2) { animation-delay: 0.8s; }
.seat-ripple:nth-child(3) { animation-delay: 1.6s; }

@keyframes seat-ripple {
  0% { transform: scale(1); opacity: 0.95; }
  100% { transform: scale(1.28); opacity: 0; }
}

.seat-spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  background: radial-gradient(circle, #fff 0%, #fff8e4 35%, #f5cf72 100%);
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  filter: drop-shadow(0 0 4px rgba(255, 230, 160, 1));
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  animation: seat-twinkle var(--t, 1.8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.seat-spark.dot {
  clip-path: none;
  border-radius: 50%;
  width: calc(var(--s) * 0.35);
  height: calc(var(--s) * 0.35);
  background: #fffaf0;
  box-shadow: 0 0 8px 3px rgba(255, 225, 150, 0.95);
}

@keyframes seat-twinkle {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(0deg); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(45deg); }
}

.seat-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  width: max-content;
  max-width: calc(100% - 20px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 5px 5px 14px;
  border-radius: 999px;
  background: rgba(250, 248, 243, 0.96);
  box-shadow: 0 6px 18px rgba(36, 49, 43, 0.25);
  cursor: pointer;
}

.seat-tag[hidden] { display: none; }

.seat-tag p {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  white-space: nowrap;
}

.seat-tag strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--sage);
}

.seat-tag span {
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--accent-red);
}

.seat-tag button {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(166, 132, 86, 0.5);
  border-radius: 50%;
  background: #fff;
  color: var(--sage);
  cursor: pointer;
}

.seat-tag button svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  .seat-ripple { animation: none; }
  .seat-spark {
    animation: none;
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(0.8);
  }
}
