@font-face {
  font-family:ConviteScript;
  src:url("../assets/fonts/convite-script.woff") format("woff");
  font-style:normal;
  font-weight:400;
  font-display:swap;
}

@font-face {
  font-family:ConviteRoman;
  src:url("../assets/fonts/roman-12.otf") format("opentype");
  font-style:normal;
  font-weight:400;
  font-display:swap;
}

@font-face {
  font-family:ConviteSans;
  src:url("../assets/fonts/convite-Regular.woff") format("woff");
  font-style:normal;
  font-weight:400;
  font-display:swap;
}

@font-face {
  font-family:ConviteSans;
  src:url("../assets/fonts/convite-Bold.woff") format("woff");
  font-style:normal;
  font-weight:700;
  font-display:swap;
}

:root {
  --paper:#8c3c30;
  --paper-grain:url("../assets/svg/terracota-madeira.svg?v=66");
  --name-ink:#f5cc7d;
  --ivory:var(--name-ink);
  --champagne:#f6d18c;
  --cover-gold:#f1cd89;
  --cover-amp:#f1cd89;
  --ink:var(--name-ink);
  --muted:#f4ce83;
  --accent:#f8d591;
  --rule:#f1cd898a;
  --surface:#713128;
  --body:ConviteSans,system-ui,sans-serif;
  --heading:ConviteRoman,Georgia,serif;
  --edge:clamp(22px,6vw,72px);
}

* {
  box-sizing:border-box;
}

:where(*) {
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb,var(--type-paragraph) 45%,transparent) transparent;
}

body {
  margin:0;
  color-scheme:light;
  background:var(--paper) var(--paper-grain);
  color:var(--ink);
  font:1rem/1.7 var(--body);
}

a {
  color:var(--accent);
  text-underline-offset:.25em;
}

button,input {
  font:inherit;
}

:focus-visible {
  outline:3px solid var(--cover-gold);
  outline-offset:4px;
}

.sr-only,.skip:not(:focus) {
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  clip-path:inset(50%);
  overflow:hidden;
  white-space:nowrap;
  border:0;
}

.skip:focus {
  position:absolute;
  top:.5rem;
  left:.5rem;
  z-index:2;
  background:var(--surface);
  padding:.6rem;
}

.assets {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden;
  pointer-events:none;
}

.hero {
  --cover-frame:clamp(10px,2.6vw,34px);
  --cover-footer-pad:clamp(10px,1.45vw,18px);
  --cover-footer-bottom:calc(max(var(--cover-frame),env(safe-area-inset-bottom,0px)) + var(--cover-footer-pad));
  --cover-title-gap:clamp(8px,1vw,15px);
  --cover-g-width:clamp(94px,26.4vw,183px);
  position:relative;
  display:grid;
  min-height:100vh;
  min-height:100svh;
  place-items:center;
  text-align:center;
  isolation:isolate;
  overflow:hidden;
  overflow:clip;
  color:var(--ivory);
  background:transparent;
}

.hero::before {
  content:"";
  position:absolute;
  inset:var(--cover-frame);
  border:1px solid var(--rule);
  pointer-events:none;
}

.hero:has(.cover-management-link:not([hidden]))::before {
  inset-block-start:calc(env(safe-area-inset-top,0px) + 52px);
}

.cover-management-link:not([hidden]) {
  position:absolute;
  inset-block-start:calc(env(safe-area-inset-top,0px) + 4px);
  inset-inline-end:max(var(--cover-frame),env(safe-area-inset-right,0px));
  z-index:1;
  display:grid;
  place-items:center;
  inline-size:44px;
  block-size:44px;
  border-radius:5px;
  color:var(--cover-gold);
}

.cover-management-link:is(:hover,:focus-visible) {
  background:var(--surface);
}

.cover-management-link:focus-visible {
  outline-offset:-3px;
}

/* The tight ampersand outline and the rule share the exact center of the middle grid row. */
.hero-inner {
  position:absolute;
  inset:0;
  display:grid;
}

.signature {
  --title-gap:var(--cover-title-gap);
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:minmax(0,1fr) 3px minmax(0,1fr);
  margin:0;
  position:relative;
  font-weight:400;
  line-height:1;
}

.signature:focus {
  outline:none;
}

.name-row {
  grid-row:1;
  align-self:end;
  display:grid;
  grid-template-columns:minmax(0,1fr) 0 minmax(0,1fr);
  align-items:center;
  margin-bottom:var(--title-gap);
}

.word {
  display:block;
  height:auto;
  overflow:hidden;
  pointer-events:none;
}

.word--n {
  grid-column:1;
  justify-self:end;
  margin-inline-end:clamp(13px,1.85vw,24px);
  width:clamp(106px,30vw,211px);
  animation:northwest 1.56s cubic-bezier(.22,.68,.28,1) .2s both;
}

.below {
  grid-row:3;
  align-self:start;
  justify-self:end;
  width:50%;
  padding-top:var(--title-gap);
}

.word--g {
  width:var(--cover-g-width);
  animation:southeast 1.56s cubic-bezier(.22,.68,.28,1) 2.18s both;
}

