@charset "UTF-8";

/* ==========================================================================
   saiyo — TONMANA 採用管理ツール
   配色はコーポレートサイト準拠（ピンク #f26695 / イエロー #f2b035 / ベージュ #f2efeb）
   ========================================================================== */

:root {
  /* 面 */
  --bg: #f2efeb;
  --surface: #ffffff;
  --surface-2: #faf8f6;
  --surface-3: #f4f1ed;
  --surface-active: #e8e0d4;   /* 選択中に敷くベージュ（サイドバーのアイコン） */

  /* 文字 */
  --ink: #191919;
  --ink-2: #6f6a66;
  --ink-3: #a59f99;

  /* 線 */
  --line: #e5e0d8;
  --line-2: #efebe5;

  /* アクセント */
  --accent: #f26695;
  --accent-soft: #fde9f0;
  --accent-ink: #ffffff;
  --warn: #f2b035;
  --warn-soft: #fdf2dc;
  --danger: #fb6458;
  --danger-soft: #ffeae8;
  --ok: #37a992;
  --ok-soft: #e3f4f0;
  --info: #6b8fd4;
  --info-soft: #e9eff9;

  /* 角丸 */
  --r-sm: 8px;
  --r: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* 影 */
  --shadow-sm: 0 1px 2px rgba(25, 25, 25, .04), 0 1px 3px rgba(25, 25, 25, .05);
  --shadow: 0 2px 4px rgba(25, 25, 25, .03), 0 8px 24px rgba(25, 25, 25, .06);
  --shadow-lg: 0 4px 8px rgba(25, 25, 25, .04), 0 16px 48px rgba(25, 25, 25, .10);

  --rail-w: 76px;
  --sidenav-w: 228px;
  --gutter: 14px;

  /* 英数は din-2014、日本語はそのフォントに無いグリフとして Noto Sans JP が使われる。
     （Latinフォントを先に置くのがポイント。順番を逆にすると英数もNotoになる） */
  --font: "din-2014", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  /* 淡いグラデを敷き、その上に半透明のパネルを浮かせる */
  background:
    radial-gradient(900px 620px at 6% 2%, #ffffff 0%, rgba(255, 255, 255, 0) 56%),
    radial-gradient(820px 700px at 94% 6%, #ebe6fb 0%, rgba(235, 230, 251, 0) 60%),
    radial-gradient(760px 640px at 74% 98%, #e4f0f6 0%, rgba(228, 240, 246, 0) 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.icon { width: 19px; height: 19px; flex: 0 0 auto; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.4; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* 数字は等幅で桁を揃える */
.num, td.num, .stat__value { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   ログイン・二段階認証
   -------------------------------------------------------------------------- */

.login-body {
  min-height: 100vh;
  background:
    radial-gradient(1000px 620px at 12% -12%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(760px 520px at 96% 8%, var(--accent-soft) 0%, rgba(253, 233, 240, 0) 58%),
    var(--bg);
}

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login__card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 38px 34px;
}

.login__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .04em;
}

.login__brand .logomark { width: 26px; height: 26px; }

.login__lead {
  margin: 12px 0 22px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.8;
}

.login__form .field { margin-bottom: 16px; }

.login__error {
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: var(--r);
  background: var(--danger-soft);
  color: #c9483d;
  font-size: 12px;
  font-weight: 600;
}

.login__notice {
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: var(--r);
  background: var(--ok-soft);
  color: #1f7a67;
  font-size: 12px;
  font-weight: 600;
}

.login__remember {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.login__textlink {
  border: 0;
  background: none;
  padding: 0;
  color: var(--ink-2);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

.login__textlink:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   アプリの骨格：アイコンレール ＋ メニュー ＋ メイン
   -------------------------------------------------------------------------- */

.app {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: 12px;
  height: 100vh;
  padding: var(--gutter);
}

.logomark { width: 26px; height: 26px; display: block; }

/* アイコンだけのサイドバー。名前はマウスを乗せたときにツールチップで出す。 */
.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(14px);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);

  /* ツールチップはレールの外（本文側）にはみ出して出るので、
     本文の中の重なり（AIパネルなど）より前に来るようにしておく。 */
  position: relative;
  z-index: 60;
}

.rail__brand {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
}

.rail__brand .logomark { width: 22px; height: 22px; }

.rail__group { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rail__group--bottom { margin-top: auto; }

.rail__sep {
  width: 24px;
  height: 1px;
  margin: 6px 0;
  background: var(--line);
}

.rail__btn {
  position: relative;   /* 未読バッジの基準 */
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: background .16s, color .16s;
}

.rail__btn:hover { background: var(--surface-3); color: var(--ink); }

.rail__btn.is-active {
  background: var(--surface-active);
  color: var(--ink);
}

/* 未読メールの数。アイコンの右上に小さく出す。 */
.rail__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.rail__badge[hidden] { display: none; }

.rail__me {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* ツールチップ（data-tip を持つ要素にホバーで出る） */
.rail [data-tip] { position: relative; }

.rail [data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-5px);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: var(--shadow);
  transition: opacity .16s, transform .16s, visibility .16s;
  z-index: 70;
}

.rail [data-tip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* メイン */
.content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 6px 14px;
  flex: 0 0 auto;
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(360px, 100%);
  padding: 9px 15px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  color: var(--ink-3);
}

.searchbox input {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  outline: 0;
}

.topbar__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* 検索欄と同じ背の高さに揃える（小さいと上部が間延びして見える） */
.topbar__right .btn { height: 42px; padding: 0 22px; }

.iconbtn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  cursor: pointer;
  transition: color .16s;
}

.iconbtn:hover { color: var(--ink); }

.iconbtn--sm {
  width: 28px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  box-shadow: none;
  font-size: 13px;
  line-height: 1;
}

.iconbtn--danger { color: var(--danger); }
.iconbtn--danger:hover { background: var(--danger-soft); color: var(--danger); }

.checkline {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 5px;
}

/* --------------------------------------------------------------------------
   ビュー土台
   -------------------------------------------------------------------------- */

.view {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 2px 6px 40px;
  scrollbar-width: thin;
}

@media (max-width: 720px) {
  :root { --rail-w: 62px; --gutter: 10px; }
  .rail__brand, .rail__btn { width: 38px; height: 38px; }
}

.view__loading {
  padding: 80px 0;
  text-align: center;
  color: var(--ink-3);
}

.view-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.view-head__title { font-size: 26px; letter-spacing: .02em; }
.view-head__sub { color: var(--ink-2); font-size: 13px; }
.view-head__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   カード
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card--flush { padding: 0; overflow: hidden; }
.card--tint { background: linear-gradient(155deg, #f7f4ff 0%, #eef1fb 60%, #eaf3f7 100%); }

.card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.card__title { font-size: 15px; font-weight: 700; }
.card__note { font-size: 12px; color: var(--ink-3); }
.card__actions { margin-left: auto; display: flex; gap: 6px; }

.grid { display: grid; gap: 16px; }
/* 左にAIアシスタント、右に数字と選考状況。
   AIパネルが展開したときの基準になるので position:relative を持たせる。 */
.grid--dash { grid-template-columns: 336px minmax(0, 1fr); align-items: start; position: relative; }
.grid--stats { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: 1fr 1fr; align-items: start; }

@media (max-width: 1360px) {
  .grid--dash { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .grid--stats { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   統計タイル
   -------------------------------------------------------------------------- */

.stat {
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
}

.stat__label { font-size: 12px; color: var(--ink-2); }
.stat__value { font-size: 28px; font-weight: 700; line-height: 1.2; margin-top: 2px; }
.stat__unit { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 3px; }

/* --------------------------------------------------------------------------
   ボタン
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .18s, background .18s, border-color .18s;
  white-space: nowrap;

  /* 本文用の行間（1.7）をそのまま使うと、行ボックスが文字より背高になり
     文字が上に寄って見える。ボタンの中では行間を詰めて、上下の中央に置く。 */
  line-height: 1;
}

.btn:hover { opacity: .86; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn--accent { background: var(--accent); }
.btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); color: var(--ink); opacity: 1; }
.btn--soft { background: var(--surface-3); color: var(--ink); }
.btn--danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); opacity: 1; }
.btn--sm { padding: 6px 13px; font-size: 12px; }
.btn--block { width: 100%; }

/* --------------------------------------------------------------------------
   バッジ・タグ
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge--new      { background: var(--info-soft);   color: #3d5f9e; }
.badge--screening{ background: var(--surface-3);   color: var(--ink-2); }
.badge--interview{ background: var(--accent-soft); color: #c23a6a; }
.badge--final    { background: var(--warn-soft);   color: #a97514; }
.badge--offer    { background: var(--ok-soft);     color: #1f7a67; }
.badge--hired    { background: var(--ok);          color: #fff; }
.badge--rejected { background: var(--surface-3);   color: var(--ink-3); }
.badge--declined { background: var(--surface-3);   color: var(--ink-3); }
.badge--hold     { background: var(--danger-soft); color: #c9483d; }

/* --------------------------------------------------------------------------
   カンバン
   -------------------------------------------------------------------------- */

/* 列が入りきらないときは横スクロール。右端にフェードを出して続きがあることを示す。 */
.kanban-wrap {
  position: relative;
  padding: 0 22px 22px;
}

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(158px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.kanban__empty { font-size: 12px; color: var(--ink-3); }

.kanban__col {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 12px;
  min-height: 140px;
}

.kanban__head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.kanban__title { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.kanban__count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
}

.kanban__list { display: grid; gap: 8px; }

.kcard {
  display: block;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 11px 12px;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s;
  text-align: left;
  width: 100%;
  border: 0;
}

.kcard:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.kcard__name { display: block; font-size: 13px; font-weight: 700; }

/* 職種・応募経路は1行に収める（折り返すとカードの高さがばらつくため） */
.kcard__meta {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kcard__foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }

.kcard__days {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
}

.kcard__days.is-stale { color: var(--danger); }

/* --------------------------------------------------------------------------
   テーブル
   -------------------------------------------------------------------------- */

.table { font-size: 13px; }

.table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }

/* 行やカード全体をクリックで開けるようにしている箇所 */
[data-load], [data-modal], [data-view], tr.user-edit, tr.job-edit { cursor: pointer; }

tr[data-load]:hover,
tr[data-modal]:hover,
tr.user-edit:hover,
tr.job-edit:hover { background: var(--surface-3); }

.listrow[data-load]:hover { background: var(--surface-2); border-radius: var(--r-sm); }

/* 行全体がクリックできる場合の、行を代表するテキスト */
.rowlink { font-weight: 700; transition: color .16s; }
tr:hover .rowlink, .listrow:hover .rowlink { color: var(--accent); }

/* 表やリストの中で画面遷移させるボタン（見た目はリンク） */
.linkbtn {
  padding: 0;
  border: 0;
  background: none;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color .16s;
}

.linkbtn:hover { color: var(--accent); }

/* カード内の1行リスト */
.listrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
}

.listrow:last-child { border-bottom: 0; }
.listrow__date { width: 78px; font-size: 12px; color: var(--ink-2); flex: 0 0 auto; }
.listrow__tail { margin-left: auto; font-size: 12px; color: var(--ink-3); flex: 0 0 auto; }
.listrow__tail.is-alert { color: var(--danger); font-weight: 700; }

/* --------------------------------------------------------------------------
   フォーム
   -------------------------------------------------------------------------- */

.field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.field__hint { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.field__error { font-size: 11px; color: var(--danger); margin-top: 4px; }

.input, .select, .textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  transition: border-color .16s, box-shadow .16s;
}

.input:focus, .select:focus, .textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* select や type=file は既定の高さがまちまち（43px〜47px）なので、揃うよう明示する */
.input, .select { height: 44px; }

.textarea { resize: vertical; min-height: 84px; line-height: 1.7; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row--3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 720px) {
  .field-row, .field-row--3 { grid-template-columns: 1fr; }
}

/* 5段階評価のセグメント */
.segment { display: inline-flex; gap: 3px; padding: 3px; background: var(--surface-3); border-radius: var(--r-pill); }
.segment input { position: absolute; opacity: 0; pointer-events: none; }

.segment label {
  min-width: 34px;
  padding: 5px 0;
  border-radius: var(--r-pill);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .16s, color .16s;
}

.segment label:hover { background: rgba(255, 255, 255, .7); }
.segment input:checked + label { background: var(--ink); color: #fff; }
.segment--score3 input:checked + label { background: var(--accent); color: #fff; }

/* --------------------------------------------------------------------------
   タブ
   -------------------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 10px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color .16s, border-color .16s;
}

.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.tabpanel[hidden] { display: none; }

/* --------------------------------------------------------------------------
   応募者ページ
   -------------------------------------------------------------------------- */

.person {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.person__avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
}

.person__name { font-size: 24px; }
.person__kana { font-size: 12px; color: var(--ink-3); }
.person__meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.person__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.deflist { display: grid; grid-template-columns: 108px 1fr; gap: 9px 14px; font-size: 13px; }
.deflist dt { color: var(--ink-3); font-size: 12px; }
.deflist dd { margin: 0; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 4px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line);
}

.timeline__item { position: relative; padding: 6px 0; font-size: 12px; }
.timeline__item::before {
  content: '';
  position: absolute;
  left: -18px; top: 13px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
}

.timeline__time { color: var(--ink-3); margin-right: 8px; }

/* スコアバー（自己評価） */
.score { display: grid; gap: 10px; }
.score__row { display: grid; grid-template-columns: 120px 1fr 56px; gap: 10px; align-items: center; font-size: 12px; }
.score__bar { display: block; height: 8px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
/* span のままだと高さが効かず、色が一切見えない（バーが空に見える） */
.score__fill {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent), var(--warn));
  transition: width .4s ease;
}
.score__value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   求職者向けページ（自己評価シートの回答）
   -------------------------------------------------------------------------- */

.pub-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 620px at 50% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    var(--bg);
}

.pub-head {
  padding: 20px 24px;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-2);
}

.pub-head__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto;
}

.pub-head__logo {
  height: 32px;
  width: auto;
  max-width: 62vw;   /* 幅の狭い端末でヘッダーからはみ出さないように */
  display: block;
}

.pub {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 18px 90px;
  display: grid;
  gap: 16px;
}

.pub--center { min-height: 60vh; align-content: center; }
.pub__title { font-size: 21px; }
.pub__lead { font-size: 13px; color: var(--ink-2); line-height: 1.9; margin-top: 10px; }

.pub__rule {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--ink-2);
}

