/* Rally Booking — front-end styles. Everything is scoped to .rally-booking / .rb-*. */

.rally-booking,
.rb-open-games,
.rb-ticker {
	--rb-acc: #5AB4FF;
	--rb-acc-rgb: 90, 180, 255;
	--rb-surface: #1F4F9A;
	--rb-ball: #E6FF4D;
	--rb-ink: #0D1512;
	--rb-bg: #121C18;
	--rb-bg-2: #101915;
	--rb-bg-3: #0A110E;
	--rb-card: #17231E;
	--rb-text: #F2F5EF;
	--rb-muted: #B7C4BC;
	--rb-faint: #8FA197;
	--rb-line: rgba(242, 245, 239, 0.1);
	--rb-display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
	--rb-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--rb-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
	--rb-ease: cubic-bezier(.65, 0, .35, 1);
	--rb-spring: cubic-bezier(.34, 1.56, .64, 1);
	font-family: var(--rb-body);
	color: var(--rb-text);
	line-height: 1.45;
}

.rally-booking *,
.rally-booking *::before,
.rally-booking *::after { box-sizing: border-box; }

.rally-booking button { font: inherit; color: inherit; margin: 0; letter-spacing: normal; text-transform: none; }
.rally-booking h2,
.rally-booking p { margin: 0; }
.rally-booking [hidden] { display: none !important; }
.rally-booking :focus-visible { outline: 2px solid var(--rb-text); outline-offset: 3px; }

/* ---------- shell ---------- */

.rally-booking { scroll-margin-top: 90px; }
.rb-shell {
	background: var(--rb-bg);
	border: 1px solid var(--rb-line);
	border-radius: 28px;
	overflow: hidden;
	box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
}
.rb-loading {
	display: flex; align-items: center; justify-content: center; gap: 12px;
	min-height: 360px; border-radius: 28px; background: var(--rb-bg); color: var(--rb-muted);
}
.rb-loading__ball {
	width: 16px; height: 16px; border-radius: 50%; background: var(--rb-ball);
	animation: rbBounce .7s ease-in-out infinite alternate;
}
@keyframes rbBounce { from { transform: translateY(-10px); } to { transform: translateY(8px); } }

/* ---------- scoreboard ---------- */

.rb-board {
	display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px;
	padding: 18px 24px; background: var(--rb-bg-3); border-bottom: 1px solid rgba(242, 245, 239, 0.08);
}
.rb-board__score { display: flex; align-items: center; gap: 12px; }
.rb-board__label { font-family: var(--rb-mono); font-size: 11px; letter-spacing: .14em; color: var(--rb-faint); text-transform: uppercase; line-height: 1.4; }
.rb-score {
	display: inline-flex; align-items: center; justify-content: center; min-width: 88px; height: 42px; padding: 0 14px;
	border-radius: 10px; font-family: var(--rb-mono); font-weight: 700; font-size: 20px;
	background: var(--rb-acc); color: var(--rb-ink); transition: background .5s;
	animation: rbPop .5s var(--rb-spring);
}
.rb-board__count { font-family: var(--rb-mono); font-size: 12px; color: var(--rb-faint); }
.rb-rail { flex: 1 1 320px; min-width: 0; position: relative; height: 52px; }
.rb-rail__inner { position: absolute; left: 22px; right: 22px; top: 0; bottom: 0; }
.rb-rail__track,
.rb-rail__fill { position: absolute; left: 0; top: 21px; height: 2px; }
.rb-rail__track { right: 0; background: rgba(242, 245, 239, 0.12); }
.rb-rail__fill { width: 0; background: var(--rb-acc); transition: width .7s var(--rb-ease), background .5s; }
.rb-rail__stop { position: absolute; top: 0; width: 0; display: flex; flex-direction: column; align-items: center; }
.rb-rail__dot {
	display: block; margin-top: 15px; width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto;
	background: var(--rb-bg-3); border: 2px solid rgba(242, 245, 239, 0.25); transition: all .4s;
}
.rb-rail__dot.is-current { border-color: var(--rb-acc); }
.rb-rail__dot.is-done { background: var(--rb-acc); border-color: var(--rb-acc); }
.rb-rail__lab { display: block; margin-top: 5px; white-space: nowrap; font-family: var(--rb-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--rb-faint); }
.rb-rail__lab.is-current { color: var(--rb-text); }
.rb-rail__ball { position: absolute; top: -6px; left: 0; width: 18px; height: 18px; margin-left: -9px; z-index: 2; transition: left .8s var(--rb-spring); }
.rb-rail__ball span {
	position: relative; display: block; width: 18px; height: 18px; border-radius: 50%; overflow: hidden;
	background: var(--rb-ball); box-shadow: 0 0 14px rgba(230, 255, 77, .6); animation: rbSpin 1.2s linear infinite;
}
.rb-rail__ball span::after {
	content: ''; position: absolute; left: -6px; top: 2px; width: 14px; height: 14px; border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, .75);
}
@keyframes rbSpin { to { transform: rotate(360deg); } }

