/* Supper Club surfaces stay light enough for dark text, even over dark artwork. */
:root {
  --coal: #402334;
  --chalk: #fff9e9;
  --lime: #f5d17c;
  --lilac: #f2d9a5;
  --gallery: #faebcd;
  --plum: #772d33;
  --muted: #614950;
  --rule: #c3a995;
  --paper: #fffaf0;
  --clay: #a72e26;
  --font: "Trebuchet MS", Arial, sans-serif;
  --display: Georgia, Cambria, serif;
}
body { background: #fff1d6; isolation: isolate; }
body {
  --daylight: radial-gradient(ellipse at 86% 32%, var(--wash-strong, #f5c5a5) 0%, var(--wash-mid, #ffe1b8) 20%, transparent 49%),
    radial-gradient(ellipse at 20% 64%, var(--wash-second, #ffedc1) 0%, transparent 54%),
    linear-gradient(128deg, #fffaee 12%, var(--wash-paper, #ffedce) 59%, var(--wash-end, #f5d3c3));
}
body[data-artwork-background] {
  --wash-strong: color-mix(in srgb, var(--art-main) 53%, white);
  --wash-mid: color-mix(in srgb, var(--art-main) 38%, #fffaf2);
  --wash-second: color-mix(in srgb, var(--art-second) 38%, #fffaf2);
  --wash-paper: color-mix(in srgb, var(--art-main) 11%, #fffcf5);
  --wash-end: color-mix(in srgb, var(--art-second) 24%, #fffaf2);
}
body::before {
  content: ""; position: fixed; inset: -18%; z-index: -1; pointer-events: none;
  background: var(--daylight);
}
body[data-artwork-background] :is(#sheet, .invite-dialog)[open]:has(.letter-cover, .invite-card) {
  background: var(--daylight);
}
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: supper-daylight 16s ease-in-out -5s infinite alternate; }
  body[data-artwork-background] :is(#sheet, .invite-dialog)[open]:has(.letter-cover, .invite-card) {
    background-size: 145% 125%;
    animation: supper-dialog-light 16s ease-in-out -5s infinite alternate;
  }
  @keyframes supper-dialog-light {
    from { background-position: 5% 10%; }
    to { background-position: 95% 85%; }
  }
  @keyframes supper-daylight {
    from { transform: translate(-5%, -2%) rotate(-2deg); }
    to   { transform: translate(6%, 4%) rotate(3deg); }
  }
}
.app-header, .land-nav {
  width: min(calc(100% - 2rem), 78rem);
  margin: clamp(.65rem, 1.5vw, 1.25rem) auto 0;
  padding: .35rem clamp(1rem, 2.5vw, 2.25rem);
  min-height: 4.4rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  background: var(--paper);
  box-shadow: var(--surface-shadow);
}
#nav { gap: .2rem; }
.nav-link {
  justify-content: center;
  padding-inline: clamp(.85rem, 1.7vw, 1.45rem);
  border-radius: var(--radius-pill);
}
.nav-link:hover { background: #f8eddc; text-decoration: none; }
.app-header .nav-link[aria-current] {
  background: #f7dfcf;
  color: #7f2b29;
  text-decoration: none;
  font-weight: 750;
}
@media (max-width: 740px) {
  .app-header { border-radius: var(--radius-dialog); padding: .35rem .7rem .55rem; row-gap: .15rem; }
  .app-brand { padding-inline: .45rem; }
  #nav { width: 100%; }
  .nav-link { flex: 1; }
}
.shell #main { padding-top: clamp(1.5rem, 4vw, 3.75rem); }
.directory-page { max-width: 66rem; }
.directory-heading { border-bottom: 1px solid var(--rule); padding-bottom: 1.3rem; }
.directory-heading h1, .card-library h1, .plans-page > header h1 {
  text-transform: none; font: 400 clamp(3rem, 6.3vw, 5.7rem)/.99 var(--serif);
  letter-spacing: -.06em; word-spacing: normal;
}
.directory-heading .directory-action { color: #762d30; }
.button { border-radius: var(--radius-pill); }
.button:hover { background: #fae5b9; }
.button.primary, .button.primary:hover {
  color: #fff8e5; background: #a52d27; border-color: #a52d27;
}
.button.primary:hover { background: #87251f; }
.directory-heading .primary .icon { box-sizing: content-box; padding-right: .6rem; border-right: 1px dashed #f6d2bc; }
.directory-action:focus-visible, .group-row:focus-visible, .event-row:focus-visible { outline-offset: 2px; }
.directory-page .address-tools { border-radius: var(--radius-card) var(--radius-card) 0 0; background: #faeacd; padding: .65rem clamp(.7rem, 2vw, 1.35rem); border: 1px solid var(--rule); }
.address-tools [data-total] { font: 700 .83rem var(--font); }
.directory-page .address-section { background: var(--paper); grid-template-columns: 3.2rem minmax(0,1fr); gap: 1.2rem; padding: 0 1.2rem 0 0; border: 1px solid var(--rule); border-top: 0; }
.directory-page .address-section:last-child { border-radius: 0 0 var(--radius-card) var(--radius-card); }
.address-section h2 {
  margin: .85rem 0 auto; text-align: center; padding: .35rem .5rem .4rem;
  font: italic 1.7rem/1.05 var(--serif); color: #812e2c; border: 1px solid #cba985;
  border-left: 0; border-radius: 0 .65rem .65rem 0; background: #fae3ae;
}
.address-entry summary strong { font: 700 1.13rem var(--serif); }
.address-entry { border-radius: var(--radius-control); }
.address-entry:has(.contact-select input:checked) { background: #f9e9d3; }
.contact-select input { accent-color: #a52d27; }
.address-entry + .address-entry { border-top-style: dashed; }
.directory-page .group-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr)); gap: 1.35rem; border: 0; }
.directory-page .group-list li { border: 1px solid var(--rule); border-radius: var(--radius-card); background: var(--paper); box-shadow: var(--surface-shadow); }
.group-list .group-row {
  height: 100%; border-radius: inherit; display: grid; grid-template: auto 1fr auto / 1fr auto; gap: 0 .5rem; padding: .55rem;
}
.group-list .group-row .cover-band { grid-area: 1 / 1 / 2 / -1; width: 100%; height: clamp(7rem,12vw,10rem); border: 1px solid #825b4b44; border-radius: calc(var(--radius-card) - .55rem); }
.group-list .cover-band .letter-stamp { width: 3.25rem; height: 3.65rem; }
.group-list .cover-band .letter-stamp .icon { width: 1.8rem; height: 1.8rem; }
.group-list .group-name { grid-area: 2 / 1 / 3 / -1; padding: 1rem .4rem .65rem; font: 700 clamp(1.4rem,2.5vw,2.05rem)/1.08 var(--serif); letter-spacing: -.04em; }
.group-list .group-status { grid-area: 3 / 1 / 4 / -1; border-top: 1px dashed var(--rule); padding: .6rem 1.5rem .25rem .4rem; }
.group-list a.group-row::after { grid-area: 3 / 2; margin: .3rem .6rem 0 0; }
.directory-page .event-section h2 { font: italic 1.5rem var(--serif); }
.directory-page .event-section li { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-card); box-shadow: var(--surface-shadow); margin-bottom: .85rem; }
.directory-page .event-row { border-radius: inherit; padding: 0 .95rem 0 0; gap: 1.2rem; grid-template-columns: 5.4rem minmax(0,1fr) .5rem; min-height: 6.2rem; }
.directory-page .event-date, .directory-page .event-undated {
  display: grid; height: 100%; align-content: center; justify-items: center; background: #f8e3ae;
  color: #6f292c; border-right: 1px dashed #b99a7d; border-radius: var(--radius-card) 0 0 var(--radius-card);
}
.directory-page .event-date strong { font: 400 2.25rem/.98 var(--serif); }
.directory-page .event-date span { font: 700 .8rem var(--font); text-transform: uppercase; letter-spacing: .08em; }
.directory-page .event-copy { padding-block: .75rem; gap: .18rem; }
.directory-page .event-copy strong { font: 700 clamp(1.2rem,2.2vw,1.7rem)/1.15 var(--serif); letter-spacing: -.035em; }
.directory-page a.group-row:hover, .directory-page a.event-row:hover { background: #fff0d0; }
.directory-empty, .people-group > section, .people-group .roundup-hats, .detail-invitation > .panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: clamp(1.1rem, 3vw, 2rem);
  box-shadow: var(--surface-shadow);
}
.people-group > section, .people-group .roundup-hats { margin-block: 1rem; }
.directory-empty { padding-block: clamp(1.6rem, 4vw, 3rem); }
.plans-page > .panel { background: var(--paper); }
.sheet-head .button { border-radius: 50%; min-width: 44px; }
@media (max-width: 600px) {
  .shell #main { padding-inline: 1rem; }
  .directory-heading { gap: .8rem; margin-bottom: 1.2rem; }
  .directory-page .address-section { grid-template-columns: 2rem minmax(0,1fr); gap: .65rem; padding-right: .35rem; }
  .address-section h2 { font-size: 1.35rem; }
  .directory-page .group-list { gap: .85rem; }
  .directory-page .event-row { grid-template-columns: 3.8rem minmax(0,1fr) .4rem; gap: .75rem; }
}
@media (max-width: 440px) {
  .address-tools { display: grid; grid-template-columns: 1fr auto; }
  .address-tools .actions { display: contents; }
  .address-tools [data-everyone] { grid-column: 1 / -1; justify-self: start; }
}
