/* dyussuca.com — shared design system (phase 2, 2026-11-03)
   World: a camp kitchen at night. Warm graphite neutrals, one accent = ember amber.
   Depth = surface steps + hairlines. One motion curve. Pages link this BEFORE their own <style>.
   Theme: theme.js sets data-theme on :root; no-JS falls back to prefers-color-scheme. */

/* ---------- 1. Tokens ---------- */
:root,
[data-theme="light"] {
  color-scheme: light;
  /* surfaces: warm paper */
  --surface-deep: #efebe3;
  --surface-page: #f6f4ef;
  --surface-card: #fdfcf9;
  --surface-raised: #eee9e0;
  --hairline: rgba(31, 28, 23, 0.08);
  --hairline-strong: rgba(31, 28, 23, 0.16);
  /* text */
  --text-1: #1f1c17;
  --text-2: #5c544a;
  --text-3: #6f665b;
  /* ember amber */
  --accent: #a8500a;
  --accent-tint: rgba(168, 80, 10, 0.10);
  --accent-line: rgba(168, 80, 10, 0.45);
  /* primary button */
  --btn-primary-bg: #1f1c17;
  --btn-primary-fg: #ffffff;
  --btn-highlight: none;
  /* semantic, flat tints only */
  --overlap-3-bg: rgba(168, 80, 10, 0.12);
  --overlap-3-line: rgba(168, 80, 10, 0.40);
  --overlap-2-bg: rgba(22, 128, 61, 0.10);
  --overlap-2-line: rgba(22, 128, 61, 0.38);
  --overlap-2-ink: #166534;
  --negative: #c42b2b;
  --negative-tint: rgba(196, 43, 43, 0.08);
  --shadow-float: 0 8px 24px rgba(31, 28, 23, 0.08);
  --shadow-small: 0 1px 2px rgba(31, 28, 23, 0.05);
}

[data-theme="dark"] {
  color-scheme: dark;
  /* surfaces: warm graphite, embers */
  --surface-deep: #100f0e;
  --surface-page: #151412;
  --surface-card: #1b1a18;
  --surface-raised: #252321;
  --hairline: rgba(236, 231, 222, 0.08);
  --hairline-strong: rgba(236, 231, 222, 0.14);
  --text-1: #ece7de;
  --text-2: #a9a297;
  --text-3: #948d83;
  --accent: #f0b04a;
  --accent-tint: rgba(240, 176, 74, 0.12);
  --accent-line: rgba(240, 176, 74, 0.45);
  --btn-primary-bg: #ece7de;
  --btn-primary-fg: #151412;
  --btn-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --overlap-3-bg: rgba(240, 176, 74, 0.14);
  --overlap-3-line: rgba(240, 176, 74, 0.40);
  --overlap-2-bg: rgba(76, 195, 138, 0.12);
  --overlap-2-line: rgba(76, 195, 138, 0.38);
  --overlap-2-ink: #7fd6a8;
  --negative: #f2777a;
  --negative-tint: rgba(229, 72, 77, 0.12);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-small: none;
}

