/* Единая шкала интерфейса: текст 12/14/16/18, шаг отступов 4, touch-target от 44px. */
:root {
  --bg: #0b0c0e;
  --paper: #16181c;
  --paper-raised: #22252a;
  --ink: #f4f5ef;
  --muted: #aeb3bc;
  --line: #33373e;
  --accent: #d7fe39;
  --accent-deep: #bbdc30;
  --accent-soft: #d7fe3912;
  --danger: #ff8e9b;
  --green: #7ee4a1;
  --violet: #c5a5dd;
  --shell: var(--bg);
  --shell-text: var(--ink);
  --dark: #101216;
  --lime: var(--accent);
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  --header-h: 80px;
  --nav-h: 68px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --control-h: 48px;
  --touch-h: 44px;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --title-sm: 20px;
  --title-md: 24px;
  --title-lg: 28px;
  --title-xl: 32px;
  --title-hero: 36px;
  --border: 1px solid var(--line);
  --motion-fast: 150ms;
  --line-body: 1.5;
  --shadow: 0 12px 32px #0004;
  font-family: "CC Sans", Arial, sans-serif;
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.5;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}
/* Базовые компоненты и состояния. Замещённые свойства удалены при консолидации 2.9. */
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
button {
  font: inherit;
  color: inherit;
}
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
  outline-offset: 4px;
}
button {
  cursor: pointer;
  min-height: var(--touch-h);
  max-width: 100%;
  border: 0;
  background: none;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.3;
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}
a:hover {
  color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
}
#main:focus {
  outline: none;
}
img {
  max-width: 100%;
  display: block;
}
svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
ul,
ol {
  padding-left: 24px;
}
mark {
  color: inherit;
  background: transparent;
  border-bottom: 2px solid var(--accent);
  padding: 0 1px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
.muted {
  color: var(--muted);
}
.primary,
.secondary,
a.primary,
a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-h);
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.4;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.text-button {
  font-weight: 700;
}
.icon-button {
  align-items: center;
  justify-content: center;
}
.wide {
  width: 100%;
}
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.actions > * {
  max-width: 100%;
}
.panel h2 {
  margin-bottom: 20px;
  font-size: 23px;
}
.panel h3 {
  margin: 24px 0 12px;
}
.section-heading {
  flex-wrap: wrap;
}
.page-heading {
  padding: 12px 0 32px;
}
.page-heading h1 {
  white-space: pre-line;
}
.page-heading h1 small {
  font-size: var(--title-sm);
  color: var(--muted);
  font-weight: 400;
}
.empty {
  padding: 48px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
}
.empty h1,
.empty h2 {
  color: var(--ink);
  margin-bottom: 16px;
}
.empty > span {
  display: block;
  font-size: 40px;
  margin-bottom: 12px;
}
.empty .actions {
  justify-content: center;
}
.empty p {
  max-width: 540px;
  margin: 0 auto 20px;
}
.loading {
  padding: 32px;
  color: var(--muted);
}
.notice {
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #6b6035;
  border-radius: var(--radius-sm);
  color: #e6dba6;
  background: #272319;
  font-size: var(--text-sm);
}
.error,
#form-error {
  color: var(--danger);
  font-size: var(--text-sm);
}
#form-error:not(:empty) {
  margin: 16px 0;
}
.brand:hover {
  color: var(--ink);
}
.age-mark {
  display: inline-flex;
  border: 1px solid #3a3c42;
  color: var(--muted);
  border-radius: 20px;
  min-width: 30px;
  height: 22px;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 0;
  font-weight: 400;
}
.site-links {
  font-size: var(--text-sm);
}
#account {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  min-width: 0;
}
#account .balance {
  font-size: var(--text-sm);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: #d9e7b0;
}
#account .balance .desktop-only {
  display: none;
}
#account .user-chip {
  background: #17191d;
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 4px 10px 4px 4px;
  min-width: 0;
}
#account .user-chip .identity-name {
  max-width: 100px;
}
#account .user-chip .identity-name small {
  display: none;
}
#account .chat-toggle {
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
}
#chat-badge {
  position: absolute;
  right: -4px;
  top: -3px;
  min-width: 18px;
  height: 18px;
  padding: 1px 4px;
  border-radius: 10px;
  color: #090b07;
  background: var(--accent);
  border: 2px solid var(--bg);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}