.amp {
  grid-row:2;
  grid-column:1;
  place-self:center;
  z-index:1;
  display:block;
  font-size:clamp(.9rem,1.65vw,1.38rem);
  width:0.67100em;
  height:0.73600em;
  color:var(--cover-amp);
  filter:drop-shadow(1px 0 var(--paper)) drop-shadow(-1px 0 var(--paper));
  animation:appear .5s ease 1.82s both;
}

.crease {
  grid-row:2;
  grid-column:1;
  justify-self:center;
  width:calc(100% - 2 * clamp(10px,2.6vw,34px));
  height:100%;
  position:relative;
  overflow:hidden;
}

.crease::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(102deg,transparent 38%,#e7c97b90 46%,#fff4d9 50%,#efd287a0 54%,transparent 62%);
  animation:gold-sweep 2.15s cubic-bezier(.35,.1,.45,1) 1.45s both;
}

@keyframes gold-sweep {
  from {
    transform:translateX(-100%);
  }
  to {
    transform:translateX(100%);
  }
}

.hero-meta {
  position:absolute;
  bottom:var(--cover-footer-bottom);
  inset-inline-start:calc(max(var(--cover-frame),env(safe-area-inset-left,0px)) + var(--cover-footer-pad));
  inset-inline-end:calc(max(var(--cover-frame),env(safe-area-inset-right,0px)) + var(--cover-footer-pad));
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  animation:appear .55s ease 2.68s both;
}

.hero-meta .event-meta {
  grid-column:2;
  color:var(--ink);
  font:400 .83125rem/1.7 var(--body);
  text-align:center;
}

.event-meta p {
  margin:0;
}

.invite-icon {
  grid-column:3;
  justify-self:end;
  align-self:stretch;
  display:block;
  position:relative;
  width:3.5rem;
  border-radius:6px;
  color:var(--cover-gold);
}

.invite-icon svg {
  position:absolute;
  inset-block:0;
  inset-inline-end:0;
  margin-block:auto;
  display:block;
  width:1.75rem;
  height:auto;
  transition:transform .25s ease;
}

.invite-icon:is(:hover,:focus-visible) svg {
  transform:translateY(-2px);
}

.hero-meta:focus-within {
  animation:none;
  opacity:1;
}

@keyframes northwest {
  0% {
    opacity:0;
    transform:translateX(-60%);
  }
  76% {
    opacity:1;
    transform:translateX(6%);
    animation-timing-function:cubic-bezier(.25,.65,.35,1);
  }
  100% {
    opacity:1;
    transform:translateX(0);
  }
}

@keyframes southeast {
  0% {
    opacity:0;
    transform:translateX(60%);
  }
  76% {
    opacity:1;
    transform:translateX(-6%);
    animation-timing-function:cubic-bezier(.25,.65,.35,1);
  }
  100% {
    opacity:1;
    transform:translateX(0);
  }
}

@keyframes appear {
  from {
    opacity:0;
  }
  to {
    opacity:1;
  }
}

@media(prefers-reduced-motion:reduce) {
  .hero * {
    animation:none!important;
  }
  .crease::after {
    display:none;
  }
  .invite-icon svg {
    transition:none;
  }
  .invite-icon:is(:hover,:focus-visible) svg {
    transform:none;
  }
}

@media(max-height:590px) {
  .hero {
    min-height:max(100svh,420px);
  }
}

.wrap {
  width:min(100% - 2 * var(--edge),690px);
  margin-inline:auto;
}

.section {
  padding:clamp(59px,9vw,110px) 0 clamp(51px,8vw,95px);
  border-bottom:1px solid var(--rule);
  scroll-margin-top:1rem;
}

.section>p:first-child,.label {
  margin:0 0 .55rem;
  color:var(--accent);
  font-size:.875rem;
  letter-spacing:.095em;
}

h2,h3 {
  font-family:var(--heading);
  font-weight:400;
  line-height:1.12;
  margin:0 0 .34em;
}

h2 {
  font-size:clamp(2.15rem,6vw,3.85rem);
  letter-spacing:-.035em;
}

h3 {
  font-size:clamp(1.42rem,3.8vw,2.15rem);
  letter-spacing:-.018em;
}

p {
  margin:.4em 0 .85em;
}

.small,.tag {
  font-size:.875rem;
  color:var(--muted);
}

.stack {
  margin-top:clamp(16px,4vw,26px);
}

.stack>.plate+ .plate {
  margin-top:1.5rem;
  padding-top:1.25rem;
  border-top:1px solid var(--rule);
}

.art {
  position:relative;
  aspect-ratio:1.36;
  overflow:hidden;
  margin:1rem 0 0;
  width:min(100%,480px);
  /* Blend into the actual page backdrop instead of painting a solid frame. */
  --art-feather:radial-gradient(ellipse 50% 50% at 50% 50%,#000 54%,#000e 66%,#000a 77%,#0005 88%,#0001 96%,transparent 100%);
  -webkit-mask-image:var(--art-feather);
  mask-image:var(--art-feather);
}

.art img {
  position:absolute;
  width:136%;
  height:auto;
  max-width:none;
  left:-18%;
  top:-80%;
}

.actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:0 18px;
  margin-top:.35rem;
}

