/* Klick-Demo Brettspielabend Uni Bonn – Farb-Tokens aus docs/DESIGN.md, System-Schriften, keine externen Dateien */
:root {
  --bg: #12201C; --surface: #1B2E29; --surface-2: #24403A; --line: #2F4A43; --nav: #172925;
  --text: #F3EFE6; --muted: #A9B8B2; --accent: #F4B544; --on-accent: #1A1406;
  --sucht: #7FE0C6; --on-sucht: #0C1F1A; --belegt: #4A6862; --frei: #D7E0DC;
  --privat: #C9B6F2; --danger: #E07A6A; --danger-text: #E8A49A; --fenster: #8EC5E8; --essen: #3B3550;
  --chip-line: #5B7A71; --paper: #F3EFE6; --paper-text: #3B4F49;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.4 var(--font); -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-weight: 700; margin: 0; line-height: 1.2; }
h1 { font-size: 1.25rem; } h2 { font-size: 1.05rem; } h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Fokus immer sichtbar */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Rahmen: Handy-Spalte, am PC zentriert */
.wrap { max-width: 480px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: none; }

/* Demo-Leiste (auf jeder Sicht, überdeckt nichts) */
.demo-strip { background: #0B1512; border-bottom: 1px solid var(--line); }
.demo-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; padding-bottom: 4px; }
.demo-badge { font-weight: 700; font-size: .85rem; color: var(--accent); white-space: nowrap; }
.demo-strip .btn { font-size: .85rem; white-space: nowrap; padding: 0 6px; }

/* Rundgang-Leiste */
.tour { position: sticky; top: 0; z-index: 5; background: var(--surface-2); border-bottom: 2px solid var(--accent); }
.tour .wrap { padding-top: 8px; padding-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.tour-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-step { font-weight: 700; }
.tour-text { font-size: .95rem; }

/* Bedienelemente: alle Touch-Ziele mindestens 44 × 44 px */
button, .btn, .chip, .tab, a.btn, input, select { min-height: 44px; min-width: 44px; font: inherit; }
button { cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 12px; padding: 0 16px; font-weight: 700; text-decoration: none; text-align: center; background: var(--line); color: var(--text); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.go { background: var(--sucht); color: var(--on-sucht); }
.btn.ghost { background: transparent; border: 1px solid var(--chip-line); }
.btn.link { background: transparent; color: var(--accent); padding: 0 8px; }
.btn.danger { background: transparent; color: var(--danger-text); border: 1px solid var(--danger); }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .75; cursor: not-allowed; }
.btn.sq { width: 44px; padding: 0; font-size: 1.3rem; }
.chip { border-radius: 999px; padding: 0 16px; font-size: .95rem; font-weight: 500; background: transparent; color: var(--text); border: 1px solid var(--chip-line); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap-r { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg { display: flex; gap: 4px; background: var(--surface); border-radius: 12px; padding: 4px; }
.seg button { flex: 1; border: none; border-radius: 10px; background: transparent; color: var(--text); font-weight: 700; padding: 0 6px; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }
input, select { background: var(--bg); color: var(--text); border: 1px solid var(--chip-line); border-radius: 10px; padding: 0 12px; width: 100%; }

/* Karten */
.card { background: var(--surface); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.soft { background: var(--surface-2); }
.card.later { border: 1px dashed var(--privat); }
.nr { font-weight: 700; background: var(--surface-2); border-radius: 8px; padding: 6px 9px; }
.stat { background: var(--surface); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.stat b { font-size: 1.5rem; }
.ok { color: var(--sucht); } .warn { color: var(--accent); } .lila { color: var(--privat); } .bad { color: var(--danger-text); }

/* Status-Badges: immer Text + Farbe */
.badge { display: inline-block; font-size: .8rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.b-sucht { background: var(--sucht); color: var(--on-sucht); }
.b-bald { background: var(--accent); color: var(--on-accent); }
.b-belegt { background: var(--line); color: var(--frei); }
.b-frei { background: transparent; color: var(--text); border: 1px solid var(--chip-line); padding: 4px 10px; }
.later-badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--privat); color: var(--privat); white-space: nowrap; }

/* App-Kopf und Tab-Leiste der Sichten */
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0 12px; border-bottom: 1px solid var(--surface-2); }
.app-head .sub { color: var(--muted); font-size: .85rem; }
.view-body { padding: 16px 0 24px; display: flex; flex-direction: column; gap: 14px; }
.tabs { position: sticky; bottom: 0; z-index: 4; display: flex; background: var(--nav); border-top: 1px solid var(--surface-2); padding: 4px 4px 8px; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: none; color: var(--muted); font-size: .75rem; min-height: 56px; padding: 0 2px; text-decoration: none; }
.tab[aria-current="page"] { color: var(--accent); font-weight: 700; }
.tab svg { width: 22px; height: 22px; }

/* Theke: Kamera-Attrappe und Schritte */
.cam { position: relative; height: 150px; border-radius: 16px; background: #0B1512; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; overflow: hidden; }
.cam::before { content: ""; position: absolute; left: 40px; right: 40px; top: 70px; height: 2px; background: var(--accent); }
.cam::after { content: ""; position: absolute; inset: 24px 40px 36px; border: 3px solid var(--accent); border-radius: 8px; opacity: .6; }
.step { display: flex; gap: 12px; align-items: center; border-radius: 12px; padding: 10px 12px; border: 1px dashed var(--chip-line); }
.step.done { background: var(--surface-2); border: 1px solid var(--surface-2); }
.step.now { border: 2px solid var(--accent); }
.dot { width: 30px; height: 30px; flex-shrink: 0; border-radius: 999px; background: var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.step.done .dot { background: var(--sucht); color: var(--on-sucht); }
.step.now .dot { background: var(--accent); color: var(--on-accent); }
.step-state { margin-left: auto; font-size: .8rem; font-weight: 700; white-space: nowrap; }

/* QR-Attrappe */
.qr-card { background: var(--paper); color: var(--bg); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.qr-card .qr-text { color: var(--paper-text); font-size: .95rem; }
.qr { width: 168px; height: 168px; display: block; }
.fake-qr { display: flex; align-items: center; gap: 12px; background: var(--paper); color: var(--bg); border-radius: 12px; padding: 10px; }
.fake-qr .qr { width: 64px; height: 64px; }

/* Saalplan (800 × 700 wie Monitor.dc.html) */
.plan { position: relative; width: 800px; height: 700px; border: 5px solid #6E8C84; border-radius: 6px; background: var(--nav); flex-shrink: 0; }
.plan > span { position: absolute; display: flex; align-items: center; justify-content: center; text-align: center; }
.plan .chair { background: var(--chip-line); border-radius: 3px; width: 10px; height: 10px; }
.plan .t { flex-direction: column; line-height: 1; border-radius: 4px; font-weight: 700; }
.plan .t b { font-size: 17px; }
.plan .t i { font-style: normal; font-size: 10px; font-weight: 700; margin-top: 2px; }
.plan .t.rund { border-radius: 999px; }
.plan .s-sucht { background: var(--sucht); color: var(--on-sucht); }
.plan .s-bald { background: var(--accent); color: var(--on-accent); }
.plan .s-belegt { background: var(--belegt); color: var(--text); }
.plan .s-frei { background: var(--nav); color: var(--frei); border: 2px solid var(--frei); }
.plan .s-hl { box-shadow: 0 0 0 4px var(--text); }
.plan .lbl { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 17px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 22px; height: 14px; border-radius: 3px; }

/* Eingangsmonitor 1920 × 1080, am Handy skaliert */
.mon-hint { padding: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.mon-frame { overflow: hidden; border-radius: 8px; border: 1px solid var(--line); }
.mon-frame.orig { overflow-x: auto; }
.monitor { width: 1920px; height: 1080px; padding: 40px; display: flex; flex-direction: column; gap: 28px; background: var(--bg); transform-origin: 0 0; }
.monitor .card { border-radius: 20px; padding: 20px 24px; gap: 14px; }
.mon-head { display: flex; justify-content: space-between; align-items: flex-end; }
.mon-kz { display: flex; gap: 36px; }
.mon-kz div { display: flex; flex-direction: column; align-items: flex-end; font-size: 18px; color: var(--muted); }
.mon-kz b { font-size: 48px; color: var(--text); }
.mon-grid { display: grid; grid-template-columns: 500px minmax(0, 1fr) 380px; gap: 28px; flex: 1; min-height: 0; }
.mon-list { display: flex; flex-direction: column; gap: 14px; }
.mon-item { display: flex; align-items: center; gap: 18px; background: var(--surface); border-radius: 20px; padding: 16px 22px; }
.mon-item .mnr { font-size: 28px; font-weight: 700; background: var(--sucht); color: var(--on-sucht); border-radius: 12px; padding: 8px 14px; min-width: 60px; text-align: center; }
.mon-item .g { font-size: 24px; font-weight: 700; }
.mon-item .i { font-size: 17px; color: var(--muted); }
.mon-item .f { font-size: 20px; font-weight: 700; color: var(--sucht); white-space: nowrap; margin-left: auto; }
.mon-aside { display: flex; flex-direction: column; gap: 22px; }
.mon-qr { background: var(--paper); color: var(--bg); border-radius: 20px; padding: 24px; display: flex; gap: 20px; align-items: center; }
.mon-qr .qr { width: 147px; height: 147px; flex-shrink: 0; }
.mon-qr p { font-size: 17px; color: var(--paper-text); }
.mon-aside .card p, .mon-aside .card li { font-size: 19px; }
.mon-aside ul { list-style: none; margin: 0; padding: 0; }
.mon-aside li { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }

/* Admin-Plan verkleinert (0,42 wie AdminMobile.dc.html) */
.mini-plan { width: 341px; height: 298px; overflow: hidden; margin: 0 auto; }
.mini-plan .plan { transform: scale(.42); transform-origin: 0 0; }

/* Dialog */
dialog { background: var(--surface); color: var(--text); border: 2px solid var(--danger); border-radius: 16px; padding: 18px; max-width: 420px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0, 0, 0, .7); }
dialog ul { margin: 0; padding-left: 20px; }

.notice { background: var(--surface-2); border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 12px; }
.start-hero { padding: 20px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.start-hero h1 { font-size: 1.6rem; }
ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.noscript { padding: 16px; background: var(--surface-2); }
/* Tab-Leiste unten halten, auch bei kurzem Inhalt */
#v-besucher > .wrap, #v-theke > .wrap, #v-admin > .wrap { display: flex; flex-direction: column; min-height: calc(100vh - 53px); }
#v-besucher .view-body, #v-theke .view-body, #v-admin .view-body { flex: 1; }