.nav-icon {
  display: flex;
}
#chat-panel {
  grid-area: chat;
}
#connection,
#delivery-status {
  position: fixed;
  z-index: 65;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  background: #393127;
  color: #ffdeb4;
  border: 1px solid #8c6735;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: var(--text-sm);
  box-shadow: var(--shadow);
}
#delivery-status {
  top: 68px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #232938;
  border-color: #546688;
  color: #dbe5ff;
}
.community-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin: 4px 0 28px;
}
.community-strip > div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.community-strip strong {
  color: var(--ink);
  font-size: var(--title-sm);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.community-strip .text-button {
  margin-left: auto;
  min-height: 28px;
  font-size: var(--text-sm);
  color: var(--accent);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.daily {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 24px;
  border: var(--border);
  border-radius: 20px;
  background: linear-gradient(110deg, #181b11, #141518);
  margin: 28px 0;
}
.daily h2 {
  font-size: var(--title-md);
}
.daily p {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: 8px;
}
.daily > button {
  align-self: center;
  grid-column: 2;
  grid-row: 1;
}
.daily-days {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.daily-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: var(--text-xs);
}
.daily-day b {
  color: var(--ink);
}
.daily-day.today {
  border-color: #7a933a;
  background: #d2ff3b0a;
  color: var(--accent);
}
.room-list {
  display: grid;
  gap: 12px;
}
.room-tile {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
}
.room-tile h3 {
  font-size: var(--text-lg);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.room-tile p {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.room-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 48px;
  border: 1px solid #525743;
  border-radius: 9px;
  font-size: var(--title-md);
  color: var(--accent);
  background: #22271b;
}
.queue-screen {
  padding: 64px 24px;
  border: 0;
  background: radial-gradient(ellipse at 50% 15%, #b9ff3917, transparent 60%);
}
.queue-screen > b {
  font-size: var(--title-xl);
  display: block;
  margin: 24px;
}
.queue-spinner {
  animation: rotate 5s linear infinite;
  color: var(--accent);
}
.identity {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  min-width: 0;
  vertical-align: middle;
}
.identity-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  position: relative;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: #626b80;
}

.identity-emblem .ui-icon {
  width: 11px;
  height: 11px;
  stroke-width: 2;
}
.icon-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.icon-value .ui-icon {
  width: 0.85em;
  height: 0.85em;
  stroke-width: 2;
}
.balance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.balance > .ui-icon {
  width: 16px;
  height: 16px;
}
.avatar-tone-0 {
  background: #7463bc;
}
.avatar-tone-1 {
  background: #bb6849;
}
.avatar-tone-2 {
  background: #388a80;
}
.avatar-tone-3 {
  background: #7a8744;
}
.avatar-tone-4 {
  background: #b05986;
}
.avatar-tone-5 {
  background: #587cb1;
}
.avatar-tone-6 {
  background: #9367a9;
}
.avatar-tone-7 {
  background: #a08648;
}
.avatar-color-0 {
  background: #ff7675;
}
.avatar-color-1 {
  background: #fdcb6e;
}
.avatar-color-2 {
  background: #55efc4;
}
.avatar-color-3 {
  background: #74b9ff;
}
.avatar-color-4 {
  background: #a29bfe;
}
.avatar-color-5 {
  background: #fd79a8;
}
.avatar-color-6 {
  background: #fab1a0;
}
.avatar-color-7 {
  background: #81ecec;
}
.avatar-color-8 {
  background: #ffeaa7;
}
.avatar-color-9 {
  background: #ff9f43;
}
.avatar-color-10 {
  background: #00b894;
}
.avatar-color-11 {
  background: #0984e3;
}
.avatar-color-12 {
  background: #6c5ce7;
}
.avatar-color-13 {
  background: #e84393;
}
.avatar-color-14 {
  background: #d63031;
}
.avatar-color-15 {
  background: #e17055;
}
.identity-name {
  display: block;
  min-width: 0;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
}
.identity-name small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.identity-emblem {
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11px;
  font-style: normal;
  color: #181a14;
  background: #f1e2a5;
  box-shadow: 0 0 0 2px #17181c;
}
.bundle-classic .identity-emblem {
  display: none;
}
.bundle-mint .identity-avatar {
  box-shadow: 0 0 0 2px #6aceab;
}
.bundle-mint .identity-emblem {
  background: #6aceab;
}
.bundle-sunset .identity-avatar {
  box-shadow: 0 0 0 2px #ed9168;
}
.bundle-sunset .identity-emblem {
  background: #ed9168;
}
.bundle-violet .identity-avatar {
  box-shadow: 0 0 0 2px #b99bef;
}
.bundle-violet .identity-emblem {
  background: #b99bef;
}
.bundle-gold .identity-avatar {
  box-shadow: 0 0 0 2px #eac66d;
}
.bundle-aurora .identity-avatar {
  box-shadow:
    0 0 0 2px #a8a0ff,
    0 0 14px #9a74e340;
}
.bundle-aurora .identity-emblem {
  background: #b6d9fa;
}
.style-mint {
  color: #8ce7c4;
}
.style-sunset {
  color: #ffb891;
}
.style-violet {
  color: #d0b5ff;
}
.style-gold {
  color: #f5d78e;
}
.style-aurora {
  color: #b4ceff;
}

.player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius-sm);
  flex: 0 0 auto;
  min-width: 140px;
}
.player .identity-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}
.player .identity-name {
  max-width: 106px;
  font-size: var(--text-xs);
}
.player .identity-name small {
  display: none;
}
.player > b {
  font-size: var(--text-lg);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.player > small {
  color: var(--muted);
}
.player.is-judge {
  border-color: #766497;
  background: #211c2b;
}

.card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  min-height: 225px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 18px;
}
.table-note h3 {
  font-size: 22px;
}
.table-note p {
  color: var(--muted);
  font-size: var(--text-sm);
}
.table-note.compact {
  min-height: 0;
  padding: 8px 0;
  align-items: start;
  text-align: left;
}
.large-mark,
.table-mark {
  display: block;
  font-size: 40px;
  color: var(--accent);
}
.waiting-table {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  min-height: 300px;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  background: radial-gradient(ellipse at center, #d2ff3b08, transparent 70%);
}
.waiting-table p {
  max-width: 460px;
  color: var(--muted);
}

.round-result,
.champion {
  padding: 28px 20px;
  margin-bottom: 20px;
  border: 1px solid #829d3a;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at top, #d2ff3b23, transparent 70%), #141810;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.round-result > span,
.champion > span {
  display: block;
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 12px;
}
.round-result h2,
.champion h2 {
  font-size: 25px;
  line-height: 1.2;
}
.champion > p {
  margin-top: 14px;
  font-size: var(--text-sm);
  color: var(--muted);
}
.celebration::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: radial-gradient(circle, var(--accent) 0 2px, transparent 2.5px) 0
    0 / 18px 4px repeat-x;
  animation: celebrate 0.65s ease-out both;
}
.final-scores {
  max-width: 340px;
  margin: 20px auto;
}
.final-scores p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}
.bot-note {
  margin-bottom: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: #251e32;
  border: 1px solid #5c457c;
}
.bot-note > span {
  font-size: var(--title-xl);
}
.bot-note h3 {
  margin: 8px 0 12px;
}
.bot-note p {
  color: #cbbcdf;
  font-size: var(--text-sm);
  min-height: var(--touch-h);
}
.bot-note strong {
  display: block;
  margin-top: 12px;
  font-size: var(--text-sm);
}
.last-choice {
  box-shadow: 0 0 0 2px #dbb453;
}

#selection-preview {
  position: fixed;
  z-index: 36;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  max-height: 52dvh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px;
  border: 1px solid #7f8e60;
  border-radius: 20px;
  background: #181d14;
  box-shadow: 0 20px 80px #000a;
}
#selection-preview .section-heading {
  margin-bottom: 12px;
  flex-wrap: nowrap;
}
#selection-preview h3 {
  font-size: 21px;
}
#selection-preview p {
  font-size: var(--title-sm);
  line-height: 1.4;
}
#selection-preview ol {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: grid;
  gap: 8px;
}
#selection-preview li {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  background: #242b1d;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: var(--text-sm);
}
#selection-preview li > span {
  min-width: 0;
}
#selection-preview li > div {
  display: flex;
  flex: none;
  gap: 6px;
}
#selection-preview button {
  min-width: 40px;
  min-height: 40px;
  padding: 6px;
}
#selection-preview > small {
  color: var(--muted);
}
#game-menu {
  display: none;
}
.shop-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.shop-heading > div:first-child {
  min-width: 0;
}
.shop-wallet {
  flex: none;
  border: var(--border);
  border-radius: 14px;
  padding: 14px 20px;
  min-width: 120px;
}
.shop-wallet > span {
  color: var(--muted);
  font-size: var(--text-xs);
}
.shop-wallet strong {
  display: block;
  font-size: 30px;
  color: var(--accent);
  line-height: 1.3;
  margin-top: 8px;
}
.shop-wallet small {
  font-size: var(--title-sm);
}
.products > article {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  border: var(--border);
  border-radius: 20px;
  background: var(--paper);
}
.products .plus-product {
  border-color: #5f4773;
  background:
    radial-gradient(ellipse at 85% 10%, #66358238, transparent 65%), #17121e;
}
.product-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.product-tag {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.product-period {
  font-size: var(--text-xs);
  color: var(--muted);
}
.products h2 {
  font-size: 29px;
}
.products p {
  color: #b9bbc5;
  font-size: var(--text-sm);
}
.product-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff03;
}
.plus-illustration {
  background: radial-gradient(ellipse at center, #b587eb33, transparent 65%);
}
.plus-emblem {
  font-size: 110px;
  font-weight: 400;
  line-height: 1;
  color: #d5bcff;
  position: relative;
  z-index: 1;
}
.orbit {
  position: absolute;
  width: 200px;
  height: 88px;
  border: 1px solid #ae83e45c;
  border-radius: 50%;
  transform: rotate(-28deg);
}
.orbit-two {
  transform: rotate(32deg);
}
.mini-tag {
  position: absolute;
  right: 14px;
  bottom: 16px;
  color: #101406;
  background: var(--accent);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  transform: rotate(-7deg);
}
.swap-illustration {
  background: radial-gradient(ellipse at center, #bdd55022, transparent 65%);
}
.swap-card {
  display: grid;
  place-items: center;
  position: absolute;
  width: 72px;
  height: 100px;
  border-radius: 10px;
  background: #f4f6ec;
  color: #3e4e23;
  font-size: 44px;
  box-shadow: 0 7px 20px #0005;
  border: 1px solid #c2c7b7;
}
.swap-card:nth-child(1) {
  transform: translate(-48px, 0) rotate(-16deg);
}
.swap-card:nth-child(2) {
  transform: translate(46px, 2px) rotate(13deg);
}
.swap-card:nth-child(3) {
  transform: rotate(-2deg);
}
.product-benefits {
  padding: 0;
  list-style: none;
  margin: 0;
  color: #d4d6df;
  display: grid;
  gap: 8px;
  font-size: var(--text-sm);
}
.product-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.product-benefits li > .ui-icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--accent);
  stroke-width: 2.2;
}
.product-preview {
  color: #cbb5ee;
  align-self: start;
  padding: 0;
  min-height: 36px;
  font-size: var(--text-sm);
}
.product-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}
.product-bottom button {
  flex: 1 1 180px;
  font-size: var(--text-sm);
  padding: 12px;
}
.product-price {
  flex: 1 1 120px;
}
.product-price strong {
  display: block;
  white-space: nowrap;
  letter-spacing: -0.04em;
}
.product-price small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.product-active {
  font-size: 12px !important;
  color: var(--accent) !important;
}
.coin-label {
  color: var(--accent);
  white-space: nowrap;
  font-size: var(--text-base);
}
.cosmetic-preview {
  background: radial-gradient(ellipse at 50% 30%, #6f765831, transparent 90%);
}
.wardrobe-art {
  width: 104px;
  height: 92px;
  stroke-width: 2;
  color: #aebc96;
}
.cosmetic-preview.bundle-mint {
  background: radial-gradient(ellipse at top, #2d96784d, transparent 85%);
}
.bundle-mint .wardrobe-art {
  color: #84dcbc;
}
.cosmetic-preview.bundle-sunset {
  background: radial-gradient(ellipse at top, #b253334d, transparent 85%);
}
.bundle-sunset .wardrobe-art {
  color: #eeae8b;
}
.cosmetic-preview.bundle-violet {
  background: radial-gradient(ellipse at top, #9060ae4d, transparent 85%);
}
.bundle-violet .wardrobe-art {
  color: #cbacef;
}
.cosmetic-preview.bundle-gold {
  background: radial-gradient(ellipse at top, #a1873e4d, transparent 85%);
}
.bundle-gold .wardrobe-art {
  color: #e8d092;
}
.cosmetic-preview.bundle-aurora {
  background:
    radial-gradient(ellipse at 25% 5%, #637bd94d, transparent 85%),
    radial-gradient(ellipse at 100% 30%, #a442ad36, transparent 85%);
}
.bundle-aurora .wardrobe-art {
  color: #c2b8ff;
}
.cosmetic-copy p {
  margin-top: 6px;
}
.cosmetic-actions {
  flex-wrap: wrap;
  gap: 8px;
}
.cosmetic-actions > button {
  flex: 1 1 auto;
  font-size: var(--text-xs);
  min-height: 40px;
  padding: 8px;
}
.equipped-badge {
  display: block;
  color: #c7e391;
  font-size: 11px;
  font-weight: 400;
}
.style-preview {
  padding: 24px;
  border-radius: var(--radius);
  border: var(--border);
  background:
    radial-gradient(ellipse at top, #b990e624, transparent 80%), var(--paper);
}
.style-preview > .identity {
  margin-top: 12px;
}
.style-preview .identity-avatar {
  width: 52px;
  height: 52px;
  font-size: var(--text-lg);
}
.style-preview .identity-name {
  font-size: var(--title-sm);
  max-width: 100%;
}
.preview-scenes {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}
.preview-scenes section {
  padding: 16px;
  background: #101114;
  border: var(--border);
  border-radius: var(--radius-sm);
}
.preview-scenes h3 {
  font-size: var(--text-base);
  margin-bottom: 12px;
}
.preview-scenes .round-result {
  margin: 0;
  padding: 16px;
}
.preview-chat-message {
  margin-top: 0;
  width: 100%;
}
.preview-chat-message .message-bubble {
  text-align: left;
}
.preview-chat-message .message-avatar {
  display: block;
}
.round-result .winner-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}
.round-result .winner-heading .identity {
  max-width: min(100%, 320px);
}
.round-result .winner-heading .identity-name {
  max-width: 220px;
  text-align: left;
  font-size: var(--text-lg);
}
.round-result .winner-heading > small {
  color: var(--ink);
  font-size: var(--text-lg);
  font-weight: 700;
}
progress {
  appearance: none;
  width: 100%;
  height: 5px;
  border: 0;
  overflow: hidden;
  border-radius: 4px;
  background: #30333a;
  display: block;
}
progress::-webkit-progress-bar {
  background: #30333a;
}
progress::-webkit-progress-value {
  background: var(--accent);
}
progress::-moz-progress-bar {
  background: var(--accent);
}
.heading-with-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.heading-with-count > strong {
  font-size: 40px;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: -0.04em;
}
.heading-with-count small {
  font-size: var(--text-sm);
  color: var(--muted);
  letter-spacing: 0;
}
.collection-heading progress {
  margin-top: 24px;
  max-width: 520px;
}
.collection-heading > p:last-child {
  font-size: var(--text-sm);
}
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.achievement-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  border: 1px solid #4a4e56;
  border-radius: var(--radius-sm);
  color: #adb3bf;
  background: #22252d;
  font-size: var(--title-md);
}
.achievement p {
  min-height: 40px;
  margin-bottom: 16px;
}
.achievement:not(.unlocked) .achievement-icon {
  filter: grayscale(0.6);
  opacity: 0.7;
}
.award-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.award-state {
  color: var(--muted);
  font-size: 11px;
}
.rarity-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  line-height: 1.4;
  border: 1px solid currentColor;
  border-radius: 6px;
  padding: 3px 6px;
  color: #b5bbc6;
}
.rarity-uncommon .achievement-icon,
.rarity-uncommon.rarity-badge {
  color: #9bc49c;
}
.rarity-rare .achievement-icon,
.rarity-rare.rarity-badge {
  color: #93b8ef;
}
.rarity-epic .achievement-icon,
.rarity-epic.rarity-badge {
  color: #c5a1f0;
}
.rarity-legendary .achievement-icon,
.rarity-legendary.rarity-badge {
  color: #e5c475;
}
.achievement.unlocked.rarity-legendary {
  border-color: #6b5d3c;
  background: linear-gradient(140deg, #6650261c, transparent 75%), var(--paper);
}
.achievement-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
}
.leader-list {
  display: grid;
  gap: 10px;
}
.leader-row {
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  text-align: left;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}
button.leader-row:hover {
  border-color: #5b654f;
  background: var(--paper-raised);
}
button.leader-row:active {
  transform: translateY(1px);
}
.rank .ui-icon {
  width: 25px;
  height: 25px;
}
.rank-medal {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 30px;
}
.rank-medal > b {
  position: absolute;
  top: 5px;
  font-size: 10px;
  line-height: 1;
  color: currentColor;
}
.rank {
  font-size: var(--title-md);
  color: #9da48b;
  font-weight: 700;
}
.leader-row:first-child .rank {
  color: var(--accent);
}
.leader-name > small {
  display: block;
  margin: 5px 0 0 43px;
  color: var(--muted);
}
.leader-row > b {
  font-size: var(--title-md);
  text-align: right;
  line-height: 1.2;
}
.leader-row > b small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.online-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.online-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: var(--border);
  background: var(--paper);
  border-radius: 14px;
  padding: 16px;
  text-align: left;
  min-width: 0;
}
.online-player .identity-name {
  max-width: 130px;
}
.online-player > span:last-child {
  color: var(--muted);
}
.page-controls {
  justify-content: center;
  margin-top: 24px;
}
.page-controls > span {
  font-size: var(--text-sm);
  color: var(--muted);
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.7fr);
  gap: 20px;
  margin: 24px 0;
}
.profile-stats {
  align-content: start;
}
.profile-stats strong {
  margin-top: 16px;
  letter-spacing: -0.04em;
}
.held-balance {
  margin-top: 12px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.public-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.public-identity .identity-avatar {
  width: 56px;
  height: 56px;
  font-size: var(--text-lg);
}
.public-identity .identity-name {
  font-size: 23px;
  max-width: 260px;
}
.online-status {
  font-size: var(--text-xs);
  color: var(--accent);
}
.public-profile > .muted {
  margin: 16px 0;
  font-size: var(--text-sm);
}
.public-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0;
}
.public-stats > div {
  padding: 14px 8px;
  background: #23262c;
  border-radius: 10px;
  text-align: center;
}
.public-stats b {
  display: block;
  font-size: 25px;
}
.public-stats span {
  font-size: 11px;
  color: var(--muted);
}
.public-awards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
}
.review-section {
  margin: 24px 0;
}
.review-section h3 {
  margin-bottom: 16px;
  font-size: 21px;
}
.profile-review {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.profile-review header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.profile-review time {
  color: var(--muted);
  font-size: 11px;
}
.profile-review p {
  margin: 12px 0;
  font-size: var(--text-sm);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.profile-review .actions {
  gap: 16px;
}
.profile-review .text-button {
  font-size: var(--text-xs);
}
.review-price {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.review-price > span {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #22262b;
  border-radius: 10px;
  padding: 12px;
  font-size: var(--text-xs);
  color: var(--muted);
}
.review-price b {
  color: var(--ink);
  font-size: var(--text-lg);
}
.review-terms {
  font-size: var(--text-sm);
  color: var(--muted);
}
.review-history {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-size: var(--text-sm);
}
.review-history > span {
  width: 100%;
  color: var(--muted);
}
textarea {
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #a5c354;
}
input[type="range"] {
  min-height: 36px;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: none;
  padding: 0;
  accent-color: var(--accent);
}
.check input {
  margin-top: 1px;
}
#modal::backdrop {
  background: #000a;
  backdrop-filter: blur(5px);
}
.modal-heading button {
  flex: none;
  min-width: 44px;
  font-size: 26px;
  color: var(--muted);
}
#modal-content > h2 {
  margin-bottom: 24px;
}
#modal-content > p {
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 14px 0;
}
#modal-content form h3 {
  margin-bottom: 4px;
}
.form-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.rules-text {
  white-space: pre-line;
}
.inline-form {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.inline-form input {
  flex: 1;
  min-width: 0;
}
.inline-form button {
  flex: none;
}
.admin-navigation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 24px;
}
.admin-navigation button {
  padding: 9px 12px;
  min-height: 40px;
  border: var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.admin-navigation button.active {
  background: var(--accent);
  color: #1a2011;
  border-color: var(--accent);
}
body[data-page="admin"] #main > .panel {
  margin-top: 0;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.admin-grid label {
  font-size: var(--text-sm);
  line-height: 1.5;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  min-width: 0;
}
.list-row > div:first-child,
.list-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.list-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.list-row .actions {
  gap: 6px;
  justify-content: end;
}
.list-row button {
  font-size: var(--text-xs);
  padding: 9px 12px;
  min-height: 40px;
}
.admin-room {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.admin-room h3 {
  font-size: var(--title-sm);
  margin: 0 0 12px;
}
.admin-room p {
  color: var(--muted);
  margin: 12px 0;
  font-size: var(--text-sm);
}
.admin-room > .actions button {
  min-height: 40px;
  font-size: var(--text-xs);
  padding: 10px;
}
.report-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.report-row p,
.report-row blockquote {
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.report-row blockquote {
  border-left: 2px solid #6c7161;
  margin: 12px 0;
  padding-left: 16px;
  color: var(--muted);
}
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: thin;
  margin: 16px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--text-xs);
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  max-width: 260px;
  overflow-wrap: anywhere;
}
th {
  color: var(--muted);
  font-weight: 500;
  background: #1e2026;
  white-space: nowrap;
}
.section-pager {
  justify-content: center;
  margin-top: 20px;
}
.section-pager > span {
  color: var(--muted);
  font-size: var(--text-sm);
}
.user-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0;
}
.user-tabs button {
  min-height: 38px;
  padding: 8px 10px;
  font-size: var(--text-xs);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.metric-grid > div {
  padding: 16px;
  border: var(--border);
  border-radius: var(--radius-sm);
  background: #1c1f24;
}
.metric-grid small {
  color: var(--muted);
}
.metric-grid strong {
  display: block;
  font-size: 26px;
  margin-top: 8px;
}
dl {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  margin: 24px 0;
  font-size: var(--text-sm);
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.notification-settings {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.notification-settings p {
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 12px 0;
}
.notification-settings small {
  display: block;
  margin-top: 8px;
}
.notification-settings h3 {
  margin: 0;
}
#toasts {
  position: fixed;
  top: calc(var(--header-h) + 12px);

  z-index: 100;
  display: grid;

  width: min(380px, calc(100% - 32px));
}
.toast {
  background: #2c3323;

  animation: toast-in 0.2s ease-out;
}
.achievement-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #25202e;
  border-color: #786286;
}
.achievement-toast > div {
  min-width: 0;
}
.achievement-toast small {
  display: block;
  color: #c6b8d6;
  font-size: 11px;
}
.achievement-toast strong {
  display: block;
  margin-top: 4px;
  font-size: var(--text-base);
}
.dismiss-award {
  margin-left: auto;
  min-width: 36px;
  min-height: 40px;
  font-size: var(--title-md);
  color: #bdb6c6;
}
@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}
@keyframes celebrate {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 1299px) and (min-width: 1121px) {

  .table-note.compact {
    padding: 8px 0;
    border: 0;
  }
  .products > article {
    padding: 20px;
  }
  .product-bottom button {
    flex-basis: 100%;
  }
}
@media (max-width: 1120px) {
  #nav {
    margin-bottom: 28px;
  }
  #account .user-chip .identity-name {
    display: none;
  }
  #account .user-chip {
    padding: 4px;
  }
  
  .site-links a:nth-child(2) {
    display: none;
  }
}
@media (max-width: 900px) {
  .brand .age-mark {
    display: none;
  }
  
  .online-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  body {
    padding-top: var(--header-h);
  }
  #header {
    position: fixed;
    z-index: 40;
    inset: 0 0 auto;
    background: #090a0cf2;
    backdrop-filter: blur(16px);
  }
  #account .chat-toggle {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }
  #account .user-chip {
    display: none;
  }
  #account > .text-button {
    font-size: var(--text-xs);
    min-height: 40px;
  }
  body:not(.is-auth):not(.document-page) #header > .brand > span {
    display: none;
  }
  #nav {
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    margin: 0;

    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--line);
    background: #131519f5;
    backdrop-filter: blur(16px);
    justify-content: space-around;
  }
  .page-heading {
    padding: 8px 0 24px;
  }
  .community-strip {
    gap: 12px 20px;
    padding: 16px 0;
    margin-bottom: 24px;
  }
  .community-strip > div {
    font-size: 11px;
    gap: 6px;
  }
  .community-strip strong {
    font-size: var(--title-sm);
  }
  .community-strip .text-button {
    margin-left: 0;
    font-size: var(--text-xs);
  }
  .daily {
    padding: 20px;
    gap: 16px;
    margin: 24px 0;
  }
  .daily h2 {
    font-size: 21px;
  }
  .daily .eyebrow {
    font-size: 10px;
  }
  .daily > button {
    font-size: var(--text-xs);
    min-height: 42px;
    padding: 10px 12px;
  }
  .daily-days {
    gap: 5px;
  }
  .daily-day {
    padding: 8px 2px;
    gap: 4px;
    border-radius: 9px;
  }
  .daily-day small,