.btn {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  border:0;
  padding:.2em 0;
  color:var(--accent);
  background:transparent;
  font-weight:650;
  font-size:.875rem;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:.25em;
  text-align:start;
}

.btn.primary {
  padding:.55rem 1rem;
  background:var(--surface);
  color:var(--ink);
  text-decoration:none;
  border-radius:2px;
}

.btn.primary:hover {
  background:#622920;
}

.guide {
  margin-top:1rem;
}

details {
  border-top:1px solid var(--rule);
  padding:.72rem 0;
}

summary {
  cursor:pointer;
  font-weight:650;
  min-height:28px;
}

fieldset {
  min-width:0;
  border:0;
  margin:0 0 .7rem;
  padding:0;
}

input[type=radio] {
  accent-color:var(--cover-gold);
  margin-inline:0 .4rem;
}

output:not(:empty) {
  display:block;
  color:var(--accent);
  margin-top:.55rem;
  font-weight:650;
}

.gift {
  border-bottom:1px solid var(--rule);
}

.price {
  color:var(--accent);
  font-weight:650;
  white-space:nowrap;
}

dialog {
  width:min(420px,calc(100% - 36px));
  padding:26px;
  background:var(--surface);
  color:var(--ink);
  border:1px solid var(--rule);
}

dialog::backdrop {
  background:#31120ecc;
}

.footer {
  padding:1.7rem 0;
  text-align:center;
  color:var(--muted);
}

.facts>span {
  display:block;
}

p,summary,.gift-label {
  text-wrap:pretty;
}

@media(max-width:370px) {
  .section {
    font-size:.9375rem;
  }
  h2 {
    font-size:clamp(1.87rem,8.8vw,2.15rem);
  }
  .actions {
    column-gap:12px;
  }
  .gift {
    column-gap:5px;
  }
  .gift,.gift .price {
    font-size:.875rem;
  }
}

.lined-title {
  display:flex;
  align-items:baseline;
  gap:clamp(7px,1.7vw,15px);
}

.line-icon {
  display:block;
  flex:none;
  width:1em;
  height:1em;
  color:var(--cover-gold);
}

.lined-title>.line-icon {
  width:auto;
  height:.69em;
  height:1cap;
  align-self:baseline;
  margin:0;
}

.lined-title>span {
  text-wrap:balance;
}

.actions>.btn {
  gap:5px;
  white-space:nowrap;
}

@media(max-width:370px) {
  .lined-title {
    font-size:clamp(1.67rem,8.25vw,1.87rem);
  }
  .actions {
    column-gap:11px;
  }
}

.countdown-slot {
  margin-top:clamp(28px,4.3vw,43px);
  display:flex;
  justify-content:flex-end;
}

.countdown {
  display:inline-flex;
  flex-wrap:wrap;
  align-items:center;
  column-gap:5px;
  color:var(--ivory);
  max-width:100%;
  line-height:1;
  font:400 clamp(.92rem,3.55vw,1.18rem)/1.12 ConviteScript,"Snell Roundhand",cursive;
}

.countdown-timer {
  display:inline-flex;
  align-items:baseline;
  flex-wrap:wrap;
  column-gap:.42em;
  row-gap:2px;
}

@media(max-width:370px) {
  .countdown-timer {
    column-gap:.16em;
  }
}

.countdown-unit {
  white-space:nowrap;
}

.countdown-unit b {
  font:inherit;
  color:inherit;
  font-variant-numeric:tabular-nums;
  display:inline-block;
  inline-size:1.18em;
  text-align:end;
}

.countdown [hidden] {
  display:none;
}

.invite-cover #convite,.invite-open .hero {
  display:none;
}

.page-nav {
  display:flex;
  justify-content:flex-start;
  align-items:center;
  flex-wrap:nowrap;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  gap:0 clamp(10px,3.3vw,32px);
  min-height:49px;
  margin-bottom:clamp(43px,8vw,90px);
  border-bottom:1px solid var(--rule);
}

.page-nav a {
  position:relative;
  display:inline-flex;
  align-items:center;
  min-height:44px;
  font-size:.875rem;
  font-weight:650;
  text-decoration:none;
}

.page-nav a[aria-current="page"] {
  color:var(--cover-gold);
}

.section {
  padding-top:0;
}

.invite-open .section .footer {
  padding-block:2rem .25rem;
}

@media(max-width:660px) {
  .venue {
    display:block;
    min-height:0;
  }
}

.section-header {
  margin-bottom:clamp(17px,2.5vw,29px);
}

.section-header .lined-title {
  margin-bottom:.16em;
}

.page-intro {
  font:italic 400 clamp(1.0625rem,2.5vw,1.2rem)/1.46 var(--heading);
  color:var(--muted);
  margin:0;
}

#o-dia .lined-title {
  column-gap:clamp(11px,2.1vw,22px);
}

.venue-links {
  grid-column:1/-1;
  position:relative;
  z-index:1;
  text-align:center;
  margin-top:clamp(8px,1.6vh,17px);
}

.venue-links>.actions {
  justify-content:center;
  column-gap:clamp(13px,4vw,29px);
  margin:0;
}

.venue-links .btn {
  font-size:.8125rem;
  min-height:44px;
}

