/* パートナー専用サイト用。公開ページの styles.css には手を入れない */

:root {
  --p-navy: #0a1628;
  --p-accent: #ff5b2e;
  --p-muted: #4a5876;
  --p-line: #e3dfd5;
  --p-bg: #fafaf7;
  /* イベントの種別色（2026-08-05 定例番外編）。ネイビー基調と喧嘩しないよう彩度を落とし、
     すでにこのページで使っている色（土曜=青 / 成功=緑 / 日曜・エラー=赤）に揃える */
  --p-kind-seminar: #2867b0;
  --p-kind-study: #1a7f4e;
  --p-kind-deadline: #c0392b;
}

.p-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 120px 24px 96px;
}

/* ---------- 認証ページ ---------- */
.p-auth {
  max-width: 460px;
  margin: 0 auto;
  padding: 140px 24px 96px;
}
.p-auth-card {
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 18px;
  padding: 40px 32px;
}
.p-auth-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--p-navy);
  margin: 0 0 8px;
}
.p-auth-lede {
  font-size: 14px;
  line-height: 1.9;
  color: var(--p-muted);
  margin: 0 0 28px;
}
.p-form { display: grid; gap: 20px; }
.p-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--p-navy);
  margin-bottom: 8px;
}
.p-input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 13px 16px;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  background: var(--p-bg);
  color: var(--p-navy);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.p-input:focus {
  outline: none;
  border-color: var(--p-accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 91, 46, .15);
}
.p-submit {
  appearance: none;
  border: none;
  cursor: pointer;
  width: 100%;
  background: var(--p-accent);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 15px 32px;
  border-radius: 999px;
  transition: background .15s ease;
}
.p-submit:hover { background: #e84819; }
.p-textlink {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--p-muted);
  text-decoration: underline;
}
.p-textlink:hover { color: var(--p-accent); }
.p-auth-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--p-line);
  font-size: 13px;
  line-height: 1.9;
  color: var(--p-muted);
}
.p-auth-foot a { color: var(--p-muted); }
.p-auth-foot a:hover { color: var(--p-accent); }
/* 表示/非表示は embed が inline style / hidden 属性で切り替える。ここで display を指定しないこと
   （クラス側の display:none が勝ち、エラーが出ても見えなくなる） */
.p-success {
  color: #1e7d44;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}
.p-error {
  color: #c0392b;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
}

/* リクエストフォームなど、textarea を含むページは広く取る（認証カードの 460px は狭い） */
.p-auth-wide { max-width: 680px; }

/* ---------- 専用トップ ---------- */
.p-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.p-eyebrow {
  font-family: "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--p-accent);
  margin: 0 0 10px;
}
.p-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  color: var(--p-navy);
  margin: 0;
  line-height: 1.35;
}
.p-lede {
  font-size: 15px;
  line-height: 1.95;
  color: var(--p-muted);
  margin: 20px 0 0;
  max-width: 62ch;
}
.p-logout {
  font-size: 13px;
  color: var(--p-muted);
  background: none;
  border: 1px solid var(--p-line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s ease, color .15s ease;
}
.p-logout:hover { border-color: var(--p-accent); color: var(--p-accent); }

/* 公開ページの .nav は 820px 以下で display:none になる（ハンバーガーに切り替わる）。
   パートナー側にはその markup が無いので、常に出る専用ナビを使う */
.p-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.p-nav a { text-decoration: none; color: var(--p-navy); white-space: nowrap; }
.p-nav a:hover { color: var(--p-accent); }
.p-nav a[aria-current="page"] { color: var(--p-accent); font-weight: 700; }
.p-logout { white-space: nowrap; }

.p-section { margin-top: 64px; }
/* lede 直後のセクション（ニュース）は本文との間隔を詰める */
.p-section-first { margin-top: 44px; }
.p-section-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--p-navy);
  margin: 0 0 6px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--p-navy);
}
.p-section-note {
  font-size: 13px;
  line-height: 1.9;
  color: var(--p-muted);
  margin: 14px 0 0;
}

.p-group { margin-top: 36px; }
.p-group-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--p-accent);
  letter-spacing: .04em;
  margin: 0 0 14px;
}

/* 資料カード。カード自体はリンクではないので hover では反応させない
   （反応してよいのは中の「開く」だけ） */
