:root {
  /* LIGHT (default) */
  --bg: #eef2f9;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #f1f5fb;
  --border: #d8e0ee;
  --text: #16202e;
  --text-dim: #4a586c;
  --text-mut: #8593a6;
  --brand: #2f6df0;
  --brand-soft: #dbe7ff;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --input-bg: #ffffff;
  --topbar-bg: rgba(255, 255, 255, 0.82);
  --app-bg: radial-gradient(1200px 600px at 70% -10%, #e3ecfb 0%, #eef2f9 55%);
  --shadow: 0 10px 30px rgba(20, 40, 80, 0.10);
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --mono: "Cascadia Code", "Consolas", "SF Mono", Menlo, monospace;
  --display: "Courier Prime", "Courier New", var(--mono);  /* čistý psací stroj – „office memo" */
  --fun: "Bangers", "Courier Prime", var(--font);          /* komiks – vtipný brand */
}
html[data-theme="dark"] {
  --bg: #0f1729;
  --bg-soft: #16213a;
  --panel: #1c2942;
  --panel-2: #243352;
  --border: #2c3e60;
  --text: #e8eefb;
  --text-dim: #9fb0d0;
  --text-mut: #6b7da0;
  --brand: #3b82f6;
  --brand-soft: #1e3a6e;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --input-bg: #0c1322;
  --topbar-bg: rgba(15, 23, 41, 0.7);
  --app-bg: radial-gradient(1200px 600px at 70% -10%, #1b2a4a 0%, #0f1729 55%);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

/* Stylovaný hover tooltip (rozklad bodů) */
.hovertip {
  position: fixed; z-index: 1000; max-width: 340px; pointer-events: none;
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 13px; font-size: 12.5px; line-height: 1.55;
  white-space: pre-line; box-shadow: var(--shadow); font-family: var(--font);
}

/* Vtipná „office" typografie: brand komiks, nadpisy/labely psací stroj */
.brand-text { font-family: var(--fun); letter-spacing: 0.5px; font-weight: 400; }
.brand-text strong { font-weight: 400; }
h1, h2, .section-label, .card-title, .ct-title, .companies-h,
.ts-head h2, .res-hero-cap h1, .rank-chip, .gcard-main .card-title {
  font-family: var(--display);
}
.section-label { font-weight: 700; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--app-bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
}

body { display: flex; flex-direction: column; min-height: 100vh; }

/* Gamey atmosféra — jemná vinětace po okrajích (víc v dark) */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(1200px 720px at 50% -8%, transparent 42%, rgba(10, 16, 30, 0.16) 100%);
}
html[data-theme="dark"] body::before { background: radial-gradient(1100px 680px at 50% -5%, transparent 34%, rgba(0, 0, 0, 0.5) 100%); }
.app, .topbar, .footer { position: relative; z-index: 1; }
html[data-theme="dark"] .card.active:hover { box-shadow: 0 12px 30px rgba(0,0,0,0.45), 0 0 22px -6px var(--brand); }

a { color: inherit; text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  border-radius: 10px; font-size: 20px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}
.brand-text { font-size: 18px; color: var(--text-dim); }
.brand-text strong { color: var(--text); }
.topbar-nav { display: flex; align-items: center; gap: 6px; }
.topbar-version {
  font-family: var(--mono); font-size: 12px; color: var(--text-mut);
  background: var(--panel-2); border: 1px solid var(--border);
  padding: 4px 9px; border-radius: 999px; margin-right: 4px; white-space: nowrap;
}
.topbar-link { color: var(--text-dim); font-size: 14px; padding: 6px 12px; border-radius: 8px; }
.topbar-link:hover { background: var(--panel-2); color: var(--text); }
.theme-toggle {
  margin-left: 6px; width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  font-size: 16px; line-height: 1; display: grid; place-items: center;
}
.theme-toggle:hover { border-color: var(--brand); }

/* Jazykový dropdown (vlaječky): tlačítko = aktuální jazyk, menu = výběr */
.lang-wrap { position: relative; display: inline-flex; }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 1000;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 4px; min-width: 150px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.lang-menu[hidden] { display: none; }
.lang-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: transparent; border: 0; color: var(--text);
  font-size: 14px; padding: 7px 10px; border-radius: 7px; cursor: pointer; text-align: left;
  white-space: nowrap;
}
.lang-item:hover { background: var(--bg-soft); }
.lang-item.active { background: var(--brand); color: #fff; }
.lang-flag { display: inline-flex; line-height: 1; }
.flag { display: block; width: 22px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18); }
#lang-toggle .flag { width: 22px; height: 15px; }

/* ---------- App / layout ---------- */
.app { flex: 1; max-width: 1080px; width: 100%; margin: 0 auto; padding: 36px 28px 60px; }

.footer {
  display: flex; justify-content: space-between;
  padding: 18px 28px; border-top: 1px solid var(--border);
  color: var(--text-mut); font-size: 13px;
}

/* ---------- Hub ---------- */
.hub-head { margin-bottom: 28px; }
.hub-head h1 { font-size: 30px; margin: 0 0 8px; }
.hub-head p { color: var(--text-dim); margin: 0; max-width: 680px; line-height: 1.5; }

.section-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-mut); margin: 30px 0 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  min-height: 168px;
}
.card.active { cursor: pointer; }
.card.active:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); }
.card.soon { opacity: 0.58; }

