@font-face {
  font-family: "LXGW WenKai";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.0.0/lxgw-wenkai-regular.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #faf9f5;
  --surface: #ffffff;
  --surface-alt: #e8e6dc;
  --ink: #141413;
  --muted: #6f6b63;
  --accent: #d97757;
  --accent-2: #6a9bcc;
  --accent-3: #788c5d;
  --border: #e8e6dc;
  --shadow: 0 16px 40px rgba(20, 20, 19, 0.08);
  --shadow-soft: 0 8px 24px rgba(20, 20, 19, 0.06);
  --radius: 18px;
  --radius-lg: 26px;
  --max-width: 1120px;
  --font-display: "LXGW WenKai", "霞鹜文楷", "Noto Sans SC", "Noto Serif SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "LXGW WenKai", "霞鹜文楷", "Noto Sans SC", "Noto Serif SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --snow: rgba(20, 20, 19, 0.12);
  --rain: rgba(20, 20, 19, 0.18);
  --sakura: rgba(242, 167, 198, 0.55);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141413;
  --surface: #1b1b1a;
  --surface-alt: #23221f;
  --ink: #faf9f5;
  --muted: #b0aea5;
  --border: #2a2925;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
  --snow: rgba(250, 249, 245, 0.6);
  --rain: rgba(250, 249, 245, 0.7);
  --sakura: rgba(242, 167, 198, 0.72);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bgm-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.bgm-bg-active .bgm-bg-canvas {
  opacity: 1;
}

.snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

img {
  max-width: 100%;
  border-radius: 12px;
}

code {
  font-family: "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  font-size: 0.9em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px clamp(20px, 5vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 20px;
  font-weight: 500;
  font-family: var(--font-display);
}

.site-nav a {
  position: relative;
  padding: 6px 2px;
  color: var(--muted);
}

.site-nav a.active {
  color: var(--ink);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

.site-nav a:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.bgm {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.bgm-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.bgm-toggle:hover {
  color: var(--ink);
  background: var(--surface-alt);
}

.bgm-toggle.is-playing {
  color: var(--ink);
  border-color: var(--muted);
  background: var(--surface-alt);
}

.bgm-toggle.is-playing::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-3);
  margin-right: 8px;
  vertical-align: middle;
}

.bgm-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(320px, calc(100vw - 48px));
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
  display: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@supports (background: color-mix(in srgb, white 80%, transparent)) {
  .bgm-panel {
    background: color-mix(in srgb, var(--surface) 92%, transparent);
  }
}

.bgm:hover .bgm-panel,
.bgm.is-open .bgm-panel {
  display: grid;
  gap: 12px;
}

.bgm-panel[aria-hidden="true"] {
  display: none;
}

.bgm-panel-header {
  display: grid;
  gap: 2px;
}

.bgm-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.bgm-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.bgm-vis {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-alt), var(--surface));
}

[data-theme="dark"] .bgm-vis {
  background: linear-gradient(180deg, rgba(250, 249, 245, 0.08), rgba(250, 249, 245, 0.02));
}

.bgm-controls {
  display: grid;
  gap: 10px;
}

.bgm-track-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bgm-skip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.bgm-skip:hover {
  color: var(--ink);
  background: var(--surface-alt);
  border-color: var(--muted);
}

.bgm-volume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.bgm-volume input[type="range"] {
  width: 180px;
  accent-color: var(--accent-2);
}

.theme-toggle {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--ink);
  padding: 6px 12px 6px 30px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  background: var(--surface);
  border-color: var(--muted);
}

.theme-toggle::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  transform: translateY(-50%);
}

[data-theme="dark"] .theme-toggle::before {
  background: var(--accent-2);
}

.atmos-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--font-display);
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.atmos-toggle:hover {
  color: var(--ink);
  background: var(--surface-alt);
}

.site-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 64px clamp(20px, 5vw, 40px) 80px;
  position: relative;
  z-index: 1;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.intro {
  max-width: 640px;
}

.intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  margin: 12px 0 16px;
  letter-spacing: -0.02em;
}

.eyebrow {
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-display);
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  margin: 24px 0 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  font-family: var(--font-display);
}

.btn.primary {
  border: none;
  color: var(--bg);
  background: var(--ink);
}

.btn.ghost {
  background: transparent;
  border-color: var(--surface-alt);
}

.btn.tiny {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn:hover {
  background: var(--surface-alt);
}

.btn.primary:hover {
  background: #1c1c1a;
}

.btn.ghost:hover {
  border-color: var(--border);
}

.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0;
}

.home-links {
  max-width: 560px;
}

.home-links h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 12px;
}

.home-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}

.home-links li {
  border-bottom: 1px solid var(--border);
}

.home-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 500;
  padding: 10px 0;
}

.home-links a::after {
  content: "→";
  color: var(--accent);
  font-weight: 600;
}

.home-links a:hover {
  color: var(--accent);
}

.md-page {
  margin-top: 10px;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.reading-progress.active {
  opacity: 1;
}

.content-header {
  margin-bottom: 26px;
  max-width: 760px;
}

.doc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 12px 0 24px;
}

.about-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.about-toggle-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-family: var(--font-display);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.about-toggle-btn.active {
  background: var(--surface-alt);
  color: var(--ink);
}

.doc-search {
  flex: 1 1 280px;
  display: none;
}

.doc-search.active {
  display: block;
}