/* Regular face (88-unit stem), inset to roughly 1/3 of the 149-unit bold stem. */
#o-dia .venue-links .btn > span {
  font-weight:400;
  -webkit-text-stroke:.038em var(--paper);
  paint-order:fill stroke;
}

@media (forced-colors:active) {
  #o-dia .venue-links .btn > span { -webkit-text-stroke-width:0; }
}

#guia .guide summary,#presentes .gift,#presentes .gift .price,.couple-note {
  font-family:var(--heading);
  font-weight:400;
}

#guia .guide summary,#presentes .gift {
  font-size:clamp(1.03rem,2.4vw,1.24rem);
}

.couple-note p {
  margin:.3em 0;
  line-height:1.25;
}

.couple-note p:first-child {
  font-size:clamp(1.3rem,3vw,1.65rem);
  color:var(--ivory);
}

.couple-note p:last-child {
  font-size:clamp(1.02rem,2.3vw,1.2rem);
  color:var(--accent);
}

#o-dia .section-header {
  margin-bottom:clamp(20px,4vh,38px);
}

.day-venues {
  display:grid;
}

.day-place {
  text-align:left;
  padding-block:0 8px;
  position:relative;
}

.day-place+.day-place {
  border-top:1px solid var(--rule);
  padding-top:clamp(14px,2.4vh,26px);
}

.place-address {
  position:relative;
  isolation:isolate;
  padding-block:clamp(10px,2vh,20px);
}

.church-address {
  padding-block:clamp(20px,3.8vh,36px);
}

.place-address h3 {
  margin:0 0 .27em;
  font-size:clamp(1.21rem,3.25vw,1.72rem);
  text-wrap:balance;
}

.place-address p {
  margin:0;
}

.day-venue-name a {
  font:inherit;
  color:inherit;
  text-decoration:underline;
  text-decoration-color:var(--rule);
  text-underline-offset:.16em;
  text-decoration-thickness:1px;
}

.day-venue-name a:is(:hover,:focus-visible) {
  text-decoration-color:currentColor;
}

.church-address .art {
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
  width:clamp(134px,31%,218px);
  margin:0;
  z-index:-1;
  opacity:.55;
  pointer-events:none;
}

.day-place .venue-links {
  margin-top:4px;
}

#presentes {
  position:relative;
  isolation:isolate;
}

@media(max-width:660px) {
  .church-address .art {
    right:0;
    opacity:.23;
  }
}

html.invite-open,html.invite-open body {
  height:100%;
  overflow:hidden;
  scroll-behavior:auto;
  scroll-snap-type:none;
}

.invite-open #convite {
  height:100vh;
  height:100dvh;
  overflow:hidden;
}

.invite-open .section {
  display:none;
  min-height:0;
  height:100%;
  padding:0;
  border:0;
  grid-template-rows:auto minmax(0,1fr) auto;
}

.invite-open .section.is-active {
  display:grid;
}

.invite-open .page-nav {
  margin:0;
}

.invite-open .page-content {
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  padding-block:clamp(24px,5.5vh,58px) 20px;
  /* Reserve identical inline space in every section, scrolling or not. */
  scrollbar-gutter:stable;
}

.invite-open .page-content:focus:not(:focus-visible) {
  outline:none;
}

.invite-open .page-content h2[tabindex="-1"]:focus {
  outline:none;
}

.invite-open .section .page-timer {
  margin:0;
  min-height:45px;
  padding:3px 0 calc(3px + env(safe-area-inset-bottom,0px));
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  border-top:1px solid var(--rule);
  background:var(--paper) var(--paper-grain);
}

.invite-open .page-timer .countdown {
  min-width:0;
  margin-inline-start:auto;
  justify-content:flex-end;
  white-space:nowrap;
}

.page-timer .countdown-timer {
  justify-content:flex-end;
}

.invite-open .page-content.fade-in {
  animation:page-fade-in 230ms ease-out both;
}

@keyframes page-fade-in {
  from {
    opacity:.42;
  }
  to {
    opacity:1;
  }
}

@media(prefers-reduced-motion:reduce) {
  .invite-open .page-content.fade-in {
    animation:none;
  }
}

#presentes .gift-tools {
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 12px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:.875rem;
}

.gift-category-control {
  position:relative;
  display:inline-flex;
  width:min(13rem,100%);
  max-width:100%;
  color:var(--icon-button);
}

.gift-category-control svg {
  position:absolute;
  width:.9rem;
  height:.9rem;
  inset-inline-end:.6rem;
  top:50%;
  transform:translateY(-50%);
  fill:none;
  stroke:currentColor;
  stroke-width:1.4;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}

.invite-control {
  appearance:none;
  min-height:34px;
  width:100%;
  min-width:0;
  max-width:100%;
  padding:4px .7rem;
  background:var(--gift-action-surface);
  color:var(--type-button);
  border:1px solid transparent;
  font:inherit;
  font-size:.875rem;
  border-radius:999px;
}

#presentes .gift-tools select {
  padding-inline-end:1.75rem;
  cursor:pointer;
}

#presentes .gift-tools option {
  background:var(--surface);
  color:var(--ink);
}

#presentes .gift-list {
  display:grid;
  gap:clamp(28px,5vw,40px);
}

