/* Дурак онлайн — мобильный PWA-интерфейс */
:root {
  --bg: #0f2f18;
  --panel: #1b4a2a;
  --panel-edge: #2e7d32;
  --surface: #0d2818;
  --text: #f1f8e9;
  --muted: #a5c9a8;
  --accent: #66bb6a;
  --gold: #ffd54f;
  --danger: #ef5350;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
/* Общая прокрутка страницы без видимой полосы прокрутки */
html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
body {
  background:
    radial-gradient(900px 500px at 90% -5%, rgba(102, 187, 106, 0.16), transparent 60%),
    radial-gradient(700px 420px at -10% 105%, rgba(255, 213, 79, 0.10), transparent 55%),
    radial-gradient(circle at 50% 20%, #1d5e33 0%, var(--bg) 70%);
  color: var(--text);
  font-family: "Segoe UI", Roboto, system-ui, sans-serif;
  overflow-y: auto;
  overflow-x: hidden;
}
button {
  font: inherit; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #1d4630; border: 1px solid var(--panel-edge);
  border-radius: 12px; padding: 11px 16px; cursor: pointer;
  transition: filter 0.15s, transform 0.08s, box-shadow 0.15s;
}
button:hover { filter: brightness(1.12); }
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Иконки (инлайн-SVG спрайт) */
.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.2em;
}
.icon-btn .icon { width: 20px; height: 20px; }
.coin-add .icon { width: 13px; height: 13px; stroke-width: 2.5; }
.panel-head button .icon, #friends-head button .icon, .panel-close .icon {
  width: 16px; height: 16px;
}
.role .icon, .option-price .icon,
#info-details .icon, #friends-panel .icon { width: 14px; height: 14px; vertical-align: -0.15em; }
button.primary {
  background: linear-gradient(180deg, #2e7d32, #256428);
  border-color: #4caf50; font-weight: 600;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.35);
}
button.warning { background: #b26a00; border-color: #ffb300; }
button.link {
  background: none; border: none; color: var(--muted);
  padding: 4px; font-size: 13px; text-decoration: underline;
  align-self: center;
}
.icon-btn { width: 42px; height: 42px; padding: 0; font-size: 18px; flex: none; }
.avatar.clickable { cursor: pointer; }
.coin-add {
  width: 26px; height: 26px; padding: 0; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: #1b3a12;
  border: none; border-radius: 8px; cursor: pointer;
  transition: filter 0.15s, transform 0.08s;
}
.coin-add:hover { filter: brightness(1.1); }
.coin-add .icon { width: 14px; height: 14px; stroke-width: 2.5; }
input, select {
  font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--panel-edge);
  border-radius: 10px; padding: 10px 12px; width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.22);
}
.row { display: flex; gap: 8px; margin: 8px 0; align-items: center; }
.row > * { flex: 1; }
.row label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--muted);
}
.checkboxes { flex-wrap: wrap; }
.checkboxes label {
  display: flex; flex-direction: row; gap: 6px; align-items: center;
  font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--panel-edge);
  border-radius: 999px; padding: 9px 12px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.checkboxes label:has(input:checked) {
  border-color: var(--accent); background: rgba(102, 187, 106, 0.16);
}
.checkboxes input { width: auto; accent-color: var(--accent); }

/* Экраны */
.screen { display: none; height: 100dvh; flex-direction: column; padding: 12px; }
.screen.active { display: flex; }
/* Меню может не влезать по высоте — страница прокручивается целиком */
#screen-menu { height: auto; min-height: 100dvh; padding: 0 12px 12px; }
h1 { text-align: center; margin-bottom: 12px; font-size: 22px; letter-spacing: 0.3px; }
.panel {
  background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius); padding: 16px; margin: 10px auto; width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow);
}
.hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }
.big-code {
  font-size: 34px; letter-spacing: 10px; text-align: center;
  color: var(--gold); font-weight: 700;
  background: var(--surface); border: 1px solid rgba(255, 213, 79, 0.3);
  border-radius: 12px; padding: 12px;
}
.hidden { display: none !important; }

