:root {
  color-scheme: light;
  --md-bg: #f6f4f8;
  --md-surface: #ffffff;
  --md-surface-2: #fbf9fc;
  --md-text: #231f27;
  --md-muted: #6e6773;
  --md-line: #e4dfe7;
  --md-line-strong: #d3cbd8;
  --md-pink: #c83073;
  --md-pink-dark: #92214f;
  --md-pink-soft: #f8e6ee;
  --md-purple: #645080;
  --md-purple-soft: #eee9f5;
  --md-gold: #9a6a18;
  --md-shadow: 0 18px 60px rgb(55 38 63 / 8%);
  --md-shadow-soft: 0 8px 26px rgb(55 38 63 / 7%);
  --md-radius: 14px;
  --md-radius-sm: 9px;
  --md-reading: 760px;
  --md-shell: 1180px;
  --md-ease-out: cubic-bezier(.23, 1, .32, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --md-bg: #17141a;
  --md-surface: #211d24;
  --md-surface-2: #29232c;
  --md-text: #f3eef5;
  --md-muted: #b8aebd;
  --md-line: #3a323f;
  --md-line-strong: #514657;
  --md-pink: #ee7ead;
  --md-pink-dark: #f39abc;
  --md-pink-soft: #3a2230;
  --md-purple: #baa6d5;
  --md-purple-soft: #30283a;
  --md-gold: #e2b963;
  --md-shadow: 0 18px 60px rgb(0 0 0 / 25%);
  --md-shadow-soft: 0 8px 26px rgb(0 0 0 / 20%);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--md-bg);
  color: var(--md-text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 80;
  content: "";
  background: linear-gradient(90deg, var(--md-pink), #e9a4bd 48%, var(--md-purple));
}

a { color: var(--md-pink-dark); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; }

.md-skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  translate: 0 -160%;
  padding: 8px 12px;
  border-radius: 7px;
  background: var(--md-text);
  color: var(--md-surface);
}
.md-skip:focus { translate: 0; }

.md-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--md-line) 88%, transparent);
  background: color-mix(in srgb, var(--md-surface) 92%, transparent);
  backdrop-filter: blur(16px) saturate(130%);
}

.md-header__inner {
  width: min(var(--md-shell), calc(100% - 32px));
  min-height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.md-brand {
  display: flex;
  min-width: max-content;
  align-items: center;
  gap: 10px;
  color: var(--md-text);
  text-decoration: none;
}

.md-brand__mark {
  width: 30px;
  height: 30px;
  border: 1px solid var(--md-line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--md-pink) 0 11%, transparent 12%),
    conic-gradient(from 22deg, transparent 0 8%, var(--md-pink-soft) 8% 17%, transparent 17% 33%, var(--md-purple-soft) 33% 44%, transparent 44% 60%, var(--md-pink-soft) 60% 72%, transparent 72% 100%);
  box-shadow: inset 0 0 0 5px var(--md-surface);
}

.md-brand > span:last-child,
.md-brand > span:last-child > span { display: block; }
.md-brand > span:last-child > span { color: var(--md-muted); font-size: 11px; letter-spacing: .08em; }
.md-brand strong { display: block; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 15px; line-height: 1.25; }

.md-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.md-nav a,
.md-nav summary {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--md-text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.md-nav a[aria-current="page"] { background: var(--md-pink-soft); color: var(--md-pink-dark); }

.md-icon-button {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--md-line);
  border-radius: 9px;
  background: var(--md-surface);
  color: var(--md-text);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms var(--md-ease-out), background-color 160ms ease;
}
.md-icon-button:active { transform: scale(.97); }

.md-mobile-nav { display: none; margin-left: auto; }
.md-mobile-nav summary { list-style: none; }
.md-mobile-nav > summary { font-size: 20px; line-height: 1; }
.md-mobile-nav summary::-webkit-details-marker { display: none; }
.md-mobile-nav__panel {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 14px 16px 18px;
  border-bottom: 1px solid var(--md-line);
  background: var(--md-surface);
  box-shadow: var(--md-shadow-soft);
  transform-origin: top right;
}
.md-mobile-nav__panel a {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--md-surface-2);
  color: var(--md-text);
  font-weight: 700;
  text-decoration: none;
}