#presentes .gift-group h3 {
  font-family:var(--heading);
  font-weight:400;
  font-size:clamp(1.34rem,3vw,1.62rem);
  line-height:1.22;
  color:var(--champagne);
  margin:0 0 .5rem;
}

#presentes .gift-group ul {
  list-style:none;
  padding:0;
  margin:0;
  border-top:1px solid var(--rule);
}

#presentes .gift-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  column-gap:.7rem;
  width:100%;
  min-height:52px;
  padding:.5rem .55rem;
  border:0;
  border-radius:3px;
  background:transparent;
  color:inherit;
  cursor:pointer;
  font:inherit;
  line-height:1.2;
  text-align:start;
}
#presentes .gift-row :is(.gift-label,.price) {
  -webkit-text-stroke:.22px currentColor;
}

@media (forced-colors:active) {
  #presentes .gift-row :is(.gift-label,.price) { -webkit-text-stroke-width:0; }
}

#presentes .gift-row .price {
  color:var(--type-button);
}
#presentes .gift-row:not([aria-disabled="true"]):is(:focus-visible,:active,[aria-expanded="true"]) {
  outline:none;
  background:var(--gift-action-surface);
  box-shadow:inset 3px 0 var(--nav-gold-border);
}
@media (hover:hover) {
  #presentes .gift-row:not([aria-disabled="true"]):hover {
    background:var(--gift-action-surface);
    box-shadow:inset 3px 0 var(--nav-gold-border);
  }
}
#presentes .gift-row[aria-disabled="true"] {
  color:var(--muted);
  cursor:default;
}
#presentes .gift-row[aria-disabled="true"] .price {
  color:inherit;
}
#presentes .gift-row[aria-disabled="true"]:focus-visible {
  outline-offset:-3px;
}
@media (forced-colors:active) {
  #presentes .gift-row:not([aria-disabled="true"]):focus-visible {
    outline:2px solid Highlight;
    outline-offset:-3px;
  }
}

#presentes .gift-status {
  font-size:.875rem;
  color:var(--muted);
  margin:.5rem 0;
}

#presentes .gift-status:empty,#giftStatus:empty {
  display:none;
}

#gift {
  box-sizing:border-box;
  max-height:calc(100dvh - 28px);
  overflow:auto;
  border-radius:8px;
  padding:clamp(16px,5vw,26px);
}

#gift h3 {
  margin:0 0 .35rem;
  font-size:clamp(1.25rem,5vw,1.6rem);
}

#gift p {
  margin:.5rem 0;
  font-size:.92rem;
}

#gift [hidden] {
  display:none!important;
}

#gift .gift-methods {
  margin:1rem 0;
  display:grid;
  gap:0;
  padding:.4rem .85rem;
}

#gift .gift-methods label {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  font-size:.9rem;
}

#gift .gift-payment :is(form,#giftPixPayment) {
  display:grid;
  gap:.4rem;
}

#gift .gift-payment .invite-control {
  width:100%;
  min-width:0;
}

#giftPixImage {
  display:block;
  box-sizing:border-box;
  width:min(180px,100%);
  height:auto;
  margin:.8rem auto;
  padding:6px;
  background:#fff;
  border-radius:8px;
}

#giftCardChallenge {
  width:100%;
  min-height:400px;
  border:0;
  background:#fff;
}

#gift .gift-installments {
  display:grid;
  gap:5px;
  margin:.65rem 0 1rem;
}

#gift .gift-installments select {
  font:inherit;
  color:var(--ink);
  background:var(--gift-action-surface);
  border:1px solid transparent;
  border-radius:6px;
  padding:8px;
  min-height:44px;
}

#gift .gift-dialog-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

#gift .gift-dialog-actions .btn {
  flex:0 1 auto;
  min-height:36px;
  max-width:100%;
  margin:0;
  padding:4px .8rem;
  justify-content:center;
  border:1px solid transparent;
  border-radius:999px;
  background:var(--gift-action-surface);
  font:700 .875rem/1.16 var(--body);
  text-align:center;
  text-decoration:none;
  overflow-wrap:anywhere;
}

#gift .gift-dialog-actions #giftClose {
  background:transparent;
  border-color:transparent;
  font-weight:400;
}

#gift .gift-dialog-actions [disabled] {
  opacity:.5;
  cursor:wait;
}

/* Gold foil: warmer edges, a narrow highlight, and no moving sheen on text. */
:root {
  --metal-gold:linear-gradient(161deg,#dfb46a 0%,#efca83 30%,#c4af73 42%,#fff2c8 48%,#f1cc87 55%,#dfb46a 81%,#e3b971 100%);
}

.hero::before {
  border-image:var(--metal-gold) 1;
}

.line-icon {
  color:var(--cover-gold);
  stroke:url(#detail-gold) currentColor;
}

.lined-title>span,.page-nav a[aria-current="page"] {
  color:var(--ink);
}

.section h3,#presentes .gift-group h3,#gift h3 {
  color:var(--champagne);
}

#presentes .gift-group ul {
  border-color:var(--rule);
}

.btn.primary {
  background:var(--surface);
  color:var(--ink);
  box-shadow:inset 0 0 0 1px var(--rule);
}