.daily-day > span {
    font-size: 10px;
  }
  .lobby-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }
  .lobby-actions button {
    font-size: var(--text-xs);
    padding: 12px 8px;
  }
  .room-tile {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 16px 12px;
  }
  .room-icon {
    width: 32px;
    height: 40px;
    font-size: 22px;
  }
  .room-tile h3 {
    font-size: var(--text-base);
  }
  .room-tile p {
    font-size: 11px;
  }
  .room-tile button {
    padding: 10px;
    font-size: var(--text-xs);
    min-height: 40px;
  }

  .player {
    padding: 8px 10px;
    min-width: 130px;
  }
  .player .identity-name {
    max-width: 86px;
  }
  .player .identity-avatar {
    width: 25px;
    height: 25px;
  }

  .table-note {
    min-height: 0;
    padding: 16px;
    gap: 8px;
  }
  .table-note.compact {
    padding: 8px 0;
    border: 0;
    margin-top: -6px;
  }
  .table-note.compact p {
    font-size: var(--text-xs);
  }
  .large-mark {
    font-size: var(--title-lg);
  }
  .table-note h3 {
    font-size: var(--text-lg);
  }
  .table-note p {
    font-size: var(--text-sm);
  }
  .waiting-table {
    padding: 28px 20px;
    gap: 16px;
    min-height: 320px;
  }
  .waiting-table p {
    font-size: var(--text-sm);
  }
  .waiting-table button {
    width: 100%;
  }

  body.game-focus {
    
    --nav-h: 0px;
  }
  body.game-focus #nav {
    display: none;
  }
  body.game-focus #game-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 26;
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 20px;
    background: #24272e;
    border: 1px solid #444853;
    color: #e4e7eb;
    font-size: var(--text-xs);
    box-shadow: 0 4px 16px #0005;
  }
  body.game-focus.game-menu-open #nav {
    display: flex;
    bottom: 92px;
    left: 8px;
    right: 8px;
    inset-inline: 8px;
    height: 66px;
    padding: 4px;
    border-radius: 14px;
    border: var(--border);
  }
  body.game-focus.game-menu-open #game-menu {
    bottom: 168px;
  }

  #selection-preview {
    bottom: calc(140px + env(safe-area-inset-bottom));
    max-height: 48dvh;
  }
  #selection-preview h3 {
    font-size: var(--title-sm);
  }
  #selection-preview p {
    font-size: var(--text-lg);
  }
  #selection-preview li {
    font-size: var(--text-sm);
    padding: 8px;
  }

  .round-result h2,
