/* 梨安下班後 — design tokens
   Palette comes from the brand: warm cream knit (paper), near-black IG pill
   (night), a pear/plant green (pear) and wood shelving (wood). */
:root {
  --paper: #f6f1e9;
  --paper-2: #eee7db;
  --card: #fbf8f3;
  --ink: #26211c;
  --ink-2: #4b433b;
  --muted: #7a7066;
  --line: #e1d8ca;
  --pear: #6f7f45;
  --pear-ink: #ffffff;
  --pear-soft: #e8ebd9;
  --wood: #9a7454;
  --night: #111111;
  --night-ink: #efe9e1;
  --night-muted: #a39a90;
  --radius: 14px;
  --radius-sm: 10px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111111;
    --paper-2: #191816;
    --card: #1b1a18;
    --ink: #efe9e1;
    --ink-2: #d2c9be;
    --muted: #9f968c;
    --line: #2c2a27;
    --pear: #b9c78f;
    --pear-ink: #161812;
    --pear-soft: #23271a;
    --wood: #cfaa86;
    --night: #0b0b0b;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.02em;
  text-wrap: pretty;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--pear); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--pear); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: 0.02em; line-height: 1.35; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 720px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 6px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- shared type ---------- */
.label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--pear);
  text-transform: uppercase;
}
.eyebrow { font-size: 0.8125rem; color: var(--muted); letter-spacing: 0.06em; }
.section-head { margin-bottom: 20px; }
.section-head h2 { font-size: 1.375rem; margin-top: 4px; }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent;
  font-size: 0.9375rem; font-weight: 600; text-decoration: none; letter-spacing: 0.04em;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-pear { background: var(--pear); color: var(--pear-ink); }
.btn-pear:hover { filter: brightness(1.06); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-line { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--pear); color: var(--pear); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; color: var(--pear); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1rem; letter-spacing: 0.08em; }
.brand-handle { font-family: var(--serif); font-style: italic; font-size: 0.75rem; color: var(--muted); letter-spacing: 0.02em; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  font-size: 0.875rem; text-decoration: none; color: var(--ink-2);
  padding: 8px 10px; border-radius: 999px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.nav-ig { font-family: var(--serif); font-style: italic; }

/* ---------- hero (home) ---------- */
.hero { padding: 40px 0 36px; }
.hero-inner { display: grid; gap: 24px; align-items: center; }
.hero-avatar {
  width: 104px; height: 104px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--line);
}
.hero-title { font-size: 2.25rem; font-weight: 700; letter-spacing: 0.08em; line-height: 1.2; margin-top: 6px; }
.hero-handle { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.125rem; letter-spacing: 0.02em; color: var(--wood); margin-top: 6px; }
.hero-lead { color: var(--ink-2); margin-top: 14px; font-size: 1rem; }
.hero-actions, .about-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
@media (min-width: 760px) {
  .hero { padding: 72px 0 56px; }
  .hero-inner { grid-template-columns: 200px 1fr; gap: 48px; }
  .hero-avatar { width: 200px; height: 200px; }
  .hero-title { font-size: 3rem; }
  .hero-handle { font-size: 1.375rem; }
}

