@font-face{font-family:'Barlow';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/barlow-400.woff2') format('woff2')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/barlow-500.woff2') format('woff2')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/barlow-600.woff2') format('woff2')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/barlow-700.woff2') format('woff2')}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/barlow-sc-400.woff2') format('woff2')}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/barlow-sc-500.woff2') format('woff2')}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/barlow-sc-600.woff2') format('woff2')}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/barlow-sc-700.woff2') format('woff2')}
/* Layout idea: one working board (5 Tage x Hallenfelder x 15-Min-Raster) on top, the numbers that judge it underneath.
   Single light theme on purpose: the club colours come from the printed Belegungsplan and need a white sheet. */
:root{
  color-scheme: light;
  --bg:#E9EDF1;
  --surface:#FFFFFF;
  --ink:#16212C;
  --muted:#5C6976;
  --line:#D6DCE3;
  --line-strong:#8E9BA8;
  --accent:#1747C9;
  --accent-soft:#E3EAFB;
  --gain:#0B7A43;
  --gain-soft:#DDF3E6;
  --loss:#BF2630;
  --loss-soft:#FBE3E4;
  --warn:#B45309;
  --f-body:"Barlow","Segoe UI",system-ui,sans-serif;
  --f-cond:"Barlow Semi Condensed","Arial Narrow","Segoe UI",sans-serif;
  --rh:16px;      /* height of one 15-minute row */
  --twmin:40px;   /* minimum width of one Hallenfeld */
}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:14px;line-height:1.35;-webkit-font-smoothing:antialiased}
button,select,input,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.wrap{max-width:1900px;margin:0 auto;padding:14px 16px 150px;display:flex;flex-direction:column;gap:12px}

/* ---------- header ---------- */
.top{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 24px}
.top h1{font-family:var(--f-cond);font-weight:700;font-size:28px;line-height:1;margin:0;letter-spacing:.01em;text-wrap:balance}
.top .sub{color:var(--muted);font-size:13px;margin-top:4px}
.tabs{display:flex;gap:2px;margin-left:auto;background:#D9E0E7;padding:3px;border-radius:9px}
.tabs button{border:0;background:transparent;padding:6px 14px;border-radius:7px;font-family:var(--f-cond);font-weight:600;font-size:15px;color:var(--muted)}
.tabs button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(22,33,44,.18)}