.champion h2 {
    font-size: 23px;
  }
  .shop-heading {
    display: block;
  }
  .shop-wallet {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
  }
  .shop-wallet strong {
    font-size: var(--title-md);
    margin: 0;
  }
  .products > article {
    padding: 24px;
    gap: 18px;
  }
  .products h2 {
    font-size: 30px;
  }
  .product-bottom {
    align-items: center;
  }
  .product-bottom button {
    flex: 1 1 170px;
  }
  .product-price {
    flex: 1 1 110px;
  }
  .wardrobe-art {
    width: 90px;
    height: 80px;
  }
  .cosmetic-preview .identity-name {
    text-align: center;
  }
  .cosmetic-actions {
    gap: 4px;
    flex-direction: column;
  }
  .cosmetic-actions > button {
    width: 100%;
    font-size: var(--text-xs);
  }
  .achievement-grid {
    grid-template-columns: 1fr;
  }
  .achievement p {
    min-height: 0;
  }
  .heading-with-count {
    gap: 10px;
  }
  .heading-with-count h1 {
    font-size: 30px;
  }
  .heading-with-count > strong {
    font-size: 30px;
  }
  .heading-with-count small {
    font-size: var(--text-xs);
  }
  .rarity-badge,
.award-state {
    font-size: 11px;
  }
  .leader-row {
    gap: 10px;
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }
  .rank {
    font-size: 22px;
  }
  .leader-row .identity-name {
    max-width: 160px;
  }
  .leader-row > b {
    font-size: 22px;
  }
  .online-grid {
    gap: 10px;
  }
  .online-player {
    padding: 12px;
  }
  .online-player .identity {
    gap: 7px;
  }
  .online-player .identity-name {
    max-width: 88px;
    font-size: var(--text-xs);
  }
  .online-player .identity-avatar {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
  .online-player > span:last-child {
    display: none;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-stats strong {
    margin-top: 10px;
  }
  .public-identity .identity-name {
    font-size: 21px;
    max-width: 190px;
  }
  .public-identity .identity-avatar {
    width: 46px;
    height: 46px;
    font-size: var(--text-base);
  }
  .public-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .public-stats span {
    font-size: var(--text-xs);
  }
  .public-stats b {
    font-size: var(--title-lg);
  }
  .profile-review header {
    align-items: start;
    gap: 8px;
  }
  .profile-review time {
    font-size: 10px;
    flex: none;
  }
  .profile-review .identity-name {
    max-width: 150px;
    font-size: var(--text-sm);
  }
  .review-price {
    grid-template-columns: 1fr;
  }
  .review-price > span {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
    padding: 12px 14px;
  }
  .admin-navigation {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 14px;
    margin-bottom: 20px;
  }
  .admin-navigation button {
    flex: none;
    min-height: var(--touch-h);
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .list-row {
    flex-wrap: wrap;
    gap: 10px;
    font-size: var(--text-sm);
  }
  .list-row .actions {
    width: 100%;
    justify-content: start;
  }
  .list-row button {
    font-size: var(--text-xs);
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-grid strong {
    font-size: var(--title-md);
  }
  dl {
    font-size: var(--text-sm);
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .user-tabs {
    gap: 6px;
  }
  .user-tabs button {
    font-size: var(--text-xs);
    min-height: 40px;
  }
  .inline-form {
    gap: 8px;
  }
  .inline-form button {
    padding: 10px 12px;
    font-size: var(--text-xs);
  }
  #toasts {
    top: calc(var(--header-h) + 8px);
  }
  .toast {
    font-size: var(--text-sm);
  }
  #connection {
    top: 68px;
  }
  #delivery-status {
    top: 112px;

    padding: 10px;
    gap: 8px;
  }
  #delivery-status button {
    font-size: var(--text-xs);
    min-height: 36px;
    padding: 8px;
  }
}
@media (max-width: 359px) {
  .daily {
    padding: 16px;
  }
  .daily h2 {
    font-size: var(--title-sm);
  }
  .online-player {
    padding: 10px;
  }
  .online-player .identity-name {
    max-width: 72px;
  }
  .heading-with-count h1 {
    font-size: 27px;
  }
  
}
@media (prefers-reduced-motion: reduce) {
  *,
*::before,
*::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.install-page {
  padding: 0;
}
.install-container {
  width: min(640px, calc(100% - 32px));
  margin: 48px auto;
}
.install-container .panel {
  padding: 32px;
}
.install-container h1 {
  font-size: var(--title-hero);
  margin: 24px 0;
}
.install-container h2 {
  font-size: 26px;
  margin: 20px 0;
}
.install-container p {
  color: var(--muted);
  margin: 16px 0;
  font-size: var(--text-base);
}
.install-container .install-error {
  color: var(--danger);
}
@media (max-width: 760px) {
  .install-container {
    margin: 20px auto;
  }
  .install-container .panel {
    padding: 24px;
  }
  .install-container h1 {
    font-size: 30px;
  }
}
@font-face {
  font-family: CC Sans;
  src: url("fonts/OpenSans-Regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: CC Sans;
  src: url("fonts/OpenSans-Bold.woff") format("woff");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}
.card-label {
  font-size: var(--text-xs);
}
.cosmetic-kicker {
  font-size: var(--text-xs);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.header-language-form {
  margin: 0;
  display: flex;
  align-items: center;
}
#account select {
  color: #fff;
}
#account .user-chip {
  max-width: 146px;
}
#account .user-chip .identity-name {
  max-width: 85px;
}