/* no-JS: follow the OS (same values as [data-theme="dark"]) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --surface-deep: #100f0e;
    --surface-page: #151412;
    --surface-card: #1b1a18;
    --surface-raised: #252321;
    --hairline: rgba(236, 231, 222, 0.08);
    --hairline-strong: rgba(236, 231, 222, 0.14);
    --text-1: #ece7de;
    --text-2: #a9a297;
    --text-3: #948d83;
    --accent: #f0b04a;
    --accent-tint: rgba(240, 176, 74, 0.12);
    --accent-line: rgba(240, 176, 74, 0.45);
    --btn-primary-bg: #ece7de;
    --btn-primary-fg: #151412;
    --btn-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    --overlap-3-bg: rgba(240, 176, 74, 0.14);
    --overlap-3-line: rgba(240, 176, 74, 0.40);
    --overlap-2-bg: rgba(76, 195, 138, 0.12);
    --overlap-2-line: rgba(76, 195, 138, 0.38);
    --overlap-2-ink: #7fd6a8;
    --negative: #f2777a;
    --negative-tint: rgba(229, 72, 77, 0.12);
    --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-small: none;
  }
}

:root {
  /* type */
  --font-ui: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  --font-figure: 'Outfit', 'Zen Maru Gothic', sans-serif;
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-15: 0.9375rem;
  --fs-18: 1.125rem;
  --fs-22: 1.375rem;
  --fs-28: 1.75rem;
  --fs-32: 2rem;
  /* space (4px grid) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  /* radius */
  --r-tag: 6px;
  --r-control: 10px;
  --r-card: 14px;
  --r-panel: 18px;
  /* motion: one curve */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-hover: 150ms;
  --dur-menu: 200ms;
  --dur-enter: 320ms;
  /* layout */
  --page-max: 1080px;
  --prose-max: 680px;
  --tap: 40px;

  /* legacy aliases so not-yet-converted page rules keep resolving (remove in phase 4/5) */
  --bg-main: var(--surface-page);
  --bg-card: var(--surface-card);
  --text-main: var(--text-1);
  --text-sub: var(--text-2);
  --border-color: var(--hairline-strong);
  --radius-lg: var(--r-panel);
  /* phase 3: names still used by inline styles inside blog article bodies and the
     generated RELATED box (tools/make_recipe_pages.py). Old accents collapse to ink. */
  --border-color-soft: var(--hairline);
  --accent-blue: var(--text-1);
  --accent-green: var(--text-1);
  --accent-purple: var(--text-1);
  --accent-yellow: var(--accent);
  --on-accent: var(--btn-primary-fg);
  --hero-bg: var(--surface-raised);
  /* phase 5: further names still written by index.html's JS templates */
  --accent-green-dark: var(--text-2);
  --accent-blue-dark: var(--text-1);
  --accent-orange: var(--accent);
  --accent-red: var(--negative);
  --bg-card-hover: var(--surface-raised);
  --radius-md: var(--r-card);
  --hero-border: var(--hairline);
  --chip-bg: var(--surface-raised);
  --chip-border: var(--hairline-strong);
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface-page);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--fs-15);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-1);
  letter-spacing: 0;
}

h1 { font-size: var(--fs-28); }
h2 { font-size: var(--fs-18); }
h3 { font-size: var(--fs-15); }

strong,
b {
  font-weight: 700;
}

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

a {
  color: var(--text-1);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  transition: color var(--dur-hover) var(--ease), text-decoration-color var(--dur-hover) var(--ease);
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

::selection {
  background: var(--accent-tint);
}

/* figures: Outfit 500, tabular */
.figure,
.num {
  font-family: var(--font-figure);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0;
}

.figure {
  font-size: var(--fs-32);
  line-height: 1;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* icons: inline SVG 18px, stroke 1.5, currentColor */
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 3. Header + nav ---------- */
.site-header {
  background: var(--surface-page);
  border-bottom: 1px solid var(--hairline);
}

.site-header__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--sp-2) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--tap);
  color: var(--text-1);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-15);
  line-height: 1.2;
}

.site-brand:hover {
  color: var(--text-1);
}

.site-brand img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.site-nav {
  display: flex;
  gap: var(--sp-1);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--tap);
  padding: 0 var(--sp-3);
  border-radius: var(--r-control);
  color: var(--text-2);
  font-size: var(--fs-14);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}

.site-nav a:hover {
  background: var(--surface-raised);
  color: var(--text-1);
}

.site-nav a:focus-visible {
  outline-offset: -2px;
}

/* current page: one 2px accent underline on the label's baseline */
.site-nav a[aria-current] {
  color: var(--text-1);
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
}

.site-nav a[aria-current]:hover {
  background: transparent;
}

.site-nav a[aria-current] .icon {
  color: var(--accent);
}

@media (max-width: 640px) {
  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-1) var(--sp-3) 0;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }

  .site-nav a {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    padding: var(--sp-1) 2px;
    font-size: var(--fs-12);
    line-height: 1.3;
  }

  .site-nav a[aria-current] {
    text-underline-offset: 4px;
  }
}

/* ---------- 4. Page frame + footer ---------- */
.site-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-4) var(--sp-16);
}

.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--surface-deep);
  color: var(--text-3);
  font-size: var(--fs-12);
}

.site-footer__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4) var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--sp-4);
  row-gap: 0;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: var(--tap);
  color: var(--text-2);
  font-size: var(--fs-14);
}

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

