/* キマッタ！ — 高邦会グリーン基調。旧デモ（Tailwind）のトークンを素のCSSに移したもの。 */

:root {
  --green:        #0b6e4f;
  --green-dark:   #095a41;
  --green-light:  #e6f2ee;
  --green-soft:   #f3f9f6;
  --green-faint:  #f8fbfa;
  --green-ring:   #9fcebd;

  --ink:          #17251f;
  --ink-mid:      #4b5563;
  --ink-soft:     #6b7280;
  --ink-faint:    #9ca3af;
  --line:         #e5e7eb;
  --line-soft:    #f0f2f1;
  --bg:           #ffffff;

  --radius:       0.75rem;
  --shadow-card:  0 1px 2px rgba(15,40,30,.04), 0 1px 3px rgba(15,40,30,.05);
  --shadow-hover: 0 2px 4px rgba(15,40,30,.05), 0 4px 12px rgba(15,40,30,.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Segoe UI", Meiryo, sans-serif;
  font-feature-settings: "palt";
  line-height: 1.6;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ---------- dev バー ---------- */
.env-bar {
  background: #b45309; color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  text-align: center; padding: 6px 12px;
}

/* ---------- ヘッダ ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 60px; }

.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; }
.brand-mark { font-size: 18px; font-weight: 800; color: var(--green); letter-spacing: .01em; }
.brand-sub  { font-size: 11px; color: var(--ink-faint); }

.nav { display: flex; gap: 4px; margin-right: auto; }
.nav-link {
  padding: 6px 12px; border-radius: 8px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: .15s;
}
.nav-link:hover { background: var(--green-soft); color: var(--green); }
.nav-link.is-current { background: var(--green-light); color: var(--green); }

.who { display: flex; align-items: center; gap: 10px; }
.who-name { font-size: 14px; font-weight: 600; }
.who-cat  { font-size: 11px; color: var(--ink-faint); }
.who form { margin: 0; }

/* ロールのバッジ。管理者ほど強い色にして、今どの立場で見ているかを一目で分かるようにする */
.who-role {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.role-member   { background: #e5e7eb; color: #374151; }
.role-mentor   { background: var(--green-light); color: var(--green); }
.role-admin    { background: #fef3c7; color: #92400e; }
.role-sysadmin { background: #ede9fe; color: #5b21b6; }

.company-switch { margin: 0; }
.company-switch .select { font-size: 13px; padding: 4px 8px; }

.main { padding: 28px 20px 64px; }

.site-footer {
  border-top: 1px solid var(--line); padding: 20px 0;
  font-size: 12px; color: var(--ink-faint);
}

/* ---------- 見出し・パンくず ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-title { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.page-count { font-size: 13px; color: var(--ink-faint); }
.head-actions { display: flex; align-items: center; gap: 12px; }

.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 18px; }
.crumbs a { color: var(--ink-faint); text-decoration: none; }
.crumbs a:hover { color: var(--green); }
.crumbs .sep { color: #d1d5db; }
.crumbs .here { color: var(--ink-mid); font-weight: 600; }

/* ---------- カード ---------- */
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-card);
}
.card-pad { padding: 24px; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: .15s; white-space: nowrap;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-card); }
.btn-primary:hover { background: var(--green-dark); }
.btn-secondary { background: #fff; color: var(--ink-soft); border-color: var(--line); }
.btn-secondary:hover { background: #f9fafb; color: var(--ink); border-color: #d1d5db; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); font-size: 13px; padding: 5px 12px; }
.btn-ghost:hover { background: var(--green-soft); color: var(--green); }
.btn:active { transform: scale(.99); }

/* ---------- フォーム ---------- */
.label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.input, .select, .textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); font-size: 14px; font-family: inherit;
  transition: .15s; outline: none;
}
.textarea { line-height: 1.7; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: #d1d5db; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(11,110,79,.12);
}
.input::placeholder, .textarea::placeholder { color: #d1d5db; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px; margin-bottom: 20px; }
.filter-field { display: flex; flex-direction: column; }
.filter-field .input, .filter-field .select { width: auto; min-width: 160px; }

.form-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row { margin-bottom: 20px; }
.form-actions { display: flex; gap: 12px; border-top: 1px solid var(--line-soft); padding-top: 20px; margin-top: 24px; }
.req { color: #b91c1c; }

/* ---------- テーブル ---------- */
.table-scroll { overflow-x: auto; }
table.list { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
table.list thead th {
  background: var(--green-faint); border-bottom: 1px solid var(--line);
  padding: 10px 16px; text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--ink-faint);
}
table.list tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
table.list tbody tr:last-child td { border-bottom: none; }
table.list tbody tr:hover { background: var(--green-faint); }
table.list a.row-link { color: var(--ink); font-weight: 700; text-decoration: none; }
table.list a.row-link:hover { color: var(--green); text-decoration: underline; }
.muted { color: var(--ink-faint); }
.empty { padding: 48px 16px; text-align: center; color: var(--ink-faint); }

/* ---------- バッジ ---------- */
.badge {
  display: inline-flex; align-items: center; padding: 2px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge-green { background: var(--green-light); color: var(--green); }
.badge-gray  { background: #f3f4f6; color: var(--ink-soft); }
.badge-warn  { background: #fef3c7; color: #92400e; }

/* 表示範囲が絞られていることの説明。見えていない行があると気づけるように出す */
.scope-note {
  margin: -8px 0 16px; padding: 10px 14px;
  border-left: 3px solid var(--green-ring); background: var(--green-faint);
  border-radius: 0 6px 6px 0; font-size: 12px; color: var(--ink-soft);
}
.form-meta { margin: 0 0 20px; font-size: 12px; color: var(--ink-faint); }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
table.list .sub { font-size: 11px; color: var(--ink-faint); }
.dt-note { font-weight: 400; color: var(--ink-faint); }
/* ---------- 評価共有者のピッカー ---------- */
.sharer-picker {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff;
}
.sharer-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.sharer-chips:not(:empty) { margin-bottom: 12px; }
.sharer-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 6px 4px 12px; border-radius: 999px;
  background: var(--green-light); color: var(--green);
  font-size: 13px; font-weight: 600;
}
.sharer-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0; border: none; border-radius: 999px;
  background: rgba(11,110,79,.15); color: var(--green);
  font-size: 13px; line-height: 1; cursor: pointer; transition: .15s;
}
.sharer-remove:hover { background: var(--green); color: #fff; }
.sharer-empty { margin: 0 0 12px; font-size: 13px; color: var(--ink-faint); }
.sharer-select { max-width: 320px; }
.detail-head-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.card.narrow { max-width: 560px; }
table.list td .select { min-width: 160px; }

/* ---------- 詳細画面 ---------- */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line-soft); padding-bottom: 20px; }
.avatar {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 999px;
  background: var(--green-light); color: var(--green); font-size: 18px; font-weight: 800;
}
.detail-id { display: flex; align-items: center; gap: 16px; }
.detail-name { font-size: 20px; font-weight: 800; margin: 0; }
.detail-meta { margin: 4px 0 0; font-size: 12px; color: var(--ink-faint); }
.score-box { background: var(--green-soft); border-radius: 8px; padding: 10px 16px; text-align: right; flex-shrink: 0; }
.score-box .score-label { font-size: 11px; font-weight: 600; color: var(--ink-faint); }
.score-box .score-value { font-size: 16px; font-weight: 800; color: var(--green); }

dl.meta { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; margin: 20px 0 0; }
dl.meta dt { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 4px; }
dl.meta dd { margin: 0; font-size: 14px; font-weight: 600; }
dl.meta .full { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.section { margin-top: 24px; }
.section h2 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-size: 14px; font-weight: 700; color: var(--green);
}
.section h2::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: rgba(11,110,79,.6); }
.section .body {
  white-space: pre-wrap; border: 1px solid var(--line-soft); border-radius: 8px;
  background: var(--green-faint); padding: 14px 16px; font-size: 14px; line-height: 1.8; color: var(--ink-mid);
}

/* ---------- ユーザー選択（トップ） ---------- */
.pick-hero { text-align: center; padding: 32px 0 8px; }
.pick-hero h1 { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.pick-hero p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.pick-group { margin-top: 32px; }
.pick-group h2 { font-size: 13px; font-weight: 700; color: var(--ink-faint); letter-spacing: .04em; margin: 0 0 12px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pick-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow-card); text-decoration: none; color: inherit;
  transition: .15s; cursor: pointer; width: 100%; text-align: left; font: inherit;
}
.pick-card:hover { border-color: var(--green-ring); box-shadow: var(--shadow-hover); }
.pick-card.is-current { border-color: var(--green); background: var(--green-soft); }
.pick-card .name { font-size: 14px; font-weight: 700; }
.pick-card .code { font-size: 11px; color: var(--ink-faint); }

/* ---------- ログイン画面 ---------- */
.login-wrap { display: flex; align-items: flex-start; justify-content: center; padding: 12vh 20px 40px; }
.login-card { width: 100%; max-width: 380px; padding: 32px; }
.login-head { text-align: center; margin-bottom: 28px; }
.login-brand { font-size: 26px; font-weight: 800; color: var(--green); letter-spacing: .01em; }
.login-sub { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.login-submit { width: 100%; margin-top: 4px; }
.login-note { margin: 20px 0 0; font-size: 12px; color: var(--ink-faint); text-align: center; line-height: 1.7; }

/* ---------- 入力させない値の表示 ---------- */
.fixed-value {
  padding: 8px 12px; border: 1px solid var(--line-soft); border-radius: 8px;
  background: var(--green-faint); font-size: 14px; font-weight: 600; color: var(--ink-mid);
}
.field-note { margin: 6px 0 0; font-size: 11px; color: var(--ink-faint); }

/* ---------- 通知 ---------- */
.flash {
  border: 1px solid var(--green-ring); background: var(--green-light); color: var(--green-dark);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; font-size: 14px; font-weight: 600;
}
.error-box {
  border: 1px solid #fca5a5; background: #fef2f2; color: #b91c1c;
  border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; font-size: 14px;
}
.error-box ul { margin: 6px 0 0; padding-left: 20px; }

@media (max-width: 640px) {
  .form-grid, dl.meta { grid-template-columns: 1fr; }
  .header-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 12px; }
  .detail-head { flex-direction: column; }
}

/* ===== 目標設定（画面上の呼び名は「質問に答えて目標をつくる」）==============
   4ステップの進行と、1問1答。旧デモ（Tailwind）の見た目を素のCSSに移したもの。
   ★クラス名の wiz- は内部名。画面に「ウィザード」の語は出さない（2026-09-21）。 */

/* 到達水準の定規。★上長と本人の目線をそろえるため、STEP1に必ず出す。 */
.wiz-level {
  margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius);
  background: var(--green-faint); border: 1px solid var(--green-ring);
  font-size: 13px; line-height: 1.8;
}
.wiz-level-note { display: block; color: var(--ink-soft); font-size: 12px; }

.wiz-steps {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 20px;
}
.wiz-step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  background: var(--line-soft); color: var(--ink-soft);
  font-size: 13px; font-weight: 600;
}
.wiz-step .wiz-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); color: var(--ink-faint); font-size: 12px;
}
.wiz-step.is-current { background: var(--green); color: #fff; }
.wiz-step.is-current .wiz-num { background: rgba(255,255,255,.25); color: #fff; }
.wiz-step.is-done { background: var(--green-light); color: var(--green); }
.wiz-step.is-done .wiz-num { background: var(--green); color: #fff; }

/* --- 注力領域の選択 --- */
.wiz-areas { display: grid; gap: 8px; }
.wiz-area-group {
  margin-top: 12px; font-size: 12px; font-weight: 700;
  color: var(--ink-soft); letter-spacing: .04em;
}
.wiz-area-group:first-child { margin-top: 0; }
.wiz-area {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: border-color .12s, background .12s;
}
.wiz-area:hover { border-color: var(--green-ring); background: var(--green-faint); }
.wiz-area.is-on { border-color: var(--green); background: var(--green-soft); }
.wiz-area input { margin-top: 3px; accent-color: var(--green); }
.wiz-area-body { display: flex; flex-direction: column; gap: 3px; }
.wiz-area-title { font-weight: 600; font-size: 14px; }
.wiz-area-sum { font-size: 12px; color: var(--ink-soft); line-height: 1.6; }

/* --- 対話 --- */
.wiz-progress { font-size: 12px; color: var(--ink-soft); margin-bottom: 10px; }
.wiz-stage {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--green-light); color: var(--green);
  font-size: 12px; font-weight: 700; margin-bottom: 12px;
}
.wiz-question {
  font-size: 18px; line-height: 1.7; font-weight: 600;
  margin: 0 0 8px;
}
.wiz-hint {
  margin: 0 0 12px; padding: 8px 12px;
  border-left: 3px solid var(--green-ring); background: var(--green-faint);
  font-size: 13px; color: var(--ink-mid);
}

.wiz-log { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.wiz-log-q { font-size: 12px; color: var(--ink-soft); }
.wiz-log-a { font-size: 14px; white-space: pre-wrap; }

.wiz-prev { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }

/* 到達基準（ウィザードで答えながら見る） */
.wiz-criteria summary { cursor: pointer; margin: 0; }
.wiz-criteria-body { margin-top: 10px; display: grid; gap: 12px; white-space: pre-wrap; font-size: 13px; line-height: 1.7; color: var(--ink-soft); }
.wiz-criteria-item .strong { color: var(--ink); margin-bottom: 2px; white-space: normal; }

/* ===== pulse 週次の振り返り ================================================ */

/* 今週のまとめ。★メール本文と同じものが載る。読み物として見えるようにする。 */
.pulse-summary { border-left: 4px solid var(--green); }
.pulse-summary-body {
  margin: 6px 0 10px; font-size: 15px; line-height: 1.9; white-space: pre-wrap;
}
.pulse-q { margin-top: 20px; }
.pulse-q:first-of-type { margin-top: 8px; }
.pulse-q .wiz-hint { margin-top: 4px; }

/* ===== 月次レポート ======================================================== */
.monthly-body { border-left: 4px solid var(--green); }
.monthly-text { margin: 6px 0 0; font-size: 15px; line-height: 1.9; white-space: pre-wrap; }

/* ★hidden 属性を必ず効かせる。.btn { display:inline-flex } などが hidden を上書きして、
   隠したはずのボタンが残っていた（「まだ経験がない」を何度でも押せて問いがループした。2026-09-14） */
[hidden] { display: none !important; }
