/* Teamrunde – alle Regeln sind auf .tr-app begrenzt, damit sie dein Theme nicht stören.
   Farben lassen sich im Customizer unter „Zusätzliches CSS“ überschreiben, z. B.:
   .tr-app { --tr-brand: #0a6cff; --tr-navy: #0b1f3d; --tr-silver: #c0c0c0; } */

.tr-app{
  --tr-bg:#E8EBEF; --tr-surface:#FFFFFF; --tr-surface2:#F1F3F6; --tr-ink:#0E1A2B; --tr-muted:#566275; --tr-line:#CBD1D9;
  --tr-brand:#1B4A94; --tr-brand-ink:#FFFFFF; --tr-navy:#0F2748; --tr-silver:#C4CAD3; --tr-bib:#C4CAD3; --tr-bib-ink:#0F2748;
  --tr-focus:#1B4A94; --tr-fill:#D6E3F7;
  --tr-yes:#1E7A4D; --tr-maybe:#8A6100; --tr-no:#B73A25;
  --tr-yes-bg:#DDF1E5; --tr-maybe-bg:#FBEFCF; --tr-no-bg:#F8DDD6;
  container-type:inline-size;
  box-sizing:border-box;
  background:var(--tr-bg);
  color:var(--tr-ink);
  border-radius:16px;
  font-size:16px;
  line-height:1.5;
  margin:1.5em 0;
  overflow:hidden;
  text-align:left;
}
@media (prefers-color-scheme:dark){
  .tr-app.tr-auto-dark{
    --tr-bg:#0A1424; --tr-surface:#111F35; --tr-surface2:#182A45; --tr-ink:#E6EBF2; --tr-muted:#93A1B5; --tr-line:#27385A;
    --tr-brand:#4F8FE0; --tr-brand-ink:#06101F; --tr-navy:#0C1A31; --tr-silver:#B5BDC9; --tr-bib:#B5BDC9; --tr-bib-ink:#0C1A31;
    --tr-focus:#9CC4F5; --tr-fill:#1D3A66;
    --tr-yes:#4CC789; --tr-maybe:#E8B34A; --tr-no:#E8745E;
    --tr-yes-bg:#183A29; --tr-maybe-bg:#3A2F12; --tr-no-bg:#40201A;
  }
}
.tr-app *,.tr-app *::before,.tr-app *::after{box-sizing:border-box}
.tr-app h1,.tr-app h2,.tr-app h3,.tr-app h4{font-family:inherit;color:inherit;margin:0;padding:0;line-height:1.2;letter-spacing:-.01em;text-transform:none}
.tr-app p{margin:0}
.tr-app :focus-visible{outline:3px solid var(--tr-focus);outline-offset:2px}
.tr-app button{font:inherit;cursor:pointer;color:inherit;text-transform:none;letter-spacing:normal;box-shadow:none;text-shadow:none}
.tr-app input,.tr-app select,.tr-app textarea{
  font:inherit;color:var(--tr-ink);background:var(--tr-surface);border:1.5px solid var(--tr-line);border-radius:10px;
  padding:9px 12px;width:100%;margin:0;box-shadow:none;height:auto;line-height:1.4
}
.tr-app textarea{resize:vertical;min-height:80px}
.tr-app a.tr-btn{text-decoration:none;display:inline-block}

.tr-wrap{display:grid;grid-template-columns:272px 1fr;min-height:520px}

