/* Online-lobby — prevzaté z Krádeže (kradez_web/www/css/lobby.css): ozdobný rám, dva stĺpce,
   obrazovka miestnosti v tom istom ráme (chat hra nemá – je Discord). Farby držia paletu Krádeže:
   tmavé drevo, mosadz, pergamen. Kreslí sa do #screens (src/lobby.js). */

:where(.lobby-host) * { margin: 0; padding: 0; box-sizing: border-box; }   /* ako reset v Krádeži – bez váhy */
#screens.lobby-host{
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  overflow: hidden;
  font-family: "Courier New", monospace;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, #4a2c14 0%, #23150b 45%, #0d0805 100%),
    #0d0805;
}
/* skryté lobby (hrá sa) – inak by display:flex vyššie prebil atribút hidden a lobby by ostalo navrchu */
#screens.lobby-host[hidden]{ display: none; }
#screens.lobby-host::before{          /* tlmené svetlo zdola, ako od ohňa */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 40% at 50% 108%, rgba(214,116,42,.30), transparent 70%);
}

/* ---- rám ---- */

.lobby-host .frame{
  position: relative; z-index: 1;
  width: min(1320px, 100%); height: min(880px, 100%);
  display: flex; flex-direction: column;
  background:
    linear-gradient(180deg, rgba(58,40,22,.96), rgba(34,23,12,.97)),
    repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 4px);
  border: 3px solid #7d5730;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px #2a1c0e,
    inset 0 0 0 1px #a97c44,
    inset 0 0 60px rgba(0,0,0,.55),
    0 24px 80px rgba(0,0,0,.75);
}
.lobby-host .frame .corner{
  position: absolute; width: 30px; height: 30px; pointer-events: none;
}
.lobby-host .frame .corner::before, .lobby-host .frame .corner::after{
  content: ''; position: absolute; background: #b8862f;
}
.lobby-host .frame .corner::before{ width: 30px; height: 3px; }
.lobby-host .frame .corner::after{ width: 3px;  height: 30px; }
.lobby-host .frame .corner.tl{ top: 5px;    left: 5px; }
.lobby-host .frame .corner.tr{ top: 5px;    right: 5px; }
.lobby-host .frame .corner.bl{ bottom: 5px; left: 5px; }
.lobby-host .frame .corner.br{ bottom: 5px; right: 5px; }
.lobby-host .frame .corner.tr::before, .lobby-host .frame .corner.br::before{ right: 0; }
.lobby-host .frame .corner.tr::after, .lobby-host .frame .corner.br::after{ right: 0; }
.lobby-host .frame .corner.bl::before, .lobby-host .frame .corner.br::before{ bottom: 0; }
.lobby-host .frame .corner.bl::after, .lobby-host .frame .corner.br::after{ bottom: 0; }

/* ---- hlavička ---- */

