:root {
  --bg: #0b0b10;
  --surface: #15151d;
  --surface-2: #1d1d28;
  --border: #2a2a38;
  --text: #f4f4f8;
  --muted: #9b9bb0;
  --accent: #ff3d81;
  --accent-2: #8b5cf6;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 14px;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
  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; }

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.05rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; 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-2);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .25);
}
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); }

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: #fff; background: var(--gradient);
  border: 0; border-radius: 999px;
  padding: .55rem 1rem; min-height: 2.5rem;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform .1s, opacity .15s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.96); }
.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: #065f46; color: #d1fae5; }
.btn.bad { background: #7f1d1d; color: #fee2e2; }
.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); 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: .3rem .65rem; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge.ok { color: var(--ok); border-color: rgba(52, 211, 153, .35); }
.badge.warn { color: var(--warn); border-color: rgba(251, 191, 36, .35); }
.badge.bad { color: var(--bad); border-color: rgba(248, 113, 113, .35); }
.badge.accent { color: #fff; background: var(--gradient); border-color: transparent; }

.notice {
  background: rgba(251, 191, 36, .1);
  border: 1px solid rgba(251, 191, 36, .35);
  color: var(--warn);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  margin: 1rem 0;
}
.notice.error { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .35); color: var(--bad); }

.hint { color: var(--muted); font-size: .9rem; margin: -.25rem 0 .75rem; }
.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; }
/* Album cover on the guest page: a note tile until (or unless) the image arrives */
.cover { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 8px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.cover::before { content: "♪"; grid-area: 1 / 1; color: var(--muted); font-size: 1.1rem; }
.cover img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.cover img.loaded { opacity: 1; }
.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; }
.did-you-mean { margin: .2rem 0 .6rem; }
.track-sub { color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(139, 92, 246, .35), transparent 60%),
    radial-gradient(80% 60% at 85% 10%, rgba(255, 61, 129, .25), transparent 60%);
}
.eyebrow {
  margin: 0 0 .4rem; font-size: .8rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent);
}
.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: #d4d4e0; }
.legal ul { padding-left: 1.2rem; }
.legal-text { white-space: pre-line; color: #d4d4e0; }
.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: #d4d4e0; 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: .95rem 1.1rem; border-radius: 999px;
  background: var(--surface-2);
}

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

.limit-info { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }

dialog {
  width: min(92vw, 440px);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.4rem;
}
dialog::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(3px); }
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; }
.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: 999px;
  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(248, 113, 113, .5); color: var(--bad); }

footer { text-align: center; color: #5e5e72; 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); 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; }
.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); }
.mood-row input[type=range] { width: 100%; accent-color: var(--accent); margin: .45rem 0 .1rem; }
.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: rgba(11, 11, 16, .9); position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
.topbar { flex-wrap: wrap; row-gap: .5rem; }
.topnav { display: flex; gap: .2rem; margin-left: auto; margin-right: .5rem; }
@media (max-width: 560px) {
  /* Wraps instead of scrolling sideways (the operator has seven entries) */
  .topnav { order: 3; width: 100%; margin: 0; flex-wrap: wrap; row-gap: .2rem; }
  .topbar .topnav a { padding: .35rem .5rem; }
}
.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; padding: .35rem .6rem; border-radius: 999px; }
.topnav a.active { color: var(--text); background: var(--surface-2); }
/* Switches between the DJ tools: Lieder wünschen (the dashboard) and Playlist Übertrag */
.toolswitch { display: flex; gap: .15rem; padding: .2rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.toolswitch a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .86rem; padding: .3rem .8rem; border-radius: 999px; white-space: nowrap; }
.toolswitch a:hover { color: var(--text); }
.toolswitch a[aria-current="page"] { color: #fff; background: var(--gradient); }
@media (max-width: 560px) {
  .toolswitch { order: 2; }
  .toolswitch a { padding: .3rem .6rem; }
}
.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; letter-spacing: .02em; text-decoration: none; color: var(--text); font-size: 1.1rem; }
.brand span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

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; }

.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(--accent-2); }
.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: 999px;
  padding: .45rem .95rem; cursor: pointer; white-space: nowrap;
}
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tab .count { opacity: .7; margin-left: .25rem; }

