:root {
  --bg: #c5e6e9;
  --paper: #eef8f9;
  --paper2: #ffffff;
  --ink: #1b3a55;
  --muted: #4d6f86;
  --line: #bce1e5;
  --gold: #2f8894;
  --teal: #5ce1e6;
  --teal-glow: rgba(92, 225, 230, 0.5);
  --royal: #1d4ed8;
  --royal-hover: #173fae;
  --cta: #17707d;
  --cta-hover: #125a65;
  --gold-bg: #dcf2f4;
  --learn: #1769c9;
  --attack: #ef3e32;
  --guard: #12a867;
  --express: #f07a31;
  --serif: "Shippori Mincho", "Noto Serif JP", serif;
  --sans: "DM Sans", "Noto Sans JP", sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--serif);
}
button,
input {
  font: inherit;
}
.app-shell {
  width: min(100%, 500px);
  min-height: 100svh;
  margin: auto;
  background: var(--paper);
  border-top: 5px solid var(--teal);
  box-shadow: 0 0 50px rgba(27, 58, 85, 0.16);
  position: relative;
  overflow: hidden;
}
.app-header {
  height: 76px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 55px 1fr 55px;
  align-items: center;
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
}
.wordmark,
.icon-button,
.record-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.wordmark {
  font-size: 14px;
  letter-spacing: 0.16em;
}
.bolt {
  color: var(--gold);
  font-family: var(--sans);
  margin-right: 8px;
}
.icon-button {
  text-align: left;
  font-size: 22px;
}
.record-button {
  text-align: right;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.back-button.hidden {
  visibility: hidden;
}
main {
  min-height: calc(100svh - 76px);
  padding: 6px 34px 48px;
  outline: none;
}
.view {
  animation: enter 0.38s ease both;
}
.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.display {
  font-size: 34px;
  line-height: 1.65;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin: 0;
}
.body-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 2.2;
  letter-spacing: 0.04em;
}
.blueprint {
  height: 230px;
  margin: 0 -5px 30px;
  position: relative;
  display: grid;
  place-items: center;
}
.blueprint:before,
.blueprint:after {
  content: "";
  position: absolute;
  border-radius: 48% 52% 44% 56%;
  border: 1px solid #7bcad488;
  width: 158px;
  height: 158px;
}
.blueprint:before {
  background: #dcf2f4aa;
  transform: rotate(18deg);
}
.blueprint:after {
  width: 170px;
  height: 145px;
  background: #bce9ed99;
  transform: rotate(-28deg);
  border-color: #5ce1e688;
}
.blueprint .ring {
  width: 140px;
  height: 140px;
  border: 2px solid #2f8894;
  border-radius: 50%;
  z-index: 1;
}
.blueprint .self {
  position: absolute;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper2);
  z-index: 2;
  letter-spacing: 0.14em;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(27, 58, 85, 0.08);
}
.blueprint .orbit {
  position: absolute;
  width: 190px;
  height: 120px;
  border: 1px solid #5ce1e6aa;
  border-radius: 50%;
  transform: rotate(54deg);
  z-index: 3;
}
.blueprint .star {
  position: absolute;
  color: var(--gold);
  font-size: 16px;
  top: 18px;
  right: 25%;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 25px 0;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.85);
  font: 11px var(--sans);
  color: var(--muted);
}
.button-stack {
  display: grid;
  gap: 11px;
  margin-top: 24px;
}
.primary,
.secondary {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0 18px;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: all 0.2s ease;
}
.primary {
  background: var(--royal);
  border-color: var(--royal);
  color: white;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.28);
}
.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.primary:hover {
  background: var(--royal-hover);
  border-color: var(--royal-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.38);
}
.secondary:hover {
  background: rgba(27, 58, 85, 0.05);
}
.note {
  font-size: 9px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.notice-card {
  margin: 28px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  background: var(--paper2);
}
.notice-card h3 {
  font-size: 15px;
  margin: 0 0 10px;
}
.notice-card p {
  font-size: 11px;
  line-height: 2;
  color: var(--muted);
  margin: 0;
}
.consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 20px 0;
  font-size: 12px;
  line-height: 1.7;
}
.consent input {
  margin-top: 4px;
  accent-color: var(--cta);
}
.field {
  display: grid;
  gap: 9px;
  margin: 32px 0;
}
.field label {
  font-size: 12px;
}
.field input {
  height: 54px;
  padding: 0 15px;
  border: 1px solid var(--line);
  background: var(--paper2);
  color: var(--ink);
  border-radius: 2px;
}
.field small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
.instinct-map {
  width: 238px;
  height: 238px;
  margin: 15px auto 30px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  background: var(--paper2);
}
.instinct-map:before,
.instinct-map:after {
  content: "";
  position: absolute;
  width: 1px;
  height: 140%;
  left: 50%;
  top: -20%;
  background: #b5d5d8;
  transform: rotate(45deg);
}
.instinct-map:after {
  transform: rotate(-45deg);
}
.map-label {
  position: absolute;
  text-align: center;
  font-size: 11px;
  z-index: 2;
}
.map-label b {
  display: block;
  font-size: 14px;
}
.map-learn {
  top: 25px;
  left: 50%;
  width: max-content;
  transform: translateX(-50%);
  color: var(--learn);
}
.map-attack {
  top: 104px;
  left: 23px;
  color: var(--attack);
}
.map-guard {
  top: 104px;
  right: 22px;
  color: var(--guard);
}
.map-express {
  bottom: 25px;
  left: 50%;
  width: max-content;
  transform: translateX(-50%);
  color: var(--express);
}
.question-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 5px 0 15px;
}
.question-count {
  font: 600 10px var(--sans);
  letter-spacing: 0.15em;
  color: var(--gold);
}
.question-count strong {
  font-size: 24px;
  font-weight: 500;
}
.progress {
  height: 3px;
  background: var(--line);
  margin-bottom: 46px;
  border-radius: 2px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2f8894, #5ce1e6);
  transition: width 0.3s;
}
.question-title {
  font-size: 22px;
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 8px;
}
.question-sub {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}
.answers {
  display: grid;
  gap: 11px;
}
.answer {
  min-height: 64px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper2);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.6;
  transition: all 0.18s ease;
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.answer:hover,
.answer:focus {
  border-color: var(--gold);
  transform: translateX(2px);
  outline: 0;
}
.answer .checkbox {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 11px;
  color: transparent;
  transition: all 0.2s;
}
.answer.selected {
  border-color: var(--cta);
  background: #e3f4f6;
  font-weight: 500;
}
.answer.selected .checkbox {
  background: var(--cta);
  border-color: var(--cta);
  color: #ffffff;
}
.question-footer {
  margin-top: 24px;
}
.question-next-btn {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--royal);
  background: var(--royal);
  color: white;
  cursor: pointer;
  letter-spacing: 0.1em;
  font-size: 13px;
  transition: all 0.2s;
  border-radius: 2px;
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25);
}
.question-next-btn:hover:not(:disabled) {
  background: var(--royal-hover);
  border-color: var(--royal-hover);
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.35);
}
.question-next-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: #8faeb2;
  border-color: #8faeb2;
}
.loading {
  text-align: center;
  padding-top: 18vh;
}
.loader {
  width: 125px;
  height: 125px;
  margin: 30px auto;
  border: 1px solid var(--gold);
  border-radius: 50%;
  position: relative;
  animation: spin 3s linear infinite;
}
.loader:before {
  content: "✦";
  position: absolute;
  top: -9px;
  left: 53px;
  color: var(--gold);
  background: var(--paper);
  padding: 0 5px;
}
.loader:after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed #5ce1e6;
  border-radius: 50%;
}
.result-hero {
  margin: 0 -34px;
  padding: 20px 34px 34px;
  background: linear-gradient(150deg, #ffffff, #eaf7f8);
  border-bottom: 1px solid var(--line);
}
.result-badge {
  width: 116px;
  height: 116px;
  margin: 20px auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid currentColor;
  position: relative;
  background: var(--paper2);
}
.result-badge:after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed currentColor;
  border-radius: 50%;
}
.result-badge span {
  font-size: 22px;
  font-weight: 600;
}
.result-badge.composite {
  border-width: 2.5px;
}
.result-badge.composite span {
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.05em;
}
.result-title {
  text-align: center;
  font-size: 25px;
  line-height: 1.5;
  margin: 10px 0 8px;
}
.result-sub {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  max-width: 320px;
  margin: 0 auto;
}
.sub-instinct-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px auto 0;
  padding: 5px 14px;
  background: #dcf2f4;
  border-radius: 99px;
  font-size: 11px;
  color: var(--ink);
  border: 1px solid var(--line);
}
.sub-instinct-tag b {
  font-weight: 600;
}
.score-list {
  display: grid;
  gap: 13px;
  margin: 30px 0;
}
.score-row {
  display: grid;
  grid-template-columns: 62px 1fr 25px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.score-track {
  height: 5px;
  background: #cfe8ea;
  border-radius: 2px;
  overflow: hidden;
}
.score-track span {
  display: block;
  height: 100%;
  background: currentColor;
}
.report-card {
  padding: 25px 0;
  border-top: 1px solid var(--line);
}
.report-card .label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--gold);
}
.report-card h3 {
  font-size: 19px;
  margin: 10px 0;
}
.report-card p {
  font-size: 12px;
  line-height: 2;
  color: var(--muted);
  margin: 0;
}
.action-card {
  padding: 26px 24px;
  background: var(--cta);
  color: white;
  margin: 15px 0 25px;
  border-radius: 3px;
  box-shadow: 0 4px 16px rgba(23, 112, 125, 0.25);
}
.action-card .eyebrow {
  display: block;
  color: #5ce1e6;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin: 0 0 10px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.action-card h3 {
  margin: 0;
  font-size: 20px;
  color: #ffffff;
}
.action-card p {
  font-size: 13.5px;
  line-height: 2;
  margin: 12px 0 0;
  color: #f0fbfc;
}