.btn.primary:hover {
  background:#622920;
  box-shadow:inset 0 0 0 1px var(--cover-gold);
}

@media(forced-colors:active) {
  body,.invite-open .section .page-timer {
    background-image:none;
  }
  .line-icon,.invite-icon svg {
    stroke:CanvasText;
  }
  .hero::before {
    border-image:none;
  }
  .btn.primary {
    background:ButtonFace;
    color:ButtonText;
    border:1px solid ButtonText;
  }
}

/* Six exclusive typography and icon roles, derived from the balloon palette. */
:root {
  --type-title:#efb270;
  /* burnt orange, raised for contrast */
  --icon-title:#cbbb88;
  /* olive gold, raised for contrast */
  --type-paragraph:#e7e1db;
  /* neutral ivory */
  --type-subtitle:#efcfc2;
  /* blush ivory */
  --type-button:#f6cba0;
  /* caramel, raised for small controls */
  --icon-button:#e4a28c;
  /* reddish copper, raised for icons */
}

.lined-title>span {
  color:var(--type-title);
}

.crease {
  background:linear-gradient(90deg,transparent,#dfb46ac0 19%,#edc781 36%,#fff2c8 49%,#efca83 60%,#dfb46ab8 82%,transparent);
}

.lined-title>.line-icon {
  color:var(--icon-title);
}

.lined-title>.line-icon {
  stroke:currentColor;
}

p,p.page-intro,p.small,#presentes p.gift-status,#gift p,.hero-meta .event-meta,.couple-note p:first-child,.couple-note p:last-child {
  color:var(--type-paragraph);
}

p a:not(.btn) {
  color:inherit;
}

.section h3,.section h4,#presentes .gift-group h3,#gift h3,#guia .guide summary {
  color:var(--type-subtitle);
}

.section h3 a,.section h4 a {
  color:inherit;
}

.btn,.btn.primary,#gift .gift-dialog-actions .btn,.page-nav a,.page-nav a[aria-current="page"] {
  color:var(--type-button);
}

.btn .line-icon,.invite-icon {
  color:var(--icon-button);
}

.btn .line-icon,.invite-icon svg {
  stroke:currentColor;
}

@media(forced-colors:active) {
  .lined-title>span,.section h3,.section h4,#presentes .gift-group h3,#gift h3,#guia .guide summary,p,p.page-intro,p.small,#presentes p.gift-status,#gift p,.hero-meta .event-meta,.couple-note p:first-child,.couple-note p:last-child {
    color:CanvasText;
  }
  .lined-title>.line-icon,.btn .line-icon,.invite-icon svg {
    stroke:CanvasText;
  }
  .btn,.btn.primary,#gift .gift-dialog-actions .btn,.page-nav a,.page-nav a[aria-current="page"] {
    color:ButtonText;
  }
}

/* Identidade oficial, com a abertura original preservada nos dois temas. */
:root {
  --official-name-ink:#d4a53b;
  --hover-surface:#622920;
  --nav-gold-border:#e6b85f;
  --nav-shadow-1:#5d260e;
  --nav-shadow-2:#743713d9;
  --nav-shadow-3:#ad68178a;
  --gift-action-surface:#60281f;
}

