/* ===================================================================
   Odeber si dvě – styly
   =================================================================== */

:root {
  --felt-1: #1a5c38;
  --felt-2: #0d3b22;
  --wood: #4a2c14;
  --gold: #e8b40c;
  --gold-dark: #a37c05;
  --ink: #1c1a15;
  --paper: #fdfaf3;
  --red: #c8102e;
  --blue: #1d4f91;
  --green-btn: #2e9e4f;
  --panel: rgba(10, 30, 18, 0.82);
  --panel-light: rgba(255, 255, 255, 0.08);
  --site-bg: #f6f1e8;
  --site-ink: #172019;
  --site-muted: #657066;
  --site-line: #ded7c7;
  --site-green: #123524;
  --site-teal: #1d6a69;
  --site-red: #a02a34;
  --site-header-h: 68px;
  --card-w: clamp(64px, 13vw, 110px);
  --radius: 14px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: var(--font);
  min-height: 100%;
  color: var(--site-ink);
  background:
    linear-gradient(135deg, rgba(29, 106, 105, 0.12), transparent 34%),
    linear-gradient(180deg, #fbf8f1, var(--site-bg));
  -webkit-tap-highlight-color: transparent;
}

.game-page {
  color: #f0ead8;
  background:
    radial-gradient(ellipse at 50% 30%, var(--felt-1) 0%, var(--felt-2) 75%),
    var(--felt-2);
}

.hidden { display: none !important; }

/* ---------------- Obecné prvky ---------------- */

.btn {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--panel-light);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 0.6em 1.2em;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
  touch-action: manipulation;
}
.btn:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }

.btn-big { font-size: 1.15rem; padding: 0.8em 1.5em; width: 100%; }
.btn-small { font-size: 0.85rem; padding: 0.45em 0.9em; }
.btn-icon { padding: 0.4em 0.7em; font-size: 1.1rem; }