/* 個別鑑定案内カード (CTA) */
.consult-card {
  margin: 35px 0 25px;
  padding: 24px;
  background: linear-gradient(145deg, #ffffff, #eaf7f8);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  position: relative;
}
.consult-card .eyebrow {
  margin-bottom: 8px;
}
.consult-card h3 {
  font-size: 18px;
  margin: 0 0 10px;
  color: var(--ink);
  line-height: 1.5;
}
.consult-card p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0 0 18px;
}
.consult-button {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--cta);
  color: #ffffff;
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.1em;
  border-radius: 2px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(23, 112, 125, 0.2);
}
.consult-button:hover {
  background: var(--cta-hover);
  box-shadow: 0 6px 16px rgba(23, 112, 125, 0.3);
}

/* SNSシェアセクション */
.share-section {
  margin: 25px 0 15px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.share-title {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink);
  text-align: center;
  margin-bottom: 14px;
}
.share-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  background: var(--paper2);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
}
.share-btn:hover {
  border-color: var(--gold);
  background: #ffffff;
  transform: translateY(-1px);
}
.share-icon {
  font-size: 15px;
  line-height: 1;
}
.share-btn.x-btn {
  font-family: var(--sans);
}
.share-btn.line-btn {
  color: #06c755;
  border-color: #c9e8d3;
}
.share-btn.copy-btn {
  color: var(--ink);
}

