:root {
  /* Neutral dark greys and one accent colour, used flat (no gradients, no glow) */
  --bg: #121212;
  --surface: #1b1b1b;
  --surface-2: #252525;
  --border: #303030;
  --border-strong: #4a4a4a;
  --text: #f3f3f0;
  --muted: #a6a69f;
  --accent: #ff8a3d;
  /* Text on the accent colour, the accent colour as text on the dark page, and two light
     shades of it (accounts.theme_css sets all of them for a DJ's own colour) */
  --on-accent: #1b1108;
  --accent-text: #ff8a3d;
  --accent-soft: rgba(255, 138, 61, .14);
  --accent-line: rgba(255, 138, 61, .5);
  --ok: #4cc38a;
  --warn: #e9b949;
  --bad: #ef6464;
  --focus: #f3f3f0;
  --radius: 10px;
  --radius-sm: 8px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
}

[hidden] { display: none !important; }

/* Line icons (icons.js): as tall as the text, in its colour */
.icon { display: inline-block; width: 1.15em; height: 1.15em; flex: none; fill: currentColor; vertical-align: -.18em; }

a { color: var(--accent-text); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; color: var(--text); font-weight: 650; margin-top: 2rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

main { max-width: 640px; margin: 0 auto; padding: 0 16px 6rem; }

/* -- form elements -------------------------------------------------------- */

input, textarea, select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem .9rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 4.5rem; }
input[type="checkbox"], input[type="radio"] { width: auto; flex: none; accent-color: var(--accent); transform: scale(1.2); }
/* The -2..2 sliders (guests' mood, host genres) look the same in every browser: no field
   box around them, the knob reaches both ends, and the bar fills from the middle ("Egal")
   to the knob in the row's colour. --from/--to (0..1) come from Songrequest.stepRange. */
:root { --knob: 22px; }
.step-range {
  --range-color: var(--accent); --range-rest: rgba(255, 255, 255, .16); --from: .5; --to: .5;
  --bar: linear-gradient(to right,
    var(--range-rest) calc(var(--knob) / 2 + (100% - var(--knob)) * var(--from)),
    var(--range-color) 0, var(--range-color) calc(var(--knob) / 2 + (100% - var(--knob)) * var(--to)),
    var(--range-rest) 0);
  -webkit-appearance: none; appearance: none; display: block; box-sizing: border-box;
  width: 100%; height: calc(var(--knob) + 6px); padding: 0; margin: .4rem 0 0;
  border: 0; border-radius: 0; background: none; box-shadow: none; cursor: pointer;
}
.step-range:focus { box-shadow: none; }
.step-range:disabled { cursor: default; opacity: .55; }
.step-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--bar); }
.step-range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--bar); }
.step-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; box-sizing: border-box;
  width: var(--knob); height: var(--knob); margin-top: calc((6px - var(--knob)) / 2);
  border-radius: 50%; background: var(--range-color); border: 3px solid var(--text);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .5); transition: background .15s;
}
.step-range::-moz-range-thumb {
  box-sizing: border-box; width: var(--knob); height: var(--knob);
  border-radius: 50%; background: var(--range-color); border: 3px solid var(--text);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .5);
}
.step-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-line); }
.step-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--accent-line); }

