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

body,
h1,
h2,
p,
figure,
ul {
  margin: 0;
  padding: 0;
}

body {
  background: #f8fafc;
  color: #0f172a;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.brand {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-header nav a {
  color: #64748b;
  font-size: 0.8125rem;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: #2563eb;
}

.page {
  width: min(100% - 40px, 920px);
  margin: 0 auto;
  padding: 36px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.eyebrow {
  color: #64748b;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
}

h1 {
  margin: 6px 0 10px;
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem);
  line-height: 1.12;
  text-wrap: balance;
}

.lead {
  max-width: 46ch;
  color: #334155;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
}

.hero-img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  background: #e2e8f0;
}

.hero-figure figcaption {
  margin-top: 6px;
  color: #64748b;
  font-size: 0.75rem;
}

.panel {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
}

h2 {
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
}

.panel > p {
  margin-top: 6px;
  color: #334155;
  font-size: 0.875rem;
}

.hint {
  color: #64748b !important;
  font-size: 0.75rem !important;
}

pre {
  margin-top: 10px;
  padding: 12px;
  overflow-x: auto;
  border-radius: 10px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.6875rem;
  line-height: 1.6;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.art img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  background: #e2e8f0;
}

/* object-fit */
.fit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.fit-box {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.fit-box img {
  width: 100%;
  height: 150px;
}

.fit-cover { object-fit: cover; }
.fit-contain { object-fit: contain; }
.fit-fill { object-fit: fill; }

.fit-box figcaption {
  padding: 6px 10px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.6875rem;
  font-family: ui-monospace, Menlo, monospace;
}

/* aspect-ratio 画廊 */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.shot {
  overflow: hidden;
  border-radius: 10px;
  background: #e2e8f0;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ratio-43 { aspect-ratio: 4 / 3; }
.ratio-11 { aspect-ratio: 1 / 1; }
.ratio-169 { aspect-ratio: 16 / 9; }

/* 提示列表 */
.tips {
  margin-top: 8px;
  padding-inline-start: 18px;
  color: #334155;
  font-size: 0.875rem;
}

.tips li + li {
  margin-top: 4px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 24px 36px;
  color: #64748b;
  font-size: 0.75rem;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 12px 18px;
  }

  .page {
    width: min(100% - 28px, 920px);
    padding: 24px 0 44px;
  }

  .panel {
    padding: 16px;
  }

  .fit-grid,
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }
}
