:root {
  --bg: #07110d;
  --panel: #101c17;
  --panel-raised: #16251e;
  --text: #f7f1e2;
  --muted: #91a39a;
  --accent: #d8a957;
  --accent-light: #f0cc7e;
  --danger: #df756c;
  --line: rgba(224, 183, 102, .16);
  --safe-top: 92px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  overscroll-behavior: none;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 8% 0%, rgba(211, 166, 83, .13), transparent 30%),
    radial-gradient(circle at 100% 50%, rgba(20, 112, 78, .11), transparent 42%),
    var(--bg);
}

button { color: inherit; font: inherit; -webkit-tap-highlight-color: transparent; }
button:active { transform: scale(.98); }

.app {
  width: min(100%, 560px);
  max-width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
}

.screen {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100dvh;
  padding:
    max(var(--safe-top), env(safe-area-inset-top))
    16px
    max(18px, env(safe-area-inset-bottom));
}

.screen[hidden], .sheet[hidden], .modal[hidden], .profile-modal[hidden] { display: none; }

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .18em;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
  font-size: 28px;
  line-height: 1;
}

.home-screen { display: flex; flex-direction: column; gap: 14px; }
.home-header { display: flex; align-items: center; gap: 11px; }
.home-header > div:nth-child(2) { flex: 1; min-width: 0; }
.home-header h1, .section-header h1 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.brand-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #e2bb6e;
  border-radius: 16px;
  background: linear-gradient(145deg, #f1cc7e, #a66d25);
  color: #172019;
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.035);
}
.avatar {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(145deg, #245c48, #113427);
  color: #efd69f;
  font-weight: 850;
}
.profile-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.profile-copy span, .profile-copy small { color: var(--muted); font-size: 11px; }
.profile-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.balance-pill {
  min-width: 86px;
  padding: 7px 11px;
  border: 1px solid rgba(221,177,91,.25);
  border-radius: 13px;
  background: rgba(218,169,87,.08);
}
.balance-pill small { display: block; color: var(--muted); font-size: 8px; letter-spacing: .08em; }
.balance-pill strong { color: var(--accent-light); font-variant-numeric: tabular-nums; }
.balance-pill strong i {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 3px;
  border-radius: 50%;
  background: var(--accent);
  color: #182019;
  font-style: normal;
  font-size: 13px;
}

.hero-card {
  position: relative;
  min-height: 286px;
  overflow: hidden;
  padding: 25px 22px 20px;
  border: 1px solid rgba(232,194,118,.28);
  border-radius: 25px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.05), transparent 42%),
    radial-gradient(circle at 88% 20%, rgba(37,145,101,.48), transparent 34%),
    linear-gradient(145deg, #164834, #09271d);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.hero-card::after {
  position: absolute;
  right: -45px;
  bottom: -70px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(239,204,129,.18);
  border-radius: 50%;
  content: "";
}
.hero-card p { margin: 0 0 6px; color: var(--accent-light); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.hero-card h2 { margin: 0; font-size: 28px; letter-spacing: -.035em; }
.hero-card > span { display: block; margin: 5px 0 15px; color: #a9bbb2; font-size: 12px; }
.online-hero {
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.055), transparent 42%),
    radial-gradient(circle at 85% 21%, rgba(41,183,125,.43), transparent 36%),
    linear-gradient(145deg, #174c37, #08261c);
}
.online-benefits {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
}
.online-benefits i {
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  background: rgba(2,16,11,.31);
  color: #afc9bc;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}
.online-benefits b {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 3px;
  border-radius: 50%;
  background: #5cdb96;
  box-shadow: 0 0 0 3px rgba(92,219,150,.11);
}
.difficulty-picker {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid rgba(240,204,126,.14);
  border-radius: 14px;
  background: rgba(2,14,10,.35);
}
.difficulty-picker button {
  min-width: 0;
  min-height: 36px;
  padding: 0 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #91a79c;
  font-size: 9px;
  font-weight: 800;
}
.difficulty-picker button.selected {
  border-color: rgba(240,204,126,.5);
  background: linear-gradient(145deg, rgba(240,204,126,.25), rgba(183,125,47,.14));
  color: #f4d790;
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}
.hero-card .primary { position: relative; z-index: 1; width: min(230px, 76%); }

.tournament-home-card {
  position:relative;
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto 14px;
  align-items:center;
  gap:11px;
  width:100%;
  min-height:86px;
  padding:12px 13px;
  overflow:hidden;
  border:1px solid rgba(231,192,105,.28);
  border-radius:20px;
  background:
    radial-gradient(circle at 86% 10%,rgba(97,75,159,.3),transparent 34%),
    linear-gradient(145deg,rgba(93,45,110,.34),rgba(17,23,34,.96));
  text-align:left;
  box-shadow:inset 0 1px rgba(255,255,255,.04);
}
.tournament-home-card::after {
  position:absolute;
  right:58px;
  bottom:-34px;
  width:92px;
  height:92px;
  border:1px solid rgba(231,192,105,.1);
  border-radius:50%;
  content:"";
}
.tournament-home-icon {
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border:1px solid rgba(239,205,129,.36);
  border-radius:15px;
  background:linear-gradient(145deg,rgba(232,196,111,.24),rgba(82,47,107,.28));
  color:#f1d17e;
  font:900 25px Georgia,serif;
  box-shadow:0 8px 20px rgba(0,0,0,.22);
}
.tournament-home-copy { display:block;min-width:0; }
.tournament-home-copy small,
.tournament-home-copy b,
.tournament-home-copy i { display:block; }
.tournament-home-copy small { color:#c3a8df;font-size:8px;font-weight:900;letter-spacing:.12em; }
.tournament-home-copy b { margin-top:2px;font-size:17px; }
.tournament-home-copy i { margin-top:2px;color:#98a6a0;font-size:9.5px;font-style:normal; }
.tournament-home-live {
  position:relative;
  z-index:1;
  padding:6px 8px;
  border:1px solid rgba(117,220,166,.16);
  border-radius:99px;
  background:rgba(42,137,94,.11);
  color:#a8c8b9;
  font-size:8.5px;
  font-weight:800;
  white-space:nowrap;
}
.tournament-home-live i {
  display:inline-block;
  width:6px;
  height:6px;
  margin-right:3px;
  border-radius:50%;
  background:#61d99b;
  box-shadow:0 0 8px rgba(97,217,155,.55);
}
.tournament-home-card > em { color:#d9bc73;font-size:21px;font-style:normal; }

.wide { width: min(210px, 65%); min-height: 48px; }
.primary, .secondary, .danger {
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  padding: 0 16px;
  font-weight: 800;
}
.primary {
  border: 1px solid rgba(255,231,180,.48);
  background: linear-gradient(145deg, var(--accent-light), #b77d2f);
  color: #24170b;
  box-shadow: inset 0 1px rgba(255,255,255,.25);
}
.secondary { background: var(--panel-raised); }
.danger { background: rgba(223,117,108,.11); color: var(--danger); }

.wager-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background:
    linear-gradient(145deg, rgba(218,169,87,.07), rgba(255,255,255,.02)),
    var(--panel);
}
.wager-copy { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-width: 0; margin-bottom: 10px; }
.wager-copy > * { min-width: 0; }
.wager-copy p { margin: 0 0 2px; color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.wager-copy b { font-size: 14px; }
.wager-copy small { color: var(--muted); font-size: 9px; }
.wager-options { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; min-width: 0; }
.wager-options button {
  min-width: 0;
  min-height: 38px;
  padding: 0 5px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 11px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}
.wager-options button.selected {
  border-color: rgba(240,204,126,.55);
  background: linear-gradient(145deg, rgba(240,204,126,.24), rgba(183,125,47,.13));
  color: var(--accent-light);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.custom-wager-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin-top: 8px;
}
.custom-wager-panel[hidden] { display: none; }
.custom-wager-panel label {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(240,204,126,.34);
  border-radius: 12px;
  background: rgba(2,14,10,.34);
  color: var(--accent-light);
}
.custom-wager-panel input {
  width: 100%;
  min-width: 0;
  margin-left: 7px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 750;
}
.custom-wager-panel input::placeholder { color: #718078; }
.custom-wager-panel > button {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(240,204,126,.42);
  border-radius: 12px;
  background: rgba(216,169,87,.15);
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 800;
}
.custom-wager-panel p {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0 2px;
  color: #ef8f86;
  font-size: 10px;
}

.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; min-width: 0; }
.mode-card {
  min-width: 0;
  width: 100%;
  min-height: 117px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  text-align: left;
}
.mode-card span { display: block; margin-bottom: 11px; color: var(--accent-light); font-size: 23px; }
.mode-card b, .mode-card small { display: block; }
.mode-card b { overflow-wrap: anywhere; }
.mode-card small { margin-top: 3px; color: var(--muted); font-size: 11px; }

.leaderboard-button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 58px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.028);
  text-align: left;
}
.leaderboard-button > span:first-child { font-size: 22px; text-align: center; }
.leaderboard-button > span:nth-child(2) { min-width: 0; }
.leaderboard-button b, .leaderboard-button small { display: block; }
.leaderboard-button b { font-size: 13px; }
.leaderboard-button small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.leaderboard-button i { color: var(--accent); font-size: 25px; font-style: normal; }

.game-screen {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.game-header { display: flex; align-items: center; min-height: 43px; }
.game-title { flex: 1; min-width: 0; padding: 0 10px; text-align: center; }
.game-title p { margin: 0; color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.game-title h1 { margin: 1px 0 0; overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.players {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
}
.player { display: flex; align-items: center; gap: 7px; min-width: 0; width: 35%; opacity: .68; }
.player.active { opacity: 1; }
.player div { display: flex; flex-direction: column; min-width: 0; }
.player b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.player small { color: var(--muted); font-size: 9px; }
.black-player { justify-content: flex-end; text-align: right; }
.checker {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border: 2px solid #c9a054;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
}
.checker.white { background: #f4e8cc; }
.checker.black { background: #161c1a; }
.match-stake { flex: 0 0 62px; text-align: center; }
.match-stake small, .match-stake b { display: block; }
.match-stake small { color: var(--muted); font-size: 7px; letter-spacing: .12em; }
.match-stake b { margin-top: 2px; color: var(--accent-light); font-size: 12px; font-variant-numeric: tabular-nums; }

.board-stage { position: relative; display: flex; flex: 1; min-height: 0; justify-content: center; }
.game-connection-overlay {
  position: absolute;
  z-index: 9;
  inset: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px solid rgba(224,184,105,.22);
  border-radius: 16px;
  background: rgba(2,12,9,.82);
  box-shadow: inset 0 0 70px rgba(15,75,53,.22);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  text-align: center;
  pointer-events: auto;
  touch-action: none;
}
.game-connection-overlay[hidden] { display: none; }
.game-connection-overlay b { color: #f6ead0; font-size: 18px; }
.game-connection-overlay small { max-width: 250px; color: #9eb2a8; font-size: 11px; line-height: 1.45; }
.connection-spinner {
  width: 30px;
  height: 30px;
  margin-bottom: 3px;
  border: 3px solid rgba(224,184,105,.2);
  border-top-color: var(--accent-light);
  border-radius: 50%;
  animation: connection-spin .8s linear infinite;
}
.connection-spinner[hidden] { display: none; }
.connection-retry {
  min-width: 150px;
  min-height: 42px;
  margin-top: 5px;
  border: 1px solid rgba(224,184,105,.48);
  border-radius: 13px;
  background: linear-gradient(135deg, #f3d184, #c78f36);
  color: #111713;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}
.connection-retry[hidden] { display: none; }
@keyframes connection-spin { to { transform: rotate(360deg); } }
.board-shell {
  height: 100%;
  max-width: 100%;
  aspect-ratio: 7 / 10;
  overflow: hidden;
  border: 1px solid rgba(224,184,105,.3);
  border-radius: 18px;
  box-shadow: 0 14px 38px rgba(0,0,0,.42);
  touch-action: none;
}
#board {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#board.dragging { cursor: grabbing; }
.online-lobby {
  position: absolute;
  z-index: 8;
  inset: 7px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 15px 14px;
  overflow: hidden;
  border: 1px solid rgba(240,204,126,.28);
  border-radius: 17px;
  background:
    radial-gradient(circle at 90% 0%, rgba(38,150,102,.23), transparent 36%),
    linear-gradient(165deg, rgba(14,35,27,.98), rgba(6,18,13,.985));
  box-shadow: 0 18px 48px rgba(0,0,0,.43);
  backdrop-filter: blur(8px);
}
.online-lobby[hidden] { display: none; }
.online-lobby-head { display: flex; align-items: center; gap: 11px; }
.online-lobby-head p { margin: 0 0 3px; color: var(--accent); font-size: 8px; font-weight: 850; letter-spacing: .16em; }
.online-lobby-head h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.search-pulse {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  border: 1px solid rgba(91,218,150,.29);
  border-radius: 50%;
  background: rgba(40,151,103,.13);
}
.search-pulse::before,
.search-pulse::after {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(91,218,150,.38);
  border-radius: 50%;
  animation: searchWave 1.8s ease-out infinite;
  content: "";
}
.search-pulse::after { animation-delay: .9s; }
.search-pulse i { width: 9px; height: 9px; border-radius: 50%; background: #5fdfa0; box-shadow: 0 0 12px #3dbf81; }
@keyframes searchWave {
  0% { opacity: .9; transform: scale(.55); }
  100% { opacity: 0; transform: scale(1.65); }
}
.online-lobby-copy { margin: 10px 1px 11px; color: #a8bbb1; font-size: 10px; line-height: 1.4; }
.online-lobby-list {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 7px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.lobby-player {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.lobby-avatar {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(240,204,126,.35);
  border-radius: 50%;
  background: linear-gradient(145deg, #27614b, #102f24);
  color: #f2d692;
  font-size: 13px;
  font-weight: 850;
}
.lobby-player-copy { min-width: 0; }
.lobby-player-copy b,
.lobby-player-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-player-copy b { font-size: 11px; }
.lobby-player-copy small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.lobby-join {
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid rgba(240,204,126,.37);
  border-radius: 10px;
  background: rgba(216,169,87,.12);
  color: var(--accent-light);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}
.lobby-empty { margin: auto; padding: 25px 8px; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.lobby-rule {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 8px 9px;
  border-radius: 11px;
  background: rgba(216,169,87,.065);
}
.lobby-rule span { display: grid; place-items: center; flex: 0 0 18px; width: 18px; height: 18px; border: 1px solid rgba(240,204,126,.35); border-radius: 50%; color: var(--accent-light); font: 750 10px Georgia,serif; }
.lobby-rule p { margin: 0; color: #8fa198; font-size: 8px; line-height: 1.35; }
.lobby-refresh {
  min-height: 36px;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 11px;
  background: rgba(255,255,255,.035);
  color: #b7c8bf;
  font-size: 9px;
  font-weight: 800;
}
.hint {
  min-height: 18px;
  margin: 0;
  color: #b7c7be;
  font-size: 10.5px;
  font-weight: 650;
  text-align: center;
}
.actions { display: flex; gap: 8px; }
.actions .primary { flex: 1.5; }
.actions .secondary { flex: 1; }
.actions .danger { flex: 0 0 48px; padding: 0; font-size: 24px; }
.actions button:disabled { opacity: .35; }

.section-header { display: flex; align-items: center; gap: 12px; }

.tournaments-screen,
.tournament-detail-screen {
  display:flex;
  height:100dvh;
  flex-direction:column;
  gap:12px;
  overflow:hidden;
  overscroll-behavior:contain;
}
.tournaments-header,
.tournament-detail-header {
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  flex:0 0 auto;
}
.tournaments-header > div,
.tournament-detail-header > div { min-width:0; }
.tournaments-header h1,
.tournament-detail-header h1 {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tournaments-refresh-button {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  padding:0;
  border:1px solid rgba(240,204,126,.2);
  border-radius:14px;
  background:rgba(216,169,87,.08);
  color:#e5c675;
  font-size:21px;
}
.tournaments-hero {
  position:relative;
  display:grid;
  grid-template-columns:60px minmax(0,1fr);
  flex:0 0 auto;
  align-items:center;
  gap:13px;
  overflow:hidden;
  padding:15px;
  border:1px solid rgba(230,192,107,.27);
  border-radius:21px;
  background:
    radial-gradient(circle at 88% 8%,rgba(113,72,163,.37),transparent 35%),
    linear-gradient(145deg,#2c213f,#101824);
}
.tournaments-hero > span {
  display:grid;
  place-items:center;
  width:56px;
  height:56px;
  border:1px solid rgba(239,205,129,.37);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(230,193,105,.24),rgba(99,51,125,.28));
  color:#f2d17b;
  font:900 31px Georgia,serif;
}
.tournaments-hero > div { min-width:0; }
.tournaments-hero small { color:#b79bd5;font-size:8px;font-weight:900;letter-spacing:.12em; }
.tournaments-hero h2 { margin:2px 0 3px;font-size:19px; }
.tournaments-hero p { margin:0;color:#9cabaa;font-size:10px;line-height:1.35; }
.tournaments-hero > b {
  grid-column:1 / -1;
  justify-self:start;
  padding:5px 8px;
  border:1px solid rgba(89,211,147,.2);
  border-radius:99px;
  background:rgba(45,150,102,.12);
  color:#99d5b7;
  font-size:8.5px;
}
.tournament-fee-filters {
  display:flex;
  flex:0 0 auto;
  gap:7px;
  margin:0 -16px;
  padding:0 16px 2px;
  overflow-x:auto;
  scrollbar-width:none;
}
.tournament-fee-filters::-webkit-scrollbar { display:none; }
.tournament-fee-filters button {
  min-height:34px;
  flex:0 0 auto;
  padding:0 11px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:11px;
  background:rgba(255,255,255,.03);
  color:#8fa198;
  font-size:9.5px;
  font-weight:800;
}
.tournament-fee-filters button.selected {
  border-color:rgba(231,192,105,.4);
  background:rgba(216,169,87,.13);
  color:#f0cf80;
}
.tournaments-list-heading {
  display:flex;
  flex:0 0 auto;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}
.tournaments-list-heading h2 { margin:0;font-size:17px; }
.tournaments-list-heading p { margin:3px 0 0;color:#81948a;font-size:9.5px; }
.tournaments-list-heading > span {
  display:grid;
  place-items:center;
  min-width:34px;
  height:29px;
  padding:0 9px;
  border-radius:10px;
  background:rgba(255,255,255,.05);
  color:#a8b9b0;
  font-size:10px;
  font-weight:850;
}
.tournaments-list {
  display:grid;
  flex:1 1 auto;
  align-content:start;
  gap:10px;
  min-height:0;
  padding:1px 1px max(12px,env(safe-area-inset-bottom));
  overflow-y:auto;
}
.tournament-card {
  position:relative;
  display:flex;
  min-width:0;
  flex-direction:column;
  padding:13px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.07);
  border-radius:19px;
  background:
    radial-gradient(circle at 95% 0,rgba(72,143,111,.13),transparent 35%),
    rgba(255,255,255,.027);
  text-align:left;
}
.tournament-card.state-registration { border-color:rgba(89,211,147,.19); }
.tournament-card.state-running {
  border-color:rgba(230,192,107,.26);
  background:radial-gradient(circle at 94% 0,rgba(216,169,87,.17),transparent 37%),rgba(255,255,255,.027);
}
.tournament-card.state-completed { opacity:.78; }
.tournament-card-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.tournament-card-top i {
  padding:4px 7px;
  border:1px solid rgba(100,211,157,.17);
  border-radius:99px;
  background:rgba(47,149,103,.11);
  color:#91d2b1;
  font-size:8px;
  font-style:normal;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.tournament-card-top em { color:#bdc9c3;font-size:10px;font-style:normal;font-variant-numeric:tabular-nums; }
.tournament-card-title { display:block;margin-top:9px;font-size:16px; }
.tournament-card-status { display:block;margin-top:3px;color:#8fa198;font-size:9.5px; }
.tournament-card-details {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin-top:10px;
}
.tournament-card-details > span {
  min-width:0;
  padding:7px 6px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:10px;
  background:rgba(0,0,0,.11);
}
.tournament-card-details small,
.tournament-card-details b { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.tournament-card-details small { color:#72867b;font-size:7.5px;font-weight:900;letter-spacing:.06em; }
.tournament-card-details b { margin-top:3px;color:#dfe8e3;font-size:10px; }
.tournament-card-progress {
  height:5px;
  margin-top:10px;
  overflow:hidden;
  border-radius:99px;
  background:rgba(255,255,255,.07);
}
.tournament-card-progress i { display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#38a676,#e0b95e); }
.tournament-card-arrow { align-self:flex-end;margin-top:7px;color:#ddc178;font-size:9px;font-weight:850; }
.tournament-loading,
.tournament-empty {
  margin:0;
  padding:34px 12px;
  color:#899c92;
  font-size:11px;
  text-align:center;
}
.tournament-unavailable {
  display:grid;
  grid-template-columns:46px minmax(0,1fr);
  align-items:center;
  gap:12px;
  padding:17px;
  border:1px dashed rgba(230,192,107,.22);
  border-radius:19px;
  background:rgba(255,255,255,.022);
}
.tournament-unavailable > span {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:14px;
  background:rgba(216,169,87,.1);
  color:#e1c276;
  font:900 22px Georgia,serif;
}
.tournament-unavailable b { display:block;font-size:13px; }
.tournament-unavailable p { margin:4px 0 0;color:#84968d;font-size:9.5px;line-height:1.4; }

.tournament-state-badge {
  align-self:center;
  padding:6px 9px;
  border:1px solid rgba(99,211,157,.2);
  border-radius:99px;
  background:rgba(46,151,102,.11);
  color:#96d4b4;
  font-size:8px;
  font-weight:900;
  text-transform:uppercase;
}
.tournament-state-badge[data-state="running"] { border-color:rgba(230,192,107,.25);background:rgba(216,169,87,.11);color:#e0c477; }
.tournament-state-badge[data-state="completed"],
.tournament-state-badge[data-state="cancelled"] { border-color:rgba(255,255,255,.1);background:rgba(255,255,255,.04);color:#8a9a92; }
.tournament-detail-hero {
  display:grid;
  grid-template-columns:58px minmax(0,1fr);
  flex:0 0 auto;
  align-items:center;
  gap:12px;
  padding:14px;
  border:1px solid rgba(230,192,107,.25);
  border-radius:21px;
  background:
    radial-gradient(circle at 90% 8%,rgba(103,69,157,.32),transparent 38%),
    linear-gradient(145deg,#282039,#111924);
}
.tournament-cup-mark {
  display:grid;
  place-items:center;
  width:55px;
  height:55px;
  border:1px solid rgba(239,205,129,.4);
  border-radius:17px;
  background:linear-gradient(145deg,rgba(232,196,111,.24),rgba(91,47,117,.27));
  color:#f2d17b;
  font:900 29px Georgia,serif;
}
.tournament-detail-hero-copy { min-width:0; }
.tournament-detail-hero-copy small { color:#b89ed3;font-size:7.5px;font-weight:900;letter-spacing:.12em; }
.tournament-detail-hero-copy b { display:block;margin:2px 0;color:#f3d584;font-size:21px;font-variant-numeric:tabular-nums; }
.tournament-detail-hero-copy span { display:block;color:#9baca3;font-size:9.5px;line-height:1.35; }
.tournament-detail-meta {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-column:1 / -1;
  gap:6px;
}
.tournament-detail-meta > span {
  min-width:0;
  padding:7px 6px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:10px;
  background:rgba(0,0,0,.12);
  text-align:center;
}
.tournament-detail-meta small,
.tournament-detail-meta b { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.tournament-detail-meta small { color:#71847a;font-size:7px;font-weight:900;letter-spacing:.06em; }
.tournament-detail-meta b { margin-top:3px;color:#e4ebe7;font-size:10px; }
.tournament-bracket-section {
  display:flex;
  flex:1 1 auto;
  min-height:0;
  flex-direction:column;
  padding:12px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:19px;
  background:rgba(255,255,255,.02);
}
.tournament-bracket-heading {
  display:flex;
  flex:0 0 auto;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  margin-bottom:9px;
}
.tournament-bracket-heading h2 { margin:0;font-size:15px; }
.tournament-bracket-heading > span {
  padding:5px 7px;
  border-radius:9px;
  background:rgba(255,255,255,.05);
  color:#93a59c;
  font-size:8px;
  font-weight:850;
  white-space:nowrap;
}
.tournament-bracket {
  display:grid;
  grid-template-columns:repeat(3,166px);
  flex:1 1 auto;
  gap:10px;
  min-height:0;
  padding:1px 1px 7px;
  overflow:auto;
  scroll-snap-type:x proximity;
}
.tournament-round {
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:7px;
  scroll-snap-align:start;
}
.tournament-round-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  padding:0 2px;
}
.tournament-round-heading b { font-size:10px; }
.tournament-round-heading small { color:#71847a;font-size:7.5px; }
.tournament-match {
  padding:7px;
  border:1px solid rgba(255,255,255,.06);
  border-radius:12px;
  background:rgba(0,0,0,.13);
}
.tournament-match.is-mine {
  border-color:rgba(230,192,107,.36);
  background:linear-gradient(145deg,rgba(216,169,87,.12),rgba(44,72,59,.13));
}
.tournament-match-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:5px;
  min-height:20px;
  margin-bottom:4px;
}
.tournament-match-top span { color:#73877c;font-size:6.8px;font-weight:900;letter-spacing:.05em; }
.tournament-match-top button {
  min-height:23px;
  padding:0 7px;
  border:1px solid rgba(240,204,126,.38);
  border-radius:7px;
  background:rgba(216,169,87,.14);
  color:#f0cf80;
  font-size:7.5px;
  font-weight:900;
}
.tournament-match-player {
  display:grid;
  grid-template-columns:25px minmax(0,1fr) auto;
  align-items:center;
  gap:5px;
  min-height:31px;
  padding:3px 4px;
  border-radius:8px;
}
.tournament-match-player + .tournament-match-player { border-top:1px solid rgba(255,255,255,.045); }
.tournament-match-player.winner { background:rgba(216,169,87,.09); }
.tournament-match-player.is-me { outline:1px solid rgba(87,204,145,.2); }
.tournament-match-player > span {
  display:grid;
  place-items:center;
  width:23px;
  height:23px;
  border-radius:50%;
  background:rgba(255,255,255,.055);
  color:#c5d1cb;
  font-size:7px;
}
.tournament-match-player b { overflow:hidden;font-size:8.5px;text-overflow:ellipsis;white-space:nowrap; }
.tournament-match-player small { color:#b99c5d;font-size:6.8px; }
.tournament-round.round-2 { justify-content:space-around; }
.tournament-round.round-3 { justify-content:center; }
.tournament-rewards-card {
  display:grid;
  grid-template-columns:39px minmax(0,1fr);
  flex:0 0 auto;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(230,192,107,.16);
  border-radius:15px;
  background:rgba(216,169,87,.055);
}
.tournament-rewards-card > span {
  display:grid;
  place-items:center;
  width:37px;
  height:37px;
  border-radius:12px;
  background:rgba(216,169,87,.11);
  color:#ebcb7c;
  font-size:19px;
}
.tournament-rewards-card small,
.tournament-rewards-card b { display:block; }
.tournament-rewards-card small { color:#b99551;font-size:7px;font-weight:900;letter-spacing:.1em; }
.tournament-rewards-card b { margin-top:1px;font-size:11px; }
.tournament-rewards-card p { margin:2px 0 0;color:#83968c;font-size:8.5px;line-height:1.3; }
.tournament-detail-actions {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  flex:0 0 auto;
  gap:6px;
}
.tournament-detail-actions:has(> .secondary:not([hidden])) { grid-template-columns:minmax(0,1fr) minmax(0,.75fr); }
.tournament-detail-actions > button { width:100%;min-height:46px; }
.tournament-detail-actions > button:disabled { opacity:.48; }
.tournament-detail-actions > small {
  grid-column:1 / -1;
  color:#82958b;
  font-size:8.5px;
  line-height:1.3;
  text-align:center;
}

.rating-screen {
  display: flex;
  height: 100dvh;
  flex-direction: column;
  gap: 13px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rating-header { flex: 0 0 auto; }
.rating-header > div { min-width: 0; }
.rating-season-dates {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #82968c;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rating-hero {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid rgba(224,184,105,.24);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(218,169,87,.12), rgba(255,255,255,.025));
}
.rating-hero > span { font-size: 32px; }
.rating-hero div { display: flex; min-width: 0; flex-direction: column; }
.rating-hero b { font-size: 14px; }
.rating-hero small { margin-top: 3px; color: var(--muted); }
.leaderboard-me {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0,1fr);
  flex: 0 0 auto;
  gap: 11px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(87,204,145,.27);
  border-radius: 20px;
  background:
    radial-gradient(circle at 96% 5%, rgba(67,193,132,.18), transparent 38%),
    linear-gradient(145deg, rgba(24,91,65,.34), rgba(255,255,255,.025));
  box-shadow: 0 13px 30px rgba(0,0,0,.16);
}
.leaderboard-me::after {
  position: absolute;
  top: -28px;
  right: -27px;
  width: 95px;
  height: 95px;
  border: 1px solid rgba(111,215,165,.1);
  border-radius: 50%;
  content: "";
}
.leaderboard-me-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #f2d58c;
  font-size: 13px;
  font-weight: 900;
}
.leaderboard-me-copy {
  align-self: center;
  min-width: 0;
}
.leaderboard-me-copy > small {
  display: block;
  color: #79c99f;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
}
.leaderboard-me-copy > b {
  display: block;
  margin: 2px 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard-me-copy > span { color: #9bafa4; font-size: 9px; }
.leaderboard-me-stats {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  grid-column: 1 / -1;
  gap: 6px;
  margin-top: 2px;
}
.leaderboard-me-stats > span {
  min-width: 0;
  padding: 8px 5px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 11px;
  background: rgba(0,0,0,.13);
  text-align: center;
}
.leaderboard-me-stats > span.primary {
  border-color: rgba(240,204,126,.28);
  background: rgba(216,169,87,.09);
}
.leaderboard-me-stats small,
.leaderboard-me-stats b { display: block; }
.leaderboard-me-stats small {
  overflow: hidden;
  color: #71867b;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leaderboard-me-stats b {
  margin-top: 3px;
  color: #dce9e2;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.leaderboard-me-stats .primary b { color: var(--accent-light); font-size: 16px; }
.leaderboard-heading {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 3px;
}
.leaderboard-heading b { font-size: 13px; }
.leaderboard-heading span { color: #73877c; font-size: 8px; }
.leaderboard {
  flex: 0 0 auto;
  overflow: hidden;
  margin-bottom: max(3px,env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-radius: 19px;
}
.rating-screen .leader-row {
  display: grid;
  grid-template-columns: 31px 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 71px;
  padding: 10px 11px;
  background: rgba(255,255,255,.025);
}
.leader-row + .leader-row { border-top: 1px solid var(--line); }
.rating-screen .leader-row.is-me {
  box-shadow: inset 3px 0 #62ce99;
}
.leader-rank { color: var(--accent-light); font-weight: 850; text-align: center; }
.leader-name { min-width: 0; }
.leader-name b, .leader-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-name small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.leader-score {
  min-width: 82px;
  color: var(--accent-light);
  text-align: right;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.leader-score > small,
.leader-score > strong,
.leader-score > span { display: block; }
.leader-score > small {
  color: #70847a;
  font-size: 8px;
  letter-spacing: .08em;
}
.leader-score > strong { margin-top: 1px; font-size: 17px; }
.leader-score > span {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1px;
  margin-top: 3px;
  color: #8da097;
  font-size: 8px;
}
.leader-score i { font-style: normal; white-space: nowrap; }
.empty-state { padding: 35px 20px; color: var(--muted); text-align: center; }

.sheet, .modal { position: fixed; z-index: 30; inset: 0; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(0,0,0,.67);
  backdrop-filter: blur(7px);
}
.sheet-card {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: 560px;
  margin: auto;
  padding: 12px 16px max(24px, env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-radius: 25px 25px 0 0;
  background: #101b17;
}
.sheet-handle { width: 38px; height: 4px; margin: 0 auto 18px; border-radius: 99px; background: #44544c; }
.sheet-card h2 { margin: 0 0 14px; }
.bot-sheet-card { padding: 12px 20px max(28px, env(safe-area-inset-bottom)); }
.bot-sheet-heading { display: flex; align-items: center; gap: 13px; }
.bot-sheet-heading h2 { margin-bottom: 0; }
.bot-sheet-dice {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid #c99c4b;
  border-radius: 15px;
  background: linear-gradient(145deg, #f8e8c3, #c9a766);
  color: #172019;
  font-size: 32px;
  box-shadow: 0 8px 18px rgba(0,0,0,.3);
  transform: rotate(-5deg);
}
.bot-description { min-height: 18px; margin: 14px 1px 11px; color: var(--muted); font-size: 11px; }
.bot-sheet-card .difficulty-picker { background: rgba(2,14,10,.5); }
.bot-wager-section {
  margin: 2px 0 15px;
  padding: 12px;
  border: 1px solid rgba(240,204,126,.14);
  border-radius: 16px;
  background: rgba(2,14,10,.42);
}
.bot-wager-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.bot-wager-heading span {
  color: var(--accent-light);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
}
.bot-wager-heading small {
  color: #809289;
  font-size: 8px;
  text-align: right;
}
.bot-wager-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 6px;
}
.bot-wager-picker button {
  display: flex;
  min-width: 0;
  min-height: 49px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 3px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 11px;
  background: rgba(255,255,255,.028);
  color: #9aaca3;
}
.bot-wager-picker b {
  max-width: 100%;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bot-wager-picker small { color: #71857b; font-size: 8px; }
.bot-wager-picker button.selected {
  border-color: rgba(240,204,126,.5);
  background: linear-gradient(145deg, rgba(240,204,126,.22), rgba(183,125,47,.12));
  color: #f4d790;
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 7px 18px rgba(0,0,0,.14);
}
.bot-wager-picker button.selected small { color: #d6bd82; }
.bot-sheet-card .wide { width: 100%; }
.theme-list { display: grid; gap: 9px; }
.theme-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  text-align: left;
}
.theme-option.selected { border-color: rgba(224,184,105,.45); background: rgba(218,169,87,.08); }
.theme-option span { display: flex; flex: 1; flex-direction: column; }
.theme-option small { margin-top: 3px; color: var(--muted); }
.theme-option em { display: none; color: var(--accent-light); font-style: normal; }
.theme-option.selected em { display: block; }
.theme-preview {
  flex: 0 0 58px;
  width: 58px;
  height: 45px;
  border: 2px solid #8f6434;
  border-radius: 9px;
  box-shadow: inset 0 0 12px rgba(0,0,0,.48);
}
.theme-preview.emerald { background:repeating-linear-gradient(90deg,#07503b 0 8px,#d3a85b 8px 11px); }
.theme-preview.oak { border-color:#8c542a;background:repeating-linear-gradient(90deg,#5d3219 0 8px,#e7c483 8px 11px,#3d1d0e 11px 16px); }
.theme-preview.jade { border-color:#bfae66;background:repeating-linear-gradient(90deg,#2f795a 0 8px,#e5d59a 8px 11px,#76b995 11px 16px); }
.theme-preview.constellation { border-color:#d2b866;background:repeating-linear-gradient(90deg,#07112d 0 8px,#e6c76d 8px 11px,#31549f 11px 16px); }
.theme-preview.grandmaster { border-color:#d7b966;background:repeating-linear-gradient(90deg,#4a151b 0 8px,#e4c475 8px 11px,#731f27 11px 16px); }
.theme-preview.marble { border-color:#827d70;background:repeating-linear-gradient(90deg,#f6f4ee 0 8px,#222727 8px 11px,#c5c5c0 11px 16px); }
.theme-preview.vineyard { border-color:#9b7040;background:repeating-linear-gradient(90deg,#4d8c4d 0 8px,#c59a5d 8px 11px,#713c73 11px 16px); }
.theme-preview.steampunk { border-color:#c99c54;background:repeating-linear-gradient(90deg,#5f351d 0 8px,#d7ad65 8px 11px,#54301d 11px 16px); }
.theme-preview.royal { border-color:#e0bd5e;background:repeating-linear-gradient(90deg,#122967 0 8px,#e0bd5e 8px 11px,#101c52 11px 16px); }
.theme-preview.ocean { border-color:#1f7381;background:repeating-linear-gradient(90deg,#052d3a 0 8px,#27d4ce 8px 11px,#163fa0 11px 15px); }
.theme-preview.fire_ice { border-color:#522d22;background:linear-gradient(90deg,#c9f4ff 0 43%,#162632 43% 50%,#18100d 50% 67%,#ff6b18 67% 73%,#29110d 73%); }
.theme-preview.cyber { border-color:#39e6f2;background:repeating-linear-gradient(90deg,#04171d 0 8px,#42fff4 8px 11px,#ff3bd4 11px 15px);box-shadow:0 0 10px rgba(66,255,244,.25); }

.store-sheet-card { max-height: calc(100dvh - var(--safe-top)); overflow-y: auto; }
.store-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.store-heading h2 { margin-bottom: 0; }
.store-balance {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.04);
  text-align: right;
}
.store-balance small, .store-balance b { display: block; }
.store-balance small { color: var(--muted); font-size: 7px; letter-spacing: .13em; }
.store-balance b { margin-top: 2px; color: var(--accent-light); font-size: 13px; }
.store-intro {
  margin: 12px 0 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.store-packages { display: grid; gap: 9px; }
.coin-package {
  position: relative;
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 17px;
  background: rgba(255,255,255,.035);
  text-align: left;
}
.coin-package.featured {
  border-color: rgba(240,204,126,.48);
  background: linear-gradient(145deg, rgba(216,169,87,.16), rgba(255,255,255,.035));
}
.coin-package > span:nth-child(2) { min-width: 0; }
.coin-package b, .coin-package small { display: block; }
.coin-package b { font-size: 14px; }
.coin-package small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.coin-package > strong {
  padding: 9px 10px;
  border: 1px solid rgba(255,231,180,.34);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent-light), #b77d2f);
  color: #24170b;
  font-size: 12px;
  white-space: nowrap;
}
.coin-package:disabled { opacity: .55; }
.coin-package em {
  position: absolute;
  top: -7px;
  right: 13px;
  padding: 3px 7px;
  border-radius: 99px;
  background: var(--accent);
  color: #172019;
  font-style: normal;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .08em;
}
.coin-stack {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 2px solid #e6bf71;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 29%, #ffe7a5, #c88f35 58%, #5d3814);
  color: #5b3511;
  font-family: Georgia, serif;
  font-size: 23px;
  box-shadow: 0 5px 12px rgba(0,0,0,.28), inset 0 0 0 3px rgba(255,255,255,.16);
}
.store-notice {
  margin: 13px 4px 0;
  color: #7f9288;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom));
  max-width: calc(100% - 32px);
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #1c2923;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal {
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2,8,6,.78);
  backdrop-filter: blur(8px);
}
.modal-card {
  width: min(100%, 350px);
  padding: 27px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--panel);
  text-align: center;
}
.modal-icon { font-size: 48px; }
.modal h2 { margin: 8px 0 5px; }
.modal p { margin: 0 0 19px; color: var(--muted); }
.modal-actions { display: flex; gap: 8px; }
.modal-actions button { flex: 1; }

.profile-modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    max(var(--safe-top), env(safe-area-inset-top))
    20px
    max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 15%, rgba(211,166,83,.19), transparent 34%),
    rgba(3,10,7,.96);
  backdrop-filter: blur(16px);
}
.onboarding-card {
  width: min(100%, 390px);
  padding: 26px 21px 20px;
  border: 1px solid rgba(232,194,118,.28);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 8%, rgba(37,145,101,.22), transparent 33%),
    linear-gradient(150deg, #15231d, #0c1712);
  box-shadow: 0 26px 80px rgba(0,0,0,.47);
}
.onboarding-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 21px;
  border: 1px solid #e2bb6e;
  border-radius: 19px;
  background: linear-gradient(145deg, #f1cc7e, #9e681f);
  color: #172019;
  font: 900 32px Georgia, serif;
  box-shadow: 0 12px 28px rgba(0,0,0,.3);
}
.onboarding-card h2 { margin: 4px 0 7px; font-size: 29px; letter-spacing: -.035em; }
.onboarding-copy { margin: 0 0 21px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.onboarding-card label { display: block; margin-bottom: 7px; font-size: 11px; font-weight: 800; }
.onboarding-card input {
  width: 100%;
  height: 54px;
  padding: 0 15px;
  border: 1px solid rgba(224,184,105,.23);
  border-radius: 15px;
  outline: 0;
  background: rgba(255,255,255,.055);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 750;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.onboarding-card input:focus { border-color: rgba(240,204,126,.68); box-shadow: 0 0 0 3px rgba(216,169,87,.09); }
.input-help { display: block; margin: 7px 2px 0; color: var(--muted); font-size: 9px; }
.input-error { min-height: 18px; margin: 7px 2px 5px; color: #ef8f86; font-size: 11px; }
.onboarding-card .wide { width: 100%; }
.welcome-bonus { margin: 13px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.welcome-bonus b { color: var(--accent-light); }

body[data-board-theme="ocean"] .checker.white { background: radial-gradient(circle at 35% 30%,#fff,#b8edf0 55%,#6f9da7); border-color: #61e6df; }
body[data-board-theme="ocean"] .checker.black { background: radial-gradient(circle at 35% 30%,#369792,#082d36 62%,#020d13); border-color: #25a9a5; }
body[data-board-theme="fireice"] .checker.white { background: radial-gradient(circle at 35% 30%,#fff,#a7e7f3 58%,#4e8da8); border-color: #caf9ff; }
body[data-board-theme="fireice"] .checker.black { background: radial-gradient(circle at 35% 30%,#ff9a3b,#681b0a 58%,#150706); border-color: #ff6b18; }
body[data-board-theme="egypt"] .checker.white { background: radial-gradient(circle at 35% 30%,#49e4df,#08777a 60%,#032d35); border-color: #dbb752; }
body[data-board-theme="egypt"] .checker.black { background: radial-gradient(circle at 35% 30%,#46413a,#080a0b 60%,#000); border-color: #dbb752; }
body[data-board-theme="galaxy"] .checker.white { background: radial-gradient(circle at 35% 30%,#fff,#d6d8e4 58%,#7c8392); border-color: #dcbf73; }
body[data-board-theme="galaxy"] .checker.black { background: radial-gradient(circle at 35% 30%,#bd72ef,#3b145b 60%,#0b0613); border-color: #dcbf73; }

@media (min-width: 600px) {
  :root { --safe-top: 24px; }
  .screen { padding-right: 24px; padding-left: 24px; }
}

@media (orientation: landscape) and (max-height: 600px) {
  .app {
    width: 100%;
    max-width: 980px;
  }
  .screen {
    padding:
      max(var(--safe-top), env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }
  .home-screen {
    display: grid;
    grid-template-columns: minmax(330px, 1.12fr) minmax(310px, .88fr);
    grid-auto-rows: auto;
    align-content: start;
    gap: 10px 14px;
  }
  .home-header { grid-column: 1; grid-row: 1; }
  .profile-card { grid-column: 2; grid-row: 1; }
  .hero-card {
    grid-column: 1;
    grid-row: 2 / span 4;
    min-height: 274px;
  }
  .wager-card { grid-column: 2; grid-row: 2; }
  .mode-grid { grid-column: 2; grid-row: 3; }
  .mode-card { min-height: 92px; }
  .tournament-home-card {
    grid-column:2;
    grid-row:4;
    min-height:47px;
    padding:5px 8px;
    border-radius:14px;
  }
  .tournament-home-icon { width:34px;height:34px;border-radius:11px;font-size:18px; }
  .tournament-home-copy small,
  .tournament-home-copy i,
  .tournament-home-live { display:none; }
  .tournament-home-copy b { margin:0;font-size:12px; }
  .leaderboard-button {
    grid-column: 2;
    grid-row: 5;
    min-height: 48px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .tournaments-screen {
    display:grid;
    grid-template-columns:minmax(250px,.72fr) minmax(410px,1.28fr);
    grid-template-rows:auto auto auto minmax(0,1fr);
    gap:8px 14px;
  }
  .tournaments-header { grid-column:1 / -1;grid-row:1; }
  .tournaments-hero {
    grid-column:1;
    grid-row:2;
    grid-template-columns:45px minmax(0,1fr);
    padding:10px;
  }
  .tournaments-hero > span { width:43px;height:43px;border-radius:13px;font-size:23px; }
  .tournaments-hero h2 { font-size:14px; }
  .tournaments-hero p { font-size:8px; }
  .tournaments-hero > b { grid-column:2;margin-top:2px;padding:3px 6px;font-size:7px; }
  .tournament-fee-filters {
    grid-column:1;
    grid-row:3 / 5;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-content:start;
    gap:5px;
    margin:0;
    padding:0;
    overflow-y:auto;
  }
  .tournament-fee-filters button { min-height:29px;padding:0 6px;font-size:8px; }
  .tournaments-list-heading { grid-column:2;grid-row:2;align-self:end; }
  .tournaments-list-heading h2 { font-size:14px; }
  .tournaments-list-heading p { font-size:8px; }
  .tournaments-list {
    grid-column:2;
    grid-row:3 / 5;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
    padding-right:2px;
  }
  .tournament-card { padding:8px;border-radius:14px; }
  .tournament-card-title { margin-top:5px;font-size:11px; }
  .tournament-card-status { margin-top:2px;font-size:7.5px; }
  .tournament-card-details { gap:3px;margin-top:6px; }
  .tournament-card-details > span { padding:4px 3px; }
  .tournament-card-details small { font-size:6px; }
  .tournament-card-details b { margin-top:1px;font-size:7.5px; }
  .tournament-card-progress { margin-top:6px; }
  .tournament-card-arrow { margin-top:4px;font-size:7.5px; }
  .tournament-card-top i,
  .tournament-card-top em { font-size:6.8px; }
  .tournament-detail-screen {
    display:grid;
    grid-template-columns:minmax(250px,.7fr) minmax(430px,1.3fr);
    grid-template-rows:auto auto auto minmax(0,1fr);
    gap:8px 14px;
  }
  .tournament-detail-header { grid-column:1 / -1;grid-row:1; }
  .tournament-detail-hero { grid-column:1;grid-row:2;padding:9px; }
  .tournament-cup-mark { width:44px;height:44px;border-radius:13px;font-size:22px; }
  .tournament-detail-hero-copy b { font-size:17px; }
  .tournament-detail-hero-copy span { font-size:7.5px; }
  .tournament-detail-meta { gap:3px; }
  .tournament-detail-meta > span { padding:4px 3px; }
  .tournament-rewards-card { grid-column:1;grid-row:3;padding:7px 9px; }
  .tournament-rewards-card > span { width:31px;height:31px; }
  .tournament-rewards-card p { font-size:7.5px; }
  .tournament-detail-actions { grid-column:1;grid-row:4;align-self:start; }
  .tournament-detail-actions > button { min-height:37px;font-size:9px; }
  .tournament-detail-actions > small { font-size:7px; }
  .tournament-bracket-section { grid-column:2;grid-row:2 / 5;padding:9px; }
  .tournament-bracket { grid-template-columns:repeat(3,minmax(130px,1fr));overflow-y:auto; }
  .tournament-match { padding:5px; }
  .tournament-match-player { min-height:27px;grid-template-columns:21px minmax(0,1fr) auto; }
  .tournament-match-player > span { width:20px;height:20px; }
  .tournament-round { gap:5px; }
  .tournament-bracket-heading { margin-bottom:5px; }
  .tournament-bracket-heading h2 { font-size:12px; }
  .tournament-match-top { min-height:17px;margin-bottom:2px; }
  .tournament-match-top button { min-height:20px; }
  .tournament-unavailable { padding:11px; }
  .tournament-unavailable p { font-size:8px; }
  .game-screen {
    display: grid;
    grid-template-columns: minmax(230px, 38%) minmax(340px, 1fr);
    grid-template-rows: auto auto 1fr auto;
    gap: 8px 14px;
    height: 100dvh;
    overflow: hidden;
  }
  .board-stage {
    grid-column: 1;
    grid-row: 1 / -1;
    height: 100%;
    min-height: 0;
  }
  .board-shell {
    height: 100%;
    max-height: 100%;
    max-width: 100%;
  }
  .online-lobby { inset: 5px; padding: 12px 10px 10px; }
  .online-lobby-copy { margin: 7px 0; }
  .lobby-player { min-height: 48px; padding: 6px; }
  .lobby-rule { margin-top: 6px; padding: 6px 7px; }
  .lobby-refresh { min-height: 31px; margin-top: 6px; }
  .game-header { grid-column: 2; grid-row: 1; }
  .players { grid-column: 2; grid-row: 2; }
  .hint {
    grid-column: 2;
    grid-row: 3;
    align-self: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.025);
    font-size: 12px;
  }
  .actions { grid-column: 2; grid-row: 4; }
  .actions button { min-height: 46px; }
  .rating-screen {
    display: grid;
    grid-template-columns: minmax(255px,.78fr) minmax(360px,1.22fr);
    grid-template-rows: auto auto minmax(0,1fr);
    align-content: stretch;
    gap: 9px 14px;
    overflow: hidden;
  }
  .rating-header { grid-column:1 / -1;grid-row:1; }
  .competitive-rating-hero {
    grid-column:1;
    grid-row:2;
    min-height:72px;
    padding:11px 13px;
  }
  .leaderboard-me {
    grid-column:1;
    grid-row:3;
    align-self:start;
    padding:11px;
  }
  .leaderboard-me-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .leaderboard-me-stats > span { padding:6px 4px; }
  .leaderboard-heading {
    grid-column:2;
    grid-row:2;
    align-self:end;
    padding:0 4px 5px;
  }
  .leaderboard {
    grid-column:2;
    grid-row:3;
    min-height:0;
    margin:0;
    overflow-y:auto;
  }
  .rating-screen .leader-row { min-height:59px;padding:7px 10px; }
  .leader-score > strong { font-size:15px; }
}

@media (max-height: 720px) {
  :root { --safe-top: 44px; }
  .game-screen { gap: 5px; }
  .players { min-height: 46px; }
  .hint { display: none; }
  .actions button { min-height: 43px; }
  .profile-modal { align-items: start; }
}

/* Profile, progression and customization — v11 */
.profile-card {
  gap: 7px;
  padding: 8px;
}
.profile-identity {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 4px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  text-align: left;
}
.profile-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.profile-name-line b {
  flex: 0 1 auto;
  min-width: 0;
}
.profile-name-line i {
  flex: 0 0 auto;
  max-width: 92px;
  overflow: hidden;
  padding: 3px 6px;
  border: 1px solid rgba(240,204,126,.25);
  border-radius: 99px;
  background: rgba(216,169,87,.09);
  color: var(--accent-light);
  font-size: 7px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-progress {
  display: block;
  width: 100%;
  height: 4px;
  margin: 5px 0 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.07);
}
.status-progress i,
.style-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a36d28, #f4cf7e);
  box-shadow: 0 0 12px rgba(240,204,126,.3);
  transition: width .45s ease;
}
.profile-competitive {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 1px;
  min-width: 0;
  margin-bottom: 2px;
}
.profile-competitive > span {
  flex: 0 0 auto;
  color: #91a59a;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.profile-competitive > span b {
  margin-left: 3px;
  color: var(--accent-light);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.profile-competitive > small {
  min-width: 0;
  overflow: hidden;
  color: #7f9388;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-copy > small {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-chevron {
  color: #7f9389;
  font-size: 22px;
  font-style: normal;
}
.balance-pill { min-width: 84px; }

.avatar-visual {
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  background-color: #173c2f;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: 0 6px 14px rgba(0,0,0,.28);
}
.avatar-visual > span,
.avatar-visual > i {
  position: relative;
  z-index: 1;
  font-style: normal;
}

.player-avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: #f4d891;
  font-size: 11px;
  font-weight: 900;
}
.leader-row { grid-template-columns: 34px 34px minmax(0,1fr) auto; }
.leader-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #f3d58c;
  font-size: 11px;
  font-weight: 850;
}

.wallet-screen {
  display: flex;
  height: 100dvh;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.wallet-header { flex: 0 0 auto; }
.wallet-balance-hero {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 17px;
  min-height: 132px;
  overflow: hidden;
  padding: 21px;
  border: 1px solid rgba(240,204,126,.36);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 8%, rgba(77,194,139,.3), transparent 35%),
    linear-gradient(145deg, rgba(216,169,87,.17), rgba(255,255,255,.025));
  box-shadow: 0 18px 38px rgba(0,0,0,.2);
}
.wallet-balance-hero::after {
  position: absolute;
  right: -37px;
  bottom: -62px;
  width: 154px;
  height: 154px;
  border: 1px solid rgba(240,204,126,.14);
  border-radius: 50%;
  content: "";
}
.wallet-coin-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border: 2px solid #f1ce7f;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, #fbe3a5, #d5a143 49%, #744216 100%);
  color: #35200d;
  font: 900 34px Georgia,serif;
  box-shadow:
    inset 0 0 0 5px rgba(69,38,11,.18),
    0 10px 24px rgba(0,0,0,.3),
    0 0 24px rgba(216,169,87,.16);
}
.wallet-balance-hero > div:last-child { position: relative; z-index: 1; min-width: 0; }
.wallet-balance-hero p {
  margin: 0 0 4px;
  color: #c8aa70;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}
.wallet-balance-hero strong {
  display: block;
  font-size: clamp(31px, 9vw, 42px);
  letter-spacing: -.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wallet-balance-hero small {
  display: block;
  margin-top: 8px;
  color: #9db0a6;
  font-size: 10px;
  line-height: 1.35;
}
.wallet-refill-card,
.wallet-stars-card,
.wallet-purchase-card {
  flex: 0 0 auto;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 21px;
  background: rgba(255,255,255,.032);
}
.wallet-stars-card {
  border-color: rgba(255,218,84,.2);
  background:
    radial-gradient(circle at 90% 0, rgba(255,214,70,.11), transparent 38%),
    rgba(255,255,255,.03);
}
.wallet-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wallet-section-heading > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(101,217,159,.24);
  border-radius: 13px;
  background: rgba(75,190,135,.09);
  color: #78d5a8;
  font-size: 22px;
  font-weight: 900;
}
.wallet-section-heading > .wallet-star-mark {
  border-color: rgba(255,221,90,.32);
  background: rgba(255,210,55,.1);
  color: #ffdc59;
  text-shadow: 0 0 15px rgba(255,211,51,.45);
}
.wallet-section-heading > .wallet-purchase-mark {
  border-color: rgba(118,216,170,.28);
  background: rgba(62,175,123,.1);
  color: #82ddb1;
  text-shadow: 0 0 15px rgba(91,219,157,.3);
}
.wallet-section-heading div { min-width: 0; }
.wallet-section-heading h2 { margin: 0; font-size: 16px; }
.wallet-section-heading p {
  margin: 4px 0 0;
  color: #91a39a;
  font-size: 9.5px;
  line-height: 1.4;
}
.wallet-refill-button,
.wallet-stars-main {
  width: 100%;
  min-height: 49px;
  margin-top: 14px;
  border: 1px solid rgba(240,204,126,.36);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(216,169,87,.22), rgba(152,99,36,.13));
  color: #f3d589;
  font-size: 12px;
  font-weight: 850;
}
.wallet-refill-button:disabled {
  border-color: rgba(255,255,255,.07);
  background: rgba(255,255,255,.035);
  color: #74867d;
  opacity: 1;
}
.wallet-refill-card > small {
  display: block;
  margin-top: 8px;
  color: #71847a;
  font-size: 8.5px;
  line-height: 1.35;
  text-align: center;
}
.wallet-stars-main {
  display: grid;
  grid-template-columns: 31px minmax(0,1fr) 19px;
  align-items: center;
  padding: 0 13px;
  border-color: rgba(255,221,91,.48);
  background: linear-gradient(145deg, #f5ce4f, #bd7622);
  color: #271805;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 9px 24px rgba(183,112,27,.18);
}
.wallet-stars-main > span { font-size: 22px; }
.wallet-stars-main > b { font-size: 12px; }
.wallet-stars-main > i { font-size: 21px; font-style: normal; text-align: right; }
.wallet-topup-label {
  margin: 12px 4px 0;
  color: #899c92;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
}
.wallet-purchase-card {
  background:
    radial-gradient(circle at 96% 0, rgba(69,188,132,.1), transparent 42%),
    rgba(255,255,255,.03);
}
.wallet-purchase-details {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 15px;
  background: rgba(0,0,0,.14);
}
.wallet-purchase-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}
.wallet-purchase-title-row > div { min-width: 0; }
.wallet-purchase-title-row small {
  display: block;
  margin-bottom: 3px;
  color: #74877d;
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: .12em;
}
.wallet-purchase-title-row b {
  display: block;
  overflow: hidden;
  color: #e5eee9;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wallet-purchase-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(224,183,86,.25);
  border-radius: 999px;
  background: rgba(224,183,86,.09);
  color: #e5c56f;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}
.wallet-purchase-status.payment-paid {
  border-color: rgba(80,210,143,.3);
  background: rgba(54,185,116,.11);
  color: #7de0ae;
}
.wallet-purchase-status.payment-refunded {
  border-color: rgba(104,188,237,.3);
  background: rgba(69,149,201,.11);
  color: #8bcdf2;
}
.wallet-purchase-status.payment-cancelled,
.wallet-purchase-status.payment-expired {
  border-color: rgba(158,173,165,.22);
  background: rgba(122,139,130,.09);
  color: #a6b5ad;
}
.wallet-purchase-status.payment-failed,
.wallet-purchase-status.payment-network-error {
  border-color: rgba(238,109,109,.27);
  background: rgba(198,72,72,.1);
  color: #f09494;
}
.wallet-purchase-details > p {
  min-height: 28px;
  margin: 10px 0;
  color: #94a79d;
  font-size: 9px;
  line-height: 1.45;
}
.wallet-purchase-details.has-verification-error {
  border-color: rgba(238,109,109,.2);
}
.wallet-purchase-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.055);
}
.wallet-purchase-meta span {
  color: #f0d26e;
  font-size: 11px;
  font-weight: 900;
}
.wallet-purchase-meta code {
  overflow: hidden;
  color: #778a80;
  font: 700 8px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wallet-purchase-actions {
  display: grid;
  grid-template-columns: minmax(0,.76fr) minmax(0,1.24fr);
  gap: 8px;
  margin-top: 12px;
}
.wallet-purchase-actions button {
  min-width: 0;
  min-height: 43px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 13px;
  background: rgba(255,255,255,.045);
  color: #b9c8c0;
  font-size: 9.5px;
  font-weight: 850;
}
.wallet-purchase-actions button:last-child {
  border-color: rgba(240,204,126,.34);
  background: linear-gradient(145deg, rgba(216,169,87,.2), rgba(152,99,36,.11));
  color: #f0d184;
}
.wallet-purchase-actions button:disabled {
  color: #5e7067;
  opacity: .65;
}
.profile-style-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.style-catalog-pane { display: contents; }
.style-header {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  flex: 0 0 auto;
}
.style-header > div:nth-child(2) { min-width: 0; }
.style-balance {
  align-self: center;
  padding: 8px 10px;
  border: 1px solid rgba(240,204,126,.24);
  border-radius: 12px;
  background: rgba(216,169,87,.08);
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.style-profile-hero {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(235,193,111,.23);
  border-radius: 23px;
  background:
    radial-gradient(circle at 90% 10%, rgba(39,137,97,.32), transparent 35%),
    linear-gradient(145deg, rgba(218,169,87,.13), rgba(255,255,255,.025));
}
.style-profile-hero::after {
  position: absolute;
  right: -36px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(240,204,126,.12);
  border-radius: 50%;
  content: "";
}
body[data-profile-theme="strategist"] .profile-card,
body[data-profile-theme="strategist"] .style-profile-hero {
  border-color:rgba(91,195,155,.34);
  background:
    linear-gradient(120deg,transparent 0 64%,rgba(111,229,181,.09) 64% 66%,transparent 66%),
    radial-gradient(circle at 88% 12%,rgba(55,171,128,.28),transparent 36%),
    linear-gradient(145deg,#123a2d,#071a14);
}
body[data-profile-theme="professional"] .profile-card,
body[data-profile-theme="professional"] .style-profile-hero {
  border-color:rgba(225,194,111,.4);
  background:
    linear-gradient(135deg,transparent 0 72%,rgba(225,194,111,.13) 72% 74%,transparent 74%),
    radial-gradient(circle at 86% 8%,rgba(54,93,166,.34),transparent 37%),
    linear-gradient(145deg,#172b50,#080f20);
  box-shadow:inset 0 1px rgba(255,238,183,.06),0 10px 25px rgba(0,0,0,.13);
}
body[data-profile-theme="night"] .profile-card,
body[data-profile-theme="night"] .style-profile-hero {
  border-color:rgba(102,139,214,.32);
  background:radial-gradient(circle at 90% 8%,rgba(65,98,175,.34),transparent 36%),linear-gradient(145deg,#13264c,#080e20);
}
body[data-profile-theme="malachite"] .profile-card,
body[data-profile-theme="malachite"] .style-profile-hero {
  border-color:rgba(82,214,161,.34);
  background:radial-gradient(circle at 90% 8%,rgba(63,211,153,.3),transparent 38%),linear-gradient(145deg,#12654e,#062b23);
}
body[data-profile-theme="royal"] .profile-card,
body[data-profile-theme="royal"] .style-profile-hero {
  border-color:rgba(235,193,111,.45);
  background:radial-gradient(circle at 88% 10%,rgba(194,113,230,.35),transparent 38%),linear-gradient(145deg,#4d286f,#160c27);
}
body[data-profile-theme="fire"] .profile-card,
body[data-profile-theme="fire"] .style-profile-hero {
  border-color:rgba(255,133,60,.42);
  background:radial-gradient(circle at 88% 10%,rgba(255,113,31,.42),transparent 38%),linear-gradient(145deg,#791e0c,#1e0704);
  box-shadow:0 0 24px rgba(255,73,15,.12);
}
body[data-profile-theme="cosmos"] .profile-card,
body[data-profile-theme="cosmos"] .style-profile-hero {
  border-color:rgba(163,117,235,.42);
  background:radial-gradient(circle at 82% 12%,rgba(128,74,190,.56),transparent 34%),linear-gradient(145deg,#101630,#050711);
  box-shadow:0 0 24px rgba(116,77,207,.14);
}
.player[data-profile-theme="strategist"],
.lobby-player[data-profile-theme="strategist"],
.leader-row[data-profile-theme="strategist"],
.leaderboard-me[data-profile-theme="strategist"] {
  border-color:rgba(91,195,155,.22);
  background:linear-gradient(135deg,rgba(26,95,69,.34),rgba(6,31,23,.45));
}
.player[data-profile-theme="professional"],
.lobby-player[data-profile-theme="professional"],
.leader-row[data-profile-theme="professional"],
.leaderboard-me[data-profile-theme="professional"] {
  border-color:rgba(225,194,111,.25);
  background:linear-gradient(135deg,rgba(35,67,124,.38),rgba(7,15,33,.48));
}
.player[data-profile-theme="night"],
.lobby-player[data-profile-theme="night"],
.leader-row[data-profile-theme="night"],
.leaderboard-me[data-profile-theme="night"] { background:linear-gradient(135deg,rgba(33,61,116,.35),rgba(7,14,31,.45)); }
.player[data-profile-theme="malachite"],
.lobby-player[data-profile-theme="malachite"],
.leader-row[data-profile-theme="malachite"],
.leaderboard-me[data-profile-theme="malachite"] { background:linear-gradient(135deg,rgba(22,110,83,.32),rgba(5,36,28,.44)); }
.player[data-profile-theme="royal"],
.lobby-player[data-profile-theme="royal"],
.leader-row[data-profile-theme="royal"],
.leaderboard-me[data-profile-theme="royal"] { background:linear-gradient(135deg,rgba(91,46,128,.36),rgba(28,14,44,.46)); }
.player[data-profile-theme="fire"],
.lobby-player[data-profile-theme="fire"],
.leader-row[data-profile-theme="fire"],
.leaderboard-me[data-profile-theme="fire"] { border-color:rgba(255,125,49,.28);background:linear-gradient(135deg,rgba(122,31,12,.38),rgba(31,7,3,.46)); }
.player[data-profile-theme="cosmos"],
.lobby-player[data-profile-theme="cosmos"],
.leader-row[data-profile-theme="cosmos"],
.leaderboard-me[data-profile-theme="cosmos"] { border-color:rgba(157,112,222,.28);background:radial-gradient(circle at 90% 0,rgba(125,72,185,.38),transparent 45%),rgba(7,10,24,.48); }
.style-profile-avatar {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: #f4d58d;
  font-size: 27px;
  font-weight: 900;
}
.style-profile-copy { position: relative; z-index: 1; flex: 1; min-width: 0; }
.style-name-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.style-name-row h2 { margin: 0; overflow: hidden; font-size: 20px; text-overflow: ellipsis; white-space: nowrap; }
.style-name-row span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid rgba(240,204,126,.26);
  border-radius: 99px;
  background: rgba(216,169,87,.1);
  color: var(--accent-light);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.style-profile-copy p { margin: 4px 0 9px; color: var(--muted); font-size: 11px; }
.style-competitive-stats {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 6px;
  margin: 8px 0 9px;
}
.style-competitive-stats > span {
  min-width: 0;
  padding: 7px 6px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 10px;
  background: rgba(0,0,0,.12);
}
.style-competitive-stats > span.primary {
  border-color: rgba(240,204,126,.28);
  background: rgba(216,169,87,.09);
}
.style-competitive-stats small,
.style-competitive-stats b { display: block; }
.style-competitive-stats small {
  overflow: hidden;
  color: #72867b;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.style-competitive-stats b {
  margin-top: 3px;
  color: #dce8e1;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.style-competitive-stats .primary b { color: var(--accent-light); font-size: 15px; }
.style-progress { height: 6px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.style-profile-copy > small { display: block; margin-top: 6px; color: #93a69c; font-size: 10.5px; }

.customization-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  flex: 0 0 auto;
  gap: 8px;
  width: 100%;
}
.customization-tabs button {
  min-width: 0;
  min-height: 47px;
  padding: 0 8px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  color: #90a299;
  font-size: 12px;
  font-weight: 800;
}
.customization-tabs button.selected {
  border-color: rgba(240,204,126,.38);
  background: rgba(216,169,87,.13);
  color: var(--accent-light);
}
.stars-consent {
  flex: 0 0 auto;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 13px;
  background: rgba(255,255,255,.022);
  transition: .2s;
}
.stars-consent.attention { border-color: rgba(240,204,126,.75); box-shadow: 0 0 0 3px rgba(216,169,87,.09); }
.stars-consent label { display: flex; align-items: center; gap: 9px; color: #b8c6bf; font-size: 11px; line-height: 1.4; }
.stars-consent input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.stars-consent button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-light);
  font-size: inherit;
  text-decoration: underline;
}
.stars-consent p { margin: 6px 0 0 26px; color: #83978d; font-size: 10px; line-height: 1.4; }
.catalog-heading {
  display: flex;
  flex: 0 0 auto;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.catalog-heading > div { width: 100%; min-width: 0; }
.catalog-heading h2 { margin: 0; font-size: 21px; }
.catalog-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.collection-filters {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 7px;
  width: 100%;
  margin-top: 10px;
}
.collection-filters[hidden] { display: none; }
.collection-filters button {
  min-width: 0;
  min-height: 40px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
  color: #809188;
  font-size: 11.5px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.collection-filters button.selected {
  border-color: rgba(240,204,126,.35);
  background: rgba(216,169,87,.13);
  color: var(--accent-light);
}
.collection-filters [data-avatar-collection="volnitsa"] {
  border-color: rgba(214,143,69,.25);
  background: linear-gradient(145deg, rgba(116,49,29,.25), rgba(188,116,48,.07));
  color: #d8a16e;
}
.collection-filters [data-avatar-collection="volnitsa"].selected {
  border-color: rgba(245,179,102,.58);
  background: linear-gradient(145deg, #7b3424, #3a1b18);
  color: #ffe0a7;
  box-shadow: 0 6px 16px rgba(82,26,18,.26), inset 0 1px rgba(255,235,194,.11);
}
.collection-filters [data-avatar-collection="code"] {
  border-color: rgba(197,178,129,.24);
  background: linear-gradient(145deg, rgba(35,39,42,.86), rgba(79,29,27,.25));
  color: #c7b992;
}
.collection-filters [data-avatar-collection="code"].selected {
  border-color: rgba(232,207,151,.62);
  background: linear-gradient(145deg, #332d27, #191b1e 58%, #461c1d);
  color: #f1ddb1;
  box-shadow: 0 6px 18px rgba(0,0,0,.32), inset 0 1px rgba(255,244,216,.12);
}
.catalog-heading > span {
  display: grid;
  place-items: center;
  min-width: 35px;
  height: 31px;
  padding: 0 9px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.customization-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}
.customization-catalog.busy { pointer-events: none; opacity: .62; }
.catalog-loading { grid-column: 1 / -1; padding: 36px 14px; color: var(--muted); text-align: center; }
.catalog-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 292px;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px 12px;
  border: 1px solid rgba(255,255,255,.065);
  overflow: hidden;
  border-radius: 21px;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 13%, rgba(58,132,100,.14), transparent 36%),
    rgba(255,255,255,.027);
}
.catalog-card > * { position: relative; z-index: 1; }
.catalog-card.equipped {
  border-color: rgba(240,204,126,.5);
  background:
    radial-gradient(circle at 50% 13%, rgba(216,169,87,.2), transparent 39%),
    rgba(216,169,87,.055);
}
.catalog-card.collection-volnitsa {
  border-color: rgba(220,146,75,.34);
  background:
    radial-gradient(circle at 50% 11%, rgba(223,144,75,.25), transparent 34%),
    linear-gradient(155deg, rgba(103,43,29,.55), rgba(29,20,16,.88) 58%, rgba(71,36,22,.46));
  box-shadow: inset 0 1px rgba(255,215,158,.09), 0 11px 28px rgba(0,0,0,.16);
}
.catalog-card.collection-volnitsa::before,
.catalog-card.collection-code::before {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 17%;
  left: 17%;
  height: 2px;
  border-radius: 0 0 99px 99px;
  background: linear-gradient(90deg, transparent, #e9a865, transparent);
  content: "";
  box-shadow: 0 0 13px rgba(233,168,101,.38);
}
.catalog-card.collection-code {
  border-color: rgba(212,194,151,.34);
  background:
    radial-gradient(circle at 50% 10%, rgba(203,181,126,.17), transparent 31%),
    linear-gradient(155deg, rgba(45,46,48,.92), rgba(15,17,19,.96) 58%, rgba(68,25,26,.65));
  box-shadow: inset 0 1px rgba(255,240,201,.08), 0 13px 30px rgba(0,0,0,.24);
}
.catalog-card.collection-code::before {
  background: linear-gradient(90deg, transparent, #dfc688, #8f3934, transparent);
  box-shadow: 0 0 14px rgba(204,181,126,.32);
}
.catalog-card.collection-volnitsa.equipped,
.catalog-card.collection-code.equipped {
  border-color: rgba(245,210,135,.7);
  box-shadow: inset 0 0 0 1px rgba(245,210,135,.08), 0 13px 32px rgba(0,0,0,.23);
}
.catalog-card.locked .catalog-preview { filter: grayscale(.75); opacity: .54; }
.catalog-preview {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  margin: 4px auto 14px;
  color: #f5d890;
  font-size: 39px;
}
.catalog-preview-avatar { border-radius: 50%; }
.catalog-preview-board {
  grid-template-columns: repeat(4,1fr);
  gap: 2px;
  width: 132px;
  height: 89px;
  padding: 8px;
  border: 3px solid #82572d;
  border-radius: 12px;
  background: #07503b;
  box-shadow: inset 0 0 15px rgba(0,0,0,.45), 0 8px 16px rgba(0,0,0,.24);
}
.catalog-preview-board i {
  height: 65px;
  background: #d8b664;
  clip-path: polygon(0 0,100% 0,50% 100%);
}
.catalog-preview-board i:nth-child(even) { background: #063f32; }
.catalog-preview-board[data-theme="ocean"] { border-color:#1c6572;background:#052d3a; }
.catalog-preview-board[data-theme="ocean"] i:nth-child(odd) { background:#35dbd2; }
.catalog-preview-board[data-theme="fireice"] { border-color:#42251d;background:linear-gradient(90deg,#447f98 0 50%,#27100c 50%); }
.catalog-preview-board[data-theme="fireice"] i:nth-child(odd) { background:#bdf7ff; }
.catalog-preview-board[data-theme="fireice"] i:nth-child(even) { background:#ff6b18; }
.catalog-preview-board[data-theme="egypt"] { border-color:#cba94d;background:#102a78; }
.catalog-preview-board[data-theme="egypt"] i:nth-child(odd) { background:#d8b65c; }
.catalog-preview-board[data-theme="galaxy"] { border-color:#8a77ae;background:#090919; }
.catalog-preview-board[data-theme="galaxy"] i:nth-child(odd) { background:#9c64d2; }
.catalog-preview-board[data-theme="artdeco"] { border-color:#e5c46b;background:#0f5943; }
.catalog-preview-board[data-theme="steampunk"] { border-color:#c99c54;background:#5f351d; }
.catalog-preview-board[data-theme="royal"] { border-color:#e0bd5e;background:#2d185f; }
.catalog-preview-dice {
  width: 92px;
  height: 92px;
  border: 3px solid #caa150;
  border-radius: 21px;
  background: #f0ddaa;
  color: #21170e;
  box-shadow: 0 9px 18px rgba(0,0,0,.32);
  transform: rotate(-6deg);
}
.catalog-preview-dice[data-skin="obsidian"] { border-color:#79694a;background:#121617;color:#f3ce79; }
.catalog-preview-dice[data-skin="bronze"] { border-color:#d5a45c;background:#85562d;color:#fff0c1; }
.catalog-preview-dice[data-skin="sapphire"] { border-color:#5ca9ee;background:#173f82;color:#eaf8ff; }
.catalog-preview-dice[data-skin="champion"] { border-color:#ffe49b;background:#d7aa47;color:#43270d; }
.catalog-preview-dice[data-skin="wood"] { border-color:#ae7540;background:#6a3c1f;color:#f3d694; }
.catalog-preview-dice[data-skin="malachite"] { border-color:#58d5ac;background:#08745b;color:#f4dc8d; }
.catalog-preview-dice[data-skin="emerald"] { border-color:#58d5ac;background:#08745b;color:#f4dc8d; }
.catalog-preview-dice[data-skin="ruby"] { border-color:#e66d68;background:#8d1e2b;color:#fff0cd; }
.catalog-preview-dice[data-skin="frost"] { border-color:#83dff5;background:#c9f5ff;color:#175781; }
.catalog-preview-dice[data-skin="fire"] { border-color:#ff5a1e;background:#40110a;color:#ffae48; }
.catalog-preview-dice[data-skin="galaxy"] { border-color:#8863dd;background:#201445;color:#d99aff; }
.catalog-preview-dice[data-skin="gold"] { border-color:#ffe49b;background:#d7aa47;color:#43270d; }
.catalog-preview-dice[data-skin="neon"] { border-color:#ff3bd4;background:#04171d;color:#42fff4; }
.catalog-preview-dice[data-skin="royal"] { border-color:#e0bd5e;background:#3c1e69;color:#ffe79b; }
.catalog-preview-dice[data-skin="hologram"] { border-color:#50f5ff;background:linear-gradient(135deg,#071a25,#3e1649);color:#d9ffff;box-shadow:0 0 18px rgba(80,245,255,.28); }
.catalog-preview-checker {
  width: 92px;
  height: 92px;
  border: 4px solid #cba052;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 27%,#fff,#e5d6b8 55%,#8c7651);
  color: #4b3b26;
  font: 850 28px Georgia,serif;
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.18), 0 9px 18px rgba(0,0,0,.3);
}
.catalog-preview-checker[data-skin="pearl"] { border-color:#d9ffff;background:radial-gradient(circle at 34% 27%,#fff,#c8f1ef 55%,#6f9fb1); }
.catalog-preview-checker[data-skin="carved"] { border-color:#ffe28a;background:radial-gradient(circle at 34% 27%,#fff4cf,#cf9f3c 55%,#6a4215); }
.catalog-preview-checker[data-skin="veteran"] { border-color:#e8eeee;background:radial-gradient(circle at 34% 27%,#f3f5f3,#a8b1ae 55%,#4e5c58); }
.catalog-preview-checker[data-skin="expert"] { border-color:#f1cd6e;background:radial-gradient(circle at 34% 27%,#c9fff5,#2dcab3 55%,#064f48); }
.catalog-preview-checker[data-skin="immortal"] { border-color:#fff09a;background:radial-gradient(circle at 34% 27%,#fffbe0,#e5b94a 55%,#6c3f0c); }
.catalog-preview-checker[data-skin="marble"] { border-color:#d6c089;background:radial-gradient(circle at 34% 27%,#fff,#dddcd7 55%,#92918c); }
.catalog-preview-checker[data-skin="jade"] { border-color:#e2c46a;background:radial-gradient(circle at 34% 27%,#caffdf,#3ca66d 55%,#0c4b33); }
.catalog-preview-checker[data-skin="gear"] { border-color:#f1cd79;background:radial-gradient(circle at 34% 27%,#f7d891,#a96e2e 55%,#4e2b10); }
.catalog-preview-checker[data-skin="scarab"] { border-color:#e1bd55;background:radial-gradient(circle at 34% 27%,#80fff4,#0a8583 58%,#02363d); }
.catalog-preview-checker[data-skin="dragon"] { border-color:#e2c46a;background:radial-gradient(circle at 34% 27%,#c9ffcf,#2a8e4c 58%,#082e1a); }
.catalog-preview-checker[data-skin="constellation"] { border-color:#e1c379;background:radial-gradient(circle at 34% 27%,#cf8cff,#4c1a77 58%,#0d0618); }
.catalog-preview-checker[data-skin="flame"] { border-color:#ffb34f;background:radial-gradient(circle at 34% 27%,#fff0a6,#ff852d 55%,#8f1b08); }
.catalog-preview-checker[data-skin="lava"] { border-color:#ffb34f;background:radial-gradient(circle at 34% 27%,#fff0a6,#ff852d 55%,#8f1b08); }
.catalog-preview-checker[data-skin="ice"] { border-color:#b9f5ff;background:radial-gradient(circle at 34% 27%,#fff,#a5efff 55%,#4286aa); }
.catalog-preview-checker[data-skin="royal"] { border-color:#efd06e;background:radial-gradient(circle at 34% 27%,#fff9d8,#d4b34f 55%,#674217); }
.catalog-preview-checker[data-skin="neon"] { border-color:#43fff8;background:radial-gradient(circle at 34% 27%,#baffff,#16d6d3 55%,#073b45); }

.catalog-preview-profile {
  grid-template-columns: 42px minmax(0,1fr);
  gap: 10px;
  width: 132px;
  height: 88px;
  padding: 12px;
  border: 1px solid rgba(240,204,126,.25);
  border-radius: 17px;
  background:linear-gradient(145deg,#14392e,#081a15);
}
.catalog-preview-profile > .avatar-visual {
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border-radius:50%;
  font-size:11px;
}
.catalog-preview-profile > span:last-child { display:grid;gap:6px; }
.catalog-preview-profile > span:last-child i { display:block;height:5px;border-radius:9px;background:rgba(255,255,255,.22); }
.catalog-preview-profile > span:last-child i:last-child { width:68%;background:rgba(240,204,126,.33); }
.catalog-preview-profile[data-skin="strategist"] {
  border:1px solid rgba(91,195,155,.28);
  background:
    linear-gradient(120deg,transparent 0 62%,rgba(111,229,181,.12) 62% 65%,transparent 65%),
    linear-gradient(145deg,#164a39,#071b15);
}
.catalog-preview-profile[data-skin="professional"] {
  border:1px solid rgba(225,194,111,.32);
  background:
    linear-gradient(135deg,transparent 0 70%,rgba(225,194,111,.15) 70% 73%,transparent 73%),
    linear-gradient(145deg,#1e3970,#080f20);
}
.catalog-preview-profile[data-skin="night"] { background:linear-gradient(145deg,#13264c,#080e20); }
.catalog-preview-profile[data-skin="malachite"] { background:linear-gradient(145deg,#12654e,#062b23); }
.catalog-preview-profile[data-skin="royal"] { background:linear-gradient(145deg,#4d286f,#160c27); }
.catalog-preview-profile[data-skin="fire"] { background:linear-gradient(145deg,#791e0c,#1e0704);box-shadow:0 0 17px rgba(255,91,26,.24); }
.catalog-preview-profile[data-skin="cosmos"] { background:radial-gradient(circle at 82% 12%,#7747b0,#101630 48%,#050711); }
.catalog-card-copy { width: 100%; min-width: 0; text-align: center; }
.catalog-card-copy b,
.catalog-card-copy small { display: block; overflow: hidden; }
.catalog-card-copy b {
  display: -webkit-box;
  min-height: 35px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.22;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.catalog-item-description {
  display: -webkit-box;
  min-height: 31px;
  margin: 5px 0 0;
  overflow: hidden;
  color: #9aacA3;
  font-size: 11px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.catalog-card-copy small {
  min-height: 14px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.catalog-collection {
  display: block;
  min-height: 11px;
  margin: -5px 0 5px;
  color: #dbb663;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .16em;
}
.collection-volnitsa .catalog-collection {
  color: #f0aa69;
  text-shadow: 0 0 13px rgba(218,123,58,.28);
}
.collection-code .catalog-collection {
  color: #dfcc9d;
  text-shadow: 0 0 13px rgba(218,194,139,.24);
}
.collection-code .catalog-item-description { color: #b7aa8d; }
.catalog-card-actions {
  display: flex;
  width: 100%;
  gap: 6px;
  margin-top: auto;
  padding-top: 11px;
}
.catalog-action {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 0 7px;
  border: 1px solid rgba(240,204,126,.3);
  border-radius: 10px;
  background: rgba(216,169,87,.1);
  color: var(--accent-light);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.catalog-action.stars-action {
  border-color: rgba(255,229,114,.45);
  background: linear-gradient(145deg,#f8d75e,#d5962b);
  color: #251708;
}
.catalog-action.equipped-action {
  border-color: rgba(79,197,137,.23);
  background: rgba(66,184,126,.11);
  color: #84ddb1;
}
.catalog-action.locked-action { border-color:rgba(255,255,255,.06);background:rgba(255,255,255,.025);color:#71847a; }
.catalog-action:disabled { opacity: .75; }

.starter-avatar-field {
  margin: 0 0 17px;
  padding: 0;
  border: 0;
}
.starter-avatar-field legend { margin-bottom: 8px; font-size: 10px; font-weight: 800; }
.starter-avatar-picker { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.starter-avatar-picker button {
  display: grid;
  place-items: center;
  min-height: 74px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  font-size: 24px;
}
.starter-avatar-picker button.selected { border-color:rgba(240,204,126,.56);background:rgba(216,169,87,.12);box-shadow:0 0 0 2px rgba(216,169,87,.06); }
.starter-avatar-picker span { margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 750; }
.starter-avatar-picker button.selected span { color:var(--accent-light); }

.terms-sheet-card { padding-right:20px;padding-left:20px; }
.terms-copy {
  max-height: 45dvh;
  margin-bottom: 16px;
  overflow-y: auto;
  color: #a4b5ac;
  font-size: 11px;
  line-height: 1.5;
}
.terms-copy p { margin: 0 0 10px; }
.terms-sheet-card .wide { width:100%; }

/* Progression and curated appearance bundles — v17 */
.statuses-entry-button {
  display:grid;
  grid-template-columns:46px minmax(0,1fr) auto;
  flex:0 0 auto;
  align-items:center;
  gap:12px;
  width:100%;
  min-height:70px;
  padding:10px 13px;
  border:1px solid rgba(240,204,126,.2);
  border-radius:18px;
  background:
    radial-gradient(circle at 9% 50%,rgba(216,169,87,.15),transparent 25%),
    rgba(255,255,255,.027);
  text-align:left;
}
.statuses-entry-button > span:first-child {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border:1px solid rgba(240,204,126,.34);
  border-radius:14px;
  background:linear-gradient(145deg,rgba(216,169,87,.22),rgba(85,54,24,.22));
  color:#f2ce79;
  font:900 14px Georgia,serif;
  letter-spacing:.08em;
}
.statuses-entry-button > span:nth-child(2) { display:block;min-width:0; }
.statuses-entry-button b,
.statuses-entry-button small { display:block; }
.statuses-entry-button b { font-size:13px; }
.statuses-entry-button small { margin-top:3px;color:#8fa198;font-size:9.5px;line-height:1.35; }
.statuses-entry-button > i { color:#d8b96f;font-size:25px;font-style:normal; }

.style-bundle-section {
  flex:0 0 auto;
  min-width:0;
  padding:14px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:20px;
  background:rgba(255,255,255,.022);
}
.style-bundle-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:11px;
}
.style-bundle-heading h2 { margin:0;font-size:17px; }
.style-bundle-heading > span {
  padding:5px 8px;
  border-radius:99px;
  background:rgba(216,169,87,.1);
  color:#c9aa66;
  font-size:9px;
  font-weight:850;
  white-space:nowrap;
}
.bundle-showcase {
  display:flex;
  gap:10px;
  min-width:0;
  padding:1px 1px 5px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
}
.bundle-showcase::-webkit-scrollbar { display:none; }
.bundle-showcase .catalog-loading { min-width:100%;padding:24px 12px; }
.bundle-card {
  position:relative;
  display:flex;
  width:min(76vw,285px);
  min-width:min(76vw,285px);
  flex-direction:column;
  overflow:hidden;
  padding:0;
  border:1px solid rgba(235,193,111,.2);
  border-radius:18px;
  background:#0a1611;
  box-shadow:0 10px 24px rgba(0,0,0,.2);
  scroll-snap-align:start;
  text-align:left;
}
.bundle-card.equipped { border-color:rgba(76,210,146,.48);box-shadow:0 0 0 1px rgba(76,210,146,.08),0 10px 24px rgba(0,0,0,.2); }
.bundle-card.partial .bundle-composite { filter:saturate(.85); }
.bundle-card-copy {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:3px 9px;
  padding:10px 12px 11px;
}
.bundle-card-copy b { overflow:hidden;font-size:13px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap; }
.bundle-card-copy small { grid-column:1 / -1;color:#83968c;font-size:9px; }
.bundle-card-copy i {
  grid-column:1;
  grid-row:3;
  align-self:center;
  margin-top:3px;
  color:#d7b96e;
  font-size:8.5px;
  font-style:normal;
  font-weight:800;
}
.bundle-composite {
  position:relative;
  width:100%;
  height:126px;
  overflow:hidden;
  background:
    radial-gradient(circle at 82% 10%,rgba(47,155,111,.26),transparent 32%),
    linear-gradient(145deg,#10241c,#07110d);
}
.bundle-composite[data-profile-theme="strategist"] {
  background:
    linear-gradient(120deg,transparent 0 64%,rgba(111,229,181,.1) 64% 66%,transparent 66%),
    linear-gradient(145deg,#164a39,#071b15);
}
.bundle-composite[data-profile-theme="professional"] {
  background:
    linear-gradient(135deg,transparent 0 72%,rgba(225,194,111,.13) 72% 74%,transparent 74%),
    linear-gradient(145deg,#1e3970,#080f20);
}
.bundle-composite[data-profile-theme="night"] { background:linear-gradient(145deg,#13264c,#080e20); }
.bundle-composite[data-profile-theme="malachite"] { background:linear-gradient(145deg,#12654e,#062b23); }
.bundle-composite[data-profile-theme="royal"] { background:linear-gradient(145deg,#4d286f,#160c27); }
.bundle-composite[data-profile-theme="fire"] { background:linear-gradient(145deg,#791e0c,#1e0704); }
.bundle-composite[data-profile-theme="cosmos"] { background:radial-gradient(circle at 82% 12%,#7747b0,#101630 48%,#050711); }
.bundle-composite-board {
  position:absolute;
  inset:10px 39% 10px 10px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  align-items:start;
  gap:2px;
  overflow:hidden;
  padding:6px;
  border:3px solid #82572d;
  border-radius:10px;
  background:#07503b;
  box-shadow:inset 0 0 16px rgba(0,0,0,.5),0 7px 15px rgba(0,0,0,.25);
}
.bundle-composite-board i {
  height:44%;
  background:#d8b664;
  clip-path:polygon(0 0,100% 0,50% 100%);
}
.bundle-composite-board i:nth-child(n+5) { align-self:end;transform:rotate(180deg); }
.bundle-composite-board i:nth-child(even) { background:#073c30; }
.bundle-composite-board[data-theme="ocean"] { border-color:#1c6572;background:#052d3a; }
.bundle-composite-board[data-theme="ocean"] i:nth-child(odd) { background:#35dbd2; }
.bundle-composite-board[data-theme="fireice"] { border-color:#6b301e;background:linear-gradient(90deg,#447f98 0 50%,#27100c 50%); }
.bundle-composite-board[data-theme="fireice"] i:nth-child(odd) { background:#bdf7ff; }
.bundle-composite-board[data-theme="fireice"] i:nth-child(even) { background:#ff6b18; }
.bundle-composite-board[data-theme="egypt"] { border-color:#cba94d;background:#102a78; }
.bundle-composite-board[data-theme="egypt"] i:nth-child(odd) { background:#d8b65c; }
.bundle-composite-board[data-theme="galaxy"] { border-color:#8a77ae;background:#090919; }
.bundle-composite-board[data-theme="galaxy"] i:nth-child(odd) { background:#9c64d2; }
.bundle-composite-board[data-theme="artdeco"] { border-color:#e5c46b;background:#0f5943; }
.bundle-composite-board[data-theme="steampunk"] { border-color:#c99c54;background:#5f351d; }
.bundle-composite-board[data-theme="royal"] { border-color:#e0bd5e;background:#2d185f; }

/* Catalog v4: every board SKU has its own material and point palette. */
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="emerald"] {
  border-color:#a67838;background:linear-gradient(145deg,#12684f,#033427);
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="emerald"] i:nth-child(odd) { background:#dfbd68; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="emerald"] i:nth-child(even) { background:#07503d; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="oak"] {
  border-color:#8c542a;background:repeating-linear-gradient(100deg,#6f3d1f 0 9px,#512914 9px 18px);
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="oak"] i:nth-child(odd) { background:#e7c483; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="oak"] i:nth-child(even) { background:#4f2713; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="jade"] {
  border-color:#bfae66;background:radial-gradient(circle at 70% 20%,#79ba96,#174b3b 62%);
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="jade"] i:nth-child(odd) { background:#e5d59a; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="jade"] i:nth-child(even) { background:#1f6b51; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="constellation"] {
  border-color:#d2b866;background:radial-gradient(circle at 76% 20%,#304d9a 0 2px,transparent 3px),radial-gradient(circle at 28% 66%,#d9c978 0 1px,transparent 2px),#07112d;
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="constellation"] i:nth-child(odd) { background:#e6c76d; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="constellation"] i:nth-child(even) { background:#31549f; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="grandmaster"] {
  border-color:#d7b966;background:linear-gradient(145deg,#5b1b22,#16070b);
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="grandmaster"] i:nth-child(odd) { background:#e4c475; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="grandmaster"] i:nth-child(even) { background:#731f27; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="marble"] {
  border-color:#827d70;background:linear-gradient(118deg,#faf9f3 0 36%,#c9cbc8 37% 39%,#eeece6 40% 72%,#a8aaa7 73% 75%,#f6f4ee 76%);
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="marble"] i:nth-child(odd) { background:#1f2424; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="marble"] i:nth-child(even) { background:#d5d2c8; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="vineyard"] {
  border-color:#9b7040;background:linear-gradient(145deg,#604125,#28170d);
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="vineyard"] i:nth-child(odd) { background:#4d8c4d; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="vineyard"] i:nth-child(even) { background:#713c73; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="steampunk"] {
  border-color:#c99c54;background:radial-gradient(circle at 24% 28%,#b98745 0 5px,transparent 6px),linear-gradient(145deg,#754526,#2a160d);
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="steampunk"] i:nth-child(odd) { background:#d7ad65; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="steampunk"] i:nth-child(even) { background:#54301d; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="royal"] {
  border-color:#e0bd5e;background:linear-gradient(145deg,#1b3988,#080d2a);
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="royal"] i:nth-child(odd) { background:#e0bd5e; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="royal"] i:nth-child(even) { background:#101c52; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="ocean"] {
  border-color:#42c9ca;background:radial-gradient(circle at 72% 18%,rgba(82,255,246,.42),transparent 28%),#032430;
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="ocean"] i:nth-child(odd) { background:#39dfd6; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="ocean"] i:nth-child(even) { background:#1957b2; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="fire_ice"] {
  border-color:#925032;background:linear-gradient(90deg,#d9f7fa 0 50%,#1e0b08 50%);
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="fire_ice"] i:nth-child(odd) { background:#68b8d0; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="fire_ice"] i:nth-child(even) { background:#ff6b18; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="cyber"] {
  border-color:#39e6f2;background:linear-gradient(135deg,#041d2a,#08040f 48%,#241038);
  box-shadow:inset 0 0 16px rgba(37,247,255,.25),0 0 14px rgba(255,59,212,.24);
}
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="cyber"] i:nth-child(odd) { background:#42fff4; }
:is(.catalog-preview-board,.bundle-composite-board)[data-theme="cyber"] i:nth-child(even) { background:#ff3bd4; }

.bundle-composite-avatar {
  position:absolute;
  top:16px;
  right:19px;
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  border-radius:50%;
  color:#f2d383;
  font-size:18px;
}
.bundle-composite .bundle-composite-dice,
.bundle-composite .bundle-composite-checker {
  position:absolute;
  bottom:14px;
  width:36px;
  height:36px;
  margin:0;
  font-size:17px;
}
.bundle-composite .bundle-composite-dice { right:53px;border-width:2px;border-radius:10px;transform:rotate(-8deg); }
.bundle-composite .bundle-composite-checker { right:13px;border-width:2px;font-size:12px; }
.bundle-composite.large { height:184px;border-radius:18px; }
.bundle-composite.large .bundle-composite-board { inset:14px 36% 14px 14px; }
.bundle-composite.large .bundle-composite-avatar { top:22px;right:25px;width:68px;height:68px;font-size:23px; }
.bundle-composite.large .bundle-composite-dice,
.bundle-composite.large .bundle-composite-checker { bottom:20px;width:47px;height:47px; }
.bundle-composite.large .bundle-composite-dice { right:70px; }
.bundle-composite.large .bundle-composite-checker { right:18px; }

.statuses-screen {
  display:flex;
  height:100dvh;
  flex-direction:column;
  gap:13px;
  overflow-y:auto;
  overscroll-behavior:contain;
}
.statuses-hero,
.statuses-list-heading,
.statuses-list {
  flex:0 0 auto;
}
.statuses-header {
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  flex:0 0 auto;
}
.statuses-completed-badge {
  align-self:center;
  padding:7px 10px;
  border:1px solid rgba(240,204,126,.27);
  border-radius:12px;
  background:rgba(216,169,87,.09);
  color:#ebca79;
  font-size:11px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.statuses-hero {
  position:relative;
  display:grid;
  grid-template-columns:62px minmax(0,1fr) auto;
  gap:12px;
  overflow:hidden;
  padding:17px;
  border:1px solid rgba(236,194,111,.28);
  border-radius:23px;
  background:
    radial-gradient(circle at 92% 0,rgba(39,151,104,.37),transparent 38%),
    linear-gradient(145deg,rgba(216,169,87,.16),rgba(255,255,255,.025));
  box-shadow:0 14px 32px rgba(0,0,0,.2);
}
.statuses-hero::after {
  position:absolute;
  right:-38px;
  bottom:-69px;
  width:150px;
  height:150px;
  border:1px solid rgba(240,204,126,.13);
  border-radius:50%;
  content:"";
}
.statuses-hero-level {
  position:relative;
  z-index:1;
  display:grid;
  place-items:center;
  width:58px;
  height:58px;
  border:1px solid rgba(240,204,126,.4);
  border-radius:18px;
  background:linear-gradient(145deg,#e0b660,#7d5225);
  color:#102018;
  font:900 22px Georgia,serif;
  box-shadow:0 8px 19px rgba(0,0,0,.25);
}
.statuses-hero-copy { position:relative;z-index:1;min-width:0; }
.statuses-hero-copy p { margin:0 0 3px;color:#c6a45f;font-size:8.5px;font-weight:900;letter-spacing:.13em; }
.statuses-hero-copy h2 { margin:0;font-size:21px; }
.statuses-hero-wins {
  position:relative;
  z-index:1;
  min-width:76px;
  padding:8px 9px;
  border:1px solid rgba(255,255,255,.065);
  border-radius:13px;
  background:rgba(0,0,0,.13);
  text-align:right;
}
.statuses-hero-wins small { display:block;color:#758a7f;font-size:8px;font-weight:850;line-height:1.2; }
.statuses-hero-wins b { display:block;margin-top:4px;color:#f0cc7e;font-size:18px; }
.statuses-hero-progress { position:relative;z-index:1;grid-column:1 / -1; }
.statuses-hero-progress > div { display:flex;justify-content:space-between;gap:9px;margin-bottom:6px;color:#a6b8af;font-size:9px; }
.statuses-hero-progress > div b { color:#e5c372;font-variant-numeric:tabular-nums; }
.statuses-hero-progress > span,
.status-card-progress > i {
  display:block;
  height:7px;
  overflow:hidden;
  border-radius:99px;
  background:rgba(255,255,255,.08);
}
.statuses-hero-progress > span i,
.status-card-progress > i b {
  display:block;
  width:0;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#b67d31,#f3d985);
  box-shadow:0 0 12px rgba(238,194,102,.35);
}
.statuses-list-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  margin-top:2px;
}
.statuses-list-heading h2 { margin:0;font-size:19px; }
.statuses-list-heading p { margin:3px 0 0;color:#83968c;font-size:9px;line-height:1.35; }
.statuses-list {
  display:grid;
  gap:9px;
  padding-bottom:max(15px,env(safe-area-inset-bottom));
}
.status-level-card {
  position:relative;
  display:grid;
  grid-template-columns:43px minmax(0,1fr);
  gap:10px;
  min-width:0;
  padding:13px;
  border:1px solid rgba(255,255,255,.055);
  border-radius:18px;
  background:rgba(255,255,255,.025);
}
.status-level-card.current {
  border-color:rgba(240,204,126,.43);
  background:
    radial-gradient(circle at 95% 5%,rgba(43,151,106,.2),transparent 31%),
    linear-gradient(145deg,rgba(216,169,87,.12),rgba(255,255,255,.025));
  box-shadow:0 10px 26px rgba(0,0,0,.18);
}
.status-level-card.complete { border-color:rgba(67,191,130,.19); }
.status-level-card.locked { opacity:.67; }
.status-level-number {
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:13px;
  background:rgba(0,0,0,.16);
  color:#809288;
  font:900 13px Georgia,serif;
}
.status-level-card.current .status-level-number { border-color:rgba(240,204,126,.44);background:rgba(216,169,87,.15);color:#f1ce78; }
.status-level-card.complete .status-level-number { border-color:rgba(64,194,130,.3);background:rgba(49,161,106,.11);color:#80d7ad; }
.status-level-copy { min-width:0; }
.status-level-copy > div:first-child { display:flex;align-items:center;justify-content:space-between;gap:9px; }
.status-level-copy h3 { margin:0;font-size:15px; }
.status-level-copy > div:first-child > span {
  flex:0 0 auto;
  padding:4px 7px;
  border-radius:99px;
  background:rgba(255,255,255,.045);
  color:#71847a;
  font-size:8px;
  font-weight:900;
  letter-spacing:.04em;
}
.status-level-card.current .status-level-copy > div:first-child > span { background:rgba(216,169,87,.14);color:#e9c875; }
.status-level-card.complete .status-level-copy > div:first-child > span { background:rgba(49,161,106,.12);color:#79cfa7; }
.status-level-copy > b { display:block;margin-top:4px;color:#c8a95f;font-size:9px;font-weight:800; }
.status-level-copy > p { margin:4px 0 0;color:#8fa198;font-size:9.5px;line-height:1.4; }
.status-level-rewards {
  grid-column:2;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
  padding-top:2px;
}
.status-level-rewards > small { width:100%;color:#677b70;font-size:8px;font-weight:900;letter-spacing:.08em; }
.status-reward {
  display:inline-flex;
  min-width:0;
  min-height:31px;
  align-items:center;
  gap:6px;
  padding:5px 8px;
  border:1px solid rgba(240,204,126,.14);
  border-radius:10px;
  background:rgba(216,169,87,.055);
  color:#bdc9c2;
  font-size:8.5px;
  text-align:left;
}
button.status-reward { cursor:pointer; }
.status-reward i {
  display:grid;
  place-items:center;
  width:19px;
  height:19px;
  flex:0 0 19px;
  border-radius:7px;
  background:rgba(216,169,87,.12);
  color:#e0bc6b;
  font-size:10px;
  font-style:normal;
}
.status-reward.locked { border-color:rgba(255,255,255,.05);background:rgba(255,255,255,.02);color:#6f8177; }
.status-reward.locked i { background:rgba(255,255,255,.04);color:#75877d; }
.status-reward-empty { color:#74877c; }
.status-card-progress { display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;margin-top:8px; }
.status-card-progress > span { color:#d6b96d;font-size:8.5px;font-weight:850;font-variant-numeric:tabular-nums; }
.status-card-progress > i { height:5px; }

.bundle-preview-sheet-card {
  max-height:min(92dvh,760px);
  padding-right:17px;
  padding-left:17px;
  overflow-y:auto;
}
.bundle-preview-visual { margin-bottom:14px; }
.bundle-preview-heading { display:flex;align-items:flex-start;justify-content:space-between;gap:10px; }
.bundle-preview-heading h2 { margin:0;font-size:21px; }
.bundle-preview-heading > span {
  flex:0 0 auto;
  padding:5px 8px;
  border:1px solid rgba(240,204,126,.2);
  border-radius:99px;
  background:rgba(216,169,87,.08);
  color:#d4b769;
  font-size:8.5px;
  font-weight:850;
}
.bundle-preview-description { margin:6px 0 12px;color:#93a69c;font-size:10px;line-height:1.45; }
.bundle-preview-items { display:grid;gap:6px;margin-bottom:12px; }
.bundle-item-row {
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto auto;
  align-items:center;
  gap:8px;
  min-height:48px;
  padding:7px 8px;
  border:1px solid rgba(255,255,255,.05);
  border-radius:13px;
  background:rgba(255,255,255,.025);
}
.bundle-item-row > span {
  display:grid;
  place-items:center;
  width:31px;
  height:31px;
  border-radius:10px;
  background:rgba(216,169,87,.09);
  color:#e5c474;
  font-size:14px;
}
.bundle-item-row > div { min-width:0; }
.bundle-item-row small,
.bundle-item-row b { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.bundle-item-row small { color:#708379;font-size:8px;font-weight:850;letter-spacing:.06em;text-transform:uppercase; }
.bundle-item-row b { margin-top:2px;font-size:10px; }
.bundle-item-row > i {
  color:#7d9086;
  font-size:8px;
  font-style:normal;
  font-weight:800;
  white-space:nowrap;
}
.bundle-item-row.owned > i { color:#7bcda5; }
.bundle-item-row.equipped > i { color:#e3c271; }
.bundle-item-row > button {
  min-width:54px;
  min-height:31px;
  padding:0 8px;
  border:1px solid rgba(240,204,126,.24);
  border-radius:9px;
  background:rgba(216,169,87,.09);
  color:#e4c476;
  font-size:8.5px;
  font-weight:850;
}
.bundle-item-row > button:disabled { border-color:rgba(255,255,255,.05);background:rgba(255,255,255,.025);color:#6d8076; }
.bundle-preview-sheet-card > .primary {
  width:100%;
  min-height:46px;
}
.bundle-preview-sheet-card > .primary:disabled { opacity:.55; }
.bundle-close-button {
  width:100%;
  min-height:42px;
  margin-top:7px;
  border:0;
  background:transparent;
  color:#8ea097;
  font-size:10px;
  font-weight:800;
}
.catalog-card.catalog-focus {
  border-color:rgba(240,204,126,.75);
  box-shadow:0 0 0 3px rgba(216,169,87,.12),0 12px 30px rgba(0,0,0,.26);
  animation:catalog-focus-pulse .7s ease-in-out 2;
}
@keyframes catalog-focus-pulse {
  50% { transform:translateY(-3px);box-shadow:0 0 0 5px rgba(216,169,87,.14),0 16px 34px rgba(0,0,0,.3); }
}

@media (max-width: 430px) {
  .profile-name-line i { max-width: 72px; }
  .profile-competitive > small { max-width: 88px; }
  .balance-pill { min-width: 77px; padding-right: 8px; padding-left: 8px; }
  .rating-screen .leader-row {
    grid-template-columns: 27px 31px minmax(0,1fr) auto;
    gap: 6px;
    padding-right: 8px;
    padding-left: 8px;
  }
  .leader-score { min-width: 76px; }
  .leader-score > span { gap: 1px; font-size: 8px; }
  .leaderboard-me-stats small { font-size: 8px; letter-spacing: 0; }
  .customization-tabs button { min-height: 44px; font-size: 11px; }
  .collection-filters button { font-size: 10.5px; }
  .catalog-card { min-height: 278px; padding-right: 8px; padding-left: 8px; }
  .catalog-preview { width: 96px; height: 96px; }
  .catalog-preview-board { width: 124px; height: 84px; }
  .catalog-preview-board i { height: 60px; }
  .catalog-preview-dice,
  .catalog-preview-checker { width: 86px; height: 86px; }
  .catalog-preview-profile { width: 124px; height: 82px; }
  .catalog-action { padding-right: 4px; padding-left: 4px; font-size: 9px; }
  .wallet-balance-hero { padding: 17px; }
  .wallet-coin-mark { width: 62px; height: 62px; flex-basis: 62px; }
  .statuses-hero { grid-template-columns:54px minmax(0,1fr); }
  .statuses-hero-level { width:50px;height:50px; }
  .statuses-hero-wins { grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;text-align:left; }
  .bundle-item-row { grid-template-columns:31px minmax(0,1fr) auto; }
  .bundle-item-row > i { display:none; }
}

@media (orientation: landscape) and (max-height: 600px) {
  .wallet-screen {
    display: grid;
    grid-template-columns: minmax(280px,.9fr) minmax(340px,1.1fr);
    grid-template-rows: auto auto auto minmax(0,1fr);
    align-content: start;
    gap: 10px 14px;
  }
  .wallet-header { grid-column:1 / -1;grid-row:1; }
  .wallet-balance-hero { grid-column:1;grid-row:2;min-height:112px;padding:15px; }
  .wallet-coin-mark { width:58px;height:58px;flex-basis:58px;font-size:27px; }
  .wallet-refill-card { grid-column:1;grid-row:3;padding:13px; }
  .wallet-stars-card { grid-column:2;grid-row:2 / 5;padding:13px; }
  .wallet-purchase-card { grid-column:1;grid-row:4;padding:13px; }
  .wallet-stars-main { min-height:44px;margin-top:10px; }
  .wallet-topup-label { margin-top:11px; }
  .profile-style-screen {
    display: grid;
    grid-template-columns: minmax(270px,.78fr) minmax(390px,1.22fr);
    grid-template-rows: auto auto auto auto minmax(0,1fr);
    align-content: stretch;
    gap: 7px 14px;
    overflow: hidden;
  }
  .style-header { grid-column:1 / -1;grid-row:1; }
  .style-profile-hero {
    grid-column:1;
    grid-row:2;
    align-self:start;
    flex-direction:row;
    justify-content:center;
    padding:11px;
    text-align:left;
  }
  .style-profile-avatar { width:56px;height:56px; }
  .style-name-row { justify-content:flex-start;flex-wrap:wrap; }
  .style-competitive-stats { margin:5px 0 6px; }
  .style-competitive-stats > span { padding:5px 4px; }
  .style-profile-copy > small { margin-top:4px;font-size:8.5px; }
  .statuses-entry-button {
    grid-column:1;
    grid-row:3;
    width:100%;
    min-height:46px;
    padding:5px 8px;
  }
  .statuses-entry-button > span:first-child { width:34px;height:34px;border-radius:11px;font-size:11px; }
  .statuses-entry-button small { display:none; }
  .style-bundle-section {
    grid-column:1;
    grid-row:4 / 6;
    min-height:100px;
    overflow:hidden;
    padding:9px;
  }
  .style-bundle-heading { margin-bottom:6px; }
  .style-bundle-heading h2 { font-size:13px; }
  .style-bundle-heading .eyebrow,
  .style-bundle-heading > span { display:none; }
  .bundle-showcase { height:59px; }
  .bundle-card { width:210px;min-width:210px;height:58px; }
  .bundle-showcase .bundle-composite { display:none; }
  .bundle-card-copy { height:100%;align-content:center;padding:7px 9px; }
  .bundle-card-copy small { font-size:8px; }
  .bundle-card-copy i { display:none; }
  .customization-tabs {
    grid-column:2;
    grid-row:2;
    grid-template-columns:repeat(5,minmax(0,1fr));
    margin:0;
    padding:0 0 2px;
  }
  .customization-tabs button { min-height:34px;padding:0 10px;font-size:10px; }
  .stars-consent { grid-column:2;grid-row:3;padding:6px 8px; }
  .stars-consent p { display:none; }
  .catalog-heading { grid-column:2;grid-row:4; }
  .collection-filters {
    grid-template-columns:repeat(4,minmax(0,1fr));
    width:390px;
    max-width:100%;
    margin-top:5px;
  }
  .collection-filters button { min-height:28px;padding:0 7px;font-size:9.5px; }
  .customization-catalog {
    grid-column:2;
    grid-row:5;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
    min-height:0;
    padding:0 2px 8px 0;
    overflow-y:auto;
  }
  .catalog-card { min-height:218px;padding:8px 7px 7px; }
  .catalog-preview { width:60px;height:60px;margin:1px auto 8px;font-size:25px; }
  .catalog-preview-board { width:82px;height:56px;padding:5px; }
  .catalog-preview-board i { height:40px; }
  .catalog-preview-dice { width:56px;height:56px; }
  .catalog-preview-checker { width:56px;height:56px; }
  .catalog-preview-profile { width:82px;height:56px;padding:7px; }
  .catalog-card-copy b { min-height:25px;font-size:11px;line-height:1.15; }
  .catalog-item-description { min-height:23px;margin-top:3px;font-size:8.5px;line-height:1.32; }
  .catalog-card-copy small { margin-top:3px;font-size:8px; }
  .catalog-action { min-height:32px;font-size:8.5px; }
  .statuses-screen {
    display:grid;
    grid-template-columns:minmax(270px,.75fr) minmax(410px,1.25fr);
    grid-template-rows:auto auto minmax(0,1fr);
    align-content:stretch;
    gap:8px 14px;
    overflow:hidden;
  }
  .statuses-header { grid-column:1 / -1;grid-row:1; }
  .statuses-hero { grid-column:1;grid-row:2;grid-template-columns:54px minmax(0,1fr);padding:12px; }
  .statuses-hero-copy h2 { font-size:17px; }
  .statuses-hero-wins {
    grid-column:1 / -1;
    display:flex;
    align-items:center;
    justify-content:space-between;
    text-align:left;
  }
  .statuses-list-heading {
    z-index:2;
    grid-column:2;
    grid-row:2;
    align-self:start;
    padding-bottom:8px;
    background:linear-gradient(180deg,var(--bg) 76%,transparent);
  }
  .statuses-list {
    grid-column:2;
    grid-row:2 / 4;
    min-height:0;
    overflow-y:auto;
    padding:58px 2px 8px 0;
  }
  .status-level-card {
    grid-template-columns:35px minmax(0,1fr) minmax(150px,.85fr);
    gap:8px;
    padding:8px 9px;
    border-radius:14px;
  }
  .status-level-number { width:32px;height:32px;border-radius:10px;font-size:10px; }
  .status-level-copy h3 { font-size:12px; }
  .status-level-copy > p {
    display:-webkit-box;
    overflow:hidden;
    font-size:8.5px;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:1;
  }
  .status-level-rewards { grid-column:3;align-content:start;padding:0; }
  .status-level-rewards > small { font-size:8px; }
  .status-reward { min-height:27px;padding:3px 6px;font-size:8px; }
  .status-reward i { width:17px;height:17px;flex-basis:17px;font-size:9px; }
  .status-card-progress { margin-top:5px; }
  .bundle-preview-sheet-card {
    display:grid;
    grid-template-columns:minmax(245px,.8fr) minmax(360px,1.2fr);
    grid-template-rows:auto auto auto minmax(0,1fr) auto;
    gap:6px 14px;
    width:min(900px,calc(100% - 20px));
    max-width:900px;
    max-height:calc(100dvh - 8px);
    padding:8px 12px max(8px,env(safe-area-inset-bottom));
    border-radius:20px 20px 0 0;
    overflow:hidden;
  }
  .bundle-preview-sheet-card .sheet-handle { grid-column:1 / -1;margin-bottom:3px; }
  .bundle-preview-visual { grid-column:1;grid-row:2 / 6;align-self:stretch;margin:0; }
  .bundle-preview-visual .bundle-composite.large { height:100%;min-height:210px; }
  .bundle-preview-heading { grid-column:2;grid-row:2; }
  .bundle-preview-heading h2 { font-size:17px; }
  .bundle-preview-description { grid-column:2;grid-row:3;margin:0;font-size:8.5px; }
  .bundle-preview-items { grid-column:2;grid-row:4;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;min-height:0;margin:0;overflow-y:auto; }
  .bundle-item-row { grid-template-columns:28px minmax(0,1fr) auto;min-height:42px;padding:5px; }
  .bundle-item-row > span { width:27px;height:27px;font-size:12px; }
  .bundle-item-row > i { display:none; }
  .bundle-item-row > button { min-width:48px;min-height:27px;padding:0 6px;font-size:8px; }
  .bundle-preview-sheet-card > .primary { grid-column:2;grid-row:5;width:auto;min-height:38px;margin-right:88px; }
  .bundle-close-button { grid-column:2;grid-row:5;justify-self:end;width:80px;min-height:38px;margin:0; }
}

/* Readability gate: progression and bundle copy must stay legible in Telegram. */
.statuses-entry-button small,
.bundle-card-copy small,
.bundle-card-copy i,
.statuses-hero-progress > div,
.statuses-list-heading p,
.status-level-copy > p,
.bundle-preview-description {
  font-size:11px;
}
.style-bundle-heading > span,
.statuses-hero-copy p,
.statuses-hero-wins small,
.status-level-copy > div:first-child > span,
.status-level-copy > b,
.status-level-rewards > small,
.status-card-progress > span,
.bundle-item-row small,
.bundle-item-row > i {
  font-size:10px;
}
.status-reward,
.bundle-item-row b,
.bundle-item-row > button {
  font-size:11px;
}
.bundle-card-copy b { font-size:14px; }
.style-competitive-stats small {
  min-height:22px;
  overflow:visible;
  font-size:9.5px;
  line-height:1.15;
  text-overflow:clip;
  white-space:normal;
}
.bundle-item-row > button {
  min-width:72px;
  min-height:34px;
}

@media (orientation:landscape) and (max-height:600px) {
  .bundle-card-copy small,
  .status-level-copy > p,
  .bundle-preview-description,
  .bundle-item-row b,
  .bundle-item-row > button {
    font-size:10px;
  }
  .status-level-copy > div:first-child > span,
  .status-level-copy > b,
  .status-level-rewards > small,
  .status-reward,
  .bundle-item-row small {
    font-size:9.5px;
  }
  .bundle-card-copy b,
  .status-level-copy h3 {
    font-size:12px;
  }
  .status-reward {
    min-height:30px;
    padding:4px 7px;
  }
  .bundle-item-row > button {
    min-width:64px;
    min-height:31px;
  }
}

/* Compact landscape still runs on a phone: keep copy and tap targets readable. */
@media (orientation:landscape) and (max-height:600px) {
  .style-catalog-pane {
    display:grid;
    grid-column:2;
    grid-row:2 / 6;
    grid-template-rows:auto auto auto minmax(0,1fr);
    gap:7px;
    min-height:0;
    overflow:hidden;
  }
  .style-catalog-pane > .customization-tabs {
    grid-column:1;
    grid-row:1;
    align-self:start;
  }
  .style-catalog-pane > .stars-consent {
    grid-column:1;
    grid-row:2;
  }
  .style-catalog-pane > .catalog-heading {
    grid-column:1;
    grid-row:3;
  }
  .style-catalog-pane > .customization-catalog {
    grid-column:1;
    grid-row:4;
  }
  .tournaments-hero p,
  .tournaments-list-heading p,
  .tournament-card-status,
  .tournament-card-arrow,
  .tournament-card-top i,
  .tournament-card-top em,
  .tournament-detail-hero-copy span,
  .tournament-rewards-card p,
  .tournament-detail-actions > small,
  .tournament-unavailable p {
    font-size:10px;
    line-height:1.3;
  }
  .tournaments-hero > b {
    padding:5px 8px;
    font-size:10px;
  }
  .tournament-fee-filters {
    gap:7px;
  }
  .tournament-fee-filters button {
    min-height:40px;
    padding:0 9px;
    font-size:11px;
  }
  .tournament-card {
    min-height:174px;
    padding:11px;
  }
  .tournament-card-title {
    font-size:13px;
    line-height:1.25;
  }
  .tournament-card-details {
    gap:5px;
  }
  .tournament-card-details > span {
    padding:6px 5px;
  }
  .tournament-card-details small {
    font-size:9px;
  }
  .tournament-card-details b {
    font-size:10.5px;
  }
  .tournament-detail-actions > button,
  .tournament-match-top button {
    min-height:42px;
    font-size:11px;
  }
  .tournament-match {
    padding:8px;
  }
  .tournament-match-player {
    min-height:36px;
    grid-template-columns:28px minmax(0,1fr) auto;
    font-size:10.5px;
  }
  .tournament-match-player > span {
    width:27px;
    height:27px;
  }

  .style-profile-copy > small,
  .style-competitive-stats small {
    font-size:10.5px;
  }
  .customization-tabs button {
    min-height:42px;
    padding:0 8px;
    font-size:11px;
  }
  .collection-filters button {
    min-height:38px;
    padding:0 9px;
    font-size:11px;
  }
  .customization-catalog {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
  }
  .catalog-card {
    min-height:262px;
    padding:10px 9px 9px;
  }
  .catalog-preview {
    width:76px;
    height:76px;
    margin:3px auto 9px;
    font-size:30px;
  }
  .catalog-preview-board {
    width:110px;
    height:75px;
    padding:6px;
  }
  .catalog-preview-board i {
    height:53px;
  }
  .catalog-preview-dice,
  .catalog-preview-checker {
    width:72px;
    height:72px;
  }
  .catalog-preview-profile {
    width:108px;
    height:73px;
    padding:8px;
  }
  .catalog-card-copy b {
    min-height:29px;
    font-size:12.5px;
  }
  .catalog-item-description {
    min-height:31px;
    margin-top:4px;
    font-size:10.5px;
    line-height:1.38;
  }
  .catalog-card-copy small {
    margin-top:4px;
    font-size:10px;
  }
  .catalog-action {
    min-height:42px;
    font-size:11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior:auto !important;
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}

/* The Yandex Games build has its own platform shell. Telegram commerce is
   intentionally absent there until Yandex in-game purchases are integrated. */
body[data-platform="yandex"] #openStoreButton,
body[data-platform="yandex"] #walletFromStyleButton,
body[data-platform="yandex"] #starsConsent,
body[data-platform="yandex"] #digitalTermsSheet {
  display:none !important;
}

body[data-platform="yandex"] [data-avatar-collection="code"] {
  display:none !important;
}

body[data-platform="yandex"] .profile-card {
  grid-template-columns:1fr;
}

/* Atelier: quiet materials, readable play controls, stable portrait geometry. */
.board-stage { align-items:center; }
.board-shell { flex:none; border-radius:14px; box-shadow:0 12px 32px #0008; }
.game-header .icon-button { flex:none; min-width:44px; min-height:44px; }
.game-title p { font-size:10px; }
.players { background:linear-gradient(120deg,#15261fff,#101a16ff); }
.player { transition:opacity .2s; }
.player b { font-size:13px; }
.player small { font-size:10px; }
.player.active .player-avatar { box-shadow:0 0 0 2px #e4c47c,0 3px 12px #0005; }
.game-screen .actions .primary { box-shadow:inset 0 1px 0 #fff8,0 4px 12px #0003; }
.game-screen .actions button:active:not(:disabled) { transform:translateY(1px); }
.dice-remaining { display:flex; align-items:center; justify-content:center; gap:6px; min-height:28px; flex:none; }
.dice-remaining[hidden] { display:none; }
.dice-remaining::before { content:"Осталось ходов"; color:var(--muted); font-size:12px; margin-right:5px; }
.dice-remaining span { display:grid; place-items:center; width:26px; height:26px; border-radius:7px; background:#f3dfae; color:#302719; font-size:15px; font-weight:800; box-shadow:inset 0 -2px 0 #c6a967; }
.theme-option:disabled { opacity:.35; cursor:not-allowed; }
.ranking-toolbar { display:flex; align-items:center; gap:10px; margin:16px 0; }
.ranking-tabs { display:flex; flex:1; padding:4px; border:1px solid var(--line); background:#06110d; border-radius:16px; }
.ranking-tabs button { flex:1; min-height:44px; border:0; border-radius:12px; background:transparent; color:var(--muted); font:inherit; font-size:14px; font-weight:750; }
.ranking-tabs button.selected { background:#e7c77e; color:#17221b; box-shadow:0 2px 8px #0003; }
#leaderboardMore { display:block; width:100%; min-height:48px; margin:16px 0; font-size:14px; border:1px solid var(--line); border-radius:14px; }
#leaderboardMore[hidden] { display:none; }
.leader-name b { overflow-wrap:anywhere; }
.leader-row.is-me { border-color:#dec17980; }
@media (orientation:landscape) and (max-height:600px) {
  .game-screen { grid-template-rows:auto auto auto 1fr auto; }
  .dice-remaining { grid-column:2; grid-row:3; }
  .game-screen .hint { grid-row:4; }
  .game-screen .actions { grid-row:5; }
  .rating-screen { display:block; overflow-y:auto; }
  .rating-screen .leaderboard { overflow:visible; }
  .rating-screen .leaderboard-me-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-height:640px) and (orientation:portrait) {
  .dice-remaining { min-height:22px; }
  .dice-remaining span { width:22px; height:22px; font-size:13px; }
}
