/* Web fonts, served by the app (latin subset of Google Fonts, SIL OFL 1.1, licenses next to the files).
   optional: a font that is late on the first visit is not swapped in, so the text never jumps. */
@font-face {
    font-family: Figtree;
    font-weight: 400 600;
    font-display: optional;
    src: url("/fonts/figtree.woff2") format("woff2");
}
@font-face {
    font-family: Unbounded;
    font-weight: 700;
    font-display: optional;
    src: url("/fonts/unbounded-700.woff2") format("woff2");
}

/* Konfetti Design tokens: plain light values first. Browsers without light-dark() (before Chrome 123, Safari 17.5,
   Firefox 120) stay light instead of losing every token; the toggle is hidden there (see .theme-toggle). */
:root {
    --bg: #F7F6F9;
    --surface: #FFFFFF;
    --text: #1C1A24;
    --muted: #6B6577;
    --line: #E3E0EA;
    --border: #D6D2DE;
    --cut: #1C1A24;
    --tabs-bg: #ECEAF0;
    --tab-on: #FFFFFF;
    --hover: #EDEBF1;
    --accent: #C8402E;
    --display: Unbounded, system-ui, sans-serif;
    color-scheme: light dark;
}
/* light-dark(light, dark) follows color-scheme, which the theme script pins via data-theme */
@supports (color: light-dark(#000, #fff)) {
    :root {
        --bg: light-dark(#F7F6F9, #1C1A24);
        --surface: light-dark(#FFFFFF, #26232F);
        --text: light-dark(#1C1A24, #F2F0F5);
        --muted: light-dark(#6B6577, #A8A3B3);
        --line: light-dark(#E3E0EA, #312D3B);
        --border: light-dark(#D6D2DE, #3A3646);
        --cut: light-dark(#1C1A24, #C9C4D3);
        --tabs-bg: light-dark(#ECEAF0, #26232F);
        --tab-on: light-dark(#FFFFFF, #3A3646);
        --hover: light-dark(#EDEBF1, #2A2633);
        --accent: light-dark(#C8402E, #FF4D57);
    }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.35 Figtree, system-ui, sans-serif;
    -webkit-text-size-adjust: 100%;
    padding-bottom: env(safe-area-inset-bottom); /* installed app: the home indicator never covers the footer */
}

body > * { max-width: 560px; margin-inline: auto; }

a { color: inherit; }
b { font-weight: 600; }
button { font: inherit; }
a, button, label, input { touch-action: manipulation; } /* a fast second tap never zooms (iOS Safari) */
/* Pressed: a tap shows at once, before the page reacts */
.segs button:active, .primary:active, .button:active, .new:active, .edit:active, .back:active, .tabs a:active { opacity: 0.7; }

/* Wordmark: last "i" is a lightsaber */
.wordmark {
    font: 700 21px/1.1 var(--display);
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.wm-i { display: inline-block; vertical-align: baseline; width: 0.17em; margin-left: 0.04em; }
.wm-i > span { display: block; }
.wm-blade { width: 0.17em; height: 0.26em; border-radius: 0.085em; background: var(--accent); margin-bottom: 0.03em; }
.wm-collar { width: 0.23em; height: 0.035em; margin: 0 0 0.03em -0.03em; border-radius: 0.015em; background: var(--muted); }
.wm-hilt { width: 0.17em; height: 0.56em; border-radius: 0.03em; background: var(--text); }

/* Wordmark with the subtitle underneath */
.brand { display: flex; flex-direction: column; gap: 4px; }
.subtitle { font-size: 14px; font-weight: 500; letter-spacing: 0.04em; color: var(--muted); }

/* Header with view switch */
/* Header sticks (minus 14px of its top padding) while what is below it scrolls away and fades. On a page with month bars,
   tied to the scroll (--p from 0 to 1, set by _MonthScroll), the first month bar comes up under the header, the
   header's background and texts fade, and its wordmark travels to the right end of the bar; at the end (.merged) the
   bar's own wordmark takes its place */
.top {
    position: sticky; top: -14px; z-index: 4;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 26px 20px 8px;
}
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); opacity: calc(1 - var(--p, 0)); }
.top .subtitle, .top .top-right { opacity: calc(1 - 2.5 * var(--p, 0)); }
.top .wordmark { transform-origin: 0 0; will-change: transform; }
.top.moving { pointer-events: none; }
.merged .top { visibility: hidden; }
.tabs-wrap { padding: 10px 20px 16px; }
.top-right { display: flex; align-items: center; gap: 4px; }
.season { font-size: 14px; white-space: nowrap; } /* looks like a footer link (.foot a) */
.new, .edit {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
    font-size: 15px; font-weight: 600; text-decoration: none;
    background: none; border: none; color: inherit; cursor: pointer; /* also a <button> (Speichern on the edit page) */
}
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -12px; /* the icon, not the button, lines up with the content edge */
    background: none; border: none; border-radius: 10px; color: var(--text); cursor: pointer;
}
.bar .theme-toggle { margin-right: -4px; }
:root[data-theme="dark"] .theme-toggle .moon, :root:not([data-theme="dark"]) .theme-toggle .sun { display: none; }
:root:not([data-theme]) .theme-toggle { display: none; } /* no script, no toggle */
@supports not (color: light-dark(#000, #fff)) { .theme-toggle { display: none; } } /* no dark values, no toggle */
.tabs {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px;
    background: var(--tabs-bg); border-radius: 14px;
}
.tabs a {
    position: relative; display: flex; align-items: center; justify-content: center; min-height: 40px;
    border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none;
}
/* The tap area reaches into the bar's padding and half the gap: 48px high, nothing visible changes */
.tabs a::after { content: ""; position: absolute; inset: -4px -2px; }
.tabs a[aria-current] { background: var(--tab-on); color: var(--text); font-weight: 600; }

main { padding: 0 20px 28px; }

/* Month name: sticks at the top, smaller once stuck */
.month > h2 {
    position: sticky; top: 0; z-index: 3;
    display: flex; align-items: center; height: 40px; margin: 0;
    background: var(--bg); border-bottom: 1px solid transparent;
    font: 700 24px/1 var(--display); letter-spacing: -0.02em;
    transition: border-color 300ms ease;
}
.compact .month > h2, .rsvps .month > h2 { height: 34px; font-size: 20px; }
.month > h2.stuck { border-bottom-color: var(--line); }
/* Month name with its year: shrinks to 16px once stuck by transform (no layout on every frame) */
.month > h2 .mn { white-space: nowrap; transform-origin: 0 50%; transition: transform 300ms ease; }
.month > h2.stuck .mn { transform: scale(0.667); } /* 24px -> 16px */
.compact .month > h2.stuck .mn, .rsvps .month > h2.stuck .mn { transform: scale(0.8); } /* 20px -> 16px */
/* Year and wordmark fade in once the month name sticks */
.month > h2 .yr, .month > h2 .mw { opacity: 0; visibility: hidden; transition: opacity 400ms ease, transform 500ms cubic-bezier(.2, .8, .2, 1), visibility 0s 500ms; }
.month > h2 .yr { display: inline-block; margin-left: 0.4em; color: var(--muted); font-variant-numeric: tabular-nums; transform: translateX(-8px); }
.month > h2 .mw { margin-left: auto; transform: translateX(8px); }
.month > h2 .mw .wordmark { font-size: 16px; }
.month > h2.stuck .yr, .month > h2.stuck .mw { opacity: 1; visibility: visible; transform: none; transition-delay: 0s, 0s, 0s; }
.month > h2.stuck .mw { transition-delay: 100ms, 100ms, 0s; }
/* First month: size, year and wordmark follow the scroll (inline styles), so no time-based transition */
.month > h2.lead, .month > h2.lead .mn, .month > h2.lead .yr, .month > h2.lead .mw { transition: border-color 300ms ease; }
@media (prefers-reduced-motion: reduce) { .month > h2 .yr, .month > h2 .mw { transform: none; } }

/* Event rows. scroll-margin: an event jumped to by #o<id> (back link without history) lands below the sticky month
   name, without focus ring. Hover: a soft background a little wider than the row; .sel keeps it on the event you came
   back from */
.ev, .row { position: relative; scroll-margin-top: 56px; }
.ev:target, .row:target { outline: none; }
.ev::before, .row::before {
    content: ""; position: absolute; inset: 0 -10px; z-index: -1;
    /* fade out: the mark leaves softly on scroll. The colour fades, not the opacity: an opacity transition makes
       Chrome render the text of the page thinner while it runs (the red weekdays visibly lose their glow) */
    border-radius: 10px; background-color: transparent; transition: background-color 350ms ease-out;
}
.ev:active::before, .row:active::before,
.ev.sel::before, .row.sel::before { background-color: var(--hover); transition-duration: 120ms; }
/* Hover only for a mouse: a touch screen keeps the hover state after a tap */
@media (hover: hover) {
    .ev:hover::before, .row:hover::before { background-color: var(--hover); transition-duration: 120ms; }
}
/* List: only 4px to the left, less than the 6px gap to the date, so the background never covers the date */
.list .ev::before { inset: -4px -10px 0 -4px; }
/* Compact: the highlight hugs the text line (±6px), not the spacing a day's first or last row adds towards the rule */
.compact .row::before { top: 6px; bottom: 6px; }
.compact .day > .row:not(:only-child):first-child::before { top: 11px; bottom: -3px; }
.compact .day > .row:not(:first-child):not(:last-child)::before { top: 0; bottom: 0; }
.compact .day > .row:not(:only-child):last-child::before { top: -3px; bottom: 11px; }

.week { height: 1px; background: var(--cut); }
.wd { font-weight: 600; color: var(--muted); }
.wd.we { color: var(--accent); }
.place, .end { color: var(--muted); }
.time, .start, .num { font-variant-numeric: tabular-nums; }
/* Favorite star: filled in the current colour (the text colour in the plan, no background);
   the one exception is the toggle of the form while it is off */
.star { fill: currentColor; }

/* List: date – name/place – time */
.list .month { display: flex; flex-direction: column; gap: 16px; padding-bottom: 16px; }
.list .week { margin: -14px 0 0; }
.list .day { display: flex; align-items: baseline; gap: 6px; }
.list .date { display: flex; flex-direction: column; width: 76px; flex-shrink: 0; } /* «Donnerstag» at 14px is 75px wide */
.list .num { font: 700 26px/1 var(--display); }
.list .date .wd { font-size: 14px; margin-top: 5px; white-space: nowrap; }
.list .events { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; padding-bottom: 8px; }
.list .day.rule .events { border-bottom: 1px solid var(--line); }
.list .ev {
    display: flex; gap: 12px; min-height: 48px; padding: 2px 0 6px;
    text-decoration: none;
}
.list .what { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.list .name { font-size: 17px; font-weight: 600; }
.list .name .star { margin-left: 6px; vertical-align: -1px; }
.list .place, .list .who { font-size: 14px; }
.list .who { display: flex; align-items: center; gap: 6px; color: var(--muted); overflow-wrap: anywhere; }
.list .who .going-sign { flex: none; }
.list .time { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.list .start { font-size: 15px; font-weight: 600; }
.list .end { font-size: 14px; }

/* Compact: one row per event */
.compact .week { margin-top: 4px; }
.compact .day.rule { border-bottom: 1px solid var(--line); }
.compact .row {
    display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none;
}
.compact .day > .row:not(:only-child):first-child { align-items: flex-end; min-height: 40px; padding-bottom: 3px; }
.compact .day > .row:not(:first-child):not(:last-child) { min-height: 32px; } /* 24px was easily mistapped */
.compact .day > .row:not(:only-child):last-child { align-items: flex-start; min-height: 40px; padding-top: 3px; }
/* Weekday and day only ("Sa 9."): the month is in the sticky heading */
.compact .when, .rsvp-row .when { display: flex; justify-content: space-between; width: 46px; flex-shrink: 0; }
.compact .what { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact .row .fav { flex-shrink: 0; display: flex; }
.compact .start { flex-shrink: 0; min-width: 40px; text-align: right; font-weight: 600; }

/* Going: the column and the strike exist only with login; date, weekday and sign stay unstruck */
.going-col { display: flex; flex: none; justify-content: flex-end; width: 18px; }
.list .going-col { align-self: flex-start; margin-left: -4px; padding-top: 1px; }
.compact .going-col { align-items: center; height: 1.35em; }
.going { display: flex; }
.going-yes { color: var(--text); }
.going-maybe, .going-no { color: var(--muted); }
.ev.struck .name, .ev.struck .place, .ev.struck .start, .ev.struck .end, .row.struck .what, .row.struck .start { text-decoration: line-through; }

.empty { color: var(--muted); padding: 24px 0; }

.foot {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    margin-top: 32px; font-size: 14px; color: var(--muted);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px; flex-basis: 100%; } /* the seasons fill their own line; Admin and Abmelden share the next one */
.foot > form, .foot > a:not(.admin) { margin-left: auto; } /* Anmelden / Abmelden stay at the right; Admin is at the left */
.foot a, .link, .season {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px;
    background: none; border: none; color: var(--muted); text-decoration: none; cursor: pointer;
}
.foot a[aria-current] { color: var(--text); font-weight: 600; }
/* The name of a user who is not the admin, where the admin has the link «Admin»; a long one wraps. */
.account-name { min-width: 0; padding: 0 8px; overflow-wrap: anywhere; }
.page-foot { margin-top: 0; padding: 0 20px 28px; } /* outside <main>, on every page but the list */

/* Forms */
.bar { padding: 12px 12px 4px 6px; }
.top + .bar { padding-top: 0; } /* below the sticky head */
.back {
    display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 10px;
    font-size: 16px; text-decoration: none;
}
.narrow { padding: 8px 20px 40px; }
.narrow h1 { margin: 0 0 20px; font: 700 26px/1.15 var(--display); letter-spacing: -0.02em; }
/* Title with the favorite toggle on the right. The negative margins keep the 44px tap area out of the row height
   and put the 28px star on the right edge. */
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-row h1 { margin: 0; }
.narrow > .title-row { margin-bottom: 20px; } /* the form's gap; on the event page the head sets the gaps */
.fav-toggle {
    position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -7px -8px -7px 0;
    color: var(--muted); cursor: pointer;
}
.fav-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fav-toggle input:not(:checked) + .star { fill: none; }
.fav-toggle input:checked + .star { color: var(--text); }
.fav-toggle input:focus-visible + .star { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 6px; }
.admin-section h2 { margin: 24px 0 0; font-weight: 600; font-size: 18px; line-height: 1.2; }
.admin-section .button { margin-top: 18px; }
/* A <button> with these classes: full width, without the browser's grey. */
.admin-section button.button { width: 100%; font-family: inherit; cursor: pointer; }
.admin-section button.button.secondary { background: none; color: inherit; }
/* Invite link, shown once: the browser's dialog in the colours of the theme, above the list. */
.invite-dialog {
    z-index: 6; width: calc(100% - 32px); max-width: 360px; padding: 20px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
    opacity: 0; transition: opacity 200ms ease, display 200ms allow-discrete, overlay 200ms allow-discrete;
}
.invite-dialog::backdrop {
    opacity: 0; transition: opacity 200ms ease, display 200ms allow-discrete, overlay 200ms allow-discrete;
}
/* Fades in and out; a browser without these features shows it at once. */
.invite-dialog[open], .invite-dialog[open]::backdrop { opacity: 1; }
@starting-style {
    .invite-dialog[open], .invite-dialog[open]::backdrop { opacity: 0; }
}
.invite-dialog h2 { margin: 0; }
.invite-dialog input {
    width: 100%; min-height: 48px; padding: 0 48px 0 12px; background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 16px;
}
/* A text field with its copy button inside, at the right; the three signs share one place and fade. */
.copy-field { position: relative; display: flex; }
.copy-icon {
    position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    background: var(--bg); color: var(--muted); border: 0; border-radius: 8px; cursor: pointer;
}
.copy-icon svg { grid-area: 1 / 1; opacity: 0; transition: opacity 200ms ease; }
.copy-icon:not(.done, .failed) .sign-copy, .copy-icon.done .sign-done, .copy-icon.failed .sign-failed { opacity: 1; }
.copy-icon.done, .copy-icon.failed { color: var(--text); }
/* An empty field has nothing to copy. */
.copy-field input:placeholder-shown + .copy-icon { opacity: 0.35; pointer-events: none; }
.feed-url { display: block; margin-top: 18px; padding: 12px 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.form { display: flex; flex-direction: column; }
.form label, .invite-dialog label { margin: 14px 0 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.invite-dialog label { display: block; }
/* Weekday and date over the date input while it has no focus; the native icon on the right stays free. */
.date-field { position: relative; }
.date-overlay {
    position: absolute; inset: 1px 48px 1px 1px; display: flex; align-items: center; padding: 0 12px;
    background: var(--surface); color: var(--text); font: inherit; font-size: 16px; border-radius: 9px 0 0 9px;
    pointer-events: none; white-space: nowrap; overflow: hidden;
}
.date-overlay .wd { font-weight: 600; }
.date-field:focus-within .date-overlay, .date-overlay[hidden] { display: none; }
.form input, .form textarea {
    width: 100%; min-height: 48px; padding: 0 12px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px;
    font: inherit; font-size: 16px;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--text); outline-offset: 1px; }
.form textarea { padding: 10px 12px; resize: vertical; }
/* /users: one form per user; beside its name field the button and the link to the user's page */
.user-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.name-row { display: flex; gap: 8px; }
.name-row input { flex: 1; min-width: 0; }
.name-row .button { flex: none; padding: 0 14px; background: none; color: inherit; cursor: pointer; }
.name-row .button > svg { margin: 0; } /* the icons stand alone */
/* Segment button (reusable): the look of .tabs; submit buttons on the event page (Zusage). */
.going-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.going-field legend { margin: 0 0 6px; padding: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.segs {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px;
    background: var(--tabs-bg); border-radius: 14px;
}
.segs button {
    display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; min-height: 44px; padding: 0;
    border: 0; border-radius: 10px; background: none;
    font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer;
}
.segs button[aria-pressed="true"] { background: var(--tab-on); color: var(--text); font-weight: 600; }
.segs button:focus-visible { outline: 2px solid var(--text); outline-offset: 1px; }
/* /users/<id>: one compact row per event – date, event over its place, the Zusage as three signs */
.rsvp-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.rsvp-row .what { flex: 1; min-width: 0; }
.rsvp-row .what > * { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsvp-row .what a { text-decoration-color: var(--border); text-underline-offset: 3px; }
/* «Nein» is struck through as in the list; follows the pressed button, so a tap shows it at once. */
.rsvp-row:has([data-rsvp="No"][aria-pressed="true"]) .what { text-decoration: line-through; }
.rsvp-row .segs { flex: none; grid-template-columns: repeat(3, 44px); gap: 8px; } /* a tap saves at once: room against mistaps */
/* Date and time inputs have an intrinsic min width (iOS Safari: wider once a value is set); only without the native
   appearance does min-width: 0 take effect. Then iOS puts the value at the top of the box: the vertical padding
   centres it (13 + 20 + 13 + 2 border = 48px). */
.form input[type="date"], .form input[type="time"] {
    display: block; min-width: 0; -webkit-appearance: none; appearance: none; padding-block: 13px; line-height: 20px;
}
.form input::-webkit-date-and-time-value { text-align: left; }
/* The flyer field of the edit form: the file button centred in the box, a small preview, the checkbox in its label. */
.form input[type="file"] { padding-block: 11px; }
.flyer-preview { align-self: flex-start; max-width: 100%; max-height: 160px; margin-top: 10px; border-radius: 10px; }
.form .check { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 0; }
.form .check input { width: 20px; min-height: 20px; margin: 0; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pair label { display: block; }
.error { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--accent); }
.error:empty { display: none; }
.invite-dialog .error { display: block; min-height: 1.35em; } /* the line of the hint is reserved: nothing moves */
.hint { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.form .field-hint { margin: 4px 0 0; } /* a hint that belongs to the field above it */
.primary {
    min-height: 48px; margin-top: 24px;
    background: var(--text); color: var(--bg);
    border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer;
}
/* Speichern while the form is sent (Edit page): dimmed, same size, so nothing moves */
.edit:disabled, .primary:disabled { opacity: 0.5; cursor: default; }

/* Login */
.login {
    display: flex; flex-direction: column; align-items: center; gap: 20px;
    padding: 12px 20px 40px; /* below the 60px back bar */
}
.login-icon { border-radius: 21px; }
.login .wordmark { font-size: 32px; }
.login .brand { align-items: center; gap: 6px; }
.login .subtitle { font-size: 15px; }
.login .form { width: 100%; max-width: 340px; }

/* Event detail */
.bar.split { display: flex; justify-content: space-between; align-items: center; padding-right: 12px; }
.detail { display: flex; flex-direction: column; gap: 26px; }
.detail .head { display: flex; flex-direction: column; gap: 8px; }
.detail .head .wd { font-size: 14px; }
.detail h1 { margin: 0; }
.detail .answers h2, .detail .note > h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; line-height: 1.2; }
/* Public note (Markdown): the text breaks inside the column. */
.note-text { overflow-wrap: anywhere; }
.note-text > :first-child { margin-top: 0; }
.note-text > :last-child { margin-bottom: 0; }
.note-text p, .note-text ul, .note-text ol { margin: 0 0 8px; }
.note-text h1, .note-text h2, .note-text h3, .note-text h4, .note-text h5, .note-text h6 { margin: 12px 0 6px; font-size: 16px; }
.note-text img { max-width: 100%; }
.note-text pre { white-space: pre-wrap; }
.detail .range { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.detail .range .place { font-weight: 400; }
/* Flyer, last on the page: scaled down, a tap shows it large in a dialog over a dark backdrop. */
button.flyer { display: block; padding: 0; background: none; border: 0; cursor: zoom-in; }
.flyer img { display: block; max-width: 100%; max-height: 420px; height: auto; border-radius: 12px; }
.flyer-big { max-width: 100vw; max-height: 100dvh; padding: 0; background: none; border: 0; cursor: zoom-out; }
.flyer-big::backdrop { background: rgb(0 0 0 / 0.85); }
.flyer-big img { display: block; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); object-fit: contain; }
/* Favorite on the event page: the filled star where the form has its toggle, right on the title row */
.fav-mark { flex: none; display: grid; place-items: center; }
.detail dl { margin: 0; border-top: 1px solid var(--line); }
.detail dl > div {
    position: relative; display: flex; justify-content: space-between; gap: 16px; padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.detail dt { color: var(--muted); }
.detail dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.detail dd a { text-underline-offset: 3px; }
/* Sign of the Going value before its word */
.detail dd .going-sign { margin-right: 6px; vertical-align: -2px; }
/* Website and tickets stay on one line; a long domain ends with an ellipsis. */
.detail dd.site { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The whole row is the tap target, not only the domain text (the row is the containing block, so dd does not clip it) */
.detail dd.site a::after { content: ""; position: absolute; inset: 0; }
.buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
.button {
    display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 0;
    border-radius: 12px; font-size: 15px; font-weight: 600; text-decoration: none;
}
.button.secondary { border: 1px solid var(--border); }
.button > svg { margin-right: 8px; } /* icon before the text, the same gap as in «Teilen» */
/* Split button «Teilen» on the event page: one secondary button, a thin divider before the arrow; the menu fades in
   under it */
.share { position: relative; align-items: stretch; }
.share button { background: none; border: none; color: inherit; cursor: pointer; }
.share-main { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px 0 0 11px; }
.share .share-toggle {
    display: grid; place-items: center; width: 48px;
    border-left: 1px solid var(--border); border-radius: 0 11px 11px 0;
}
/* The icon fades with the label, so it does not visibly move when the text changes its width. */
.share-main svg, .share-label { transition: opacity 200ms ease; }
.share-main:has(.fading) svg, .share-label.fading { opacity: 0; }
.share-main.message svg { display: none; }
.share-menu {
    position: absolute; top: calc(100% + 6px); right: -1px; z-index: 5;
    display: flex; flex-direction: column; min-width: calc(100% + 2px); padding: 4px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    opacity: 0; visibility: hidden; transition: opacity 200ms ease, visibility 0s 200ms;
}
.share-toggle[aria-expanded="true"] + .share-menu { opacity: 1; visibility: visible; transition-delay: 0s; }
.share-menu button { min-height: 44px; padding: 0 12px; border-radius: 8px; text-align: left; white-space: nowrap; }
.share-menu button:active { background: var(--hover); }
@media (hover: hover) {
    .share-menu button:hover { background: var(--hover); }
}
.copy-label { transition: opacity 200ms ease; }
.copy-label.fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .share-main svg, .share-label, .share-menu, .invite-dialog, .invite-dialog::backdrop, .copy-label, .copy-icon svg { transition: none; } }