/* トースト通知 */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(27, 58, 85, 0.94);
  color: #ffffff;
  padding: 12px 24px;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 99px;
  box-shadow: 0 8px 24px rgba(27, 58, 85, 0.25);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 100;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.history-title {
  font-size: 29px;
  margin: 8px 0 18px;
}
.history-intro {
  font-size: 12px;
  color: var(--muted);
  line-height: 2;
}
.history-list {
  display: grid;
  gap: 12px;
  margin: 28px 0;
}
.history-card {
  width: 100%;
  min-height: 110px;
  padding: 20px;
  border: 0;
  border-left: 5px solid;
  background: var(--paper2);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
  transition: transform 0.2s;
  box-shadow: 0 2px 8px rgba(27, 58, 85, 0.04);
}
.history-card:hover {
  transform: translateX(3px);
}
.history-card h3 {
  font-size: 17px;
  margin: 0 0 8px;
}
.history-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.empty {
  text-align: center;
  margin: 80px 0;
  color: var(--muted);
  font-size: 12px;
}
.disclaimer {
  padding: 14px;
  background: #e4f3f5;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.8;
  margin: 20px 0;
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 501px) {
  .app-shell {
    min-height: 900px;
  }
  .app-header {
    position: sticky;
    top: 0;
    background: rgba(240, 248, 249, 0.94);
    backdrop-filter: blur(8px);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