.btn-green {
  background: linear-gradient(180deg, #37b95d, #268a43);
  border-color: #1c6a32;
  box-shadow: 0 4px 0 #175427, var(--shadow);
}
.btn-green:hover { background: linear-gradient(180deg, #40cc68, #2b9a4b); }

.btn-gold {
  background: linear-gradient(180deg, #f0c33c, #cf9e08);
  border-color: var(--gold-dark);
  color: #3a2c02;
  box-shadow: 0 4px 0 #86660a, var(--shadow);
}
.btn-gold:hover { background: linear-gradient(180deg, #f7cf58, #e0ad0d); }

.btn-red {
  background: linear-gradient(180deg, #d0475c, #a12338);
  border-color: #7c1a2b;
}

/* ---------------- Společný web ---------------- */

.site-header {
  min-height: var(--site-header-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(16px, 4vw, 44px);
  color: var(--site-ink);
  background: rgba(251, 248, 241, 0.9);
  border-bottom: 1px solid var(--site-line);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
}

.game-page .site-header {
  color: #f7f0db;
  background: rgba(9, 31, 19, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.site-brand {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.site-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--site-green), var(--site-teal));
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(18, 53, 36, 0.22);
}

.game-page .site-brand-mark {
  background: linear-gradient(135deg, var(--gold), #cf6f20);
  color: #271b04;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.site-brand-text strong {
  font-size: 1rem;
}

.site-brand-text span {
  color: var(--site-muted);
  font-size: 0.78rem;
}

.game-page .site-brand-text span {
  color: rgba(247, 240, 219, 0.72);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.site-nav a,
.site-back-link {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: 8px;
  padding: 8px 11px;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active,
.site-back-link:hover {
  background: rgba(18, 53, 36, 0.1);
}

.game-page .site-nav a:hover,
.game-page .site-nav a.active,
.game-page .site-back-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.site-back-link {
  border: 1px solid currentColor;
}

.site-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) 0;
}

.game-main {
  width: 100%;
  padding: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(16px, 4vw, 44px);
  color: var(--site-muted);
  background: rgba(255, 255, 255, 0.48);
  border-top: 1px solid var(--site-line);
  font-size: 0.9rem;
}

.game-page .site-footer {
  color: rgba(247, 240, 219, 0.7);
  background: rgba(5, 18, 10, 0.6);
  border-top-color: rgba(255, 255, 255, 0.12);
}

.site-footer div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-footer strong {
  color: var(--site-ink);
}

.game-page .site-footer strong {
  color: var(--gold);
}

.site-footer nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.site-footer a:hover {
  color: var(--site-ink);
}

.game-page .site-footer a:hover {
  color: var(--gold);
}

body.is-playing .site-footer {
  display: none;
}

/* ---------------- Rozcestník ---------------- */

.hub-page {
  background:
    repeating-linear-gradient(90deg, rgba(92, 56, 33, 0.08) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 72px),
    linear-gradient(180deg, #efe0c3 0%, #ead2ab 46%, #9f6945 46%, #6c402b 100%);
}

.hub-page .site-header {
  background: rgba(246, 232, 199, 0.9);
  border-bottom-color: rgba(82, 49, 28, 0.18);
  box-shadow: 0 10px 24px rgba(80, 48, 30, 0.08);
}

.hub-page .site-brand-mark {
  background: #173c2b;
  box-shadow: 6px 6px 0 #d8b36a;
  transform: rotate(-3deg);
}

.lobby-main {
  width: min(1180px, calc(100% - 28px));
  padding: 30px 0 56px;
}

.play-table {
  min-height: calc(100svh - var(--site-header-h) - 64px);
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(520px, 1.18fr);
  gap: 34px;
  align-items: center;
  position: relative;
}

.play-table::before {
  content: '';
  position: absolute;
  inset: 16% -4% 8% 28%;
  z-index: -1;
  border-radius: 22px;
  background:
    repeating-linear-gradient(88deg, rgba(45, 26, 15, 0.18) 0 2px, transparent 2px 34px),
    linear-gradient(180deg, #96623e, #663b27);
  box-shadow: 0 28px 80px rgba(47, 26, 15, 0.28);
  transform: rotate(-1.2deg);
}

.lobby-copy {
  min-width: 0;
  position: relative;
  z-index: 2;
  padding: 18px 0;
}

.eyebrow {
  color: #7a332f;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.lobby-copy h1 {
  font-family: var(--font-display);
  font-size: 4.8rem;
  line-height: 0.9;
  font-weight: 800;
  margin-bottom: 18px;
  color: #1e2a1f;
  text-wrap: balance;
}

.lead {
  color: #3f3429;
  max-width: 560px;
  font-size: 1.15rem;
  line-height: 1.6;
}

.table-notes {
  display: grid;
  gap: 11px;
  margin-top: 28px;
  max-width: 420px;
}

.table-notes span {
  width: fit-content;
  min-width: 210px;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 16px 10px 13px;
  color: #2c241b;
  background: #fff4d6;
  border: 1px solid rgba(104, 73, 35, 0.28);
  border-left: 6px solid #1c6b52;
  box-shadow: 7px 7px 0 rgba(82, 49, 28, 0.14);
}

.table-notes span:nth-child(2) {
  margin-left: 28px;
  border-left-color: #b4433f;
  transform: rotate(1.5deg);
}

.table-notes span:nth-child(3) {
  margin-left: 10px;
  border-left-color: #c58b22;
  transform: rotate(-1.2deg);
}

.table-notes b {
  font-size: 1.3rem;
  color: #102f21;
}

.table-scene {
  min-width: 0;
  min-height: 560px;
  position: relative;
  overflow: hidden;
  padding: 38px;
  border: 14px solid #70452e;
  border-radius: 24px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 22px),
    linear-gradient(150deg, #1a5c38, #0f472c 62%, #0a3522);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.13),
    inset 0 0 34px rgba(0, 0, 0, 0.36),
    0 34px 70px rgba(48, 30, 18, 0.35);
  transform: rotate(-0.7deg);
}

.felt-lines {
  position: absolute;
  inset: 28px;
  border: 2px dashed rgba(245, 222, 166, 0.26);
  border-radius: 18px;
  pointer-events: none;
}

.featured-box {
  position: relative;
  z-index: 2;
  width: min(100%, 650px);
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 20px;
  padding: 18px;
  color: #2d241b;
  text-decoration: none;
  background: #fff0c7;
  border: 2px solid #392615;
  border-radius: 8px;
  box-shadow:
    11px 13px 0 #2f2117,
    0 24px 38px rgba(0, 0, 0, 0.32);
  transform: rotate(1.4deg);
}

.featured-box::after {
  content: '';
  position: absolute;
  inset: 12px -11px -13px 22px;
  z-index: -1;
  border-radius: 8px;
  background: #ba7f3b;
}

.box-cover {
  position: relative;
  min-height: 268px;
  overflow: hidden;
  border: 2px solid #2c2017;
  border-radius: 6px;
  background: #123524;
}

.box-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 65% 50%;
}

.box-cover span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  color: #fff;
  background: #173c2b;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.box-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.box-kicker {
  color: #7a332f;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.box-copy h2 {
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 0.95;
}

.box-copy p {
  line-height: 1.52;
}

.table-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.table-facts div {
  border-top: 2px solid rgba(82, 49, 28, 0.25);
  padding-top: 8px;
}

.table-facts dt {
  color: #7c6751;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.table-facts dd {
  font-weight: 900;
}

.table-cta {
  width: fit-content;
  min-width: 190px;
  display: inline-flex;
  justify-content: center;
  padding: 12px 18px;
  color: #fff8e2;
  background: #a73731;
  border: 2px solid #64211e;
  border-radius: 6px;
  box-shadow: 0 5px 0 #64211e;
  text-decoration: none;
  font-weight: 900;
  transition: transform 0.14s, box-shadow 0.14s, background 0.14s;
}

.table-cta:hover {
  background: #bd433c;
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #64211e;
}

.loose-hand {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  transform: rotate(7deg);
  pointer-events: none;
}

.loose-hand span {
  width: 64px;
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  margin-left: -20px;
  color: #202018;
  background: #fffdf7;
  border: 2px solid #d0c4a7;
  border-radius: 8px;
  box-shadow: -6px 8px 13px rgba(0, 0, 0, 0.28);
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
}

.loose-hand span:nth-child(1) { color: #a73731; transform: translateY(15px) rotate(-13deg); }
.loose-hand span:nth-child(2) { color: #173c2b; transform: translateY(2px) rotate(-4deg); }
.loose-hand span:nth-child(3) { color: #1d4f91; transform: translateY(-9px) rotate(5deg); }
.loose-hand span:nth-child(4) { color: #b17615; transform: translateY(9px) rotate(15deg); }

.draughts-hand span {
  width: 58px;
  aspect-ratio: 1;
  color: #f2dfb5;
  background: #9a2e43;
  border: 7px solid #5e1929;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.12),
    -5px 7px 10px rgba(0, 0, 0, 0.28);
  font-size: 1.5rem;
}

.draughts-hand span:nth-child(1) { color: #60462c; background: #f1e4c3; border-color: #ab8e5c; transform: translateY(9px) rotate(-9deg); }
.draughts-hand span:nth-child(2) { color: transparent; transform: translateY(-4px) rotate(-2deg); }
.draughts-hand span:nth-child(3) { color: transparent; background: #f1e4c3; border-color: #ab8e5c; transform: translateY(-10px) rotate(5deg); }
.draughts-hand span:nth-child(4) { color: #f2dfb5; transform: translateY(5px) rotate(11deg); }

.pig-flight-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  right: 27px;
  bottom: 38px;
  z-index: 3;
  color: #f7d85d;
  transform: rotate(-8deg);
  pointer-events: none;
}

.pig-flight-mark > span {
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  position: relative;
  border: 6px solid #285f38;
  border-radius: 50%;
  background: #65af43;
  box-shadow: 5px 7px 0 rgba(10, 36, 22, 0.28);
}

.pig-flight-mark > span::before,
.pig-flight-mark > span::after {
  content: '';
  width: 14px;
  height: 21px;
  position: absolute;
  top: -13px;
  border: 5px solid #285f38;
  border-bottom: 0;
  background: #65af43;
}

.pig-flight-mark > span::before {
  left: 7px;
  transform: rotate(-18deg);
}

.pig-flight-mark > span::after {
  right: 7px;
  transform: rotate(18deg);
}

.pig-flight-mark i {
  width: 7px;
  height: 11px;
  border-radius: 50%;
  background: #285f38;
}

.pig-flight-mark b {
  letter-spacing: 5px;
}

.pig-flight-mark em {
  color: #efba4c;
  font-size: 2.8rem;
  font-style: normal;
  text-shadow: 3px 3px 0 #5f3b27;
}

.rune-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  right: 27px;
  bottom: 38px;
  z-index: 3;
  color: #f7d85d;
  transform: rotate(-8deg);
  pointer-events: none;
}

.rune-mark > span {
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #2a1a10;
  font-size: 1.9rem;
  border: 6px solid #6b3f22;
  border-radius: 50%;
  background: linear-gradient(160deg, #f0b13c, #d97f2c);
  box-shadow: 5px 7px 0 rgba(24, 12, 6, 0.3);
}

.rune-mark b {
  letter-spacing: 5px;
}

.rune-mark em {
  color: #efba4c;
  font-size: 2.4rem;
  font-style: normal;
  text-shadow: 3px 3px 0 #5f3b27;
}

.score-slip {
  position: absolute;
  left: 34px;
  bottom: 30px;
  z-index: 3;
  width: 190px;
  padding: 14px 16px;
  color: #33281d;
  background: #ffe8a9;
  border: 1px solid rgba(70, 44, 24, 0.25);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.16);
  transform: rotate(-5deg);
}

.score-slip b,
.score-slip span {
  display: block;
}

.score-slip span {
  margin-top: 4px;
  color: #6e5b43;
  font-size: 0.9rem;
  line-height: 1.3;
}

.game-shelf {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 34px 0 42px;
}

.shelf-heading h2,
.quiet-rules h2 {
  font-family: var(--font-display);
  font-size: 2.7rem;
  line-height: 1;
  color: #1e2a1f;
}

.shelf-row {
  display: flex;
  align-items: stretch;
  gap: 16px;
  min-width: 0;
  overflow-x: auto;
  padding: 18px 18px 28px;
  background:
    repeating-linear-gradient(90deg, rgba(47, 27, 15, 0.16) 0 2px, transparent 2px 44px),
    linear-gradient(180deg, rgba(91, 55, 34, 0.28), rgba(91, 55, 34, 0.16));
  border-bottom: 13px solid #70452e;
  box-shadow: 0 18px 34px rgba(78, 47, 28, 0.18);
}

.shelf-game,
.shelf-empty {
  min-width: 226px;
  min-height: 268px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 16px 16px;
  border-radius: 6px;
}

.shelf-game {
  position: relative;
  overflow: hidden;
  color: #fff7dc;
  background: linear-gradient(160deg, #17452f, #102f21);
  border-left: 14px solid #d8b36a;
  box-shadow: 8px 8px 0 rgba(32, 19, 11, 0.22);
  text-decoration: none;
  transform: rotate(-1.2deg);
  transition: transform 0.16s, box-shadow 0.16s;
}

.shelf-game-nebesky-posel {
  color: #fff8df;
  background: linear-gradient(155deg, #be4a43, #7a2d35);
  border-left-color: #f1c44f;
}

.shelf-game-ocelovy-horizont {
  color: #f4ebcb;
  background: linear-gradient(155deg, #4b5945, #252f25);
  border-left-color: #d4a642;
}

.shelf-game-dama {
  color: #fff2d2;
  background: linear-gradient(155deg, #722c38, #351d25);
  border-left-color: #d3ae5c;
}

.shelf-game-praseci-vysadek {
  color: #fff8df;
  background: linear-gradient(155deg, #2e7b4a, #195b58 58%, #b34d3f);
  border-left-color: #f1c644;
}

.shelf-game-rachanda {
  color: #f4ead6;
  background: linear-gradient(155deg, #3b2a48, #1c1526 58%, #6d3a22);
  border-left-color: #f0b13c;
}

.shelf-game:hover {
  transform: translateY(-5px) rotate(0.4deg);
  box-shadow: 8px 13px 0 rgba(32, 19, 11, 0.2);
}

.shelf-game strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
}

.shelf-art {
  height: 84px;
  display: block;
  overflow: hidden;
  margin: -18px -16px 0;
  border-bottom: 2px solid rgba(255, 247, 220, 0.38);
  background: rgba(0, 0, 0, 0.18);
}

.shelf-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.shelf-game span:last-child {
  color: rgba(255, 247, 220, 0.78);
  line-height: 1.35;
}

.shelf-spine {
  width: fit-content;
  padding: 4px 8px;
  color: #1e2a1f;
  background: #f3d077;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.shelf-empty {
  color: #5b4b39;
  background: rgba(255, 244, 214, 0.46);
  border: 2px dashed rgba(89, 55, 34, 0.32);
}

.shelf-empty span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff7dc;
  background: #7a332f;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 900;
}

.shelf-empty strong {
  color: #33281d;
  font-family: var(--font-display);
  font-size: 1.7rem;
}

.quiet-rules {
  width: min(780px, 100%);
  margin: 10px 0 0 auto;
  padding: 28px 0 10px 34px;
  border-left: 7px solid #173c2b;
}

.quiet-rules p:last-child {
  margin-top: 14px;
  color: #3f3429;
  font-size: 1.04rem;
  line-height: 1.68;
}

/* Backward-compatible facts style used on game pages. */
.game-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.game-facts div {
  border-top: 1px solid var(--site-line);
  padding-top: 8px;
}

.game-facts dt {
  color: var(--site-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.game-facts dd {
  color: var(--site-ink);
  font-size: 0.9rem;
  font-weight: 800;
}

/* ---------------- Menu ---------------- */

#screen-menu {
  min-height: 100%;
  display: flex;
  justify-content: center;
  padding: clamp(12px, 4vw, 40px);
  overflow-y: auto;
}

.menu-inner {
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.2rem);
  text-align: center;
  color: var(--gold);
  text-shadow: 0 2px 0 #5c4603, 0 5px 14px rgba(0, 0, 0, 0.6);
  letter-spacing: 1px;
  margin-top: 12px;
}

.logo-cards {
  display: block;
  height: 0;
}

.tagline {
  text-align: center;
  opacity: 0.85;
  font-style: italic;
  margin-top: -8px;
}

.menu-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: clamp(14px, 3vw, 24px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.menu-panel h2 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 6px;
}

.setup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#sel-count {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.5em 1em;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.setup-hint {
  font-size: 0.82rem;
  opacity: 0.7;
  font-style: italic;
  margin-top: -6px;
}

.seg {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  overflow: hidden;
}
.seg button {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: transparent;
  border: none;
  padding: 0.5em 1.1em;
  cursor: pointer;
}
.seg button.active {
  background: var(--gold);
  color: #3a2c02;
}

.seat {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--panel-light);
  border-radius: 10px;
  padding: 10px;
}

.seat input[type="text"] {
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.5em 0.7em;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  width: 100%;
  min-width: 0;
}

.seat select {
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.45em;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}
.seat select:disabled { opacity: 0; pointer-events: none; }

.seat .seg button { padding: 0.45em 0.8em; font-size: 0.9rem; }

.row-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.stats-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.stats-grid th, .stats-grid td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.stats-grid th { color: var(--gold); font-weight: 600; font-size: 0.85rem; }
.stats-grid td.num, .stats-grid th.num { text-align: right; }
.stats-empty { opacity: 0.7; font-style: italic; }

.footer-note {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.55;
  padding-bottom: 20px;
}

.game-page #screen-menu {
  min-height: calc(100dvh - var(--site-header-h));
}

.game-page .menu-inner {
  width: min(680px, 100%);
}

.game-page .menu-panel {
  color: #2f261c;
  background:
    linear-gradient(180deg, rgba(255, 248, 226, 0.96), rgba(243, 220, 170, 0.96));
  border: 2px solid rgba(69, 43, 23, 0.7);
  border-radius: 8px;
  box-shadow: 10px 12px 0 rgba(0, 0, 0, 0.24), 0 20px 34px rgba(0, 0, 0, 0.28);
}

.game-page .menu-panel h2 {
  color: #7a332f;
  border-bottom-color: rgba(69, 43, 23, 0.22);
}

.game-about-panel p {
  line-height: 1.55;
}

.game-about-panel .game-facts {
  color: #2f261c;
}

.game-about-panel .game-facts div {
  border-top-color: rgba(69, 43, 23, 0.24);
}

.game-about-panel .game-facts dt {
  color: #7c6751;
}

.game-about-panel .game-facts dd {
  color: #2f261c;
}

.feature-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.45;
}

.game-page .seat,
.game-page .seg {
  background: rgba(103, 72, 37, 0.08);
  border-color: rgba(69, 43, 23, 0.25);
}

.game-page .seat input[type="text"],
.game-page .seat select,
.game-page #sel-count {
  color: #2f261c;
  background: rgba(255, 253, 247, 0.82);
  border-color: rgba(69, 43, 23, 0.25);
}

.game-page .seg button {
  color: #2f261c;
}

.game-page .seg button.active {
  background: #c58b22;
  color: #1e1609;
}

.game-page .setup-hint,
.game-page .stats-empty {
  opacity: 0.75;
}

.game-page .stats-grid th,
.game-page .stats-grid td {
  border-bottom-color: rgba(69, 43, 23, 0.18);
}

.game-page .stats-grid th {
  color: #7a332f;
}

/* ---------------- Herní obrazovka ---------------- */

#screen-game {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.game-page #screen-game {
  height: calc(100dvh - var(--site-header-h));
}

#game-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px clamp(8px, 2vw, 18px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

#round-info {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 0.95rem;
  white-space: nowrap;
}

#players-strip {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--panel-light);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 4px 12px 4px 5px;
  font-size: 0.85rem;
  transition: box-shadow 0.25s, border-color 0.25s, background 0.25s;
}

.player-chip.current {
  border-color: var(--gold);
  background: rgba(232, 180, 12, 0.18);
  box-shadow: 0 0 12px rgba(232, 180, 12, 0.5);
}

.player-chip.finished { opacity: 0.55; }

.player-chip .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

.player-chip .meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.player-chip .name { font-weight: 700; white-space: nowrap; max-width: 16ch; overflow: hidden; text-overflow: ellipsis; }
.player-chip .sub { font-size: 0.72rem; opacity: 0.8; white-space: nowrap; }
.player-chip .sub .goal { color: var(--gold); letter-spacing: 1px; }

/* ---------------- Stůl ---------------- */

#table {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 10px;
  padding: 8px;
  min-height: 0;
}

#effect-banner {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #d0475c, #a12338);
  border: 1px solid #7c1a2b;
  color: #fff;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
  z-index: 5;
  animation: bannerIn 0.3s ease;
  text-align: center;
  max-width: 92%;
}
#effect-banner.info { background: linear-gradient(180deg, #3d76c4, #1d4f91); border-color: #143a6b; }

@keyframes bannerIn {
  from { transform: translateX(-50%) translateY(-16px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

#center-area {
  display: flex;
  align-items: center;
  gap: clamp(16px, 6vw, 60px);
}

#deck-area, #pile-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#deck-stack {
  width: var(--card-w);
  aspect-ratio: 2 / 3;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s;
  border-radius: 8px;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.45);
}
#deck-stack:hover { transform: translateY(-3px); }
#deck-stack.attention { animation: pulse 1.2s infinite; }
#deck-stack svg { width: 100%; height: 100%; display: block; border-radius: 10px; }
#deck-stack::before, #deck-stack::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #173f74;
  border: 2px solid #c9c2b2;
  border-radius: 10px;
  z-index: -1;
}
#deck-stack::before { transform: translate(3px, 3px); }
#deck-stack::after { transform: translate(6px, 6px); }
#deck-stack.empty { opacity: 0.35; cursor: default; }
#deck-stack.empty:hover { transform: none; }

@keyframes pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

#pile-top {
  width: var(--card-w);
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.45);
}
#pile-top svg { width: 100%; height: 100%; display: block; }
#pile-top .played-anim { animation: playIn 0.35s ease; }

@keyframes playIn {
  from { transform: translateY(-40px) rotate(-8deg) scale(1.15); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.pile-label {
  font-size: 0.8rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

#last-move {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 8px 16px;
  font-size: 1rem;
  max-width: 94%;
  flex-wrap: wrap;
  justify-content: center;
}
#last-move.pop { animation: lmPop 0.35s cubic-bezier(0.34, 1.4, 0.64, 1); }
@keyframes lmPop {
  from { transform: scale(0.85); opacity: 0.3; }
  to { transform: scale(1); opacity: 1; }
}
#last-move .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}
#last-move .lm-label { opacity: 0.9; }
#last-move .lm-extra {
  font-size: 0.8rem;
  opacity: 0.8;
  font-style: italic;
}
.mini-card {
  width: 38px;
  aspect-ratio: 2 / 3;
  display: inline-block;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}
.mini-card svg { width: 100%; height: 100%; display: block; }

#log-area {
  position: absolute;
  bottom: 6px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.8rem;
  pointer-events: none;
}
#log-area .log-line {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 12px;
  border-radius: 999px;
  opacity: 0.85;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#log-area .log-line:last-child { font-weight: 600; opacity: 1; }

/* ---------------- Ruka hráče ---------------- */

#hand-area {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.5));
  border-top: 2px solid var(--wood);
  padding: 10px clamp(8px, 2vw, 20px) 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#turn-label {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
  min-height: 1.3em;
}

#hand-cards {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: calc(var(--card-w) * 1.5 + 22px);
  padding: 18px 10px 0;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: thin;
}

.hand-card {
  width: var(--card-w);
  aspect-ratio: 2 / 3;
  flex-shrink: 0;
  margin-left: calc(var(--card-w) * -0.38);
  transition: transform 0.16s, margin 0.16s, filter 0.16s;
  cursor: pointer;
  position: relative;
  border-radius: 8px;
  box-shadow: -3px 2px 8px rgba(0, 0, 0, 0.45);
}
.hand-card:first-child { margin-left: 0; }
.hand-card svg { width: 100%; height: 100%; display: block; pointer-events: none; }

.hand-card.playable:hover { transform: translateY(-14px); }
.hand-card.selected { transform: translateY(-20px); }
.hand-card.selected::after {
  content: '✓';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-btn);
  color: #fff;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}
.hand-card.dimmed { filter: grayscale(0.7) brightness(0.6); }
.hand-card.dimmed:hover { transform: none; }

.hand-hidden-msg {
  text-align: center;
  opacity: 0.8;
  font-style: italic;
  padding: 20px 0;
}

#actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------------- Overlay ---------------- */

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 15, 9, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

#overlay-box {
  background: linear-gradient(180deg, #14402a, #0c2b1b);
  border: 2px solid var(--gold-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 4vw, 32px);
  width: min(480px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: popIn 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#overlay-box h2 {
  font-family: var(--font-display);
  color: var(--gold);
  text-align: center;
  font-size: 1.5rem;
}

#overlay-box p { text-align: center; line-height: 1.5; }

.picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.picker-grid.values { grid-template-columns: repeat(4, 1fr); }

.picker-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid #c9c2b2;
  border-radius: 10px;
  padding: 12px 6px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
}
.picker-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  border-color: var(--gold);
}
.picker-btn svg { width: 34px; height: 34px; }

.handover-icon {
  font-size: 3.4rem;
  text-align: center;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-light);
  border-radius: 10px;
  padding: 10px 14px;
}
.result-row .place { font-size: 1.4rem; width: 1.6em; text-align: center; }
.result-row .r-name { font-weight: 700; flex: 1; }
.result-row .r-note { font-size: 0.82rem; opacity: 0.85; text-align: right; }
.result-row.winner {
  background: rgba(232, 180, 12, 0.2);
  border: 1px solid var(--gold-dark);
}

.crown-big {
  font-size: 4rem;
  text-align: center;
  animation: crownBounce 1s ease infinite alternate;
}
@keyframes crownBounce {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-8px) scale(1.06); }
}