.site-footer nav a[aria-current] {
  color: var(--text-1);
  text-decoration-color: var(--accent);
}

.site-footer nav .icon {
  width: 14px;
  height: 14px;
}

.site-footer p {
  line-height: 1.6;
}

/* ---------- 5. Card ---------- */
.ds-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-small);
  padding: var(--sp-5);
}

/* ---------- 6. Buttons ---------- */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-5);
  border-radius: var(--r-control);
  border: 1px solid var(--hairline-strong);
  background: var(--surface-raised);
  color: var(--text-1);
  font: inherit;
  font-size: var(--fs-15);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease), transform var(--dur-hover) var(--ease);
}

.ds-btn:hover {
  color: var(--text-1);
  border-color: var(--text-3);
}

.ds-btn:active {
  transform: scale(0.98);
}

.ds-btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: transparent;
  box-shadow: var(--btn-highlight);
}

.ds-btn--primary:hover {
  color: var(--btn-primary-fg);
  border-color: transparent;
  opacity: 0.9;
}

.ds-btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}

.ds-btn--quiet:hover {
  background: var(--surface-raised);
  border-color: transparent;
}

.ds-btn--small {
  min-height: var(--tap);
  padding: 0 var(--sp-3);
  font-size: var(--fs-14);
}

/* ---------- 7. Pantry tag (signature) ----------
   <span class="pantry-tag"><img src=".../ingredient.webp" alt="モーモーミルク"><span class="pantry-tag__count">×41</span></span>
   One hairline tag = ingredient art + tabular count. */
.pantry-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  height: 36px;
  padding: 0 var(--sp-2) 0 var(--sp-1);
  border-radius: var(--r-tag);
  border: 1px solid var(--hairline-strong);
  background: var(--surface-card);
  color: var(--text-1);
  white-space: nowrap;
}

.pantry-tag img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.pantry-tag__count {
  font-family: var(--font-figure);
  font-weight: 500;
  font-size: var(--fs-15);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  line-height: 1;
}

.pantry-tag__name {
  font-size: var(--fs-12);
  color: var(--text-2);
}

/* ---------- 10. Toast (theme.js: #theme-toast + .show) ---------- */
#theme-toast,
.theme-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  max-width: calc(100vw - var(--sp-8));
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-control);
  border: 1px solid var(--hairline-strong);
  background: var(--surface-raised);
  color: var(--text-1);
  font-size: var(--fs-14);
  box-shadow: var(--shadow-float);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity var(--dur-menu) var(--ease), transform var(--dur-menu) var(--ease);
}

#theme-toast.show,
.theme-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 11. Prose (static documents) ---------- */
.prose {
  max-width: var(--prose-max);
  margin: 0 auto;
}

.prose > * + * {
  margin-top: var(--sp-4);
}

.prose h1 {
  margin-bottom: var(--sp-8);
}

.prose h2 {
  margin-top: var(--sp-10);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--hairline);
}

.prose h1 + h2 {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text-2);
}

.prose strong {
  color: var(--text-1);
}

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

.prose li + li {
  margin-top: var(--sp-2);
}

.prose li::marker {
  color: var(--text-3);
}

.prose .doc-meta {
  margin-top: var(--sp-10);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--hairline);
  color: var(--text-3);
  font-size: var(--fs-12);
}

/* ---------- 12. Blog post shell (phase 3) ----------
   Shared by the 9 posts in blog/column/ and blog/dev/. Markup keeps its old class names
   (.article-wrap, .article-body, .toc-box, …); post-only components stay in each page. */
.article-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  color: var(--text-3);
  font-size: var(--fs-14);
  line-height: 1.4;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--text-2);
}

.article-tag-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

/* quiet text chip */
.article-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-tag);
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-12);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.article-wrap h1 {
  font-size: var(--fs-28);
  line-height: 1.45;
  margin-bottom: var(--sp-3);
}

.article-info {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--hairline);
  color: var(--text-3);
  font-size: var(--fs-14);
}