.pub__rule b { font-size: 15px; color: var(--ink); margin-right: 4px; }

.pub__section {
  margin-bottom: 16px;   /* .pub の gap はフォームの中まで届かないので、カード同士の間隔はここで作る */
}

.pub__section-title {
  font-size: 15px;
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.qlist { counter-reset: q; }

.qlist__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-2);
}

.qlist__item:last-child { border-bottom: 0; }
.qlist__item.is-missing { background: var(--danger-soft); border-radius: var(--r); padding-left: 10px; padding-right: 10px; }

.qlist__q { font-size: 13px; line-height: 1.7; }
.qlist__q::before { counter-increment: q; content: counter(q) ". "; color: var(--ink-3); font-weight: 700; }

/* 回答閲覧時の ○△× 表示 */
.mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
}

.mark--2 { background: var(--ok-soft); color: #1f7a67; }
.mark--1 { background: var(--warn-soft); color: #a97514; }
.mark--0 { background: var(--surface-3); color: var(--ink-3); }
.mark--none { background: transparent; color: var(--ink-3); }

.pub__submit {
  position: sticky;
  bottom: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.pub__progress { text-align: center; font-size: 12px; color: var(--ink-2); margin-bottom: 10px; font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .qlist__item { grid-template-columns: 1fr; }
  .qlist__item .segment { justify-self: start; }
}

/* --------------------------------------------------------------------------
   面接シート
   -------------------------------------------------------------------------- */

.rating { display: grid; gap: 4px; }

.rating__row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) auto minmax(180px, 1.4fr);
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}

.rating__row:last-child { border-bottom: 0; }
.rating__name { display: block; font-size: 13px; font-weight: 700; }
.rating__hint { display: block; font-size: 11px; color: var(--ink-3); line-height: 1.6; }
.rating__comment { font-size: 12px; }

.qa { display: grid; gap: 16px; }
.qa__q { font-size: 13px; font-weight: 700; margin-bottom: 6px; line-height: 1.6; }

/* 保存ボタンの並び。画面下に貼り付けて常に押せるようにする。 */
.formbar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  margin-top: 4px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

/*
   カードの中に置くとき。下地がすでに白なので、浮かせる装飾は重ねない。
   （白の上に白い帯が乗って、輪郭だけが見えてしまうため）
*/
.formbar--plain {
  position: static;
  padding: 14px 0 0;
  margin-top: 0;
  background: transparent;
  backdrop-filter: none;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 900px) {
  .rating__row { grid-template-columns: 1fr; gap: 8px; }
}

/* --------------------------------------------------------------------------
   文字起こしの取り込み
   -------------------------------------------------------------------------- */

.dropzone {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 30px 20px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  text-align: center;
  transition: border-color .16s, background .16s;
}

.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone__lead { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dropzone__note { font-size: 11px; color: var(--ink-3); }
.dropzone__note code { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }

/* 解析中（Claudeの応答待ち）。3Dシンボルを思考中で回す。 */
.parsing {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 30px 24px 36px;
  text-align: center;
  background: linear-gradient(160deg, #f6f3fb 0%, #eef0fa 55%, #e9f2f6 100%);
}

.parsing__stage { width: 240px; height: 240px; }
.parsing__stage canvas { display: block; width: 100%; height: 100%; }
.parsing__title { font-size: 16px; }
.parsing__lead { font-size: 13px; color: var(--ink-2); line-height: 1.9; margin-top: 6px; }
.parsing__hint { font-size: 11px; color: var(--ink-3); margin-top: 10px; }

/* 分割解析の進み具合。裏で進んでいることが分かるように出す */
.parsing__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(340px, 100%);
  margin: 18px auto 0;
}
.parsing__bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
}
.parsing__bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
  transition: width .5s ease;
}
.parsing__count {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* 根拠（左）と反映内容（右）の対 */
.pair {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  transition: opacity .16s;
}

.pair:last-child { border-bottom: 0; }
.pair.is-off { opacity: .5; }
.pair.is-empty { opacity: .55; }

.pair__head { display: flex; align-items: center; gap: 8px; }

.pair__mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.pair__mark.is-high { background: var(--ok-soft); color: #1f7a67; }
.pair__mark.is-low { background: var(--warn-soft); color: #a97514; }
.pair__mark.is-none { background: var(--surface-3); color: var(--ink-3); }

.pair__q { font-size: 13px; font-weight: 700; line-height: 1.6; }
.pair__q--muted { font-weight: 400; color: var(--ink-3); }

.pair__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
  padding-left: 30px;
}

.pair__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ink-3);
  margin-bottom: 5px;
}