#judge-answers {
  scroll-margin-top: 100px;
  outline: none;
}
#toasts {
  top: auto;
  bottom: 24px;
  right: 24px;
  width: min(390px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  z-index: 140;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 16px;
  background: #222225;
  border: 1px solid #48484e;
  box-shadow: 0 12px 40px #0008;
  color: #fff;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.toast-content {
  min-width: 0;
  flex: 1;
  font-weight: 400;
  font-size: var(--text-sm);
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
  padding: 0;
}
.toast-content:not(button) {
  display: block;
}
.toast-close {
  flex: none;
  align-self: start;
  min-width: 36px;
  min-height: 36px;
  padding: 4px;
  color: #aaa;
  font-size: var(--title-md);
}
.toast[data-notice="chat"] {
  border-left: 3px solid var(--accent);
}
.toast[data-notice="judge"] {
  border-left: 3px solid var(--violet);
}
.achievement-toast {
  display: grid;
  grid-template-columns: 40px 1fr;
}
.achievement-toast > span {
  grid-row: 1/3;
}
body.chat-open #toasts {
  bottom: 130px;
}

.products > article {
  box-shadow: inset 0 1px 0 #ffffff0b;
}
.product-plus {
  background:
    radial-gradient(ellipse at 85% 20%, #76339170, transparent 70%), #18121e;
}
.product-swaps {
  background:
    radial-gradient(ellipse at 95% 0, #65731c38, transparent 75%), #131510;
}
.cosmetic-tile:hover {
  border-color: #73737b;
}
@media (max-width: 1120px) {
  #account .user-chip {
    display: none;
  }
}
@media (max-width: 760px) {
  #header {
    background: #000f;
  }
  #account select {
    display: block;
  }
  #account .chat-toggle {
    display: none;
  }
  #nav [data-page="achievements"] .nav-label {
    display: none;
  }
  #nav .nav-chat {
    display: flex !important;
    position: relative;
  }
  #nav {
    transform: none !important;
    visibility: visible !important;
    z-index: 42;
    height: calc(70px + env(safe-area-inset-bottom));
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: #141416;
    border-top: 1px solid #303033;
  }
  .nav-chat-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 23px);
    background: var(--accent);
    border: 2px solid #141416;
    border-radius: 10px;
    min-width: 18px;
    padding: 0 3px;
    color: #10120a;
    line-height: 15px;
    font-size: 10px;
    font-weight: 700;
  }
  
  body.game-focus #nav {
    transform: none !important;
  }
  body.game-focus #game-menu {
    display: none !important;
  }

  body.game-focus #footer {
    display: block;
  }

  #toasts {
    bottom: calc(82px + env(safe-area-inset-bottom));
    top: auto;
    right: 12px;
    width: calc(100% - 24px);
    max-width: 400px;
  }
  body.game-focus #toasts {
    bottom: calc(172px + env(safe-area-inset-bottom));
  }
  .toast-content {
    font-size: var(--text-sm);
  }
  .toast {
    padding: 10px 8px 10px 14px;
  }
  body.chat-open #toasts {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
  .achievement-toast .muted {
    font-size: var(--text-xs);
  }
  #selection-preview {
    bottom: calc(170px + env(safe-area-inset-bottom));
  }
  #delivery-status {
    font-size: var(--text-sm);
    top: calc(var(--header-h) + 8px);
  }
  #connection {
    top: calc(var(--header-h) + 8px);
  }
}
@media (max-width: 359px) {
  #header .brand {
    font-size: var(--text-xs);
  }
  #account .balance {
    font-size: 11px;
  }
  .layout {
    padding-inline: 12px;
  }
  
}
@media (max-width: 760px) {
  #account #chat-badge {
    display: none;
  }
}
.shop-heading {
  margin-bottom: 24px;
}
.shop-tabs {
  border: 1px solid #353538;
  margin-bottom: 24px;
}
.shop-tabs button {
  flex: 1;
  padding: 12px;
  border-radius: 11px;
  font-size: var(--text-sm);
  color: #b6b6bd;
}
.shop-tabs button[aria-selected="true"] {
  background: var(--accent);
  color: #13170b;
}
.shop-panel > .section {
  margin-top: 28px;
}
.economy-panel {
  border: 1px solid #393e27;
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(115deg, #192010, #101111);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.economy-heading {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.economy-heading h2 {
  font-size: var(--title-lg);
  color: var(--accent);
  margin: 4px 0;
}
.economy-heading h2 span {
  font-size: var(--text-lg);
  color: #b4bc9f;
}
.economy-heading p {
  font-size: var(--text-sm);
  color: #b7bea9;
}
.saving-goal {
  width: 45%;
  font-size: var(--text-sm);
}
.saving-goal progress {
  display: block;
  width: 100%;
  height: 7px;
  margin: 10px 0;
  accent-color: var(--accent);
}
.saving-goal small {
  font-size: var(--text-xs);
  color: #bdc2b1;
}
.economy-panel summary {
  cursor: pointer;
  min-height: var(--touch-h);
  padding: 12px 0;
  font-size: var(--text-sm);
  font-weight: 700;
}
.economy-panel details p {
  padding-bottom: 12px;
  color: #c5c8bd;
}
.economy-panel > p {
  color: #c5c8bd;
}
.wallet-history {
  border-top: 1px solid #394030;
}
.wallet-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #30362b;
  font-size: var(--text-sm);
}
.wallet-entry small {
  display: block;
  color: #91988a;
  font-size: 11px;
}
.wallet-entry strong {
  white-space: nowrap;
}
.wallet-entry .credit {
  color: var(--accent);
}
.cost-hint {
  display: block;
  color: #b5b5bd;
  font-size: var(--text-xs);
  margin-top: 10px;
}
.shop-purchase {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  background: #1e201a;
  border: 1px solid #4a5235;
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 20px;
  box-shadow: 0 -8px 28px #0008;
}
.shop-purchase small {
  font-size: var(--text-xs);
  color: #bcc4ac;
}
.shop-purchase button {
  flex-shrink: 0;
}
.round-reward {
  padding: 12px 16px;
  border: 1px solid #3e4826;
  border-radius: var(--radius-sm);
  background: #19200e;
  color: #dbe6c2;
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 12px 0;
}
.style-spark {
  color: #ffc270;
  text-shadow: 0 0 14px #ff981d40;
}
.bundle-spark .identity-avatar {
  border: 2px solid #edb069;
  box-shadow: 0 0 12px #e9972d35;
}
.bundle-spark .identity-emblem {
  background: #eaba75;
  color: #2a1903;
}
.cosmetic-preview.bundle-spark {
  background:
    radial-gradient(ellipse at 60% 10%, #82482055, transparent 80%), #201912;
}
.bundle-spark .wardrobe-art {
  color: #ffbd69;
}
@media (max-width: 760px) {
  .shop-tabs {
    margin-bottom: 18px;
  }
  .shop-tabs button {
    font-size: var(--text-sm);
    padding: 10px 8px;
  }
  .economy-panel {
    padding: 20px;
    font-size: var(--text-sm);
  }
  .economy-heading {
    gap: 16px;
    align-items: flex-start;
  }
  .economy-heading h2 {
    font-size: 25px;
  }
  .saving-goal {
    width: 48%;
    font-size: var(--text-sm);
  }
  .shop-purchase {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    padding: 16px;
  }
  .shop-purchase button {
    width: 100%;
    font-size: var(--text-sm);
  }
  .shop-purchase p {
    font-size: var(--text-sm);
  }
  .cosmetic-actions .secondary {
    font-size: var(--text-sm);
  }
  .shop-panel .products {
    grid-template-columns: 1fr;
  }
  .round-reward {
    font-size: var(--text-sm);
  }
}
.shop-heading {
  padding-bottom: 0;
  margin-bottom: 20px;
}
.shop-heading h1 {
  white-space: normal;
  margin-bottom: 10px;
}
.shop-heading p {
  margin-bottom: 0;
}
.shop-economy {
  padding: 0;
  overflow: hidden;
}
.shop-economy > summary::-webkit-details-marker {
  display: none;
}
.shop-economy > summary strong {
  color: var(--accent);
  white-space: nowrap;
}
.wallet-chevron {
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
}
.shop-economy[open] .wallet-chevron {
  transform: rotate(180deg);
}
.shop-economy .economy-panel {
  border: 0;
  border-top: 1px solid #353538;
  border-radius: 0;
}
.shop-panel > .section {
  margin-top: 24px;
}
@media (max-width: 760px) {
  .shop-heading {
    margin-bottom: 20px;
  }
  .shop-tabs {
    margin-bottom: 16px;
  }
  .shop-panel > .section {
    margin-top: 20px;
  }
}
/* Единая визуальная система. Эти правила заменяют предыдущие определения тех же
   компонентов, а не накладывают ещё один слой старых макетов. Отступы — 4/8/12/16/24/32/48. */

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
}
h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 {
  font-size: var(--title-xl);
}
h2 {
  font-size: 26px;
}
h3 {
  font-size: var(--text-lg);
}
p {
  font-size: var(--text-base);
  line-height: 1.5;
}
small {
  font-size: var(--text-xs);
  line-height: 1.5;
}
.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.primary {
  background: var(--accent);
  color: #151a07;
  border: 1px solid var(--accent);
  box-shadow: none;
}
.primary:hover:not(:disabled) {
  color: #151a07;
  background: #e3ff75;
  border-color: #e3ff75;
  box-shadow: none;
}
.primary:active:not(:disabled) {
  background: #c2e532;
}
.secondary {
  background: var(--paper-raised);
  border: 1px solid #46503c;
  color: var(--ink);
}
.secondary:hover:not(:disabled) {
  background: #2c3225;
  border-color: #697759;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch-h);
  padding: 8px 12px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.text-button:hover {
  color: var(--ink);
}
.icon-button {
  display: inline-grid;
  place-items: center;
  padding: 10px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: var(--touch-h);
  flex: none;
  border: var(--border);
  background: var(--paper);
  border-radius: var(--radius-sm);
}
#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  height: var(--header-h);
  margin: auto;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--touch-h);
  flex: none;
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.brand img {
  width: 36px;
  height: 36px;
  flex: none;
}
.site-links {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
}
.site-links a {
  display: flex;
  align-items: center;
  min-height: var(--touch-h);
  font-size: var(--text-sm);
  white-space: nowrap;
}
.site-links .plus-link {
  background: linear-gradient(to right, #fb512f, #ff9500);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  transition:
    filter 0.15s ease,
    opacity 0.15s ease;
}
.site-links a:hover {
  color: var(--ink);
}
.site-links .plus-link:hover,
.site-links .plus-link:focus-visible {
  filter: brightness(1.28) saturate(1.08);
  opacity: 0.92;
}
#account select {
  width: 58px;
  min-height: var(--touch-h);
  padding: 8px;
  border: var(--border);
  border-radius: 10px;
  background: var(--paper);
  font-size: var(--text-sm);
}
#account .register-button {
  min-height: var(--touch-h);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: var(--text-sm);
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 338px;
  grid-template-areas: "nav chat" "main chat";
  align-items: start;
  gap: 24px;
  max-width: 1280px;
  margin: auto;
  padding: 24px 24px 48px;
}
#nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
#nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--control-h);
  padding: 12px 10px;
  font-size: var(--text-sm);
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
#nav button.active {
  color: var(--ink);
  border-color: var(--accent);
  background: transparent;
}
#nav button:hover {
  color: var(--ink);
}
.nav-icon svg {
  width: 20px;
  height: 20px;
}
.nav-short,
.nav-chat {
  display: none !important;
}
#main {
  grid-area: main;
  min-width: 0;
}
.page-heading {
  margin: 0 0 24px;
}
.page-heading h1,
.shop-heading h1 {
  font-size: var(--title-xl);
  line-height: 1.2;
}
.page-heading p,
.shop-heading p {
  margin-top: 12px;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.5;
  max-width: 60ch;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-heading h2 {
  font-size: 26px;
  line-height: 1.2;
}
.section-heading p {
  margin-top: 8px;
  font-size: var(--text-sm);
  color: var(--muted);
}
.panel {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
}
.section {
  margin-top: 32px;
}
form {
  display: grid;
  gap: 20px;
  min-width: 0;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  min-height: var(--control-h);
  padding: 12px;
  background: #1c2018;
  border: 1px solid #4b5442;
  border-radius: 10px;
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.5;
}
input::placeholder,
textarea::placeholder {
  color: #a3ac98;
}
.check {
  flex-direction: row;
  align-items: center;
  min-height: var(--touch-h);
  gap: 12px;
  font-size: var(--text-sm);
  line-height: 1.5;
}
.check input {
  margin: 0;
}
input[type="range"] {
  min-height: var(--touch-h);
  padding: 0;
  background: none;
  accent-color: var(--accent);
}
#modal {
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  border: 1px solid #4b5442;
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px #0009;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
}
.modal-heading h2 {
  font-size: 26px;
  line-height: 1.2;
  padding-top: 6px;
}
.modal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.auth-intent {
  margin: -8px 0 24px;
  font-size: var(--text-sm);
  color: var(--muted);
}
/* Игровой стол сохраняет контраст чёрного вопроса и белых ответов. */