.md-shell { width: min(var(--md-shell), calc(100% - 32px)); margin: 0 auto; }

.md-breadcrumbs {
  padding: 13px 0;
  color: var(--md-muted);
  font-size: 13px;
}
.md-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.md-breadcrumbs li:not(:last-child)::after { margin-left: 7px; color: var(--md-line-strong); content: "/"; }

.md-home-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 46px;
  border-bottom: 1px solid var(--md-line);
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--md-pink) 12%, transparent), transparent 34%),
    linear-gradient(180deg, var(--md-surface) 0%, var(--md-bg) 100%);
}
.md-home-hero::after {
  position: absolute;
  inset: 20px 5% auto auto;
  width: 180px;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--md-pink) 18%, transparent);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 28px color-mix(in srgb, var(--md-pink) 3%, transparent), 0 0 0 60px color-mix(in srgb, var(--md-purple) 3%, transparent);
  pointer-events: none;
}

.md-kicker {
  margin: 0 0 8px;
  color: var(--md-pink-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.md-home-hero h1,
.md-article-hero h1 {
  margin: 0;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.35;
}
.md-home-hero h1 { max-width: 760px; font-size: clamp(31px, 5.2vw, 58px); }
.md-home-hero__lead { max-width: 720px; margin: 18px 0 0; color: var(--md-muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.9; }

.md-search {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(700px, 100%);
  margin-top: 30px;
  padding: 7px;
  border: 1px solid var(--md-line-strong);
  border-radius: 12px;
  background: var(--md-surface);
  box-shadow: var(--md-shadow-soft);
}
.md-search:focus-within { border-color: var(--md-pink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--md-pink) 15%, transparent), var(--md-shadow-soft); }
.md-search input { min-width: 0; min-height: 46px; padding: 0 13px; border: 0; outline: 0; background: transparent; color: var(--md-text); font-size: 16px; }
.md-search button,
.md-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--md-pink-dark);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: filter 160ms ease, transform 160ms var(--md-ease-out);
}
.md-search button:active,
.md-button:active { transform: scale(.97); }

.md-trends { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 18px; }
.md-trends strong { margin-right: 4px; font-size: 13px; }
.md-trends a,
.md-chip {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--md-line);
  border-radius: 999px;
  background: var(--md-surface);
  color: var(--md-text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.md-section { padding: 46px 0; }
.md-section + .md-section { border-top: 1px solid var(--md-line); }
.md-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.md-section-heading h2 { margin: 0; font-size: clamp(23px, 3vw, 31px); line-height: 1.35; }
.md-section-heading p { max-width: 640px; margin: 7px 0 0; color: var(--md-muted); }
.md-section-heading a { font-weight: 800; white-space: nowrap; }

.md-home-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 28px; align-items: start; }
.md-feed { display: grid; gap: 12px; }
.md-card {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--md-line);
  border-radius: var(--md-radius);
  background: var(--md-surface);
  box-shadow: 0 1px 0 rgb(255 255 255 / 35%);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--md-ease-out);
}
.md-card__media { display: block; min-height: 150px; overflow: hidden; background: var(--md-purple-soft); }
.md-card__media img { width: 100%; height: 100%; object-fit: cover; }
.md-card__body { min-width: 0; padding: 18px 20px; }
.md-card__type { margin: 0 0 3px; color: var(--md-pink-dark); font-size: 12px; font-weight: 800; }
.md-card h2, .md-card h3 { margin: 0; font-size: 21px; line-height: 1.45; }
.md-card h2 a, .md-card h3 a { color: var(--md-text); text-decoration: none; }
.md-card__body > p:not(.md-card__type) { margin: 8px 0 0; color: var(--md-muted); font-size: 14px; line-height: 1.75; }
.md-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.md-tags li { padding: 2px 8px; border-radius: 999px; background: var(--md-surface-2); color: var(--md-muted); font-size: 12px; }

.md-side-stack { display: grid; gap: 15px; }
.md-panel { padding: 20px; border: 1px solid var(--md-line); border-radius: var(--md-radius); background: var(--md-surface); }
.md-panel h2 { margin: 0 0 13px; font-size: 17px; }
.md-category-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.md-category-list a { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 8px; color: var(--md-text); text-decoration: none; }
.md-category-list strong { color: var(--md-muted); font-size: 13px; }

