/* Kiclic — « Mes Ralis » (page liste), port fidèle du design Claude Design.
   Le shell du design (.k-app / .k-side / .k-main) est remplacé par la sidebar du
   DashboardLayout : tout le contenu vit dans .rl-root. Tokens dans
   mes-ralis-tokens.css (scopés .rl-root). Thème : suit le global du site
   (html[data-theme="light"] => clair, sinon sombre). Prefix : rl-
   Deux modes sur le même markup : body[data-mode="pro"|"simple"].
   Densité : body[data-view="grid"|"list"]. */

* { box-sizing: border-box; }

/* ===================================================================
   ROOT + ambient backdrop  (remplace .k-main du design)
   =================================================================== */
.rl-root {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  height: 100dvh; min-height: 0; background: var(--bg);
}
.rl-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.rl-bg .blob { position: absolute; border-radius: 50%; }
.rl-bg .b1 { width: 560px; height: 560px; background: radial-gradient(circle, #5B8DEF 0%, transparent 70%); top: -240px; left: 160px; opacity: 0.13; }
.rl-bg .b2 { width: 520px; height: 520px; background: radial-gradient(circle, #E94E8B 0%, transparent 70%); top: -180px; right: -120px; opacity: 0.12; }
.rl-bg .b3 { width: 440px; height: 440px; background: radial-gradient(circle, #B968C7 0%, transparent 70%); top: 200px; right: 360px; opacity: 0.08; }
html[data-theme="light"] .rl-bg .blob { opacity: 0.10; }

/* ===================================================================
   TOPBAR / STATUS BAR
   =================================================================== */
.rl-topbar {
  position: relative; z-index: 5; flex: 0 0 auto;
  height: var(--k-topbar-h, 56px);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  backdrop-filter: blur(14px);
}
@media (max-width: 1023px) { .rl-topbar { height: auto; padding: 12px 18px; flex-wrap: wrap; } }
/* mobile sidebar toggle (hidden on desktop where the sidebar is pinned) */
.rl-burger { display: none; width: 36px; height: 36px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 10px; background: var(--bg-elev-1); border: 1px solid var(--border-soft); color: var(--fg-secondary); cursor: pointer; }
.rl-burger svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
@media (max-width: 1023px) { .rl-burger { display: inline-flex; } }

.rl-title { display: flex; align-items: baseline; gap: 9px; flex: 0 0 auto; min-width: 0; }
.rl-title h1 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; color: var(--fg); white-space: nowrap; }
.rl-title .sub { font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl-title .sub b { color: var(--fg-secondary); font-weight: 700; }

/* Aperçu Pro/Simple segment */
.rl-seg {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px;
  border-radius: 9999px; background: var(--bg-elev-1); border: 1px solid var(--border-soft);
}
.rl-seg .lab { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fg-muted); padding: 0 8px 0 10px; }
.rl-seg button {
  height: 28px; padding: 0 13px; border-radius: 9999px; border: 0; cursor: pointer;
  background: transparent; color: var(--fg-secondary); font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; transition: all var(--t-fast);
}
.rl-seg button svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
.rl-seg button:hover { color: var(--fg); }
.rl-seg button.on { color: #fff; background: var(--k-gradient-h); box-shadow: 0 4px 12px rgba(233,78,139,0.3); }
.rl-seg button.on.pro { background: var(--k-gradient-pro); box-shadow: 0 4px 12px rgba(245,158,11,0.32); color: #1A1206; }

.rl-tb-spacer { flex: 1 1 auto; }

/* search */
.rl-search {
  display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 13px;
  min-width: 200px; max-width: 300px; flex: 1 1 220px;
  border-radius: 10px; background: var(--bg-elev-1); border: 1px solid var(--border-soft);
  color: var(--fg-muted); transition: border-color var(--t-fast), background var(--t-fast);
}
.rl-search:focus-within { border-color: rgba(185,104,199,0.45); background: var(--bg-elev-2); }
.rl-search svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; flex: 0 0 auto; fill: none; }
.rl-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--fg); font-size: 13px; }
.rl-search input::placeholder { color: var(--fg-muted); }

/* generic topbar buttons */
.rl-btn {
  height: 36px; padding: 0 13px; border-radius: 10px; cursor: pointer;
  background: var(--bg-elev-1); border: 1px solid var(--border-soft); color: var(--fg-secondary);
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; transition: all var(--t-fast);
}
.rl-btn:hover { color: var(--fg); background: var(--bg-elev-2); }
.rl-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; flex: 0 0 auto; }
.rl-btn.icon { width: 36px; padding: 0; justify-content: center; }
.rl-btn.active { color: var(--fg); border-color: rgba(185,104,199,0.45); }
.rl-btn .chev { width: 13px; height: 13px; opacity: 0.7; }

/* dropdowns */
.rl-drop { position: relative; }
.rl-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 218px; z-index: 60;
  background: var(--bg-elev-1); border: 1px solid var(--border); border-radius: 14px; padding: 7px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  opacity: 0; transform: translateY(-6px) scale(0.98); pointer-events: none;
  transition: opacity var(--t-fast), transform var(--t-fast) var(--ease-out);
}
html[data-theme="light"] .rl-menu { box-shadow: 0 24px 60px rgba(30,30,60,0.16); }
.rl-menu.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.rl-menu .mh { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-muted); padding: 7px 10px 5px; }
.rl-menu button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  border: 0; background: transparent; color: var(--fg); font-size: 13px; font-weight: 500; cursor: pointer; text-align: left;
  transition: background var(--t-fast);
}
.rl-menu button:hover { background: var(--surface-tint-light); }
.rl-menu button .tick { margin-left: auto; width: 15px; height: 15px; stroke: var(--k-violet); stroke-width: 2.5; fill: none; opacity: 0; }
.rl-menu button.on .tick { opacity: 1; }
.rl-menu button.on { color: var(--fg); font-weight: 700; }

