/* ───────────────────────── tokens ───────────────────────── */
  :root {
    --ink:      #4E5149;
    --ink-2:    #64685D;
    --muted:    #8B8E82;
    --paper:    #FDFAF2;
    --card:     #FFFDF7;
    --ground:   #F6F1E4;
    --rule:     #E7E1D1;
    --rule-2:   #D8D1BD;
    --plum:     #6E7268;   /* the sage-grey Lovebird uses for buttons and marks */
    --plum-wash:#EFEDE1;
    --on-accent:#FDFAF2;
    --brass:    #A99B72;
    --yes:      #4B7A52;
    --yes-wash: #EBF1E8;
    --no:       #AC5B41;
    --no-wash:  #F7EDE7;
    --focus:    #6E7268;

    --f-display: "Lora", "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --f-body:    "Jost", "Avenir Next", "Avenir", "Century Gothic", system-ui, -apple-system, sans-serif;
    --f-data:    "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;

    --s-0: 0.6875rem;
    --s-1: 0.8125rem;
    --s-2: 0.9375rem;
    --s-3: 1.125rem;
    --s-4: 1.5rem;
    --s-5: 2.125rem;
    --s-6: 3rem;

    --r: 3px;
    --shadow: 0 1px 2px rgba(36,31,51,.05), 0 8px 24px -12px rgba(36,31,51,.18);
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --ink:      #EDE8DA;
      --ink-2:    #CFCABA;
      --muted:    #99958A;
      --paper:    #201F1B;
      --card:     #2A2924;
      --ground:   #191814;
      --rule:     #3A382F;
      --rule-2:   #4C4A3F;
      --plum:     #A9B396;
      --plum-wash:#2E312A;
      --on-accent:#201F1B;
      --brass:    #C4B283;
      --yes:      #7FAE7E;
      --yes-wash: #232C22;
      --no:       #D18A6C;
      --no-wash:  #30231C;
      --focus:    #A9B396;
      --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -12px rgba(0,0,0,.65);
    }
  }
  :root[data-theme="dark"] {
    --ink:#EDE8DA; --ink-2:#CFCABA; --muted:#99958A; --paper:#201F1B; --card:#2A2924;
    --ground:#191814; --rule:#3A382F; --rule-2:#4C4A3F; --plum:#A9B396; --plum-wash:#2E312A;
    --brass:#C4B283; --yes:#7FAE7E; --yes-wash:#232C22; --no:#D18A6C; --no-wash:#30231C;
    --focus:#A9B396; --on-accent:#201F1B;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px -12px rgba(0,0,0,.65);
  }
  :root[data-theme="light"] {
    --ink:#4E5149; --ink-2:#64685D; --muted:#8B8E82; --paper:#FDFAF2; --card:#FFFDF7;
    --ground:#F6F1E4; --rule:#E7E1D1; --rule-2:#D8D1BD; --plum:#6E7268; --plum-wash:#EFEDE1;
    --brass:#A99B72; --yes:#4B7A52; --yes-wash:#EBF1E8; --no:#AC5B41; --no-wash:#F7EDE7;
    --focus:#6E7268; --on-accent:#FDFAF2;
    --shadow: 0 1px 2px rgba(78,81,73,.05), 0 8px 24px -12px rgba(78,81,73,.20);
  }

  /* The invitation keeps its cream regardless of the viewer's theme — it is stationery,
     and stationery has one colour. The admin screens follow the theme. */
  .guest-ground {
    --ink:#4E5149; --ink-2:#64685D; --muted:#8B8E82; --paper:#FDF9F0; --card:#FFFFFF;
    --ground:#FDF9F0; --rule:#E7E1D1; --rule-2:#D8D1BD; --plum:#6E7268; --plum-wash:#EFEDE1;
    --brass:#A99B72; --yes:#4B7A52; --yes-wash:#EBF1E8; --no:#AC5B41; --no-wash:#F7EDE7;
    --focus:#6E7268; --on-accent:#FDFAF2;
    --shadow: 0 1px 2px rgba(78,81,73,.05), 0 8px 24px -12px rgba(78,81,73,.18);
    color: var(--ink);
  }

  /* ───────────────────────── base ───────────────────────── */
  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 var(--s-2)/1.6 var(--f-body);
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 400; text-wrap: balance; letter-spacing: -0.01em; }

  button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }

  :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

  @media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
  }

  .eyebrow {
    font: 500 var(--s-0)/1 var(--f-data);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .num { font-family: var(--f-data); font-variant-numeric: tabular-nums; }

  /* ───────────────────────── prototype shell ───────────────────────── */
  .shell { min-height: 100vh; display: flex; flex-direction: column; }

  .bar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; flex-wrap: wrap;
    column-gap: 1.5rem; row-gap: .5rem;
    padding: .625rem 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }

  .brand { display: flex; align-items: baseline; gap: .5rem; margin-right: auto; }
  .brand-mark { font-family: var(--f-display); font-size: var(--s-3); color: var(--plum); }
  .brand-name { font: 500 var(--s-0)/1 var(--f-data); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

  .tabs { display: flex; gap: .25rem; }
  .tab {
    padding: .375rem .75rem;
    font: 500 var(--s-1)/1.3 var(--f-body);
    color: var(--muted);
    border-radius: var(--r);
    transition: color .15s, background .15s;
  }
  .tab:hover { color: var(--ink); background: var(--plum-wash); }
  .tab[aria-selected="true"] { color: var(--plum); background: var(--plum-wash); }

  .screen { display: none; flex: 1; animation: rise .32s ease-out; }
  .screen[data-active] { display: block; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

  .note {
    display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline;
    max-width: 62rem; margin: 0 auto; padding: .75rem 1.25rem;
    border-bottom: 1px solid var(--rule);
    font-size: var(--s-1); color: var(--muted);
  }
  .note > span:last-child { flex: 1 1 14rem; min-width: 0; }
  .note strong { color: var(--ink-2); font-weight: 500; }

  /* ═════════════════════ SCREEN 1 · GUEST REPLY CARD ═════════════════════ */

  .guest-ground {
    background: var(--ground);
    padding: 3rem 1.25rem 5rem;
    min-height: 100%;
  }

  .card {
    max-width: 30rem; margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem;
  }
  @media (min-width: 600px) { .card { padding: 3rem 2.75rem; } }

  /* the crest: a brass hairline pair framing the couple's initials */
  .crest { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
  .crest-rule { width: 100%; height: 1px; background: var(--brass); opacity: .5; }
  .crest-initials { font-family: var(--f-display); font-size: var(--s-4); color: var(--brass); letter-spacing: .08em; }

  .invite-head { text-align: center; display: flex; flex-direction: column; gap: .875rem; margin: 2rem 0 0; }
  .couple {
    font-size: clamp(1.625rem, 6.5vw, 2.25rem);
    line-height: 1.15;
    overflow-wrap: break-word;
  }
  .couple .amp { color: var(--brass); padding: 0 .12em; }
  .invite-meta { font-size: var(--s-1); color: var(--muted); display: flex; flex-direction: column; gap: .25rem; }
  .invite-meta .when { font-family: var(--f-data); letter-spacing: .16em; text-indent: .16em; text-transform: uppercase; font-size: var(--s-0); color: var(--ink-2); }

  .step { display: none; flex-direction: column; gap: 1.75rem; }
  .step[data-active] { display: flex; }

  .prompt { display: flex; flex-direction: column; gap: .375rem; }
  .prompt h2 { font-size: var(--s-4); }
  .prompt p { margin: 0; font-size: var(--s-1); color: var(--muted); }

  /* the fill-in rule — a reply-card field, not a boxed input */
  .field { display: flex; flex-direction: column; gap: .375rem; }
  .field-label { font: 500 var(--s-0)/1 var(--f-data); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .ruled {
    width: 100%;
    font: 400 var(--s-3)/1.5 var(--f-display);
    color: var(--ink);
    background: none;
    border: none;
    border-bottom: 1px solid var(--rule-2);
    padding: .25rem 0;
    transition: border-color .15s;
  }
  .ruled-sm { font-size: var(--s-2); font-family: var(--f-body); }
  .ruled::placeholder { color: var(--muted); opacity: .5; font-style: italic; }
  .ruled:focus { outline: none; border-bottom-color: var(--plum); border-bottom-width: 2px; padding-bottom: calc(.25rem - 1px); }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.5rem;
    font: 500 var(--s-1)/1 var(--f-body);
    letter-spacing: .02em;
    background: var(--plum);
    color: var(--on-accent);
    border-radius: var(--r);
    transition: opacity .15s, transform .15s;
  }
  .btn:hover { opacity: .88; }
  .btn:active { transform: translateY(1px); }
  .btn-quiet {
    background: none; color: var(--plum);
    border: 1px solid var(--rule-2);
    padding: .625rem 1.125rem;
  }
  .btn-quiet:hover { background: var(--plum-wash); border-color: var(--plum); opacity: 1; }
  .btn-row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }

  .hint { font-size: var(--s-0); color: var(--muted); font-family: var(--f-data); }

  /* party */
  .party-name { font-size: var(--s-5); line-height: 1.25; }
  .guest-block { display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem 0; border-top: 1px solid var(--rule); }
  .guest-block:first-of-type { border-top: 1px solid var(--rule-2); }
  /* name on its own line so a long one never squeezes the buttons */
  .guest-row { display: flex; flex-direction: column; align-items: stretch; gap: .75rem; }
  .guest-label { font-family: var(--f-display); font-size: var(--s-3); overflow-wrap: break-word; }

  /* equal columns, so the pair stays balanced whichever font actually loads */
  .choice { display: grid; grid-template-columns: 1fr 1fr; gap: .375rem; }
  .choice button {
    min-width: 6.75rem;
    padding: .5rem .875rem;
    font: 500 var(--s-1)/1.2 var(--f-body);
    border: 1px solid var(--rule-2);
    border-radius: var(--r);
    color: var(--muted);
    white-space: nowrap;
    transition: all .15s;
  }
  .choice button:hover { border-color: var(--ink-2); color: var(--ink); }
  .choice button[aria-pressed="true"][data-v="yes"] { background: var(--yes-wash); border-color: var(--yes); color: var(--yes); }
  .choice button[aria-pressed="true"][data-v="no"]  { background: var(--no-wash);  border-color: var(--no);  color: var(--no); }

  .diet { display: none; flex-direction: column; gap: .625rem; padding-left: 1rem; border-left: 2px solid var(--plum-wash); }
  .diet[data-open] { display: flex; animation: rise .24s ease-out; }
  .chips { display: flex; flex-wrap: wrap; gap: .375rem; }
  .chip {
    padding: .3125rem .625rem;
    font: 400 var(--s-0)/1.2 var(--f-body);
    border: 1px solid var(--rule-2);
    border-radius: 100px;
    color: var(--ink-2);
    transition: all .15s;
  }
  .chip:hover { border-color: var(--plum); }
  .chip[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: var(--on-accent); }

  /* children stepper */
  .stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--rule); }
  .stepper { display: flex; align-items: center; gap: .25rem; border: 1px solid var(--rule-2); border-radius: var(--r); padding: .1875rem; }
  .stepper button { width: 1.875rem; height: 1.875rem; display: grid; place-items: center; color: var(--plum); font-size: var(--s-3); line-height: 1; border-radius: 2px; }
  .stepper button:hover:not(:disabled) { background: var(--plum-wash); }
  .stepper button:disabled { color: var(--rule-2); cursor: not-allowed; }
  .stepper output { min-width: 2rem; text-align: center; font-family: var(--f-data); font-size: var(--s-2); font-variant-numeric: tabular-nums; }
  .stepper-copy { display: flex; flex-direction: column; }
  .stepper-copy span { font-size: var(--s-0); color: var(--muted); }

  .submit-zone { display: flex; flex-direction: column; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--rule-2); }

  /* confirmation */
  .confirm { text-align: center; display: flex; flex-direction: column; gap: 1.5rem; align-items: center; }
  .confirm-seal {
    width: 3.5rem; height: 3.5rem; border-radius: 50%;
    background: var(--plum-wash); border: 1px solid var(--plum);
    display: grid; place-items: center;
    font-family: var(--f-display); font-size: var(--s-4); color: var(--plum);
  }
  .receipt { width: 100%; text-align: left; display: flex; flex-direction: column; font-size: var(--s-1); }
  .receipt-line { display: flex; justify-content: space-between; gap: 1rem; padding: .625rem 0; border-top: 1px solid var(--rule); }
  .receipt-line dt { color: var(--muted); }
  .receipt-line dd { margin: 0; text-align: right; }

  /* ── welcome page ── */
  .view { display: none; }
  .view[data-active] { display: block; animation: rise .32s ease-out; }

  .welcome { max-width: 44rem; margin: 0 auto; }

  /* hero — floral corners frame the fold, so it needs its own full-bleed band */
  .hero-band { position: relative; overflow: hidden; margin: -3rem -1.25rem 0; padding: 4.5rem 1.25rem 3rem; }
  .corner { position: absolute; top: 0; width: clamp(9rem, 26vw, 19rem); height: auto; pointer-events: none; }
  .corner-l { left: 0; }
  .corner-r { right: 0; transform: scaleX(-1); }

  .hero { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; }
  .hero-names { font-size: clamp(2.125rem, 7vw, 3.625rem); line-height: 1.12; overflow-wrap: break-word; }
  .hero-names .amp { padding: 0 .06em; }

  .hero-facts { display: flex; flex-direction: column; align-items: center; gap: .875rem; }
  .date-line {
    font-family: var(--f-data); font-size: clamp(1.25rem, 4vw, 1.75rem); font-weight: 300;
    letter-spacing: .3em; text-indent: .3em; color: var(--ink-2); font-variant-numeric: tabular-nums;
  }
  .date-line .sep { color: var(--muted); font-weight: 200; }
  .venue-line { font-family: var(--f-data); font-size: var(--s-2); letter-spacing: .14em; text-indent: .14em; text-transform: uppercase; color: var(--ink-2); }

  .countdown { margin: 0; font-family: var(--f-data); font-size: var(--s-2); color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
  .countdown span { white-space: nowrap; }
  .countdown b { font-weight: 500; color: var(--ink-2); }

  .btn-lg { padding: .8125rem 2.25rem; font-size: var(--s-2); border-radius: 100px; font-weight: 400; letter-spacing: .06em; }

  .sprig { display: block; width: 7rem; height: auto; margin: .5rem auto 0; opacity: .9; }

  .section { display: flex; flex-direction: column; gap: 1.5rem; padding: 3rem 0; border-top: 1px solid var(--rule); }
  /* the sprig is the divider above the first section — don't draw a second one */
  .sprig + .section { border-top: none; padding-top: 2rem; }
  .section-head { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
  .section-head h2 { font-size: var(--s-5); }
  .section-head p { margin: 0; max-width: 34rem; font-size: var(--s-2); color: var(--muted); }

  .welcome-note { text-align: center; font-size: var(--s-3); line-height: 1.75; color: var(--ink-2); max-width: 34rem; margin: 0 auto; font-family: var(--f-display); }
  .signoff { display: block; margin-top: 1.25rem; font-size: var(--s-2); color: var(--plum); font-style: italic; }

  .duo { display: grid; gap: 1.25rem; }
  @media (min-width: 40rem) { .duo { grid-template-columns: 1fr 1fr; } }
  .info-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.375rem; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); }
  .info-card h3 { font-size: var(--s-3); }
  .info-card p { margin: 0; font-size: var(--s-1); color: var(--muted); line-height: 1.65; }
  .info-card .meta { font-family: var(--f-data); font-size: var(--s-0); letter-spacing: .06em; color: var(--brass); text-transform: uppercase; }

  .faq { display: flex; flex-direction: column; }
  .faq-item { padding: 1.125rem 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: .3125rem; }
  .faq-item:first-child { border-top: 1px solid var(--rule-2); }
  .faq-item dt { font: 400 var(--s-3)/1.35 var(--f-display); }
  .faq-item dd { margin: 0; font-size: var(--s-1); color: var(--muted); line-height: 1.7; }

  .rsvp-band {
    display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center;
    padding: 2.5rem 1.5rem; margin: 3rem 0 1rem;
    background: var(--card); border: 1px solid var(--rule); border-radius: var(--r);
  }
  .rsvp-band h2 { font-size: var(--s-4); }
  .rsvp-band p { margin: 0; font-size: var(--s-2); color: var(--muted); max-width: 28rem; }

  .back-link { display: inline-flex; align-items: center; gap: .4375rem; font-size: var(--s-1); color: var(--muted); margin-bottom: 1.25rem; }
  .back-link:hover { color: var(--plum); }

  /* ═════════════════════ SCREENS 2+3 · ADMIN ═════════════════════ */

  .admin { max-width: 72rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; display: flex; flex-direction: column; gap: 1.75rem; }

  .admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
  .admin-head h1 { font-size: var(--s-5); }
  .admin-sub { font-size: var(--s-1); color: var(--muted); }

  .panel {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    padding: 1.375rem 1.5rem;
    display: flex; flex-direction: column; gap: 1rem;
  }
  .panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
  .panel-head h2 { font-size: var(--s-3); }

  /* headline meter — one fill on a track. Single hue: no CVD pair to fail. */
  .meter-panel { gap: 1.25rem; }
  .meter-figure { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
  .meter-hero { font-family: var(--f-display); font-size: var(--s-6); line-height: 1.35; font-variant-numeric: tabular-nums; }
  .meter-of { font-size: var(--s-2); color: var(--muted); }
  .meter-track { height: .625rem; background: var(--ground); border-radius: 100px; overflow: hidden; }
  .meter-fill { height: 100%; width: 66.7%; background: var(--plum); border-radius: 100px; }
  .meter-foot { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--s-0); color: var(--muted); font-family: var(--f-data); letter-spacing: .04em; }

  .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 1rem; }
  .tile {
    background: var(--card); border: 1px solid var(--rule); border-radius: var(--r);
    padding: 1.125rem 1.25rem;
    display: flex; flex-direction: column; gap: .5rem;
    border-top: 2px solid var(--rule);
  }
  .tile-yes  { border-top-color: var(--yes); }
  .tile-no   { border-top-color: var(--no); }
  .tile-wait { border-top-color: var(--muted); }
  .tile-kids { border-top-color: var(--brass); }
  .tile-label { display: flex; align-items: center; gap: .4375rem; }
  .dot { width: .5rem; height: .5rem; border-radius: 50%; flex: none; }
  .tile-value { font-family: var(--f-display); font-size: var(--s-5); line-height: 1.2; font-variant-numeric: tabular-nums; }
  .tile-sub { font-size: var(--s-0); color: var(--muted); font-family: var(--f-data); }

  .cols { display: grid; gap: 1.75rem; }
  @media (min-width: 62rem) { .cols { grid-template-columns: 1.4fr 1fr; } }

  /* chart */
  .chart-wrap { position: relative; }
  .chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
  .grid-line { stroke: var(--rule); stroke-width: 1; }
  .axis-text { font-family: var(--f-data); font-size: 9.5px; fill: var(--muted); letter-spacing: .04em; }
  .series-line { fill: none; stroke: var(--plum); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .series-area { fill: var(--plum); opacity: .1; }
  .endpoint { fill: var(--plum); stroke: var(--card); stroke-width: 2; }
  .deadline-line { stroke: var(--brass); stroke-width: 1; stroke-dasharray: 3 3; }
  .deadline-text { font-family: var(--f-data); font-size: 9.5px; fill: var(--brass); letter-spacing: .04em; }
  .crosshair { stroke: var(--plum); stroke-width: 1; opacity: 0; }
  .hover-dot { fill: var(--plum); stroke: var(--card); stroke-width: 2; opacity: 0; }
  .hit { fill: transparent; cursor: crosshair; }

  .tip {
    position: absolute; pointer-events: none; opacity: 0;
    transform: translate(-50%, -115%);
    background: var(--ink); color: var(--paper);
    padding: .4375rem .625rem; border-radius: var(--r);
    font: 400 var(--s-0)/1.35 var(--f-data);
    white-space: nowrap; transition: opacity .1s;
    z-index: 5;
  }
  .tip b { font-weight: 600; }

  /* dietary bars — magnitude, single hue */
  .bars { display: flex; flex-direction: column; gap: .625rem; }
  .bar-row { display: grid; grid-template-columns: 7.5rem 1fr 2rem; align-items: center; gap: .75rem; font-size: var(--s-1); }
  .bar-track { display: block; height: .5rem; background: var(--ground); border-radius: 0 2px 2px 0; }
  .bar-fill { display: block; height: 100%; background: var(--plum); border-radius: 0 2px 2px 0; }
  .bar-val { text-align: right; font-family: var(--f-data); font-size: var(--s-1); font-variant-numeric: tabular-nums; color: var(--ink-2); }

  /* ledger tables */
  .ledger-wrap { overflow-x: auto; margin: 0 -1.5rem -1.375rem; padding: 0 1.5rem 1.375rem; }
  table { width: 100%; border-collapse: collapse; min-width: 34rem; }
  thead th {
    text-align: left; padding: 0 .75rem .5rem 0;
    font: 500 var(--s-0)/1 var(--f-data); letter-spacing: .12em; text-transform: uppercase;
    color: var(--muted); border-bottom: 1px solid var(--rule-2); white-space: nowrap;
  }
  thead th.r, td.r { text-align: right; }
  tbody td { padding: .8125rem .75rem .8125rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: var(--s-1); }
  tbody tr:hover td { background: var(--plum-wash); }
  .party-cell { display: flex; flex-direction: column; gap: .125rem; }
  .party-cell b { font: 400 var(--s-2)/1.4 var(--f-display); }
  .party-cell span { font-size: var(--s-0); color: var(--muted); }
  .cell-mono { font-family: var(--f-data); font-variant-numeric: tabular-nums; }
  .dim { color: var(--muted); }

  .pill {
    display: inline-flex; align-items: center; gap: .375rem;
    padding: .1875rem .5rem;
    font: 500 var(--s-0)/1.3 var(--f-body);
    border-radius: 100px; border: 1px solid;
    white-space: nowrap;
  }
  .pill-yes  { color: var(--yes); border-color: var(--yes); background: var(--yes-wash); }
  .pill-no   { color: var(--no);  border-color: var(--no);  background: var(--no-wash); }
  .pill-wait { color: var(--muted); border-color: var(--rule-2); background: transparent; }

  .disclose { display: flex; align-items: flex-start; gap: .5rem; }
  .caret { color: var(--muted); font-size: .625rem; transition: transform .15s; display: inline-block; line-height: 1.9; }
  tr[data-open] .caret { transform: rotate(90deg); }
  .sub-row { display: none; }
  .sub-row[data-show] { display: table-row; }
  .sub-row td { background: var(--ground); padding-top: .625rem; padding-bottom: .625rem; }
  .sub-list { display: flex; flex-direction: column; gap: .4375rem; padding-left: 1.5rem; }
  .sub-guest { display: flex; align-items: center; gap: .625rem; font-size: var(--s-1); flex-wrap: wrap; }
  .sub-guest .who { min-width: 9rem; }
  .tag { font: 400 var(--s-0)/1.2 var(--f-data); color: var(--brass); border: 1px solid var(--brass); border-radius: 2px; padding: .125rem .3125rem; }

  /* toolbar */
  .toolbar { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; }
  .search {
    flex: 1 1 12rem; min-width: 9rem;
    padding: .5rem .75rem; font: 400 var(--s-1)/1.4 var(--f-body);
    color: var(--ink); background: var(--card);
    border: 1px solid var(--rule-2); border-radius: var(--r);
  }
  .search::placeholder { color: var(--muted); }
  .filters { display: flex; gap: .25rem; }
  .filter {
    padding: .4375rem .6875rem; font: 500 var(--s-0)/1.2 var(--f-body);
    color: var(--muted); border: 1px solid transparent; border-radius: var(--r);
  }
  .filter:hover { color: var(--ink); background: var(--plum-wash); }
  .filter[aria-pressed="true"] { color: var(--plum); border-color: var(--plum); background: var(--plum-wash); }

  .export-wrap { position: relative; }
  .menu {
    position: absolute; right: 0; top: calc(100% + .375rem); z-index: 10;
    min-width: 15rem; padding: .375rem;
    background: var(--card); border: 1px solid var(--rule-2); border-radius: var(--r);
    box-shadow: var(--shadow);
    display: none; flex-direction: column;
  }
  .menu[data-open] { display: flex; animation: rise .16s ease-out; }
  .menu-item { display: flex; flex-direction: column; gap: .0625rem; padding: .5rem .625rem; border-radius: 2px; text-align: left; }
  .menu-item:hover { background: var(--plum-wash); }
  .menu-item b { font-weight: 500; font-size: var(--s-1); }
  .menu-item span { font-size: var(--s-0); color: var(--muted); }

  /* upload */
  .drop {
    border: 1px dashed var(--rule-2); border-radius: var(--r);
    padding: 1.75rem 1.5rem; text-align: center;
    display: flex; flex-direction: column; gap: .5rem; align-items: center;
    background: var(--ground);
  }
  .drop h3 { font-size: var(--s-3); }
  .drop p { margin: 0; font-size: var(--s-1); color: var(--muted); max-width: 30rem; }

  .map-grid { display: grid; gap: .5rem; }
  .map-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; font-size: var(--s-1); }
  .map-from { font-family: var(--f-data); font-size: var(--s-0); color: var(--ink-2); background: var(--ground); padding: .375rem .5rem; border-radius: 2px; border: 1px solid var(--rule); }
  .map-arrow { color: var(--brass); font-size: var(--s-0); }
  .map-to { padding: .375rem .5rem; border: 1px solid var(--rule-2); border-radius: 2px; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
  .map-to span { color: var(--muted); font-size: var(--s-0); }

  .banner {
    display: flex; align-items: center; gap: .625rem;
    padding: .625rem .875rem; border-radius: var(--r);
    background: var(--yes-wash); border: 1px solid var(--yes);
    font-size: var(--s-1); color: var(--yes);
  }

  .roadmap { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
  .roadmap-item { display: flex; flex-direction: column; gap: .3125rem; padding-top: .75rem; border-top: 1px solid var(--rule-2); }
  .roadmap-item h3 { font-size: var(--s-2); }
  .roadmap-item p { margin: 0; font-size: var(--s-1); color: var(--muted); }

  /* ═════════════════════ PHONE ═════════════════════ */
  @media (max-width: 34rem) {
    .guest-ground { padding: 2rem .875rem 3.5rem; }
    /* the sprays hang lower relative to a narrow page — drop the names clear of them */
    .hero-band { margin: -2rem -.875rem 0; padding: 5.5rem .875rem 2rem; }
    .corner { width: clamp(5rem, 24vw, 9rem); }
    .hero-names { font-size: clamp(1.75rem, 8.5vw, 2.5rem); }
    .hero { gap: 1.125rem; }

    .card { padding: 2rem 1.25rem; }
    .section { padding: 2.25rem 0; }
    .section-head h2 { font-size: var(--s-4); }
    .welcome-note { font-size: var(--s-2); }

    .rsvp-band { padding: 2rem 1.125rem; margin-top: 2rem; }

    .admin { padding: 1.5rem .875rem 3rem; gap: 1.25rem; }
    .panel { padding: 1.125rem 1rem; }
    .ledger-wrap { margin: 0 -1rem -1.125rem; padding: 0 1rem 1.125rem; }
    .admin-head h1 { font-size: var(--s-4); }
    .meter-hero { font-size: var(--s-5); }
    .tiles { grid-template-columns: 1fr 1fr; gap: .625rem; }
    .tile { padding: .875rem .9375rem; }
    .tile-value { font-size: var(--s-4); }

    .bar-row { grid-template-columns: 6.5rem 1fr 1.75rem; gap: .5rem; }

    /* mapping reads as stacked pairs when there's no room for two columns */
    .map-row { grid-template-columns: 1fr; gap: .25rem; }
    .map-arrow { display: none; }

    .stepper-row { flex-wrap: wrap; }
    .toolbar { gap: .5rem; }
    .filters { flex-wrap: wrap; }
    .drop { padding: 1.25rem 1rem; }
    /* Export goes full-width so its menu can anchor to both panel edges instead of
       running off the left when the button row wraps */
    .admin-head .btn-row { width: 100%; }
    .admin-head .export-wrap { flex: 1 1 auto; }
    .admin-head .export-wrap > .btn { width: 100%; }
    .menu { left: 0; right: 0; width: auto; min-width: 0; max-width: none; }

    /* thumbs, not cursors: every control gets a 40px target */
    .tab, .filter, .chip, .choice button, .back-link, .btn-quiet, .menu-item {
      min-height: 40px;
      display: inline-flex; align-items: center; justify-content: center;
    }
    .menu-item { justify-content: flex-start; flex-direction: column; align-items: flex-start; padding: .625rem .75rem; }
    .chip { padding-inline: .875rem; }
    .stepper button { width: 2.5rem; height: 2.5rem; font-size: var(--s-4); }
    .stepper output { font-size: var(--s-3); }
    .btn { padding: .875rem 1.5rem; min-height: 44px; }

    /* 16px keeps iOS from zooming the page when a field takes focus */
    .ruled, .ruled-sm, .search { font-size: 16px; }
    .ruled { padding: .625rem 0; }
    .search { padding: .625rem .75rem; }
  }

  .foot { padding: 1.5rem 1.25rem 2.5rem; text-align: center; border-top: 1px solid var(--rule); }
  .foot p { margin: 0 auto; max-width: 40rem; font-size: var(--s-0); color: var(--muted); font-family: var(--f-data); line-height: 1.7; }

  /* ───────────────────────── form errors ───────────────────────── */
  .form-error {
    margin: 0;
    padding: .625rem .75rem;
    font-size: var(--s-1);
    color: var(--no);
    background: var(--no-wash);
    border: 1px solid var(--no);
    border-radius: var(--r);
  }
  .form-error[hidden] { display: none; }
  /* the first-name field only appears when a surname matches two parties */
  .field[hidden] { display: none; }

  button:disabled { opacity: .6; cursor: progress; }

  /* ───────────────────────── import mapping selects ───────────────────────── */
  select.map-from {
    width: 100%;
    font: 400 var(--s-1)/1.4 var(--f-data);
    color: var(--ink);
    background: var(--ground);
    border: 1px solid var(--rule-2);
    border-radius: 2px;
    padding: .4375rem .5rem;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                      linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 15px) calc(50% + 2px), calc(100% - 10px) calc(50% + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
  }
  select.map-from:focus { outline: none; border-color: var(--plum); }
  a.menu-item { text-decoration: none; color: inherit; }

  /* ───────────────────────── hero photograph ─────────────────────────
     Mounted rather than full-bleed: the shot is portrait, and a portrait
     behind centred text crops to torsos on a phone. A white mount keeps it
     reading as a photograph tipped onto the invitation. */
  .portrait {
    max-width: 26rem;
    margin: 2.5rem auto .5rem;
    padding: .625rem;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: var(--r);
    box-shadow: var(--shadow);
  }
  .portrait img {
    display: block;
    width: 100%;
    height: auto;
    /* reserve the space before it loads so nothing below jumps */
    aspect-ratio: 1608 / 1954;
    background: var(--ground);
    border-radius: 1px;
  }
  @media (max-width: 34rem) {
    .portrait { max-width: none; margin: 1.75rem auto .25rem; padding: .5rem; }
  }

  /* ───────────────────────── edit dialog ───────────────────────── */
  dialog {
    width: min(34rem, calc(100vw - 2rem));
    padding: 0;
    border: 1px solid var(--rule-2);
    border-radius: var(--r);
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 24px 60px -20px rgba(0,0,0,.35);
  }
  dialog::backdrop { background: rgba(40,38,30,.45); }
  dialog form { display: flex; flex-direction: column; max-height: min(86vh, 48rem); }

  .dlg-head { padding: 1.25rem 1.5rem .875rem; border-bottom: 1px solid var(--rule); }
  .dlg-head h2 { font-size: var(--s-4); }
  .dlg-body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1.125rem; overflow-y: auto; }
  .dlg-foot {
    display: flex; align-items: center; gap: .625rem; flex-wrap: wrap;
    padding: 1rem 1.5rem; border-top: 1px solid var(--rule); background: var(--ground);
  }

  .duo-fields { display: grid; gap: 1.125rem; grid-template-columns: 1fr 1fr; }
  @media (max-width: 30rem) { .duo-fields { grid-template-columns: 1fr; } }

  .guest-fields { display: flex; flex-direction: column; gap: .5rem; }
  .guest-field { display: flex; align-items: center; gap: .5rem; }
  .guest-field input { flex: 1; min-width: 0; }
  .icon-btn {
    flex: none; width: 2rem; height: 2rem; border-radius: var(--r);
    border: 1px solid var(--rule-2); color: var(--muted);
    font-size: var(--s-3); line-height: 1; display: grid; place-items: center;
  }
  .icon-btn:hover { border-color: var(--no); color: var(--no); background: var(--no-wash); }

  .btn-danger {
    padding: .625rem 1rem; border-radius: var(--r);
    border: 1px solid var(--rule-2); color: var(--no);
    font: 500 var(--s-1)/1 var(--f-body);
  }
  .btn-danger:hover { background: var(--no-wash); border-color: var(--no); }

  .btn-edit { font-size: var(--s-0); padding: .375rem .75rem; }

  /* import mode */
  .modes { border: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
  .modes legend { padding: 0 0 .5rem; }
  .mode {
    display: flex; gap: .625rem; align-items: flex-start;
    padding: .75rem .875rem; border: 1px solid var(--rule); border-radius: var(--r);
    cursor: pointer; font-size: var(--s-1); color: var(--muted);
  }
  .mode:hover { border-color: var(--rule-2); }
  .mode:has(input:checked) { border-color: var(--plum); background: var(--plum-wash); }
  .mode input { margin-top: .2rem; flex: none; accent-color: var(--plum); }
  .mode b { display: block; color: var(--ink); font-weight: 500; margin-bottom: .125rem; }

  @media (max-width: 34rem) {
    .dlg-head, .dlg-body, .dlg-foot { padding-inline: 1rem; }
    .dlg-foot { gap: .5rem; }
    .dlg-foot .btn, .dlg-foot .btn-quiet, .btn-danger { min-height: 40px; }
  }

  /* ───────────────────────── where to stay ─────────────────────────
     The room block leads; everything else is a footnote to it. */
  /* One block, not two: the room block is the point, and staying elsewhere is
     a footnote to it rather than an equal alternative. */
  .stay { display: flex; flex-direction: column; gap: 1rem; max-width: 36rem; margin: 0 auto; }
  .stay-note { margin: 0; font-size: var(--s-1); color: var(--muted); text-align: center; }
  .stay-main { border-color: var(--rule-2); }
  .stay-main p + p { margin-top: .75rem; }
  .stay-main b { font-weight: 500; color: var(--ink); }
  .stay-actions {
    display: flex; flex-wrap: wrap; align-items: center; gap: .875rem;
    margin-top: 1rem !important;
  }
  .quiet-link { font-size: var(--s-1); color: var(--plum); text-decoration: none; border-bottom: 1px solid var(--rule-2); }
  .quiet-link:hover { border-bottom-color: var(--plum); }

  /* the children question sits with the guests, not after them */
  .kids-block[hidden] { display: none; }
  .kids-block .stepper-row { padding: 0; border: none; }

  /* three travel cards: side by side when there's room, stacked when there isn't */
  .travel { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); }

  .info-card p b { font-weight: 500; color: var(--ink); }
  .section-head p br { content: ""; display: block; margin-bottom: .125rem; }

  /* The two days, each with the same label-then-title shape as the cards */
  .sched-day { display: flex; flex-direction: column; gap: .5rem; }
  .sched-day .eyebrow { color: var(--brass); }
  .sched-day h3 { font-size: var(--s-4); line-height: 1.3; }
  .sched-day p { margin: 0; font-size: var(--s-2); color: var(--ink-2); line-height: 1.7; max-width: 38rem; }
  @media (max-width: 34rem) { .sched-day h3 { font-size: var(--s-3); } }

  /* two short paragraphs in the intro, the deadline last */
  .welcome-note + .welcome-note { margin-top: 1.25rem; }

  /* An invitation, not an instruction — so it sits apart from the timed list. */
  .sched-invite {
    display: flex; flex-direction: column; gap: .5rem;
    padding: 1.5rem 1.625rem;
    background: var(--plum-wash);
    border: 1px solid var(--rule-2);
    border-radius: var(--r);
  }
  .sched-invite h3 { font-size: var(--s-4); line-height: 1.3; }
  .sched-invite p { margin: 0; font-size: var(--s-2); color: var(--ink-2); line-height: 1.7; max-width: 38rem; }
  .sched-invite p + p { margin-top: .875rem; }
  @media (max-width: 34rem) {
    .sched-invite { padding: 1.25rem 1.125rem; }
    .sched-invite h3 { font-size: var(--s-3); }
    .sched-invite p { font-size: var(--s-1); }
  }

  /* ───────────────────────── flourishes ─────────────────────────
     The invitation should read as stationery, not a brochure: the wildflower
     sprig under the photograph divides every section, sub-lines are italic
     serif, cards wear a double rule, and the flowers from the top of the page
     return on the closing RSVP band. Everything is centred, like a card. */
  .guest-ground { --sprig: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 30'><path d='M46 22 C58 22 66 14 80 14 C94 14 102 22 114 22' fill='none' stroke='%237E9A6B' stroke-width='1.3' stroke-linecap='round'/><path d='M64 18 q-6 -8 -13 -7 q3 8 13 7 Z' fill='%2394AE80' opacity='.85'/><path d='M96 18 q6 -8 13 -7 q-3 8 -13 7 Z' fill='%2394AE80' opacity='.85'/><path d='M72 16 q-4 -7 -10 -8 q1 8 10 8 Z' fill='%235F7A55' opacity='.7'/><path d='M88 16 q4 -7 10 -8 q-1 8 -10 8 Z' fill='%235F7A55' opacity='.7'/><ellipse cx='80' cy='11' rx='4' ry='2.4' fill='%23E5814F' opacity='.8'/><ellipse cx='80' cy='11' rx='2.4' ry='4' fill='%23E5814F' opacity='.8'/><circle cx='80' cy='11' r='1.4' fill='%23EFD186'/><circle cx='56' cy='21' r='2' fill='%23A9B6DC' opacity='.75'/><circle cx='104' cy='21' r='2' fill='%23EFD186' opacity='.9'/></svg>"); }

  .section { border-top: none; padding-top: 2.25rem; }
  .section::before { content: ""; display: block; width: 10rem; height: 1.875rem; margin: 0 auto; background: var(--sprig) center / contain no-repeat; }
  .sprig + .section::before { display: none; }

  .section-head p { font-family: var(--f-display); font-style: italic; font-size: var(--s-3); color: var(--ink-2); line-height: 1.5; }
  .section-head p b { font-style: normal; }

  /* a short brass rule with a diamond, between the two days */
  .orn { display: flex; align-items: center; justify-content: center; gap: .625rem; margin: .5rem 0; }
  .orn::before, .orn::after { content: ""; width: 2.75rem; height: 1px; background: var(--brass); opacity: .55; }
  .orn b { width: .375rem; height: .375rem; background: var(--brass); transform: rotate(45deg); opacity: .8; }

  .sched-day, .sched-invite, .info-card, .faq-item { align-items: center; text-align: center; }
  .sched-day p, .sched-invite p { margin: 0 auto; }
  /* a second paragraph needs more air than the flex gap alone gives it */
  .sched-day p + p, .sched-invite p + p { margin-top: .5rem; }
  .faq-item dd { max-width: 36rem; }
  .faq-item dt { color: var(--ink); }
  .faq-item:first-child { border-top: none; }
  .stay-actions { justify-content: center; }

  /* the double rule of a printed card */
  .info-card, .sched-invite, .rsvp-band {
    border: 1px solid var(--rule-2);
    outline: 1px solid var(--rule-2);
    outline-offset: -5px;
    border-radius: 2px;
  }
  .info-card { padding: 1.625rem 1.5rem; }
  .info-card .meta { color: var(--brass); }
  .sched-invite { padding: 1.75rem 1.75rem; background: var(--card); }

  .rsvp-band { position: relative; overflow: hidden; padding: 3.75rem 1.5rem 3.25rem; }
  .rsvp-band .corner { width: 10rem; }
  .rsvp-band h2 { font-size: var(--s-5); }
  @media (max-width: 34rem) {
    .rsvp-band { padding: 3.5rem 1rem 2.25rem; }
    .rsvp-band .corner { width: 6.5rem; }
    .rsvp-band h2 { font-size: var(--s-4); }
    .section-head p { font-size: var(--s-2); }
  }

  /* The reply can still be amended, but nothing should advertise it — a quiet
     link under the receipt rather than a button inviting a second pass. */
  button.quiet-link {
    font: 400 var(--s-1)/1.4 var(--f-body);
    color: var(--muted);
    border: none;
    border-bottom: 1px solid var(--rule-2);
    padding: 0 0 1px;
    border-radius: 0;
    background: none;
  }
  button.quiet-link:hover { color: var(--plum); border-bottom-color: var(--plum); }

  /* The website is kept for browsing, but set below the two ways of actually
     reaching the room block so it does not compete with them. */
  .stay-aside { margin: .875rem 0 0 !important; font-size: var(--s-0); }
  .stay-aside a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--rule); }
  .stay-aside a:hover { color: var(--plum); border-bottom-color: var(--plum); }
