:root {
  --ink: #3c2a1f;
  --muted: #7a5b42;
  --paper: #fff0c8;
  --panel: rgba(255, 240, 200, 0.94);
  --line: #8b5a34;
  --rose: #d86f45;
  --wine: #8f3f2d;
  --sage: #6fa16a;
  --gold: #d69b3a;
  --cream: #f6ead1;
  --sky: #9bcbe0;
  --grass: #8fbd67;
  --shadow: 8px 8px 0 rgba(91, 59, 45, 0.2);
}

/* 2026 invitation release: warm scrapbook layout and mobile-first RSVP */
:root {
  --release-paper: #fffaf0;
  --release-cream: #f8edcf;
  --release-red: #a83b32;
  --release-ink: #302b27;
  --release-peach: #e9a48f;
  --release-yellow: #f5cf65;
}

body {
  color: var(--release-ink);
  background-color: #f6e7d2;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255,255,255,.72), transparent 30%),
    linear-gradient(135deg, rgba(168,59,50,.05) 25%, transparent 25%);
  background-size: auto, 28px 28px;
}

.shell { max-width: 940px; padding-bottom: 56px; }
.quiet-top { padding: 16px 4px 20px; }
.comic-invite { box-shadow: 0 20px 60px rgba(79,48,35,.14); }
.comic-post-head { padding: clamp(22px, 6vw, 52px) clamp(18px, 5vw, 46px) 16px; }
.comic-post-head h1 { line-height: 1.22; letter-spacing: -.03em; }
.comic-poster { min-height: clamp(500px, 105vw, 780px); }
.poster-character { filter: drop-shadow(0 18px 20px rgba(68,42,28,.14)); }
.comic-info-card { padding: clamp(24px, 6vw, 48px); }
.ticket-route strong { color: var(--release-red); }
.panel, .ticket-card, .station-card {
  background: rgba(255,250,240,.94);
  border-color: rgba(64,47,36,.22);
  box-shadow: 0 14px 38px rgba(79,48,35,.09);
}
.story-route-section { margin-top: clamp(36px, 8vw, 72px); }
.story-route-heading { max-width: 620px; margin-inline: auto; text-align: center; }
.station-media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.button, .ghost-button { min-height: 46px; touch-action: manipulation; }
.field-hint { display: block; margin-top: 6px; color: #776b61; font-size: 13px; font-weight: 400; }
.historical-feature, .deferred-section { display: none !important; }

.admin-login-page { min-height: 100vh; display: grid; place-items: center; }
.login-shell { width: min(100% - 32px, 460px); }
.login-card { padding: clamp(24px, 7vw, 42px); }
.login-card h1 { margin-bottom: 8px; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .shell { width: 100%; padding-inline: 12px; }
  .quiet-top { padding-inline: 4px; }
  .comic-invite { border-radius: 24px; }
  .comic-post-head h1 { font-size: clamp(27px, 8.2vw, 36px); }
  .comic-poster { min-height: 490px; }
  .happy-title { width: min(86%, 380px); }
  .poster-character { width: 90%; }
  .poster-bus { width: 32%; }
  .comic-info-card, .panel { padding: 22px 18px; }
  .ticket-info-grid, .info-grid, .grid { grid-template-columns: 1fr; }
  .ticket-actions, .row-actions { align-items: stretch; }
  .ticket-actions > *, .row-actions > * { width: 100%; justify-content: center; text-align: center; }
  input, select, textarea { font-size: 16px; max-width: 100%; }
  .bus-journey { padding-inline: 2px; }
  .station-card { padding: 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

html { color-scheme: light only; }
* { box-sizing: border-box; }
.comic-invite, .clipboard-section, .ticket-form-grid { font-family: var(--invitation-font, "Trebuchet MS", "Microsoft YaHei", Arial, sans-serif); }
/* An admin-selected invitation font should cover every visible invitation label.
   Existing color, weight and size rules remain unchanged. */
.custom-invitation-font .comic-invite *,
.custom-invitation-font .clipboard-section *,
.custom-invitation-font .ticket-form-grid * { font-family: var(--invitation-font, "Microsoft YaHei", sans-serif) !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(155, 203, 224, 0.72) 0 30%, transparent 30%),
    linear-gradient(135deg, rgba(111, 161, 106, 0.22) 25%, transparent 25%) 0 0 / 32px 32px,
    linear-gradient(225deg, rgba(111, 161, 106, 0.18) 25%, transparent 25%) 0 0 / 32px 32px,
    linear-gradient(180deg, #f7e2ad 0%, #f6d18a 52%, #9fbf6e 100%);
  font-family: "Trebuchet MS", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  image-rendering: pixelated;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(91,59,45,0.08) 2px, transparent 2px),
    linear-gradient(90deg, rgba(91,59,45,0.08) 2px, transparent 2px);
  background-size: 16px 16px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.26), transparent 74%);
}

body.has-bg {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

body.has-bg::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 240, 200, 0.86), rgba(246, 234, 209, 0.62));
}

.page-bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.shell,
.live-shell,
.pass {
  position: relative;
  z-index: 2;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
  position: relative;
}