.lobby-host .frame-top{
  position: relative; height: 56px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 2px solid #6b4a2b;
  background: linear-gradient(180deg, rgba(96,66,36,.55), rgba(40,27,14,.2));
}
.lobby-host .frame-top .title{   /* písmo nadpisov (menu.css): Cinzel Decorative */
  font-family: 'Cinzel Decorative', 'Courier New', serif; font-weight: 700;
  font-size: 19px; letter-spacing: 1.5px; color: #ffd76a;
  padding: 5px 46px;
  border: 2px solid #a97c44; border-radius: 22px;
  background: linear-gradient(180deg, #4b3319, #2a1c0e);
  box-shadow: inset 0 1px 0 rgba(255,215,106,.25), 0 2px 6px rgba(0,0,0,.5);
  text-shadow: 0 2px 3px rgba(0,0,0,.8);
}
.lobby-host .icon-btn{
  position: absolute; top: 12px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1; cursor: pointer;
  background: #3a2714; color: #e8c98a;
  border: 2px solid #7d5730; border-radius: 4px;
}
.lobby-host .icon-btn:hover{ background: #5c3f20; color: #ffd76a; border-color: #b8862f; }
.lobby-host .icon-btn.close{ right: 12px; color: #e59a8a; }
.lobby-host .icon-btn.close:hover{ background: #7a2b22; border-color: #c4553f; color: #ffdcd4; }
.lobby-host .icon-btn.gear{ right: 52px; }

/* ---- rozloženie ---- */

.lobby-host .frame-body{
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 1fr 330px; gap: 14px;
  padding: 14px;
}
.lobby-host .col-left, .lobby-host .col-right{ display: flex; flex-direction: column; min-height: 0; gap: 10px; }

/* ---- hlavičky stĺpcov ---- */

.lobby-host .panel-head{
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; font-size: 12px; letter-spacing: 1px;
  color: #d7b985; text-transform: uppercase;
  background: linear-gradient(180deg, #4b3319, #33220f);
  border: 2px solid #6b4a2b; border-bottom: none; border-radius: 4px 4px 0 0;
}
.lobby-host .panel-head b{ color: #ffd76a; }

/* spoločná mriežka pre hlavičku aj riadky miestností */
.lobby-host .col-left .panel-head .c-name, .lobby-host .lb-rooms .lb-row .c-name{ flex: 1; min-width: 0; }
.lobby-host .col-left .panel-head .c-name{ display: flex; align-items: baseline; }
.lobby-host .panel-head .cnt{ margin-left: auto; padding-right: 14px; font-style: normal;
  font-size: 11px; color: #a2937a; letter-spacing: .5px; }
.lobby-host .col-left .panel-head .c-pl, .lobby-host .lb-rooms .lb-row .c-pl{ flex: none; width: 56px;  text-align: center; }
.lobby-host .col-left .panel-head .c-ping, .lobby-host .lb-rooms .lb-row .c-ping{ flex: none; width: 54px;  text-align: center; }
.lobby-host .col-left .panel-head .c-mis, .lobby-host .lb-rooms .lb-row .c-mis{ flex: none; width: 190px; }
.lobby-host .col-left .panel-head .c-state,
.lobby-host .lb-rooms .lb-row .c-state{ flex: none; width: 74px; text-align: right; }

.lobby-host .col-right .panel-head .c-st, .lobby-host .lb-players .lb-row .c-st{ flex: none; width: 26px; }
.lobby-host .col-right .panel-head .c-name, .lobby-host .lb-players .lb-row .c-name{ flex: 1; min-width: 0; }
.lobby-host .col-right .panel-head .c-cnt, .lobby-host .lb-players .lb-row .c-cnt{ flex: none; }

/* ---- zoznamy ---- */

.lobby-host .lb-list{
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  background: linear-gradient(180deg, rgba(18,12,6,.92), rgba(12,8,4,.94));
  border: 2px solid #6b4a2b; border-radius: 0 0 4px 4px;
}
.lobby-host .lb-list::-webkit-scrollbar{ width: 12px; }
.lobby-host .lb-list::-webkit-scrollbar-track{ background: #1a1209; border-left: 1px solid #3d2c1a; }
.lobby-host .lb-list::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, #7d5730, #4f371c);
  border: 1px solid #a97c44; border-radius: 2px;
}
.lobby-host .lb-list::-webkit-scrollbar-thumb:hover{ background: linear-gradient(180deg, #a97c44, #6b4a2b); }

.lobby-host .lb-list .lb-row{
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; font-size: 13px; color: #e0d3ae;
  border-bottom: 1px solid rgba(107,74,43,.35);
  cursor: pointer;
}
.lobby-host .lb-list .lb-row:hover{ background: rgba(139,99,53,.22); }
.lobby-host .lb-list .lb-row.sel{
  background: linear-gradient(90deg, rgba(184,134,47,.38), rgba(184,134,47,.14));
  box-shadow: inset 3px 0 0 #ffd76a;
  color: #fff2cf;
}
.lobby-host .lb-list .lb-empty{ padding: 26px; text-align: center; color: #7d745f; font-size: 12px; }

/* miestnosti */
.lobby-host .lb-rooms .lb-row .c-name{ display: flex; align-items: center; gap: 7px; overflow: hidden; }
.lobby-host .lb-rooms .lb-row .c-name b{ color: #f3e3b8; font-weight: normal; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.lobby-host .lb-rooms .lb-row.sel .c-name b{ color: #fff4d2; }
.lobby-host .lb-rooms .lb-row .host{ font-style: normal; font-size: 11px; color: #94856a; white-space: nowrap; }
.lobby-host .lb-rooms .lb-row .host::before{ content: '·'; margin-right: 6px; }
.lobby-host .lb-rooms .lb-row .c-pl{ color: #cbe6b4; }
.lobby-host .lb-rooms .lb-row .c-pl.full{ color: #e08a6a; }
.lobby-host .lb-rooms .lb-row .c-ping, .lobby-host .lb-rooms .lb-row .c-mis{ color: #a2937a; font-size: 12px; }
.lobby-host .lb-rooms .lb-row .c-mis{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-host .lb-rooms .lb-row .c-state{ font-size: 11px; letter-spacing: .5px; }
.lobby-host .lb-rooms .lb-row.open .c-state{ color: #8fe07a; }
.lobby-host .lb-rooms .lb-row.running{ opacity: .62; }
.lobby-host .lb-rooms .lb-row.running .c-state{ color: #e08a6a; }
.lobby-host .lb-rooms .lb-row .ico{ color: #ffd76a; }

/* hráči */
.lobby-host .lb-players .lb-row{ cursor: default; }
.lobby-host .lb-players .lb-row .c-name{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lobby-host .lb-players .lb-row .c-cnt{ color: #8d7f66; font-size: 12px; }
.lobby-host .lb-players .lb-row.me{
  background: linear-gradient(90deg, rgba(96,148,64,.34), rgba(96,148,64,.08));
  box-shadow: inset 3px 0 0 #8fe07a;
}
.lobby-host .lb-players .lb-row.me .c-name{ color: #dbf5c9; }
.lobby-host .lb-players .lb-row.me .you{ font-style: normal; color: #8fe07a; font-size: 11px; }
.lobby-host .lb-players .lb-row.game  .ico{ color: #e08a6a; }   /* v hre */
.lobby-host .lb-players .lb-row.room  .ico{ color: #ffd76a; }   /* čaká v miestnosti */
.lobby-host .lb-players .lb-row.lobby .ico{ color: #8ba077; }   /* len v lobby */
.lobby-host .ico{ width: 15px; height: 15px; display: block; }

/* ---- vyhľadávanie ---- */

.lobby-host .searchbar{ position: relative; flex: none; }
.lobby-host .searchbar input{
  width: 100%; padding: 9px 34px 9px 12px;
  background: #120c06; color: #ffe9a8;
  border: 2px solid #6b4a2b; border-radius: 4px;
  font-family: inherit; font-size: 13px; outline: none;
}
.lobby-host .searchbar input:focus{ border-color: #b8862f; }
.lobby-host .searchbar input::placeholder{ color: #6e6551; }
.lobby-host .searchbar .clear{
  position: absolute; right: 7px; top: 7px; width: 22px; height: 22px;
  background: none; border: none; cursor: pointer;
  color: #9a8d72; font-size: 13px;
}
.lobby-host .searchbar .clear:hover{ color: #ffd76a; }

/* ---- tlačidlá ---- */

.lobby-host .mid-buttons{ flex: none; display: flex; gap: 12px; justify-content: center; }
.lobby-host button.orn{
  position: relative; padding: 10px 26px;
  font-family: inherit; font-size: 13px; letter-spacing: 1.5px; cursor: pointer;
  color: #f0dcac;
  background: linear-gradient(180deg, #5c3f20, #38260f);
  border: 2px solid #8d6435; border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,215,106,.18), 0 2px 5px rgba(0,0,0,.45);
}
.lobby-host button.orn:hover:not(:disabled){ background: linear-gradient(180deg, #7d5730, #4b3319);
  border-color: #b8862f; color: #ffe9a8; }
.lobby-host button.orn:active:not(:disabled){ transform: translateY(1px); }
.lobby-host button.orn:disabled{ opacity: .38; cursor: default; }
.lobby-host button.orn.primary{ background: linear-gradient(180deg, #4a7130, #2c4a1c); border-color: #6aa044;
  color: #e8ffd6; }
.lobby-host button.orn.primary:hover:not(:disabled){ background: linear-gradient(180deg, #5c9440, #3a6024); }

/* ---- krátke hlásenie hore pod nadpisom rámu (zvonček, kto prišiel) – lobby.js oznam() ---- */
.lobby-host .lb-oznam{
  position: absolute; left: 50%; top: 58px; transform: translateX(-50%); z-index: 20;
  max-width: min(520px, calc(100% - 48px)); padding: 8px 16px;
  background: rgba(27, 18, 9, .96); border: 2px solid #8d6435; border-radius: 5px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .55);
  color: #ffe9a8; font-size: 12.5px; line-height: 1.4; text-align: center;
  transition: opacity .4s; pointer-events: none;
}
.lobby-host .lb-oznam.skry{ opacity: 0; }

/* ponuka pri hráčovi: zazvoniť */
.lobby-host .lb-players .lb-row[data-hrac]{ position: relative; cursor: pointer; }
.lobby-host .hrac-menu{
  position: absolute; right: 8px; top: 100%; z-index: 30;
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  min-width: 150px; padding: 6px;
  background: #1b1209; border: 2px solid #6b4a2b; border-radius: 5px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .55);
}
.lobby-host .hrac-menu b{
  padding: 2px 8px 5px; color: #ffd76a; font-weight: normal; font-size: 11.5px;
  border-bottom: 1px solid #3a2a18; margin-bottom: 3px;
}
.lobby-host .hrac-menu button{
  padding: 7px 9px; text-align: left;
  background: none; border: none; border-radius: 3px;
  color: #e8dcc0; font-family: inherit; font-size: 12px; cursor: pointer;
}
.lobby-host .hrac-menu button:hover{ background: rgba(139, 99, 53, .35); color: #fff4d2; }

/* ---- pätička so serverom ---- */

.lobby-host .server-line{
  flex: none; padding: 8px 11px; font-size: 11.5px; color: #9a8d72;
  background: rgba(18,12,6,.85); border: 2px solid #6b4a2b; border-radius: 4px;
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lobby-host .server-line b{ color: #d7b985; }
.lobby-host .server-line .dot{ width: 8px; height: 8px; border-radius: 50%; flex: none; }
.lobby-host .server-line .dot.on{ background: #8fe07a; box-shadow: 0 0 6px #8fe07a; }
.lobby-host .server-line .dot.off{ background: #e05555; }

/* ---- dialógy ---- */

.lobby-host .modal-bg{ position: fixed; inset: 0; background: rgba(6,4,2,.72); z-index: 30; }
.lobby-host .modal{
  position: fixed; z-index: 31; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(460px, 92vw); padding: 20px 22px;
  background: linear-gradient(180deg, #34240f, #241809);
  border: 3px solid #8d6435; border-radius: 6px;
  box-shadow: inset 0 0 0 1px #b8862f, 0 20px 60px rgba(0,0,0,.7);
  color: #e8ddba; font-family: "Courier New", monospace;
  /* na nízkej obrazovke (telefón na šírku) sa okno posúva – inak by vrch aj tlačidlá boli mimo */
  max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain;
}
.lobby-host .modal.small{ width: min(380px, 90vw); text-align: center; }
.lobby-host .modal-title{
  font-family: 'Cinzel Decorative', 'Courier New', serif; font-weight: 700;
  font-size: 17px; letter-spacing: 1px; color: #ffd76a;
  padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid #6b4a2b;
}
.lobby-host .modal-body label{
  display: block; font-size: 11.5px; color: #cbb894; margin: 12px 0 5px; letter-spacing: .5px;
}
.lobby-host .modal-body label:first-child{ margin-top: 0; }
.lobby-host .modal-body label i{ font-style: normal; color: #8d7f66; }
.lobby-host .modal-body input, .lobby-host .modal-body select{
  width: 100%; padding: 9px 11px;
  background: #120c06; color: #ffe9a8;
  border: 2px solid #6b4a2b; border-radius: 4px;
  font-family: inherit; font-size: 13px; outline: none;
}
.lobby-host .modal-body input:focus, .lobby-host .modal-body select:focus{ border-color: #b8862f; }
.lobby-host .modal-body input::placeholder{ color: #6e6551; }
.lobby-host .modal-body .two{ display: grid; grid-template-columns: 1fr 110px; gap: 12px; }
.lobby-host .modal-body .dlg-check{ display: flex; align-items: center; gap: 8px; margin-top: 14px;
  font-size: 12.5px; color: #d7c9a8; cursor: pointer; }
.lobby-host .modal-body .dlg-check input{ width: 16px; height: 16px; accent-color: #d7b985; cursor: pointer; }
.lobby-host .modal-body .hint{ font-size: 11.5px; color: #9a8d72; line-height: 1.6; margin-top: 12px; }
.lobby-host .modal-body .hint b{ color: #d7b985; }
.lobby-host .modal-body p{ font-size: 13px; line-height: 1.55; }
.lobby-host .modal-err{ min-height: 18px; margin-top: 10px; font-size: 12.5px; color: #ff9a9a; }
.lobby-host .modal-buttons{ display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.lobby-host .modal.small .modal-buttons{ justify-content: center; }

/* ---- úzke okno ---- */

@media (max-width: 980px) {
  .lobby-host .frame-body{ grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lobby-host .col-right{ max-height: 240px; }
  .lobby-host .col-left .panel-head .c-mis, .lobby-host .lb-rooms .lb-row .c-mis{ display: none; }
}

/* ---- obrazovka miestnosti ---- */

.lobby-host .room-frame { width: min(1100px, 100%); height: min(760px, 100%); }
.lobby-host .room-body { grid-template-columns: 1fr 380px; }

.lobby-host .room-players .lb-row { cursor: default; }
.lobby-host .room-players .lb-row .c-st { flex: none; width: 20px; color: #ffd76a; text-align: center; }
.lobby-host .room-players .lb-row .c-name { flex: 1; display: flex; align-items: baseline; gap: 8px; }
.lobby-host .room-players .lb-row .tagno { font-style: normal; font-size: 11px; color: #8d7f66; }
.lobby-host .room-players .lb-row .c-ready { flex: none; font-size: 11px; color: #94856a; letter-spacing: .5px; }
.lobby-host .room-players .lb-row .c-ready.yes { color: #8fe07a; }
.lobby-host .room-players .lb-row.free { opacity: .38; font-style: italic; }
/* zakladateľ: vyhodiť hráča z miestnosti */
.lobby-host .room-players .lb-vyhod {
  flex: none; margin-left: 8px; padding: 3px 8px; font: inherit; font-size: 10px; letter-spacing: .5px; cursor: pointer;
  color: #ffb2a6; background: #2a1411; border: 1px solid #6e3226; border-radius: 3px;
}
.lobby-host .room-players .lb-vyhod:hover, .lobby-host .room-players .lb-vyhod:focus-visible { border-color: #ef6a5f; color: #ffd6cf; outline: none; }
.lobby-host button.rs.mini { padding: 1px 6px; font-size: 10px; }
.lobby-host .room-players .lb-row.free .c-name { color: #7d745f; }

.lobby-host .room-note {
  flex: none; padding: 9px 12px; font-size: 11.5px; line-height: 1.5; color: #a2937a;
  background: rgba(18,12,6,.7); border: 2px solid #6b4a2b; border-radius: 4px;
}

.lobby-host .missionpick .lb-row { padding: 9px 12px; }
.lobby-host .missionpick .lb-row b { color: #ffd76a; font-weight: normal; margin-right: 4px; }
.lobby-host .missionpick .lb-row.ro { cursor: default; }
.lobby-host .missionpick .lb-row.ro:hover { background: none; }

.lobby-host .room-buttons { flex: none; display: flex; gap: 10px; }
.lobby-host .room-buttons button { flex: 1; padding: 10px 8px; }

@media (max-width: 980px) {
  .lobby-host .room-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
}

/* ---- nastavenie kola v miestnosti ---- */

.lobby-host .roundsetup { padding: 4px 0; }
.lobby-host .rs-block { padding: 12px 14px; border-bottom: 1px solid rgba(107,74,43,.35); }
.lobby-host .rs-label { font-family: 'Cinzel', 'Courier New', serif; font-weight: 700; font-size: 11px; letter-spacing: 1.5px; color: #cbb894;
  text-transform: uppercase; margin-bottom: 8px; }
.lobby-host .rs-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.lobby-host button.rs {
  padding: 7px 13px; font-family: inherit; font-size: 12px; cursor: pointer;
  color: #d7c49b; background: #1c1409;
  border: 2px solid #4a3520; border-radius: 4px;
}
.lobby-host button.rs:hover:not(:disabled) { border-color: #8d6435; color: #ffe9a8; }
.lobby-host button.rs.sel { border-color: #ffd76a; color: #fff2cf; background: #2b2011; }
.lobby-host button.rs:disabled { cursor: default; opacity: .55; }
.lobby-host button.rs.sel:disabled { opacity: .85; }
.lobby-host .rs-note {
  padding: 12px 14px; font-size: 11.5px; line-height: 1.6; color: #9a8d72;
}
.lobby-host .rs-note b { color: #d7b985; }

/* ---- výsledok kola ---- */

.lobby-host .result-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 4px;
}
.lobby-host .result-side {
  padding: 12px 14px; border: 2px solid #4a3520; border-radius: 5px; background: rgba(18,12,6,.6);
}
.lobby-host .result-side.win { border-color: #6aa044; background: rgba(58,96,36,.22); }
.lobby-host .result-side h4 {
  font-size: 12px; letter-spacing: 1.5px; color: #cbb894; text-transform: uppercase;
  margin-bottom: 8px; font-weight: normal;
}
.lobby-host .result-side.win h4 { color: #a8e08a; }
.lobby-host .result-side .pts { font-size: 30px; color: #ffd76a; letter-spacing: 1px; }
.lobby-host .result-side.win .pts { color: #b6f39a; }
.lobby-host .result-side .det { font-size: 11.5px; color: #9a8d72; line-height: 1.7; margin-top: 8px; }
.lobby-host .result-side .det b { color: #d7b985; }

/* ---- telefón na šírku: nízka, ale široká obrazovka ---- */
/* Pri max-width 980 sa inak prepne na jeden stĺpec, čo je na 390 px výšky
   nepoužiteľné — pri dosť širokej obrazovke necháme dva stĺpce vedľa seba. */
@media (max-width: 980px) and (min-width: 660px) {
  .lobby-host .frame-body { grid-template-columns: 1fr 240px; grid-template-rows: 1fr; }
  .lobby-host .col-right { max-height: none; }
  .lobby-host .room-body { grid-template-columns: 1fr 260px; grid-template-rows: 1fr; }
  .lobby-host .col-left .panel-head .c-mis, .lobby-host .lb-rooms .lb-row .c-mis { display: none; }
}

@media (max-height: 560px) {
  .lobby-host { padding: 5px; }
  .lobby-host .frame { height: 100%; }
  .lobby-host .frame-top { height: 38px; }
  .lobby-host .frame-top .title { font-size: 13px; letter-spacing: 2px; padding: 3px 24px; }
  .lobby-host .icon-btn { top: 4px; width: 28px; height: 28px; font-size: 14px; }
  .lobby-host .icon-btn.gear { right: 44px; }
  .lobby-host .frame-body { padding: 8px; gap: 8px; }
  .lobby-host .col-left, .lobby-host .col-right { gap: 6px; }
  .lobby-host .panel-head { padding: 4px 10px; font-size: 10px; }
  .lobby-host .lb-list .lb-row { padding: 5px 10px; font-size: 12px; }
  .lobby-host .searchbar input { padding: 6px 10px; font-size: 12px; }
  .lobby-host button.orn { padding: 6px 14px; font-size: 12px; }
  .lobby-host .server-line { padding: 5px 9px; font-size: 10px; }
  .lobby-host .room-note, .lobby-host .rs-note { padding: 6px 10px; font-size: 10px; line-height: 1.45; }
  .lobby-host .rs-block { padding: 7px 10px; }
  .lobby-host button.rs { padding: 5px 10px; font-size: 11px; }
  .lobby-host .modal { padding: 12px 14px; }
  .lobby-host .modal-title { font-size: 13px; padding-bottom: 7px; margin-bottom: 9px; }
  .lobby-host .modal-body label { margin: 8px 0 4px; }
  .lobby-host .modal-body input, .lobby-host .modal-body select { padding: 6px 9px; font-size: 12px; }
  .lobby-host .big { font-size: 26px; margin: 2px 0 8px; }
  .lobby-host .result-side { padding: 8px 10px; }
  .lobby-host .result-side .pts { font-size: 22px; }
}


/* ---- Snowbound: doplnky ---- */

.lobby-host .icon-btn.gear.s-textom { width: auto; padding: 0 10px; gap: 6px; }
.lobby-host .icon-btn.gear.s-textom .txt { font: bold 12px 'Courier New', monospace; letter-spacing: .04em; }
.lobby-host .icon-btn.srv { left: 12px; right: auto; }
@media (max-width: 720px) {
  .lobby-host .icon-btn.gear.s-textom { width: 28px; padding: 0; }
  .lobby-host .icon-btn.gear.s-textom .txt { display: none; }
}
.lobby-host .lb-rooms .lb-row:focus-visible, .lobby-host .lb-rooms .lb-row.pad-focus { outline: 2px solid #ffd76a; outline-offset: -2px; }
.lobby-host button.pad-focus, .lobby-host input.pad-focus { outline: 2px solid #ffd76a; outline-offset: 2px; }
.lobby-host .room-players .lb-row .c-ready.gone { color: #e08a6a; }
.lobby-host .room-players .lb-row .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
.lobby-host .rs-pozn { font-size: 11px; line-height: 1.5; color: #8d7f66; margin-top: 7px; }

/* výber typu hry a strážcu pri zakladaní miestnosti: veľké karty, všetky rovnako veľké
   (rovnaké riadky aj stĺpce – dlhší popis kartu nenafúkne, ikonka je všade na tom istom mieste) */
.lobby-host .mode-cards { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 12px; margin: 4px 0 8px; }
.lobby-host .mode-card {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 7px;
  min-width: 0; padding: 16px 10px 14px; cursor: pointer; font-family: inherit;
  color: #e8ddba; background: linear-gradient(180deg, #2b1d0d, #1a1108);
  border: 2px solid #6b4a2b; border-radius: 6px;
}
.lobby-host .mode-card:not(:disabled):hover, .lobby-host .mode-card.pad-focus { border-color: #ffd76a; background: linear-gradient(180deg, #3d2a13, #22160a); }
.lobby-host .mode-card svg { color: #ffd76a; }
.lobby-host .mode-card b { font-size: 15px; letter-spacing: 1.5px; color: #ffd76a; font-weight: normal; text-transform: uppercase; }
.lobby-host .mode-card small { font-size: 11.5px; color: #a2937a; }

/* typ hry: zlaté vektorové ikonky, širšie okno */
.lobby-host .modal.hry { width: min(580px, 94vw); }
.lobby-host .mode-card .mode-ico { width: 100%; height: 96px; object-fit: contain; margin-bottom: 4px; pointer-events: none; user-select: none; }
/* hra, ktorá ešte nie je hotová: sivá, nedá sa zvoliť */
.lobby-host .mode-card.pripravujeme { cursor: default; border-style: dashed; border-color: #4a3620; }
.lobby-host .mode-card.pripravujeme .mode-ico { filter: grayscale(1) brightness(.7); opacity: .55; }
.lobby-host .mode-card.pripravujeme b { color: #8d7f66; }
.lobby-host .mode-card.pripravujeme small { color: #6e6551; text-transform: uppercase; letter-spacing: 2px; }
/* úzky telefón na výšku: menšie ikonky */
@media (max-width: 520px) {
  .lobby-host .mode-card .mode-ico { height: 70px; }
  .lobby-host .mode-card { padding: 12px 6px 10px; }
  .lobby-host .mode-card b { font-size: 13px; letter-spacing: 1px; }
}
/* telefón na šírku (nízka obrazovka): všetky štyri hry vedľa seba */
@media (max-height: 520px) and (min-width: 600px) {
  .lobby-host .modal.hry { width: min(880px, 96vw); }
  .lobby-host .mode-cards.hry { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .lobby-host .mode-cards.hry .mode-card { padding: 10px 6px 9px; gap: 5px; }
  .lobby-host .mode-card .mode-ico { height: 64px; }
  .lobby-host .mode-card b { font-size: 13px; letter-spacing: 1px; }
  .lobby-host .mode-card small { font-size: 11px; }
}

/* koniec kola (ako výsledková karta v Krádeži) */
.lobby-host .card {
  position: relative; z-index: 1; width: min(640px, 94vw); max-height: 100%; overflow-y: auto;
  background: rgba(20,15,9,0.94); border: 3px solid #6b4a2b; border-radius: 10px;
  padding: 26px 30px; color: #f3e9c9; box-shadow: 0 18px 60px rgba(0,0,0,.6);
}
.lobby-host .card .tag { font-size: 12px; color: #9dbb84; letter-spacing: 2px; margin-bottom: 18px; text-align: center; }
.lobby-host .card h2 { font-family: 'Cinzel', 'Courier New', serif; font-weight: 700; font-size: 15px; color: #ffd76a; letter-spacing: 2px; text-transform: uppercase; margin: 16px 0 10px; }
.lobby-host .big { font-family: 'Cinzel Decorative', 'Courier New', serif; font-weight: 700; font-size: 40px; letter-spacing: 2px; text-align: center; margin: 4px 0 12px; color: #ffd76a;
  text-shadow: 0 2px 0 #2a1605, 0 0 14px rgba(0, 0, 0, .6); }
.lobby-host .big.win { color: #8fe07a; }
.lobby-host .big.lose { color: #ff7a7a; }
.lobby-host .ranking { border: 2px solid #4a3520; border-radius: 6px; overflow: hidden; }
.lobby-host .ranking .lb-row { display: flex; align-items: center; gap: 12px; padding: 9px 14px; font-size: 13px;
  color: #e0d3ae; border-bottom: 1px solid rgba(107,74,43,.35); }
.lobby-host .ranking .lb-row:last-child { border-bottom: none; }
.lobby-host .ranking .lb-row.me { background: linear-gradient(90deg, rgba(96,148,64,.34), rgba(96,148,64,.08)); box-shadow: inset 3px 0 0 #8fe07a; }
.lobby-host .ranking .lb-row.first .c-place { color: #ffd76a; }
.lobby-host .ranking .c-place { width: 26px; color: #a2937a; }
.lobby-host .ranking .c-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-host .ranking .c-role { font-size: 11px; color: #94856a; letter-spacing: .5px; text-transform: uppercase; }
.lobby-host .ranking .c-pts { width: 48px; text-align: right; color: #ffd76a; font-size: 16px; }
.lobby-host .card .row { display: flex; justify-content: center; margin-top: 18px; }

/* obnova spojenia – prúžok navrchu (ako v Krádeži) */
#reconnect {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: none;
  padding: 9px 16px; text-align: center; font-size: 13px; letter-spacing: 1px;
  color: #ffe9a8; background: rgba(122,63,20,.95);
  border-bottom: 2px solid #b8862f; font-family: "Courier New", monospace;
}
#reconnect.fail { background: rgba(122,32,24,.96); }
#reconnect .spin {
  display: inline-block; width: 10px; height: 10px; margin-right: 9px; vertical-align: -1px;
  border: 2px solid rgba(255,233,168,.35); border-top-color: #ffe9a8; border-radius: 50%;
  animation: reconnect-spin .8s linear infinite;
}
#reconnect.fail .spin { display: none; }
@keyframes reconnect-spin { to { transform: rotate(360deg); } }

/* miestnosť: Pozrieť do lobby a Nastavenie vedľa seba (vpravo hore, pred krížikom) */
.lobby-host .top-btns { position: absolute; top: 12px; right: 52px; display: flex; gap: 8px; }
.lobby-host .top-btns .icon-btn { position: static; width: auto; padding: 0 10px; gap: 6px; }
.lobby-host .icon-btn.s-textom .txt { font: bold 12px 'Courier New', monospace; letter-spacing: .04em; }
@media (max-height: 560px) {
  .lobby-host .top-btns { top: 4px; right: 44px; }
}
@media (max-width: 720px) {
  .lobby-host .top-btns #b-settings { width: 28px; padding: 0; }
  .lobby-host .top-btns #b-settings .txt { display: none; }
}
/* lobby počas pobytu v miestnosti: cesta späť pulzuje nazeleno, vojsť inam sa nedá (sivé) */
.lobby-host button.orn.pulz { animation: pulz-spat 1.6s ease-in-out infinite; }
@keyframes pulz-spat {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(200, 255, 170, .25), 0 0 0 0 rgba(120, 220, 90, .0); }
  50% { box-shadow: inset 0 1px 0 rgba(200, 255, 170, .35), 0 0 0 5px rgba(120, 220, 90, .35), 0 0 18px rgba(120, 220, 90, .55); }
}
.lobby-host button.orn:disabled { filter: grayscale(1); opacity: .45; }

/* Policajti vs zlodeji: za koho hráč hrá (v zozname hráčov) */
.lb-row .strana { margin-left: 8px; padding: 1px 7px; border-radius: 8px; font-style: normal;
  font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.lb-row .strana.police { background: rgba(88, 169, 255, 0.22); color: #9ccbff; }
.lb-row .strana.thief { background: rgba(255, 106, 95, 0.2); color: #ff9b91; }

/* Policajti vs zlodeji: výber tímu je navrchu a je zvýraznený (klikať smie každý, nielen zakladateľ) */
.roundsetup .tim-blok { border: 1px solid rgba(255, 215, 106, 0.45); border-radius: 10px;
  padding: 8px 10px 10px; background: rgba(255, 215, 106, 0.06); }

/* v riadku servera: hra sa načítava – výrazná zlatá, nech je to vidno */
.lobby-host .server-line .nacitava{ color: #ffd76a; font-weight: 700; text-shadow: 0 0 8px rgba(255,200,90,.45); }
.lobby-host .server-line .nacitava.zle{ color: #ff8a6a; text-shadow: none; }

/* ---- okienko „Načítavam hru…“ pri návrate do rozbehnutého kola (src/nacitavanie-okno.js) ---- */
#nacitavanie-okno{
  position: fixed; inset: 0; z-index: 29;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(6,4,2,.5);
  font-family: "Courier New", monospace;
  animation: nac-prichod .3s ease-out;
}
#nacitavanie-okno[hidden]{ display: none; }
@keyframes nac-prichod{ from{ opacity: 0; } to{ opacity: 1; } }
#nacitavanie-okno .nac-karta{
  width: min(340px, 100%); padding: 16px 20px 18px;
  background: linear-gradient(180deg, #3a2812, #231708);
  border: 2px solid #8d6435; border-radius: 8px;
  box-shadow: inset 0 0 0 1px #b8862f, 0 18px 50px rgba(0,0,0,.7);
  color: #f1e4bf;
}
#nacitavanie-okno .nac-riadok{ display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
#nacitavanie-okno .nac-text{ font-size: 14px; letter-spacing: 1px; }
#nacitavanie-okno .nac-cislo{ font-size: 22px; color: #ffd76a; font-variant-numeric: tabular-nums; }
#nacitavanie-okno .nac-pruh{ height: 8px; border-radius: 4px; overflow: hidden; background: #120b05; border: 1px solid #6b4a2b; }
#nacitavanie-okno .nac-pruh i{
  display: block; height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, #e8952f, #ffd76a);
  transition: width .4s ease-out;
}
#nacitavanie-okno.chyba .nac-pruh i{ background: #b5452f; }
#nacitavanie-okno .nac-znova{
  margin-top: 14px; width: 100%; padding: 8px; cursor: pointer;
  font-family: inherit; font-size: 13px; letter-spacing: 1.5px; color: #e8ddba;
  background: linear-gradient(180deg, #4a3319, #2e1f0e); border: 2px solid #8d6435; border-radius: 4px;
}
#nacitavanie-okno .nac-znova[hidden]{ display: none; }

/* ---- miestnosť: typ hry ako obrázky (ako pri hre jedného hráča) ---- */
.lobby-host .rs-hry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.lobby-host button.rs-hra {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 4px 8px; min-width: 0;
  font-family: inherit; cursor: pointer; color: #d7c49b;
  background: linear-gradient(180deg, #2a1d0e, #1a1208); border: 2px solid #4a3520; border-radius: 6px;
}
.lobby-host button.rs-hra img { width: 100%; height: 52px; object-fit: contain; pointer-events: none; user-select: none; opacity: .8; }
.lobby-host button.rs-hra b { font-weight: normal; font-size: 10.5px; letter-spacing: .5px; line-height: 1.25; text-align: center; text-transform: uppercase; }
.lobby-host button.rs-hra:hover:not(:disabled) { border-color: #8d6435; color: #ffe9a8; }
.lobby-host button.rs-hra:hover:not(:disabled) img { opacity: 1; }
.lobby-host button.rs-hra.sel { border-color: #ffd76a; color: #ffd76a; background: linear-gradient(180deg, #3d2a13, #22160a); box-shadow: 0 0 12px rgba(255, 215, 106, .25); }
.lobby-host button.rs-hra.sel img { opacity: 1; }
.lobby-host button.rs-hra:disabled { cursor: default; }
.lobby-host button.rs-hra:disabled:not(.sel) { opacity: .5; }
.lobby-host .rs-hra-popis { margin-top: 9px; font-size: 11.5px; line-height: 1.55; color: #b9a988; }
.lobby-host .rs-hra-popis b { color: #ffd76a; font-weight: normal; }
.lobby-host .rs-pravidla { margin-top: 6px; font-size: 11px; line-height: 1.5; color: #8d7f66; }
.lobby-host .rs-pravidla summary { cursor: pointer; color: #cbb894; letter-spacing: .5px; width: max-content; }
.lobby-host .rs-pravidla summary:hover { color: #ffe9a8; }
.lobby-host .rs-pravidla[open] summary { margin-bottom: 5px; }

/* ---- miestnosť: výber (počet hráčov) v štýle tlačidiel ---- */
.lobby-host .rs-vyber { position: relative; display: inline-block; }
.lobby-host .rs-vyber::after {
  content: ''; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; margin-top: -6px; pointer-events: none;
  border: solid #ffd76a; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.lobby-host .rs-vyber select {
  appearance: none; -webkit-appearance: none; min-width: 150px; padding: 7px 34px 7px 13px;
  font-family: inherit; font-size: 12px; cursor: pointer; color: #fff2cf;
  background: #2b2011; border: 2px solid #ffd76a; border-radius: 4px;
}
.lobby-host .rs-vyber select:hover:not(:disabled), .lobby-host .rs-vyber select:focus-visible { border-color: #ffe9a8; outline: none; box-shadow: 0 0 10px rgba(255, 215, 106, .25); }
.lobby-host .rs-vyber select:disabled { cursor: default; opacity: .85; }
.lobby-host .rs-vyber select option { background: #1c1409; color: #d7c49b; }
.lobby-host .rs-vyber select option:disabled { color: #6e6551; }
.lobby-host .rs-vedla { align-self: center; font-size: 11px; color: #8d7f66; }

@media (max-height: 560px) {
  .lobby-host button.rs-hra img { height: 34px; }
  .lobby-host button.rs-hra b { font-size: 9px; }
}

/* telefón: poznámka v miestnosti („Kolo sa spúšťa…“, popis hry) by zakryla celú miestnosť – nezobrazuje sa */
body.touch .lobby-host .room-note { display: none; }

/* ---- Discord (discord.js): modré tlačidlo s logom a nápisom vpravo hore – lobby aj miestnosť ---- */
.lobby-host .icon-btn.discord { background: #5865f2; border-color: #3b44a8; color: #fff; text-decoration: none; gap: 7px; }
.lobby-host .icon-btn.discord:hover { background: #717cff; border-color: #c3c8ff; color: #fff; }
.lobby-host .icon-btn.discord .dc-logo { width: 18px; height: 18px; flex: none; }
.lobby-host .top-btns .icon-btn.discord { padding: 0 12px; }
@media (max-height: 560px) {
  .lobby-host .icon-btn.discord .dc-logo { width: 16px; height: 16px; }
  .lobby-host .top-btns .icon-btn.discord { padding: 0 9px; }
}
.lobby-host .top-btns .icon-btn.discord .txt { display: inline; }

/* miestnosť: nadpis v strede voľného miesta naľavo od tlačidiel (na telefóne ho „Pozrieť do lobby“ prekrývalo) */
.lobby-host .room-frame .frame-top { justify-content: flex-start; gap: 8px; padding: 0 12px; }
.lobby-host .room-frame .frame-top .title-miesto { flex: 1; min-width: 0; display: flex; justify-content: center; }
.lobby-host .room-frame .frame-top .title { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-host .room-frame .frame-top .top-btns,
.lobby-host .room-frame .frame-top .icon-btn.close { position: static; flex: none; }
@media (max-height: 560px) {
  .lobby-host .room-frame .frame-top .title { padding: 3px 16px; }
}

/* ---- kolo sa spúšťa: okno s hráčmi a načítaním (lobby.js startOkno) ---- */
.lobby-host .start-okno { position: fixed; inset: 0; z-index: 30; background: rgba(6, 4, 2, .62); }
.lobby-host .start-karta { width: min(520px, 94vw); }
.lobby-host .start-text { margin: 0 0 12px; font-size: 12.5px; line-height: 1.5; color: #d9cfb2; }
.lobby-host .start-text b { color: #ffd76a; }
.lobby-host .start-hraci { display: flex; flex-direction: column; gap: 7px; }
.lobby-host .start-hrac { display: grid; grid-template-columns: 12px minmax(0, 1fr) 120px 92px; align-items: center; gap: 9px; font-size: 12.5px; }
.lobby-host .start-hrac .dot { width: 10px; height: 10px; border-radius: 50%; }
.lobby-host .start-hrac .meno { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f3e3b8; }
.lobby-host .start-hrac .meno i { font-style: normal; color: #9dbb84; }
.lobby-host .start-hrac .pruh { height: 8px; border-radius: 4px; overflow: hidden; background: #120b05; border: 1px solid #6b4a2b; }
.lobby-host .start-hrac .pruh i { display: block; height: 100%; background: linear-gradient(90deg, #b8862f, #ffd76a); transition: width .3s; }
.lobby-host .start-hrac.hotovo .pruh i { background: linear-gradient(90deg, #4fa84a, #8fe07a); }
.lobby-host .start-hrac .pct { text-align: right; color: #ffd76a; font-variant-numeric: tabular-nums; }
.lobby-host .start-hrac.hotovo .pct { color: #8fe07a; }
@media (max-width: 560px) { .lobby-host .start-hrac { grid-template-columns: 12px minmax(0, 1fr) 70px 78px; } }
