/* Lanvura School Rush — duel (kap. 10b): rozcestník, čekárna s kódem a QR, hledání, výsledek, duch soupeře.
   Navazuje na rush.css (karty .sr-card, tlačítka .sr-play / .sr-btn2, barvy --sr-ink / --sr-violet, tmavý režim). */
html[data-sr-duel] #sr-pause-btn { display: none !important; } /* v duelu se nepauzuje */

.dl-open { flex-direction: column; gap: 0; margin-top: 2px; border-color: #c9c0ff; background: linear-gradient(135deg, #f5f3ff, #e0f2fe); }
.dl-open small, .dl-big small { display: block; font-size: 11.5px; font-weight: 700; color: #6b6590; }
.dl-big { flex-direction: column; gap: 0; padding: 12px 14px; font-size: 16px; }
.dl-card { text-align: center; }
.dl-err { margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: #fee2e2; color: #991b1b; font-weight: 800; font-size: 14px; }
.dl-net { margin: 6px 0; font-size: 13px; font-weight: 800; color: #b45309; }
.dl-me { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 4px 0 6px; padding: 6px 10px; border-radius: 16px; background: #f3f0ff; font-size: 14px; }
.dl-me .sr-link { margin: 0; font-size: 12px; }
.dl-code { display: flex; gap: 8px; }
.dl-code input { flex: 1; min-width: 0; padding: 10px 14px; border: 2px solid #e4e0fb; border-radius: 999px; font: inherit; font-size: 22px; font-weight: 900;
  letter-spacing: .3em; text-align: center; text-transform: uppercase; color: var(--sr-ink); background: #fff; }
.dl-code .sr-btn2 { width: auto; margin: 0; }
.dl-check { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 10px 0 4px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.dl-check input { width: 20px; height: 20px; accent-color: var(--sr-violet); }
.dl-name { display: flex; flex-direction: column; gap: 4px; margin: 8px auto 0; max-width: 280px; font-size: 12px; font-weight: 700; color: #6b6590; }
.dl-name input, .dl-fam input { padding: 8px 12px; border: 2px solid #e4e0fb; border-radius: 12px; font: inherit; font-size: 15px; color: var(--sr-ink); background: #fff; text-align: center; }

.dl-bigcode { display: flex; gap: 8px; justify-content: center; margin: 6px 0 10px; }
.dl-bigcode span { width: 58px; height: 70px; display: grid; place-items: center; border-radius: 16px; font-size: 40px; font-weight: 900; color: #fff;
  background: linear-gradient(160deg, #6d5dfc, #a855f7); box-shadow: 0 6px 0 #4c3fd1, 0 10px 20px rgba(109, 93, 252, .35); animation: dl-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.dl-bigcode span:nth-child(2) { animation-delay: .06s; } .dl-bigcode span:nth-child(3) { animation-delay: .12s; } .dl-bigcode span:nth-child(4) { animation-delay: .18s; }
.dl-qr { margin: 0 auto 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dl-qr img { width: 180px; height: 180px; background: #fff; border-radius: 18px; padding: 6px; }
.dl-qr figcaption { font-size: 12px; color: #6b6590; }
.dl-wait { margin: 10px 0 4px; font-weight: 800; font-size: 15px; }
.dl-dots::after { content: "⏳"; display: inline-block; animation: dl-spin 1.6s linear infinite; }

.dl-radar { position: relative; width: 150px; height: 150px; margin: 10px auto; display: grid; place-items: center; }
.dl-radar i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--sr-violet); opacity: 0; animation: dl-ring 2.4s ease-out infinite; }
.dl-radar i:nth-child(3) { animation-delay: .8s; } .dl-radar i:nth-child(4) { animation-delay: 1.6s; }

.dl-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin: 10px 0; }
.dl-vsx { font-size: 22px; font-weight: 900; color: #ec4899; text-shadow: 0 2px 0 #fff3b0; }
.dl-pl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 4px; border-radius: 20px; background: #f3f0ff; min-width: 0; }
.dl-pl b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-pl small { font-size: 11px; color: #6b6590; line-height: 1.25; }
.dl-pl.win { background: linear-gradient(160deg, #fff7cc, #ffe3f1); box-shadow: 0 0 0 3px #ffd23f; animation: dl-pop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.dl-sc { font-size: 30px; font-weight: 900; line-height: 1.1; background: linear-gradient(135deg, #6d5dfc, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dl-crown { position: absolute; top: -14px; font-size: 26px; font-style: normal; animation: dl-bob 1.2s ease-in-out infinite; }
.dl-intro .dl-pl:first-child { animation: dl-in-l .5s ease-out both; } .dl-intro .dl-pl:last-child { animation: dl-in-r .5s ease-out both; }
.dl-ghosty { opacity: .4; }

.dl-fam { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; padding: 10px; border-radius: 18px; background: #f3f0ff; }
.dl-heroes { display: flex; gap: 6px; justify-content: center; }
.dl-hero { border: 3px solid transparent; background: #fff; border-radius: 14px; padding: 2px; cursor: pointer; }
.dl-hero.on { border-color: var(--sr-violet); }
.dl-grade { font-size: 13px; font-weight: 700; }
.dl-grade select { font: inherit; padding: 4px 8px; border-radius: 10px; border: 2px solid #e4e0fb; background: #fff; color: var(--sr-ink); }
.dl-turn { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 6px 0; }
.dl-turn b { font-size: 22px; } .dl-turn small { color: #6b6590; }

/* duch soupeře: malá karta vlevo pod skóre (portrét, body, série, průběh obou, náskok, zbývající čas) */
.dl-ghost { position: fixed; z-index: 5; left: 10px; top: calc(var(--sat) + 118px); width: 88px; padding: 6px 6px 7px; border-radius: 18px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none;
  background: rgba(31, 24, 70, .55); color: #fff; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border: 2px solid rgba(255, 255, 255, .25); }
.dl-ghost[hidden] { display: none; }
.dl-ghost canvas { width: 52px; height: 52px; }
.dl-gname { font-size: 11px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-gscore { font-size: 19px; font-weight: 900; line-height: 1; }
.dl-gcombo { font-size: 11px; font-weight: 800; min-height: 13px; }
.dl-gbar { width: 100%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.dl-gbar i { display: block; height: 100%; width: 0; border-radius: 3px; background: #f472b6; transition: width .3s; }
.dl-gbar.m i { background: #4ade80; }
.dl-glead { font-size: 11px; font-weight: 900; }
.dl-ghost.ahead { border-color: #4ade80; } .dl-ghost.ahead .dl-glead { color: #86efac; }
.dl-ghost.behind { border-color: #f472b6; } .dl-ghost.behind .dl-glead { color: #fbcfe8; }
.dl-gtime { font-size: 13px; font-weight: 900; color: #fff36b; }
.dl-gtime:empty, .dl-gcombo:empty { display: none; }
.dl-gpop { position: absolute; top: 0; right: -6px; font-size: 14px; font-weight: 900; color: #fff36b; text-shadow: 0 1px 0 #1f1846; animation: dl-up .9s ease-out forwards; }
@media (orientation: landscape) and (max-height: 500px) { .dl-ghost { top: calc(var(--sat) + 96px); width: 80px; } .dl-ghost canvas { width: 40px; height: 40px; } }

/* ── souboj více hráčů (třída): čekárna, tabule, stupně vítězů, živé pořadí ve hře ── */
.dl-groupbtn { border-color: #fbcfe8; background: linear-gradient(135deg, #fff1f7, #fef9c3); }
.dl-card.dl-wide { max-width: 980px; }
.dl-glob { display: grid; gap: 4px 22px; }
@media (min-width: 760px) { .dl-glob { grid-template-columns: minmax(260px, 340px) 1fr; align-items: start; text-align: left; } .dl-glob .dl-gjoin { text-align: center; position: sticky; top: 0; } }
.dl-qr-big img { width: 200px; height: 200px; }
@media (min-width: 760px) { .dl-qr-big img { width: 260px; height: 260px; } }
.dl-url { margin: 2px 0 4px; font-size: 13px; font-weight: 800; color: var(--sr-violet); word-break: break-all; }
.dl-g3 { grid-template-columns: repeat(3, 1fr); }
.dl-ggrade { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.dl-ggrade select:disabled { opacity: .45; }
.dl-gstart:disabled { filter: grayscale(.7); opacity: .6; cursor: not-allowed; }
.dl-gsum { margin: 4px 0 8px; font-weight: 800; font-size: 14px; color: #4c3fd1; }
.dl-gempty { margin: 6px 0; padding: 12px; border-radius: 14px; border: 2px dashed #d9d3fb; color: #6b6590; font-weight: 700; font-size: 14px; }
.dl-roster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.dl-ri { position: relative; display: grid; grid-template-columns: 30px 1fr auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center;
  padding: 4px 6px; border-radius: 12px; background: #f3f0ff; text-align: left; min-width: 0; }
.dl-ri.new { animation: dl-pop .45s cubic-bezier(.3, 1.6, .5, 1) both; } /* právě přišel */
.dl-ri canvas { grid-row: 1 / 3; width: 30px; height: 30px; }
.dl-ri b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-ri small { grid-column: 2; font-size: 11px; color: #6b6590; }
.dl-ri.me { box-shadow: 0 0 0 2px var(--sr-violet); }
.dl-ri.off { opacity: .5; }
.dl-kick { grid-column: 3; grid-row: 1 / 3; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff; color: #be123c; font-weight: 900; cursor: pointer; }
.dl-kick:hover { background: #fee2e2; }

.dl-gcount { font-size: 96px; font-weight: 900; line-height: 1; margin: 10px 0; background: linear-gradient(135deg, #6d5dfc, #ec4899); -webkit-background-clip: text;
  background-clip: text; color: transparent; animation: dl-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.dl-gcount-over { font-size: 120px; }
.dl-gclock { display: inline-block; min-width: 3.2ch; padding: 0 8px; border-radius: 10px; background: #1f1846; color: #fff36b; font-variant-numeric: tabular-nums; }

.dl-board .dl-more { text-align: center; opacity: .7; font-weight: 800; padding: 4px 0; }
.dl-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; text-align: left; }
@media (min-width: 900px) { .dl-wide .dl-board { grid-template-columns: 1fr 1fr; column-gap: 14px; } }
.dl-row { display: grid; grid-template-columns: 30px 30px minmax(0, 1fr) minmax(50px, 1.1fr) auto auto; align-items: center; gap: 8px;
  padding: 5px 10px 5px 6px; border-radius: 14px; background: #f3f0ff; transition: transform .3s; }
.dl-final .dl-row { grid-template-columns: 30px 30px minmax(0, 1fr) auto; }
.dl-row canvas { width: 30px; height: 30px; }
.dl-rk { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-weight: 900; font-size: 14px; }
.dl-row:nth-child(1) .dl-rk { background: #ffd23f; } .dl-row:nth-child(2) .dl-rk { background: #e5e7eb; } .dl-row:nth-child(3) .dl-rk { background: #fcd9b6; }
.dl-row b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-prog { height: 10px; border-radius: 5px; background: rgba(109, 93, 252, .15); overflow: hidden; }
.dl-prog i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #6d5dfc, #ec4899); transition: width .4s; }
.dl-ans, .dl-res { font-size: 13px; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dl-res { color: #166534; }
.dl-flag { font-size: 16px; animation: dl-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.dl-row.fin { background: linear-gradient(90deg, #dcfce7, #f3f0ff); }
.dl-row.me { box-shadow: 0 0 0 3px var(--sr-violet); }
.dl-row.off { opacity: .55; }
@media (max-width: 420px) { .dl-row { grid-template-columns: 26px 26px minmax(0, 1fr) auto; } .dl-row .dl-prog { display: none; } }

.dl-podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin: 18px 0 10px; }
.dl-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 31%; max-width: 170px; min-width: 0; }
.dl-step b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-step small { font-size: 12px; font-weight: 800; color: #4c3fd1; white-space: nowrap; }
.dl-plinth { display: grid; place-items: center; width: 100%; margin-top: 4px; border-radius: 14px 14px 6px 6px; color: #fff; font-size: 26px; font-weight: 900;
  background: linear-gradient(180deg, #a855f7, #6d5dfc); animation: dl-rise .7s cubic-bezier(.3, 1.4, .5, 1) both; }
.dl-step.s1 .dl-plinth { height: 92px; background: linear-gradient(180deg, #ffd23f, #f59e0b); animation-delay: .5s; }
.dl-step.s2 .dl-plinth { height: 66px; background: linear-gradient(180deg, #e5e7eb, #9ca3af); animation-delay: .25s; }
.dl-step.s3 .dl-plinth { height: 48px; background: linear-gradient(180deg, #fdba74, #c2410c); }
.dl-step .dl-crown { top: -22px; }
.dl-step.me b { color: var(--sr-violet); }

/* živé pořadí ve hře: místo ducha (vlevo pod skóre) */
.dl-rank { position: fixed; z-index: 5; left: 10px; top: calc(var(--sat) + 118px); min-width: 88px; padding: 7px 9px; border-radius: 18px; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 1px; background: rgba(31, 24, 70, .6); color: #fff; border: 2px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dl-rank[hidden] { display: none; }
.dl-rpos { font-size: 22px; font-weight: 900; line-height: 1.05; white-space: nowrap; }
.dl-rok { font-size: 13px; font-weight: 900; color: #86efac; }
.dl-rlead { font-size: 10.5px; font-weight: 800; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff36b; }
.dl-rlead:empty { display: none; }
.dl-rank.up { border-color: #4ade80; animation: dl-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.dl-rank.down { border-color: #f472b6; }
@media (orientation: landscape) and (max-height: 500px) { .dl-rank { top: calc(var(--sat) + 96px); } }
@keyframes dl-rise { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }

.dl-confetti { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.dl-confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: dl-fall linear forwards; }

@keyframes dl-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dl-spin { to { transform: rotate(360deg); } }
@keyframes dl-ring { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }
@keyframes dl-bob { 50% { transform: translateY(-4px) rotate(-6deg); } }
@keyframes dl-up { to { transform: translateY(-26px); opacity: 0; } }
@keyframes dl-fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes dl-in-l { from { transform: translateX(-60px); opacity: 0; } }
@keyframes dl-in-r { from { transform: translateX(60px); opacity: 0; } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dl-open { background: linear-gradient(135deg, #2e2470, #12355a); border-color: #3b3480; color: #f3f0ff; }
  :root:not([data-theme="light"]) .dl-open small, :root:not([data-theme="light"]) .dl-big small, :root:not([data-theme="light"]) .dl-pl small,
  :root:not([data-theme="light"]) .dl-qr figcaption, :root:not([data-theme="light"]) .dl-name, :root:not([data-theme="light"]) .dl-turn small { color: #b8b0e8; }
  :root:not([data-theme="light"]) .dl-me, :root:not([data-theme="light"]) .dl-pl, :root:not([data-theme="light"]) .dl-fam { background: #2b2560; }
  :root:not([data-theme="light"]) .dl-pl.win { background: linear-gradient(160deg, #4a3b12, #4a1f3a); }
  :root:not([data-theme="light"]) .dl-code input, :root:not([data-theme="light"]) .dl-name input, :root:not([data-theme="light"]) .dl-fam input,
  :root:not([data-theme="light"]) .dl-grade select, :root:not([data-theme="light"]) .dl-hero { background: #221d4f; border-color: #3b3480; color: #f3f0ff; }
  :root:not([data-theme="light"]) .dl-hero.on { border-color: #a79bff; }
  :root:not([data-theme="light"]) .dl-err { background: #4c1d1d; color: #fecaca; }
  :root:not([data-theme="light"]) .dl-groupbtn { background: linear-gradient(135deg, #4a1f3a, #3f3a12); border-color: #6b2f55; color: #f3f0ff; }
  :root:not([data-theme="light"]) .dl-ri, :root:not([data-theme="light"]) .dl-row { background: #2b2560; }
  :root:not([data-theme="light"]) .dl-row.fin { background: linear-gradient(90deg, #14532d, #2b2560); }
  :root:not([data-theme="light"]) .dl-rk, :root:not([data-theme="light"]) .dl-kick { background: #221d4f; color: #f3f0ff; }
  :root:not([data-theme="light"]) .dl-row:nth-child(-n+3) .dl-rk { color: #1f1846; }
  :root:not([data-theme="light"]) .dl-ri small, :root:not([data-theme="light"]) .dl-gempty { color: #b8b0e8; }
  :root:not([data-theme="light"]) .dl-gsum, :root:not([data-theme="light"]) .dl-step small, :root:not([data-theme="light"]) .dl-url { color: #c4b5fd; }
  :root:not([data-theme="light"]) .dl-res { color: #86efac; }
}
@media (prefers-reduced-motion: reduce) {
  .dl-bigcode span, .dl-pl.win, .dl-crown, .dl-radar i, .dl-dots::after, .dl-intro .dl-pl,
  .dl-ri, .dl-gcount, .dl-flag, .dl-plinth, .dl-rank.up { animation: none; }
}

/* čekárna: zvonek a upozornění, pozvánka za běhu závodu, „chce hrát znovu“ (majitel 15. 11. 2026) */
.dl-alert { display: flex; flex-direction: column; gap: 6px; align-items: stretch; margin: 6px 0 0; font-size: 13px; text-align: center; opacity: .85; }
.dl-running { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 14px; text-align: center; background: rgba(255, 255, 255, .1); }
.dl-running small { opacity: .8; }
.dl-again { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; margin-bottom: 6px; border-radius: 14px; background: rgba(74, 222, 128, .16); }
.dl-again small { opacity: .8; }