.quiet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--wine);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--rose);
  font-family: Georgia, serif;
  box-shadow: 4px 4px 0 rgba(91, 59, 45, 0.18);
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-nav a,
.ghost-button {
  min-height: 38px;
  padding: 9px 13px;
  border: 3px solid var(--line);
  border-radius: 4px;
  background: #ffe9b6;
  color: var(--muted);
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(91, 59, 45, 0.16);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.panel,
.card,
.pass {
  border: 4px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.hero-copy {
  min-height: 560px;
  padding: clamp(30px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-copy > *:not(.panel-bg-media) {
  position: relative;
  z-index: 1;
}

.panel-bg-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  pointer-events: none;
}

.hero-media {
  min-height: 560px;
  border-radius: 4px;
  overflow: hidden;
  border: 4px solid var(--line);
  box-shadow: var(--shadow);
  background:
    linear-gradient(45deg, rgba(111,161,106,0.18) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(135deg, #ffe0a4, #cde3a2);
}

.hero-media img,
.hero-media video,
.module-media img,
.module-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-media.empty {
  display: grid;
  place-items: center;
  padding: 32px;
  color: var(--wine);
  font-family: Georgia, serif;
  font-size: 38px;
  text-align: center;
}

.ticket-hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.58fr);
}

.wedding-ticket {
  min-height: 560px;
  padding: clamp(24px, 4vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 0.28fr);
  gap: 24px;
  align-items: stretch;
}

.ticket-main {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.ticket-stub {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-width: 0;
  padding: 18px 10px;
  border-left: 4px dashed var(--line);
  color: var(--wine);
  text-align: center;
}

.ticket-stub span,
.ticket-stub small,
.ticket-kicker,
.ticket-no,
.ticket-info-grid span,
.ticket-form-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.ticket-stub strong {
  writing-mode: vertical-rl;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.ticket-route-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
  padding-bottom: 12px;
  border-bottom: 3px dashed rgba(139, 90, 52, 0.5);
}

.ticket-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 22px 0 6px;
  color: var(--wine);
  font-weight: 900;
}

.ticket-route::before,
.ticket-route::after {
  content: "";
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 12px, transparent 12px 20px);
}

.ticket-route span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ticket-route span:first-child { text-align: right; }

.ticket-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.ticket-info-grid div {
  min-width: 0;
  padding: 13px 14px;
  border: 3px solid rgba(139, 90, 52, 0.62);
  background: rgba(255, 233, 182, 0.74);
  border-radius: 4px;
}

.ticket-info-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.ticket-actions { margin-top: 22px; }

.ticket-media {
  border-style: dashed;
  background:
    linear-gradient(rgba(255, 250, 244, 0.1), rgba(255, 250, 244, 0.1)),
    url("/assets/ticket-template.svg") center / 100% 100% no-repeat,
    linear-gradient(135deg, rgba(184,111,118,0.22), rgba(184,148,90,0.2));
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.98;
  font-weight: 500;
}

h2 { font-size: 26px; margin-bottom: 16px; }
h3 { font-size: 18px; margin-bottom: 8px; }

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.panel { padding: 24px; }
.stack { display: grid; gap: 16px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.three-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.metric,
.field-box,
.timeline-item,
.guest-row,
.edit-row {
  border: 3px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 233, 182, 0.72);
}

.metric { padding: 16px; }
.metric span { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 4px; font-size: 20px; }

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  border: 3px solid var(--line);
  border-radius: 4px;
  background: #fff7df;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--rose); box-shadow: 4px 4px 0 rgba(216, 111, 69, 0.18); }

details {
  border: 3px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 233, 182, 0.7);
  padding: 12px 14px;
}

summary {
  cursor: pointer;
  color: var(--wine);
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 3px solid #5b3b2d;
  border-radius: 4px;
  background: #c65c3b;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 4px 4px 0 rgba(91, 59, 45, 0.28);
}

.button.secondary { background: var(--sage); }
.button.gold { background: #d69b3a; color: #3c2a1f; }
.button.warn { background: #9f4f56; }
.button.small { min-height: 34px; padding: 8px 12px; font-size: 13px; }

.invite-video-button {
  min-height: 38px;
  padding: 9px 16px;
  box-shadow: 0 10px 30px rgba(125, 63, 72, 0.18);
}

.status { min-height: 24px; color: var(--wine); font-weight: 700; }
.muted { color: var(--muted); }

.story-route-section {
  margin-top: 18px;
  padding: clamp(24px, 5vw, 48px) 0;
}

.story-route-heading {
  width: min(760px, 100%);
  margin-bottom: 18px;
}

.bus-journey {
  --bus-progress: 0;
  --stop-count: 3;
  position: relative;
  min-height: max(760px, calc(var(--stop-count) * 310px));
  padding: 16px 0 48px;
}

.bus-track {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bus-line {
  position: absolute;
  top: 20px;
  bottom: 24px;
  left: 50%;
  width: min(250px, 44vw);
  transform: translateX(-50%);
  background-image: url("data:image/svg+xml,%3Csvg width='240' height='440' viewBox='0 0 240 440' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M124 0H80v54H54v54h54v72h62v76h-58v64H78v62h54v58' fill='none' stroke='%235b3b2d' stroke-width='10' stroke-linecap='square' stroke-linejoin='miter'/%3E%3Cpath d='M124 0H80v54H54v54h54v72h62v76h-58v64H78v62h54v58' fill='none' stroke='%23d86f45' stroke-width='5' stroke-linecap='square' stroke-linejoin='miter'/%3E%3C/svg%3E");
  background-repeat: repeat-y;
  background-size: 100% 440px;
  opacity: 0.78;
}

.bus-doodle {
  position: absolute;
  top: calc(28px + var(--bus-progress) * (100% - 180px));
  left: calc(50% - 118px);
  width: clamp(118px, 17vw, 180px);
  filter: drop-shadow(6px 6px 0 rgba(91, 59, 45, 0.18));
  transition: top 520ms ease;
}

.bus-stops {
  position: relative;
  display: grid;
  gap: clamp(52px, 10vw, 112px);
  padding: 72px 0 20px;
}

.bus-stop {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 134px) minmax(0, 1fr);
  align-items: center;
  min-height: 230px;
}

.bus-stop:nth-child(odd) .station-card { grid-column: 1; }
.bus-stop:nth-child(even) .station-card { grid-column: 3; }

.station-sign {
  grid-column: 2;
  display: grid;
  gap: 5px;
  justify-self: center;
  width: min(134px, 100%);
  min-height: 72px;
  padding: 12px 10px;
  border-radius: 4px;
  border: 4px solid #5b3b2d;
  background: #ffe9b6;
  color: var(--wine);
  text-align: center;
  box-shadow: 6px 6px 0 rgba(91, 59, 45, 0.18);
}

.station-sign::after {
  content: "";
  justify-self: center;
  width: 4px;
  height: 42px;
  margin-bottom: -56px;
  background: #5b3b2d;
}

.station-sign span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.station-sign strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--wine);
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}
.station-sign-long strong { font-size: 13px; line-height: 1.2; }
.station-sign-latin strong {
  font-size: 12px;
  line-height: 1.15;
  letter-spacing: -.02em;
  word-break: keep-all;
  overflow-wrap: normal;
  white-space: normal;
}

.station-card {
  padding: 18px;
  border: 4px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 240, 200, 0.94);
  box-shadow: 6px 6px 0 rgba(91, 59, 45, 0.14);
  opacity: 0.48;
  transform: translateY(10px) scale(0.98);
  transition: opacity 260ms ease, transform 260ms ease, box-shadow 260ms ease;
}

.bus-stop.active .station-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  box-shadow: 8px 8px 0 rgba(91, 59, 45, 0.2);
}

.station-card time {
  display: block;
  color: var(--gold);
  font-weight: 900;
  margin-bottom: 6px;
}

.station-detail {
  display: grid;
  gap: 12px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 320ms ease, opacity 260ms ease;
}

.bus-stop.active .station-detail {
  max-height: 720px;
  opacity: 1;
}

.station-media {
  min-height: 160px;
  margin-top: 4px;
}

.ticket-card {
  position: relative;
  overflow: hidden;
  border-style: dashed;
  background:
    url("/assets/ticket-template.svg") center / 100% 100% no-repeat,
    linear-gradient(135deg, rgba(255, 252, 247, 0.94), rgba(255, 244, 232, 0.9));
}

.ticket-card::before,
.ticket-card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: #f6ead1;
  border: 3px solid var(--line);
  transform: translateY(-50%);
}

.ticket-card::before { left: -18px; }
.ticket-card::after { right: -18px; }

