/* 病院薬剤師、薬局へ。 */
:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --text: #1f2a27;
  --muted: #5d6965;
  --border: #e3e0d8;
  --accent: #2b7a68;
  --accent-soft: #e6f2ee;
  --notice: #fff6e0;
  --notice-border: #ecd28f;
  --radius: 10px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141917;
    --surface: #1b2220;
    --text: #e6ecea;
    --muted: #a3b0ac;
    --border: #2d3734;
    --accent: #6cc3ae;
    --accent-soft: #1f3a33;
    --notice: #3a3222;
    --notice-border: #6b5a30;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141917;
  --surface: #1b2220;
  --text: #e6ecea;
  --muted: #a3b0ac;
  --border: #2d3734;
  --accent: #6cc3ae;
  --accent-soft: #1f3a33;
  --notice: #3a3222;
  --notice-border: #6b5a30;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.prose, .card, .author-box > div { min-width: 0; }
.button { color: var(--bg); }

.preview-bar {
  background: var(--notice);
  border-bottom: 1px solid var(--notice-border);
  font-size: 13px;
  text-align: center;
  padding: 6px 16px;
}

/* header */
.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--accent);
  box-shadow: inset 0 0 0 5px var(--accent), inset 0 0 0 7px var(--surface);
}
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: 0.04em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }

/* hero */
.hero { padding: 40px 0 24px; }
.hero-kicker { color: var(--accent); font-weight: 700; font-size: 14px; margin: 0 0 8px; letter-spacing: 0.08em; }
.hero-title { font-size: clamp(24px, 6vw, 34px); line-height: 1.5; margin: 0 0 16px; }
.hero-lead { color: var(--muted); margin: 0; }

/* author */
.author-box {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin: 8px 0 32px;
}
.author-icon {
  flex: 0 0 52px; height: 52px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 18px;
}
.author-label { margin: 0; font-size: 12px; color: var(--muted); }
.author-name { margin: 0 0 4px; font-weight: 700; }
.author-profile { margin: 0 0 6px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.author-box-end { margin-top: 48px; }
.text-link { font-size: 14px; }

/* sections & cards */
.section { margin: 32px 0; }
.section-title { font-size: 18px; margin: 0 0 16px; padding-left: 12px; border-left: 4px solid var(--accent); line-height: 1.5; }
.cards { display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-link { display: block; padding: 18px 20px; color: var(--text); text-decoration: none; }
.card-link:hover .card-title { color: var(--accent); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.card-title { font-size: 17px; line-height: 1.6; margin: 8px 0 6px; }
.card-desc { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.8; }
.tag { display: inline-block; font-size: 12px; padding: 1px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.tag-draft { background: var(--notice); color: var(--text); }
.category-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.category-list a { display: inline-block; padding: 6px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: 14px; }
.empty { color: var(--muted); }

/* article */
.article { padding: 8px 0 24px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin: 20px 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb a { color: var(--muted); }
.pr-notice, .draft-notice { font-size: 13px; padding: 8px 12px; border-radius: 8px; margin: 12px 0; }
.pr-notice { background: var(--accent-soft); }
.draft-notice { background: var(--notice); border: 1px solid var(--notice-border); }
.article-title, .page-title { font-size: clamp(22px, 5.5vw, 30px); line-height: 1.55; margin: 12px 0; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 24px; }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 20px; margin: 0 0 32px; }
.toc summary { font-weight: 700; cursor: pointer; }
.toc ol { margin: 8px 0 0; padding-left: 1.4em; font-size: 15px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); }

.prose h2 { font-size: 21px; line-height: 1.55; margin: 48px 0 16px; padding: 10px 14px; background: var(--accent-soft); border-radius: 8px; scroll-margin-top: 16px; }
.prose h3 { font-size: 18px; line-height: 1.6; margin: 32px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--border); }
.prose p { margin: 0 0 1.2em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.prose li { margin: 0.3em 0; }
.prose strong { background: linear-gradient(transparent 62%, rgba(43, 122, 104, 0.22) 62%); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.prose blockquote { margin: 0 0 1.4em; padding: 12px 16px; border-left: 4px solid var(--border); color: var(--muted); background: var(--surface); }
.table-wrap { overflow-x: auto; margin: 0 0 1.6em; border: 1px solid var(--border); border-radius: 8px; }
.prose table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; line-height: 1.7; background: var(--surface); }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { background: var(--accent-soft); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

.button { display: inline-block; padding: 10px 22px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; }
.page-updated { font-size: 13px; color: var(--muted); }

/* footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 28px 0 36px; background: var(--surface); font-size: 13px; color: var(--muted); }
.footer-note { margin: 0 0 12px; line-height: 1.8; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.footer-nav a { color: var(--muted); }
.copyright { margin: 0; }