.bar{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:8px 10px}
.bar .grp{display:flex;align-items:center;gap:6px}
.bar label,.bar .lab{font-size:12px;color:var(--muted);font-weight:500}
.bar .sep{width:1px;align-self:stretch;background:var(--line)}
.btn{border:1px solid var(--line-strong);background:var(--surface);border-radius:7px;padding:5px 10px;font-weight:500;font-size:13px;line-height:1.2}
.btn:hover{background:#F3F6F9}
.btn:disabled{opacity:.4;cursor:default}
.btn.pri{background:var(--accent);border-color:var(--accent);color:#fff}
.btn.pri:hover{background:#123aa6}
.btn.danger{color:var(--loss);border-color:#E3A9AD}
.btn.ico{padding:5px 8px;min-width:30px}
select.sel,input.inp,textarea.inp{border:1px solid var(--line-strong);background:var(--surface);border-radius:7px;padding:4px 7px;font-size:13px}
.seg{display:inline-flex;border:1px solid var(--line-strong);border-radius:7px;overflow:hidden}
.seg button{border:0;background:var(--surface);padding:5px 9px;font-size:13px;font-weight:500;border-left:1px solid var(--line)}
.seg button:first-child{border-left:0}
.seg button[aria-pressed="true"]{background:var(--ink);color:#fff}
.chk{display:inline-flex;align-items:center;gap:5px;font-size:13px}

/* ---------- club chips ---------- */
.chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.chips .lab{font-size:12px;color:var(--muted);font-weight:500;margin-right:2px}
.chip{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line-strong);background:var(--surface);border-radius:999px;padding:3px 10px 3px 4px;font-family:var(--f-cond);font-weight:600;font-size:14px;touch-action:none;user-select:none;cursor:grab}
.chip .sw{width:18px;height:18px;border-radius:50%;border:1px solid rgba(22,33,44,.35);background:var(--c)}
.chip .h{font-weight:400;color:var(--muted);font-variant-numeric:tabular-nums;font-size:13px}
.chip.off{opacity:.45;text-decoration:line-through;background:transparent;border-style:dashed}
.chips .hint{font-size:12px;color:var(--muted);margin-left:6px}

/* ---------- tiles ---------- */
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:8px}
.tile{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:8px 12px;display:flex;flex-direction:column;gap:1px}
.tile .k{font-size:12px;color:var(--muted);font-weight:500}
.tile .v{font-family:var(--f-cond);font-weight:700;font-size:24px;line-height:1.1;font-variant-numeric:tabular-nums}
.tile .v small{font-size:14px;font-weight:500;color:var(--muted)}
.tile .n{font-size:12px;color:var(--muted)}
.tile.bad .v{color:var(--loss)}
.tile.good .v{color:var(--gain)}
.meter{height:5px;border-radius:3px;background:#E1E6EB;overflow:hidden;margin-top:4px}
.meter i{display:block;height:100%;background:var(--accent)}

/* ---------- board ---------- */
.boardbox{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:10px 10px 12px}
.boardbox h2{font-family:var(--f-cond);font-size:17px;font-weight:700;margin:0 0 6px;display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}
.boardbox h2 span{font-family:var(--f-body);font-size:12px;font-weight:400;color:var(--muted)}
.scroller{overflow-x:auto;padding-bottom:4px}
.board{display:flex;gap:8px;min-width:min-content}
.tcol{flex:0 0 38px;position:sticky;left:0;z-index:6;background:var(--surface)}
.tcol .sp{height:65px}
.tcol .tb{position:relative;height:calc(var(--rows) * var(--rh))}
.tcol .tb span{position:absolute;right:5px;transform:translateY(-50%);font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums;font-family:var(--f-cond)}
.tcol .tb span.h{color:var(--ink);font-weight:600}
.day{flex:1 1 0;display:flex;flex-direction:column}
.dhead{height:24px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 4px;font-family:var(--f-cond);font-weight:700;font-size:16px}
.dhead .u{font-family:var(--f-body);font-weight:500;font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.halls{display:flex;gap:4px}
.hall{min-width:calc(var(--twmin) * var(--un));display:flex;flex-direction:column}
.hname{height:20px;display:flex;align-items:center;justify-content:center;font-family:var(--f-cond);font-weight:600;font-size:13px;background:#33404D;color:#fff;border-radius:5px 5px 0 0;letter-spacing:.02em;white-space:nowrap;overflow:hidden}
.hall.h-G .hname{background:var(--accent)}
.hall.h-L .hname{background:#77838F}
.units{height:20px;display:flex;border:1px solid var(--line-strong);border-top:0;border-bottom:0;background:#F1F4F7}
.units span{flex:1 1 0;min-width:var(--twmin);text-align:center;font-size:10.5px;color:var(--muted);line-height:20px;border-left:1px solid var(--line);font-family:var(--f-cond);overflow:hidden}
.units span:first-child{border-left:0}
.hbody{position:relative;height:calc(var(--rows) * var(--rh) + 2px);border:1px solid var(--line-strong);border-radius:0 0 4px 4px;overflow:hidden;
  background-color:#fff;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--rh) * 2 - 1px), #E7EBEF calc(var(--rh) * 2 - 1px), #E7EBEF calc(var(--rh) * 2));
  background-size:calc(100% / var(--un)) 100%, 100% 100%;
  background-position:-1px 0, 0 0}
.hbody .mk{position:absolute;left:0;right:0;height:0;border-top:1.5px solid var(--line-strong);pointer-events:none;z-index:1}
.blk{position:absolute;z-index:2;border-radius:4px;background:var(--c);color:var(--t);border:1px solid rgba(22,33,44,.45);padding:2px 3px 1px;overflow:hidden;font-family:var(--f-cond);font-size:11.5px;line-height:1.1;cursor:grab;touch-action:none;user-select:none;hyphens:auto;overflow-wrap:anywhere}
.blk b{font-weight:700}
.blk .bm{display:block;font-size:10px;opacity:.78;margin-top:1px;font-variant-numeric:tabular-nums}
.blk.sea{background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.55) 0 5px,transparent 5px 10px)}
.blk.ph{border-style:dashed;border-width:1.5px}
.blk.lock{cursor:default;box-shadow:inset 0 0 0 2px rgba(22,33,44,.75)}
.blk.sel{outline:2.5px solid var(--accent);outline-offset:0;z-index:4}
.blk.conf{box-shadow:inset 0 0 0 2px var(--loss)}
.blk.ro{cursor:default}
.blk.dragging{opacity:.35}
.blk .lk{position:absolute;top:1px;right:1px;width:16px;height:16px;border:0;border-radius:3px;background:rgba(255,255,255,.75);padding:1px;display:none;line-height:0}
.blk:hover .lk,.blk.lock .lk{display:block}
.blk.lock .lk{background:var(--ink)}
.blk.lock .lk svg{stroke:#fff}
.blk .lk svg{width:14px;height:14px;stroke:var(--ink);fill:none;stroke-width:2}
.blk .tag{position:absolute;right:1px;bottom:1px;font-size:9.5px;font-weight:700;border-radius:3px;padding:0 3px;line-height:13px;font-family:var(--f-body);letter-spacing:.02em}
.tag.t-new,.tag.t-more{background:var(--gain);color:#fff}
.tag.t-hall{background:var(--accent);color:#fff}
.blk .rs{position:absolute;z-index:3}
.blk .rs-b{left:0;right:0;bottom:0;height:5px;cursor:ns-resize}
.blk .rs-t{left:0;right:18px;top:0;height:4px;cursor:ns-resize}
.blk .rs-r{top:5px;bottom:5px;right:0;width:5px;cursor:ew-resize}
.blk.lock .rs,.blk.ro .rs{display:none}
.ghost{position:absolute;z-index:1;border:1.5px dashed var(--loss);border-radius:4px;color:var(--loss);font-family:var(--f-cond);font-size:10.5px;line-height:1.1;padding:2px 3px;overflow:hidden;pointer-events:none;background:rgba(191,38,48,.05);hyphens:auto;overflow-wrap:anywhere}
.cz{position:absolute;z-index:5;pointer-events:none;background:repeating-linear-gradient(45deg,rgba(191,38,48,.75) 0 3px,rgba(191,38,48,.15) 3px 6px);outline:1.5px solid var(--loss)}
.preview{position:absolute;z-index:7;border:2px dashed var(--accent);border-radius:4px;background:rgba(23,71,201,.16);pointer-events:none;font-family:var(--f-cond);font-size:11px;font-weight:600;color:var(--accent);padding:1px 3px}
.preview.bad{border-color:var(--loss);background:rgba(191,38,48,.18);color:var(--loss)}
.legend{display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:8px;font-size:12px;color:var(--muted);align-items:center}
.legend .tag{position:static;display:inline-block;font-size:9.5px;font-weight:700;border-radius:3px;padding:0 3px;line-height:14px;margin-right:4px}
.legend i.sw{display:inline-block;width:22px;height:12px;vertical-align:-2px;margin-right:4px;border-radius:2px}

/* ---------- stats ---------- */
.card{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:10px 12px}
.card h2{font-family:var(--f-cond);font-size:17px;font-weight:700;margin:0 0 2px}
.card .note{font-size:12px;color:var(--muted);margin:0 0 8px;max-width:110ch}
.tscroll{overflow-x:auto}
table.st{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums;font-size:13px}
table.st th{font-size:11.5px;font-weight:600;color:var(--muted);text-align:right;padding:4px 7px;border-bottom:1.5px solid var(--line-strong);white-space:nowrap;vertical-align:bottom}
table.st th.l,table.st td.l{text-align:left}
table.st th.grp{text-align:center;border-bottom:1px solid var(--line);color:var(--ink)}
table.st td{padding:5px 7px;border-bottom:1px solid var(--line);text-align:right;white-space:nowrap}
table.st tr.cr{cursor:pointer}
table.st tr.cr:hover td{background:#F5F7F9}
table.st tr.off td{opacity:.5}
table.st td.name{font-family:var(--f-cond);font-weight:600;font-size:15px}
table.st td.name .sw{display:inline-block;width:14px;height:14px;border-radius:50%;border:1px solid rgba(22,33,44,.35);vertical-align:-2px;margin-right:7px}
table.st td.name .car{display:inline-block;width:12px;color:var(--muted);font-size:11px}
table.st td.d{color:var(--muted)}
table.st td.pos{color:var(--gain);font-weight:600}
table.st td.neg{color:var(--loss);font-weight:600}
table.st td.zero{color:var(--muted)}
table.st tfoot td{font-weight:700;border-top:1.5px solid var(--line-strong);border-bottom:0}
table.st .bl{border-left:1px solid var(--line)}
table.st td.soll{padding:2px 4px}
table.st input.sollin{width:62px;text-align:right;padding:3px 6px;font-variant-numeric:tabular-nums;background:#FFFBEA;border-color:#C9B458}
.dbar{display:inline-block;width:110px;height:10px;position:relative;vertical-align:middle;background:linear-gradient(to right,transparent calc(50% - .5px),var(--line-strong) calc(50% - .5px),var(--line-strong) calc(50% + .5px),transparent calc(50% + .5px))}
.dbar i{position:absolute;top:1px;bottom:1px;border-radius:2px}
.dbar i.p{left:50%;background:var(--gain)}
.dbar i.n{right:50%;background:var(--loss)}
.strip{display:block}
tr.det td{background:#F7F9FB;white-space:normal;text-align:left;padding:8px 12px 12px 30px}
.detgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px 24px}
.detgrid h3{font-size:12px;font-weight:600;color:var(--muted);margin:0 0 4px;text-transform:none}
.detgrid ul{list-style:none;margin:0;padding:0;font-size:13px}
.detgrid li{padding:1.5px 0;display:flex;gap:8px;justify-content:space-between;border-bottom:1px dotted var(--line)}
.detgrid li span:last-child{color:var(--muted);white-space:nowrap}
.detgrid li.g span:first-child{color:var(--gain)}
.detgrid li.r span:first-child{color:var(--loss)}
.detact{margin-top:8px;display:flex;gap:6px;flex-wrap:wrap}
.two{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}
.lst{list-style:none;margin:0;padding:0;font-size:13px;display:flex;flex-wrap:wrap;gap:5px}
.lst li{border:1px solid var(--line);border-radius:6px;padding:3px 8px;background:#F7F9FB}
.lst li.c{border-color:#E3A9AD;background:var(--loss-soft)}
.lst li b{font-family:var(--f-cond);font-weight:600}
.empty{color:var(--muted);font-size:13px}

/* ---------- editor: property bar docked to the bottom edge ---------- */
.editor{position:fixed;left:0;right:0;bottom:0;max-height:55%;overflow:auto;background:var(--surface);border-top:2px solid var(--accent);box-shadow:0 -8px 24px rgba(22,33,44,.16);z-index:40;padding:8px 16px 10px;display:none}
.editor.on{display:block}
.editor .er{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:flex-end;max-width:1868px;margin:0 auto}
.editor .ttl{font-family:var(--f-cond);font-size:17px;font-weight:700;display:flex;align-items:center;gap:6px;margin-right:4px;align-self:center;min-width:0}
.editor .ttl .sw{display:inline-block;flex:0 0 14px;width:14px;height:14px;border-radius:50%;border:1px solid rgba(22,33,44,.35)}
.editor label{display:flex;flex-direction:column;gap:1px;font-size:11px;color:var(--muted);font-weight:500;min-width:0}
.editor label select,.editor label input{min-width:0}
.editor #edT{width:150px}
.editor #edN{width:150px}
.editor .acts{display:flex;gap:6px;flex-wrap:wrap;margin-left:auto;align-items:center}
.editor .info{font-size:12px;color:var(--muted);margin:5px auto 0;max-width:1868px}
.editor .info b{color:var(--ink)}
.x{border:0;background:transparent;font-size:22px;line-height:1;padding:0 4px;color:var(--muted)}

/* ---------- dialogs, tooltip, toast ---------- */
dialog{border:1px solid var(--line-strong);border-radius:12px;padding:0;width:min(640px,calc(100vw - 24px));color:var(--ink);background:var(--surface);box-shadow:0 20px 50px rgba(22,33,44,.3)}
dialog::backdrop{background:rgba(22,33,44,.45)}
dialog .dh{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid var(--line)}
dialog .dh h2{margin:0;font-family:var(--f-cond);font-size:19px}
dialog .db{padding:12px 16px 16px;display:flex;flex-direction:column;gap:12px;max-height:70vh;overflow:auto}
dialog h3{font-size:13px;margin:0 0 5px}
dialog p{margin:0;font-size:13px;color:var(--muted)}
dialog ul.h{margin:0;padding-left:18px;font-size:13.5px;display:flex;flex-direction:column;gap:5px}
.row{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.row .grow{flex:1 1 140px;min-width:0}
.vlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:5px}
.vlist li{display:flex;gap:8px;align-items:center;justify-content:space-between;border:1px solid var(--line);border-radius:8px;padding:6px 8px;font-size:13px}
.vlist li small{color:var(--muted);display:block}
.vlist li.cur{border-color:var(--accent);background:var(--accent-soft)}
.vlist li em{font-style:normal;font-size:11px;color:var(--accent);font-weight:600;margin-left:6px}
textarea.inp{width:100%;min-height:90px;font-family:ui-monospace,Consolas,monospace;font-size:11.5px}
.crow{display:grid;grid-template-columns:36px 1fr 110px auto;gap:6px;align-items:center}
.crow input[type=color]{width:36px;height:28px;padding:0;border:1px solid var(--line-strong);border-radius:6px;background:none}
.tip{position:fixed;z-index:60;pointer-events:none;background:var(--ink);color:#fff;border-radius:8px;padding:7px 9px;font-size:12px;line-height:1.35;max-width:300px;box-shadow:0 6px 18px rgba(22,33,44,.3);display:none}
.tip b{font-family:var(--f-cond);font-size:14px;font-weight:600}
.tip .m{opacity:.8}
.tip .c{color:#FFB4B8}
.tip .g{color:#8CE0AE}
.toast{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:8px 14px;border-radius:8px;font-size:13px;z-index:70;display:none;max-width:calc(100vw - 32px)}
@media (max-width:700px){.top h1{font-size:23px}.tabs{margin-left:0}}
@media (prefers-reduced-motion:no-preference){.blk{transition:box-shadow .12s}}

/* ---------- server version: login, badges, share dialog, read-only view ---------- */
.who{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);margin-left:auto}
.who b{color:var(--ink)}
.top .tabs{margin-left:0}
body.boot .wrap>*:not(.top),body.gate .wrap>*:not(.top):not(#gate){display:none}
body.gate .tabs{display:none}
#gate:empty{display:none}
.gatebox{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:20px 22px;max-width:380px;margin:40px auto;display:flex;flex-direction:column;gap:10px}
.gatebox h2{margin:0;font-family:var(--f-cond);font-size:22px}
.gatebox .msg{margin:0;color:var(--muted);font-size:13.5px}
.gatebox label{display:flex;flex-direction:column;gap:3px;font-size:12px;color:var(--muted);font-weight:500}
.gatebox .inp{padding:7px 9px;font-size:15px}
.gatebox .btn{padding:8px 12px;font-size:15px;margin-top:4px}
.boardbox h2 em.badge{font-style:normal;font-family:var(--f-body);font-size:12px;font-weight:600;border-radius:999px;padding:2px 9px;background:var(--accent-soft);color:var(--accent)}
.boardbox h2 em.badge.t{background:var(--gain-soft);color:var(--gain)}
.boardbox h2 em.badge.n{background:#EEF1F4;color:var(--muted)}
.boardbox h2 em.badge.d{background:#FDEBD3;color:var(--warn)}
.vlist li.truth{border-color:var(--gain);background:var(--gain-soft)}
.vlist li em.t{color:var(--gain)}
.vlist li.sh{align-items:flex-start}
.vlist li.sh>span:first-child{flex:1 1 auto;min-width:0}
.vlist input.lnk{width:100%;margin-top:5px;font-family:ui-monospace,Consolas,monospace;font-size:11.5px;color:var(--muted)}
dialog .col{display:flex;flex-direction:column;gap:8px}
dialog .col label{display:flex;flex-direction:column;gap:2px;font-size:12px;color:var(--muted);font-weight:500}
dialog .col label.chk{flex-direction:row;align-items:center;gap:6px;font-size:13.5px;color:var(--ink);font-weight:400}
dialog .cgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:4px 12px;border:1px solid var(--line);border-radius:8px;padding:8px 10px}
dialog .cgrid[hidden],dialog label[hidden]{display:none}
.warn{color:var(--warn)}
dialog{width:min(760px,calc(100vw - 24px))}
.blk.anon{background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.5) 0 4px,transparent 4px 8px);border-style:dotted;color:var(--muted)}
