:root {
  color-scheme: light;
  --ink: #312322;
  --wine: #682e3d;
  --paper: #f8f4ed;
  --cream: #fffdf8;
  --line: #e6dcd1;
  --muted: #675955;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-family: system-ui, sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, .button {
  min-height: 44px; padding: .66rem 1rem; border: 1px solid transparent; border-radius: .55rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-weight: 650; cursor: pointer; color: inherit; text-decoration: none;
}
button:disabled { cursor: wait; opacity: .66; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #a55267; outline-offset: 3px;
}
a { color: var(--wine); }
p { line-height: 1.55; }
h1, h2, h3, p, figure { margin: 0; }
h2, h3 { font: 500 2.25rem/.99 var(--display); letter-spacing: -.04em; }
h3 { font-size: 1.55rem; }
svg { width: 1.15rem; height: 1.15rem; flex: none; }
.top { border-bottom: 1px solid var(--line); background: var(--cream); }
.top-inner {
  max-width: 1260px; padding: 0 2rem; margin: auto; min-height: 74px;
  display: grid; align-items: center; grid-template-columns: 1fr auto 1fr; gap: .75rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .65rem; width: fit-content;
  color: var(--ink); text-decoration: none; font: 600 1.52rem var(--display); letter-spacing: -.06em;
}
.brand i { color: var(--wine); font-weight: 500; }
.brand-mark {
  display: inline-grid; width: 2.07rem; height: 2.07rem; place-items: center;
  background: var(--wine); border-radius: .52rem; color: white; font: 1.19rem system-ui;
}
nav { display: flex; gap: .35rem; justify-content: center; }
nav button { background: transparent; color: var(--muted); font-size: .88rem; white-space: nowrap; }
nav button[aria-current="true"] { color: var(--wine); background: #f4e9e7; }
#account { justify-self: end; }
.shell { max-width: 1260px; padding: 1.8rem 2rem 0; margin: auto; }
.hero {
  min-height: clamp(310px, 39vw, 460px); display: flex; align-items: center; position: relative; overflow: hidden;
  background: linear-gradient(90deg,#211816ee 1%,#231715b8 31%,#23171535 70%,#23171522 100%), url('/cover.jpg') center 52% / cover;
  border-radius: 1rem; color: #fffaf2;
}
.hero-content { position: relative; padding: 3.2rem clamp(1.5rem,5.4vw,5rem) 4.2rem; width: 100%; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .20em; text-transform: uppercase; }
.hero .eyebrow { color: #f8e2cc; margin-bottom: 1.15rem; }
h1 {
  font: 500 clamp(3.6rem, 7.5vw, 7rem)/.82 var(--display); letter-spacing: -.07em;
  max-width: 16ch; overflow-wrap: anywhere;
}
h1 em { color: #f4d9c8; font-weight: 400; }
#wedding-intro { margin-top: 1.4rem; color: #fff0e1; }
.actions { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; }
#hero-actions { margin-top: 1.35rem; }
.primary { background: var(--wine); color: white; }
.primary:hover { background: #52212e; }
.light { background: #fff6ec; color: #4f2630; }
.light:hover { background: #f8dfd4; }
.ghost { background: transparent; border-color: var(--line); color: var(--wine); }
.ghost:hover { background: #f4e8e5; }
.hero .ghost { border-color: #f5ded396; color: #fff3e8; }
.hero .ghost:hover { background: #3c2728; }
.film-edge {
  position: absolute; bottom: 0; left: 0; right: 0; height: 28px;
  background: #281c1b; display: grid; align-items: center; overflow: hidden;
}
.film-edge::after {
  content: ""; height: 8px; margin-left: 12px; width: 100%;
  background: radial-gradient(ellipse 6px 4px at 10px 4px,#876a66 94%,transparent) left center / 28px 8px repeat-x;
}
.workspace { margin-top: 1.35rem; display: grid; grid-template-columns: 1.7fr 1fr; align-items: start; gap: 1.15rem; }
.card {
  background: var(--cream); border: 1px solid var(--line); border-radius: .9rem;
  padding: clamp(1.15rem,2.5vw,2rem); min-width: 0;
}
.card.full { grid-column: 1 / -1; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; margin-bottom: 1.2rem; }
.card-head p { margin-top: .45rem; }
.section-icon {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem;
  border-radius: .65rem; background: #f3e7e4; color: var(--wine); flex: none;
}
.empty {
  min-height: 9rem; padding: 1.1rem; display: grid; align-content: center; justify-items: center; gap: .7rem;
  border: 1px dashed #cfc0b6; background: #faf5ee; border-radius: .6rem; text-align: center;
}
.empty p, .muted { color: var(--muted); }
.empty svg { color: var(--wine); width: 1.6rem; height: 1.6rem; }
.card > .actions { margin-top: 1rem; }
.grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(min(100%,145px),1fr)); }
.photo { border: 1px solid var(--line); background: white; border-radius: .5rem; overflow: hidden; }
.photo button { padding: 0; width: 100%; border: 0; display: block; background: transparent; }
.photo img, .note img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #e9ddd2; }
.photo figcaption { padding: .55rem; overflow-wrap: anywhere; font-size: .875rem; }
.note { padding: 1.05rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.note p { white-space: pre-wrap; margin: .5rem 0; }
.note img { border-radius: .55rem; max-width: 24rem; }
.note time { display: block; color: var(--muted); font-size: .87rem; }
.note .actions { margin-top: .45rem; }
footer {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin-top: 1.65rem; padding: 1.2rem 0; border-top: 1px solid var(--line); color: var(--muted);
  font-size: .87rem;
}
footer .brand-mark { width: 1.3rem; height: 1.3rem; font-size: .8rem; border-radius: .3rem; }
dialog {
  width: min(36rem, calc(100% - 1.5rem)); padding: 1.4rem; border: 1px solid var(--line);
  border-radius: .9rem; background: var(--cream); color: var(--ink); max-height: calc(100dvh - 1.5rem);
}
dialog::backdrop { background: #2b1b1c9e; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; margin-bottom: 1rem; }
.dialog-head h2 { padding-top: .2rem; }
.close { background: #f3e7e4; min-width: 44px; padding: .25rem; font-size: 1.25rem; }
form { display: grid; gap: 1rem; }
label { display: grid; gap: .32rem; font-weight: 650; font-size: .9rem; }
input, textarea, select {
  width: 100%; min-height: 44px; border: 1px solid #cbbcafff; border-radius: .45rem;
  padding: .54rem .65rem; color: var(--ink); background: #fff; font-size: 1rem;
}
input[type=file] { padding: .48rem; }
textarea { min-height: 7rem; resize: vertical; }
.two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.error { color: #9c223a; }
.helper { color: var(--muted); font-size: .9rem; }
.device-preview, .photo-large { display: block; width: 100%; max-height: 58vh; object-fit: contain; border-radius: .65rem; background: #eee1d8; }
#qr img { display: block; width: min(75vw, 275px); height: auto; margin: 0 auto 1rem; image-rendering: pixelated; }
.clipboard { display: grid; gap: .9rem; }
.dialog-body > .actions { margin-top: 1rem; }
.toast {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 2;
  width: max-content; max-width: calc(100% - 2rem); padding: .7rem 1rem; background: #342223; color: white;
  border-radius: .55rem; box-shadow: 0 5px 22px #26151640;
}
@media (max-width: 760px) {
  .shell { padding: 1rem 1rem 0; }
  .top-inner { min-height: 60px; padding: 0 1rem; grid-template-columns: 1fr 1fr; gap: 0 .6rem; }
  nav:not(:empty) { grid-row: 2; grid-column: 1/-1; padding-bottom: .38rem; justify-content: stretch; }
  nav button { flex: 1; padding-inline: .5rem; }
  #account { grid-row: 1; grid-column: 2; }
  #account button { padding-inline: .6rem; font-size: .88rem; }
  .hero { background-position: 60% center; }
  .hero-content { padding-block: 2.65rem 3.45rem; }
  .workspace { grid-template-columns: 1fr; margin-top: .9rem; gap: .9rem; }
}
@media (max-width: 390px) { .two { grid-template-columns: 1fr; } }
@media print {
  body > :not(dialog), dialog .close, dialog .actions, dialog label, dialog .helper { display: none !important; }
  dialog[open] { position: static; display: block; width: 100%; border: 0; text-align: center; }
  dialog::backdrop { display: none; }
}
