:root {
  --ink: #23354d;
  --ink-soft: #4f6680;
  --muted: #71869d;
  --paper: #edf8ff;
  --paper-2: #fff8fb;
  --card: rgba(255, 255, 255, .82);
  --card-strong: rgba(255, 255, 255, .94);
  --blue: #8fc5e8;
  --blue-deep: #5f96be;
  --rose: #7fc1e5;
  --rose-deep: #4f97c2;
  --sage: #8fb9aa;
  --morandi-blue: #86aeb8;
  --morandi-blue-deep: #6f96a4;
  --morandi-blue-soft: #93b4bd;
  --line: rgba(95, 150, 190, .28);
  --line-rose: rgba(127, 193, 229, .36);
  --shadow: 0 18px 42px rgba(71, 126, 165, .16);
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(237, 248, 255, .96) 0%, rgba(255, 248, 251, .82) 44%, rgba(236, 247, 255, .98) 100%),
    repeating-linear-gradient(135deg, rgba(143, 197, 232, .10) 0 1px, transparent 1px 26px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  line-height: 1.75;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3, .navbar-brand {
  font-family: inherit;
  font-weight: 500;
  letter-spacing: .08em;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.d-none { display: none !important; }

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
}
.nav-glass {
  background: rgba(233, 247, 255, .76);
  box-shadow: 0 10px 32px rgba(95, 150, 190, .12);
  backdrop-filter: blur(18px);
}
.nav-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.navbar-brand {
  max-width: calc(100vw - 96px);
  color: var(--ink);
  font-size: 1.35rem;
  white-space: nowrap;
}
.nav-menu { display: flex; align-items: center; }
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  color: var(--ink-soft);
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .12em;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.nav-link:hover {
  color: var(--morandi-blue-deep);
  background: rgba(255, 255, 255, .58);
  transform: translateY(-1px);
}
.navbar-toggler {
  width: 48px;
  height: 44px;
  display: none;
  place-items: center;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .58);
  cursor: pointer;
}
.navbar-toggler-icon,
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  width: 22px;
  height: 2px;
  display: block;
  border-radius: 2px;
  background: currentColor;
  transition: transform .22s ease, opacity .22s ease;
}
.navbar-toggler-icon { position: relative; }
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.navbar-toggler-icon::before { top: -7px; }
.navbar-toggler-icon::after { top: 7px; }
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon { background: transparent; }
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before { transform: translateY(7px) rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after { transform: translateY(-7px) rotate(-45deg); }

.cat-scroll-layer {
  --cat-ball-x: calc(100vw - 200px);
  --cat-ball-y: 220px;
  --cat-ball-rotation: 0deg;
  --cat-ball-scale: 1;
  position: fixed;
  inset: 0;
  z-index: 18;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint;
}
.cat-cluster {
  position: absolute;
  opacity: .96;
  user-select: none;
  transform-origin: center bottom;
  animation: cat-photo-float 6.2s ease-in-out infinite;
}
.cat-cluster-top {
  top: 70px;
  right: 20px;
  width: min(240px, 26vw);
}
.cat-cluster-bottom {
  left: 18px;
  bottom: 8px;
  width: min(220px, 24vw);
  animation-duration: 7.4s;
  animation-delay: -.9s;
}
.cat-photo {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 14px 20px rgba(78, 54, 38, .14));
}
.rolling-ball {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: auto;
  z-index: 3;
  display: block;
  filter: drop-shadow(0 9px 12px rgba(95, 80, 54, .24));
  transform:
    translate3d(var(--cat-ball-x), var(--cat-ball-y), 0)
    rotate(var(--cat-ball-rotation))
    scale(var(--cat-ball-scale));
  transform-origin: center;
  will-change: transform;
}

@keyframes cat-photo-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(3px) rotate(.35deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cat-cluster {
    animation: none;
  }
}

