/* 空セッション：静かで上質に。経営者が「答えたくなる」余白と、テスト用パネルの見通しを両立する */
:root {
  --bg: #f6f3ec;
  --paper: #fffdf8;
  --ink: #1d2529;
  --ink-2: #4a5458;
  --muted: #687074;
  --line: #e4ded2;
  --line-2: #d6cfc1;
  --ai: #2d4d66;          /* 藍：主役の色 */
  --ai-soft: #e6edf2;
  --gold: #a5824a;        /* 金茶：アクセントのみ */
  --plus: #3f7a5b;
  --plus-soft: #e3efe7;
  --minus: #a9584a;
  --minus-soft: #f4e5e1;
  --lab-bg: #1f262b;
  --lab-ink: #e6e9ea;
  --lab-muted: #9aa5ab;
  --lab-line: #33404a;
  --lab-card: #263038;
  --ok: #6fbf8e;
  --shadow: 0 1px 2px rgba(29,37,41,.04), 0 8px 30px rgba(29,37,41,.06);
  --radius: 16px;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15191c; --paper: #1c2226; --ink: #eceae5; --ink-2: #c3c7c8; --muted: #8d969a;
    --line: #2b3338; --line-2: #374248; --ai: #8fb4cf; --ai-soft: #22313c; --gold: #c9a56b;
    --plus: #7fc09c; --plus-soft: #1f3329; --minus: #e09484; --minus-soft: #3a2622;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 30px rgba(0,0,0,.25); color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.8; letter-spacing: .02em; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ===== ヘッダー ===== */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px clamp(16px, 3vw, 32px); background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--ai); color: var(--ai); font-family: var(--serif); font-size: 18px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-text b { font-weight: 600; font-family: var(--serif); font-size: 16px; }
.brand-text small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 38px; height: 22px; border-radius: 22px; background: var(--line-2); position: relative; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .switch-ui { background: var(--ai); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--ai); outline-offset: 2px; }

/* ===== ボタン ===== */
.btn-primary { white-space: nowrap; appearance: none; border: 0; background: var(--ai); color: #fff; padding: 12px 26px; border-radius: 999px; font-weight: 500; cursor: pointer; transition: transform .15s, opacity .15s; }
.btn-primary:hover { opacity: .92; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .45; cursor: default; }
.btn-lg { padding: 15px 40px; font-size: 17px; }
.btn-soft { white-space: nowrap; appearance: none; border: 1px solid var(--line-2); background: var(--paper); padding: 11px 20px; border-radius: 999px; cursor: pointer; color: var(--ink-2); }
.btn-soft:hover { border-color: var(--ai); color: var(--ai); }
.btn-ghost { appearance: none; border: 1px solid var(--line-2); background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.btn-link { appearance: none; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 8px 6px; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ai); outline-offset: 2px; }

/* ===== レイアウト ===== */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 0; min-height: calc(100vh - 61px); }
.layout.lab-off { grid-template-columns: minmax(0, 1fr); background: none; }
@media (min-width: 1081px) { .layout { background: linear-gradient(to right, transparent calc(100% - 420px), var(--lab-bg) 0); } }
.lowr { margin: 6px 0 0; font-size: 11.5px; color: #ffd28a; }
.layout.lab-off .lab { display: none; }
.stage { padding: clamp(28px, 6vw, 72px) clamp(16px, 5vw, 64px) 80px; display: flex; flex-direction: column; align-items: center; }
.stage > * { width: 100%; max-width: 640px; }

/* ===== はじめの画面 ===== */
.eyebrow { color: var(--gold); font-size: 13px; letter-spacing: .14em; margin: 0 0 14px; }
.intro h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 4.4vw, 38px); line-height: 1.55; margin: 0 0 20px; letter-spacing: .04em; }
.lead-strong { margin: 0 0 12px; font-weight: 500; color: var(--ai); }
.lead { color: var(--ink-2); margin: 0 0 30px; }
.promises { list-style: none; padding: 0; margin: 0 0 36px; display: grid; gap: 14px; }
.promises li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.pi { flex: none; font-family: var(--serif); color: var(--gold); font-size: 15px; line-height: 1.75; width: 1.4em; }
.promises b { display: block; font-weight: 500; }
.promises span { color: var(--muted); font-size: 14px; }
.fine { color: var(--muted); font-size: 12.5px; margin-top: 18px; }