.md-encyclopedia-hero { padding: 42px 0 30px; border-bottom: 1px solid var(--md-line); background: var(--md-surface); }
.md-encyclopedia-hero h1 { margin: 0; font-size: clamp(29px, 4vw, 44px); }
.md-encyclopedia-hero p { max-width: 720px; margin: 10px 0 0; color: var(--md-muted); }
.md-filterbar { display: grid; grid-template-columns: minmax(0, 1fr) 190px 170px; gap: 10px; margin: 24px 0; }
.md-filterbar input,
.md-filterbar select { min-height: 46px; padding: 0 13px; border: 1px solid var(--md-line-strong); border-radius: 9px; background: var(--md-surface); color: var(--md-text); }
.md-result-status { margin: 0 0 14px; color: var(--md-muted); font-size: 14px; }
.md-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 54px; }
.md-result-card { display: block; padding: 19px; border: 1px solid var(--md-line); border-radius: 11px; background: var(--md-surface); color: var(--md-text); text-decoration: none; transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--md-ease-out); }
.md-result-card small { color: var(--md-pink-dark); font-weight: 800; }
.md-result-card strong { display: block; margin-top: 2px; font-size: 18px; }
.md-result-card p { margin: 7px 0 0; color: var(--md-muted); font-size: 14px; line-height: 1.7; }

.md-hub-hero {
  padding: 48px 0 38px;
  border-bottom: 1px solid var(--md-line);
  background:
    radial-gradient(circle at 88% 16%, color-mix(in srgb, var(--md-pink) 10%, transparent), transparent 28%),
    var(--md-surface);
}
.md-hub-hero h1 { margin: 0; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: clamp(32px, 5vw, 52px); line-height: 1.35; }
.md-hub-hero > .md-shell > p:not(.md-kicker) { max-width: 760px; margin: 14px 0 0; color: var(--md-muted); font-size: 17px; line-height: 1.9; }
.md-hub-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 13px; margin-top: 22px; }
.md-hub-stats strong { color: var(--md-pink-dark); font-size: 28px; line-height: 1; }
.md-hub-stats span { color: var(--md-muted); font-size: 14px; }
.md-hub-stats a { margin-left: 8px; font-size: 14px; font-weight: 800; }
.md-section-count { color: var(--md-muted); font-size: 13px; font-weight: 800; white-space: nowrap; }
.md-hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.md-hub-card { display: flex; min-width: 0; min-height: 138px; overflow: hidden; border: 1px solid var(--md-line); border-radius: 12px; background: var(--md-surface); color: var(--md-text); text-decoration: none; transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--md-ease-out); }
.md-hub-card__image { flex: 0 0 108px; overflow: hidden; background: var(--md-purple-soft); }
.md-hub-card__image img { width: 100%; height: 100%; object-fit: cover; }
.md-hub-card__copy { display: block; min-width: 0; padding: 14px; }
.md-hub-card__copy small { display: block; color: var(--md-pink-dark); font-size: 11px; font-weight: 800; }
.md-hub-card__copy strong { display: block; margin-top: 1px; font-size: 16px; line-height: 1.45; }
.md-hub-card__copy > span { display: -webkit-box; margin-top: 6px; overflow: hidden; color: var(--md-muted); font-size: 12px; line-height: 1.6; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

.md-article-hero { padding: 26px 0 34px; border-bottom: 1px solid var(--md-line); background: var(--md-surface); }
.md-article-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); gap: 44px; align-items: center; }
.md-article-hero h1 { font-size: clamp(32px, 5vw, 54px); }
.md-article-hero__summary { max-width: 760px; margin: 16px 0 0; color: var(--md-muted); font-size: 18px; line-height: 1.9; }
.md-article-hero__image { overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--md-line); border-radius: var(--md-radius); background: var(--md-purple-soft); box-shadow: var(--md-shadow-soft); }
.md-article-hero__image.is-portrait { aspect-ratio: 4 / 5; }
.md-article-hero__image img { width: 100%; height: 100%; object-fit: cover; }

