:root {
  --ja: "IBM Plex Sans JP", "Hiragino Sans", sans-serif;
  --en: "IBM Plex Sans", sans-serif;
  --bg: #f4f2ee;
  --ink: #555555;
  --mute: #8a8680;
  --card: #fbfaf8;
  --line: #e4e0d8;
  --accent: #8a7560;
  --choice-a: #5b7c99;
  --choice-b: #c4895a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ja);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.04em;
}

.blob {
  position: fixed;
  top: -160px;
  right: -100px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: #e8e2d6;
  pointer-events: none;
  z-index: 0;
}

.bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 800px);
  margin: 0 auto;
  padding: 40px 40px 0;
}

.logo {
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.badge {
  font-family: var(--en);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--mute);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.back-btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.app {
  position: relative;
  z-index: 1;
  width: min(100%, 800px);
  margin: 0 auto;
  padding: 80px 40px 128px;
}

.eyebrow {
  margin: 0 0 20px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--accent);
}

h1 {
  margin: 0 0 32px;
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.06em;
}

.lead {
  margin: 0 0 56px;
  max-width: 36em;
  font-size: 15px;
  line-height: 1.9;
  color: var(--mute);
}

.gates {
  display: grid;
  gap: 12px;
}

@media (min-width: 720px) {
  .gates { grid-template-columns: 1fr 1fr; gap: 16px; }
}

.gate {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gate:hover,
.gate:focus-visible {
  border-color: var(--ink);
  background: #fff;
}

.gate-alt {
  background: transparent;
}

.gate-tag {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--mute);
}

.gate-title {
  display: block;
  margin: auto 0;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.06em;
}

.gate-go {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 64px;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 8px 14px;
  border-radius: 4px;
  background: #ebe7e0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.panel,
.quiz,
.result {
  max-width: 620px;
  padding: 8px 0 0;
}

.note,
.muted {
  color: var(--mute);
  font-size: 14px;
}

.panel .note { margin: 0 0 28px; }

.field {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
  max-width: 280px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--mute);
}

.field input {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.hint {
  margin: 0 0 20px;
  max-width: 36em;
  font-size: 13px;
  line-height: 1.8;
  color: var(--mute);
}

.err {
  margin: 0 0 20px;
  font-size: 14px;
  color: #a15a4a;
}

.fill {
  display: block;
  height: 2px;
  background: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  height: 52px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.1em;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn[hidden] {
  display: none;
}

.apply {
  background: var(--ink);
  color: var(--bg);
  margin: 32px 0 8px;
}

.quiz-role {
  margin: 0 0 48px;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.q { margin: 0 0 64px; }

.q h3 {
  margin: 0 0 16px;
  font-family: var(--en);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.q p {
  margin: 0 0 32px;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 400;
  line-height: 1.85;
}

.ends {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  margin-bottom: 14px;
}

.ends span:first-child {
  color: var(--choice-a);
  text-align: left;
  max-width: 45%;
}

@media (max-width: 640px) {
  .ends {
    flex-direction: column;
    gap: 8px;
  }

  .ends span:first-child,
  .ends span:last-child {
    max-width: 100%;
  }
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  margin: 12px 0;
  border-radius: 99px;
  background: linear-gradient(to right, var(--choice-a), var(--choice-b));
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(85, 85, 85, 0.25), 0 1px 4px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--choice-a), var(--choice-b));
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(85, 85, 85, 0.25), 0 1px 4px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.score {
  margin: 4px 0 24px;
  font-family: var(--en);
  font-size: clamp(72px, 14vw, 112px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
}

.score.word {
  font-family: var(--ja);
  font-size: clamp(40px, 8vw, 64px);
  letter-spacing: 0.08em;
}

.result-copy {
  max-width: 34em;
  font-size: 15px;
  line-height: 1.9;
  color: var(--mute);
}

body[data-role="company"] .score.word {
  margin: 0 0 20px;
  font-size: clamp(28px, 5vw, 40px);
}

.saved-axes {
  display: grid;
  gap: 32px;
  margin: 40px 0 8px;
}

.saved-axis-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--mute);
}

.saved-axis-track {
  position: relative;
  height: 8px;
  margin: 0 10px 16px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--choice-a), var(--choice-b));
}

.saved-axis-track .mark {
  top: -6px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(85, 85, 85, 0.25);
}