.p-docs { display: grid; gap: 12px; }
.p-doc {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 14px;
}
.p-doc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.p-doc-btn {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.p-doc-open {
  color: var(--p-accent);
  border: 1px solid var(--p-line);
}
.p-doc-open:hover {
  border-color: var(--p-accent);
  background: rgba(255, 91, 46, .06);
}
.p-doc-dl {
  color: #fff;
  background: var(--p-accent);
  border: 1px solid var(--p-accent);
}
.p-doc-dl:hover { background: #e84819; border-color: #e84819; }
.p-doc-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 91, 46, .1);
  color: var(--p-accent);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.p-doc-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--p-navy);
  line-height: 1.6;
  margin: 0;
}
.p-doc-meta {
  font-size: 12px;
  color: var(--p-muted);
  margin: 6px 0 0;
}
.p-doc-action {
  font-size: 13px;
  font-weight: 700;
  color: var(--p-accent);
  white-space: nowrap;
}

/* 資料カード（横型ブロック表示）。カード自体はリンクではないので hover では反応させない。
   サムネは A4 縦・16:9 横が混在するため、固定幅の枠に object-fit: contain で表紙全体を見せる。
   注: aspect-ratio は flex 子要素では中身の画像に負けて伸びる（2026-08-04 に本番で実例）ので使わない */
/* 2026-09-28 定例（上宮さん）: 「サムネが小さく文字の枠が大きい。縦に並べては」「未ログインだと開いても
   大きくならないので、表紙だけでも見えるように」→ 表紙を上・文字を下の縦型カードにした（横型では
   16:9 の表紙が 149×85px、スマホで 107×61px しかなかった）。表紙の枠は高さ固定（aspect-ratio は使わない） */
.p-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.p-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 14px;
  overflow: hidden;
}
/* 表紙は白背景が多いので、カードに溶けないよう薄い下地 + 画像自体に枠線を付ける */
.p-card-thumb {
  flex: 0 0 auto;
  height: 260px;
  background: var(--p-bg);
  border-bottom: 1px solid var(--p-line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.p-card-thumb img {
  max-width: 100%;
  max-height: 232px;
  width: auto;
  height: auto;
  border: 1px solid var(--p-line);
  background: #fff;
  box-shadow: 0 1px 3px rgba(10, 22, 40, .08);
}
.p-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
}
.p-card .p-doc-name { font-size: 14px; }
.p-card .p-doc-meta { font-size: 11px; margin-top: 4px; }
.p-card-desc {
  font-size: 12px;
  line-height: 1.7;
  color: var(--p-muted);
  margin: 8px 0 0;
  flex: 1;
}
.p-card .p-doc-actions { margin-top: 10px; }
.p-card .p-doc-btn { padding: 7px 13px; font-size: 12px; }

/* 未ログイン向けログインリンク */
.p-login {
  font-size: 13px;
  font-weight: 700;
  color: #fff !important;
  background: var(--p-accent);
  border-radius: 999px;
  padding: 9px 18px;
  white-space: nowrap;
  transition: background .15s ease;
}
.p-login:hover { background: #e84819; color: #fff; }

/* カレンダー */
.p-cal {
  margin-top: 24px;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 14px;
  padding: 18px 18px 14px;
}
.p-cal-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 14px;
}
.p-cal-label {
  font-family: "Plus Jakarta Sans", "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--p-navy);
  min-width: 8em;
  text-align: center;
}
.p-cal-nav {
  appearance: none;
  background: none;
  border: 1px solid var(--p-line);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  line-height: 1;
  color: var(--p-muted);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.p-cal-nav:hover { border-color: var(--p-accent); color: var(--p-accent); }
.p-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.p-cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--p-muted);
  padding: 4px 0 8px;
}
.p-cal-dow.is-sun { color: #c0392b; }
.p-cal-dow.is-sat { color: #2867b0; }
/* 日付セルは全ユーザーがクリックできる（選ぶと下の一覧がその日の予定だけになる）＝
   インタラクティブな要素なので、cursor と hover で反応させてよい */
.p-cal-day {
  min-height: 64px;
  border: 1px solid var(--p-line);
  border-radius: 8px;
  padding: 4px 5px;
  font-size: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.p-cal-day:hover { border-color: var(--p-accent); }
.p-cal-day:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 1px; }
.p-cal-day.is-today { border-color: var(--p-accent); background: rgba(255, 91, 46, .05); }
/* 選択中の日。「今日」と見分けが付くよう、地を濃くして枠を二重にする */
.p-cal-day.is-selected {
  border-color: var(--p-accent);
  background: rgba(255, 91, 46, .14);
  box-shadow: inset 0 0 0 1px var(--p-accent);
}
.p-cal-num { color: var(--p-muted); font-size: 11px; }
.p-cal-day.is-today .p-cal-num,
.p-cal-day.is-selected .p-cal-num { color: var(--p-accent); font-weight: 800; }
.p-cal-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 91, 46, .12);
  color: var(--p-navy);
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
}
.p-cal-chip-text { overflow: hidden; text-overflow: ellipsis; }
/* 種別ごとの色。チップは面積が小さいので、地は薄く・文字を色で立てる */
.p-cal-chip.is-seminar { background: rgba(40, 103, 176, .12); color: #1f4f8a; }
.p-cal-chip.is-study { background: rgba(26, 127, 78, .12); color: #14663e; }
.p-cal-chip.is-deadline { background: rgba(192, 57, 43, .12); color: #a12f24; }

/* パートナー限定の目印。チップにも凡例にも同じものを使う */
.p-cal-lock {
  flex: none;
  display: inline-block;
  background: var(--p-navy);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.5;
  border-radius: 3px;
  padding: 0 3px;
}

/* 色の凡例 */
.p-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: center;
  margin: 0 0 14px;
  font-size: 11px;
  color: var(--p-muted);
}
.p-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.p-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
.p-legend-dot.is-seminar { background: var(--p-kind-seminar); }
.p-legend-dot.is-study { background: var(--p-kind-study); }
.p-legend-dot.is-deadline { background: var(--p-kind-deadline); }

/* 日付が押せることの案内。凡例より控えめに置く */
.p-cal-hint {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--p-muted);
}

/* 予定追加フォーム (partner_admin のみ表示) */
.p-admin-add {
  margin-top: 20px;
  border: 1px dashed var(--p-line);
  border-radius: 14px;
  background: #fff;
}
.p-admin-add summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--p-accent);
}
.p-admin-add summary::-webkit-details-marker { display: none; }
.p-admin-add[open] summary { border-bottom: 1px solid var(--p-line); }
.p-admin-form { padding: 18px; }
.p-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.p-required {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--p-accent);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: 1px;
}
/* ファイル選択。p-input の padding だとボタンが縦につぶれるので上下を詰める */
.p-file {
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
}
.p-file::file-selector-button {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--p-navy);
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 999px;
  padding: 6px 14px;
  margin-right: 10px;
  cursor: pointer;
}
.p-file::file-selector-button:hover { border-color: var(--p-accent); color: var(--p-accent); }
/* アップロードは数 MB あるので、どこまで進んだかを出す */
.p-progress {
  font-size: 13px;
  line-height: 1.7;
  color: var(--p-muted);
  margin: 0;
}