.ticket-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
}

.ticket-form-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 3px dashed rgba(139, 90, 52, 0.58);
}

.ticket-form-head strong {
  color: var(--wine);
  font-size: 22px;
  font-family: Georgia, "Times New Roman", serif;
}

.timeline { display: grid; gap: 12px; }
.timeline-item { padding: 16px; }
.timeline-item time { display: block; color: var(--gold); font-weight: 800; margin-bottom: 6px; }

.module-media {
  overflow: hidden;
  min-height: 180px;
  border-radius: 4px;
  border: 4px solid var(--line);
  background: rgba(255, 233, 182, 0.74);
}

.pass {
  width: min(760px, calc(100% - 32px));
  margin: 7vh auto;
  padding: 34px;
  text-align: center;
}

.boarding-pass {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(118px, 0.28fr);
  gap: 22px;
  text-align: left;
}

.boarding-pass h1 {
  font-size: clamp(38px, 7vw, 64px);
}

.boarding-pass .ticket-stub strong {
  writing-mode: horizontal-tb;
  font-size: clamp(28px, 5vw, 44px);
}

.pass-code {
  display: block;
  margin: 24px auto;
  padding: 24px 18px;
  border: 4px dashed var(--line);
  border-radius: 4px;
  background: #ffe9b6;
  color: var(--wine);
  font-size: clamp(48px, 14vw, 88px);
  font-weight: 900;
}

.live-body { overflow: auto; }
.live-shell { width: min(1480px, calc(100% - 36px)); margin: 0 auto; padding: 24px 0; position: relative; }
.live-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.live-title h1 { font-size: clamp(38px, 5vw, 76px); margin-bottom: 6px; }
.live-clock { font-size: 18px; color: var(--muted); }
.big-number { color: var(--wine); font-size: clamp(58px, 10vw, 136px); line-height: 1; font-weight: 900; }

.blessing-wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.card { padding: 16px; }
.card p { color: var(--muted); line-height: 1.55; margin-bottom: 0; }

.bar { height: 13px; border-radius: 4px; background: rgba(91,59,45,0.18); overflow: hidden; border: 2px solid var(--line); }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--rose), var(--gold)); }

.guest-list { display: grid; gap: 8px; max-height: 520px; overflow: auto; }
.guest-row { display: grid; grid-template-columns: 76px minmax(90px, 1fr) 92px 110px 92px; gap: 8px; padding: 10px; align-items: center; }
.pill { display: inline-flex; justify-content: center; padding: 5px 8px; border-radius: 4px; background: #ffe9b6; border: 2px solid var(--line); color: var(--wine); font-size: 12px; font-weight: 800; }

.edit-row { padding: 14px; display: grid; gap: 12px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.options-list { display: grid; gap: 8px; }

.hidden { display: none !important; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(48, 40, 37, 0.46);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  max-height: min(82vh, 820px);
  overflow: auto;
}

@media (max-width: 900px) {
  .hero, .grid, .three-grid, .info-grid, .ticket-form-grid { grid-template-columns: 1fr; }
  .hero-copy, .hero-media { min-height: auto; }
  .wedding-ticket, .boarding-pass { grid-template-columns: 1fr; }
  .ticket-stub {
    min-height: 86px;
    border-left: 0;
    border-top: 2px dashed rgba(184, 148, 90, 0.55);
  }
  .ticket-stub strong { writing-mode: horizontal-tb; }
  .ticket-info-grid { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 4 / 3; }
  .quiet-top, .live-header { align-items: flex-start; flex-direction: column; }
  .blessing-wall { grid-template-columns: 1fr; }
  .guest-row { grid-template-columns: 68px 1fr; }
  .bus-journey { min-height: max(720px, calc(var(--stop-count) * 330px)); }
  .bus-line { left: 28px; width: 120px; transform: none; }
  .bus-doodle {
    left: 4px;
    width: 92px;
  }
  .bus-stops { padding-left: 74px; gap: 72px; }
  .bus-stop {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
  }
  .bus-stop:nth-child(odd) .station-card,
  .bus-stop:nth-child(even) .station-card { grid-column: 2; }
  .station-sign {
    grid-column: 1;
    width: 88px;
    padding: 10px 8px;
  }
  .station-sign strong { font-size: 13px; }
}

/* Hand-drawn cartoon wedding style override */
:root {
  --ink: #2b2523;
  --muted: #7a6b67;
  --paper: #fff7df;
  --panel: rgba(255, 247, 223, 0.93);
  --line: #23201f;
  --rose: #ff7d8b;
  --wine: #ff6177;
  --sage: #9bd77e;
  --gold: #ffd25f;
  --cream: #fff0bd;
  --sky: #9bd6ff;
  --shadow: 8px 10px 0 rgba(35, 32, 31, 0.13);
}

body {
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 210, 95, 0.42), transparent 22%),
    radial-gradient(circle at 84% 16%, rgba(155, 214, 255, 0.45), transparent 24%),
    radial-gradient(circle at 24% 86%, rgba(169, 223, 146, 0.5), transparent 28%),
    linear-gradient(180deg, #fff4cf 0%, #ffe9f0 48%, #e8f7d6 100%);
  font-family: "Comic Sans MS", "Marker Felt", "YouYuan", "Microsoft YaHei", Arial, sans-serif;
  image-rendering: auto;
}

body::before {
  background-image:
    url("data:image/svg+xml,%3Csvg width='96' height='96' viewBox='0 0 96 96' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18 30c10-9 24-9 35 0M61 70c7-8 16-8 24 0' fill='none' stroke='%23ff7d8b' stroke-width='4' stroke-linecap='round' opacity='.18'/%3E%3Cpath d='M14 68l8 8 10-14M70 20l6 7 9-12' fill='none' stroke='%239bd77e' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' opacity='.18'/%3E%3Ccircle cx='76' cy='46' r='4' fill='%239bd6ff' opacity='.22'/%3E%3C/svg%3E");
  background-size: 96px 96px;
  mask-image: none;
}

body.has-bg::after {
  background: linear-gradient(120deg, rgba(255, 247, 223, 0.8), rgba(255, 233, 240, 0.62));
}

.brand {
  color: var(--line);
  text-shadow: 2px 2px 0 #fff;
}

.brand-mark,
.hero-copy,
.panel,
.card,
.pass,
.hero-media,
.metric,
.field-box,
.timeline-item,
.guest-row,
.edit-row,
input,
select,
textarea,
details,
.module-media,
.station-card,
.station-sign {
  border-color: var(--line);
  border-radius: 18px 14px 20px 13px;
  box-shadow: var(--shadow);
}

.hero-copy,
.panel,
.card,
.pass,
.station-card,
.metric,
.edit-row,
.field-box,
.guest-row {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.34), transparent 42%),
    var(--panel);
}

