/* ============================================================
   ノマドワーカー診断 / グローバルミー デジノマ
   方針：余白を大きく、色数を絞り、角丸をほぼ使わない。
         見出しは明朝、本文はゴシック。装飾ではなく「組み」で見せる。
   ============================================================ */

:root {
  /* --- Global Me VIガイドラインの色 --- */
  --paper:    #F4F8F8;
  --paper-2:  #E8F0F0;
  --surface:  #FFFFFF;
  --ink:      #1D3334;   /* VI 文字・線 */
  --ink-2:    #456061;
  --ink-3:    #6D8D8E;
  --line:     #CBDBDB;
  --line-2:   #E8F0F0;

  /* --- 差し色（ロゴのティール実測値。使うのは最小限） --- */
  --accent:   #069A96;
  --accent-d: #046B68;
  --accent-w: #D7F0EF;

  /* --- 予約ボタンだけの色（VI アクセント） --- */
  --cta:      #CC7200;
  --cta-d:    #804800;

  --maxw: 600px;
  --r: 2px;

  --sans:  "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

/* ステージごとの差し色（濃さだけ変える） */
[data-stage="1"] { --accent: #3CB8B4; --accent-w: #D7F0EF; }
[data-stage="2"] { --accent: #069A96; --accent-w: #D7F0EF; }
[data-stage="3"] { --accent: #046B68; --accent-w: #D7F0EF; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  font-size: 17px;
  font-weight: 400;
  line-height: 2.0;
  letter-spacing: 0.02em;
}

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px calc(64px + env(safe-area-inset-bottom));
}

/* 小さな英字ラベル。各所の目印に使う */
.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* ---------- 進捗 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: 18px 0 14px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar[hidden] { display: none; }
.topbar__row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.topbar__title {
  font-size: 13px; font-weight: 500; letter-spacing: 0.18em; color: var(--ink-2);
}
.progress { height: 1px; background: var(--line); overflow: visible; }
.progress__fill {
  height: 1px; width: 0%; background: var(--ink);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress__label {
  font-size: 13px; font-weight: 500; color: var(--ink-3);
  font-variant-numeric: tabular-nums; letter-spacing: 0.12em;
}

/* ---------- 画面切り替え ---------- */
.screen { display: none; }
.screen.is-active { display: block; animation: fade 0.5s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .screen.is-active { animation: none; }
  .progress__fill, .gauge__fill { transition: none; }
}

/* ---------- ロゴ ---------- */
.logo { margin: 0 0 40px; }
.logo__img { display: block; width: 116px; height: auto; margin: 0 auto; }
.logo__img[hidden] { display: none; }
.logo__fallback { display: flex; flex-direction: column; align-items: center; }
.logo__fallback[hidden] { display: none; }
.logo__name {
  font-family: var(--serif);
  font-size: 26px; font-weight: 600; letter-spacing: 0.08em; color: var(--ink);
  line-height: 1.2;
}
.logo__kana {
  margin-top: 10px; padding-top: 9px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.3em; color: var(--ink-3);
  border-top: 1px solid var(--line);
}
.logo__chip {
  margin-top: 12px; padding: 0;
  font-size: 13px; font-weight: 700; letter-spacing: 0.26em; color: var(--accent);
  background: none;
}

/* ---------- 入口 ---------- */
.intro { padding: 56px 0 24px; }
.intro__title {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(26px, 8.6vw, 40px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.65;
  color: var(--ink);
}
.intro__sub {
  margin: 22px 0 0;
  text-align: center;
  font-size: 16px; color: var(--ink-2); line-height: 2.1;
}
.intro__points {
  list-style: none;
  margin: 44px 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.intro__points li {
  display: flex; align-items: baseline; gap: 18px;
  padding: 17px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.intro__num {
  flex: 0 0 auto; min-width: 26px;
  font-family: var(--serif);
  font-size: 21px; font-weight: 600; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.intro__lead { margin: 0 0 36px; font-size: 16px; color: var(--ink-2); }
.intro__resume { margin: 20px 0 0; font-size: 15px; color: var(--ink-2); text-align: center; }
.intro__note {
  margin: 36px 0 0; padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px; line-height: 2.0; color: var(--ink-3);
}
.intro__note a { color: var(--ink-2); }
.br-sp { display: none; }
@media (max-width: 430px) { .br-sp { display: inline; } }

/* ---------- 設問 ---------- */
.qwrap { padding: 36px 0 32px; }
.qhead { margin: 0 0 40px; }
.qhead__eyebrow {
  display: block;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--ink);
  font-size: 13px; font-weight: 700; letter-spacing: 0.24em; color: var(--ink);
}
.qblock { margin: 0 0 48px; }
.qblock__text {
  margin: 0 0 6px;
  font-size: 21px; font-weight: 700; line-height: 1.85; color: var(--ink);
  letter-spacing: 0.01em;
}
.qblock__no {
  display: block; margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 14px; font-weight: 600; letter-spacing: 0.18em; color: var(--accent);
}
.qblock__hint { margin: 10px 0 0; font-size: 14px; color: var(--ink-3); letter-spacing: 0.06em; }
.qblock__list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; }

.opt {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.8;
  letter-spacing: 0.01em;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s, background 0.2s;
}
.opt:hover { border-color: var(--ink-3); }
.opt:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

.opt__mark {
  flex: 0 0 auto; width: 14px; height: 14px;
  border: 1px solid var(--ink-3);
  border-radius: 0;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.opt.is-selected { border-color: var(--ink); background: var(--surface); }
.opt.is-selected .opt__mark { border-color: var(--ink); background: var(--ink); }
.opt.is-selected .opt__mark::after {
  content: ""; position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #fff; border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.opt.is-disabled { opacity: 0.35; pointer-events: none; }
.opt__note {
  display: block; margin-top: 5px;
  font-size: 14px; line-height: 1.8; color: var(--ink-3); letter-spacing: 0;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--ink); color: #fff;
  font: inherit; font-size: 16px; font-weight: 700;
  letter-spacing: 0.1em; line-height: 1.5;
  cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
}
.btn:hover { opacity: 0.86; }
.btn:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.btn--primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--ghost   { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); opacity: 1; }
.btn--back {
  width: auto; padding: 16px 2px;
  background: none; border: none; color: var(--ink-3);
  font-size: 14px; font-weight: 500; letter-spacing: 0.12em;
}
.btn--lg { padding: 20px; font-size: 17px; }
.btn[disabled] { opacity: 0.3; pointer-events: none; }

/* 無料相談だけ差し色（フラット・影なし） */
.btn--highlight {
  background: var(--cta); border-color: var(--cta); color: #fff;
  font-size: 17px; padding: 20px;
}
.btn--highlight:hover { background: var(--cta-d); border-color: var(--cta-d); opacity: 1; }

.linkbtn {
  background: none; border: none; padding: 0;
  font: inherit; font-weight: 700; color: var(--ink);
  border-bottom: 1px solid var(--ink); cursor: pointer;
}
.navrow { display: flex; align-items: center; gap: 16px; margin-top: 36px; }
.navrow .btn--primary { flex: 1; }

.errmsg {
  margin: 0 0 20px; padding: 14px 16px;
  border: 1px solid #E0A26B; border-left-width: 3px;
  background: #FFECCF;
  font-size: 15px; font-weight: 500; color: #804800; letter-spacing: 0.02em;
}
.errmsg[hidden] { display: none; }

/* ---------- 結果 ---------- */
.result { padding: 44px 0 8px; }
.result__scorecard { text-align: center; padding: 0 0 8px; }

.gauge { width: 208px; height: 208px; margin: 0 auto; position: relative; }
.gauge__svg { transform: rotate(-90deg); display: block; }
.gauge__track { stroke: var(--line); }
.gauge__fill { stroke: var(--accent); stroke-linecap: butt;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1); }
.gauge__inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gauge__label {
  font-size: 13px; font-weight: 500; letter-spacing: 0.22em; color: var(--ink-3);
  margin-bottom: 6px;
}
.gauge__num {
  font-family: var(--serif);
  font-size: 82px; font-weight: 600; line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.gauge__max { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0.16em; margin-top: 8px; }

.result__pill {
  display: inline-block; margin: 36px 0 0; padding: 0 0 8px;
  border-bottom: 1px solid var(--accent);
  font-size: 13px; font-weight: 700; letter-spacing: 0.26em; color: var(--accent);
}
.result__typename {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: clamp(34px, 10.1vw, 43px);
  font-weight: 600; letter-spacing: 0.08em; line-height: 1.5; color: var(--ink);
}
.result__catch { margin: 18px 0 0; font-size: 16px; color: var(--ink-2); line-height: 2.1; }

.result__priority {
  margin: 32px 0 0; padding: 16px 18px;
  border: 1px solid var(--line); border-left: 3px solid var(--cta);
  background: var(--surface);
  font-size: 15px; line-height: 2.0; color: var(--ink-2); text-align: left;
}

.sect { margin: 56px 0 0; }
.sect__title {
  margin: 0 0 18px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 700; letter-spacing: 0.2em; color: var(--ink);
}
.sect p { margin: 0 0 14px; font-size: 16px; line-height: 2.15; color: var(--ink-2); }
.sect p:last-child { margin-bottom: 0; }

.jobs { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jobs li {
  padding: 7px 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px; font-weight: 500; letter-spacing: 0.04em; color: var(--ink-2);
}

.plan { list-style: none; margin: 0; padding: 0; counter-reset: plan; }
.plan li {
  display: flex; align-items: baseline; gap: 18px;
  padding: 18px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 16px; line-height: 1.95; color: var(--ink);
}
.plan li:first-child { border-top: 1px solid var(--line); }
.plan li::before {
  counter-increment: plan; content: "0" counter(plan);
  flex: 0 0 auto;
  font-family: var(--serif);
  font-size: 15px; font-weight: 600; color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* 任意設問 */
.optional { margin: 56px 0 0; padding: 28px 0 0; border-top: 1px solid var(--ink); }
.optional__title { margin: 0 0 6px; font-size: 16px; font-weight: 700; letter-spacing: 0.08em; }
.optional__hint { margin: 0 0 24px; font-size: 14px; color: var(--ink-3); }
.field { margin: 0 0 20px; }
.field__label { display: block; margin: 0 0 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; padding: 14px 15px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 18px; line-height: 1.8; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #A7BDBE; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.optional__done { margin: 12px 0 0; font-size: 15px; font-weight: 700; color: var(--accent); }
.optional__done[hidden] { display: none; }

.result__actions { margin: 56px 0 0; display: grid; gap: 12px; }
.ctabox { display: block; }
.ctabox__note { margin: 12px 0 0; font-size: 14px; line-height: 1.9; color: var(--ink-3); text-align: center; }

.result__disclaimer {
  margin: 48px 0 0; padding: 22px 0 0;
  border-top: 1px solid var(--line);
  font-size: 13px; line-height: 2.0; color: var(--ink-3); text-align: center;
}
.result__brand { margin: 22px 0 0; text-align: center; }
.result__brandlogo { width: 78px; height: auto; display: block; margin: 0 auto 10px; }
.result__brandtext { font-size: 13px; font-weight: 500; letter-spacing: 0.2em; color: var(--ink-3); }

/* ---------- 画像モーダル ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(29, 51, 52, 0.5); }
.sheet__panel {
  position: relative; width: 100%; max-width: var(--maxw);
  max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--paper);
  border-top: 1px solid var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
  animation: up 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes up { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.2em; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.sheet__close { background: none; border: none; color: var(--ink-3); font-size: 25px; line-height: 1; padding: 0 4px; cursor: pointer; }
.sheet__body { padding: 20px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet__img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.sheet__hint { margin: 16px 0 0; font-size: 14px; line-height: 1.9; color: var(--ink-3); text-align: center; }
.sheet__foot { padding: 16px 24px 24px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.sheet__foot .btn[hidden] { display: none; }

.is-busy { opacity: 0.45; pointer-events: none; }
