/* 弊社公式パレット（2026-09-05 決定の6役割）。#3EAD87 は線と小さな印だけに使い、面にして白文字を乗せない */
:root {
  --struct: #14513C;   /* 構造色：上の帯・主ボタン・選択中 */
  --mid: #1B6B4F;      /* 中間：見出し・グラデーションの終点 */
  --accent: #3EAD87;   /* アクセント：細い線・進み具合の線 */
  --sumi: #2A2D2A;     /* 墨：本文 */
  --face: #F7F6F5;     /* 面：背景 */
  --rule: #E4E2DF;     /* 罫線 */
  --tint: #EEF6F2;     /* 選択中の薄い面 */
  --err: #B3261E;      /* 誤り（白地で 6.5:1） */
  --muted: #5F625F;    /* 補足の字（白地で 6.2:1） */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 81, 60, .06), 0 6px 20px rgba(20, 81, 60, .06);
  --shadow-hover: 0 2px 4px rgba(20, 81, 60, .08), 0 12px 28px rgba(20, 81, 60, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* display を指定した部品でも、隠す指定を必ず優先する */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--face);
  color: var(--sumi);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
button { -webkit-tap-highlight-color: transparent; }

/* ---------- 上部 ---------- */
.hero {
  background: linear-gradient(135deg, var(--struct) 0%, var(--mid) 100%);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 0 22px;
  position: relative;
  overflow: hidden;
}
.hero::after { /* 右上の大きな円（同じ緑の明度違い・飾り） */
  content: ""; position: absolute; right: -80px; top: -90px; width: 240px; height: 240px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); pointer-events: none;
}
.hero-inner { max-width: 640px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { height: 18px; width: auto; filter: brightness(0) invert(1); }
.brand-sep { width: 1px; height: 14px; background: rgba(255, 255, 255, .45); }
.brand-name { font-size: 13px; font-weight: 500; letter-spacing: .04em; opacity: .92; }
.hero-label { margin: 18px 0 0; font-size: 26px; font-weight: 700; letter-spacing: .06em; line-height: 1.3; }

.stepper { list-style: none; display: flex; gap: 0; margin: 16px 0 0; padding: 0; }
.stepper[hidden] { display: none; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 8px; position: relative; font-size: 13px; color: rgba(255, 255, 255, .7); }
.stepper li:not(:last-child)::after { content: ""; flex: 1; height: 2px; margin: 0 8px; background: rgba(255, 255, 255, .25); border-radius: 2px; }
.stepper .dot {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; border: 1.5px solid rgba(255, 255, 255, .5); color: rgba(255, 255, 255, .85);
}
.stepper li.active { color: #fff; font-weight: 700; }
.stepper li.active .dot { background: #fff; color: var(--struct); border-color: #fff; }
.stepper li.done .dot { background: rgba(255, 255, 255, .18); border-color: transparent; color: #fff; }
.stepper li.done:not(:last-child)::after { background: var(--accent); }

/* ---------- 本文 ---------- */
.wrap { max-width: 640px; margin: 0 auto; padding: 28px 20px 56px; }
.view[hidden] { display: none; }
/* 切り替えの演出は位置だけ動かす（薄くする演出は、動きが止まる環境で本文が薄いまま残るため使わない） */
.view { animation: rise .25s ease; }
@keyframes rise { from { transform: translateY(6px); } to { transform: none; } }

.page-title { color: var(--mid); font-size: 21px; font-weight: 700; margin: 0 0 6px; letter-spacing: .02em; line-height: 1.45; }
.page-title.center, .lead.center { text-align: center; }
.lead { margin: 6px 0 22px; color: var(--sumi); }
.note { margin: 16px 0 0; color: var(--muted); font-size: 14px; }

/* 入口の選ぶカード・お知らせ欄・並びの演出は /cv-ink.css（弊社デザインシステムの部品の写し。正本＝12_AIツールMVP/_design/cv-ink.css）。
   AIっぽい定番の形（薄い色の四角に入れたアイコン・左の色の縦線）は使わない。基準＝memory/reference_web_ui_no_ai_look.md */

/* リンクから開いたときの「誰の・何月の振り返りか」。左の縦線は使わない */
.banner {
  background: #fff; border: 1px solid var(--rule); border-radius: 14px;
  padding: 12px 16px; margin: 0 0 16px;
}
.banner-k { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
.banner-v { display: block; font-size: 16px; font-weight: 700; color: var(--struct); line-height: 1.5; margin-top: 2px; }

.card, .field {
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px 16px; margin: 0 0 14px; box-shadow: var(--shadow);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field[hidden] { display: none; }
.field:focus-within { border-color: rgba(20, 81, 60, .45); }
.field.has-err { border-color: var(--err); box-shadow: 0 0 0 3px rgba(179, 38, 30, .08); }

.field-label { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; font-weight: 700; margin: 0 0 8px; line-height: 1.55; }
.field-label .text { flex: 1; text-wrap: balance; } /* 1〜2文字だけが次の行に残る折り返しを防ぐ */
.page-title, .hero-label, .opt > span:last-child, .confirm-item .k, .lead.center p { text-wrap: balance; }
.badge {
  flex: none; align-self: flex-start; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .04em;
  padding: 5px 8px; border-radius: 999px; margin-top: 3px; white-space: nowrap;
  background: var(--struct); color: #fff;
}
.badge.opt { background: #F0EFED; color: var(--muted); }
.help { font-size: 14px; color: var(--muted); margin: -2px 0 10px; line-height: 1.65; }
.id-row + .id-row { margin-top: 14px; }
.id-fixed { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; }
.id-fixed .k { font-size: 13px; color: var(--muted); }
.id-fixed .v { font-weight: 700; }

input[type="text"], textarea, select {
  width: 100%; font: inherit; font-size: 16px; color: var(--sumi);
  border: 1px solid #D3D0CB; border-radius: 10px; padding: 12px 14px; background: #FCFCFB;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input[type="text"], select { min-height: 50px; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  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 d='M1 1l5 5 5-5' fill='none' stroke='%231B6B4F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; }
textarea { min-height: 116px; resize: vertical; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: #8E918E; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--struct); background: #fff; box-shadow: 0 0 0 4px rgba(20, 81, 60, .12); }

/* 選択肢：大きめの札。選ぶと構造色の縁・薄い面・チェックの印 */
.opts { display: grid; gap: 8px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px;
  border: 1.5px solid var(--rule); border-radius: 12px; padding: 11px 14px; cursor: pointer; background: #fff;
  transition: border-color .15s ease, background .15s ease;
  line-height: 1.55;
}
.opt:hover { border-color: rgba(20, 81, 60, .4); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt .mark {
  flex: none; width: 22px; height: 22px; border: 1.5px solid #B9B6B0; display: grid; place-items: center;
  background: #fff; transition: all .15s ease;
}
.opt .mark.radio { border-radius: 50%; }
.opt .mark.check { border-radius: 6px; }
.opt .mark svg { opacity: 0; transform: scale(.6); transition: all .15s ease; }
.opt.checked { border-color: var(--struct); background: var(--tint); }
.opt.checked .mark { background: var(--struct); border-color: var(--struct); }
.opt.checked .mark svg { opacity: 1; transform: none; }
.opt input:focus-visible + .mark { box-shadow: 0 0 0 4px rgba(20, 81, 60, .18); }

.err-msg { color: var(--err); font-size: 14px; font-weight: 500; margin: 8px 0 0; }
.form-error {
  color: var(--err); font-weight: 700; margin: 4px 0 12px; padding: 12px 14px;
  background: #FCF1F0; border-radius: 10px; font-size: 15px;
}

/* ボット避けの確認（確認画面の送信ボタンの真上・チェックが必要な人にだけ出る） */
.ts-box { margin: 16px 0 0; }
.ts-box:empty { margin: 0; }
.ts-hint { margin: 8px 0 0; color: var(--struct); font-size: 14px; font-weight: 500; }

.actions { margin-top: 18px; }
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--struct) 0%, var(--mid) 100%); color: #fff;
  font: inherit; font-size: 17px; font-weight: 700; letter-spacing: .04em; cursor: pointer;
  box-shadow: 0 8px 20px rgba(20, 81, 60, .22); transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(20, 81, 60, .28); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: default; transform: none; }
.btn-ghost {
  display: block; width: 100%; min-height: 50px; border: 1px solid var(--rule); border-radius: 12px;
  background: #fff; color: var(--struct); font: inherit; font-weight: 700; cursor: pointer; margin-top: 10px;
  transition: border-color .15s ease;
}
.btn-ghost:hover { border-color: var(--struct); }

/* 確認：カード型 */
.confirm-list { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.confirm-item { padding: 14px 16px; }
.confirm-item + .confirm-item { border-top: 1px solid var(--rule); }
.confirm-item .k { font-size: 13px; font-weight: 700; color: var(--mid); margin: 0 0 4px; line-height: 1.5; }
.confirm-item .v { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.7; }

/* 完了 */
.done-mark { display: grid; place-items: center; color: var(--struct); margin: 8px 0 12px; }
.done-mark svg path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .15s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
#done-text p { margin: 0 0 8px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#turnstile-box { margin: 8px 0; }

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