.doc-search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.doc-search-results {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.doc-search-results a {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-family: var(--font-display);
}

.doc-search-results span {
  font-size: 0.9rem;
  color: var(--muted);
  font-family: var(--font-body);
  display: block;
}


.doc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-tag {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 0.78rem;
  font-family: var(--font-display);
  color: var(--muted);
}

.subtitle {
  color: var(--muted);
  max-width: 680px;
  line-height: 1.6;
}

.md-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 32px;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 90px;
  align-self: start;
  border-left: 1px solid var(--border);
  padding-left: 16px;
  color: var(--muted);
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.doc-toc .toc-title {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-family: var(--font-display);
  color: var(--ink);
}

.doc-toc a {
  display: block;
  padding: 4px 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.doc-toc a.active {
  color: var(--ink);
}

.doc-footer {
  margin-top: 36px;
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.doc-series,
.doc-backlinks {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.doc-series h3,
.doc-backlinks h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1rem;
}

.doc-series ul,
.doc-backlinks ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.doc-series a,
.doc-backlinks a {
  color: var(--muted);
}

.doc-series a.active {
  color: var(--ink);
}

.doc-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.doc-nav a {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.doc-nav span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-body);
  margin-top: 4px;
}

.prose {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  line-height: 2.78;
  font-size: 1rem;
  max-width: 760px;
}

.prose p {
  margin: 0 0 1.95em;
}

.prose br {
  display: block;
  content: "";
  margin-top: 1.05em;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--font-display);
  margin-top: 1.6em;
}

.prose h1 {
  font-size: 2rem;
}

.prose a {
  color: var(--accent);
  font-weight: 600;
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--surface-alt);
  border-radius: 10px;
  color: var(--muted);
}

.prose blockquote.callout {
  border-left: 3px solid var(--accent-2);
  background: color-mix(in srgb, var(--surface-alt) 86%, var(--accent-2) 14%);
}

.prose blockquote.callout[data-callout="warning"] {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--surface-alt) 82%, var(--accent) 18%);
}

.prose blockquote.callout[data-callout="tip"] {
  border-left-color: var(--accent-3);
  background: color-mix(in srgb, var(--surface-alt) 82%, var(--accent-3) 18%);
}

.prose .callout-title {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}

.prose pre {
  position: relative;
  padding: 18px;
  border-radius: 12px;
  background: #1b1b1a;
  color: #f5f3ef;
  overflow: auto;
  margin: 1.4em 0;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-family: var(--font-display);
  cursor: pointer;
}

.prose pre code {
  color: inherit;
  font-size: 0.9rem;
}

.prose code {
  background: rgba(27, 31, 36, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

.prose ul,
.prose ol {
  padding-left: 1.2em;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

.images-page {
  margin-top: 10px;
}

.album-filters {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.filter-label {
  font-size: 0.78rem;
  font-family: var(--font-display);
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--muted);
}

.filter-chip.active {
  background: var(--surface-alt);
  color: var(--ink);
}

.album-list {
  display: grid;
  gap: 32px;
  max-width: 960px;
}

.album-block h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 6px;
}

.album-group {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.album-group h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--muted);
}

.album-note {
  margin: 0 0 16px;
  color: var(--muted);
}

.photo-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.photo-grid.masonry {
  columns: 3 220px;
  column-gap: 16px;
}

.photo-grid.masonry .photo-card {
  break-inside: avoid;
  margin-bottom: 16px;
}

.photo-card {
  margin: 0;
  display: grid;
  gap: 10px;
}

.photo-card img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.photo-caption {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin: 0;
}

.photo-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  display: inline-flex;
  gap: 6px;
}

.photo-note em {
  font-style: italic;
}

.note-prefix {
  color: var(--muted);
}

.load-more {
  margin-top: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-display);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.load-more:hover {
  color: var(--ink);
  background: var(--surface-alt);
}

.journal-list {
  display: grid;
  gap: 22px;
}

.journal-entry {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
}

.journal-date {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.journal-text {
  margin: 0;
  color: var(--ink);
  line-height: 1.8;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 19, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 24px;
}

.lightbox.active {
  display: flex;
}

.lightbox-image {
  max-width: min(90vw, 1200px);
  max-height: 80vh;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #faf9f5;
  text-align: center;
  max-width: 720px;
}

.lightbox-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
}

.lightbox-count {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: rgba(250, 249, 245, 0.7);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

.lightbox-note {
  margin: 0;
  color: rgba(250, 249, 245, 0.75);
  font-family: var(--font-body);
  font-style: italic;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(250, 249, 245, 0.15);
  color: #faf9f5;
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-close {
  top: 18px;
  right: 18px;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 26px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  z-index: 12;
}

.back-to-top.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-4px);
}

.back-to-top:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.img-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.img-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.skeleton {
  display: grid;
  gap: 12px;
}

.skeleton-line {
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--surface-alt), var(--surface), var(--surface-alt));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-card {
  height: 180px;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--surface-alt), var(--surface), var(--surface-alt));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}


@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 14px;
  }

  .md-layout {
    grid-template-columns: 1fr;
  }

  .doc-toc {
    display: none;
  }
}

@media (max-width: 720px) {
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .bgm-panel {
    right: auto;
    left: 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .photo-grid.masonry {
    columns: 2 160px;
  }

  .back-to-top {
    right: 16px;
    bottom: 18px;
  }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