.card-icon { font-size: 26px; }
/* Karty s obrázkem hry (grunge dlaždice jako banner) */
.card.has-img { padding: 0; gap: 0; overflow: hidden; }
.card-banner { width: 100%; aspect-ratio: 16 / 10; background: #0c0c0e; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.card.has-img:hover .card-img { transform: scale(1.04); }
.card.has-img .card-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 17px; font-weight: 600; }
.card-desc { font-size: 13.5px; color: var(--text-dim); line-height: 1.45; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-mut); }
.badge {
  font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 600;
  position: absolute; top: 14px; right: 14px;
}
.badge.ready { background: var(--brand-soft); color: #2f6df0; }
.badge.unlocked { background: #fde68a; color: #92400e; }
.badge.soon { background: var(--panel-2); color: var(--text-mut); }
.badge.beta { background: #ede9fe; color: #6d28d9; margin-left: 6px; vertical-align: middle; }
html[data-theme="dark"] .badge.beta { background: #3b2a63; color: #d8ccff; }
html[data-theme="dark"] .badge.ready { color: #93c5fd; }
html[data-theme="dark"] .badge.unlocked { background: #5b4708; color: #fde68a; }
.card-measure { font-size: 12px; color: var(--text-mut); }

/* ---------- Module shell ---------- */
.module {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.module-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.module-head .m-icon { font-size: 30px; }
.module-head h2 { margin: 0; font-size: 22px; }
.module-sub { color: var(--text-dim); margin: 0 0 22px; line-height: 1.5; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 14px; margin-bottom: 20px; cursor: pointer; }
.back-link:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: none;
  padding: 12px 22px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: filter 0.15s, transform 0.1s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--brand); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Intro / instructions ---------- */
.intro-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 22px; margin-bottom: 6px; }
.intro-box ul { margin: 8px 0 0; padding-left: 20px; color: var(--text-dim); line-height: 1.7; }

/* ---------- Stats / HUD ---------- */
.hud { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.stat {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 18px; min-width: 110px;
}
.stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mut); }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 2px; }
.stat .value.mono { font-family: var(--mono); }

/* ---------- Typing / translate ---------- */
.type-sample {
  font-size: 19px; line-height: 1.85; letter-spacing: 0.2px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px; margin-bottom: 18px;
  font-family: var(--mono);
  user-select: none;
  white-space: pre-wrap;       /* zachová mezery a zalamuje dlouhé věty */
  overflow-wrap: anywhere;
}
.type-sample .ch { white-space: pre-wrap; }
.type-sample .ch { color: var(--text-mut); }
.type-sample .ch.done { color: var(--green); }
.type-sample .ch.wrong { color: var(--red); background: rgba(248,113,113,0.18); border-radius: 3px; }
.type-sample .ch.cursor { background: var(--brand); color: #fff; border-radius: 3px; }
.type-sample .ch.plain { color: var(--text); }
.type-hint { font-size: 13px; margin-top: 8px; transition: color 0.15s ease; }
.type-hint.warn { color: var(--red); font-weight: 700; }
.type-feedback { font-size: 15px; font-weight: 600; height: 24px; margin-top: 12px; }
.type-feedback.ok { color: var(--green); }
.type-feedback.bad { color: var(--red); }

.type-input, .translate-input {
  width: 100%; font-size: 17px; line-height: 1.7; font-family: var(--mono);
  background: var(--input-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; resize: none; outline: none;
}
.type-input:focus, .translate-input:focus { border-color: var(--brand); }

/* Modul „Stáhni a opiš heslo" */
.dl-card {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; margin-top: 8px; text-align: center;
}
.dl-task { font-size: 17px; line-height: 1.6; margin-bottom: 18px; }
.dl-get {
  font-size: 17px; padding: 14px 26px; margin-bottom: 18px;
}
.dl-row { display: flex; gap: 10px; align-items: stretch; justify-content: center; flex-wrap: wrap; }
.dl-input {
  flex: 1 1 260px; max-width: 360px; text-align: center;
  text-transform: uppercase; letter-spacing: 3px; font-weight: 700;
}
.dl-input:disabled { opacity: .55; }
.dl-ok { padding: 0 24px; }
.dl-fb.dl-fb { height: auto; min-height: 24px; margin-top: 14px; }

/* Výběr před hrou (Mac/Win, myš/touchpad) */
.chooser { text-align: center; padding: 20px 8px 8px; }
.chooser-q { font-size: 17px; margin-bottom: 20px; }
.chooser-opts { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.chooser-opt {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 150px; padding: 18px 22px; font-size: 32px; cursor: pointer;
  background: var(--bg-soft); color: var(--text);
  border: 2px solid var(--border); border-radius: 14px; transition: all .12s;
}
.chooser-opt span { font-size: 15px; font-weight: 700; margin-top: 4px; }
.chooser-opt small { font-size: 12px; color: var(--text-mut); font-weight: 400; }
.chooser-opt:hover { border-color: var(--brand); }
.chooser-opt.sel { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.chooser-hint { font-size: 13px; margin-bottom: 16px; }
.chooser-go { font-size: 16px; padding: 12px 30px; }

/* Vzkazník (dole na hubu) */
.msgbox { margin-top: 34px; }
.msgbox-row { display: flex; gap: 10px; align-items: stretch; }
.msgbox-text {
  flex: 1; resize: vertical; min-height: 46px; font-size: 15px; font-family: inherit;
  background: var(--input-bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; outline: none;
}
.msgbox-text:focus { border-color: var(--brand); }
.msgbox-send { align-self: flex-end; padding: 12px 22px; white-space: nowrap; }
.msgbox-fb { min-height: 18px; margin-top: 8px; }

/* Anti-cheat „podezřelé" označení ve Výsledcích */
.susp-badge { cursor: help; font-size: 12px; filter: saturate(1.3); }

.cz-source {
  font-size: 20px; line-height: 1.6; background: var(--bg-soft);
  border-left: 3px solid var(--brand); border-radius: 8px;
  padding: 18px 20px; margin-bottom: 16px;
}
.cz-source .lang { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-mut); display: block; margin-bottom: 6px; }
.progress-dots { display: flex; gap: 6px; margin-bottom: 18px; }
.progress-dots .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.progress-dots .dot.done { background: var(--green); }
.progress-dots .dot.current { background: var(--brand); }

/* ---------- Shortcuts ---------- */
.shortcut-stage { text-align: center; padding: 30px 10px; }
.shortcut-prompt { font-size: 16px; color: var(--text-dim); margin-bottom: 12px; }
.shortcut-action { font-size: 34px; font-weight: 700; margin-bottom: 24px; }
/* v1.55: zadání + nápověda se kreslí do canvasu (žádný text v DOMu pro scrapery) */
.shortcut-canvas { display: block; margin: 0 auto 8px; max-width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.shortcut-net { font-size: 13px; color: var(--text-dim); min-height: 18px; }
.keys { display: inline-flex; gap: 10px; align-items: center; justify-content: center; }
.key {
  font-family: var(--mono); font-size: 18px; min-width: 46px; padding: 10px 16px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-bottom-width: 4px; border-radius: 10px;
}
.key.hint { opacity: 0.4; }
.shortcut-feedback { font-size: 18px; height: 28px; margin-top: 20px; font-weight: 600; }
.shortcut-feedback.ok { color: var(--green); }
.shortcut-feedback.bad { color: var(--red); }

/* ---------- Aim ---------- */
.aim-stage {
  position: relative; width: 100%; height: 460px;
  background: var(--input-bg); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; cursor: crosshair;
}
.target {
  position: absolute; border-radius: 50%; overflow: hidden;
  background: #000 url(../img/eye.png) center / cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 6px 22px rgba(170,25,25,0.55);
  transform: translate(-50%, -50%) scale(0.2);
  animation: pop 0.12s ease-out forwards;
}
.target .bull { display: none; } /* bulva má vlastní zorničku jako střed */
@keyframes pop { to { transform: translate(-50%, -50%) scale(1); } }
.aim-ripple { position: absolute; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; transform: translate(-50%,-50%); }
.aim-ripple.hit { background: var(--green); }
.aim-ripple.bull { background: #f59e0b; width: 12px; height: 12px; box-shadow: 0 0 10px #fbbf24; }
.aim-ripple.miss { background: var(--red); }

/* ---------- Mobilní testy (tap / swipe / reakce / držení) ---------- */
.mobile-stage { height: 56vh; min-height: 360px; touch-action: none; cursor: pointer; }
.swipe-pad {
  position: relative; width: 100%; height: 52vh; min-height: 340px;
  background: var(--input-bg); border: 1px dashed var(--border); border-radius: 14px;
  display: grid; place-items: center; touch-action: none; user-select: none; overflow: hidden;
}
.swipe-arrow { font-size: 118px; line-height: 1; color: var(--brand); opacity: 0; transform: scale(0.6); transition: opacity .12s, transform .12s; }
.swipe-arrow.show { opacity: 1; transform: scale(1); text-shadow: 0 0 30px rgba(59,130,246,0.5); }
.swipe-fb { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 16px; font-weight: 700; height: 22px; }
.swipe-fb.ok { color: var(--green); }
.swipe-fb.bad { color: var(--red); }
.react-pad {
  width: 100%; height: 52vh; min-height: 340px; border-radius: 14px;
  display: grid; place-items: center; cursor: pointer; touch-action: none; user-select: none;
  border: 1px solid var(--border); transition: background .05s linear;
}
.react-pad .react-text { font-size: 26px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
.react-pad.idle { background: var(--panel-2); }
.react-pad.idle .react-text { color: var(--text); text-shadow: none; }
.react-pad.wait { background: #b91c1c; }
.react-pad.go { background: #16a34a; }
.react-pad.bad { background: #92400e; }
.hold-pad {
  width: 100%; height: 44vh; min-height: 280px; border-radius: 14px;
  display: grid; place-items: center; cursor: pointer; touch-action: none; user-select: none;
  border: 2px solid var(--border); background: var(--panel-2); transition: background .08s, border-color .08s, transform .08s;
}
.hold-pad.holding { background: var(--brand-soft); border-color: var(--brand); transform: scale(0.99); }
.hold-pad .hold-text { font-size: 22px; font-weight: 800; color: var(--text); }
.conf-badge { font-size: 11px; opacity: 0.6; cursor: help; }
.conf-badge.ok { color: var(--green); opacity: 1; }
.mobile-admin-login { text-align: center; margin: 22px 0 8px; }
.mobile-admin-login a { color: var(--text-mut); font-size: 13px; cursor: pointer; }
.mobile-admin-login a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- Results ---------- */
.result-score { text-align: center; padding: 16px 0 6px; }
.score-ring {
  --val: 0;
  width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 14px;
  display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--val) * 1%), var(--border) 0);
  position: relative;
}
.score-ring::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--panel); }
.score-ring .num { position: relative; font-size: 44px; font-weight: 800; }
.score-ring .num small { font-size: 16px; color: var(--text-mut); font-weight: 600; }
.result-grade { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.result-points { font-size: 15px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
/* BODY jako hlavní číslo na výsledkové obrazovce */
.result-pts { font-size: 58px; font-weight: 800; font-family: var(--mono); color: #f59e0b; line-height: 1; margin-bottom: 8px; }
html[data-theme="dark"] .result-pts { color: #f7c948; }
.result-pts small { font-size: 17px; color: var(--text-mut); font-weight: 600; margin-left: 8px; }
.result-sub { font-size: 13.5px; margin-top: 2px; }
.result-hint { font-size: 13px; margin-top: 10px; font-style: italic; }
.result-detail { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin: 22px 0; }
.detail-item { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.detail-item .dl { font-size: 12px; color: var(--text-mut); }
.detail-item .dv { font-size: 22px; font-weight: 700; margin-top: 2px; font-family: var(--mono); }

/* ---------- Mobile notice (hraje se na PC) ---------- */
.mobile-notice {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px; text-align: center;
}
.mobile-notice .mn-h { font-size: 15px; color: var(--text-dim); display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; }
.mobile-notice .mn-h .brand-mark { width: 28px; height: 28px; font-size: 16px; }
.mobile-notice h1 { font-size: 22px; margin: 0 0 8px; }
.mobile-notice p { color: var(--text-dim); line-height: 1.55; margin: 0; font-size: 14px; }

/* ---------- Identity screen ---------- */
.identity { max-width: 540px; margin: 10px auto; }
.identity h1 { font-size: 30px; margin: 0 0 10px; }
.identity .lead { color: var(--text-dim); line-height: 1.6; margin: 0 0 24px; }

/* Motto (šílená kancelářská krysa) */
.motto { margin: 0 0 26px; }
.motto-img { width: 100%; height: auto; display: block; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.motto-cap { margin-top: 12px; text-align: center; font-style: italic; font-size: 15.5px; color: var(--text-dim); }

/* ---- Animovaná krysa (sdílené: úvod / hub / Výsledky) ----
   Statický obrázek = základ v toku (drží rozměr boxu stage), přes něj absolutně leží video vrstvy
   (inset:0 → přesně rozměr základu), které fadeují dovnitř/ven. Klipy nemají vlastní zvuk → SFX hraje
   samostatně (viz mountRatAnim v app.js). */
.rat-stage { position: relative; }
.rat-base { display: block; }
.rat-vid { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.rat-vid.is-playing { opacity: 1; }
/* tlačítko ztišení zvuku v pravém dolním rohu animace (repráček 🔊 / škrtlý 🔇) */
.rat-mute { position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 36px; height: 36px;
  display: grid; place-items: center; padding: 0; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(15,23,41,.55); color: #fff; font-size: 17px; line-height: 1;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); transition: background .15s ease, transform .1s ease; }
.rat-mute:hover { background: rgba(15,23,41,.82); transform: scale(1.08); }
.rat-clickable { cursor: pointer; }   /* klik na krysu = přehraj animaci (A/B/A…) se zvukem */
.btn .btn-key { opacity: .72; font-weight: 600; font-size: .9em; margin-left: 5px; }   /* „(Enter)" u Start tlačítka */
/* úvod (motto) — rámeček/stín drží stage, ne vrstvy */
.motto .rat-stage { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.motto .rat-base { width: 100%; height: auto; }
.motto .rat-vid { object-fit: cover; }
.id-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.id-card label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }
.id-card input, .id-card select {
  width: 100%; margin-top: 6px; padding: 12px 14px; font-size: 15px; font-family: var(--font);
  background: var(--input-bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px; outline: none;
}
.id-card label.id-consent { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.id-card label.id-consent input { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; flex: none; accent-color: var(--brand); }
.id-consent b { color: var(--text); font-size: 14px; }
.id-consent-note { display: block; margin-top: 3px; line-height: 1.4; }
.id-card input:focus, .id-card select:focus { border-color: var(--brand); }
.id-card .btn { width: 100%; }
.id-err { color: var(--red); font-size: 13px; min-height: 18px; margin-bottom: 6px; }

/* ---------- Hub: hero + kombinované nahoře + sloučené karty her ---------- */
.hub-hero { border-radius: var(--radius); overflow: hidden; margin: 0 0 18px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.hub-hero img { display: block; width: 100%; height: clamp(120px, 17vw, 210px); object-fit: cover; object-position: center 40%; }
/* Celý obrázek krysy + text přes něj (boční pruhy vyplní rozmazané pozadí) */
.hub-hero-full { position: relative; background: #0a0a0c; overflow: hidden; }
.hub-hero-full::before { content: ""; position: absolute; inset: 0; background: url(../img/crazy-rat.png) center / cover; filter: blur(30px) brightness(0.45); transform: scale(1.15); }
.hub-hero-full img { position: relative; z-index: 1; width: 100%; height: auto; max-height: 60vh; object-fit: contain; }
.hub-hero-cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 30px 26px 18px; background: linear-gradient(180deg, transparent, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.9)); }
.hub-hero-cap h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 38px); color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,0.9); }
.hub-hero-cap p { margin: 0; max-width: 640px; color: rgba(255,255,255,0.95); font-size: 14.5px; line-height: 1.5; text-shadow: 0 1px 10px rgba(0,0,0,0.95); }
/* animovaná krysa na hubu — stage nad rozmazaným ::before; video kryje základ (contain) */
.hub-hero-full .rat-stage { position: relative; z-index: 1; }
.hub-hero-full .rat-vid { object-fit: contain; z-index: 2; }

.topbar-user { display: inline-flex; align-items: center; gap: 7px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 5px 13px 5px 9px; cursor: pointer; font-size: 13px; font-family: var(--font); margin-left: 4px; }
.topbar-user:hover { border-color: var(--brand); }
.topbar-user .tu-ava { font-size: 15px; }
.topbar-user .tu-name { font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user[hidden] { display: none; }

.combined-wrap { margin-bottom: 16px; }
.combined-top { padding: 13px 18px; border-color: var(--brand); background: var(--brand-soft); display: flex; flex-direction: column; gap: 10px; min-height: 0; box-shadow: 0 0 22px -8px var(--brand); }
.ct-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ct-pos { font-size: 13.5px; color: var(--text-dim); }
.ct-pos b { color: var(--text); font-size: 15px; }
.ct-icon { font-size: 20px; }
.ct-title { font-size: 15px; font-weight: 700; color: var(--brand); font-family: var(--display); }
.ct-head .pts-pill { font-size: 17px; padding: 4px 14px; }
.ct-head .rank-chip { margin-left: auto; }
.ct-breakdown { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; cursor: help; }
.ct-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-family: var(--mono); background: var(--panel); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.ct-chip.empty { opacity: 0.4; }
.ct-chip b { font-weight: 700; }
.ct-plus { color: var(--text-mut); font-weight: 700; }
.ct-eq { font-family: var(--mono); font-weight: 700; color: var(--brand); margin-left: 6px; }
.ct-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-dim); }
.ct-meta b { color: var(--text); }

.games-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.gcard { flex-direction: row; align-items: stretch; padding: 0; gap: 0; min-height: 0; overflow: hidden; }
.gcard-img { flex: 0 0 118px; background: #0c0c0e; display: grid; place-items: center; padding: 10px; }
.gcard-img img { width: 100%; height: 100%; max-height: 118px; object-fit: cover; border-radius: 12px; display: block; }
.gcard-emoji { font-size: 40px; }
.gcard-main { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 13px 8px 13px 16px; min-width: 0; }
.gcard-main .card-title { font-size: 15.5px; }
.gcard-main .card-desc { font-size: 12.5px; flex: 0 0 auto; }
.gcard-score { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding-top: 6px; font-size: 13px; }
.gs-mine { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.gs-best { font-size: 12px; }
.gs-play { color: var(--brand); font-weight: 700; }
.gcard-go { align-self: center; padding: 0 14px; color: var(--text-mut); font-size: 14px; }
.gcard.active:hover .gcard-go { color: var(--brand); transform: translateX(2px); }

/* ---------- Hub top / who ---------- */
.hub-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.who { text-align: right; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; }
.who-name { display: block; font-weight: 600; font-size: 14px; }
.who-mail { display: block; font-size: 12px; }
.who-change { font-size: 12px; color: var(--brand); cursor: pointer; }
.who-change:hover { text-decoration: underline; }
/* Rank chip (office-rat ladder) */
.rank-chip {
  display: inline-block; margin: 4px 0 2px; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.02em; cursor: help;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim);
}
.rank-chip.ranked {
  background: linear-gradient(180deg, #fde68a, #f59e0b); color: #3b2503; border-color: #d97706;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}
html[data-theme="dark"] .rank-chip.ranked { background: linear-gradient(180deg, #f7c948, #c8870f); color: #2a1a02; }

/* ---------- TOP scores (žebříček) ---------- */
.topscores { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin: 24px 0 8px; }
.ts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ts-head h2 { font-size: 17px; margin: 0; }
.ts-head .btn { padding: 8px 14px; font-size: 13px; }
.ts-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.ts-col-h { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-mut); margin-bottom: 8px; }
.ts-list { display: flex; flex-direction: column; gap: 6px; }
.ts-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 7px 10px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; }
.ts-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-mod { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-agg { font-family: var(--mono); font-weight: 700; font-size: 14px; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.ts-pts { background: #fde68a; color: #92400e; }
html[data-theme="dark"] .ts-pts { background: #5b4708; color: #fde68a; }
.ts-cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ts-co { font-weight: 500; font-size: 12px; }

/* ---------- Jak vzniklo skóre (detail výsledku) ---------- */
.sh-title { margin-top: 18px; }
.score-how { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.sh-lead { color: var(--text-dim); font-size: 13px; margin: 2px 0 8px; }
.sh-row + .sh-lead { margin-top: 16px; }
.sh-lead2 { margin-top: 18px !important; padding-top: 14px; border-top: 1px solid var(--border); color: var(--text-mut); }
.sh-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 13px; flex-wrap: wrap; }
.sh-row:last-of-type { border-bottom: 0; }
.sh-l { color: var(--text); }
.sh-calc { font-family: var(--mono); white-space: nowrap; color: var(--text-mut); }
.sh-calc b { color: var(--text); font-weight: 700; }
.sh-total { border-bottom: 0; margin-top: 2px; font-weight: 700; }
.sh-total .sh-calc b { color: var(--brand); font-size: 15px; }
.sh-note { font-size: 12px; line-height: 1.5; margin-top: 12px; }

/* ---------- Tvoje skóre vs nejlepší (boxy ve velikosti karet testů) ---------- */
.yoursection { margin-top: 8px; }
.ys-label { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ys-legend { text-transform: none; letter-spacing: 0; font-size: 11.5px; font-weight: 400; margin-left: 10px; }
.ys-grid { margin-top: 0; }
.ys-card { gap: 12px; }
.ys-card-h { display: flex; align-items: center; gap: 9px; }
.ys-card-icon { font-size: 22px; line-height: 1; }
.ys-card-title { font-size: 15.5px; font-weight: 600; line-height: 1.25; }
.ys-card-body { display: flex; flex-direction: column; gap: 9px; }
.ys-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.ys-row .ys-k { color: var(--text-dim); }
.ys-row .ys-v { display: flex; align-items: center; gap: 6px; font-weight: 600; font-family: var(--mono); }
.ys-row .ys-v b { font-weight: 700; }
.ys-who { font-family: inherit; font-weight: 500; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ys-card-total { border-color: var(--brand); background: var(--brand-soft); }
.ys-card-total .ys-card-title { color: var(--brand); }

/* ---------- Admin box ---------- */
.admin-label { color: var(--amber); margin-top: 34px; }
.admin-grid .card.active { border-style: dashed; }

/* ---------- Připravujeme + hlasování ---------- */
.card.upcoming { border-style: dashed; }
.card.upcoming.active { border-style: solid; }
.card.upcoming:not(.active) .card-img { filter: saturate(0.85) brightness(0.95); }
.vote-row { display: flex; gap: 8px; margin-top: 10px; }
.card.has-img .card-body .vote-row { margin-top: auto; }
.vote-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; cursor: pointer; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim); }
.vote-btn:hover { border-color: var(--brand); color: var(--text); }
.vote-btn.want.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.vote-btn.meh.on { background: #5b4708; border-color: var(--amber); color: #fde68a; }
html[data-theme="light"] .vote-btn.meh.on { background: #fde68a; color: #92400e; border-color: var(--amber); }
.vote-n { font-family: var(--mono); font-weight: 700; opacity: 0.9; }

/* ---------- Hero na stránce Výsledky (krysí oslava) ---------- */
.res-hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.res-hero-img { display: block; width: 100%; height: clamp(160px, 26vw, 300px); object-fit: cover; object-position: center 42%; }
.res-hero-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 24px 18px; background: linear-gradient(180deg, transparent, rgba(0,0,0,0.78)); color: #fff; }
.res-hero-cap h1 { margin: 0 0 6px; font-size: 30px; text-shadow: 0 2px 10px rgba(0,0,0,0.6); }
.res-hero-cap p { margin: 0; font-size: 14.5px; line-height: 1.5; color: rgba(255,255,255,0.92); text-shadow: 0 1px 6px rgba(0,0,0,0.6); max-width: 680px; }
/* animovaná oslava krysy na stránce Výsledky — základ drží výšku (clamp), video ho kryje (cover) */
.res-hero .rat-base { width: 100%; height: clamp(160px, 26vw, 300px); object-fit: cover; object-position: center 42%; }
.res-hero .rat-vid { object-fit: cover; object-position: center 42%; }

/* ---------- Filtr disciplín (Výsledky) — JEDNOVÝBĚR s miniaturami ---------- */
.res-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.res-fbtn { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; padding: 4px 12px 4px 5px; border-radius: 999px; cursor: pointer; background: var(--panel); border: 1px solid var(--border); color: var(--text-dim); }
.res-fbtn:hover { border-color: var(--brand); }
.res-fbtn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.res-fbtn .fb-img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; display: block; flex: 0 0 auto; }
.res-fbtn .fb-emoji { width: 26px; height: 26px; display: grid; place-items: center; font-size: 15px; flex: 0 0 auto; }
.res-fbtn .fb-label { white-space: nowrap; }

/* ---------- Results table — kompaktní, BEZ horizontálního scrollu ---------- */
.res-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.res-search {
  padding: 10px 14px; font-size: 14px; font-family: var(--font);
  background: var(--input-bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px; outline: none;
}
.res-search:focus { border-color: var(--brand); }
#res-q { flex: 1; min-width: 200px; }
.res-table-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.res-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.res-table th { text-align: left; padding: 9px 8px; background: var(--bg-soft); color: var(--text-mut); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; border-bottom: 1px solid var(--border); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-table th.num, .res-table td.num { text-align: right; }
.res-table tr:last-child td { border-bottom: none; }
.res-table th.sortable { cursor: pointer; user-select: none; }
.res-table th.sortable:hover { color: var(--text); }
.res-row { cursor: pointer; }
.res-row:hover td { background: var(--panel-2); }
.res-name .res-nm, .res-name .res-em { overflow: hidden; text-overflow: ellipsis; }
.res-mod { text-align: center; }
.res-mod-img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; display: inline-block; vertical-align: middle; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }

/* detail řádku — NEPŘETÝKÁ (povol zalamování uvnitř colspan buňky) */
.res-detail-row td { background: var(--bg-soft); padding: 0; white-space: normal; }
.res-detail { padding: 16px 18px; max-width: 100%; overflow: hidden; }
.rd-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; margin-bottom: 14px; }
.rd-meta b { font-weight: 600; }
.rd-meta span { overflow-wrap: anywhere; }
.rd-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-mut); margin-bottom: 8px; }
.rd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.dt-item { display: flex; justify-content: space-between; gap: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.dt-l { color: var(--text-mut); font-size: 13px; }
.dt-v { font-family: var(--mono); font-weight: 600; font-size: 13px; }
.small { font-size: 12px; }

/* ---------- Total tabulka (průměr nejlepších bodů per krysa) ---------- */
.total-table th.num { text-align: right; }
.total-table .th-img { width: 24px; height: 24px; border-radius: 5px; object-fit: cover; display: inline-block; vertical-align: middle; }
.total-table td.tot-empty { color: var(--text-mut); }
.total-table .pts-pill { min-width: 46px; }
.total-detail { padding: 14px 18px; }
.td-head { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-mut); margin-bottom: 8px; }
.td-line { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 5px 0; border-bottom: 1px dashed var(--border); font-size: 13px; flex-wrap: wrap; }
.td-line:last-of-type { border-bottom: 0; }
.td-empty { opacity: 0.55; }
.td-calc { font-family: var(--mono); white-space: nowrap; }
.td-calc b { color: var(--text); }
.td-sum { font-weight: 700; margin-top: 4px; border-top: 1px solid var(--border); padding-top: 8px; }
.td-sum b { color: #f59e0b; font-size: 15px; }

/* ---------- Žebříček firem ---------- */
.companies { margin-top: 30px; }
.companies-h { font-size: 19px; margin: 0 0 12px; }
.co-table td { padding: 10px 12px; }
.co-table td.co-rats { white-space: normal; }
.co-rat { display: inline-flex; align-items: center; gap: 5px; margin: 2px 14px 2px 0; font-size: 13px; }
.co-rat-rank { color: var(--text-mut); font-weight: 700; }
.pts-pill.co-pill { min-width: 0; padding: 1px 8px; font-size: 12px; }
.score-pill {
  --v: 0; display: inline-block; min-width: 38px; text-align: center; font-weight: 700; font-family: var(--mono);
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--green) calc(var(--v) * 1%), var(--red));
  color: #06121f;
}
/* Bodová pilulka (BODY = primární metrika, bez stropu) — zlatá */
.pts-pill {
  display: inline-block; min-width: 40px; text-align: center; font-weight: 700; font-family: var(--mono);
  padding: 3px 11px; border-radius: 999px; cursor: help;
  background: linear-gradient(180deg, #fde68a, #f59e0b); color: #3b2503; border: 1px solid #d9890b;
}
html[data-theme="dark"] .pts-pill { background: linear-gradient(180deg, #f7c948, #c8870f); color: #2a1a02; border-color: #a86f08; }

/* ---------- Reading ---------- */
.reading-q { font-size: 17px; font-weight: 600; margin: 4px 0 14px; }
.reading-opts { display: grid; gap: 10px; }
.reading-opt { text-align: left; justify-content: flex-start; }
.reading-opt.opt-ok { background: var(--green); color: #06121f; border-color: var(--green); }
.reading-opt.opt-bad { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- Proof ---------- */
.proof-text { font-size: 19px; line-height: 2.1; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.proof-word { padding: 2px 4px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; }
.proof-word:hover { background: var(--panel-2); }
.proof-word.sel { background: var(--brand-soft); border-color: var(--brand); }
.proof-word.word-bad { outline: 2px solid var(--green); }
.proof-word.word-wrongpick { background: rgba(248,113,113,0.25); border-color: var(--red); }

/* ---------- Form ---------- */
.form-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-wrap { grid-template-columns: 1fr; } }

/* ---------- Mobil (telefony) — nic nesmí přetékat ---------- */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; padding: 8px 12px; gap: 4px 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; font-size: 16px; }
  .brand-text { font-size: 14.5px; }
  .topbar-nav { gap: 3px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  .topbar-version { display: none; }            /* verze je v patičce */
  .topbar-user .tu-name { display: none; }      /* jen avatar */
  .topbar-user { padding: 4px 8px; margin-left: 2px; }
  .topbar-link { padding: 6px 8px; font-size: 13px; }
  .theme-toggle { width: 32px; height: 32px; margin-left: 2px; font-size: 14px; }

  .app { padding: 18px 12px 48px; }
  .footer { padding: 12px; font-size: 12px; }

  /* široké tabulky: posuv uvnitř, ne přetečení stránky */
  .res-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .res-table { min-width: 560px; }
  .total-table { min-width: 620px; }
  .companies { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .co-table { min-width: 560px; }

  /* hub bloky těsnější */
  .ct-head { gap: 6px; }
  .ct-head .pts-pill { font-size: 15px; padding: 3px 11px; }
  .ct-head .rank-chip { margin-left: 0; }
  .ts-cols-2 { grid-template-columns: 1fr; }
  .gcard-img { flex-basis: 96px; }
  .chooser-opt { min-width: 120px; padding: 14px 16px; font-size: 26px; }
  .msgbox-row { flex-direction: column; }
  .msgbox-send { align-self: stretch; }
}
.form-card { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; align-self: start; }
.form-card-h { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mut); margin-bottom: 10px; }
.fc-row { font-size: 15px; line-height: 1.9; }
.fc-l { color: var(--text-mut); }
.fc-v { font-family: var(--mono); font-weight: 600; }
.form-fields { display: grid; gap: 12px; }
.fm-label { font-size: 13px; color: var(--text-dim); display: grid; gap: 6px; }
.fm-input { font-size: 15px; }
.fm-input.fm-ok { border-color: var(--green); }
.fm-input.fm-bad { border-color: var(--red); }

/* ---------- Drag & drop ---------- */
.dd-tray { display: flex; flex-wrap: wrap; gap: 10px; min-height: 52px; padding: 14px; background: var(--bg-soft); border: 1px dashed var(--border); border-radius: 12px; margin-bottom: 16px; }
.dd-chip { padding: 9px 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; font-size: 14px; cursor: grab; user-select: none; touch-action: none; }
.dd-chip.dragging { opacity: 0.35; }
.dd-chip.place-ok { outline: 2px solid var(--green); }
.dd-chip.place-bad { outline: 2px solid var(--red); }
.dd-bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.dd-bin { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-height: 110px; }
.dd-bin.over { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft) inset; }
.dd-bin-h { font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 10px; text-align: center; }
.dd-bin-body { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dd-ghost { position: fixed; transform: translate(-50%, -50%); padding: 9px 14px; background: var(--brand); color: #fff; border-radius: 999px; font-size: 14px; pointer-events: none; z-index: 1000; box-shadow: var(--shadow); }

.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--text-mut); }

/* =====================================================================================
   SKIN „ORDINACE" (/ordinace, v1.56) — umírněná verze: zdravotní sestra místo šílené krysy.
   Stejná appka, stejné hry a skórování; liší se jen paleta (Medevio teal), fonty (Nunito +
   Caveat = ručně psané lístečky), obrázky a hlášky. Přepíná se z topbaru (#skin-toggle).
   ===================================================================================== */
html[data-skin="clinic"] {
  --bg: #f3f8f7;
  --bg-soft: #ffffff;
  --panel: #ffffff;
  --panel-2: #eaf5f2;
  --border: #cfe3de;
  --text: #1c2b2a;
  --text-dim: #4d625f;
  --text-mut: #86999a;
  --brand: #07a996;
  --brand-soft: #d6f1ec;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --input-bg: #ffffff;
  --topbar-bg: rgba(255, 255, 255, 0.86);
  --app-bg: radial-gradient(1200px 600px at 70% -10%, #dff3ee 0%, #f3f8f7 55%);
  --shadow: 0 10px 30px rgba(7, 80, 70, 0.10);
  --display: "Nunito", "Segoe UI", system-ui, sans-serif;   /* přátelské zaoblené nadpisy */
  --fun: "Caveat", "Nunito", cursive;                        /* ručně psaný lísteček */
}
html[data-skin="clinic"][data-theme="dark"] {
  --bg: #0e1f1e;
  --bg-soft: #143130;
  --panel: #183a38;
  --panel-2: #1f4744;
  --border: #2b5c57;
  --text: #e6f3f1;
  --text-dim: #a3c4bf;
  --text-mut: #6f918c;
  --brand: #2bc0aa;
  --brand-soft: #174e47;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --input-bg: #0b1a19;
  --topbar-bg: rgba(14, 31, 30, 0.72);
  --app-bg: radial-gradient(1200px 600px at 70% -10%, #17403c 0%, #0e1f1e 55%);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
/* typografie: brand ručně psaný (větší, ať je čitelný), nadpisy Nunito 800 */
html[data-skin="clinic"] .brand-text { font-family: var(--fun); font-size: 24px; font-weight: 700; letter-spacing: 0; }
html[data-skin="clinic"] .brand-text strong { font-weight: 700; }
html[data-skin="clinic"] h1, html[data-skin="clinic"] h2, html[data-skin="clinic"] .card-title,
html[data-skin="clinic"] .ct-title, html[data-skin="clinic"] .companies-h, html[data-skin="clinic"] .res-hero-cap h1,
html[data-skin="clinic"] .gcard-main .card-title { font-family: var(--display); font-weight: 800; }
html[data-skin="clinic"] .section-label { font-family: var(--display); font-weight: 800; letter-spacing: 0.06em; }
html[data-skin="clinic"] .rank-chip { font-family: var(--display); }
html[data-skin="clinic"] .motto-cap { font-family: var(--fun); font-size: 22px; font-style: normal; color: var(--brand); }
/* jemnější atmosféra: skoro žádná vinětace ve světlém, mírná ve tmavém */
html[data-skin="clinic"] body::before { background: radial-gradient(1200px 720px at 50% -8%, transparent 60%, rgba(7, 80, 70, 0.07) 100%); }
html[data-skin="clinic"][data-theme="dark"] body::before { background: radial-gradient(1100px 680px at 50% -5%, transparent 40%, rgba(0, 0, 0, 0.45) 100%); }
html[data-skin="clinic"][data-theme="dark"] .card.active:hover { box-shadow: 0 12px 30px rgba(0,0,0,0.4), 0 0 22px -6px var(--brand); }
html[data-skin="clinic"] .brand-mark { background: var(--brand); box-shadow: 0 4px 14px rgba(7, 169, 150, 0.4); }
/* štítek verze u značky („ordinace") */
.brand-skin { font-family: var(--fun); font-size: 17px; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 1px 10px; line-height: 1.3; margin-left: -2px; }
.brand-skin[hidden] { display: none; }
/* přepínač skinu v topbaru (odkaz stylovaný jako tlačítka) */
.skin-toggle { text-decoration: none; }
/* hero na hubu: rozmazané pozadí ze sestry, světlejší (obrázek je světlý) */
html[data-skin="clinic"] .hub-hero-full { background: #dff3ee; }
html[data-skin="clinic"] .hub-hero-full::before { background: url(../img/ordinace/sestra.jpg) center / cover; filter: blur(30px) brightness(0.8); }
html[data-skin="clinic"] .hub-hero-cap { background: linear-gradient(180deg, transparent, rgba(10, 40, 36, 0.5) 45%, rgba(10, 40, 36, 0.88)); }
/* terč ve hře Myš = pilulka s křížkem místo krvavé bulvy */
html[data-skin="clinic"] .target { background: #000 url(../img/ordinace/pill.jpg) center / cover; box-shadow: 0 0 0 1px rgba(7,169,150,0.25), 0 6px 22px rgba(7,169,150,0.45); }
html[data-skin="clinic"] .aim-stage { background: var(--panel-2); }
html[data-skin="clinic"] .aim-ripple.bull { background: var(--brand); box-shadow: 0 0 10px var(--brand); }
/* karty her: obrázky jsou světlé → světlý podklad místo černého */
html[data-skin="clinic"] .gcard-img, html[data-skin="clinic"] .card-banner { background: var(--panel-2); }
/* tlačítko ztišení na animaci ve světlém tealu */
html[data-skin="clinic"] .rat-mute { background: rgba(7, 80, 70, 0.55); }
html[data-skin="clinic"] .rat-mute:hover { background: rgba(7, 80, 70, 0.82); }
/* bodová pilulka = žlutý lísteček (zůstává), hodnost = tealový lísteček */
html[data-skin="clinic"] .rank-chip.ranked { background: linear-gradient(180deg, #a7ebdf, #4fd0bc); color: #063f37; border-color: #07a996; box-shadow: 0 2px 10px rgba(7, 169, 150, 0.35); }
html[data-skin="clinic"][data-theme="dark"] .rank-chip.ranked { background: linear-gradient(180deg, #2bc0aa, #0f8d7b); color: #042a25; }
html[data-skin="clinic"] .badge.ready { color: #07a996; }
html[data-skin="clinic"][data-theme="dark"] .badge.ready { color: #7fe3d3; }
html[data-skin="clinic"] .swipe-arrow.show { text-shadow: 0 0 30px rgba(7,169,150,0.5); }
@media (max-width: 640px) {
  html[data-skin="clinic"] .brand-text { font-size: 19px; }
  .brand-skin { display: none; }
}