.pair__source blockquote {
  margin: 0;
  padding: 10px 12px;
  border-left: 2px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-2);
}

.pair__answer .textarea:disabled { background: var(--surface-3); color: var(--ink-3); }

@media (max-width: 900px) {
  .pair__body { grid-template-columns: 1fr; padding-left: 0; }
}

/* --------------------------------------------------------------------------
   シートのひな形エディタ
   -------------------------------------------------------------------------- */

.tplsec { margin-bottom: 14px; }

.tplsec__head {
  display: grid;
  grid-template-columns: 1fr 150px auto;
  gap: 10px;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.tplsec__title { font-weight: 700; }
.tplsec__tools, .tplrow__tools { display: flex; gap: 4px; }

.tplrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
}

.tplrow:has(.tplrow__hint) { grid-template-columns: 1fr 1fr auto; }
.tplrow__hint { font-size: 12px; }

@media (max-width: 860px) {
  .tplsec__head { grid-template-columns: 1fr; }
  .tplrow, .tplrow:has(.tplrow__hint) { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   モーダル・トースト・空状態
   -------------------------------------------------------------------------- */

.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(25, 25, 25, .38); backdrop-filter: blur(3px); }

.modal__panel {
  position: relative;
  width: min(720px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

/*
   モーダルの中では操作ボタンを浮かせない。
   狭い枠の中で貼り付くと、すぐ上の入力欄に重なって読みづらくなる。
   中身の下に普通に並べる。
*/
.modal__panel .formbar {
  position: static;
  margin-top: 18px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line-2);
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-3);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 95;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--danger); }

