/* デザインは D「朝凪」（spec.md 3-0）。スマホの縦画面が基準 */
:root {
  --sky: #F3F8FB;
  --sea: #2E8C9A;
  --deep: #1F4E5F;
  --sun: #F2A65A;
  --sun-text: #B5600F;
  --mist: #D8E8EE;
  --white: #fff;
}

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

html { background: #DCE9EF; }

body {
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--deep);
  -webkit-text-size-adjust: 100%;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  background: var(--sky);
}

.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* hidden 属性を display:flex より優先させる */
.screen[hidden] { display: none; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--deep);
  outline-offset: 3px;
}

h1:focus, h2:focus { outline: none; }

ol, dl { list-style: none; }

.btn {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 99px;
  line-height: 1.4;
}

/* ---------- トップ ---------- */
.top { color: var(--white); }

.sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.top-head {
  position: relative;
  padding: 60px 30px 0;
  text-align: center;
  color: var(--deep);
}

.badge {
  display: inline-block;
  font-size: 13px;
  line-height: 1.4;
  background: var(--white);
  color: #23707D;
  padding: 5px 14px;
  border-radius: 99px;
}

h1 {
  font-size: 42px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .04em;
  margin-top: 16px;
}

.top-foot {
  position: relative;
  margin-top: auto;
  padding: 0 30px 34px;
  text-align: center;
}

.lead { font-size: 16px; }

.time {
  font-size: 14px;
  margin: 10px 0 18px;
}

.btn-start {
  background: var(--white);
  color: var(--deep);
  font-size: 19px;
  padding: 18px;
  letter-spacing: .12em;
}

.top :focus-visible { outline-color: var(--white); }

/* ---------- 質問 ---------- */
.question { padding: 28px 24px 20px; }

.bar {
  height: 12px;
  border-radius: 99px;
  background: var(--mist);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 10%;
  background: var(--sea);
  border-radius: 99px;
  transition: width .25s ease;
}

.count {
  font-size: 14px;
  color: #23707D;
  margin: 10px 0 28px;
}

.question h2 {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.55;
  margin-bottom: 26px;
}

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

.choice {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 60px;
  text-align: left;
  background: var(--white);
  border-radius: 20px;
  padding: 15px 18px;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 2px 0 var(--mist);
}

.choice .no {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #EAF4F8;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #23707D;
}

.choice.is-picked {
  background: #23707D;
  color: var(--white);
  box-shadow: 0 2px 0 var(--deep);
}

.choice.is-picked .no { background: var(--white); }

.back {
  margin-top: auto;
  align-self: center;
  font-size: 15px;
  color: #23707D;
  padding: 14px 16px 6px;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.demo-mark {
  text-align: center;
  font-size: 12px;
  color: #5b7f8b;
}

/* ---------- 結果（4コマ漫画の形） ---------- */
.result {
  background: var(--white);
  padding: 18px 16px 22px;
  text-align: center;
}

.yon {
  display: grid;
  gap: 8px;
  counter-reset: koma;
}

.koma {
  position: relative;
  border: 3px solid var(--deep);
  border-radius: 4px;
  overflow: hidden;
  counter-increment: koma;
}

/* コマの番号 */
.koma::before {
  content: counter(koma);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  background: var(--deep);
  color: var(--white);
  font-size: 11px;
  line-height: 1;
}

.k1 {
  background: linear-gradient(#DDEEF7, #FCE6D2);
  padding: 14px 16px 12px;
}

.you {
  font-size: 14px;
  color: #23707D;
}

.type {
  font-size: 34px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 6px;
}

.type small {
  font-size: 17px;
  margin-left: 4px;
}

.desc {
  font-size: 14.5px;
  line-height: 1.7;
  text-align: left;
}

.k2 {
  display: flex;
  align-items: stretch;
  background: #EAF4F8;
  text-align: left;
}

.k2 img {
  flex: none;
  width: 42%;
  max-width: 170px;
  height: auto;
  align-self: flex-end;
  display: block;
}

.talk {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 10px 8px 14px;
}

.bubble {
  position: relative;
  background: var(--white);
  border: 2.5px solid var(--deep);
  border-radius: 18px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
}

/* 吹き出しのしっぽ（キャラクターのほうへ向ける） */
.bubble::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 22px;
  width: 16px;
  height: 16px;
  background: var(--white);
  border-left: 2.5px solid var(--deep);
  border-bottom: 2.5px solid var(--deep);
  transform: rotate(45deg) skew(12deg, 12deg);
}

.who {
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  color: var(--deep);
  text-align: right;
}

.src {
  font-size: 11.5px;
  line-height: 1.5;
  color: #4d7280;
  text-align: right;
}

.k3 { padding: 4px 0 0; }

.radar {
  display: block;
  width: 100%;
  height: auto;
}

.radar .r100 { fill: #EAF4F8; }
.radar .r75 { fill: #DCEDF3; }
.radar .r50 { fill: #CDE5EC; }
.radar .r25 { fill: #BFDDE6; }
.radar .spoke { stroke: var(--white); stroke-width: 1.5; }
.radar .area { fill: var(--sun); fill-opacity: .82; stroke: var(--sun); stroke-width: 5; stroke-linejoin: round; }
.radar .dot { fill: var(--white); stroke: #E08A34; stroke-width: 2; }
.radar .lbl { font-size: 13px; fill: var(--deep); }
.radar .num { font-size: 15.5px; fill: var(--sun-text); }

.k4 {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--deep);
  color: var(--white);
  padding: 12px;
  text-align: left;
}

.k4 img {
  flex: none;
  width: 40%;
  max-width: 170px;
  height: auto;
  border: 2px solid var(--white);
  border-radius: 3px;
}

.k4 img[hidden] { display: none; }

.job { flex: 1; padding-left: 4px; }

.job h3 {
  font-size: 12.5px;
  font-weight: 400;
  color: #F8C894;
}

.job dt {
  font-size: 21px;
  line-height: 1.45;
}

.job dd {
  font-size: 13px;
  line-height: 1.6;
}

.job dd + dt { margin-top: 8px; }

.manga {
  display: inline-block;
  align-self: center;
  margin-top: 12px;
  padding: 6px 8px;
  font-size: 14.5px;
  color: #23707D;
  text-underline-offset: 5px;
}

.note {
  font-size: 12px;
  line-height: 1.6;
  color: #4d7280;
  margin: 6px 0 6px;
  text-align: left;
}

.credit {
  font-size: 11px;
  line-height: 1.5;
  color: #5b7f8b;
  text-align: left;
  margin-bottom: 14px;
}

.btn-again {
  margin-top: auto;
  border: 2px solid #23707D;
  color: #23707D;
  font-size: 16px;
  padding: 12px;
}

.noscript {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 24px;
  background: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  .bar i { transition: none; }
}