/* サイト上から追加した資料のカード */
/* サムネ未設定のときのプレースホルダ。枠の大きさは画像ありのカードに合わせる */
.p-card-thumb.is-empty { background: rgba(255, 91, 46, .06); }
.p-thumb-ph {
  display: grid;
  place-items: center;
  width: 100px;
  height: 140px;
  border: 1px solid var(--p-line);
  border-radius: 4px;
  background: #fff;
  color: var(--p-accent);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
}
/* 削除は管理者だけに出す（表示の出し分けであって守りではない）。
   壊す操作なので、「開く」と並べても目立たない字リンクにする */
.p-doc-del {
  display: none;
  appearance: none;
  background: none;
  border: none;
  padding: 0 2px;
  margin-left: 2px;
  font-family: inherit;
  font-size: 11px;
  color: var(--p-muted);
  text-decoration: underline;
  cursor: pointer;
}
.p-doc-del:hover { color: #c0392b; }
.p-doc-del:disabled { cursor: default; text-decoration: none; }
#p-doc-section.is-admin .p-doc-del { display: inline-block; }

/* ---------- コンテンツ管理（manage.html） ---------- */
/* 追加フォームのアクション行（保存／キャンセルを横並び）。.p-submit は既定で幅 100% なので個別に戻す */
.p-manage-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.p-manage-form-actions .p-submit { width: auto; }
/* 小さめのアクションボタン（編集・キャンセル） */
.p-mini-btn {
  appearance: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--p-navy);
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease;
}
.p-mini-btn:hover { border-color: var(--p-accent); color: var(--p-accent); }
/* 削除は壊す操作なので、字リンクにして目立たせすぎない */
.p-mini-del {
  appearance: none;
  background: none;
  border: none;
  padding: 0 2px;
  font-family: inherit;
  font-size: 12px;
  color: var(--p-muted);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}