.hero {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 116px 0 52px;
}
.hero img,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero img {
  object-fit: cover;
  object-position: center;
  filter: saturate(1.12) contrast(1.04);
}
.hero-shade {
  background:
    linear-gradient(90deg, rgba(237, 248, 255, .58) 0%, rgba(237, 248, 255, .40) 48%, rgba(255, 248, 251, .18) 100%),
    linear-gradient(180deg, rgba(237, 248, 255, .01) 0%, rgba(237, 248, 255, .48) 100%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 860px;
  color: var(--ink);
  text-align: center;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--morandi-blue-deep);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.hero .eyebrow {
  color: var(--morandi-blue-soft);
  font-size: .9rem;
}
.hero h1 {
  margin: 0;
  font-size: 4rem;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(255, 255, 255, .82);
  white-space: nowrap;
  overflow-wrap: normal;
}
.hero h1::after,
.heading h2::after {
  content: "";
  width: 280px;
  height: 1px;
  display: block;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--line-rose), var(--rose), var(--line-rose), transparent);
}
.hero-date {
  margin: 18px 0 0;
  color: var(--morandi-blue-deep);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .16em;
}
.countdown {
  max-width: 700px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 30px auto 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .42);
  backdrop-filter: blur(12px);
}
.countdown div {
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-right: 1px solid var(--line);
}
.countdown div:last-child { border-right: 0; }
.countdown b {
  display: block;
  color: var(--morandi-blue);
  font-size: 2.15rem;
  line-height: 1;
  font-weight: 800;
}
.countdown span {
  color: var(--ink-soft);
  font-size: .88rem;
  font-weight: 800;
}
.done {
  margin: 28px 0 0;
  color: var(--morandi-blue-deep);
  font-weight: 900;
}

.section {
  position: relative;
  padding: 86px 0;
  scroll-margin-top: 82px;
}
.soft {
  background: transparent;
}
.heading {
  max-width: 740px;
  margin: 0 auto 34px;
  text-align: center;
}
.heading h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 2.35rem;
}
.heading h2::after {
  width: 138px;
  margin-top: 12px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--sage), var(--blue), transparent);
}
.heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.person,
.venue-card,
.rsvp-card,
.admin-login,
.admin-panel,
.admin-edit,
.admin-table-wrap {
  border: 1px solid rgba(143, 197, 232, .46);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--card-strong), var(--card));
  box-shadow: var(--shadow);
}
.couple-grid {
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 0 auto;
}
.person {
  position: relative;
  padding: 22px;
  text-align: center;
  overflow: hidden;
}
.person::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(127, 193, 229, .20);
  border-radius: 8px;
  pointer-events: none;
}
.person img {
  width: min(180px, 68%);
  aspect-ratio: 1;
  margin: 0 auto;
  object-fit: cover;
  border: 1px solid rgba(143, 197, 232, .66);
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(95, 150, 190, .18);
}
.person p {
  margin: 16px 0 4px;
  color: var(--morandi-blue-deep);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .22em;
}
.person h3 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow-wrap: normal;
}
.heart {
  color: var(--morandi-blue);
  font-size: 1.75rem;
  text-align: center;
}