.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(52, 211, 153, .5); }
.status-summary.warn { border-color: rgba(251, 191, 36, .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; }
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; }
.voters { margin-top: .45rem; font-size: .88rem; color: #cfcfdc; }
.voters .msg { color: var(--muted); font-style: italic; }
.request-actions { display: flex; gap: .4rem; margin-top: .7rem; flex-wrap: wrap; }

.url-box {
  display: flex; gap: .5rem; align-items: center;
  background: var(--surface-2); border-radius: 12px; padding: .5rem .5rem .5rem .9rem;
  overflow: hidden; margin-top: .75rem;
}
.url-box span {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem;
}

.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; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.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(52, 211, 153, .6);
  animation: pulse 2s infinite;
}
.live-dot.off { background: var(--bad); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); }
  70% { box-shadow: 0 0 0 .5rem rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* -- poster (printed, A4 landscape) --------------------------------------- */

/* Sizes are in cqw (percent of the sheet's width), so the screen preview and the
   printed page look the same. */
body.poster {
  background: #1b1b1f; color: #f4f4f4; padding: 24px 16px;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.poster-stage { container-type: inline-size; width: min(100%, 1200px); margin: 0 auto; }
.poster-sheet {
  position: relative; aspect-ratio: 297 / 210; background: #000; color: #f4f4f4;
  box-sizing: border-box; overflow: hidden;
  padding: 5cqw 5.5cqw 3.5cqw; display: flex; flex-direction: column;
  font-family: "Helvetica Neue", Inter, Arial, sans-serif; box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.poster-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 4cqw; }
.poster-event { border-left: .5cqw solid var(--accent); padding-left: 1.6cqw; min-width: 0; }
.poster h1 {
  font-size: 2.1cqw; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em;
  line-height: 1.1; margin: 0;
}
.poster-sub { margin: .6cqw 0 0; font-size: .95cqw; color: #9a9aa0; text-transform: uppercase; letter-spacing: .02em; }
.poster-sub:empty { display: none; }
.poster-brand { flex: none; display: flex; justify-content: flex-end; }
.poster-brand img { display: block; height: 5.4cqw; max-width: 24cqw; object-fit: contain; }
.poster-dj { font-size: 3.4cqw; font-weight: 800; letter-spacing: -.02em; }
.poster-main { flex: 1; display: grid; grid-template-columns: 39cqw 1fr; gap: 5.2cqw; align-items: start; margin-top: 3.2cqw; }
.poster-qr { background: #fff; padding: 3.4cqw; aspect-ratio: 1; }
.poster-qr svg { display: block; width: 100%; height: 100%; }
.poster-copy { padding-top: .2cqw; }
.poster-rule { width: 6.3cqw; height: .35cqw; background: var(--accent); margin: .6cqw 0 2.4cqw; border-radius: 1cqw; }
.poster-big { margin: 0; font-size: 9cqw; line-height: .98; letter-spacing: -.035em; white-space: nowrap; }
/* "Wünsch dir / deinen Song!" is longer than "Request / your song!" */
.poster-big:lang(de) { font-size: 7.3cqw; }
.poster-big span { display: block; }
.poster-big .thin { font-weight: 300; }
.poster-big .bold { font-weight: 800; }
.poster-steps { list-style: none; padding: 0; margin: 2.6cqw 0 0; display: grid; gap: 1.5cqw; }
.poster-steps li { font-size: 1.4cqw; font-weight: 700; text-transform: uppercase; }
.poster-steps span { margin-right: .7cqw; }
.poster-scan { margin: 2.6cqw 0 0; font-size: 1.4cqw; font-weight: 700; text-transform: uppercase; color: var(--accent); }
.poster-foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid #2a2a2e; margin-top: 2.6cqw; padding-top: 2.2cqw;
}
.poster-claim { font-size: 1.6cqw; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; }
.poster-play { font-size: .95cqw; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.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 {
  @page { size: A4 landscape; margin: 0; }
  html, body.poster { margin: 0; padding: 0; background: #000; }
  .poster-stage { width: 297mm; }
  .poster-sheet { width: 297mm; height: 210mm; aspect-ratio: auto; box-shadow: none; }
  .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); }
@media print {
  .paper-toolbar { display: none; }
  body.paper { padding: 0; }
}

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(--gradient); 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(--gradient); border-color: transparent; color: #fff; }
.steps li.done strong { opacity: .7; }
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); }
.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; letter-spacing: .05em;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 99px; 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; }
}

/* -- 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(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .35);
  border-radius: 16px; padding: .7rem .9rem;
}
.open-switch.on { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .35); }
.switch-track {
  flex: none; position: relative; width: 3rem; height: 1.7rem; border-radius: 99px;
  background: #3a3a46; 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; }

/* -- 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; }

/* -- 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: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; 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: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; 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: .78rem; text-transform: uppercase; letter-spacing: .05em; 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; }
@media print { .report h2 { break-after: avoid; } .report-table tr { 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: 14px; font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .4); animation: news-in .35s ease-out;
}
.wish-news.ok { background: var(--gradient); color: #fff; }
.wish-news.bad { background: var(--surface-2); border: 1px solid rgba(248, 113, 113, .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; }