/* ---------- chips ---------- */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--paper-2); text-decoration: none; font-size: 0.875rem;
}
.chip span { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:hover { background: var(--pear-soft); }

/* ---------- list cards ---------- */
.lists { padding-bottom: 56px; }
.card-grid { list-style: none; display: grid; gap: 20px; }
@media (min-width: 720px) { .card-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.card-link {
  display: flex; flex-direction: column; height: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}
.card-link:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pear) 45%, var(--line)); }
.card-media { display: block; background: var(--night); aspect-ratio: 1200 / 630; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.card-meta { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.06em; }
.card-title { font-size: 1.125rem; }
.card-desc {
  font-size: 0.875rem; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-more { margin-top: auto; padding-top: 8px; font-size: 0.8125rem; font-weight: 600; color: var(--pear); }

/* ---------- list page ---------- */
.crumbs { display: flex; gap: 8px; font-size: 0.8125rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.list-head { padding-top: 28px; }
.list-title { font-size: 1.875rem; font-weight: 700; letter-spacing: 0.04em; margin-top: 8px; }
.list-intro { margin-top: 10px; color: var(--ink-2); font-size: 1.0625rem; }
.proof { margin-top: 10px; font-size: 0.8125rem; color: var(--wood); }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
.facts span { font-family: var(--serif); font-size: 1.125rem; color: var(--ink); margin-right: 2px; }
.list-figure { margin: 24px auto 0; }
.list-figure a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--night); }
.list-figure figcaption { margin-top: 10px; font-size: 0.8125rem; color: var(--muted); text-align: center; }
@media (max-width: 560px) {
  .list-figure { padding: 0; }
  .list-figure a { border-radius: 0; }
}

.items-section { margin-top: 48px; }
.items { list-style: none; display: grid; gap: 14px; }
.item {
  display: grid; grid-template-columns: 104px 1fr; gap: 16px;
  padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.item-noimg { grid-template-columns: 1fr; }
.item-media img { width: 104px; height: 104px; border-radius: var(--radius-sm); object-fit: cover; background: var(--paper-2); }
.item-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item-name { font-size: 1.0625rem; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.item-num { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--pear); font-size: 1rem; }
.item-spec { font-size: 0.8125rem; font-weight: 400; color: var(--muted); }
.item-use { font-size: 0.9375rem; }
.item-tip { font-size: 0.9375rem; color: var(--ink-2); }
.item-hint { font-size: 0.8125rem; color: var(--muted); }
.item-avail { font-size: 0.8125rem; color: var(--muted); }
.item-buy { margin-top: 6px; }
.item-buy .btn { min-height: 36px; padding: 0 14px; font-size: 0.8125rem; }
@media (min-width: 600px) {
  .item { grid-template-columns: 148px 1fr; gap: 22px; padding: 18px; }
  .item-media img { width: 148px; height: 148px; }
}

.note { margin-top: 20px; padding: 16px 18px; border-radius: var(--radius); background: var(--pear-soft); font-size: 0.9375rem; }
.note-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; color: var(--pear); margin-bottom: 4px; }

/* ---------- author card ---------- */
.author {
  margin: 40px 0 56px; padding: 20px;
  display: grid; grid-template-columns: 56px 1fr; gap: 4px 14px; align-items: center;
  border-radius: var(--radius); background: var(--paper-2);
}
.author-avatar { width: 56px; height: 56px; border-radius: 50%; grid-row: span 2; }
.author-name { font-weight: 700; letter-spacing: 0.06em; }
.author-bio { font-size: 0.8125rem; color: var(--ink-2); line-height: 1.6; }
.author .btn { grid-column: 1 / -1; margin-top: 12px; }
@media (min-width: 600px) {
  .author { grid-template-columns: 64px 1fr auto; }
  .author-avatar { width: 64px; height: 64px; }
  .author .btn { grid-column: 3; grid-row: 1 / span 2; margin-top: 0; }
}

.more { padding-bottom: 56px; }

/* ---------- category / about / 404 ---------- */
.page-head { padding-top: 32px; padding-bottom: 24px; }
.page-title { font-size: 2rem; font-weight: 700; letter-spacing: 0.06em; margin-top: 6px; }
.page-lead { margin-top: 10px; color: var(--ink-2); }
.about { padding-top: 40px; padding-bottom: 64px; }
.about-avatar { width: 120px; height: 120px; border-radius: 50%; margin-bottom: 20px; box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--line); }
.prose { margin-top: 28px; }
.prose p + p, .prose p + h2, .prose ul + p { margin-top: 14px; }
.prose h2 { font-size: 1.125rem; margin-top: 28px; margin-bottom: 8px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 4px 0; color: var(--ink-2); }
.prose li::marker { color: var(--pear); }
.notfound { text-align: center; padding-top: 72px; padding-bottom: 96px; }
.notfound .page-lead { margin-bottom: 22px; }
.notfound-mark { width: 56px; height: 56px; color: var(--pear); margin: 0 auto 12px; }

/* ---------- footer ---------- */
.site-footer { background: var(--night); color: var(--night-ink); padding: 44px 0 32px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: 28px; }
.footer-mark { width: 34px; height: 34px; color: #b9c78f; }
.footer-name { margin-top: 10px; font-weight: 700; font-size: 1.125rem; letter-spacing: 0.08em; }
.footer-name span { margin-left: 10px; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 0.875rem; color: var(--night-muted); letter-spacing: 0.02em; }
.footer-tagline { margin-top: 6px; font-size: 0.8125rem; color: var(--night-muted); }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-size: 0.875rem; }
.footer-nav a { text-decoration: none; color: var(--night-ink); padding: 4px 0; }
.footer-nav a:hover { color: #b9c78f; }
.footer-legal { font-size: 0.75rem; color: var(--night-muted); border-top: 1px solid #2a2826; padding-top: 18px; }
@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .footer-legal { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-link, .btn { transition: none; }
}
