/* ============================================================
   逆算思考コーチング プロトタイプ - スタイル
   ============================================================ */
:root{
  --navy:#1a2851; --navy-dark:#0f1a3a; --navy-light:#3a4a7c;
  --orange:#ff6b35; --orange-light:#ffa07a;
  --cream:#f8f6f1; --gray-50:#f8fafc; --gray-100:#f1f5f9;
  --gray-200:#e2e8f0; --gray-400:#94a3b8; --gray-500:#64748b;
  --gray-700:#334155; --gray-900:#0f172a;
  --green:#10b981; --gold:#f59e0b; --red:#dc2626;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;color:var(--gray-900);background:var(--cream);line-height:1.7;-webkit-font-smoothing:antialiased;font-feature-settings:"palt"}

.shell{max-width:840px;margin:0 auto;padding:28px 20px 80px}

/* ===== ヘッダ ===== */
.brand{display:flex;align-items:center;gap:14px;margin-bottom:24px;padding-bottom:16px;border-bottom:1px solid var(--gray-200)}
.brand-mark{width:42px;height:42px;border:2px solid var(--orange);border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:serif;font-size:22px;color:var(--navy);font-weight:700;flex-shrink:0}
.brand-text{font-size:11px;letter-spacing:4px;color:var(--gray-500);font-weight:700}
.brand-name{font-size:14px;color:var(--navy);font-weight:700;letter-spacing:1px;margin-top:2px}
.brand-tag{margin-left:auto;font-size:13px;color:var(--gray-500);font-weight:600}

/* ===== セクション切替 ===== */
.section{display:none;animation:fadeIn .35s ease}
.section.active{display:block}
@keyframes fadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* ===== ヒーロー ===== */
.hero{background:linear-gradient(135deg,var(--navy-dark) 0%,var(--navy) 60%,var(--navy-light) 130%);color:white;padding:42px 36px;border-radius:8px;position:relative;overflow:hidden;margin-bottom:20px}
.hero::before{content:'';position:absolute;width:300px;height:300px;bottom:-100px;right:-100px;background:radial-gradient(circle,rgba(255,107,53,0.4) 0%,transparent 60%)}
.hero-label{font-size:11px;letter-spacing:6px;color:var(--orange-light);font-weight:700;position:relative}
.hero h1{font-size:24px;font-weight:700;line-height:1.5;margin-top:14px;position:relative}
.hero-sub{font-size:14px;color:var(--orange-light);margin-top:14px;line-height:1.7;position:relative}

/* ===== カード ===== */
.card{background:white;padding:28px 32px;border-radius:8px;margin-bottom:14px;box-shadow:0 4px 14px rgba(15,26,58,0.05)}
.card-title{font-size:18px;font-weight:700;color:var(--navy);margin-bottom:8px}
.card-desc{font-size:13px;color:var(--gray-500);margin-bottom:20px;line-height:1.7}

/* ===== カスケード表示 ===== */
.cascade-display{margin-bottom:20px}
.cascade-label{font-size:10px;letter-spacing:3px;color:var(--gray-500);font-weight:700;margin-bottom:10px}
.cascade-row{display:flex;align-items:flex-start;gap:10px;padding:10px 14px;background:var(--gray-50);border-radius:4px;margin-bottom:6px}
.cascade-tag{flex-shrink:0;display:inline-block;padding:3px 10px;font-size:10px;font-weight:800;letter-spacing:2px;color:white;border-radius:2px}
.cascade-tag.long{background:var(--navy)}
.cascade-tag.mid{background:var(--orange)}
.cascade-tag.short{background:var(--green)}
.cascade-text{font-size:13px;color:var(--gray-700);line-height:1.6;flex:1}

/* ===== タイプ表示 ===== */
.type-display{margin-bottom:20px;padding:16px 20px;background:var(--gray-50);border-radius:6px}
.type-row{display:flex;align-items:center;gap:12px;padding:6px 0}
.type-row.sub{opacity:0.85}
.type-tag{padding:2px 10px;font-size:10px;font-weight:800;letter-spacing:1px;color:white;border-radius:2px}
.type-name{font-size:15px;font-weight:700;color:var(--navy)}
.type-score{margin-left:auto;font-size:12px;color:var(--gray-500);font-weight:700}

/* ===== ボタン ===== */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 28px;border-radius:4px;font-size:14px;font-weight:700;cursor:pointer;border:none;font-family:inherit;transition:all .15s;text-decoration:none}
.btn-primary{background:var(--orange);color:white}
.btn-primary:hover{background:#e05524;transform:translateY(-1px)}
.btn-primary:disabled{background:var(--gray-200);color:var(--gray-400);cursor:not-allowed;transform:none}
.btn-secondary{background:white;color:var(--navy);border:1px solid var(--gray-200)}
.btn-secondary:hover{border-color:var(--navy)}
.btn-text{background:transparent;color:var(--gray-500);font-weight:600;font-size:13px;padding:10px 14px}
.btn-text:hover{color:var(--navy)}
.btn-big{font-size:16px;padding:18px 36px;width:100%;margin-top:8px;margin-bottom:6px}
.btn-row{display:flex;gap:10px;justify-content:space-between;margin-top:18px}

/* ===== セットアップ ===== */
.setup-progress{display:flex;gap:10px;margin-bottom:24px}
.setup-progress .step{flex:1;padding:10px 14px;background:var(--gray-100);border-radius:3px;font-size:11px;font-weight:700;color:var(--gray-500);text-align:center;letter-spacing:1px}
.setup-progress .step.active{background:var(--orange);color:white}
.setup-progress .step.done{background:var(--navy);color:white}

.setup-step h2{font-size:22px;color:var(--navy);font-weight:700;margin-bottom:8px}
.step-desc{font-size:13px;color:var(--gray-500);margin-bottom:22px;line-height:1.7}

.form-group{margin-bottom:14px}
.form-group label{display:block;font-size:12px;font-weight:700;color:var(--navy);margin-bottom:6px}
.form-group input, .form-group textarea, .form-group select{width:100%;padding:12px 14px;border:1px solid var(--gray-200);border-radius:4px;font-size:16px;font-family:inherit;line-height:1.6;color:var(--gray-900);background:white}
.form-group select{cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;background-size:10px;padding-right:36px}
.form-hint{font-size:11px;color:var(--gray-500);margin-top:6px;line-height:1.6}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus{outline:none;border-color:var(--orange);box-shadow:0 0 0 3px rgba(255,107,53,0.1)}

/* ===== クイズ ===== */
.quiz-progress{margin-bottom:14px;padding:12px 16px;background:white;border-radius:4px}
.quiz-prog-text{display:flex;justify-content:space-between;font-size:11px;color:var(--gray-500);font-weight:700;margin-bottom:6px}
.quiz-prog-bar{height:5px;background:var(--gray-100);border-radius:3px;overflow:hidden}
.quiz-prog-fill{height:100%;background:linear-gradient(90deg,var(--orange) 0%,var(--orange-light) 100%);transition:width .3s ease}

.quiz-card{background:white;padding:24px 28px;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,0.04);margin-bottom:14px}
.q-meta{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.q-num{font-size:10px;font-weight:700;letter-spacing:2px;color:var(--orange)}
.q-scenario{font-size:10px;color:var(--gray-500);background:var(--gray-50);padding:2px 9px;border-radius:2px}
.q-text{font-size:16px;font-weight:600;color:var(--navy);line-height:1.6;margin-bottom:14px}
.q-hint{font-size:11px;color:var(--gray-500);margin-bottom:16px;padding:9px 12px;background:var(--cream);border-left:3px solid var(--orange);line-height:1.6}

.scale{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.scale-btn{padding:11px 4px;border:1.5px solid var(--gray-200);border-radius:4px;background:white;cursor:pointer;text-align:center;transition:all .15s;font-family:inherit}
.scale-btn:hover{border-color:var(--orange);background:#fff8f4}
.scale-btn.selected{border-color:var(--orange);background:var(--orange);color:white}
.scale-btn .v{font-size:16px;font-weight:800;display:block}
.scale-btn .l{font-size:9px;line-height:1.3;display:block;margin-top:3px;color:var(--gray-500)}
.scale-btn.selected .l{color:rgba(255,255,255,0.9)}

/* ===== バランスホイール ===== */
.wheel-row{background:white;padding:22px 26px;border-radius:8px;margin-bottom:14px;box-shadow:0 2px 8px rgba(0,0,0,0.05)}
.wheel-label-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.wheel-tag{padding:5px 14px;font-size:12px;font-weight:800;letter-spacing:1px;color:white;border-radius:3px}
.wheel-value{font-family:Inter,sans-serif;font-size:32px;font-weight:800;color:var(--navy);min-width:50px;text-align:right;line-height:1}
.wheel-question{font-size:17px;font-weight:700;color:var(--gray-900);line-height:1.5;margin-bottom:8px}
.wheel-detail{font-size:13px;color:var(--gray-700);line-height:1.7;margin-bottom:16px;background:var(--gray-50);padding:10px 14px;border-left:3px solid var(--orange);border-radius:2px}
.wheel-scale-labels{display:flex;justify-content:space-between;font-size:10px;color:var(--gray-500);margin-bottom:6px;padding:0 4px;font-weight:600}
.wheel-scale{display:grid;grid-template-columns:repeat(10,1fr);gap:4px}
.wheel-btn{padding:12px 0;border:1.5px solid var(--gray-200);border-radius:4px;background:white;cursor:pointer;font-family:Inter,sans-serif;font-size:14px;font-weight:700;color:var(--gray-700);transition:all .12s}
.wheel-btn:hover{border-color:var(--orange);background:#fff8f4}
.wheel-btn.selected{font-weight:800}

@media (max-width:600px){
  .wheel-row{padding:18px 18px}
  .wheel-question{font-size:15px}
  .wheel-detail{font-size:12px}
  .wheel-scale{gap:2px}
  .wheel-btn{font-size:12px;padding:10px 0}
  .wheel-value{font-size:26px}
}

/* ===== キャリア提案 ===== */
.career-roles{display:flex;flex-direction:column;gap:14px}
.career-role-card{background:white;box-shadow:0 2px 8px rgba(15,26,58,0.06);padding:20px 24px;border-radius:6px;display:flex;gap:18px;align-items:flex-start;border-left:4px solid var(--orange)}
.career-role-num{font-family:Inter,sans-serif;font-size:36px;font-weight:800;color:var(--orange);line-height:1;flex-shrink:0;width:60px}
.career-role-content{flex:1}
.career-role-name{font-size:18px;font-weight:800;color:var(--navy);margin-bottom:6px}
.career-role-fit{font-size:13px;color:var(--gray-700);line-height:1.7;margin-bottom:10px;font-weight:500}
.career-role-detail{font-size:12px;color:var(--gray-700);line-height:1.7;margin-bottom:10px;background:var(--gray-50);padding:10px 14px;border-radius:3px}
.career-role-condition{font-size:11px;color:var(--green);line-height:1.6;margin-bottom:6px}
.career-role-warning{font-size:11px;color:var(--red);line-height:1.6}
.career-role-condition strong,.career-role-warning strong{font-weight:800;display:inline-block;margin-right:4px}

/* ===== 上司ダッシュボード ===== */
.manager-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:6px}
.manager-stat{background:white;box-shadow:0 2px 6px rgba(15,26,58,0.06);padding:14px 16px;border-top:3px solid var(--orange);border-radius:4px}
.manager-stat-label{font-size:9px;letter-spacing:2px;font-weight:700;color:var(--gray-500);margin-bottom:4px}
.manager-stat-value{font-family:Inter,sans-serif;font-size:24px;font-weight:800;color:var(--navy);line-height:1}
.manager-stat-sub{font-size:10px;color:var(--gray-500);margin-top:4px}

.manager-alerts{display:flex;flex-direction:column;gap:14px}
.manager-alert-card{background:white;box-shadow:0 4px 12px rgba(15,26,58,0.08);padding:20px 24px;border-radius:6px;border-left:4px solid var(--red)}
.manager-alert-head{display:flex;align-items:center;gap:12px;margin-bottom:12px;padding-bottom:10px;border-bottom:1px dashed var(--gray-200);flex-wrap:wrap}
.manager-alert-name{font-size:16px;font-weight:800;color:var(--navy)}
.manager-alert-tag{padding:3px 10px;font-size:10px;font-weight:800;letter-spacing:1px;color:white;border-radius:2px}
.manager-alert-meta{font-size:10px;color:var(--gray-500);margin-left:auto}
.manager-alert-duration{font-size:11px;font-weight:700;color:var(--orange);background:#fff5f0;padding:3px 10px;border-radius:2px}
.manager-intensity{display:flex;align-items:center;gap:10px;color:white;padding:8px 14px;border-radius:4px;margin-bottom:12px}
.manager-intensity-label{font-size:9px;letter-spacing:2px;font-weight:800;opacity:0.85;text-transform:uppercase}
.manager-intensity-value{font-size:14px;font-weight:800;letter-spacing:0.5px}
.manager-alert-trigger{background:var(--cream);padding:10px 14px;border-left:3px solid var(--orange);font-size:12px;color:var(--gray-700);margin-bottom:14px;line-height:1.6}
.manager-alert-advice{background:var(--gray-50);padding:14px 18px;border-radius:4px}
.advice-head{font-size:11px;letter-spacing:2px;font-weight:800;color:var(--orange);margin-bottom:10px}
.advice-body{display:flex;flex-direction:column;gap:10px}
.advice-section{}
.advice-label{font-size:10px;letter-spacing:1px;font-weight:800;color:var(--gray-500);margin-bottom:4px}
.advice-section.warn .advice-label{color:var(--red)}
.advice-text{font-size:12px;color:var(--gray-700);line-height:1.7}
.advice-list{list-style:none;padding:0;margin:0}
.advice-list li{font-size:11.5px;color:var(--gray-700);padding:3px 0 3px 18px;position:relative;line-height:1.6}
.advice-list li::before{content:'▸';position:absolute;left:0;color:var(--orange)}
.advice-section.warn .advice-list li::before{color:var(--red);content:'⚠'}

@media (max-width:600px){
  .manager-stats{grid-template-columns:1fr 1fr}
  .career-role-card{flex-direction:column;gap:10px}
  .career-role-num{width:auto}
}

/* ===== 個人診断レポート ===== */
.report-section{margin-bottom:28px}
.report-head{margin-bottom:14px}
.report-eyebrow{font-size:10px;letter-spacing:3px;font-weight:800;color:var(--orange);margin-bottom:4px}
.report-section h3{font-size:18px;color:var(--navy);font-weight:700;line-height:1.4;margin:0;padding-left:12px;border-left:4px solid var(--orange)}
.report-summary{background:var(--gray-50);padding:18px 22px;border-radius:6px;font-size:14px;line-height:1.9;color:var(--gray-700)}
.report-summary.insight{border-left:3px solid var(--orange);background:#fff8f4}
.report-list{display:flex;flex-direction:column;gap:8px}
.report-item{display:flex;gap:14px;align-items:flex-start;background:white;padding:14px 18px;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,0.04);border-left:3px solid var(--green)}
.report-item.warn{border-left-color:var(--red)}
.report-num{font-family:Inter,sans-serif;font-size:18px;font-weight:800;color:var(--green);min-width:28px;line-height:1.5}
.report-item.warn .report-num{color:var(--red)}
.report-text{font-size:13px;color:var(--gray-700);line-height:1.8;flex:1}
.report-compat{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.compat-card{padding:18px 20px;border-radius:6px;font-size:13px;line-height:1.7}
.compat-card.good{background:#ecfdf5;border-left:4px solid var(--green)}
.compat-card.hard{background:#fef2f2;border-left:4px solid var(--red)}
.compat-type{font-size:16px;font-weight:800;color:var(--navy);margin-bottom:8px}
.compat-why,.compat-approach{margin-bottom:8px;color:var(--gray-700)}
.compat-why strong,.compat-approach strong{color:var(--navy);font-weight:700;display:block;font-size:11px;letter-spacing:1px;margin-bottom:2px}

@media (max-width:600px){
  .report-compat{grid-template-columns:1fr}
  .report-section h3{font-size:16px}
  .report-summary{font-size:13px;padding:14px 16px}
}

/* ===== 診断結果 ===== */
.result-summary{background:white;padding:24px;border-radius:6px;margin-bottom:18px}
.result-block{display:flex;align-items:center;gap:14px;padding:12px 0}
.result-block.sub{opacity:0.85}
.result-tag{padding:3px 12px;font-size:10px;letter-spacing:2px;font-weight:800;color:white;border-radius:2px}
.result-name{font-size:18px;font-weight:700;color:var(--navy)}
.result-score{margin-left:auto;font-family:Inter,sans-serif;font-size:18px;font-weight:800;color:var(--gray-500)}
.result-chart{margin-top:18px;padding-top:18px;border-top:1px solid var(--gray-200)}
.chart-row{display:grid;grid-template-columns:80px 1fr 36px;gap:10px;align-items:center;margin-bottom:6px}
.chart-label{font-size:12px;font-weight:700;color:var(--navy)}
.chart-bar{height:18px;background:var(--gray-100);border-radius:3px;overflow:hidden}
.chart-fill{height:100%;border-radius:3px;transition:width .8s ease}
.chart-pct{font-size:11px;font-weight:700;color:var(--gray-500);text-align:right;font-family:Inter,sans-serif}

/* ===== セッション（チャット）：入力欄を画面下部固定 ===== */
#sec-session.active{display:flex;flex-direction:column;height:calc(100dvh - 110px);height:calc(100vh - 110px);padding-bottom:0;overflow:hidden}

.chat-container{display:flex;flex-direction:column;flex:1;min-height:0;background:white;border-radius:8px;box-shadow:0 4px 14px rgba(15,26,58,0.05);overflow:hidden}
.chat-messages{flex:1;min-height:0;overflow-y:auto;padding:18px 18px 6px 18px;-webkit-overflow-scrolling:touch}

/* 入力欄はチャットコンテナの一番下に固定（flexの末尾） */
.chat-input-wrap{flex-shrink:0;background:white;border-top:1px solid var(--gray-200);padding:12px 18px;margin:0;z-index:10}
.session-meta{flex-shrink:0;padding:8px 18px 12px;border-top:1px solid var(--gray-100);background:white}

.session-cascade-bottom{margin-top:18px;background:white;border-radius:8px;padding:14px 20px;box-shadow:0 4px 14px rgba(15,26,58,0.05);border-top:3px solid var(--orange)}
.session-cascade-bottom .cascade-mini{font-size:13px;color:var(--gray-700);padding:7px 0;line-height:1.6;display:flex;align-items:flex-start;gap:10px;border-bottom:1px solid var(--gray-100)}
.session-cascade-bottom .cascade-mini:last-child{border-bottom:none}
.session-cascade-bottom .cascade-mini .cascade-tag{flex-shrink:0;margin-top:2px}
.session-cascade-bottom .cascade-mini-text{font-weight:500;color:var(--gray-900)}
.session-cascade-bottom-title{font-size:10px;letter-spacing:3px;font-weight:800;color:var(--orange);margin-bottom:6px}

.msg{display:flex;gap:10px;margin-bottom:14px;animation:slideIn .25s ease}
@keyframes slideIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.msg-avatar{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex-shrink:0;font-family:serif}
.msg-user .msg-avatar{background:var(--orange);color:white}
.msg-assistant .msg-avatar{background:var(--navy);color:white}
.msg-bubble{padding:10px 14px;border-radius:6px;font-size:14px;line-height:1.7;max-width:85%;color:var(--gray-900)}
.msg-user .msg-bubble{background:#fff5f0;border:1px solid #ffd9c4}
.msg-assistant .msg-bubble{background:var(--gray-50);border:1px solid var(--gray-200)}
.msg.loading .msg-bubble{color:var(--gray-400);font-style:italic}
.cursor{display:inline-block;width:8px;color:var(--orange);font-weight:bold;animation:blink 1s steps(2,start) infinite;margin-left:1px}
@keyframes blink{to{visibility:hidden}}

.chat-input-wrap{display:flex;gap:8px;align-items:flex-end}
.chat-input-wrap textarea{flex:1;padding:12px 14px;border:1px solid var(--gray-200);border-radius:6px;font-family:inherit;font-size:16px;line-height:1.6;resize:none;min-height:48px;max-height:140px}
.chat-input-wrap textarea:focus{outline:none;border-color:var(--orange);box-shadow:0 0 0 3px rgba(255,107,53,0.1)}
.chat-input-wrap .btn{padding:12px 18px;font-size:14px;flex-shrink:0;min-height:48px}

.session-meta{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:var(--gray-400)}

/* ===== セッション終了画面 ===== */
.session-end-card{background:white;padding:32px;border-radius:8px;box-shadow:0 4px 14px rgba(15,26,58,0.05)}
.session-end-card h2{font-size:22px;color:var(--navy);margin-bottom:20px}
.end-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px}
.end-item{padding:14px 18px;background:var(--gray-50);border-radius:4px;border-left:3px solid var(--orange)}
.end-item.full{grid-column:1/-1}
.end-item.commit{background:var(--navy);color:white;border-left-color:var(--orange)}
.end-item.commit .end-label{color:var(--orange-light)}
.end-label{font-size:10px;letter-spacing:2px;color:var(--gray-500);font-weight:700;margin-bottom:6px}
.end-value{font-size:14px;color:var(--navy);font-weight:600;line-height:1.6}
.end-value.score{font-size:28px;font-family:Inter,sans-serif;font-weight:800;color:var(--orange)}
.end-value.sub{font-size:13px;color:var(--gray-700);font-weight:500}
.end-unit{font-size:14px;color:var(--gray-400)}
.end-item.commit .end-value{color:white}
.end-item.advice{background:linear-gradient(135deg, #fff8f4 0%, #ffeadb 100%);border-left:3px solid var(--orange);padding:18px 22px}
.end-item.advice .end-label{color:var(--orange);font-weight:800}
.end-item.advice .end-value{color:var(--navy);font-weight:500;line-height:1.9;font-size:13.5px}

.end-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;align-items:center}
.end-actions .btn-text{margin-left:auto}

/* ===== 30日グラフ ===== */
.score-chart{background:white;padding:18px 20px;border-radius:6px;border:1px solid var(--gray-200);margin-bottom:14px}
.score-chart-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.score-chart-title{font-size:12px;letter-spacing:2px;font-weight:800;color:var(--gray-500)}
.score-chart-stats{display:flex;gap:14px;font-size:11px;color:var(--gray-500)}
.score-chart-stats strong{color:var(--orange);font-family:Inter,sans-serif;font-size:14px;font-weight:800}
.score-chart svg{width:100%;height:160px;display:block}
.score-chart-empty{padding:40px;text-align:center;color:var(--gray-400);font-size:12px;font-style:italic}

/* ===== 履歴 ===== */
#sec-history h2{font-size:22px;color:var(--navy);margin-bottom:18px}
.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:24px}
.stat-item{background:white;padding:18px 20px;border-radius:6px;border-top:3px solid var(--orange)}
.stat-label{font-size:10px;letter-spacing:2px;color:var(--gray-500);font-weight:700;margin-bottom:6px}
.stat-value{font-family:Inter,sans-serif;font-size:28px;font-weight:800;color:var(--navy);line-height:1}
.stat-unit{font-size:14px;color:var(--gray-400);font-weight:500}

.history-list{margin-bottom:20px}
.history-item{background:white;padding:14px 18px;border-radius:4px;margin-bottom:8px;border-left:3px solid var(--gray-200)}
.history-date{font-family:Inter,sans-serif;font-size:11px;color:var(--gray-500);font-weight:700;margin-bottom:4px}
.history-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.history-score{background:var(--orange);color:white;padding:2px 8px;font-size:11px;font-weight:700;border-radius:2px}
.history-goal{font-size:13px;color:var(--gray-700)}
.history-commit{margin-top:6px;padding-top:6px;border-top:1px dashed var(--gray-200);font-size:12px;color:var(--navy);font-weight:600}
.history-advice{margin-top:8px;padding:8px 12px;background:#fff8f4;border-left:3px solid var(--orange);font-size:11px;color:var(--gray-700);line-height:1.6}

/* ===== ホーム拡張 ===== */
#homeChart{margin-bottom:18px}
.cascade-display-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.btn-tiny{padding:4px 10px;font-size:11px}
.home-actions{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.home-actions .btn-text{flex:1;min-width:90px}

/* ===== 今週のサマリカード ===== */
.weekly-card{background:linear-gradient(135deg,#fff8f4 0%,#ffeadb 100%);border-left:4px solid var(--orange)}
.weekly-card .card-title{color:var(--orange)}
#weeklyContent{font-size:13px;color:var(--navy);line-height:1.8;font-weight:500}
.weekly-empty{font-size:12px;color:var(--gray-500);font-style:italic}

/* ===== モーダル ===== */
.modal{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:flex;align-items:center;justify-content:center;animation:fadeIn .2s ease}
.modal-backdrop{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(15,26,58,0.5);backdrop-filter:blur(2px)}
.modal-card{position:relative;background:white;border-radius:8px;padding:28px 32px;max-width:560px;width:calc(100% - 40px);max-height:90vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,0.2);z-index:1}
.modal-card h3{font-size:18px;color:var(--navy);margin-bottom:8px}
.modal-desc{font-size:12px;color:var(--gray-500);margin-bottom:18px;line-height:1.7}

/* ===== フォームセクション ===== */
.form-section{margin-bottom:18px;padding:14px 18px;background:var(--gray-50);border-radius:6px}
.form-section-title{font-size:12px;font-weight:700;color:var(--navy);margin-bottom:10px;display:flex;align-items:center;gap:8px}

/* ===== タイプ図書館 ===== */
.section-desc{font-size:13px;color:var(--gray-500);margin-bottom:18px;line-height:1.7}
.type-tabs{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-bottom:14px}
.type-tab{padding:12px 8px;background:white;border:2px solid var(--gray-200);border-radius:6px;cursor:pointer;text-align:center;transition:all .15s;font-family:inherit}
.type-tab.active{border-color:var(--orange);background:var(--orange);color:white}
.type-tab .tab-letter{font-size:18px;font-weight:800;font-family:Inter,sans-serif;display:block}
.type-tab .tab-name{font-size:11px;font-weight:700;display:block;margin-top:2px}
.type-tab.active .tab-name{color:white}

.type-detail-card{background:white;padding:24px 28px;border-radius:8px;margin-bottom:14px;box-shadow:0 4px 14px rgba(15,26,58,0.05)}
.type-detail-head{display:flex;align-items:center;gap:14px;margin-bottom:14px;padding-bottom:14px;border-bottom:2px solid var(--gray-100)}
.type-detail-letter{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:white;font-size:20px;font-weight:800;font-family:Inter,sans-serif;flex-shrink:0}
.type-detail-name{font-size:22px;font-weight:700;color:var(--navy)}
.type-detail-en{font-size:11px;color:var(--gray-400);letter-spacing:2px;font-family:Inter,sans-serif}
.type-detail-desc{font-size:14px;color:var(--gray-700);line-height:1.8;margin-bottom:14px}

.type-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.type-block{padding:14px 16px;background:var(--gray-50);border-radius:4px;border-left:3px solid var(--navy)}
.type-block.strength{border-color:var(--green)}
.type-block.weakness{border-color:var(--red)}
.type-block.role{border-color:var(--orange)}
.type-block.growth{border-color:var(--gold)}
.type-block h4{font-size:11px;letter-spacing:2px;font-weight:800;color:var(--gray-500);margin-bottom:8px}
.type-block ul{list-style:none;padding:0;margin:0}
.type-block li{font-size:12.5px;color:var(--gray-700);padding:3px 0 3px 14px;position:relative;line-height:1.6}
.type-block li::before{content:'▸';position:absolute;left:0;color:var(--orange)}

.you-badge{display:inline-block;background:var(--orange);color:white;font-size:10px;font-weight:800;padding:3px 9px;border-radius:2px;letter-spacing:2px;margin-left:8px}

/* ===== 相性マトリクス ===== */
.compat-matrix{background:white;padding:16px 18px;border-radius:6px;border:1px solid var(--gray-200);margin-top:10px;overflow-x:auto}
.compat-matrix table{width:100%;border-collapse:collapse;font-size:11px}
.compat-matrix th, .compat-matrix td{padding:8px 10px;border:1px solid var(--gray-200);vertical-align:top;text-align:left;line-height:1.5}
.compat-matrix th{background:var(--navy);color:white;font-weight:700;font-size:11px;letter-spacing:1px;text-align:center}
.compat-matrix th.you-col{background:var(--orange)}
.compat-matrix .row-label{background:var(--gray-50);font-weight:700;color:var(--navy);font-size:11px;text-align:center;width:80px}
.compat-matrix td.same{background:var(--gray-100);color:var(--gray-400);font-style:italic;text-align:center}
.compat-matrix .compat-tip{font-size:10.5px;color:var(--gray-700);line-height:1.6}
.empty{padding:40px;text-align:center;color:var(--gray-400);font-style:italic}

/* ===== レスポンシブ ===== */
@media (max-width: 600px){
  .shell{padding:14px 12px 0;max-width:100%}
  .hero{padding:32px 24px}
  .hero h1{font-size:20px}
  .end-grid{grid-template-columns:1fr}
  .stat-grid{grid-template-columns:1fr 1fr 1fr;gap:6px}
  .stat-item{padding:12px}
  .stat-value{font-size:22px}
  .scale{gap:3px}
  .scale-btn{padding:9px 2px}
  .chart-row{grid-template-columns:60px 1fr 30px}
  .msg-bubble{max-width:90%;font-size:14px}

  /* セッション画面：モバイルでも入力欄が常に画面下部に */
  #sec-session.active{height:calc(100dvh - 80px);height:calc(100vh - 80px)}
  .chat-container{border-radius:6px}
  .chat-messages{padding:14px 14px 6px}
  .chat-input-wrap{padding:10px 14px}
  .session-meta{padding:6px 14px 10px}
  .session-cascade-bottom{display:none}
}

/* ============ 組織図（Org Chart） ============ */
.org-tree, .org-children { list-style:none; padding:0; margin:0; }
.org-tree { display:flex; flex-direction:column; gap:14px; }
.org-children { margin-left:28px; padding-left:18px; border-left:2px dashed #d1d5db; margin-top:10px; display:flex; flex-direction:column; gap:10px; }
.org-node { display:flex; flex-direction:column; }
.org-card { background:white; border:1px solid #e2e8f0; border-left:4px solid #94a3b8; border-radius:6px; padding:11px 14px; box-shadow:0 1px 2px rgba(0,0,0,0.04); transition:all .15s; }
.org-card:hover { box-shadow:0 4px 12px rgba(0,0,0,0.08); transform:translateY(-1px); }
.org-card-me { background:#fff7ed; box-shadow:0 0 0 2px #ff6b35 inset, 0 1px 2px rgba(0,0,0,0.04); }
.org-card-dim { opacity:0.65; background:#fafafa; }
.org-card-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:4px; }
.org-name { font-size:14px; font-weight:800; color:#1a2851; }
.org-me-badge { background:#ff6b35; color:white; font-size:9px; padding:2px 6px; border-radius:3px; margin-left:4px; vertical-align:middle; letter-spacing:1px; font-weight:800; }
.org-role { font-size:10px; font-weight:800; letter-spacing:1.5px; }
.org-dep { font-size:11px; color:#64748b; margin-bottom:5px; }
.org-meta { display:flex; gap:8px; flex-wrap:wrap; align-items:center; font-size:10px; }
.org-tag-type { background:#f1f5f9; color:#334155; padding:2px 8px; border-radius:3px; font-weight:700; letter-spacing:1px; }
.org-tag-active { color:#94a3b8; padding:2px 6px; }

.org-role-wrap { display:flex; align-items:center; gap:6px; }
.org-title { font-size:11px; font-weight:700; color:#334155; background:#fff7ed; padding:2px 8px; border-radius:3px; border:1px solid #fed7aa; }
.org-reports-badge { background:#1a2851; color:white; font-size:9px; padding:2px 7px; border-radius:3px; font-weight:800; letter-spacing:1px; }

/* ====== WAI-SR スケール ====== */
.waisr-scale { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.waisr-scale button { flex:1; min-width:36px; max-width:50px; padding:10px 0; background:white; border:2px solid #e2e8f0; border-radius:6px; font-weight:700; font-size:14px; color:#334155; cursor:pointer; transition:all .15s; }
.waisr-scale button:hover { border-color:#ff6b35; background:#fff7ed; }
.waisr-scale button.selected { background:#ff6b35; border-color:#ff6b35; color:white; }

/* ====== ナラティブ ====== */
#narrativeList { display:flex; flex-direction:column; gap:12px; }
.narrative-row { background:white; border:1px solid #e2e8f0; border-radius:6px; padding:14px 16px; cursor:pointer; transition:all .15s; }
.narrative-row:hover { box-shadow:0 4px 12px rgba(0,0,0,0.08); transform:translateY(-1px); }
.narrative-row-month { font-weight:800; color:#1a2851; font-size:14px; }
.narrative-row-stage { font-size:12px; color:#64748b; margin-top:4px; }
.narrative-row-snippet { font-size:13px; color:#334155; margin-top:8px; line-height:1.6; }

/* ====== WAI-SR 履歴 ====== */
#waisrHistory { display:flex; flex-direction:column; gap:10px; }
.waisr-row { display:grid; grid-template-columns:auto 1fr 1fr 1fr; gap:14px; padding:10px 14px; background:#f8fafc; border-radius:6px; align-items:center; font-size:13px; }
.waisr-row-date { font-weight:700; color:#1a2851; }
.waisr-row-label { color:#64748b; font-size:11px; }
.waisr-row-value { font-weight:700; color:#ff6b35; }

/* ====== バトンタッチ・オファーカード ====== */
.handover-offer-card { background:linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%); border:1px solid #fed7aa; border-left:4px solid #ff6b35; }
.handover-offer-card .card-title { color:#1a2851; }
.handover-offer-card .card-desc { color:#374151; line-height:1.8; }

/* ====== 前向き度診断 ====== */
.readiness-question { background:white; border:1px solid #e2e8f0; border-radius:6px; padding:18px 20px; margin-bottom:18px; }
.readiness-question .rq-label { font-size:12px;font-weight:800;letter-spacing:2px;color:#64748b;margin-bottom:8px }
.readiness-question .rq-poles { display:flex; justify-content:space-between; font-size:11px; color:#94a3b8; margin-bottom:6px }
.readiness-question .rq-scale { display:flex; gap:8px; margin-bottom:14px }
.readiness-question .rq-scale button { flex:1; padding:10px 0; background:white; border:2px solid #e2e8f0; border-radius:6px; font-weight:700; font-size:14px; color:#334155; cursor:pointer; transition:all .15s }
.readiness-question .rq-scale button:hover { border-color:#ff6b35; background:#fff7ed }
.readiness-question .rq-scale button.selected { background:#ff6b35; border-color:#ff6b35; color:white }
.readiness-question .rq-textlabel { font-size:12px; font-weight:700; color:#334155; margin-bottom:6px }
.readiness-question textarea { width:100%; padding:10px; border:1px solid #cbd5e1; border-radius:6px; font-size:14px; min-height:80px; resize:vertical }
.readiness-question .rq-counter { text-align:right; font-size:11px; color:#94a3b8; margin-top:4px }

/* ====== コーチカード ====== */
.coach-card { display:flex; align-items:flex-start; gap:14px; background:white; border:1px solid #e2e8f0; border-radius:8px; padding:14px 16px; cursor:pointer; margin-bottom:10px; transition:all .15s }
.coach-card:hover { box-shadow:0 4px 12px rgba(0,0,0,0.08); transform:translateY(-1px); border-color:#ff6b35 }
.coach-card-recommended { border-left:4px solid #ff6b35; background:linear-gradient(135deg,#fff7ed 0%,#fffbeb 100%) }
.coach-avatar { width:56px; height:56px; border-radius:50%; background:#f1f5f9; display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:800; color:#94a3b8; flex-shrink:0 }
.coach-avatar.male { background:#dbeafe; color:#1e40af }
.coach-avatar.female { background:#fce7f3; color:#9d174d }
.coach-meta { flex:1 }
.coach-name { font-size:15px; font-weight:800; color:#1a2851; margin-bottom:2px }
.coach-subline { font-size:11px; color:#64748b; margin-bottom:6px }
.coach-tagline { font-size:13px; color:#334155; line-height:1.5; margin-bottom:8px }
.coach-bars { display:flex; gap:10px; font-size:11px; color:#64748b }
.coach-bars span strong { color:#1a2851; font-weight:800 }

/* ====== コーチプロフィール詳細モーダル ====== */
#coachProfileContent .cp-head { display:flex; gap:16px; align-items:center; margin-bottom:14px }
#coachProfileContent .cp-name { font-size:18px; font-weight:800; color:#1a2851 }
#coachProfileContent .cp-tagline { font-size:14px; color:#334155; margin:14px 0; padding:14px; background:#f8fafc; border-radius:6px; border-left:3px solid #ff6b35; line-height:1.7 }
#coachProfileContent .cp-intro { font-size:13px; color:#334155; line-height:1.8; margin-bottom:14px }
#coachProfileContent .cp-stats { display:grid; grid-template-columns:1fr 1fr; gap:10px; font-size:12px; color:#64748b }
#coachProfileContent .cp-stats div { background:#f8fafc; padding:8px 12px; border-radius:6px }
#coachProfileContent .cp-stats strong { color:#1a2851; font-weight:800 }

/* ====== コーチ＋共鳴度パネル ====== */
.coach-resonance-panel { display:flex; align-items:center; gap:20px; padding:16px 18px; background:linear-gradient(135deg,#fff7ed 0%,#fffbeb 100%); border:1px solid #fed7aa; border-radius:8px; margin-bottom:18px }
.crp-coach { display:flex; gap:12px; align-items:center; flex-shrink:0 }
.crp-coach .coach-avatar { width:52px; height:52px; font-size:20px }
.crp-coach-info { display:flex; flex-direction:column }
.crp-coach-name { font-size:14px; font-weight:800; color:#1a2851 }
.crp-coach-tag { font-size:11px; color:#64748b }
.crp-resonance { flex:1 }
.crp-resonance-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px }
.crp-resonance-label { font-size:10px; font-weight:800; letter-spacing:2px; color:#64748b }
.crp-milestone { font-size:12px; font-weight:800; color:#ff6b35 }
.crp-bar-wrap { width:100%; height:8px; background:#fed7aa; border-radius:4px; overflow:hidden }
.crp-bar-fill { height:100%; background:linear-gradient(90deg,#ff6b35,#ff8c5a); border-radius:4px; transition:width .4s ease }
.crp-resonance-meta { display:flex; justify-content:space-between; align-items:baseline; margin-top:6px }
.crp-resonance-meta #crpResonanceValue { font-size:14px; font-weight:800; color:#1a2851 }
.crp-subtitle { font-size:11px; color:#64748b; font-style:italic }

@media (max-width: 640px) {
  .coach-resonance-panel { flex-direction:column; align-items:stretch }
  .crp-coach { gap:10px }
  .crp-resonance { width:100% }
}

/* セッション終了画面の共鳴度通知 */
.resonance-toast { background:linear-gradient(135deg,#fff7ed,#fffbeb); border:1px solid #fed7aa; border-left:4px solid #ff6b35; padding:14px 18px; border-radius:6px; margin-top:14px }
.resonance-toast-title { font-size:12px; font-weight:800; color:#64748b; letter-spacing:2px; margin-bottom:6px }
.resonance-toast-value { font-size:18px; font-weight:800; color:#1a2851 }
.resonance-toast-delta { color:#ff6b35; font-weight:800; margin-left:8px }
.resonance-toast-sub { font-size:12px; color:#64748b; margin-top:6px }

/* ====== 未診断ユーザー誘導カード ====== */
.needs-readiness-card { background:linear-gradient(135deg,#1a2851 0%,#2a3a6a 100%); color:white; border:none }
.needs-readiness-card .card-title { color:white; font-size:16px }
.needs-readiness-card .card-desc { color:#e2e8f0; line-height:1.8 }
.needs-readiness-card .card-desc strong { color:#ff9966 }
.needs-readiness-card .btn-primary { background:#ff6b35; color:white }

/* ====== 固定セッション終了ボタン（15分超え時表示） ====== */
.floating-end-btn { position:fixed; bottom:24px; right:24px; z-index:1000; background:#dc2626; color:white; border:none; padding:14px 22px; border-radius:8px; font-size:14px; font-weight:800; cursor:pointer; box-shadow:0 6px 24px rgba(220,38,38,0.4); transition:all .15s }
.floating-end-btn:hover { background:#b91c1c; transform:translateY(-2px); box-shadow:0 8px 30px rgba(220,38,38,0.5) }
@media (max-width: 640px) { .floating-end-btn { bottom:16px; right:16px; padding:12px 18px; font-size:13px } }