.card-report {
  display: grid;
  place-items: center;
  padding: 0;
  min-width: 44px;
  min-height: var(--touch-h);
  color: var(--muted);
  border-radius: 8px;
}

/* Каталог: цена и примерка видны рядом с образом. */
.shop-tabs,
.profile-tabs {
  border: 0;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 24px;
  padding: 0;
  background: none;
  border-radius: 0;
}
.shop-tabs button[role="tab"],
.profile-tabs [role="tab"] {
  flex: 1;
  min-width: 0;
  min-height: var(--control-h);
  padding: 12px;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.4;
}
.shop-tabs button[aria-selected="true"],
.profile-tabs [aria-selected="true"] {
  color: var(--ink);
  background: none;
  border-color: var(--accent);
}
.wardrobe-section {
  margin: 0;
}
.wardrobe-filters,
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.wardrobe-filters button,
.filter-tabs button {
  min-height: var(--touch-h);
  padding: 8px 14px;
  border: var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.wardrobe-filters button.active,
.filter-tabs button.active {
  color: #19200e;
  background: #e0e8d0;
  border-color: #e0e8d0;
}
.cosmetic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.cosmetic-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
}
.cosmetic-tile.equipped {
  border-color: #6b7a4b;
}
.cosmetic-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 160px;
  padding: 16px;
  overflow: hidden;
}
.cosmetic-preview .wardrobe-art {
  width: 80px;
  height: 72px;
  opacity: 0.9;
}
.cosmetic-preview .identity {
  max-width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
}
.cosmetic-preview .identity-avatar {
  width: 32px;
  height: 32px;
  font-size: var(--text-xs);
  flex: none;
}
.cosmetic-preview .identity-name {
  max-width: 120px;
  font-size: var(--text-sm);
}
.cosmetic-copy {
  padding: 16px 16px 0;
  min-width: 0;
}
.cosmetic-copy h3 {
  font-size: var(--text-lg);
  line-height: 1.3;
  margin: 0 0 8px;
}
.cosmetic-copy p {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 0 0 12px;
}
.cosmetic-price {
  display: block;
  font-size: var(--text-base);
  line-height: 1.5;
  font-weight: 700;
}
.cosmetic-actions {
  display: flex;
  padding: 16px;
  margin-top: auto;
}
.cosmetic-actions button {
  width: 100%;
  min-height: var(--touch-h);
  padding: 10px 12px;
  font-size: var(--text-sm);
}
.shop-economy {
  border-radius: var(--radius-sm);
  margin: 0 0 16px;
  background: var(--paper);
  border: 0;
}
.shop-economy > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--control-h);
  padding: 12px 16px;
  font-size: var(--text-sm);
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}
.products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.products article {
  min-width: 0;
  padding: 24px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  border: var(--border);
  overflow: hidden;
}
.products article h2 {
  font-size: 26px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.products article p,
.product-benefits li {
  font-size: var(--text-sm);
  line-height: 1.5;
}
.product-illustration {
  height: 140px;
  position: relative;
  flex: none;
  margin: 16px 0;
}
.product-price strong {
  font-size: var(--title-lg);
  line-height: 1.2;
}
/* Профиль: статистика раньше настроек, все панели доступны с клавиатуры. */
.profile-summary {
  margin-bottom: 16px;
}
.profile-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.profile-intro h1 {
  font-size: var(--title-xl);
  margin-bottom: 8px;
}
.profile-intro > .identity {
  min-width: 0;
}
.profile-intro .identity-name {
  font-size: var(--text-lg);
  max-width: 200px;
}
.profile-intro .identity-avatar {
  width: 48px;
  height: 48px;
  flex: none;
}
.profile-intro .muted {
  font-size: var(--text-xs);
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 12px;
}
.profile-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 0;
  border-radius: 0;
  padding: 0 12px 0 0;
  background: none;
  min-width: 0;
}
.profile-stats strong {
  display: block;
  font-size: 26px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.profile-stats > div > span {
  display: block;
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.5;
}
.profile-summary > .text-button {
  padding: 8px 0;
}
.profile-shortcuts {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.profile-shortcuts button {
  flex: 1;
  justify-content: flex-start;
}
.profile-shortcuts button > span:last-child {
  margin-left: auto;
}
.profile-panel > .panel {
  background: transparent;
  border: 0;
  padding: 0;
}
.profile-stats .icon-value,
.profile-stats .icon-value > span {
  font: inherit;
  color: inherit;
}
.profile-stats .icon-value .ui-icon {
  width: 20px;
  height: 20px;
}
.profile-panel > .section:first-child {
  margin-top: 0;
}
.profile-panel form > p {
  font-size: var(--text-sm);
}
.profile-session {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.rarity-help {
  margin-top: 12px;
  font-size: var(--text-sm);
}
.rarity-help > summary {
  color: var(--muted);
  min-height: var(--touch-h);
  padding: 12px 0;
  cursor: pointer;
  font-size: var(--text-sm);
}
.rarity-help p {
  font-size: var(--text-sm);
  margin-top: 8px;
}
.collection-heading > progress {
  margin-top: 16px;
}
.collection-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.collection-tools .filter-tabs {
  margin: 0;
}
.rarity-filter {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--muted);
}
.rarity-filter select {
  min-height: var(--touch-h);
  padding: 8px 12px;
  width: 160px;
  font-size: var(--text-sm);
}
.achievement {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 16px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
}
.achievement > .achievement-icon {
  width: 36px;
  height: 40px;
  font-size: 22px;
  border-radius: 10px;
}
.achievement h3 {
  font-size: var(--text-lg);
  line-height: 1.3;
  margin: 8px 0;
}
.achievement p {
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 0 0 12px;
  color: var(--muted);
}
.achievement-meta,
.achievement-meta small {
  font-size: var(--text-xs);
  line-height: 1.5;
}
.leader-row {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 16px;
  background: var(--paper);
}
@media (max-width: 1279px) and (min-width: 1121px) {
  #header {
    gap: 16px;
  }
  #header .site-links {
    gap: 12px;
  }
  #nav button {
    padding: 12px 8px;
    gap: 4px;
    font-size: var(--text-sm);
  }
  #nav .nav-icon {
    display: none;
  }
  .cosmetic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1120px) {
  #header .site-links {
    display: none;
  }
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "nav" "main";
  }
  #nav button {
    padding: 12px 10px;
    font-size: var(--text-sm);
    gap: 4px;
  }
  .cosmetic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  :root {
    --header-h: 64px;
    --nav-h: 68px;
  }
  body {
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  }
  #header {
    height: 64px;
    padding: 0 16px;
    gap: 12px;
  }
  .brand {
    min-height: var(--touch-h);
    font-size: var(--text-sm);
    gap: 8px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  #header .age-mark {
    display: none;
  }
  #account {
    gap: 8px;
  }
  #account select {
    width: 52px;
    min-height: var(--touch-h);
  }
  #account .register-button {
    font-size: var(--text-sm);
    min-height: var(--touch-h);
    padding: 10px 12px;
  }
  #account .text-button {
    padding: 8px;
    min-height: var(--touch-h);
  }
  #account .balance {
    font-size: var(--text-xs);
  }
  #account .chat-toggle,
