*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ly-text);
  background: var(--ly-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
}

.ly-container {
  width: min(100% - 32px, var(--ly-container));
  margin-inline: auto;
}

.ly-section {
  margin-block: 24px;
}

.ly-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ly-section__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.ly-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--ly-radius-pill);
  background: var(--ly-accent);
  color: #052e1f;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.ly-btn:hover {
  background: var(--ly-accent-hover);
}

.ly-btn--ghost {
  background: transparent;
  color: var(--ly-accent);
  border: 1px solid var(--ly-accent);
}

.ly-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--ly-radius-pill);
  font-size: 11px;
  background: var(--ly-primary);
  color: var(--ly-accent);
}

.ly-badge--live {
  background: var(--ly-live);
  color: #fff;
}

.ly-badge--ad {
  background: var(--ly-accent-dim);
  color: var(--ly-accent);
  border: 1px solid var(--ly-accent-glow);
}

.ly-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 640px) {
  .ly-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .ly-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

html.ly-tv .ly-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

html.ly-tv body {
  font-size: 18px;
}

.ly-only-mobile { display: none; }
.ly-only-desktop { display: none; }
.ly-only-tv { display: none; }

@media (max-width: 639px) {
  .ly-only-mobile { display: block; }
  .ly-hide-mobile { display: none !important; }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .ly-only-tablet { display: block; }
}

@media (min-width: 1024px) {
  .ly-only-desktop { display: block; }
  .ly-hide-desktop { display: none !important; }
}

html.ly-tv .ly-only-tv { display: block; }
html.ly-tv .ly-hide-tv { display: none !important; }