.timeline {
  max-width: 960px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto;
}
.timeline article {
  position: relative;
  min-height: 154px;
  display: grid;
  align-content: center;
  padding: 24px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .68);
  text-align: center;
}
.timeline article::before {
  content: "";
  width: 42px;
  height: 42px;
  display: block;
  margin: 0 auto 12px;
  border: 1px solid var(--line-rose);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(237, 248, 255, .78));
  box-shadow: inset 0 0 0 8px rgba(127, 193, 229, .10);
}
.timeline time {
  color: var(--morandi-blue);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: .08em;
}
.timeline h3 {
  margin: 4px 0;
  font-size: 1.12rem;
  letter-spacing: .1em;
}
.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.venue-card,
.rsvp-card {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px;
}
.venue-card {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px;
}
.info-grid div {
  min-height: 72px;
  padding: 0 0 14px 18px;
  border-left: 2px solid rgba(127, 193, 229, .48);
  border-bottom: 1px solid var(--line);
}
.info-grid span {
  display: block;
  color: var(--morandi-blue-deep);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .18em;
}
.info-grid b {
  display: block;
  margin-top: 4px;
  font-weight: 700;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.btn {
  min-height: 44px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.25;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  color: #fff;
  border-color: var(--rose);
  background: linear-gradient(180deg, #9bd4ee, var(--rose));
  box-shadow: 0 10px 22px rgba(79, 151, 194, .20);
}
.btn-primary:hover {
  border-color: var(--rose-deep);
  background: linear-gradient(180deg, #78bfe4, var(--rose-deep));
}
#mapLink.btn-primary,
#submitRsvp.btn-primary {
  color: #fff;
  border-color: transparent;
  background: #8DBCC7;
  box-shadow: none;
  cursor: pointer;
}
#mapLink.btn-primary:hover,
#submitRsvp.btn-primary:hover {
  color: var(--morandi-blue);
  border-color: var(--morandi-blue);
  background: #fff;
  box-shadow: none;
}
.btn-outline-primary,
.btn-quiet {
  color: var(--morandi-blue-deep);
  border-color: rgba(95, 150, 190, .46);
  background: rgba(255, 255, 255, .78);
}
.btn-outline-primary:hover,
.btn-quiet:hover {
  color: var(--ink);
  border-color: var(--blue);
  background: rgba(237, 248, 255, .96);
}
.btn-outline-danger {
  color: #a84646;
  border-color: rgba(168, 70, 70, .38);
  background: rgba(255, 246, 246, .9);
}
.btn-outline-danger:hover {
  color: #fff;
  background: #a84646;
}
.btn-lg {
  min-height: 50px;
  padding-inline: 28px;
  font-size: 1.02rem;
}
.btn-sm {
  min-height: 34px;
  padding: 7px 12px;
  font-size: .82rem;
}
.status {
  min-height: 24px;
  margin: 12px 0 0;
  font-weight: 900;
}
.status.success { color: #3b7f63; }
.status.error { color: #a4434c; }

.gallery {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 58px 36px;
}
.gallery-window {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(143, 197, 232, .5);
  border-radius: 8px;
  background: rgba(255, 255, 255, .7);
  box-shadow: var(--shadow);
}
.gallery-track {
  min-width: 0;
  display: flex;
  transition: transform .46s ease;
}
.gallery-item {
  flex: 0 0 100%;
  margin: 0;
  aspect-ratio: 3 / 2;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-controls {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  pointer-events: none;
}
.gallery-control {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 24px rgba(95, 150, 190, .14);
  cursor: pointer;
  line-height: 1;
  pointer-events: auto;
}
.gallery-control svg {
  width: 24px;
  height: 24px;
  display: block;
  flex: 0 0 auto;
  color: var(--morandi-blue);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gallery-control-prev {
  justify-self: start;
  margin-left: 14px;
}
.gallery-control-next {
  justify-self: end;
  margin-right: 14px;
}
.gallery-dots {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.gallery-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(95, 150, 190, .34);
  cursor: pointer;
}
.gallery-dot.is-active {
  background: var(--rose);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.field { grid-column: span 12; }
.field-half { grid-column: span 6; }
.field-quarter { grid-column: span 3; }
.field-third { grid-column: span 4; }
.field-two-thirds { grid-column: span 8; }
.field-wide { grid-column: 1 / -1; }
.form-label {
  display: block;
  margin: 0 0 7px;
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 900;
}
.form-control,
.form-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid rgba(143, 197, 232, .56);
  border-radius: 6px;
  background: rgba(255, 255, 255, .86);
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
textarea.form-control {
  min-height: 108px;
  resize: vertical;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--rose);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(127, 193, 229, .16);
}
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.radio-row label {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--ink-soft);
  font-weight: 900;
}
.radio-row input {
  accent-color: var(--rose);
}
footer {
  padding: 28px 16px;
  color: var(--ink);
  background: rgba(187, 222, 244, .62);
  text-align: center;
  font-weight: 800;
  letter-spacing: .14em;
}

.admin-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(237, 248, 255, .96), rgba(255, 248, 251, .78)),
    repeating-linear-gradient(135deg, rgba(143, 197, 232, .12) 0 1px, transparent 1px 28px);
}
.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}
.admin-login {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 24px;
}
.admin-login > div {
  width: min(420px, 100%);
}
.admin-login h1,
.admin-panel h1 {
  margin-top: 0;
}
.admin-login-button {
  width: 100%;
  margin-top: 16px;
}
.admin-panel {
  padding: 28px;
}
.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 800;
}
.alert-danger {
  color: #8f3448;
  border: 1px solid rgba(168, 70, 70, .32);
  background: rgba(255, 232, 238, .88);
}
.alert-success {
  color: #2f765c;
  border: 1px solid rgba(82, 153, 120, .24);
  background: rgba(226, 244, 235, .88);
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.admin-stats div {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}
.admin-stats span {
  display: block;
  color: var(--morandi-blue);
  font-size: 1.55rem;
  font-weight: 900;
}
.admin-stats small {
  color: var(--muted);
  font-weight: 800;
}
.admin-edit,
.admin-table-wrap {
  padding: 20px;
  margin-top: 20px;
}
.admin-edit h2,
.admin-table-wrap h2 {
  margin-top: 0;
  font-size: 1.35rem;
}
.admin-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
  font-size: .95rem;
}
.admin-table th,
.admin-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.admin-table th {
  color: var(--morandi-blue-deep);
  font-weight: 900;
  letter-spacing: .08em;
  background: rgba(237, 248, 255, .74);
}
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.admin-actions form { margin: 0; }
.admin-actions .btn,
.submitted-at {
  white-space: nowrap;
}
.message-cell {
  max-width: 280px;
  white-space: normal;
}
.empty-table {
  padding: 28px 12px !important;
  color: var(--muted);
  text-align: center !important;
}
.status-pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 900;
}
.is-attending {
  color: #225740;
  background: #dcebe4;
}
.is-declined {
  color: #82434b;
  background: #f0dce0;
}