.md-article-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; color: var(--md-muted); font-size: 13px; }
.md-article-layout { display: grid; grid-template-columns: 220px minmax(0, var(--md-reading)) minmax(190px, 1fr); gap: 34px; align-items: start; padding: 34px 0 64px; }
.md-toc { padding: 17px; border: 1px solid var(--md-line); border-radius: 10px; background: var(--md-surface); }
.md-toc summary { cursor: pointer; font-weight: 800; }
.md-toc ol { display: grid; gap: 7px; margin: 12px 0 0; padding-left: 20px; }
.md-toc a { color: var(--md-muted); font-size: 13px; line-height: 1.45; text-decoration: none; }
.md-toc a:hover { color: var(--md-pink-dark); }

.md-article { min-width: 0; overflow-wrap: anywhere; }
.md-article > p:first-child,
.md-article .article-lead,
.md-article .char-lead p { margin-top: 0; color: var(--md-text); font-size: 18px; line-height: 2; }
.md-article h2 { margin: 54px 0 17px; padding-bottom: 10px; border-bottom: 1px solid var(--md-line); font-size: 27px; line-height: 1.45; letter-spacing: -.01em; }
.md-article h3 { margin: 38px 0 13px; font-size: 21px; line-height: 1.5; }
.md-article h4 { margin: 28px 0 10px; font-size: 18px; }
.md-article p { margin: 0 0 1.25em; line-height: 2; }
.md-article ul, .md-article ol { margin: 0 0 1.5em; padding-left: 1.5em; }
.md-article li + li { margin-top: .45em; }
.md-article strong { color: color-mix(in srgb, var(--md-text) 85%, var(--md-pink)); }
.md-article blockquote { margin: 1.8em 0; padding: 12px 18px; border-left: 3px solid var(--md-pink); background: var(--md-pink-soft); }
.md-article table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.8em 0; font-size: 14px; }
.md-article th, .md-article td { padding: 10px 12px; border: 1px solid var(--md-line); text-align: left; vertical-align: top; }
.md-article th { background: var(--md-surface-2); }
.md-article figure { margin: 32px 0; }
.md-article figure img { display: block; width: 100%; border-radius: 9px; background: var(--md-purple-soft); }
.md-article figcaption { margin-top: 8px; color: var(--md-muted); font-size: 13px; line-height: 1.6; }
.md-article .meta-strip,
.md-article .section-num { display: none; }
.md-article .source-list { display: grid; gap: 6px; }

.md-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 30px 0 42px; }
.md-gallery figure { margin: 0; }
.md-gallery figure:first-child:nth-last-child(2),
.md-gallery figure:first-child:nth-last-child(2) ~ figure { grid-column: auto; }
.md-gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 9px; }

.md-infobox { border: 1px solid var(--md-line); border-radius: 10px; background: var(--md-surface); overflow: hidden; }
.md-infobox h2 { margin: 0; padding: 13px 15px; background: var(--md-purple-soft); font-size: 15px; }
.md-infobox dl { margin: 0; }
.md-infobox div { display: grid; gap: 2px; padding: 10px 14px; border-top: 1px solid var(--md-line); }
.md-infobox dt { color: var(--md-muted); font-size: 11px; font-weight: 800; }
.md-infobox dd { margin: 0; font-size: 13px; line-height: 1.55; }
.md-infobox dl > dt { padding: 10px 14px 0; border-top: 1px solid var(--md-line); }
.md-infobox dl > dd { padding: 0 14px 10px; }
.md-infobox dl > div > dt,
.md-infobox dl > div > dd { padding: 0; border: 0; }

.md-related { margin-top: 48px; padding-top: 25px; border-top: 1px solid var(--md-line); }
.md-related h2 { margin: 0 0 14px; font-size: 22px; }
.md-related__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.md-related__grid a { padding: 12px; border: 1px solid var(--md-line); border-radius: 8px; background: var(--md-surface); color: var(--md-text); font-weight: 700; text-decoration: none; }
.md-related__grid small { display: block; color: var(--md-muted); font-weight: 500; }

.md-footer { border-top: 1px solid var(--md-line); background: var(--md-surface); }
.md-footer__inner { width: min(var(--md-shell), calc(100% - 32px)); margin: 0 auto; padding: 30px 0; }
.md-footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.md-footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
.md-footer a { color: var(--md-muted); font-size: 13px; }
.md-footer p { margin: 16px 0 0; color: var(--md-muted); font-size: 12px; }