/* ===== 進み具合 ===== */
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 22px; }
.steps li { flex: 1; min-width: 0; }
.steps li .bar { display: block; height: 4px; border-radius: 4px; background: var(--line-2); transition: background .3s; }
.steps li .lbl { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.steps li.done .bar { background: #8fa4b4; }
.steps li.now .bar { background: var(--ai); }
.steps li.now .lbl { color: var(--ai); font-weight: 700; font-size: 12px; }
.remain { margin: -12px 0 18px; font-size: 12.5px; color: var(--muted); text-align: right; }
.remain:empty { display: none; }

/* ===== 問いのカード ===== */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); position: relative; }
.card.enter { animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.reflection { margin: 0 0 14px; color: var(--ink-2); font-size: 14.5px; padding-left: 12px; border-left: 2px solid var(--gold); }
.question { font-family: var(--serif); font-weight: 600; font-size: clamp(20px, 3vw, 25px); line-height: 1.65; margin: 0 0 10px; letter-spacing: .03em; }
.sub { color: var(--muted); margin: 0 0 14px; font-size: 14.5px; }
.why { margin: 0 0 18px; font-size: 13.5px; }
.why summary { cursor: pointer; color: var(--ai); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.why summary::before { content: "?"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid currentColor; font-size: 11px; }
.why summary::-webkit-details-marker { display: none; }
.why p { margin: 8px 0 0; color: var(--ink-2); background: var(--ai-soft); padding: 10px 14px; border-radius: 10px; }
.hint { background: var(--bg); border: 1px dashed var(--line-2); border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
.hint-label { font-size: 12px; color: var(--gold); letter-spacing: .1em; }
.hint p { margin: 2px 0 0; font-size: 14.5px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chips:empty { display: none; }
.chip { appearance: none; border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 6px 14px; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.chip:hover { border-color: var(--ai); color: var(--ai); }
textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); padding: 14px 16px; resize: vertical; min-height: 96px; line-height: 1.75; transition: border-color .2s, background .2s; }
textarea:focus { outline: none; border-color: var(--ai); background: var(--paper); }
textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.choices { display: grid; gap: 10px; margin-bottom: 6px; }
.choice { appearance: none; text-align: left; border: 1px solid var(--line-2); background: var(--paper); border-radius: 12px; padding: 14px 18px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--ai); background: var(--ai-soft); }
.slider input { width: 100%; accent-color: var(--ai); height: 28px; }
.slider-scale { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12.5px; }
.slider-scale output { font-family: var(--serif); font-size: 28px; color: var(--ai); }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.thinking { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-top: 16px; }
.thinking .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ai); animation: breathe 1.4s ease-in-out infinite; }
.thinking .dot:nth-child(2) { animation-delay: .2s; } .thinking .dot:nth-child(3) { animation-delay: .4s; }
.thinking-text { margin-left: 6px; }
@keyframes breathe { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

/* ===== 見えてきたもの ===== */
.shelf { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.shelf-col { background: color-mix(in srgb, var(--paper) 60%, transparent); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.shelf h3 { font-size: 13px; font-weight: 500; margin: 0 0 8px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; }
.count { font-family: var(--serif); font-size: 15px; }
.minus .count { color: var(--minus); } .plus .count { color: var(--plus); }
.shelf ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.shelf li { font-size: 13px; line-height: 1.55; padding: 7px 10px; border-radius: 8px; animation: rise .4s ease both; }
.minus li { background: var(--minus-soft); }
.plus li { background: var(--plus-soft); }
.shelf li .tag { display: inline-block; font-size: 10.5px; margin-left: 6px; color: var(--muted); }
.sheet dd .note { color: var(--muted); font-size: 13px; margin-left: 4px; }
.shelf-note { margin: -2px 0 8px; font-size: 12px; color: var(--muted); }
.shelf-note:empty { display: none; }

/* ===== まとめ ===== */
.sheet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(24px, 4vw, 40px); }
.sheet h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 3.2vw, 28px); margin: 0 0 6px; }
.sheet .date { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.sheet dl { margin: 0; display: grid; gap: 0; }
.sheet .row { display: grid; grid-template-columns: 10.5em 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.sheet dt { color: var(--muted); font-size: 13.5px; }
.sheet dd { margin: 0; }
.sheet dd ul { margin: 0; padding-left: 1.1em; }
.sheet .tally { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.sheet .tally span { font-size: 13px; padding: 4px 12px; border-radius: 999px; }
.sheet .tally .tm { background: var(--minus-soft); color: var(--minus); }
.sheet .tally .tp { background: var(--plus-soft); color: var(--plus); }
.sheet .next { margin: 14px 0 0; padding: 14px 18px; border: 1px solid var(--gold); border-radius: 12px; }
.sheet .next b { color: var(--gold); font-weight: 500; font-size: 13px; display: block; }
.sheet .closing { margin: 26px 0 0; padding: 18px 20px; background: var(--ai-soft); border-radius: 12px; font-family: var(--serif); line-height: 1.9; }
.sheet .sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* ===== テスト用パネル ===== */
.layout { align-items: stretch; }
.lab { min-height: calc(100vh - 61px); background: var(--lab-bg); color: var(--lab-ink); padding: 0 22px 60px; border-left: 1px solid var(--lab-line); position: sticky; top: 61px; height: calc(100vh - 61px); overflow-y: auto; font-size: 13.5px; line-height: 1.65; }
.lab-now { position: sticky; top: 0; z-index: 2; margin: 0 -22px 18px; padding: 12px 22px; background: #2f4352; color: #fff; font-size: 12.5px; line-height: 1.6; border-bottom: 1px solid var(--lab-line); }
.lab-now b { color: #ffd28a; font-weight: 500; white-space: nowrap; }
.lab-now .ln { display: block; }
.lab-tag { display: inline-block; font-size: 11px; letter-spacing: .08em; color: #ffd28a; border: 1px solid #6b5a3a; border-radius: 999px; padding: 2px 10px; margin: 0 0 10px; }
.lab h2 { font-family: var(--serif); font-size: 20px; margin: 0 0 6px; font-weight: 600; }
.lab-lead { color: var(--lab-muted); margin: 0 0 18px; font-size: 13px; }
.lab-block { background: var(--lab-card); border: 1px solid var(--lab-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.lab h3 { font-size: 12.5px; letter-spacing: .06em; color: var(--lab-muted); margin: 0 0 10px; font-weight: 500; }
.lab h3 small { font-size: 12px; }
.lab .muted { color: var(--lab-muted); margin: 0; }
.lab .small { font-size: 12px; margin-bottom: 10px; }
.scale { width: 100%; height: auto; display: block; }
.scale-post { stroke: #6b7880; stroke-width: 3; fill: none; }
.scale-beam { stroke: #cfd6da; stroke-width: 3; stroke-linecap: round; }
.scale-rope { stroke: #6b7880; stroke-width: 1; }
.scale-pivot { fill: #ffd28a; }
.pan-minus { fill: #c07a6c; } .pan-plus { fill: #6fae88; }
.pan-label { fill: var(--lab-ink); font-size: 12px; text-anchor: middle; font-family: var(--sans); }
#beam { transform-origin: 160px 40px; transition: transform .8s cubic-bezier(.3,1.4,.5,1); }
#panL, #panR { transition: transform .8s cubic-bezier(.3,1.4,.5,1); }
.seats { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.seats li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: baseline; padding: 6px 8px; border-radius: 8px; color: var(--lab-muted); }
.seats li .n { font-size: 12px; }
.seats li b { font-weight: 500; }
.seats li span { display: block; font-size: 11.5px; }
.seats li.now { background: #2f4352; color: #fff; }
.seats li.now b::after { content: "  ← いまここ"; color: #ffd28a; font-size: 11px; font-weight: 400; }
.seats li.past { color: #cfd6da; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.metrics div { background: #1f282f; border-radius: 8px; padding: 8px 10px; }
.metrics dt { font-size: 11px; color: var(--lab-muted); }
.metrics dd { margin: 0; font-size: 18px; font-family: var(--serif); }
.metrics .wide { grid-column: span 2; }
.kbar { height: 6px; border-radius: 6px; background: #33404a; margin-top: 6px; overflow: hidden; }
.kbar i { display: block; height: 100%; background: linear-gradient(90deg, #8fb4cf, #ffd28a); width: 0; transition: width .8s ease; }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; line-height: 1.7; background: #1a2126; border-radius: 8px; padding: 10px 12px; color: #cfd6da; white-space: pre-wrap; word-break: break-all; }
.formula b { color: #ffd28a; font-weight: 500; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.rules li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; padding: 4px 6px; border-radius: 6px; color: var(--lab-muted); font-size: 12.5px; }
.rules li .m { text-align: center; }
.rules li.hit { color: #fff; }
.rules li.hit .m { color: #ffd28a; }
.rules li.pick { background: #2f4352; color: #fff; }
.rules li.pick .m { color: var(--ok); }
.rules li small { display: block; color: var(--lab-muted); font-size: 11.5px; }
.rules li.pick small { color: #cfe3d6; }
.analysis .items { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; }
.analysis .items li { padding: 6px 8px; border-radius: 6px; background: #1f282f; font-size: 12.5px; }
.badge { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.b-plus { background: #2d4a3a; color: #9fe0b8; } .b-minus { background: #4a2d28; color: #f0b3a6; }
.b-fact { background: #2c3e4c; color: #a9cde6; } .b-vague { background: #3d3a2c; color: #e6d39a; }
.b-sign { background: #4a3a1d; color: #ffd28a; } .b-stuck { background: #3a2d4a; color: #d0b3f0; }
.analysis .kv { margin: 6px 0 0; font-size: 12px; color: var(--lab-muted); }
.analysis .kv b { color: var(--lab-ink); font-weight: 500; }
.samples { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.samples button { appearance: none; border: 1px solid var(--lab-line); background: #1f282f; color: var(--lab-ink); border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.samples button:hover { border-color: #8fb4cf; }
.lab-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.lab-tools button { appearance: none; border: 1px solid var(--lab-line); background: #2f4352; color: #fff; border-radius: 8px; padding: 6px 12px; font-size: 12px; cursor: pointer; }
.lab-tools button:disabled { opacity: .4; cursor: default; }
.check { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--lab-muted); cursor: pointer; }
.check input { accent-color: #8fb4cf; }
.config { display: grid; gap: 8px; }
.config label { display: grid; grid-template-columns: 1fr 64px; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--lab-ink); }
.config label small { grid-column: 1 / -1; color: var(--lab-muted); font-size: 11.5px; line-height: 1.5; margin-top: -2px; }
.config .reset { justify-self: start; appearance: none; border: 1px solid var(--lab-line); background: transparent; color: var(--lab-muted); border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.config input { background: #1a2126; border: 1px solid var(--lab-line); border-radius: 6px; padding: 4px 8px; color: var(--lab-ink); width: 64px; }
.history { padding-left: 1.3em; margin: 0; display: grid; gap: 6px; font-size: 12px; color: var(--lab-muted); }
.history b { color: var(--lab-ink); font-weight: 500; }
.lab-fab { display: none; }

/* ===== スマホ ===== */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .stage { padding-bottom: 110px; }
  .lab-now { top: 0; }
  .lab { position: static; height: auto; border-left: 0; border-top: 1px solid var(--lab-line); }
  .lab-fab { display: none !important; position: fixed; right: 16px; bottom: 16px; z-index: 30; border: 0; background: var(--lab-bg); color: #ffd28a; border-radius: 999px; padding: 10px 16px; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.25); cursor: pointer; }
  .layout.lab-off ~ .lab-fab { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .brand-text small { display: none; }
  .switch-label { display: none; }
  .shelf { grid-template-columns: 1fr; }
  .sheet .row { grid-template-columns: 1fr; gap: 4px; }
  .actions { display: grid; grid-template-columns: 1fr auto; }
  .actions .btn-primary { grid-column: 1 / -1; padding: 14px; }
  .actions .btn-soft { justify-self: start; }
  .actions .btn-link { justify-self: end; }
  .steps li .lbl { visibility: hidden; height: 0; margin: 0; }
  .steps li.now { flex: 2.4; }
  .steps li.now .lbl { visibility: visible; height: auto; margin-top: 6px; font-size: 13px; text-align: left; overflow: visible; }
  .stage { padding-bottom: 120px; }
}
@media print {
  .top, .lab, .lab-fab, .sheet-actions { display: none !important; }
  body { background: #fff; }
  .layout { display: block; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