/* Шапка меню: профиль всегда под рукой */
#menu-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  margin: 0 -12px 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: rgba(12, 36, 19, 0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
#profile-chip { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
#profile-chip.hidden { display: none !important; }
#profile-avatar {
  width: 44px; height: 44px; font-size: 22px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(135deg, var(--accent), var(--gold)) border-box;
}
#profile-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
#profile-name {
  font-weight: 600; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#profile-meta .coins {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content;
  font-size: 13px; color: var(--gold);
  background: rgba(255, 213, 79, 0.10);
  border: 1px solid rgba(255, 213, 79, 0.28);
  border-radius: 999px; padding: 2px 10px 2px 8px;
}
#auth-choice { display: flex; gap: 8px; flex: 1; }
#auth-choice.hidden { display: none !important; }
#btn-friends { margin-left: auto; }
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600;
}
/* Единый крестик закрытия для всех панелей */
.panel-head button, #friends-head button, .panel-close {
  width: 32px; height: 32px; padding: 0; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.panel-close-row { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.field-label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px; color: var(--muted);
}
#friends-head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600;
}
#wait-players { list-style: none; display: flex; flex-direction: column; gap: 6px; }
#wait-players li { background: var(--surface); border-radius: 8px; padding: 8px 12px; }

/* Друзья в профиле */
#friends-panel ul {
  list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 6px 0;
}
#friends-panel li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--surface); border-radius: 8px; padding: 8px 12px;
}
/* имя друга с его аватаром (входящие заявки) */
#friends-panel .friend-name {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
}
#friends-panel .friend-avatar {
  width: 26px; height: 26px; font-size: 15px; border-width: 1px;
}
/* список друзей: сетка плиток по 3 в ряд, без подложки
   (селектор усилен, чтобы перебить #friends-panel ul) */
#friends-panel ul#friends-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px;
}
#friends-panel #friends-list li {
  background: none; border-radius: 12px; padding: 0;
  flex-direction: column; justify-content: center; gap: 6px;
}
#friends-panel #friends-list li.empty { grid-column: 1 / -1; padding: 4px 6px; }
/* аватар с крестиком удаления на его левом верхнем углу */
#friends-panel #friends-list .friend-avatar-wrap {
  position: relative; display: inline-flex; flex: none;
}
#friends-panel #friends-list .friend-avatar {
  width: 76px; height: 76px; font-size: 40px;
}
#friends-panel #friends-list .friend-name {
  display: block; max-width: 100%;
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#friends-panel #friends-list .friend-remove {
  position: absolute; top: -3px; left: -3px; z-index: 1;
  width: 22px; height: 22px; padding: 0; flex: none;
  border-radius: 50%; border: none; background: var(--danger);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
