:root {
  --bg: #7b4fd0;
  --card: #ffffff;
  --ink: #0d0b14;
  --muted: #6b6678;
  --line: #e4e0ee;
  --accent: #6a4fd0;
  --accent-dark: #4b33a8;
  --accent-soft: #f1ecff;
  --btn-bg: #0b0a14;
  --btn-ink: #b7a1ff;
  --ok: #2b8a3e;
  --ok-soft: #e8f6ea;
  --warn: #c76a00;
  --warn-soft: #fff4e0;
  --bad: #c92a2a;
  --bad-soft: #fdeaea;
  --radius: 14px;
  --serif: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; margin-top: 1.25rem; }
p { margin: 0 0 .75rem; }
code { background: #f1e8dc; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
pre { background: #f6efe6; padding: .9rem; border-radius: 10px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 0 0 .75rem; font-size: .9rem; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 22px; padding-bottom: 60px; }
.top { background: #2a1d14; color: #fff; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.top nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top nav a, .top nav .link { color: #f3e6d8; text-decoration: none; font-size: .95rem; }
.top nav a:hover, .top nav .link:hover { color: #fff; text-decoration: underline; }

.card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 18px; }
.card.narrow { max-width: 520px; }
.card.party { text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
.card.party:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(60, 30, 10, .1); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.cards .card { margin: 0; }
.party-title { display: block; font-family: var(--serif); font-size: 1.3rem; margin: 2px 0 4px; }
.party-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.hero { position: relative; display: flex; align-items: flex-end; min-height: 280px; background: linear-gradient(135deg, #2a1d14, #5a2a12) center / cover no-repeat; color: #fff; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.hero-in { width: 100%; padding: 34px 24px 22px; }
.hero h1 { margin: 2px 0 .25rem; font-size: clamp(2.1rem, 7vw, 3.6rem); text-shadow: 0 2px 14px rgba(0, 0, 0, .55); }
.hero .where { margin: 0; color: #fbeee2; font-size: 1.05rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.hero .hero-admin { margin: 10px 0 0; font-size: .85rem; }
.hero a { color: #ffd2b0; }
.infobar { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: 12px 16px; margin-bottom: 18px; }
.mygroup { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.small-note { font-size: .85rem; }
.eyebrow { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--accent); font-weight: 700; }
.hero .eyebrow { color: #ffb88a; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.muted { color: var(--muted); font-size: .92em; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

.tabs { display: flex; gap: 6px; margin: 0 0 18px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }
.count { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: .8rem; text-align: center; }

.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--accent-dark); }
.btn.small { padding: 7px 12px; font-size: .9rem; }
.btn.ghost { background: transparent; color: var(--accent-dark); border: 1.5px solid var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger-btn { background: var(--bad); }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-dark); cursor: pointer; text-decoration: underline; }
button.link.danger, .link.danger { color: var(--bad); }
.inline { display: inline; }

label { display: block; font-size: .9rem; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font: inherit; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.stack { display: grid; gap: 14px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.grid-form .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 6px 0; }
.check input { width: auto; margin: 0; }
fieldset { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px; }
legend { font-weight: 700; padding: 0 6px; font-size: .9rem; }
.access-list { max-height: 420px; overflow: auto; border: 1.5px solid var(--line); border-radius: 10px; padding: 6px 14px; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.flash.ok { background: var(--ok-soft); border-color: #b7e0bd; color: #1c5e29; }
.flash.error { background: var(--bad-soft); border-color: #f1b9b9; color: #8c1d1d; }
.flash.warn { background: var(--warn-soft); border-color: #f2d49a; color: #7a4400; }

.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: #f1e8dc; color: #5b4b3c; }
.chip.yes { background: var(--ok-soft); color: #1c5e29; }
.chip.maybe { background: var(--warn-soft); color: #7a4400; }
.chip.no { background: var(--bad-soft); color: #8c1d1d; }
.chip.gap { background: var(--warn-soft); color: #7a4400; }
.names { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.t-ok { color: var(--ok); } .t-warn { color: var(--warn); } .t-bad { color: var(--bad); }

.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; }
.seg-opt span { display: block; padding: 10px 18px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600; background: #fff; }
.seg-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.inline-label { max-width: 220px; margin-bottom: 14px; }

.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.glance-item { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; }
.glance-item strong { font-size: .9rem; }
.glance-item span { color: var(--ok); font-size: .9rem; font-weight: 600; }
.glance-item.gap { background: var(--warn-soft); border-color: #f2d49a; }
.glance-item.gap span { color: var(--warn); }

.need { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; }
.need-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 8px; }
.bar { }
.need .bar { height: 8px; background: #f1e8dc; border-radius: 99px; overflow: hidden; }
.need .bar span { display: block; height: 100%; background: var(--warn); border-radius: 99px; }
.need.covered .bar span { background: var(--ok); }
.need.surplus .bar span { background: #1971c2; }
.need-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: .9rem; }
.need .status { font-weight: 700; color: var(--warn); }
.need.covered .status { color: var(--ok); }
.need.surplus .status { color: #1971c2; }
.claim { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.claim input[type=text] { width: 130px; margin: 0; }
.admin-del { margin-top: 6px; font-size: .85rem; }
.admin-box { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.admin-box summary { cursor: pointer; font-weight: 700; color: var(--accent-dark); margin-bottom: 10px; }

.mine { list-style: none; padding: 0; margin: 0; }
.mine li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mine li > div { flex: 1 1 220px; }
.inline-edit { display: flex; align-items: center; gap: 8px; }
.inline-edit input[type=text] { width: 86px; margin: 0; }

table.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.list th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line); }
table.list td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.num { text-align: right; white-space: nowrap; }
td.actions { white-space: normal; }
.card:has(table.list) { overflow-x: auto; }

.dropzone { border: 2px dashed #d8c3ad; border-radius: var(--radius); padding: 26px 16px; text-align: center; background: #fffaf4; }
.dropzone.over { background: var(--accent-soft); border-color: var(--accent); }
.upload-list { margin-top: 12px; display: grid; gap: 8px; }
.up { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.up .prog { height: 5px; background: #f1e8dc; border-radius: 99px; margin-top: 6px; overflow: hidden; }
.up .prog span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.up.done .prog span { background: var(--ok); width: 100% !important; }
.up.err { background: var(--bad-soft); border-color: #f1b9b9; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ph { margin: 0; position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.ph-link { display: block; aspect-ratio: 1; background: #f1e8dc; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-sel { display: flex; align-items: center; gap: 6px; line-height: 1.2; cursor: pointer; }
.ph-sel input { width: 16px; height: 16px; margin: 0; flex: none; }
.ph figcaption { padding: 6px 8px; font-size: .8rem; display: grid; gap: 2px; }
.ph-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.lightbox { position: fixed; inset: 0; background: rgba(15, 8, 3, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 6px; }
.lightbox .lb-bar { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lightbox .lb-bar button, .lightbox .lb-bar a { background: #fff; color: #222; border: 0; border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer; text-decoration: none; }

.checks { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 4px; font-size: .92rem; }
.checks .ok { color: var(--ok); } .checks .bad { color: var(--bad); font-weight: 700; }
.danger-zone { border-color: #f1b9b9; }

@media (max-width: 560px) {
  h1 { font-size: 1.6rem; }
  .card { padding: 16px; }
  .claim input[type=text] { width: 100%; }
}
@media print {
  .top, .tabs, .hero, .no-print, .card:not(#fulllist) { display: none !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
}

/* ---- v2: pop-ups, group details, comments, cover ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chip-sub { font-weight: 500; opacity: .8; margin-left: 4px; }

dialog.modal { border: 0; padding: 0; border-radius: var(--radius); width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 32px); color: var(--ink); background: var(--card); box-shadow: 0 24px 70px rgba(0, 0, 0, .4); }
dialog.modal::backdrop { background: rgba(20, 10, 4, .62); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; }
.modal-x { background: none; border: 0; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.modal-x:hover { color: var(--ink); }
.modal-body { padding: 18px 20px 20px; overflow-y: auto; max-height: calc(100vh - 120px); }

.facts { margin: 0 0 14px; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; margin-top: 14px; }
.facts dd { margin: 2px 0 0; }

.rsvp-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.rsvp-fields .wide { grid-column: 1 / -1; }


.allergies { margin: 0 0 12px; padding-left: 1.2rem; }
.allergies li { margin: 4px 0; }

.thread { padding: 16px 20px; }
.post { padding: 4px 0; }
.post-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.post-body { margin: 4px 0 6px; overflow-wrap: anywhere; }
.post-del { display: inline; font-size: .85rem; }
.replies { margin: 10px 0 6px 6px; padding-left: 14px; border-left: 3px solid var(--line); }
.post.reply { padding: 6px 0; }
.reply-box { margin-top: 10px; }
.reply-box summary { cursor: pointer; font-weight: 700; color: var(--accent-dark); }
.reply-box form { margin-top: 10px; }
textarea { resize: vertical; }

.cover-admin { border: 1.5px dashed var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.cover-admin p { margin: 0; }
.cover-prev { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; }
.cover-admin input[type=file] { margin-top: 6px; }

@media (max-width: 560px) {
  .hero { min-height: 220px; }
  .hero-in { padding: 24px 16px 16px; }
}
@media print {
  dialog { display: none !important; }
  .infobar { display: none !important; }
}

/* ---- v3: invitations, guest list ---- */
.crumbs { margin: 0 0 10px; font-size: .92rem; }
.chip.master { background: #e7f0ff; color: #1b4a9c; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.big { padding: 14px 26px; font-size: 1.05rem; }
.btn.wa { background: #1f9d55; }
.btn.wa:hover { background: #17803f; }

.invite-card { max-width: 720px; margin: 0 auto 24px; padding: 24px; }
.invite-card h2 { font-size: 1.6rem; }
.invite-card .row { gap: 12px; margin: 18px 0 8px; }
.userbox { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; }
.narrow-form { max-width: 380px; margin-top: 14px; }
.hero + .invite-card { margin-top: 18px; }

.table-scroll { overflow-x: auto; }
.gtable { min-width: 860px; }
.gtable td { vertical-align: middle; }
.gtable input[type=text], .gtable input[type=email], .gtable input[type=number] { margin: 0; padding: 7px 9px; font-size: .92rem; }
.gtable input[readonly] { background: #f6efe6; color: var(--muted); }
.gtable .num-in { width: 70px; }
.row-actions form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row-actions .btn.small { padding: 6px 10px; font-size: .85rem; }

.gtable td:first-child input { min-width: 160px; }
.gtable td:nth-child(4) input { min-width: 190px; }

.sharebox { white-space: pre-wrap; background: #f6efe6; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font: inherit; margin: 0 0 12px; }
.invite-card h3 { margin: 22px 0 4px; }
.gtable td:nth-child(3) input { min-width: 150px; }
.gtable td.actions .link { white-space: nowrap; display: block; text-align: left; padding: 3px 0; }

.topright { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.langs { display: flex; gap: 2px; font-size: .8rem; font-weight: 700; }
.langs a { color: #d9c8b6; text-decoration: none; padding: 3px 8px; border-radius: 6px; }
.langs a.on { background: rgba(255, 255, 255, .16); color: #fff; }
.langs a:hover { color: #fff; }

/* ---- v4: design refresh (animated gradient page, white cards, black buttons with purple text) ---- */
html {
  min-height: 100%;
  background: #8a52cf linear-gradient(120deg, #c457c4, #9a53cf, #6a58d6, #b04fc6, #7357d8);
  background-size: 400% 400%;
  background-attachment: fixed;
  animation: bgflow 22s ease-in-out infinite;
}
body { background: transparent; min-height: 100vh; }
@keyframes bgflow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@media (prefers-reduced-motion: reduce) { html { animation: none; } }
.top { background: #0b0a14; }
.brand { color: #e9e3ff; }
.top nav a, .top nav .link { color: #b7a1ff; }
.top nav a:hover, .top nav .link:hover { color: #fff; }
.langs a { color: #b7a1ff; }
.langs a.on { background: rgba(183, 161, 255, .2); color: #fff; }
main.wrap > h1, main.wrap > .crumbs, main.wrap > .crumbs a, .subhead h1, .subhead a { color: #fff; }
.crumbs { color: #fff; }

.btn { background: var(--btn-bg); color: var(--btn-ink); font-weight: 600; letter-spacing: .01em; border: 1.5px solid var(--btn-bg); }
.btn:hover { background: #1b1830; color: #d5c8ff; }
.btn.ghost { background: #fff; color: var(--btn-bg); border: 1.5px solid var(--btn-bg); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.wa { background: #0b0a14; color: #7be2a0; border-color: #0b0a14; }
.btn.wa:hover { background: #1b1830; }
.btn.danger-btn { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn .count { background: rgba(183, 161, 255, .22); color: #d5c8ff; }
.count { background: var(--accent-soft); color: var(--accent-dark); }
.eyebrow, .facts dt { color: var(--accent); }
.hero { background: linear-gradient(135deg, #0b0a14, #4b33a8) center / cover no-repeat; }
.hero .eyebrow { color: #d5c8ff; }
.hero .where { color: #efeaff; }
.hero a { color: #d5c8ff; }
.hero { border-radius: var(--radius) var(--radius) 0 0; }
.hero-in { padding-top: 70px; }
.infobar { background: #fff; }
.chip { background: #efeaf8; color: #3d3556; }
.chip.master { background: #e8e3ff; color: #3a2a94; }
code { background: #f0ecf8; }
pre, .sharebox { background: #f4f1fa; }
.userbox { background: var(--accent-soft); }
.seg-opt input:checked + span { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.seg-opt input:focus-visible + span, input:focus, select:focus, textarea:focus { outline-color: var(--accent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.need .bar, .up .prog { background: #ebe7f4; }
.up .prog span { background: var(--accent); }
.dropzone { background: #faf8ff; border-color: #cfc5ea; }
.dropzone.over { background: var(--accent-soft); border-color: var(--accent); }
.ph-link { background: #ebe7f4; }
.gtable input[readonly] { background: #f4f1fa; }
dialog.modal::backdrop { background: rgba(11, 10, 20, .7); }
.card.party:hover { box-shadow: 0 6px 18px rgba(40, 20, 90, .18); }
.admin-box summary, .reply-box summary { color: var(--accent-dark); }
a { color: var(--accent-dark); }

.subhead { margin: 0 0 16px; }
.subhead h1 { margin: 6px 0 0; }
.backlink { display: inline-block; text-decoration: none; font-weight: 600; padding: 4px 0; }
.backlink:hover { text-decoration: underline; }
.viewer { background: #faf9fd; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; max-height: 7.6em; overflow: hidden; }
.viewer p { margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.viewer p:last-child { margin: 0; }
.menu { display: grid; gap: 12px; margin: 0 0 18px; }
.menu .btn.big { display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 16px 20px; font-size: 1.1rem; }
.infobar { margin-bottom: 18px; }
.need .bar { display: block; min-height: 0; height: 8px; padding: 0; margin: 0; }

/* tabs sit on the gradient: white text */
.tabs { border-bottom-color: rgba(255, 255, 255, .45); }
.tabs a { color: #fff; opacity: .85; }
.tabs a:hover { opacity: 1; }
.tabs a.active { color: #fff; opacity: 1; border-bottom-color: #fff; }
.tabs .count { background: rgba(255, 255, 255, .25); color: #fff; }
.gtable { min-width: 1020px; }
.gtable td .link { white-space: nowrap; }

.gperson { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; margin: 12px 0; }
.gp-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.gperson .grid-form { margin-bottom: 10px; }

/* group members in the attendance pop-up: one line per person on wide screens, text links instead of buttons */
dialog.modal.wide { width: min(1180px, calc(100vw - 24px)); }
.prow { display: grid; grid-template-columns: minmax(110px, 1.1fr) 100px minmax(120px, 1.3fr) minmax(100px, 1fr) minmax(100px, 1fr) auto; gap: 10px; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--line); align-items: end; }
.prow label { font-size: .82rem; }
.prow label { display: flex; flex-direction: column; justify-content: flex-end; }
.prow input, .prow select { margin-top: 3px; padding: 0 10px; height: 40px; box-sizing: border-box; width: 100%; }
.prow .pf-state { grid-column: 1 / -1; margin: 0; }
.pf-btns { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 4px 16px; align-items: center; height: 40px; font-size: .88rem; white-space: nowrap; }
button.link.share { color: #5b3fd0; }
button.link.share.wa { color: #1f8a4c; }
@media (max-width: 1240px) { .prow { grid-template-columns: minmax(110px, 1.2fr) 100px minmax(120px, 1.3fr) minmax(100px, 1fr) minmax(100px, 1fr); } .pf-btns { grid-column: 1 / -1; flex-wrap: wrap; height: auto; } }
@media (max-width: 960px) { .prow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .prow { grid-template-columns: 1fr; } }

/* category tabs (accordion) */
.acc-item { border: 1.5px solid var(--line); border-radius: 12px; margin: 8px 0; overflow: hidden; }
.acc-head { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; background: #faf9fd; border: 0; padding: 12px 16px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.acc-head { justify-content: flex-start; }
.acc-head::before { content: "\25B6"; color: var(--accent-dark); font-size: .6em; transition: transform .15s; margin-right: 2px; }
.acc-head .count { margin-left: 0; }
.acc-item.open > .acc-head { background: var(--accent-soft); }
.acc-item.open > .acc-head::before { transform: rotate(90deg); }
.acc-body { display: none; padding: 4px 14px 12px; }
.acc-item.open > .acc-body { display: block; }
@media print { .acc-body { display: block !important; } }

/* compact needs rows: status, short bar, who, and "I bring" on one line */
.need { padding: 10px 14px; margin: 8px 0; }
.need-head { margin-bottom: 4px; }
.need-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.need-line .bar { flex: 0 0 110px; width: 110px; }
.need-line .status { white-space: nowrap; }
.need-line .who { flex: 1 1 120px; min-width: 0; }
.need-line form.claim { display: flex; align-items: center; gap: 8px; margin: 0; flex-wrap: nowrap; }
.need-line form.claim label { margin: 0; white-space: nowrap; font-weight: 600; }
.need-line form.claim input[type=text] { width: 104px; margin: 0; padding: 7px 10px; }
.need-line .admin-del { margin: 0; }

/* organiser note: about 4 lines visible, scroll for the rest */
.viewer.note-view { max-height: 6.6em; overflow-y: auto; white-space: normal; line-height: 1.55; margin: 0; }
.viewer.note-view:focus { outline: 2px solid var(--accent); }

/* print "my list" (shopping list): only that card */
.print-only { display: none; }
@media print {
  .print-only { display: block; margin: 0 0 8px; }
  body.print-mine .card#mylist { display: block !important; }
  body.print-mine #fulllist { display: none !important; }
  body.print-mine .mine li form { display: none; }
}
@media print { .print-only.inline-qty { display: inline; font-weight: 700; } }
@media print {
  html, body { background: #fff !important; animation: none !important; }
  .subhead, .top { display: none !important; }
  .card { box-shadow: none; border: 0; border-radius: 0; }
}

.nowrap { white-space: nowrap; }
.ptable td, .ptable th { padding-left: 6px; padding-right: 6px; }
.ptable th { font-size: .72rem; }
td.actions.nowrap { white-space: nowrap; }
.ptable td.actions { font-size: .88rem; }
.ptable th, .ptable td { padding-left: 4px; padding-right: 4px; }

.gtable .num-in { width: 52px; text-align: center; }
.gtable td:nth-child(2) { width: 64px; }
.gtable { min-width: 0; width: 100%; }
.gtable td:first-child input { min-width: 140px; }
.gtable td:nth-child(3) input { min-width: 140px; }
.gtable td:nth-child(4) input { min-width: 200px; }

.ccomment { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ccomment:last-child { border-bottom: 0; }
.ccomment form { display: inline; margin-left: 8px; }
.need-edit input[type=text] { width: 64px; }

.photo-view { text-align: center; }
.pv-img { max-width: 100%; max-height: 78vh; border-radius: 10px; }
.pv-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; text-align: left; }
.pv-actions { display: flex; gap: 14px; align-items: center; }
.pcomment { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pcomment .inline-form { display: inline; margin-left: 8px; }
.preply { margin-left: 26px; border-left: 3px solid var(--accent-soft); padding-left: 12px; }
.preply .pcomment { border-bottom: 0; }

.muted-nav { color: #cfc4f0; }
.qr-card { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.qr-box { background: #fff; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; line-height: 0; }
.qr-box svg, .qr-box img { width: 170px; height: 170px; }
.qr-side { flex: 1 1 260px; }
.qr-side .btns { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 10px; }
.album-join { max-width: 460px; margin: 30px auto; text-align: center; }
.album-join input[type=text] { font-size: 1.1rem; text-align: center; }
.qr-print { text-align: center; background: #fff; color: #000; padding: 40px 20px; border-radius: 16px; }
.qr-print .qr-big svg { width: min(78vw, 460px); height: auto; }
.qr-print h1 { color: #000 !important; font-size: 2.2rem; margin: 0 0 6px; }
.qr-print p { color: #222; font-size: 1.2rem; }
@media print {
  body.qr-page header.top, body.qr-page .no-print, body.qr-page .flash { display: none !important; }
  body.qr-page { background: #fff !important; }
  body.qr-page main.wrap { padding: 0; max-width: none; }
  .qr-print { padding: 0; }
}

.site-foot { padding: 22px 0 28px; text-align: center; font-size: .75rem; color: rgba(255,255,255,.72); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 4px 6px; justify-content: center; align-items: center; }
.site-foot img { height: 15px; width: auto; display: inline-block; vertical-align: middle; opacity: .95; }
.site-foot a { color: rgba(255,255,255,.85); text-decoration: underline; text-underline-offset: 2px; }
@media print { .site-foot { display: none; } }

.viewer.note-view.music-list { max-height: 18em; }
.music-list a { word-break: break-all; }

.playlist-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.playlist-row:last-of-type { border-bottom: 0; }
.pl-info { flex: 1 1 260px; }
.pl-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.pl-actions .inline-form { display: inline; }