.p-mini-del:hover { color: #c0392b; }
.p-mini-del:disabled { cursor: default; text-decoration: none; }

/* 追加成功などの一時メッセージ */
.p-manage-status {
  margin: 16px 0 0;
  padding: 12px 16px;
  background: #e8f5ee;
  border: 1px solid rgba(26, 127, 78, .25);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1a7f4e;
}

/* 管理ページ: ページ内リンク（2026-09-28）。scroll-margin-top は固定ヘッダーの高さぶん */
/* 表示切替は embed が style.display で行う（轍 1）。nav 自身には display を書かず、
   block でも flex でも同じ見た目になるようリンク側を inline-block + margin で並べる */
.p-jump { margin-top: 18px; }
/* リンクはテキストで（ボタンの見た目は送信などの操作にだけ使う。2026-09-28 オーナー指示） */
.p-jump a {
  display: inline-block;
  margin: 0 18px 6px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--p-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.p-jump a:hover { text-decoration: none; }
.p-section[id] { scroll-margin-top: 96px; }
.p-manage-list { display: grid; gap: 10px; margin-top: 22px; }
/* 管理ページ: 過去の予定を畳む（2026-09-28） */
.p-manage-past {
  margin-top: 8px;
  border: 1px dashed var(--p-line);
  border-radius: 14px;
  background: var(--p-bg);
}
.p-manage-past summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--p-muted);
}
.p-manage-past summary::-webkit-details-marker { display: none; }
.p-manage-past summary::before { content: "▸ "; }
.p-manage-past[open] summary::before { content: "▾ "; }
.p-manage-past-list { display: grid; gap: 10px; padding: 0 12px 12px; }
.p-manage-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 14px;
}
/* 編集中は行の中身をフォームに差し替えるので、縦積み・全幅にする */
.p-manage-row.is-editing { display: block; }
.p-manage-main { min-width: 0; flex: 1; }
.p-manage-date {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--p-navy);
}
.p-manage-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--p-navy);
  margin: 4px 0 0;
  line-height: 1.6;
}
.p-manage-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--p-muted);
}
.p-manage-meta { color: var(--p-muted); }
.p-manage-body {
  font-size: 13px;
  line-height: 1.9;
  color: var(--p-muted);
  margin: 8px 0 0;
  white-space: pre-wrap;
}
.p-manage-ops {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
/* 資料行はサムネを左に添える */
.p-manage-doc { display: flex; gap: 16px; }
.p-manage-doc-info { min-width: 0; flex: 1; }
.p-manage-doc-thumb {
  flex: 0 0 72px;
  min-height: 96px;
  background: var(--p-bg);
  border: 1px solid var(--p-line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.p-manage-doc-thumb img {
  max-width: 100%;
  max-height: 92px;
  width: auto;
  height: auto;
  border: 1px solid var(--p-line);
  background: #fff;
}
.p-manage-doc-thumb.is-empty { background: rgba(255, 91, 46, .06); }
.p-manage-doc-open { margin-top: 12px; }

/* 登録者一覧（パートナー台帳） */
.p-table-wrap { overflow-x: auto; }
.p-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 14px;
  overflow: hidden;
  font-size: 14px;
}
.p-table th {
  text-align: left;
  font-size: 12px;
  color: var(--p-muted);
  font-weight: 700;
  padding: 12px 16px;
  background: var(--p-bg);
  border-bottom: 1px solid var(--p-line);
  white-space: nowrap;
}
.p-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--p-line);
  vertical-align: middle;
}
.p-table tr:last-child td { border-bottom: none; }
.p-table-email { font-weight: 700; color: var(--p-navy); word-break: break-all; }
.p-table-note { color: var(--p-muted); font-size: 13px; }
.p-table-ops { white-space: nowrap; }
.p-table-ops .p-doc-btn { margin-left: 6px; }
.p-input-slim { width: auto; padding: 8px 12px; font-size: 13px; }
/* 招待送信の成功パネル */
.p-invite-done { text-align: center; padding: 8px 0; }
.p-invite-done-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f5ee;
  color: #1a7f4e;
  font-size: 28px;
  font-weight: 800;
}
.p-invite-done-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--p-navy);
  margin: 0 0 12px;
}
.p-invite-done-detail {
  font-size: 15px;
  line-height: 2;
  color: var(--p-navy);
  margin: 0 0 4px;
}
.p-invite-done-registry {
  font-size: 13px;
  color: #1a7f4e;
  margin: 0 0 8px;
}
.p-invite-done-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
}
.p-invite-done-actions .p-submit { width: auto; }

