:root {
  color-scheme: light;
  --page: #f5f7fb;
  --panel: #ffffff;
  --ink: #19202d;
  --muted: #526076;
  --line: #dce3ef;
  --accent: #1456f0;
  --screen: #111318;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 280px;
  background: var(--page);
  color: var(--ink);
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.site-header, main, .site-footer {
  max-width: 1168px;
  width: calc(100% - 64px);
  margin-inline: auto;
}

.site-header {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand, .source-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.brand { font-size: 19px; font-weight: 700; letter-spacing: -.04em; }
.brand img { border-radius: 8px; }
.source-link { color: var(--muted); font-size: 14px; }
.source-link:hover { color: var(--accent); }

.intro {
  padding: clamp(36px, 5.4vw, 78px) 0 clamp(26px, 3.2vw, 42px);
}

h1 {
  margin: 0;
  font-size: clamp(38px, 6.4vw, 76px);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -.06em;
}

h1 span { color: var(--accent); }

.intro p {
  max-width: 46ch;
  margin: 16px 0 0;
  line-height: 1.7;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
}

.showcase {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 14px 42px rgba(30, 55, 100, .07);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 13px;
  border-bottom: 1px solid var(--line);
}

.tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.tabs a:hover { background: var(--page); color: var(--ink); }
.tabs a[aria-selected="true"] { background: #eaf0ff; color: #1646b7; }

.scene { margin: 0; padding: 16px; }
.scene + .scene { border-top: 1px solid var(--line); }
.scene figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 1px 3px 14px; }
.scene figcaption strong { font-size: 15px; }
.scene figcaption span { color: var(--muted); font-size: 14px; line-height: 1.55; }

.scene picture {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #252a33;
  background: var(--screen);
}

.scene img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1360 / 790;
}

.preview-image {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: zoom-in;
}

.site-footer {
  padding-block: 24px 38px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.image-viewer {
  max-width: min(calc(100% - 24px), 1500px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.image-viewer::backdrop { background: rgba(15, 23, 38, .8); }
.image-viewer form { display: flex; justify-content: flex-end; padding: 5px 9px; }
.image-viewer button { min-height: 36px; padding-inline: 10px; border: 0; border-radius: 6px; color: inherit; background: var(--page); cursor: pointer; font: inherit; }
.image-viewer img { display: block; max-width: 100%; max-height: calc(100dvh - 76px); object-fit: contain; background: var(--screen); }

@media (max-width: 600px) {
  .site-header, main, .site-footer { width: calc(100% - 32px); }
  .site-header { height: 57px; }
  .intro p { margin-top: 12px; }
  .showcase { border-radius: 14px; }
  .tabs { padding: 8px; gap: 1px 3px; }
  .tabs a { min-height: 38px; padding-inline: 8px; font-size: 13px; }
  .scene { padding: 10px; }
  .scene figcaption { display: grid; padding-bottom: 10px; }
  .scene img { aspect-ratio: 390 / 844; }
}
