@font-face {
  font-family: 'Runethia';
  src: url('/fonts/Runethia.otf') format('opentype');
  font-display: swap;
}

:root {
  /* Day palette */
  --pink:#FFC9FC; --pink-strong:#FFB3FB; --sage:#ABD4AD;
  --sky:#99CFFF; --yellow:#FFF387;
  --green:#00381F; --ink:#081D18; --wine:#730011; --cream:#FFF1D1; --peach:#FFC88A; --navy:#0B1532; --blue:#09295C;
  /* How they are used */
  --fg:var(--navy); --muted:#4c5570; --bg:#faf8f5; --menu:var(--sage); --menu-text:var(--green);
  --accent:var(--blue); --err:var(--wine); --ok:var(--green); --line:#e5e0d8;
}
* { box-sizing: border-box; }
body { margin:0; font:16px/1.5 system-ui, sans-serif; color:var(--fg); background:var(--bg); }
.container { max-width: 640px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.container.wide { max-width: 960px; }
.narrow { max-width: 480px; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 500; line-height:1.25; }
h1 { font-size:2rem; margin:.5rem 0 1rem; }
h2 { font-size:1.4rem; margin:2rem 0 .75rem; }
h3 { font-size:1.15rem; margin:0 0 .35rem; }
a { color:var(--accent); }
img { max-width:100%; height:auto; border-radius:6px; }
:focus-visible { outline:3px solid var(--green); outline-offset:2px; }

/* Header: one photo across the full width, cropped around the couple. The title sits on the dark paving
   to their left; on phones the whole photo fits, so it sits in the sky at the top. */
.hero { position:relative; color:var(--cream); background:var(--navy); }
.hero-side { position:absolute; inset:0 auto 0 0; width:43%; display:flex; align-items:center; justify-content:center; text-align:center; padding:1rem; }
/* At most a third of the screen high, cropped from just above the couple's heads to their waist (the photo is 150vw tall). */
.hero-photo { display:block; width:100%; height:clamp(240px, 18vw, 33.33vh); object-fit:cover; object-position:center -90vw; border-radius:0; }
.hero-title { font-family:'Runethia', 'Brush Script MT', 'Lucida Handwriting', cursive; font-weight:400; font-size:clamp(2rem, 4.5vw, 4.5rem); line-height:1.2; margin:0; text-shadow:0 1px 12px rgba(0,0,0,.8); }
.hero-title span { display:inline-block; }
@media (max-width:767px) {
  .hero::after { content:""; position:absolute; inset:0 0 auto; height:40%; background:linear-gradient(rgba(0,0,0,.6), transparent); }
  .hero-side { inset:0 0 auto; width:auto; z-index:1; padding:.75rem 1rem; }
  .hero-photo { height:125vw; max-height:80vh; object-position:center bottom; }
}

/* Guest tabs below the picture; they stay at the top while scrolling and scroll sideways on phones */
.sitenav { position:sticky; top:0; z-index:10; background:var(--menu); box-shadow:0 2px 8px rgba(11,21,50,.12); }
.sitenav nav { display:flex; align-items:center; gap:.25rem 1.25rem; max-width:960px; margin:0 auto; padding:0 1rem; overflow-x:auto; white-space:nowrap; scrollbar-width:none; }
.sitenav nav::-webkit-scrollbar { display:none; }
.sitenav a { padding:.8rem 0; color:var(--menu-text); text-decoration:none; border-bottom:3px solid transparent; }
.sitenav a:hover { border-bottom-color:var(--pink); }
.sitenav a[aria-current] { font-weight:600; border-bottom-color:var(--menu-text); }
.sitenav form { margin-left:auto; padding-left:1rem; }
.sitenav button.link { color:var(--menu-text); white-space:nowrap; }

.adminbar { position:sticky; top:0; z-index:10; display:flex; flex-wrap:wrap; gap:.5rem 1rem; justify-content:space-between; align-items:center; padding:.75rem 1rem; background:var(--menu); box-shadow:0 2px 8px rgba(11,21,50,.12); }
.adminbar nav { display:flex; flex-wrap:wrap; gap:.25rem 1rem; }
.adminbar a { color:var(--menu-text); text-decoration:none; }
.adminbar a:hover { text-decoration:underline; }
.adminbar button.link { color:var(--menu-text); }

.stack { display:grid; gap:1rem; }
label { display:grid; gap:.25rem; font-size:.9rem; color:var(--muted); }
label.check { display:flex; gap:.5rem; align-items:center; color:var(--fg); font-size:1rem; padding:.2rem 0; }
input, select, textarea { font:inherit; padding:.6rem .7rem; border:1px solid #c9c2d3; border-radius:6px; background:#fff; color:var(--fg); width:100%; }
input[type=checkbox], input[type=radio] { width:auto; flex:none; accent-color:var(--green); }
fieldset { border:1px solid var(--line); border-radius:8px; background:#fff; padding:1rem; margin:0; min-width:0; }
legend { font-weight:600; padding:0 .35rem; }
button, .button { display:inline-block; font:inherit; font-weight:600; padding:.65rem 1.1rem; border:0; border-radius:6px; background:var(--pink); color:var(--navy); cursor:pointer; text-decoration:none; }
button:hover, .button:hover { background:var(--pink-strong); }
button.link { background:none; color:var(--accent); font-weight:400; padding:0; text-decoration:underline; }
button.danger { color:var(--err); }
.error { color:var(--err); }
.muted { color:var(--muted); font-size:.9rem; }
.prewrap { white-space:pre-line; }
.flash { padding:.65rem .85rem; border-radius:6px; margin:0 0 1rem; background:#d6ebff; color:var(--navy); border-left:4px solid var(--sky); }
.flash-error { background:#ffe9d0; color:var(--err); border-left-color:var(--peach); }
.pair { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.cardlink { display:block; color:inherit; text-decoration:none; transition:border-color .15s, box-shadow .15s; }
.cardlink:hover, .cardlink:focus-visible { border-color:var(--sage); box-shadow:0 2px 10px rgba(0,56,31,.2); }
.more { color:var(--accent); font-size:.9rem; margin-top:.5rem !important; }
.columns { display:grid; gap:1rem; align-items:start; }
.columns .card { margin:0; min-width:0; }
.columns h2 { margin-top:0; }
.card h3 { margin-top:1rem; }
.card > h3:first-child { margin-top:0; }
@media (min-width:768px) { .columns.two { grid-template-columns:1fr 1fr; } }
.colors { list-style:none; margin:.25rem 0; padding:0; display:grid; gap:.35rem; }
.colors li { display:flex; align-items:center; gap:.5rem; }
.swatch { width:1.5rem; height:1.5rem; flex:none; border-radius:50%; border:1px solid var(--line); }
.gallery { display:grid; grid-template-columns:repeat(auto-fill, minmax(130px, 1fr)); gap:.5rem; margin-top:.5rem; }
.gallery img { display:block; width:100%; aspect-ratio:1; object-fit:cover; margin:0; }
.gallery figure { margin:0; display:grid; gap:.25rem; justify-items:start; }
.stats { list-style:none; padding:0; display:grid; gap:.5rem; }
.titlebar { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:.5rem 1rem; margin-bottom:.5rem; }
.tablewrap { overflow-x:auto; background:#fff; border:1px solid var(--line); border-radius:8px; }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:.6rem .75rem; border-bottom:1px solid var(--line); vertical-align:top; }
tr:last-child td { border-bottom:0; }
th { font-size:.85rem; color:var(--muted); font-weight:600; }
.actions { text-align:right; white-space:nowrap; }
.actions > * { display:inline-block; margin-left:.6rem; }
.chip { display:inline-block; font-size:.8rem; padding:.05rem .5rem; margin:.1rem .1rem .1rem 0; border-radius:999px; background:var(--cream); color:var(--navy); }
.plain { list-style:none; margin:.25rem 0; padding:0; }
summary { cursor:pointer; color:var(--accent); }
.card { background:#fff; border:1px solid var(--line); border-top:3px solid var(--pink); border-radius:10px; padding:1rem 1.1rem; margin-bottom:1rem; }
.card p { margin:.25rem 0; }
.card img { display:block; margin:.5rem 0; }
.when, .price { color:var(--accent); font-weight:600; }
.status { font-weight:600; }
.gift details { margin-top:.75rem; }
.gift form { margin-top:.5rem; }
.pledge { margin-top:.75rem; }
.taken { background:transparent; color:var(--muted); border-top-color:var(--line); }
.taken h3, .taken .price { text-decoration:line-through; color:var(--muted); }
.taken img { opacity:.4; }
progress { width:100%; height:.6rem; accent-color:var(--green); margin-top:.5rem; }
.route { list-style:none; display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; margin:.5rem 0; padding:0; font-size:.9rem; }
.route li { position:relative; margin-right:1.1rem; padding:.15rem .55rem; border-radius:999px; background:var(--blue); color:#fff; }
.route li.stop { background:var(--yellow); color:var(--navy); }
.route li:last-child { margin-right:0; }
.route li:not(:last-child)::after { content:"\2192"; position:absolute; right:-1.15rem; color:var(--muted); }
.formnav { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
.prompt { border-color:var(--pink-strong); background:var(--pink); }
.totals li { display:flex; justify-content:space-between; gap:1rem; padding:.2rem 0; }
.stats + .columns { margin-bottom:1rem; }
.invitation { max-width:380px; text-align:center; }
.qr { display:block; width:100%; max-width:280px; margin:.5rem auto; }
.url { overflow-wrap:anywhere; }
.password { font-family:ui-monospace, Consolas, monospace; font-size:1.25rem; letter-spacing:.05em; }

@media print {
  .adminbar, .noprint { display:none; }
  body { background:#fff; }
  .invitation { border:0; margin:0 auto; }
}
