/* 復職支援室の掲示板 — Bubble 版の配色（ティール #59A1AA / 赤 #C13D36 / 背景 #F9FAFB）を引き継ぐ */
:root {
  --primary: #59a1aa;
  --primary-strong: #3f7f88;
  --primary-tint: #e4f2f4;
  --danger: #c13d36;
  --danger-tint: #fbebea;
  --success-tint: #e7f5ec;
  --success-ink: #24603a;
  --bg: #f9fafb;
  --surface: #ffffff;
  --ink: #2d333a;
  --muted: #64707d;
  --line: #e3e7ec;
  --footer: #f1f2f5;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(45, 51, 58, 0.08);
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.8; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding-left: 1.3em; }
a { color: var(--primary-strong); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--primary-strong); outline-offset: 2px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -48px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip-link:focus { top: 8px; }
.muted { color: var(--muted); }

/* ---- header / footer ---- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner { max-width: 960px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 20px; }
.logo { color: var(--primary); flex: none; }
.site-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 15px; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--primary-strong); text-decoration: underline; }
.site-nav form { margin: 0; }
.site-nav__user { display: inline-flex; align-items: center; gap: 6px; }
.site-nav__user .icon { color: var(--primary); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; color: var(--ink); cursor: pointer; }
.site-footer { margin-top: auto; background: var(--footer); text-align: center; padding: 24px 20px; font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  .brand { font-size: 17px; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
  .js .site-nav.is-open { display: flex; }
  .site-nav a, .site-nav .link-button { padding: 8px 0; }
}

/* ---- layout ---- */
.main { width: 100%; max-width: 960px; margin: 0 auto; padding: 28px 20px 56px; display: flex; flex-direction: column; gap: 20px; }
.breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.page-title { font-family: var(--serif); font-size: clamp(22px, 4.5vw, 30px); line-height: 1.4; text-wrap: balance; }
.page-title--in-card { margin-bottom: 4px; }
.section-title { font-family: var(--serif); font-size: 20px; margin-top: 12px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card h2 { font-family: var(--serif); font-size: 19px; margin-bottom: 8px; }
.card--tint { background: var(--primary-tint); border-color: transparent; box-shadow: none; }
.card--feature { display: flex; gap: 16px; align-items: flex-start; }
.card--feature .card__body { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.card--menu { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.card--menu h3 { font-family: var(--serif); font-size: 17px; line-height: 1.5; }
.card--menu p { font-size: 14.5px; color: var(--muted); flex: 1; }
.card--news { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .menu-grid { grid-template-columns: 1fr; } .card { padding: 18px; } }
.news-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.news-list__date { font-size: 13px; color: var(--muted); }
.plain-list { list-style: none; padding: 0; }

.hero { background: var(--primary-tint); border-radius: var(--radius); padding: 32px 24px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.hero h1 { font-family: var(--serif); font-size: clamp(22px, 5vw, 30px); line-height: 1.4; text-wrap: balance; }
.hero p { max-width: 40em; margin: 0 auto; }
.support { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: 28px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.support h2 { font-family: var(--serif); font-size: 19px; }

.icon-tile { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--primary-tint); color: var(--primary-strong); }
.icon-tile--small { width: 36px; height: 36px; border-radius: 10px; }
.icon { flex: none; }

/* ---- prose ---- */
.prose { display: flex; flex-direction: column; gap: 14px; }
.prose h2 { margin: 8px 0 0; }
.prose .request { line-height: 1.9; }
.callout { background: var(--primary-tint); border-radius: 10px; padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; }
.callout--muted { background: #f1f3f5; }
.callout__title { font-weight: 700; }
.example { background: var(--surface); border-radius: 8px; padding: 14px 16px; }
.example__date { color: var(--muted); font-size: 14px; }

/* ---- forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field__label { font-weight: 700; font-size: 14.5px; }
.field__hint { font-size: 13.5px; color: var(--muted); }
input[type="text"], input[type="email"], select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid #cfd6dd; border-radius: 8px; padding: 10px 12px; }
textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
input:focus, select:focus, textarea:focus { background: #fff; }
.code-input { font-size: 24px; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }
.counter { align-self: flex-end; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--danger); font-weight: 700; }
.form-error { background: var(--danger-tint); color: var(--danger); border-radius: 8px; padding: 10px 14px; font-size: 14.5px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: 15px; line-height: 1.4; padding: 10px 22px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.button--primary { background: var(--primary); color: #fff; }
.button--primary:hover { background: var(--primary-strong); }
.button--outline { background: var(--surface); color: var(--primary-strong); border-color: var(--primary); }
.button--outline:hover { background: var(--primary-tint); }
.button--danger { background: var(--danger); color: #fff; }
.button--danger:hover { background: #a3302a; }
.button--block { width: 100%; }
.button--small { padding: 6px 12px; font-size: 13.5px; }
.button[disabled] { opacity: 0.5; cursor: not-allowed; }
.button-row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.link-button { background: none; border: none; padding: 0; font: inherit; color: var(--primary-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button--danger { color: var(--danger); }

.flash { border-radius: 8px; padding: 12px 16px; font-size: 15px; }
.flash--success { background: var(--success-tint); color: var(--success-ink); }
.flash--error { background: var(--danger-tint); color: var(--danger); }

/* ---- auth ---- */
.auth-card { width: 100%; max-width: 460px; margin: 24px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 36px 32px; display: flex; flex-direction: column; gap: 16px; }
.auth-card__title { font-family: var(--serif); font-size: 26px; text-align: center; line-height: 1.4; }
.auth-card__org { text-align: center; color: var(--primary-strong); }
.auth-card__lead, .auth-card__note { font-size: 14.5px; color: var(--muted); }
@media (max-width: 480px) { .auth-card { padding: 28px 20px; } }

/* ---- board ---- */
.comment { display: flex; flex-direction: column; gap: 10px; }
.comment__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.comment__author { color: var(--ink); font-weight: 700; }
.comment__edited { font-size: 13px; }
.comment__body { font-weight: 700; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment__actions { display: flex; gap: 16px; justify-content: flex-end; font-size: 14.5px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; }
.replies { list-style: none; padding: 0 0 0 16px; border-left: 3px solid var(--primary-tint); display: flex; flex-direction: column; }
.reply { padding: 12px 0; border-bottom: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; }
.reply:last-child { border-bottom: none; }
.reply__meta { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; font-size: 15px; }
.pager > :last-child { text-align: right; }
.quote { background: #f1f3f5; border-radius: 8px; padding: 12px 14px; overflow-wrap: anywhere; }
.quote__label { font-size: 13px; color: var(--muted); }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
caption { caption-side: top; text-align: left; font-family: var(--serif); font-weight: 700; padding: 14px 16px 6px; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: #f1f3f5; font-size: 13px; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: none; }
tbody th { font-weight: 700; }
.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* ---- 書籍リスト（PDF の体裁に合わせる: 見出し #6a91cb / ヘッダー行 #6b92cc / 罫線 #dadad5） ---- */
.booklist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.booklist__header { display: flex; align-items: center; gap: 28px; padding: 0 8px 20px; }
.booklist__header img { width: 84px; height: auto; flex: none; }
.booklist__header h3 { margin: 0; font-family: var(--sans); font-size: clamp(20px, 3.4vw, 26px); font-weight: 700; color: #6a91cb; letter-spacing: 0.02em; }
.booklist__scroll { overflow-x: auto; }
.booklist__table { min-width: 620px; border: 1px solid #dadad5; font-size: 14px; line-height: 1.5; }
.booklist__table th, .booklist__table td { border: 1px solid #dadad5; padding: 9px 14px; vertical-align: middle; }
.booklist__table thead th { background: #6b92cc; color: #fff; font-size: 15px; font-weight: 700; border-color: #6b92cc; white-space: nowrap; }
.booklist__table tbody th { font-weight: 400; }
.booklist__no-head { text-align: center; line-height: 1.3; width: 4.2em; }
.booklist__no { white-space: nowrap; font-variant-numeric: tabular-nums; }
.booklist__date { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .booklist { padding: 16px 12px; } .booklist__header { gap: 14px; padding-bottom: 14px; } .booklist__header img { width: 56px; } .booklist__header h3 { font-size: 18px; } }
.user-table { min-width: 560px; }
.user-table__action { text-align: right; white-space: nowrap; }
.download-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.definition dt { font-size: 14px; color: var(--muted); }
.definition dd { font-weight: 700; overflow-wrap: anywhere; }

/* ---- dialog ---- */
.dialog { width: min(520px, calc(100vw - 32px)); border: none; border-radius: 16px; padding: 28px 24px; color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.dialog h2 { font-family: var(--serif); font-size: 20px; }

@media (prefers-reduced-motion: no-preference) {
  .button, .link-button, a { transition: background-color 0.15s, color 0.15s; }
}