.empty { padding: 44px 0; text-align: center; color: var(--ink-3); font-size: 13px; }

/* --------------------------------------------------------------------------
   AIシンボル（three.js）
   -------------------------------------------------------------------------- */

/*
   ダッシュボードの左端に置く縦長のパネル。
   押すと、その場から右へ広がって会話面になる（左に3D・右にやりとり）。
   広がっている間は position:absolute にして、後ろの内容を動かさない。
*/
.ai-panel {
  position: relative;
  display: flex;
  height: 452px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(160deg, #f6f3fb 0%, #eef0fa 50%, #e9f2f6 100%);
  box-shadow: var(--shadow);
  transition: width .42s cubic-bezier(.22, 1, .36, 1),
              height .42s cubic-bezier(.22, 1, .36, 1),
              box-shadow .3s;
}

/* 畳んでいるときの面：ラベル・3D・説明とボタン */
.ai-panel__face {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  padding: 22px;
}

/*
   高さを固定しているのは見た目のためだけではない。
   開閉でここの寸法が変わると canvas が作り直され、そのたびに黒い一瞬が挟まって
   チカチカする。開いても畳んでも同じ大きさにして、作り直しを起こさせない。
*/
.ai-panel__stage {
  flex: 0 0 auto;
  height: 300px;
  cursor: pointer;

  /* 移動と拡大は transform で行う。枠（canvas）の寸法は変えない——
     寸法を変えると描画バッファが作り直され、一瞬黒く落ちてチカチカする。 */
  transform-origin: 50% 50%;
  transition: transform .46s cubic-bezier(.22, 1, .36, 1);
}

.ai-panel__stage canvas { display: block; width: 100%; height: 100%; }

.ai-panel__label { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.ai-panel__lead { font-size: 13px; color: var(--ink-2); line-height: 1.8; }

/* 説明とボタンは、すりガラスのボックスとして3Dの下端に少し重ねる */
.ai-panel__foot {
  position: relative;
  z-index: 2;
  margin-top: -40px;
  padding: 16px;
  background: rgba(255, 255, 255, .46);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--r-md);
  box-shadow: 0 8px 26px rgba(25, 25, 25, .07);
}
.ai-panel__foot .btn { margin-top: 12px; }

/* ---- 展開したとき ---- */
.ai-panel.is-open {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-lg);
}