.p-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 9px;
  margin-left: 8px;
  vertical-align: 1px;
  white-space: nowrap;
}
.p-badge-warn { background: rgba(255, 91, 46, .12); color: var(--p-accent); }
.p-badge-gray { background: var(--p-bg); border: 1px solid var(--p-line); color: var(--p-muted); }
.p-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--p-navy);
  cursor: pointer;
  padding: 12px 0;
}

/* 勉強会・座談会 */
/* 一覧の見出し行。既定は「直近の予定」、日を選ぶと「YYYY年M月D日の予定」に変わる */
.p-events-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 28px;
}
.p-events-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--p-navy);
  margin: 0;
}
.p-events-clear {
  font-size: 12px;
  font-weight: 700;
  color: var(--p-accent);
  text-decoration: none;
}
.p-events-clear:hover { text-decoration: underline; }

.p-events { display: grid; gap: 12px; margin-top: 12px; }
.p-events-none { margin-top: 12px; }
.p-event {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 14px;
}
.p-event-date {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--p-navy);
  white-space: nowrap;
}
.p-event-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--p-navy);
  margin: 0 0 8px;
}
.p-event-body {
  font-size: 14px;
  line-height: 1.9;
  color: var(--p-muted);
  margin: 0;
  white-space: pre-wrap; /* 本文の改行をそのまま出す（ニュースと同じ。2026-08-22 まで抜けていた） */
}
.p-event-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--p-muted);
}
.p-tag {
  background: var(--p-bg);
  border: 1px solid var(--p-line);
  border-radius: 999px;
  padding: 4px 12px;
}
/* 種別タグ。カレンダーのチップと同じ色でひと目で対応が付くようにする */
.p-tag-kind { font-weight: 700; }
.p-tag-kind.is-seminar {
  color: var(--p-kind-seminar);
  border-color: rgba(40, 103, 176, .35);
  background: rgba(40, 103, 176, .08);
}
.p-tag-kind.is-study {
  color: var(--p-kind-study);
  border-color: rgba(26, 127, 78, .35);
  background: rgba(26, 127, 78, .08);
}
.p-tag-kind.is-deadline {
  color: var(--p-kind-deadline);
  border-color: rgba(192, 57, 43, .35);
  background: rgba(192, 57, 43, .08);
}
/* 対象タグは「パートナー限定」のときだけ出る（「どなたでも」は既定なので出さない） */
.p-tag-limited {
  background: var(--p-navy);
  border-color: var(--p-navy);
  color: #fff;
  font-weight: 700;
}
.p-event-apply {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--p-accent);
}
.p-event-note {
  font-size: 12px;
  line-height: 1.8;
  color: var(--p-muted);
  margin: 6px 0 0;
}

/* ニュース（成功事例・お知らせ）。カード自体はリンクではないので hover では反応させない */
.p-news { display: grid; gap: 10px; margin-top: 20px; }
.p-news-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 14px;
}
.p-news-date {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--p-muted);
  white-space: nowrap;
  padding-top: 2px;
}
.p-news-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--p-navy);
  margin: 0;
  line-height: 1.6;
}
.p-news-body {
  font-size: 13px;
  line-height: 1.9;
  color: var(--p-muted);
  margin: 6px 0 0;
  white-space: pre-wrap;
}

/* 外部ツールへの導線。カード自体はリンクではないので hover では反応させない */
.p-tool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 14px;
}
.p-tool-desc {
  font-size: 12px;
  line-height: 1.7;
  color: var(--p-muted);
  margin: 6px 0 0;
  max-width: 52ch;
}
/* ヘッダーのロゴ（2026-09-22 先方依頼で EGS 表記から助成金制度推進センターのロゴに変更）。
   画像は 675×126 の横長。高さだけ決めて幅は比率に任せる */
.site-header .brand-logo {
  display: block;
  height: 34px;
  width: auto;
  /* 2026-09-28 定例で「スマホでロゴが横に潰れる」と指摘。ナビに押されて .brand が縮み、
     img の max-width:100% で幅だけ 33px に詰められていた。ロゴは縮ませず、ナビ側を減らす */
  max-width: none;
}
.site-header .brand { flex-shrink: 0; }

/* フッター: 左にセンターのロゴ、右に運営会社 EGS（2026-09-22 先方依頼）。
   styles.css の .footer-inner は 3 列 (auto 1fr auto) なので 2 要素を両端に振り直す */