/* ---------- body / stage ---------- */

.rb-body { display: flex; flex-wrap: wrap; }
.rb-stagecol { flex: 1 1 400px; min-width: 0; padding: 28px; background: var(--rb-bg-2); border-right: 1px solid rgba(242, 245, 239, 0.08); }
.rb-stagecol__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rb-eyebrow { font-family: var(--rb-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--rb-acc); transition: color .5s; }
.rb-eyebrow--muted { color: var(--rb-faint); }
.rb-eyebrow--dark { color: #5B6B63; }
.rb-chip { font-family: var(--rb-mono); font-size: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(var(--rb-acc-rgb), .14); color: var(--rb-acc); transition: all .5s; }

.rb-suntrack { position: relative; height: 46px; margin-bottom: 8px; overflow: hidden; }
.rb-suntrack__arc {
	position: absolute; left: 4%; right: 4%; top: 10px; height: 80px;
	border: 1px dashed rgba(242, 245, 239, 0.2); border-bottom: none; border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.rb-suntrack__sun { position: absolute; left: 50%; top: 4px; width: 22px; height: 22px; margin-left: -11px; color: #FFD24C; transition: left .9s ease, top .9s ease, opacity .5s; }
.rb-suntrack__sun.is-down { opacity: .35; }
.rb-suntrack__e,
.rb-suntrack__label { position: absolute; bottom: 0; font-family: var(--rb-mono); font-size: 10px; color: var(--rb-faint); }
.rb-suntrack__e { left: 0; }
.rb-suntrack__label { right: 0; }

.rb-stage {
	position: relative; width: 100%; aspect-ratio: 26 / 14; border-radius: 18px; overflow: hidden; background-color: #08100C;
	background-image: linear-gradient(rgba(242, 245, 239, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(242, 245, 239, .035) 1px, transparent 1px);
	background-size: 24px 24px;
}
.rb-court {
	position: absolute; z-index: 1; background: var(--rb-surface); border: 2px solid rgba(255, 255, 255, .92); border-radius: 3px;
	box-shadow: 0 0 0 0 rgba(170, 215, 255, 0), 0 0 0 0 rgba(170, 215, 255, 0), 0 24px 50px rgba(0, 0, 0, .5);
	transition: all .85s var(--rb-ease);
}
.rb-court.has-walls { box-shadow: 0 0 0 7px rgba(170, 215, 255, .22), 0 0 0 9px rgba(170, 215, 255, .55), 0 24px 50px rgba(0, 0, 0, .5); }
.rb-line { position: absolute; background: rgba(255, 255, 255, .92); transition: all .85s var(--rb-ease); }
.rb-line--h { height: 2px; margin-top: -1px; }
.rb-line--v { width: 2px; margin-left: -1px; }
.rb-kitchen { position: absolute; top: 0; height: 100%; background: rgba(var(--rb-acc-rgb), .3); transition: all .85s var(--rb-ease); }
.rb-net {
	position: absolute; left: 50%; top: -7%; height: 114%; width: 4px; margin-left: -2px; z-index: 2; border-radius: 2px;
	background: repeating-linear-gradient(to bottom, #F2F5EF 0 3px, rgba(242, 245, 239, .35) 3px 6px);
}
.rb-shade {
	position: absolute; top: 0; bottom: 0; left: 0; width: 0; z-index: 2; pointer-events: none; transition: all .9s ease;
	background: linear-gradient(to left, rgba(3, 8, 6, .7), rgba(3, 8, 6, .3));
}
.rb-shade.is-morning { background: linear-gradient(to right, rgba(3, 8, 6, .7), rgba(3, 8, 6, .3)); }
.rb-pdot {
	position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; z-index: 3;
	display: flex; align-items: center; justify-content: center; font-family: var(--rb-mono); font-size: 11px; font-weight: 700;
	background: #F2F5EF; color: var(--rb-ink); box-shadow: 0 0 0 3px rgba(0, 0, 0, .25); transition: all .85s var(--rb-ease);
}
.rb-pdot.is-team { background: var(--rb-acc); }
.rb-pdot.is-you { box-shadow: 0 0 0 4px rgba(var(--rb-acc-rgb), .35); }
.rb-rallyball {
	position: absolute; z-index: 4; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
	background: var(--rb-ball); box-shadow: 0 0 12px var(--rb-ball); animation: rbRally 2.6s ease-in-out infinite;
}
@keyframes rbRally {
	0%, 100% { left: 18%; top: 64%; }
	25% { left: 50%; top: 30%; }
	50% { left: 82%; top: 58%; }
	75% { left: 50%; top: 36%; }
}
.rb-lights {
	position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 1.2s;
	background:
		radial-gradient(circle at 3% 5%, rgba(255, 244, 205, .42), transparent 30%),
		radial-gradient(circle at 97% 5%, rgba(255, 244, 205, .42), transparent 30%),
		radial-gradient(circle at 3% 95%, rgba(255, 244, 205, .32), transparent 30%),
		radial-gradient(circle at 97% 95%, rgba(255, 244, 205, .32), transparent 30%);
}
.rb-lights.is-on { opacity: 1; }
.rb-stagechip {
	position: absolute; bottom: 10px; z-index: 4; padding: 6px 10px; border-radius: 999px;
	font-family: var(--rb-mono); font-size: 11px; animation: rbPop .5s var(--rb-spring);
}
.rb-stagechip--shade { left: 10px; background: rgba(8, 16, 12, .85); color: var(--rb-text); }
.rb-stagechip--lights { right: 10px; background: #FFE08A; color: var(--rb-ink); font-weight: 700; }

.rb-facts { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rb-facts > div { padding: 12px; border-radius: 14px; background: var(--rb-bg-3); min-width: 0; }
.rb-facts span { display: block; font-family: var(--rb-mono); font-size: 10px; letter-spacing: .12em; color: var(--rb-faint); text-transform: uppercase; }
.rb-facts strong { display: block; margin-top: 4px; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.rb-tip { margin-top: 16px !important; font-size: 14px; color: var(--rb-faint); }

/* ---------- panel ---------- */

.rb-panel { flex: 1.25 1 440px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 22px; min-height: 620px; }
.rb-stepin { display: flex; flex-direction: column; gap: 18px; }
.rb-enter { animation: rbIn .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rbIn { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
.rb-pop { animation: rbPop .55s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes rbPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

.rb-head { min-width: 0; }
.rb-title { margin: 6px 0 6px !important; font-family: var(--rb-display); font-weight: 700; font-size: clamp(28px, 3vw, 34px); line-height: 1.1; letter-spacing: -0.02em; color: var(--rb-text); }
.rb-title:focus { outline: none; }
.rb-sub { color: var(--rb-muted); font-size: 15px; }
.rb-headrow { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.rb-compass {
	display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 48px; height: 48px;
	border-radius: 50%; border: 1px solid rgba(242, 245, 239, .2); font-family: var(--rb-mono); font-size: 12px; font-weight: 700;
}
.rb-grid { display: grid; gap: 12px; }
.rb-grid--sports { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.rb-grid--tiles { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.rb-grid--slots { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.rb-grid--fields { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.rb-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rb-group { display: flex; flex-direction: column; gap: 8px; }
.rb-label { font-size: 13px; color: var(--rb-muted); margin-right: 4px; }
.rb-empty { color: var(--rb-muted); padding: 18px; border-radius: 16px; background: var(--rb-bg-3); }
.rb-error { color: #FFB4A8; background: rgba(255, 120, 100, .1); padding: 12px 14px; border-radius: 12px; font-size: 14px; }

/* cards (sport, court, gear) */
.rb-sport,
.rb-tile,
.rb-gear {
	text-align: left; cursor: pointer; background: var(--rb-card); border: 2px solid var(--rb-line); color: var(--rb-text);
	box-shadow: 0 0 0 0 transparent; transition: transform .18s ease, background .3s, border-color .3s, box-shadow .3s;
}
.rb-sport:hover:not(:disabled),
.rb-tile:hover:not(:disabled),
.rb-gear:hover,
.rb-pill:hover,
.rb-date:hover,
.rb-slot:hover:not(:disabled),
.rb-btn:hover:not(:disabled) { transform: translateY(-2px); }
.rb-sport:active,
.rb-tile:active,
.rb-gear:active,
.rb-slot:active,
.rb-btn:active { transform: scale(.97); }

.rb-sport { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; border-radius: 20px; min-height: 200px; }
.rb-sport.is-on {
	background: rgba(var(--c-rgb), .12); border-color: var(--c);
	box-shadow: 0 0 0 6px rgba(var(--c-rgb), .12), 0 18px 40px rgba(var(--c-rgb), .16);
}
.rb-sport__icon { position: relative; display: block; width: 68px; height: 38px; border-radius: 4px; background: var(--s); border: 2px solid rgba(255, 255, 255, .9); }
.rb-sport--padel .rb-sport__icon { box-shadow: 0 0 0 4px rgba(170, 215, 255, .4); }
.rb-sport__kitchen { position: absolute; top: 0; bottom: 0; left: 34%; width: 32%; }
.rb-sport--pickleball .rb-sport__kitchen { background: rgba(var(--c-rgb), .4); }
.rb-sport__net { position: absolute; left: 50%; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: #F2F5EF; }
.rb-sport__name { font-family: var(--rb-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.rb-sport__tag { font-size: 14px; color: var(--rb-muted); }
.rb-sport__meta { margin-top: auto; font-family: var(--rb-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }

.rb-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; }
.rb-tile.is-on,
.rb-gear.is-on { background: rgba(var(--rb-acc-rgb), .12); border-color: var(--rb-acc); box-shadow: 0 0 0 6px rgba(var(--rb-acc-rgb), .12); }
.rb-tile.is-closed { opacity: .55; cursor: not-allowed; }
.rb-tile__mini { display: block; position: relative; width: 100%; aspect-ratio: 2 / 1; border-radius: 6px; overflow: hidden; border: 2px solid rgba(255, 255, 255, .85); background: var(--rb-surface); }
.rb-tile__mini.is-indoor { box-shadow: inset 0 0 0 4px rgba(170, 215, 255, .25); }
.rb-tile__net { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #F2F5EF; }
.rb-tile__hop { position: absolute; top: 40%; width: 9px; height: 9px; border-radius: 50%; background: var(--rb-ball); animation: rbHop 1.4s ease-in-out infinite alternate; opacity: 0; transition: opacity .3s; }
.rb-tile:hover .rb-tile__hop,
.rb-tile.is-on .rb-tile__hop { opacity: 1; }
@keyframes rbHop { 0% { left: 12%; transform: translateY(0); } 50% { transform: translateY(-10px); } 100% { left: 80%; transform: translateY(0); } }
.rb-tile__name { font-weight: 700; font-size: 17px; }
.rb-tile__meta { font-size: 13px; color: var(--rb-muted); }
.rb-tile__status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--rb-mono); font-size: 12px; color: var(--rb-acc); }
.rb-tile.is-closed .rb-tile__status { color: var(--rb-faint); }
.rb-tile__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; color: inherit; animation: rbPulse 1.8s ease-out infinite; }
.rb-tile.is-closed .rb-tile__dot { animation: none; }
@keyframes rbPulse { 0% { box-shadow: 0 0 0 0 currentColor; } 100% { box-shadow: 0 0 0 12px transparent; } }

.rb-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--rb-bg-3); font-size: 14px; color: var(--rb-muted); }
.rb-note svg { flex: 0 0 auto; margin-top: 2px; }

/* pills, dates, slots */
.rb-pill {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
	font-size: 14px; font-weight: 600; border: 1px solid rgba(242, 245, 239, .16); background: transparent; color: var(--rb-text);
	transition: transform .18s ease, background .3s, border-color .3s, color .3s;
}
.rb-pill.is-on { background: var(--rb-acc); border-color: var(--rb-acc); color: var(--rb-ink); }

.rb-dates { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; scrollbar-color: rgba(242, 245, 239, .2) transparent; }
.rb-date {
	flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 66px; padding: 10px 12px; border-radius: 16px;
	cursor: pointer; border: 1px solid rgba(242, 245, 239, .12); background: var(--rb-card); color: var(--rb-text);
	transition: transform .18s ease, background .3s, border-color .3s, color .3s;
}
.rb-date.is-on { background: var(--rb-acc); border-color: var(--rb-acc); color: var(--rb-ink); }
.rb-date__dow { font-family: var(--rb-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.rb-date__day { font-family: var(--rb-display); font-weight: 700; font-size: 24px; line-height: 1; }
.rb-date__mon { font-size: 11px; }

.rb-slot {
	display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 14px; text-align: left; cursor: pointer;
	border: 1px solid var(--rb-line); color: var(--rb-text); background: #18231F;
	transition: transform .18s ease, background .3s, border-color .3s, color .3s, box-shadow .3s;
}
.rb-slot--peak { background: #33241B; }
.rb-slot--off { background: #14302A; }
.rb-slot.is-on { background: var(--rb-acc); border-color: var(--rb-acc); color: var(--rb-ink); box-shadow: 0 10px 24px rgba(var(--rb-acc-rgb), .3); }
.rb-slot.is-off { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.rb-slot--skeleton {
	min-height: 70px; cursor: default; background: linear-gradient(90deg, #17231E 0%, #1F2E28 50%, #17231E 100%);
	background-size: 200% 100%; animation: rbShimmer 1.2s linear infinite;
}
@keyframes rbShimmer { to { background-position: -200% 0; } }
.rb-slot__time { font-family: var(--rb-mono); font-weight: 700; font-size: 15px; }
.rb-slot__price { font-size: 13px; }
.rb-slot__tag { font-family: var(--rb-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; min-height: 12px; color: var(--rb-faint); }
.rb-slot__tag--wind { color: #A9C8FF; }
.rb-slot__tag--lights { color: #FFE08A; }
.rb-slot__tag--peak { color: #FFB38A; }
.rb-slot__tag--off { color: #8EE0C1; }
.rb-slot.is-on .rb-slot__tag { color: var(--rb-ink); }

.rb-conds { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.rb-cond { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: var(--rb-bg-3); font-size: 14px; }
.rb-cond__k { font-family: var(--rb-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.rb-cond__k--sun { color: #FFD24C; }
.rb-cond__k--wind { color: #A9C8FF; }
.rb-cond__k--lights { color: #FFE08A; }
.rb-bar { display: block; margin-top: 4px; height: 6px; border-radius: 999px; background: rgba(242, 245, 239, .1); overflow: hidden; }
.rb-bar span { display: block; height: 100%; background: #FFD24C; border-radius: 999px; transition: width .8s ease; }

/* fields, toggles, avatars */
.rb-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--rb-muted); }
.rally-booking .rb-field input {
	width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(242, 245, 239, .16);
	background: var(--rb-bg-3); color: var(--rb-text); font: inherit; font-size: 16px; box-shadow: none;
}
.rally-booking .rb-field input::placeholder { color: #6F8278; }
.rally-booking .rb-field input:focus { border-color: var(--rb-acc); outline: none; box-shadow: 0 0 0 3px rgba(var(--rb-acc-rgb), .25); }
.rb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.rb-toggle {
	display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; width: 100%;
	border: 1px solid rgba(242, 245, 239, .12); background: var(--rb-bg-3); text-align: left; cursor: pointer;
}
.rb-toggle__track { position: relative; display: inline-block; width: 52px; height: 30px; border-radius: 999px; flex: 0 0 auto; background: rgba(242, 245, 239, .18); transition: background .3s; }
.rb-toggle__knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #F2F5EF; transition: left .35s var(--rb-spring), background .3s; }
.rb-toggle.is-on .rb-toggle__track { background: var(--rb-acc); }
.rb-toggle.is-on .rb-toggle__knob { left: 25px; background: var(--rb-ink); }
.rb-toggle__text { display: flex; flex-direction: column; gap: 2px; }
.rb-toggle__text span { font-size: 13px; color: var(--rb-muted); }

.rb-avatars { display: flex; gap: 14px; flex-wrap: wrap; }
.rb-avatar { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rb-avatar span {
	display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%;
	font-family: var(--rb-mono); font-size: 20px; font-weight: 700; color: var(--rb-acc); border: 2px dashed rgba(var(--rb-acc-rgb), .7);
}
.rb-avatar.is-you span { background: var(--rb-acc); color: var(--rb-ink); border-style: solid; border-color: var(--rb-acc); }
.rb-avatar.is-open span { font-size: 11px; animation: rbPulse 1.8s ease-out infinite; }
.rb-avatar small { font-size: 12px; color: var(--rb-faint); }

/* kit */
.rb-kit { display: flex; flex-wrap: wrap; gap: 16px; }
.rb-kit__list { flex: 999 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rb-gear { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; min-height: 60px; width: 100%; }
.rb-check {
	display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
	border: 2px solid rgba(242, 245, 239, .3); color: var(--rb-ink); transition: all .25s;
}
.rb-gear.is-on .rb-check { background: var(--rb-acc); border-color: var(--rb-acc); }
.rb-gear__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rb-gear__text span { font-size: 13px; color: var(--rb-muted); }
.rb-gear__price { font-family: var(--rb-mono); font-size: 13px; white-space: nowrap; }
.rb-bag { flex: 1 1 180px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px; border-radius: 20px; background: var(--rb-bg-3); }
.rb-bag__body {
	position: relative; width: 130px; height: 150px; margin-top: 22px; border-radius: 22px 22px 30px 30px;
	border: 2px solid rgba(242, 245, 239, .3); background: var(--rb-card);
}
.rb-bag__handle { position: absolute; left: 30px; right: 30px; top: -26px; height: 40px; border: 5px solid rgba(242, 245, 239, .35); border-bottom: none; border-radius: 30px 30px 0 0; }
.rb-bag__fill {
	position: absolute; left: 0; right: 0; bottom: 0; border-radius: 0 0 28px 28px;
	background: linear-gradient(to top, rgba(var(--rb-acc-rgb), .6), rgba(var(--rb-acc-rgb), .15)); transition: height .6s var(--rb-spring);
}
.rb-bag__count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--rb-display); font-weight: 800; font-size: 44px; }
.rb-bag__chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.rb-bag__chips span { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(var(--rb-acc-rgb), .16); color: var(--rb-acc); }

/* pay */
.rb-hold { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--rb-bg-3); }
.rb-hold__ballwrap { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
.rb-hold__ball { display: block; width: 38px; height: 38px; border-radius: 50%; background: var(--rb-ball); box-shadow: 0 0 16px rgba(230, 255, 77, .5); transition: all 1s linear; }
.rb-hold strong { display: block; font-family: var(--rb-mono); font-size: 20px; }
.rb-hold small { display: block; font-size: 12px; color: var(--rb-faint); }
.rb-summary { padding: 18px; border-radius: 20px; background: var(--rb-bg-3); display: flex; flex-direction: column; gap: 10px; }
.rb-line-item { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.rb-line-item span:first-child { color: #C9D4CD; }
.rb-line-item span:last-child { font-family: var(--rb-mono); }
.rb-summary__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; margin-top: 4px; border-top: 1px solid rgba(242, 245, 239, .12); font-weight: 700; }
.rb-summary__total strong { font-family: var(--rb-display); font-weight: 800; font-size: 32px; }

/* buttons */
.rb-nav { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; }
.rb-nav__left { display: flex; align-items: center; gap: 12px; }
.rb-nav__hint { font-size: 13px; color: var(--rb-faint); }
.rb-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px;
	font-weight: 700; font-size: 16px; cursor: pointer; border: 0; text-decoration: none;
	transition: transform .18s ease, background .3s, color .3s, box-shadow .3s;
}
.rb-btn--primary { background: var(--rb-acc); color: var(--rb-ink); box-shadow: 0 12px 30px rgba(var(--rb-acc-rgb), .35); }
.rb-btn--primary:disabled { background: rgba(242, 245, 239, .12); color: var(--rb-faint); box-shadow: none; cursor: not-allowed; }
.rb-btn--ghost { background: transparent; color: var(--rb-text); border: 1px solid rgba(242, 245, 239, .2); font-weight: 600; }
.rb-btn--pay { width: 100%; min-height: 58px; border-radius: 18px; font-size: 18px; font-weight: 800; background: var(--rb-acc); color: var(--rb-ink); box-shadow: 0 16px 40px rgba(var(--rb-acc-rgb), .35); }
.rb-btn--pay:disabled { opacity: .7; cursor: progress; }
.rb-link { background: none; border: 0; padding: 0 8px; color: var(--rb-muted); text-decoration: underline; cursor: pointer; font-weight: 600; min-height: 44px; }

/* ---------- done ---------- */

.rb-done { position: relative; padding: 48px 24px 56px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; justify-content: center; overflow: hidden; }
.rb-confettis { position: absolute; inset: 0; pointer-events: none; }
.rb-confetti { position: absolute; top: -24px; border-radius: 2px; animation-name: rbFall; animation-timing-function: cubic-bezier(.3, .6, .6, 1); animation-fill-mode: forwards; }
@keyframes rbFall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(640px) rotate(560deg); opacity: 0; } }
.rb-done__text { flex: 1 1 320px; max-width: 460px; position: relative; display: flex; flex-direction: column; gap: 14px; }
.rb-done__title { font-family: var(--rb-display); font-weight: 800; font-size: clamp(36px, 5vw, 56px); line-height: 1; letter-spacing: -0.03em; }
.rb-done__title:focus { outline: none; }
.rb-pass-wrap { position: relative; width: 340px; max-width: 100%; height: 500px; perspective: 1400px; animation: rbFloat 4s ease-in-out infinite; }
@keyframes rbFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.rb-pass { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.rb-pass__inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.34, 1.3, .64, 1); }
.rb-pass.is-flipped .rb-pass__inner { transform: rotateY(180deg); }
.rb-pass__face {
	position: absolute; inset: 0; display: flex; flex-direction: column; padding: 28px; border-radius: 26px; overflow: hidden;
	backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 40px 80px rgba(0, 0, 0, .5); color: var(--rb-ink);
}
.rb-pass__front { background: var(--rb-acc); }
.rb-pass__back { background: #F2F5EF; transform: rotateY(180deg); }
.rb-pass__top { display: flex; justify-content: space-between; gap: 8px; font-family: var(--rb-mono); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.rb-pass__sport { display: block; margin-top: 26px; font-family: var(--rb-display); font-weight: 800; font-size: 54px; line-height: .9; letter-spacing: -0.04em; }
.rb-pass__court { display: block; margin-top: 6px; font-weight: 600; font-size: 18px; }
.rb-pass__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.rb-pass__grid > span { display: flex; flex-direction: column; }
.rb-pass__grid small { font-family: var(--rb-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.rb-pass__grid strong { font-size: 16px; }
.rb-pass__perf { display: block; margin: 22px -28px 18px; border-top: 2px dashed rgba(13, 21, 18, .35); }
.rb-pass__bottom { display: flex; align-items: center; gap: 16px; font-size: 13px; line-height: 1.45; }
.rb-pass__code { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); width: 104px; height: 104px; padding: 6px; background: #F2F5EF; border-radius: 10px; flex: 0 0 auto; }
.rb-pass__code span.is-dark { background: var(--rb-ink); }
.rb-pass__backtitle { display: block; margin-top: 16px; font-family: var(--rb-display); font-weight: 800; font-size: 30px; line-height: 1; }
.rb-pass__rules { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; font-size: 15px; line-height: 1.45; }
.rb-pass__hint { display: block; margin-top: auto; font-family: var(--rb-mono); font-size: 12px; color: #5B6B63; }

/* ---------- open games ---------- */

.rb-open-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.rb-game {
	--c: var(--rb-acc);
	display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 22px;
	background: var(--rb-bg); border: 1px solid var(--rb-line); color: var(--rb-text);
	transition: transform .25s ease, border-color .3s;
}
.rb-game:hover { transform: translateY(-4px); border-color: var(--c); }
.rb-game--padel { --c: #5AB4FF; }
.rb-game--pickleball { --c: #C8F25A; }
.rb-game--tennis { --c: #FF8A4C; }
.rb-game__head { display: flex; justify-content: space-between; gap: 8px; font-family: var(--rb-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.rb-game__sport { color: var(--c); }
.rb-game__level { color: var(--rb-faint); }
.rb-game__when { margin: 0; font-family: var(--rb-display); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; color: var(--rb-text); }
.rb-game__court { margin: 0; font-size: 14px; color: var(--rb-muted); }
.rb-game__spots { display: flex; gap: 8px; }
.rb-game__spots span { width: 26px; height: 26px; border-radius: 50%; }
.rb-game__spots .is-taken { background: var(--c); }
.rb-game__spots .is-open { border: 2px dashed var(--c); animation: rbPulse 1.8s ease-out infinite; color: var(--c); }
.rb-join { display: grid; gap: 8px; margin-top: 6px; }
.rb-join input {
	width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid rgba(242, 245, 239, .16);
	background: var(--rb-bg-3); color: var(--rb-text); font: inherit; font-size: 15px;
}
.rb-join button {
	min-height: 46px; border: 0; border-radius: 999px; background: var(--c); color: var(--rb-ink);
	font: inherit; font-weight: 700; cursor: pointer; transition: transform .18s ease;
}
.rb-join button:hover:not(:disabled) { transform: translateY(-2px); }
.rb-join button:disabled { opacity: .7; cursor: default; }
.rb-join.is-joined input { display: none; }
.rb-join__msg { margin: 0; font-size: 13px; color: var(--rb-muted); min-height: 1em; }
.rb-open-games .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.rb-ticker { overflow: hidden; padding: 14px 0; }
.rb-ticker__track { display: flex; gap: 48px; width: max-content; animation: rbMarquee 40s linear infinite; }
.rb-ticker:hover .rb-ticker__track { animation-play-state: paused; }
@keyframes rbMarquee { to { transform: translateX(-50%); } }
.rb-ticker__item { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-family: var(--rb-mono); font-size: 13px; color: #C9D4CD; }
.rb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.rb-dot--padel { background: #5AB4FF; }
.rb-dot--pickleball { background: #C8F25A; }
.rb-dot--tennis { background: #FF8A4C; }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
	.rb-board { padding: 16px; }
	.rb-rail__lab { display: none; }
	.rb-stagecol { border-right: 0; border-bottom: 1px solid rgba(242, 245, 239, .08); padding: 20px 16px; }
	.rb-panel { padding: 20px 16px; min-height: 0; }
	.rb-facts { grid-template-columns: 1fr 1fr; }
	.rb-facts > div:last-child { grid-column: span 2; }
	.rb-nav { position: sticky; bottom: 0; background: var(--rb-bg); padding: 12px 0; margin-bottom: -8px; }
}

@media (prefers-reduced-motion: reduce) {
	.rally-booking *,
	.rb-open-games *,
	.rb-ticker * { animation: none !important; transition: none !important; }
}

@media print {
	body * { visibility: hidden; }
	.rb-pass-wrap,
	.rb-pass-wrap * { visibility: visible; }
	.rb-pass-wrap { position: absolute; left: 0; top: 0; animation: none; }
	.rb-pass__back { display: none; }
	.rb-pass__inner { transform: none !important; }
}
