/* Kater-Alarm – nachts benutzt, daher dunkel zuerst. Rot ist ausschließlich für Alarm reserviert. */
:root {
  --bg: #0e1015; --panel: #171a22; --panel-2: #20242f; --line: #2c3141;
  --fg: #eef0f5; --muted: #9ba2b5; --accent: #f2b544; --accent-ink: #1a1305;
  --red: #ff4d43; --red-ink: #ffffff; --red-bg: #3b1412;
  --amber: #ffb020; --amber-bg: #3a2a0c; --green: #4fd18b; --green-bg: #11301f; --blue: #6aa8ff; --blue-bg: #13223d;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f2ee; --panel: #ffffff; --panel-2: #eceae4; --line: #d9d6cd;
    --fg: #16171b; --muted: #5d606b; --accent: #b97a00; --accent-ink: #ffffff;
    --red: #d1261c; --red-bg: #fde4e1; --amber: #9a5f00; --amber-bg: #fdf0d6; --green: #14804a; --green-bg: #dcf3e6; --blue: #1f5fc4; --blue-bg: #e2ecfc;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 17px/1.45 var(--body); }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 18px; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.1; text-wrap: balance; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.15rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.label { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--muted); font-weight: 600; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.btn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 11px 16px; font-weight: 600; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { background: var(--red); color: var(--red-ink); border-color: var(--red); }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 12px; font-size: .92rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.spread { justify-content: space-between; }
.stack.tight { gap: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.linkbox { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; overflow-wrap: anywhere; background: var(--panel-2); border-radius: 8px; padding: 6px 8px; user-select: all; }
.qrthumb { width: 120px; height: 120px; background: #fff; border-radius: 8px; padding: 6px; }
input[type=text], input[type=tel], input[type=password], textarea, select { width: 100%; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
textarea { min-height: 70px; resize: vertical; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.banner { border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 12px 14px; }
.banner.warn { border-color: var(--amber); background: var(--amber-bg); }
.banner.good { border-color: var(--green); background: var(--green-bg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px; padding: 8px 14px; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.pill.gast { background: var(--red-bg); color: var(--red); }
.pill.team { background: var(--amber-bg); color: var(--amber); }
.pill.taken { background: var(--blue-bg); color: var(--blue); }
.pill.done { background: var(--green-bg); color: var(--green); }
.pill.shared { background: var(--blue-bg); color: var(--blue); }
.mono { font-variant-numeric: tabular-nums; }
.empty { border: 1px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); }
a { color: var(--accent); }

/* ---------- Logo ---------- */
.brand:empty { display: none; }
.brand-logo { display: block; height: 44px; width: auto; max-width: 70%; }
.guest .brand-logo { height: 52px; }
.poster-logo { height: 64px; width: auto; max-width: 80%; }

/* ---------- Gast ---------- */
.guest .wrap { max-width: 520px; min-height: 100dvh; }
.guest h1 { font-size: 2.2rem; }
.places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.place { border: 2px solid var(--line); background: var(--panel); border-radius: 14px; padding: 16px 10px; font-size: 1.05rem; font-weight: 600; min-height: 64px; }
.place[aria-pressed="true"] { border-color: var(--red); background: var(--red-bg); }
.sos-places { grid-template-columns: 1fr; gap: 12px; }
.sos-place { background: var(--red); color: var(--red-ink); border: 0; font-family: var(--display); font-size: 1.7rem; font-weight: 700; min-height: 78px; box-shadow: 0 6px 0 0 color-mix(in srgb, var(--red) 55%, black); }
.sos-place:active { transform: translateY(4px); box-shadow: 0 2px 0 0 color-mix(in srgb, var(--red) 55%, black); }
.sos-place.other { background: var(--panel); color: var(--fg); border: 2px solid var(--red); box-shadow: none; font-size: 1.3rem; min-height: 64px; }
.sos-place[disabled] { opacity: .5; }
.sos { width: 100%; border: 0; border-radius: 22px; background: var(--red); color: var(--red-ink); font-family: var(--display); font-size: 2.6rem; font-weight: 700; letter-spacing: .02em; padding: 34px 16px; box-shadow: 0 10px 0 0 color-mix(in srgb, var(--red) 55%, black); }
.sos:active { transform: translateY(6px); box-shadow: 0 4px 0 0 color-mix(in srgb, var(--red) 55%, black); }
.sos[disabled] { opacity: .4; box-shadow: none; }
.sos small { display: block; font-family: var(--body); font-size: 1rem; font-weight: 500; opacity: .9; }
.sent { text-align: center; gap: 14px; }
.countdown-num { font-size: 4.5rem !important; color: var(--red); line-height: 1; }
.sent .big { font-family: var(--display); font-size: 2rem; font-weight: 700; }
.tel { display: flex; justify-content: center; gap: 8px; font-size: 1rem; }
.tel b { font-size: 1.3rem; }

/* ---------- Team ---------- */
.alert { border-left: 8px solid var(--red); }
.alert.team { border-left-color: var(--amber); }
.alert.taken { border-left-color: var(--blue); }
.alert.neighbour { border-left-color: var(--blue); }
.alert.fresh { animation: flash 1s ease-in-out 4; }
@keyframes flash { 50% { background: var(--red-bg); } }
@media (prefers-reduced-motion: reduce) { .alert.fresh { animation: none; } }
.alert .where { font-family: var(--display); font-size: 1.7rem; font-weight: 700; line-height: 1.05; }
.alert .desc { font-size: 1.05rem; overflow-wrap: anywhere; }
.bigbtn { width: 100%; padding: 18px; font-size: 1.25rem; font-family: var(--display); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.done-list { display: flex; flex-direction: column; gap: 6px; }
.done-item { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding: 6px 0; font-size: .92rem; }

/* ---------- Plakate ---------- */
.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.poster { background: #fff; color: #111; border-radius: 12px; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; break-inside: avoid; page-break-inside: avoid; }
.poster h2 { font-size: 2rem; color: #c0201a; }
.poster .qr { width: 220px; max-width: 100%; aspect-ratio: 1; }
.poster .qr img { width: 100%; height: 100%; }
.poster .where { font-weight: 700; font-size: 1.15rem; }
.poster .steps { text-align: left; margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 4px; font-size: 1.05rem; }
.poster .foot { font-size: .9rem; border-top: 1px solid #ccc; padding-top: 8px; width: 100%; }
@media print {
  body { background: #fff; }
  .noprint { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .posters { grid-template-columns: 1fr 1fr; gap: 0; }
  .poster { border: 1px dashed #999; border-radius: 0; min-height: 48vh; justify-content: center; }
}