#friends-panel #friends-list .friend-remove .icon {
  width: 11px; height: 11px; stroke-width: 2.5;
}
.spinner {
  width: 30px; height: 30px; margin: 8px auto; flex: none;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Карты */
.card {
  width: 52px; height: 76px; border-radius: 6px; flex: none;
  background: linear-gradient(160deg, #ffffff, #e8e8e8);
  border: 1px solid #8a8a8a; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; color: #1b1b1b; line-height: 1;
  user-select: none; position: relative; transition: transform 0.12s;
}
.card .corner {
  position: absolute; display: flex; flex-direction: column;
  align-items: center; line-height: 1;
}
.card .corner.tl { top: 4px; left: 5px; }
.card .corner.br { bottom: 4px; right: 5px; transform: rotate(180deg); }
.card .corner .rank { font-weight: 700; font-size: 14px; }
.card.ten .corner .rank { font-size: 11px; letter-spacing: -1px; }
.card .corner .suit { font-size: 12px; margin-top: 1px; }
.card .pip { font-size: 30px; }
.card.red { color: #c62828; }
.card.back {
  background: repeating-linear-gradient(45deg, #2e7d32 0 6px, #1b5e20 6px 12px);
  border-color: #0d3d14; justify-content: flex-end; padding-bottom: 4px;
  color: #f1f8e9; font-size: 12px;
}
.card.playable { outline: 3px solid var(--gold); cursor: pointer; }
.card.playable:hover, .card.playable:active { transform: translateY(-8px); }

/* Игровой экран */
#game-header {
  display: flex; gap: 8px; align-items: center;
  background: rgba(13, 40, 24, 0.65); border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px; padding: 8px 12px; font-size: 14px;
}
#game-header span { flex: 1; color: var(--muted); }
#game-header span.avatar { flex: none; width: 30px; height: 30px;
  font-size: 17px; align-self: center; }
#game-header button { padding: 4px 10px; flex: none; }
#status {
  text-align: center; color: var(--gold); font-size: 15px; min-height: 22px;
  margin: 6px auto; max-width: 420px; padding: 10px 14px;
  background: rgba(13, 40, 24, 0.65); border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

/* Рассадка вокруг стола: верхний ряд — игроки напротив,
   нижний ряд — соседи слева (следующий по ходу) и справа (предыдущий). */
#opponents { display: flex; flex-direction: column; gap: 8px; }
.opponents-top { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.opponents-sides { display: flex; justify-content: space-between; gap: 10px; padding: 0 6px; }
.opponent {
  background: var(--panel); border: 1px solid var(--panel-edge); border-radius: 10px;
  padding: 6px 12px; text-align: center; font-size: 14px; min-width: 90px;
}
.opponent .count-badge { font-size: 20px; font-weight: bold; color: var(--gold); }
.opponent .role { font-size: 11px; color: var(--accent); }
.opponent.offline { opacity: 0.45; }

#table-zone { position: relative; flex: 1; display: flex; gap: 12px;
  align-items: center; justify-content: center; min-height: 120px; }
/* Колода прижата к левому краю экрана */
#deck-zone { position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%); flex: none; }
#deck-stack { position: relative; width: 56px; height: 78px; }
/* Козырная карта выглядывает из-под колоды, повернута на 90° */
#deck-stack #trump-card { position: absolute; left: 25px; top: 1px;
  transform: rotate(90deg); z-index: 1; }
#deck-stack #deck-card { position: relative; z-index: 2; }
#deck-stack #deck-empty { position: absolute; inset: 0; z-index: 3; }
#table {
  display: flex; flex-wrap: wrap; gap: 14px; align-content: center; justify-content: center;
  max-width: 70%; min-height: 100px;
}
.pair { position: relative; width: 74px; height: 94px; }
.pair .defense { position: absolute; top: 12px; left: 16px; transform: rotate(9deg); }

#action-buttons { display: flex; gap: 10px; justify-content: center; min-height: 46px; margin-bottom: 5px; }
#action-buttons button { min-width: 130px; }

#hand {
  display: flex; gap: 0; justify-content: center; align-items: flex-end;
  overflow-x: auto; padding: 10px 4px 6px; min-height: 92px;
  background: rgba(0, 0, 0, 0.25); border-radius: 12px;
}
/* Рука внахлёст: карты перекрываются, playable приподнимается */
#hand .card { margin-left: -26px; }
#hand .card:first-child { margin-left: 0; }
#hand .card.playable { z-index: 1; }
#hand .card.playable:hover, #hand .card.playable:active { z-index: 2; }

button.link {
  background: none; border: none; color: var(--muted);
  font-size: 13px; text-decoration: underline; padding: 4px;
  align-self: center;
}

/* Чат: полупрозрачный блок справа, можно скрыть */
#chat {
  position: fixed; right: 12px; bottom: 110px; width: min(480px, 96vw);
  max-height: 25dvh; background: rgba(15, 47, 24, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid var(--panel-edge);
  border-radius: 12px; display: flex; flex-direction: column;
  padding: 8px; z-index: 20;
}
#chat.hidden { display: none; }
#chat-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--muted); margin-bottom: 4px;
}
#chat-head button { padding: 0 8px; font-size: 16px; line-height: 1.2;
  background: none; border: none; }
#btn-chat-open {
  position: fixed; right: 12px; bottom: 110px; z-index: 20;
  font-size: 18px; padding: 8px 12px;
  background: rgba(15, 47, 24, 0.55); backdrop-filter: blur(4px);
}
#chat-messages { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 14px; min-height: 120px; }
#chat-messages .msg b { color: var(--accent); }

/* Финал */
.overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
#go-title { color: var(--gold); }
#go-details { display: flex; flex-direction: column; gap: 4px; }

/* Тост */
#toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%);
  background: #b71c1c; color: #fff; padding: 10px 18px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 100;
  max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; }

/* Зона перевода и перетаскивание */
#translate-zone {
  width: 74px; height: 94px; flex: none;
  border: 2px dashed var(--muted); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; text-align: center; line-height: 1.2;
}
#translate-zone.hover { border-color: var(--gold); color: var(--gold); }
.drop-target.hover { outline: 3px dashed var(--gold); outline-offset: 3px; border-radius: 12px; }
.card.playable { touch-action: none; cursor: grab; }
.drag-ghost {
  position: fixed; z-index: 300; pointer-events: none;
  opacity: 0.92; transform: rotate(5deg) scale(1.05);
}

