:root{--red:#d63b3b;--red-d:#a81f1f;--ink:#1c1c1c;--text:#333;--mute:#9a9a9a;--bg:#f4f4f4;--panel:#ebe9e9;--card:#fff;--blue:#2955a3;--line:#d8d8d8}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
body{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--text);background:var(--bg) url(../assets/watermark.png) center/cover no-repeat fixed}
img.logo{display:block}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.login{min-height:100vh;display:grid;place-items:center;background:linear-gradient(rgba(190,25,25,.78),rgba(190,25,25,.78)),url(../assets/background.jpg) center/cover,var(--red-d)}
.login-box{width:min(370px,92vw);background:#f4f4f4;border-radius:6px;padding:28px 35px 36px}
.field{width:100%;padding:18px 14px;border:0;background:#dcdcdc;font:inherit;font-size:16px;margin-bottom:24px;border-radius:2px}
.btn{font:inherit;font-weight:700;font-size:20px;border:0;border-radius:3px;padding:16px;cursor:pointer;background:var(--blue);color:#fff;width:100%}
.btn:hover{filter:brightness(1.1)}
.btn.sm{font-size:15px;width:auto;padding:10px 18px}.btn.red{background:var(--red)}.btn.ghost{background:#ddd;color:var(--text)}
.err{color:var(--red-d);font-weight:600;min-height:22px;margin:-8px 0 10px;font-size:14px}
.top{background:var(--ink);height:105px;display:flex;align-items:center;justify-content:center;position:relative}
.top .logo{height:80px}
.top nav{position:absolute;right:75px;display:flex;gap:28px}
.top nav a{color:#fff;font-weight:700;text-decoration:none;font-size:16px}
.top nav a:hover{text-decoration:underline}
.logo-ph{height:80px;aspect-ratio:1.3;border-radius:50%;background:var(--red);color:#111;display:grid;place-items:center;font-weight:900;font-size:22px;border:3px solid #111;margin:0 auto}
.wrap{max-width:1530px;margin:73px auto;background:var(--panel);border-radius:8px;padding:43px 55px;display:grid;grid-template-columns:250px 1fr;gap:80px}
.card{background:var(--card);border-radius:14px;box-shadow:0 2px 6px rgba(0,0,0,.2);padding:20px 18px}
.card h2{margin:0 0 14px;font-size:15px;color:var(--mute);font-weight:700;border-bottom:2px solid #ddd;padding-bottom:4px}
.side{min-height:743px;display:flex;flex-direction:column;justify-content:space-between}
.termin{display:block;background:var(--red);color:#fff;font-weight:700;font-size:14px;padding:8px 12px;border-radius:3px;margin-bottom:14px}
.empty{color:var(--mute);font-size:14px}
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:7px;justify-items:center}
.cal span{width:20px;height:20px;border-radius:50%;background:#d7d7d7;font-size:10px;display:grid;place-items:center;color:transparent}
.cal span.ev{background:var(--red);color:#fff}.cal span.today{background:var(--red-d);color:#fff;font-weight:700}
.cal span.pad{background:none}
.teams{padding:22px 24px 24px}
.teams h2{border:0;font-size:16px}
.track{display:flex;align-items:center;gap:48px;padding:22px 40px 10px;overflow:hidden}
.team{flex:0 0 253px;height:262px;background:#eee;border-radius:3px;box-shadow:0 3px 4px rgba(0,0,0,.25);text-align:center;padding-top:34px;text-decoration:none;color:var(--text)}
.team .logo,.team .logo-ph{height:118px;margin:0 auto}
.team b{display:block;font-size:48px;margin-top:6px;letter-spacing:-1px}
.arrow{flex:0 0 60px;height:60px;border-radius:50%;border:0;background:#ddd;box-shadow:0 3px 5px rgba(0,0,0,.25);font-size:30px;cursor:pointer}
.dots{display:flex;gap:18px;justify-content:center;margin-top:12px}.dots i{width:14px;height:14px;border-radius:50%;background:#ddd}.dots i.on{background:#555}
.tiles{display:flex;gap:80px;margin-top:62px}
.tile{width:285px;height:266px;display:flex;flex-direction:column;justify-content:space-between;text-decoration:none;color:var(--text);padding:24px 26px}
.tile b{font-size:46px;line-height:1.1;letter-spacing:-1px}.tile span{font-size:56px;line-height:1}
.tile:hover{box-shadow:0 4px 12px rgba(0,0,0,.3)}
.admin{max-width:1250px;margin:50px auto;padding:0 20px}
.tabs{display:flex;gap:6px;margin-bottom:-1px}
.tabs button{font:inherit;font-weight:700;border:0;padding:14px 28px;background:#ddd;border-radius:10px 10px 0 0;cursor:pointer;color:var(--text)}
.tabs button[aria-selected=true]{background:var(--panel);color:var(--red-d)}
.pane{background:var(--panel);border-radius:0 8px 8px 8px;padding:34px;display:grid;grid-template-columns:1fr 360px;gap:34px;align-items:start}
@media(max-width:1000px){.wrap,.pane{grid-template-columns:1fr;padding:20px;gap:30px;margin:20px 10px}.tiles{flex-wrap:wrap;gap:20px}.top nav{right:16px}.top .logo,.logo-ph{height:56px}.side{min-height:0;gap:30px}}
.row{display:flex;align-items:center;gap:14px;padding:12px 4px;border-bottom:1px solid var(--line)}
.row:last-child{border:0}.row .grow{flex:1;min-width:0}.row b{font-size:17px}.row small{display:block;color:#777;margin-top:2px}
.chip{display:inline-block;background:var(--red);color:#fff;font-weight:700;font-size:12px;padding:3px 9px;border-radius:3px;margin:4px 4px 0 0}
.chip.h{background:var(--blue)}
.link{background:none;border:0;font:inherit;color:var(--blue);font-weight:600;cursor:pointer;padding:4px}.link.del{color:var(--red-d)}
form.card label{display:block;font-weight:600;font-size:13px;margin:12px 0 4px}
form.card .field{margin:0;padding:12px;font-size:15px;background:#e4e4e4}
.checks{display:flex;flex-wrap:wrap;gap:6px}.checks label{display:flex;gap:6px;align-items:center;font-weight:500;margin:0;background:#e4e4e4;padding:6px 10px;border-radius:3px;cursor:pointer}
.meld{margin:10px 0 0;padding:10px 12px;background:#f3f3f3;border-radius:4px;display:flex;gap:10px;align-items:center;font-size:14px}
.meld .field{margin:0;padding:10px;background:#fff}
.meld a{color:var(--blue);word-break:break-all}
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;padding:12px 22px;border-radius:4px;font-weight:600;opacity:0;transition:opacity .2s;pointer-events:none}.toast.on{opacity:1}

/* ===== v3: geteilte Regeln, Teamseite, Responsive ===== */
[hidden]{display:none!important}
.wrap{width:calc(100% - 2*clamp(12px,10vw,192px));margin:73px auto}
button.termin{width:100%;border:0;font:inherit;font-weight:700;font-size:14px;text-align:left;cursor:pointer}
button.termin:hover{background:var(--red-d)}
.det{background:#f3f3f3;border-radius:3px;margin:-8px 0 14px;padding:10px 12px;font-size:13px;line-height:1.5}
.det b{display:block;margin-bottom:4px}.det a{color:var(--blue);font-weight:600}
.track{justify-content:center;flex:1;min-width:0}
.team{flex:0 1 253px;min-width:0}
.dots button{width:14px;height:14px;border:0;border-radius:50%;background:#ddd;padding:0;cursor:pointer}.dots button.on{background:#555}
.card-wrap{display:flex;align-items:center}
/* Teamseite */
.wrap.tw{grid-template-columns:360px 1fr;gap:46px;padding:62px 50px;align-items:start}
.ovl h2{border:0}.ovl .team{display:block;flex:none;width:253px;max-width:100%;margin:26px auto 24px;height:262px}
.box{border-radius:3px;color:#fff;text-align:center;font-weight:700;font-size:14px;line-height:1.7;padding:12px 14px;margin-top:20px}
.box.dark{background:#3a3a3a}.box.red{background:var(--red)}.box.green{background:#3fae3f}
.seg{display:flex;gap:6px;justify-content:center;margin-top:8px}
.seg button{font:inherit;font-size:12px;font-weight:700;border:0;border-radius:3px;padding:3px 12px;background:#555;color:#fff;cursor:pointer}.seg button[aria-pressed=true]{background:#fff;color:#3a3a3a}
.tgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:32px;align-content:start}
.tgrid .tile{width:auto;height:266px}
.tile svg{width:64px;height:64px;fill:none;stroke:#333;stroke-width:4}.tile svg.f{fill:#333;stroke:none}
.stack{display:grid;gap:36px;grid-template-rows:1fr 1fr}
.mini{background:#fff;border-radius:14px;box-shadow:0 2px 6px rgba(0,0,0,.2);padding:16px 26px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-weight:800;font-size:24px;line-height:1.2;color:var(--text);text-decoration:none}
.mini span{font-size:56px;font-weight:400;line-height:1}
.squads{grid-column:1/-1;margin-top:10px}
.sq{flex:0 1 241px;min-width:0;background:#eee;border-radius:3px;box-shadow:0 3px 4px rgba(0,0,0,.25);text-align:center;padding:22px 14px 24px;color:var(--text);text-decoration:none;display:block}
.sq b{display:block;font-size:44px;letter-spacing:-1px;line-height:1.1}
.sq .lg{font-weight:700;font-size:18px;margin-top:10px;min-height:24px}
.sq .rk{background:#3a3a3a;color:#fff;font-weight:700;font-size:18px;border-radius:2px;width:min(165px,100%);margin:8px auto 0;padding:2px}
.sq .dt{background:var(--red);color:#fff;font-weight:800;font-size:24px;border-radius:3px;width:min(165px,100%);margin:14px auto 0;padding:7px 4px}
.sq .dt.none{background:#cfcfcf;color:#666;font-size:16px;padding:12px 4px}
@media(max-width:1000px){
 .wrap,.wrap.tw{grid-template-columns:1fr;margin:24px auto;padding:24px;gap:28px;width:calc(100% - 24px)}
 .tgrid{gap:20px}.tgrid .tile{height:220px}
}
@media(max-width:700px){
 .top{height:72px}.top .logo,.logo-ph{height:48px}.top nav{right:14px;gap:16px}.top nav a{font-size:14px}
 .wrap,.wrap.tw{width:calc(100% - 16px);padding:14px;margin:12px auto;gap:18px}
 .side{order:2;min-height:0;gap:24px}
 .teams{padding:16px 12px}.track{gap:12px;padding:10px 0}
 .team{height:210px;padding-top:22px}.team .logo,.team .logo-ph{height:96px}.team b{font-size:38px}
 .arrow{flex-basis:40px;height:40px;font-size:22px}
 .tiles{gap:12px;margin-top:18px}.tile{width:calc(50% - 6px);height:140px;padding:16px}.tile b{font-size:24px}.tile span{font-size:36px}
 .tgrid{grid-template-columns:1fr 1fr;gap:12px}.tgrid .tile{width:auto;height:150px}.tile svg{width:44px;height:44px}
 .stack{grid-column:1/-1;grid-template-columns:1fr 1fr;grid-template-rows:auto;gap:12px}.mini{font-size:17px;padding:14px;min-height:84px}.mini span{font-size:36px}
 .ovl .team{height:210px;width:200px}
 .sq b{font-size:34px}.sq .dt{font-size:20px}
 .admin{margin:20px auto;padding:0 8px}.pane{padding:14px;gap:20px}.tabs button{padding:12px 18px}.row{flex-wrap:wrap}
 .login-box{padding:24px 20px 28px}
}
/* v4: Admin – Zwischenüberschriften, Zugangsdaten-Hinweis */
.sub{margin:18px 0 4px;font-size:13px;font-weight:700;color:#777;text-transform:uppercase;letter-spacing:.04em}
.reveal{background:#fff8d6;border:2px solid #e0b800;border-radius:6px;padding:12px;margin-bottom:14px;font-size:14px;line-height:1.5}
.reveal code{display:block;font-size:18px;font-weight:700;margin:2px 0 8px;word-break:break-all;user-select:all;font-family:ui-monospace,Consolas,monospace}
.tabs{flex-wrap:wrap}

/* v5: Seitenleiste bleibt gleich hoch (Termine scrollen), moderne Pfeile */
.side{height:743px;min-height:0}
.side>section:first-child{flex:1;min-height:0;display:flex;flex-direction:column;margin-bottom:16px}
#ev{flex:1;min-height:0;overflow-y:auto;padding-right:4px;scrollbar-width:thin;scrollbar-color:#ccc transparent}
.arrow{flex:0 0 52px;height:52px;border:1px solid #e4e4e4;background:#fff;color:#444;box-shadow:0 2px 8px rgba(0,0,0,.14);display:grid;place-items:center;padding:0;font-size:0;transition:background .15s,color .15s,box-shadow .15s,transform .15s}
.arrow svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.arrow:hover{background:var(--red);border-color:var(--red);color:#fff;box-shadow:0 4px 12px rgba(214,59,59,.35)}
.arrow:active{transform:scale(.93)}
.card-wrap{gap:10px}
@media(max-width:1000px){.side{height:auto}.side>section:first-child{flex:none}#ev{max-height:320px;flex:none}}
@media(max-width:700px){.arrow{flex-basis:38px;height:38px}.arrow svg{width:18px;height:18px}.card-wrap{gap:6px}}

/* v6: Daten & Statistik */
.c-avg{--c:#c41212}.c-best{--c:#2db52d}.c-low{--c:#1a22c8}
.dot{display:inline-block;width:14px;height:14px;border-radius:50%;background:var(--c);margin-right:12px;vertical-align:-2px}
.legend{background:#eee;border-radius:3px;box-shadow:0 3px 4px rgba(0,0,0,.25);padding:14px 18px 10px;margin-top:20px}
.legend h3{margin:0 0 8px;text-align:center;font-size:24px}.legend ul{list-style:none;margin:0;padding:0}.legend li{font-weight:700;font-size:14px;margin-bottom:10px}
.btn.gr{background:#2fba1b}.ovl .btn{display:block;margin-top:14px;font-size:20px;border-radius:3px;box-shadow:0 3px 4px rgba(0,0,0,.25)}
.chartgrid{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.cp{background:#efefef;padding:12px 14px 14px}
.cph{display:flex;align-items:center;justify-content:center;position:relative;min-height:36px;margin-bottom:8px}
.cph span{font-weight:700;color:#999;font-size:16px;text-align:center;padding:0 40px}
.xb{position:absolute;right:0;top:0;width:34px;height:34px;border:0;border-radius:4px;background:#9a9a9a;color:#fff;cursor:pointer;display:grid;place-items:center;padding:0}
.xb:hover{background:var(--red)}.xb svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.cbox{background:#fff;padding:6px;min-width:0}.cbox svg{display:block;width:100%;height:auto}
.chart-empty{min-height:200px;display:grid;place-items:center;color:var(--mute);font-weight:600}
.axl{stroke:#222;stroke-width:1.6}.grid{stroke:#eee;stroke-width:1}.axt{font-size:12px;fill:#333;font-family:inherit}
.ln{fill:none;stroke:var(--c);stroke-width:1.5;opacity:.35}.pt{fill:var(--c)}
.cdet{display:grid;grid-template-columns:1fr 150px;gap:30px}
.avgt{background:#fff;text-align:center;padding:16px 8px;display:flex;flex-direction:column;justify-content:center;gap:14px}
.avgt b{font-size:20px}.avgt strong{font-size:40px;letter-spacing:-1px}.avgt span{font-weight:700;font-size:18px}
.seg2{display:flex;gap:6px;justify-content:center;margin-bottom:10px}
.seg2 button{font:inherit;font-weight:700;font-size:14px;border:0;border-radius:3px;padding:6px 16px;background:#ddd;color:var(--text);cursor:pointer}
.seg2 button[aria-pressed=true]{background:var(--red);color:#fff}
.tblwrap{overflow:auto;max-height:340px;margin:28px auto 0;max-width:100%}
.dt{border-collapse:collapse;width:100%;font-size:15px;text-align:center}
.dt th{position:sticky;top:0;background:#e6e6e6;padding:10px 12px;font-size:14px;white-space:nowrap}
.dt td{padding:9px 12px;white-space:nowrap}.dt tbody tr:nth-child(even){background:#ececec}.dt tbody tr:nth-child(odd){background:#f6f6f6}
.dt td.good{color:#1a8f1a;font-weight:700}.dt td.bad{color:var(--red-d);font-weight:700}
.mini-b{font:inherit;font-size:12px;border:0;background:#ddd;border-radius:3px;padding:3px 10px;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.2)}.mini-b:hover{background:var(--red);color:#fff}
dialog{border:0;border-radius:14px;padding:22px;width:min(980px,96vw);max-height:92vh;overflow:auto;box-shadow:0 10px 40px rgba(0,0,0,.35);color:var(--text)}
dialog::backdrop{background:rgba(0,0,0,.5)}dialog h2{margin:0 0 14px;font-size:22px}
.lb{display:block;font-weight:600;font-size:13px;margin:6px 0 4px}
.num{width:92px;padding:8px;border:0;background:#e4e4e4;font:inherit;border-radius:2px;text-align:center}
.st .stp{min-width:0}
@media(max-width:1000px){.chartgrid{grid-template-columns:1fr}.cdet{grid-template-columns:1fr}.avgt{flex-direction:row;justify-content:center;align-items:baseline;flex-wrap:wrap}.avgt strong{font-size:32px}}

/* v7: Kurve im Vergleich, Import, Daten verwalten */
.c-me{--c:#111}
.ln:not(.me){stroke-dasharray:6 4}.ln.me{opacity:1;stroke-width:3.2}.pt.me{stroke:#fff;stroke-width:1.5}
.leg{display:flex;flex-wrap:wrap;gap:6px 20px;justify-content:center;font-size:13px;font-weight:600;margin:10px 0 0}
.leg .dot{margin-right:6px;width:12px;height:12px}
.btn.dk{background:#444}.ovl .btn.dk,.ovl .btn:not(.gr):not(.red):not(.dk){font-size:18px}
.dt tr.dayr td{background:#d6d6d6!important;font-weight:700;text-align:left;padding:8px 12px}
.dt tr.dayr button{float:right}
.mini-b.del:hover{background:var(--red-d);color:#fff}
.rep{margin:14px 0;font-size:14px;line-height:1.7}.rep .ok{color:#1a8f1a;font-weight:700}.rep .warn{color:var(--red-d);font-weight:600}
.rep details{margin-top:6px}.rep summary{cursor:pointer;font-weight:600}
input[type=file]{font:inherit;padding:10px;background:#e4e4e4;border-radius:3px;max-width:100%}
.dact{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;align-items:center}

/* v8: Spielerverwaltung + Spielerseite per Link */
.tools{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.tools .field{margin:0;padding:11px 12px;flex:1;min-width:180px;background:#e9e9e9}
.chk{display:flex;gap:8px;align-items:center;font-weight:600;font-size:14px;cursor:pointer}
.plist{display:grid;gap:8px;max-height:640px;overflow:auto;padding-right:4px}
.prow{display:flex;align-items:center;gap:14px;width:100%;text-align:left;font:inherit;border:0;background:#f4f4f4;border-radius:6px;padding:12px 14px;cursor:pointer;color:var(--text)}
.prow:hover{background:#e9e9e9}
.pn{flex:0 0 38px;height:38px;border-radius:50%;background:#333;color:#fff;display:grid;place-items:center;font-weight:800}
.pname{flex:1;min-width:0}.pname b{display:block;font-size:17px}.pname small{color:#777}
.tags{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.tag{font-style:normal;font-size:12px;font-weight:700;border-radius:3px;padding:3px 8px;background:var(--blue);color:#fff;white-space:nowrap}
.tag.bad{background:var(--red)}.tag.grey{background:#999}.tag.ok{background:#3fae3f}
dialog.nar{width:min(720px,96vw)}
.blk{border-top:1px solid var(--line);padding:14px 0}.blk h3{margin:0 0 10px;font-size:16px}
.dh{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.dh h2{margin:0}
.xb2{border:0;background:#ddd;border-radius:50%;width:36px;height:36px;font-size:22px;cursor:pointer;line-height:1;flex:0 0 36px}.xb2:hover{background:var(--red);color:#fff}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.grid2 .field{margin:0;padding:10px;background:#e4e4e4;font-size:15px}
.grid2 label{display:block;font-weight:600;font-size:13px;margin-bottom:3px}.grid2 .full{grid-column:1/-1}
.ibox{background:#f3f3f3;border-radius:6px;padding:10px 12px;margin-bottom:8px;font-size:14px}
.ibox .top2{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.qrbox{display:flex;gap:18px;align-items:flex-start;flex-wrap:wrap}
.qrbox svg{border:1px solid #ddd;border-radius:6px;max-width:100%;height:auto}
.urlf{width:100%;padding:10px;border:0;background:#e4e4e4;font:inherit;font-size:13px;border-radius:2px}
.warnbox{background:#fff8d6;border:2px solid #e0b800;border-radius:6px;padding:10px 12px;font-size:13px;line-height:1.5}
a.btn{text-decoration:none;text-align:center}
.pmain{max-width:1000px;margin:24px auto;padding:0 12px}
.pmain .card{padding:22px}.pmain h1{margin:0 0 4px;font-size:30px}
.ptiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:18px 0}
.ptile{font:inherit;text-align:left;border:2px solid transparent;background:#f3f3f3;border-radius:8px;padding:12px;cursor:pointer;color:var(--text)}
.ptile[aria-pressed=true]{border-color:var(--red);background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.ptile small{display:block;color:#777;font-weight:600}.ptile b{display:block;font-size:24px;margin:2px 0}
.ptile .d{font-size:13px;font-weight:700}.ptile .d.good{color:#1a8f1a}.ptile .d.bad{color:var(--red-d)}
@media(max-width:700px){.grid2{grid-template-columns:1fr}.prow{flex-wrap:wrap}.tags{justify-content:flex-start;flex-basis:100%}.pmain h1{font-size:24px}}

/* v9: Kalender, Trainingsplanung, Anwesenheit, Zeichen-Editor */
.fieldsvg{display:block;width:100%;height:auto;border-radius:4px}
.calhead{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.calhead h2{border:0;margin:0;flex:1;font-size:22px;color:var(--text);text-align:center;min-width:150px}
.calhead .arrow{flex:0 0 42px;height:42px}
.calgrid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.dow{text-align:center;font-weight:700;font-size:12px;color:#888;padding:4px 0}
.day{min-height:100px;border:0;font:inherit;text-align:left;background:#f4f4f4;border-radius:6px;padding:6px;cursor:pointer;display:flex;flex-direction:column;gap:3px;overflow:hidden;color:var(--text);min-width:0}
.day:hover{outline:2px solid var(--red)}.day.out{opacity:.45}
.dn{font-weight:700;font-size:13px;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto}
.day.today .dn{background:var(--red-d);color:#fff}
.day.fer{background:#fff3cf}.day.hol{background:#f9dcdc}
.ch{font-size:11px;font-weight:700;border-radius:3px;padding:1px 5px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.ch.tr{background:#333}.ch.tn{background:#fff;color:#222;border:1px solid #555}.ch.sd{background:transparent;color:#555;border:1px dashed #888}.ch.tu{background:var(--red)}.ch.hn{background:transparent;color:#a33;padding:0}
.ch.fn{background:transparent;color:#9a7b00;padding:0}
.legend2{display:flex;gap:6px 18px;flex-wrap:wrap;margin-top:14px;font-size:12px;font-weight:600;color:#555}
.legend2 i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-2px}
.srow{display:block;text-decoration:none;color:var(--text);background:#f4f4f4;border-radius:6px;padding:8px 10px;margin-bottom:6px;font-size:13px}.srow:hover{background:#e9e9e9}
.srow b{display:block;font-size:14px}.srow small{color:#777}
.tmeta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:8px 0 14px}
.tmeta label{display:block;font-weight:600;font-size:12px;margin-bottom:3px}.tmeta .field{margin:0;padding:10px;background:#e9e9e9;font-size:15px}
.tabs2{display:flex;gap:6px;margin-bottom:14px;flex-wrap:wrap}
.tabs2 button{font:inherit;font-weight:700;border:0;border-radius:6px;padding:10px 20px;background:#ddd;cursor:pointer;color:var(--text)}.tabs2 button[aria-selected=true]{background:var(--red);color:#fff}
.sum{font-size:14px;font-weight:700;margin:4px 0 12px}.sum.over{color:var(--red-d)}
.tseg{background:#f4f4f4;border-radius:10px;padding:14px;margin-bottom:14px}
.seghead{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:8px}
.segnr{width:30px;height:30px;border-radius:50%;background:#333;color:#fff;display:grid;place-items:center;font-weight:800;flex:0 0 30px}
.seghead .field{margin:0;padding:8px 10px;background:#e4e4e4;font-size:16px;font-weight:700;flex:1;min-width:140px}
.seghead .mn{width:84px;flex:0 0 84px;text-align:center}
.ib{border:0;background:#ddd;border-radius:4px;width:34px;height:34px;cursor:pointer;font-size:16px;font-weight:700;color:var(--text)}.ib:hover:not(:disabled){background:var(--red);color:#fff}.ib:disabled{opacity:.35;cursor:default}
.segnote{width:100%;border:0;background:#e9e9e9;border-radius:3px;padding:8px 10px;font:inherit;font-size:14px;resize:vertical;margin-bottom:10px}
.exc{display:flex;gap:14px;background:#fff;border-radius:8px;padding:10px;box-shadow:0 1px 4px rgba(0,0,0,.18);margin-bottom:10px;align-items:flex-start}
.exc .th{flex:0 0 240px;max-width:42%;cursor:pointer;border:0;background:none;padding:0}
.exc .bd{flex:1;min-width:0}.exc .bd b{font-size:16px}.exc .bd p{margin:4px 0 8px;font-size:14px;white-space:pre-wrap;color:#444}
.exc .acts{display:flex;gap:6px;flex-wrap:wrap}
.addseg{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:6px 0 4px}.addseg span{font-weight:700;font-size:14px}
.att{display:flex;gap:6px;flex-wrap:wrap}
.ab{font:inherit;font-size:13px;font-weight:700;border:0;border-radius:4px;padding:8px 12px;background:#e4e4e4;cursor:pointer;color:var(--text)}
.ab[aria-pressed=true].p{background:#3fae3f;color:#fff}.ab[aria-pressed=true].e{background:#e6a100;color:#fff}.ab[aria-pressed=true].u{background:var(--red);color:#fff}
.arow{display:flex;align-items:center;gap:12px;padding:8px 6px;border-bottom:1px solid var(--line);flex-wrap:wrap}.arow .nm{flex:1;min-width:150px;font-weight:700}
.asum{display:flex;gap:10px;flex-wrap:wrap;margin:6px 0 12px}.asum span{font-weight:700;font-size:13px;color:#fff;border-radius:4px;padding:5px 12px}
dialog.wide{width:min(1120px,98vw)}
.edtools{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0;align-items:center}
.edtools button{font:inherit;font-size:13px;font-weight:700;border:0;border-radius:4px;padding:8px 12px;background:#ddd;cursor:pointer;color:var(--text)}
.edtools button[aria-pressed=true]{background:var(--red);color:#fff}.edtools .sep{width:1px;align-self:stretch;background:#ccc;margin:0 4px}
.edtools button:disabled{opacity:.4;cursor:default}
.edsvg{touch-action:none;user-select:none;-webkit-user-select:none;cursor:crosshair;border:2px solid #ddd;border-radius:6px;display:block;width:100%;height:auto}
.edsel{display:flex;gap:10px;align-items:center;margin:8px 0;font-size:13px;font-weight:600;min-height:38px}.edsel input{padding:6px 10px;border:0;background:#e4e4e4;border-radius:3px;font:inherit;width:140px}
.edhint{font-size:12px;color:#777;margin:4px 0 10px}
@media(max-width:1000px){.tmeta{grid-template-columns:1fr 1fr}.exc{flex-direction:column}.exc .th{flex:none;max-width:100%;width:100%}}
@media(max-width:700px){.day{min-height:54px;padding:3px}.ch{font-size:0;height:7px;width:7px;padding:0;border-radius:50%;display:inline-block}.ch.sd,.ch.tn{border-width:1px}.ch.hn,.ch.fn{display:none}
 .dayc{display:flex;gap:3px;flex-wrap:wrap}.calhead h2{font-size:18px}.dn{width:22px;height:22px;font-size:12px}}
@media print{.top,.tabs2,.noprint,.ib,.xb2,.addseg,.acts{display:none!important}body{background:#fff}.wrap,.card{box-shadow:none!important;background:#fff!important}.tseg{break-inside:avoid;border:1px solid #ccc}.exc{break-inside:avoid;box-shadow:none;border:1px solid #ddd}}

/* v10: Anwesenheitsstatistik */
.sortb{font:inherit;font-weight:700;font-size:13px;border:0;background:none;cursor:pointer;color:inherit;padding:0;white-space:nowrap}.sortb:hover{color:var(--red-d)}
.dt tr.clk{cursor:pointer}.dt tr.clk:hover{outline:2px solid var(--red);outline-offset:-2px}
.qbar{display:inline-block;width:70px;height:8px;background:#ddd;border-radius:4px;overflow:hidden;vertical-align:middle;margin-right:8px}.qbar i{display:block;height:100%;background:#999}
.q.good .qbar i{background:#3fae3f}.q.mid .qbar i{background:#e6a100}.q.bad .qbar i{background:var(--red)}.q.good b{color:#1a8f1a}.q.bad b{color:var(--red-d)}

/* v11: Layout-Feinschliff für Computer, Tablet und Smartphone (geprüft mit Screenshots) */
.wrap{width:calc(100% - 2*clamp(12px,6.5vw,192px))}
.wrap>*,.wrap.tw>*,.tgrid>*,.pane>*{min-width:0}
.tblwrap{max-width:100%}
.wrap.tw{padding:clamp(18px,3.4vw,62px) clamp(14px,3.4vw,50px);gap:clamp(20px,3.2vw,46px)}
/* Startseite: Kacheln passen sich der Breite an */
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,285px));gap:clamp(14px,3vw,48px);margin-top:clamp(20px,4vw,62px)}
.tile{width:auto;min-width:0;height:clamp(170px,17vw,266px)}
.tile b{font-size:clamp(22px,2.6vw,46px);overflow-wrap:anywhere}
.side{height:auto;min-height:clamp(560px,52vw,743px)}
/* Teamseite */
.tgrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(14px,2.2vw,32px)}
.tgrid .tile{height:clamp(190px,18vw,266px)}
.stack{grid-template-rows:repeat(3,1fr);gap:clamp(10px,1.2vw,16px)}
.mini{font-size:clamp(15px,1.45vw,20px);padding:10px clamp(12px,1.4vw,22px);min-width:0}
.mini span{font-size:clamp(28px,3vw,44px)}
.sq b{font-size:clamp(24px,2.5vw,40px);white-space:nowrap}
.sq{flex:0 1 241px}
.team{flex:0 1 253px;min-width:0}
@media(max-width:1000px){
 .wrap,.wrap.tw{width:calc(100% - 24px);margin:16px auto}
 .side{min-height:0}
 .tgrid .tile{height:200px}
}
@media(max-width:700px){
 .top{justify-content:flex-start;padding:0 14px}
 .top nav{position:static;margin-left:auto;gap:14px}.top nav a{font-size:13px}
 .wrap,.wrap.tw{width:calc(100% - 16px);margin:10px auto;padding:12px}
 .tiles{grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
 .tile{width:auto;height:136px;padding:14px}.tile b{font-size:clamp(17px,5.4vw,22px)}.tile span{font-size:34px}
 .tiles .tile:last-child:nth-child(odd){grid-column:1/-1;height:110px}
 .tgrid{grid-template-columns:1fr 1fr;gap:12px}.tgrid .tile{height:140px}
 .stack{grid-column:1/-1;grid-template-columns:1fr 1fr;grid-template-rows:auto}.stack .mini:nth-child(3){grid-column:1/-1}
 .mini{min-height:76px;font-size:16px;padding:12px}
 .calhead{gap:8px}.calhead .arrow{flex-basis:38px;height:38px}
 .tmeta{grid-template-columns:1fr 1fr}
 .exc .th{max-width:100%}
 .pmain{padding:0 8px}.pmain .card{padding:14px}
 .dt th,.dt td{padding:8px 8px}.dt{font-size:14px}
}
/* v12: Team-Karussell, Kalender auf dem Handy */
.track{gap:clamp(12px,2vw,48px);padding:22px clamp(0px,1vw,40px) 10px}
.team{height:auto;aspect-ratio:253/262;padding-top:clamp(14px,2vw,34px)}
.team .logo,.team .logo-ph{height:auto;width:62%;max-height:118px}
.team b{font-size:clamp(28px,3.4vw,48px)}
.ovl .team{aspect-ratio:auto;height:262px;padding-top:34px}.ovl .team .logo,.ovl .team .logo-ph{height:118px;width:auto;max-height:none}.ovl .team b{font-size:48px}
.calhead h2{white-space:nowrap}
@media(max-width:1000px){
 .calpage .stp{order:-1}.calpage .ovl .team{display:none}
}
@media(max-width:700px){
 .team{padding-top:18px}.team b{font-size:clamp(30px,9vw,42px)}
 .ovl .team{height:210px;width:200px}.ovl .team b{font-size:40px}.ovl .team .logo,.ovl .team .logo-ph{height:96px}
 .calhead h2{font-size:17px}.calhead .mini-b{padding:5px 9px}
 .ovl .btn{font-size:17px;padding:13px}
}

/* v13: Feinschliff nach Screenshot-Prüfung */
.ax2 .axt{font-size:17px}.ax2 .axl{stroke-width:2}.ax2 .ln{stroke-width:2}
.tgrid .tile b{font-size:clamp(18px,2vw,34px)}
.squads .track{align-items:stretch}
.sq .lg{font-size:clamp(13px,1.3vw,18px)}.sq .rk{font-size:clamp(14px,1.4vw,18px)}.sq .dt{font-size:clamp(14px,1.6vw,24px);white-space:nowrap}.sq .dt.none{font-size:clamp(12px,1.2vw,16px);white-space:normal}
.dt.compact th,.dt.compact td{padding:8px 7px}.dt.compact .qbar{width:46px;margin-right:6px}
.edsvg{width:min(100%,calc(62vh * var(--ar,2)));margin:0 auto}
@media(max-width:1000px){
 .gridbtns{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-content:start}
 .gridbtns>*{grid-column:1/-1;min-width:0}.gridbtns>.btn{grid-column:auto;margin-top:0}.gridbtns>.team{display:none}
 .plist{max-height:none}
}
@media(max-width:700px){
 #tbl.compact th:nth-child(1),#tbl.compact td:nth-child(1),#tbl.compact th:nth-child(3),#tbl.compact td:nth-child(3){display:none}
 #tbl.compact .qbar{display:none}
 .gridbtns .btn{font-size:15px;padding:12px 8px}.gridbtns .legend{margin-top:0}.gridbtns .legend h3{font-size:18px}
 dialog.wide{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:12px}
 dialog{max-width:calc(100vw - 12px)}
 .edtools{gap:4px}.edtools button{padding:7px 9px;font-size:12px}.edtools .sep{display:none}
 .edsvg{width:100%}
}

.gridbtns .btn{min-width:0;overflow-wrap:anywhere;hyphens:auto;white-space:normal}

/* Dashboard-Termine: Seitenleiste behält ihre Höhe, die Liste scrollt innen */
@media(min-width:1001px){.side{height:clamp(560px,52vw,743px);min-height:0}}
/* Übungseditor */
.edlay{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px;margin-top:10px;align-items:start}
.edbar{display:flex;flex-wrap:wrap;gap:8px 16px;background:#f4f4f4;border-radius:8px;padding:10px 12px;margin-bottom:10px}
.edbar .tg{display:flex;flex-direction:column;gap:4px}.edbar .tgl{font-size:11px;font-weight:700;color:#777;text-transform:uppercase;letter-spacing:.04em}
.edbar .tgb{display:flex;gap:4px;flex-wrap:wrap}
.edbar button{font:inherit;font-size:13px;font-weight:700;border:0;border-radius:4px;padding:7px 11px;background:#e2e2e2;cursor:pointer;color:var(--text)}
.edbar button[aria-pressed=true]{background:var(--red);color:#fff}.edbar button:disabled{opacity:.4;cursor:default}
.edside{display:grid;gap:12px;background:#f9f9f9;border:1px solid #e5e5e5;border-radius:8px;padding:14px;position:sticky;top:0}
.edside label{display:block;font-size:13px;font-weight:700;margin-bottom:4px}
.edhelp{font-size:12px;color:#666}.edhelp summary{cursor:pointer;font-weight:700}.edhelp p{margin:6px 0 0}
.edfoot{display:flex;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid #e5e5e5;position:sticky;bottom:-22px;background:#fff;padding-bottom:4px}
@media(max-width:900px){.edlay{grid-template-columns:1fr}.edside{position:static}.edbar{gap:6px 12px}.edbar button{padding:7px 9px;font-size:12px}.edfoot{bottom:-12px}}
/* Konto-Link in der Kopfzeile */
.top .hq{position:relative}
.top .hq i{position:absolute;top:-8px;right:-14px;min-width:15px;height:15px;border-radius:8px;background:var(--red);color:#fff;font-size:10px;font-weight:700;line-height:15px;font-style:normal;text-align:center;padding:0 3px}
/* FAQ */
.faqp{max-width:900px;margin:0 auto}.faqp details{background:#f4f4f4;border-radius:8px;margin-bottom:8px;padding:0}
.faqp summary{cursor:pointer;font-weight:700;padding:12px 14px;list-style:none}.faqp summary::-webkit-details-marker{display:none}.faqp summary:after{content:"+";float:right;font-weight:700}.faqp details[open] summary:after{content:"–"}
.faqp .ans{padding:0 14px 14px;white-space:pre-wrap;line-height:1.5}.faqp .ans .dact{margin-top:10px}
.msg{border-radius:8px;padding:10px 12px;margin-bottom:8px;background:#f4f4f4;white-space:pre-wrap}.msg.adm{background:#e8f0fb}.msg small{display:block;color:#777;margin-bottom:3px;font-weight:600}
.tstat{display:inline-block;font-size:11px;font-weight:700;border-radius:10px;padding:2px 8px;color:#fff;background:#e6a100}.tstat.answered{background:#3fae3f}.tstat.closed{background:#999}
.chk{display:grid;gap:4px;margin-top:4px}.chk label{font-weight:600;font-size:14px;display:flex;gap:8px;align-items:center}.fbox{background:#f7f7f7;border-radius:8px;padding:14px}
.meld{box-sizing:border-box;max-width:100%;flex-wrap:wrap}.meld .field{max-width:100%;box-sizing:border-box;min-width:0}.row{min-width:0}.row>div{min-width:0}

/* Verwaltung: Team aufklappen mit Unterreitern */
.tmrow.on{background:#fafafa;border-radius:8px;padding:10px;margin:-10px -10px 4px;border:1px solid #e3e3e3}
.tmbox{flex:1 0 100%;margin-top:12px;min-width:0}
.subtabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:2px solid #e5e5e5;margin-bottom:12px}
.subtabs button{font:inherit;font-weight:700;font-size:14px;background:none;border:0;border-bottom:3px solid transparent;margin-bottom:-2px;padding:8px 12px;cursor:pointer;color:#666}
.subtabs button[aria-selected=true]{color:var(--red);border-bottom-color:var(--red)}

/* Spieltags-Kader */
.lh{margin:14px 0 4px;font-size:14px}.lh small{color:#888;font-weight:600}
.lrow{display:flex;gap:10px;align-items:center;padding:8px 10px;background:#f4f4f4;border-radius:6px;margin-bottom:4px;cursor:pointer;font-size:15px}
.lrow input{width:20px;height:20px;flex:none}.lrow:hover{background:#ebebeb}
.sq[data-q]{cursor:pointer}.sq[data-q]:focus-visible{outline:3px solid var(--red);outline-offset:2px}

/* Gruppen in Phasen */
.grpbox{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0}
.grp{border-radius:6px;padding:6px 10px;font-size:13px;background:#eee;border-left:5px solid #888;max-width:100%}.grp span{display:block;color:#555;margin-top:2px}.grp small{color:#777}
.gc0{border-left-color:#d33}.gc1{border-left-color:#2a5bd7}.gc2{border-left-color:#3fae3f}.gc3{border-left-color:#e6a100}.gc4{border-left-color:#8a3fc8}.gc5{border-left-color:#119aa5}
.gnames{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:6px;margin-top:10px}.gnames .field{border-left:5px solid #888;padding:8px 10px}
@media print{.grp{break-inside:avoid;border:1px solid #ccc}}
.gnames .field.gc0{border-left-color:#d33}.gnames .field.gc1{border-left-color:#2a5bd7}.gnames .field.gc2{border-left-color:#3fae3f}.gnames .field.gc3{border-left-color:#e6a100}.gnames .field.gc4{border-left-color:#8a3fc8}.gnames .field.gc5{border-left-color:#119aa5}
.lrow3{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:6px 10px;background:#f4f4f4;border-radius:6px;margin-bottom:4px}.lrow3 .field{width:130px;padding:8px;margin:0}
.lrow.dis,.lrow3.dis{opacity:.6;cursor:default}.tag.ok{background:#d9f2d9;color:#1d6b1d}

/* Spielerlisten in Kader-Dialogen scrollen für sich; das Pop-up bleibt stehen */
.lscroll{max-height:min(44vh,400px);overflow-y:auto;overscroll-behavior:contain;padding-right:4px;-webkit-overflow-scrolling:touch}
dialog.fx[open]{display:flex;flex-direction:column;overflow:hidden}dialog.fx>*{flex-shrink:0}dialog.fx>.lscroll{flex:1 1 auto;min-height:140px;max-height:none}

/* Admin: Mannschaften übersichtlich */
.sqh{margin:16px 0 4px;font-weight:800;font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:#666}.sqh small{font-weight:600;color:#999}
.sqrow{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#fff;border:1px solid #e3e3e3;border-radius:8px;margin-top:6px}.sqrow .grow{flex:1;min-width:0}.sqrow small{display:block;color:#777;font-size:13px;margin-top:2px}
.sqrow.edit{display:block;background:#f6f6f6;border-color:#c9c9c9}.sqhead{margin-bottom:8px}.chip.up{background:#fde8e8;color:#a01c1c}
.sqf{display:grid;grid-template-columns:1fr 1fr;gap:10px}.sqf label{display:flex;flex-direction:column;gap:4px;font-size:12px;font-weight:700;color:#555;min-width:0}.sqf .field{margin:0;font-weight:400;max-width:100%;box-sizing:border-box}.sqf .wide{grid-column:1/-1}
.sqact{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}.muted{display:block;margin-top:8px;color:#888}
@media(max-width:560px){.sqf{grid-template-columns:1fr}}
.sqh small{display:inline!important}

/* Fußzeile auf Login- und Spielerseite: schwebt über dem Hintergrund, erzeugt keinen zusätzlichen Streifen */
footer.legal{position:fixed;left:0;right:0;bottom:max(10px,env(safe-area-inset-bottom));display:flex;justify-content:center;pointer-events:none;z-index:5}
footer.legal a{pointer-events:auto;font:600 13px/1 Arial,Helvetica,sans-serif;color:#333;text-decoration:none;padding:9px 16px;border-radius:999px;background:rgba(255,255,255,.88);box-shadow:0 1px 6px rgba(0,0,0,.25)}
footer.legal a:hover,footer.legal a:focus-visible{background:#fff;text-decoration:underline}

/* Text-Links einheitlich und etwas hübscher */
main a:not([class]),dialog a:not([class]),.empty a:not([class]){color:var(--blue);font-weight:700;text-decoration:underline;text-decoration-thickness:2px;text-decoration-color:rgba(40,80,160,.28);text-underline-offset:3px;transition:text-decoration-color .15s,color .15s;border-radius:3px}
main a:not([class]):hover,dialog a:not([class]):hover,.empty a:not([class]):hover{color:var(--red);text-decoration-color:currentColor}
main a:not([class]):focus-visible,dialog a:not([class]):focus-visible,a.link:focus-visible{outline:3px solid rgba(40,80,160,.35);outline-offset:2px}
main a[target=_blank]:not([class])::after,dialog a[target=_blank]:not([class])::after{content:" ↗";font-size:.85em;text-decoration:none;display:inline-block}
/* Zurück-/Weiter-Links als dezente Pille */
a.link{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:999px;background:rgba(40,80,160,.08);color:var(--blue);font-weight:700;font-size:14px;text-decoration:none;transition:background .15s,transform .15s}
a.link:hover{background:rgba(40,80,160,.16);text-decoration:none}a.link:active{transform:translateY(1px)}

.gover{display:flex;flex-direction:column;gap:6px;margin-top:10px}.gover .grp{width:100%}
.gmem{border-left:5px solid transparent;padding-left:8px}.gmem.gc0{border-left-color:#d33}.gmem.gc1{border-left-color:#2a5bd7}.gmem.gc2{border-left-color:#3fae3f}.gmem.gc3{border-left-color:#e6a100}.gmem.gc4{border-left-color:#8a3fc8}.gmem.gc5{border-left-color:#119aa5}
.edbar button[hidden]{display:none}
.gover{max-height:28vh;overflow-y:auto;overscroll-behavior:contain}.gover .grp .field{width:calc(100% - 44px);padding:5px 8px;font-weight:700;background:#fff}
dialog.fx .lscroll{min-height:110px}
.gmem{flex-wrap:nowrap}.gmem .nm{min-width:0;font-size:14px}.gmem select{width:110px!important}
.gover .grp span{margin-top:0}
@media(max-width:600px){.ghint{display:none}.gover{max-height:24vh}}
.exc .bd b{font-size:17px}.exc .bd p{font-size:15px;line-height:1.5;margin:6px 0 10px}.segnote{font-size:15px;line-height:1.45;resize:none;overflow:hidden}
textarea.grow{resize:none;overflow:hidden;line-height:1.4}
@media print{.segnote{background:#fff;padding:0;border:0}.segnote:placeholder-shown{display:none}.seghead .field{background:#fff;border:0;padding:0}}

/* === DARK === */
html[data-theme=dark]{color-scheme:dark;--bg:#1a1c1f;--panel:#17191b;--card:#202225;--text:#e4e4e4;--mute:#a3a8ad;--line:#3a3d42;--red-d:#ff8585;--ink:#0b0b0c}
html[data-theme=dark] body{background:var(--bg)}
html[data-theme=dark][data-wm] body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:#0f1011;-webkit-mask:var(--wm) center/cover no-repeat;mask:var(--wm) center/cover no-repeat}
html[data-theme=dark] .tile svg{stroke:#fff}html[data-theme=dark] .tile svg.f{fill:#fff;stroke:none}
html[data-theme=dark] .tile span{color:#fff}
html[data-theme=dark] a:not([class]),html[data-theme=dark] .link,html[data-theme=dark] .meld a{color:#9db9ff}
html[data-theme=dark] .top nav a{color:#fff}
html[data-theme=dark] .btn.red,html[data-theme=dark] .btn.dk{color:#fff}
html[data-theme=dark] .btn.red{background:#c93232}
html[data-theme=dark] img.logo{filter:none}
html[data-theme=dark] dialog{background:#202225;color:var(--text)}
html[data-theme=dark] dialog::backdrop{background:rgba(0,0,0,.65)}
html[data-theme=dark] .field::placeholder,html[data-theme=dark] textarea::placeholder{color:#8a8f94}
html[data-theme=dark] hr{border-color:#3a3d42}
html[data-theme=dark] [style*="background:#e4e4e4"],html[data-theme=dark] [style*="background:#e9e9e9"]{background:#2c2f33!important}
html[data-theme=dark] [style*="background:#fff3cf"]{background:#3d3510!important}
html[data-theme=dark] [style*="background:#f9dcdc"]{background:#4a2424!important}
html[data-theme=dark] [style*="background:#fff"]{background:#202225!important}
html[data-theme=dark] [style*="border:1px solid #555"]{border-color:#555!important}
html[data-theme=dark] .toast{background:#e8e8e8;color:#111}
.themeopt{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0}.themeopt label{display:flex;align-items:center;gap:8px;padding:12px 16px;border:2px solid var(--line);border-radius:10px;cursor:pointer;font-weight:600;min-width:130px}
.themeopt input{accent-color:var(--red);width:18px;height:18px}.themeopt label:has(input:checked){border-color:var(--red);background:rgba(214,59,59,.1)}

/* === DARK-GENERATED === */
html[data-theme=dark] .login-box{background:#17191b}
html[data-theme=dark] .field{background:#2c2f33}
html[data-theme=dark] .btn.ghost{background:#2c2f33}
html[data-theme=dark] .card h2{border-bottom:2px solid #3a3d42}
html[data-theme=dark] .cal span{background:#2c2f33}
html[data-theme=dark] .team{background:#17191b}
html[data-theme=dark] .arrow{background:#2c2f33}
html[data-theme=dark] .dots i{background:#2c2f33}
html[data-theme=dark] .tabs button{background:#2c2f33}
html[data-theme=dark] .row small{color:#a3a8ad}
html[data-theme=dark] form.card .field{background:#2c2f33}
html[data-theme=dark] .checks label{background:#2c2f33}
html[data-theme=dark] .meld{background:#17191b}
html[data-theme=dark] .meld .field{background:#202225}
html[data-theme=dark] .det{background:#17191b}
html[data-theme=dark] .dots button{background:#2c2f33}
html[data-theme=dark] .seg button[aria-pressed=true]{background:#202225;color:#e8e8e8}
html[data-theme=dark] .mini{background:#202225}
html[data-theme=dark] .sq{background:#17191b}
html[data-theme=dark] .sq .dt.none{background:#2c2f33;color:#cfcfcf}
html[data-theme=dark] .sub{color:#a3a8ad}
html[data-theme=dark] .arrow{border:1px solid #3a3d42;background:#202225;color:#e8e8e8}
html[data-theme=dark] .legend{background:#17191b}
html[data-theme=dark] .cp{background:#17191b}
html[data-theme=dark] .cph span{color:#a3a8ad}
html[data-theme=dark] .cbox{background:#202225}
html[data-theme=dark] .avgt{background:#202225}
html[data-theme=dark] .seg2 button{background:#2c2f33}
html[data-theme=dark] .dt th{background:#2c2f33}
html[data-theme=dark] .dt tbody tr:nth-child(even){background:#2c2f33}
html[data-theme=dark] .dt tbody tr:nth-child(odd){background:#17191b}
html[data-theme=dark] .mini-b{background:#2c2f33}
html[data-theme=dark] .num{background:#2c2f33}
html[data-theme=dark] .dt tr.dayr td{background:#2c2f33}
html[data-theme=dark] input[type=file]{background:#2c2f33}
html[data-theme=dark] .tools .field{background:#2c2f33}
html[data-theme=dark] .prow{background:#17191b}
html[data-theme=dark] .prow:hover{background:#2c2f33}
html[data-theme=dark] .pname small{color:#a3a8ad}
html[data-theme=dark] .xb2{background:#2c2f33}
html[data-theme=dark] .grid2 .field{background:#2c2f33}
html[data-theme=dark] .ibox{background:#17191b}
html[data-theme=dark] .qrbox svg{border:1px solid #3a3d42}
html[data-theme=dark] .urlf{background:#2c2f33}
html[data-theme=dark] .ptile{background:#17191b}
html[data-theme=dark] .ptile[aria-pressed=true]{background:#202225}
html[data-theme=dark] .ptile small{color:#a3a8ad}
html[data-theme=dark] .dow{color:#a3a8ad}
html[data-theme=dark] .day{background:#17191b}
html[data-theme=dark] .day.fer{background:#3d3510}
html[data-theme=dark] .day.hol{background:#4a2424}
html[data-theme=dark] .ch.tn{background:#202225;color:#e8e8e8}
html[data-theme=dark] .ch.sd{color:#cfcfcf}
html[data-theme=dark] .legend2{color:#cfcfcf}
html[data-theme=dark] .srow{background:#17191b}
html[data-theme=dark] .srow:hover{background:#2c2f33}
html[data-theme=dark] .srow small{color:#a3a8ad}
html[data-theme=dark] .tmeta .field{background:#2c2f33}
html[data-theme=dark] .tabs2 button{background:#2c2f33}
html[data-theme=dark] .tseg{background:#17191b}
html[data-theme=dark] .seghead .field{background:#2c2f33}
html[data-theme=dark] .ib{background:#2c2f33}
html[data-theme=dark] .segnote{background:#2c2f33}
html[data-theme=dark] .exc{background:#202225}
html[data-theme=dark] .exc .bd p{color:#e8e8e8}
html[data-theme=dark] .ab{background:#2c2f33}
html[data-theme=dark] .edtools button{background:#2c2f33}
html[data-theme=dark] .edsvg{border:2px solid #3a3d42}
html[data-theme=dark] .edsel input{background:#2c2f33}
html[data-theme=dark] .edhint{color:#a3a8ad}
html[data-theme=dark] body{background:#202225}
html[data-theme=dark] .wrap,html[data-theme=dark] .card{background:#202225}
html[data-theme=dark] .tseg{border:1px solid #3a3d42}
html[data-theme=dark] .exc{border:1px solid #3a3d42}
html[data-theme=dark] .qbar{background:#2c2f33}
html[data-theme=dark] .edbar{background:#17191b}
html[data-theme=dark] .edbar .tgl{color:#a3a8ad}
html[data-theme=dark] .edbar button{background:#2c2f33}
html[data-theme=dark] .edside{background:#17191b;border:1px solid #3a3d42}
html[data-theme=dark] .edhelp{color:#cfcfcf}
html[data-theme=dark] .edfoot{border-top:1px solid #3a3d42;background:#202225}
html[data-theme=dark] .faqp details{background:#17191b}
html[data-theme=dark] .msg{background:#17191b}
html[data-theme=dark] .msg.adm{background:#1d2c44}
html[data-theme=dark] .msg small{color:#a3a8ad}
html[data-theme=dark] .fbox{background:#17191b}
html[data-theme=dark] .tmrow.on{background:#17191b;border:1px solid #3a3d42}
html[data-theme=dark] .subtabs{border-bottom:2px solid #3a3d42}
html[data-theme=dark] .subtabs button{color:#cfcfcf}
html[data-theme=dark] .lh small{color:#a3a8ad}
html[data-theme=dark] .lrow{background:#17191b}
html[data-theme=dark] .lrow:hover{background:#2c2f33}
html[data-theme=dark] .grp{background:#17191b}
html[data-theme=dark] .grp span{color:#cfcfcf}
html[data-theme=dark] .grp small{color:#a3a8ad}
html[data-theme=dark] .grp{border:1px solid #3a3d42}
html[data-theme=dark] .lrow3{background:#17191b}
html[data-theme=dark] .sqh{color:#cfcfcf}
html[data-theme=dark] .sqh small{color:#a3a8ad}
html[data-theme=dark] .sqrow{background:#202225;border:1px solid #3a3d42}
html[data-theme=dark] .sqrow small{color:#a3a8ad}
html[data-theme=dark] .sqrow.edit{background:#17191b;border-color:#3a3d42}
html[data-theme=dark] .chip.up{background:#4a2424}
html[data-theme=dark] .sqf label{color:#cfcfcf}
html[data-theme=dark] .muted{color:#a3a8ad}
html[data-theme=dark] footer.legal a{color:#e8e8e8}
html[data-theme=dark] footer.legal a:hover,html[data-theme=dark] footer.legal a:focus-visible{background:#202225}
html[data-theme=dark] .gover .grp .field{background:#202225}
html[data-theme=dark] .segnote{background:#202225}
html[data-theme=dark] .seghead .field{background:#202225}


.edbar{margin:12px 0 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px 18px;padding:12px 14px}
.edbar button{display:inline-flex;align-items:center;gap:6px}.edbar .ei{width:18px;height:18px;flex:none}
.edbar .tgb{gap:6px}.edbar .tgl{margin-bottom:2px}
.edsel{margin-top:8px}
@media(max-width:900px){.edbar{grid-template-columns:1fr 1fr}.edbar button{padding:8px 9px}}
@media(max-width:520px){.edbar{grid-template-columns:1fr}}
html[data-theme=dark] .edbar button[aria-pressed=true]{background:var(--red);color:#fff}
.tile b{overflow-wrap:break-word;hyphens:auto}
html[data-theme=dark] .cal span.ev{background:var(--red);color:#fff}html[data-theme=dark] .cal span.today{background:#a81f1f;color:#fff}

/* Kader-Dialog kompakt */
.lhint,.lhelp{margin-top:8px;border-radius:8px;background:#f4f4f4;padding:8px 12px}.lhint summary,.lhelp summary{cursor:pointer;font-weight:700;font-size:14px;min-height:24px}
.lhint p,.lhelp>p{margin:6px 0}.lhint1{margin:8px 0 0;font-size:14px}
.hrow{display:grid;grid-template-columns:2fr 1.2fr auto;gap:6px;margin-top:6px;align-items:center}
.hrow .field,.lnote{margin:0;padding:10px 12px;font-size:15px;min-width:0}.hrow .btn{padding:10px 14px;font-size:14px;white-space:nowrap}
.lrow{min-height:46px}.lrow input[type=checkbox]{width:24px;height:24px;flex:none}
@media(max-width:700px){
 dialog.fx[open]{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:12px 12px calc(10px + env(safe-area-inset-bottom))}
 dialog.fx h2{font-size:19px;margin-bottom:4px}dialog.fx .dh{margin-bottom:0}
 dialog.fx .lscroll{min-height:0;flex:1 1 0;margin-top:8px}
 dialog.fx .dact{margin-top:8px;display:grid;grid-template-columns:1fr 1fr;gap:8px}dialog.fx .dact .btn{width:100%;margin:0}
 .hrow{grid-template-columns:1fr 1fr}.hrow .btn{grid-column:1/-1;width:100%}
 .lhint,.lhelp{padding:6px 10px}.lhint1{font-size:13px;padding:8px 10px}
}
html[data-theme=dark] .lhint,html[data-theme=dark] .lhelp{background:#2c2f33}
@media(max-width:700px){.lrow .tag{font-size:11px;padding:2px 7px}.lrow{padding:8px 10px;gap:10px}}
/* Handy-Feinschliff */
@media(max-width:700px){
 .field{margin-bottom:14px}
 .chk{display:flex;align-items:center;gap:8px;white-space:nowrap;min-height:44px}
 .seghead{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px 8px;align-items:center}
 .seghead .segnr{grid-row:1;grid-column:1}.seghead .st{grid-row:1;grid-column:2/5;min-width:0}
 .seghead>label{grid-row:2;grid-column:2;justify-self:end}.seghead .mn{grid-row:2;grid-column:3;width:84px}
 .seghead>.noprint{grid-row:2;grid-column:4}
 .seghead .ib{width:44px;height:44px;font-size:18px}
 .acts{display:flex;flex-wrap:wrap;gap:8px}.acts .mini-b{min-height:42px;padding:8px 14px;font-size:14px}
 dialog.wide{padding:10px 10px 0}
 dialog.wide .edmain .edsvg{position:sticky;top:0;z-index:6;box-shadow:0 6px 12px -6px rgba(0,0,0,.45)}
 .edbar{grid-template-columns:1fr;gap:8px;padding:8px 10px}.edbar button{padding:8px 9px;font-size:13px;gap:5px;min-height:40px}.edbar .ei{width:17px;height:17px}.edbar .tgb{gap:5px}
 .edfoot{bottom:0;margin-top:10px;padding:10px 0 calc(10px + env(safe-area-inset-bottom));display:grid;grid-template-columns:1.4fr 1fr;gap:8px;z-index:7}.edfoot .btn{width:100%;margin:0}
 .edside{padding:12px}
}
@media(max-width:700px){
 dialog.wide .edmain{display:contents}
 .seghead{grid-template-columns:auto auto 1fr}
 .seghead .st{grid-column:2/4}.seghead>label{grid-column:1}.seghead .mn{grid-column:2}.seghead>.noprint{grid-column:3;justify-self:end}
 .seghead .ib{width:40px;height:40px}
 .edlay{gap:10px}
}
.edside .field{margin:0}

/* === Übungsbibliothek, Variationen, Material, Teilen, Wochenansicht === */
.vtabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 8px}
.vtabs button{font:inherit;font-weight:700;font-size:13px;border:0;border-radius:6px;padding:8px 14px;background:#ddd;color:var(--text);cursor:pointer;min-height:38px}
.vtabs button[aria-selected=true]{background:var(--red);color:#fff}.vtabs .vadd{background:transparent;border:1.5px dashed #999}.vtabs .vdel{background:transparent;color:var(--red-d,#c33);padding:8px 10px}
.vars{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0}.vars figure{margin:0;flex:0 0 150px;max-width:150px}.vars figcaption{font-size:12px;font-weight:700;color:#777;margin-top:2px}
.matbox{margin-top:14px}.mat{background:#fff6e0;border-left:4px solid #e6a100;padding:9px 12px;border-radius:4px;font-size:14px;line-height:1.5}.mat small{display:block;color:#777;font-size:12px}
.tplbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.libbar{display:grid;grid-template-columns:2fr 1fr 1fr;gap:8px;margin:0 0 12px}.libbar .field{margin:0}
.libres{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;align-content:start}
dialog.lib[open]{display:flex;flex-direction:column;overflow:hidden}dialog.lib .libres{flex:1 1 auto;overflow:auto;-webkit-overflow-scrolling:touch;min-height:200px}
.libc{background:#fff;border-radius:8px;padding:10px;box-shadow:0 1px 4px rgba(0,0,0,.18);display:flex;flex-direction:column;gap:8px}
.libc .th{width:100%}.libc .bd b{font-size:16px}.libc .bd p{margin:4px 0 8px;font-size:13px;color:#444;white-space:pre-wrap;max-height:4.5em;overflow:hidden}
.libm{margin:2px 0}.chip.g{background:#e3e3e3;color:#333;font-weight:600}
.tplth{display:flex;flex-direction:column;gap:3px}.tplth span{background:#eee;border-left:4px solid var(--red);padding:4px 8px;font-size:13px;font-weight:600;border-radius:3px}
.libview{overflow:auto;flex:1 1 auto;padding:2px}
.wk{display:grid;gap:10px}.wkd{background:#fff;border-radius:8px;box-shadow:0 1px 4px rgba(0,0,0,.18);padding:10px 12px;display:grid;grid-template-columns:96px 1fr;gap:12px;align-items:start}
.wkd.today{outline:2px solid var(--red)}.wkd .dn{font-weight:800;line-height:1.2}.wkd .dn small{display:block;font-weight:600;color:#777}
.wkd .ev{display:flex;gap:8px;align-items:center;flex-wrap:wrap;width:100%;text-align:left;font:inherit;border:0;background:#f3f3f3;border-radius:6px;padding:9px 12px;margin:0 0 6px;cursor:pointer;min-height:44px}
.wkd .ev:hover{background:#e8e8e8}.wkd .ev.m{background:#fde8e8}.wkd .ev b{min-width:90px}.wkd .ev .st{margin-left:auto;font-size:12px;font-weight:700;color:#777}
.wkd .none{color:#999;font-size:13px;padding:8px 0}.vsw{display:inline-flex;gap:0}.vsw button{font:inherit;font-weight:700;border:0;padding:8px 16px;background:#ddd;cursor:pointer;color:var(--text)}.vsw button:first-child{border-radius:6px 0 0 6px}.vsw button:last-child{border-radius:0 6px 6px 0}.vsw button[aria-pressed=true]{background:var(--red);color:#fff}
@media(max-width:700px){
 .libbar{grid-template-columns:1fr 1fr}.libbar #lq{grid-column:1/-1}
 .libres{grid-template-columns:1fr}
 .wkd{grid-template-columns:1fr;gap:6px}.wkd .dn small{display:inline;margin-left:6px}
 .vtabs{gap:5px}.vtabs button{flex:0 0 auto;padding:6px 11px;min-height:36px;font-size:13px}
}
html[data-theme=dark] .vtabs button,html[data-theme=dark] .vsw button{background:#2c2f33}html[data-theme=dark] .vtabs button[aria-selected=true],html[data-theme=dark] .vsw button[aria-pressed=true]{background:var(--red)}
html[data-theme=dark] .vtabs .vadd{background:transparent;border-color:#666}
html[data-theme=dark] .mat{background:#3a3220;color:#f0e6cc}html[data-theme=dark] .mat small{color:#b5ab90}
html[data-theme=dark] .libc,html[data-theme=dark] .wkd{background:#202225}html[data-theme=dark] .libc .bd p{color:#ddd}
html[data-theme=dark] .chip.g{background:#33363a;color:#e4e4e4}html[data-theme=dark] .tplth span{background:#2c2f33}
html[data-theme=dark] .wkd .ev{background:#2c2f33}html[data-theme=dark] .wkd .ev:hover{background:#363a3f}html[data-theme=dark] .wkd .ev.m{background:#4a2828}
@media(max-width:700px){.calhead h2{font-size:18px;order:-1;flex:1 1 100%;text-align:left;min-width:0}.calhead{gap:8px}.calhead .vsw{margin-left:auto}}
.top .brand{color:#fff}
@media(max-width:700px){.vsw button{padding:8px 11px;font-size:14px}.wkd{padding:8px 12px}.wkd .none{padding:0}.calhead .mini-b{padding:9px 12px}}

.ch.cx{background:#bbb!important;color:#fff;text-decoration:line-through}.wkd .ev.cx{opacity:.65}.wkd .ev.cx>span:nth-child(2),.wkd .ev.cx>b{text-decoration:line-through}.wkd .ev.cx .st{color:var(--red);font-weight:800}
.ibox.canc{opacity:.9;border-left:4px solid #999}.cbadge{background:#777;color:#fff;font-size:11px;padding:2px 7px;border-radius:3px;letter-spacing:.04em}
.cbn{background:#f1f1f1;border-left:4px solid #888;padding:10px 12px;border-radius:4px;margin:8px 0;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
html[data-theme=dark] .cbn{background:#2c2f33}html[data-theme=dark] .ch.cx{background:#555!important}
.wkd .ev .tn2{background:var(--red);color:#fff;font-size:12px;font-weight:700;padding:2px 8px;border-radius:3px}
.addseg .mini-b,.tplbar .mini-b{padding:10px 16px;font-size:14px;font-weight:700;min-height:42px;border-radius:6px}
.addseg .field{padding:10px 12px!important;font-size:14px;min-height:42px}.addseg{gap:8px}.tplbar{margin-top:14px}
.chk{display:flex;gap:10px;align-items:center;padding:10px 4px;font-size:15px;cursor:pointer;border-bottom:1px solid #e6e6e6}.chk input{width:22px;height:22px;flex:0 0 auto;accent-color:var(--red)}html[data-theme=dark] .chk{border-color:#33363a}

.bkstat{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-radius:6px;margin:6px 0 14px;border-left:5px solid #3fae3f;background:#e9f6e9}.bkstat.bad{border-color:var(--red);background:#fde8e8}.bkstat span{font-size:13px;color:#555}
.bkrow{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0 0 6px}.bkrow .field{margin:0;min-width:0}
.bklist{display:grid;gap:4px}.bkitem{display:grid;grid-template-columns:1fr auto auto;gap:14px;padding:9px 12px;background:#f1f1f1;border-radius:4px;font-size:14px}.bkitem b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){.bkitem{grid-template-columns:1fr auto}.bkitem span:nth-of-type(1){grid-column:1}.bkitem b{grid-column:1/-1}}
html[data-theme=dark] .bkstat{background:#1f3322}html[data-theme=dark] .bkstat.bad{background:#40222a}html[data-theme=dark] .bkstat span{color:#bbb}html[data-theme=dark] .bkitem{background:#2c2f33}

/* Einheitlicher Desktop-Rahmen für ALLE Seiten: Kopf und Ränder skalieren mit der Fensterhöhe */
@media(min-width:1001px){
 .top{height:clamp(64px,9vh,96px)}
 .top .logo,.top .logo-ph{height:clamp(46px,6.5vh,72px)}
 .wrap{margin:clamp(14px,3vh,40px) auto;padding:clamp(20px,3.4vh,40px) clamp(24px,3.4vw,55px);gap:clamp(28px,4vw,72px)}
 /* Dashboard: Team-Karten und Kacheln passen sich der Höhe an, nichts wird übergroß */
 body.dash .track{padding:clamp(4px,1vh,12px) clamp(0px,1vw,40px) 4px}
 body.dash .team{flex-basis:clamp(150px,22vh,253px);height:clamp(156px,23vh,262px);aspect-ratio:auto;padding-top:clamp(12px,2.6vh,30px)}
 body.dash .team .logo,body.dash .team .logo-ph{height:clamp(56px,10.5vh,110px);width:auto;max-width:70%}
 body.dash .team b{font-size:clamp(28px,4.6vh,46px)}
 body.dash .arrow{flex-basis:clamp(44px,6vh,60px);height:clamp(44px,6vh,60px)}
 body.dash .tiles{grid-template-columns:repeat(3,minmax(0,260px))}
 body.dash .tile{min-height:clamp(90px,15vh,150px);padding:clamp(12px,2vh,22px) 22px}
 body.dash .tile b{font-size:clamp(18px,1.9vw,34px);overflow-wrap:normal;hyphens:none}
}

/* === Smartphone-Feinschliff: Phasen-Kopf, Formularzeilen, Buttonleisten === */
.mw{display:flex;align-items:center;gap:8px}
@media(max-width:700px){
 .seghead{grid-template-columns:30px minmax(0,1fr) auto!important;gap:10px 8px!important}
 .seghead .segnr{grid-row:1;grid-column:1}.seghead .st{grid-row:1;grid-column:2/4!important;min-width:0;width:100%;box-sizing:border-box}
 .seghead .mw{grid-row:2;grid-column:1/3}.seghead .mw .mn{width:84px;flex:0 0 84px}
 .seghead>.noprint{grid-row:2!important;grid-column:3!important;display:flex;gap:6px}
 .seghead .ib{width:40px!important;height:44px!important}
 .addseg{gap:8px}.addseg span:first-child{flex:1 1 100%}.addseg .field{flex:1 1 100%;max-width:none!important;box-sizing:border-box}.addseg .mini-b{flex:0 0 auto}
 .tplbar{display:grid;grid-template-columns:1fr 1fr;gap:8px}.tplbar .mini-b{width:100%}
 .tbtns,.pbar{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 /* Admin-Formularzeilen (Trainingszeiten, Mannschaften, Trainer) */
 .meld{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important;align-items:stretch}
 .meld>.field,.meld>select,.meld>input{width:100%!important;max-width:none!important;min-width:0}
 .meld>span:not(.chip){display:none}
 .meld>button,.meld>.btn{width:100%;min-height:44px}
 .meld>.link,.meld>a{grid-column:1/-1;text-align:center;padding:8px}
 .meld>b,.meld>label,.meld>p{grid-column:1/-1}
 .meld input[type=time],.meld input[type=date]{min-width:0;padding-right:6px}
}
@media(max-width:700px){.seghead>.noprint,.exh .noprint{gap:10px!important}.ib{margin:0 2px}}
@media(min-width:1001px){
 body.dash .side{box-sizing:border-box;display:flex;flex-direction:column;gap:12px;max-height:calc(100vh - clamp(64px,9vh,96px) - 2*clamp(14px,3vh,40px) - 2*clamp(20px,3.4vh,40px))}
 body.dash .side>section:first-child{flex:1 1 0;min-height:70px;overflow:auto}
 body.dash .side>section:last-child{flex:0 0 auto}
 body.dash .side{height:auto;min-height:0}
 body.dash .cal{gap:clamp(3px,.8vh,7px)}body.dash .cal span{width:clamp(16px,2.6vh,22px);height:clamp(16px,2.6vh,22px)}
}
@media(min-width:1001px){
 body.dash{--hd:clamp(64px,9vh,96px);--mg:clamp(14px,3vh,40px);--pd:clamp(20px,3.4vh,40px)}
 body.dash .wrap{box-sizing:border-box;height:calc(100vh - var(--hd) - 2*var(--mg));min-height:480px;grid-template-rows:minmax(0,1fr)}
 body.dash .wrap>div{display:flex;flex-direction:column;min-height:0}
 body.dash .teams{flex:0 0 auto}
 body.dash .tiles{flex:1 1 0;min-height:0;margin-top:clamp(12px,2.4vh,32px);grid-auto-rows:minmax(0,1fr);align-content:stretch}
 body.dash .tile{height:auto;min-height:0;max-height:none;overflow:hidden}
 body.dash .tile b{font-size:clamp(17px,1.7vw,32px);white-space:normal;overflow-wrap:anywhere}
 body.dash .tile span{font-size:clamp(26px,4.4vh,44px)}
}

/* === Bibliothek v2: Filterleiste, Favoriten, Schwierigkeit, Athletik-Bilder === */
.libbar2{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;margin:0 0 12px;align-items:center}.libbar2 .field{margin:0;padding:10px}.libbar2 #lq{grid-column:span 2}
.chipb{font:inherit;font-weight:700;border:1.5px solid #bbb;background:#fff;border-radius:20px;padding:9px 14px;cursor:pointer;min-height:44px}.chipb[aria-pressed=true]{background:var(--red);color:#fff;border-color:var(--red)}
.libh{margin:14px 0 8px;font-size:15px;color:#666}.libres.rec{margin-bottom:6px}
.libt{display:flex;align-items:flex-start;gap:6px;justify-content:space-between}.libt b{flex:1}
.star{font-size:24px;line-height:1;border:0;background:none;cursor:pointer;color:#e6a100;padding:4px 8px;min-width:44px;min-height:44px;margin:-8px -8px 0 0}
.dif{color:#e6a100;font-size:12px;letter-spacing:2px;margin-left:4px;white-space:nowrap}
.athpic{display:block;width:100%;height:auto;border-radius:4px}
.lbr{flex:1 1 auto;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch}
dialog.lib[open] .lbr{display:flex;flex-direction:column}dialog.lib .lbr .libres:last-child{flex:1 1 auto}
.acts{display:flex;flex-wrap:wrap;gap:8px}

html[data-theme=dark] .chipb{background:#2c2f33;color:#eee;border-color:#555}

/* === Zeitleiste, Rückblick, Anordnen === */
.sum{margin:4px 0 12px}.tl{display:flex;height:26px;border-radius:5px;overflow:hidden;margin-top:6px;background:#e6e6e6}
.tl span{display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0 4px;min-width:2px;border-right:2px solid #fff}
.tl span.free{background:repeating-linear-gradient(45deg,#e6e6e6,#e6e6e6 6px,#f3f3f3 6px,#f3f3f3 12px);color:#666}
.tlmark{height:0;border-top:3px solid var(--red);margin-top:-1px}.warnt{color:var(--red-d)}
.lastinfo{background:#fff8e1;border-left:4px solid #e6a100;border-radius:4px;padding:8px 12px;margin:0 0 12px;font-size:14px}.lastinfo p{margin:4px 0 0;white-space:pre-wrap}
.chiprow{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 8px}
.tgb button.arr:disabled{opacity:.45}
html[data-theme=dark] .lastinfo{background:#3a3520;color:#eee}html[data-theme=dark] .tl{background:#333}html[data-theme=dark] .tl span.free{background:#2c2f33;color:#aaa}
@media(max-width:700px){#tplb.tplbar{grid-template-columns:1fr 1fr}#tplb .mini-b{min-height:44px}}
.flowbar{display:flex;align-items:center;justify-content:space-between;gap:10px}.fdots{display:flex;gap:8px}.fdots i{width:12px;height:12px;border-radius:50%;background:#ccc;display:block}.fdots i.on{background:var(--red)}

/* === Anwesenheitsverlauf === */

.lfbtn{display:none}
@media(max-width:700px){
 .libbar2 .lfbtn{display:block;grid-column:1/2}.libbar2 #lq{grid-column:1/-1}.libbar2 #lfav{grid-column:2/3}
 .libbar2 select{display:none;grid-column:span 1;font-size:15px;padding:10px 8px;text-overflow:ellipsis}.libbar2.open select{display:block}
 .libbar2 .chipb{padding:8px 10px}
}
.tl span{display:block!important;line-height:26px;text-align:center;min-width:0}
@media(max-width:700px){
 .libbar2{grid-template-columns:1fr 1fr!important}
 .tabs2{display:flex;flex-wrap:nowrap;gap:6px}.tabs2 button{flex:1 1 0;min-width:0;padding:12px 6px;font-size:15px}
}
dialog.lib .dh{margin-bottom:12px}

/* Bibliothek: Volltext lesbar, Ordner, Favoriten-Reiter */
.libc .bd p.libdesc{max-height:7.5em;overflow:auto;-webkit-overflow-scrolling:touch;padding-right:4px;margin:4px 0 8px;scrollbar-width:thin}
.libc .bd p.libdesc:focus{outline:2px solid #4c6ef5;outline-offset:1px}
dialog.fx>.libview,dialog.fx>.lbr{flex:1 1 auto;min-height:0;flex-shrink:1;overflow:auto}
.libview p{line-height:1.5;font-size:15px}
.libfolders .libh.folder{font-size:17px;color:#333;margin:16px 0 8px}.libh.folder span{color:#888;font-weight:600}
.folders .chipb{padding:7px 14px;min-height:40px}
.viewgrid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:18px;align-items:start}.viewtxt p{margin:0 0 10px}.viewtxt .vmeta{color:#777;font-size:13px;font-weight:700}
@media(max-width:800px){.viewgrid{grid-template-columns:1fr}}

/* Anwesenheitsverlauf (Dialog) */
.ptile.clk{cursor:pointer;border:0;font:inherit;text-align:left;position:relative;transition:transform .12s,box-shadow .12s;box-shadow:0 0 0 2px #4c6ef540}.ptile.clk:hover{transform:translateY(-1px);box-shadow:0 0 0 2px #4c6ef5}
.ptile .hintc{display:block;font-style:normal;font-size:12px;font-weight:700;color:#4c6ef5;margin-top:2px}
.acv{padding:4px 2px}.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:6px 0 12px}
.kpi{background:#f3f5f9;border-radius:10px;padding:10px 14px}.kpi small{display:block;color:#667;font-weight:700;font-size:12px}.kpi b{font-size:26px;display:block;line-height:1.2}.kpi em{font-style:normal;font-size:12px;color:#889}
.acs{position:relative;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%;background:linear-gradient(#fff,#f8f9fc);border-radius:10px;padding:8px 4px 0}.acs svg{display:block;max-width:none}
.actip{position:absolute;z-index:5;background:#1f2937;color:#fff;border-radius:8px;padding:8px 10px;font-size:13px;line-height:1.35;width:180px;pointer-events:none;box-shadow:0 4px 14px rgba(0,0,0,.3)}.actip small{color:#cbd5e1}
.ac-g{stroke:#e2e6ee;stroke-width:1}.ac-80{stroke:#2fb344;stroke-width:1.5;stroke-dasharray:5 4}.ac-t{font-size:11px;fill:#667}.ac-t.g80{fill:#2fb344;font-weight:700}.ac-l{stroke:#1f2937;stroke-width:2}.ac-pt{cursor:pointer}
.legend{margin:8px 0}.mrow{display:flex;gap:12px;align-items:flex-end;overflow-x:auto;padding:4px 2px 8px}.mbar{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:54px}
.mbar .mb{width:34px;height:90px;background:#eef1f6;border-radius:8px;display:flex;align-items:flex-end;overflow:hidden}.mbar .mb i{display:block;width:100%;border-radius:8px 8px 0 0}.mbar b{font-size:13px}.mbar small{color:#778;font-size:11px}
html[data-theme=dark] .kpi{background:#2c2f33}html[data-theme=dark] .kpi small{color:#aab}html[data-theme=dark] .acs{background:#232629}html[data-theme=dark] .ac-g{stroke:#3a3d41}html[data-theme=dark] .ac-t{fill:#b6bcc6}html[data-theme=dark] .ac-l{stroke:#eee}html[data-theme=dark] .mbar .mb{background:#33363a}html[data-theme=dark] .ptile .hintc{color:#8fa6ff}
/* Bibliothek: gewählten Ordner/Reiter deutlich markieren (auch dunkel) */
.chipb[aria-pressed=true]{background:var(--red);color:#fff;border-color:var(--red);box-shadow:0 0 0 2px #fff,0 0 0 4px var(--red)}.folders .chipb[aria-pressed=true]::before{content:"✓ "}
html[data-theme=dark] .chipb[aria-pressed=true]{background:var(--red);color:#fff;border-color:#fff;box-shadow:0 0 0 2px #111,0 0 0 4px #fff}
html[data-theme=dark] .tabs2 button[aria-selected=true]{background:var(--red);color:#fff;box-shadow:0 0 0 2px #fff inset}
p.legend{background:none!important;box-shadow:none!important;padding:0!important;font-size:13px!important;color:#778;margin:8px 0!important}

.phtabs{display:flex;gap:6px;margin:8px 0 0;flex-wrap:wrap}
.phtabs button{flex:1 1 auto;min-height:40px;padding:6px 12px;border:1px solid #c5ccd6;border-radius:999px;background:#fff;font:600 14px inherit;color:#334155;cursor:pointer}
.phtabs button[aria-selected=true]{background:#0f5c4d;border-color:#0f5c4d;color:#fff}
.phtabs button[data-ph=x][aria-selected=true]{background:#d93a3a;border-color:#d93a3a}
.pherr{margin:8px 0 0;padding:8px 10px;border-left:4px solid #d93a3a;background:#fdecec;color:#7f1d1d;border-radius:6px;font-size:14px}
html[data-theme=dark] .phtabs button{background:#1f2937;color:#e5e7eb;border-color:#475569}
html[data-theme=dark] .phtabs button[aria-selected=true]{background:#14806b;border-color:#fff;color:#fff}
html[data-theme=dark] .phtabs button[data-ph=x][aria-selected=true]{background:#d93a3a}
html[data-theme=dark] .pherr{background:#3b1414;color:#fecaca}

.imgx{width:100%;height:100%;object-fit:contain;background:#fff;border-radius:8px;display:block}
.exc .th .imgx,.libc .imgx{aspect-ratio:300/190}
#phv .imgx{height:auto;max-height:60vh}
.imgpick{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px;max-height:260px;overflow:auto;padding:2px}
.imgpick .ip{position:relative;display:flex;flex-direction:column;gap:4px;padding:5px;border:2px solid #c5ccd6;border-radius:10px;background:#fff;cursor:pointer;font:600 12px inherit;color:#334155;text-align:center;min-height:44px}
.imgpick .ip img{width:100%;aspect-ratio:3/2;object-fit:contain;background:#f1f5f9;border-radius:6px}
.imgpick .ip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.imgpick .ip[aria-pressed=true]{border-color:#d93a3a;box-shadow:0 0 0 2px #d93a3a55}
.imgpick .ip b{position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;background:#d93a3a;color:#fff;font-size:12px;display:flex;align-items:center;justify-content:center}
html[data-theme=dark] .imgpick .ip{background:#1f2937;color:#e5e7eb;border-color:#475569}
html[data-theme=dark] .imgpick .ip[aria-pressed=true]{border-color:#fff}

dialog.fx>.sdbody{flex:1 1 auto;min-height:0;flex-shrink:1;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;padding-right:6px}

/* Untere Navigationsleiste am Smartphone, Offline-Hinweis */
.bnav{display:none}
@media(max-width:700px){
 .bnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:40;background:#1b1b1b;border-top:1px solid #333;padding:4px 4px calc(4px + env(safe-area-inset-bottom))}
 .bnav a{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:52px;border-radius:10px;color:#c4c4c4;text-decoration:none;font-size:11px;font-weight:600}
 .bnav a span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .bnav svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
 .bnav a[aria-current=page]{color:#fff;background:rgba(214,59,59,.4)}
 body:has(.bnav){padding-bottom:calc(66px + env(safe-area-inset-bottom))}
 .top nav a:not(#out){display:none}
 .toast{bottom:calc(76px + env(safe-area-inset-bottom))}
 footer.legal{bottom:calc(60px + env(safe-area-inset-bottom))!important;position:static!important;padding:8px 0 2px}
}

.abtns{margin-left:auto;display:flex;gap:6px}
.swhint{display:none;margin:0 0 8px;font-size:13px;color:#777}
@media(max-width:700px){.swhint{display:block}.abtns .mini-b{min-height:40px;padding:8px 14px;font-size:14px}.arow{touch-action:pan-y}}

.nowc{margin-bottom:20px}
.nowrow{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;justify-content:space-between;padding:10px 0;border-top:1px solid var(--line)}.nowrow:first-child{border-top:0}
.nowh{display:grid;gap:2px;min-width:0}.nowh b{font-size:17px}.nowh span{font-size:14px}.nowh small{color:#777;font-size:13px}
.nowb{display:flex;gap:8px;flex-wrap:wrap}.nowb .btn{font-size:15px;min-height:44px;display:inline-flex;align-items:center;text-decoration:none}
@media(max-width:700px){.nowb{width:100%}.nowb .btn{flex:1 1 0;justify-content:center;padding:10px 8px}}


.bkdays{display:grid;grid-template-columns:repeat(14,1fr);gap:4px;margin-bottom:8px}
.bkd{display:grid;justify-items:center;gap:1px;padding:5px 0;border-radius:8px;font-size:11px}.bkd b{font-size:16px;line-height:1.2}.bkd small{font-size:10px;color:#777}
.bkd.ok{background:#e3f4e3;color:#1f6b1f}.bkd.no{background:#f1f1f1;color:#999}
.bkwarn2,.bkwarn{background:#fdecec;color:#8a1a1a;border:1px solid #e8b4b4;border-radius:8px;padding:10px 14px;font-weight:600;margin:8px 0}
.bkwarn{display:block;text-decoration:none;margin:0 0 16px}
html[data-theme=dark] .bkd.ok{background:#16311a;color:#9be09b}html[data-theme=dark] .bkd.no{background:#242424}
html[data-theme=dark] .bkwarn,html[data-theme=dark] .bkwarn2{background:#3b1414;color:#fecaca;border-color:#7f1d1d}
@media(max-width:700px){.bkdays{grid-template-columns:repeat(7,1fr)}}

.imgup{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px 0 8px}.imgup .btn{min-height:44px;display:inline-flex;align-items:center}#imgst{font-size:13px;color:#777}
.ipw{position:relative;min-width:0}.ipw .ip{width:100%}
.ipd{position:absolute;left:6px;top:6px;width:30px;height:30px;border-radius:50%;border:0;background:#fffc;cursor:pointer;font-size:15px;line-height:1;padding:0}
.noimg{display:grid;place-items:center;min-height:120px;aspect-ratio:300/190;background:#eef2f4;color:#8a98a3;font-size:14px;font-weight:600;border-radius:8px;border:1px dashed #b8c4cc;text-align:center;padding:8px}
html[data-theme=dark] .noimg{background:#1b2227;border-color:#3b4852;color:#8fa0ac}

/* ===== Smartphone-Feinschliff (Update 50) ===== */
@media(max-width:700px){
 /* Untere Leiste: hell, groß, gut sichtbar, über der Home-Anzeige des iPhones */
 .bnav{background:#fff;border-top:1px solid #d3d3d3;box-shadow:0 -4px 14px rgba(0,0,0,.18);padding:6px 6px calc(8px + env(safe-area-inset-bottom));gap:4px;z-index:60}
 .bnav a{min-height:58px;color:#3a3a3a;font-size:12px;font-weight:700;gap:3px;border-radius:12px}
 .bnav svg{width:26px;height:26px;stroke-width:2}
 .bnav a[aria-current=page]{background:var(--red);color:#fff}
 html[data-theme=dark] .bnav{background:#26272a;border-top-color:#4a4b50;box-shadow:0 -4px 14px rgba(0,0,0,.6)}
 html[data-theme=dark] .bnav a{color:#e4e4e6}
 html[data-theme=dark] .bnav a[aria-current=page]{background:var(--red);color:#fff}
 body:has(.bnav){padding-bottom:calc(84px + env(safe-area-inset-bottom))}
 .toast{bottom:calc(96px + env(safe-area-inset-bottom))}
 /* Tippflächen */
 .btn.sm,.mini-b,.seg2 button,.chipb,.link,button.termin{min-height:46px}
 .btn.sm{padding:11px 16px;font-size:16px}
 .mini-b{padding:10px 14px;font-size:14px;border-radius:8px}
 .ib{min-width:46px;min-height:46px}
 /* Kalender: Teamauswahl oben */
 .ctrlm{display:grid;gap:10px;padding:16px;order:-2}
 .ctrlm[hidden]{display:none}
 .ctrlm .field{margin:0;padding:13px 12px}.ctrlm .lb{font-weight:700;font-size:14px}
 .ctrlm .btn{display:block;margin:0;min-height:52px;font-size:17px;padding:12px}
 .ctrlm .team{display:none}
 /* Trainingsseite */
 .tabs2{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:6px}
 .tabs2 button{min-height:48px;padding:10px 6px;font-size:15px;text-align:center}
 .acts,.exc .acts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.acts .mini-b{width:100%}
 .tplbar,#tplb.tplbar{display:grid;grid-template-columns:1fr;gap:8px}.tplbar .mini-b{width:100%}
 .addseg{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:stretch}.addseg>span,.addseg>input,.addseg>[data-c="1"],.addseg>[data-d]{grid-column:1/-1}.addseg input.field{max-width:none!important;margin:0}
 .tseg>.noprint[style*="display:flex"]{display:grid!important;grid-template-columns:1fr;gap:8px}.tseg>.noprint[style*="display:flex"] .btn{width:100%}
 .dact{flex-direction:column!important;align-items:stretch!important;gap:10px}.dact>span{display:grid!important;grid-template-columns:1fr;gap:8px;width:100%}.dact .btn,.dact .btn.sm{width:100%;text-align:center}
 .seghead{flex-wrap:wrap;gap:8px}.seghead .st{flex:1 1 100%;order:1}.seghead .segnr{order:0}.seghead .mw{order:2}.seghead .noprint{order:3;margin-left:auto}
 /* Anwesenheit */
 .asum{flex-wrap:wrap;gap:8px}.abtns{width:100%;margin-left:0!important;display:grid;grid-template-columns:1fr 1fr;gap:8px}.abtns .mini-b{min-height:50px;font-size:16px}
 .arow{flex-wrap:wrap;gap:8px;padding:10px 0}.arow .nm{flex:1 1 100%;font-weight:700}
 .arow .att{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;width:100%}.att .ab{min-height:50px;padding:8px 4px;font-size:14px}
 /* Allgemeine Button-Reihen */
 .bkrow,.dact,.btnrow,.actrow{flex-wrap:wrap}
 dialog .edfoot{gap:8px}dialog .edfoot .btn{flex:1 1 0;min-height:50px}
 dialog .dh{gap:8px}
}
@media(max-width:700px){.calpage .ovl>h2:first-child{display:none}}
@media(max-width:700px){.tabs2 button{font-size:14px;padding:10px 2px;white-space:nowrap}}
@media(max-width:700px){
.themeopt{display:grid!important;grid-template-columns:1fr;gap:8px}
.themeopt label{width:100%;box-sizing:border-box;min-height:50px}
.tabs2{grid-template-columns:repeat(auto-fit,minmax(0,1fr))}
.tabs2 button{font-size:13px;padding:10px 1px}
aside .btn.red#exp{grid-column:1/-1}
}
@media(max-width:700px){
.tmeta{grid-template-columns:1fr 1fr;gap:16px 12px}
.tmeta>div:nth-child(1),.tmeta>div:nth-child(4){grid-column:1/-1}
.tmeta label{font-size:14px;margin-bottom:6px}
.tmeta .field{height:50px;min-height:50px;box-sizing:border-box;width:100%;font-size:16px;padding:0 12px;-webkit-appearance:none;appearance:none;display:block}
.tmeta textarea.field{height:auto;min-height:50px;padding:12px}
.tabs2:has(#lnew){display:flex;flex-wrap:wrap;gap:8px}
.tabs2 #lnew{flex:1 1 100%;order:9;margin:6px 0 0!important;min-height:50px;font-size:16px;white-space:normal}
}
@media(max-width:700px){.seghead .mw{display:flex;align-items:center;gap:8px;min-width:0}.seghead .mw .mn{width:76px!important;max-width:76px;flex:0 0 76px!important;min-width:0}.seghead>.noprint{gap:6px!important}.seghead .ib{margin:0!important}}
.teamback{display:none}
@media(max-width:700px){
.teamback{display:inline-flex;align-items:center;min-height:44px;margin:12px 16px 0;padding:0 16px;border-radius:22px;background:#eef1f8;color:#2a55a4;font-weight:700;font-size:15px;text-decoration:none}
html[data-theme=dark] .teamback{background:#2c2f33;color:#9db8f0}
.gridbtns #mng{grid-column:1/-1}
.libview~.edfoot .btn,.edfoot #cx{width:100%;min-height:50px;font-size:16px}
}
@media(max-width:700px){
dialog .btn.ghost,dialog form[method=dialog] .btn,.dact .btn,.sqact .btn{width:100%;box-sizing:border-box;min-height:50px;font-size:16px;margin:0}
dialog div[style*="display:flex"]:has(>.btn.sm){flex-direction:column;align-items:stretch}
dialog div[style*="display:flex"]>.btn.sm{width:100%;min-height:50px;font-size:16px;margin:0}
dialog .edfoot{display:flex;flex-direction:column;gap:8px}
dialog .edfoot .btn{flex:none;width:100%}
.sqact{display:flex;flex-direction:column;gap:8px}
}
@media(max-width:700px){
.grpbox>.mini-b,.grpbox .mini-b[data-a=grp],.mini-b[data-a=grp]{display:block;width:100%;box-sizing:border-box;min-height:50px;font-size:16px;margin:8px 0 0}
#cx,#cl,#lcx,#no,#pc,[data-sq]:not([data-sq~="x"]).btn{width:100%;box-sizing:border-box;min-height:50px;font-size:16px;margin:0}
}
@media(max-width:700px){.exc .acts,.acts{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px}.exc .acts>*{width:100%!important;box-sizing:border-box;margin:0!important}}
@media(max-width:700px){.exc .bd{width:100%;box-sizing:border-box;flex:none;max-width:100%;min-width:0}}
@media(max-width:700px){
.teamback{display:flex;margin:0 0 12px;width:100%;box-sizing:border-box;justify-content:center;border-radius:12px}
.calpage .ovl>h2:first-child+.teamback{display:none}
dialog .dact,dialog.fx .dact{display:grid!important;grid-template-columns:1fr!important;gap:8px}
dialog .dact>*{width:100%!important;box-sizing:border-box;margin:0}
}
@media(max-width:700px){
.gridbtns:has(#qra) #add,.gridbtns #exp,.gridbtns #mng{grid-column:1/-1}
.gridbtns>.btn{min-height:50px;display:flex;align-items:center;justify-content:center;text-align:center}
.chiprow.noprint{display:flex;flex-wrap:wrap;gap:8px}.chiprow.noprint .mini-b{flex:1 1 auto;min-height:48px}
.abtns .mini-b{flex:1}
dialog .edfoot.flowbar{flex-direction:row;align-items:center;gap:8px}
dialog .edfoot.flowbar .btn{width:auto;flex:1 1 0}
dialog .edfoot.flowbar .fdots{flex:0 0 auto}
}
@media(max-width:700px){.gridbtns #qra{grid-column:auto}}
