/* Retrobörse Turniere – nutzt die Farben des Retrobörse-Themes (mit Ersatzwerten ohne Theme) */
.rbt {
	--rbt-accent: var(--accent, #9bbc0f);
	--rbt-surface: var(--surface, #111);
	--rbt-surface2: var(--surface2, #161616);
	--rbt-text: var(--text, #f0ede6);
	--rbt-muted: var(--text-secondary, #888);
	--rbt-line: rgba(255, 255, 255, 0.08);
}
.rbt-single { max-width: 880px; margin: 0 auto; }

.rbt-hero { display: flex; gap: 24px; align-items: center; margin-bottom: 24px; }
.rbt-hero__logo img { width: 120px; height: 120px; object-fit: contain; border-radius: 16px; background: var(--rbt-surface2); padding: 8px; }
.rbt-hero .rb-page-title { margin: 8px 0 4px; }
.rbt-hero__date { color: var(--rbt-muted); margin: 0; }

.rbt-badge {
	display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600;
	letter-spacing: 0.03em; background: var(--rbt-surface2); color: var(--rbt-text); border: 1px solid var(--rbt-line);
}
.rbt-badge--live { background: #e5484d; color: #fff; border-color: transparent; }
.rbt-badge--open, .rbt-badge--registered { background: var(--rbt-accent); color: #000; border-color: transparent; }
.rbt-badge--waitlist, .rbt-badge--pending_payment { background: #f5c542; color: #000; border-color: transparent; }
.rbt-badge--withdrawn, .rbt-badge--expired, .rbt-badge--removed, .rbt-badge--closed { color: var(--rbt-muted); }

.rbt-content { margin-bottom: 24px; }

.rbt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0 0 32px; }
.rbt-facts > div { background: var(--rbt-surface); border: 1px solid var(--rbt-line); border-radius: 12px; padding: 12px 16px; }
.rbt-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--rbt-muted); margin-bottom: 4px; }
.rbt-facts dd { margin: 0; }
.rbt-facts .rbt-facts__wide { grid-column: 1 / -1; }
.rbt-facts a { color: var(--rbt-accent); }

.rbt-box { background: var(--rbt-surface); border: 1px solid var(--rbt-line); border-radius: 16px; padding: 24px; margin-bottom: 24px; scroll-margin-top: 100px; }
.rbt-box h2 { margin-top: 0; }

.rbt-form { display: grid; gap: 16px; max-width: 520px; }
.rbt-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.rbt-field input[type="text"], .rbt-field input[type="number"], .rbt-field select, .rbt-field textarea {
	width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 10px; font: inherit;
	background: var(--rbt-surface2); color: var(--rbt-text); border: 1px solid rgba(255, 255, 255, 0.15);
}
.rbt-field input:focus, .rbt-field select:focus, .rbt-field textarea:focus { outline: 2px solid var(--rbt-accent); outline-offset: 1px; }
.rbt-field--check label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.rbt-field--check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--rbt-accent); }
.rbt-help { display: block; color: var(--rbt-muted); font-size: 13px; margin-top: 4px; }
.rbt-req { color: var(--rbt-accent); }
.rbt-hint { color: var(--rbt-muted); font-size: 14px; margin: 0; }
.rbt-form .rb-btn-primary { justify-self: start; border: 0; cursor: pointer; }

.rbt-notice { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; border: 1px solid var(--rbt-line); }
.rbt-notice--ok { border-color: var(--rbt-accent); }
.rbt-notice--info { border-color: #f5c542; }
.rbt-notice--error { border-color: #e5484d; color: #ffb4b4; }

.rbt-mine p { margin: 0 0 12px; }
.rbt-edit { margin: 16px 0; }
.rbt-edit summary { cursor: pointer; color: var(--rbt-accent); margin-bottom: 12px; }
.rbt-link { background: none; border: 0; padding: 0; color: var(--rbt-muted); text-decoration: underline; cursor: pointer; font: inherit; }
.rbt-link:hover { color: #e5484d; }

.rbt-players { list-style: none; counter-reset: rbt; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.rbt-players li { counter-increment: rbt; background: var(--rbt-surface2); border-radius: 10px; padding: 10px 14px; }
.rbt-players li::before { content: counter(rbt) '. '; color: var(--rbt-muted); }
.rbt-players__meta { display: block; color: var(--rbt-muted); font-size: 13px; }

/* Übersicht */
.rbt-cards { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.rbt-card a { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 16px; background: var(--rbt-surface); border: 1px solid var(--rbt-line); color: var(--rbt-text); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.rbt-card a:hover { border-color: var(--rbt-accent); transform: translateY(-2px); }
.rbt-card__logo img { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; background: var(--rbt-surface2); }
.rbt-card h2, .rbt-card h3 { font-size: 18px; margin: 6px 0 2px; }
.rbt-card p { margin: 0; color: var(--rbt-muted); font-size: 14px; }
.rbt-cards--past .rbt-card a { opacity: 0.7; }

/* Mein Konto */
.rbt-my { list-style: none; margin: 0; padding: 0; }
.rbt-my li { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--rbt-line, rgba(127, 127, 127, 0.2)); }

@media (max-width: 600px) {
	.rbt-hero { flex-direction: column; align-items: flex-start; }
	.rbt-hero__logo img { width: 88px; height: 88px; }
	.rbt-box { padding: 18px; }
}

/* Turniere auf der Börsen-Seite */
.rbt-boerse { margin: 32px 0; }
.rbt-boerse > h2 { margin-bottom: 12px; }

@media (prefers-reduced-motion: reduce) {
	.rbt-card a { transition: none; }
}

/* ── Live-Ansicht ─────────────────────────────────────────────────────────── */
.rbt-live { container-type: inline-size; margin: 0 0 40px; --rbt-gold: #f5c542; --rbt-strong: rgba(255, 255, 255, 0.22); }
.rbt-live__title { margin: 0 0 12px; }
.rbt-live__title a { color: inherit; text-decoration: none; }
.rbt .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopf */
.rbt-lv-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; margin: 0 0 24px; background: var(--rbt-surface); border: 1px solid var(--rbt-line); border-radius: 100px; }
.rbt-lv-steps { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; }
.rbt-lv-steps li { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; color: var(--rbt-muted); }
.rbt-lv-steps li + li::before { content: "\203A"; color: var(--rbt-strong); margin-right: 4px; }
.rbt-lv-steps li span { padding: 6px 14px; border-radius: 100px; }
.rbt-lv-steps li.is-done { color: var(--rbt-text); }
.rbt-lv-steps li.is-done span::after { content: " \2713"; color: var(--rbt-accent); }
.rbt-lv-steps li.is-now span { background: var(--rbt-accent); color: #000; }
.rbt-lv-state { display: flex; align-items: center; gap: 12px; margin: 0; }
.rbt-lv-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 100px; font-size: 13px; font-weight: 700; background: var(--rbt-surface2); border: 1px solid var(--rbt-line); }
.rbt-lv-pill--live { background: #e5484d; border-color: transparent; color: #fff; }
.rbt-lv-pill--live span { animation: rbt-pulse 1.6s ease-in-out infinite; }
.rbt-lv-time { color: var(--rbt-muted); font-size: 13px; }
@keyframes rbt-pulse { 50% { opacity: 0.3; } }

.rbt-lv-block { margin: 0 0 32px; }
.rbt-lv-h { font-size: 22px; font-weight: 700; margin: 0 0 14px; color: var(--rbt-text); }
.rbt-lv-sub { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rbt-muted); margin: 20px 0 8px; }
.rbt-lv-empty, .rbt-lv-muted { color: var(--rbt-muted); }

/* Jetzt dran */
.rbt-lv-now { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rbt-lv-match { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 12px 18px 12px 12px; border-radius: 16px; border: 1px solid var(--rbt-accent); background: linear-gradient(90deg, color-mix(in srgb, var(--rbt-accent) 16%, transparent), transparent 70%), var(--rbt-surface); }
.rbt-lv-station { min-width: 92px; padding: 8px 12px; border-radius: 12px; background: var(--rbt-accent); color: #000; text-align: center; font-weight: 800; font-size: 20px; line-height: 1.15; }
.rbt-lv-station small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; }
.rbt-lv-match__players { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 24px; font-weight: 700; line-height: 1.2; }
.rbt-lv-vs { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rbt-muted); padding: 3px 8px; border: 1px solid var(--rbt-strong); border-radius: 100px; }
.rbt-lv-match__ctx { color: var(--rbt-muted); font-size: 14px; text-align: right; }

.rbt-lv-next { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rbt-line); border-radius: 14px; overflow: hidden; background: var(--rbt-surface); }
.rbt-lv-next li { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 16px; }
.rbt-lv-next li + li { border-top: 1px solid var(--rbt-line); }
.rbt-lv-next li > span:first-child { text-align: right; }
.rbt-lv-next small { color: var(--rbt-muted); text-align: right; }

/* Turnierbaum */
.rbt-lv-tree { overflow-x: auto; padding: 4px 2px 12px; }
.rbt-lv-tree:focus-visible { outline: 2px solid var(--rbt-accent); border-radius: 8px; }
.rbt-lv-tree__inner { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); column-gap: 32px; min-width: min-content; }
.rbt-lv-tree__round { display: flex; flex-direction: column; }
.rbt-lv-tree__round h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rbt-muted); text-align: center; }
.rbt-lv-tree__round h4 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.rbt-lv-tree__col { flex: 1; display: flex; flex-direction: column; }
.rbt-lv-tree__pair { flex: 1; display: flex; flex-direction: column; position: relative; }
.rbt-lv-tree__slot, .rbt-lv-tree__single { flex: 1; display: flex; align-items: center; position: relative; padding: 12px 0; }
.rbt-lv-tree__slot > .rbt-lv-box, .rbt-lv-tree__single > .rbt-lv-box { width: 100%; }
.rbt-lv-tree__round:not(.is-final) .rbt-lv-tree__slot::after { content: ""; position: absolute; right: -16px; top: 50%; width: 16px; border-top: 2px solid var(--rbt-strong); }
.rbt-lv-tree__round:not(.is-final) .rbt-lv-tree__pair::after { content: ""; position: absolute; right: -16px; top: 25%; bottom: 25%; border-right: 2px solid var(--rbt-strong); }
.rbt-lv-tree__round:not(.is-final) .rbt-lv-tree__pair::before { content: ""; position: absolute; right: -32px; top: 50%; width: 16px; border-top: 2px solid var(--rbt-strong); }

.rbt-lv-box { position: relative; background: var(--rbt-surface2); border: 1px solid var(--rbt-line); border-radius: 10px; }
.rbt-lv-box__row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; min-height: 22px; }
.rbt-lv-box__row + .rbt-lv-box__row { border-top: 1px solid var(--rbt-line); }
.rbt-lv-box__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbt-lv-box__score { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 1.2em; text-align: right; }
.rbt-lv-box__row.is-win { font-weight: 700; box-shadow: inset 3px 0 0 var(--rbt-accent); }
.rbt-lv-box__row.is-win .rbt-lv-box__score { color: var(--rbt-accent); }
.rbt-lv-box__row.is-lose { color: var(--rbt-muted); }
.rbt-lv-box__row.is-tbd .rbt-lv-box__name { color: var(--rbt-muted); font-style: italic; font-size: 13px; }
.rbt-lv-box__tag { position: absolute; top: 0; right: 10px; transform: translateY(-50%); padding: 1px 8px; border-radius: 100px; font-size: 10px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--rbt-muted); background: var(--rbt-surface); border: 1px solid var(--rbt-line); z-index: 1; }
.rbt-lv-box__tag.is-live { background: var(--rbt-accent); border-color: var(--rbt-accent); color: #000; }
.rbt-lv-box__row:first-of-type.is-win { border-top-left-radius: 9px; }
.rbt-lv-box__row:last-of-type.is-win { border-bottom-left-radius: 9px; }
.rbt-lv-box--called { border-color: var(--rbt-accent); }
.is-final .rbt-lv-box { border-color: var(--rbt-gold); }
.rbt-lv-third { max-width: 260px; margin-top: 12px; }
.rbt-lv-third h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--rbt-muted); }

/* Gruppen */
.rbt-lv-groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.rbt-lv-group { background: var(--rbt-surface); border: 1px solid var(--rbt-line); border-radius: 16px; padding: 16px 18px; }
.rbt-lv-group h4 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font-size: 18px; }
.rbt-lv-group h4 small { font-size: 12px; font-weight: 400; color: var(--rbt-muted); }
.rbt-lv-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.rbt-lv-table th, .rbt-lv-table td { padding: 9px 6px; border-bottom: 1px solid var(--rbt-line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rbt-lv-table thead th { font-size: 12px; font-weight: 600; color: var(--rbt-muted); }
.rbt-lv-table thead th:nth-child(2), .rbt-lv-table th[scope="row"] { text-align: left; }
.rbt-lv-table th[scope="row"] { width: 100%; font-weight: 600; white-space: normal; }
.rbt-lv-table abbr { text-decoration: none; }
.rbt-lv-table__pos { width: 1.6em; text-align: center !important; color: var(--rbt-muted); }
.rbt-lv-table .is-through .rbt-lv-table__pos { color: var(--rbt-accent); font-weight: 800; }
.rbt-lv-table__pts { font-weight: 800; font-size: 16px; }
.rbt-lv-legend { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12px; color: var(--rbt-muted); }
.rbt-lv-legend span { width: 10px; height: 10px; border-radius: 3px; background: var(--rbt-accent); }
.rbt-lv-results { margin-top: 12px; }
.rbt-lv-results summary { cursor: pointer; color: var(--rbt-accent); font-size: 14px; }
.rbt-lv-results ul { list-style: none; margin: 8px 0 0; padding: 0; }
.rbt-lv-results li { display: grid; grid-template-columns: minmax(0, 1fr) 3.5em minmax(0, 1fr); gap: 8px; padding: 6px 0; border-top: 1px solid var(--rbt-line); font-size: 14px; }
.rbt-lv-results li > span:first-child { text-align: right; }
.rbt-lv-results b { text-align: center; font-variant-numeric: tabular-nums; }
.rbt-lv-results .is-win { font-weight: 700; }
.rbt-lv-results li.is-live b { color: var(--rbt-accent); }
.rbt-lv-fold > summary { cursor: pointer; }
.rbt-lv-fold[open] > summary { margin-bottom: 14px; }

/* Siegerehrung */
.rbt-lv-podium { list-style: none; margin: 0 auto 32px; padding: 0; max-width: 640px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; text-align: center; }
.rbt-lv-podium li { background: var(--rbt-surface); border: 1px solid var(--rbt-line); border-radius: 16px 16px 6px 6px; padding: 16px 8px; }
.rbt-lv-podium strong { display: block; font-size: 18px; overflow-wrap: anywhere; }
.rbt-lv-podium__medal { display: block; font-size: 36px; line-height: 1.2; }
.rbt-lv-podium__place { display: block; color: var(--rbt-muted); font-size: 12px; margin-top: 2px; }
.rbt-lv-podium__1 { order: 2; padding-top: 40px !important; border-color: var(--rbt-gold) !important; background: linear-gradient(180deg, color-mix(in srgb, var(--rbt-gold) 18%, transparent), transparent), var(--rbt-surface) !important; }
.rbt-lv-podium__1 strong { font-size: 22px; }
.rbt-lv-podium__2 { order: 1; padding-top: 26px !important; }
.rbt-lv-podium__3 { order: 3; }

@container (max-width: 600px) {
	.rbt-lv-head { border-radius: 16px; }
	.rbt-lv-match { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
	.rbt-lv-match__ctx { grid-column: 1 / -1; text-align: left; }
	.rbt-lv-match__players { font-size: 18px; flex-direction: column; align-items: flex-start; gap: 4px; }
	.rbt-lv-station { min-width: 72px; font-size: 17px; }
	.rbt-lv-next li { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
	.rbt-lv-next small { grid-column: 1 / -1; text-align: center; }
	.rbt-lv-tree__inner { grid-auto-columns: 180px; column-gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
	.rbt-lv-pill--live span { animation: none; }
}

.rbt-lv-next li.is-solo { grid-template-columns: minmax(0, 1fr) auto; }
.rbt-lv-next li.is-solo > span:first-child { text-align: left; font-weight: 600; }
.rbt-lv-ranking { max-width: 720px; }
.rbt-lv-legend--plain span { display: none; }

/* Modus als Schritte */
.rbt-mode { margin: 0 0 32px; }
.rbt-mode h2 { margin: 0 0 12px; }
.rbt-mode ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: rbt-step; }
.rbt-mode li { position: relative; counter-increment: rbt-step; background: var(--rbt-surface); border: 1px solid var(--rbt-line); border-radius: 16px; padding: 16px 18px 16px 58px; }
.rbt-mode li::before { content: counter(rbt-step); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--rbt-accent); color: #000; }
.rbt-mode li.is-final::before { content: "\1F3C6"; background: none; font-size: 22px; }
.rbt-mode h3 { margin: 2px 0 10px; font-size: 18px; }
.rbt-mode ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rbt-mode ul li { padding: 4px 10px; border-radius: 100px; background: var(--rbt-surface2); border: 1px solid var(--rbt-line); font-size: 13px; counter-increment: none; }
.rbt-mode ul li::before { content: none; }

/* Spiel + Konsole im Kopf */
.rbt-hero__game { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.rbt-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 100px; font-size: 14px; font-weight: 600; background: var(--rbt-surface2); border: 1px solid var(--rbt-line); }
.rbt-tag--console { border-color: var(--rbt-accent); }

/* Station mit Link zum Hallenplan */
a.rbt-lv-station { text-decoration: none; display: block; transition: transform 0.15s; }
a.rbt-lv-station:hover, a.rbt-lv-station:focus-visible { transform: scale(1.04); }
a.rbt-lv-station:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rbt-lv-station__map { display: block; font-size: 10px; font-weight: 700; opacity: 0.75; margin-top: 2px; }

.rbt-card .rbt-card__live { color: var(--rbt-accent); font-weight: 600; margin-top: 4px; }

/* Übersicht nach Status */
.rbt-group { margin: 0 0 40px; }
.rbt-group__title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.rbt-group__count { font-size: 14px; font-weight: 700; padding: 2px 10px; border-radius: 100px; background: var(--rbt-surface2); color: var(--rbt-muted); }
.rbt-group--live .rbt-group__title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.25); }