/* grid/list toggle */
.rl-vtoggle { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--bg-elev-1); border: 1px solid var(--border-soft); }
.rl-vtoggle button { width: 32px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--t-fast); }
.rl-vtoggle button svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.rl-vtoggle button:hover { color: var(--fg); }
.rl-vtoggle button.on { background: var(--bg-elev-2); color: var(--fg); box-shadow: 0 2px 6px rgba(0,0,0,0.28); }
html[data-theme="light"] .rl-vtoggle button.on { box-shadow: 0 2px 6px rgba(0,0,0,0.1); }

/* primary CTA */
.rl-cta {
  height: 38px; padding: 0 18px; border-radius: 9999px; border: 0; cursor: pointer;
  background: var(--k-gradient-h); color: #fff; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; gap: 7px; box-shadow: var(--shadow-button);
  transition: transform var(--t-fast), box-shadow var(--t-fast); white-space: nowrap; text-decoration: none;
}
.rl-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(233,78,139,0.45); }
.rl-cta svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.6; fill: none; }

/* mode-scoped CTA visibility */
.rl-root[data-mode="pro"]    .rl-cta.simple-only { display: none; }
.rl-root[data-mode="simple"] .rl-cta.pro-only    { display: none; }

/* ===================================================================
   SCROLL AREA
   =================================================================== */
.rl-scroll { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 24px 28px 56px; scrollbar-width: thin; }
.rl-scroll::-webkit-scrollbar { width: 9px; }
.rl-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; border: 2px solid var(--bg); }
.rl-wrap { max-width: 1280px; margin: 0 auto; }