@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-cluster-top { width: min(210px, 34vw); }
  .cat-cluster-bottom { width: min(190px, 30vw); }
}

@media (max-width: 767.98px) {
  .container,
  .admin-shell {
    width: min(100% - 24px, 1120px);
  }
  .cat-scroll-layer {
    z-index: 16;
  }
  .cat-cluster-top {
    top: 64px;
    right: -18px;
    width: min(168px, 46vw);
    opacity: .92;
  }
  .cat-cluster-bottom {
    left: -8px;
    bottom: -6px;
    width: min(158px, 42vw);
    opacity: .84;
  }
  .rolling-ball {
    width: 27px;
  }
  .nav-inner {
    min-height: 62px;
  }
  .navbar-brand {
    font-size: 1.24rem;
  }
  .navbar-toggler {
    display: grid;
  }
  .nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    display: block;
    max-height: 0;
    overflow: hidden;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(247, 252, 255, .94);
    box-shadow: 0 16px 34px rgba(95, 150, 190, .18);
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height .26s ease, opacity .2s ease, transform .2s ease, padding .2s ease, border-color .2s ease;
    backdrop-filter: blur(16px);
  }
  .nav-menu.is-open {
    max-height: 340px;
    padding: 10px 12px;
    border-color: var(--line);
    opacity: 1;
    transform: translateY(0);
  }
  .navbar-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .nav-link {
    justify-content: center;
    width: 100%;
  }
  .hero {
    aspect-ratio: auto;
    min-height: 88svh;
    padding: 100px 0 36px;
  }
  .hero h1 {
    font-size: 1.65rem;
    letter-spacing: .06em;
  }
  .hero h1::after {
    width: 180px;
  }
  .hero-date {
    font-size: 1.05rem;
    letter-spacing: .08em;
  }
  .countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 24px;
    padding: 8px 0;
  }
  .countdown div {
    min-height: 66px;
    padding: 6px 4px;
  }
  .countdown b {
    font-size: 1.45rem;
  }
  .countdown span {
    font-size: .78rem;
  }
  .section {
    padding: 34px 0;
    scroll-margin-top: 48px;
  }
  .heading h2 {
    font-size: 2rem;
  }
  .timeline {
    width: 100%;
    max-width: none;
    justify-content: center;
    justify-items: center;
    gap: 0;
  }
  .timeline article {
    width: fit-content;
    max-width: 100%;
    min-height: 78px;
    grid-template-columns: 72px 14px 190px;
    grid-template-rows: auto auto;
    align-content: start;
    column-gap: 12px;
    padding: 0 0 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: left;
  }
  .timeline article::before {
    position: relative;
    z-index: 1;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    justify-self: center;
    width: 14px;
    height: 14px;
    margin-top: calc((1.08rem - 14px) / 2);
    box-shadow: 0 4px 10px rgba(95, 150, 190, .13), inset 0 0 0 3px rgba(127, 193, 229, .10);
  }
  .timeline article::after {
    content: "";
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 2px;
    height: calc(100% + 18px);
    justify-self: center;
    background: rgba(143, 197, 232, .38);
  }
  .timeline article:last-child::after {
    height: 14px;
  }
  .timeline time {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    padding-top: 0;
    color: var(--morandi-blue-deep);
    font-size: 1.08rem;
    line-height: 1;
  }
  .timeline article > div {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: start;
  }
  .timeline h3 {
    margin: 0;
    color: var(--morandi-blue-deep);
    font-size: .96rem;
    line-height: 1.125;
  }
  .timeline p {
    margin-top: 6px;
    font-size: .82rem;
    line-height: 1.5;
  }
  .couple-grid {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    gap: 8px;
  }
  .heart {
    font-size: 1.35rem;
    line-height: 1;
  }
  .person {
    padding: 12px 8px;
  }
  .person::before {
    inset: 7px;
  }
  .person img {
    width: min(132px, 76%);
  }
  .person p {
    margin-top: 12px;
    font-size: .66rem;
  }
  .person h3 {
    font-size: 1.22rem;
    letter-spacing: .02em;
  }
  .venue-card,
  .rsvp-card,
  .admin-panel {
    padding: 16px 14px;
  }
  .venue-card {
    padding: 0;
  }
  #rsvp .container {
    width: min(100% - 44px, 1120px);
  }
  #rsvp .rsvp-card {
    padding: 24px 20px;
  }
  #venue .heading,
  #gallery .heading,
  #rsvp .heading {
    margin-bottom: 22px;
  }
  #couple .heading h2,
  #timeline .heading h2,
  #venue .heading h2,
  #gallery .heading h2,
  #rsvp .heading h2 {
    font-size: 1.65rem;
  }
  #venue .heading h2::after,
  #gallery .heading h2::after,
  #rsvp .heading h2::after {
    width: 96px;
    margin-top: 10px;
  }
  .info-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .info-grid div {
    min-height: auto;
    padding: 0 0 10px 12px;
    border-left-width: 1px;
  }
  .info-grid span {
    font-size: .68rem;
    letter-spacing: .12em;
  }
  .info-grid b {
    margin-top: 2px;
    font-size: .9rem;
    line-height: 1.55;
  }
  .actions {
    gap: 8px;
    margin-top: 18px;
  }
  .btn {
    min-height: 40px;
    padding: 8px 13px;
    font-size: .88rem;
    letter-spacing: .04em;
  }
  .actions,
  .actions .btn,
  #submitRsvp {
    width: 100%;
  }
  .gallery {
    padding: 0 0 28px;
    --gallery-control-size: 36px;
    --gallery-control-inset: 14px;
  }
  .gallery-item {
    aspect-ratio: 3 / 2;
  }
  .gallery-control {
    width: var(--gallery-control-size);
    height: var(--gallery-control-size);
  }
  .gallery-control-prev {
    margin-left: var(--gallery-control-inset);
  }
  .gallery-control-next {
    margin-right: var(--gallery-control-inset);
  }
  .field-half,
  .field-third,
  .field-two-thirds {
    grid-column: 1 / -1;
  }
  .field-quarter {
    grid-column: span 6;
  }
  .form-grid {
    gap: 14px;
  }
  .form-label {
    margin-bottom: 5px;
    font-size: .78rem;
  }
  .form-control,
  .form-select {
    min-height: 36px;
    padding: 6px 9px;
    font-size: .84rem;
  }
  .form-select {
    min-height: 34px;
    padding-block: 5px;
  }
  textarea.form-control {
    min-height: 82px;
  }
  .radio-row {
    gap: 8px;
  }
  .radio-row label {
    flex: 0 1 auto;
    justify-content: center;
    min-height: 34px;
    padding: 4px 2px;
    font-size: .8rem;
  }
  .status {
    font-size: .85rem;
  }
  .admin-header {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
  }
  .admin-shell {
    width: min(100% - 18px, 1180px);
    padding: 12px 0;
  }
  .admin-panel {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
  .admin-panel h1 {
    margin-bottom: 0;
    font-size: 1.55rem;
  }
  .admin-header .btn {
    min-height: 36px;
    padding: 7px 13px;
  }
  .admin-login {
    padding: 18px;
  }
  .admin-stats {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    margin: 0 0 18px;
    padding: 0;
    overflow: visible;
  }
  .admin-stats div {
    min-width: 0;
    min-height: 42px;
    padding: 6px 3px;
    border: 0;
    background: rgba(255, 255, 255, .58);
    box-shadow: none;
    text-align: center;
  }
  .admin-stats span {
    font-size: .98rem;
    line-height: 1.1;
  }
  .admin-stats small {
    font-size: .58rem;
    white-space: nowrap;
  }
  .admin-edit,
  .admin-table-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-top: 14px;
  }
  .admin-edit h2,
  .admin-table-wrap h2 {
    font-size: 1.08rem;
  }
  .admin-edit-actions .btn {
    flex: 1 1 120px;
  }
  .table-responsive {
    overflow: visible;
  }
  .admin-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 14px;
    font-size: .86rem;
  }
  .admin-table thead {
    display: none;
  }
  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }
  .admin-table tr {
    margin-bottom: 8px;
    padding: 10px 4px 14px 0;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .58);
    box-shadow: 0 8px 18px rgba(71, 126, 165, .08);
  }
  .admin-table tr:last-child {
    margin-bottom: 0;
  }
  .admin-table td {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 5px 10px;
    border-bottom: 0;
    line-height: 1.45;
    word-break: break-word;
  }
  .admin-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .04em;
  }
  .admin-table td:first-child {
    padding-top: 0;
    color: var(--ink);
    font-size: 1.02rem;
    font-weight: 900;
  }
  .admin-table td:first-child::before {
    color: var(--morandi-blue-deep);
  }
  .admin-table .message-cell {
    max-width: none;
  }
  .admin-table .submitted-at {
    white-space: normal;
  }
  .admin-table .admin-actions-cell {
    display: block;
    padding-top: 16px;
  }
  .admin-table .admin-actions-cell::before {
    content: none;
  }
  .admin-actions {
    justify-content: stretch;
    gap: 8px;
  }
  .admin-actions .btn,
  .admin-actions form {
    flex: 1 1 0;
  }
  .admin-actions .btn {
    width: 100%;
    min-height: 38px;
    border-color: rgba(95, 150, 190, .26);
    background: rgba(255, 255, 255, .52);
    box-shadow: none;
  }
  .admin-actions .btn-outline-danger {
    border-color: rgba(168, 70, 70, .22);
    background: rgba(255, 246, 246, .58);
  }
  .empty-table {
    display: block !important;
    padding: 22px 12px !important;
  }
}

@media (max-width: 380px) {
  .cat-cluster-top {
    right: -24px;
    width: 150px;
  }
  .cat-cluster-bottom {
    left: -12px;
    width: 140px;
  }
  .hero h1 {
    font-size: 1.55rem;
  }
  .navbar-brand {
    font-size: 1.12rem;
  }
  .timeline article {
    width: fit-content;
    max-width: 100%;
    grid-template-columns: 62px 13px 168px;
    column-gap: 8px;
  }
  .timeline article::before {
    width: 13px;
    height: 13px;
    margin-top: calc((1.08rem - 13px) / 2);
  }
  .timeline article:last-child::after {
    height: 13px;
  }
  .admin-stats {
    gap: 3px;
  }
  .admin-stats div {
    padding-inline: 2px;
  }
  .admin-stats span {
    font-size: .9rem;
  }
  .admin-stats small {
    font-size: .52rem;
  }
  #rsvp .container {
    width: min(100% - 32px, 1120px);
  }
  #rsvp .rsvp-card {
    padding: 22px 16px;
  }
  .field-quarter {
    grid-column: 1 / -1;
  }
}
