:root {
  --bg: #fbf7f1;
  --card: rgba(255, 255, 255, 0.72);
  --text: #1a1a1a;
  --muted: rgba(0, 0, 0, 0.6);
  --line: rgba(0, 0, 0, 0.08);
  --gold: #c9a227;
  --accent-pink: #e84b7a;
  --accent-blue: #3d7bff;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1000px 600px at 10% 0%, rgba(201, 162, 39, 0.12), transparent 60%),
    radial-gradient(800px 600px at 90% 10%, rgba(232, 75, 122, 0.12), transparent 55%),
    radial-gradient(900px 700px at 40% 100%, rgba(61, 123, 255, 0.1), transparent 60%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 14px 64px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(251, 247, 241, 0.72);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand strong {
  font-size: 14px;
  letter-spacing: 0.4px;
}
.brand span {
  font-size: 12px;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.55);
  transition: transform 120ms ease, background 120ms ease;
}
.nav a:active {
  transform: scale(0.98);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

section {
  margin-top: 18px;
}

.hero {
  padding: 22px 16px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.14), transparent 50%),
    linear-gradient(315deg, rgba(232, 75, 122, 0.12), transparent 55%), rgba(255, 255, 255, 0.68);
}

.hero h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.hero p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 720px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

.hero-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.6);
}
.hero-block .label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.hero-block .value {
  font-size: 16px;
  font-weight: 900;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 520px) {
  .countdown {
    grid-template-columns: repeat(2, 1fr);
  }
}

.time-box {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.65);
  padding: 12px 10px;
  text-align: center;
}
.time-box .num {
  font-size: 22px;
  font-weight: 950;
}
.time-box .unit {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.names-grid {
  display: grid;
  gap: 10px;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.35), rgba(255, 255, 255, 0.5));
  border: 1px solid rgba(0, 0, 0, 0.07);
  display: grid;
  place-items: center;
  font-weight: 900;
}
.avatar.pink {
  background: linear-gradient(135deg, rgba(232, 75, 122, 0.35), rgba(255, 255, 255, 0.5));
}
.avatar.blue {
  background: linear-gradient(135deg, rgba(61, 123, 255, 0.35), rgba(255, 255, 255, 0.5));
}
.person strong {
  font-size: 15px;
  font-weight: 950;
}
.person span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 950;
}
.section-title .sub {
  color: var(--muted);
  font-size: 13px;
}

/* masonry */
.masonry {
  columns: 3;
  column-gap: 14px;
  margin-top: 12px;
}
@media (max-width: 860px) {
  .masonry {
    columns: 2;
  }
}
@media (max-width: 520px) {
  .masonry {
    columns: 1;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 14px;
  position: relative;
}
.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

.masonry-item .tag {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  place-items: center;
  z-index: 2000;
  padding: 18px;
}
.lightbox.show {
  display: grid;
}
.lightbox-inner {
  max-width: 980px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
}
.lightbox-imgWrap {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}
.lightbox-imgWrap img {
  width: 100%;
  display: block;
  max-height: 74vh;
  object-fit: contain;
}
.lightbox-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.lb-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lb-btn:active {
  transform: scale(0.98);
}

/* timeline */
.timeline {
  margin-top: 12px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.08);
}

.tl-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
  align-items: start;
}
.tl-item .panel {
  position: relative;
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.65);
}
.tl-item:nth-child(odd) .panel {
  justify-self: end;
}
.tl-item:nth-child(even) .panel {
  justify-self: start;
}

.tl-dot {
  position: absolute;
  left: calc(50% - 6px);
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--gold);
  border: 3px solid rgba(255, 255, 255, 0.85);
  transform: translateX(-50%);
}
.tl-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.tl-title {
  font-weight: 950;
  font-size: 15px;
  margin: 0;
}
.tl-text {
  margin: 10px 0 0;
  color: rgba(0, 0, 0, 0.76);
  line-height: 1.7;
  font-size: 14px;
}
.tl-img {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tl-img img {
  width: 100%;
  display: block;
  height: auto;
}

@media (max-width: 700px) {
  .timeline::before {
    left: 16px;
    transform: none;
  }
  .tl-item {
    grid-template-columns: 1fr;
    margin-left: 30px;
  }
  .tl-item .panel {
    width: 100%;
  }
  .tl-item .panel::before {
    left: -22px !important;
    transform: none !important;
  }
}

/* seat module */
.seating-demo {
  margin-top: 12px;
}
.seating-demo__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.7);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.dot-main {
  background: var(--gold);
}
.dot-bride {
  background: var(--accent-pink);
}
.dot-groom {
  background: var(--accent-blue);
}

.seating-demo__seat-map {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  justify-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.55);
  margin-top: 12px;
}
@media (max-width: 520px) {
  .seating-demo__seat-map {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.seating-demo__table {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  padding: 0;
  background: rgba(255, 255, 255, 0.92);
}
.seating-demo__table:active {
  transform: scale(0.97);
}
.seating-demo__table-no {
  font-weight: 950;
  font-size: 12px;
  letter-spacing: 0.4px;
  color: rgba(0, 0, 0, 0.88);
}

.seating-demo__table--main {
  background: rgba(201, 162, 39, 0.18);
}
.seating-demo__table--bride {
  background: rgba(232, 75, 122, 0.16);
}
.seating-demo__table--groom {
  background: rgba(61, 123, 255, 0.16);
}

.seating-demo__table.is-selected {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.18);
  transform: scale(1.03);
}

.seating-demo__detail {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.55);
}
.seating-demo__detail-title {
  font-size: 16px;
  font-weight: 950;
  margin-bottom: 8px;
}
.seating-demo__detail-names {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.84);
  white-space: pre-wrap;
}
.seating-demo__detail-note {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

/* RSVP */
.form-row {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
label {
  font-size: 13px;
  color: var(--muted);
}
textarea {
  width: 100%;
  min-height: 140px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 12px 12px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  outline: none;
}
textarea:focus {
  border-color: rgba(201, 162, 39, 0.35);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.14);
}
.btn {
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 10px 14px;
  background: rgba(201, 162, 39, 0.16);
  font-weight: 850;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:active {
  transform: scale(0.99);
}
.hint {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.6);
  line-height: 1.6;
}

/* Music player */
.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 0;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  z-index: 9999;
}
.music-toggle:active {
  transform: scale(0.98);
}
.music-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: #fff;
  opacity: 0.95;
}
.music-ripples {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
}
.music-toggle.is-playing .music-ripples {
  opacity: 1;
}
.music-ripples .ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0.9;
}
.music-toggle.is-playing .r1 {
  animation: ripple 1.2s infinite;
}
.music-toggle.is-playing .r2 {
  animation: ripple 1.2s infinite 0.25s;
}
.music-toggle.is-playing .r3 {
  animation: ripple 1.2s infinite 0.5s;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0.95;
  }
  70% {
    opacity: 0.25;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
  }
}

.music-hint {
  position: fixed;
  right: 88px;
  bottom: 28px;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 9999;
}
.music-hint.show {
  opacity: 1;
  transform: translateY(0);
}