/* loading / error */
.rl-loading, .rl-error { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; color: var(--fg-secondary); }
.rl-loading svg { animation: rlSpin 1s linear infinite; }
@keyframes rlSpin { to { transform: rotate(360deg); } }
.rl-error h3 { font-size: 18px; font-weight: 800; color: var(--fg); margin: 0; }
.rl-error p { font-size: 14px; margin: 0; max-width: 320px; }
.rl-error button { display: inline-flex; align-items: center; gap: 8px; background: var(--k-gradient-h); color: #fff; padding: 10px 18px; border: 0; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; }

/* section label */
.rl-seclbl { display: flex; align-items: center; gap: 11px; margin: 0 0 16px; }
.rl-seclbl .ic { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(185,104,199,0.14); flex: 0 0 auto; }
.rl-seclbl .ic svg { width: 15px; height: 15px; stroke: #C99AE0; stroke-width: 2; fill: none; }
html[data-theme="light"] .rl-seclbl .ic svg { stroke: #9A4FB5; }
.rl-seclbl .t { font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg); }
.rl-seclbl .n { font-size: 11.5px; font-weight: 700; color: var(--fg-muted); background: var(--surface-tint-light); border: 1px solid var(--border-soft); border-radius: 9999px; padding: 2px 9px; }
.rl-seclbl .ln { flex: 1 1 auto; height: 1px; background: var(--border-soft); }

.rl-section + .rl-section { margin-top: 40px; }

/* ===================================================================
   HERO — featured (next / live) Rali with big countdown
   =================================================================== */
.rl-hero {
  position: relative; border-radius: 26px; padding: 2px; overflow: hidden; margin-bottom: 40px;
  background: linear-gradient(var(--bg-elev-1), var(--bg-elev-1)) padding-box,
              linear-gradient(120deg, #5B8DEF, #B968C7, #E94E8B) border-box;
  border: 2px solid transparent;
  box-shadow: 0 0 0 5px rgba(185,104,199,0.06), 0 26px 60px rgba(185,104,199,0.16);
}
.rl-hero .inner {
  position: relative; background: var(--bg-elev-1); border-radius: 24px; overflow: hidden;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 0; min-height: 200px;
}
.rl-hero .inner::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 12% 10%, rgba(91,141,239,0.16), transparent 60%),
              radial-gradient(60% 80% at 92% 0%, rgba(233,78,139,0.16), transparent 60%);
}
.rl-hero-l { position: relative; padding: 26px 28px; display: flex; flex-direction: column; }
.rl-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 9999px; margin-bottom: 14px;
  background: rgba(185,104,199,0.16); color: #E6C2FF; border: 1px solid rgba(185,104,199,0.3);
}
html[data-theme="light"] .rl-hero-eyebrow { color: #8E45AE; background: rgba(185,104,199,0.12); }
.rl-hero-eyebrow.live { background: rgba(52,211,153,0.15); color: #34D399; border-color: rgba(52,211,153,0.35); }
.rl-hero-eyebrow.live .dot { width: 7px; height: 7px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: rlPulse 1.8s ease-out infinite; }
@keyframes rlPulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,0.6);} 70% { box-shadow: 0 0 0 7px rgba(52,211,153,0);} 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0);} }
.rl-hero-eyebrow svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.2; fill: none; }

.rl-hero h2 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.08; letter-spacing: -0.02em; color: var(--fg); }
.rl-hero .meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: var(--fg-secondary); margin-bottom: auto; }
.rl-hero .meta-row .m { display: inline-flex; align-items: center; gap: 6px; }
.rl-hero .meta-row svg { width: 14px; height: 14px; stroke: var(--fg-muted); stroke-width: 2; fill: none; }

/* countdown */
.rl-count { display: flex; gap: 10px; margin: 20px 0 18px; }
.rl-count .u { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 58px; }
.rl-count .u .v {
  font-family: var(--font-display); font-weight: 900; font-size: 38px; line-height: 1; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; width: 100%; text-align: center; padding: 12px 0; border-radius: 14px;
  background: var(--surface-tint-light); border: 1px solid var(--border-soft);
  background-clip: padding-box; color: var(--fg);
}
.rl-count .u .v .grad,
.rl-count.is-grad .v {
  background: var(--k-gradient-h); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.rl-count .u .k { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); }