.saved-axis-low,
.saved-axis-high {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.saved-axis-low {
  margin-bottom: 4px;
  color: var(--choice-a);
}

.saved-axis-high {
  color: var(--choice-b);
  text-align: right;
}

.track {
  position: relative;
  height: 2px;
  background: var(--line);
}

.track-grad {
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(to right, var(--choice-a), var(--choice-b));
}

.track-grad .mark {
  top: -7px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(85, 85, 85, 0.25);
}

.mark {
  position: absolute;
  top: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateX(-50%);
}

.mark.company { background: var(--ink); }
.mark.seeker { background: var(--accent); }

.legend {
  font-size: 12px;
  color: var(--mute);
  letter-spacing: 0.06em;
}

.legend b {
  font-weight: 400;
}

.legend b.company { color: var(--ink); }
.legend b.seeker { color: var(--accent); }

.text-btn {
  display: block;
  margin: 32px 0 0;
  border: 0;
  background: none;
  color: var(--mute);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}

:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* 求職者：リクルート系サービス寄りのUI。企業ページには効かない */
body[data-role="seeker"] {
  --bg: #fff6f1;
  --ink: #4a4a4a;
  --mute: #7a706c;
  --accent: #e23c2b;
  --card: #ffffff;
  --line: #f0e4dc;
}

body[data-role="seeker"] .blob {
  background: #ffd2c4;
  opacity: 0.85;
}

body[data-role="seeker"] .back-btn {
  border-radius: 8px;
  border-color: #e2d4cc;
  background: #fff;
}

body[data-role="seeker"] .back-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

body[data-role="seeker"] .eyebrow {
  color: var(--accent);
  letter-spacing: 0.08em;
}

body[data-role="seeker"] h1 {
  letter-spacing: 0.02em;
}

body[data-role="seeker"] .hl {
  color: var(--accent);
}

body[data-role="seeker"] .chips li {
  background: #fff;
  color: var(--accent);
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(226, 60, 43, 0.08);
}

body[data-role="seeker"] .start-card {
  max-width: 620px;
  padding: 28px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(226, 60, 43, 0.08);
}

body[data-role="seeker"] .start-card-label {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--accent);
}

body[data-role="seeker"] .flow {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

body[data-role="seeker"] .flow li {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 15px;
}

body[data-role="seeker"] .flow span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffe8e3;
  color: var(--accent);
  font-family: var(--en);
  font-size: 13px;
}

body[data-role="seeker"] .btn {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  min-width: 220px;
  height: 56px;
  letter-spacing: 0.06em;
}

body[data-role="seeker"] .btn:hover {
  filter: brightness(1.05);
  background: #c93324;
  color: #fff;
}

body[data-role="seeker"] .apply {
  background: var(--accent);
  color: #fff;
}

body[data-role="seeker"] .score {
  color: var(--accent);
}

body[data-role="seeker"] .fill {
  background: var(--accent);
}

body[data-role="seeker"] .app {
  padding-top: 48px;
}

body[data-role="seeker"] .lead {
  margin-bottom: 36px;
}

body[data-role="seeker"] .progress {
  display: grid;
  gap: 8px;
  margin: 0 0 28px;
  font-family: var(--en);
  font-size: 13px;
  color: var(--accent);
}

body[data-role="seeker"] .progress-bar {
  height: 4px;
  border-radius: 99px;
  background: #ffe8e3;
  overflow: hidden;
}

body[data-role="seeker"] .progress-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}

body[data-role="seeker"] .btn[hidden] {
  display: none;
}

body[data-role="seeker"] .q-card {
  margin: 0 0 28px;
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(226, 60, 43, 0.08);
}

body[data-role="seeker"] .q-card-label {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

body[data-role="seeker"] .q-card h3 {
  margin: 0 0 12px;
  font-family: var(--ja);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: none;
}

body[data-role="seeker"] .q-card > p {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

body[data-role="seeker"] .q-choice {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

body[data-role="seeker"] .choice-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

body[data-role="seeker"] .choice {
  margin: 0;
  padding: 16px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

body[data-role="seeker"] .choice-a {
  background: #eef3f8;
  color: var(--choice-a);
}

body[data-role="seeker"] .choice-b {
  background: #f8f0e8;
  color: var(--choice-b);
}

@media (max-width: 520px) {
  body[data-role="seeker"] .choice-pair {
    grid-template-columns: 1fr;
  }
}

body[data-role="seeker"] .result {
  max-width: 620px;
}

body[data-role="seeker"] .result-hero {
  text-align: center;
  padding: 36px 24px;
}

body[data-role="seeker"] .result-hero .score {
  margin: 8px 0 16px;
  font-size: clamp(64px, 14vw, 96px);
  line-height: 1;
  letter-spacing: -0.04em;
}

body[data-role="seeker"] .result-hero .result-copy {
  margin: 0 auto;
  max-width: 28em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--mute);
}

body[data-role="seeker"] .comments {
  display: grid;
  gap: 20px;
}

body[data-role="seeker"] .comment-row {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

body[data-role="seeker"] .comment-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

body[data-role="seeker"] .comment-title {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

body[data-role="seeker"] .comment-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}

body[data-role="seeker"] .result-actions {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: 8px;
}

body[data-role="seeker"] .result-actions .btn {
  width: 100%;
  max-width: 360px;
}

body[data-role="seeker"] .result-actions .muted {
  text-align: center;
}