/* eyecatch: dish art on a flat card surface, or a cover photo */
.eyecatch-wrap,
.article-thumb-main {
  aspect-ratio: 16 / 9;
  margin-bottom: var(--sp-8);
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  background: var(--surface-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eyecatch-recipe-img {
  max-width: 56%;
  max-height: 72%;
  object-fit: contain;
}

.eyecatch-img,
.article-thumb-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.toc-box {
  margin-bottom: var(--sp-8);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  background: var(--surface-card);
}

.toc-title {
  padding: var(--sp-2) 0;
  color: var(--text-2);
  font-size: var(--fs-14);
  font-weight: 700;
}

.article-wrap .toc-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-wrap .toc-box li {
  margin: 0;
  border-top: 1px solid var(--hairline);
}

.toc-box a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: var(--sp-2) 0;
  color: var(--text-1);
  font-size: var(--fs-14);
  line-height: 1.5;
  text-decoration: none;
}

.toc-box a:hover {
  color: var(--accent);
}

/* article prose (text itself untouched) */
.article-wrap h2 {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin: var(--sp-12) 0 var(--sp-4);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-22);
  line-height: 1.45;
}

.article-wrap h3 {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin: var(--sp-8) 0 var(--sp-3);
  font-size: var(--fs-18);
  line-height: 1.5;
}

.article-wrap h4 {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-15);
  font-weight: 700;
}

.article-wrap p {
  margin: 0 0 var(--sp-4);
  line-height: 1.9;
}

.article-wrap ul,
.article-wrap ol {
  margin: 0 0 var(--sp-5);
  padding-left: 1.5em;
}

.article-wrap li {
  margin-bottom: var(--sp-2);
}

.article-wrap li::marker {
  color: var(--text-3);
}

.article-wrap table {
  width: 100%;
  margin: var(--sp-5) 0;
  border-collapse: collapse;
  font-size: var(--fs-14);
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}

.article-wrap th,
.article-wrap td {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

.article-wrap th {
  font-weight: 700;
}

.article-wrap thead th {
  background: var(--surface-raised);
  border-bottom-color: var(--hairline-strong);
}

.highlight-box {
  margin: 0 0 var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-card);
  background: var(--surface-raised);
  line-height: 1.9;
}

/* call-to-action cards: one flat surface + the primary button */
.tool-link-card,
.cta-card,
.cta-banner {
  margin: var(--sp-10) 0 var(--sp-8);
  padding: var(--sp-6) var(--sp-5);
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  background: var(--surface-card);
  text-align: center;
}

.article-wrap .cta-card h3 {
  display: block;
  margin: 0 0 var(--sp-2);
}

.cta-title {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-18);
  font-weight: 700;
}

.tool-link-card p,
.cta-card p,
.cta-banner p {
  color: var(--text-2);
}

.tool-link-btn,
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-6);
  border-radius: var(--r-control);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  box-shadow: var(--btn-highlight);
  font-size: var(--fs-15);
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: opacity var(--dur-hover) var(--ease);
}

.tool-link-btn:hover,
.cta-btn:hover {
  color: var(--btn-primary-fg);
  opacity: 0.9;
}

.feature-card {
  margin: var(--sp-5) 0;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  background: var(--surface-card);
}

.feature-card-title {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-15);
  font-weight: 700;
}

.feature-card > :last-child {
  margin-bottom: 0;
}

/* generated RELATED box (markup from tools/make_recipe_pages.py) */
.related-box {
  margin: var(--sp-8) 0 var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-card);
  border: 1px solid var(--hairline);
  background: var(--surface-card);
}

.article-wrap .related-box__title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-15);
  font-weight: 700;
}

.related-box__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.related-box__chips a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--sp-3);
  border-radius: var(--r-control);
  border: 1px solid var(--hairline-strong);
  color: var(--text-1);
  font-size: var(--fs-14);
  line-height: 1.4;
  text-decoration: none;
  transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}

.related-box__chips a:hover {
  background: var(--surface-raised);
  color: var(--text-1);
}

.article-wrap .related-box ul {
  margin: 0;
}

.related-box li a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
}

/* posts wrap a decorative emoji in a leading class-less span (dev/003-005): hide it, text untouched */
.article-wrap h2 > span:first-child:not([class]) {
  display: none;
}

@media (max-width: 640px) {
  .article-wrap h1 {
    font-size: var(--fs-22);
  }

  .article-wrap h2 {
    font-size: var(--fs-18);
  }

  .article-wrap h3 {
    font-size: var(--fs-15);
  }

  .site-main--post {
    padding-top: var(--sp-4);
  }
}

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