.md-empty { padding: 36px; border: 1px dashed var(--md-line-strong); border-radius: var(--md-radius); color: var(--md-muted); text-align: center; }
.md-result-card[hidden] { display: none !important; }
.md-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px, 1px, 1px, 1px) !important; white-space: nowrap !important; }

@media (hover: hover) and (pointer: fine) {
  .md-nav a:hover,
  .md-nav summary:hover { background: var(--md-surface-2); }
  .md-card:hover { border-color: var(--md-line-strong); box-shadow: var(--md-shadow-soft); transform: translateY(-2px); }
  .md-result-card:hover { border-color: var(--md-pink); box-shadow: var(--md-shadow-soft); transform: translateY(-1px); }
  .md-hub-card:hover { border-color: var(--md-pink); box-shadow: var(--md-shadow-soft); transform: translateY(-1px); }
  .md-category-list a:hover { background: var(--md-surface-2); }
}

@media (max-width: 1040px) {
  .md-nav { display: none; }
  .md-mobile-nav { display: block; }
  .md-article-layout { grid-template-columns: 180px minmax(0, 1fr); }
  .md-infobox { grid-column: 2; grid-row: 1; margin-bottom: 8px; }
  .md-toc { grid-column: 1; grid-row: 1 / span 2; }
  .md-article { grid-column: 2; }
}

@media (max-width: 780px) {
  .md-shell, .md-header__inner, .md-footer__inner { width: min(100% - 24px, var(--md-shell)); }
  .md-header__inner { min-height: 58px; gap: 8px; }
  .md-brand > span:last-child > span { display: none; }
  .md-brand strong { font-size: 13px; }
  .md-home-hero { padding: 42px 0 32px; }
  .md-home-hero::after { width: 110px; opacity: .55; }
  .md-search { grid-template-columns: minmax(0, 1fr) auto; }
  .md-search button { padding: 0 15px; }
  .md-section { padding: 34px 0; }
  .md-section-heading { display: block; }
  .md-section-heading > a { display: inline-block; margin-top: 10px; }
  .md-home-grid { grid-template-columns: 1fr; }
  .md-card { grid-template-columns: 118px minmax(0, 1fr); }
  .md-card__media { min-height: 132px; }
  .md-card__body { padding: 14px; }
  .md-card h2, .md-card h3 { font-size: 17px; }
  .md-card__body > p:not(.md-card__type) { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
  .md-filterbar { grid-template-columns: 1fr; }
  .md-result-grid { grid-template-columns: 1fr; }
  .md-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md-article-hero { padding-bottom: 26px; }
  .md-article-hero__grid { grid-template-columns: 1fr; gap: 22px; }
  .md-article-hero__image { max-height: 340px; aspect-ratio: 16 / 10; }
  .md-article-hero__image.is-portrait { aspect-ratio: 16 / 10; }
  .md-article-layout { display: block; padding-top: 22px; }
  .md-toc { margin-bottom: 24px; }
  .md-toc:not([open]) ol { display: none; }
  .md-infobox { margin-bottom: 28px; }
  .md-article h2 { margin-top: 42px; font-size: 24px; }
  .md-article h3 { margin-top: 32px; font-size: 20px; }
  .md-article > p:first-child, .md-article .article-lead, .md-article .char-lead p { font-size: 17px; }
  .md-gallery { grid-template-columns: 1fr; }
  .md-related__grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .md-card { grid-template-columns: 96px minmax(0, 1fr); }
  .md-card__media { min-height: 118px; }
  .md-tags { display: none; }
  .md-home-hero h1 { font-size: 32px; }
  .md-article-hero h1 { font-size: 34px; }
  .md-hub-grid { grid-template-columns: 1fr; }
  .md-hub-card { min-height: 126px; }
  .md-hub-card__image { flex-basis: 98px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
  .md-header, .md-footer, .md-toc, .md-related, .md-icon-button { display: none !important; }
  body { background: #fff; color: #000; }
  .md-article-layout { display: block; }
  .md-article { max-width: none; }
}