/* Аватары и карточка игрока */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: #0d2818; border: 2px solid var(--panel-edge);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 76px; height: 76px; font-size: 42px; }
.opponent { cursor: pointer; }
.opponent .avatar { margin-bottom: 4px; }
#avatar-grid { display: flex; flex-wrap: wrap; gap: 8px; }
#avatar-grid button { padding: 3px; border-radius: 50%; }
#avatar-grid .avatar-choice {
  width: 48px; height: 48px; border-radius: 50%; display: block;
  border: 2px solid transparent;
}
#avatar-grid button.warning .avatar-choice { border-color: var(--gold); }
/* Кнопка «своя картинка»: пунктирная плитка на всю ширину под сеткой */
#avatar-grid .avatar-upload {
  flex: 1 1 100%;
  border-style: dashed;
  border-color: var(--panel-edge);
  border-radius: 12px;
  padding: 10px 14px;
  gap: 8px;
  background: none;
  color: var(--muted);
  font-size: 14px;
}
#avatar-grid .avatar-upload:hover {
  color: var(--text);
  border-color: var(--accent);
  filter: none;
}
#avatar-grid .avatar-upload .icon { width: 16px; height: 16px; }
#shop-products { display: flex; flex-direction: column; gap: 8px; }

/* Селекты косметики: превью слева от названия */
.combobox { position: relative; }
.combobox-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: var(--surface); border: 1px solid var(--panel-edge);
  border-radius: 10px; padding: 6px 10px; text-align: left;
}
.combobox-toggle:hover { filter: brightness(1.12); }
.combobox-label { flex: 1; font-size: 14px; }
.combobox-arrow { color: var(--muted); }
.combobox-menu {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 45;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--panel-edge);
  border-radius: 10px; box-shadow: var(--shadow);
  padding: 4px; max-height: 250px; overflow-y: auto;
}
.select-option {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid transparent; padding: 6px 8px;
  border-radius: 8px; text-align: left; width: 100%;
}
.select-option:hover { background: rgba(102, 187, 106, 0.15); }
.select-option.selected { border-color: var(--gold); }
.select-option .option-name { flex: 1; font-size: 14px; }
.select-option .option-price { color: var(--gold); font-size: 12px; flex: none; }
.cosmetic-preview { display: inline-flex; flex: none; }
.select-option .mini-card, .select-option .mini-felt { width: 26px; height: 38px; }

