:root {
  --evergreen: #173b2f;
  --evergreen-dark: #112b23;
  --ink: #222e26;
  --muted: #59655c;
  --paper: #f7f2e8;
  --card: #fffdf8;
  --line: #ded8ca;
  --rust: #922e23;
  --rust-hover: #79291e;
  font: 100%/1.55 system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--evergreen); }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
.wrap { width: min(100% - 2rem, 68rem); margin: 0 auto; }
.masthead { background: var(--evergreen-dark); color: white; }
.masthead-inner { min-height: 4.3rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.masthead a { color: white; }
.masthead :focus-visible { outline-color: #efd398; }
.brand { text-decoration: none; font: 600 clamp(1.16rem, 4.5vw, 1.45rem)/1.2 Georgia, serif; }
.brand span { color: #efd398; margin-right: .4rem; }
.return { font-size: .92rem; text-underline-offset: .2em; }
main.wrap { padding-block: 2.9rem 4rem; }
h1, h2 { color: var(--evergreen); font-family: Georgia, serif; font-weight: 500; line-height: 1.13; margin: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 4rem); margin-top: .3rem; }
h2 { font-size: clamp(1.45rem, 4.5vw, 2rem); margin-bottom: .8rem; }
.eyebrow { color: var(--rust); font-size: .79rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }
.dashboard-intro { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.jump-links { display: flex; gap: .55rem 1.2rem; flex-wrap: wrap; margin: 1.25rem 0 1.65rem; }
.jump-links a { font-size: .94rem; font-weight: 690; text-underline-offset: .25em; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 1.15rem; padding: clamp(1.15rem, 4.5vw, 2rem); margin-bottom: 1.2rem; box-shadow: 0 8px 24px #112b2309; }
.signin { width: min(100%, 27rem); margin: min(9vh, 4rem) auto 0; }
.signin h1 { font-size: clamp(2.1rem, 8vw, 3rem); }
.signin p { color: var(--muted); margin: .9rem 0; }
label { display: block; font-weight: 650; font-size: .95rem; }
input:not([type="file"], [type="checkbox"]) { color: var(--ink); background: white; width: 100%; min-height: 2.87rem; border-radius: .5rem; border: 1px solid #c9c6b9; margin-top: .35rem; padding: .53rem .72rem; }
input:disabled { opacity: .6; }
.checkbox { display: flex; gap: .4rem; align-items: center; min-height: 2.65rem; width: fit-content; }
.checkbox input { accent-color: var(--evergreen); }
input::placeholder { color: #666c62; opacity: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; }
.dates { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1rem; }
.playlist-field { margin-top: 1.25rem; }
.hint, .section-note { margin: .55rem 0 0; color: var(--muted); font-size: .93rem; }
.actions, .section-heading, .wish-tools { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.section-heading { justify-content: space-between; }
.section-heading > div { flex: 1 1 22rem; }
.gallery-actions { margin-top: 1rem; }
.button, button { min-height: 2.75rem; border-radius: .55rem; border: 1px solid transparent; padding: .55rem .85rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font-weight: 700; text-decoration: none; text-align: center; font-size: .94rem; line-height: 1.2; }
label.button { cursor: pointer; }
.primary { background: var(--rust); color: white; }
.primary:hover { background: var(--rust-hover); }
.secondary { background: #f0eee5; border-color: #dcd7cb; color: var(--evergreen); }
.secondary:hover { background: #e8e7db; }
button:disabled, .button.is-disabled { opacity: .59; cursor: default; }
.text-button { background: transparent; color: var(--evergreen); text-decoration: underline; text-underline-offset: .22em; }
.file-input { width: 1px; height: 1px; position: absolute; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gallery-actions:has(.file-input:focus-visible) label { outline: 2px solid var(--rust); outline-offset: 4px; }
.empty { color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: .6rem; padding: 1rem; margin: 1rem 0 0; }
.photo-list, .wish-list { list-style: none; padding: 0; margin: 0; }
.photo-entry, .wish-entry { display: flex; gap: .85rem; flex-wrap: wrap; align-items: center; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.photo-entry:last-child, .wish-entry:last-child { border-bottom: 0; padding-bottom: 0; }
.photo-fields { flex: 1 1 20rem; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.photo-preview { width: 4.9rem; height: 4.9rem; object-fit: cover; background: #eee9dd; border-radius: .45rem; }
.photo-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.photo-actions button { padding-inline: .65rem; }
.save-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .65rem; margin: .2rem 0 2rem; }
.save-bar .primary { margin-left: auto; }
.status { font-size: .91rem; color: var(--evergreen); margin: .55rem 0 0; }
.status:empty { margin: 0; }
.status[data-kind="error"], #signin-status[data-kind="error"] { color: var(--rust); }
.wish-tools { justify-content: space-between; margin-top: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter { background: transparent; color: var(--evergreen); border-color: var(--line); }
.filter[aria-pressed="true"] { color: white; background: var(--evergreen); border-color: var(--evergreen); }
.filter span { font-variant-numeric: tabular-nums; }
.wish-entry { justify-content: space-between; }
.wish-info { flex: 1 1 12rem; overflow-wrap: anywhere; }
.wish-info strong { display: block; color: var(--evergreen-dark); }
.wish-info time { color: var(--muted); font-size: .85rem; }
.wish-info p { margin: 0; }
.rsvp-answer { font-size: .91rem; font-weight: 740; color: var(--evergreen); }
.rsvp-answer[data-rsvp="no"] { color: var(--rust); }
.whatsapp-poll { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.35rem; }
.whatsapp-poll h3 { color: var(--evergreen); font: 500 1.4rem/1.2 Georgia, serif; margin: 0; }
.poll-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr)); align-items: start; gap: .65rem; margin-top: .9rem; }
.poll-group { min-width: 0; border: 1px solid var(--line); border-radius: .65rem; background: #fffefa; }
.poll-group summary { cursor: pointer; padding: .62rem .8rem; color: var(--evergreen); border-radius: .65rem; font-size: .95rem; font-weight: 700; }
.poll-count { display: inline-block; min-width: 1.5rem; margin-inline-start: .25rem; padding-inline: .35rem; border-radius: 1rem; background: #eaf0e9; text-align: center; font-variant-numeric: tabular-nums; }
.poll-group[data-answer="no"] .poll-count { color: var(--rust); background: #f7eae4; }
.poll-group[data-answer="maybe"] .poll-count { color: #664b18; background: #f4eedb; }
.poll-group ul { margin: 0; border-top: 1px solid var(--line); padding: .42rem .8rem .65rem; list-style: none; overflow-wrap: anywhere; }
.poll-group li { padding-block: .23rem; }
.poll-group li + li { border-top: 1px solid var(--line); }
@media (max-width: 42rem) {
  .dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 28rem) {
  main.wrap { padding-top: 1.9rem; }
  .form-grid, .dates, .photo-fields { grid-template-columns: 1fr; }
  .dashboard-intro { align-items: start; }
}
