/* V56 – PRŠÍ RYCHLÍK: 1:1 původní hospoda, pozice karet a portréty.
   Sdílíme originální ../styles.css + ../immersive.css, zde měníme JEN funkční detaily. */
.game-menu .variant-menu{margin:5px 0 8px;border:1px solid #bfa46c85;border-radius:10px;background:#3c3120;color:#fff4d7;overflow:hidden}
.game-menu .variant-menu summary{padding:12px 13px;cursor:pointer;list-style:none;font-weight:800;font-size:14px;display:flex;align-items:center;justify-content:space-between;gap:8px;user-select:none}
.game-menu .variant-menu summary::-webkit-details-marker{display:none}
.game-menu .variant-menu[open] summary{background:#53402c}
.game-menu .variant-links{padding:5px;display:grid;gap:4px;background:#19150f}
.game-menu .variant-links a{display:block;padding:12px 13px;border-radius:8px;color:#fff0c8;text-decoration:none;font-weight:650;font-size:14px;background:#332a20}
.game-menu .variant-links a[aria-current=page]{color:#d3ecb8}
.game-menu .menu-option[href]{display:block;text-decoration:none;padding:12px 13px;text-align:left}
/* Stejné rozvržení hlavičky, pouze bodový přehled nahrazuje peněženka. */
.topbar .brand b{font-size:clamp(25px,6.3vw,35px)!important}
.topbar .score-pill{min-width:70px!important;padding:4px 5px!important}
.topbar .score-pill small{font-size:7px!important;letter-spacing:0!important}
.topbar .score-pill strong{font-size:14px!important;white-space:nowrap;color:#ffe1a2}
.progress-row strong{color:#ffe28f}
/* Oponenti beze změny: pod původní text přibyde zůstatek. */
.opponent .opp-points{font-weight:850!important;font-size:11px!important;line-height:1.2}
.opponent.broke{opacity:.44;filter:grayscale(1)}
body .opponent.on{filter:drop-shadow(0 0 6px #ffe18d6e)}
/* Karty na stole zůstávají stejné, jen u shodných hodnot se nabízí Ano/Ne. */
.hand .card.folk-card{appearance:none;-webkit-appearance:none;padding:0;display:block;position:relative;min-width:0;touch-action:manipulation}
.hand .card.folk-card img.historic-face{pointer-events:none;user-select:none}
.hand .card.folk-card.selected,.hand .card.folk-card.selected:hover,.hand .card.folk-card.selected:focus-visible{transform:translateY(-12px) rotate(0deg)!important;box-shadow:0 0 0 3px #ffe69b,0 0 15px #fff1a575,0 8px 15px #000a!important;z-index:30!important;filter:none!important}
body .controls #drawButton{flex:1 1 100%;width:100%;min-height:49px!important}
/* Potvrzení více karet využije prostor původního tlačítka Lízni: žádné zvětšování stránky. */
body .controls .multi-answer:not([hidden]){display:block;flex:1 1 50%;min-width:0;min-height:49px!important;
 padding:8px 5px;font-size:13px!important;white-space:normal;line-height:1.2}
body .controls #multiYes:not([hidden]){background:linear-gradient(180deg,#f7d789,#a77d24)!important;color:#2b1c08!important;text-shadow:none!important}
body .controls #multiNo:not([hidden]){background:linear-gradient(180deg,#5b5046,#2e2721)!important;color:#fff0d1!important}
body .controls .multi-answer[hidden],body .controls #drawButton[hidden]{display:none!important}
#deckButton[aria-disabled=true]{pointer-events:none;opacity:.8}
/* Původní historické karty jsou na stejném místě a v totožném měřítku. */
#discard .card.folk-card{width:100%!important;height:100%!important}
#suitInfo{pointer-events:none}
#suitInfo span{font-size:12px!important}
#shade[hidden]{display:none!important}
#shade:not([hidden]){display:flex!important;z-index:550!important}
#dialogBody{text-align:left;max-height:min(62dvh,490px);overflow-y:auto}
#dialogBody ul{font-size:13px;line-height:1.55;padding-left:22px;color:#f3dbbb}
#dialogBody li{margin-bottom:7px}
#dialogActions button{background:linear-gradient(#ffe58b,#dba638);color:#3c240b;border:1px solid #fff1ab;border-radius:12px;min-height:44px;padding:9px 15px;font-weight:850}
#dialogActions button.secondary{background:#493423;color:#ffebbf;border-color:#aa8052}
#dialogBody .subtle{color:#d6bd98;font-size:12px}
#dialogBody .result-grid{display:grid;grid-template-columns:1.2fr .85fr .8fr;gap:7px;align-items:center;text-align:left;font-size:12px;padding:10px 0}
#dialogBody .result-grid span.pos{color:#9deaac;font-weight:900}
#dialogBody .result-grid span.neg{color:#ffc2aa;font-weight:900}
#dialogBody .result-grid strong{color:#ffe8b6}
#dialogBody .suit-picker{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:13px 0}
#dialogBody .suit-choice{border-radius:12px;border:2px solid #e8bf79;min-height:63px;background:#f9e9c4;color:#38210e;font-weight:900;font-size:15px}
#loadCover.hidden{opacity:0;pointer-events:none}
@media(max-width:360px){.topbar .score-pill{min-width:62px!important}.topbar .score-pill strong{font-size:13px!important}.tournament-progress .progress-row{font-size:9px!important}.topbar .brand b{font-size:24px!important}}

/* V56: Krátká nápověda pouze pro skutečně hratelné stejné hodnoty.
   V centru nad kartami, nenaruší původní výšku ani ovládání. */
#multiTip[hidden]{display:none!important}
body .felt-table #multiTip{position:absolute;top:-8px;left:50%;transform:translateX(-50%);
  z-index:12;max-width:calc(100% - 24px);width:max-content;pointer-events:none;
  padding:6px 11px;border-radius:12px;border:1px solid #e6bf75;
  background:#25180beF;color:#ffebae;box-shadow:0 4px 12px #0008;
  font-size:12px;line-height:1.3;font-weight:850;text-align:center;text-shadow:0 1px #000;
  white-space:normal;}
/* Zůstává stejné mobilní zobrazení jako v turnaji, i na desktopu úzká herní plocha. */
@media(max-width:390px){body .felt-table #multiTip{top:-8px;font-size:11px;padding:5px 8px}}
@media(max-width:345px){body .felt-table #multiTip{font-size:10px;padding:4px 6px}}

/* V56: Jedno klepnutí na kartu = tah. Při velké ruce horizontální posun, nikdy mizící karty. */
#hand{max-width:100%;min-width:0;box-sizing:border-box}
#hand .card.folk-card{flex-shrink:0}
#hand.scrollable-hand{display:flex!important;justify-content:flex-start!important;align-items:flex-start!important;
 overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-x:contain;
 -webkit-overflow-scrolling:touch;touch-action:pan-x;scrollbar-width:thin;
 padding:19px 8px 4px!important;height:158px!important;scroll-behavior:smooth;
 scrollbar-color:#d9b579 #ffffff15;}
#hand.scrollable-hand .card.folk-card{touch-action:pan-x;scroll-snap-align:start}
#hand.scrollable-hand .card.folk-card.selected{transform:translateY(-9px) rotate(0deg)!important}
.hand-area{position:relative}
.hand-scroll-nav[hidden]{display:none!important}
.hand-scroll-nav{position:absolute;left:0;right:0;top:53%;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;z-index:50}
.hand-scroll-nav button{pointer-events:auto;border:1px solid #ffe0a9a0;color:#ffe5a4;background:#372313e8;
 border-radius:50%;height:29px;width:29px;font-size:25px;font-weight:900;line-height:22px;box-shadow:0 2px 8px #000a;padding:0}
.hand-scroll-nav button:disabled{opacity:.2;pointer-events:none}
body #handInfo{min-width:0;text-align:right}
/* Krátké rozdání z balíčku – animace se nespouští při každém tahu. */
.deal-flight-layer{position:fixed;inset:0;pointer-events:none;z-index:490;overflow:hidden;contain:layout style}
.deal-flight{position:absolute;top:0;left:0;width:34px;height:50px;border:3px solid #f9eccf;border-radius:5px;
 background:repeating-linear-gradient(45deg,#1d4966 0 4px,#5b91a8 4px 6px,#1b4466 6px 10px);
 box-shadow:0 3px 11px #000b;transform-origin:center;will-change:transform,opacity}
.deal-flight:after{content:'❧';position:absolute;inset:4px;border:1px solid #e4d6b0;color:#f5e7c7;
 font:19px Georgia,serif;display:grid;place-items:center}
.is-dealing #hand .card.folk-card{animation:rychlikDealReveal .34s cubic-bezier(.15,.8,.24,1.12) both;
 animation-delay:var(--deal-delay,0ms)}
@keyframes rychlikDealReveal{from{opacity:0;translate:0 -43px;scale:.73}to{opacity:1;translate:0 0;scale:1}}
@media(max-width:390px){#hand.scrollable-hand{height:145px!important;padding-top:17px!important}}
@media(prefers-reduced-motion:reduce){.is-dealing #hand .card.folk-card{animation:none!important}}

/* Čitelný dotykový posun a stabilní rozložení velké ruky. */
#hand.scrollable-hand{scroll-snap-type:none;scroll-behavior:auto}
#hand .card.folk-card{cursor:pointer}
#hand .card.folk-card.blocked{cursor:default}

/* Dodržíme vypočtený překryv i tehdy, pokud se změní sdílené styles.css. */
#hand .card.folk-card{margin-left:var(--overlap,0px)}


/* V57: stejně klidné tempo jako v původním Prší turnaji. CSS necháváme jinak stejné. */
/* Malé karty soupeřů jsou POD fotografií, nikoli přes obličej. */
body .opponent .opp-mini-fan{height:30px!important;margin-top:0!important;position:relative!important;overflow:visible}
body .opp-mini-fan .mini-card-back{bottom:3px!important;width:16px!important;height:25px!important;left:calc(50% - 8px)!important}
body .opp-mini-fan .mini-extra{bottom:3px!important}
body .opponent .oppname{margin-top:1px!important}
/* Volba pro více karet se zobrazí na horním okraji MÉ ruky, nikoli pod ní ani na stole. */
body .hand-area{position:relative!important;isolation:isolate}
body .hand-area .multi-confirm[hidden]{display:none!important}
body .hand-area .multi-confirm{position:absolute;top:29px;left:50%;transform:translateX(-50%);
 z-index:350;display:flex;justify-content:center;align-items:center;gap:5px;
 padding:6px 7px;max-width:calc(100% - 8px);width:max-content;
 border-radius:12px;border:1px solid #ebc579;box-shadow:0 5px 18px #000c;
 background:#1c160feF;color:#ffe6b0;white-space:nowrap;font-weight:850;
 font-size:12px;line-height:1.2;text-shadow:0 1px 2px #000c}
body .hand-area .multi-confirm span{flex:0 1 auto}
body .hand-area .multi-confirm button{flex:0 0 auto;min-width:51px;height:33px;
 border-radius:9px;border:1px solid #f3d6a0;background:linear-gradient(#f6da8a,#c89438);
 color:#2c1d0d;text-shadow:none;font-weight:900;font-size:12px;padding:5px 8px}
body .hand-area .multi-confirm #multiNo{background:linear-gradient(#675a49,#3c3126);color:#fff1cf;border-color:#c3a37d}
body .hand-area .multi-confirm button:focus-visible{outline:3px solid white;outline-offset:2px}
@media(max-width:390px){body .hand-area .multi-confirm{top:25px;font-size:11px;gap:4px;padding:5px 6px}
 body .hand-area .multi-confirm button{font-size:11px;padding:4px 5px;min-width:45px;height:31px}}
@media(max-width:345px){body .hand-area .multi-confirm{font-size:10px;gap:3px;padding:5px 4px}
 body .hand-area .multi-confirm button{font-size:10px;padding:3px 4px;min-width:42px}}


/* V58 – portréty Martina, Magdy a Tomáše a karty o kousek výš na dřevěném stole. */
body .opponent .portrait{object-position:center 35%!important}
/* Původní sdílené styly nastavovaly margin:0!important; přetáhneme ruku o 16 px vzhůru. */
body .pub-scene .hand-area{margin-top:-16px!important}
/* Průběh plného přednačtení je vidět až do 32/32. */
#loadRetry[hidden]{display:none!important}
#loadRetry{margin-top:10px;padding:10px 14px;min-height:42px;border:1px solid #f0c779;
 border-radius:10px;color:#33220d;background:#f6d98a;font-weight:850}
#loadCover[hidden]{display:none!important}
@media(max-width:390px){body .pub-scene .hand-area{margin-top:-14px!important}}


/* V59 – původní jednoduchý výběr: SHODNÉ KARTY, označení jednotlivých karet, OK. */
body .hand-area{overflow:visible!important}
body .hand-area .multi-confirm[hidden]{display:none!important}
body .hand-area .multi-confirm{
 top:-77px!important;left:50%!important;right:auto!important;
 transform:translateX(-50%)!important;display:flex!important;
 flex-direction:column!important;align-items:center!important;
 gap:6px!important;width:min(96%,360px)!important;
 max-width:calc(100% - 12px)!important;padding:9px 9px 8px!important;
 border-radius:13px!important;background:#1e170deF!important;
 border:2px solid #e7be67!important;box-shadow:0 5px 20px #000d!important;
 white-space:normal!important;z-index:350!important;text-align:center!important;
}
body .hand-area .multi-copy{display:flex;flex-direction:column;gap:2px;align-items:center}
body .hand-area .multi-copy strong{font-size:14px;color:#ffe291;letter-spacing:.6px}
body .hand-area .multi-copy span{font-size:10px;color:#fff0cc;font-weight:750}
body .hand-area .multi-actions{display:flex;justify-content:center;gap:8px;width:100%}
body .hand-area .multi-confirm .multi-actions button{
 border:1px solid #f0d194!important;border-radius:10px!important;
 min-height:36px!important;height:36px!important;padding:5px 13px!important;
 font-size:12px!important;font-weight:900!important;flex:1 1 auto;
 max-width:165px!important;
}
body .hand-area .multi-confirm #multiOk{background:linear-gradient(#f8e7a5,#d5a63b)!important;color:#2a1c0a!important}
body .hand-area .multi-confirm #multiCancel{background:linear-gradient(#6a5b4d,#3e3225)!important;color:#fbe9ca!important}
body .hand-area .multi-confirm #multiOk:disabled{opacity:.5}
/* Shodné karty bez označení mají jemný zlatý obrys; vybrané vystoupí nahoru. */
#hand .card.folk-card.matchable{box-shadow:0 0 0 2px #e8bc66,0 5px 13px #0009!important;filter:brightness(1.04)!important}
#hand .card.folk-card.selected,#hand .card.folk-card.selected:hover{
 box-shadow:0 0 0 4px #ffe18a,0 0 23px #fbdc73,0 6px 11px #000a!important;
 transform:translateY(-14px) rotate(0deg)!important;z-index:150!important;
}
@media(max-width:390px){
 body .hand-area .multi-confirm{top:-75px!important;width:min(96%,340px)!important;padding:7px 7px 6px!important}
 body .hand-area .multi-copy strong{font-size:13px}
 body .hand-area .multi-copy span{font-size:9.5px}
 body .hand-area .multi-confirm .multi-actions button{height:34px!important;min-height:34px!important}
}
@media(max-width:340px){body .hand-area .multi-confirm{top:-72px!important}}


/* V60 — pouze Rychlík: denní domácí prostředí, POUZE dřevěný stůl.
   Jediná skutečná fotografie na celé ploše, bez zeleného plátna.
   Turnaj Prší používá své původní styly i obrázek beze změny. */
body .app::before,
body[data-table-style="drevo"] .app::before,
body[data-table-style="sukno"] .app::before,
body[data-table-style="moderni"] .app::before {
  background-image:url('assets/doma-dreveny-stul.webp')!important;
  background-position:center center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  -webkit-mask-image:none!important;
  mask-image:none!important;
  width:100%!important;
  height:100%!important;
  aspect-ratio:auto!important;
  top:0!important;
  bottom:0!important;
  opacity:1!important;
}
/* Lehké ztmavení pouze hlavičky pro dobrou čitelnost, nikoli celé světlé místnosti. */
body .app > .topbar {
  background:linear-gradient(180deg,rgba(27,16,9,.90),rgba(27,16,9,.68));
  border-radius:0 0 12px 12px;
}
/* Popisky soupeřů potřebují kontrast i proti světlému oknu. */
body .opponent .oppname,body .opponent .oppcount,body .opponent .opp-points,
body .hand-top,body .current-label{ text-shadow:0 2px 4px #080503,0 0 8px #070402!important; }


/* V61 – horní polovina NOVÉHO domácího pozadí přechází přirozeně do černé.
   Deska stolu dole zůstává 1:1 bez plátna; klasické PRŠÍ se nemění. */
body .app::before,body[data-table-style] .app::before {
  background-image:url('assets/doma-dreveny-stul-tmavy-v61.webp')!important;
  background-position:center center!important;
  background-size:cover!important;
}
/* Věrně jako v Prší turnaji: rubové karty přes SPODNÍ část portrétu, ne pod něj. */
body .opponent .opp-mini-fan{height:74px!important;margin-top:-62px!important;position:relative!important;z-index:3!important;overflow:visible!important}
body .opponent .opp-mini-fan .mini-card-back{bottom:35px!important;left:calc(50% - 10px)!important;width:20px!important;height:31px!important}
body .opponent .opp-mini-fan .mini-extra{bottom:33px!important}
body .opponent .oppname{margin-top:2px!important}
@media(max-width:390px){
  body .opponent .opp-mini-fan{height:70px!important;margin-top:-60px!important}
  body .opponent .opp-mini-fan .mini-card-back{width:17px!important;height:27px!important;left:calc(50% - 8.5px)!important}
}
/* Rekordy v nabídce Rychlíku. */
.rychlik-records{width:100%;border-collapse:collapse;font-size:12px;margin:9px 0}
.rychlik-records th,.rychlik-records td{padding:7px 5px;border-bottom:1px solid #c49a6440;text-align:left}
.rychlik-records th{color:#ffdb8c}.rychlik-records td{color:#fff2d3}
.rychlik-records td:first-child{font-weight:900;color:#ffe4a0}

/* V62 – jméno a obec: dobře čitelný formulář také v mobilním menu. */
#playerProfileForm{display:flex;flex-direction:column;gap:7px}
#playerProfileForm label{display:block;color:#ffe7b1;font-size:13px;font-weight:850;margin-top:7px}
#playerProfileForm input{appearance:none;box-sizing:border-box;width:100%;height:46px;border:1px solid #dfba77;border-radius:10px;background:#fff4df;color:#23170c;padding:10px 13px;font-size:16px;outline:none}
#playerProfileForm input:focus{border-color:#fff1a0;box-shadow:0 0 0 3px #f9da8344}
#playerProfileForm .profile-error{border:1px solid #f8a2a2;background:#441c1b;color:#fff3de;border-radius:8px;padding:8px 10px;font-size:12px;font-weight:750}
#playerProfileForm [hidden]{display:none!important}
.record-village{display:block;color:#d1bd9b;font-size:10px;line-height:1.25;margin-top:2px}


/* V64 – portréty jsou plně vidět, fan karet překrývá jen jejich dolní část.
   Jména ihned POD mini-kartami, ne o řadu níže. Ušetříme prostor pro hrací stůl. */
body .opponent .opp-mini-fan{
  height:52px!important;
  margin-top:-66px!important;
  position:relative!important;
  overflow:visible!important;
  z-index:3!important;
}
body .opponent .opp-mini-fan .mini-card-back{
  bottom:5px!important;
  left:calc(50% - 10px)!important;
  width:20px!important;
  height:31px!important;
}
body .opponent .opp-mini-fan .mini-extra{bottom:5px!important;right:1px!important}
body .opponent .oppname{
  margin-top:1px!important;
  position:relative!important;
  z-index:5!important;
  line-height:1.12!important;
}
body .opponent .oppcount,
body .opponent .opp-points{
  margin-top:1px!important;
  line-height:1.15!important;
}
@media(max-width:390px){
  body .opponent .opp-mini-fan{height:49px!important;margin-top:-64px!important}
  body .opponent .opp-mini-fan .mini-card-back{
    width:17px!important;height:27px!important;
    left:calc(50% - 8.5px)!important;bottom:4px!important;
  }
  body .opponent .opp-mini-fan .mini-extra{bottom:4px!important}
  body .opponent .oppname{margin-top:0!important}
}


/* V65 – automatické zmenšování spodních karet podle jejich aktuálního počtu.
   Konkrétní šířku/výšku nastavuje render(), platí i pro užší telefony. */
body #hand{height:var(--rychlik-hand-height,174px)!important;min-height:0!important;}
body #hand .card.folk-card{
  width:var(--rychlik-card-width,102px)!important;
  height:var(--rychlik-card-height,151px)!important;
  min-width:var(--rychlik-card-width,102px)!important;
  flex:0 0 var(--rychlik-card-width,102px)!important;
}
body #hand.scrollable-hand{
  height:var(--rychlik-hand-height,174px)!important;
  padding-top:15px!important;
  padding-bottom:4px!important;
}
/* Výsledek partie: vítěz uprostřed a jeho obličej nad jménem. */
#dialogBody .rychlik-winner{
  max-width:350px;margin:2px auto 13px;padding:9px 8px 12px;
  display:flex;align-items:center;flex-direction:column;gap:4px;
  text-align:center;border-bottom:1px solid #ca9a5d70;
}
#dialogBody .rychlik-winner .winner-face,
#dialogBody .rychlik-winner .winner-you{
  display:block;width:112px;height:112px;aspect-ratio:1;
  border-radius:50%;object-fit:cover;object-position:50% 18%;
  border:3px solid #f7d98c;box-shadow:0 0 0 3px #3a2313,0 8px 20px #0008;
}
#dialogBody .rychlik-winner .winner-you{
  display:grid;place-items:center;
  background:radial-gradient(circle at 34% 25%,#9a7032,#3b2413 73%);
  color:#ffeaab;font:900 54px/1 Georgia,serif;
  text-shadow:0 3px #2d1609,0 0 10px #ffdb7080;
}
#dialogBody .rychlik-winner .winner-kicker{font-size:11px;letter-spacing:1px;color:#ffda86;font-weight:900;margin-top:8px;}
#dialogBody .rychlik-winner .winner-name{font:900 clamp(24px,7vw,34px)/1.1 Georgia,serif;color:#ffecb1;text-shadow:0 2px #4a2310;overflow-wrap:anywhere;}
#dialogBody .rychlik-winner .winner-subtitle{margin:4px 0 0;text-align:center;font-size:13px;line-height:1.35;color:#f8e4bd;}
@media(max-width:390px){
  #dialogBody .rychlik-winner .winner-face,#dialogBody .rychlik-winner .winner-you{width:94px;height:94px}
  #dialogBody .rychlik-winner .winner-you{font-size:47px}
}

/* V66 – společný online žebříček, odměna za partii a ochrana hráčského profilu */
#playerProfileForm .scoreboard-consent{display:flex;align-items:flex-start;gap:9px;margin:9px 0;font-size:12px;font-weight:650;color:#fff0ca;line-height:1.45}
#playerProfileForm .scoreboard-consent input{appearance:auto;accent-color:#edc461;width:20px;height:20px;flex:none;margin:0}
.rychlik-records td.my-leader-row{background:#b9953a35}
.rychlik-records td b{font-weight:950;color:#ffdb83}
.round-leader-score{margin:12px 0 10px;padding:10px;border:1px solid #ffdc8ba1;border-radius:13px;background:#2f2919e5;text-align:center;display:flex;flex-direction:column;align-items:center;gap:2px}
.round-leader-score span{font-size:12px;color:#fbe5b2;font-weight:750}
.round-leader-score strong{font:900 23px Georgia,serif;color:#ffe19a}
.round-leader-score small{color:#ecd1a2;font-size:10px;line-height:1.4}
