/* 申請・手続きサイト（shinsei.seishokaisaiyo.com）共通スタイル
   見た目は人事ポータル（offer.seishokaisaiyo.com/portal）に合わせている。リンク先は元の Google サイトのまま */
:root {
  --bg: #f7f8f5; --surface: #fff; --surface-soft: #f3f5f1;
  --text: #3e4943; --muted: #737c76; --muted-2: #8c948e;
  --line: #e5e9e4; --line-strong: #d3ddcd; --ink: #26342e;
  --accent: #426653; --accent-hover: #345641; --accent-soft: #e7eee5;
  --black: var(--accent);
  --red: #a8443c; --red-bg: #f7e9e6;
  --blue: #3e5170; --blue-bg: #eaeef4;
  --amber: #927141; --amber-bg: #f7f0e4;
  --green: #426653; --green-bg: #e7eee5;
  --purple: #776a86; --purple-bg: #f3f0f7;
  --sidebar-w: 212px; --header-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", system-ui, sans-serif;
  font-feature-settings: "palt" 1; -webkit-font-smoothing: antialiased;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.8;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ── 上のバー ── */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 20px;
  background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.brand strong { font-size: 19px; font-weight: 700; letter-spacing: .05em; white-space: nowrap; color: var(--ink); }
.brand span { color: var(--muted-2); font-size: 12px; font-weight: 500; letter-spacing: .04em; white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--line); }
.btn {
  min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text);
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em; transition: .15s; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #b9c8b1; background: var(--surface-soft); }
.btn.primary { border-color: var(--black); background: var(--black); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn svg { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: wait; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── 骨組み ── */
.layout { min-height: 100vh; padding-top: var(--header-h); display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar {
  position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--sidebar-w);
  padding: 18px 12px 16px; display: flex; flex-direction: column;
  background: var(--surface-soft); border-right: 1px solid var(--line); overflow-y: auto;
}
.nav-label { padding: 0 12px; margin: 0 0 8px; color: var(--muted-2); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; }
.nav { display: grid; gap: 3px; }
.nav-item {
  min-height: 42px; padding: 0 12px; display: flex; align-items: center; gap: 11px; border-radius: 9px;
  color: #5f6b60; font-size: 12.5px; font-weight: 500; transition: .14s; line-height: 1.4;
}
.nav-item:hover { background: #eaf0e7; color: var(--ink); }
.nav-item.active { position: relative; background: var(--accent-soft); color: #2d4a37; font-weight: 650; }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--black); }
.nav-item svg { width: 17px; height: 17px; flex: 0 0 auto; stroke: #93a08c; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active svg { stroke: var(--black); }
.nav-separator { height: 1px; margin: 16px 10px; background: #dde4d9; }
.sidebar-footer { margin-top: auto; padding-top: 16px; display: grid; gap: 3px; }
.sidebar-footer .nav-item { color: var(--muted); }

main { grid-column: 2; min-width: 0; padding: 28px clamp(20px, 3vw, 44px) 44px; max-width: 1080px; }
.page-head { margin-bottom: 22px; }
.page-head .crumb { color: var(--muted-2); font-size: 11px; font-weight: 700; letter-spacing: .14em; margin-bottom: 4px; }
.page-head h1 { margin: 0; color: var(--ink); font-size: 21px; font-weight: 700; letter-spacing: .01em; line-height: 1.5; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* ── パネル ── */
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; box-shadow: 0 1px 2px rgba(38, 52, 46, .03); }
.panel + .panel, .panel + .grid2, .grid2 + .panel { margin-top: 18px; }
.panel-head {
  min-height: 60px; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.panel-title { display: flex; align-items: baseline; gap: 11px; min-width: 0; flex-wrap: wrap; }
.panel-title h2 { margin: 0; color: var(--ink); font-size: 14.5px; font-weight: 700; letter-spacing: .01em; }
.panel-title span { color: var(--muted-2); font-size: 11.5px; }
.panel-link { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.panel-link:hover { color: var(--text); }
.panel-body { padding: 18px 20px 20px; }
.panel-body > :first-child { margin-top: 0; }
.panel-body > :last-child { margin-bottom: 0; }
.panel-body p { margin: 0 0 8px; }
.panel-body ul, .panel-body ol { margin: 0 0 8px; padding-left: 1.3em; }
.panel-body h3 { margin: 18px 0 6px; font-size: 13.5px; font-weight: 700; }
.panel-foot { padding: 14px 20px; border-top: 1px solid #eef1ea; background: var(--surface-soft); }
.grid2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid2 .panel { margin: 0; display: flex; flex-direction: column; }
.grid2 .panel-body { flex: 1; }

/* ── 一覧の行（フォーム・リンク）。行全体がリンクで、右端は小さな印だけ ── */
.row {
  padding: 14px 18px 14px 20px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center; gap: 14px; border-top: 1px solid #eef1ea; transition: background .13s;
}
.row:first-child { border-top: 0; }
.row:hover { background: #f6f9f4; }
.row:active { background: var(--accent-soft); }
.row .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-soft); }
.row .ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.row .tx { min-width: 0; display: grid; gap: 1px; }
.row .nm { font-size: 14px; font-weight: 650; color: #2f3f36; line-height: 1.5; transition: color .13s; }
.row .ds { color: var(--muted); font-size: 12px; line-height: 1.6; }
.row .mk { display: grid; place-items: center; color: #b3bdb0; transition: color .13s, transform .13s; }
.row .mk svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row:hover .nm { color: var(--accent); }
.row:hover .mk { color: var(--accent); transform: translateX(2px); }
.c-red { background: var(--red-bg) !important; color: var(--red); }
.c-blue { background: var(--blue-bg) !important; color: var(--blue); }
.c-amber { background: var(--amber-bg) !important; color: var(--amber); }
.c-green { background: var(--green-bg) !important; color: var(--green); }
.c-purple { background: var(--purple-bg) !important; color: var(--purple); }
.c-gray { color: #5a5a5a; }

.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }

/* ── 注意・メモ ── */
.note { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; font-size: 13px; }
.warn { background: var(--red-bg); color: #7a2a2a; border-radius: 11px; padding: 12px 14px; font-size: 13px; }
.warn b { color: var(--red); }
.small { font-size: 12.5px; color: var(--muted); }
.sublink { font-size: 12px; color: var(--muted); }
.sublink a { text-decoration: underline; text-underline-offset: 3px; }
.panel-body a:not(.btn):not(.go) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ── 表 ── */
.table-wrap { overflow-x: auto; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
.tbl th, .tbl td { padding: 9px 20px; border-top: 1px solid #eef1ea; text-align: left; }
.tbl thead th { border-top: 0; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .04em; background: var(--surface-soft); }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody th { font-weight: 600; width: 40%; }

/* ── 数字つきの手順 ── */
.steps { list-style: none; padding: 0 !important; margin: 0; counter-reset: s; }
.steps > li { position: relative; padding: 0 0 18px 42px; counter-increment: s; }
.steps > li:last-child { padding-bottom: 0; }
.steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--black); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 12.5px;
}
.steps > li::after { content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 4px; width: 1px; background: var(--line-strong); }
.steps > li:last-child::after { display: none; }
.steps .t { font-weight: 600; }

/* ── Q&A ── */
.qa { border-top: 1px solid #eef1ea; }
.qa:first-child { border-top: 0; }
.qa summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; position: relative; font-weight: 600; font-size: 14px; display: flex; gap: 12px; align-items: baseline; }
.qa summary:hover { background: #f9faf7; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .q { color: var(--muted-2); font-size: 12px; font-weight: 700; letter-spacing: .06em; flex: 0 0 auto; }
.qa summary::after { content: ""; position: absolute; right: 22px; top: 22px; width: 8px; height: 8px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(45deg); transition: .15s; }
.qa[open] summary::after { transform: rotate(-135deg); top: 26px; }
.qa .a { padding: 0 20px 20px 52px; }
.qa .a > :first-child { margin-top: 0; }
.qa .a p { margin: 0 0 8px; }
.qa .a ul, .qa .a ol { margin: 0 0 8px; padding-left: 1.3em; }
.qa .a h3 { margin: 14px 0 4px; font-size: 13px; }
.qa .a img { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; }
.qa .a a:not(.btn) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ── 資料（画像）── */
.slides { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.slides a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; transition: .15s; }
.slides a:hover { border-color: var(--line-strong); transform: translateY(-1px); }

.page-foot { margin-top: 24px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted-2); font-size: 11px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .topbar { padding: 0 14px; }
  .layout { display: block; }
  .sidebar {
    position: sticky; top: var(--header-h); z-index: 40; width: auto; height: auto; padding: 9px 12px;
    flex-direction: row; gap: 6px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto;
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .nav-label, .nav-separator { display: none; }
  .nav { display: flex; gap: 6px; }
  .nav-item { min-height: 36px; padding: 0 12px; white-space: nowrap; }
  .nav-item.active::before { display: none; }
  .nav-item svg { display: none; }
  .sidebar-footer { margin: 0; padding: 0; display: flex; }
  main { padding: 22px 16px 36px; }
}
@media (max-width: 620px) {
  .brand span { font-size: 11.5px; }
  .panel-head { padding: 12px 16px; }
  .panel-body { padding: 16px; }
  .row { padding: 13px 14px 13px 16px; gap: 12px; }
  .row .ds { font-size: 11.5px; }
  .tbl th, .tbl td { padding: 8px 12px; }
  .qa summary { padding: 15px 44px 15px 16px; }
  .qa summary::after { right: 18px; }
  .qa .a { padding: 0 16px 18px; }
}

/* ── 検索（search.js）── */
.search { position: relative; flex: 1; max-width: 460px; }
.search input {
  width: 100%; height: 40px; padding: 0 14px 0 38px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface-soft); font: inherit; font-size: 13.5px; color: var(--text); transition: .15s;
}
.search input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(66, 102, 83, .12); }
.search > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; stroke: var(--muted-2); fill: none; stroke-width: 2; pointer-events: none; }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 11px/1 inherit; color: var(--muted-2); border: 1px solid var(--line-strong); border-radius: 5px; padding: 3px 6px; background: #fff; }
.search input:focus ~ kbd { display: none; }
.search.big { max-width: none; }
.search.big input { height: 54px; font-size: 15.5px; padding-left: 48px; border-radius: 13px; background: #fff; }
.search.big > svg { left: 17px; width: 20px; height: 20px; }
.sr {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  background: #fff; color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 12px 36px rgba(0, 0, 0, .12);
  overflow: hidden; max-height: min(70vh, 520px); overflow-y: auto;
}
.sr.on { display: block; }
.sr-i { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: start; padding: 11px 14px; border-top: 1px solid #eef1ea; }
.sr-i:first-child { border-top: 0; }
.sr-i.sel, .sr-i:hover { background: #f3f7f1; }
.sr-i b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.sr-i small { display: block; color: var(--muted); font-size: 12px; line-height: 1.55; }
.sr-g { justify-self: start; margin-top: 1px; font-size: 10.5px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.sr-x { color: var(--muted-2); font-size: 13px; }
.sr-none { padding: 16px; color: var(--muted); font-size: 13px; }
.sr-none a { text-decoration: underline; }
.hello { padding: 24px 24px 20px; border-radius: 12px; background: var(--accent-soft); border: 1px solid #d5e2d0; color: var(--ink); margin-bottom: 22px; }
.hello h2 { margin: 0 0 4px; font-size: 16px; }
.hello p { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chips a { font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 6px; border: 1px solid #cfdfc6; background: #fff; color: var(--accent); }
.chips a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (max-width: 620px) {
  .topbar .brand span { display: none; }
  .search kbd { display: none; }
  .hello { padding: 20px 16px; }
}

/* ── ホームの2カラム（左：申請、右：よく使うリンク）── */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.workspace .col { display: grid; gap: 18px; min-width: 0; }
.workspace .panel + .panel { margin-top: 0; }
.quick { padding: 2px 16px 8px; }
.quick a { display: flex; align-items: center; gap: 9px; padding: 11px 0; border-top: 1px solid #eef1ea; font-size: 12.5px; color: #4c5c4a; font-weight: 600; }
.quick a:first-child { border-top: 0; }
.quick a:hover { color: var(--accent); }
.quick a svg { width: 16px; height: 16px; stroke: #8b9a83; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.quick a .ex { margin-left: auto; font-size: 10px; color: var(--muted-2); font-weight: 500; }
@media (max-width: 1040px) { .workspace { grid-template-columns: minmax(0, 1fr); } }

/* ── よくある質問：分類の目次と根拠 ── */
.qa-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.qa-toc a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: var(--text); }
.qa-toc a span { font-size: 10.5px; color: var(--muted-2); font-weight: 700; }
.qa-toc a:hover { border-color: var(--accent); color: var(--accent); }
.qa .a .src { margin: 10px 0 0; font-size: 11.5px; color: var(--muted-2); }
.qa .a .tbl { min-width: 520px; }
.qa .a .tbl th, .qa .a .tbl td { padding: 7px 10px; text-align: center; }
section.panel[id] { scroll-margin-top: 130px; }
.qa .a .tbl.yk th:first-child { text-align: left; white-space: nowrap; }
.qa .a .tbl.yk th small { font-weight: 500; color: var(--muted-2); margin-left: 2px; }
.qa .a .tbl.yk tbody tr:first-child td { font-weight: 700; color: var(--accent); }