.brand-mark {
  border-width: 4px;
  background: #fff7df;
  color: var(--wine);
}

.admin-nav a,
.ghost-button,
.button {
  border: 4px solid var(--line);
  border-radius: 999px 860px 920px 780px;
  box-shadow: 5px 6px 0 rgba(35, 32, 31, 0.16);
}

.ghost-button {
  background: #fff7df;
  color: var(--line);
}

.button {
  background: #ff7d6e;
  color: #fff;
}

.button.gold {
  background: var(--gold);
  color: #2b2523;
}

.button.secondary {
  background: var(--sage);
  color: #2b2523;
}

h1,
h2,
.ticket-stub strong,
.pass-code {
  font-family: "Comic Sans MS", "Marker Felt", "YouYuan", "Microsoft YaHei", Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--line);
  text-shadow:
    2px 0 0 #fff,
    -2px 0 0 #fff,
    0 2px 0 #fff,
    0 -2px 0 #fff,
    4px 4px 0 rgba(255, 125, 139, 0.2);
}

h1 {
  color: var(--wine);
  transform: rotate(-1deg);
}

.eyebrow,
.ticket-kicker,
.ticket-no,
.ticket-info-grid span,
.ticket-form-head span {
  color: var(--wine);
  text-transform: none;
}

.ticket-card {
  border-style: solid;
  background:
    url("/assets/ticket-template.svg") center / 100% 100% no-repeat,
    #fff7df;
}

.ticket-card::before,
.ticket-card::after {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff4cf;
}

.ticket-stub {
  border-left: 4px dashed rgba(35, 32, 31, 0.56);
}

.ticket-character {
  width: min(164px, 100%);
  align-self: center;
  display: block;
  border-radius: 18px;
  filter: drop-shadow(4px 5px 0 rgba(35, 32, 31, 0.14));
}

.ticket-stub strong {
  font-size: clamp(28px, 4.5vw, 48px);
}

.ticket-info-grid div,
input,
select,
textarea,
details {
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(35, 32, 31, 0.82);
}