.p-footer-inner {
  grid-template-columns: auto auto;
  justify-content: space-between;
}
.p-footer-logo {
  display: inline-block;
  background: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  line-height: 0;
}
.p-footer-logo img {
  display: block;
  height: 40px;
  width: auto;
}
.footer-role {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: .04em;
  color: rgba(250, 250, 247, .55);
}
@media (max-width: 820px) {
  .p-footer-inner { grid-template-columns: 1fr; justify-content: center; }
  .p-footer-egs { text-align: left; }
}

/* フッターの出典・商標表記（.footer-inner の外に置く 1 行） */
.p-footer-note {
  max-width: var(--content-max);
  margin: 28px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(250, 250, 247, .12);
  font-size: 11px;
  line-height: 1.9;
  color: rgba(250, 250, 247, .45);
}

/* ---------- 制度情報ティッカー ---------- */
/* 官公庁フィードの自動取り込み (gov_news) を細い帯で流す。
   中身が無いときは JS が hidden のままにするので、空の帯は出ない */
.p-ticker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 22px 0 0;
  padding: 9px 18px;
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 999px;
  overflow: hidden;
}
.p-ticker-label {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--p-accent);
  white-space: nowrap;
}
.p-ticker-viewport {
  flex: 1 1 240px;
  min-width: 0;
  overflow: hidden;
  /* 帯の両端で文字が唐突に切れないよう、端だけ淡くする */
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
.p-ticker-track {
  display: flex;
  width: max-content;
  animation: p-ticker-scroll 60s linear infinite; /* 実際の秒数は文字量から JS が入れる */
}
.p-ticker-group { display: flex; }
/* 読んでいる最中に流れていかないよう、hover とフォーカスで止める
   (キーボードでリンクをたどるときは :focus-within が効く) */
.p-ticker:hover .p-ticker-track,
.p-ticker:focus-within .p-ticker-track { animation-play-state: paused; }
@keyframes p-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.p-ticker-item {
  display: inline-block;
  padding-right: 40px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--p-navy);
  text-decoration: none;
  white-space: nowrap;
}
a.p-ticker-item { cursor: pointer; }
a.p-ticker-item:hover { color: var(--p-accent); text-decoration: underline; }
a.p-ticker-item:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; border-radius: 4px; }
.p-ticker-src {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  font-size: 11px;
  color: var(--p-muted);
  white-space: nowrap;
}
/* prefers-reduced-motion のときの静的表示。JS が viewport を隠してこちらを出す */
.p-ticker-list {
  flex: 1 1 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  min-width: 0;
}
.p-ticker-list .p-ticker-item {
  display: block;
  padding-right: 0;
  white-space: normal;
}
.p-ticker.is-static {
  border-radius: 14px;
  align-items: flex-start;
  padding: 12px 18px;
}
.p-ticker.is-static .p-ticker-label { padding-top: 3px; }
/* 動きを減らす設定では流さない (JS が使えない状況でも動き出さないよう CSS でも止める) */
@media (prefers-reduced-motion: reduce) {
  .p-ticker-track { animation: none; }
}

.p-placeholder {
  padding: 28px 22px;
  background: var(--p-bg);
  border: 1px dashed var(--p-line);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--p-muted);
  margin: 24px 0 0;
}

@media (max-width: 600px) {
  /* ヘッダーが 3 要素だと 375px で全部折り返すので、運営会社（EGS）への導線は footer に任せる */
  .p-nav-desktop { display: none; }
  .p-nav { gap: 10px; }
  .p-logout { padding: 8px 14px; font-size: 12px; }
  .site-header .brand-sub { display: none; }
  /* 横長ロゴ (675×126) は 375px 幅だとナビに触れるので、高さを落として間隔を確保する */
  .site-header { gap: 14px; }
  .site-header .brand-logo { height: 24px; }
  /* ロゴ (24px 高で幅 129px) を縮ませないと 375px にナビが収まらない。
     ロゴ自体が /partner/ へのリンクなので、スマホでは「パートナーTOP」を出さない */
  .p-nav > a[href="/partner/"] { display: none; }

  .p-main { padding: 100px 20px 72px; }
  .p-doc { grid-template-columns: 36px 1fr; }
  .p-doc-icon { width: 36px; height: 36px; font-size: 10px; }
  .p-doc-actions { grid-column: 2; }
  .p-doc-btn { padding: 8px 14px; font-size: 12px; }
  .p-event { grid-template-columns: 1fr; gap: 10px; }
  /* 375px では出典表記が同じ行に収まらないので次の行へ回す（帯は 2 行になる） */
  .p-ticker { border-radius: 18px; padding: 10px 16px; }
  .p-ticker-src { margin-left: 0; font-size: 10px; white-space: normal; }
  .p-news-item { grid-template-columns: 1fr; gap: 6px; }
  .p-tool { align-items: flex-start; }

  .p-cards { grid-template-columns: 1fr; }
  .p-card-thumb { height: 280px; }
  .p-card-thumb img { max-height: 252px; }
  .p-form-row { grid-template-columns: 1fr; }
  .p-cal-day { min-height: 48px; }
  .p-login { padding: 8px 14px; font-size: 12px; }

  /* コンテンツ管理: 操作ボタンを本文の下に回して縦積みにする */
  .p-manage-row { flex-direction: column; gap: 12px; }
  .p-manage-ops { align-self: flex-end; }
}

