/* ビジネス用語図鑑 共通デザイン「言葉の棚」（外部フォント・外部ライブラリ不使用）
   基調：生成り（紙）・墨（文字）・藍（差し色）。姉妹サイト「ツール箱」と同系の世界観。 */
:root {
  --ink: #2a251d;
  --muted: #6f6455;
  --faint: #a99c86;
  --accent: #2c4a7c;
  --accent-dark: #1e3a63;
  --accent-tint: #edf0f5;
  --accent-line: #c6d0de;
  --grad: linear-gradient(135deg, #3d5c8c 0%, #2c4a7c 55%, #223c66 100%);
  --line: #e6dcc6;
  --line-strong: #cdbfa0;
  --bg: #f3eee1;
  --surface: #fffdf7;
  --field: #fcfaf2;
  --wood-hi: #ab8f66;
  --wood: #957a56;
  --wood-lo: #846a4a;
  --brass-hi: #d3b273;
  --brass-lo: #a37f42;
  --warn-bg: #faf0e4;
  --warn-line: #e3cfa8;
  --warn-ink: #7a5a1e;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 2px rgba(42, 37, 29, .05), 0 14px 36px rgba(42, 37, 29, .10);
  --shadow-lift: 0 2px 4px rgba(42, 37, 29, .06), 0 16px 32px rgba(44, 74, 124, .16);
  --font-display: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
}
* { box-sizing: border-box; }
::selection { background: #c9d6ee; }
html { background: var(--bg); }
body {
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  margin: 30px auto 48px;
  max-width: 800px;
  padding: 40px 44px 48px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 860px) {
  html { background: var(--surface); }
  body { margin: 0 auto; border: none; border-radius: 0; box-shadow: none; padding: 22px 18px 40px; }
}

/* ---------- 共通ヘッダー（ロゴ＋メニュー） ---------- */
header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 3px double var(--line-strong);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.logo-mark {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 5px rgba(44, 74, 124, .30));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: .12em;
  white-space: nowrap;
}
@media (max-width: 560px) {
  header.site-header { gap: 10px; }
  .brand { gap: 9px; }
  .logo-mark { width: 36px; height: 36px; }
  .brand-name { font-size: 1.02rem; letter-spacing: .08em; }
  .brand-tag { font-size: .64rem; letter-spacing: .1em; }
  details.menu summary { padding: 7px 13px; font-size: .84rem; }
}
.brand-tag {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--faint);
  margin-top: 3px;
}
details.menu { position: relative; flex: 0 0 auto; }
details.menu summary {
  list-style: none;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 8px 18px;
  user-select: none;
}
details.menu summary::-webkit-details-marker { display: none; }
details.menu summary::after { content: "▾"; margin-left: 6px; font-size: .75rem; }
details.menu summary:hover { border-color: var(--accent); }
details.menu[open] summary { background: var(--accent); border-color: var(--accent); color: #fff; }
.site-nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: 232px;
  background: #fffefb;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  padding: 10px;
  display: flex;
  flex-direction: column;
}
.site-nav a {
  padding: 7px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: .95rem;
  line-height: 1.45;
}
.site-nav a:hover { background: var(--accent-tint); color: var(--accent-dark); }
.site-nav .nav-title {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--faint);
  padding: 8px 10px 2px;
}

/* ---------- 見出し ---------- */
h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 18px;
  line-height: 1.4;
  letter-spacing: .03em;
  font-weight: 700;
}
h2 {
  font-size: 1.12rem;
  margin: 32px 0 10px;
  line-height: 1.5;
  font-weight: 700;
}
h2.sec {
  font-size: .92rem;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 30px 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
h2.sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
p.lead { margin: 0 0 18px; color: var(--muted); }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.defs { padding-left: 1.35em; margin: 8px 0; }
.defs li { margin: 4px 0; }
.contexts { margin: 8px 0 4px; }
.contexts dt { font-weight: 700; margin: 14px 0 2px; }
.contexts dt:first-child { margin-top: 2px; }
.contexts dd { margin: 0; line-height: 1.8; }

/* ---------- トップ：ヒーローと約束 ---------- */
.hero h1 { margin: 0 0 6px; letter-spacing: .05em; line-height: 1.45; }
.hero h1 .h1-part { white-space: nowrap; }
@media (max-width: 560px) {
  .hero h1 .h1-part { display: block; }
}
.promise-list {
  display: flex;
  flex-wrap: nowrap;
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}
.promise-item {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
  color: var(--accent-dark);
}
.promise-item + .promise-item { border-left: 1px solid var(--line); }
.promise-item::before { content: "✓"; color: var(--accent); font-weight: 800; flex: none; }
@media (max-width: 560px) {
  .promise-item { font-size: .72rem; padding: 8px 3px; gap: 3px; }
}
@media (max-width: 380px) {
  .promise-item { font-size: .66rem; padding: 8px 2px; }
}

/* ---------- トップ：検索 ---------- */
.search-box { margin: 22px 0 2px; }
.search-box input[type="search"] {
  width: 100%;
  padding: 13px 18px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fffefb;
  color: var(--ink);
}
.search-box input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 74, 124, .16);
}
.search-box input[type="search"]::placeholder { color: var(--faint); }
.search-note { font-size: .88rem; color: var(--muted); margin: 8px 4px 0; }
.no-result { font-size: .92rem; color: var(--muted); margin: 14px 4px 0; }

