:root {
  --bg: #f6f3ee;
  --paper: #fffdf8;
  --paper-2: #fbf7ee;
  --ink: #201b16;
  --muted: #7b7066;
  --line: #e7ddcf;
  --brand: #705c43;
  --brand-2: #b48b5d;
  --violet: #6c5ce7;
  --blue: #3b76c6;
  --orange: #bf6a27;
  --cyan: #24847c;
  --shadow: 0 18px 48px rgba(75, 55, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  letter-spacing: 0;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(112, 92, 67, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(circle at 10% 0%, rgba(180, 139, 93, 0.16), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans SC",
    system-ui,
    sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.app-shell {
  width: min(100%, 920px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
}

.book {
  min-height: calc(100vh - 36px);
  border: 1px solid rgba(112, 92, 67, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(112, 92, 67, 0.06) 0 1px, transparent 1px 100%),
    var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page {
  display: flex;
  min-height: calc(100vh - 38px);
  flex-direction: column;
  padding: 22px;
}

.topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  flex: 1 1 190px;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 10px 24px rgba(112, 92, 67, 0.2);
}

.brand span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hero {
  display: grid;
  flex: 1;
  align-items: center;
  gap: 26px;
  padding: 28px 0 10px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  padding: 7px 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.title {
  margin-top: 18px;
  font-size: clamp(34px, 10vw, 68px);
  line-height: 1.05;
  letter-spacing: 0;
}

.subtitle {
  margin-top: 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.badges,
.mini-grid,
.tag-grid,
.action-grid {
  display: grid;
  gap: 10px;
}

.badges {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 22px;
}

.badge,
.note,
.tag,
.info-card,
.result-line,
.option,
.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
}

.badge {
  padding: 12px 8px;
  text-align: center;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.primary,
.secondary,
.text-button,
.icon-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 0 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.16s ease,
    opacity 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

.icon-button {
  width: 46px;
  min-width: 46px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.compact-button {
  min-height: 38px;
  border-radius: 12px;
  padding: 0 12px;
  font-size: 13px;
}

.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  box-shadow: 0 14px 26px rgba(112, 92, 67, 0.2);
}

.secondary {
  border-color: var(--line);
  background: #fffaf1;
  color: var(--ink);
}

.text-button,
.icon-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
}

.primary:hover,
.secondary:hover,
.text-button:hover,
.icon-button:hover,
.option:hover {
  transform: translateY(-1px);
}

.primary:active,
.secondary:active,
.text-button:active,
.icon-button:active,
.option:active {
  transform: scale(0.985);
}

.primary:disabled,
.secondary:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
  box-shadow: none;
}

.primary:focus-visible,
.secondary:focus-visible,
.text-button:focus-visible,
.icon-button:focus-visible,
.option:focus-visible {
  outline: 3px solid rgba(180, 139, 93, 0.3);
  outline-offset: 3px;
}

.cta-block {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.note {
  padding: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.shelf {
  position: relative;
  min-height: 260px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(251, 247, 238, 0.8)),
    radial-gradient(circle at 25% 20%, rgba(112, 92, 67, 0.16), transparent 8rem);
  overflow: hidden;
}

.shelf::before,
.shelf::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(112, 92, 67, 0.16);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 20px 42px rgba(75, 55, 32, 0.12);
}

.shelf::before {
  left: 38px;
  bottom: 34px;
  width: 138px;
  height: 168px;
  border-radius: 12px 18px 18px 12px;
  transform: rotate(-5deg);
}

.shelf::after {
  right: 42px;
  bottom: 58px;
  width: 112px;
  height: 142px;
  border-radius: 18px;
  transform: rotate(8deg);
}

.orb {
  position: absolute;
  right: 34%;
  bottom: 80px;
  width: 86px;
  height: 86px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  transform: rotate(14deg);
  z-index: 2;
}

.footer-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.intro-list {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.intro-item {
  display: flex;
  gap: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-grid span {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
  padding: 12px;
  color: var(--brand);
  font-size: 14px;
  text-align: center;
}

.quiz-top {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -22px -22px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  padding: 14px 22px;
  backdrop-filter: blur(12px);
}

.quiz-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-track {
  height: 6px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9dfd0;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.25s ease;
}

.question-wrap {
  flex: 1;
  padding: 26px 0 92px;
}

.scene {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  padding: 7px 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.question-title {
  margin-top: 18px;
  font-size: 23px;
  line-height: 1.42;
  letter-spacing: 0;
}

.options {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.option {
  width: 100%;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.option.selected {
  border-color: rgba(112, 92, 67, 0.5);
  background: #fff7e7;
}

.option-letter {
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: #efe5d6;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.option-text {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.65;
}

.check {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #d5c7b4;
  border-radius: 999px;
  color: transparent;
}

.option.selected .check {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 10;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.95);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  backdrop-filter: blur(12px);
}

.bottom-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  width: min(100%, 884px);
  margin: 0 auto;
}

.loader {
  display: grid;
  flex: 1;
  place-items: center;
  text-align: center;
}

.loader-ring {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border: 5px solid #e4d9ca;
  border-top-color: var(--brand);
  border-radius: 999px;
  animation: spin 1s linear infinite;
}

.neo-result-book {
  border-color: rgba(154, 124, 255, 0.24);
  background: #03060d;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.neo-result-book .page {
  min-height: calc(100vh - 38px);
  padding: 0;
  background: #03060d;
}

.neo-result {
  position: relative;
  width: min(100%, 430px);
  margin: 0 auto;
  overflow: hidden;
  padding: 18px 14px 26px;
  color: #f4f6ff;
  background:
    linear-gradient(180deg, rgba(2, 5, 12, 0.25), #03060d 46%),
    linear-gradient(90deg, rgba(3, 6, 13, 0.5), rgba(3, 6, 13, 0.12) 48%, rgba(3, 6, 13, 0.74)),
    var(--result-bg-image, url("./assets/result-bg.png")) center top / cover no-repeat,
    #03060d;
}

.neo-result::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 6, 13, 0.08), #03060d 58%),
    radial-gradient(circle at 74% 22%, rgba(141, 91, 255, 0.22), transparent 28%);
}

.neo-nav,
.neo-hero-panel,
.neo-data-panel,
.neo-card,
.neo-tags,
.neo-saying,
.neo-actions,
.neo-disclaimer {
  position: relative;
  z-index: 1;
}

.neo-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.neo-icon-button,
.neo-top-action,
.neo-link,
.neo-share-button,
.neo-secondary-button {
  border: 1px solid rgba(174, 194, 255, 0.18);
  color: #f4f6ff;
  font: inherit;
  cursor: pointer;
}

.neo-icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: rgba(10, 17, 31, 0.42);
  font-size: 30px;
  line-height: 1;
}

.neo-top-action,
.neo-link {
  min-height: 36px;
  border-radius: 999px;
  background: rgba(10, 17, 31, 0.42);
  padding: 0 13px;
  color: rgba(244, 246, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.neo-hero-panel {
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(154, 124, 255, 0.2);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(5, 9, 18, 0.08), rgba(3, 6, 13, 0.92)),
    #071020;
  padding: 58px 20px 22px;
  box-shadow: inset 0 0 42px rgba(99, 74, 208, 0.2);
}

.neo-city {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3, 6, 13, 0.16), rgba(3, 6, 13, 0.78) 72%, rgba(3, 6, 13, 0.96)),
    linear-gradient(90deg, rgba(3, 6, 13, 0.2), rgba(3, 6, 13, 0.02) 52%, rgba(3, 6, 13, 0.35)),
    var(--result-bg-image, url("./assets/result-bg.png")) center center / cover no-repeat;
}

.neo-kicker {
  color: rgba(235, 239, 255, 0.68);
  font-size: 14px;
  font-weight: 700;
}

.neo-title {
  position: relative;
  max-width: 76%;
  margin-top: 14px;
  color: #f7f8ff;
  font-size: clamp(42px, 13vw, 64px);
  font-style: italic;
  font-weight: 950;
  line-height: 0.98;
  text-shadow: 0 0 18px rgba(130, 102, 255, 0.78);
}

.neo-title::after {
  display: block;
  width: 112px;
  height: 3px;
  margin-top: 12px;
  background: linear-gradient(90deg, #8c5cff, transparent);
  content: "";
}

.neo-script {
  margin-top: -4px;
  margin-left: 52%;
  color: #9d65ff;
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 38px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(157, 101, 255, 0.72);
  transform: rotate(-9deg);
}

.neo-quote-line {
  max-width: 60%;
  margin-top: 18px;
  border-left: 2px solid #8c5cff;
  padding-left: 12px;
  color: rgba(244, 246, 255, 0.84);
  font-size: 14px;
  line-height: 1.7;
}

.neo-hero-score {
  position: relative;
  width: min(235px, 68%);
  margin-top: 18px;
  border: 1px solid rgba(190, 174, 255, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(4, 9, 19, 0.6), rgba(4, 9, 19, 0.36));
  padding: 12px;
  backdrop-filter: blur(10px);
}

.neo-hero-score > span,
.neo-hero-score p {
  color: rgba(235, 239, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.neo-hero-score strong {
  display: inline-block;
  margin-top: 2px;
  color: #f7f8ff;
  font-size: 70px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.38);
}

.neo-hero-score small {
  margin-left: 5px;
  color: rgba(235, 239, 255, 0.72);
  font-size: 18px;
}

.neo-hero-score .neo-score-track {
  width: 100%;
  margin-top: 7px;
}

.neo-data-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  border: 1px solid rgba(174, 194, 255, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(19, 28, 50, 0.8), rgba(6, 12, 24, 0.9)),
    rgba(6, 12, 24, 0.86);
  padding: 10px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.neo-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.neo-data-item {
  min-width: 0;
  border: 1px solid rgba(174, 194, 255, 0.12);
  border-radius: 12px;
  background: rgba(5, 10, 21, 0.58);
  padding: 10px;
}

.neo-data-item span {
  display: block;
  color: rgba(235, 239, 255, 0.52);
  font-size: 11px;
  font-weight: 800;
}

.neo-data-item strong {
  display: block;
  margin-top: 6px;
  color: #f7f8ff;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.neo-score-row {
  margin-top: 22px;
}

.neo-score-row span,
.neo-score-row p {
  color: rgba(235, 239, 255, 0.78);
  font-size: 13px;
  font-weight: 800;
}

.neo-score-row strong {
  display: inline-block;
  margin-top: 2px;
  color: #f7f8ff;
  font-size: 74px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.4);
}

.neo-score-row small {
  margin-left: 6px;
  color: rgba(235, 239, 255, 0.68);
  font-size: 18px;
}

.neo-score-track {
  width: min(190px, 56%);
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.neo-score-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a985ff, #5d42f1);
  box-shadow: 0 0 18px rgba(169, 133, 255, 0.8);
}

.neo-card,
.neo-saying {
  margin-top: 14px;
  border: 1px solid rgba(174, 194, 255, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(18, 28, 46, 0.72), rgba(8, 13, 24, 0.86));
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.03);
}

.neo-card {
  padding: 16px;
}

.neo-card h2,
.neo-section-head h2 {
  color: #f7f8ff;
  font-size: 16px;
  line-height: 1.35;
}

.neo-card p {
  margin-top: 10px;
  color: rgba(235, 239, 255, 0.72);
  font-size: 14px;
  line-height: 1.75;
}

.neo-tags {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  border: 1px solid rgba(174, 194, 255, 0.14);
  border-radius: 12px;
  background: rgba(8, 13, 24, 0.72);
  padding: 10px;
}

.neo-tags div {
  min-width: 0;
}

.neo-tags span {
  display: block;
  color: rgba(235, 239, 255, 0.55);
  font-size: 12px;
  font-weight: 800;
}

.neo-tags strong {
  display: inline-flex;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  margin-top: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(140, 92, 255, 0.72), rgba(38, 167, 204, 0.38));
  padding: 5px 10px;
  color: #f7f8ff;
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.neo-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.neo-radar-box {
  margin-top: 10px;
}

.neo-radar-box canvas {
  display: block;
  width: 100%;
  height: auto;
}

.neo-key-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.neo-key-grid div {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
}

.neo-key-grid span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(204, 194, 255, 0.3);
  border-radius: 999px;
  background: rgba(140, 92, 255, 0.2);
  color: #f7f8ff;
  font-size: 15px;
  font-weight: 900;
}

.neo-key-grid small {
  color: rgba(235, 239, 255, 0.78);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

.neo-saying {
  padding: 18px 16px;
}

.neo-saying span {
  color: rgba(235, 239, 255, 0.42);
  font-size: 46px;
  line-height: 0.5;
}

.neo-saying strong {
  display: block;
  color: #f7f8ff;
  font-size: 18px;
  line-height: 1.55;
}

.neo-saying em {
  display: block;
  margin-top: 8px;
  color: rgba(235, 239, 255, 0.56);
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 24px;
  text-align: right;
}

.neo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.neo-share-button,
.neo-secondary-button {
  min-height: 50px;
  border-radius: 10px;
  font-weight: 900;
}

.neo-share-button {
  grid-column: 1 / -1;
  border: 0;
  background: linear-gradient(135deg, #a985ff, #4b31df);
  box-shadow: 0 12px 28px rgba(101, 72, 255, 0.38);
}

.neo-secondary-button {
  background: rgba(9, 18, 31, 0.76);
}

.neo-disclaimer {
  margin-top: 18px;
  color: rgba(235, 239, 255, 0.42);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.result-hero {
  display: grid;
  gap: 16px;
  padding-top: 24px;
}

.reveal {
  border: 1px solid #ded3c3;
  border-radius: 16px;
  background: #fff6e5;
  padding: 14px;
  color: var(--brand);
  font-size: 14px;
  line-height: 1.7;
}

.score-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdf8, #fbf3e6);
  padding: 18px;
  box-shadow: var(--shadow);
}

.score-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  align-items: start;
  gap: 12px;
}

.score-title {
  margin-top: 6px;
  font-size: 32px;
  line-height: 1.14;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.score-number {
  margin-top: 16px;
  font-size: 70px;
  font-weight: 950;
  line-height: 1;
  color: var(--brand);
}

.score-summary {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.seal {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.tag-grid {
  margin-top: 14px;
}

.tag {
  display: grid;
  grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  color: var(--muted);
  font-size: 14px;
}

.tag strong {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.tone-purple strong {
  background: #efedff;
  color: var(--violet);
}

.tone-orange strong {
  background: #fff0e2;
  color: var(--orange);
}

.tone-blue strong {
  background: #eaf3ff;
  color: var(--blue);
}

.tone-cyan strong {
  background: #e8faf7;
  color: var(--cyan);
}

.tone-gray strong {
  background: #efefef;
  color: #555;
}

.detail-layout {
  display: grid;
  gap: 14px;
  padding-top: 20px;
}

.panel {
  padding: 16px;
}

.radar-box {
  width: 100%;
  max-width: 420px;
  margin: 12px auto 0;
}

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

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

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
}

.bar-meta span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bar-meta span:last-child {
  flex: 0 0 auto;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadfce;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

details.panel summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  cursor: pointer;
  list-style: none;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

details.panel summary span {
  display: inline-grid;
  min-width: 42px;
  min-height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #f4ecdf;
  color: var(--brand);
  font-size: 13px;
  line-height: 1;
}

details.panel summary::-webkit-details-marker {
  display: none;
}

.detail-text {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 20;
  max-width: calc(100% - 36px);
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(32, 27, 22, 0.88);
  padding: 10px 14px;
  color: #fff;
  font-size: 13px;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(2, 5, 13, 0.82);
  padding: 18px;
}

.share-sheet {
  width: min(100%, 430px);
  border: 1px solid rgba(154, 124, 255, 0.24);
  border-radius: 22px;
  background: #050912;
  padding: 14px;
  color: #f4f6ff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

.share-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

#shareCanvas {
  width: 100%;
  border-radius: 18px;
  background: #03060d;
  box-shadow: 0 0 0 1px rgba(154, 124, 255, 0.18);
}

.share-sheet .text-button,
.share-sheet .secondary {
  border-color: rgba(174, 194, 255, 0.18);
  background: rgba(9, 18, 31, 0.76);
  color: #f4f6ff;
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 760px) {
  .page {
    padding: 30px;
  }

  .hero {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .cta-block {
    max-width: 420px;
  }

  .result-hero {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }

  .detail-layout {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