:root[data-theme="claro"] {
  --paper:#f9f3e7;
  --paper-grain:radial-gradient(ellipse at top,#fffaf1,transparent 70%);
  --surface:#f1e5ce;
  --hover-surface:#ecddc2;
  --ink:#423021;
  --ivory:#5b401c;
  --nav-gold-border:#ad7d2f;
  --nav-shadow-1:#9b6829c9;
  --nav-shadow-2:#b98440a8;
  --nav-shadow-3:#caa45270;
  --gift-action-surface:#eadab9;
  --official-name-ink:#956915;
  --muted:#665441;
  --accent:#624511;
  --rule:#ab823d;
  --cover-gold:#7e5b1a;
  --type-title:#71501b;
  --icon-title:#7e5b1a;
  --type-subtitle:#634721;
  --type-paragraph:#48392a;
  --type-button:#694b19;
  --icon-button:#765219;
  --metal-gold:linear-gradient(150deg,#a17526,#d4a53b 48%,#9b6e22);
}

.word .name-ink {
  fill:var(--official-name-ink);
}

.lined-title>.line-icon {
  color:var(--icon-title);
}

.btn.primary:hover {
  background:var(--hover-surface);
}

.footer-crest {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  flex:none;
}

[data-theme="claro"] #footer-crest-bold feFlood {
  flood-color:#89601b;
}

@media (forced-colors:active) {
  #footer-crest-bold feFlood { flood-color:CanvasText; }
}

.footer-crest-art {
  display:block;
  width:100%;
  height:auto;
}

.gift-watermark {
  position:absolute;
  inset:0;
  margin:auto;
  width:calc(100% - 2 * clamp(9px,3vw,32px));
  height:calc(100% - 2 * clamp(25px,6vh,65px));
  opacity:.13;
  pointer-events:none;
  z-index:-1;
}

[data-theme="claro"] .amp {
  color:var(--official-name-ink);
}

.theme-toggle:not([hidden]) {
  display:inline-grid;
  place-items:center;
  min-width:44px;
  min-height:44px;
  cursor:pointer;
  border:0;
  border-radius:5px;
  background:transparent;
  color:var(--type-button);
  padding:0;
}

/* Share the envelope and date's existing row; retain the safe-area insets. */
.hero-meta .cover-theme-toggle:not([hidden]) {
  grid-column:1;
  justify-self:start;
  justify-items:start;
  padding-inline-start:0;
}

.hero-meta .cover-theme-toggle:not([hidden]) {
  color:var(--icon-button);
}
.hero-meta .cover-theme-toggle .theme-icon {
  width:1.75rem;
  height:1.75rem;
  stroke-width:.86;
}
@media (forced-colors:active) {
  .hero-meta .cover-theme-toggle:not([hidden]) { color:ButtonText; }
}

.theme-toggle:is(:hover,:focus-visible) {
  background:var(--surface);
}

.theme-icon {
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.45;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.theme-icon--moon,[data-theme="claro"] .theme-icon--sun {
  display:none;
}

[data-theme="claro"] .theme-icon--moon {
  display:block;
}

.page-nav a>span {
  position:relative;
  padding:.25rem .62rem;
  line-height:1.3;
  white-space:nowrap;
}

.page-nav a[aria-current="page"]>span {
  font-weight:700;
  text-shadow:.65px .25px 0 var(--nav-shadow-1),1.35px .55px 0 var(--nav-shadow-2),2.15px .9px 0 var(--nav-shadow-3);
}

.page-nav a[aria-current="page"]>span::after {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border:1px solid var(--nav-gold-border);
  border-radius:5px;
}

@media(forced-colors:active) {
  .page-nav a[aria-current="page"]>span {
    text-shadow:none;
  }
  .page-nav a[aria-current="page"]>span::after {
    border-color:Highlight;
  }
}

/* Keep all controls accessible on the same row, including at larger text sizes. */
.page-nav::-webkit-scrollbar {
  display:none;
}

.page-nav>a,.page-nav>.theme-toggle {
  flex:0 0 auto;
  white-space:nowrap;
}

.page-nav a:focus-visible,.page-nav .theme-toggle:focus-visible {
  outline-offset:-4px;
}

.page-nav .theme-toggle {
  margin-inline-start:auto;
}

@media(max-width:660px) {
  .page-nav {
    gap:clamp(3px,1.3vw,9px);
  }
  .page-nav a>span {
    padding-inline:clamp(4px,1.4vw,10px);
  }
}

@media(max-width:430px) {
  .page-nav {
    gap:clamp(1px,1vw,4px);
  }
  .page-nav a>span {
    padding-inline:clamp(3px,1.25vw,6px);
  }
  .page-nav a {
    font-size:clamp(.72rem,3.1vw,.875rem);
  }
}

@media(max-width:350px) {
  .invite-open .page-nav {
    margin-inline:-13px;
  }
}

@media(forced-colors:active) {
  .word .name-ink,.amp path {
    fill:CanvasText;
  }
  .crease {
    background:CanvasText;
  }
  .crease::after {
    display:none;
  }
  .theme-toggle:not([hidden]) {
    color:ButtonText;
    border:1px solid ButtonText;
  }
}

/* Focus is filled, not rimmed. Underlining keeps keyboard focus distinct. */
:root {
  --gift-control-highlight:#eacc90;
  --gift-control-highlight-text:#492416;
}
:root[data-theme="claro"] {
  --gift-control-highlight:#795319;
  --gift-control-highlight-text:#fff7e7;
}

.invite-control:focus,
#gift .gift-installments select:focus,
#gift .gift-dialog-actions .btn:not([disabled]):is(:hover,:focus,:active),
#gift .gift-dialog-actions #giftClose:not([disabled]):is(:hover,:focus,:active) {
  background:var(--gift-control-highlight);
  color:var(--gift-control-highlight-text);
  outline:none;
}

.invite-control:focus-visible,
#gift .gift-installments select:focus-visible,
#gift .gift-dialog-actions .btn:focus-visible {
  text-decoration:underline;
  text-underline-offset:.17em;
}

.gift-category-control:focus-within {
  color:var(--gift-control-highlight-text);
}

@media (forced-colors:active) {
  .invite-control:focus-visible,
  #gift .gift-installments select:focus-visible,
  #gift .gift-dialog-actions .btn:focus-visible {
    outline:2px solid Highlight;
    outline-offset:1px;
  }
}

