:root {
  --gold: #d1ae52;
  --gold-2: #e9ca78;
  --orange: #ffaa09;
  --ink: #1a1a1a;
  --muted: #8a8a8a;
  --bg: #f6f3ea;
  --card: #ffffff;
  --bar: #111111;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #0b0b0b;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.phone {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  padding-bottom: 72px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 6px;
  background: linear-gradient(180deg, #1a1408 0%, #2a2212 100%);
}

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

.brand img {
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand b {
  color: var(--gold-2);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.top-actions img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.auth {
  display: flex;
  gap: 8px;
  padding: 8px 12px 10px;
  background: #1a1408;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-login {
  background: #2b2b2b;
  color: #fff;
}

.btn-reg {
  background: linear-gradient(180deg, #f3d78a, #d1ae52);
  color: #4a2d00;
}

.balance {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 13px;
}

.balance img {
  width: 18px;
  height: 18px;
}

.hero {
  padding: 10px 12px 0;
}

.hero-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.hero-track::-webkit-scrollbar {
  display: none;
}

.hero-track img {
  width: 100%;
  min-width: 100%;
  height: 148px;
  object-fit: cover;
  border-radius: 14px;
  scroll-snap-align: start;
  background: #ddd;
}

.cats {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px;
  scrollbar-width: none;
}

.cats::-webkit-scrollbar {
  display: none;
}

.cat {
  flex: 0 0 auto;
  width: 64px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.cat img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  margin: 0 auto 4px;
}

.cat.active {
  color: #8a5a00;
  font-weight: 700;
}

.section {
  padding: 0 12px 16px;
}

.section h2 {
  margin: 0 0 10px;
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.game {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.game img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #ece6d6;
}

.game span {
  display: block;
  padding: 6px 6px 8px;
  font-size: 11px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tabbar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bar);
  display: flex;
  justify-content: space-around;
  align-items: center;
  color: #cfcfcf;
  font-size: 10px;
}

.tabbar div {
  text-align: center;
}

.tabbar img {
  width: 22px;
  height: 22px;
  display: block;
  margin: 0 auto 3px;
}

.tabbar .on {
  color: var(--gold-2);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 24px 0;
}

.cat {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
}

.game[hidden] {
  display: none;
}

img.broken {
  outline: 1px dashed #c00;
  background: #f8d7da;
}

.subhead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #1a1408;
  color: var(--gold-2);
  font-weight: 700;
}

.subhead a {
  color: var(--gold-2);
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
}

.panel {
  padding: 16px 14px 80px;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.field {
  width: 100%;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid #e5dcc4;
  border-radius: 10px;
  font: inherit;
}

.tabbar > div {
  cursor: pointer;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
  color: #222;
  text-decoration: none;
  font-weight: 600;
}

.menu-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.cards a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.cards img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.play-cover {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  margin: 12px auto;
}