.ticket-route::before,
.ticket-route::after,
.bar > span {
  background: repeating-linear-gradient(90deg, #ff7d8b 0 16px, #ffd25f 16px 30px, #9bd6ff 30px 44px, #9bd77e 44px 58px);
}

.hero-media {
  background:
    url("/assets/ticket-template.svg") center / 100% 100% no-repeat,
    linear-gradient(135deg, #fff7df, #ffe9f0);
}

.hero-media.empty {
  color: var(--wine);
  font-family: "Comic Sans MS", "Marker Felt", "YouYuan", "Microsoft YaHei", Arial, sans-serif;
}

.bus-line {
  background-image: url("data:image/svg+xml,%3Csvg width='240' height='440' viewBox='0 0 240 440' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M129 0C58 65 58 117 126 190c78 84 67 150-28 220' fill='none' stroke='%2322201f' stroke-width='8' stroke-linecap='round' stroke-linejoin='round' stroke-dasharray='2 16'/%3E%3Cpath d='M129 0C58 65 58 117 126 190c78 84 67 150-28 220' fill='none' stroke='%23ff7d8b' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.bus-doodle {
  filter: drop-shadow(6px 8px 0 rgba(35, 32, 31, 0.16));
}

.station-sign {
  background: #fff7df;
  transform: rotate(-1.5deg);
}

.bus-stop:nth-child(even) .station-sign {
  transform: rotate(1.5deg);
}

.station-sign::after {
  width: 5px;
  border-radius: 999px;
  background: var(--line);
}

.station-sign span {
  color: var(--rose);
}

.station-sign strong {
  color: var(--line);
}

.station-card {
  opacity: 0.5;
}

.bus-stop.active .station-card {
  opacity: 1;
}

.module-media img,
.module-media video,
.hero-media img,
.hero-media video {
  border-radius: 12px;
}

.bar {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 900px) {
  .ticket-stub {
    border-left: 0;
    border-top: 4px dashed rgba(35, 32, 31, 0.56);
  }

  .ticket-character {
    width: min(180px, 72vw);
  }
}

.comic-invite {
  width: min(900px, 100%);
  margin: 0 auto;
}

.comic-post-head {
  padding: 6px 4px 18px;
}

.comic-post-head h1 {
  margin-bottom: 14px;
  color: #1f1f1f;
  font-size: clamp(30px, 5.8vw, 58px);
  line-height: 1.2;
  transform: rotate(-0.8deg);
  text-shadow:
    2px 0 0 #fff,
    -2px 0 0 #fff,
    0 2px 0 #fff,
    0 -2px 0 #fff,
    5px 5px 0 rgba(255, 125, 139, 0.18);
}

.comic-author-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #8790a2;
  font-size: 18px;
}

.comic-author-row strong {
  color: #60718e;
  font-size: 20px;
}

.original-badge {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: #9c9c9c;
}

.music-strip {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 20px 0 28px;
  padding: 14px 18px;
  border: 5px solid #222;
  border-radius: 22px 18px 26px 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 8px 10px 0 rgba(35, 32, 31, 0.11);
}

.music-cover {
  width: 92px;
  height: 92px;
  overflow: hidden;
  border: 4px solid #222;
  border-radius: 16px;
  background: #fff7df;
}

.music-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-strip strong,
.music-strip span {
  display: block;
}

.music-strip strong {
  font-size: clamp(24px, 4vw, 38px);
  color: #1f1f1f;
}

.music-strip span {
  margin-top: 6px;
  color: #a3a3a3;
  font-size: 18px;
}

.pause-mark {
  color: #1f1f1f !important;
  font-size: 38px !important;
  font-weight: 900;
}

.comic-poster {
  position: relative;
  overflow: hidden;
  min-height: clamp(560px, 88vw, 900px);
  padding: clamp(22px, 4vw, 42px);
  border: 6px solid #222;
  border-radius: 8px 30px 12px 26px;
  background:
    radial-gradient(circle at center 18%, rgba(255,255,255,0.8), transparent 22%),
    repeating-radial-gradient(circle at 50% 22%, rgba(255, 149, 117, 0.34) 0 5px, transparent 5px 26px),
    linear-gradient(180deg, #fff08f 0%, #ffe299 44%, #ff8f75 45%, #f97164 100%);
  box-shadow: 12px 14px 0 rgba(35, 32, 31, 0.14);
}

.happy-title {
  position: relative;
  z-index: 2;
  display: block;
  width: min(720px, 96%);
  margin: 0 auto 8px;
  border-radius: 20px;
  mix-blend-mode: multiply;
}

.poster-scene {
  position: relative;
  z-index: 1;
  min-height: clamp(360px, 63vw, 610px);
  margin: 0 auto;
  border: 5px solid #222;
  border-radius: 10px 20px 8px 24px;
  background:
    linear-gradient(rgba(255,255,255,0.06), rgba(255,255,255,0.06)),
    #ff8b72;
}

.poster-character {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -4%;
  width: min(600px, 86%);
  transform: translateX(-50%);
  filter: drop-shadow(5px 7px 0 rgba(34, 34, 34, 0.18));
}

.poster-bus {
  position: absolute;
  left: 4%;
  bottom: 4%;
  width: min(170px, 28%);
  transform: rotate(-8deg);
  filter: drop-shadow(4px 5px 0 rgba(34, 34, 34, 0.14));
}

.speech {
  position: absolute;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  min-height: 42px;
  padding: 6px 10px;
  border: 4px solid #222;
  border-radius: 50%;
  background: #fff;
  color: #222;
  font-size: 18px;
  font-weight: 900;
}

.speech-left {
  left: 6%;
  top: 46%;
  transform: rotate(-9deg);
}

.speech-right {
  right: 5%;
  top: 34%;
  transform: rotate(8deg);
}

.star-doodle {
  position: absolute;
  z-index: 4;
  color: #ffe457;
  -webkit-text-stroke: 3px #222;
  paint-order: stroke fill;
  font-size: clamp(36px, 7vw, 68px);
}

.star-one {
  left: 7%;
  bottom: 22%;
  transform: rotate(-18deg);
}

.star-two {
  right: 9%;
  top: 18%;
  transform: rotate(16deg);
}

.comic-info-card {
  margin-top: 18px;
  padding: 24px;
  border: 5px solid #222;
  border-radius: 24px 18px 28px 20px;
  background: rgba(255, 247, 223, 0.9);
  box-shadow: 8px 10px 0 rgba(35, 32, 31, 0.11);
}

@media (max-width: 900px) {
  .comic-author-row { font-size: 15px; }
  .comic-author-row strong { font-size: 16px; }
  .music-strip {
    grid-template-columns: 70px minmax(0, 1fr) auto;
    gap: 12px;
  }
  .music-cover {
    width: 70px;
    height: 70px;
  }
  .music-strip strong { font-size: 24px; }
  .music-strip span { font-size: 15px; }
  .comic-poster { min-height: 620px; }
  .poster-scene { min-height: 420px; }
  .poster-character { width: 94%; }
  .poster-bus {
    width: 36%;
    bottom: 2%;
  }
  .speech-left { left: 2%; }
  .speech-right { right: 2%; }
}

/* Release overrides must remain last in cascade. */
body {
  color: var(--release-ink);
  background-color: #f6e7d2;
  background-image: radial-gradient(circle at 12% 8%, rgba(255,255,255,.72), transparent 30%), linear-gradient(135deg, rgba(168,59,50,.05) 25%, transparent 25%);
  background-size: auto, 28px 28px;
  image-rendering: auto;
}
.shell { max-width: 940px; padding-bottom: 56px; }
.comic-invite { box-shadow: 0 20px 60px rgba(79,48,35,.14); }
.comic-poster { min-height: clamp(500px, 105vw, 780px); }
.panel, .ticket-card, .station-card { background: rgba(255,250,240,.94); border-color: rgba(64,47,36,.22); box-shadow: 0 14px 38px rgba(79,48,35,.09); }
.historical-feature, .deferred-section { display: none !important; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .shell { width: 100%; padding-inline: 12px; }
  .comic-poster { min-height: 490px; }
  .comic-info-card, .panel { padding: 22px 18px; }
  .ticket-info-grid, .info-grid, .grid { grid-template-columns: 1fr; }
  .ticket-actions > *, .row-actions > * { width: 100%; justify-content: center; text-align: center; }
  input, select, textarea { font-size: 16px; max-width: 100%; }
}

/* Reference 1 + 2 visual composition */
.quiet-top { display: none; }
.comic-invite { width: min(760px, 100%); box-shadow: none; }
.comic-post-head { display: none; }
.comic-poster {
  min-height: clamp(610px, 110vw, 860px);
  padding: clamp(20px, 4vw, 36px) 0 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background:
    repeating-conic-gradient(from -8deg at 50% 43%, rgba(241,144,81,.24) 0deg 2.5deg, transparent 2.5deg 9deg),
    radial-gradient(circle at 50% 42%, #fffbd4 0 20%, #ffef83 64%, #ffdf68 100%);
}
.comic-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(255,126,92,.32));
  pointer-events: none;
}
.happy-title { width: min(640px, 88%); margin-bottom: -3%; border-radius: 0; mix-blend-mode: multiply; }
.poster-scene { min-height: clamp(430px, 75vw, 620px); border: 0; border-radius: 0; background: transparent; }
.poster-character { bottom: -7%; width: min(590px, 88%); z-index: 2; }
.poster-bus { left: 6%; bottom: 7%; width: min(150px, 25%); z-index: 3; }
.speech { border-width: 3px; box-shadow: 3px 4px 0 rgba(48,43,39,.14); }

.clipboard-section {
  position: relative;
  width: min(760px, 100%);
  margin: clamp(52px, 9vw, 92px) auto 28px;
  padding: 34px 18px 20px;
  border: 5px solid #302b27;
  border-radius: 34px 34px 18px 18px;
  background: linear-gradient(145deg, #eda27e, #d98165);
  box-shadow: 10px 14px 0 rgba(48,43,39,.14);
}
.clipboard-clip {
  position: absolute;
  z-index: 3;
  top: -43px;
  left: 50%;
  width: min(270px, 48%);
  height: 74px;
  transform: translateX(-50%);
  display: grid;
  place-items: start center;
  padding-top: 8px;
  border: 5px solid #302b27;
  border-radius: 14px 14px 5px 5px;
  background: #d9d1c7;
  box-shadow: inset 0 -10px rgba(255,255,255,.22);
}
.clipboard-clip::after { content: ""; position: absolute; left: -14%; right: -14%; bottom: -17px; height: 25px; border: 5px solid #302b27; border-radius: 5px; background: #e5ddd2; }
.clipboard-clip span { font-size: 20px; color: #a83b32; }
.clipboard-paper {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 8vw, 72px) clamp(18px, 6vw, 54px) 56px;
  border: 4px solid #302b27;
  background-color: #fffbe0;
  background-image: linear-gradient(rgba(222,174,94,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(222,174,94,.25) 1px, transparent 1px);
  background-size: 24px 24px;
}
.paper-star { position: absolute; z-index: 1; font-size: 40px; color: #f4cb54; -webkit-text-stroke: 3px #302b27; transform: rotate(-12deg); }
.paper-star-one { left: 4%; top: 55px; }
.paper-star-two { right: 4%; top: 240px; color: #9ccdf1; transform: rotate(12deg); }
.invitation-copy { position: relative; z-index: 2; max-width: 580px; margin: 0 auto 34px; text-align: center; font-family: "STKaiti", "KaiTi", "YouYuan", "Microsoft YaHei", sans-serif; font-size: clamp(18px, 3.2vw, 24px); line-height: 1.9; }
.invitation-copy .lead { color: #302b27; font-size: inherit; }
.arrow-title { position: relative; z-index: 2; display: grid; place-items: center; width: min(100%, 590px); min-height: 72px; margin: 34px auto 28px; padding: 10px 38px; border: 5px solid #302b27; background: #fffef4; transform: rotate(-.7deg); box-shadow: inset 0 -9px rgba(245,207,101,.42); }
.arrow-title::after { content: ""; position: absolute; right: -31px; width: 52px; height: 52px; border-top: 5px solid #302b27; border-right: 5px solid #302b27; background: #fffef4; transform: rotate(45deg); }
.arrow-title span { position: relative; z-index: 1; font-family: "STKaiti", "KaiTi", "YouYuan", sans-serif; font-size: clamp(27px, 5vw, 42px); font-weight: 900; letter-spacing: .12em; }
.couple-portraits { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; max-width: 520px; margin: 0 auto 28px; text-align: center; }
.couple-portraits article { min-width: 0; }
.portrait-circle { position: relative; width: clamp(120px, 24vw, 178px); aspect-ratio: 1; margin: 0 auto 12px; overflow: hidden; border: 5px solid #302b27; border-radius: 50%; background: #ef9075; box-shadow: 7px 8px 0 #f4d85f; }
.portrait-circle img { position: absolute; top: -12%; width: 190%; max-width: none; height: 145%; object-fit: contain; }
.portrait-groom img { left: -86%; }
.portrait-bride img { left: -5%; }
.couple-portraits strong, .couple-portraits span { display: block; font-family: "STKaiti", "KaiTi", "YouYuan", sans-serif; }
.couple-portraits strong { font-size: 25px; }
.couple-portraits span { font-size: 20px; }
.couple-portraits p { margin: 7px auto 0; color: #655a50; font-size: 14px; line-height: 1.55; }
.clipboard-paper .comic-info-card { padding: 0; border: 0; background: transparent; box-shadow: none; }
.clipboard-paper .story-route-section { margin: 0; padding: 0; }
.clipboard-paper .story-route-heading { margin-bottom: 20px; }
.clipboard-paper .bus-journey { min-height: max(690px, calc(var(--stop-count) * 310px)); }

.wedding-schedule { position: relative; z-index: 2; max-width: 570px; margin: 0 auto; }
.schedule-item { display: grid; grid-template-columns: 76px 42px minmax(0,1fr); gap: 12px; align-items: start; padding: 0 0 28px; }
.schedule-item time { padding-top: 8px; color: #a83b32; font-size: 18px; font-weight: 900; }
.schedule-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border: 3px solid #302b27; border-radius: 50%; background: #f5cf65; font-weight: 900; }
.schedule-item:not(:last-child) .schedule-dot::after { content: ""; position: absolute; top: 35px; width: 3px; height: 48px; background: #302b27; }
.schedule-item h3 { margin: 3px 0 5px; font-size: 20px; }
.schedule-item p { margin: 0; color: #655a50; line-height: 1.6; }
.schedule-image { margin: 0 0 14px; overflow: hidden; border: 3px solid #302b27; border-radius: 22px 28px 20px 30px; box-shadow: 5px 6px 0 rgba(239,144,117,.35); }
.schedule-image img, .schedule-image video, .schedule-full-image img, .schedule-full-image video { display: block; width: 100%; height: auto; }
.schedule-item.schedule-image-only { display: block; padding-bottom: 30px; }
.schedule-full-image { overflow: hidden; border: 3px solid #302b27; border-radius: 26px; background: #fffaf0; box-shadow: 6px 7px 0 rgba(244,216,95,.65); }

.attire-guide { position: relative; z-index: 2; width: min(590px, 100%); margin: 0 auto; }
.attire-card {
  padding: clamp(24px, 6vw, 42px);
  border: 3px solid #302b27;
  border-radius: 30px 22px 34px 25px;
  background: linear-gradient(145deg, #fff9e9, #fce7df);
  box-shadow: 8px 9px 0 rgba(244,216,95,.72);
  text-align: center;
}
.attire-card h2 { margin: 0 0 14px; font-family: "STKaiti", "KaiTi", "YouYuan", sans-serif; font-size: clamp(25px, 6vw, 36px); }
.attire-card p { margin: 0 auto; max-width: 480px; color: #655a50; font-size: 16px; line-height: 1.85; }
.attire-card small { display: block; margin-top: 14px; color: #765e50; line-height: 1.6; }
.attire-palette { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin: 24px 0 10px; }
.paw-swatch { position: relative; display: block; width: 72px; height: 66px; filter: drop-shadow(3px 4px 0 rgba(48,43,39,.16)); transform: rotate(-4deg); }
.paw-swatch:nth-child(even) { transform: rotate(5deg); }
.paw-swatch i, .paw-swatch b { position: absolute; display: block; border: 2.5px solid #302b27; background: var(--attire-color); }
.paw-swatch i { width: 19px; height: 23px; border-radius: 55% 55% 48% 48%; }
.paw-swatch i:nth-child(1) { left: 3px; top: 22px; transform: rotate(-28deg); }
.paw-swatch i:nth-child(2) { left: 17px; top: 3px; transform: rotate(-12deg); }
.paw-swatch i:nth-child(3) { right: 17px; top: 3px; transform: rotate(12deg); }
.paw-swatch i:nth-child(4) { right: 3px; top: 22px; transform: rotate(28deg); }
.paw-swatch b { left: 18px; bottom: 0; width: 38px; height: 36px; border-radius: 52% 52% 45% 45% / 60% 60% 42% 42%; transform: rotate(1deg); }
.attire-image, .attire-full-image { overflow: hidden; margin: 0 0 22px; border: 3px solid #302b27; border-radius: 24px; background: #fffaf0; box-shadow: 6px 7px 0 rgba(239,144,117,.32); }
.attire-full-image { margin: 0; }
.attire-image img, .attire-image video, .attire-full-image img, .attire-full-image video { display: block; width: 100%; height: auto; object-fit: contain; }

/* Softer wedding details: rounded, cloud-like panels instead of rigid tickets. */
.clipboard-paper .wedding-info-soft { padding: 10px 0 4px; }
.wedding-info-soft .ticket-info-grid { gap: 12px; }
.wedding-info-soft .ticket-info-grid > div {
  position: relative;
  min-height: 112px;
  padding: 24px 18px;
  border: 0;
  border-radius: 48% 52% 44% 56% / 55% 44% 56% 45%;
  background: #fff8e8;
  box-shadow: 0 8px 20px rgba(111,83,58,.12), inset 0 0 0 2px rgba(168,59,50,.14);
}
.wedding-info-soft .ticket-info-grid > div:nth-child(2n) { background: #fce2d7; border-radius: 55% 45% 52% 48% / 45% 55% 44% 56%; }
.wedding-info-soft .ticket-info-grid > div:nth-child(3n) { background: #f7edb9; }
.wedding-info-soft .ticket-actions { justify-content: center; margin-top: 20px; }
.map-links-title { margin: 20px 0 10px; text-align: center; color: #655a50; font-weight: 800; letter-spacing: .2em; }
.wedding-info-soft .ticket-actions { margin-top: 0; }
.map-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 20px;
  border: 2px solid #74685d;
  border-radius: 999px;
  background: transparent;
  color: #514940;
  font-weight: 700;
  text-decoration: none;
}
.map-link-button:hover { background: rgba(255,255,255,.55); }
.wedding-location-card .ticket-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wedding-location-card .ticket-info-grid > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.wedding-location-card .ticket-info-grid strong { width: 100%; text-align: center; }
.wedding-time-callout {
  width: min(360px, calc(100% - 24px));
  margin: 18px auto 24px;
  padding: 18px 28px;
  text-align: center;
  border: 3px solid #302b27;
  border-radius: 50% 46% 52% 48% / 48% 54% 46% 52%;
  background: #fce2d7;
  box-shadow: 6px 7px 0 #f4d85f;
}
.wedding-time-callout span, .wedding-time-callout small { display: block; color: #7a6251; letter-spacing: .12em; }
.wedding-time-callout strong { display: block; margin: 4px 0; color: #a83b32; font-family: "STKaiti", "KaiTi", "YouYuan", sans-serif; font-size: clamp(34px, 9vw, 50px); }
.wedding-time-callout small { font-size: 12px; }

.arrival-banner.bus-arrival-sign {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  width: min(520px, calc(100% - 20px));
  min-height: 120px;
  margin: 42px auto 34px;
  padding: 16px 24px 16px 16px;
  border: 4px solid #302b27;
  border-radius: 10px;
  background: #fff8e8;
  box-shadow: 8px 9px 0 #f4d85f;
  text-align: left;
  transform: none;
  justify-items: stretch;
}
.arrival-banner.bus-arrival-sign::before,
.arrival-banner.bus-arrival-sign::after {
  content: "";
  position: absolute;
  bottom: -35px;
  width: 7px;
  height: 34px;
  border: 2px solid #302b27;
  border-top: 0;
  background: #74685d;
}
.arrival-banner.bus-arrival-sign::before { left: 45px; }
.arrival-banner.bus-arrival-sign::after { right: 45px; }
.arrival-route-number { display: grid !important; place-items: center; width: 58px; height: 58px; border: 3px solid #302b27; border-radius: 50%; background: #ef9075; color: #fffaf0; font-size: 22px !important; font-weight: 900; }
.bus-arrival-sign > div > span { display: block; font-family: "STKaiti", "KaiTi", "YouYuan", sans-serif; font-size: clamp(28px, 7vw, 42px); font-weight: 900; letter-spacing: .08em; }
.bus-arrival-sign > div > small { display: block; margin-top: 5px; color: #a83b32; font-weight: 800; letter-spacing: .12em; }
.bus-arrival-sign > i { position: absolute; right: 18px; top: 12px; width: 34px; height: 8px; border-radius: 999px; background: #ef9075; transform: rotate(-5deg); }

.music-toggle {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 3px solid #302b27;
  border-radius: 50%;
  background: #fff8e8;
  color: #a83b32;
  box-shadow: 4px 5px 0 #f4d85f;
  font-size: 25px;
  cursor: pointer;
}
.music-toggle.playing { animation: music-spin 5s linear infinite; background: #fce2d7; }
.music-toggle.hidden { display: none; }
@keyframes music-spin { to { transform: rotate(360deg); } }

/* Keep the decorative photo frame, but show timeline photos at their natural ratio. */
.clipboard-paper .station-media {
  min-height: 0;
  height: auto;
}
.clipboard-paper .station-media img,
.clipboard-paper .station-media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}

@media (max-width: 520px) {
  .shell { padding-inline: 0; }
  .comic-poster { min-height: 570px; }
  .poster-scene { min-height: 420px; }
  .clipboard-section { width: calc(100% - 20px); padding: 30px 9px 10px; border-width: 4px; }
  .clipboard-paper { padding-inline: 14px; border-width: 3px; }
  .arrow-title { width: calc(100% - 35px); min-height: 60px; border-width: 4px; }
  .arrow-title::after { right: -25px; width: 43px; height: 43px; border-width: 4px; }
  .portrait-circle { width: min(37vw, 150px); }
  .clipboard-paper .ticket-info-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .clipboard-paper .bus-journey { min-height: max(680px, calc(var(--stop-count) * 300px)); }
  .schedule-item { grid-template-columns: 62px 36px minmax(0,1fr); gap: 8px; }
  .schedule-dot { width: 34px; height: 34px; }
  .wedding-info-soft .ticket-info-grid > div { min-height: 96px; padding: 20px 13px; }
  .wedding-location-card .ticket-info-grid { grid-template-columns: 1fr; }
  .arrival-banner.bus-arrival-sign { grid-template-columns: 62px 1fr; padding-right: 14px; }
  .arrival-route-number { width: 52px; height: 52px; font-size: 19px !important; }
  .attire-card h2 { font-size: clamp(19px, 6vw, 25px); white-space: nowrap; letter-spacing: 0; }
}

/* Exact supplied hero and avatar artwork. */
.comic-poster {
  min-height: 0;
  padding: 0;
  background: transparent;
}
.comic-poster::after { display: none; }
.reference-hero-image { display: block; width: 100%; height: auto; }
.reference-hero-image.hero-loading { opacity: 0; }
.portrait-circle {
  background-image: var(--couple-avatar-image, url("/assets/wedding/couple/wechat-couple-avatar.png"));
  background-repeat: no-repeat;
  background-size: cover;
}
.portrait-groom, .portrait-bride { background-position: center; }

.wedding-calendar {
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: 0 auto 34px;
  padding: 24px clamp(14px, 4vw, 28px) 28px;
  border: 4px solid #302b27;
  background: rgba(255,254,244,.84);
  box-shadow: 7px 8px 0 rgba(233,164,143,.45);
  transform: rotate(.4deg);
}
.calendar-date-line { margin: 0 0 18px; text-align: center; font-family: "STKaiti", "KaiTi", "YouYuan", sans-serif; font-size: clamp(23px, 4.5vw, 34px); font-weight: 900; text-decoration: underline wavy #dc7866 3px; text-underline-offset: 9px; }
.calendar-week, .calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; text-align: center; }
.calendar-week { margin-bottom: 9px; font-weight: 900; }
.calendar-days span { position: relative; display: grid; place-items: center; min-height: 38px; font-size: 17px; }
.calendar-days .wedding-day { z-index: 1; color: #302b27; font-weight: 900; }
.calendar-days .wedding-day::before { content: ""; position: absolute; z-index: -1; width: 38px; height: 34px; border: 3px solid #302b27; border-radius: 52% 46% 55% 44%; background: #ee7668; transform: rotate(-9deg); box-shadow: 3px 3px 0 #f5cf65; }
.calendar-days .wedding-day::after { content: "♥"; position: absolute; top: -17px; right: -1px; color: #a83b32; font-size: 15px; transform: rotate(12deg); }
.arrival-banner { position: relative; z-index: 2; display: grid; place-items: center; max-width: 590px; min-height: 138px; margin: 18px auto 0; padding: 24px 32px; border: 5px solid #302b27; border-radius: 42% 11% 38% 9% / 18% 42% 17% 38%; background: #fffef4; box-shadow: inset 0 -18px rgba(245,207,101,.38), 8px 9px 0 rgba(48,43,39,.12); text-align: center; transform: rotate(-1deg); }
.arrival-banner::before, .arrival-banner::after { position: absolute; color: #f0a08b; font-size: 34px; }
.arrival-banner::before { content: "♥"; left: 22px; top: 16px; transform: rotate(-13deg); }
.arrival-banner::after { content: "✦"; right: 24px; bottom: 15px; color: #94c8ed; transform: rotate(12deg); }
.arrival-banner span { display: block; font-family: "STKaiti", "KaiTi", "YouYuan", sans-serif; font-size: clamp(32px, 6vw, 50px); font-weight: 900; letter-spacing: .12em; }
.arrival-banner small { display: block; margin-top: 5px; color: #a83b32; font-weight: 900; letter-spacing: .16em; }

@media (max-width: 520px) {
  .comic-poster { min-height: 0; }
  .wedding-calendar { border-width: 3px; }
  .calendar-week, .calendar-days { gap: 3px; }
  .calendar-days span { min-height: 34px; font-size: 15px; }
  .arrival-banner { min-height: 118px; padding-inline: 22px; border-width: 4px; }
}

/* Separate crops from the supplied 222 WeChat avatar. */
.portrait-circle {
  background-size: 250% 250%;
}
.portrait-groom {
  background-size: var(--groom-avatar-zoom, 250%) var(--groom-avatar-zoom, 250%);
  background-position: var(--groom-avatar-x, 80%) var(--groom-avatar-y, 15%);
}
.portrait-bride {
  background-size: var(--bride-avatar-zoom, 250%) var(--bride-avatar-zoom, 250%);
  background-position: var(--bride-avatar-x, 11%) var(--bride-avatar-y, 27%);
}

/* Larger 710 story photos with spacing sized to the media. */
.clipboard-paper .bus-journey {
  min-height: max(980px, calc(var(--stop-count) * 460px));
  padding-bottom: 64px;
}
.clipboard-paper .bus-line {
  left: 34px;
  width: 130px;
  transform: none;
}
.clipboard-paper .bus-doodle {
  left: 5px;
  width: 104px;
}
.clipboard-paper .bus-stops {
  gap: 94px;
  padding: 74px 0 28px 86px;
}
.clipboard-paper .bus-stop {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  min-height: 360px;
}
.clipboard-paper .bus-stop:nth-child(odd) .station-card,
.clipboard-paper .bus-stop:nth-child(even) .station-card {
  grid-column: 2;
}
.clipboard-paper .station-sign {
  grid-column: 1;
  width: 96px;
}
.clipboard-paper .station-card {
  width: 100%;
  padding: clamp(16px, 3vw, 24px);
}
.clipboard-paper .station-media {
  min-height: 0;
  height: auto;
}
.clipboard-paper .station-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
.clipboard-paper .bus-stop.active .station-detail {
  max-height: 900px;
}

@media (max-width: 520px) {
  .clipboard-paper .bus-journey { min-height: max(1100px, calc(var(--stop-count) * 560px)); }
  .clipboard-paper .bus-stops { gap: 82px; padding: 74px 0 28px; }
  .clipboard-paper .bus-line { left: 23px; width: 96px; }
  .clipboard-paper .bus-doodle { left: 0; width: 78px; }
  .clipboard-paper .bus-stop {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 24px 9px;
    width: 100%;
    min-width: 0;
    min-height: 470px;
  }
  .clipboard-paper .station-sign {
    grid-column: 1;
    grid-row: 1;
    z-index: 2;
    width: 76px;
    min-height: 0;
    height: auto;
    padding: 10px 5px;
  }
  .clipboard-paper .station-sign strong { font-size: clamp(12px, 3.7vw, 15px); }
  .clipboard-paper .station-sign-long strong { font-size: clamp(10px, 3.2vw, 12px); }
  .clipboard-paper .station-sign-latin { width: min(104px, calc(100vw - 48px)); padding-inline: 8px; }
  .clipboard-paper .station-sign-latin strong {
    font-size: clamp(8.5px, 2.8vw, 10.5px);
    line-height: 1.15;
    word-break: keep-all;
    overflow-wrap: normal;
    white-space: normal;
  }
  .clipboard-paper .station-sign::after { height: 20px; margin-bottom: -34px; }
  .clipboard-paper .bus-stop:nth-child(odd) .station-card,
  .clipboard-paper .bus-stop:nth-child(even) .station-card {
    grid-column: 1 / -1;
    grid-row: 2;
    z-index: 1;
    position: relative;
    left: 50%;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    margin-left: calc(-50vw + 12px);
    box-sizing: border-box;
  }
  .clipboard-paper .station-media { width: 100%; min-height: 0; }
  .clipboard-paper .station-media img,
  .clipboard-paper .station-media video { width: auto; max-width: 100%; height: auto; margin-inline: auto; image-rendering: auto; }
}

/* Admin-controlled circular avatar crop previews. */
.avatar-crop-admin { display: grid; gap: 16px; padding: 20px; border: 3px dashed rgba(48,43,39,.35); border-radius: 20px; background: rgba(255,255,255,.28); }
.avatar-crop-admin > h3 { margin: 0; }
.avatar-crop-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.avatar-crop-card { display: grid; gap: 12px; min-width: 0; padding: 18px; border: 3px solid rgba(48,43,39,.55); border-radius: 18px; background: rgba(255,250,240,.82); }
.avatar-crop-card h3 { margin: 0; text-align: center; }
.avatar-crop-preview { width: min(190px, 70%); aspect-ratio: 1; margin: 0 auto; border: 5px solid #302b27; border-radius: 50%; background-color: #ef9075; background-repeat: no-repeat; box-shadow: 7px 8px 0 #f4d85f; }
.avatar-crop-card label { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; }
.avatar-crop-card input[type="range"] { grid-column: 1 / -1; width: 100%; padding: 0; border: 0; box-shadow: none; accent-color: #a83b32; }
.avatar-crop-card output { color: #a83b32; font-weight: 900; }

@media (max-width: 680px) {
  .avatar-crop-grid { grid-template-columns: 1fr; }
}