.rl-count .sepc { align-self: flex-start; font-family: var(--font-display); font-weight: 900; font-size: 34px; line-height: 1; color: var(--fg-muted); padding-top: 10px; }

.rl-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rl-hero-btn {
  height: 42px; padding: 0 20px; border-radius: 9999px; border: 1px solid var(--border); cursor: pointer;
  background: var(--bg-elev-2); color: var(--fg); font-weight: 700; font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 8px; transition: all var(--t-fast); white-space: nowrap; text-decoration: none;
}
.rl-hero-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.rl-hero-btn:hover { background: var(--surface-tint); }
.rl-hero-btn.primary { background: var(--k-gradient-h); border-color: transparent; color: #fff; box-shadow: var(--shadow-button); }
.rl-hero-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(233,78,139,0.45); }

/* hero right side — l'image est en position absolue : c'est le contenu texte (à
   gauche) qui fixe la hauteur du hero, l'image remplit le reste sans l'allonger. */
.rl-hero-r { position: relative; border-left: 1px solid var(--border-soft); padding: 0; }
.rl-hero-cover { position: absolute; inset: 24px; border-radius: 18px; overflow: hidden; background: var(--surface-tint-light); }
.rl-hero-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.rl-hero-cover .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 46px; }

/* QR « jouer sur mobile » (mode simple) */
.rl-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; width: 100%; }
.rl-qr .qrbox { width: 150px; height: 150px; border-radius: 16px; padding: 12px; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,0.3); position: relative; }
.rl-qr .qrbox canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; border-radius: 6px; }
.rl-qr .qrbox .badge { position: absolute; inset: 0; margin: auto; width: 38px; height: 38px; border-radius: 10px; background: var(--k-gradient); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 4px #fff; }
.rl-qr .qrbox .badge span { font-family: var(--font-display); font-weight: 900; color: #fff; font-size: 18px; }
.rl-qr .cap { font-size: 12.5px; color: var(--fg-secondary); max-width: 220px; line-height: 1.4; }
.rl-qr .cap b { color: var(--fg); font-weight: 700; }

/* ===================================================================
   GRID / LIST of cards
   =================================================================== */
.rl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.rl-root[data-view="list"] .rl-grid { grid-template-columns: 1fr; gap: 12px; }

.rl-card {
  position: relative; border-radius: 20px; background: var(--bg-elev-1); border: 1px solid var(--border-soft);
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.rl-card:hover { transform: translateY(-3px); border-color: rgba(185,104,199,0.32); box-shadow: 0 16px 38px rgba(0,0,0,0.32); }
html[data-theme="light"] .rl-card:hover { box-shadow: 0 16px 38px rgba(40,30,70,0.12); }
.rl-card.past { opacity: 0.92; }

/* cover strip */
.rl-card .cover { position: relative; height: 116px; overflow: hidden; flex: 0 0 auto; background: var(--surface-tint-light); }
.rl-card .cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.rl-card .cover .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.rl-card .cover .scrim { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.45)); pointer-events: none; }
.rl-card .cover .chips { position: absolute; top: 11px; left: 11px; right: 11px; display: flex; align-items: center; gap: 7px; }
.rl-card .cover .chips .spacer { flex: 1 1 auto; }

/* status / state pill */
.rl-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 9999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.01em; backdrop-filter: blur(6px);
  background: rgba(0,0,0,0.42); color: #fff; border: 1px solid rgba(255,255,255,0.16);
}
.rl-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rl-pill svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.4; fill: none; }
.rl-pill.live { background: rgba(16,185,129,0.92); border-color: transparent; }
.rl-pill.live .dot { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); animation: rlPulse 1.6s ease-out infinite; }
.rl-pill.scheduled { background: rgba(91,141,239,0.92); border-color: transparent; }
.rl-pill.draft { background: rgba(120,120,130,0.85); border-color: transparent; }
.rl-pill.done { background: rgba(0,0,0,0.5); }
.rl-pill.win { background: rgba(234,179,8,0.95); color: #1A1206; border-color: transparent; }
.rl-pill.lose { background: rgba(0,0,0,0.5); }
.rl-pill.notplayed { background: rgba(233,78,139,0.95); border-color: transparent; }
.rl-pill.registered { background: rgba(91,141,239,0.92); border-color: transparent; }

/* body */
.rl-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 11px; flex: 1 1 auto; }
.rl-card .name { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; color: var(--fg); }
.rl-card .metas { display: flex; flex-direction: column; gap: 6px; }
.rl-card .metas .m { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-secondary); }
.rl-card .metas .m svg { width: 14px; height: 14px; stroke: var(--fg-muted); stroke-width: 2; fill: none; flex: 0 0 auto; }
.rl-card .metas .m.warn { color: var(--k-blue); font-weight: 600; }
.rl-card .metas .m.gain { color: #10B981; font-weight: 600; min-width: 0; }
.rl-card .metas .m.gain .gi { font-size: 13px; line-height: 1; flex: 0 0 auto; }
html[data-theme="light"] .rl-card .metas .m.gain { color: #0F9D6E; }

/* fill bar (pro) */
.rl-fill .fhead { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.rl-fill .fhead .l { font-size: 11.5px; color: var(--fg-muted); font-weight: 600; }
.rl-fill .fhead .r { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--fg-secondary); }
.rl-fill .fhead .r b { color: var(--fg); }
.rl-fill .fhead .r .pct { color: var(--fg-muted); font-weight: 700; margin-left: 4px; }
.rl-fill .track { height: 7px; border-radius: 9999px; background: var(--surface-tint-light); overflow: hidden; }
.rl-fill .track i { display: block; height: 100%; width: 0; border-radius: 9999px; background: var(--k-gradient-h); transition: width 1s cubic-bezier(0.16,1,0.3,1) 0.1s; }
.rl-fill .track i.low { background: linear-gradient(90deg, #E94E8B, #F59E0B); }
.rl-fill .track i.full { background: linear-gradient(90deg, #10B981, #34D399); }

/* result line (simple) */
.rl-result { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 13px; }
.rl-result .ico { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.rl-result .ico svg { width: 18px; height: 18px; stroke-width: 2; fill: none; }
.rl-result .txt { min-width: 0; flex: 1 1 auto; }
.rl-result .txt .l1 { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; color: var(--fg); }
.rl-result .txt .l2 { font-size: 11.5px; color: var(--fg-secondary); margin-top: 1px; }
.rl-result.win { background: rgba(234,179,8,0.1); border: 1px solid rgba(234,179,8,0.28); }
.rl-result.win .ico { background: rgba(234,179,8,0.18); } .rl-result.win .ico svg { stroke: #EAB308; }
.rl-result.win .l1 { color: #EAB308; }
html[data-theme="light"] .rl-result.win .l1 { color: #B08600; }
.rl-result.lose { background: var(--surface-tint-light); border: 1px solid var(--border-soft); }
.rl-result.lose .ico { background: var(--surface-tint); } .rl-result.lose .ico svg { stroke: var(--fg-secondary); }
.rl-result.notplayed { background: rgba(233,78,139,0.1); border: 1px solid rgba(233,78,139,0.28); }
.rl-result.notplayed .ico { background: rgba(233,78,139,0.18); } .rl-result.notplayed .ico svg { stroke: var(--k-pink); }
.rl-result.notplayed .l1 { color: #FF6FA5; }
html[data-theme="light"] .rl-result.notplayed .l1 { color: #C72E68; }
.rl-result.registered { background: rgba(91,141,239,0.1); border: 1px solid rgba(91,141,239,0.26); }
.rl-result.registered .ico { background: rgba(91,141,239,0.18); } .rl-result.registered .ico svg { stroke: var(--k-blue); }

/* card footer */
.rl-card .foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding-top: 4px; }
.rl-card .foot.actions { flex-wrap: wrap; }
.rl-act {
  height: 34px; padding: 0 12px; border-radius: 9999px; border: 1px solid var(--border-soft); cursor: pointer;
  background: var(--surface-tint-light); color: var(--fg-secondary); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; transition: all var(--t-fast); text-decoration: none;
}
.rl-act svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
.rl-act:hover { color: var(--fg); background: var(--surface-tint); border-color: var(--border); }
.rl-act.icon { width: 34px; padding: 0; justify-content: center; }
.rl-act.primary { background: var(--k-gradient-h); border-color: transparent; color: #fff; flex: 1 1 auto; justify-content: center; box-shadow: 0 6px 16px rgba(233,78,139,0.28); }
.rl-act.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(233,78,139,0.4); }
.rl-act.gold { background: var(--k-gradient-pro); border-color: transparent; color: #1A1206; flex: 1 1 auto; justify-content: center; }
.rl-act.grow { flex: 1 1 auto; justify-content: center; }
.rl-card .foot .spacer { flex: 1 1 auto; }

/* ===== LIST MODE — flatten cards into rows ===== */
.rl-root[data-view="list"] .rl-card { flex-direction: row; align-items: stretch; }
.rl-root[data-view="list"] .rl-card .cover { width: 150px; height: auto; flex: 0 0 150px; }
.rl-root[data-view="list"] .rl-card .cover .chips { top: 9px; left: 9px; right: 9px; }
.rl-root[data-view="list"] .rl-card .body { flex-direction: row; align-items: center; gap: 20px; flex-wrap: wrap; padding: 14px 18px; }
.rl-root[data-view="list"] .rl-card .body .lead { flex: 1 1 220px; min-width: 200px; display: flex; flex-direction: column; gap: 8px; }
.rl-root[data-view="list"] .rl-card .body .rl-fill { flex: 1 1 180px; min-width: 160px; }
.rl-root[data-view="list"] .rl-card .body .rl-result { flex: 1 1 220px; min-width: 200px; }
.rl-root[data-view="list"] .rl-card .foot { margin-top: 0; flex: 0 0 auto; }

/* mode-scoped element visibility inside cards */
.rl-root[data-mode="pro"]    .simple-only { display: none !important; }
.rl-root[data-mode="simple"] .pro-only    { display: none !important; }

/* empty state */
.rl-empty { text-align: center; padding: 48px 20px; color: var(--fg-muted); }
.rl-empty svg { width: 40px; height: 40px; stroke: var(--fg-muted); stroke-width: 1.6; fill: none; margin-bottom: 12px; opacity: 0.6; }
.rl-empty .t { font-size: 15px; font-weight: 700; color: var(--fg-secondary); }
.rl-empty .s { font-size: 13px; margin-top: 4px; }

/* entrance */
.rl-rise { opacity: 0; transform: translateY(12px); animation: rlRise 0.5s var(--ease-out) forwards; }
@keyframes rlRise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rl-rise { animation: none; opacity: 1; transform: none; } }

/* toast */
.rl-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--bg-elev-2); color: var(--fg); border: 1px solid var(--border);
  padding: 11px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 18px 44px rgba(0,0,0,0.5); opacity: 0; pointer-events: none; z-index: 200;
  transition: opacity var(--t-fast), transform var(--t-base) var(--ease-out);
}
.rl-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1080px) {
  .rl-hero .inner { grid-template-columns: 1fr; }
  .rl-hero-r { border-left: 0; border-top: 1px solid var(--border-soft); height: 200px; }
}
@media (max-width: 720px) {
  .rl-topbar { padding: 14px 16px; }
  .rl-scroll { padding: 18px 16px 48px; }
}