/* Seitenleiste */
.tr-rail,.tr-main{min-width:0}
.tr-rail{padding:18px 14px;border-right:1px solid var(--tr-line);display:flex;flex-direction:column;gap:16px}
/* Kopfbereich mit Titel */
.tr-header{display:flex;align-items:center;gap:14px;padding:16px 24px;background:linear-gradient(180deg,#16396C 0%,var(--tr-navy) 100%);border-bottom:4px solid var(--tr-silver)}
.tr-header i{width:38px;height:38px;border-radius:50%;flex:none;background:var(--tr-silver);display:grid;place-items:center;box-shadow:0 0 0 3px rgba(196,202,211,.35)}
.tr-header i::before{content:"";width:16px;height:16px;background:var(--tr-navy);clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%)}
.tr-title{color:#E9EDF2;font-weight:800;font-size:clamp(12px,3.4cqi,28px);letter-spacing:.05em;line-height:1.15;overflow-wrap:anywhere;min-width:0}
.tr-groups{display:flex;flex-direction:column;gap:6px;flex:1}
.tr-app .tr-gbtn{display:flex;align-items:center;gap:10px;text-align:left;border:0;background:transparent;padding:9px;border-radius:12px;width:100%}
.tr-app .tr-gbtn:hover{background:var(--tr-surface2)}
.tr-app .tr-gbtn[aria-current="true"]{background:var(--tr-surface);box-shadow:0 1px 3px rgba(21,37,29,.12)}
.tr-gav{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;font-size:20px;flex:none;background:var(--tr-surface2)}
.tr-gbtn>span:last-child{min-width:0;overflow-wrap:break-word;hyphens:auto}
.tr-gbtn b{display:block;font-weight:600;line-height:1.25;font-size:15px}
.tr-gbtn small{color:var(--tr-muted)}
.tr-rail-foot{display:flex;flex-direction:column;gap:8px}

.tr-app .tr-btn{border:1px solid var(--tr-line);background:var(--tr-surface);color:var(--tr-ink);padding:9px 14px;border-radius:10px;font-weight:600;line-height:1.3}
.tr-app .tr-btn:hover{border-color:var(--tr-brand)}
.tr-app .tr-btn.tr-primary{background:var(--tr-brand);color:var(--tr-brand-ink);border-color:var(--tr-brand)}
.tr-app .tr-btn.tr-primary:hover{filter:brightness(1.1)}
.tr-app .tr-btn.tr-ghost{background:transparent;border-color:transparent;color:var(--tr-muted)}
.tr-app .tr-btn.tr-danger{color:var(--tr-no)}
.tr-app .tr-btn.tr-sm{padding:5px 10px;font-size:14px;border-radius:8px}
.tr-app .tr-btn:disabled{opacity:.6;cursor:default}

/* Hauptbereich */
.tr-main{padding:22px 24px 28px;min-width:0}
.tr-top{margin-bottom:16px}
.tr-top h1{font-size:clamp(24px,4cqi,34px);font-weight:800}
.tr-top p{margin-top:6px;color:var(--tr-muted)}
.tr-tabs{display:flex;gap:4px;border-bottom:1px solid var(--tr-line);margin-bottom:20px;overflow-x:auto}
.tr-app .tr-tab{border:0;background:transparent;padding:10px 14px;font-weight:600;color:var(--tr-muted);border-bottom:3px solid transparent;margin-bottom:-1px;white-space:nowrap;border-radius:0}
.tr-app .tr-tab[aria-selected="true"]{color:var(--tr-ink);border-bottom-color:var(--tr-brand)}
.tr-tab span{margin-left:6px;font-size:13px;background:var(--tr-surface2);border-radius:99px;padding:1px 8px;color:var(--tr-muted)}
.tr-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.tr-bar h2{font-size:20px;font-weight:700}
.tr-stack{display:flex;flex-direction:column;gap:12px}
.tr-muted{color:var(--tr-muted)}
.tr-sect{font-weight:700;font-size:15px;color:var(--tr-muted);margin:24px 0 10px}

/* Termine */
.tr-ev{background:var(--tr-surface);border:1px solid var(--tr-line);border-radius:14px;overflow:hidden}
.tr-evhead{display:grid;grid-template-columns:62px 1fr;gap:14px;padding:16px;align-items:start}
.tr-date{background:var(--tr-surface2);border-radius:12px;text-align:center;padding:8px 0;line-height:1.1}
.tr-date b{display:block;font-weight:800;font-size:25px}
.tr-date small{color:var(--tr-muted);font-weight:600}
.tr-ev.tr-today .tr-date{background:var(--tr-bib);color:var(--tr-bib-ink)}
.tr-ev.tr-today .tr-date small{color:var(--tr-bib-ink)}
.tr-ev h3{font-size:19px;font-weight:700}
.tr-meta{color:var(--tr-muted);font-size:15px;margin-top:4px;display:flex;gap:2px 14px;flex-wrap:wrap}
.tr-desc{margin-top:8px;font-size:15px;white-space:pre-line}
.tr-rsvp{display:flex;gap:8px;padding:0 16px 14px;flex-wrap:wrap;align-items:center}
.tr-app .tr-rs{border:1.5px solid var(--tr-line);background:var(--tr-surface);padding:8px 14px;border-radius:99px;font-weight:600;font-size:15px}
.tr-app .tr-rs[aria-pressed="true"].tr-yes{background:var(--tr-yes-bg);border-color:var(--tr-yes);color:var(--tr-yes)}
.tr-app .tr-rs[aria-pressed="true"].tr-maybe{background:var(--tr-maybe-bg);border-color:var(--tr-maybe);color:var(--tr-maybe)}
.tr-app .tr-rs[aria-pressed="true"].tr-no{background:var(--tr-no-bg);border-color:var(--tr-no);color:var(--tr-no)}
.tr-count{margin-left:auto;font-size:14px;color:var(--tr-muted)}
.tr-meter{display:flex;height:6px;background:var(--tr-surface2)}
.tr-meter i{display:block;height:100%}
.tr-app .tr-toggle{border:0;background:transparent;color:var(--tr-brand);font-weight:600;padding:12px 16px 14px;text-align:left;width:100%}
.tr-more{padding:16px;border-top:1px solid var(--tr-line);display:grid;gap:16px}
.tr-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px}
.tr-cols h4{margin:0 0 6px;font-size:14px;font-weight:700}
.tr-cols ul{margin:0;padding:0;list-style:none;font-size:15px}
.tr-cols li{padding:2px 0;margin:0}
.tr-cols .tr-none{color:var(--tr-muted)}
.tr-comment{background:var(--tr-surface2);border-radius:10px;padding:8px 12px;font-size:15px;overflow-wrap:anywhere}
.tr-comment small{color:var(--tr-muted)}
.tr-inline{display:flex;gap:8px}
.tr-inline input{flex:1;min-width:0}
.tr-past{opacity:.72}
.tr-past h3{font-weight:600}

/* Chat */
.tr-chat{display:flex;flex-direction:column;background:var(--tr-surface);border:1px solid var(--tr-line);border-radius:14px;overflow:hidden;height:min(62vh,560px)}
.tr-msgs{flex:1;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:10px}
.tr-m{max-width:78%;align-self:flex-start}
.tr-who{font-size:13px;color:var(--tr-muted);margin:0 0 2px 4px}
.tr-bub{background:var(--tr-surface2);padding:9px 13px;border-radius:14px 14px 14px 4px;overflow-wrap:anywhere;white-space:pre-wrap}
.tr-m.tr-me{align-self:flex-end}
.tr-m.tr-me .tr-who{text-align:right;margin-right:4px}
.tr-m.tr-me .tr-bub{background:var(--tr-brand);color:var(--tr-brand-ink);border-radius:14px 14px 4px 14px}
.tr-chatf{display:flex;gap:8px;padding:12px;border-top:1px solid var(--tr-line);margin:0}

/* Mitglieder */
.tr-invite{background:var(--tr-surface);border:1px solid var(--tr-line);border-radius:12px;padding:12px 14px;margin-bottom:14px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.tr-invite code{font-size:18px;font-weight:700;letter-spacing:.08em;background:var(--tr-bib);color:var(--tr-bib-ink);padding:2px 10px;border-radius:8px}
.tr-invite span{flex:1;min-width:200px;font-size:14px;color:var(--tr-muted)}
.tr-mem{display:flex;align-items:center;gap:12px;background:var(--tr-surface);border:1px solid var(--tr-line);border-radius:12px;padding:10px 14px;flex-wrap:wrap}
.tr-av{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-weight:700;color:#fff;flex:none}
.tr-mem .tr-n{flex:1;min-width:150px}
.tr-mem .tr-n>b{font-weight:600}
.tr-badge{font-size:13px;font-weight:600;padding:2px 9px;border-radius:99px;background:var(--tr-bib);color:var(--tr-bib-ink)}
.tr-acts{display:flex;gap:4px;flex-wrap:wrap}
.tr-foot{margin-top:18px;display:flex;gap:8px;flex-wrap:wrap}

/* Umfragen */
.tr-poll{background:var(--tr-surface);border:1px solid var(--tr-line);border-radius:14px;padding:16px}
.tr-poll h3{font-size:18px;font-weight:700;margin-bottom:12px}
.tr-app .tr-opt{position:relative;display:block;width:100%;text-align:left;border:1.5px solid var(--tr-line);background:var(--tr-surface);border-radius:10px;padding:10px 12px;margin:0 0 8px;overflow:hidden}
.tr-opt .tr-fill{position:absolute;top:0;bottom:0;left:0;background:var(--tr-fill);z-index:0;transition:width .3s}
.tr-opt .tr-t{position:relative;z-index:1;display:flex;justify-content:space-between;gap:10px}
.tr-app .tr-opt[aria-pressed="true"]{border-color:var(--tr-brand)}
.tr-poll small{color:var(--tr-muted)}

.tr-empty{text-align:center;color:var(--tr-muted);padding:36px 16px;background:var(--tr-surface);border:1.5px dashed var(--tr-line);border-radius:14px}
.tr-empty b{display:block;color:var(--tr-ink);font-size:18px;margin-bottom:6px}
.tr-empty p{margin-bottom:14px}
.tr-login{padding:20px}

/* Dialog */
.tr-app .tr-dlg{border:0;border-radius:18px;padding:22px;width:min(480px,92vw);background:var(--tr-surface);color:var(--tr-ink);box-shadow:0 20px 60px rgba(0,0,0,.35)}
.tr-dlg::backdrop{background:rgba(10,20,15,.55)}
.tr-dlg h2{font-size:22px;font-weight:800;margin-bottom:16px}
.tr-field{display:block;font-weight:600;font-size:14px;margin:0 0 12px}
.tr-field>input,.tr-field>select,.tr-field>textarea{margin-top:5px;font-weight:400}
.tr-field small{display:block;font-weight:400;color:var(--tr-muted);margin-top:4px}
.tr-row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tr-dact{display:flex;justify-content:flex-end;gap:8px;margin-top:6px}
.tr-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#15251D;color:#fff;padding:10px 16px;border-radius:99px;font-weight:600;font-size:15px;z-index:99999;max-width:90vw;text-align:center}


/* Mitgliederverwaltung */
.tr-app input[type=checkbox]{width:18px;height:18px;padding:0;margin:0;flex:none;accent-color:var(--tr-brand);border-radius:4px}
.tr-bar .tr-acts{display:flex;gap:6px;flex-wrap:wrap}
.tr-tools{display:grid;grid-template-columns:1fr minmax(160px,240px);gap:10px;margin-bottom:12px}
.tr-sub{font-size:14px;color:var(--tr-muted)}
.tr-chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.tr-chip{font-size:13px;font-weight:600;padding:1px 9px;border-radius:99px;background:var(--tr-fill);color:var(--tr-ink);border:1px solid var(--tr-line)}
.tr-contact{font-size:14px;margin-top:6px;overflow-wrap:anywhere}
.tr-contact a{color:var(--tr-brand);text-decoration:underline}
.tr-note{font-size:14px;margin-top:6px;padding:6px 10px;border-radius:8px;background:var(--tr-maybe-bg);color:var(--tr-ink);overflow-wrap:anywhere}
.tr-req{background:var(--tr-surface);border:2px solid var(--tr-bib);border-radius:12px;padding:12px 14px;margin-bottom:14px}
.tr-reqrow{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 0;border-top:1px solid var(--tr-line);margin-top:8px}
.tr-bulk{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--tr-fill);border-radius:12px;padding:10px 12px;margin-bottom:10px}
.tr-bulk select{width:auto;min-width:150px;padding:5px 10px}
.tr-check{display:flex;align-items:center;gap:10px;font-weight:500;margin:0 0 10px;cursor:pointer}
.tr-selall{color:var(--tr-muted);font-size:14px;margin-bottom:8px}
.tr-fs{border:1.5px solid var(--tr-line);border-radius:12px;margin:0 0 12px;padding:10px 14px}
.tr-fs legend{font-weight:700;font-size:14px;padding:0 6px}
.tr-fs small{display:block;color:var(--tr-muted);margin-bottom:8px}
.tr-fs .tr-check{margin-bottom:6px}

@container (max-width:760px){
  .tr-wrap{grid-template-columns:minmax(0,1fr);min-height:0}
  .tr-title{letter-spacing:.02em}
  .tr-header{padding:12px 14px;gap:10px}
  .tr-header i{width:30px;height:30px}
  .tr-rail{border-right:0;border-bottom:1px solid var(--tr-line);padding:14px 12px;gap:10px}
  .tr-groups{flex-direction:row;overflow-x:auto;flex:none}
  .tr-gbtn{width:auto!important;flex:none}
  .tr-gbtn small{display:none}
  .tr-rail-foot{flex-direction:row;flex-wrap:wrap}
  .tr-main{padding:16px 14px 22px}
  .tr-row2{grid-template-columns:1fr}
  .tr-tools{grid-template-columns:1fr}
  .tr-m{max-width:90%}
}
@media (prefers-reduced-motion:reduce){.tr-app *{transition:none!important}}