#account .user-chip {
    display: none;
  }
  .layout {
    padding: 24px 16px 32px;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main";
  }
  #nav,
body.game-focus #nav {
    display: flex;
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    gap: 0;
    border: 0;
    border-top: 1px solid var(--line);
    background: #10130e;
    border-radius: 0;
    overflow: visible;
  }
  #nav button {
    min-width: 0;
    flex: 1;
    height: 56px;
    min-height: 56px;
    flex-direction: column;
    gap: 4px;
    padding: 6px 2px;
    border: 0;
    border-radius: 8px;
    font-size: var(--text-xs);
    font-weight: 400;
  }
  #nav button.active {
    background: #d7fe390c;
    color: var(--accent);
    border: 0;
  }
  #nav .nav-secondary {
    display: none;
  }
  #nav .nav-icon {
    display: flex;
  }
  .nav-chat {
    display: flex !important;
  }
  #nav .nav-label {
    display: block;
  }
  #nav .nav-short {
    display: none !important;
  }
  h1,
.page-heading h1,
.shop-heading h1,
.profile-intro h1 {
    font-size: var(--title-lg);
    line-height: 1.2;
  }
  h2,
.section-heading h2,
.modal-heading h2 {
    font-size: 22px;
    line-height: 1.25;
  }
  .page-heading {
    margin-bottom: 24px;
  }
  .page-heading p,
.shop-heading p {
    font-size: var(--text-sm);
    line-height: 1.5;
    margin-top: 12px;
  }
  .panel {
    padding: 16px;
  }
  .section-heading {
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }
  .section-heading p {
    font-size: var(--text-sm);
  }
  .section {
    margin-top: 24px;
  }
  #modal {
    max-height: calc(100dvh - 24px);
    width: calc(100% - 24px);
    padding: 20px;
    border-radius: var(--radius);
  }
  .modal-heading {
    gap: 12px;
    margin-bottom: 20px;
  }

  body.game-focus {
    
    --nav-h: 68px;
  }
  body.game-focus #game-menu {
    display: none;
  }

  #selection-preview {
    bottom: calc(156px + env(safe-area-inset-bottom));
    max-height: 45dvh;
    left: 12px;
    right: 12px;
    padding: 16px;
  }
  body.game-focus #toasts {
    bottom: calc(164px + env(safe-area-inset-bottom));
  }
  .shop-tabs,
.profile-tabs {
    margin-bottom: 16px;
  }
  .wardrobe-filters {
    gap: 8px;
    flex-wrap: nowrap;
  }
  .wardrobe-filters button {
    padding: 8px 12px;
    font-size: var(--text-sm);
  }
  .cosmetic-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .cosmetic-tile {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0;
  }
  .cosmetic-preview {
    grid-row: span 2;
    min-height: 176px;
    padding: 12px 8px;
    gap: 12px;
  }
  .cosmetic-preview .wardrobe-art {
    width: 64px;
    height: 64px;
  }
  .cosmetic-preview .identity {
    flex-direction: column;
    gap: 4px;
  }
  .cosmetic-preview .identity-name {
    max-width: 76px;
    font-size: var(--text-xs);
  }
  .cosmetic-copy {
    padding: 16px 16px 0;
  }
  .cosmetic-copy h3 {
    font-size: var(--text-lg);
    margin-bottom: 4px;
  }
  .cosmetic-copy p {
    font-size: var(--text-sm);
    line-height: 1.5;
    margin-bottom: 8px;
  }
  .cosmetic-price {
    font-size: var(--text-sm);
  }
  .cosmetic-actions {
    grid-column: 2;
    margin: 0;
    padding: 12px 16px 16px;
  }
  .cosmetic-actions button {
    min-height: var(--touch-h);
  }
  .shop-economy > summary {
    padding: 12px;
  }
  .products {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .products article {
    padding: 20px;
  }
  .products article h2 {
    font-size: var(--title-md);
  }
  .product-illustration {
    height: 128px;
  }
  .product-price strong {
    font-size: var(--title-lg);
  }
  .profile-intro {
    gap: 12px;
  }
  .profile-intro .identity-name {
    max-width: 116px;
    font-size: var(--text-base);
  }
  .profile-intro .identity-avatar {
    width: 40px;
    height: 40px;
  }
  .profile-stats {
    margin-top: 24px;
    gap: 8px;
  }
  .profile-stats > div {
    padding: 0;
  }
  .profile-stats strong {
    font-size: var(--title-md);
  }
  .profile-shortcuts {
    gap: 12px;
    margin-bottom: 24px;
  }
  .profile-shortcuts button {
    padding: 12px;
    font-size: var(--text-sm);
  }
  .profile-shortcuts .nav-icon {
    display: none;
  }
  .profile-tabs [role="tab"] {
    padding: 12px 8px;
  }
  .collection-tools {
    gap: 12px;
  }
  .collection-tools .filter-tabs {
    width: 100%;
  }
  .rarity-filter {
    width: 100%;
    justify-content: space-between;
  }
  .achievement {
    padding: 16px;
    gap: 12px;
  }
  .achievement-grid {
    gap: 12px;
  }
  .leader-row {
    padding: 16px;
  }
}
@media (max-width: 429px) {
  body:not(.is-auth) #header .brand > span {
    display: none;
  }
  .profile-intro {
    flex-wrap: wrap;
  }
}
@media (max-width: 359px) {
  #header {
    padding: 0 12px;
    gap: 8px;
  }
  .layout {
    padding-left: 12px;
    padding-right: 12px;
  }
  #account {
    gap: 4px;
  }
  #account .register-button {
    padding: 10px;
    font-size: var(--text-xs);
  }
  #nav button {
    font-size: 11px;
  }
  
  .cosmetic-tile {
    grid-template-columns: 84px minmax(0, 1fr);
  }
  .cosmetic-copy {
    padding: 12px 12px 0;
  }
  .cosmetic-actions {
    padding: 12px;
  }
  .cosmetic-preview .identity-name {
    max-width: 64px;
  }
  .wardrobe-filters {
    gap: 6px;
  }
  .wardrobe-filters button {
    padding: 8px 10px;
  }

}

/* Поиск и порционная загрузка коллекции сохраняют фокус и уже показанные карточки. */
.award-search {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.award-search input {
  flex: 1;
  width: 0;
}
.award-search button {
  flex: none;
}
.award-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}
.award-pagination span {
  font-size: var(--text-sm);
  color: var(--muted);
}
/* Финальная настройка областей нажатия и полей длинной формы. */
.brand {
  min-width: 44px;
}

#profile-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}
#profile-form > label:first-child {
  grid-column: 1 / -1;
  max-width: 480px;
  width: 100%;
}
#profile-form > p {
  grid-column: 1 / -1;
}
#profile-form > button {
  justify-self: start;
}
@media (max-width: 760px) {
  #profile-form {
    grid-template-columns: minmax(0, 1fr);
  }
  #profile-form > label:first-child {
    max-width: none;
  }
  #nav .parent-active {
    background: #d7fe390c;
    color: var(--accent);
  }
}

@media (max-width: 760px) {

  body.game-focus #footer {
    display: none;
  }
  body.game-focus:not(.has-hand-controls) #toasts {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
}