/*
   開いている間、左は3Dだけにする。
   ただし「消す」のに高さを縮めてはいけない。高さを動かすと、戻すときに
   3Dの位置が飛んで（ガクッと上がって）見える。
   場所はそのまま取らせておいて、透明にするだけにする。
*/
/* 畳んでいる途中（is-closing）も幅を保つ。ここが先に元へ戻ると
   3Dの枠が一気に広がって canvas が作り直され、一瞬消えてしまう。 */
.ai-panel.is-open .ai-panel__face,
.ai-panel.is-closing .ai-panel__face { flex: 0 0 336px; }

.ai-panel__label,
.ai-panel__foot { transition: opacity .26s ease; }

.ai-panel.is-open .ai-panel__label,
.ai-panel.is-open .ai-panel__foot {
  opacity: 0;
  pointer-events: none;
}

/* 3Dの寸法も開閉で変えない（.ai-panel__stage の高さは固定のまま） */

/* 会話面。中身は右下チャットと同じ部品を使い回す */
.ai-panel__talk {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  margin: 14px 14px 14px 0;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .8);
  overflow: hidden;
  opacity: 0;
  animation: ai-talk-in .34s .12s ease forwards;
}
.ai-panel__talk[hidden] { display: none; }

@keyframes ai-talk-in {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: none; }
}

/* 展開中に後ろの内容が動かないよう、畳んだときの高さを場所取りしておく */
.ai-panel__ghost { min-height: 452px; }

@media (max-width: 1100px) {
  .ai-panel.is-open { position: relative; width: auto !important; height: auto !important; }
  .ai-panel.is-open .ai-panel__face { flex: 0 0 auto; }
  .ai-panel.is-open { flex-direction: column; }
  .ai-panel__talk { margin: 0 14px 14px; min-height: 380px; }
}

/* WebGLが使えない環境のフォールバック */
.ai-panel__fallback {
  display: grid;
  place-items: center;
  flex: 1;
  color: var(--ink-3);
  font-size: 12px;
}

/* ==================================================================
   AIアシスタント（右下のチャット）
   どの画面からでも呼べる。応募者の個人情報は送らず、使い方に答える役。
   ================================================================== */

.ai-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
.ai-fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ai-fab svg { width: 26px; height: 26px; }
.ai-fab.is-open { transform: scale(.9); opacity: .5; }

.ai-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 85;
  width: min(392px, calc(100vw - 32px));
  max-height: min(548px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: ai-chat-in .22s ease;
}
.ai-chat[hidden] { display: none; }

/* 会話の中身の入れ物。ここごと別の場所へ移す。 */
.ai-chat__slot,
.ai-chat__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

@keyframes ai-chat-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.ai-chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-2);
}
.ai-chat__title { font-size: 13px; font-weight: 700; }
.ai-chat__sub { font-size: 11px; color: var(--ink-3); }
.ai-chat__close {
  margin-left: auto;
  width: 28px; height: 28px;
  border: 0; border-radius: var(--r-sm);
  background: transparent;
  font-size: 18px; line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
}
.ai-chat__close:hover { background: var(--surface-3); color: var(--ink); }

/* 考え中は点が脈打つ（3Dが見えない画面でも状態が分かるように） */
.ai-chat__dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ok);
  flex: 0 0 auto;
}
.ai-chat.is-thinking .ai-chat__dot,
.ai-panel.is-thinking .ai-chat__dot { background: var(--accent); animation: ai-pulse 1.1s ease-in-out infinite; }
@keyframes ai-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* パネルの中に入っているときは、背景がすりガラスなので白地を敷かない */
.ai-panel__talk .ai-chat__head { background: transparent; }
.ai-panel__talk .ai-chat__log { padding: 20px 22px; }
.ai-panel__talk .ai-msg { max-width: 76%; }
.ai-panel__talk .ai-chat__form { padding: 14px 18px; }
.ai-panel__talk .ai-chat__input { background: rgba(255, 255, 255, .85); }
.ai-panel__talk .ai-chat__note { padding: 0 22px 14px; }

