/* Calm interface, colourful cover. One accent; black buttons. No inline
   styles anywhere: the CSP allows only this file. */
:root {
  --bg: #fafaf8; --card: #fff; --fg: #161616; --muted: #6b6b6b; --line: #e8e7e3;
  --field: #d6d5d0; --soft: #f4f3ef; --accent: #c8351f; --danger: #b3261e; --danger-fg: #fff;
  --btn: #161616; --btn-fg: #fff; --btn-hover: #000;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141413; --card: #1c1c1a; --fg: #f1f0ec; --muted: #a3a29c; --line: #2e2d2a;
    --field: #4a4945; --soft: #232320; --accent: #ff6a52; --danger: #ff8a80; --danger-fg: #141413;
    --btn: #f1f0ec; --btn-fg: #141413; --btn-hover: #fff; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

/* Frame */
.top, main, .foot { max-width: 66rem; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main.narrow { max-width: 36rem; }
.top { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; text-decoration: none; margin-right: auto; }
/* The wordmark: "Fest" circled in red pen, as a date in a calendar. */
.brand .fest { position: relative; display: inline-block; }
.brand .fest::after { content: ""; position: absolute; left: -0.5em; right: -0.42em; top: -0.55em; bottom: -0.5em;
  background: url(/static/loop.svg) no-repeat center / 100% 100%; pointer-events: none; }
.top { padding-top: 18px; }
.top .my { font-size: .95rem; text-decoration: none; padding: 10px 0; }
.lang { display: flex; }
.lang button { background: none; border: 0; color: var(--muted); font: inherit; font-size: .9rem; padding: 10px 6px; min-height: 44px; cursor: pointer; }
.lang button[aria-current], .lang a[aria-current] { color: var(--fg); font-weight: 600; }
.lang a { color: var(--muted); font-size: .9rem; padding: 10px 6px; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.guide h1 { margin-top: 0; }
.guide table { border-collapse: collapse; margin: 16px 0; max-width: 100%; display: block; overflow-x: auto; }
.guide th, .guide td { border-bottom: 1px solid var(--soft); padding: 6px 10px; text-align: left; }
.guide .byline { color: var(--muted); font-size: .9rem; }
.guide-cta { margin: 24px 0; }
.guide-list { padding-left: 1.1rem; }
.foot { color: var(--muted); font-size: .85rem; padding-top: 32px; padding-bottom: 40px; text-align: center; }
.foot a { color: var(--muted); }

/* Type */
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.1; letter-spacing: -0.025em; margin: 28px 0 14px; overflow-wrap: anywhere; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 20px 0 8px; }
.lead { color: var(--muted); font-size: 1.1rem; }
.opbar { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: space-between; padding: 6px 16px; background: var(--btn); color: var(--btn-fg); font-size: .82rem; }
.opbar p { margin: 0; }
.opbar button { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.hint { color: var(--muted); font-size: .88rem; margin: 4px 0 14px; }
.welcome { color: var(--fg); font-size: 1.15rem; font-weight: 600; margin: 8px 0 16px; }
.error { color: var(--danger); margin: -6px 0 0; font-size: .9rem; }
.warning { border-left: 3px solid var(--accent); padding: 8px 12px; margin: 8px 0 14px; overflow-wrap: anywhere; }
.note { white-space: pre-wrap; overflow-wrap: anywhere; }
address { font-style: normal; margin: 8px 0 16px; }

/* Controls */
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: .92rem; font-weight: 600; }
input, textarea, select { font: inherit; font-weight: 400; color: var(--fg); background: var(--card); border: 1px solid var(--field);
  border-radius: 12px; padding: 12px 14px; width: 100%; min-width: 0; min-height: 48px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--fg); outline-offset: -1px; }
input[readonly] { background: var(--soft); font-size: .9rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--btn); color: var(--btn-fg);
  border: 1px solid var(--btn); border-radius: 12px; padding: 12px 22px; font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer; min-height: 52px; text-align: center; }
.button:hover { background: var(--btn-hover); color: var(--btn-fg); }
.button.secondary { background: var(--card); color: var(--fg); border-color: var(--field); }
.button.secondary:hover { border-color: var(--fg); color: var(--fg); }
.button.danger { background: var(--danger); border-color: var(--danger); color: var(--danger-fg); }
.button.small { min-height: 44px; padding: 8px 16px; font-size: .95rem; }
.button.wide { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--fg); font: inherit; font-size: .92rem; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.link:hover { color: var(--accent); }
.inline { display: inline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.js-only { display: none; }
.js .js-only { display: inline-flex; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.row input { flex: 1 1 11rem; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .95rem; }
.choice input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--fg); }
details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
details > summary { list-style: none; text-decoration: underline; text-underline-offset: 3px; font-size: .95rem; }
details > summary::-webkit-details-marker { display: none; }

