*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--color-text);
  background: linear-gradient(180deg, var(--color-sky-soft) 0%, #ffffff 320px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

main {
  flex: 1 0 auto;
  padding: var(--sp-6) 0 var(--sp-8);
}

/* 区块标题 */
.section-head {
  text-align: center;
  margin-bottom: var(--sp-6);
}

.section-head h2 {
  font-size: var(--fs-2xl);
  color: var(--color-primary-dark);
}

.section-head p {
  color: var(--color-text-muted);
  margin-top: var(--sp-2);
}

.page-title {
  font-size: var(--fs-2xl);
  color: var(--color-primary-dark);
  margin-bottom: var(--sp-2);
}

.page-subtitle {
  color: var(--color-text-muted);
  margin-bottom: var(--sp-6);
}

/* 通用网格（移动优先：单列） */
.grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: 1fr;
}

/* 加载 / 空状态占位 */
.state-msg {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--sp-8) var(--sp-4);
  grid-column: 1 / -1;
}

/* 16:9 视频容器 */
.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-sky);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 工具类 */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* 平板：≥768px —— 两列 */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--sp-5);
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 电脑：≥1024px —— 三 / 四列 */
@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