/* ---------- トップ：棚（カテゴリ） ---------- */
.drawer {
  margin: 30px 0 4px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
  background: #f8f3e6;
  box-shadow: 0 1px 2px rgba(42, 37, 29, .06), 0 10px 24px rgba(42, 37, 29, .05);
}
.drawer-head {
  margin: 0;
  padding: 11px 18px;
  background: linear-gradient(180deg, var(--wood-hi) 0%, var(--wood) 55%, var(--wood-lo) 100%);
  display: flex;
  align-items: center;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(60, 45, 25, .25);
}
.drawer-plate {
  font-family: var(--font-display);
  background: #fdfaf0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 3px 15px 4px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(60, 45, 25, .35), inset 0 0 0 1px #e6dbc2;
  position: relative;
  z-index: 1;
}
.drawer-handle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brass-hi) 0%, var(--brass-lo) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .55), inset 0 -1px 1px rgba(60, 45, 25, .3), 0 1px 2px rgba(60, 45, 25, .35);
}
@media (max-width: 560px) { .drawer-handle { width: 54px; } }
.drawer .terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 16px;
  background: linear-gradient(180deg, #f4edd9 0%, #f9f5ea 90px);
  box-shadow: inset 0 3px 8px rgba(90, 70, 40, .12);
}
a.term-card {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 13px 16px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fffefb;
  text-decoration: none;
  color: var(--ink);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
a.term-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
}
a.term-card .term-name { font-weight: 700; font-size: 1.05rem; line-height: 1.4; }
a.term-card .term-reading { font-size: .78rem; color: var(--faint); letter-spacing: .04em; }
a.term-card .term-desc { font-size: .84rem; color: var(--muted); line-height: 1.55; margin-top: 3px; }

/* ---------- トップ：カテゴリ見出し・五十音 ---------- */
.cat-head {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .06em;
  margin: 38px 0 2px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cat-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gojuon { margin-top: 6px; }
.gojuon-group { margin: 14px 0; }
.gojuon-group h3 {
  font-size: .85rem;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 0 0 4px;
}
.gojuon-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: .94rem;
}
.gojuon-list li { color: var(--muted); }

/* ---------- トップ：カードグリッド（カテゴリ索引・検索結果） ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px 0 4px;
}

/* ---------- 五十音別一覧ページ ---------- */
/* カテゴリ別一覧と同じ drawer／term-card の体裁を使うため、専用スタイルは持たない */

/* ---------- 用語ページ ---------- */
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
h1.term-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 2px;
}
h1.term-title .reading { font-size: 1rem; color: var(--muted); letter-spacing: .08em; font-weight: 400; }
.cat-label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent-dark);
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 1px 11px;
  margin: 6px 0 14px;
}
.lead-def {
  border: 1px solid var(--accent-line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin: 6px 0 4px;
  background: var(--accent-tint);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--accent-dark);
}
.paraphrase {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brass-lo);
  border-radius: var(--r-sm);
  padding: 13px 16px;
  background: var(--field);
  font-size: 1.02rem;
  line-height: 1.7;
}
.paraphrase .para-label {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--brass-lo);
  margin-bottom: 3px;
}
.examples { padding-left: 1.3em; margin: 8px 0; }
.examples li { margin: 6px 0; }
.bad-example {
  border: 1px solid var(--warn-line);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  background: var(--warn-bg);
  font-size: .95rem;
  line-height: 1.7;
  margin-top: 12px;
}
.form-slot {
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  padding: 18px 16px;
  background: var(--field);
  font-size: .98rem;
  line-height: 1.7;
  text-align: center;
  color: var(--ink-soft, inherit);
}
a.btn-primary {
  display: inline-block;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--r-sm);
  background: var(--grad);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(44, 74, 124, .3);
}
a.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 5px 14px rgba(44, 74, 124, .36); }

.bad-example .bad-label {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--warn-ink);
  margin-bottom: 3px;
}
.caution { margin: 6px 0; }
.related { margin-top: 36px; }
.related h2 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: .06em;
  margin: 0 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
a.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fffefb;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: .93rem;
  transition: border-color .15s ease, background .15s ease;
}
a.chip:hover { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-dark); }
a.chip .chip-reading { font-size: .75rem; color: var(--faint); font-weight: 400; }
.checked-date { font-size: .8rem; color: var(--faint); margin: 22px 0 0; }

