@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=DM+Mono:wght@400;500&family=Zen+Kaku+Gothic+New:wght@700;900&display=swap");
/* ============================================================
   リセット・カラー変数（画面共通）
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #0b0d13;
  --s1: #131620;
  --s2: #191c2a;
  --s3: #1f2235;
  --bd: #252840;
  --txt: #e2e5f2;
  --mut: #606880;
  --ac: #5b8ef5;
  --gr: #4dc98a;
  --am: #f0ba45;
  --re: #f05555;
  --pu: #8f55f5;
  --te: #45d4c9;
  --or: #f07a45;
}
body {
  font-family: "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
}
/* ============================================================
   画面切替 — s1/s2/s3 は .active が付いた1枚だけを表示する
   ============================================================ */
.screen {
  display: none;
  min-height: 100vh;
}
.screen.active {
  display: flex;
  flex-direction: column;
}
/* ============================================================
   s1: モード選択（現状を知る / ゴールから逆算する）
   ============================================================ */
.mode-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.2rem;
}
.mode-inner {
  width: 100%;
  max-width: 540px;
}
.logo {
  text-align: center;
  margin-bottom: 2.5rem;
}
.logo h1 {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(1.1rem, 5vw, 1.7rem);
  font-weight: 900;
  line-height: 1.3;
}
.logo h1 em {
  color: var(--ac);
  font-style: normal;
}
.logo p {
  font-size: 0.7rem;
  color: var(--mut);
  margin-top: 0.4rem;
  letter-spacing: 0.05em;
}
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 440px) {
  .mode-grid {
    grid-template-columns: 1fr;
  }
}
.mc {
  background: var(--s2);
  border: 1.5px solid var(--bd);
  border-radius: 14px;
  padding: 1.6rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.mc:hover {
  border-color: var(--ac);
  transform: translateY(-2px);
  background: var(--s3);
}
.mc.goal-mc:hover {
  border-color: var(--am);
}
.mc-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.6rem;
}
.mc-tag {
  font-family: "DM Mono", monospace;
  font-size: 0.57rem;
  color: var(--ac);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.goal-mc .mc-tag {
  color: var(--am);
}
.mc-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  line-height: 1.3;
}
.mc-desc {
  font-size: 0.66rem;
  color: var(--mut);
  line-height: 1.6;
}
/* ============================================================
   s2: ゴールウィザード（優先度・希望年収・働き方の3問）
   ============================================================ */
.goal-wrap {
  flex: 1;
  padding: 1.5rem 1.2rem 3rem;
  overflow-y: auto;
}
.goal-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.step-nav {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.back-btn {
  background: none;
  border: 1px solid var(--bd);
  border-radius: 6px;
  color: var(--mut);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.67rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}
.back-btn:hover {
  border-color: var(--ac);
  color: var(--ac);
}
.step-dots {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
}
.sdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bd);
}
.sdot.on {
  background: var(--ac);
  width: 18px;
  border-radius: 3px;
}
.step-hd {
  text-align: center;
}
.step-badge {
  font-family: "DM Mono", monospace;
  font-size: 0.59rem;
  color: var(--ac);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.step-title {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(0.95rem, 3.5vw, 1.3rem);
  font-weight: 700;
  line-height: 1.4;
}
.step-sub {
  font-size: 0.7rem;
  color: var(--mut);
  margin-top: 0.3rem;
}
.q-lbl {
  font-size: 0.71rem;
  font-weight: 500;
  color: var(--mut);
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.q-lbl::before {
  content: "Q";
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  background: var(--ac);
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
}
.prio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
@media (max-width: 340px) {
  .prio-grid {
    grid-template-columns: 1fr;
  }
}
.pb {
  background: var(--s2);
  border: 1.5px solid var(--bd);
  border-radius: 10px;
  padding: 0.7rem 0.65rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.71rem;
  font-weight: 500;
  color: var(--txt);
}
.pb:hover {
  border-color: var(--ac);
}
.pb.sel {
  border-color: var(--ac);
  background: #5b8ef514;
  color: var(--ac);
}
.pb-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}
.sal-box {
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 1rem;
}
.sal-num {
  font-family: "DM Mono", monospace;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ac);
  text-align: center;
  margin-bottom: 0.65rem;
}
.sal-num span {
  font-size: 0.72rem;
  color: var(--mut);
  font-family: "Noto Sans JP", sans-serif;
}
input[type="range"].sr {
  width: 100%;
  -webkit-appearance: none;
  height: 5px;
  background: var(--bd);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
input[type="range"].sr::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ac);
  cursor: pointer;
  box-shadow: 0 0 0 3px #5b8ef530;
}
/* 年収スライダーの目盛り。space-between だと文字の幅で位置が決まり、つまみの実位置とずれる。
   各目盛りを実値の位置に絶対配置し、中央揃えでつまみに合わせる（left は index.html 側で指定）。 */