.mini-card {
  width: 34px; height: 48px; border-radius: 5px;
  background: linear-gradient(160deg, #ffffff, #e8e8e8);
  border: 1px solid #8a8a8a; color: #1b1b1b;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; line-height: 1; font-size: 13px;
}
.mini-card .mini-suit { font-size: 11px; margin-top: 1px; }
.mini-felt { width: 34px; height: 48px; border-radius: 6px; }
.combobox-toggle .mini-card, .combobox-toggle .mini-felt { width: 30px; height: 42px; }

/* предпросмотры рубашек */
.card_back-preview-classic .mini-card {
  background: repeating-linear-gradient(45deg, #2e7d32 0 4px, #1b5e20 4px 8px);
  border-color: #0d3d14;
}
.card_back-preview-crimson .mini-card {
  background: repeating-linear-gradient(45deg, #7f1d1d 0 4px, #450a0a 4px 8px);
  border-color: #2c0505;
}
.card_back-preview-midnight .mini-card {
  background: linear-gradient(135deg, #1e2a5a, #0d1230);
  border-color: #0a0f24;
}
.card_back-preview-emerald .mini-card {
  background: repeating-linear-gradient(-45deg, #065f46 0 5px, #022c22 5px 10px);
  border-color: #012a20;
}
.card_back-preview-royal .mini-card {
  background: linear-gradient(135deg, #6d28d9, #4c1d95);
  border-color: #3b0764;
}

/* предпросмотры стилей карт */
.card_style-preview-vintage .mini-card {
  background: linear-gradient(160deg, #f7ecd2, #e6d3a8);
  border-color: #8d6e63; color: #4e342e;
}
.card_style-preview-neon .mini-card {
  background: linear-gradient(160deg, #14181f, #0b0e13);
  border-color: #37474f; color: #64ffda;
}
.card_style-preview-minimal .mini-card { background: #ffffff; border-color: #cfd8dc; }
.card_style-preview-imperial .mini-card {
  background: linear-gradient(160deg, #fff8e1, #ffe9b8);
  border-color: #c9a227; color: #5d4037;
}

/* предпросмотры сукна */
.felt-preview-classic .mini-felt { background: radial-gradient(circle at 50% 35%, #2f8244, #14532d 78%); }
.felt-preview-crimson .mini-felt { background: radial-gradient(circle at 50% 35%, #8e2020, #4a0f0f 78%); }
.felt-preview-ocean .mini-felt { background: radial-gradient(circle at 50% 35%, #1e5f8e, #0c2f4a 78%); }
.felt-preview-graphite .mini-felt { background: radial-gradient(circle at 50% 35%, #3c4a52, #1c262b 78%); }
.felt-preview-royal .mini-felt { background: radial-gradient(circle at 50% 35%, #5e35b1, #311b92 78%); }


/* Козырные карты: радужная подсветка */
.card.trump {
  background: linear-gradient(135deg, #ffffff 0%, #fff6d9 45%, #ffe4f1 80%, #e2f0ff 100%);
}
.card.trump::before {
  content: "";
  position: absolute; inset: 0; border-radius: 6px; padding: 2px;
  background: linear-gradient(135deg, #ff4040, #ff9e2c, #ffe93d, #57e389,
                              #35b9ff, #b06bff, #ff5bd8, #ff4040);
  background-size: 400% 400%;
  animation: trumpShimmer 4s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  pointer-events: none;
}
@keyframes trumpShimmer {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

/* Пустая колода: козырная масть, тиснение по сукну */
#deck-empty {
  width: 56px; height: 78px; border-radius: 8px;
  background: radial-gradient(circle at 35% 30%, #2f8244, #14532d 78%);
  border: 1px solid #0d3d14;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; color: rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 -1px 1px rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.4);
}

/* Косметика: рубашки карт (выбор игрока) */
body.cb-crimson .card.back {
  background: repeating-linear-gradient(45deg, #7f1d1d 0 6px, #450a0a 6px 12px);
  border-color: #2c0505;
}
body.cb-midnight .card.back {
  background: linear-gradient(135deg, #1e2a5a 0%, #0d1230 100%);
  border-color: #0a0f24;
}
body.cb-emerald .card.back {
  background: repeating-linear-gradient(-45deg, #065f46 0 8px, #022c22 8px 16px);
  border-color: #012a20;
}
body.cb-royal .card.back {
  background: linear-gradient(135deg, #6d28d9 0%, #4c1d95 100%);
  border-color: #3b0764;
}

/* Косметика: стили карт (выбор игрока) */
body.cs-vintage .card {
  background: linear-gradient(160deg, #f7ecd2, #e6d3a8);
  border-color: #8d6e63; color: #4e342e;
}
body.cs-neon .card {
  background: linear-gradient(160deg, #14181f, #0b0e13);
  border-color: #37474f; color: #64ffda;
  box-shadow: 0 0 10px rgba(100, 255, 218, 0.25);
}
body.cs-minimal .card { background: #ffffff; border-color: #cfd8dc; box-shadow: none; }
body.cs-imperial .card {
  background: linear-gradient(160deg, #fff8e1, #ffe9b8);
  border-color: #c9a227; color: #5d4037;
}

/* Косметика: сукно игрового стола (общая для комнаты, на весь экран) */
body.felt-crimson #screen-game, body.felt-ocean #screen-game,
body.felt-graphite #screen-game, body.felt-royal #screen-game {
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.55);
}
body.felt-crimson #screen-game { background: radial-gradient(circle at 50% 30%, #8e2020, #4a0f0f 80%); }
body.felt-ocean #screen-game { background: radial-gradient(circle at 50% 30%, #1e5f8e, #0c2f4a 80%); }
body.felt-graphite #screen-game { background: radial-gradient(circle at 50% 30%, #3c4a52, #1c262b 80%); }
body.felt-royal #screen-game { background: radial-gradient(circle at 50% 30%, #5e35b1, #311b92 80%); }