.ai-chat__log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.ai-msg {
  max-width: 88%;
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-msg--bot  { align-self: flex-start; background: var(--surface-3); border-top-left-radius: 6px; }
.ai-msg--me   { align-self: flex-end; background: var(--accent-soft); border-top-right-radius: 6px; }
.ai-msg--error { align-self: flex-start; background: var(--danger-soft); color: var(--danger); }
.ai-msg p + p { margin-top: 8px; }

/* 考え中の三点 */
.ai-msg--typing { display: flex; gap: 5px; align-items: center; padding: 14px; }
.ai-msg--typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3);
  animation: ai-typing 1.2s ease-in-out infinite;
}
.ai-msg--typing span:nth-child(2) { animation-delay: .18s; }
.ai-msg--typing span:nth-child(3) { animation-delay: .36s; }
@keyframes ai-typing { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.ai-chat__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ai-chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .16s, color .16s;
}
.ai-chip:hover { border-color: var(--accent); color: var(--accent); }

.ai-chat__form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line-2);
}
.ai-chat__input {
  flex: 1;
  max-height: 132px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  font: inherit;
  font-size: 13px;
  line-height: 1.7;
  resize: none;
  overflow-y: auto;
}
.ai-chat__input:focus { outline: none; border-color: var(--accent); background: var(--surface); }

.ai-chat__send {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0;
  border-radius: var(--r);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  flex: 0 0 auto;
  transition: opacity .16s;
}
.ai-chat__send:disabled { opacity: .4; cursor: default; }
.ai-chat__send svg { width: 17px; height: 17px; }

.ai-chat__note {
  padding: 0 18px 14px;
  font-size: 10px;
  color: var(--ink-3);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .ai-fab { right: 16px; bottom: 16px; }
  .ai-chat { right: 8px; left: 8px; bottom: 8px; width: auto; max-height: calc(100vh - 16px); }
}

/* AIの回答内の簡易整形（assistant.js が組み立てる） */
.ai-msg--bot { white-space: normal; }
.ai-msg .ai-head { font-weight: 700; font-size: 12px; color: var(--ink); margin-top: 10px; }
.ai-msg .ai-head:first-child { margin-top: 0; }
.ai-msg .ai-list { margin: 6px 0 0; padding-left: 2px; display: grid; gap: 4px; }
.ai-msg .ai-list li { padding-left: 15px; position: relative; }
.ai-msg .ai-list li::before {
  content: "";
  position: absolute;
  left: 3px; top: .78em;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink-3);
}
.ai-msg code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .05);
  font-size: 12px;
}

/* 聞かなかった質問を記録に残すかどうかの選択 */
.dropline {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  font-size: 12px;
  align-items: flex-start;
}
.dropline__note { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }

/* ひな形に無かった質問（その回だけ足すもの） */
.pair--extra .pair__head { align-items: center; gap: 10px; }
.pair--extra .pair__answer .input { margin-bottom: 2px; }
.pair__section { margin-left: auto; max-width: 220px; }
.select--sm { height: 32px; padding: 0 28px 0 10px; font-size: 12px; }

/* ==================================================================
   モーダルの見出し（応募者フォーム以外の断片で使う）
   ================================================================== */