/* 360px（Android の標準幅）以下: ロゴを縮ませないぶん、ロゴの高さと間隔とボタンの余白を詰める */
@media (max-width: 400px) {
  .site-header { gap: 10px; }
  .site-header .brand-logo { height: 20px; }
  .p-nav { gap: 8px; }
  .p-login, .p-logout { padding: 7px 10px; }
}

/* 管理者向けメニュー（2026-08-10）。ナビが横に伸びるのを避けて 4 項目を畳む。
   表示の出し分けは embed が .p-nav-admin の style.display で行うので、
   このクラスに display を書かないこと（クラス側が勝って出なくなる） */
.p-nav-admin { position: relative; }
.p-nav-admin-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--p-navy);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.p-nav-admin-btn::after { content: "▾"; font-size: 10px; line-height: 1; }
.p-nav-admin-btn:hover,
.p-nav-admin-btn[aria-expanded="true"] { color: var(--p-accent); }
/* メニュー内のページを開いているときは、畳んだ側にも現在地を示す */
.p-nav-admin.is-current > .p-nav-admin-btn { color: var(--p-accent); font-weight: 700; }
.p-nav-admin-list {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 50;
  min-width: 172px;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(10, 22, 40, .13);
  display: flex;
  flex-direction: column;
}
/* display:flex は hidden 属性に勝つので、明示的に打ち消す */
.p-nav-admin-list[hidden] { display: none; }
.p-nav-admin-list a {
  padding: 9px 16px;
  font-size: 14px;
  line-height: 1.5;
}
.p-nav-admin-list a:hover { background: #f6f7f9; }

/* 終了した回（2026-08-10）。カレンダーで過去の日を選ぶと一覧に出てくるので、
   そこから申し込めてしまわないよう、リンクを外して状態表示に変える。
   display は JS 側（embed と同じ style.display）が触るのでここには書かない */
.p-event-apply.is-ended {
  color: var(--p-muted);
  font-weight: 500;
  cursor: default;
  pointer-events: none;
}

/* 本文中の自動リンク（assets/linkify.js）。長い URL で枠からはみ出さないよう折り返す */
.p-news-body a,
.p-event-body a,
.p-manage-body a {
  color: var(--p-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* 一覧の項目は見出しだけ → 見出し行の右端の ▼ で開く（assets/collapse.js）。
   何を隠すかは項目ごと: ニュースは本文＋写真、勉強会は本文（タグ・申込リンクは見せたまま） */
.p-news-item.has-more:not(.is-open) .p-news-body,
.p-news-item.has-more:not(.is-open) .p-news-photos,
.p-event.has-more:not(.is-open) .p-event-body { display: none; }
.p-disclose-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
.p-disclose-head:hover .p-news-title,
.p-disclose-head:hover .p-event-title { color: var(--p-accent); }
.p-disclose-toggle {
  flex: 0 0 auto;
  width: 28px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--p-accent);
  font-size: 12px;
  line-height: 24px;
  cursor: pointer;
}
.p-disclose-toggle::before {
  content: "▼";
  display: inline-block;
  transition: transform .15s;
}
.has-more.is-open .p-disclose-toggle::before { transform: rotate(180deg); }
/* 勉強会: 開いた本文とタグの間隔（見出しの下マージンは head 側に持たせる） */
.p-event.has-more .p-event-title { margin-bottom: 0; }
.p-event .p-disclose-head { margin-bottom: 8px; }
.p-event.is-open .p-event-body { margin-bottom: 8px; }

/* ニュースの写真（photos）。公開ページは本文を開いたときだけ見せる（畳んでいる間は隠す） */
.p-news-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}
.p-news-photos .p-photo img {
  display: block;
  height: 120px;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--p-line);
  background: #fff;
}
/* 管理ページ: 一覧のサムネイル列とフォームの既存写真（× で外す） */
.p-photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
}
.p-photo-cell { position: relative; display: inline-block; }
.p-photo-cell img {
  display: block;
  height: 72px;
  width: auto;
  border-radius: 6px;
  border: 1px solid var(--p-line);
  background: #fff;
}
.p-photo-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: var(--p-navy);
  color: #fff;
  font-size: 14px;
  line-height: 22px;
  padding: 0;
  cursor: pointer;
}
.p-images-field .p-file { margin-top: 8px; }
.p-muted-note { font-size: 12px; color: var(--p-muted); }