/* ---------- フッター ---------- */
footer.site-footer { margin-top: 44px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .87rem; color: var(--muted); }
footer.site-footer a { color: var(--muted); }
footer.site-footer a:hover { color: var(--accent); }
footer.site-footer .promise { margin: 0 0 10px; font-size: .84rem; line-height: 1.7; color: var(--muted); }
footer.site-footer .promise .promise-label {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--ink);
  margin-right: 8px;
}
.foot-nav { display: flex; flex-wrap: wrap; gap: 12px 48px; margin: 14px 0 6px; }
.foot-group { display: flex; flex-direction: column; gap: 3px; }
.foot-group .foot-title {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--faint);
  margin-bottom: 3px;
}
.foot-group a { text-decoration: none; font-size: .88rem; line-height: 1.55; }
.foot-group a:hover { text-decoration: underline; text-underline-offset: 3px; }
footer.site-footer .operator { margin: 10px 0 0; font-size: .82rem; color: var(--faint); }

/* ---------- ランキング ---------- */
a.rank-card {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 13px 16px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fffefb;
  text-decoration: none;
  color: var(--ink);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
a.rank-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-lift);
  color: var(--ink);
}
a.rank-card .term-name { font-weight: 700; font-size: 1.05rem; line-height: 1.4; }
a.rank-card .term-desc { font-size: .84rem; color: var(--muted); line-height: 1.55; margin-top: 3px; }
.rank-basis {
  font-size: .88rem;
  color: var(--muted);
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin: 16px 0 6px;
  line-height: 1.65;
}
.rank-list { list-style: none; margin: 10px 0 0; padding: 0; }
.rank-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
}
.rank-num {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--brass-lo);
  min-width: 1.6em;
  text-align: center;
}
.rank-main { flex: 1; min-width: 0; }
a.rank-term { font-weight: 700; font-size: 1.12rem; color: var(--ink); text-decoration: none; line-height: 1.45; }
a.rank-term:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.rank-reading { font-size: .8rem; color: var(--faint); letter-spacing: .04em; font-weight: 400; margin-left: .55em; }
.rank-note { margin: 5px 0 0; font-size: .92rem; color: var(--muted); line-height: 1.6; }
.rank-note-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--accent-dark);
  background: var(--accent-tint);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 0 8px;
  margin-right: 8px;
  vertical-align: 1px;
}

/* ---------- 新着用語一覧 ---------- */
.new-date { margin-top: 30px; }
.new-date + .rank-list { margin-top: 2px; }
.new-item { display: block; }

/* ---------- 用語ページ冒頭の要約ボックス（二層構造） ---------- */
.summary-box {
  border: 1px solid var(--accent-line);
  border-radius: var(--r-md);
  background: var(--accent-tint);
  padding: 14px 18px 6px;
  margin: 6px 0 4px;
}
.sb-row { margin: 0 0 10px; line-height: 1.7; font-size: 1.02rem; }
.sb-row:first-child { font-size: 1.08rem; font-weight: 600; color: var(--accent-dark); }
.sb-label {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  border-radius: 999px;
  padding: 1px 10px;
  margin-right: 9px;
  vertical-align: 2px;
}
.sb-label-def { color: var(--accent-dark); background: #fff; border: 1px solid var(--accent-line); }
.sb-label-para { color: var(--brass-lo); background: var(--field); border: 1px solid var(--line); }

/* ---------- 場面で探す ---------- */
.scene { margin-top: 34px; }
.scene-terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 12px;
  margin: 12px 0 0;
}

/* ---------- 使い分け比較 ---------- */
.diff-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 6px;
  font-size: .96rem;
  line-height: 1.65;
}
.diff-table th, .diff-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.diff-table thead th { background: var(--accent-tint); color: var(--accent-dark); font-weight: 700; }
.diff-table tbody th { background: var(--field); font-weight: 700; white-space: nowrap; width: 7.5em; }
@media (max-width: 560px) {
  .diff-table { font-size: .88rem; }
  .diff-table th, .diff-table td { padding: 8px 9px; }
  .diff-table tbody th { width: auto; white-space: normal; }
}
.compare-ref { margin-top: 30px; }
.compare-ref h2 {
  font-size: 1.02rem;
  margin: 0 0 8px;
}

/* ---------- 書籍 ---------- */
.book-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.book-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fffefb;
  padding: 16px 18px 15px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.book-cover {
  flex: 0 0 auto;
  align-self: center;
  width: 104px;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}
.book-body { flex: 1 1 auto; min-width: 0; }
@media (max-width: 560px) {
  .book-item { flex-direction: column; }
  .book-cover { width: 128px; align-self: center; margin-inline: auto; }
}
.book-title { font-weight: 700; font-size: 1.05rem; line-height: 1.55; margin: 0; }
.book-author { font-size: .83rem; color: var(--muted); margin: 3px 0 0; }
.book-intro { font-size: .92rem; line-height: 1.75; margin: 9px 0 11px; }
.book-link { font-weight: 600; font-size: .93rem; color: var(--accent); text-decoration: none; }
.book-link:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
