/* Kámen · Nůžky · Papír — styl (navazuje na „Králové AI“) */
:root {
  --bg: #0b0d11; --panel: #12151b; --panel2: #181c24; --panel3: #1f2430;
  --line: #2a303c; --line2: #3a4150;
  --text: #e9e3d4; --text2: #c4bfb2; --muted: #8f8c84;
  --gold: #d4b26a; --gold2: #f3d792;
  --war: #e5484d; --ok: #3fb68b; --warn: #e0a43a;
  --radius: 8px;
  --draw: #6d727d;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font-family: var(--font-ui); font-size: 15px; line-height: 1.5;
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(212, 178, 106, .10), transparent 70%),
    radial-gradient(600px 400px at 100% 30%, rgba(16, 163, 127, .04), transparent 70%),
    radial-gradient(600px 400px at 0% 40%, rgba(217, 119, 87, .05), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}
a { color: var(--gold2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre, kbd { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.pad { padding: 10px 12px; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }

/* ---------- horní lišta ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 1240px; margin: 0 auto; padding: 18px 16px 10px;
}
.brand h1 {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .06em; font-size: clamp(20px, 4.6vw, 30px);
  background: linear-gradient(180deg, var(--gold2), var(--gold) 60%, #a98a4c); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold);
}
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; letter-spacing: .04em; }
.top-status { display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted);
}
.pill .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); }
.pill.running { background: rgba(63, 182, 139, .12); border-color: rgba(63, 182, 139, .45); color: var(--ok); }
.pill.running .pdot { background: var(--ok); animation: pulse 1.4s ease-in-out infinite; }
.pill.waiting { background: rgba(224, 164, 58, .12); border-color: rgba(224, 164, 58, .5); color: var(--warn); }
.pill.waiting .pdot { background: var(--warn); animation: pulse 2.4s ease-in-out infinite; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.conn .cdot { width: 9px; height: 9px; border-radius: 50%; background: var(--war); box-shadow: 0 0 0 3px rgba(229, 72, 77, .15); }
.conn.on .cdot { background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 182, 139, .18); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(63, 182, 139, .6); } 50% { box-shadow: 0 0 0 5px rgba(63, 182, 139, 0); } }

.tabs {
  max-width: 1240px; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 10px 16px; color: var(--text2); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s, background .15s; border-radius: 6px 6px 0 0;
}
.tabs a:hover { color: var(--text); background: rgba(255, 255, 255, .03); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--gold2); border-bottom-color: var(--gold); }

.banner {
  max-width: 1240px; margin: 12px auto 0; padding: 10px 16px; background: rgba(229, 72, 77, .12); border: 1px solid rgba(229, 72, 77, .5);
  color: #ffb3b6; border-radius: var(--radius); font-weight: 600; width: calc(100% - 32px);
}
.banner[hidden] { display: none; }
main { max-width: 1240px; margin: 0 auto; padding: 18px 16px 40px; outline: none; }
.foot { max-width: 1240px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

/* ---------- panely a formuláře ---------- */
.panel {
  background: linear-gradient(180deg, var(--panel), #101319); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 16px; min-width: 0;
}
.ph { font-family: var(--font-display); font-weight: 600; letter-spacing: .05em; font-size: 17px; color: var(--gold2); margin-bottom: 12px; }
.nh { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); margin: 4px 0 10px; font-weight: 600; }
.loading { color: var(--muted); padding: 24px; text-align: center; }
.loading::after { content: ''; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border: 2px solid var(--line2); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
.errbox { background: rgba(229, 72, 77, .1); border: 1px solid rgba(229, 72, 77, .45); color: #ffb3b6; padding: 10px 14px; border-radius: var(--radius); margin: 8px 0; }

.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text2); font-weight: 500; }
.form label.check { flex-direction: row; align-items: center; gap: 9px; font-size: 14px; color: var(--text); cursor: pointer; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
select, input[type="number"] {
  width: 100%; background: var(--panel3); border: 1px solid var(--line2); border-radius: 6px; padding: 8px 10px; min-height: 38px;
  color: var(--text); transition: border-color .15s;
}
select:hover, input[type="number"]:hover { border-color: var(--gold); }
option:disabled { color: var(--muted); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--gold); width: 17px; height: 17px; flex: none; }
.formerr { color: #ff9ea1; font-size: 13px; min-height: 0; }
.formerr:empty { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; min-height: 38px;
  padding: 8px 16px; border-radius: 6px; border: 1px solid var(--line2); background: var(--panel3); color: var(--text); font-weight: 600;
  transition: transform .1s, background .15s, border-color .15s, box-shadow .15s; text-decoration: none;
}
.btn:hover { border-color: var(--gold); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #e2c27b, #b99445); border-color: #e2c27b; color: #1a1408; }
.btn.primary:hover { box-shadow: 0 0 22px -4px rgba(212, 178, 106, .6); }
.btn.danger { background: rgba(229, 72, 77, .14); border-color: rgba(229, 72, 77, .55); color: #ff9ea1; }
.btn.danger:hover { background: rgba(229, 72, 77, .24); border-color: var(--war); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 30px; padding: 4px 11px; font-size: 13px; }
.btn.big { min-height: 48px; font-size: 16px; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line2); color: var(--text2); background: var(--panel2); white-space: nowrap; }
.badge.st-running { color: var(--ok); border-color: rgba(63, 182, 139, .5); background: rgba(63, 182, 139, .1); }
.badge.st-reflecting { color: var(--warn); border-color: rgba(224, 164, 58, .5); background: rgba(224, 164, 58, .1); }
.badge.st-done { color: var(--gold2); border-color: rgba(212, 178, 106, .45); background: rgba(212, 178, 106, .08); }
.badge.st-waiting { color: var(--warn); border-color: rgba(224, 164, 58, .55); background: rgba(224, 164, 58, .12); }
.badge.st-invalid { color: #ff9ea1; border-color: rgba(229, 72, 77, .6); background: rgba(229, 72, 77, .16); white-space: normal; }
.badge.st-error { color: var(--war); border-color: rgba(229, 72, 77, .5); background: rgba(229, 72, 77, .1); }
.badge.kind-h { color: #9ec8ff; border-color: rgba(120, 170, 255, .4); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--panel3); border: 1px solid var(--line2); color: var(--text2); }
.chip.ok { color: var(--ok); border-color: rgba(63, 182, 139, .5); }
.chip.bad { color: var(--warn); border-color: rgba(224, 164, 58, .5); background: rgba(224, 164, 58, .08); }
.pn { color: var(--c, var(--text)); font-weight: 600; }
.draw-t { color: var(--text2); font-weight: 600; }
.warnic { color: var(--warn); cursor: help; }
.spin { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; border: 2px solid rgba(255, 255, 255, .15); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- aréna ---------- */
.arena { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.side-form { position: sticky; top: 12px; }
.live-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.live-head .ph { margin-bottom: 8px; }
.live-actions { display: flex; gap: 8px; }

.board { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; margin: 6px 0 16px; }
.side {
  --c: var(--gold); position: relative; text-align: center; padding: 14px 8px 12px; border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 14%, var(--panel2)), var(--panel2));
  border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); overflow: hidden; min-width: 0;
}
.side::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); }
.side.lead { box-shadow: 0 0 36px -14px var(--c); }
.side-name { font-weight: 600; color: var(--c); font-size: clamp(13px, 2.8vw, 16px); overflow-wrap: anywhere; }
.side-score { font-family: var(--font-display); font-weight: 700; font-size: clamp(48px, 12vw, 92px); line-height: 1.05; color: var(--text); animation: scorein .45s cubic-bezier(.2, 1.4, .4, 1); text-shadow: 0 0 30px color-mix(in srgb, var(--c) 45%, transparent); }
.side-sub { color: var(--muted); font-size: 11.5px; overflow-wrap: anywhere; }
@keyframes scorein { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0 6px; min-width: 96px; text-align: center; }
.mid-k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
.mid-n { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 5vw, 34px); color: var(--gold2); line-height: 1; }
.mid-n small { font-size: .5em; color: var(--muted); font-weight: 500; }
.mid-d, .mid-s { color: var(--text2); font-size: 12.5px; }

.reveal { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 8px 0 12px; }
.hand {
  --c: var(--gold); text-align: center; padding: 12px 6px 10px; border-radius: var(--radius); background: var(--panel2);
  border: 1px solid var(--line); transition: box-shadow .4s, border-color .4s, opacity .4s, filter .4s; min-width: 0;
}
.hand-who { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--c); font-weight: 700; }
.hand-emoji { font-size: clamp(54px, 15vw, 96px); line-height: 1.15; min-height: 1.15em; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .5)); }
.hand-move { font-size: 13px; color: var(--text2); }
.hand.win { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 46px -6px var(--c); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, var(--panel2)), var(--panel2)); }
.hand.lose { opacity: .62; filter: saturate(.6); }
.hand.ghost .hand-emoji { opacity: .35; }
.vs { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 88px; }
.vs-n { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.vs-t { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--muted); }
.verdict { font-weight: 700; font-size: 14px; padding: 3px 12px; border-radius: 999px; background: var(--panel3); border: 1px solid var(--line2); }
.v-win { color: var(--c); border-color: var(--c); }
.v-draw { color: var(--text2); }
.v-me.win { color: var(--ok); border-color: var(--ok); background: rgba(63, 182, 139, .12); }
.v-me.lose { color: var(--war); border-color: var(--war); background: rgba(229, 72, 77, .1); }
/* odhalení */
.reveal.anim .hand.l { animation: slideL .55s cubic-bezier(.2, .9, .3, 1) both; }
.reveal.anim .hand.r { animation: flipR .7s .45s cubic-bezier(.2, .9, .3, 1) both; }
.reveal.anim .vs { animation: fadeUp .5s .95s both; }
@keyframes slideL { from { transform: translateX(-40px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flipR { 0% { transform: perspective(500px) rotateY(90deg) scale(.85); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes fadeUp { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.reveal.waiting .hand.r { animation: breathe 1.6s ease-in-out infinite; }
.hand.chosen { border-color: var(--c); box-shadow: 0 0 30px -10px var(--c); }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
.hand-emoji.thinking { opacity: .55; animation: wobble 1.8s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-8deg) scale(.95); opacity: .4; } 50% { transform: rotate(8deg) scale(1.05); opacity: .8; } }

.pend { background: var(--panel2); border: 1px dashed var(--line2); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; }
.pend-t { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.pend-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pchip { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); background: color-mix(in srgb, var(--c) 8%, var(--panel3)); font-size: 14px; }
.pchip b { color: var(--c); }
.pchip.think { color: var(--text2); }
.pchip.ready { color: var(--ok); }
.pchip .ck { font-weight: 700; }

.strip { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 6px; }
.rc {
  min-width: 26px; height: 26px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px;
  font-size: 11.5px; font-weight: 700; color: #0b0d11; background: var(--c, var(--draw)); animation: chipin .35s both;
}
.rc.draw { color: #e9e3d4; }
.rc.pending { background: transparent; color: var(--gold); border: 1px solid var(--gold); animation: pulse2 1.2s ease-in-out infinite; }
.rc.todo { background: transparent; color: var(--line2); border: 1px solid var(--line); font-weight: 500; }
@keyframes chipin { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse2 { 50% { opacity: .45; } }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.notice { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.notice.reflect { background: rgba(224, 164, 58, .1); border: 1px solid rgba(224, 164, 58, .4); color: #f0c777; }
.notice.warn { background: rgba(224, 164, 58, .1); border: 1px solid rgba(224, 164, 58, .4); color: #f0c777; }
.notice.err { background: rgba(229, 72, 77, .1); border: 1px solid rgba(229, 72, 77, .45); color: #ffb3b6; }

.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.notes-p { border-top: 3px solid var(--c); margin-bottom: 0; }
.notes { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.notes li { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: baseline; padding: 7px 10px; background: var(--panel2); border-radius: 6px; border-left: 2px solid var(--c); }
.nn { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.nt { color: var(--text2); font-size: 13.5px; overflow-wrap: anywhere; }

.empty { text-align: center; padding: 28px 12px 10px; }
.empty.small { padding: 18px 8px; }
.empty-ic { font-size: 44px; letter-spacing: .1em; margin-bottom: 8px; }
.empty h2 { font-family: var(--font-display); color: var(--gold2); margin-bottom: 6px; }
.empty p { color: var(--text2); max-width: 520px; margin: 6px auto; }
.rcard { background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 8px; }
.rc-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; }
.rc-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 10px 0; }
.rc-p { display: flex; align-items: center; gap: 12px; color: var(--c); font-weight: 600; min-width: 0; }
.rc-p.r { justify-content: flex-end; text-align: right; }
.rc-s { font-family: var(--font-display); font-size: 40px; color: var(--text); line-height: 1; }
.rc-mid { color: var(--muted); font-size: 24px; }
.rc-f { color: var(--text2); font-size: 13px; }

/* ---------- tabulky ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; padding: 9px 12px; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; background: var(--panel2); border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 600; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.clickrow { cursor: pointer; transition: background .12s; }
.clickrow:hover { background: rgba(255, 255, 255, .035); }
.vs-s { font-size: 12px; padding: 0 3px; }
.tbl.rounds td.note { min-width: 180px; max-width: 320px; color: var(--text2); font-size: 13px; overflow-wrap: anywhere; }
.tbl.rounds .rrow td:first-child { border-left: 3px solid var(--c); }
.tbl.rounds td.mvc.w { background: color-mix(in srgb, var(--c) 14%, transparent); font-weight: 600; }
.tbl.rounds td.mvc { white-space: nowrap; }
.pendrow td { color: var(--muted); font-style: italic; border-left: 3px dashed var(--line2); }

.dhead { padding-bottom: 14px; }
.dh-players { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 12px; }
.dh-p { display: flex; align-items: center; gap: 14px; color: var(--c); font-weight: 700; font-size: clamp(14px, 3vw, 20px); min-width: 0; }
.dh-p.r { justify-content: flex-end; text-align: right; }
.dh-score { font-family: var(--font-display); font-size: clamp(40px, 9vw, 64px); color: var(--text); line-height: 1; text-shadow: 0 0 30px color-mix(in srgb, var(--c) 45%, transparent); }
.dh-mid { color: var(--muted); font-size: 32px; }
.dh-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--text2); font-size: 13px; }
.sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.hbblock { margin-bottom: 18px; border-left: 3px solid var(--c); padding-left: 12px; }
.hb-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.hb-h .nh { margin: 0; flex: 1; text-transform: none; font-size: 15px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 6px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 5px 12px; cursor: pointer; color: var(--text2); font-size: 13px; }
.seg button.on { background: var(--gold); color: #1a1408; font-weight: 600; }
.hbcols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hbbox { min-width: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; }
.hbbox-h { padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text2); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.hbbox-h small { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.hbpre { margin: 0; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; line-height: 1.55; max-height: 420px; overflow: auto; color: var(--text2); }
.hbpre.tall { max-height: 520px; }
.diffstat { font-size: 13px; margin-bottom: 6px; color: var(--muted); }
.d-add, .dl.add .sg { color: var(--ok); } .d-del, .dl.del .sg { color: var(--war); }
.diff { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; overflow-x: auto; max-height: 560px; overflow-y: auto; }
.dl { padding: 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dl .sg { display: inline-block; width: 1.4em; user-select: none; }
.dl.add { background: rgba(63, 182, 139, .13); color: #aee8d1; }
.dl.del { background: rgba(229, 72, 77, .13); color: #ffb9bb; }
.dl.same { color: var(--muted); }
.dl.skip { color: var(--muted); font-style: italic; text-align: center; background: rgba(255, 255, 255, .03); font-size: 11.5px; }
.clean { color: var(--ok); font-weight: 600; margin: 0; }
.audit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.audit li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; }
.pblock { border-left: 3px solid var(--c); padding-left: 12px; margin: 14px 0; }
.pb-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.inl { flex-direction: row !important; align-items: center; gap: 8px !important; }
.inl select { width: auto; min-height: 32px; padding: 4px 8px; }
.hash { font-size: 12px; word-break: break-all; color: var(--gold2); background: var(--panel3); padding: 1px 6px; border-radius: 4px; }
.ver { font-size: 12.5px; font-weight: 600; }
.ver.ok { color: var(--ok); } .ver.bad { color: var(--war); }

/* ---------- handbooky ---------- */
.hb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.hb-card { border-top: 3px solid var(--c); }
.hb-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hb-top .ph { margin-bottom: 10px; }
.vsel { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.vsel select { min-width: 0; }
.md { max-height: 640px; overflow-y: auto; padding: 4px 4px 4px 0; color: var(--text2); font-size: 14.5px; overflow-wrap: anywhere; }
.md p { margin: 0 0 10px; }
.md .mdh { font-family: var(--font-display); color: var(--gold2); margin: 16px 0 6px; letter-spacing: .03em; }
.md h3.mdh { font-size: 19px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.md h4.mdh { font-size: 16px; } .md h5.mdh, .md h6.mdh { font-size: 14px; color: var(--text); }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 3px 0; }
.md li.l1 { margin-left: 18px; } .md li.l2 { margin-left: 36px; } .md li.l3 { margin-left: 54px; } .md li.l4 { margin-left: 72px; }
.md code { background: var(--panel3); padding: 1px 6px; border-radius: 4px; font-size: .9em; color: var(--gold2); }
.md .mdcode { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; overflow-x: auto; font-size: 12.5px; white-space: pre; margin: 0 0 10px; }
.md blockquote { margin: 0 0 10px; padding: 4px 12px; border-left: 3px solid var(--gold); color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.md strong { color: var(--text); }

/* ---------- hraj ---------- */
.setup { max-width: 640px; margin: 0 auto; }
.opps { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.opps legend { font-size: 12.5px; color: var(--text2); font-weight: 500; margin-bottom: 6px; padding: 0; }
.form label.opp { flex-direction: row; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; color: var(--text); font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.opp:has(input:checked) { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 24px -8px var(--c); background: color-mix(in srgb, var(--c) 10%, var(--panel2)); }
.opp:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.opp:has(input:focus-visible) { outline: 2px solid var(--gold); }
.opp-in { display: flex; flex-direction: column; min-width: 0; }
.opp-in b { color: var(--c); }
.opp-in small { color: var(--muted); font-size: 12px; }
.game { max-width: 820px; margin: 0 auto; }
.game-stage { text-align: center; }
.vline { font-size: 13px; color: var(--text2); margin: 6px 0; }
.lockline, .thinkline { display: flex; gap: 12px; align-items: flex-start; justify-content: center; text-align: left; margin: 10px auto; padding: 10px 14px; border-radius: var(--radius); background: var(--panel2); border: 1px solid var(--line); max-width: 560px; }
.lockline { border-color: rgba(63, 182, 139, .5); background: rgba(63, 182, 139, .07); }
.lock { font-size: 26px; line-height: 1; animation: fadeUp .4s both; }
.thinkline .spin { margin-top: 4px; flex: none; }
.moves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 6px; }
.movebtn {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px 10px; cursor: pointer; border-radius: 12px;
  background: linear-gradient(180deg, var(--panel3), var(--panel2)); border: 1px solid var(--line2); transition: transform .12s, border-color .15s, box-shadow .15s;
}
.movebtn:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 10px 26px -12px rgba(212, 178, 106, .6); }
.movebtn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.movebtn:disabled { opacity: .5; cursor: wait; }
.movebtn.chosen { opacity: 1; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 28px -8px var(--gold); }
.mb-emoji { font-size: clamp(40px, 11vw, 64px); line-height: 1.1; }
.mb-label { font-weight: 600; }
.movebtn kbd { font-size: 11px; color: var(--muted); border: 1px solid var(--line2); border-radius: 4px; padding: 0 6px; }
.final { text-align: center; padding: 18px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid var(--line2); animation: fadeUp .6s both; }
.final.late { animation-delay: 1.4s; }
.final.win { background: linear-gradient(180deg, rgba(63, 182, 139, .18), rgba(63, 182, 139, .04)); border-color: var(--ok); }
.final.lose { background: linear-gradient(180deg, rgba(229, 72, 77, .16), rgba(229, 72, 77, .03)); border-color: var(--war); }
.final.draw { background: var(--panel2); }
.final-t { font-family: var(--font-display); font-size: clamp(20px, 5vw, 28px); font-weight: 700; }
.final.win .final-t { color: var(--ok); } .final.lose .final-t { color: var(--war); }
.final-s { font-size: 32px; font-family: var(--font-display); margin: 6px 0 12px; }
.final-s small { font-size: 14px; color: var(--muted); font-family: var(--font-ui); }
.final-b { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.hrow { display: grid; grid-template-columns: 40px 34px 20px 34px 1fr auto; gap: 8px; align-items: center; padding: 6px 12px; background: var(--panel2); border-radius: 6px; border-left: 3px solid var(--draw); }
.hrow.win { border-left-color: var(--ok); } .hrow.lose { border-left-color: var(--war); }
.hrow .hm { font-size: 24px; text-align: center; }
.hrow .hn { color: var(--muted); font-size: 12.5px; }
.hrow.win .hres { color: var(--ok); } .hrow.lose .hres { color: var(--war); }
.hrow .hres { font-weight: 600; }

/* ---------- statistiky ---------- */
.lboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.lcard { background: var(--panel2); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--radius); padding: 14px; }
.lc-top { display: flex; gap: 10px; align-items: baseline; }
.lc-rank { font-family: var(--font-display); color: var(--gold); font-size: 18px; }
.lc-name { font-weight: 600; color: var(--c); }
.lc-big { font-family: var(--font-display); font-size: 34px; margin: 8px 0 4px; }
.lc-big small { display: block; font-family: var(--font-ui); font-size: 12px; color: var(--muted); }
.lc-row { display: flex; gap: 14px; font-size: 13.5px; color: var(--text2); flex-wrap: wrap; }
.lc-row .w b { color: var(--ok); } .lc-row .l b { color: var(--war); } .lc-row .d b { color: var(--text); }
.lc-sub { margin-top: 6px; color: var(--muted); font-size: 12px; }
.h2h { padding: 12px 0; border-bottom: 1px solid var(--line); }
.h2h:last-child { border-bottom: 0; }
.h2h-t { margin-bottom: 8px; }
.sbar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: var(--panel3); }
.sbar i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 700; color: #0b0d11; min-width: 2px; transition: width .5s; }
.h2h-l { display: flex; justify-content: space-between; font-size: 12px; margin-top: 4px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.mdist { border-left: 3px solid var(--c); padding-left: 12px; }
.mrow { display: grid; grid-template-columns: 96px 1fr 44px; gap: 8px; align-items: center; margin: 6px 0; font-size: 13.5px; }
.mbar { height: 12px; background: var(--panel3); border-radius: 6px; overflow: hidden; }
.mbar i { display: block; height: 100%; background: var(--c); border-radius: 6px; transition: width .5s; }
.mp { text-align: right; color: var(--text2); font-variant-numeric: tabular-nums; }
.tline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tline li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.wdot { width: 11px; height: 11px; border-radius: 50%; flex: none; }

/* ---------- responzivita ---------- */
@media (max-width: 980px) {
  .arena { grid-template-columns: 1fr; }
  .side-form { position: static; }
  .hb-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hide-sm { display: none; }
  .notes-grid, .hbcols { grid-template-columns: 1fr; }
  .panel { padding: 14px; }
  .board, .reveal { gap: 6px; }
  .mid { min-width: 70px; }
  .vs { min-width: 62px; }
  .row2 { grid-template-columns: 1fr; }
  .moves { gap: 8px; }
  .hrow { grid-template-columns: 34px 30px 14px 30px 1fr auto; gap: 6px; padding: 6px 8px; }
  .pend-row { grid-template-columns: 1fr; }
  .mrow { grid-template-columns: 84px 1fr 40px; }
  .topbar { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* ---------- výpadky, pokračování, odhad ---------- */
.outage { margin: 10px 0 6px; padding: 12px 14px; border-radius: var(--radius); background: rgba(224, 164, 58, .12); border: 1px solid rgba(224, 164, 58, .6); border-left-width: 4px; color: #f6d488; min-width: 0; }
.outage .ob-main { font-weight: 600; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.outage .cd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ob-msg { margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 6.5em; overflow-y: auto; }
.audit.outages .ol-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.est { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.3; }
.callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius); background: rgba(224, 164, 58, .1); border: 1px solid rgba(224, 164, 58, .45); color: #f0c777; }
.callout .co-t { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.dh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tbl .btn.sm { margin-left: 4px; }


/* ---------- interaktivní statistiky a korelace ---------- */
.st-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line2);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px;
}
.st-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; flex: 1; }
.st-fld { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.st-fld select, .st-fld input[type="number"] { min-height: 34px; padding: 4px 9px; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 500; width: auto; }
.st-fld input[type="number"] { width: 72px; text-align: center; }
.st-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.st-pills button {
  background: var(--panel3); border: 1px solid var(--line2); color: var(--text2); border-radius: 6px;
  padding: 5px 10px; font-size: 12.5px; cursor: pointer; transition: all .15s;
}
.st-pills button:hover { border-color: var(--gold); color: var(--text); }
.st-pills button.on { background: rgba(212, 178, 106, .18); border-color: var(--gold); color: var(--gold2); font-weight: 600; }
.st-meta { font-size: 12.5px; color: var(--text2); display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

.st-subnav {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.st-subnav button {
  background: var(--panel2); border: 1px solid var(--line); color: var(--text2); border-radius: 999px;
  padding: 7px 15px; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 6px;
}
.st-subnav button:hover { border-color: var(--gold); color: var(--text); }
.st-subnav button.on {
  background: linear-gradient(180deg, rgba(212, 178, 106, .22), rgba(212, 178, 106, .08));
  border-color: var(--gold); color: var(--gold2); font-weight: 600; box-shadow: 0 0 18px -6px rgba(212, 178, 106, .5);
}

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid var(--c, var(--gold));
  border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px;
}
.kpi-k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.kpi-v { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.15; }
.kpi-v small { font-family: var(--font-ui); font-size: 13px; font-weight: 500; color: var(--gold2); margin-left: 6px; }
.kpi-d { font-size: 12.5px; color: var(--text2); line-height: 1.45; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.svg-wrap { width: 100%; overflow-x: auto; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 10px; position: relative; }
.svg-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }

/* korelační matice */
.cmat-wrap { overflow-x: auto; }
.cmat { border-collapse: collapse; width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cmat th, .cmat td { border: 1px solid var(--line); padding: 6px 7px; text-align: center; }
.cmat th { background: var(--panel2); color: var(--text2); font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.cmat th.rhead { text-align: left; padding-left: 10px; }
.cmat td.ccell { cursor: pointer; transition: transform .1s, box-shadow .1s; font-weight: 600; min-width: 58px; position: relative; }
.cmat td.ccell:hover { transform: scale(1.06); z-index: 2; box-shadow: 0 0 0 2px var(--gold); }
.cmat td.ccell.sel { box-shadow: inset 0 0 0 2px var(--gold2), 0 0 12px rgba(212, 178, 106, .5); z-index: 1; }
.cmat td.diag { color: var(--muted); background: var(--panel2); font-weight: 400; }
.sig-star { font-size: 10px; vertical-align: super; margin-left: 1px; opacity: .9; }

/* scatter explorer */
.scat-controls {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin-bottom: 12px;
  padding: 10px 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 6px;
}
.scat-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; margin: 12px 0;
}
.sstat { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.sstat-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sstat-v { font-size: 18px; font-weight: 700; color: var(--gold2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.sstat-s { font-size: 11.5px; color: var(--text2); }
.scat-pt { cursor: pointer; transition: r .12s, opacity .12s; }
.scat-pt:hover { stroke: #fff; stroke-width: 2px; opacity: 1 !important; }
.scat-detail {
  margin-top: 10px; padding: 10px 14px; background: var(--panel2); border: 1px solid var(--line2);
  border-left: 3px solid var(--gold); border-radius: 6px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
}

/* Markov & 3x3 matice */
.m3x3 { width: 100%; border-collapse: collapse; text-align: center; font-variant-numeric: tabular-nums; }
.m3x3 th, .m3x3 td { border: 1px solid var(--line); padding: 10px 8px; }
.m3x3 th { background: var(--panel2); font-size: 12.5px; color: var(--text2); }
.m3x3 td { font-size: 14px; position: relative; }
.m3x3 .cell-big { font-size: 18px; font-weight: 700; display: block; }
.m3x3 .cell-sub { font-size: 11.5px; color: var(--text2); }

/* orákulum / prediktor */
.oracle-box {
  background: linear-gradient(180deg, rgba(212, 178, 106, .08), var(--panel2));
  border: 1px solid rgba(212, 178, 106, .4); border-radius: var(--radius); padding: 16px;
}
.oracle-picks { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 14px; }
.oracle-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.oc-card { background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; padding: 12px; text-align: center; }
.oc-card.best { border-color: var(--ok); background: rgba(63, 182, 139, .1); box-shadow: 0 0 24px -8px rgba(63, 182, 139, .45); }
.oc-move { font-size: 32px; line-height: 1.1; }
.oc-ev { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-top: 4px; }

.bar-stack { display: flex; height: 22px; border-radius: 5px; overflow: hidden; background: var(--panel3); width: 100%; min-width: 140px; }
.bar-stack i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 700; color: #0b0d11; overflow: hidden; white-space: nowrap; }

@media (max-width: 920px) {
  .grid2 { grid-template-columns: 1fr; }
  .st-meta { align-items: flex-start; }
}

/* =====================================================================
   Prezentace · QR & Paralelní fronta publika
   ===================================================================== */
.qr-welcome {
  margin-bottom: 14px; padding: 12px 15px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(212, 178, 106, .16), rgba(63, 182, 139, .1));
  border: 1px solid rgba(212, 178, 106, .45); font-size: 13.5px; line-height: 1.5;
}
.ah-pill {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  background: rgba(212, 178, 106, .18); color: var(--gold); font-weight: 600; font-size: 11px;
}
.thinkline.queued {
  border-color: rgba(212, 178, 106, .45);
  background: rgba(212, 178, 106, .08);
}

.pres-grid {
  display: grid; grid-template-columns: 420px 1fr; gap: 18px; align-items: start;
}
.pres-right { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.tunnel-box {
  margin: 12px 0; padding: 12px 14px; border-radius: var(--radius);
  background: var(--panel2); border: 1px solid var(--line2);
}
.tunnel-box.running {
  border-color: rgba(63, 182, 139, .5);
  background: linear-gradient(180deg, rgba(63, 182, 139, .1), var(--panel2));
}
.tunnel-box.starting { border-color: rgba(212, 178, 106, .5); }
.tunnel-box.error { border-color: rgba(224, 90, 90, .5); }
.tb-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tb-url {
  margin-top: 8px; padding: 6px 10px; border-radius: 6px; background: var(--bg);
  border: 1px solid var(--line); font-size: 12.5px; display: flex; align-items: center; gap: 8px; word-break: break-all;
}
.dot-live {
  width: 9px; height: 9px; border-radius: 50%; background: var(--ok); display: inline-block;
  box-shadow: 0 0 10px var(--ok); flex-shrink: 0;
}

.qr-mode-tabs { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.qmt {
  flex: 1; min-width: 110px; padding: 7px 10px; font-size: 12px; font-weight: 600;
  background: var(--panel2); color: var(--text2); border: 1px solid var(--line); border-radius: 6px; cursor: pointer;
}
.qmt.active { background: rgba(212, 178, 106, .16); color: var(--gold); border-color: var(--gold); }
.qmt:disabled { opacity: .45; cursor: not-allowed; }
.qr-custom-row { margin-bottom: 12px; }
.qr-custom-row input { width: 100%; }

.qr-showcase {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px; background: var(--panel2); border: 1px solid var(--line2); border-radius: var(--radius);
}
.qr-frame {
  width: 260px; height: 260px; padding: 10px; background: #fff; border-radius: 12px;
  box-shadow: 0 10px 32px rgba(0,0,0,.45); cursor: zoom-in; display: flex; align-items: center; justify-content: center;
}
.qr-frame img { width: 100%; height: 100%; display: block; }
.qr-frame.big { width: min(440px, 72vw); height: min(440px, 72vw); padding: 16px; cursor: default; }

.qr-url-bar { width: 100%; text-align: center; display: flex; flex-direction: column; gap: 8px; }
.qr-url-code {
  display: block; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; font-size: 12.5px; color: var(--gold); word-break: break-all;
}
.qr-url-btns { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

.crowd-board {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center;
  padding: 16px; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius);
}
.cb-side { text-align: center; padding: 10px; border-radius: 8px; border: 1px solid transparent; }
.cb-side.lead { border-color: rgba(212, 178, 106, .45); background: rgba(212, 178, 106, .07); }
.cb-who { font-size: 13px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: .04em; }
.cb-big { font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1.1; margin: 4px 0; color: var(--text); }
.cb-side.human.lead .cb-big { color: var(--gold); }
.cb-side.ai.lead .cb-big { color: var(--ok); }
.cb-sub { font-size: 12.5px; color: var(--text2); }
.cb-mid { text-align: center; padding: 0 10px; }
.cb-vs { font-family: var(--font-display); font-size: 18px; color: var(--muted); margin-bottom: 4px; }
.cb-draws { font-size: 12px; color: var(--text2); }

.cb-models { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.cb-mcard {
  padding: 10px 14px; background: var(--panel2); border: 1px solid var(--line);
  border-left: 3px solid var(--c, var(--gold)); border-radius: 6px;
}
.cbm-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.cbm-body { font-size: 13.5px; }

.live-crowd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.lcg-card {
  padding: 12px 14px; background: var(--panel2); border: 1px solid var(--line2);
  border-left: 3px solid var(--c, var(--gold)); border-radius: 8px; display: flex; flex-direction: column; gap: 8px;
}
.lcg-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lcg-player { font-weight: 700; color: var(--gold); }
.lcg-score { display: flex; align-items: center; gap: 6px; font-size: 18px; }
.ml-auto { margin-left: auto; }

/* Fullscreen QR Modal */
.qr-modal {
  position: fixed; inset: 0; z-index: 999; background: rgba(7, 8, 12, .92);
  backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 24px;
}
.qr-modal-box {
  max-width: 980px; width: 100%; background: var(--panel); border: 1px solid var(--gold);
  border-radius: 16px; padding: 28px 32px; box-shadow: 0 24px 80px rgba(0,0,0,.85);
}
.qr-modal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.qr-modal-eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); font-weight: 600; }
.qr-modal-title { font-family: var(--font-display); font-size: 28px; margin: 4px 0 0; }
.qr-modal-body { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.qr-url-big {
  font-size: 20px; font-weight: 700; color: var(--gold); background: var(--bg);
  padding: 12px 16px; border-radius: 8px; border: 1px solid var(--line2); word-break: break-all; margin-bottom: 10px;
}
.qr-modal-stats { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
.qms-card {
  padding: 12px 16px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.qms-k { font-size: 13.5px; color: var(--text2); }
.qms-v { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.qms-v.gold { color: var(--gold); }

@media (max-width: 960px) {
  .pres-grid { grid-template-columns: 1fr; }
  .qr-modal-body { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .cb-models { grid-template-columns: 1fr; }
}

/* =====================================================================
   Kiosk / Divácký režim (po načtení QR kódu — jen čistá hra a tlačítko Hrát)
   ===================================================================== */
body.qr-kiosk #tabs,
body.qr-kiosk .foot,
body.qr-kiosk .top-status {
  display: none !important;
}
body.qr-kiosk .topbar {
  justify-content: center; text-align: center; padding: 12px 16px;
}
body.qr-kiosk #view {
  max-width: 560px; margin: 0 auto; padding: 14px 12px 32px;
}
.kiosk-setup {
  text-align: center; padding: 28px 22px !important;
}
.kiosk-hero { margin-bottom: 20px; }
.kiosk-icons { font-size: 40px; margin-bottom: 10px; letter-spacing: 4px; }
.kiosk-title {
  font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--gold); margin: 0 0 8px;
}
.kiosk-sub { font-size: 14.5px; color: var(--text2); line-height: 1.55; margin: 0 auto; max-width: 440px; }
.kiosk-form { max-width: 400px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.kiosk-name-lbl { text-align: left; font-size: 13.5px; color: var(--text2); }
.kiosk-name-lbl input { font-size: 16px; padding: 12px 14px; text-align: center; margin-top: 6px; }
.kiosk-play-btn {
  width: 100%; font-size: 20px !important; padding: 16px 24px !important;
  font-weight: 700; letter-spacing: .03em; border-radius: 10px;
  box-shadow: 0 8px 26px rgba(212, 178, 106, .3);
}
.kiosk-tally, .kiosk-tally-final {
  margin-top: 10px; padding: 10px 14px; border-radius: 8px;
  background: var(--panel2); border: 1px solid var(--line); font-size: 13.5px; color: var(--text2);
}
.kiosk-tally-final { margin: 8px auto 14px; display: inline-block; }
body.qr-kiosk .movebtn { padding: 18px 10px; }
body.qr-kiosk .mb-emoji { font-size: 38px; }
body.qr-kiosk .mb-label { font-size: 16px; font-weight: 700; }

/* ---------- týmy (Claude / ChatGPT) ---------- */
.tchip {
  display: inline-block; vertical-align: baseline; padding: 0 7px; margin-left: 2px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .03em; line-height: 17px; white-space: nowrap; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  background: color-mix(in srgb, var(--c) 12%, transparent);
}
.rc-n, .dh-name { min-width: 0; overflow-wrap: anywhere; }
.side-sub .tchip { margin-left: 0; margin-right: 2px; }
.teamhint { margin: -2px 0 2px; }
.form select optgroup { font-style: normal; font-weight: 700; color: var(--text2); background: var(--panel2); }
.form select option:disabled { color: var(--muted); }

/* handbook týmu: čipy členů */
.mchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.mchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent);
}
.mchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.hb-card .ph { font-size: clamp(15px, 3.6vw, 17px); overflow-wrap: anywhere; }

/* výběr soupeře v Hraj: skupiny po týmech */
.opps { display: flex; flex-direction: column; gap: 14px; }
.opp-group { min-width: 0; }
.og-h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: var(--c, var(--text2)); letter-spacing: .02em; }
.og-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.opps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.opp-in small .tchip { margin-left: 0; }

/* statistiky: týmy */
.stack { display: flex; flex-direction: column; }
.sec-title { font-family: var(--font-display); font-weight: 600; letter-spacing: .05em; font-size: 17px; color: var(--gold2); margin: 22px 0 4px; }
.team-stats .ph small { font-family: var(--font-ui); letter-spacing: 0; font-size: 12.5px; }
.tvs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 4px 0 10px; }
.tvs-side { text-align: center; padding: 10px 8px; border-radius: 8px; border: 1px solid transparent; min-width: 0; }
.tvs-side.lead { border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 9%, transparent); }
.tvs-name { font-size: 13px; font-weight: 700; color: var(--c); text-transform: uppercase; letter-spacing: .05em; overflow-wrap: anywhere; }
.tvs-big { font-family: var(--font-display); font-size: clamp(34px, 8vw, 48px); line-height: 1.1; margin: 2px 0; }
.tvs-sub { font-size: 12px; color: var(--text2); }
.tvs-mid { text-align: center; padding: 0 6px; }
.tvs-vs { font-family: var(--font-display); font-size: 18px; color: var(--muted); }
.tvs-bars { margin-bottom: 16px; }
.tvs-bl { font-size: 12px; color: var(--text2); margin: 10px 0 4px; font-weight: 600; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 6px; }
.tcard { background: var(--panel2); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: var(--radius); padding: 14px; min-width: 0; }
.tc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tc-name { font-weight: 600; color: var(--c); }
.tc-big { font-family: var(--font-display); font-size: 34px; margin: 8px 0 6px; line-height: 1.1; }
.tc-big small { display: block; font-family: var(--font-ui); font-size: 12px; color: var(--muted); }
.tmem { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tmem li { display: grid; grid-template-columns: minmax(0, 1fr) 70px; grid-template-areas: "n v" "b b"; gap: 3px 10px; font-size: 13px; }
.tm-n { grid-area: n; color: var(--c); font-weight: 600; display: flex; align-items: center; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.tm-n i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.tm-v { grid-area: v; text-align: right; color: var(--text); white-space: nowrap; }
.tmem li { grid-template-columns: minmax(0, 1fr) auto; }
.tm-b { grid-area: b; height: 6px; background: var(--panel3); border-radius: 3px; overflow: hidden; }
.tm-b u { display: block; height: 100%; background: var(--c); text-decoration: none; transition: width .5s; }
.cb-models { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 720px) {
  .tvs { gap: 4px; }
  .tvs-side { padding: 8px 2px; }
  .tmem li { grid-template-columns: 1fr; grid-template-areas: "n" "v" "b"; }
  .tm-v { text-align: left; white-space: normal; }
}

/* tabulky v kartách modelů (statistiky) se na úzkém displeji posouvají uvnitř karty, ne celá stránka */
.grid2 > * { min-width: 0; }
.grid2 .hbbox { overflow-x: auto; }
