:root {
  --yellow: #f3c51a;
  --yellow-deep: #846800;
  --yellow-soft: #fff1a9;
  --ice: #8bc9eb;
  --ice-soft: #e8f5fc;
  --paper: #fffdf7;
  --paper-alt: #faf7ed;
  --white: #fff;
  --ink: #172333;
  --ink-2: #35475a;
  --muted: #5d6b78;
  --line: #e0e5e8;
  --line-warm: #e7dfc8;
  --danger: #9f3e2e;
  --sans: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --page: 1140px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 12px 38px rgb(31 48 68 / 9%);
  --shadow-lg: 0 28px 80px rgb(31 48 68 / 16%);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
::selection { color: var(--ink); background: var(--yellow-soft); }

.page-shell {
  width: min(var(--page), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 9px 14px;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.eyebrow {
  display: block;
  margin: 0 0 12px;
  color: #846800;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.45;
  text-transform: uppercase;
}

.mark { display: block; width: 100%; height: 100%; }
.mark-slot { display: inline-flex; align-items: center; justify-content: center; }
.mark-slot--paw { width: 42px; height: 42px; color: var(--ice); }
.mark-slot--nd { width: 46px; height: 27px; color: var(--yellow); }

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button--dark { color: var(--white); background: var(--ink); box-shadow: 0 9px 26px rgb(23 35 51 / 18%); }
.button--line { border-color: rgb(23 35 51 / 24%); background: rgb(255 255 255 / 38%); }
.button--line-dark { border-color: var(--ink); background: transparent; }
.button--line:hover, .button--line-dark:hover { background: var(--white); }

/* Standalone 404 page */
.not-found-page {
  display: grid;
  min-height: 100vh;
  padding: 32px;
  place-items: center;
  background:
    radial-gradient(circle at 78% 18%, rgb(243 197 26 / 20%), transparent 24%),
    linear-gradient(145deg, var(--paper) 0%, var(--ice-soft) 100%);
}
.not-found {
  width: min(620px, 100%);
  padding: clamp(34px, 7vw, 64px);
  background: rgb(255 255 255 / 74%);
  border: 1px solid rgb(255 255 255 / 88%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}
.not-found__mark { width: 54px; margin-bottom: 24px; }
.not-found h1 { margin: 0; font-family: var(--serif); font-size: clamp(38px, 8vw, 64px); line-height: 1.12; }
.not-found p { max-width: 420px; margin: 18px 0 28px; color: var(--muted); }

/* Navigation */
.site-nav {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-nav.is-scrolled { background: rgb(255 253 247 / 91%); border-color: rgb(224 229 232 / 82%); box-shadow: 0 8px 28px rgb(31 48 68 / 6%); backdrop-filter: blur(16px); }
.site-nav__inner { display: flex; width: min(var(--page), calc(100% - 48px)); min-height: 76px; margin-inline: auto; align-items: center; }
.brand { position: relative; z-index: 3; display: inline-flex; gap: 10px; align-items: center; text-decoration: none; }
.brand__glyph { display: inline-flex; width: 34px; height: 34px; color: var(--ice); align-items: center; justify-content: center; filter: drop-shadow(0 4px 9px rgb(139 201 235 / 28%)); }
.brand__text { display: grid; line-height: 1; }
.brand__zh { font-family: var(--serif); font-size: 18px; font-weight: 700; letter-spacing: .06em; }
.brand__en { margin-top: 5px; color: var(--muted); font-family: var(--mono); font-size: 7px; font-weight: 700; letter-spacing: .14em; }
.nav-links { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav-links a { padding: 7px 11px; border-radius: 999px; color: var(--ink-2); font-size: 13px; font-weight: 600; text-decoration: none; transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); background: var(--yellow-soft); }
.nav-actions { position: relative; z-index: 3; display: flex; gap: 8px; margin-left: 14px; align-items: center; }
.menu-toggle { display: none; width: 40px; height: 36px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: rgb(255 255 255 / 68%); cursor: pointer; }
.menu-toggle span { display: block; width: 100%; height: 2px; margin: 4px 0; background: var(--ink); transition: transform .2s, opacity .2s; }

/* Hero */
.hero-anchor-surface { background: linear-gradient(145deg, #fffdf7 0%, #fff8d7 58%, #e8f5fc 100%); }
.hero { position: relative; display: grid; min-height: 78svh; padding: 96px 0 58px; align-items: center; overflow: hidden; background: transparent; }
.hero__grid { position: absolute; inset: 0; background-image: linear-gradient(rgb(42 71 94 / 4%) 1px, transparent 1px), linear-gradient(90deg, rgb(42 71 94 / 4%) 1px, transparent 1px); background-size: 60px 60px; mask-image: linear-gradient(90deg, #000, transparent 72%); }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.1fr .62fr; gap: clamp(60px, 9vw, 130px); align-items: center; }
.hero__copy { max-width: 710px; }
.hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(66px, 8.7vw, 120px); font-weight: 600; letter-spacing: -.07em; line-height: .93; }
.hero__lead { max-width: 650px; margin: 30px 0 0; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 34px); font-weight: 600; line-height: 1.5; }
.hero__body { max-width: 630px; margin: 17px 0 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero__facts span { padding: 6px 11px; border: 1px solid var(--line-warm); border-radius: 999px; color: var(--ink-2); background: rgb(255 255 255 / 62%); font-size: 11px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 30px; }
.hero__portrait { margin: 0; text-align: center; }
.portrait-frame { position: relative; width: min(330px, 100%); aspect-ratio: 1; margin-inline: auto; padding: 12px; background: var(--white); border-radius: 50%; box-shadow: var(--shadow-lg); }
.portrait-frame img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center 24%; }
.portrait-frame__ring { position: absolute; inset: -17px; border: 1px solid rgb(243 197 26 / 55%); border-radius: 50%; }
.hero__portrait p { margin: 27px 0 0; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }
.hero__portrait p:empty { display: none; }

/* Sections */
.section { padding: 68px 0; }
.section--alt { background: var(--paper-alt); }
.section-head { max-width: 780px; margin: 0 auto 28px; text-align: center; }
.section-head--center { max-width: 720px; }
.section-title { margin: 0; font-family: var(--serif); font-size: clamp(35px, 5vw, 58px); font-weight: 600; letter-spacing: -.035em; line-height: 1.2; }
.section-intro { max-width: 700px; margin: 20px auto 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.section-mark { display: inline-flex; width: 38px; height: 23px; margin-top: 24px; color: var(--yellow); }
.section-mark--paw { width: 34px; height: 34px; color: var(--ice); }

.intro-grid { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 960px; gap: 16px; margin-inline: auto; }
.intro-card { padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 7px 24px rgb(31 48 68 / 4%); }
.intro-card__index { margin: 0 0 28px !important; color: var(--yellow-deep) !important; font-family: var(--mono); font-size: 10px !important; font-weight: 700; }
.intro-card h3 { margin: 0; font-family: var(--serif); font-size: 21px; }
.intro-card p:last-child { margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.85; }

/* Unified cover cards */
.archive-rail { position: relative; max-width: 100%; }
.archive-card-grid {
  display: flex;
  gap: 22px;
  padding: 6px 3px 20px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-padding-inline: 3px;
  scroll-snap-type: x mandatory;
  scrollbar-color: #d1b73d #f0ead7;
  scrollbar-width: thin;
}
.archive-card-grid:focus-visible { outline: 2px solid rgb(243 197 26 / 48%); outline-offset: 5px; border-radius: var(--radius-sm); }
.archive-card-grid::-webkit-scrollbar { height: 8px; }
.archive-card-grid::-webkit-scrollbar-track { background: #f0ead7; border-radius: 999px; }
.archive-card-grid::-webkit-scrollbar-thumb { background: #d1b73d; border: 2px solid #f0ead7; border-radius: 999px; }
.archive-rail__controls { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.archive-rail__controls button {
  display: grid;
  width: 42px;
  height: 36px;
  color: var(--ink-2);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  place-items: center;
  transition: color .2s, border-color .2s, transform .2s;
}
.archive-rail__controls button:hover:not(:disabled) { color: var(--yellow-deep); border-color: #d6ba3a; transform: translateY(-2px); }
.archive-rail__controls button:focus-visible { outline: 3px solid rgb(243 197 26 / 42%); outline-offset: 2px; }
.archive-rail__controls button:disabled { color: #aeb6bc; background: #f7f5ee; cursor: default; }
.archive-card {
  position: relative;
  display: flex;
  flex: 0 0 clamp(350px, 36vw, 420px);
  min-width: 0;
  padding: 0;
  overflow: hidden;
  flex-direction: column;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgb(31 48 68 / 5%);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  scroll-snap-align: start;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.archive-card:hover { border-color: #d6ba3a; box-shadow: 0 16px 38px rgb(31 48 68 / 10%); transform: translateY(-4px); }
.archive-card:focus-visible { outline: 3px solid rgb(243 197 26 / 48%); outline-offset: 4px; }
.archive-card__cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #dce7ee; }
.archive-card__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.archive-card:hover .archive-card__cover img { transform: scale(1.025); }
.archive-card__bookmark {
  position: absolute;
  z-index: 2;
  top: -1px;
  right: 24px;
  display: grid;
  width: 50px;
  height: 64px;
  color: var(--yellow);
  background: rgb(255 253 247 / 68%);
  border: 1px solid rgb(224 229 232 / 78%);
  box-shadow: 0 8px 18px rgb(23 35 51 / 13%);
  backdrop-filter: blur(5px);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  place-items: center;
  pointer-events: none;
}
.archive-card__bookmark-mark { display: inline-flex; width: 42px; height: 24px; margin-top: -7px; color: var(--yellow); }
/* Cat on the Web follows the academic-page treatment: the small marker is
   transparent and lets the cover remain visible behind the symbol. */
#web-grid .archive-card__bookmark {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.archive-card__body { display: flex; min-height: 218px; padding: 25px 26px 23px; flex: 1; flex-direction: column; }
.archive-card__meta { padding-right: 54px; color: var(--yellow-deep); font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: .09em; }
.archive-card__title { margin-top: 10px; font-family: var(--serif); font-size: 23px; line-height: 1.35; }
.archive-card__summary { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.archive-card__action { display: flex; padding-top: 17px; margin-top: auto; align-items: center; justify-content: space-between; color: #52738c; border-top: 1px solid var(--line); font-size: 11px; font-weight: 700; }
.archive-card__action span:last-child { color: var(--yellow-deep); font-size: 19px; transition: transform .2s var(--ease); }
.archive-card:hover .archive-card__action span:last-child { transform: translate(2px, -2px); }
.archive-card--gallery:hover .archive-card__action span:last-child { transform: rotate(90deg); }

.details-toggle { flex: 0 0 auto; color: var(--muted); font-size: 24px; font-weight: 300; transition: transform .25s var(--ease); }
details[open] > summary .details-toggle { transform: rotate(45deg); }

/* Short introduction + setting anchor */
.intro-anchor-section { padding-top: 44px; padding-bottom: 44px; background: transparent; }
.about-section { padding-top: 52px; padding-bottom: 40px; background: var(--paper-alt); }
.about-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; max-width: 1040px; margin: 0; align-items: start; }
.about-copy .section-title { text-align: left; font-size: clamp(34px, 4.6vw, 54px); }
.about-copy > p:not(.eyebrow) { max-width: 680px; margin: 20px 0 0; color: var(--ink-2); font-size: 16px; line-height: 1.85; }
.about-copy > p + p { margin-top: 14px; }
.about-contact { padding: 26px; background: linear-gradient(160deg, var(--white), var(--ice-soft)); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.about-contact h3 { margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); font-family: var(--serif); font-size: 19px; }
.about-contact__links {
  display: grid;
  max-height: 260px;
  gap: 9px;
  padding-right: 8px;
  overflow-y: auto;
  scrollbar-color: #d1b73d transparent;
  scrollbar-width: thin;
}
.about-contact__links::-webkit-scrollbar { width: 7px; }
.about-contact__links::-webkit-scrollbar-track { background: transparent; }
.about-contact__links::-webkit-scrollbar-thumb { background: #d1b73d; border: 2px solid transparent; border-radius: 999px; }
.about-contact__links .social-link { padding: 13px 14px; background: rgb(255 255 255 / 72%); }
.about-contact__links .social-link__top strong { font-size: 15px; }
.about-contact__links .social-link small { font-size: 10px; }
.anchor-details { max-width: 980px; margin-inline: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: clip; }
.anchor-details > summary, .diary-panel > summary, .use-note > summary { display: flex; gap: 24px; padding: 27px 30px; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; }
.anchor-details > summary::-webkit-details-marker, .diary-panel > summary::-webkit-details-marker, .use-note > summary::-webkit-details-marker { display: none; }
.anchor-details summary .eyebrow, .diary-panel summary .eyebrow, .use-note summary .eyebrow { margin-bottom: 6px; }
.anchor-details summary strong, .diary-panel summary strong, .use-note summary strong { font-family: var(--serif); font-size: 23px; }
.intro-anchor-content { padding: 28px 30px 34px; border-top: 1px solid var(--line); background: linear-gradient(180deg, #fffdf7, #fff); }
.intro-anchor-content .intro-grid { max-width: none; }
.intro-anchor-content .intro-card { padding: 22px; background: var(--paper); box-shadow: none; }
.intro-anchor-content .intro-card__index { margin-bottom: 16px !important; }
.anchor-content { display: grid; grid-template-columns: .7fr 1.3fr; gap: 40px; padding: 34px; border-top: 1px solid var(--line); }
.intro-anchor-content .anchor-content { padding: 32px 4px 0; margin-top: 28px; }
.anchor-copy > p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.9; }
.anchor-copy dl { margin: 30px 0 0; }
.anchor-copy dl div { display: grid; grid-template-columns: 94px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 11px; }
.anchor-copy dl div.anchor-field--value { display: block; color: var(--ink-2); font-family: var(--serif); font-size: 15px; font-style: italic; line-height: 1.7; }
.anchor-copy dt { color: var(--muted); }
.anchor-copy dd { margin: 0; }
.anchor-image { width: 100%; padding: 10px; background: #1c1d1e; border: 0; border-radius: 12px; cursor: zoom-in; }
.anchor-image img { width: 100%; height: 100%; max-height: 470px; object-fit: contain; }

/* Diary */
.diary-section { padding-top: 40px; padding-bottom: 10px; background: var(--paper); }
.diary-panel { max-width: 820px; margin-inline: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: clip; }
.diary-list { max-height: 225px; padding: 0 12px 0 0; margin: 0 18px 24px 30px; overflow-y: auto; border-left: 2px solid var(--ice); list-style: none; scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior: contain; }
.diary-list li { position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 20px; padding: 13px 10px 13px 26px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.diary-list li::before { position: absolute; top: 20px; left: -6px; width: 10px; height: 10px; background: var(--yellow); border: 2px solid var(--white); border-radius: 50%; content: ""; }
.diary-list time { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.diary-list span { color: var(--ink-2); }

/* Social & use */
.social-layout { display: grid; grid-template-columns: .82fr 1.18fr; gap: 80px; align-items: start; }
.social-layout .section-head { margin: 0; text-align: left; }
.social-layout .section-intro { margin-inline: 0; }
.social-panel { padding: 24px; background: var(--paper-alt); border: 1px solid var(--line-warm); border-radius: var(--radius); }
.social-list { display: grid; gap: 10px; }
.social-link { display: grid; padding: 17px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 11px; text-decoration: none; transition: transform .2s var(--ease), border-color .2s; }
.social-link:hover { border-color: var(--yellow-deep); transform: translateY(-2px); }
.social-link__top { display: flex; justify-content: space-between; }
.social-link__top strong { font-family: var(--serif); font-size: 17px; }
.social-link__handle { color: var(--ink-2); font-family: var(--mono); font-size: 10px; }
.social-link small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.use-strip { padding: 0 0 40px; background: var(--paper); }
.use-note { max-width: 820px; margin-inline: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: clip; }
.use-note__body { padding: 20px 30px 24px; border-top: 1px solid var(--line); }
.use-note__body p { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.9; }
.use-note__body p + p { margin-top: 12px; color: var(--muted); font-size: 10px; }

.footer { padding: 42px 0; color: #bfc7ce; background: #17202a; }
.footer__inner { display: flex; justify-content: space-between; gap: 28px; align-items: center; }
.footer p { display: flex; gap: 9px; margin: 0; align-items: center; font-size: 10px; }
.footer-mark { display: inline-flex; width: 26px; height: 16px; color: var(--yellow); }

/* Lightbox */
.lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; padding: 0; color: var(--white); background: rgb(12 17 22 / 94%); border: 0; }
.lightbox::backdrop { background: rgb(9 12 16 / 70%); backdrop-filter: blur(8px); }
.lightbox__close { position: fixed; z-index: 2; top: 20px; right: 22px; display: grid; width: 46px; height: 46px; color: var(--white); background: rgb(255 255 255 / 10%); border: 1px solid rgb(255 255 255 / 25%); border-radius: 50%; cursor: pointer; font-size: 27px; place-items: center; }
.lightbox__stage { display: grid; width: 100%; height: 100%; padding: 30px; grid-template-rows: minmax(0, 1fr) auto auto; place-items: center; }
.lightbox__stage img { max-width: min(94vw, 1500px); max-height: calc(100vh - 170px); object-fit: contain; }
.lightbox__caption { display: flex; width: min(94vw, 1100px); gap: 24px; padding-top: 12px; justify-content: space-between; }
.lightbox__caption p { margin: 0; }
#lightbox-title { font-family: var(--serif); }
#lightbox-caption { margin-top: 3px; color: #c3ccd3; font-size: 11px; }
#lightbox-meta { color: #aeb9c2; font-size: 10px; text-align: right; }
.lightbox__controls { display: flex; gap: 12px; padding-top: 12px; align-items: center; color: #cbd3d9; font-family: var(--mono); font-size: 10px; }
.lightbox__controls button { display: grid; width: 36px; height: 30px; color: var(--white); background: rgb(255 255 255 / 9%); border: 1px solid rgb(255 255 255 / 22%); border-radius: 999px; cursor: pointer; place-items: center; }
.lightbox__controls button:hover { color: var(--yellow); border-color: rgb(243 197 26 / 55%); }
.lightbox__controls [hidden] { display: none; }

.noscript { position: fixed; z-index: 1000; right: 18px; bottom: 18px; left: 18px; padding: 15px; color: var(--white); background: var(--danger); border-radius: 10px; text-align: center; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s var(--ease), transform .65s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 940px) {
  .nav-links { gap: 0; }
  .nav-links a { padding-inline: 8px; }
  .hero__inner { grid-template-columns: 1fr .52fr; gap: 48px; }
}

@media (max-width: 840px) {
  .page-shell, .site-nav__inner { width: min(100% - 32px, var(--page)); }
  .site-nav__inner { min-height: 68px; }
  .menu-toggle { display: block; }
  .nav-actions { margin-left: auto; }
  .nav-links { position: fixed; z-index: 1; top: 0; right: 0; left: 0; display: grid; padding: 84px 22px 24px; background: rgb(255 253 247 / 98%); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(-15px); transition: opacity .2s, transform .2s; }
  .nav-links a { padding: 11px 8px; border-bottom: 1px solid var(--line); border-radius: 0; font-family: var(--serif); font-size: 16px; }
  .menu-open .nav-links { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 24px; }
  .intro-anchor-section { padding-top: 32px; padding-bottom: 32px; }
  .diary-section { padding-top: 34px; padding-bottom: 8px; }
  .use-strip { padding-bottom: 32px; }
  .hero { min-height: auto; padding: 84px 0 54px; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__portrait { width: min(370px, 78%); margin: 12px auto 0; }
  .about-section { padding-top: 40px; padding-bottom: 28px; }
  .about-layout { gap: 20px; margin-bottom: 0; }
  .about-copy > p:not(.eyebrow) { line-height: 1.75; }
  .about-copy > p + p { margin-top: 10px; }
  .about-contact { padding: 22px; }
  .about-contact__links { max-height: 240px; }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-card { display: grid; grid-template-columns: 42px 150px 1fr; gap: 12px; align-items: baseline; }
  .intro-card__index, .intro-card h3, .intro-card p:last-child { margin: 0 !important; }
  .anchor-content { grid-template-columns: 1fr; }
  .social-layout { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 620px) {
  .page-shell, .site-nav__inner { width: min(100% - 24px, var(--page)); }
  .brand__en { display: none; }
  .section { padding: 36px 0; }
  .section-head { margin-bottom: 18px; }
  .intro-anchor-section { padding-top: 24px; padding-bottom: 24px; }
  .diary-section { padding-top: 30px; padding-bottom: 6px; }
  .use-strip { padding-bottom: 26px; }
  .section-title { font-size: 36px; }
  .section-intro { font-size: 13px; }
  .hero h1 { font-size: clamp(61px, 20vw, 88px); }
  .hero__lead { font-size: 22px; }
  .hero__body { font-size: 13px; }
  .hero { padding: 68px 0 38px; }
  .hero__portrait { width: 74%; margin-top: 8px; }
  .intro-card { grid-template-columns: 34px 1fr; }
  .intro-card p:last-child { grid-column: 2; }
  .archive-card-grid { gap: 16px; padding-bottom: 16px; }
  .archive-card { flex-basis: calc(100vw - 58px); }
  .archive-rail__controls { margin-top: 10px; }
  .archive-card__body { min-height: 205px; padding: 21px 20px 19px; }
  .archive-card__title { font-size: 21px; }
  .archive-card__bookmark { top: -1px; right: 18px; width: 46px; height: 58px; }
  .anchor-details > summary, .diary-panel > summary, .use-note > summary { padding: 22px 20px; }
  .anchor-details summary strong, .diary-panel summary strong, .use-note summary strong { font-size: 19px; }
  .intro-anchor-content { padding: 18px 20px 24px; }
  .intro-anchor-content .anchor-content { padding: 24px 0 0; margin-top: 22px; }
  .about-section { padding-top: 28px; padding-bottom: 20px; }
  .about-layout { grid-template-columns: 1fr; gap: 16px; margin-bottom: 0; }
  .about-copy .section-title { font-size: 36px; }
  .about-copy > p:not(.eyebrow) { font-size: 14px; line-height: 1.7; }
  .about-copy > p + p { margin-top: 10px; }
  .about-contact { padding: 18px; }
  .about-contact__links { max-height: 200px; }
  .anchor-copy dl div { grid-template-columns: 1fr; gap: 3px; }
  .diary-list { margin-inline: 20px; }
  .diary-list li { grid-template-columns: 74px 1fr; gap: 12px; padding-left: 20px; }
  .footer__inner { display: grid; }
  .footer p:last-child { color: #8f9aa3; }
  .lightbox__stage { padding: 68px 10px 14px; }
  .lightbox__stage img { max-height: calc(100vh - 205px); }
  .lightbox__caption { display: grid; width: 100%; gap: 6px; padding-inline: 6px; }
  #lightbox-meta { text-align: left; }
}

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

@media print {
  .site-nav, .hero__actions, .use-strip { display: none !important; }
  .hero { min-height: auto; }
  .section { padding: 42px 0; }
  .reveal { opacity: 1; transform: none; }
}