/* Interior hierarchy: title, short introduction, then named sections. */
.section .subsection-title,
#presentes .gift-group h3 {
  margin:0 0 .25em;
  color:var(--section-ink);
  font:400 var(--section-size)/1.15 var(--heading);
  letter-spacing:-.016em;
}
#convite .section-header {
  margin-bottom:clamp(16px,3.5vh,32px);
}
#guia .stack {
  margin-top:0;
}
#guia .stack > .plate + .plate {
  margin-top:.7rem;
  padding-top:.65rem;
}
#guia .plate p {
  margin:.2em 0 0;
  line-height:1.45;
}
#guia .guide {
  margin-top:1rem;
}
#guia .guide details {
  padding:.25rem 0;
}
#guia .guide details p {
  margin:.15em 0 .35em;
  line-height:1.45;
}
#guia .guide summary {
  min-height:30px;
}
@media (max-height:740px) {
  .invite-open .section:not(#presentes) .page-content {
    padding-block:clamp(10px,2.8vh,22px) 10px;
  }
  #convite .section:not(#presentes) .section-header {
    margin-bottom:clamp(12px,2.4vh,18px);
  }
  #o-dia .place-address {
    padding-block:4px;
  }
  #o-dia .church-address .art {
    width:clamp(105px,27%,178px);
  }
  #o-dia .day-place + .day-place {
    padding-top:8px;
  }
  #o-dia .venue-links > .actions {
    column-gap:clamp(9px,3vw,20px);
  }
  #o-dia .venue-links .btn {
    min-height:38px;
  }
  #guia .stack > .plate + .plate {
    margin-top:.42rem;
    padding-top:.42rem;
  }
  #guia .guide {
    margin-top:.65rem;
  }
}
@media (forced-colors:active) {
  .section .subsection-title,
  #presentes .gift-group h3 { color:CanvasText; }
}

/* Venue names are h4, not the old h3. Reset the browser's large default margins. */
#o-dia .place-address .day-venue-name {
  margin:0 0 .68rem;
  font:400 clamp(1.2rem,2.9vw,1.38rem)/1.22 var(--heading);
  color:var(--type-paragraph);
  text-wrap:balance;
}
#o-dia .place-address .facts {
  font-size:var(--detail-size);
  line-height:1.36;
}
@media (max-width:470px) {
  #o-dia .place-address {
    padding-block:4px;
  }
  #o-dia .venue-links > .actions {
    justify-content:center;
    column-gap:clamp(6px,2vw,12px);
  }
  #o-dia .venue-links .btn {
    min-height:36px;
    gap:3px;
  }
  #guia .plate .facts > span {
    display:inline;
  }
  #guia .plate .facts > span + span::before {
    content:" ";
  }
}

@media (max-height:630px) {
  .invite-open .section:not(#presentes) .page-content {
    padding-block:8px 4px;
  }
  #convite .section:not(#presentes) .section-header {
    margin-bottom:10px;
  }
  #o-dia .place-address {
    padding-block:1px;
  }
  #o-dia .day-place {
    padding-bottom:4px;
  }
  #o-dia .venue-links {
    margin-top:2px;
  }
  #guia .stack > .plate + .plate {
    margin-top:.2rem;
    padding-top:.22rem;
  }
  #guia .guide {
    margin-top:.4rem;
  }
  #guia .guide details {
    padding:.12rem 0;
  }
}

/* One size scale for every interior page. Subsections use their own color. */
:root {
  --page-title-size:clamp(1.78rem,5.6vw,3.45rem);
  --section-size:clamp(1.42rem,3.7vw,1.88rem);
  --detail-size:clamp(.94rem,2.3vw,1.08rem);
  --section-ink:#f3c4b8;
}
:root[data-theme="claro"] {
  --section-ink:#8a3a30;
}
#convite .section-header .lined-title {
  font-size:var(--page-title-size);
}
#guia .guide summary,
#guia .plate p,
#presentes .gift-row {
  font-size:var(--detail-size);
}
#guia .plate .small,
#guia .guide details p {
  font-size:var(--detail-size);
}
#guia .guide summary {
  color:var(--type-paragraph);
}
@media(max-width:330px) {
  :root { --page-title-size:clamp(1.43rem,8.15vw,1.7rem); }
}
@media(forced-colors:active) {
  #guia .guide summary { color:CanvasText; }
}
@media(max-width:300px) {
  :root { --section-size:1.28rem; }
}
@media(max-height:630px) {
  #guia .guide { margin-top:.2rem; }
}

/* A fine pass on titles only; keep the established families and sizes. */
#convite .section-header .lined-title > span,
#convite .subsection-title,
#presentes .gift-group h3 {
  -webkit-text-stroke:.22px currentColor;
}

@media (forced-colors:active) {
  #convite .section-header .lined-title > span,
  #convite .subsection-title,
  #presentes .gift-group h3 { -webkit-text-stroke-width:0; }
}

/* Keep the closing compact on short screens. */
#o-dia .couple-note {
  --closing-ink:var(--name-ink);
}
:root[data-theme="claro"] #o-dia .couple-note {
  --closing-ink:#873c2a;
}
.invite-open #o-dia .couple-note {
  padding-block:clamp(1.5rem,4vh,2.5rem) clamp(.45rem,1.5vh,.85rem);
}
#o-dia .couple-note p {
  font-size:clamp(1rem,2.05vw,1.18rem);
}
#o-dia .couple-note .couple-signoff {
  margin-top:.55rem;
  font-size:.9rem;
}
#o-dia .couple-signature {
  display:block;
  width:clamp(9rem,39vw,13.5rem);
  height:auto;
  margin:0 auto;
  color:var(--closing-ink);
}
@media (forced-colors:active) {
  #o-dia .couple-signoff .sr-only {
    position:static;
    width:auto;
    height:auto;
    margin:0;
    clip:auto;
    overflow:visible;
    white-space:normal;
  }
  #o-dia .couple-signature { display:none; }
}
