:root {
  --tg-bg: #070906;
  --tg-panel: rgba(18, 22, 15, 0.94);
  --tg-panel-soft: rgba(196, 182, 118, 0.08);
  --tg-line: rgba(201, 184, 111, 0.16);
  --tg-line-strong: rgba(201, 184, 111, 0.34);
  --tg-text: #f4efd9;
  --tg-muted: #a7a18e;
  --tg-gold: #c9b86f;
  --tg-green: #9cab61;
  --tg-red: #d98271;
  --tg-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
  --cs-loading-bg: rgba(7, 9, 6, 0.82);
  --cs-loading-panel: var(--tg-panel);
  --cs-loading-line: var(--tg-line-strong);
  --cs-loading-text: var(--tg-text);
  --cs-loading-muted: var(--tg-muted);
  --cs-loading-gold: var(--tg-gold);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--tg-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(201, 184, 111, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 184, 111, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 88% 2%, rgba(156, 171, 97, 0.18), transparent 17rem),
    radial-gradient(circle at 0% 18%, rgba(201, 184, 111, 0.1), transparent 16rem),
    var(--tg-bg);
  background-size: 26px 26px, 26px 26px, auto, auto, auto;
  color: var(--tg-text);
  font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.tg-shell {
  display: grid;
  gap: 14px;
  width: min(100% - 18px, 560px);
  margin: 0 auto;
  padding: 10px 0 34px;
}

.tg-hero,
.tg-card,
.tg-stats article,
.tg-action,
.tg-menu-item {
  border: 1px solid var(--tg-line);
  background:
    radial-gradient(circle at 88% 10%, rgba(196, 182, 118, 0.13), transparent 9rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    var(--tg-panel);
  box-shadow: var(--tg-shadow);
}

.tg-hero {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 28px;
  overflow: hidden;
}

.tg-player-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--tg-line);
  border-radius: 18px;
  background: rgba(7, 9, 7, 0.3);
}

.tg-player-card img,
.tg-player-card > span {
  width: 46px;
  height: 46px;
  border: 1px solid var(--tg-line-strong);
  border-radius: 14px;
  object-fit: cover;
}

.tg-player-card > span {
  display: grid;
  place-items: center;
  color: var(--tg-gold);
  font-size: 13px;
  font-weight: 950;
}

.tg-player-card strong,
.tg-player-card small {
  display: block;
}

.tg-player-card small {
  margin-top: 3px;
  color: var(--tg-gold);
  font-size: 12px;
  font-weight: 800;
}

.tg-next-game-card {
  border-color: var(--tg-line-strong);
}

.tg-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.tg-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--tg-line-strong);
  border-radius: 16px;
  background: rgba(196, 182, 118, 0.1);
  color: var(--tg-gold);
  font-weight: 950;
}

.tg-brand strong,
.tg-brand small,
.tg-stats span,
.tg-section-head span,
.tg-row span,
.tg-row small,
.tg-menu-text strong,
.tg-menu-text small {
  display: block;
}

.tg-brand small,
.tg-hero p,
.tg-auth-status,
.tg-stats span,
.tg-row small,
.tg-card p,
.tg-section-head small,
.tg-menu-text small {
  color: var(--tg-muted);
}

.tg-eyebrow {
  margin: 6px 0 -7px;
  color: var(--tg-gold) !important;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tg-hero h1 {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: clamp(42px, 17vw, 76px);
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.tg-hero p {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
}

.tg-auth-status {
  padding: 11px 13px;
  border: 1px solid var(--tg-line);
  border-radius: 15px;
  background: rgba(7, 9, 7, 0.34);
  font-weight: 850;
}

.tg-auth-status.is-ok {
  color: var(--tg-green);
  border-color: rgba(156, 171, 97, 0.4);
}

.tg-auth-status.is-error {
  color: var(--tg-red);
  border-color: rgba(217, 130, 113, 0.42);
}

.tg-consent-card[hidden] {
  display: none;
}

.tg-consent-card {
  border-color: rgba(191, 174, 111, 0.42);
}

.tg-consent-control {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin-top: 14px;
  color: var(--tg-text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.tg-consent-control input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--tg-gold);
}

.tg-consent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 8px 0 2px 33px;
}

.tg-consent-links a {
  color: var(--tg-gold);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tg-consent-card .tg-primary {
  width: 100%;
  margin-top: 18px;
}

.tg-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tg-stats article {
  min-width: 0;
  padding: 14px;
  border-radius: 20px;
}

.tg-stats span,
.tg-section-head span {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tg-stats strong {
  display: block;
  min-width: 0;
  margin-top: 8px;
  overflow: hidden;
  color: var(--tg-gold);
  font-size: clamp(18px, 5vw, 23px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.tg-action,
.tg-primary,
.tg-secondary {
  min-height: 48px;
  padding: 13px 9px;
  border-radius: 18px;
  color: var(--tg-gold);
  font-weight: 950;
  text-align: center;
}

.tg-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
}

.tg-section-head,
.tg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tg-section-head a,
.tg-section-head small {
  color: var(--tg-gold);
  font-weight: 850;
}

.tg-menu-groups {
  display: grid;
  gap: 16px;
}

.tg-menu-group {
  display: grid;
  gap: 10px;
}

.tg-menu-group h2 {
  margin: 0;
  color: var(--tg-muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tg-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.tg-menu-item {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  min-height: 78px;
  padding: 12px;
  border-radius: 18px;
}

.tg-menu-item em {
  position: absolute;
  top: 9px;
  right: 9px;
  min-width: 23px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(217, 130, 113, 0.18);
  color: #ffd0c6;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  text-align: center;
}

.tg-menu-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--tg-line-strong);
  border-radius: 13px;
  background: rgba(196, 182, 118, 0.09);
  color: var(--tg-gold);
  font-weight: 950;
}

.tg-menu-text {
  min-width: 0;
}

.tg-menu-text strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-menu-text small {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.25;
}

.tg-list {
  display: grid;
  gap: 9px;
}

.tg-row {
  padding: 12px;
  border: 1px solid var(--tg-line);
  border-radius: 16px;
  background: rgba(7, 9, 7, 0.32);
}

.tg-row span {
  min-width: 0;
}

.tg-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-row b {
  color: var(--tg-gold);
  white-space: nowrap;
}

.tg-login-card h2 {
  margin: 0;
  font-size: 30px;
  text-transform: uppercase;
}

.tg-login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tg-primary,
.tg-secondary {
  display: block;
  border: 1px solid rgba(196, 182, 118, 0.42);
}

.tg-primary {
  background: linear-gradient(180deg, rgba(118, 130, 70, 0.88), rgba(82, 92, 49, 0.88));
  color: var(--tg-text);
}

.tg-secondary {
  background: rgba(7, 9, 7, 0.28);
}

@media (max-width: 430px) {
  .tg-shell {
    width: min(100% - 14px, 560px);
  }

  .tg-command-strip,
  .tg-login-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tg-menu-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .tg-stats {
    grid-template-columns: 1fr;
  }
}