/* Наборы карт: компактный выбор в комнате и отдельный каталог в магазине. */
.pack-selector {
  margin: 18px 0;
  padding: 0;
  border: 0;
}
.pack-selector > legend {
  margin-bottom: 4px;
  font-weight: 700;
  font-size: var(--text-base);
}
.pack-selector > .muted {
  margin: 0 0 10px;
}
.pack-selector-list {
  display: grid;
  gap: 8px;
  max-height: 310px;
  overflow: auto;
  padding-right: 4px;
}
.pack-choice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--paper);
  cursor: pointer;
}
.pack-choice:has(input:checked) {
  border-color: var(--accent-deep);
  background: var(--accent-soft);
}
.pack-choice:hover:not(.is-pinned) {
  background: var(--paper-raised);
}
.pack-choice.is-pinned {
  border-color: #667247;
  background: #d7fe3908;
  cursor: default;
}
.pack-choice input {
  margin-top: 3px;
  accent-color: var(--accent);
}
.pack-choice > span,
.pack-product-head > div {
  min-width: 0;
}
.pack-choice strong,
.pack-choice small {
  display: block;
}
.pack-choice strong,
.pack-product-head h3 {
  overflow-wrap: anywhere;
}
.pack-choice small {
  margin-top: 3px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.pack-choice em {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  font-style: normal;
}
.pack-choice em i {
  padding: 3px 7px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}
.pack-shop-section {
  margin: 0;
}
.pack-shop-heading {
  margin-bottom: 18px;
}
.pack-shop-heading h2 {
  margin-bottom: 6px;
}
.pack-shop-heading p,
.pack-counts {
  color: var(--muted);
}
.pack-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.pack-product {
  min-width: 0;
  padding: 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
}
.pack-product.is-owned {
  border-color: #667247;
}
.pack-product-head,
.pack-product-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.pack-product-head h3 {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.2;
}
.pack-product-head > strong {
  flex: none;
  font-size: var(--title-md);
  color: var(--accent);
}
.pack-counts {
  margin: 8px 0 16px;
  font-size: var(--text-sm);
}
.pack-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pack-preview-card {
  min-height: 150px;
  padding: 14px;
  border: 1px solid #39393d;
  border-radius: 13px;
  background: #111114;
}
.pack-preview-card.answer {
  color: #141414;
  background: #efefe9;
  border-color: #efefe9;
}
.pack-preview-card small {
  display: block;
  margin-bottom: 12px;
  opacity: 0.6;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pack-preview-card p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.pack-product-bottom {
  align-items: center;
  margin-top: 16px;
}
.pack-product-bottom > strong {
  font-size: var(--title-sm);
}
.pack-purchase > h3 {
  margin-bottom: 4px;
  font-size: var(--title-md);
}
.pack-purchase > p {
  color: var(--muted);
}
.pack-purchase .pack-preview {
  margin: 16px 0;
}
@media (max-width: 760px) {
  .pack-shop-grid,
.pack-preview {
    grid-template-columns: minmax(0, 1fr);
  }
  .pack-product {
    padding: 16px;
  }
  .pack-preview-card {
    min-height: 120px;
  }
  .pack-selector-list {
    max-height: 280px;
  }
}

/* 2.11.17: источник карты и купленные колоды профиля. pack.id также присутствует прямым CSS-классом элемента. */
.card-pack-name {
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.72;
}

.submission-packs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.submission-packs span {
  padding: 3px 7px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}
#selection-preview li > span .card-pack-name {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
}
.profile-purchases + .profile-purchases {
  margin-top: 24px;
}
.profile-purchases h3,
.public-packs-section h3 {
  margin-bottom: 12px;
}
.purchased-pack-list {
  display: grid;
  gap: 8px;
}
.purchased-pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
}
.purchased-pack > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.purchased-pack > div:last-child {
  text-align: right;
}
.purchased-pack small,
.public-pack small {
  color: var(--muted);
  font-size: 11px;
}
.public-packs-section {
  margin: 24px 0;
}
.public-packs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.public-pack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: var(--border);
  border-radius: 9px;
  background: #23262c;
}
@media (max-width: 560px) {
  .purchased-pack {
    align-items: flex-start;
  }
  .purchased-pack > div:last-child {
    text-align: right;
  }
}

/* 2.11.18 — ежедневный бонус показывает и замены, и Стыд. */
.daily-day b {
  display: grid;
  gap: 2px;
  justify-items: center;
  font-size: var(--text-sm);
  line-height: 1.2;
}
.daily-day b span {
  white-space: nowrap;
}
@media (max-width: 760px) {
  .daily-day b {
    font-size: 11px;
  }
}

/* 2.12.7 — заголовок модального окна остаётся на месте при прокрутке,
   поэтому кнопка закрытия всегда доступна. */

/* 2.12.7: языковое аудио карт и быстрые фильтры админки. */
.card-audio-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  vertical-align: middle;
  color: currentColor;
  opacity: 0.8;
}
.card-audio-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.admin-filter-tabs button {
  min-height: 38px;
  padding: 8px 12px;
}
.admin-card-row .actions {
  align-items: center;
  flex-wrap: wrap;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.status-badge.is-on {
  color: var(--accent);
  border-color: #6d8035;
}
.status-badge.is-off {
  opacity: 0.68;
}
.card-language-editor {
  min-width: 0;
  padding: 14px;
  border: var(--border);
  border-radius: 14px;
}
.card-language-editor + .card-language-editor {
  margin-top: 14px;
}
.card-language-editor legend {
  padding: 0 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--muted);
}
.card-language-editor input[type="file"] {
  padding: 10px;
}
.card-audio-admin {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.card-audio-admin audio {
  width: 100%;
  max-width: 100%;
  height: 36px;
}
@media (max-width: 760px) {
  .admin-card-row {
    align-items: flex-start;
  }
  .admin-card-row .actions {
    width: 100%;
    justify-content: flex-start;
  }
  .admin-filter-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-filter-tabs button {
    width: 100%;
    padding-inline: 6px;
  }
}

/* 2.12.12 — admin cards: preserve the original stable list-row layout.
   Only the card actions and narrow-screen wrapping are specialized. */
body[data-page="admin"] .admin-card-row {
  width: 100%;
  max-width: 100%;
}
body[data-page="admin"] .admin-card-row > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}
body[data-page="admin"] .admin-card-row > div:first-child b,
body[data-page="admin"] .admin-card-row > div:first-child small {
  max-width: 100%;
  overflow-wrap: anywhere;
}
body[data-page="admin"] .admin-card-row .actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}
body[data-page="admin"] .admin-card-row .actions > * {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  body[data-page="admin"] .admin-filter-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }
  body[data-page="admin"] .admin-filter-tabs button {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    padding-inline: 12px;
  }
  body[data-page="admin"] .admin-card-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  body[data-page="admin"] .admin-card-row .actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Plus identity: box-shadow берётся из выбранного Комплекта оформления.
   Без активного Plus никакого box-shadow у identity нет. */
.identity.bundle-classic {
  --plus-avatar-shadow: none;
  --plus-emblem-shadow: none;
}
.identity.bundle-spark {
  --plus-avatar-shadow: 0 0 0 2px #edb069, 0 0 12px #e9972d35;
  --plus-emblem-shadow: 0 0 0 2px #edb069;
}
.identity.bundle-mint {
  --plus-avatar-shadow: 0 0 0 2px #6aceab, 0 0 12px #6aceab35;
  --plus-emblem-shadow: 0 0 0 2px #6aceab;
}
.identity.bundle-sunset {
  --plus-avatar-shadow: 0 0 0 2px #ed9168, 0 0 12px #ed916835;
  --plus-emblem-shadow: 0 0 0 2px #ed9168;
}
.identity.bundle-violet {
  --plus-avatar-shadow: 0 0 0 2px #b99bef, 0 0 12px #b99bef35;
  --plus-emblem-shadow: 0 0 0 2px #b99bef;
}
.identity.bundle-gold {
  --plus-avatar-shadow: 0 0 0 2px #eac66d, 0 0 12px #eac66d35;
  --plus-emblem-shadow: 0 0 0 2px #eac66d;
}
.identity.bundle-aurora {
  --plus-avatar-shadow: 0 0 0 2px #a8a0ff, 0 0 14px #9a74e340;
  --plus-emblem-shadow: 0 0 0 2px #a8a0ff;
}
.identity:not(.is-plus) .identity-avatar,
.identity:not(.is-plus) .identity-emblem {
  box-shadow: none !important;
}
.identity.is-plus .identity-avatar {
  box-shadow: var(--plus-avatar-shadow, none) !important;
}
.identity.is-plus .identity-emblem {
  box-shadow: var(--plus-emblem-shadow, none) !important;
}
.identity.is-plus .identity-name {
  background: linear-gradient(to right, #fb512f, #ff9500);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}
.identity.is-plus .identity-name small {
  background: none;
  color: var(--muted) !important;
  -webkit-text-fill-color: var(--muted);
}
.avatar-color-setting small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 400;
}
.avatar-color-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.avatar-color-control input[type="color"] {
  width: 56px;
  height: 40px;
  padding: 3px;
  cursor: pointer;
}
.avatar-color-control code {
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
}

/* 2.12.20 — единая SVG-иконография. */
button > .ui-icon,
a > .ui-icon {
  width: 18px;
  height: 18px;
}
.primary > .ui-icon,
.secondary > .ui-icon,
.text-button > .ui-icon {
  margin-inline: 2px;
}
.room-icon .ui-icon,
.table-mark .ui-icon {
  width: 28px;
  height: 28px;
}
.player > small .ui-icon {
  width: 15px;
  height: 15px;
}
.large-mark .ui-icon {
  width: 34px;
  height: 34px;
}
.round-result > span .ui-icon,
.champion > span .ui-icon {
  width: 40px;
  height: 40px;
  margin: auto;
}

.daily-day b span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.daily-day b .ui-icon {
  width: 14px;
  height: 14px;
}
.wallet-chevron .ui-icon {
  width: 15px;
  height: 15px;
}
.plus-emblem .ui-icon {
  width: 34px;
  height: 34px;
}
.swap-card .ui-icon {
  width: 26px;
  height: 26px;
}
/* VK ID: блок рассчитан на несколько социальных провайдеров без изменения формы. */
.auth-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0 14px;
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}
.social-auth-buttons {
  display: grid;
  gap: 8px;
}
.social-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--control-h);
  width: 100%;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
.social-auth-vk {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
}
.social-auth-vk:hover,
.social-auth-vk:focus-visible {
  background: #086dd8;
  border-color: #086dd8;
  color: #fff;
}
.social-auth-button .ui-icon {
  width: 21px;
  height: 21px;
  fill: currentColor;
  stroke: none;
}
.registration-legal {
  margin: 14px 0;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.55;
}
.registration-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Telegram Login: кнопка провайдера и ожидание одноразового token. */
.social-auth-telegram {
  background: #0088cc;
  border-color: #0088cc;
  color: #fff;
  cursor: pointer;
}
.social-auth-telegram:hover,
.social-auth-telegram:focus-visible {
  background: #0077b5;
  border-color: #0077b5;
  color: #fff;
}
.telegram-auth-wait {
  display: grid;
  justify-items: center;
  gap: 26px;
  padding: 18px 0 4px;
}
.telegram-auth-wait .queue-spinner {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
}
.telegram-auth-wait .queue-spinner .ui-icon {
  width: 58px;
  height: 58px;
}
.telegram-auth-actions {
  width: 100%;
  display: grid;
  gap: 8px;
}
.telegram-auth-actions a {
  text-decoration: none;
}
.telegram-auth-actions a.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}
