/* ==========================================================================
   Cloud-Oberfläche (Login, Übersicht, Dialoge, öffentliche Ansichten).
   Nutzt die Design-Tokens der Turnier-App (--accent, --ink, --line, …).
   ========================================================================== */

/* Beim Start die App verbergen, bis klar ist, was angezeigt wird */
body.cloudBooting #app, body.cShellOpen #app { display: none; }
body.cShellOpen { overflow: hidden; }

#cloudShell {
  position: fixed; inset: 0; z-index: 90; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: radial-gradient(900px 320px at 50% -160px, rgba(13,107,92,.12), transparent 70%), var(--bg);
  color: var(--text); font-family: var(--font-ui);
}
.cMuted { color: var(--muted); }
.cSmall { font-size: 12px; line-height: 1.5; }
.cText { font-size: 14px; line-height: 1.6; margin: 0 0 10px; }
.cGrow { flex: 1; min-width: 0; }
.cWide { width: 100%; justify-content: center; }
.cIndent { margin: -2px 0 8px 26px; }

.cCenter { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.cSpinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: cSpin .8s linear infinite; }
@keyframes cSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cSpinner { animation-duration: 2.4s; } }

/* ---------- Marke ---------- */
.cBrand { display: flex; align-items: center; gap: 11px; }
.cBrandMark { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cBrandMark svg { width: 24px; height: 24px; }
/* eigenes Logo (Eigene Marke): immer in die 36×36-Kachel einpassen */
.cBrandMark { overflow: hidden; }
.cBrandMark:has(img) { background: transparent; }
.cBrandMark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cBrandName { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.cBrandSub { font-size: 11.5px; color: var(--muted); }

/* ---------- Anmeldung / Hinweise ---------- */
.cAuth { max-width: 420px; margin: 0 auto; padding: 56px 16px 40px; display: flex; flex-direction: column; gap: 22px; }
.cAuthCard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px 26px; box-shadow: var(--shadow-lg); }
.cAuthCard h1 { font-family: var(--font-display); font-size: 24px; letter-spacing: -.025em; margin: 0 0 6px; }
.cAuthCard > p { margin: 0 0 18px; font-size: 13.5px; line-height: 1.55; }
.cAuthCard label { margin-top: 12px; }
.suTrap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.suAccept { margin-top: 14px; font-size: 13px; line-height: 1.45; font-weight: 400; }
.suAccept span { font-weight: 400; }
.cAuthCard .btn { margin-top: 18px; }
.cAuthLinks { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.cFormMsg { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: var(--danger); font-size: 13px; }
.cFormMsg.ok { background: var(--accent-soft); color: var(--accent-strong); }
.cAuth code { background: var(--surface-soft, #f1efe7); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }

input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=tel], input[type=url], input[type=search] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px;
  background: #fff; color: var(--text); font-family: inherit; min-height: 42px; box-sizing: border-box;
}
input[type=email]:focus, input[type=password]:focus, input[type=date]:focus, input[type=datetime-local]:focus, input[type=tel]:focus, input[type=url]:focus, input[type=search]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
/* Datums-/Zeit-Felder: Kalender-Symbol dezent, Platzhalter-Text wie die übrigen Felder */
input[type=date]::-webkit-calendar-picker-indicator, input[type=datetime-local]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
input[type=date]::-webkit-datetime-edit, input[type=datetime-local]::-webkit-datetime-edit { color: var(--text); }
input[type=date]:invalid::-webkit-datetime-edit, input[type=datetime-local]:invalid::-webkit-datetime-edit { color: var(--muted); }

/* ---------- Übersicht ---------- */
.cDash { max-width: 1120px; margin: 0 auto; padding: 0 20px 80px; }
.cDashHead { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 0 14px; flex-wrap: wrap; }
.cDashHeadR { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cUser { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.cTabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.cTabs button { display: inline-flex; align-items: center; gap: 7px; border: none; background: none; padding: 11px 14px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.cTabs button:hover { color: var(--text); }
.cTabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.cToolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cToolbar h2 { font-family: var(--font-display); font-size: 26px; letter-spacing: -.03em; margin: 0 0 4px; }
.cToolbar p { margin: 0; font-size: 13.5px; }
.cToolbar .btn { display: inline-flex; align-items: center; gap: 7px; }
.cGroupLabel { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 26px 0 10px; font-weight: 700; }
.cGroupLabel span { background: var(--surface, #ebe9e1); border-radius: 99px; padding: 1px 8px; margin-left: 4px; color: var(--text); }
.cBack { margin-bottom: 14px; display: inline-block; }

.cGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.cCard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s; }
.cCard:hover { border-color: #d3d0c4; box-shadow: var(--shadow-lg); }
.cCard.current { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.cCard.clickable { cursor: pointer; }
.cCardTop { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; }
.cCard.hasDate { position: relative; }
.cCard.hasDate .cCardTop, .cCard.hasDate .cCardTitle { padding-right: 64px; }
.cCardDate { position: absolute; top: 14px; right: 16px; width: 52px; padding: 6px 0 5px; border-radius: 12px; background: var(--surface, #ededf2); text-align: center; line-height: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cCardDate b { font-family: var(--font-display); font-size: 21px; letter-spacing: -.02em; color: var(--ink); }
.cCardDate span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-strong, var(--accent)); }
.cCardDate small { font-size: 10px; color: var(--muted); }
.cCardDate.past b, .cCardDate.past span { color: var(--muted); }
.cCardTitle { font-family: var(--font-display); font-size: 18px; letter-spacing: -.02em; margin: 2px 0 0; line-height: 1.25; }
.cCardMeta { font-size: 12.5px; color: var(--muted); }
.cCardFoot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.cCardTools { display: flex; gap: 2px; }
.cCardStamp { font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.cSeriesTag { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; border: none; background: var(--accent-soft); color: var(--accent-strong); font: inherit; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; cursor: pointer; }
.cWinner { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: #8a6100; }

.cChip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface, #ebe9e1); color: var(--muted); letter-spacing: .01em; white-space: nowrap; }
.cChip.st-LIVE { background: #fde8e7; color: #b42318; }
.cChip.st-FINISHED { background: var(--accent-soft); color: var(--accent-strong); }
.cChip.live { background: var(--lime); color: var(--ink); }
.cChip.cur { background: var(--ink); color: #fff; }

.cIconBtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: none; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.cIconBtn:hover { background: var(--surface-hover, #efede6); color: var(--ink); }
.cIconBtn.danger:hover { background: #fdecea; color: var(--danger); }

.cEmpty { padding: 18px; text-align: center; color: var(--muted); font-size: 13.5px; }
.cEmptyBig { text-align: center; padding: 56px 20px; border: 1.5px dashed var(--line); border-radius: 18px; color: var(--muted); }
.cEmptyBig h3 { color: var(--text); font-family: var(--font-display); margin: 10px 0 4px; }

.cPanel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); min-width: 0; }
.cPanel h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 12px; }
.cPanel h4:not(:first-child) { margin-top: 20px; }
.cSplit { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 820px) { .cSplit { grid-template-columns: 1fr; } }

.cEvList { list-style: none; margin: 0; padding: 0; }
.cEvList li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cEvList li:last-child { border-bottom: none; }
.evNo { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 24px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; }
.cPts { display: flex; flex-wrap: wrap; gap: 6px; }
.cPts span { background: var(--surface-soft, #f4f2eb); border-radius: 8px; padding: 4px 8px; font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.cPts small { color: var(--muted); font-weight: 600; margin-right: 4px; }

/* ---------- Serien-Tabelle ---------- */
.cTableScroll { overflow-x: auto; margin: 0 -4px; }
.cSeriesTable { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.cSeriesTable th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; text-align: left; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cSeriesTable td { padding: 9px 8px; border-bottom: 1px solid #efede6; }
.cSeriesTable tbody tr:hover td { background: var(--surface-soft, #faf9f5); }
.cSeriesTable .pos { width: 40px; text-align: center; font-weight: 800; }
.cSeriesTable td.pos.m1 { color: #a07400; }
.cSeriesTable td.pos.m2 { color: #6b7280; }
.cSeriesTable td.pos.m3 { color: #9a5b2b; }
.cSeriesTable .nm { font-weight: 600; min-width: 160px; }
.cSeriesTable .ev { text-align: center; width: 64px; }
.cSeriesTable th.ev { text-align: center; }
.cSeriesTable th.ev .evNo { min-width: 26px; height: 20px; font-size: 10px; }
.cSeriesTable th.ev .evName { display: block; max-width: 90px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; margin: 3px auto 0; text-transform: none; letter-spacing: 0; font-weight: 600; }
.cSeriesTable th.ev.open .evNo { background: #c9c6ba; }
.cSeriesTable td.ev b { display: block; }
.cSeriesTable td.ev small { color: var(--muted); font-size: 10.5px; }
.cSeriesTable td.ev.dropped b { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.cSeriesTable td.ev.none, .cSeriesTable td.ev.open { color: #c3c0b4; }
.cSeriesTable .tot { text-align: right; font-weight: 800; font-size: 15px; width: 70px; }
.cLegend { font-size: 11.5px; color: var(--muted); margin-top: 10px; }

/* ---------- Formulare in Dialogen ---------- */
.cForm label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin: 0 0 5px; }
.cRow { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.cRow > div { flex: 1 1 200px; min-width: 0; }
.cRow input[type=number] { width: 100%; text-align: left; }
.cRadioList { display: flex; flex-direction: column; gap: 6px; background: var(--surface-soft, #faf9f5); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.cForm .cRadio, .cForm .cCheck { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--text); font-weight: 500; margin: 0; cursor: pointer; }
.cRadio select { width: auto; flex: 1 1 200px; padding: 6px 10px; font-size: 13px; }
.cFilePick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.cFilePick .btn { display: inline-flex; align-items: center; gap: 6px; }
.cFilePick #fFileName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.cPresetRow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 6px 0 14px; }
.cDangerZone { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.linkBtn.cDangerLink { color: var(--danger); }

/* ---------- Dialoge ---------- */
.cModalBackdrop { position: fixed; inset: 0; z-index: 200; background: rgba(13,21,18,.42); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow-y: auto; animation: cFade .15s ease; }
.cModal { width: 100%; max-width: 460px; background: var(--card); border-radius: 18px; box-shadow: 0 24px 60px rgba(13,21,18,.3); animation: cPop .18s ease; }
.cModal.wide { max-width: 620px; }
/* Event-Schritte 2 und 7: Dialog-Inhalt direkt im Tab (cloud-event-tabs.js) */
.cModal.cModalInline { max-width: none; box-shadow: none; animation: none; border: 1px solid var(--line, rgba(0,0,0,.08)); }
.evPanel { margin: 0 0 18px; }
.cModalHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px 22px; }
.cModalHead h3 { font-family: var(--font-display); font-size: 19px; letter-spacing: -.02em; margin: 0; }
.cModalBody { padding: 8px 22px 6px; }
.cModalBody > label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin: 0 0 5px; }
.cModalErr { margin: 8px 22px 0; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: var(--danger); font-size: 13px; }
.cModalErr[hidden] { display: none; }
.cModalFoot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 16px 22px 20px; }
@keyframes cFade { from { opacity: 0; } }
@keyframes cPop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .cModalBackdrop, .cModal { animation: none; } }

/* Schalter */
.cSwitch { display: flex !important; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text) !important; margin: 4px 0 8px !important; position: relative; }
.cSwitch input { position: absolute; opacity: 0; width: 0; height: 0; }
.cSwitch span { width: 40px; height: 23px; border-radius: 99px; background: #d6d3c8; position: relative; flex: none; transition: background .15s; }
.cSwitch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.cSwitch input:checked + span { background: var(--accent); }
.cSwitch input:checked + span::after { transform: translateX(17px); }
.cSwitch input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }

.cLinkBox { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.cLinkBox input { flex: 1 1 220px; font-size: 12.5px; padding: 8px 10px; background: var(--surface-soft, #faf9f5); }
.cLinkBox .btn { display: inline-flex; align-items: center; text-decoration: none; }
.cQrRow { display: flex; align-items: center; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.cQr { flex: none; width: 168px; min-height: 60px; }
.cQr img, .cQr canvas { display: block; border-radius: 8px; }

/* ---------- Kopfzeile der Turnier-App ---------- */
.cEventBtn { display: inline-flex; align-items: center; gap: 7px; max-width: 260px; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 10px; padding: 7px 11px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.cEventBtn:hover { border-color: var(--ink); }
.cEventBtn .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloudStatus { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; padding: 0 4px; }
.cloudStatus i { width: 7px; height: 7px; border-radius: 50%; background: #c3c0b4; flex: none; }
.cloudStatus.s-saved i { background: #16a34a; }
.cloudStatus.s-saving i, .cloudStatus.s-dirty i { background: #d97706; }
.cloudStatus.s-saving i { animation: cPulse 1s ease-in-out infinite; }
.cloudStatus.s-offline, .cloudStatus.s-error, .cloudStatus.s-conflict { color: var(--danger); }
.cloudStatus.s-offline i, .cloudStatus.s-error i, .cloudStatus.s-conflict i { background: var(--danger); }
@keyframes cPulse { 50% { opacity: .35; } }
@media (max-width: 760px) {
  .cEventBtn { max-width: 140px; }
  .cloudStatus { font-size: 0; gap: 0; }
  .cUser .lbl { display: none; }
}
.cTabs { scrollbar-width: none; }
.cTabs::-webkit-scrollbar { display: none; }
@media (max-width: 560px) {
  .cEventBtn { padding: 7px 9px; }
  .cEventBtn .lbl { display: none; }
  .cDash { padding: 0 14px 64px; }
  .cDashHead { flex-wrap: nowrap; }
  .cDashHead .cBrandSub { display: none; }
  .cDashHeadR { flex-wrap: nowrap; gap: 4px; }
  .cDashHeadR .btn .lbl { display: none; }
  .cTabs button { padding: 11px 10px; }
  .cToolbar h2 { font-size: 22px; }
  .cToolbar .btnRow { width: 100%; }
  .cToolbar .btnRow .btn { flex: 1 1 auto; justify-content: center; }
  .cModalBackdrop { padding: 12px 10px; }
  .cModalHead { padding: 16px 16px 4px 18px; }
  .cModalBody { padding: 8px 18px 6px; }
  .cModalFoot { padding: 14px 18px 18px; }
  .cModalFoot .btn { flex: 1 1 auto; }
  .cAuth { padding-top: 28px; }
  .cAuthCard { padding: 22px 18px; }
}

/* ---------- Live-Ansicht ---------- */
body.cLiveMode #cloudShell { background: #000; overflow: hidden; }
.cLive { position: fixed; inset: 0; display: flex; flex-direction: column; }
.cLiveTabs { display: flex; gap: 4px; padding: 6px; background: var(--ink); overflow-x: auto; flex: none; }
.cLiveTabs[hidden] { display: none; }
.cLiveTabs button { border: none; background: rgba(255,255,255,.08); color: #d9ddd9; font: inherit; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.cLiveTabs button.on { background: var(--lime); color: var(--ink); }
.cLiveFrame { flex: 1; width: 100%; border: 0; background: #fff; }
.cLiveBadge { position: fixed; right: 12px; bottom: 12px; z-index: 5; display: inline-flex; align-items: center; gap: 6px; background: rgba(13,21,18,.78); color: #fff; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 99px; pointer-events: none; letter-spacing: .03em; }
.cLiveBadge i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: cPulse 2s ease-in-out infinite; }
.cLiveBadge.off i { background: #ef4444; animation: none; }

/* ---------- Öffentliche Serien-Seite ---------- */
.cPublic { max-width: 980px; margin: 0 auto; padding: 36px 16px 60px; }
.cPublicHead { text-align: center; margin-bottom: 26px; }
.cPublicKicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--accent); }
.cPublicHead h1 { font-family: var(--font-display); font-size: clamp(28px, 5vw, 44px); letter-spacing: -.035em; margin: 8px 0 6px; line-height: 1.1; }
.cPublicHead p { margin: 0; font-size: 13px; }
.cPodium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; margin-bottom: 18px; }
.cPod { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 12px; text-align: center; box-shadow: var(--shadow); }
.cPod.p1 { order: 2; padding: 24px 12px; border-color: #e8c55a; background: linear-gradient(180deg, #fff8e1, #fff); }
.cPod.p2 { order: 1; }
.cPod.p3 { order: 3; }
.cPodPos { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1; }
.cPod.p1 .cPodPos { color: #a07400; font-size: 40px; }
.cPodName { font-weight: 700; margin: 8px 0 2px; font-size: 14.5px; line-height: 1.3; }
.cPodPts { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cPublicFoot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 22px; }
@media (max-width: 560px) {
  .cPodium { grid-template-columns: 1fr; gap: 8px; }
  .cPod, .cPod.p1 { order: initial; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; }
  .cPodPos, .cPod.p1 .cPodPos { font-size: 24px; }
  .cPodName { margin: 0; }
  .cSeriesTable .nm { min-width: 120px; }
}

/* ---------- Serien-Verwaltung: Namen zusammenführen, Bonus-/Strafpunkte ---------- */
.cSeriesTable .adj { text-align: center; width: 48px; font-weight: 700; }
.cSeriesTable td.adj.posv { color: var(--accent-strong); }
.cSeriesTable td.adj.neg { color: var(--danger); }
.cSeriesTable td.adj.none { color: #c3c0b4; font-weight: 400; }
.cSugList { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.cSug { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: #fffaeb; border: 1px solid #f6e3a8; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.cInline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.cInline select { flex: 1 1 160px; width: auto; min-width: 0; padding: 8px 10px; font-size: 13px; }
.cInline input[type=number] { width: 80px; padding: 8px 10px; font-size: 13px; }
.cInline input[type=text] { flex: 2 1 180px; width: auto; min-width: 0; padding: 8px 10px; font-size: 13px; }
.cChipList, .cAdjList { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cChipList li, .cAdjList li { display: flex; align-items: center; gap: 8px; font-size: 13px; background: var(--surface-soft, #faf9f5); border: 1px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 10px; }
.cChipList li .cIconBtn, .cAdjList li .cIconBtn { margin-left: auto; width: 28px; height: 28px; }
.cAdjPts { font-weight: 800; min-width: 44px; color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.cAdjPts.neg { color: var(--danger); }

/* ---------- Rechtliche Links ---------- */
.cLegal { display: flex; justify-content: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 18px 0 8px; }
.cLegal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.cLegal a:hover { color: var(--ink); }
.cLegal a.cPowered { text-decoration: none; }
.cLegal a.cPowered b { font-weight: 700; }
.cPoweredSlot { margin: 10px 0 0; text-align: center; font-size: 11px; }
.cPoweredSlot a { color: var(--muted); text-decoration: none; }
.cLegal.cLegalFab { position: fixed; left: 10px; bottom: 10px; z-index: 5; padding: 4px 10px; background: rgba(13,21,18,.72); border-radius: 99px; font-size: 10.5px; }
.cLegal.cLegalFab a, .cLegal.cLegalFab { color: rgba(255,255,255,.85); }

/* ---------- "Mein Team" in der Live-Ansicht ---------- */
.cMySlot { flex: none; background: var(--ink); color: #fff; }
.cMyPick { display: flex; align-items: center; gap: 8px; width: 100%; border: none; background: transparent; color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; padding: 10px 14px; cursor: pointer; text-align: left; }
.cMyPick small { font-weight: 500; color: rgba(255,255,255,.6); font-size: 12px; margin-left: auto; }
.cMyPick:hover { background: rgba(255,255,255,.06); }
.cMyCard { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.cMyTop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.cMyName { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.cMyRank { background: var(--lime); color: var(--ink); font-weight: 800; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; }
.cMyLast { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.1); }
.cMyLast.won { background: rgba(34,197,94,.22); color: #bbf7d0; }
.cMyLast.lost { background: rgba(239,68,68,.2); color: #fecaca; }
.cMyChange { margin-left: auto; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; font: inherit; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; cursor: pointer; }
.cMyRow { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px; line-height: 1.35; flex-wrap: wrap; }
.cMyLbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.6); font-weight: 700; flex: none; }
.cMyLive { color: var(--lime); animation: cPulse 1.6s ease-in-out infinite; }
.cMyNext { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cMyNext span { color: rgba(255,255,255,.8); }
.cMySlot .cMuted { color: rgba(255,255,255,.6); }
.cMyList { list-style: none; padding: 0; margin: 10px 0; max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.cMyList button { width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.cMyList button:hover { border-color: var(--ink); }
.cMyList button.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }
.cModalBody input#cMySearch { width: 100%; }
@media (prefers-reduced-motion: reduce) { .cMyLive { animation: none; } }

/* ---------- Serien-Branding: Einstellungen & Vorschau ---------- */
.cBrandForm .cCheck { margin: 4px 0 !important; }
.cInline.cNoMargin { margin: 0; }
.cInline input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.cInline input[type=color]:disabled { opacity: .4; cursor: not-allowed; }
.cModal.cPreviewModal { max-width: 1040px; }
.cPreviewFrame { width: 100%; height: min(72vh, 820px); border: 1px solid var(--line); border-radius: 12px; background: #fff; display: block; margin-bottom: 8px; }

/* ---------- Court-QR-Codes (Verwaltung) ---------- */
.cCourtGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.cCourtCard { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--surface-soft, #faf9f5); }
.cCourtCard .cQr { width: 168px; }
.cCourtCard .btnRow { justify-content: center; }
.cCourtCard .btnRow .btn { text-decoration: none; display: inline-flex; align-items: center; }
.cCourtName { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.cShareCourt { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; font-size: 13.5px; }
.cShareCourt .btn { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Ergebniseingabe am Court (Handy) ---------- */
.cCt { --ctAccent: #0d6b5c; max-width: 520px; margin: 0 auto; padding: 0 14px 40px; }
.cCtTop { display: flex; align-items: center; gap: 12px; padding: 18px 0 14px; }
.cCtTop img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 4px; }
.cCtEvent { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.cCtTop h1 { font-family: var(--font-display); font-size: 34px; letter-spacing: -.03em; margin: 0; line-height: 1.05; color: var(--ctAccent); }
.cCt h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.cCtFlash { display: flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent-strong); border-radius: 12px; padding: 12px 14px; font-weight: 700; }
.cCtCard { background: var(--card); border: 2px solid var(--ctAccent); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-lg); }
.cCtHead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.cCtHead b { color: var(--text); }
.cCtT { background: var(--surface, #ebe9e1); border-radius: 99px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.cCtVs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin: 12px 0 14px; font-weight: 800; font-size: 16px; line-height: 1.25; }
.cCtVs span:last-child { text-align: right; }
.cCtVs i { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.cCtPts { display: flex; flex-direction: column; gap: 10px; }
.cCtRow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cCtTeam { font-weight: 600; font-size: 14px; flex: 1; min-width: 0; }
.cStep { display: flex; align-items: center; gap: 6px; flex: none; }
.cStep button { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 26px; font-weight: 700; color: var(--ink); cursor: pointer; touch-action: manipulation; }
.cStep button:active { background: var(--surface-hover, #efede6); }
.cStep output { min-width: 48px; text-align: center; font-family: var(--font-display); font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cCtSets { display: flex; flex-direction: column; gap: 8px; }
.cCtSet { display: grid; grid-template-columns: 64px 1fr auto 1fr; gap: 8px; align-items: center; }
.cCtSet span { font-size: 13px; color: var(--muted); font-weight: 600; }
.cCtSet input { width: 100%; height: 50px; text-align: center; font-size: 22px; font-weight: 800; border-radius: 12px; }
.cCtSend { margin-top: 16px; height: 54px; font-size: 16px; background: var(--ctAccent); border-color: var(--ctAccent); }
.cCtEmpty { background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 18px; text-align: center; color: var(--muted); }
.cCtLine { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; font-size: 13.5px; line-height: 1.4; }
.cCtLine i { font-style: normal; color: var(--muted); font-size: 12px; }
.cCtLine.done { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.cCtLine.done b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cCtNote { text-align: center; margin-top: 18px; }

/* ---------- Verlauf & Sicherungen ---------- */
.cHistList { list-style: none; margin: 12px 0 0; padding: 0; max-height: 52vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.cHistList li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.cHistList li:first-child { border-top: none; }

/* ---------- Court-Eingaben prüfen (Admin) ---------- */
.cCourtBadge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #99e6c5; background: #ecfdf5; color: var(--accent-strong); border-radius: 10px; padding: 6px 10px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cCourtBadge.alert { border-color: #fecaca; background: #fdecea; color: var(--danger); }
.cCourtBadge span:first-of-type { background: currentColor; color: #fff; border-radius: 99px; padding: 0 6px; font-size: 11px; line-height: 17px; }
.cCourtBadge.alert span:first-of-type { background: var(--danger); }
.cCourtBadge:not(.alert) span:first-of-type { background: var(--accent); }
.cCrList { list-style: none; margin: 8px 0 14px; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.cCrList li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.cCrList li:first-child { border-top: none; }
.cCrList li.corr { background: #fff8f7; }
.cCrScore { display: inline-block; background: var(--surface, #ebe9e1); border-radius: 6px; padding: 1px 8px; margin: 0 6px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cCrNote { margin-top: 4px; color: var(--danger); font-weight: 600; }
@media (max-width: 760px) { .cCourtBadge .lbl { display: none; } }

/* Court-Seite: Korrektur anfragen */
.cCtLine.done { flex-wrap: wrap; }
.cCtFix { font-size: 12px; flex-basis: 100%; text-align: right; }
.cCtReq { flex-basis: 100%; text-align: right; font-style: normal; font-size: 12px; color: var(--danger); font-weight: 700; }

/* ---------- Helfer-Zugänge ---------- */
.cNewCred { margin: 12px 0; padding: 14px; border: 1.5px solid var(--accent); border-radius: 12px; background: var(--accent-soft); font-size: 13.5px; }
.cCred { display: flex; gap: 10px; align-items: baseline; margin: 6px 0; }
.cCred span { width: 70px; flex: none; color: var(--muted); font-size: 12px; }
.cCred code { font-size: 14px; font-weight: 700; background: #fff; border-radius: 6px; padding: 2px 8px; word-break: break-all; }
.cNewCred .btn { margin-top: 6px; }
.cHl { max-width: 1180px; }
.cHlGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.cHlCourt { background: var(--surface-soft, #faf9f5); border: 1px solid var(--line); border-radius: 18px; padding: 4px 14px 14px; }
.cHlCourt h2 { font-family: var(--font-display); font-size: 20px; letter-spacing: -.02em; text-transform: none; color: var(--ctAccent); margin: 12px 0 10px; }
.cHlCourt h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 6px; }
.cHlCancel { display: block; margin: 10px auto 0; }
.cHl .cCtTop { align-items: flex-start; }
.cHl .cCtTop h1 { font-size: 28px; }
@media (max-width: 560px) { .cHlGrid { grid-template-columns: 1fr; } }

/* Online-Anmeldung */
.cRegHead { display: flex; align-items: center; gap: 14px; padding: 22px 0 14px; }
.cRegHead img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.cRegHead h1 { font-family: var(--font-display); font-size: 28px; letter-spacing: -.03em; margin: 2px 0; line-height: 1.1; color: var(--ctAccent); }
.cRegInfo { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; font-size: 14px; line-height: 1.45; }
.cRegMeta { font-size: 13.5px; color: var(--muted); margin: 4px 0 12px; }
.cRegForm { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-lg); }
.cRegForm label { font-size: 13px; font-weight: 700; margin-top: 8px; }
.cRegForm input[type=text], .cRegForm input[type=email], .cRegForm input[type=tel], .cRegForm select, .cRegForm textarea { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg, #fff); color: inherit; box-sizing: border-box; }
.cRegForm .cRegConsent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; line-height: 1.4; margin-top: 14px; }
.cRegForm .cRegConsent input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
.cRegForm p { margin: 10px 0 0; }
.cHp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cRegDone { text-align: center; color: var(--ctAccent); }
.cRegDone h2 { font-size: 20px; text-transform: none; letter-spacing: -.01em; color: var(--text, inherit); margin: 8px 0; }
.cRegDone p { color: var(--muted); margin: 0; }
.cRegTools { align-items: center; margin: 14px 0 4px; }
.cRegList li { align-items: flex-start; }
.cRegNote { font-style: italic; margin-top: 3px; }
@media (max-width: 560px) { .cRegList li { flex-direction: column; } }

/* Spielerprofile */
.cSearch { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: inherit; min-width: 0; }
input.cSearch { width: 220px; max-width: 100%; }
.cPlTable { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cPlTable th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cPlTable td { padding: 10px 12px; border-top: 1px solid var(--line); white-space: nowrap; }
.cPlTable td.nm { font-weight: 700; white-space: normal; }
.cPlTable tbody tr { cursor: pointer; }
.cPlTable tbody tr:hover, .cPlTable tbody tr:focus { background: var(--accent-soft, #ecfdf5); outline: none; }
.cPlStats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.cPlStat { background: var(--bg, #f6f5f1); border-radius: 12px; padding: 10px; text-align: center; }
.cPlStat b { display: block; font-size: 20px; letter-spacing: -.02em; }
.cPlStat span { font-size: 11.5px; color: var(--muted); }
.cPlList { list-style: none; padding: 0; margin: 6px 0 12px; border: 1px solid var(--line); border-radius: 12px; }
.cPlList li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 13.5px; }
.cPlList li:first-child { border-top: none; }
.cPlRank { white-space: nowrap; }
.cPlRank.m1 { color: #b8860b; } .cPlRank.m2 { color: #7c8591; } .cPlRank.m3 { color: #a0522d; }
@media (max-width: 560px) { .cPlStats { grid-template-columns: repeat(2, 1fr); } input.cSearch { width: 100%; } }

/* Check-in & Startgeld */
.cCiSum { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 4px 0 12px; }
input.cCiSearch { width: 100%; margin-bottom: 8px; }
.cCiList li { gap: 10px; }
.cCiList li.ciIn { background: #f3fbf7; }
.cCiBtn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 99px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 36px; }
.cCiBtn.on { background: var(--accent, #0d6b5c); border-color: var(--accent, #0d6b5c); color: #fff; }
.cCiBtn[data-k=paid].on { background: #b7791f; border-color: #b7791f; }