.sal-marks {
  position: relative;
  height: 1.1em;
  font-family: "DM Mono", monospace;
  font-size: 0.57rem;
  color: var(--mut);
  margin-top: 0.3rem;
}
.sal-marks span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}
.wt-grid {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.wb {
  flex: 1;
  min-width: 90px;
  background: var(--s2);
  border: 1.5px solid var(--bd);
  border-radius: 8px;
  padding: 0.6rem 0.5rem;
  cursor: pointer;
  text-align: center;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.7rem;
  transition: all 0.18s;
  line-height: 1.4;
  color: var(--txt);
}
.wb:hover {
  border-color: var(--ac);
}
.wb.sel {
  border-color: var(--ac);
  background: #5b8ef514;
  color: var(--ac);
  font-weight: 500;
}
.wb-icon {
  font-size: 1.05rem;
  display: block;
  margin-bottom: 2px;
}
.next-btn {
  width: 100%;
  background: var(--ac);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.72rem;
  cursor: pointer;
  transition: background 0.15s;
}
.next-btn:hover {
  background: #4a7de0;
}
.next-btn:disabled {
  background: var(--bd);
  color: var(--mut);
  cursor: not-allowed;
}
/* ============================================================
   s3: 上部バーと2カラムレイアウト
   ============================================================ */
.info-topbar {
  background: var(--s2);
  border-bottom: 1px solid var(--bd);
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.info-topbar h2 {
  font-size: 0.8rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.run-btn {
  background: var(--am);
  border: none;
  border-radius: 6px;
  color: #000;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.run-btn:hover {
  background: #e0a835;
}
.info-body {
  display: grid;
  grid-template-columns: 290px 1fr;
  flex: 1;
  min-height: 0;
}
@media (max-width: 760px) {
  .info-body {
    grid-template-columns: 1fr;
  }
}

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=DM+Mono:wght@400;500&display=swap");
/* ============================================================
   ⚠ 以下のリセット・変数・body は上のブロックと重複している。
   （`*` リセットと `:root` は完全に同一。`body` は overflow-x の指定が無いだけで、
     他プロパティは同値なので上書きしても結果は変わらない）
   元のHTMLが2つのスタイル定義を貼り合わせた名残と思われる。消しても表示は変わらないはずだが、
   確認のうえ別途整理する。
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #0b0d13;
  --s1: #131620;
  --s2: #191c2a;
  --s3: #1f2235;
  --bd: #252840;
  --txt: #e2e5f2;
  --mut: #606880;
  --ac: #5b8ef5;
  --gr: #4dc98a;
  --am: #f0ba45;
  --re: #f05555;
  --pu: #8f55f5;
  --te: #45d4c9;
  --or: #f07a45;
}
body {
  font-family: "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
}
/* ============================================================
   s3: サイドバー（入力フォーム）とメイン（チャート）のグリッド
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 310px 1fr;
  min-height: 100vh;
}
@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }
}
.sb {
  background: var(--s1);
  border-right: 1px solid var(--bd);
  overflow-y: auto;
  max-height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
}
.sb-logo {
  padding: 1rem;
  border-bottom: 1px solid var(--bd);
}
.sb-logo h1 {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
}
.sb-logo h1 em {
  color: var(--ac);
  font-style: normal;
}
.sb-logo p {
  font-family: "DM Mono", monospace;
  font-size: 0.54rem;
  color: var(--mut);
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.sb-inner {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}
/* ============================================================
   入力フォームの部品（セクション見出し・ラベル付き入力・在籍バッジ）
   ============================================================ */
.sec {
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 0.75rem;
}
.sec-t {
  font-size: 0.58rem;
  font-family: "DM Mono", monospace;
  color: var(--mut);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sec-t::before {
  content: "";
  width: 3px;
  height: 9px;
  border-radius: 2px;
  background: var(--ac);
  flex-shrink: 0;
}
.f {
  margin-bottom: 0.5rem;
}
.f:last-child {
  margin-bottom: 0;
}
.f label {
  display: block;
  font-size: 0.64rem;
  color: var(--mut);
  margin-bottom: 2px;
}
.f select,
.f input[type="number"] {
  width: 100%;
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 5px;
  color: var(--txt);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.71rem;
  padding: 5px 8px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.f select:focus,
.f input[type="number"]:focus {
  border-color: var(--ac);
}
.f select option {
  background: var(--s2);
}
.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.tbadge {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 0.62rem;
  color: var(--mut);
  line-height: 1.75;
}
.tbadge strong {
  color: var(--ac);
  font-weight: 500;
}
.tg {
  color: var(--gr);
}
.tw {
  color: var(--am);
}
.td {
  color: var(--re);
}
/* ============================================================
   カード共通 — 転職ステージと副業で同じ見た目を使う
   .open が付くと本文(.card-body)が開く。付け外しは Alpine が :class で行う
   ============================================================ */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.card {
  border: 1px solid var(--bd);
  border-radius: 7px;
  overflow: hidden;
}
.card.open {
  border-color: var(--ac);
}
.card-hd {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  background: var(--s1);
  cursor: pointer;
  user-select: none;
}
.card-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.card-lbl {
  font-size: 0.67rem;
  font-weight: 500;
  flex: 1;
  line-height: 1.3;
}
.card-age {
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  color: var(--mut);
}
.card-del {
  background: none;
  border: none;
  color: var(--mut);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1;
}
.card-del:hover {
  color: var(--re);
}
.card-body {
  padding: 8px 9px;
  background: var(--s2);
  display: none;
  flex-direction: column;
  gap: 6px;
}
.card-body.open {
  display: flex;
}
/* ============================================================
   転職先の選択ボタン — :disabled はサーバが返す転職可否(dests[].ok)で決まる
   ============================================================ */
.dest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.db {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 5px;
  padding: 5px 4px;
  font-size: 0.6rem;
  font-family: "Noto Sans JP", sans-serif;
  color: var(--mut);
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: all 0.15s;
}
.db:hover:not(:disabled) {
  border-color: var(--ac);
  color: var(--ac);
}
.db.sel {
  color: #fff;
  border-color: transparent;
}
.db:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.db .dr {
  display: block;
  font-size: 0.5rem;
  margin-top: 1px;
  line-height: 1.2;
  opacity: 0.8;
}
.add-btn {
  width: 100%;
  background: none;
  border: 1px dashed var(--bd);
  border-radius: 7px;
  color: var(--mut);
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.67rem;
  padding: 8px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 0.4rem;
}
.add-btn:hover {
  border-color: var(--ac);
  color: var(--ac);
}
/* ============================================================
   転職ステージの編集パネル（事業会社の部門・職位クラス、FAS入社職位のプレビュー）
   ============================================================ */
.co-box {
  margin-top: 4px;
  padding: 7px;
  background: var(--s1);
  border-radius: 6px;
  border: 1px solid var(--bd);
}
.role-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}
.rb {
  font-size: 0.59rem;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--bd);
  background: var(--s2);
  color: var(--mut);
  transition: all 0.15s;
  white-space: nowrap;
}
.rb.sel {
  background: var(--ac);
  border-color: var(--ac);
  color: #fff;
}
.rb:hover:not(.sel) {
  border-color: var(--ac);
  color: var(--ac);
}
.preview-box {
  font-size: 0.61rem;
  margin-top: 5px;
  padding: 4px 7px;
  background: var(--s2);
  border-radius: 4px;
  color: var(--mut);
}
.preview-box strong {
  color: var(--ac);
}
/* 転職ステージカード内の表示要素（旧 renderStages のインラインstyleをクラス化） */
.stage-role {
  font-size: 0.6rem;
  color: var(--mut);
  padding: 2px 0;
}
.cf-auto {
  font-size: 0.6rem;
  color: var(--am);
  padding: 3px 5px;
  background: var(--s2);
  border-radius: 4px;
  margin-bottom: 4px;
}
.cf-auto.ng {
  color: var(--re);
}
.role-hd {
  font-size: 0.59rem;
  color: var(--mut);
  margin-bottom: 3px;
}
.rb.reset {
  color: var(--re);
  border-color: var(--re);
}
.c-ac {
  color: var(--ac);
}
.c-am {
  color: var(--am);
}
.c-gr {
  color: var(--gr);
}
/* 副業カード内の表示要素（旧 renderSides のインラインstyleをクラス化） */
/* ============================================================
   副業カードの編集パネル（兼任可否の警告・実施期間・単価）
   ============================================================ */
.side-warn {
  font-size: 0.6rem;
  padding: 4px 6px;
  border-radius: 4px;
  border-left: 2px solid;
  margin-bottom: 3px;
  color: var(--am);
  background: #f0ba4510;
  border-color: var(--am);
}
.side-warn.ng {
  color: var(--re);
  background: #f0555510;
  border-color: var(--re);
}
.side-period {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
}
.side-period span {
  font-size: 0.64rem;
  color: var(--mut);
  text-align: center;
}
.side-prev {
  font-size: 0.61rem;
  padding: 4px 7px;
  background: var(--s2);
  border-radius: 4px;
  color: var(--mut);
}
/* ============================================================
   メイン領域 — 条件チップ、表示切替、年収チャート、警告リスト、サマリー
   ============================================================ */
.mn {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
}
.mn-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chip {
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: 14px;
  padding: 2px 8px;
  font-size: 0.6rem;
  color: var(--mut);
}
.chip span {
  color: var(--txt);
  font-weight: 500;
}
.vtgl {
  display: flex;
  gap: 3px;
}
.vb {
  font-size: 0.62rem;
  font-family: "Noto Sans JP", sans-serif;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid var(--bd);
  background: transparent;
  color: var(--mut);
  cursor: pointer;
  transition: all 0.15s;
}
.vb.on {
  background: var(--ac);
  border-color: var(--ac);
  color: #fff;
}
.chart-card {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}
.chart-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ac), var(--te) 60%, transparent);
}
.chart-wrap {
  position: relative;
  height: 310px;
}
.path-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}
.pc {
  font-size: 0.58rem;
  padding: 2px 7px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.alerts {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.al {
  font-size: 0.63rem;
  padding: 6px 10px;
  border-radius: 5px;
  line-height: 1.5;
  border-left: 3px solid;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.al i {
  flex-shrink: 0;
  font-style: normal;
}
.ali {
  color: var(--ac);
  background: #5b8ef510;
  border-color: var(--ac);
}
.alw {
  color: var(--am);
  background: #f0ba4510;
  border-color: var(--am);
}
.ald {
  color: var(--re);
  background: #f0555510;
  border-color: var(--re);
}
.alg {
  color: var(--gr);
  background: #4dc98a10;
  border-color: var(--gr);
}
.sg {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}
.sc {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 7px;
  padding: 8px 10px;
}
.sc-l {
  font-size: 0.58rem;
  color: var(--mut);
  margin-bottom: 2px;
  line-height: 1.4;
}
.sc-v {
  font-family: "DM Mono", monospace;
  font-size: 0.9rem;
  font-weight: 500;
}
.side-tl {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--bd);
}
.side-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.58rem;
  color: var(--mut);
}

/* ============================================================
   結果画面 — ペルソナ判定バッジとAI生成中のローディング
   ============================================================ */
.result-wrap {
  flex: 1;
  padding: 1.1rem;
  overflow-y: auto;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.persona-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 20px;
  padding: 0.28rem 0.85rem;
  font-size: 0.67rem;
  margin-bottom: 0.65rem;
  border: 1px solid;
}
.result-title {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(0.95rem, 3vw, 1.25rem);
  font-weight: 700;
  line-height: 1.4;
}
.result-sub {
  font-size: 0.68rem;
  color: var(--mut);
  margin-top: 0.25rem;
}
.ai-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 1rem;
}
.dots {
  display: flex;
  gap: 0.4rem;
}
.dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ac);
  animation: dp 1.2s ease infinite;
}
.dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes dp {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}
/* ============================================================
   AI提案のプランカード（3案）とゴール条件のサマリー
   ============================================================ */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-top: 1.2rem;
}
@media (max-width: 700px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }
}
.plan-card {
  background: var(--s1);
  border: 1.5px solid var(--bd);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--ac);
}
.plan-hd {
  padding: 0.8rem 0.95rem 0.55rem;
}
.plan-num {
  font-family: "DM Mono", monospace;
  font-size: 0.59rem;
  letter-spacing: 0.1em;
}
.plan-name {
  font-size: 0.86rem;
  font-weight: 700;
  margin: 0.18rem 0 0.25rem;
  line-height: 1.3;
}
.plan-sub {
  font-size: 0.61rem;
  color: var(--mut);
  margin-bottom: 0.3rem;
}
.plan-sal {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
}
.plan-body {
  padding: 0.65rem 0.95rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.plan-chart {
  height: 110px;
}
.plan-routes {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pr {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.61rem;
  color: var(--mut);
}
.pr-age {
  font-family: "DM Mono", monospace;
  color: var(--ac);
  flex-shrink: 0;
  width: 28px;
}
/* 週労働時間（想定される働き方）。v8 の .plan-hours 一式を移植 */
.plan-hours {
  border: 1px solid var(--bd);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  background: var(--s1);
}
.ph-t {
  font-size: 0.56rem;
  color: var(--mut);
  margin-bottom: 0.25rem;
  letter-spacing: 0.03em;
}
.ph-r {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 0.59rem;
  padding: 1px 0;
}
.ph-p {
  color: var(--mut);
}
.ph-h {
  color: var(--te);
  font-family: "DM Mono", monospace;
  white-space: nowrap;
}
.plan-desc {
  font-size: 0.62rem;
  color: var(--mut);
  line-height: 1.6;
}
.plan-risk {
  font-size: 0.6rem;
  color: var(--re);
  background: #f0555510;
  border-radius: 4px;
  padding: 3px 6px;
  border-left: 2px solid var(--re);
}
.apply-btn {
  width: 100%;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.55rem;
  cursor: pointer;
  transition: opacity 0.15s;
}
.apply-btn:hover {
  opacity: 0.85;
}
.goal-summary-box {
  background: var(--s2);
  border: 1px solid var(--am) 44;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-top: 0.5rem;
}
.goal-summary-box .gs-title {
  font-size: 0.67rem;
  color: var(--am);
  font-weight: 500;
  margin-bottom: 0.45rem;
}
.goal-summary-box .gs-body {
  font-size: 0.67rem;
  color: var(--mut);
  line-height: 1.85;
}
.goal-summary-box strong {
  color: var(--txt);
}

/* ============================================================
   キャリア履歴カード（AI提案の入力）— 転職ステージのカードより簡素な、
   開閉のない常時展開カード。過去の在籍を1件1枚で並べる
   ============================================================ */
.hist-card {
  border: 1px solid var(--bd);
  border-radius: 7px;
  padding: 0.6rem;
  background: var(--s1);
}
.hist-card .f {
  margin-bottom: 0.4rem;
}
.rm-btn {
  background: none;
  border: 1px solid var(--bd);
  border-radius: 5px;
  color: var(--re);
  font-family: inherit;
  font-size: 0.62rem;
  padding: 4px 10px;
  cursor: pointer;
  margin-top: 0.2rem;
}
.rm-btn:hover {
  border-color: var(--re);
}

/* ============================================================
   入力の矛盾チェック — 入力中は警告として出すだけ（非ブロック）。
   AI提案の実行時にだけゲートになる（app.js の runAI）
   ============================================================ */
.v-err {
  font-size: 0.58rem;
  color: var(--re);
  line-height: 1.6;
  margin-top: 0.3rem;
  padding: 0.35rem 0.5rem;
  background: rgba(224, 90, 90, 0.08);
  border-left: 2px solid var(--re);
  border-radius: 3px;
}
.v-err ul {
  margin: 0;
  padding-left: 1rem;
}

/* 入力欄に添える補足文（該当する方だけに出す注意書き） */
.fld-note {
  font-size: 0.56rem;
  color: var(--mut);
  line-height: 1.5;
  margin-bottom: 0.3rem;
}

/* セクション内の小見出し（キャリア履歴の「過去の監査法人経験」など） */
.sub-t {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--bd);
  font-size: 0.62rem;
  color: var(--mut);
  margin-bottom: 0.4rem;
}

/* 提案カードで「シミュレーター確認」ボタンの代わりに出す注記
   （監査法人に在籍していない方はシミュレーターの対象外） */
.plan-note {
  font-size: 0.58rem;
  color: var(--mut);
  line-height: 1.6;
  padding: 0.45rem 0.55rem;
  border: 1px dashed var(--bd);
  border-radius: 6px;
  text-align: center;
}

/* ============================================================
   登録ウォール（第3弾）。v8 の .sk-* / .wall* / .pp* 一式を移植
   ============================================================ */

/* ウォール前の骨格カード（経路を明かさない）に使う部品 */
.sk-hook {
  font-size: 0.7rem;
  line-height: 1.7;
  color: var(--txt);
  padding: 0.5rem 0.1rem;
}
.sk-lock {
  font-size: 0.58rem;
  color: var(--mut);
  text-align: center;
  padding: 0.4rem;
  border: 1px dashed var(--bd);
  border-radius: 6px;
}

/* ウォール本体（メール＋同意のフォーム） */
.wall {
  max-width: 520px;
  margin: 1rem auto 0;
  border: 1px solid var(--ac);
  border-radius: 12px;
  padding: 1.1rem;
  background: linear-gradient(180deg, #5b8ef510, transparent);
}
.wall-t {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.3rem;
}
.wall-s {
  font-size: 0.64rem;
  color: var(--mut);
  text-align: center;
  line-height: 1.7;
  margin-bottom: 0.9rem;
}
.wall-f {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.wall-f input[type=email] {
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 7px;
  color: var(--txt);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 9px 11px;
  outline: none;
  width: 100%;
}
.wall-f input[type=email]:focus {
  border-color: var(--ac);
}
.wall-ck {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.66rem;
  color: var(--txt);
  cursor: pointer;
}
.wall-ck input {
  width: 15px;
  height: 15px;
  accent-color: var(--ac);
  cursor: pointer;
  flex-shrink: 0;
}

/* 個人情報の取扱い（折りたたみ全文） */
.pp-tg {
  background: none;
  border: none;
  color: var(--mut);
  font-family: inherit;
  font-size: 0.6rem;
  cursor: pointer;
  padding: 2px 0;
  text-align: left;
  text-decoration: underline;
}
.pp-tg:hover {
  color: var(--ac);
}
.pp-b {
  font-size: 0.58rem;
  color: var(--mut);
  line-height: 1.75;
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 6px;
  padding: 0.6rem;
  max-height: 190px;
  overflow-y: auto;
}
.pp-b p {
  margin: 0 0 0.5rem;
}
.pp-b p:last-child {
  margin: 0;
}

.wall-e {
  font-size: 0.62rem;
  color: var(--re);
}
.wall-b {
  background: var(--ac);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 11px;
  cursor: pointer;
  width: 100%;
}
.wall-b:hover {
  opacity: 0.9;
}
.wall-b:disabled {
  opacity: 0.5;
  cursor: default;
}

/* 送信後、本文3案の生成完了を待つ間の表示 */
.wall-wait {
  text-align: center;
  padding: 1.4rem;
  color: var(--mut);
  font-size: 0.72rem;
}

/* ============================================================
   スポンサー枠（第3弾）。v8 の .spon-* / .sm-* 一式を移植
   ============================================================ */

/* プランカード下部の「この経路で募集中の採用企業」枠 */
.spon-box {
  border-top: 1px solid var(--bd);
  padding-top: 0.55rem;
  margin-top: 0.1rem;
}
.spon-t {
  font-size: 0.56rem;
  color: var(--mut);
  margin-bottom: 0.35rem;
  letter-spacing: 0.03em;
}
.spon-chips {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.spon-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  background: var(--s1);
  border: 1px solid var(--bd);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
}
.spon-chip:hover {
  background: var(--s2);
}
.sc-n {
  font-size: 0.65rem;
  color: var(--txt);
  font-weight: 600;
}
.sc-tg {
  font-size: 0.55rem;
  color: var(--mut);
}

/* スポンサー詳細モーダル */
.spon-modal {
  position: fixed;
  inset: 0;
  background: #000000cc;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.sm-in {
  background: var(--s2);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 1.2rem;
  max-width: 420px;
  width: 100%;
  position: relative;
}
.sm-x {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  background: none;
  border: none;
  color: var(--mut);
  font-size: 0.85rem;
  cursor: pointer;
}
.sm-n {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.sm-tg {
  font-size: 0.66rem;
  color: var(--ac);
  margin-bottom: 0.6rem;
}
.sm-b {
  font-size: 0.66rem;
  color: var(--mut);
  line-height: 1.75;
  margin-bottom: 0.9rem;
}
.sm-acts {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}
.sm-a1,
.sm-a2 {
  display: block;
  text-align: center;
  border-radius: 7px;
  padding: 9px;
  font-size: 0.72rem;
  text-decoration: none;
  font-weight: 600;
}
.sm-a1 {
  background: var(--ac);
  color: #fff;
}
.sm-a2 {
  border: 1px solid var(--bd);
  color: var(--txt);
}
.sm-disc {
  font-size: 0.54rem;
  color: var(--mut);
  line-height: 1.6;
  border-top: 1px solid var(--bd);
  padding-top: 0.5rem;
}