.modal__title { font-size: 18px; }
.modal__lead { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ------------------------------------------------------------------
   書類
   ------------------------------------------------------------------ */
.filerow {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.filerow__main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; flex-wrap: wrap; }
.filerow__name { font-size: 13px; font-weight: 600; word-break: break-all; }
.filerow__meta { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.filerow__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* 書類から読み取った内容の確認 */
.fx { display: grid; gap: 2px; margin-top: 12px; }
.fx__row { padding: 12px 0; border-bottom: 1px solid var(--line-2); transition: opacity .16s; }
.fx__row.is-empty { opacity: .45; }
.fx__row.is-off .fx__body { opacity: .4; }
.fx__head { display: flex; align-items: center; gap: 10px; }
.fx__label { font-size: 13px; font-weight: 600; }
.fx__label--muted { color: var(--ink-3); font-weight: 400; }
.fx__body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; padding-left: 26px; }
.fx__cap { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 4px; }
.fx__now { font-size: 13px; color: var(--ink-2); }
.fx__now > span:last-child { display: block; padding: 9px 0; }

@media (max-width: 720px) {
  .fx__body { grid-template-columns: 1fr; padding-left: 0; }
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  font-size: 12px;
}

.careers { display: grid; gap: 10px; }
.careers li { display: grid; gap: 2px; padding-left: 12px; border-left: 2px solid var(--line); }
.careers__period { font-size: 11px; color: var(--ink-3); }
.careers__company { font-size: 13px; font-weight: 600; }
.careers__role { font-size: 12px; color: var(--ink-2); }

/* ------------------------------------------------------------------
   社内メモ
   ------------------------------------------------------------------ */
.note { margin-bottom: 10px; }
.note.is-pinned { border-left: 3px solid var(--accent); }
.note__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.note__who { font-size: 12px; font-weight: 600; }
.note__when { font-size: 11px; color: var(--ink-3); }
.note__actions { display: flex; gap: 4px; margin-left: auto; }
.note__body { font-size: 13px; line-height: 1.9; white-space: pre-wrap; }

/* ------------------------------------------------------------------
   日程
   ------------------------------------------------------------------ */
.ev {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}
.ev:last-child { border-bottom: 0; }
.ev.is-done { opacity: .45; }
.ev.is-done .ev__title { text-decoration: line-through; }
.ev.is-overdue .ev__when { color: var(--danger); }
.ev__check { display: grid; place-items: center; }
.ev__when { font-size: 12px; white-space: nowrap; }
.ev__title { font-size: 13px; font-weight: 600; }
.ev__place { font-size: 11px; color: var(--ink-3); }
.ev__actions { display: flex; gap: 4px; margin-left: auto; }
.ev__memo {
  flex-basis: 100%;
  margin-top: 6px;
  padding-left: 26px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ------------------------------------------------------------------
   応募者へのメール
   ------------------------------------------------------------------ */
.mail-draft {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.mail-draft__state { font-size: 11px; color: var(--ink-3); }

/* メール本文は等幅寄りにして、改行の見え方を実際の送信結果に近づける */
.textarea--mail {
  font-family: var(--font);
  line-height: 1.9;
  white-space: pre-wrap;
}

.mailrow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  cursor: pointer;
}
.mailrow__subject { font-size: 13px; font-weight: 600; }

/* 応募者から届いたメールは、こちらから送ったものと見分けられるようにする */
.mailrow--in { border-left: 3px solid var(--ok); }
/* 添付ファイルの一覧（作成画面で選んだもの／控えに残っているもの） */
.mail-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.mail-files__item {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--ink-2);
  word-break: break-all;
}
.mail-files__item--link { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }
.mail-files__item--link:hover { text-decoration: underline; }
.mail-files__total { align-self: center; font-size: 11px; color: var(--ink-3); }

/* 一覧のページ送り */
.pager {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 14px;
  padding: 0 4px;
}
.pager__info { font-size: 12px; color: var(--ink-3); }
.pager__nav { display: flex; gap: 4px; margin-left: auto; }

.pager__btn {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s;
}
.pager__btn:hover { background: var(--surface-2); color: var(--ink); }

.pager__btn.is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 700;
  cursor: default;
}
.pager__btn.is-disabled {
  color: var(--ink-3);
  background: var(--surface-2);
  cursor: default;
  opacity: .6;
}

/* 未読メールがある応募者の行 */
.table tr.is-unread { background: var(--accent-soft); }
.table tr.is-unread:hover { background: #fbdce7; }

/* 要対応に出す新着メール */
.listrow--unread { background: var(--accent-soft); border-radius: var(--r-sm); }
.listrow__sub {
  font-size: 11px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 42%;
}

.mailrow__who {
  font-size: 11px;
  color: var(--ink-2);
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 46%;
}
.mailrow__who + .mailrow__meta { margin-left: 0; }

.mailrow__meta { font-size: 11px; color: var(--ink-3); margin-left: auto; white-space: nowrap; }
.mailrow__meta + .mailrow__meta { margin-left: 0; }

.mailbody {
  font-size: 13px;
  line-height: 2;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 装飾つきの控え。リストの印はリセットで消してあるので、ここだけ戻す。 */
.mailbody--rich { white-space: normal; }
.mailbody--rich ul { list-style: disc; margin: 6px 0 6px 1.4em; }
.mailbody--rich ol { list-style: decimal; margin: 6px 0 6px 1.6em; }
.mailbody--rich li { margin: 2px 0; }
.mailbody--rich a { color: var(--accent); text-decoration: underline; }

/* 控えの CC・BCC・返信元 */
.mail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-2);
  word-break: break-all;
}
.mail-meta b { margin-right: 5px; color: var(--ink-3); font-size: 11px; }

/* 「この件への返信です」の帯 */
.mail-replyto {
  margin-top: 14px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  font-size: 12px;
  color: var(--ink-2);
}

/* 宛先は動かせないので、入力欄ではなく読み物として見せる */
.mail-to {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  font-size: 13px;
}
.mail-to__addr { word-break: break-all; }

.mail-to__more, .mail-cc__self {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.mail-to__more { margin-left: auto; }
.mail-to__more:hover, .mail-cc__self:hover { text-decoration: underline; }
.mail-cc__self { margin-left: 8px; }

/* ------------------------------------------------------------------
   本文エディタ（太字・イタリック・下線・リスト・文字サイズ・リンク）
   ------------------------------------------------------------------ */
.rte {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .16s, box-shadow .16s;
}

.rte:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.rte__bar {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-2);
}

.rte__btn {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  transition: background .16s, color .16s;
}
.rte__btn:hover { background: var(--surface-3); color: var(--ink); }
.rte__btn .icon { width: 17px; height: 17px; }

.rte__sep { width: 1px; height: 18px; margin: 0 4px; background: var(--line); }

.rte__size { width: auto; min-width: 104px; margin-left: auto; }

.rte__area {
  min-height: 220px;
  max-height: 46vh;
  overflow-y: auto;
  padding: 13px;
  font-size: 13px;
  line-height: 1.9;
  outline: 0;
  word-break: break-word;
}

.rte__area ul { list-style: disc; margin: 4px 0 4px 1.4em; }
.rte__area ol { list-style: decimal; margin: 4px 0 4px 1.6em; }
.rte__area li { margin: 2px 0; }
.rte__area a { color: var(--accent); text-decoration: underline; }

