/* Lanvura School Rush — žebříčky (kap. 5): „Zapiš se!“ po hře, pořadí s animací, obrazovka 🏆 Žebříček, souboj zemí.
   Navazuje na rush.css (karty .sr-card, tlačítka .sr-play / .sr-btn2, barvy --sr-ink / --sr-violet) a duel.css (konfety). */
.lb-open { flex-direction: column; gap: 0; border-color: #ffd98a; background: linear-gradient(135deg, #fff7d6, #ffe4f1); }
.lb-open small { display: block; font-size: 11.5px; font-weight: 700; color: #8a6d1f; }
.lb-open[hidden] { display: none; }
.lb-slot:empty { display: none; }
.lb-note { text-align: center; }
.lb-saving { text-align: center; font-weight: 800; margin: 10px 0; }

/* bez internetu: klidně a přátelsky. Holub čeká na signál a po doručení odletí. */
.lb-netnote { margin: 8px 0 2px; padding: 8px 12px; border-radius: 14px; background: #eef2ff; color: #3f3a78; font-size: 13px; font-weight: 700; text-align: center; }
.lb-wait, .lb-done { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0; padding: 10px 14px; border-radius: 16px; background: #eef2ff; color: #3f3a78; font-size: 14px; font-weight: 800; text-align: left; }
.lb-done { background: #dcfce7; color: #14532d; }
.lb-bird { flex: none; display: inline-block; font-style: normal; font-size: 22px; line-height: 1; animation: lb-bob 1.6s ease-in-out infinite; }
.lb-fly { animation: lb-fly 1.1s ease-in both; }
@keyframes lb-fly { 0% { transform: translate(0, 0) rotate(0); } 55% { transform: translate(10px, -8px) rotate(-10deg); } 100% { transform: translate(0, 0) rotate(0); } }
.lb-out:empty { display: none; }
.lb-out-list { list-style: none; display: grid; gap: 6px; margin: 8px 0; padding: 0; }
.lb-out-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: #eef2ff; color: #3f3a78; font-size: 13px; font-weight: 700; line-height: 1.3; }
.lb-out-row > span { flex: 1; min-width: 0; }
.lb-out-ok { background: #dcfce7; color: #14532d; }
.lb-out-bad { background: #fff7d6; color: #6b4e00; }
.lb-out-go { flex: none; width: auto; margin: 0; padding: 7px 12px; font-size: 13px; }
.lb-out-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(31, 24, 70, .08); color: inherit; font: inherit; font-weight: 900; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .lb-bird, .lb-fly { animation: none; } }

.flag { display: inline-block; width: 1.45em; height: 1.08em; border-radius: 3px; overflow: hidden; vertical-align: -.18em; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.flag svg { display: block; width: 100%; height: 100%; }
.lb-globe { box-shadow: none; font-size: 1em; line-height: 1.08em; text-align: center; }

/* formulář „Zapiš se do žebříčku!“ */
.lb-enter { margin: 12px 0 4px; padding: 14px 14px 10px; border-radius: 22px; text-align: center;
  background: linear-gradient(160deg, #fff7cc, #ffe3f1 60%, #e0f2fe); box-shadow: 0 0 0 3px #ffd23f inset; animation: lb-in .45s cubic-bezier(.3, 1.5, .5, 1) both; }
.lb-enter.lb-edit { background: #f3f0ff; box-shadow: none; animation: none; }
.lb-burst { font-size: 44px; line-height: 1; animation: lb-bob 1.4s ease-in-out infinite; }
.lb-title { margin: 4px 0 2px; font-size: 22px; font-weight: 900; }
.lb-sub { margin: 0 0 8px; font-size: 13.5px; color: #4b4470; }
.lb-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0 10px; }
.lb-chips span { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .85); font-size: 12.5px; font-weight: 700; }
.lb-chips b { color: var(--sr-violet); }
.lb-field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; text-align: left; font-size: 12px; font-weight: 800; color: #6b6590; }
.lb-nickrow, .lb-country { display: flex; gap: 8px; align-items: center; }
.lb-nickrow input, .lb-country select { flex: 1; min-width: 0; padding: 10px 14px; border: 2px solid #e4e0fb; border-radius: 14px; font: inherit;
  font-size: 17px; font-weight: 800; color: var(--sr-ink); background: #fff; user-select: text; -webkit-user-select: text; }
.lb-nickrow input:focus, .lb-country select:focus { outline: 3px solid var(--sr-violet); outline-offset: 1px; }
.lb-dice { flex: none; width: 48px; height: 48px; border: 0; border-radius: 14px; font-size: 24px; cursor: pointer; background: #fff; box-shadow: 0 3px 0 #e4e0fb; }
.lb-dice:active { transform: translateY(2px) rotate(25deg); box-shadow: none; }
.lb-cflag .flag { width: 34px; height: 25px; }
.lb-hint { font-weight: 600; }
.lb-err { color: #b91c1c; font-weight: 800; }
.lb-err[hidden] { display: none; }
.lb-go { margin-top: 10px; }
.lb-priv { margin: 8px 0 0; font-size: 11.5px; color: #6b6590; text-align: center; }
.lb-priv a { color: inherit; }

/* Lanvura ID (16+) */
.lb-lid { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 10px 14px; border-radius: 14px; text-decoration: none; text-align: left;
  color: #fff; background: var(--lv-brand, #5b4bdb); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.lb-lid small { display: block; font-size: 11.5px; font-weight: 600; opacity: .9; }
.lb-lid-logo { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #fff; color: var(--lv-brand, #5b4bdb); font-weight: 900; }
.lb-kid { display: block; margin: 2px 0 6px; font-size: 12.5px; text-align: center; color: inherit; opacity: .8; }
.lb-lidon { margin: 8px 0 0; font-size: 13px; text-align: center; }

/* pořadí po zápisu */
.lb-rankcard { margin: 12px 0 4px; padding: 14px; border-radius: 22px; text-align: center; background: linear-gradient(160deg, #ede9ff, #e0f2fe);
  animation: lb-in .45s cubic-bezier(.3, 1.5, .5, 1) both; }
.lb-rankcard.gold { background: linear-gradient(160deg, #fff7cc, #ffe3f1); box-shadow: 0 0 0 3px #ffd23f inset; }
.lb-medal { font-size: 48px; line-height: 1; animation: lb-bob 1.3s ease-in-out infinite; }
.lb-ranknum { display: block; margin: 4px 0 0; font-size: 40px; font-weight: 900; line-height: 1.1;
  background: linear-gradient(135deg, #6d5dfc, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lb-ranknum.small { font-size: 18px; }
.lb-ranknum.pop { animation: lb-pop .5s cubic-bezier(.3, 1.8, .5, 1); }
.lb-rankcard small { display: block; font-size: 12.5px; color: #6b6590; }
.lb-up, .lb-keep { display: inline-block; margin: 6px 0 2px; font-style: normal; font-weight: 900; color: #15803d; }
.lb-keep { color: #6b6590; font-weight: 700; }

/* obrazovka žebříčku */
.lb-card { padding-top: 16px; }
.lb-head { margin-bottom: 8px; }
.lb-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.lb-tabs::-webkit-scrollbar { display: none; }
.lb-tabs button, .lb-seg button { flex: none; padding: 7px 12px; border: 2px solid #e4e0fb; border-radius: 999px; background: #fff; font: inherit;
  font-size: 13px; font-weight: 800; color: var(--sr-ink); cursor: pointer; white-space: nowrap; }
.lb-tabs button.on, .lb-seg button.on { background: var(--sr-violet); border-color: var(--sr-violet); color: #fff; }
.lb-filters { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.lb-seg { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.lb-seg::-webkit-scrollbar { display: none; }
.lb-seg button { padding: 5px 10px; font-size: 12px; }
.lb-scope button { padding: 7px 14px; font-size: 13.5px; }
.lb-body { min-height: 120px; }
.lb-empty { margin: 24px 0; text-align: center; font-weight: 700; color: #6b6590; }
.lb-list { list-style: none; margin: 0; padding: 0; }
.lb-row { display: grid; grid-template-columns: 34px 28px 1fr auto 28px; align-items: center; gap: 6px; padding: 7px 6px; border-radius: 12px; font-size: 14.5px; }
.lb-row:nth-child(odd) { background: rgba(109, 93, 252, .05); }
.lb-row.me { background: linear-gradient(90deg, #fff3b0, #ffe3f1); box-shadow: 0 0 0 2px #ffd23f inset; animation: lb-in .4s ease-out both; }
.lb-row.r1 .lb-score, .lb-row.r2 .lb-score, .lb-row.r3 .lb-score { font-size: 16px; }
.lb-rank { text-align: center; font-weight: 900; color: #6b6590; }
.lb-nick { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.lb-nick em { font-style: normal; font-size: 11px; font-weight: 900; color: #fff; background: var(--sr-violet); padding: 1px 6px; border-radius: 999px; }
.lb-nick small { display: block; font-size: 11px; font-weight: 600; color: #6b6590; }
.lb-score { font-variant-numeric: tabular-nums; font-weight: 900; }
.lb-rep { width: 28px; height: 28px; border: 0; background: none; color: #b3acd6; cursor: pointer; font-size: 14px; border-radius: 8px; }
button.lb-rep:hover, button.lb-rep:focus-visible { color: #b91c1c; background: #fee2e2; }
.lb-gap { text-align: center; color: #b3acd6; font-weight: 900; line-height: 1; }
.lb-battle { margin: 6px 0 10px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(135deg, #e0f2fe, #f3f0ff); font-weight: 800; text-align: center; }
.lb-flag.big .flag { width: 30px; height: 22px; }
.lb-mebar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 6px 10px; border-radius: 14px; background: #f3f0ff; font-size: 14px; }
.lb-mebar .sr-link { margin: 0; font-size: 12.5px; }

@keyframes lb-in { from { transform: scale(.85); opacity: 0; } }
@keyframes lb-pop { 50% { transform: scale(1.25); } }
@keyframes lb-bob { 50% { transform: translateY(-5px) rotate(-6deg); } }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lb-open { background: linear-gradient(135deg, #4a3b12, #4a1f3a); border-color: #6b5320; color: #f3f0ff; }
  :root:not([data-theme="light"]) .lb-open small { color: #f5d98a; }
  :root:not([data-theme="light"]) .lb-netnote, :root:not([data-theme="light"]) .lb-wait, :root:not([data-theme="light"]) .lb-out-row { background: #2b2560; color: #e4e0fb; }
  :root:not([data-theme="light"]) .lb-done, :root:not([data-theme="light"]) .lb-out-ok { background: #14432b; color: #bbf7d0; }
  :root:not([data-theme="light"]) .lb-out-bad { background: #4a3b12; color: #fde68a; }
  :root:not([data-theme="light"]) .lb-enter, :root:not([data-theme="light"]) .lb-rankcard.gold { background: linear-gradient(160deg, #4a3b12, #4a1f3a 60%, #12355a); }
  :root:not([data-theme="light"]) .lb-enter.lb-edit, :root:not([data-theme="light"]) .lb-mebar { background: #2b2560; }
  :root:not([data-theme="light"]) .lb-rankcard, :root:not([data-theme="light"]) .lb-battle { background: linear-gradient(160deg, #2e2470, #12355a); }
  :root:not([data-theme="light"]) .lb-sub, :root:not([data-theme="light"]) .lb-field, :root:not([data-theme="light"]) .lb-priv,
  :root:not([data-theme="light"]) .lb-rankcard small, :root:not([data-theme="light"]) .lb-empty, :root:not([data-theme="light"]) .lb-rank,
  :root:not([data-theme="light"]) .lb-nick small, :root:not([data-theme="light"]) .lb-keep { color: #b8b0e8; }
  :root:not([data-theme="light"]) .lb-chips span { background: rgba(28, 24, 58, .8); }
  :root:not([data-theme="light"]) .lb-nickrow input, :root:not([data-theme="light"]) .lb-country select, :root:not([data-theme="light"]) .lb-dice,
  :root:not([data-theme="light"]) .lb-tabs button, :root:not([data-theme="light"]) .lb-seg button { background: #221d4f; border-color: #3b3480; color: #f3f0ff; box-shadow: none; }
  :root:not([data-theme="light"]) .lb-tabs button.on, :root:not([data-theme="light"]) .lb-seg button.on { background: var(--sr-violet); border-color: #a79bff; }
  :root:not([data-theme="light"]) .lb-row:nth-child(odd) { background: rgba(255, 255, 255, .04); }
  :root:not([data-theme="light"]) .lb-row.me { background: linear-gradient(90deg, #4a3b12, #4a1f3a); }
  :root:not([data-theme="light"]) .lb-err { color: #fca5a5; }
}
@media (prefers-reduced-motion: reduce) { .lb-enter, .lb-rankcard, .lb-burst, .lb-medal, .lb-row.me, .lb-ranknum.pop { animation: none; } }
.lb-slot:has(.lb-rankcard) + .lb-open-over { display: none; } /* karta pořadí má vlastní tlačítko */
