/* Nový web GPM — Rating Committee (#/rating): hlasování komise.
   Základ (.card, .rcard, .rgrid, .steps, .cnt, .wr2, .seg, .note, .lgd, .track) je v gpm.css a base-pages.css; tady jen to, co je navíc.
   Všechno má předponu rtg-, ať se to neplete s .rc a .rt z pravidel. */

/* ── úvod ── */
.rtg-hero { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 50px; align-items: center; padding: 14px 0 6px; }
.rtg-hero .lead { margin-top: 22px; max-width: 600px; }
.rtg .pos { color: var(--win); } .rtg .neg { color: var(--loss); }
.rtg button { cursor: pointer; } .rtg button:disabled { cursor: default; }
.rtg button.btn:not(.ghost) { border: 0; }
.rtg .btn:disabled { opacity: .35; pointer-events: none; }
.rtg .btn.dng { background: #ff5d6c; color: #fff; }

/* ── brána: přihlášení, chybějící role, nenačtená data ── */
.rtg-gate { max-width: 660px; margin: 38px auto 0; padding: 40px 36px; text-align: center; border-top: 3px solid var(--acc); }
.rtg-gate .lbl { color: var(--acc); }
.rtg-gate h2 { margin: 12px 0 12px; color: #fff; font: 800 26px/1.15 var(--fb); }
.rtg-gate p { max-width: 500px; margin: 0 auto; color: var(--ink2); line-height: 1.6; }
.rtg-gate p + p { margin-top: 10px; }
.rtg-gate em { color: #fff; font-style: normal; font-weight: 700; }
.rtg-gate .rtg-said { color: #ffb9bf; } .rtg-gate .rtg-hint { color: var(--mut); font-size: 13.5px; }
.rtg-gate .row { justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* ── řádek „kdo jsem“ a čerstvost dat ── */
.rtg-you { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; }
.rtg-who { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink2); font-size: 14px; } .rtg-who b { color: #fff; }
.rtg-fresh { display: flex; align-items: center; gap: 12px; flex: none; }
.rtg-fresh .chip { height: 30px; padding: 0 13px; font-size: 11px; } .rtg-fresh .chip:disabled { opacity: .5; }
.rtg .note > span { flex: none; font: 800 16px/1 var(--fd); }
.rtg-bad { border-color: rgba(255,93,108,.5); background: rgba(255,93,108,.08); } .rtg-bad > span { color: var(--loss); } .rtg-bad b { color: #fff; }

/* ── filtry ── */
.rtg-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.rtg-bar + .rtg-bar { margin-top: 12px; }
.rtg-bar .chips.sm .chip { height: 28px; padding: 0 12px; font-size: 11px; }
.rtg-tools { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rtg-find, .rtg-sel { height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.13); background: rgba(255,255,255,.04); color: #fff; font: 500 13.5px var(--fb); outline: none;
  transition: border-color .2s, background-color .2s; }
.rtg-find { width: 230px; } .rtg-find::placeholder { color: #7d8092; }
.rtg-sel { width: 210px; padding-right: 8px; color-scheme: dark; cursor: pointer; } .rtg-sel option { background: #16161c; color: #fff; }
.rtg-find:hover, .rtg-sel:hover { border-color: rgba(255,255,255,.28); }
.rtg-find:focus, .rtg-sel:focus { border-color: var(--acc); background: rgba(255,255,255,.07); }

/* ── seznam a pravý sloupec ── */
.rtg-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.rtg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rtg-side { display: grid; gap: 16px; min-width: 0; }
.rtg-side .wr2 { gap: 10px; padding: 8px 0; }
.rtg-side .wr2 .lbl { margin-left: auto; letter-spacing: .04em; }
.rtg-tier { min-width: 0 !important; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left !important; color: #fff; font: 600 13.5px var(--fb) !important; }
.rtg-v { color: var(--acc); }
.rtg-p { margin: 14px 0 0; color: var(--mut); font-size: 13.5px; line-height: 1.5; } .rtg-p b { color: #fff; }
.rtg-more { display: inline-block; margin-top: 12px; color: var(--acc); font: 800 11.5px var(--fd); font-stretch: 115%; letter-spacing: .12em; text-transform: uppercase; transition: letter-spacing .25s var(--e); }
.rtg-more:hover { letter-spacing: .17em; }
.rtg-side .track { margin-top: 2px; }
.rtg-side .card > h3 .n { white-space: nowrap; }

/* ── karta hráče ── */
.rtg-card { display: flex; flex-direction: column; min-width: 0; padding: 20px 22px 18px; }
.rtg-card:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.045); }
.rtg-card.dirty { border-color: color-mix(in srgb, var(--gold) 62%, transparent); box-shadow: inset 3px 0 0 var(--gold); }
.rtg-card.err { border-color: rgba(255,93,108,.6); box-shadow: inset 3px 0 0 var(--loss); }
.rtg-card.busy { border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
.rtg-head { gap: 14px; }
.rtg-id { flex: 1; min-width: 0; } .rtg-id .nm { display: block; transition: color .15s; } .rtg-id a.nm:hover { color: var(--acc); }
.rtg-team { display: flex; align-items: center; gap: 8px; margin-top: 7px; min-width: 0; }
.rtg-team .who { gap: 7px; min-width: 0; } .rtg-team .who .nm { color: var(--ink2); font: 500 12.5px/1.2 var(--fb); }
.rtg-team .lbl { flex: none; text-transform: none; letter-spacing: .03em; white-space: nowrap; }
.rtg-pills { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; align-self: flex-start; }
.rtg-uns { border-color: transparent; background: var(--gold); color: #141414; }
.rtg-card .rgrid { gap: 12px; }
.rtg-card .rgrid > div { min-width: 0; }
.rtg-sub { margin-top: 8px; text-transform: none; letter-spacing: .03em; line-height: 1.35; }
.rtg-none { color: var(--dim); }
.rtg-warn { color: var(--gold); }

/* můj hlas: − číslo +, číslo jde i napsat */
.rtg-vote { display: flex; align-items: center; gap: 3px; height: 34px; margin-top: 8px; }
.rtg-stp { display: inline-flex; align-items: stretch; height: 34px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; overflow: hidden; background: rgba(255,255,255,.04);
  transition: border-color .2s, box-shadow .2s, background-color .2s; }
.rtg-stp:hover { border-color: rgba(255,255,255,.3); }
.rtg-stp:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.rtg-stp button { width: 28px; padding: 0; border: 0; background: none; color: var(--mut); font: 700 16px/1 var(--fm); transition: background-color .15s, color .15s; }
.rtg-stp button:hover:not(:disabled) { background: rgba(255,255,255,.12); color: #fff; }
.rtg-stp button:active:not(:disabled) { background: color-mix(in srgb, var(--acc) 34%, transparent); color: #fff; }
.rtg-stp button:focus-visible { outline-offset: -2px; }
.rtg-stp input { width: 40px; padding: 0; border: 0; outline: 0; background: none; color: #fff; text-align: center; font: 700 16px/1 var(--fm); }
.rtg-stp input::placeholder { color: var(--dim); }
.rtg-stp.ch { border-color: var(--gold); background: rgba(242,212,104,.07); } .rtg-stp.ch input { color: var(--gold); }
.rtg-x { width: 20px; height: 20px; flex: none; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--dim); font: 700 15px/1 var(--fm); transition: background-color .15s, color .15s; }
.rtg-x:hover:not(:disabled) { background: rgba(255,93,108,.18); color: var(--loss); }
.rtg-card.busy .rtg-stp, .rtg-card.busy .rtg-note { opacity: .55; }

/* spodek karty: role, dopad na hodnotu, poznámka, uložení, hlasy, staff */
.rtg-foot { display: grid; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line2); }
.rtg-foot > * { min-width: 0; }
.rtg-r1 { gap: 12px; }
.rtg-eff { min-width: 0; text-transform: none; letter-spacing: .02em; line-height: 1.45; } .rtg-eff b { color: #fff; font-weight: 600; }
.rtg-seg { flex: none; }
.rtg-seg button { padding: 7px 10px; border: 0; background: none; color: var(--mut); font: 700 10.5px/1 var(--fd); font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase; transition: background-color .15s, color .15s; }
.rtg-seg button:hover:not(.on) { background: rgba(255,255,255,.08); color: #fff; }
.rtg-seg button.on { background: var(--grad); color: var(--on); }
.rtg-seg u { margin-left: 5px; text-decoration: none; opacity: .75; font: 600 10px/1 var(--fm); letter-spacing: 0; }
.rtg-act { display: flex; align-items: center; gap: 10px; }
.rtg-note { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); color: #fff; font: 500 13px var(--fb); outline: none;
  transition: border-color .2s, background-color .2s; }
.rtg-note::placeholder { color: #6f7284; } .rtg-note:hover { border-color: rgba(255,255,255,.26); } .rtg-note:focus { border-color: var(--acc); background: rgba(255,255,255,.06); }
.rtg-link { flex: none; padding: 4px 2px; border: 0; background: none; color: var(--mut); font: 600 11px/1 var(--fm); letter-spacing: .08em; text-transform: uppercase; transition: color .15s; }
.rtg-link:hover:not(:disabled) { color: #fff; } .rtg-link.dng:hover:not(:disabled) { color: var(--loss); } .rtg-link:disabled { opacity: .4; }
.rtg-vt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; border: 0; background: none; color: var(--mut); font: 500 11.5px/1.3 var(--fm); letter-spacing: .04em; text-align: left; transition: color .15s; }
button.rtg-vt:hover { color: #fff; } .rtg-vt i { width: 10px; font-style: normal; color: var(--acc); } .rtg-vt.none { color: var(--dim); }
.rtg-voters { display: grid; gap: 6px; max-height: 236px; overflow: auto; scrollbar-width: thin; }
.rtg-vr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line2); background: rgba(255,255,255,.025); transition: background-color .15s; }
.rtg-vr:hover { background: rgba(255,255,255,.05); }
.rtg-vr.me { border-color: color-mix(in srgb, var(--acc) 45%, transparent); }
.rtg-vr .vn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-weight: 600; font-size: 13px; }
.rtg-vp { flex: none; padding: 3px 7px; border-radius: 5px; background: rgba(255,255,255,.08); color: #fff; font: 600 11.5px/1 var(--fm); } .rtg-vp.z { background: none; color: var(--dim); }
.rtg-vr .lbl { flex: none; min-width: 52px; text-align: right; text-transform: none; letter-spacing: .02em; }
.rtg-vr q { flex-basis: 100%; color: var(--ink2); font-size: 12.5px; font-style: italic; overflow-wrap: anywhere; }
.rtg-staff { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px 12px 12px; border-radius: 10px; border: 1px solid rgba(242,212,104,.24); background: rgba(242,212,104,.05); }
.rtg-staff > .lbl { flex-basis: 100%; color: var(--gold); }
.rtg-staff .btn { text-transform: none; letter-spacing: .04em; } .rtg-staff .btn b { color: var(--gold); font-size: 14px; }
.rtg-staff .rtg-link { margin-left: auto; }
.rtg-dim { color: var(--mut); font-size: 13px; }

/* hlášky na kartě: ukládání, hotovo, chyba, potvrzovací krok */
.rtg-msg { padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink2); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; animation: vt-in .25s var(--e) both; }
.rtg-msg b { color: #fff; }
.rtg-msg .row { flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.rtg-msg.ok { border-color: rgba(61,220,151,.45); background: rgba(61,220,151,.09); } .rtg-msg.ok b { color: var(--win); }
.rtg-msg.err { border-color: rgba(255,93,108,.55); background: rgba(255,93,108,.1); color: #ffd7da; } .rtg-msg.err > b { color: #ff8a95; }
.rtg-msg.ask { border-color: rgba(242,212,104,.55); background: rgba(242,212,104,.08); }
.rtg-msg.wait { border-style: dashed; color: var(--mut); }
.rtg-msg b.rtg-warn { color: var(--gold); }

/* chyba u karty, která není na obrazovce: pruh dole, zavře se kliknutím */
#rtg-toast { position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; max-width: min(760px, calc(100vw - 32px)); padding: 13px 16px;
  border-radius: 12px; border: 1px solid rgba(255,93,108,.6); background: #2a1216; box-shadow: 0 24px 60px rgba(0,0,0,.65); color: #ffd7da; font-size: 13.5px; line-height: 1.45; cursor: pointer; animation: vt-in .25s var(--e) both; }
#rtg-toast b { font-weight: 600; overflow-wrap: anywhere; }
#rtg-toast a { flex: none; color: #fff; font: 800 11.5px var(--fd); font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; }
#rtg-toast i { flex: none; color: #ff8a95; font: 700 18px/1 var(--fm); font-style: normal; }
.rtg-bad a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ── užší okna: tablet a telefon (společná kostra je v css-mobile.css) ── */
@media (max-width: 1180px) {
  .rtg-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 30px; }
  .rtg-main { grid-template-columns: minmax(0, 1fr); }
  /* pravý sloupec jde pod seznam: postup a hlasující vlevo pod sebou, ceník vpravo přes obě řady */
  .rtg-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .rtg-side > .card:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
  /* čtyři počty v jedné řadě jako na počítači (základ by z nich udělal dva široké sloupce) */
  .rtg > .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .rtg > .g4 .cnt { padding: 18px 16px; }
  .rtg > .g4 .cnt .num { font-size: 30px; }
}
/* dotyk (tablet i telefon): ovládání hlasu dost velké na prst */
@media (pointer: coarse), (max-width: 1180px) {
  .rtg-card .rgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }      /* třetí sloupec podle šířky ovládání hlasu */
  .rtg-vote { height: 42px; gap: 4px; }
  .rtg-stp { height: 42px; }
  .rtg-stp button { width: 44px; font-size: 19px; }
  .rtg-stp input { width: 50px; font-size: 17px; }
  .rtg-x { width: 34px; height: 36px; font-size: 19px; }
  .rtg-seg button { min-height: 36px; padding: 0 13px; }
  .rtg-link { min-height: 36px; padding: 0 8px; }
  button.rtg-vt { min-height: 36px; }
  .rtg-fresh .chip { height: 36px; }
  .rtg-bar .chips.sm .chip { height: 36px; }
  .rtg-find, .rtg-sel { height: 40px; }
  .rtg-note { height: 40px; }
  .rtg-more { padding: 12px 0; margin-top: 2px; }
  /* jméno hráče, tým a hlasující jsou odkazy: plocha na ťuknutí aspoň 36 px, rozložení se nemění */
  .rtg-id a.nm { padding: 8px 0; margin: -8px 0; }
  .rtg-team .who { min-height: 36px; margin: -8px 0; }
  .rtg-side .wr2 .who { min-height: 36px; }
  .rtg-classic a { display: inline-block; padding: 8px 0; }
}
@media (max-width: 900px) {
  .rtg-hero { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .rtg-hero .steps[style] { flex-direction: row !important; gap: 10px; }      /* tablet na výšku: tři kroky vedle sebe pod textem */
  .rtg-hero .steps div { flex: 1 1 0; align-items: flex-start; padding: 12px 14px; font-size: 14px; line-height: 1.35; }
  .rtg-hero .steps b { flex: none; }
  .rtg-grid { grid-template-columns: minmax(0, 1fr); }
  .rtg-tools { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  #rtg-toast { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .rtg-hero { gap: 16px; padding: 0; }
  .rtg-hero .kick { font-size: 11px; letter-spacing: .2em; }
  .rtg-hero .hd { margin-top: 12px !important; }
  .rtg-hero .lead { margin-top: 12px; font-size: 14.5px; line-height: 1.55; }
  .rtg-hero .steps[style] { flex-direction: column !important; gap: 6px; }
  .rtg-hero .steps div { padding: 10px 12px; gap: 10px; font-size: 13.5px; }
  .rtg-hero .steps b { width: 24px; height: 24px; font-size: 12px; }
  /* kdo hlasuje, ví, jak to chodí: tři kroky se na telefonu ukazují jen nepřihlášeným (totéž říká úvodní věta a vysvětlivky dole) */
  .rtg[data-rtg-root] .steps { display: none; }
  .rtg > .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rtg > .g4 .cnt { padding: 14px 14px 13px; }
  .rtg > .g4 .cnt .num { font-size: 26px; }
  /* kdo hlasuje, má čtyři počty v jedné řadě */
  .rtg[data-rtg-root] > .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 18px !important; }
  .rtg[data-rtg-root] > .g4 .cnt { padding: 12px 4px 10px; border-radius: 10px; text-align: center; }
  .rtg[data-rtg-root] > .g4 .cnt .num { font-size: 21px; }
  .rtg[data-rtg-root] > .g4 .cnt .lbl { margin-top: 7px; font-size: 11px; letter-spacing: 0; line-height: 1.25; }
  .rtg-who { align-items: flex-start; font-size: 13.5px; line-height: 1.4; }
  .rtg-fresh { flex: 1 1 100%; justify-content: space-between; }
  .rtg-side { grid-template-columns: minmax(0, 1fr); }
  .rtg-side > .card:nth-child(2) { grid-column: auto; grid-row: auto; }
  .rtg-gate { margin-top: 24px; padding: 28px 18px; }
  .rtg-gate h2 { font-size: 22px; }
  .rtg-gate .row .btn { flex: 1 1 auto; justify-content: center; }
  /* filtry: pole přes celou šířku, písmo 16 px (menší by iPhone při ťuknutí přiblížil) */
  .rtg-bar { gap: 10px; }
  .rtg-bar .chips { gap: 6px; }
  .rtg-bar .chip { padding: 0 11px; }
  .rtg-tools { width: 100%; gap: 8px 10px; }
  .rtg-tools > .lbl { flex: 1 1 100%; margin-top: 2px; }
  .rtg-find, .rtg-sel { flex: 1 1 150px; width: auto; min-width: 0; height: 42px; font-size: 16px; }
  /* karta hráče */
  .rtg-card { padding: 16px 16px 14px; }
  .rtg-head { row-gap: 8px; }
  .rtg-team { flex-wrap: wrap; row-gap: 2px; }
  .rtg-team .who { max-width: 100%; }
  .rtg-pills { order: 3; flex: 1 1 100%; flex-direction: row; align-items: center; align-self: auto; padding-left: 66px; }      /* stav pod jménem, jméno má celou šířku */
  .rtg-card .rgrid { grid-template-columns: 1fr 1fr; margin-top: 14px; } .rtg-card .rgrid > div:last-child { grid-column: 1 / -1; }
  .rtg-card .rgrid .num { font-size: 30px; }
  .rtg-sub { font-size: 11px; }
  /* můj hlas: − číslo + přes celou šířku karty, tlačítka na palec */
  .rtg-vote { height: 48px; gap: 8px; }
  .rtg-stp { flex: 1 1 auto; height: 48px; border-radius: 11px; }
  .rtg-stp button { flex: 0 0 68px; width: auto; font-size: 24px; }
  .rtg-stp input { flex: 1 1 60px; width: 60px; min-width: 0; font-size: 21px; }
  .rtg-x { width: 40px; height: 40px; font-size: 21px; }
  .rtg-r1 { flex-wrap: wrap; row-gap: 8px; }
  .rtg-seg button { font-size: 11.5px; }
  .rtg-seg u { font-size: 11px; }
  .rtg-card .rtg-eff { flex: 1 1 100%; font-size: 11.5px; }
  .rtg-act { flex-wrap: wrap; }
  .rtg-note { flex-basis: 100%; height: 42px; font-size: 16px; }
  .rtg-note::placeholder { font-size: 14px; }
  .rtg-card .rtg-act .btn { flex: 1 1 auto; height: 44px; justify-content: center; }
  .rtg-link { font-size: 11.5px; }
  .rtg-vt { font-size: 12px; }
  .rtg-vr .vn { flex-basis: 40%; }
  .rtg-card .rtg-staff .btn { flex: 1 1 100%; height: 42px; justify-content: center; }
  .rtg-msg { font-size: 13.5px; }
  .rtg-card .rtg-msg .row .btn { flex: 1 1 auto; height: 42px; justify-content: center; }
  .rtg-side .wr2 .lbl { font-size: 11px; }
  .rtg-classic { line-height: 1.5; }
}

/* odkaz na původní hlasování (záloha) */
.rtg-classic { margin: 18px 2px 0; font-size: 13px; color: var(--mut, #8b8ea0); }
.rtg-classic a { color: var(--gold, #f2c94c); text-decoration: none; border-bottom: 1px solid rgba(242,201,76,.35); }
.rtg-classic a:hover { border-bottom-color: currentColor; }