/* ------------------------------------------------------------------
   AIが働くボタン
   AIパネル（3Dシンボル）と同じ紫〜青の色味にして、
   「これはAIがやる操作」と見ただけで分かるようにする。
   ------------------------------------------------------------------ */
.btn--ai {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #ddd8f4;
  background: linear-gradient(120deg, #f4f1fd 0%, #ebf0fc 55%, #e7f2f7 100%);
  color: #5a4fa6;
  font-weight: 700;
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.btn--ai:hover:not(:disabled) {
  border-color: #c6bef0;
  box-shadow: 0 4px 14px rgba(108, 92, 199, .16);
  transform: translateY(-1px);
}
.btn--ai:disabled { opacity: .55; cursor: default; }
.btn--ai .icon { width: 15px; height: 15px; }

/* 押している間はきらめきが息づく */
.btn--ai:disabled .icon { animation: ai-sparkle 1.2s ease-in-out infinite; }
@keyframes ai-sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.88); }
}

/* ------------------------------------------------------------------
   画面上部の検索（打つたびに候補を出す）
   ------------------------------------------------------------------ */
.search { position: relative; }

.search__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 75;
  width: min(420px, 90vw);
  max-height: 380px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.search__list[hidden] { display: none; }

.search__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.search__item:hover,
.search__item.is-active { background: var(--surface-3); }

.search__name { font-size: 13px; font-weight: 600; }
.search__kana { font-size: 11px; color: var(--ink-3); }
.search__meta { font-size: 11px; color: var(--ink-3); margin-left: auto; white-space: nowrap; }
.search__item mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; }
.search__empty { padding: 16px 12px; font-size: 12px; color: var(--ink-3); text-align: center; }

/* ------------------------------------------------------------------
   月カレンダー（予定と面接記録を1つの暦に並べる）
   ------------------------------------------------------------------ */
.cal { padding: 0 14px 14px; }

.cal__head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 0 0 8px;
}
.cal__dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
}
.cal__dow.is-sun { color: #d96b7a; }
.cal__dow.is-sat { color: #6b8fd4; }

.cal__week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
}

.cal__day {
  min-height: 92px;
  padding: 6px 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid var(--line-2);
  overflow: hidden;
}
.cal__day:last-child { border-right: 0; }
.cal__day.is-out { background: var(--surface-2); }
.cal__day.is-out .cal__date { color: var(--ink-3); opacity: .6; }

.cal__date {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  padding: 1px 4px;
  align-self: flex-start;
}
.cal__day.is-today .cal__date {
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-pill);
  min-width: 20px;
  text-align: center;
}

/* 予定のチップ。種類で色を分ける */
.cal__item {
  display: flex;
  align-items: baseline;
  gap: 5px;
  width: 100%;
  padding: 3px 6px;
  border: 0;
  border-radius: 5px;
  background: var(--surface-3);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: filter .16s;
}
.cal__item:hover { filter: brightness(.95); }
.cal__item--interview { background: var(--accent-soft); color: #b8477a; }
.cal__item--contact { background: var(--info-soft); color: #4a6bb0; }
.cal__item--deadline { background: var(--warn-soft); color: #a8761c; }
.cal__item--sheet { background: var(--ok-soft); color: #257a68; }
.cal__item.is-done { opacity: .5; }

.cal__time { flex: 0 0 auto; font-weight: 700; }
.cal__who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal__more { font-size: 10px; color: var(--ink-3); padding-left: 6px; }

@media (max-width: 900px) {
  .cal__day { min-height: 68px; }
  .cal__who { display: none; }
}

/* ------------------------------------------------------------------
   週表示（ダッシュボードの既定）
   月まるごとは場所を取るので、普段はこの1週間ぶんを見せる。
   ------------------------------------------------------------------ */
.wcal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding: 0 14px 16px;
}

.wcal__day {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 104px;
  padding: 8px 6px;
  border-right: 1px solid var(--line-2);
}
.wcal__day:last-child { border-right: 0; }
.wcal__day.is-past { opacity: .5; }
.wcal__day.is-today { background: var(--accent-soft); border-radius: var(--r-sm); }

.wcal__head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  justify-content: center;
  margin-bottom: 2px;
}
.wcal__dow { font-size: 10px; font-weight: 700; color: var(--ink-3); }
.wcal__dow.is-sun { color: #d96b7a; }
.wcal__dow.is-sat { color: #6b8fd4; }
.wcal__date { font-size: 15px; font-weight: 700; }
.wcal__day.is-today .wcal__date { color: var(--accent); }

.wcal__items { display: grid; gap: 4px; }
.wcal__none { text-align: center; font-size: 11px; color: var(--ink-3); opacity: .6; }

/* 週表示のチップは高さに余裕があるので、時刻と名前を2行にする */
.wcal .cal__item { flex-direction: column; align-items: flex-start; gap: 1px; padding: 5px 7px; }
.wcal .cal__who { white-space: normal; line-height: 1.4; }

@media (max-width: 1100px) {
  .wcal__day { min-height: 84px; }
}

/* 月表示モーダル */
.modal__headrow {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
/* 右上の閉じるボタンに重ならないよう、その分だけ空けておく */
.modal__actions { display: flex; gap: 6px; margin-left: auto; margin-right: 34px; }
.modal__panel .cal { padding: 0; }