/* ---------- コラム（column コレクション。2026-09-28） ----------
   一覧 /column/・記事 /column/<slug>.html・パートナーTOP の差し込みで共用。
   カードの画像枠は固定高 + object-fit（轍 2: flex 内の aspect-ratio は画像に負ける） */
.col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.col-head .p-section-title { margin-bottom: 0; }
.col-more {
  font-size: 12px;
  font-weight: 700;
  color: var(--p-accent);
  text-decoration: none;
}
.col-more:hover { text-decoration: underline; }
.col-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.col-list-compact { margin-top: 12px; }
.col-card {
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.col-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.col-card-link { display: block; color: inherit; text-decoration: none; }
.col-card-img {
  height: 160px;
  background: var(--p-bg);
  border-bottom: 1px solid var(--p-line);
}
.col-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 画像の無い記事（2026-10-02 先方の 1 本目が画像なしで、空のベージュ枠だけが出た）。
   枠を消すと画像あり・なしでカードの形が揃わないので、枠は残して飾りを入れる */
.col-card-img:not(:has(img)) {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--p-bg) 0%, var(--accent-soft, #ffe7dd) 100%);
}
.col-card-img:not(:has(img))::after {
  content: "COLUMN";
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .32em;
  color: var(--p-accent);
  opacity: .55;
}
.col-card-body { padding: 14px 16px 16px; }
.col-card-meta,
.col-article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--p-muted);
  margin: 0;
}
.col-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--p-accent);
  background: var(--accent-soft, #ffe7dd);
  border-radius: 999px;
  padding: 2px 10px;
}
.col-card-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
  color: var(--p-navy);
  margin: 8px 0 0;
}
.col-card-excerpt {
  font-size: 12px;
  line-height: 1.7;
  color: var(--p-muted);
  margin: 8px 0 0;
}
.col-card-author {
  font-size: 12px;
  color: var(--p-navy);
  margin: 10px 0 0;
}

/* 記事ページ */
.col-article { max-width: 720px; margin: 0 auto; }
.col-article-title {
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 900;
  line-height: 1.45;
  color: var(--p-navy);
  margin: 12px 0 0;
}
.col-article-author {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--p-muted);
}
.col-article-author-name { font-weight: 700; color: var(--p-navy); }
.col-article-hero { margin: 24px 0 0; }
.col-article-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid var(--p-line);
}
.col-prose {
  margin-top: 28px;
  font-size: 15.5px;
  line-height: 2;
  color: var(--p-navy);
}
.col-prose h2 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.5;
  margin: 40px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--p-accent);
}
.col-prose h3 { font-size: 17px; font-weight: 800; margin: 28px 0 8px; }
.col-prose p { margin: 0 0 1.2em; }
.col-prose ul, .col-prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.col-prose li { margin: .3em 0; }
.col-prose blockquote {
  margin: 1.2em 0;
  padding: 12px 16px;
  border-left: 4px solid var(--p-line);
  background: var(--p-bg);
  color: var(--p-muted);
}
.col-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.col-prose a { color: var(--p-accent); }
.col-prose hr { border: 0; border-top: 1px solid var(--p-line); margin: 2em 0; }
.col-prose table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 0 0 1.2em; }
.col-prose th, .col-prose td { border: 1px solid var(--p-line); padding: 8px 10px; text-align: left; }
.col-prose th { background: var(--p-bg); }
.col-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--p-line);
}
.col-pager-link {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--p-navy);
  background: #fff;
}
.col-pager-link:hover { border-color: var(--p-accent); }
.col-pager-newer { grid-column: 1; }
.col-pager-older { grid-column: 2; text-align: right; }
.col-pager-label { display: block; font-size: 11px; color: var(--p-muted); }
.col-pager-title { display: block; font-size: 13px; font-weight: 700; margin-top: 4px; }
.col-back { margin-top: 28px; font-size: 13px; }
.col-back a { color: var(--p-accent); }
@media (max-width: 600px) {
  .col-pager { grid-template-columns: 1fr; }
  .col-pager-older { grid-column: auto; text-align: left; }
}