label { display: block; font-size: .9rem; color: var(--muted); margin: .9rem 0 .35rem; }
label.check { display: flex; gap: .7rem; align-items: center; color: var(--text); font-size: 1rem; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  font: inherit; font-weight: 600; font-size: .92rem;
  color: var(--on-accent); background: var(--accent);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: .5rem .95rem; min-height: 2.5rem;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .15s, border-color .15s, opacity .15s, filter .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { filter: brightness(.93); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.secondary { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn.ok { background: #1f6f4a; color: #ecfff4; }
.btn.bad { background: #8a2626; color: #ffeded; }
.btn.small { min-height: 2rem; padding: .3rem .75rem; font-size: .85rem; }
.btn.icon { width: 2.5rem; padding: 0; }
/* The guest's own vote in the queue: tap to take it back */
.btn.icon.voted { background: transparent; color: var(--accent-text); border: 1px solid var(--accent); }
.btn.block { width: 100%; min-height: 3rem; font-size: 1rem; }

.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .8rem; font-weight: 600;
  padding: .25rem .6rem; border-radius: 6px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge.ok { color: var(--ok); border-color: rgba(76, 195, 138, .35); }
.badge.warn { color: var(--warn); border-color: rgba(233, 185, 73, .35); }
.badge.bad { color: var(--bad); border-color: rgba(239, 100, 100, .35); }
.badge.accent { color: var(--on-accent); background: var(--accent); border-color: transparent; }

.notice {
  background: rgba(233, 185, 73, .1);
  border: 1px solid rgba(233, 185, 73, .35);
  color: var(--warn);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  margin: 1rem 0;
}
.notice.error { background: rgba(239, 100, 100, .1); border-color: rgba(239, 100, 100, .35); color: var(--bad); }

.hint { color: var(--muted); font-size: .9rem; margin: -.25rem 0 .75rem; }
/* The pull-up above is meant for headings and labels: under a field, a checkbox, a row of
   buttons or a list a hint would stick to it (or even overlap) - it gets room instead */
:is(input, select, textarea, button, .btn, .row, .list, .chips, label.check, form, table, .track, .dj-extras-boxes) + .hint { margin-top: .5rem; }
.muted { color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 1.5rem 0; }

/* -- track lists ---------------------------------------------------------- */

.list { display: flex; flex-direction: column; gap: .5rem; }

.track {
  display: flex; align-items: center; gap: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .7rem .75rem .7rem 1rem;
}
.track-main { flex: 1; min-width: 0; }
.track-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track.wish-row { border-style: dashed; background: transparent; }
/* A wish made without network, waiting to be sent */
.track.pending { border-style: dashed; opacity: .8; }
.track.pending .track-sub { white-space: normal; }
/* Funkloch-Modus: waiting for reception, or just sent after waiting */
.track-pending { color: var(--warn); font-size: .85rem; margin-top: .2rem; white-space: normal; }
.track-sent { color: var(--ok); font-size: .85rem; font-weight: 600; margin-top: .2rem; }
.offline-banner { margin: 0 0 1rem; font-size: .92rem; }
.offline-hint { margin: 0 0 .75rem; font-size: .9rem; }
.offline-top { margin: 1rem 0 .5rem; font-weight: 600; }
.dialog-offline { margin: 0 0 .4rem; color: var(--warn); font-size: .9rem; }
.mood-status { font-size: .8rem; min-height: 0; }
.mood-status:empty { display: none; }
.mood-status.waiting { color: var(--warn); margin: .1rem 0 .3rem; }
.mood-status.sent { color: var(--ok); font-weight: 600; margin: .1rem 0 .3rem; }
.did-you-mean { margin: .2rem 0 .6rem; }
.track-sub { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Sentences in a list line, wrapped instead of cut */
.track-sub.wrap { white-space: normal; overflow-wrap: anywhere; }
/* "Nicht dabei?" and "Irgendein Song von …": whole sentences and the artist's full name, wrapped */
.wish-row .track-title, .wish-row .track-sub { white-space: normal; overflow-wrap: anywhere; }
.track-actions { display: flex; gap: .4rem; align-items: center; flex-shrink: 0; }
.votes {
  min-width: 2.2rem; text-align: center; font-weight: 700; font-size: 1.05rem;
  background: var(--surface-2); border-radius: 10px; padding: .3rem .4rem;
}

/* -- guest page ----------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 2.5rem 16px 1.5rem;
}
.eyebrow {
  margin: 0 0 .35rem; font-size: .92rem; font-weight: 600; color: var(--muted);
}
.brand-logo { display: inline-block; margin-bottom: 1.1rem; }
.brand-logo img { display: block; width: auto; height: auto; max-width: 200px; max-height: 72px; }
.legal { max-width: 40rem; line-height: 1.55; }
.legal h2 { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
.legal p, .legal li { color: #dadad5; }
.legal ul { padding-left: 1.2rem; }
.legal-text { white-space: pre-line; color: #dadad5; }
.legal-address { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; }
.legal a { color: var(--muted); }
.hero h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); margin: 0; }
.lead { color: #dadad5; max-width: 34rem; margin: .7rem auto 0; white-space: pre-line; }

.search-box {
  position: sticky; top: 0; z-index: 5;
  padding: .75rem 0;
  background: linear-gradient(var(--bg) 75%, transparent);
}
.search-box input {
  font-size: 1.05rem; padding: .9rem 1rem; border-radius: var(--radius);
  background: var(--surface-2);
}

#results:not(:empty) { margin-bottom: 1rem; }

.limit-info { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }
/* On "Suchen" right under the field (guest.js renderTabs); while the guest searches it makes room
   for the results, unless it says why wishing waits right now */
.search-box + .limit-info { margin: 0 0 .25rem; }
.search-box + .limit-info.is-quiet { display: none; }
#results:empty { margin-top: 0; }

dialog {
  width: min(92vw, 440px);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem;
}
dialog::backdrop { background: rgba(0, 0, 0, .7); }
dialog h3 { font-size: 1.2rem; }
/* What's new after logging in */
.news-dialog { width: min(92vw, 34rem); }
.news-body { max-height: 60vh; overflow-y: auto; padding: 0 .2rem .4rem 0; margin-bottom: .6rem; }
.news-body:focus:not(:focus-visible) { outline: none; }
.news-entry h4 { margin: 1rem 0 .3rem; font-size: 1rem; }
.news-entry:first-child h4 { margin-top: .3rem; }
.news-entry ul { margin: 0; padding-left: 1.2rem; }
.news-entry li { margin: .3rem 0; line-height: 1.45; }
.news-date { color: var(--muted); font-weight: 400; font-size: .9rem; }
.dialog-track { background: var(--surface-2); border-radius: 12px; padding: .75rem .9rem; margin: .5rem 0; }
.dialog-actions { display: flex; gap: .6rem; margin-top: 1.2rem; }
.dialog-actions .btn { flex: 1; min-height: 2.9rem; }

#toast {
  position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom));
  transform: translate(-50%, 150%);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: .75rem 1.1rem; border-radius: 12px; /* a box, not a pill: several lines stay readable */
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  opacity: 0; visibility: hidden;
  transition: transform .25s ease, opacity .25s, visibility .25s;
  z-index: 50; max-width: calc(100vw - 32px); text-align: center;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
#toast.error { border-color: rgba(239, 100, 100, .5); color: var(--bad); }
#toast .toast-action {
  margin-left: .6rem; font: inherit; font-weight: 700; color: var(--accent-text); background: none; border: 0;
  padding: .2rem .4rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

footer { text-align: center; color: var(--muted); font-size: .78rem; padding: 2rem 16px 3rem; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.guest-tabs { margin: 1.25rem 0 1rem; }
.tab-panel > .hint:first-child { margin: 0 0 1rem; }
.tab-panel h2 { margin-top: 0; }
.tab-panel > section:not([hidden]) ~ section:not([hidden]) { margin-top: 2rem; }
.dialog-note { color: var(--muted); font-size: .85rem; margin: .9rem 0 0; text-align: center; }
.dialog-step { margin: .2rem 0 .4rem; color: var(--accent-text); font-weight: 700; font-size: .95rem; }
.name-field { border-color: var(--accent); }
.guest-tabs { gap: .3rem; }
.guest-tabs .tab { flex: 1 1 auto; text-align: center; padding: .45rem .55rem; font-size: .86rem; }
/* On a phone all four tabs fit side by side (also in French or Dutch, with a count at "Gewünscht") */
@media (max-width: 420px) {
  .guest-tabs { gap: .2rem; }
  .guest-tabs .tab { padding: .45rem .32rem; font-size: .82rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 370px) {
  .guest-tabs .tab { padding: .45rem .22rem; font-size: .76rem; }
}
.mood-list { display: grid; gap: .6rem; }
.mood-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .9rem .35rem; }
.mood-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.mood-name { font-weight: 600; }
.mood-value { color: var(--muted); font-size: .85rem; }
.mood-value.more { color: var(--ok); }
.mood-value.less { color: var(--bad); }
/* The bar takes the colour of the word next to it */
.mood-row:has(.mood-value.more) .step-range { --range-color: var(--ok); }
.mood-row:has(.mood-value.less) .step-range { --range-color: var(--bad); }
.mood-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; }
.mood-board { display: grid; gap: .9rem; margin: .5rem 0 1rem; }
.mood-track { position: relative; height: .7rem; background: var(--surface-2); border-radius: 999px; margin: .35rem 0 .2rem; overflow: hidden; }
.mood-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--border); }
.mood-bar { position: absolute; top: 0; bottom: 0; }
.mood-bar.more { background: var(--ok); border-radius: 0 999px 999px 0; }
.mood-bar.less { background: var(--bad); border-radius: 999px 0 0 999px; }
.track-note { color: var(--muted); font-size: .85rem; margin-top: .2rem; font-style: italic; }
.note-form { display: flex; gap: .5rem; flex-wrap: wrap; width: 100%; }
.note-form input { flex: 1 1 14rem; }

/* -- admin ---------------------------------------------------------------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 16px; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 10;
}
.topbar { flex-wrap: wrap; row-gap: .5rem; }
.topnav { display: flex; gap: .2rem; margin-left: auto; margin-right: .5rem; }
/* Phones: one line (logo + "Menü", topbar.js); the menu opens below it with the pages as large
   buttons, then the tools, then "Abmelden" */
.menu-toggle { display: none; }
@media (max-width: 560px) {
  .menu-toggle { display: inline-flex; margin-left: auto; }
  /* Nothing to open yet (the login page): no button */
  .topbar:not(:has(> .toolswitch:not([hidden]), > .topnav:not([hidden]), > #logout:not([hidden]))) .menu-toggle { display: none; }
  .topbar:not(.menu-open) > :is(.toolswitch, .topnav, #logout) { display: none; }
  .topbar.menu-open { padding-bottom: 1rem; }
  .topnav { order: 2; width: 100%; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
  .topbar .topnav a { padding: .6rem .4rem; text-align: center; background: var(--surface); border: 1px solid var(--border); }
  .topbar .topnav a.active { background: var(--surface-2); border-color: var(--muted); }
  .topbar.menu-open > #logout { order: 4; }
}
.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; padding: .35rem .6rem; border-radius: var(--radius-sm); }
.topnav a.active { color: var(--text); background: var(--surface-2); }
/* Switches between the DJ tools: Lieder wünschen (the dashboard) and Playlist Übertrag */
/* margin-right: auto keeps it next to the logo on every tool page; the rest goes right */
.toolswitch { display: flex; gap: .15rem; padding: .2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-right: auto; }
.toolswitch a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .86rem; padding: .3rem .8rem; border-radius: 6px; white-space: nowrap; }
.toolswitch a:hover { color: var(--text); }
.toolswitch a[aria-current="page"] { color: var(--bg); background: var(--text); }
@media (max-width: 560px) {
  /* Three tools: the switcher gets its own row and scrolls sideways if it must */
  .toolswitch { order: 3; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .toolswitch::-webkit-scrollbar { display: none; }
  .toolswitch a { padding: .3rem .55rem; font-size: .82rem; }
}
.logo-preview { display: flex; align-items: center; justify-content: center; min-height: 90px; background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius); padding: 1rem; margin: .5rem 0 .75rem; }
.logo-preview img { max-width: 220px; max-height: 80px; }
.color-row { display: flex; gap: .6rem; align-items: center; }
.color-row input[type=color] { width: 3rem; height: 2.6rem; padding: .15rem; flex: none; }
.dj-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--border); }
.dj-row:first-child { border-top: 0; }
.dj-row .grow { flex: 1 1 12rem; min-width: 0; }
.dj-row .track-sub { white-space: normal; }
.brand { font-weight: 800; text-decoration: none; color: var(--text); font-size: 1.1rem; }
.brand span { color: var(--accent-text); }

body.admin main { max-width: 960px; padding-top: 1.25rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: .75rem; }
/* A card title with an action on the right (e.g. "Deine Events" + "＋ Neues Event") */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.card-head h3 { margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; }
.stat { background: var(--surface-2); border-radius: 12px; padding: .8rem 1rem; }
.stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-label { color: var(--muted); font-size: .82rem; }

.event-row {
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1rem; border-radius: 12px; background: var(--surface-2);
  text-decoration: none; color: var(--text); margin-bottom: .5rem;
}
.event-row:hover { outline: 1px solid var(--border-strong); }
.event-row .grow { flex: 1; min-width: 0; }

.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.row.spread { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: .35rem; overflow-x: auto; margin: 1rem 0; padding-bottom: .25rem; }
.tab {
  font: inherit; font-weight: 600; font-size: .92rem;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .45rem .9rem; cursor: pointer; white-space: nowrap;
}
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tab .count { opacity: .7; margin-left: .25rem; }
.tab .count.attention { opacity: 1; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 0 .45rem; font-weight: 700; }

.request {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: .6rem;
}
.request-head { display: flex; gap: .85rem; align-items: center; }
.request-when { flex: none; align-self: flex-start; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.track-main.copy { font: inherit; color: inherit; text-align: left; background: none; border: 0; padding: .15rem .3rem; margin: -.15rem -.3rem; border-radius: 8px; cursor: copy; flex: 1; min-width: 0; }
.track-main.copy:hover { background: var(--surface-2); }
.request-where { margin-top: .3rem; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-summary.ok { border-color: rgba(76, 195, 138, .5); }
.status-summary.warn { border-color: rgba(233, 185, 73, .6); }
.status-summary ul, .problems { margin: .4rem 0; padding-left: 1.1rem; }
.problems li { margin: .3rem 0; font-size: .88rem; overflow-wrap: anywhere; }
.status-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.status-table th { text-align: left; color: var(--muted); font-weight: 500; padding: .35rem .8rem .35rem 0; vertical-align: top; width: 40%; }
.status-table td { padding: .35rem 0; overflow-wrap: anywhere; }
/* Event list: a row with an action beside it (archive / restore) */
.event-line { display: flex; align-items: center; gap: .5rem; }
.event-line .event-row { flex: 1; min-width: 0; }
.event-line .btn { flex: none; }
@media (max-width: 600px) {
  .event-line-label { display: none; }
  .event-line .event-line-action { padding: .45rem .6rem; }
}
details.archive { margin-top: 1rem; }
details.archive summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.request-facts { margin-top: .45rem; color: var(--muted); font-size: .84rem; }
.request-flag { margin-top: .45rem; }
/* Long notes at a wish ("Gastgeber: Auf jeden Fall – Schlager & Deutsche Evergreens") wrap
   instead of pushing the card - and on a phone the whole page - wider */
.request-flag .badge { white-space: normal; max-width: 100%; overflow-wrap: anywhere; line-height: 1.35; }
.voters { margin-top: .45rem; font-size: .88rem; color: #d3d3cd; }
.voters .msg { color: var(--muted); font-style: italic; }
/* One guest: name, message, marks of the word filter and what the DJ can do */
.voter { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .45rem; }
.voter + .voter { margin-top: .15rem; }
.badge.mini { font-size: .7rem; padding: .05rem .45rem; font-weight: 600; }
/* Caught by the word filter or hidden by the DJ: blurred until tapped */
.filtered { filter: blur(5px); cursor: pointer; border-radius: 4px; user-select: none; transition: filter .15s; }
.filtered.revealed { filter: none; user-select: auto; }
.filtered:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vote-action { font: inherit; font-size: .75rem; color: var(--muted); background: none; border: 0; padding: .1rem .25rem; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.vote-action:hover { color: var(--text); }
/* The word filter's test field in the profile */
.word-test { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.word-test input { flex: 1; min-width: 12rem; }
.word-test-result { margin: .5rem 0 0; font-size: .9rem; }
.word-test-result.ok { color: var(--ok); }
.word-test-result.bad { color: var(--bad); }
.request-actions { display: flex; gap: .4rem; margin-top: .7rem; flex-wrap: wrap; }
/* Phones: "Ausblenden", "Gleich spielen", "Kommentar" and "Zusammenführen" only as their signs, so a
   wish's buttons fit one row (the full words are their labels for screen readers) */
@media (max-width: 640px) {
  .request-actions { gap: .3rem; }
  .request-actions .btn-text { display: none; }
  .request-actions .btn { flex: 0 0 auto; padding-left: .5rem; padding-right: .5rem; gap: .25rem; }
  /* Only a sign left: as narrow as it gets */
  .request-actions .btn:has(.btn-text) { padding-left: .45rem; padding-right: .45rem; }
}
/* Small phones: "Gespielt" and "Ablehnen" as words only, so all six still fit one row */
@media (max-width: 420px) {
  .request-actions .btn:not(:has(.btn-text)) .icon { display: none; }
}
@media (max-width: 380px) {
  .request-actions { gap: .25rem; }
  .request-actions .btn { padding-left: .4rem; padding-right: .4rem; }
  .request-actions .btn:has(.btn-text) { padding-left: .35rem; padding-right: .35rem; }
}
/* "Danach:" under an open wish - what fits after it (a tap copies "Artist Titel"), "Alle" shows every
   suggestion; a song nobody asked for yet: "Was passt danach?" */
.wish-after { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; margin-top: .6rem; padding-top: .5rem; border-top: 1px dashed var(--border); font-size: .85rem; }
.after-label { color: var(--muted); font-weight: 700; }
.after-song { max-width: 100%; min-width: 0; display: inline-flex; gap: .3em; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .15rem .5rem; cursor: pointer; overflow: hidden; white-space: nowrap; }
.after-song:hover { border-color: var(--border-strong); }
.after-song .after-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.after-song .after-artist { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.after-more { font: inherit; font-weight: 700; color: var(--accent-text); background: none; border: 0; padding: .15rem .2rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.after-wait, .after-none { color: var(--muted); }
.after-song:focus-visible, .after-more:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
/* "Alle": wider than the merge dialog it shares its look with ("dialog." makes it beat .merge-dialog further down) */
dialog.after-dialog { width: min(94vw, 40rem); }

/* The queue's top: "Minimal" (per device), pressed while on */
.queue-head { display: flex; justify-content: flex-end; margin: 0 0 .5rem; }
.btn.view-toggle[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
/* "Minimal": one row per wish - title and artist (cut, never wider than the screen), Gespielt, Ausblenden */
.request.request-min { display: flex; align-items: center; gap: .4rem; padding: .4rem .45rem .4rem .8rem; margin-bottom: .4rem; }
.request-min .track-main.copy { flex: 1 1 auto; min-width: 0; margin: 0; padding: .1rem .2rem; }
.request-min .track-title, .request-min .track-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.request-min .track-sub { font-size: .82rem; }
.btn.icon-only { flex: none; width: 2.5rem; min-height: 2.5rem; padding: 0; }
/* "Ausgeblendete anzeigen (n)" at the end of the queue; the hidden wishes below it, quieter */
.hidden-wishes { margin-top: 1rem; }
.hidden-toggle {
  display: flex; align-items: center; justify-content: center; gap: .4rem; width: 100%;
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--muted); cursor: pointer;
  background: transparent; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: .55rem .8rem;
}
.hidden-toggle:hover { color: var(--text); border-color: var(--muted); }
.hidden-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hidden-list { margin-top: .6rem; }
.request.is-hidden { background: transparent; }
.request.is-hidden .track-main, .request.is-hidden .votes { opacity: .6; }

.url-box {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  background: var(--surface-2); border-radius: 12px; padding: .5rem .5rem .5rem .9rem;
  overflow: hidden; margin-top: .75rem;
}
/* The address gives way on narrow screens, the buttons stay whole */
.url-box span, .url-box code {
  /* below 9rem the buttons go to the next line: never just "ht…" */
  flex: 1 1 9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem;
}

/* A button and its "?" stay together when a row wraps */
.with-tip { display: inline-flex; align-items: center; gap: .35rem; }

.qr-preview { background: #fff; border-radius: 16px; padding: 1rem; width: min(100%, 320px); }
.qr-preview img { display: block; width: 100%; height: auto; }

.playlist-picker { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; padding: .25rem .75rem; margin-top: .5rem; }
.playlist-picker label.check { margin: .55rem 0; font-size: .95rem; }
.playlist-picker .count { color: var(--muted); font-size: .82rem; margin-left: auto; }


.login { max-width: 380px; margin: 12vh auto 0; }

.live-dot {
  display: inline-block; width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 0 rgba(76, 195, 138, .6);
  animation: pulse 2s infinite;
}
.live-dot.off { background: var(--bad); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(76, 195, 138, .6); }
  70% { box-shadow: 0 0 0 .5rem rgba(76, 195, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 195, 138, 0); }
}

/* -- poster (printed A4, drawn from its design by poster-render.js) -------- */

body.poster { background: #1b1b1f; color: #f4f4f4; padding: 24px 16px; }
.poster-stage { width: min(100%, 1200px); margin: 0 auto; }
.poster-portrait .poster-stage { width: min(100%, 820px, calc((100vh - 140px) * 210 / 297)); min-width: min(100%, 320px); }
.poster-sheet { box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.poster-toolbar { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.poster-toolbar [aria-current="page"] { border-color: var(--accent); }

@media print {
  html, body.poster { margin: 0; padding: 0; background: none; }
  .poster-stage, .poster-portrait .poster-stage { width: 297mm; min-width: 0; margin: 0; }
  .poster-portrait .poster-stage { width: 210mm; }
  .poster-sheet { width: 297mm; height: 210mm; aspect-ratio: auto; box-shadow: none; }
  .poster-portrait .poster-sheet { width: 210mm; height: 297mm; }
  .poster-toolbar { display: none; }
}

.spacer { margin-top: 1.1rem; }

/* -- contract (printable, light) ------------------------------------------- */

body.paper { background: #fff; color: #111; max-width: 52rem; margin: 0 auto; padding: 1.5rem 16px 3rem; }
.paper-toolbar { display: flex; gap: .6rem; margin-bottom: 1.5rem; }
.contract { line-height: 1.5; font-size: .95rem; }
.contract h1 { font-size: 1.45rem; margin-bottom: .2rem; overflow-wrap: anywhere; hyphens: auto; }
.contract-box .contract h1 { font-size: 1.15rem; }
.contract h2 { text-transform: none; letter-spacing: 0; color: #111; font-size: 1.05rem; margin: 1.5rem 0 .4rem; }
.contract-version { color: #555; margin-top: 0; }
.contract-party { border-left: 3px solid #999; padding-left: .8rem; }
.contract table { width: 100%; border-collapse: collapse; margin: .5rem 0; font-size: .88rem; }
.contract th, .contract td { border: 1px solid #ccc; padding: .4rem .5rem; text-align: left; vertical-align: top; }
.contract th { background: #f2f2f2; }
.contract ol { padding-left: 1.3rem; }
.contract-proof { color: #555; font-size: .78rem; word-break: break-all; margin-top: 2rem; border-top: 1px solid #ccc; padding-top: .6rem; }
.contract-box { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; max-height: 60vh; overflow: auto; }
.contract-box .contract h2, .contract-box .contract-proof, .contract-box .contract-version { color: var(--text); }
.contract-box .contract th { background: var(--surface-2); }
.contract-box .contract th, .contract-box .contract td { border-color: var(--border); }
/* On a phone the tables fit the box: long words break (with a hyphen where the browser can) */
.contract-box .contract th, .contract-box .contract td { overflow-wrap: anywhere; hyphens: auto; }
@media print {
  .paper-toolbar { display: none; }
  body.paper { padding: 0; }
  /* Paper pages print white to the edge (the dark scheme would colour the page margins) */
  :root:has(body.paper) { color-scheme: light; background: #fff; }
}

details { margin: .5rem 0; }
details summary { cursor: pointer; color: var(--muted); font-weight: 600; }
details ul { margin: .5rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: .9rem; }
details li { margin-bottom: .35rem; }
.pre { white-space: pre-line; }
.radios { display: grid; gap: .1rem; margin-bottom: .25rem; }
.progress { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; margin-top: .75rem; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.steps { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .75rem; }
.steps li { display: flex; gap: .75rem; align-items: flex-start; }
.steps li p { margin: .15rem 0 0; }
.step-mark { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); font-weight: 700; font-size: .9rem; }
.steps li.done .step-mark { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.steps li.done strong, .steps li.done strong a { color: var(--muted); }
details.faq { border-top: 1px solid var(--border); padding: .6rem 0; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin: .5rem 0 0; color: var(--muted); }
.faq-group + .faq-group { margin-top: 1.2rem; }
.faq-topic { margin: 0 0 .2rem; font-size: .92rem; font-weight: 700; color: var(--muted); }
.hero { position: relative; }
.lang-switch {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: 16px;
  font: inherit; font-size: .8rem; font-weight: 700;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .3rem .7rem; cursor: pointer; text-decoration: none;
}
.lang-switch:hover { border-color: var(--muted); }
select.lang-switch { width: auto; appearance: none; -webkit-appearance: none; text-align: center; padding: .3rem .7rem; }
input[type="radio"] { border-radius: 50%; }
.playlist-picker label.folder { font-weight: 600; }
/* Event tabs: all visible at once, no sideways scrolling; three per row on phones */
.event-tabs { flex-wrap: wrap; overflow: visible; }
@media (max-width: 640px) {
  .event-tabs { display: grid; grid-template-columns: repeat(3, 1fr); }
  .event-tabs .tab { padding: .5rem .3rem; font-size: .84rem; text-align: center; overflow: hidden; text-overflow: ellipsis; }
}
.label-short { display: none; }
@media (max-width: 640px) {
  .label-long { display: none; }
  .label-short { display: inline; }
}
/* Phones: the queue's tabs in one row, the other tabs under "Mehr" (admin.js renderTabs) */
.event-tabs.compact { display: block; }
/* The three keep their full width, "Mehr" takes the rest. While a name would not fit (fitTabs),
   Gespielt and Abgelehnt show icon and number ("iconic"), then "Mehr" drops its icon ("tight") */
.event-tabs.compact .tabs-row { display: flex; gap: .35rem; }
.event-tabs.compact .tabs-row > .tab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; }
.event-tabs.compact .tabs-row > .tab-more { flex: 1 1 auto; min-width: 0; }
.event-tabs.compact .tabs-row .count { margin-left: 0; }
.tab-icon { display: inline-flex; flex: none; }
.tab[data-iconic] .tab-icon { display: none; }
:is(.tabs-row.iconic .tab[data-iconic="1"], .tabs-row.tiny .tab[data-iconic="2"]) .tab-icon { display: inline-flex; }
:is(.tabs-row.iconic .tab[data-iconic="1"], .tabs-row.tiny .tab[data-iconic="2"]) .tab-label { display: none; }
:is(.tabs-row.iconic .tab[data-iconic="1"], .tabs-row.tiny .tab[data-iconic="2"]) { padding-left: .55rem; padding-right: .55rem; }
.tabs-row.tight .tab-more-icon { display: none; }
/* Only on the narrowest screens a long tab name still shortens itself; number, dot and caret stay */
.tab-more-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-more .count, .tab-more-caret, .tab-more-dot { flex: none; }
.tab-more-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); }
.tab-more-caret { opacity: .7; }
.tabs-more { margin-top: .5rem; padding: .6rem .7rem .7rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: .5rem; }
.tabs-group-title { margin: 0 0 .3rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
/* Two side by side with icon and the whole name ("Einstellungen" too) */
.tabs-group-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .35rem; }
.event-tabs .tab.tab-listed { display: inline-flex; align-items: center; justify-content: flex-start; gap: .45rem; padding: .55rem .6rem; text-align: left; }
.tab.tab-listed .tab-icon { opacity: .8; }

/* Emojis and the Lichtermeer's beat side by side: the toggles in one row, an open panel below
   both (the bars become "contents", so toggles and panels are the grid's own items) */
.live-bars { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: .5rem; margin: .5rem 0; }
.live-bars > .dj-emoji, .live-bars > .dj-light { display: contents; }
.live-bars > [hidden] { display: none; }
.live-bars .dj-emoji-toggle, .live-bars .dj-light-toggle { grid-row: 1; height: 100%; background: var(--surface); border-radius: var(--radius); }
.live-bars .dj-emoji-toggle { border: 1px solid var(--border); }
.live-bars .dj-light-toggle { border: 1px solid var(--border); }
.live-bars .dj-light.live .dj-light-toggle { border-color: var(--accent-line); }
.live-bars .dj-emoji-panel, .live-bars .dj-light-panel { grid-column: 1 / -1; background: var(--surface); border-radius: var(--radius); }
.live-bars .dj-emoji-panel { border: 1px solid var(--border); }
.live-bars .dj-light-panel { border: 1px solid var(--border); }
.live-bars:has(> .dj-emoji[hidden]) .dj-light-toggle, .live-bars:has(> .dj-light[hidden]) .dj-emoji-toggle { grid-column: 1 / -1; }
@media (max-width: 640px) {
  /* Only the emojis that came, then without the word (all zero: the word alone) */
  .live-bars .dj-emoji-count.zero { display: none; }
  .live-bars .dj-emoji-toggle:has(.dj-emoji-count:not(.zero)) .dj-emoji-label { display: none; }
  .live-bars .dj-emoji-counts { gap: .15rem .55rem; font-size: 1rem; }
  /* The beat's box as wide as its words, the emojis take the rest */
  .live-bars { grid-template-columns: minmax(0, 1fr) auto; }
  .live-bars .dj-light-state { white-space: nowrap; }
}

/* -- event head: open/closed switch ---------------------------------------- */
.event-head { display: flex; gap: 1rem; align-items: flex-start; }
.event-head .grow { flex: 1; min-width: 0; }
.event-head > .btn { flex: none; }
.event-head h1 { margin: .2rem 0 0; }
.back-link { font-size: .9rem; }
.event-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: 1rem; }
.open-switch {
  display: flex; align-items: center; gap: .8rem; flex: 1 1 260px; text-align: left;
  font: inherit; color: var(--text); cursor: pointer;
  background: rgba(239, 100, 100, .08); border: 1px solid rgba(239, 100, 100, .35);
  border-radius: var(--radius); padding: .7rem .9rem;
}
.open-switch.on { background: rgba(76, 195, 138, .08); border-color: rgba(76, 195, 138, .35); }
.switch-track {
  flex: none; position: relative; width: 3rem; height: 1.7rem; border-radius: 99px;
  background: #444; transition: background .2s;
}
.switch-knob {
  position: absolute; top: .2rem; left: .2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: #fff; transition: transform .2s;
}
.open-switch.on .switch-track { background: var(--ok); }
.open-switch.on .switch-knob { transform: translateX(1.3rem); }
.switch-text { display: grid; gap: .1rem; }
.switch-text strong { font-size: 1rem; }
.switch-text small { color: var(--muted); font-size: .8rem; }
.awake-badge { color: var(--muted); font-size: .8rem; }
/* "Push an" with its settings next to it, as one control; the panel below the row (admin.js pushPanel) */
.push-control { display: inline-flex; }
.push-control > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.push-control > .push-more { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; padding: .3rem .5rem; gap: .15rem; }
.push-more.on { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
.push-panel { margin-top: .75rem; padding: .8rem 1rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: grid; gap: .2rem; }
.push-panel-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.push-panel-head h3 { margin: 0; font-size: 1rem; }
.push-panel-head .btn.icon { width: 2.25rem; min-height: 2.25rem; }
.push-option { padding: .6rem 0; border-top: 1px solid var(--border); }
.push-panel-head + .push-option { border-top: 0; }
label.check.push-option { align-items: flex-start; margin: 0; }
label.check.push-option input { margin-top: .3rem; }
.push-option > span { display: grid; gap: .1rem; min-width: 0; }
.push-option small { color: var(--muted); font-size: .85rem; line-height: 1.35; }
.push-votes .chips { margin-top: .55rem; }
.push-votes .chip-toggle { min-height: 2.5rem; padding: .4rem .9rem; font: inherit; font-weight: 600; font-size: .92rem; line-height: 1.1; }
.push-votes .chip-toggle.on { color: var(--text); }
.push-panel-foot { margin: .4rem 0 0; }

/* -- booth mode: big and only what matters at the decks --------------------- */
body.booth .topbar, body.booth .back-link, body.booth .request-facts,
body.booth .request-when, body.booth > footer { display: none; }
body.booth main, body.booth #app { max-width: none; }
body.booth .event-head h1 { font-size: 1.4rem; }
body.booth .request { padding: 1.1rem 1.2rem; }
body.booth .request .track-title { font-size: 1.45rem; white-space: normal; }
body.booth .request .track-sub { font-size: 1.1rem; }
body.booth .request .votes { font-size: 1.4rem; min-width: 3rem; height: 3rem; }
body.booth .voters { font-size: 1rem; }
body.booth .request-actions .btn { font-size: 1.05rem; padding: .75rem 1.3rem; }
/* "Minimal" at the decks: big, still one row per wish */
body.booth .request.request-min { padding: .55rem .6rem .55rem 1rem; }
body.booth .request-min .track-title { font-size: 1.25rem; white-space: nowrap; }
body.booth .request-min .track-sub { font-size: 1rem; }
body.booth .request-min .btn.icon-only { width: 3.1rem; min-height: 3.1rem; font-size: 1.15rem; }
body.booth .hidden-toggle { font-size: 1.05rem; padding: .75rem 1rem; }

/* -- events list and create form ------------------------------------------- */
.create-row { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; }
.create-row .grow { flex: 1 1 220px; }
.create-row > div:not(.grow) { flex: 0 1 170px; }
.create-row label { margin-top: 0; }
.list-label { color: var(--muted); font-size: .88rem; font-weight: 600; margin: 1rem 0 .4rem; }
.list-label:first-of-type { margin-top: .25rem; }
.chevron { color: var(--muted); font-size: 1.4rem; line-height: 1; }
.logo-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
.logo-row .logo-preview { margin: 0; flex: 1 1 220px; }

/* settings: grouped sections */
.settings-group { border-top: 1px solid var(--border); margin-top: 1.4rem; padding-top: .4rem; }
.settings-group > h4 { margin: .6rem 0 .1rem; font-size: 1rem; }
.settings-group > .hint:first-of-type { margin-top: .2rem; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--surface) 35%); padding: 1rem 0 .25rem; }

/* -- report after an event (printable, light) ------------------------------- */
.report h1 { margin: .2rem 0; }
.report h2 { color: #111; font-size: 1.1rem; margin: 2rem 0 .75rem; text-transform: none; letter-spacing: 0; }
.report .muted { color: #666; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; border-bottom: 3px solid #111; padding-bottom: 1rem; }
.report-eyebrow { margin: 0; font-size: .85rem; font-weight: 600; color: #666; }
.report-logo { max-height: 56px; max-width: 200px; background: #111; padding: .5rem .8rem; border-radius: 8px; }
.report-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-top: 1.5rem; }
.report-stat { border: 1px solid #ddd; border-radius: 12px; padding: .9rem 1rem; display: grid; gap: .15rem; }
.report-stat strong { font-size: 1.8rem; }
.report-stat span { color: #555; font-size: .85rem; }
.report-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.report-table th { text-align: left; font-size: .82rem; font-weight: 600; color: #666; border-bottom: 1px solid #ccc; padding: .4rem .5rem; }
.report-table td { border-bottom: 1px solid #eee; padding: .5rem; vertical-align: top; }
.report-table td:first-child { width: 2rem; color: #666; }
.report-chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; border-bottom: 1px solid #ccc; }
.report-bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; padding-bottom: 1.2rem; }
.report-bar { width: 100%; max-width: 40px; background: #111; border-radius: 4px 4px 0 0; }
.report-bar-value { font-size: .72rem; color: #444; }
.report-bar-label { position: absolute; bottom: 0; font-size: .72rem; color: #666; }
.report-played { padding-left: 1.4rem; font-size: .92rem; }
.report-played li { margin: .2rem 0; }
.report-foot { margin-top: 2.5rem; font-size: .82rem; }
/* The polls guests voted in: question, total and each answer as a bar with its share */
.report-poll { border: 1px solid #ddd; border-radius: 12px; padding: .9rem 1rem 1rem; margin-bottom: .75rem; }
.report-poll-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem 1rem; margin-bottom: .6rem; }
.report-poll-head h3 { margin: 0; font-size: 1rem; color: #111; overflow-wrap: anywhere; }
.report-poll-head .muted { font-size: .85rem; white-space: nowrap; }
.report-poll-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.report-poll-row { display: flex; align-items: baseline; gap: .75rem; margin-bottom: .2rem; font-size: .92rem; }
.report-poll-option { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.report-poll-value { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-poll-value .muted { font-weight: 400; }
.report-poll-bars .top .report-poll-option { font-weight: 700; }
.report-poll-track { height: 10px; background: #eee; border-radius: 0 5px 5px 0; overflow: hidden; }
.report-poll-fill { display: block; height: 100%; width: 0; background: #888; border-radius: 0 5px 5px 0; }
.report-poll-bars .top .report-poll-fill { background: #111; }
/* Bars print as bars, even with "print backgrounds" off */
.report-poll-track, .report-poll-fill, .report-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
@media print { .report h2 { break-after: avoid; } .report-table tr, .report-poll { break-inside: avoid; } }

/* Guest: news about the guest's own wish */
.wish-news {
  position: sticky; top: max(8px, env(safe-area-inset-top)); z-index: 5; cursor: pointer;
  margin: 0 0 1rem; padding: .9rem 1rem; border-radius: var(--radius); font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .4); animation: news-in .35s ease-out;
  white-space: pre-line; /* several sent wishes at once, one per line */
}
.wish-news.ok { background: var(--accent); color: var(--on-accent); }
.wish-news.bad { background: var(--surface-2); border: 1px solid rgba(239, 100, 100, .45); }
.wish-news.info { background: var(--surface-2); border: 1px solid var(--accent); }
@keyframes news-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.report-head > div { min-width: 0; }
@media (max-width: 520px) { .report-head { flex-direction: column-reverse; } }
.install-steps { padding-left: 1.2rem; font-size: .88rem; color: var(--muted); }
.install-steps li { margin: .35rem 0; }
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; margin-top: .75rem; }
.download-box { border: 1px solid var(--border); border-radius: 14px; padding: .9rem; }
.download-box .install-steps { margin: .75rem 0 0; }

/* Subscription */
#billing-banner { max-width: 960px; margin: 1.25rem auto 0; padding: 0 16px; }
#billing-banner .notice { margin-bottom: 0; }
.abo-list { margin: .5rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.abo-list li { margin: .2rem 0; }
.install-card { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.install-card[hidden] { display: none; }

/* Login, sign-up, forgotten password */
.login .hint a, .login-links a { color: var(--text); }
.login-links { display: flex; flex-direction: column; align-items: center; gap: .45rem; margin: 1.1rem 0 0; color: var(--muted); font-size: .92rem; text-align: center; }
.login-signup { display: flex; flex-direction: column; align-items: center; gap: .3rem; margin: 1.25rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: .92rem; }
.login-signup strong { color: var(--text); font-size: 1rem; }
.login-signup .btn { margin-top: .5rem; text-decoration: none; }
.login label.check { margin-top: 1rem; font-size: .92rem; }
.login label.check a { color: var(--text); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.login .hint { margin-top: .9rem; }
.mail-tech { margin: .5rem 0 0; font-size: .85rem; word-break: break-word; }
.mail-tech code { font-family: ui-monospace, monospace; }

/* Tablet display: preview and settings */
.display-preview { position: relative; width: 100%; max-width: 560px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: #000; margin: .75rem 0; }
.display-frame { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; pointer-events: none; }
.display-qr { display: flex; align-items: center; gap: 1rem; margin-top: .75rem; }
.display-qr img { width: 140px; height: 140px; background: #fff; padding: 8px; border-radius: 10px; flex: none; }
.display-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-top: .75rem; }
.display-grid input[type="color"] { width: 100%; height: 2.4rem; padding: .15rem; margin-top: .4rem; }
/* The hint under the fields (Animation, Hintergrund, Sprache, Farbe) keeps clear of them */
.display-grid + .hint { margin-top: .9rem; }
.num-input { max-width: 7rem; }

/* -- host page (e.g. the bridal couple's list) ------------------------------ */

.host-intro { margin: 0 0 1rem; color: var(--muted); }
.host-section h2 { margin-top: 0; color: var(--text); font-size: 1.15rem; text-transform: none; letter-spacing: 0; }
.host-results { margin: .4rem 0 .2rem; }
.host-results:empty { display: none; }
/* Search results on the host lists: long titles wrap instead of being cut off */
.host-results .track-title, .host-results .track-sub { white-space: normal; overflow-wrap: anywhere; }
.host-results .track-main { min-width: 0; }
.host-list + .hint { margin-top: .6rem; }
.host-free { margin: .6rem 0 .2rem; }
.host-free summary { cursor: pointer; color: var(--accent-text); font-size: .92rem; }
.host-free-form { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
/* "Nicht gefunden? Selbst eintragen:" leads into the fields below it, like a label */
.host-free > .hint { margin: .9rem 0 .4rem; }
.host-free > .hint + .host-free-form { margin-top: 0; }
.host-free-form input { flex: 1 1 12rem; }
.host-list { margin-top: .8rem; }
.host-item { flex-wrap: wrap; }
.host-item .track-main { flex: 1 1 13rem; min-width: 0; }
.host-item .track-title, .host-item .track-sub { white-space: normal; }
.host-item-extra { display: flex; gap: .4rem; align-items: center; flex: 1 1 13rem; justify-content: flex-end; }
.host-note { flex: 1 1 10rem; padding: .45rem .7rem; font-size: .88rem; border-radius: 10px; }
.host-note-wide { min-height: 0; resize: vertical; line-height: 1.35; flex-basis: 16rem; }
.host-item.is-played .track-title { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .35); }
/* Songs from a Spotify or Apple Music playlist (host-playlist.js): the link, then every song to tick */
.host-import-body > .hint { margin: .2rem 0 .6rem; }
.host-import-form { display: flex; gap: .5rem; }
.host-import-form input { flex: 1 1 auto; min-width: 0; }
.host-import-form .btn { flex: none; }
.host-import-head { display: flex; align-items: flex-start; gap: .5rem; margin: 1rem 0 .2rem; scroll-margin-top: .5rem; }
.host-import-title { flex: 1 1 auto; min-width: 0; }
.host-import-head .host-link-btn { flex: none; margin: -.6rem -.65rem 0 0; }
.host-import-name { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.host-import-head .hint { margin: .15rem 0 0; }
.host-import-tools { display: flex; flex-wrap: wrap; gap: 0 .25rem; margin: 0 0 .3rem -.65rem; }
/* One row per song, the whole row ticks it (a label: without the form labels' spacing) */
.host-import-item { cursor: pointer; align-items: flex-start; margin: 0; color: var(--text); font-size: 1rem; }
.host-import-item input[type="checkbox"] { margin: .3rem .1rem 0 0; }
.host-import-item .track-title, .host-import-item .track-sub { white-space: normal; overflow-wrap: anywhere; }
.host-import-item.is-there { cursor: default; opacity: .6; }
.host-import-state { display: flex; gap: .35rem; align-items: baseline; margin-top: .25rem; color: var(--muted); font-size: .84rem; line-height: 1.3; }
.host-import-state.ok { color: var(--ok); }
/* The button to take the songs stays in reach under a long playlist */
.host-import-actions { position: sticky; bottom: 0; z-index: 1; margin-top: .5rem; padding: .7rem 0 .8rem;
  background: var(--surface); border-top: 1px solid var(--border); }
.host-import-actions .hint { margin: 0 0 .5rem; color: var(--warn); }
/* The hosts' own file for the first dance (host-dance.js) */
.host-dance-file:not(:empty) { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.host-dance-head { margin: 0 0 .4rem; font-size: 1rem; font-weight: 650; }
.host-dance-item .track-title, .host-dance-item .track-sub { white-space: normal; overflow-wrap: anywhere; }
.host-dance-icon { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  color: var(--accent-text); background: var(--accent-soft); font-size: 1.2rem; }
.host-dance-player { display: block; width: 100%; margin: .6rem 0 .2rem; }
.host-dance-actions { margin-top: .5rem; }
.host-dance-progress { margin: .6rem 0 0; }
.host-dance-progress .hint { margin: 0; }
/* Guided mode of the host page: welcome, progress, one step at a time, summary */
.host-modebar { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0 .25rem; margin: -.4rem 0 .3rem; }
.host-link-btn {
  font: inherit; font-weight: 600; font-size: .92rem; color: var(--accent-text); background: none; border: 0;
  min-height: 2.75rem; padding: .5rem .65rem; border-radius: 10px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.host-link-btn:hover { background: var(--surface-2); }
body.host :is(.btn, .host-link-btn, .chip-toggle, summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Headings take the focus on every step: for screen readers, no ring needed */
body.host h2[tabindex="-1"]:focus { outline: none; }
.host-welcome { border-left: 3px solid var(--accent); padding-top: 1.3rem; padding-bottom: 1.3rem; }
.host-welcome h2, .host-done h2, .host-summary-card h2 { margin: 0 0 .5rem; color: var(--text); font-size: 1.3rem; text-transform: none; letter-spacing: 0; }
.host-welcome-lead { margin: 0 0 1.1rem; color: #dadad5; font-size: 1.05rem; }
.host-welcome-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1.1rem; display: grid; gap: .65rem; }
.host-welcome-steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; column-gap: .7rem; align-items: center; }
.host-welcome-steps li::before {
  content: counter(step); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .9rem; color: var(--accent-text); background: var(--surface-2); border: 1px solid var(--border);
}
.host-welcome-steps strong { line-height: 1.25; }
.host-welcome-steps span { color: var(--muted); font-size: .88rem; line-height: 1.3; }
/* Each step of the welcome list leads right to it */
.host-welcome-step {
  display: grid; grid-template-columns: 1fr auto; column-gap: .5rem; align-items: center; width: 100%;
  margin: -.2rem -.35rem; padding: .2rem .35rem; font: inherit; color: inherit; text-align: left;
  background: none; border: 0; border-radius: 10px; cursor: pointer;
}
.host-welcome-step > :not(.host-welcome-go) { grid-column: 1; }
.host-welcome-step .host-welcome-go { grid-column: 2; grid-row: 1 / span 2; color: var(--muted); font-size: .95rem; margin-right: -.2rem; }
.host-welcome-step:hover { background: var(--surface-2); }
.host-welcome-step:hover strong { text-decoration: underline; text-underline-offset: 3px; }
body.host .host-welcome-step:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.host-welcome-actions { display: grid; gap: .6rem; justify-items: center; margin-top: 1.2rem; }
.host-welcome-actions .btn.block, .host-step-buttons .btn { min-height: 3rem; font-size: 1rem; }
.host-progress { margin: 0 0 .9rem; scroll-margin-top: .5rem; }
.host-progress-label { margin: 0 0 .45rem; font-weight: 700; font-size: .92rem; }
.host-progress-bar { display: flex; gap: 5px; }
.host-progress-bar i { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.host-progress-bar i.done { background: var(--accent); box-shadow: none; opacity: .6; }
.host-progress-bar i.current { background: var(--accent); box-shadow: none; }
.host-step-nav { margin: 1.2rem 0 0; }
.host-step-buttons { display: grid; grid-template-columns: 1fr 2fr; gap: .6rem; margin-top: 1rem; }
.host-skip { display: block; margin: .35rem auto 0; color: var(--muted); }
.host-done { text-align: center; padding: 1.4rem 1.2rem; border-color: rgba(76, 195, 138, .45); scroll-margin-top: .5rem;
  background: rgba(76, 195, 138, .07); }
.host-done p { margin: 0 auto; max-width: 30rem; color: #dadad5; }
.host-done-icon {
  width: 3.2rem; height: 3.2rem; margin: 0 auto .8rem; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 700; color: #052e1f; background: var(--ok);
}
.host-done.is-empty { border-color: var(--border); background: var(--surface); }
.host-done.is-empty .host-done-icon { color: var(--accent-text); background: var(--surface-2); }
.host-summary { list-style: none; padding: 0; margin: .9rem 0 0; display: grid; gap: .5rem; }
/* Mark, step and button in one row; what was entered below, as wide as it gets */
.host-summary-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .15rem .7rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .6rem .6rem .7rem .85rem;
}
.host-summary-mark {
  grid-column: 1; grid-row: 1; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
  font-size: .85rem; font-weight: 700; color: var(--ok); background: rgba(76, 195, 138, .14); border: 1px solid rgba(76, 195, 138, .45);
}
.host-summary-item.is-empty .host-summary-mark { background: transparent; border: 1px dashed var(--muted); }
.host-summary-item h3 { grid-column: 2; grid-row: 1; margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.host-summary-item .btn { grid-column: 3; grid-row: 1; }
.host-summary-lines { grid-column: 2 / 4; grid-row: 2; }
.host-summary-lines p { margin: .1rem 0 0; color: #dadad5; font-size: .9rem; overflow-wrap: anywhere; }
.host-summary-item.is-empty .host-summary-lines p { color: var(--muted); }
/* Big enough to hit with a thumb: most hosts are on their phone */
body.host .btn.small:not(.icon) { min-height: 2.75rem; padding: .45rem 1rem; }
body.host .btn.icon, body.host .genre-tags .btn.icon { width: 2.75rem; min-height: 2.75rem; padding: 0; }
body.host .chip-toggle { min-height: 2.75rem; padding: .5rem .9rem; }
body.host .host-free summary { padding: .7rem 0; }
body.host .host-free { margin: .2rem 0 0; }
body.host .host-moods label.check { min-height: 2.75rem; margin: 0; }
body.host .host-note { min-height: 2.75rem; }
/* Genre sliders (host link and the DJ's "Gastgeber" tab): five steps, colour follows the step */
.genre-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .5rem; }
/* A column: name and examples on top, the slider with its scale at the bottom (genre-control) -
   the cards of a grid row are equally tall, so their sliders line up */
.genre-row {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .6rem .8rem .4rem;
}
/* The step stays top right; a long name takes a second line instead */
.genre-head { display: flex; align-items: baseline; gap: .45rem; }
.genre-head strong { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.genre-tags { display: inline-flex; flex: none; align-items: center; gap: .4rem; margin-left: auto; }
.genre-control { margin-top: auto; padding-top: .3rem; }
.genre-tags .btn.icon { width: 2rem; min-height: 2rem; }
.genre-value { flex: none; font-size: .82rem; font-weight: 700; color: var(--muted); }
.genre-examples { color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.genre-row .step-range { --range-color: var(--muted); }
/* Five dots under the slider: one per step, right under the knob's stops (half a knob in) */
.genre-ticks { display: flex; justify-content: space-between; padding: 0 calc(var(--knob) / 2 - 2px); margin: .1rem 0 .15rem; }
.genre-ticks i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: .7; }
.genre-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: .74rem; }
.genre-row[data-level="-2"] { border-color: rgba(239, 100, 100, .55); }
.genre-row[data-level="-2"] .genre-value { color: var(--bad); }
.genre-row[data-level="-2"] .step-range, .genre-row[data-level="-1"] .step-range { --range-color: var(--bad); }
.genre-row[data-level="-1"] .genre-value { color: #f29a9a; }
.genre-row[data-level="1"] .genre-value { color: #8fdcb5; }
.genre-row[data-level="2"] { border-color: rgba(76, 195, 138, .55); }
.genre-row[data-level="2"] .genre-value { color: var(--ok); }
.genre-row[data-level="1"] .step-range, .genre-row[data-level="2"] .step-range { --range-color: var(--ok); }
.genre-add { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.genre-add input { flex: 1 1 12rem; }
.genre-sliders + .hint { margin-top: .7rem; }
/* The DJ's overview: the steps as rows of chips */
.genre-groups { display: grid; gap: .45rem; margin: .3rem 0 .6rem; }
.genre-group { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.genre-group > span:first-child { flex: none; min-width: 7.5rem; font-size: .85rem; font-weight: 700; }
.genre-group.l-2 > span:first-child { color: var(--bad); }
.genre-group.l-1 > span:first-child { color: #f29a9a; }
.genre-group.l1 > span:first-child { color: #8fdcb5; }
.genre-group.l2 > span:first-child { color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip-toggle {
  font: 600 .82rem/1 inherit; padding: .45rem .7rem; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.chip-toggle.on { color: var(--text); border-color: var(--bad); background: rgba(239, 100, 100, .12); }
/* A choice the hosts like (dinner styles): the accent instead of red */
.chip-toggle.pick.on { border-color: var(--accent); background: var(--accent-soft); }
.chip-toggle:disabled { opacity: .6; cursor: default; }
.host-fieldset { border: 0; padding: 0; margin: .5rem 0 .9rem; min-width: 0; }
.host-fieldset > legend { padding: 0; margin-bottom: .45rem; font-weight: 600; font-size: .92rem; color: var(--text); }
.host-moods { display: grid; gap: .1rem; }
.host-moods label.check { margin: .2rem 0; color: var(--text); }
.host-label { margin-top: 1rem; color: var(--text); font-weight: 600; }
.host-sections { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.2rem; margin: .8rem 0 .4rem; }
/* "Auf dem Link fragen:" and its "?" on one line */
.host-sections > p.hint { white-space: nowrap; }
.host-sections .hint { margin: 0; }
.host-sections label.check { margin: 0; font-size: .95rem; }
.dinner-summary { display: grid; gap: .5rem; margin-bottom: .6rem; }
.dinner-summary p { margin: 0; }
.host-check { display: flex; align-items: center; margin: 0; padding: 0 .3rem; cursor: pointer; }
.host-check input { transform: scale(1.5); }
.host-moment { font-size: .85rem; color: var(--accent-text); margin-top: .15rem; }
.host-badges:empty { display: none; }
.host-badges { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .25rem; }
.demo-note { margin: .6rem 0 0; font-size: .88rem; }
/* The display card's full-screen help (same text as on the display itself) */
.display-help { margin: .9rem 0 .2rem; border: 1px solid var(--border); border-radius: 12px; padding: .7rem .9rem; background: var(--surface-2); }
.display-help > summary { cursor: pointer; font-weight: 700; color: var(--accent-text); }
.display-help[open] > summary { margin-bottom: .7rem; }
.dh-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.dh-tab {
  font: 600 .85rem/1 inherit; padding: .5rem .85rem; border-radius: var(--radius-sm); cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--border);
}
.dh-tab[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.dh-panel[hidden] { display: none; }
.dh-title { margin: 0 0 .2rem; font-size: .98rem; }
.dh-intro, .dh-note { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; }
.dh-steps { margin: 0 0 .6rem; padding-left: 1.3rem; display: grid; gap: .4rem; font-size: .92rem; line-height: 1.45; }
.demo-note .demo-fresh { margin-left: .2rem; vertical-align: middle; }

/* -- setup assistant ------------------------------------------------------ */

.wizard { max-width: 640px; margin: 0 auto; }
.wizard h2 { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 1.35rem; margin-top: 1.2rem; }
.wizard-steps { display: flex; gap: .4rem; list-style: none; padding: 0; margin: .4rem 0 0; flex-wrap: wrap; }
.wizard-steps li { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted); padding: .3rem .6rem .3rem .3rem; border-radius: var(--radius-sm); background: var(--surface-2); }
.wizard-steps li span { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--border); color: var(--text); font-weight: 700; font-size: .75rem; }
.wizard-steps li.current { color: var(--text); }
.wizard-steps li.current span { background: var(--accent); color: var(--on-accent); }
.wizard-steps li.done span { background: var(--ok); color: #0c2a1b; }
.wizard-choices { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 1rem 0; }
.wizard-choice { display: block; padding: 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-decoration: none; }
.wizard-choice:hover { border-color: var(--border-strong); }
.wizard-choice strong { display: block; margin-bottom: .3rem; }
.wizard-choice span { color: var(--muted); font-size: .9rem; }
.wizard-list { padding-left: 1.2rem; line-height: 1.6; }
.wizard input[type="color"] { width: 4rem; height: 2.6rem; padding: .2rem; }

/* Guest page: first-visit explanation, bigger buttons on small phones */
.intro-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; margin: .9rem 0 1rem; }
.intro-card h2 { margin: 0 0 .4rem; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 1rem; }
.intro-card ol { margin: 0 0 .7rem; padding-left: 1.2rem; line-height: 1.5; font-size: .95rem; }
.intro-card li { margin: .15rem 0; }
/* On the home screen (guest.js) */
.home-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem .9rem; margin: .9rem 0 1rem; }
.home-card-row { display: flex; align-items: flex-start; gap: .6rem; }
.home-card-icon { flex: none; width: 1.45rem; height: 1.45rem; margin-top: .05rem; color: var(--accent-text); }
.home-card-text { flex: 1; margin: 0 0 .7rem; font-size: .95rem; line-height: 1.45; }
.home-card-close { flex: none; margin: -.35rem -.5rem 0 0; }
.home-steps { margin: .75rem 0 0; padding-left: 1.2rem; font-size: .92rem; line-height: 1.5; }
.home-steps li { margin: .25rem 0; }
.home-steps .icon { vertical-align: -.2em; margin-right: .3rem; color: var(--accent-text); }
.home-note { margin: .55rem 0 0; font-size: .85rem; color: var(--muted); }
@media (max-width: 480px) {
  body.guest .track-actions .btn, body.guest .dialog-actions .btn { min-height: 2.9rem; padding-left: 1.05rem; padding-right: 1.05rem; }
  body.guest .tab { min-height: 2.6rem; }
}
.free-box { margin-top: .5rem; }
.free-box summary { cursor: pointer; color: var(--accent-text); font-size: .88rem; }
.free-box input[type="date"] { width: auto; padding: .4rem .6rem; }

/* -- feedback button on DJ pages -------------------------------------------- */
.fb-button {
  position: fixed; right: 14px; bottom: 14px; z-index: 30; cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem;
  font: 600 .82rem/1 system-ui, sans-serif; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .55rem .85rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4); opacity: .85;
}
.fb-button:hover { opacity: 1; border-color: var(--border-strong); }
/* Phones: only the bubble, so it covers less */
@media (max-width: 600px) { .fb-button { padding: .6rem; font-size: 1.05rem; } .fb-label { display: none; } }
.fb-dialog { width: min(92vw, 30rem); }
.fb-dialog h3 { margin-top: 0; }
.fb-hint { color: var(--muted); font-size: .88rem; margin: 0 0 .8rem; }
.fb-kinds { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.fb-kind { display: inline-flex; align-items: center; gap: .35rem; font: 600 .85rem/1 inherit; padding: .5rem .75rem; border-radius: var(--radius-sm); cursor: pointer; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.fb-kind[aria-pressed="true"] { color: var(--text); border-color: var(--accent); }
.fb-status { min-height: 1.2em; font-size: .88rem; color: var(--muted); margin: .4rem 0 0; }
.fb-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: .8rem; }
@media print { .fb-button { display: none; } }
.feedback-item { border-top: 1px solid var(--border); padding: .8rem 0; }
.feedback-item:first-child { border-top: 0; }
.feedback-text { white-space: pre-wrap; margin: .5rem 0 .2rem; }

/* "Wird gleich gespielt": dashboard, guest page */
.request.is-next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.btn.next-toggle { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.btn.next-toggle[aria-pressed="true"] { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.badge.next { color: var(--on-accent); background: var(--accent); border-color: transparent; }
.track.is-next { border-color: var(--accent); }
.track-next { margin-top: .2rem; font-size: .82rem; font-weight: 700; color: var(--accent-text); }

/* Merging two wishes */
.merge-dialog { width: min(92vw, 34rem); }
.merge-dialog h3 { margin-top: 0; overflow-wrap: anywhere; }
.merge-list { display: grid; gap: .4rem; max-height: 55vh; overflow-y: auto; margin: .5rem 0 .75rem; }
.merge-option {
  display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; font: inherit; color: inherit;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .55rem .7rem; cursor: pointer;
}
.merge-option:hover, .merge-option.is-suggested { border-color: var(--accent); }
.merge-option .votes { flex: none; background: var(--surface); }
.merge-text { flex: 1; min-width: 0; display: grid; }
.merge-text strong, .merge-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merge-text small { color: var(--muted); }
.merge-option .badge { flex: none; }
button.merge-hint { cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; white-space: normal; text-align: left; }

/* "DJ für deine Feier?" above the guest page footer */
.dj-promo { max-width: 640px; margin: 1.5rem auto 0; padding: 0 16px; text-align: center; }
.dj-promo-title { margin: 0; font-weight: 700; }
.dj-promo-links { margin: .35rem 0 0; display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem .9rem; }
.dj-promo-links a { color: var(--accent-text); text-decoration: none; font-weight: 600; }
.dj-promo-links a:hover { text-decoration: underline; }
.promo-example { background: var(--surface-2); border-radius: 12px; padding: .7rem .9rem; text-align: center; line-height: 1.6; color: var(--accent-text); }
.promo-example strong { color: var(--text); }
.promo-example.off { opacity: .45; }

/* Invoices */
.invoice-list { display: grid; gap: .4rem; margin-top: .6rem; }
.invoice-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--surface-2); border-radius: 12px; padding: .55rem .75rem; }
.invoice-main { flex: 1 1 12rem; min-width: 0; display: grid; }
.invoice-sub { color: var(--muted); font-size: .85rem; }
.invoice-settings { display: grid; gap: .8rem; margin: .8rem 0 1.2rem; }

/* Empfehlen */
.ref-url span { font-size: .95rem; color: var(--text); white-space: normal; overflow-wrap: anywhere; }
.ref-card .ref-actions + .hint { margin-top: 1rem; }
.ref-actions { flex-wrap: wrap; margin-top: .8rem; }
.ref-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: .4rem 0 .8rem; }
.ref-stat { background: var(--surface-2); border-radius: 12px; padding: .7rem .8rem; display: grid; gap: .15rem; }
.ref-stat strong { font-size: 1.6rem; line-height: 1.1; }
.ref-stat span { color: var(--muted); font-size: .85rem; }
@media (max-width: 560px) { .ref-stats { grid-template-columns: 1fr; } .ref-stat { grid-template-columns: auto 1fr; align-items: baseline; gap: .6rem; } }
.ref-teaser { border-color: var(--accent); }
.invite-note { font-weight: 600; }

/* Stripe check (status page) */
.stripe-head { font-weight: 700; margin: .2rem 0 .8rem; }
.stripe-head.ok, .stripe-head.info { color: var(--ok); }
.stripe-head.warn { color: var(--warn); }
.stripe-head.error { color: var(--bad); }
.stripe-list { display: grid; gap: .5rem; margin-bottom: .8rem; }
.stripe-item { background: var(--surface-2); border-radius: 12px; padding: .65rem .8rem; border-left: 3px solid var(--border); }
.stripe-item.ok { border-left-color: var(--ok); }
.stripe-item.warn { border-left-color: var(--warn); }
.stripe-item.error { border-left-color: var(--bad); }
.stripe-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.stripe-item p { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.stripe-item a { display: inline-block; margin-top: .35rem; font-size: .88rem; color: var(--text); }

/* The host's things among the guests' wishes: gold, so they stand apart */
.badge.host { color: var(--warn); border-color: rgba(233, 185, 73, .55); background: rgba(233, 185, 73, .08); font-weight: 700; }
.host-flags { display: flex; flex-wrap: wrap; gap: .35rem; }
.host-banner {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap;
  margin: 0 0 .7rem; padding: .7rem 1rem; border-radius: var(--radius); text-decoration: none;
  font-weight: 700; color: var(--warn); background: rgba(233, 185, 73, .1); border: 1px solid rgba(233, 185, 73, .45);
}
.host-banner:hover { background: rgba(233, 185, 73, .16); }
.host-banner-go { font-weight: 600; }

/* -- Statistik: tiles, ranked bars, columns by hour (single series: the accent, no legend) -- */
.stats-years { margin: .2rem 0 1rem; }
.stats-years .chip-toggle { text-decoration: none; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; }
.stat-label { color: var(--muted); font-size: .85rem; }
.stat-value { font-size: 1.7rem; font-weight: 700; line-height: 1.2; margin-top: .15rem; }
.stat-sub { color: var(--muted); font-size: .8rem; margin-top: .1rem; }
.stat-card h3 { margin-bottom: .2rem; }
.stat-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 0 1rem; }
.stat-pair > .card { margin-top: 0; }
.stat-bars { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .7rem; counter-reset: rank; }
.stat-bars li { counter-increment: rank; display: grid; gap: .25rem; }
.stat-bar-label { display: flex; flex-wrap: wrap; gap: 0 .5rem; align-items: baseline; font-size: .92rem; }
.stat-bar-name::before { content: counter(rank) ". "; color: var(--muted); }
.stat-bar-name { font-weight: 600; overflow-wrap: anywhere; }
.stat-bar-sub { color: var(--muted); font-size: .8rem; }
.stat-bar-track { display: flex; align-items: center; gap: .5rem; }
.stat-bar { display: block; height: 12px; background: var(--accent); border-radius: 0 4px 4px 0; flex: none; max-width: calc(100% - 3.5rem); }
.stat-bar-value { color: var(--text); font-size: .85rem; font-variant-numeric: tabular-nums; }
.stat-columns { display: flex; align-items: flex-end; gap: 2px; height: 12rem; margin: 1.2rem 0 .3rem; padding-top: 1.2rem; border-bottom: 1px solid var(--border); }
.stat-col { position: relative; flex: 1 1 0; height: 100%; display: flex; flex-direction: column; align-items: center; outline: none; }
.stat-col-plot { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.stat-col-bar { display: block; width: min(24px, 70%); background: var(--accent); border-radius: 4px 4px 0 0; }
.stat-col-value { font-size: .8rem; color: var(--text); margin-bottom: .2rem; font-variant-numeric: tabular-nums; }
.stat-col-label { position: absolute; bottom: -1.4rem; font-size: .75rem; color: var(--muted); }
.stat-col:hover .stat-col-bar, .stat-col:focus-visible .stat-col-bar { filter: brightness(1.2); }
.stat-tip {
  position: absolute; bottom: calc(100% + .3rem); left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 3;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: .8rem;
  padding: .3rem .55rem; border-radius: 8px; pointer-events: none; display: none;
}
/* Only there while shown: a hidden tip at the edge would widen the page on a phone */
.stat-col:hover .stat-tip, .stat-col:focus-visible .stat-tip { display: block; }
.stat-col:nth-child(-n+3) .stat-tip { left: 0; transform: none; }
.stat-col:nth-last-child(-n+3) .stat-tip { left: auto; right: 0; transform: none; }
.stat-table-toggle { margin-top: 1.8rem; }
.stat-table-toggle > summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.table-scroll { overflow-x: auto; margin-top: .6rem; }
.stat-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.stat-table th, .stat-table td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.stat-table th { color: var(--muted); font-weight: 600; font-size: .82rem; }
.stat-table td.num { font-variant-numeric: tabular-nums; }
.stat-list { margin: .6rem 0 0; padding-left: 1.3rem; display: grid; gap: .3rem; }
.missing-list { gap: .7rem; }
.missing-hit { overflow-wrap: anywhere; }
.missing-shops { display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: .85rem; margin-top: .15rem; }
.missing-actions { margin-top: .8rem; gap: .5rem; flex-wrap: wrap; }
.software-info { margin-top: .7rem; }
.software-ask { border-color: var(--accent); }
.software-ask .chips { margin: .7rem 0 .2rem; }
/* Event list: long names and the counts wrap instead of being cut off (phones) */
.event-row .track-title, .event-row .track-sub { white-space: normal; overflow-wrap: anywhere; }
.pair-box { margin: .4rem 0 1rem; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.pair-box > p { margin: 0 0 .6rem; }
.pair-code { font: 700 2rem/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .12em; margin: .8rem 0 .3rem; color: var(--text); }
.pair-out .hint { margin: .2rem 0; }
.host-reminder { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.host-reminder .row { margin: 0; }
/* "Event übergeben" (handover.py): a request from another DJ on the events page, the card in the
   event's settings, the notes about the answers and the line under the event's name */
.handover-request { border-color: var(--accent-line); }
.handover-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .55rem; }
.handover-head .icon { width: 1.4em; height: 1.4em; color: var(--accent-text); }
.handover-head h3 { margin: 0; }
.handover-request > p:not(.hint) { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.handover-event { background: var(--surface-2); border-radius: 12px; padding: .7rem 1rem; margin-bottom: .75rem; }
.handover-event .track-title, .handover-event .track-sub { white-space: normal; overflow-wrap: anywhere; }
.handover-note {
  margin: 0 0 .85rem; padding: .5rem .85rem; border-left: 3px solid var(--border-strong);
  color: var(--text); white-space: pre-line; overflow-wrap: anywhere;
}
.handover-facts {
  margin: 1rem 0 .2rem; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--muted); font-size: .9rem;
}
.handover-facts p { margin: 0 0 .55rem; }
.handover-facts p:last-child { margin: 0; }
.handover-facts strong { color: var(--text); }
label.check.handover-consent { align-items: flex-start; margin-top: 1rem; }
label.check.handover-consent input { margin-top: .3rem; }
.handover-waiting, .handover-received { margin: 0 0 .7rem; overflow-wrap: anywhere; }
.handover-waiting .badge { margin-right: .3rem; }
.handover-received .icon { color: var(--accent-text); }
.handover-outcome { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.handover-outcome > span { flex: 1 1 16rem; overflow-wrap: anywhere; }
.event-handover { font-size: .88rem; margin-top: .15rem; }
/* Status page: search peaks per customer and event */
.status-table.peaks .peak-customer th { padding-top: .8rem; text-align: left; color: var(--text); }
.status-table.peaks td.num { white-space: nowrap; font-weight: 700; }
.table-wrap { overflow-x: auto; }
/* Profile: two-factor login (authenticator app) */
.notice.ok { background: rgba(76, 195, 138, .1); border-color: rgba(76, 195, 138, .35); color: var(--ok); }
.totp-steps { margin: 0; padding-left: 1.3rem; display: grid; gap: 1.1rem; }
.totp-steps li::marker { font-weight: 700; color: var(--muted); }
.totp-steps li > strong { display: block; margin-bottom: .35rem; }
.totp-steps .hint { margin: 0 0 .6rem; }
.totp-qr { width: min(100%, 220px); padding: .6rem; margin: .2rem 0 .8rem; }
.totp-link { margin: .2rem 0 .8rem; }
.totp-secret {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
  background: var(--surface-2); border-radius: 12px; padding: .6rem .6rem .6rem .9rem;
}
.totp-secret code {
  flex: 1 1 15rem; min-width: 0; overflow-wrap: anywhere; user-select: all;
  font: 600 1rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .03em; word-spacing: .2em;
}
.totp-state { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; color: var(--muted); }
.totp-change { margin-top: .8rem; }
.totp-change form { margin-top: .6rem; }
.recovery-sheet { background: var(--surface-2); border-radius: 12px; padding: .8rem 1rem; }
.recovery-title { margin: 0 0 .5rem; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.recovery-codes {
  list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1.5rem;
  font: 600 1.05rem/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .04em; user-select: all;
}
/* "Drucken" on the recovery codes: only their copy in <body> goes on paper, in black */
.recovery-print { display: none; }
@media print {
  html.print-codes body { background: #fff; color: #000; }
  html.print-codes body > * { display: none !important; }
  html.print-codes body > .recovery-print { display: block !important; padding: 1cm; }
  .recovery-print h1 { font-size: 1.3rem; margin: 0 0 .3rem; }
  .recovery-print ul { list-style: none; padding: 0; margin: 1rem 0; columns: 2; font: 600 1.1rem/2 ui-monospace, Menlo, Consolas, monospace; }
}

/* -- small "?" explanations next to settings (dashboard) --------------------------- */
.tip-row { display: flex; align-items: flex-start; gap: .45rem; margin: .9rem 0 .35rem; }
.tip-row > label { margin: 0; flex: 0 1 auto; min-width: 0; }
.tip-row > .tip-wrap { margin-top: .05rem; }
.tip-wrap { position: relative; display: inline-block; vertical-align: middle; line-height: 1; flex: none; }
.tip {
  position: relative; display: inline-grid; place-items: center;
  width: 1.45rem; height: 1.45rem; padding: 0; border-radius: 50%; cursor: pointer;
  font: 700 .8rem/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
}
/* A bigger area to tap than the circle shows */
.tip::after { content: ""; position: absolute; inset: -.3rem; border-radius: 50%; }
.tip:hover, .tip[aria-expanded="true"] { color: var(--text); border-color: var(--border-strong); }
.tip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tip-bubble {
  position: absolute; top: calc(100% + .6rem); left: 0; z-index: 30; display: block;
  width: 18rem; max-width: calc(100vw - 32px); padding: .7rem .85rem .55rem;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
  font: 400 .88rem/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: left; text-transform: none; letter-spacing: 0; white-space: normal;
}
.tip-bubble::before {
  content: ""; position: absolute; top: -.4rem; left: calc(var(--tip-arrow, 1rem) - .4rem);
  width: .7rem; height: .7rem; background: var(--surface-2);
  border-left: 1px solid var(--border-strong); border-top: 1px solid var(--border-strong); transform: rotate(45deg);
}
.tip-bubble.above { top: auto; bottom: calc(100% + .6rem); }
.tip-bubble.above::before { top: auto; bottom: -.4rem; transform: rotate(225deg); }
.tip-bubble > span { display: block; }
.tip-off {
  display: block; margin: .45rem 0 0 auto; padding: .15rem 0; font: inherit; font-size: .8rem;
  color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.tip-off:hover { color: var(--text); }
h3 .tip-wrap, h4 .tip-wrap { margin-left: .15rem; vertical-align: .1em; }
.hint .tip-wrap { vertical-align: -.3em; }

/* -- event assistant ("Neues Event") -------------------------------------------- */
.kind-choices { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); margin: .4rem 0 .9rem; }
.kind-choice {
  display: flex; align-items: center; gap: .6rem; min-height: 3.4rem; padding: .7rem .9rem;
  font: inherit; font-weight: 700; font-size: 1rem; text-align: left; color: var(--text); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s, transform .1s;
}
.kind-choice:hover { border-color: var(--border-strong); }
.kind-choice:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.kind-icon { display: inline-flex; font-size: 1.5rem; line-height: 1; color: var(--accent-text); }
.wizard .kind-choices { grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); margin: 1rem 0; }
.wizard .kind-choice { min-height: 4.2rem; font-size: 1.05rem; }
.quick-create { margin-top: .2rem; }
.quick-create > summary { cursor: pointer; color: var(--accent-text); font-weight: 600; font-size: .95rem; padding: .3rem 0; }
.quick-create[open] > summary { margin-bottom: .5rem; }
.quick-create .hint { margin: .1rem 0 .2rem; }
.event-wizard h2:focus { outline: none; }
.event-wizard .field-hint { margin: .45rem 0 0; }
.event-wizard-what { margin: -.2rem 0 .6rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.event-wizard-what .icon, .event-wizard h2 .icon { color: var(--accent-text); }
.preset-group { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .3rem; }
.preset-group > h3 { font-size: 1rem; margin: .7rem 0 .2rem; }
.preset-line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; padding: .6rem 0; }
.preset-line + .preset-line { border-top: 1px dashed var(--border); }
.preset-line.sub { margin-left: 1.1rem; padding-left: .8rem; border-left: 2px solid var(--border); border-top: 0; }
.preset-text { flex: 1 1 13rem; min-width: 0; }
.preset-text label { margin: 0; color: var(--text); font-size: 1rem; font-weight: 600; cursor: pointer; }
.preset-text p { margin: .15rem 0 0; color: var(--muted); font-size: .88rem; }
.preset-mark {
  display: inline-block; margin-left: .45rem; padding: .1rem .45rem; border-radius: 5px; vertical-align: .1em;
  font-size: .72rem; font-weight: 700; color: var(--accent-text); border: 1px solid var(--accent-line);
}
.preset-actions { margin-top: 1rem; }
.preset-actions + .hint { margin-top: .7rem; }
/* Yes/no as a switch: a native checkbox (role=switch), drawn with gradients only */
input.switch {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0 0 0 auto; padding: 0; cursor: pointer;
  width: 3rem; height: 1.75rem; border-radius: 999px; border: 1px solid var(--border); transform: none;
  background: var(--border) radial-gradient(circle, #fff 0 .62rem, transparent .66rem) no-repeat;
  background-size: 1.5rem 1.5rem; background-position: .1rem center;
  transition: background-color .15s, background-position .15s;
}
input.switch:checked { background-color: var(--ok); border-color: var(--ok); background-position: calc(100% - .1rem) center; }
input.switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.stepper { display: flex; align-items: center; gap: .35rem; margin-left: auto; flex: none; }
.stepper .btn.icon { width: 2.4rem; min-height: 2.4rem; font-size: 1.15rem; }
.stepper-input { width: 4rem; text-align: center; padding: .45rem .3rem; -moz-appearance: textfield; }
.stepper-input::-webkit-inner-spin-button, .stepper-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.next-steps .wizard-choices { margin-top: .6rem; }
.next-slot:empty { display: none; }
.next-step { width: 100%; height: 100%; font: inherit; text-align: left; cursor: pointer; }
.next-step:disabled { opacity: .6; cursor: progress; }
.next-step strong { font-size: 1rem; }
.test-link:empty { display: none; }
.test-link { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .4rem; }
.test-link .qr-preview { width: 9.5rem; padding: .5rem; }
.test-link .hint { flex: 1 1 14rem; margin: 0; }
/* Own presets of the event assistant in the profile */
.own-presets .hint { margin: 1rem 0 .4rem; }
.own-preset { gap: .4rem; color: var(--text); }
.chip-remove { font: inherit; font-size: .8rem; line-height: 1; padding: .1rem .2rem; color: var(--muted); background: none; border: 0; cursor: pointer; }
.chip-remove:hover { color: var(--bad); }

/* -- test link ("Als Gast ausprobieren") and Probe-Abend ------------------ */

/* The guest page opened with a test link: always in view, so nobody takes it for the real one */
.test-banner {
  position: sticky; top: .5rem; z-index: 5; margin: 0 0 1rem; font-weight: 600;
  background: var(--surface-2); border-color: var(--border-strong); border-style: dashed; color: var(--text);
}
.badge.test { color: var(--text); border-color: var(--border-strong); border-style: dashed; background: transparent; font-weight: 700; }
.request.is-test { border-style: dashed; border-color: var(--border-strong); }
.test-try .row { margin-top: .6rem; }
.test-try-result { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.test-try-result .qr-preview { width: min(100%, 200px); padding: .7rem; }
.test-try-result .test-try-text { flex: 1 1 14rem; min-width: 0; }
.test-try-result .url-box span { font-size: .8rem; }
.empty-try .empty { padding-bottom: .5rem; }
.demo-note { margin: .8rem 0 0; }
.rehearsal-box { margin: .6rem 0 0; }
/* At the decks only the Probe-Abend's state and its button */
body.booth .demo-note .demo-intro, body.booth .rehearsal-text { display: none; }
body.booth .demo-note .rehearsal-box { margin-top: 0; }
.rehearsal-box .row { margin-top: .5rem; gap: .5rem; }
.rehearsal-progress { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: .5rem; }
.rehearsal-progress span { display: block; height: 100%; background: var(--accent); transition: width .6s ease; }

/* -- Packliste: the event's tab, templates in the profile, reminder on the dashboard -- */

.pack-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .5rem .75rem; }
.pack-head .grow { flex: 1 1 12rem; min-width: 0; }
.pack-head h3 { margin-bottom: .2rem; }
.pack-source { margin: 0 0 .2rem; }
.pack-mode { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin: .8rem 0; }
.pack-mode-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
  min-height: 3.1rem; padding: .45rem .5rem; font: inherit; color: var(--muted); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
}
.pack-mode-btn small { font-size: .78rem; }
.pack-mode-btn.on { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.pack-mode-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pack-progress { margin: .2rem 0 .7rem; }
.pack-progress-text { font-size: 1.05rem; }
.pack-progress-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: .4rem; }
.pack-progress-bar span { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }
.pack-progress.complete .pack-progress-bar span { background: var(--ok); }
.pack-all { color: var(--ok); font-weight: 600; margin: 0 0 .6rem; }
.pack-group { margin-top: 1.1rem; }
.pack-group-title {
  display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin: 0 0 .45rem;
  font-size: .9rem; font-weight: 700; color: var(--muted);
}
.pack-group-count { font-variant-numeric: tabular-nums; }
.pack-group-count.complete { color: var(--ok); }
.pack-items { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
/* Big rows for the thumb: the whole row ticks */
.pack-item {
  display: flex; align-items: center; gap: .85rem; min-height: 3.2rem; margin: 0; padding: .55rem .85rem;
  font-size: 1.02rem; color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
}
.pack-item input[type="checkbox"] { width: 1.65rem; height: 1.65rem; margin: 0; transform: none; cursor: pointer; }
.pack-item span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pack-item.ticked { background: transparent; border-color: rgba(76, 195, 138, .35); }
.pack-item.ticked span { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(166, 166, 159, .7); }
.pack-edit-line { display: flex; gap: .35rem; align-items: center; }
.pack-edit-line :is(input, textarea) { flex: 1; min-width: 0; padding: .55rem .7rem; }
.pack-edit-line textarea { min-height: 0; resize: none; overflow: hidden; line-height: 1.35; display: block; }
.btn.pack-icon { flex: none; width: 2.4rem; min-height: 2.4rem; font-size: 1rem; }
.pack-edit-hint { margin: .6rem 0 0; }
.pack-add { margin-top: 1.3rem; }
.pack-add label { margin-top: 0; }
.pack-add-row { display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr) auto; gap: .5rem; }
@media (max-width: 560px) {
  .pack-add-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pack-add-row select { grid-column: 1 / -1; }
}
.pack-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.pack-actions .btn { white-space: normal; text-align: center; }
.pack-other { margin-top: 1.1rem; }
.pack-other > summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: .92rem; }
.pack-other[open] > summary { margin-bottom: .5rem; }
.pack-templates-hint { margin: 1rem 0 0; }
.pack-reminder { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.pack-reminder.done { background: rgba(76, 195, 138, .08); border-color: rgba(76, 195, 138, .35); color: var(--ok); }
/* Templates in the profile */
.pack-kinds { margin: .2rem 0 .7rem; }
.pack-kinds .chip-toggle { min-height: 2.4rem; }
.pack-template-state { margin: 0 0 .7rem; color: var(--muted); font-size: .9rem; }
.pack-edit-group { border: 1px solid var(--border); border-radius: 12px; padding: .6rem; margin: 0 0 .7rem; min-width: 0; }
.pack-edit-name input { font-weight: 700; }
.pack-edit-items { list-style: none; margin: .45rem 0; padding: 0 0 0 .7rem; display: grid; gap: .3rem; }
@media (max-width: 560px) {
  .pack-edit-group { padding: .5rem; }
  .pack-edit-items { padding-left: 0; }
  .pack-edit-line { gap: .25rem; }
  .btn.pack-icon { width: 2.2rem; min-height: 2.2rem; }
}

/* -- on-site contacts ("Kontakte vor Ort"): the dashboard's tab and the host link's step -- */
.contact-list { display: grid; gap: .5rem; }
.contact-list + .hint { margin-top: .8rem; }
.contact-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .75rem .9rem;
}
.contact-main { flex: 1 1 14rem; min-width: 0; }
.contact-name { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; overflow-wrap: anywhere; }
.contact-phone { display: inline-block; margin-top: .25rem; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--text); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.contact-add > summary { cursor: pointer; font-weight: 700; color: var(--accent-text); }
.contact-add[open] > summary { margin-bottom: .3rem; }
.contact-roles, .host-contact-roles { margin-top: .5rem; }
/* At the decks: big names and buttons, nothing to read around them */
body.booth .contact-extra { display: none; }
body.booth .contact-name strong { font-size: 1.3rem; }
body.booth .contact-phone { font-size: 1.2rem; }
body.booth .contact-actions { flex: 1 1 100%; }
body.booth .contact-actions a.btn { flex: 1 1 8rem; font-size: 1.05rem; padding: .7rem 1.2rem; min-height: 3rem; }
.host-contacts-consent { margin: .6rem 0 .2rem; font-size: .92rem; }
.host-contact-form { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .4rem; }
.host-contact-form h3 { margin: .6rem 0 0; font-size: 1rem; }
.host-contact-form .host-label { display: block; margin: .8rem 0 .35rem; }
.host-contact .track-sub { overflow-wrap: anywhere; }

/* -- run of show ("Ablauf", timeline.js): the DJ's tab, the hosts' step, the bar on top ----- */
.tl-list { margin-top: .4rem; }
.tl-item { align-items: flex-start; flex-wrap: wrap; }
.tl-item .host-check { align-self: center; }
.tl-when { flex: none; width: 3.4rem; display: grid; line-height: 1.15; padding-top: .1rem; }
.tl-clock { font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tl-night { color: var(--muted); font-size: .72rem; }
.tl-item .track-main { flex: 1 1 9rem; }
.tl-title { font-weight: 600; overflow-wrap: anywhere; }
.tl-song { color: var(--accent-text); font-size: .9rem; overflow-wrap: anywhere; }
.tl-song .badge { margin-left: .4rem; vertical-align: middle; }
.tl-note { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .88rem; color: #dadad5; background: var(--surface-2);
  border-radius: 10px; padding: .45rem .65rem; margin-top: .35rem; }
.tl-note-label { display: flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .75rem; font-weight: 700; margin-bottom: .1rem; }
.tl-suggest { font-size: .86rem; color: var(--warn); margin: .35rem 0 0; overflow-wrap: anywhere; }
.tl-suggest .btn { margin-left: .2rem; }
.tl-actions { display: flex; gap: .3rem; align-items: center; margin-left: auto; }
.tl-item.is-done { opacity: .6; }
.tl-item.is-done .tl-title { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .35); }
/* Who sees a point, and the switch that shows the run of show to the guests */
.tl-guests { margin: .3rem 0 .7rem; }
.tl-guests .check { font-weight: 600; }
.tl-guests-info { margin: .25rem 0 0; }

/* -- "Jetzt" on the guest page (guest.html, guest.js renderNow): what runs right now in one box at
      the top - raffle, poll, Lichtermeer, photo wall, guestbook, the next point of the run of show,
      each a part of its own. Search and wishes stay calm below. -- */
.now { margin: .25rem 0 1.6rem; }
.now-title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .55rem; font-size: 1rem; font-weight: 700; color: var(--text); }
.now-dot { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); }
.now-list { background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--radius); overflow: hidden; }
/* A line between two parts that show (a hidden one leaves none) */
.now-list > :not([hidden]) ~ :not([hidden]) { border-top: 1px solid var(--border); }
.now-icon { flex: none; width: 1.5rem; height: 1.5rem; color: var(--accent-text); }
.now-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.now-text strong { font-size: 1rem; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.now-text small { color: var(--muted); font-size: .86rem; line-height: 1.35; overflow-wrap: anywhere; }
.now-go { flex: none; width: 1.25rem; height: 1.25rem; color: var(--muted); }
/* A part to tap: the Lichtermeer, the photo wall, the guestbook (and the run of show's summary) */
.now-row {
  display: flex; align-items: center; gap: .75rem; width: 100%; margin: 0; padding: .8rem 1rem;
  font: inherit; text-align: left; color: var(--text); background: transparent; border: 0; border-radius: 0; cursor: pointer;
}
.now-row:hover, .guest-timeline summary:hover { background: var(--surface-2); }
.now-row:focus-visible, .guest-timeline summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ph-entry-task { color: var(--accent-text) !important; font-weight: 600; }
/* Photo wall, guestbook and video greetings with two or three open: small tiles side by side (guest.js
   renderNow), so the search for wishes stays on the first screen - the line of text and the arrow
   only while one of them is open */
.now-extras.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.now-extras.tiles > :not([hidden]) ~ :not([hidden]) { border-left: 1px solid var(--border); }
.now-extras.tiles .now-row { flex-direction: column; justify-content: center; gap: .4rem; padding: .8rem .4rem .75rem; text-align: center; }
.now-extras.tiles .now-text { flex: none; align-items: center; }
.now-extras.tiles .now-text strong { font-size: .9rem; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; }
.now-extras.tiles .now-text small, .now-extras.tiles .now-go { display: none; }
/* The example event on a real guest's phone (demo.py): instead of Lichtermeer, guestbook and photo wall */
.now-note { display: flex; align-items: flex-start; gap: .75rem; margin: 0; padding: .8rem 1rem; font-size: .95rem; line-height: 1.4; }
.now-note .now-icon { color: var(--muted); }
.tryout-note { display: flex; align-items: flex-start; gap: .55rem; color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }
.tryout-note .icon { flex: none; margin-top: .15em; color: var(--muted); }

/* -- the run of show on the guest page (guest.js renderTimeline): only time and title of the points
      on "all" - in "Jetzt" with its next point on the day, else a card of its own further down -- */
.guest-timeline:not(.now-item) { margin: .9rem 0 .25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.guest-timeline summary { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; color: var(--text); font-weight: 400; cursor: pointer; list-style: none; }
.guest-timeline summary::-webkit-details-marker { display: none; }
.gt-when:empty { display: none; }
.gt-caret { transition: transform .2s ease; }
.guest-timeline[open] .gt-caret { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .gt-caret { transition: none; } }
.gt-list { list-style: none; margin: 0; padding: 0 1rem .8rem; }
.gt-list li { display: flex; gap: .8rem; padding: .45rem 0; border-top: 1px solid var(--border); }
.gt-time { flex: none; width: 3.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.gt-title { overflow-wrap: anywhere; }
.gt-list li.is-past { color: var(--muted); }
.gt-list li.is-next .gt-time, .gt-list li.is-next .gt-title { color: var(--accent-text); }
.gt-label { display: block; font-size: .75rem; font-weight: 700; color: var(--accent-text); }

/* -- a poll on the guest page (guest.js renderSurvey): the answers to tap, then each with its share -- */
.survey-card { padding: .85rem 1rem 1rem; }
.survey-label { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .85rem; font-weight: 700; color: var(--accent-text); }
.survey-label .icon { flex: none; width: 1.1rem; height: 1.1rem; }
.survey-votes { margin-left: auto; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.survey-question { margin: .35rem 0 .75rem; font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
.survey-options { display: grid; gap: .5rem; }
.survey-option {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .45rem .75rem;
  width: 100%; min-height: 3rem; padding: .65rem .9rem; font: inherit; font-weight: 600; text-align: left;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer;
}
.survey-option:disabled { cursor: default; }
.survey-option.mine { border-color: var(--accent); }
.survey-text { display: flex; align-items: flex-start; gap: .45rem; min-width: 0; overflow-wrap: anywhere; }
.survey-mark { display: none; flex: none; color: var(--accent-text); }
.survey-mark .icon { width: 1.15rem; height: 1.15rem; vertical-align: -.2em; }
.survey-option.mine .survey-mark { display: inline-flex; }
.survey-share { font-weight: 800; font-variant-numeric: tabular-nums; }
.survey-track { grid-column: 1 / -1; height: 6px; overflow: hidden; background: var(--border); border-radius: 3px; }
.survey-bar { display: block; width: 0; height: 100%; background: var(--accent); border-radius: 3px; transition: width .6s ease; }
.survey-card:not(.has-results) .survey-share, .survey-card:not(.has-results) .survey-track { display: none; }
.survey-note { margin: .65rem 0 0; color: var(--muted); font-size: .92rem; }
.survey-note:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .survey-bar { transition: none; } }

/* -- the DJ's tab "Umfragen" (polls-admin.js) -- */
.poll-answers { display: grid; gap: .45rem; }
.poll-add { margin-top: .6rem; }
.poll-answer { display: flex; gap: .4rem; align-items: center; }
.poll-answer input { flex: 1; min-width: 0; }
.poll-answer-remove[hidden] { display: none; }
.poll-form-actions { margin-top: 1rem; }
/* A template for the kind of event (polls.py templates) above the question */
.poll-template { padding-bottom: .9rem; border-bottom: 1px solid var(--border); }
.poll-template label { margin-top: 0; }
.poll-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .8rem; }
.poll-item { padding: .85rem 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.poll-item.state-open { border-color: var(--accent-line); }
.poll-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .6rem; }
.poll-question { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.poll-total { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.poll-bars { list-style: none; margin: .7rem 0 0; padding: 0; display: grid; gap: .55rem; }
.poll-bar-row { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .25rem; }
.poll-bar-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: .35rem; overflow-wrap: anywhere; }
.poll-bar-name .icon { color: var(--accent-text); }
.poll-bars .is-top .poll-bar-name { font-weight: 700; }
.poll-bar-value { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.poll-bar-value small { color: var(--muted); font-weight: 600; font-size: .85em; }
.poll-track { height: 8px; overflow: hidden; background: var(--border); border-radius: 0 4px 4px 0; }
.poll-bar { display: block; width: 0; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; transition: width .5s ease; }
.poll-draft-options { margin: .55rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.poll-when { margin: .55rem 0 0; }
.poll-item .row { margin-top: .7rem; }
.raffle-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.raffle-emoji-input { font-size: 1.3rem; }
.raffle-prizes { margin-top: .5rem; }
.raffle-prizes .chip-toggle { font-size: 1.35rem; line-height: 1; padding: .35rem .55rem; }
.raffle-running { margin-top: .4rem; padding: .9rem 1rem; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); }
.raffle-running[hidden] { display: none; }
.raffle-running p { margin: 0 0 .45rem; }
.raffle-running-head { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; }
.raffle-running-emoji { font-size: 2rem; line-height: 1; }
.raffle-running .row { margin-top: .6rem; }
.raffle-results-title { margin: 1.2rem 0 .5rem; font-size: 1rem; }
.raffle-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.raffle-item { padding: .7rem .9rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.raffle-item-head { display: flex; align-items: center; gap: .55rem; }
.raffle-item-head strong { flex: 1; min-width: 0; }
.raffle-item-emoji { font-size: 1.5rem; line-height: 1; }
.raffle-item-message { margin: .4rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.raffle-codes { list-style: none; margin: .55rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.raffle-codes li { display: inline-flex; align-items: baseline; gap: .4rem; padding: .3rem .65rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.raffle-code { font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .04em; color: var(--accent-text); }
.raffle-name { color: var(--muted); }
@media (max-width: 420px) { .raffle-fields { grid-template-columns: 1fr; } }

/* -- a raffle (guest.js renderRaffle): a line in "Jetzt" while it signs in and after the draw -- */
.raffle-card { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; font-weight: 600; line-height: 1.35; }
.raffle-card.won { background: var(--accent-soft); }
.raffle-text { min-width: 0; overflow-wrap: anywhere; }
/* The prize: big over the page - over the Lichtermeer too (.light-show is 2000) */
/* Scrolls on a phone held sideways (the box is taller than the screen there): the box sits in the
   middle while it fits, else at the top - "Schließen" stays reachable */
.raffle-win { position: fixed; inset: 0; z-index: 2200; display: grid; place-items: start center; overflow-y: auto; overscroll-behavior: contain; padding: 1.2rem; background: rgba(0, 0, 0, .85); }
.raffle-win-box {
  margin: auto 0;
  display: grid; justify-items: center; gap: .45rem; width: min(90vw, 24rem); padding: 1.6rem 1.3rem 1.3rem; text-align: center;
  color: var(--text); background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--radius);
}
.raffle-win-img { width: min(46vw, 10rem, 28vh); height: min(46vw, 10rem, 28vh); animation: raffle-win-pop .7s cubic-bezier(.2, .8, .3, 1.3) both; }
.raffle-win-emoji { font-size: min(6.5rem, 24vh); line-height: 1.1; animation: raffle-win-pop .7s cubic-bezier(.2, .8, .3, 1.3) both; }
.raffle-win-box h2 { margin: .5rem 0 0; font-size: 1.6rem; line-height: 1.2; }
.raffle-win-message { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.raffle-win-code { margin: .6rem 0 0; font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.raffle-win-hint { margin: 0; color: var(--muted); font-size: .92rem; }
.raffle-win-box .btn { min-width: 9rem; margin-top: .8rem; }
@keyframes raffle-win-pop {
  0% { transform: scale(.3) rotate(-10deg); }
  60% { transform: scale(1.12) rotate(3deg); }
  100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .raffle-win-img, .raffle-win-emoji { animation: none; } }
.tl-form { display: block; }
.tl-form.tl-edit { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: .4rem 1rem 1rem; }
.tl-form-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0 .7rem; }
.tl-form-row label { margin-top: .6rem; }
.tl-time-input { min-height: 2.9rem; }
.tl-night-hint { margin: .35rem 0 0; color: var(--warn); }
.tl-moments { margin-top: .5rem; }
.tl-chosen { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.tl-chosen .tl-song { font-size: .95rem; font-weight: 600; }
.tl-picker .host-results { margin-top: .4rem; }
.tl-picker .host-results .track-title, .tl-picker .host-results .track-sub { white-space: normal; overflow-wrap: anywhere; }
.tl-add { margin-top: 1rem; }
.tl-add > summary { font-weight: 600; }
.tl-add-title { margin: 1.2rem 0 0; font-size: 1rem; }
.tl-venue { margin: 0 0 .6rem; color: var(--text); font-size: .92rem; background: var(--surface-2); border-radius: 10px; padding: .5rem .75rem; }
.tl-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.tl-settings-wide { grid-column: 1 / -1; }
@media (max-width: 420px) { .tl-form-row { grid-template-columns: 7rem minmax(0, 1fr); } }

/* The bar at the top of the event: what comes next, Leise ab and Musik-Ende */
.tl-now {
  margin: 1rem 0 0; padding: .8rem 1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border-strong);
}
.tl-now-main { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.tl-now-text { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.tl-now-label { color: var(--accent-text); font-weight: 700; }
.tl-now-title { font-size: 1.1rem; }
.tl-now-when { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-now-song { color: var(--accent-text); }
.tl-now-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.tl-now-note { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .6rem; padding: .6rem .8rem; border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-size: 1rem; }
.tl-now-after { margin: .45rem 0 0; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.tl-limits { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin-top: .5rem; font-size: .9rem; font-variant-numeric: tabular-nums; }
.tl-limit { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; }
.tl-limit.is-on { color: var(--warn); }
.tl-limit-note { color: var(--muted); }
.tl-now-go { display: inline-flex; align-items: center; gap: .25rem; margin-top: .4rem; font-size: .85rem; }
/* "Zeit": ab hier verschieben or a new time for one point */
.tl-with-panel { display: grid; gap: .4rem; }
.tl-shift { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .9rem; }
.tl-now .tl-shift { margin-top: .6rem; background: var(--surface); }
.tl-shift-label { margin: 0 0 .5rem; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.tl-shift-quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.tl-shift-custom, .tl-shift-one { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-top: .6rem; }
.tl-shift-min { width: 6.5rem; }
.tl-shift-time { width: 8.5rem; }
.tl-shift-one label { margin: 0; color: var(--text); }
.tl-shift .hint { margin: .6rem 0 0; }
body.booth .tl-shift-quick .btn { font-size: 1.05rem; min-height: 3rem; padding: .6rem 1rem; }
body.booth .tl-now { padding: 1rem 1.2rem; }
body.booth .tl-now-text { font-size: 1.25rem; }
body.booth .tl-now-title { font-size: 1.45rem; }
body.booth .tl-now-actions .btn { font-size: 1.05rem; padding: .7rem 1.2rem; min-height: 3rem; }
body.booth .tl-now-note { font-size: 1.2rem; }
body.booth .tl-limits { font-size: 1.1rem; }

/* -- audio guestbook (guestbook.js, guestbook-host.js, guestbook-admin.js) ----------------- */

/* Its own view: intro, greeting, recording, listening back, thanks */
.gb-view { margin-top: 1rem; }
.gb-view h2 { display: flex; align-items: center; gap: .5rem; margin: .75rem 0 .5rem; color: var(--text); font-size: 1.35rem; }
.gb-view h2 .icon { color: var(--accent-text); }
.gb-view h2:focus { outline: none; }
.gb-lead { margin: .25rem 0 1rem; }
.gb-subtitle { font-size: .95rem; color: var(--muted); margin: 1rem 0 .5rem; }
.gb-mine { margin-bottom: 1rem; }
.gb-privacy { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; margin: 1rem 0 .25rem; font-size: .92rem; }
.gb-privacy p { margin: 0 0 .4rem; }
label.check.gb-consent { align-items: flex-start; margin: 1rem 0 1.2rem; line-height: 1.4; font-size: .95rem; }
.gb-consent input { margin-top: .25rem; }
.gb-start, .gb-stop { min-height: 3.4rem; font-size: 1.1rem; white-space: normal; }
.gb-label { color: var(--muted); font-weight: 600; margin: 1rem 0 .4rem; }
.gb-greeting { margin: 0 0 1rem; padding: 1rem 1.1rem; background: var(--surface); border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.1rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.gb-status { color: var(--muted); min-height: 1.4em; }
/* Before the beep: what comes next, big enough to read from arm's length, and the countdown */
.gb-soon { margin: 1.4rem 0 .2rem; text-align: center; font-size: clamp(1.5rem, 7vw, 2.1rem); font-weight: 800; line-height: 1.2; color: var(--text); }
.gb-count.gb-countdown { font-size: clamp(6rem, 42vw, 11rem); color: var(--accent-text); margin: 0 0 1rem; }
.gb-countdown:empty { display: none; }
.gb-rec { display: flex; align-items: center; justify-content: center; gap: .5rem; color: var(--bad); font-weight: 700;
  margin: 1.2rem 0 0; font-size: .95rem; text-align: center; }
.gb-rec-dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--bad); flex: none; animation: gb-blink 1s infinite; }
@keyframes gb-blink { 50% { opacity: .25; } }
.gb-count { font-size: clamp(4.5rem, 30vw, 8rem); font-weight: 800; text-align: center; line-height: 1.05; margin: .5rem 0 0;
  font-variant-numeric: tabular-nums; }
.gb-count.gb-count-small { font-size: 3rem; }
.gb-count-label { text-align: center; color: var(--muted); margin: .2rem 0 1rem; }
.gb-meter, .gb-progress { height: 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  overflow: hidden; margin: .6rem 0 1.2rem; }
.gb-meter span, .gb-progress span { display: block; height: 100%; background: var(--accent); transform-origin: left center;
  transform: scaleX(0); transition: transform .08s linear; }
.gb-review { margin: .5rem 0 .75rem; }
/* Sending is the step guests forget: big, on its own line, pulsing until tapped */
.gb-send-hint { margin: 0 0 .5rem; color: var(--muted); font-size: .95rem; }
.btn.gb-send { min-height: 3.8rem; font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.btn.gb-send .icon { width: 1.35em; height: 1.35em; }
.gb-send:not(:disabled) { animation: gb-send-pulse 1.6s ease-in-out infinite; }
@keyframes gb-send-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@media (prefers-reduced-motion: reduce) { .gb-send:not(:disabled) { animation: none; } }
.gb-done { width: 4.5rem; height: 4.5rem; border-radius: 50%; margin: 1.5rem auto .5rem; display: grid; place-items: center;
  font-size: 2rem; color: #0c2a1b; background: var(--ok); }
.gb-thanks { text-align: center; font-size: 1.15rem; color: var(--text); }
.gb-after { justify-content: center; margin-top: 1rem; }
/* The photo wall on the guest page (photos.js) */
.ph-pickers { display: grid; gap: .6rem; margin-top: .4rem; }
.ph-start { min-height: 3.4rem; font-size: 1.1rem; white-space: normal; }
.ph-for { margin: .2rem 0 .8rem; font-weight: 600; color: var(--accent-text); overflow-wrap: anywhere; }
.ph-tasks-box { margin: .5rem 0 1rem; }
.ph-tasks { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.ph-task {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; text-align: left; cursor: pointer;
  padding: .55rem .65rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-size: .86rem; line-height: 1.25; min-height: 2.8rem;
}
.ph-task:hover { border-color: var(--accent); }
.ph-task.chosen { border: 2px solid var(--accent); background: var(--surface-2); }
.ph-task.done .ph-task-count { color: var(--ok); font-weight: 700; }
.ph-task-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ph-task-count { flex: none; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.ph-preview { margin: .5rem 0 1rem; text-align: center; }
.ph-preview img { max-width: 100%; max-height: 60vh; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.ph-mine { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); margin-bottom: 1rem; }
.ph-mine-item { margin: 0; display: flex; flex-direction: column; gap: .3rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .4rem; }
.ph-mine-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) - 4px); display: block; }
.ph-mine-item figcaption { font-size: .8rem; display: flex; flex-direction: column; gap: .1rem; }
.ph-mine-item figcaption small { color: var(--muted); overflow-wrap: anywhere; }
/* The guest's photo task: one at a time, in this phone's order; the whole list on request */
.ph-task-card { padding: .8rem .9rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  margin: .4rem 0 .5rem; }
.ph-task-card.chosen { border: 2px solid var(--accent); background: var(--surface-2); }
.ph-task-now { margin: 0 0 .6rem; font-size: 1.12rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.ph-task-card .row { gap: .45rem; flex-wrap: wrap; }
.ph-task-all { margin: 0 0 .5rem; }
/* "Alle Aufgaben" with up to 100: a search, then TASKS_SHOWN at a time */
.ph-task-search, .ph-tl-search { position: relative; display: flex; }
.ph-task-search { margin: 0 0 .5rem; }
.ph-task-search .icon, .ph-tl-search .icon { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ph-task-search input, .ph-tl-search input { flex: 1; min-width: 0; padding-left: 2.1rem; }
.ph-task-none { margin: .2rem 0 .5rem; }
.ph-task-more { margin-top: .5rem; }
.ph-tasks[hidden], .ph-task-none[hidden], .ph-task-more[hidden] { display: none; }
.ph-task-done { display: flex; align-items: center; gap: .45rem; margin: .2rem 0 .6rem; font-weight: 600; color: var(--ok); overflow-wrap: anywhere; }
.ph-task-note { text-align: center; margin: 0 auto .6rem; max-width: 30rem; overflow-wrap: anywhere; }
/* The photo wall on the guest page (when the DJ shows it there): the guests' photos, newest first */
.ph-wall { margin: 1.2rem 0 .6rem; }
.ph-wall[hidden] { display: none; }
.ph-wall-grid { display: grid; gap: .35rem; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); margin: .4rem 0 .7rem; }
.ph-wall-item { padding: 0; border: 0; border-radius: calc(var(--radius) - 4px); overflow: hidden; background: var(--surface-2);
  aspect-ratio: 1; cursor: zoom-in; }
.ph-wall-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-wall-item[hidden] { display: none; }
/* The video greetings on the guest page (videos.js): the camera, the countdown, the take */
.vd-stage { position: relative; display: grid; place-items: center; margin: .5rem 0 .9rem; background: #000;
  border-radius: var(--radius); overflow: hidden; min-height: 12rem; }
.vd-preview { display: block; width: 100%; max-height: 58vh; object-fit: contain; background: #000; }
.vd-preview.mirror { transform: scaleX(-1); }
.vd-overlay { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.vd-countdown { display: grid; place-items: center; width: 7.5rem; height: 7.5rem; border-radius: 50%; background: rgba(0, 0, 0, .55);
  color: #fff; font-size: 4.5rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.vd-hint { color: var(--muted); margin: 0 0 .7rem; }
.vd-camera-row { justify-content: center; margin-top: .6rem; }
.vd-step .gb-rec { margin-top: .2rem; font-size: 1rem; }
.vd-count { color: var(--text); font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.vd-time { margin: .4rem 0 1rem; }
.vd-length { margin: 0 0 .3rem; }
/* Emojis from the guests in the DJ's event view (also in the Pult-Modus): counts above the
   tabs, a tap lists who sent them; new ones flash up over the whole page */
.dj-emoji { margin: .5rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.dj-emoji[hidden] { display: none; }
.dj-emoji-toggle {
  display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .8rem; font: inherit; color: var(--text);
  background: none; border: 0; cursor: pointer; text-align: left;
}
.dj-emoji-label { flex: none; font-weight: 700; color: var(--text); }
.dj-emoji-counts { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: 1.05rem; }
.dj-emoji-count { display: inline-flex; align-items: baseline; gap: .2rem; white-space: nowrap; }
.dj-emoji-count b { font-variant-numeric: tabular-nums; }
.dj-emoji-count.zero { opacity: .4; }
.dj-emoji-caret { flex: none; color: var(--muted); }
.dj-emoji-panel { padding: .2rem .8rem .8rem; border-top: 1px solid var(--border); }
.dj-emoji-panel .hint { margin: .5rem 0 0; }
.dj-emoji-senders { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .45rem; }
.dj-emoji-sender {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who btn" "what btn" "reply reply"; gap: .1rem .6rem;
  align-items: center; padding: .45rem .6rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
}
/* The label on its own line, the seven emojis in one row that shrinks with the width */
.dj-emoji-reply { grid-area: reply; display: grid; grid-template-columns: repeat(7, minmax(0, 2.9rem)); gap: .3rem; margin-top: .35rem; }
.dj-emoji-reply-label { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; }
.dj-emoji-reply-btn {
  font: inherit; font-size: 1.3rem; line-height: 1; min-width: 0; min-height: 2.6rem; padding: .3rem 0; cursor: pointer;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; transition: transform .12s ease;
}
.dj-emoji-reply-btn:hover { border-color: var(--border-strong); }
.dj-emoji-reply-btn:active { transform: scale(.88); }
.dj-emoji-replied { grid-area: reply; margin-top: .25rem; font-size: .85rem; font-weight: 600; color: var(--ok); }
.dj-emoji-sender.blocked { border-color: rgba(239, 100, 100, .5); }
.dj-emoji-sender .who { grid-area: who; font-weight: 700; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; overflow-wrap: anywhere; }
.dj-emoji-sender .what { grid-area: what; overflow-wrap: anywhere; }
.dj-emoji-sender .btn { grid-area: btn; }
.dj-emoji-sender .btn.bad { background: transparent; color: var(--bad); border: 1px solid rgba(239, 100, 100, .5); }
body.booth .dj-emoji-counts { font-size: 1.2rem; gap: .25rem .7rem; }
/* "Takt hören" for the Lichtermeer on the DJ's phone (light-ear.js): a bar like the emojis, the panel under it */
.dj-light { margin: .5rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.dj-light.live { border-color: var(--accent-line); }
.dj-light-toggle {
  display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .8rem; font: inherit; color: var(--text);
  background: none; border: 0; border-radius: var(--radius); cursor: pointer; text-align: left;
}
.dj-light-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.dj-light-label { flex: none; display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--text); }
.dj-light-state { flex: 1; min-width: 0; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.dj-light.live .dj-light-state { color: var(--accent-text); font-weight: 600; }
.dj-light-caret { flex: none; color: var(--muted); }
.dj-light-panel { display: grid; gap: .6rem; padding: .35rem .8rem .85rem; border-top: 1px solid var(--border); }
.dj-light-panel p { margin: 0; }
.dj-light-intro { font-size: .92rem; }
.dj-light-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.dj-light-status { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem .6rem; align-items: center; font-size: .92rem; }
.dj-light-dot { width: 1rem; height: 1rem; border-radius: 50%; background: var(--accent); opacity: .15; }
.dj-light-level { grid-column: 1 / -1; height: .35rem; border-radius: 3px; background: var(--bg); overflow: hidden; }
.dj-light-level span { display: block; height: 100%; width: 0; background: var(--accent); }
.dj-light-show { font-size: .9rem; color: var(--accent-text); }
.dj-light-show:empty { display: none; }
.dj-light-tap { min-height: 3.4rem; font-size: 1.15rem; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.dj-light-tap:active { transform: scale(.97); }
body.booth .dj-light-toggle { font-size: 1.1rem; }
.dj-emoji-overlay { position: fixed; inset: 0; z-index: 1000; pointer-events: none; overflow: hidden; display: none; }
.dj-emoji-overlay.show { display: block; }
.dj-emoji-overlay::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .45), transparent 75%);
}
.dj-emoji-overlay.show::before { animation: dj-emoji-glow 1.8s ease-out forwards; }
.dj-emoji-pop {
  position: absolute; left: var(--x, 50%); top: var(--y, 50%); font-size: min(34vw, 40vh); line-height: 1; opacity: 0;
  transform: translate(-50%, -50%) scale(.2); filter: drop-shadow(0 6px 22px rgba(0, 0, 0, .5));
  animation: dj-emoji-pop 1.7s cubic-bezier(.2, .8, .3, 1.15) var(--delay, 0ms) forwards;
}
.dj-emoji-overlay.many .dj-emoji-pop { font-size: min(20vw, 26vh); }
.dj-emoji-more { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); font-size: 1.6rem; font-weight: 800; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); opacity: 0; animation: dj-emoji-glow 1.8s ease-out forwards; }
@keyframes dj-emoji-glow { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes dj-emoji-pop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.2) rotate(0deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(var(--tilt, 0deg)); }
  34% { transform: translate(-50%, -50%) scale(1) rotate(var(--tilt, 0deg)); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(.92) rotate(var(--tilt, 0deg)); }
}
@media (prefers-reduced-motion: reduce) {
  .dj-emoji-pop { transform: translate(-50%, -50%); animation: dj-emoji-glow 1.6s ease-out var(--delay, 0ms) forwards; }
}

/* Handy-Lichtermeer (guest-light.js): the invitation, and the phone as a light */
.light-invite { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 1.2rem; background: rgba(0, 0, 0, .8); }
.light-invite[hidden] { display: none; }
.light-invite-box { width: min(420px, 100%); padding: 1.4rem 1.2rem 1.2rem; text-align: center; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.light-invite-icon { line-height: 1; color: var(--accent-text); }
.light-invite-icon .icon { width: 2.75rem; height: 2.75rem; }
.light-invite p.light-invite-state { margin: .55rem 0 0; color: var(--accent-text); font-size: .95rem; font-weight: 650; }
.light-invite h2 { margin: .5rem 0 .4rem; font-size: 1.6rem; color: var(--text); text-transform: none; letter-spacing: 0; }
.light-invite p { margin: .35rem 0; }
.light-invite-tip { color: var(--muted); font-size: .92rem; }
.light-invite p.light-invite-warn {
  display: flex; gap: .55rem; align-items: flex-start; margin: .8rem 0 .2rem; padding: .65rem .75rem;
  text-align: left; font-size: .92rem; line-height: 1.4; color: var(--text);
  border: 1px solid var(--warn); border-radius: var(--radius-sm);
}
.light-invite-warn .icon { flex: none; width: 1.25rem; height: 1.25rem; margin-top: .05rem; color: var(--warn); }
.light-invite-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1rem; }
.light-invite-buttons .btn { min-height: 3rem; padding-inline: 1.4rem; font-size: 1.05rem; }
.light-show { position: fixed; inset: 0; z-index: 2000; background: #000; touch-action: none; }
.light-show[hidden] { display: none; }
/* An iPhone shows no web page in full screen (only videos): the light also glows behind the status
   bar and under the browser's see-through bar, down to where the screen ends ... */
.light-show::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh;
  background: inherit; z-index: -1; pointer-events: none;
}
/* ... and a swipe up makes that bar small: the page under the show may scroll then (guest-light.js) */
.light-show.scrolls { touch-action: pan-y; }
body.light-on.light-scrolls { overflow: visible; min-height: calc(100lvh + 160px); }
.light-scroll-tip {
  position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); padding: .55rem 1rem; border-radius: 999px; background: rgba(0, 0, 0, .6);
  text-align: center; font-size: 1rem; font-weight: 700; color: #fff; pointer-events: none;
}
.light-scroll-tip[hidden] { display: none; }
/* "❤️ Herz": centred, as big as the screen allows */
.light-heart { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; transform-origin: 50% 52%; will-change: transform; }
.light-heart[hidden] { display: none; }
.light-heart svg { width: min(82vw, 72vh); height: min(82vw, 72vh); }
/* "🎉 Emojis": the DJ's emoji, as big as the screen allows, in the phone's own emoji font */
.light-emoji {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; user-select: none;
  font-size: min(58vw, 42vh); line-height: 1; will-change: transform;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
/* The emoji as a picture (Twemoji): as big as the glyph was */
.light-emoji-img { display: block; width: min(58vw, 42vh); height: min(58vw, 42vh); }
/* "Bier" (guest-beer.js): the canvas fills the screen, the texts sit over it */
.light-beer { position: absolute; inset: 0; touch-action: none; }
/* "Funkeln" and "Wunderkerzen" (guest-sparks.js): a canvas on black over the whole screen */
.light-sparks { position: absolute; inset: 0; pointer-events: none; }
.light-sparks[hidden] { display: none; }
.light-sparks-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.light-beer-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* "Feuerzeug" (guest-lighter.js): a canvas on black over the whole screen; on an iPhone the tap
   that lets the flame follow the phone's tilt sits low, quiet, over it */
.light-lighter { position: absolute; inset: 0; touch-action: none; }
.light-lighter-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.light-lighter-start {
  position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); white-space: nowrap;
  display: inline-flex; align-items: center; gap: .45rem; max-width: calc(100% - 32px);
  padding: .7rem 1.2rem; font: inherit; font-size: 1.05rem; font-weight: 700; color: #ffe9c7;
  background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 233, 199, .4); border-radius: 999px; cursor: pointer;
}
/* "Text" (guest-text.js): the DJ's words in a tall, narrow face for signs (Bebas Neue, SIL OFL,
   fonts/LICENSES.txt) - big in the middle, or running across */
@font-face { font-family: "SR Sign"; src: url("fonts/bebas-neue-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
.light-text { position: absolute; inset: 0; overflow: hidden; pointer-events: none; user-select: none; -webkit-user-select: none; }
.light-text-big, .light-text-run {
  font-family: "SR Sign", "Bebas Neue", Impact, "Arial Narrow", sans-serif; font-weight: 400; line-height: 1.02;
  white-space: pre; color: #fff; letter-spacing: .01em;
}
.light-text-big { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.light-text-run { position: absolute; left: 0; top: 50%; will-change: transform; }
.light-beer-count { position: absolute; top: max(16px, env(safe-area-inset-top)); left: 16px; display: flex; align-items: center; gap: .3rem; font-size: 1.4rem; font-weight: 800; color: #ffe8a3; pointer-events: none; }
.light-beer-cheers {
  position: absolute; left: 0; right: 0; top: 9%; text-align: center; font-size: clamp(2.4rem, 12vw, 4.5rem); font-weight: 900;
  color: #fff3c4; text-shadow: 0 2px 14px rgba(0, 0, 0, .45); pointer-events: none;
}
/* Over the golden beer: on a dark pill, so it stays readable */
.light-beer-hint {
  position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); padding: .55rem 1rem; border-radius: 999px; background: rgba(0, 0, 0, .55);
  text-align: center; font-size: 1.15rem; font-weight: 700; color: #fff3d0; pointer-events: none;
}
.light-beer-start {
  position: absolute; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%); white-space: nowrap;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .9rem 1.4rem; font: inherit; font-size: 1.15rem; font-weight: 700; color: var(--on-accent); background: var(--accent);
  border: 0; border-radius: var(--radius-sm); cursor: pointer;
}
body.light-on { overflow: hidden; }
.light-close {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: grid; place-items: center; padding: 0;
  font: inherit; font-size: 1.2rem; color: rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .35); cursor: pointer;
}
.light-thanks { position: absolute; inset: 0; display: grid; place-items: center; padding: 2rem; text-align: center; font-size: 1.8rem; font-weight: 800; color: #fff; background: #111; }
.light-thanks[hidden] { display: none; }

/* Emojis to the DJ on the guest page: five big buttons, the tapped one flies up */
.emoji-bar { margin: .9rem 0 .25rem; padding: .7rem .8rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.emoji-title { margin: 0 0 .5rem; font-size: .9rem; color: var(--muted); }
.emoji-buttons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .45rem; }
.emoji-btn {
  font: inherit; font-size: 1.75rem; line-height: 1; min-height: 3rem; padding: .5rem 0; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: transform .12s ease;
}
.emoji-btn:hover:not(:disabled) { border-color: var(--border-strong); }
.emoji-btn:active:not(:disabled) { transform: scale(.88); }
.emoji-btn:disabled { opacity: .35; cursor: default; filter: grayscale(.7); }
.emoji-status { margin: .55rem 0 0; font-size: .9rem; color: var(--muted); }
.emoji-bar.waiting .emoji-status { color: var(--text); font-variant-numeric: tabular-nums; }
.emoji-fly {
  position: fixed; z-index: 60; font-size: 2.6rem; line-height: 1; pointer-events: none;
  transform: translate(-50%, 0); animation: emoji-fly 1.4s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes emoji-fly {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.6); }
  15% { opacity: 1; transform: translate(-50%, -20px) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -180px) scale(1.9); }
}
/* The DJ's answer: big in the middle for a few seconds (a tap closes it), then a line under the buttons */
.emoji-bar.answered .emoji-status { color: var(--text); font-weight: 600; }
.emoji-reply {
  position: fixed; left: 50%; top: 42%; z-index: 80; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: .6rem; width: min(86vw, 22rem); padding: 1.4rem 1.2rem 1.25rem;
  text-align: center; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55); cursor: pointer; animation: emoji-reply 5s ease forwards;
}
.emoji-reply-emoji { font-size: 5rem; line-height: 1; animation: emoji-reply-pop .7s cubic-bezier(.2, .8, .3, 1.3) both; }
.emoji-reply-text { font-size: 1.15rem; font-weight: 800; overflow-wrap: anywhere; }
@keyframes emoji-reply {
  0% { opacity: 0; transform: translate(-50%, -40%) scale(.9); }
  8%, 86% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.98); }
}
@keyframes emoji-reply-pop {
  0% { transform: scale(.3) rotate(-12deg); }
  60% { transform: scale(1.18) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes emoji-reply-fade { 0%, 90% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .emoji-reply { animation: emoji-reply-fade 5s linear forwards; }
  .emoji-reply-emoji { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gb-rec-dot { animation: none; }
  .gb-meter span, .gb-progress span { transition: none; }
}

/* Host link and dashboard: greeting, figures, downloads, QR code */
.gb-greeting-editor { margin: .4rem 0 1rem; }
.gb-editor-state { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.gb-greeting-editor .gb-rec { justify-content: flex-start; }
.gb-greeting-editor .gb-count { text-align: left; }
.gb-figures { font-size: 1.05rem; margin: .3rem 0 .6rem; }
.gb-downloads { display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0; }
.gb-downloads .btn { white-space: normal; text-align: center; }
.gb-sub { margin: 0; font-size: .9rem; color: var(--muted); font-weight: 600; }
.gb-host-sub { margin: 1.2rem 0 .3rem; font-size: 1rem; }
.gb-qr { width: min(100%, 220px); margin: .8rem 0; }

/* The card to print for the tables (/admin/events/<id>/gaestebuch-karte) */
.gb-card { text-align: center; max-width: 30rem; margin: 0 auto; padding: 2rem 1.5rem; border: 2px solid #111; border-radius: 18px; }
.gb-card-kicker { display: inline-flex; align-items: center; gap: .4rem; font-size: 1.1rem; font-weight: 700; margin: 0 0 .4rem; }
.gb-card h1 { font-size: 2rem; margin: 0; overflow-wrap: anywhere; }
.gb-card-date { color: #555; margin: .3rem 0 1.2rem; }
.gb-card-qr { width: min(70%, 16rem); margin: 0 auto 1.2rem; }
.gb-card-qr svg { display: block; width: 100%; height: auto; }
.gb-card-steps { text-align: left; display: inline-block; margin: 0 auto 1rem; padding-left: 1.4rem; font-size: 1.1rem; line-height: 1.6; }
.gb-card-en { color: #555; font-size: .9rem; margin: 0 0 .6rem; }
.gb-card-link { font-size: .85rem; color: #333; word-break: break-all; margin: 0; }
/* The photo wall's card (photos-card.html): the tasks under the steps */
.photo-card h2 { font-size: 1.15rem; margin: .4rem 0 .4rem; }
.card-tasks { text-align: left; display: inline-block; margin: 0 auto 1rem; padding-left: 1.4rem; font-size: 1rem; line-height: 1.45; columns: 1; }
.card-tasks-note { margin: 0 auto .5rem; max-width: 34rem; font-size: .95rem; color: var(--muted); }
@media print { .card-tasks { font-size: 11pt; } }

/* DJ tab "Gästebuch": the hosts' own link to record the greeting */
.gb-host-invite { margin: 12px 0 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.gb-host-invite > p { margin: 0 0 8px; font-size: .92rem; }
.gb-host-invite .url-box { margin: 8px 0; background: var(--surface); }
.gb-host-invite .row { margin-top: 8px; }

/* The DJ's tab "Fotos" (photos-admin.js) */
.ph-filter { flex-wrap: wrap; gap: .4rem; margin: .4rem 0 .6rem; }
.ph-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); margin: .6rem 0; }
.ph-card { margin: 0; display: flex; flex-direction: column; gap: .35rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .45rem; }
.ph-card.wall-0 { border-color: var(--accent); }
.ph-card.wall--1 { opacity: .6; }
.ph-thumb { padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.ph-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: calc(var(--radius) - 4px); display: block; }
.ph-card figcaption { display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; min-width: 0; }
.ph-card-meta, .ph-card-task { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-card-task { color: var(--accent-text); }
.ph-card-state { color: var(--muted); }
.ph-card-actions { display: flex; flex-wrap: wrap; gap: .3rem; }
.ph-card-actions .btn { flex: 1 1 auto; padding-left: .5rem; padding-right: .5rem; }
.ph-viewer { padding: 0; border: 0; border-radius: var(--radius); background: #000; max-width: min(96vw, 1100px); width: 100%; }
.ph-viewer::backdrop { background: rgba(0, 0, 0, .8); }
.ph-viewer img { display: block; width: 100%; max-height: 78vh; object-fit: contain; background: #000; }
.ph-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem .9rem;
  background: var(--surface); color: var(--text); }
.ph-collages { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); margin: .8rem 0; }
.ph-collage { margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.ph-collage img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; }
.ph-collage figcaption { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .9rem; }
/* The video greetings in the DJ's tab "Videos" and on the host link: a player per video */
.vd-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); margin: .6rem 0; }
.vd-card { margin: 0; display: flex; flex-direction: column; gap: .4rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .45rem; min-width: 0; }
.vd-card video { width: 100%; aspect-ratio: 1; object-fit: contain; background: #000; border-radius: calc(var(--radius) - 4px); display: block; }
.vd-card figcaption { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; min-width: 0; }
.vd-card figcaption .btn { align-self: flex-start; }
.vd-card-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-card-size { color: var(--muted); }
.vd-card-actions { display: flex; flex-wrap: wrap; gap: .3rem; }
.vd-card-actions .btn { flex: 1 1 auto; padding-left: .5rem; padding-right: .5rem; }
.vd-space .gb-figures { margin-bottom: .4rem; }
.vd-space-bar { margin: 0 0 .8rem; }
/* Phones: two videos side by side (one under the other makes the list very long) */
@media (max-width: 640px) {
  .vd-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .vd-card { padding: .35rem; }
  .vd-card figcaption { font-size: .8rem; }
  .vd-card-actions .btn, .vd-card figcaption .btn { padding-left: .4rem; padding-right: .4rem; }
}
.ph-tasks-edit { margin: .4rem 0 0 1.8rem; }
.ph-tasks-edit textarea { width: 100%; }
.ph-tasks-edit > label:first-child { margin-top: .2rem; }
/* The DJ's photo tasks as a list (up to 100): add with Enter, search, filters, one row each */
.ph-tl-add { display: flex; gap: .5rem; align-items: center; }
.ph-tl-add input { flex: 1; min-width: 0; }
.ph-tl-add .btn { flex: none; }
.ph-tl-count { margin: .35rem 0 .7rem; }
.ph-tl-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 .5rem; }
.ph-tl-tools[hidden] { display: none; }
.ph-tl-search { flex: 1 1 13rem; min-width: 0; }
.ph-tl-filters { gap: .35rem; flex-wrap: wrap; margin: 0; }
.ph-tl { list-style: none; margin: 0 0 .4rem; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.ph-tl:empty { display: none; }
.ph-tl-row { display: flex; align-items: center; gap: .6rem; padding: .35rem .45rem .35rem .5rem; border-top: 1px solid var(--border); min-height: 2.9rem; }
.ph-tl-row:first-child { border-top: 0; }
.ph-tl-num { flex: none; width: 2.4rem; text-align: center; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.ph-tl-thumb { flex: none; width: 2.4rem; height: 2.4rem; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.ph-tl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-tl-text { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.ph-tl-row.done .ph-tl-text { color: var(--muted); }
.ph-tl-state { display: inline-flex; align-items: center; gap: .2rem; margin-left: .45rem; font-size: .8rem; font-weight: 600; color: var(--ok); white-space: nowrap; vertical-align: .05em; }
.ph-tl-actions { flex: none; display: flex; gap: .15rem; }
.ph-tl-row.editing input { flex: 1; min-width: 0; }
.ph-tasks-edit .ph-set-row { margin: .6rem 0 .2rem; }
@media (max-width: 640px) {
  .ph-tasks-edit { margin-left: 0; }
  .ph-tl-row.editing { flex-wrap: wrap; }
  .ph-tl-row.editing input { flex-basis: calc(100% - 3.2rem); }
  .ph-tl-row.editing .ph-tl-actions { margin-left: auto; }
}
/* Where the photos show (any of the three) and the tasks that are done */
.ph-places { border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .8rem .2rem; margin: .2rem 0 .8rem; }
.ph-places legend { padding: 0 .3rem; font-weight: 600; }
.ph-places label.check, .ph-hosts-after label.check { align-items: flex-start; margin-bottom: .5rem; }
.ph-places label.check input, .ph-hosts-after label.check input { margin-top: .2rem; }
.ph-places label.check span, .ph-hosts-after label.check span { line-height: 1.35; }
.ph-hosts-after { margin-top: .4rem; }
.ph-hosts-after[hidden] { display: none; }
.ph-set-row { align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.ph-set-row label { margin: 0; }
.ph-set-row select { width: auto; flex: 0 1 16rem; min-width: 0; }

/* The profile's card "Speicherort für Gästebuch und Fotos" (storage.py) */
.storage-option { border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .85rem; margin: .5rem 0; }
.storage-option.chosen { border-color: var(--accent); background: var(--surface-2); }
.storage-option label.check { align-items: flex-start; margin: 0; }
.storage-option label.check span { display: flex; flex-direction: column; gap: .15rem; }
.storage-option small { color: var(--muted); font-size: .88rem; line-height: 1.35; }
.storage-link { margin: .5rem 0 0 1.9rem; display: flex; flex-direction: column; gap: .4rem; overflow-wrap: anywhere; }

/* The profile in sections (admin.js showProfile): a page each, chosen with tabs like the event's;
   on a phone two by two, a long name on two lines */
.profile-title { margin: .5rem 0 .6rem; }
.profile-tabs { flex-wrap: wrap; overflow: visible; margin: 0 0 1.2rem; padding: 0; }
a.tab { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
a.tab:not(.active):hover { color: var(--text); border-color: var(--border-strong); }
a.tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 640px) {
  .profile-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
  .profile-tabs .tab { white-space: normal; line-height: 1.25; min-height: 2.9rem; padding: .45rem .5rem; font-size: .88rem; }
}
/* A card jumped to stays clear of the header bar */
.profile-section .card[id] { scroll-margin-top: 5rem; }
/* A long card's body folded away (e.g. the packing templates) */
details.fold { margin-top: .5rem; }
details.fold > summary {
  cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--text);
  padding: .45rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm); list-style: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "▾"; color: var(--muted); }
details.fold[open] > summary { margin-bottom: .8rem; }
details.fold[open] > summary::after { content: "▴"; }

/* -- modules of an event (dashboard: assistant step 3 and "Einstellungen") ------------------ */
.module-tiles { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); margin: .9rem 0; }
.module-tile {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .75rem;
  width: 100%; padding: .85rem .9rem; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s, background-color .15s;
}
.module-tile:hover { border-color: var(--border-strong); }
.module-tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.module-tile.on { border-color: var(--accent); background: var(--accent-soft); }
.module-tile-icon {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: var(--radius-sm);
  font-size: 1.45rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border);
}
.module-tile.on .module-tile-icon { color: var(--accent-text); border-color: var(--accent-line); }
.module-tile-body { display: grid; gap: .2rem; min-width: 0; }
.module-tile-body strong { font-size: 1rem; }
.module-tile-body span { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.module-tile-mark {
  display: grid; place-items: center; width: 1.4rem; height: 1.4rem; margin-top: .1rem; border-radius: 6px;
  font-size: .9rem; border: 1.5px solid var(--border-strong); color: var(--on-accent);
}
.module-tile.on .module-tile-mark { background: var(--accent); border-color: var(--accent); }
.module-why { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem; margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.module-why .preset-mark { margin-left: 0; }
.module-date-hint { margin: 0 0 .8rem; color: var(--warn); }
.modules-card .module-tiles { margin-bottom: .2rem; }

/* -- Redesign, host link and the DJ's tools (host.js, timeline.js, photos-admin.js, …): spacing
      for the line icons (icons.js) that replaced the emojis ------------------------------------ */
.host-artist-icon { margin-right: .35em; color: var(--muted); }
:is(#dinner-state, #notes-state, #gb-host-text-state) .icon { color: var(--ok); }
.tl-song .icon, .tl-now-song .icon, .tl-suggest .icon { margin-right: .3em; }
.tl-add > summary .icon { margin-right: .25em; }
.ph-card-task .icon { margin-right: .25em; }

/* Icons inside dashboard controls (admin.js) */
.back-link { display: inline-flex; align-items: center; gap: .3rem; }
.btn-in { display: inline-flex; align-items: center; gap: .35rem; }
.tab-more-caret, .dj-emoji-caret { display: inline-flex; }
.promo-link { white-space: nowrap; }
.promo-link + .promo-link { margin-left: 1rem; }
.step-mark .icon { width: 1rem; height: 1rem; }
.kind-choice .icon, .next-step strong .icon { color: var(--accent-text); }

/* -- Redesign, guest pages (guest.js, guestbook.js, photos.js, guest-light.js, guest-beer.js,
      livedemo.js): spacing for the line icons (icons.js) that replaced the emojis ----------- */
/* A sign in front of a text that may wrap: the sign stays with the first line */
:is(.offline-banner, .offline-hint, .dialog-offline, .test-banner, .wish-news, .track-pending, .track-sent, .mood-status, .emoji-status) {
  display: flex; align-items: flex-start; gap: .45rem;
}
:is(.offline-banner, .offline-hint, .dialog-offline, .test-banner, .wish-news, .track-pending, .track-sent, .mood-status, .emoji-status) > .icon {
  margin-top: .15em;
}
.wish-news-text { min-width: 0; overflow-wrap: anywhere; }
.offline-empty .icon, .gb-thanks .icon, .gb-label .icon { margin-right: .35em; }
.ph-task-count { display: inline-flex; align-items: center; gap: .25rem; }
.ph-mine-item figcaption > span { display: inline-flex; align-items: center; gap: .3rem; }
.gb-editor-state .icon { margin-right: .35em; color: var(--ok); }
.gb-greeting-editor .gb-rec { text-align: left; }
/* The wish dialog's buttons: side by side where they fit, else "Wunsch abschicken" on top (it was cut off at 375 px) */
.dialog-actions { flex-wrap: wrap-reverse; }
.dialog-actions .btn { flex: 1 1 auto; }
.module-tiles.compact { grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: .45rem; }
.module-tiles.compact .module-tile-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.module-tiles.compact .module-tile { align-items: center; padding: .6rem .7rem; gap: .6rem; }
.module-tiles.compact .module-tile-icon { width: 2.1rem; height: 2.1rem; font-size: 1.2rem; }
.module-tiles.compact .module-tile-body span { display: none; }
.module-tiles.compact .module-tile-mark { margin-top: 0; }
/* Paid extras (addons.py): the price on their tiles, and the card to buy one on top of its tab */
.module-tile-body .module-tile-price { color: var(--accent-text); font-size: .8rem; font-weight: 600; }
.module-tiles.compact .module-tile-body .module-tile-price { display: block; }
.addon-card { border-color: var(--accent-line); }
.addon-card h3 { margin-bottom: .4rem; }
.addon-card p { margin: 0 0 .7rem; }
.addon-card .hint { margin: .7rem 0 0; }
.addon-card .row + .row { margin-top: .5rem; }
/* Long labels ("Zusammen mit der Foto-Wand für 39,99 € statt 49,98 €") wrap on a phone */
.addon-card .btn { max-width: 100%; white-space: normal; text-align: left; height: auto; }

/* Monthly or yearly subscription (showAbo) */
.plan-pick { display: grid; gap: .8rem; width: 100%; }
.plan-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .6rem; max-width: 34rem; }
.plan-choice {
  display: grid; gap: .2rem; padding: .8rem .9rem; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.plan-choice:hover { border-color: var(--border-strong); }
.plan-choice:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.plan-choice.on { border-color: var(--accent); background: var(--accent-soft); }
.plan-choice .plan-price { font-size: 1.1rem; font-weight: 600; }
.plan-choice small { color: var(--muted); }
.plan-choice.on small { color: var(--accent-text); }

/* The operator's DJ page: search, extras for free, Lichtermeer bookings (showDjs) */
.dj-search { margin: 0 0 .8rem; }
.dj-search input { width: 100%; }
/* One entry per DJ, closed at first: the line shows name, e-mail and badges */
.dj-count { color: var(--muted); font-weight: 400; }
.dj-list > .dj-entries { margin-top: .6rem; }
.dj-entries { border-bottom: 1px solid var(--border); }
.dj-entry { border-top: 1px solid var(--border); }
/* One compact line per DJ: name, e-mail (cut short) and small badges */
.dj-entry > summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .7rem; padding: .42rem 1.6rem .42rem 0;
  position: relative; list-style: none; cursor: pointer; color: var(--text); font-weight: 400;
}
.dj-entry > summary::-webkit-details-marker { display: none; }
.dj-entry > summary::after { content: "▾"; position: absolute; right: .3rem; top: .45rem; color: var(--muted); }
.dj-entry[open] > summary::after { content: "▴"; }
.dj-entry > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.dj-entry-name { flex: 1 1 14rem; min-width: 0; display: flex; align-items: baseline; gap: .6rem; }
.dj-entry-name strong { flex: none; max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dj-entry-name small { min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dj-entry-badges { display: flex; flex-wrap: wrap; gap: .25rem; }
.dj-entry-badges .badge { font-size: .74rem; padding: .08rem .45rem; }
.dj-entry-body { padding: 0 0 .9rem; }
.dj-entry-body > .track-sub { margin: 0 0 .25rem; white-space: normal; }
.dj-entry-part { margin-top: .9rem; }
.dj-entry-part > h4 { margin: 0 0 .45rem; font-size: .92rem; }
.dj-extras-boxes { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; }
.dj-extras-boxes label.check { margin: 0; font-size: .95rem; }
.dj-extras-boxes input:disabled { cursor: default; opacity: .55; }
.dj-contract { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: 0 0 .4rem; font-size: .92rem; }
.dj-lights { margin-top: .4rem; }
.dj-lights summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.dj-lights ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.dj-lights li { margin: .25rem 0; font-size: .9rem; }
.dj-lights .over { color: var(--bad); }

/* Unlocking the Lichtermeer for a number of guests (light-ear.js) */
.dj-light-buy { display: grid; gap: .6rem; padding: .8rem; margin-bottom: .8rem; border: 1px solid var(--accent-line); border-radius: var(--radius); }
.dj-light-buy h4 { margin: 0; }
.dj-light-buy p { margin: 0; }
.dj-light-buy .row { align-items: flex-end; }
.dj-light-buy label { margin: 0 0 .3rem; }
.dj-light-buy .num-input { width: 7rem; }
.dj-light-buy .total { font-weight: 600; }

/* Guest page of an event without the module "Wünsche" (guest.js): only guestbook, photo wall,
   emojis and Lichtermeer */
body.no-wishes .guest-tabs, body.no-wishes #limit-info, body.no-wishes .tab-panel, body.no-wishes #closed,
body.no-wishes #intro, body.no-wishes .hero .eyebrow { display: none !important; }

/* -- the sales sheet for the DJ's clients (sales-sheet.js): white like paper, the DJ's colour -- */
body.sales { max-width: 56rem; }
.sheet-editor {
  display: grid; gap: .2rem; margin-bottom: 1.6rem; padding: 1rem 1rem 1.2rem;
  color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
}
.sheet-editor[hidden] { display: none; }
.sheet-editor h2 { margin: 0; font-size: 1.15rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.sheet-editor input:not([type="checkbox"]), .sheet-editor textarea { width: 100%; }
.sheet-items-edit { display: grid; gap: .6rem; margin-top: .8rem; }
.sheet-item-edit { padding: .7rem .8rem .8rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.sheet-item-edit label.check { margin: 0; font-weight: 600; }
.sheet-item-edit .hint { margin: .3rem 0 0; }
.sheet-editor .row { margin-top: .9rem; }

.sales-sheet {
  color: #111; font-size: 11pt; line-height: 1.45;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.sales-head { display: flex; align-items: center; min-height: 3rem; padding-bottom: .8rem; margin-bottom: 1.2rem; border-bottom: 3px solid var(--accent); }
.sales-logo { max-height: 76px; max-width: 60%; object-fit: contain; }
.sales-name { font-size: 1.5rem; }
.sales-sheet h1 { margin: 0 0 .4rem; font-size: 1.9rem; line-height: 1.2; color: #111; text-transform: none; letter-spacing: 0; }
.sales-intro { margin: 0 0 1.2rem; color: #333; }
.sales-items { display: grid; gap: .9rem; }
.sales-item {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: .9rem; align-items: start;
  padding: .9rem 1rem; border: 1px solid #d9d9d9; border-radius: 10px; break-inside: avoid;
}
.sales-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.5rem; color: var(--on-accent); background: var(--accent); }
.sales-item h2 { margin: 0; font-size: 1.2rem; color: #111; text-transform: none; letter-spacing: 0; }
.sales-tagline { margin: .1rem 0 .4rem; color: #444; font-weight: 600; }
.sales-item ul { margin: 0; padding-left: 1.1rem; color: #222; }
.sales-item li { margin: .15rem 0; }
.sales-price { padding: .3rem .7rem; font-size: 1.05rem; font-weight: 700; white-space: nowrap; color: #111; border: 2px solid var(--accent); border-radius: 8px; }
.sales-bundle { margin: 1rem 0 0; padding: .7rem 1rem; background: #f4f4f4; border-left: 4px solid var(--accent); border-radius: 4px; }
.sales-how { margin-top: 1.3rem; break-inside: avoid; }
.sales-how h3 { margin: 0 0 .3rem; font-size: 1.05rem; color: #111; text-transform: none; letter-spacing: 0; }
.sales-how ol { margin: 0; padding-left: 1.3rem; color: #222; }
.sales-contact {
  margin-top: 1.4rem; padding: .8rem 0 0; white-space: pre-line; text-align: left; font-size: 1em; color: #333;
  border-top: 1px solid #d9d9d9;
}
/* Four extras: two by two with the price at the bottom of each, so the sheet stays one A4 page */
.sales-items.two-by-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-by-two .sales-item { grid-template-columns: 3rem minmax(0, 1fr); grid-template-rows: 1fr auto; }
.two-by-two .sales-icon { grid-row: 1 / span 2; }
.two-by-two .sales-price { grid-column: 2; justify-self: start; align-self: end; }
/* The page is white: the toast keeps the dashboard's light text on its dark box */
body.paper #toast { color: var(--text); }
body.paper #toast.error { color: var(--bad); }
@media (max-width: 560px) {
  .sales-item { grid-template-columns: 2.4rem minmax(0, 1fr); }
  .sales-icon { width: 2.4rem; height: 2.4rem; font-size: 1.2rem; }
  .sales-price { grid-column: 2; justify-self: start; white-space: normal; }
  .sales-sheet h1 { font-size: 1.5rem; }
  .sales-items.two-by-two { grid-template-columns: minmax(0, 1fr); }
  .two-by-two .sales-item { grid-template-columns: 2.4rem minmax(0, 1fr); }
}
@media print {
  @page { size: A4; margin: 12mm 14mm; }
  .sheet-editor { display: none !important; }
  /* One A4 page with all extras (four of them two by two) */
  .sales-sheet { font-size: 9.5pt; line-height: 1.38; }
  .sales-head { padding-bottom: .5rem; margin-bottom: .8rem; }
  .sales-logo { max-height: 60px; }
  .sales-sheet h1 { font-size: 1.7rem; }
  .sales-intro { margin-bottom: .8rem; }
  .sales-items { gap: .55rem; }
  .sales-item { padding: .6rem .8rem; gap: .7rem; grid-template-columns: 2.5rem minmax(0, 1fr) auto; }
  .sales-icon { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; }
  .two-by-two .sales-item { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .sales-bundle { margin-top: .7rem; padding: .5rem .8rem; }
  .sales-how { margin-top: .9rem; }
  .sales-contact { margin-top: .9rem; padding-top: .5rem; }
}

/* KI-Vorschläge „Was passt als Nächstes?“ (admin.js nextCard) */
.nt-pick:empty { display: none; }
.nt-pick { margin-top: .6rem; }
.nt-out:empty { display: none; }
.nt-out { margin-top: .9rem; }
.nt-wait { color: var(--muted); }
.nt-result { display: flex; flex-direction: column; gap: .7rem; }
.nt-sort { margin: 0; }
.nt-filters { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.nt-filters label.check { font-size: .92rem; gap: .45rem; }
.nt-filters label.check:has(input:disabled) { color: var(--muted); cursor: default; }
.nt-why { color: var(--muted); font-size: .85rem; margin-top: .3rem; white-space: normal; overflow-wrap: anywhere; }
.nt-source { color: var(--accent-text); }
.nt-missing { border-style: dashed; }
.nt-skipped { margin: .4rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: .88rem; }
.dj-ai select { width: auto; min-width: 14rem; max-width: 100%; }
.dj-ai input[type="number"] { width: 8rem; }
.ai-db-top { margin: .4rem 0 .2rem; padding-left: 1.4rem; }
.ai-db-top li { margin: .15rem 0; overflow-wrap: anywhere; }

/* A service provider's page (team.js, /team/<token>, crew.py): messages, run of show, contacts */
.team-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: .35rem; padding: .5rem 0; background: var(--bg); }
.team-tab {
  flex: 1; position: relative; display: flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .6rem .4rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer; min-height: 2.9rem;
}
.team-tab[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.team-badge {
  min-width: 1.3rem; height: 1.3rem; padding: 0 .35rem; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: .78rem; display: inline-flex; align-items: center; justify-content: center;
}
.team-badge[hidden] { display: none; }
.team-section[hidden] { display: none; }
.team-messages { display: flex; flex-direction: column; gap: .5rem; max-height: 55vh; overflow-y: auto; margin: .2rem 0 .6rem; padding-right: .2rem; }
.team-msg { align-self: flex-start; max-width: 88%; padding: .55rem .75rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.team-msg.mine { align-self: flex-end; background: var(--accent-soft); border-color: var(--accent-line); }
.team-msg.from-dj:not(.mine) { border-color: var(--accent-line); }
.team-msg header { font-size: .85rem; margin-bottom: .2rem; }
.team-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.team-msg .btn { margin-top: .3rem; }
.team-send { border-top: 1px solid var(--border); padding-top: .4rem; }
.team-send textarea { margin-top: .5rem; }
.team-pick { display: grid; gap: .35rem; margin: .5rem 0; }
.team-pick label.check { margin: 0; }
.team-pick small { color: var(--muted); }
.team-quick { margin: .6rem 0 0; }
.team-send-row { justify-content: space-between; align-items: center; gap: .6rem; margin-top: .5rem; flex-wrap: nowrap; }
.team-send-row .hint { margin: 0; flex: 1; }
.team-push { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .8rem; }
.team-push .hint { margin: .4rem 0 0; }
.team-point { display: flex; gap: .8rem; padding: .75rem 0; border-top: 1px solid var(--border); }
.team-point:first-child { border-top: 0; }
.team-point.is-done { opacity: .7; }
.team-point-time { flex: none; width: 3.2rem; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.team-point-time small { color: var(--muted); font-weight: 400; font-size: .75rem; }
.team-point-main { flex: 1; min-width: 0; }
.team-point-main h3 { margin: 0 0 .3rem; font-size: 1.02rem; }
.team-point-main .tl-note { white-space: pre-wrap; margin: .35rem 0; }
.team-point-main .tl-song { margin: .3rem 0; }
.team-comments { list-style: none; margin: .5rem 0; padding: 0; display: grid; gap: .4rem; }
.team-comment { padding: .45rem .6rem; border-radius: var(--radius); background: var(--surface-2); font-size: .92rem; }
.team-comment.mine { background: var(--accent-soft); }
.team-comment p { margin: .15rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.team-comment-box { margin-top: .4rem; }
.team-comment-box .row { margin-top: .4rem; }
.team-person { padding: .6rem 0; border-top: 1px solid var(--border); }
.team-person h3 { margin: 0; font-size: 1rem; }
.team-person h3 small { color: var(--muted); font-weight: 400; }
.team-person p { margin: .15rem 0; }
.team-call { gap: .4rem; margin-top: .35rem; }
.team-contacts .gb-subtitle { margin: 1rem 0 .2rem; }
.team-contacts .gb-subtitle:first-child { margin-top: 0; }
.team-me { margin-top: 1rem; }
.team-privacy { margin: 1rem 0 2rem; }
/* The DJ's tab "Dienstleister" (crew-admin.js) */
.crew-messages { max-height: 50vh; }
.team-msg.crew-aside { border-style: dashed; }
.team-msg header .badge { margin-left: .4rem; }
/* On a phone the buttons go below the name instead of squeezing it */
.crew-member { flex-wrap: wrap; align-items: flex-start; }
.crew-member .track-main { min-width: 0; flex: 1 1 15rem; }
.crew-share { gap: .35rem; flex-wrap: wrap; margin-top: .45rem; }
.crew-edit { display: grid; gap: .45rem; }
.crew-add-box { margin-top: .8rem; }
.crew-facts { margin: 0 0 .6rem; }
.contact-crew { margin-top: .8rem; }
.contact-crew[hidden] { display: none; }
.contact-crew .hint { margin: .25rem 0 0 2rem; }
.tl-comments { margin-top: .5rem; min-width: 0; }
.tl-comments .team-comment .btn { margin-top: .2rem; }
/* "Kommentar für die Dienstleister" wraps on a phone instead of running over the edge */
.tl-comments > .btn { max-width: 100%; white-space: normal; text-align: left; }
.team-messages { border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem; }
.team-messages .empty { padding: 1rem .5rem; }