.rules-text {
  font-size: 0.92rem;
  line-height: 1.55;
  text-align: left;
}
.rules-text h3 {
  color: var(--gold);
  font-family: var(--font-display);
  margin: 14px 0 6px;
}
.rules-text ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.rules-text b { color: #ffd75e; }

/* ---------------- Letící karty (animace) ---------------- */

.fly-card {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
  will-change: transform;
}
.fly-card svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------------- Toast ---------------- */

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #d0475c, #a12338);
  color: #fff;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 100;
  animation: toastIn 0.25s ease;
  max-width: 92%;
  text-align: center;
}
@keyframes toastIn {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ---------------- Responzivita ---------------- */

@media (max-width: 640px) {
  :root {
    --card-w: clamp(58px, 17vw, 84px);
    --site-header-h: 124px;
  }

  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }

  .site-brand {
    width: auto;
    flex: 1 1 190px;
  }

  .site-nav {
    margin-left: 0;
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .site-back-link {
    margin-left: auto;
  }

  .site-main {
    width: min(100% - 24px, 1120px);
    padding-top: 24px;
  }

  .lobby-main {
    width: min(100% - 22px, 1180px);
    padding-top: 18px;
  }

  .play-table {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 22px;
  }

  .play-table::before {
    inset: 34% -12px 8% -12px;
    border-radius: 14px;
    transform: none;
  }

  .lobby-copy h1 {
    font-size: 2.9rem;
    line-height: 0.95;
  }

  .lead {
    font-size: 1.02rem;
  }

  .table-notes {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    overflow-x: auto;
    padding: 0 0 8px;
  }

  .table-notes span,
  .table-notes span:nth-child(2),
  .table-notes span:nth-child(3) {
    min-width: 148px;
    margin-left: 0;
    padding: 8px 10px 8px 9px;
    transform: none;
  }

  .table-notes b {
    font-size: 1.05rem;
  }

  .table-scene {
    min-height: auto;
    padding: 18px;
    border-width: 9px;
    border-radius: 18px;
    transform: none;
  }

  .felt-lines {
    inset: 15px;
    border-radius: 12px;
  }

  .featured-box {
    grid-template-columns: 1fr;
    margin-top: 0;
    padding: 13px;
    transform: none;
    box-shadow: 7px 9px 0 #2f2117, 0 18px 28px rgba(0, 0, 0, 0.27);
  }

  .featured-box::after {
    display: none;
  }

  .box-cover {
    min-height: 132px;
    aspect-ratio: 16 / 9;
  }

  .box-copy h2 {
    font-size: 2rem;
  }

  .game-facts {
    grid-template-columns: 1fr;
  }

  .table-cta {
    width: 100%;
  }

  .loose-hand,
  .pig-flight-mark,
  .rune-mark,
  .score-slip {
    display: none;
  }

  .game-shelf {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 28px;
  }

  .shelf-heading h2,
  .quiet-rules h2 {
    font-size: 2.1rem;
  }

  .shelf-row {
    margin-inline: -11px;
    padding-inline: 12px;
  }

  .shelf-game,
  .shelf-empty {
    min-width: 210px;
    min-height: 250px;
  }

  .quiet-rules {
    margin-left: 0;
    padding-left: 18px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  #game-header { padding: 6px 8px; gap: 6px; }
  #players-strip { justify-content: flex-start; width: 100%; order: 3; }
  .player-chip { padding: 3px 9px 3px 4px; font-size: 0.78rem; }
  .player-chip .avatar { width: 22px; height: 22px; }

  #center-area { gap: 20px; }
  #hand-cards { justify-content: flex-start; }
  #hand-cards::after { content: ''; flex: 0 0 12px; }

  .picker-grid { grid-template-columns: repeat(2, 1fr); }
  .picker-grid.values { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 641px) and (max-width: 1180px) {
  :root {
    --site-header-h: 124px;
  }

  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .site-brand {
    flex: 1 1 auto;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .site-back-link {
    margin-left: auto;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  :root { --card-w: clamp(70px, 11vw, 100px); }

  .play-table {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .play-table::before {
    inset: 36% -4% 6% -4%;
  }

  .lobby-copy h1 {
    font-size: 4.2rem;
  }

  .table-notes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }

  .table-notes span,
  .table-notes span:nth-child(2),
  .table-notes span:nth-child(3) {
    min-width: 0;
    margin-left: 0;
  }

  .game-shelf {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  :root { --card-w: clamp(52px, 9vh, 70px); }
  #hand-cards { min-height: calc(var(--card-w) * 1.5 + 10px); padding-top: 12px; }
  #turn-label { font-size: 0.85rem; }
  #log-area { display: none; }
}