/* Cards and lists */
.card, .panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.panel { margin: 24px 0; }
.card.main { border-color: var(--fg); }
.items, .guests, .events { list-style: none; padding: 0; margin: 0 0 12px; }
.items li, .guests li, .events li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.items li:first-child, .guests li:first-child, .events li:first-child { border-top: 0; }
.items .what, .guests .who { flex: 1 1 6rem; overflow-wrap: anywhere; }
.items .free .what::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: middle; }
.items .answer, .guests .answer, .guests .diet, .plus, .items .price { color: var(--muted); font-size: .92rem; }
.items .empty { color: var(--muted); }
.items details, .guests details { flex-basis: 100%; }
.items .stack input { margin-bottom: 4px; }
.items a { overflow-wrap: anywhere; }
.guests .declined .who { color: var(--muted); }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--soft); font-weight: 600; font-size: .9rem; }
.guests .host .avatar { background: var(--fg); color: var(--bg); }
img.avatar { background: none; object-fit: cover; }
.avatars { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.avatars legend { padding: 0; margin-bottom: 6px; }
.avatar-choice { position: relative; cursor: pointer; }
.avatar-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.avatar-choice .avatar { outline-offset: 2px; }
.avatar-choice input:checked + .avatar { outline: 3px solid var(--fg); }
.avatar-choice input:focus-visible + .avatar { outline: 3px solid var(--accent); }
.badge { font-size: .8rem; color: var(--muted); }
.events a { font-weight: 600; overflow-wrap: anywhere; flex: 1 1 100%; }
.events .past a { font-weight: 400; color: var(--muted); }
.shares ul { list-style: none; padding: 0; margin: 4px 0; font-size: .9rem; color: var(--muted); }
.transfers .note { flex-basis: 100%; font-size: .9rem; }
section > h2 + .items { margin-top: 10px; }

/* Party page */
.cover { position: relative; overflow: hidden; border-radius: 20px; margin: 8px 0 0; padding: 124px 24px 28px;
  min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--c-bg); color: var(--c-fg); }
.cover > * { position: relative; }
.cover .when { margin: 0 0 10px; font-size: .9rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.cover h1 { margin: 0; font-size: clamp(2.1rem, 7vw, 4rem); line-height: 1.02; letter-spacing: -0.03em; font-weight: 800; }
/* A picture fills the cover under a flat tint of the theme colour, so the
   text on it keeps its contrast; the shapes would only fight with it. */
.cover > .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover > .tint { position: absolute; inset: 0; background: var(--c-bg); opacity: .72; }
.has-photo .shapes { display: none; }
.cover-form input[type="file"] { max-width: 100%; }
.cover-form input[aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; }
.shapes { position: absolute; inset: 0; pointer-events: none; }
.shapes i { position: absolute; display: block; border-radius: 999px; }
/* Shapes stay in a band above the text, so they never cover it. */
.shapes i:nth-child(1) { width: 64px; height: 64px; right: 8%; top: 18px; background: var(--c1); }
.shapes i:nth-child(2) { width: 16px; height: 42px; right: 30%; top: 16px; background: var(--c2); transform: rotate(30deg); }
.shapes i:nth-child(3) { width: 18px; height: 18px; right: 3%; top: 92px; background: var(--c3); }
.shapes i:nth-child(4) { width: 12px; height: 12px; right: 44%; top: 40px; background: var(--c3); }
.shapes i:nth-child(5) { width: 40px; height: 14px; right: 20%; top: 72px; background: var(--c1); }
.shapes i:nth-child(6) { width: 34px; height: 34px; left: 24px; top: 22px; background: var(--c2); }
.theme-tomato { --c-bg: #d63a26; --c-fg: #fff; --c1: #ff8a6b; --c2: #ffc531; --c3: #fff; }
.theme-sun { --c-bg: #ffc531; --c-fg: #161616; --c1: #ffe07a; --c2: #e8432e; --c3: #161616; }
.theme-forest { --c-bg: #1f5c46; --c-fg: #fff; --c1: #2e7a5e; --c2: #f2c94c; --c3: #a8e6c6; }
.theme-night { --c-bg: #17203b; --c-fg: #fff; --c1: #2a3660; --c2: #f2c94c; --c3: #ff8a6b; }
.theme-sky { --c-bg: #2a62cc; --c-fg: #fff; --c1: #5c8ff0; --c2: #ffc531; --c3: #fff; }
.theme-pistachio { --c-bg: #bfe08f; --c-fg: #161616; --c1: #d7edb5; --c2: #1f5c46; --c3: #e8432e; }
.party-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-top: 20px; }
.party-main { flex: 999 1 34rem; min-width: 0; display: grid; gap: 20px; }
.party-side { flex: 1 1 17rem; min-width: 0; display: grid; gap: 20px; }
.party-main > .panel, .party-side > .panel { margin: 0; }
@media (max-width: 52rem) {
  /* On a phone the guest list follows the reply, not the end of the page. */
  .party-grid { display: grid; }
  .party-main { display: contents; }
  .party-main > * { order: 3; }
  .party-side { order: 2; }
}

/* Theme picker */
.swatch { position: relative; display: block; width: 56px; height: 56px; border-radius: 14px; cursor: pointer; background: var(--c-bg); border: 1px solid var(--line); }
.swatch:has(input:checked) { outline: 3px solid var(--fg); outline-offset: 2px; }

/* Landing */
.hero { padding: 48px 0 56px; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 5.2rem); line-height: 1; letter-spacing: -0.035em; margin: 0; max-width: 14ch; }
.hero .lead { margin: 24px 0 32px; max-width: 34rem; font-size: clamp(1.1rem, 2.4vw, 1.35rem); }
.steps { list-style: none; margin: 0; padding: 40px 0 8px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: "0" counter(step); display: block; color: var(--accent); font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.steps strong { display: block; font-size: 1.15rem; margin-bottom: 4px; }
.steps span { color: var(--muted); }

/* A list the host switched off, and the link that hides one. */
.section-off { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 12px 0; color: var(--muted); font-size: .92rem; }
.section-off details[open] { flex-basis: 100%; color: var(--fg); font-size: 1rem; }
.section-off > span { color: var(--fg); }
.section-off summary, .section-off .link { color: var(--fg); font-size: inherit; }
.section-end { margin: 22px 0 0; text-align: left; }
.section-end .link { color: var(--muted); }

/* Reply: two answers first; the rest appears once one is chosen. */
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.answer-btn { position: relative; display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 8px 12px;
  border: 1px solid var(--field); border-radius: 12px; background: var(--card); font-size: 1rem; font-weight: 600; text-align: center; cursor: pointer; }
.swatch input, .answer-btn input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.answer-btn:hover { border-color: var(--fg); }
.answer-btn:has(input:checked) { background: var(--btn); color: var(--btn-fg); border-color: var(--btn); }
.swatch:has(input:focus-visible), .answer-btn:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
@supports selector(:has(*)) {
  form:not(:has(select[name="recipient"] option[value="new"]:checked)) .new-name { display: none; }
}
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper input { width: 5rem; flex: none; text-align: center; }
.step-btn { width: 48px; height: 48px; flex: none; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid var(--field); background: var(--card); color: var(--fg); font: inherit; font-size: 1.3rem; cursor: pointer; }

/* Create flow */
.create { display: grid; gap: 28px; padding-top: 12px; }
.create .step { display: grid; gap: 12px; }
.create .q { font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; padding: 0; margin: 0 0 2px; }
.create .hint { margin: 0 0 8px; }
.create input:not([type=radio]) { font-size: 1.15rem; min-height: 56px; }
.create .skip { justify-self: center; }
.step-head { align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.js .step-head { display: flex; }
.themes legend { font-size: .92rem; font-weight: 600; margin-bottom: 6px; }
.step-head #step-label { margin-left: auto; }
.step-head progress { flex-basis: 100%; height: 3px; appearance: none; border: 0; background: var(--line); border-radius: 2px; }
.step-head progress::-webkit-progress-bar { background: var(--line); border-radius: 2px; }
.step-head progress::-webkit-progress-value { background: var(--fg); border-radius: 2px; }
.step-head progress::-moz-progress-bar { background: var(--fg); }
.stepping .step[hidden] { display: none; }

/* Ready screen and sharing */
.eyebrow { margin: 28px 0 0; color: var(--accent); font-weight: 600; font-size: .95rem; }
.eyebrow + h1 { margin-top: 8px; }
.mini-cover { display: grid; gap: 2px; padding: 18px 20px; border-radius: 14px; margin: 24px 0 16px; background: var(--c-bg); color: var(--c-fg); }
.mini-cover strong { font-size: 1.15rem; overflow-wrap: anywhere; }
.mini-cover span { font-size: .9rem; }
.share { display: grid; gap: 10px; }
.share-more { display: flex; flex-wrap: wrap; gap: 8px; }
.share-more .button { flex: 1 1 8rem; }
#host-link-card, #share-first { margin: 24px 0; display: grid; gap: 10px; }
#host-link-card p, #share-first p { margin: 0; }
#host-link-card .key { color: var(--muted); }
.host-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 4px 0 8px; }
.host-links a { min-height: 44px; display: inline-flex; align-items: center; }
#host-panel form, #host-panel details { margin: 0; }
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin: 8px 0 0; font-size: .92rem; color: var(--muted); }
.strip[hidden], .strip [hidden] { display: none; }
.strip p { flex-basis: 100%; margin: 4px 0; }
.strip .linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; min-height: 44px; }
.strip .strip-close { margin-left: auto; color: var(--muted); text-decoration: none; font-size: 1.3rem; min-width: 44px; }
.strip-steps { margin: 4px 0; padding-left: 20px; }
.strip-steps li { margin: 4px 0; }
.strip-icon { vertical-align: -4px; }
.strip .button.small { min-height: 44px; }
.strip > div { flex-basis: 100%; }
.transfer-sent .linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; min-height: 44px; }
.save-link { margin: 14px 0 0; font-size: .95rem; }

/* Groups */
.hero .button + .button { margin-left: 8px; }
.taken ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.kinds { grid-template-columns: repeat(3, 1fr); }
.kinds legend { font-size: .92rem; font-weight: 600; margin-bottom: 6px; }
.group-cover { min-height: 200px; }
#feed-url { margin: 8px 0; }
#calendar .events .hint { margin: 0; margin-left: auto; }
.address-list { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--soft); border-radius: 8px; background: var(--bg); max-width: 100%; }
.address-list li { padding: 10px 12px; cursor: pointer; overflow-wrap: anywhere; }
.address-list li[aria-selected="true"], .address-list li:hover { background: var(--soft); }
.address-credit { font-size: .8rem; }

/* Live refresh bar (N1.5): one line, one button. */
.live-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 8px 16px; background: var(--soft); border-bottom: 1px solid var(--line); font-size: .95rem; }
.live-bar button { font: inherit; padding: 4px 14px; border: 0; border-radius: 8px; background: var(--btn); color: var(--btn-fg); cursor: pointer; }
.live-bar button:hover { background: var(--btn-hover); }

/* Invitation (outside) and the reply step. Phone first: the cover is a card
   at most a third of the screen, and the question is sticky, so both answers
   are in view on a 390x844 screen whatever the note and the guest list hold. */
.invite, .step-page { max-width: 34rem; margin: 0 auto; }
.cover-card { min-height: 0; max-height: 34svh; margin: 8px 0 0; padding: 56px 20px 18px; border-radius: 16px; }
.cover-card .when { margin: 0 0 6px; font-size: .8rem; }
.cover-card h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cover-card .by { margin: 8px 0 0; font-size: .95rem; font-weight: 500; overflow-wrap: anywhere; }
.cover-card .shapes i:nth-child(n+3) { display: none; }
.cover-card .shapes i:nth-child(1) { width: 36px; height: 36px; top: 12px; }
.step-page .cover-card { max-height: 26svh; padding-top: 40px; }
.step-page .cover-card h1 { font-size: clamp(1.4rem, 6vw, 1.8rem); }
.invite-where { margin: 14px 0 4px; font-weight: 500; overflow-wrap: anywhere; }
.invite-where a { display: inline-block; margin: -12px 0 -12px 6px; padding: 12px 4px; font-weight: 600; }
.invite-note { position: relative; }
.invite-note .note { margin: 6px 0; }
.invite-note .note.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#note-toggle:checked + .note.clamp { display: block; }
.invite-note .more { display: inline-flex; align-items: center; min-height: 44px; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#note-toggle:checked ~ .more { display: none; }
#note-toggle:focus-visible ~ .more { outline: 3px solid var(--accent); outline-offset: 2px; }
.invite-guests { margin-top: 10px; padding: 14px 18px; }
.invite-guests h2 { margin-bottom: 2px; }
.invite-guests .guests { margin-bottom: 0; }
.invite-guests .guests li { padding: 6px 0; }
.invite-guests .avatar { width: 32px; height: 32px; font-size: .85rem; }
.invite-guests summary { min-height: 40px; }
.invite-ask { position: sticky; bottom: 0; z-index: 5; margin-top: 10px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--bg); }
.invite-ask .ask { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.invite-ask h2 { grid-column: 1 / -1; margin: 0 0 2px; }
.invite-ask .button { min-height: 56px; }
.invite-ask .warning { margin: 0; }
.step-page .step { margin-top: 20px; }
.reply-step .q { font-size: clamp(1.4rem, 5vw, 1.8rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.reply-step input[name="name"] { font-size: 1.15rem; min-height: 56px; }
.reply-step .extra { margin: 0; }
.known { margin: 4px 0 0; font-size: .9rem; }
.known-line { margin: 0; display: flex; flex-wrap: wrap; gap: 0 6px; align-items: center; }
.known details { margin: 0; }
.known .link, .known a { font-size: .9rem; }

/* Inside: the host and whoever said yes. The page takes a tint of the theme
   colour (about 10 %, 18 % in the dark scheme), the cover shrinks to a
   full-width header, and the sections are white cards. The cover is named
   for the door (vt-door.css); the name does nothing without an opt-in. */
.cover { view-transition-name: door; }
.inside { --tint: 10%; background: color-mix(in srgb, var(--c-bg) var(--tint), var(--bg)); overflow-x: clip; }
@media (prefers-color-scheme: dark) { .inside { --tint: 18%; } }
.cover-head { min-height: 110px; max-height: none; margin: 0 calc(50% - 50vw); border-radius: 0; justify-content: center; gap: 2px;
  padding: 18px max(16px, calc(50vw - 33rem + 16px)); }
.cover-head h1 { margin: 0; font-size: clamp(1.4rem, 5vw, 2rem); -webkit-line-clamp: 2; }
.cover-head .when { margin: 0; font-size: .95rem; text-transform: none; letter-spacing: 0; font-weight: 600; }
.cover-head .shapes i:nth-child(n+2) { display: none; }
.cover-head .shapes i:nth-child(1) { width: 44px; height: 44px; top: -10px; right: 6%; }
.inside-info { margin: 4px 0 0; }
.inside-info .invite-where { margin: 12px 0 4px; }
.inside-info .note { margin: 4px 0; }
.status { margin-top: 16px; }
.status h2 { margin-bottom: 10px; font-size: 1.3rem; }
.status-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.status-change { margin-top: 12px; }
/* The e-mail opt-in (MAIL1b): ticking the box swaps the short text for the
   address field, the button and the text about what is stored. Without
   :has() support everything stays visible. */
.mail-optin { margin-top: 12px; gap: 8px; }
.mail-optin .hint, .mail-optin .more { margin: 0; }
.mail-optin .more { display: grid; gap: 8px; }
@supports selector(:has(*)) {
  .mail-optin:not(:has(input[name="notify"]:checked)) .more { display: none; }
  .mail-optin:has(input[name="notify"]:checked) .off { display: none; }
}
.inside .party-grid { margin-top: 16px; }
.inside-foot { margin: 24px 0 0; font-size: .85rem; text-align: center; }
.inside-foot form.inline, .inside-foot details { display: inline; }
.inside-foot summary { display: inline; cursor: pointer; }
.inside-foot details[open] { display: block; margin-top: 8px; }
.declined-card { margin-top: 10px; padding: 12px 0; }
.declined-card p { margin: 0 0 10px; font-size: 1.15rem; font-weight: 600; }
.declined-card .button { width: 100%; min-height: 56px; }
.invite-gifts { margin-top: 10px; }
.invite-gifts > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.switch-answer { margin: 12px 0 0; }
.switch-answer a { display: inline-block; padding: 12px 0; }

/* Chat: a messenger. Own bubbles take the party's cover colour (--c-bg), the
   others are quiet; on a phone the chat is the whole screen. */
.chat { --me: var(--c-bg, #1f5c46); --me-fg: var(--c-fg, #fff); --them: var(--soft);
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; height: min(78dvh, 46rem); min-height: 22rem; position: relative; }
@media (prefers-color-scheme: dark) { .chat { --them: #2a2a27; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--me); color: var(--me-fg); }
.chat-head a { color: inherit; text-decoration: none; display: grid; place-items: center; width: 44px; height: 44px; margin-left: -10px; border-radius: 50%; }
.chat-head a:hover { color: inherit; background: rgb(255 255 255 / 0.18); }
.chat-head svg { width: 24px; height: 24px; }
.chat-head strong { display: block; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head span { display: block; font-size: .85rem; opacity: .8; line-height: 1.2; }
.chat-head div { min-width: 0; }
.chat-status { margin: 0; padding: 0 14px; color: var(--muted); font-size: .9rem; }
.chat-status:not(:empty) { padding-top: 8px; }
.chat-locked { padding: 24px 16px; text-align: center; }
.chat-locked[hidden], .chat-body[hidden] { display: none; }
.chat-locked button { min-height: 48px; padding: 0 28px; border-radius: 24px; border: 0; background: var(--me); color: var(--me-fg); font: inherit; font-weight: 600; cursor: pointer; }
.chat-body { display: flex; flex-direction: column; flex: 1; min-height: 0; position: relative; }
.chat-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px 4px; }
.chat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.chat-empty { margin: 40px 16px; text-align: center; color: var(--muted); }
.chat-day { align-self: center; margin: 14px 0 8px; padding: 2px 12px; border-radius: 12px; background: var(--soft); color: var(--muted); font-size: .8rem; }
.chat-system { align-self: center; margin: 8px 0; padding: 2px 12px; color: var(--muted); font-size: .85rem; text-align: center; }
.chat-msg { display: flex; align-items: flex-end; gap: 8px; margin-top: 2px; max-width: 100%; }
.chat-msg.first { margin-top: 10px; }
.chat-msg.mine { justify-content: flex-end; }
.chat-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--me); color: var(--me-fg);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; visibility: hidden; }
.chat-msg.first .chat-avatar { visibility: visible; }
.chat-msg.mine .chat-avatar { display: none; }
.chat-bubble { position: relative; max-width: min(78%, 30rem); padding: 7px 12px 5px; border-radius: 18px 18px 18px 6px;
  background: var(--them); color: var(--fg); -webkit-user-select: none; user-select: text; }
.chat-msg.mine .chat-bubble { background: var(--me); color: var(--me-fg); border-radius: 18px 18px 6px 18px; }
.chat-who { display: block; margin-bottom: 1px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.chat-message-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-time { display: block; margin-top: 1px; text-align: right; font-size: .68rem; opacity: .65; line-height: 1.3; }
.chat-pill { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 3; border: 0; border-radius: 20px;
  padding: 8px 16px; background: var(--me); color: var(--me-fg); font: inherit; font-size: .9rem; box-shadow: 0 2px 10px rgb(0 0 0 / 0.25); cursor: pointer; }
.chat-pill[hidden] { display: none; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.chat-compose textarea { flex: 1; min-height: 44px; max-height: 9rem; resize: none; padding: 10px 14px; border-radius: 22px; border: 1px solid var(--field);
  background: var(--bg); color: var(--fg); font: inherit; line-height: 1.35; }
.chat-compose textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.chat-compose button { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--me); color: var(--me-fg); display: grid; place-items: center; cursor: pointer; }
.chat-compose button:disabled { opacity: .5; }
.chat-compose svg { width: 22px; height: 22px; }
.chat-menu { position: fixed; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 18px rgb(0 0 0 / 0.25); padding: 4px; }
.chat-menu[hidden] { display: none; }
.chat-menu button { display: block; min-height: 44px; padding: 0 18px; border: 0; background: none; color: var(--danger); font: inherit; cursor: pointer; }
@media (max-width: 640px) {
  .chat { position: fixed; inset: 0; z-index: 10; height: auto; min-height: 0; border: 0; border-radius: 0; }
  .chat-head { padding-top: calc(10px + env(safe-area-inset-top)); }
}
[data-passkey-wrap][hidden], [data-passkey][hidden], [data-passkey-fail][hidden] { display: none; }

/* Personal QR invitation: the code fills the screen, black on white. */
.qr-screen { display: grid; justify-items: center; gap: 12px; text-align: center; }
.qr-screen .qr { width: min(92vw, 70vh, 28rem); height: auto; border-radius: 12px; }
.invited-by { font-size: .85em; opacity: .75; }
.qr-form { margin-top: 8px; }
