:root {
  color-scheme: light;
  --bg: #fff4f6;
  --paper: #fffdfb;
  --ink: #201f1d;
  --muted: #6f7774;
  --line: #d8eee8;
  --accent: #f39aae;
  --accent-2: #74d6c6;
  --soft: #e9fbf7;
  --green: #6f8d72;
}

* {
  box-sizing: border-box;
}

body,
.result,
.result-card,
.panel,
.long-desc,
.type-code,
.dimension-bars,
.details,
.disclaimer,
.author-contact-card {
  user-select: text;
  -webkit-user-select: text;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(145deg, #f1fbf8 0%, #fffaf8 36%, #fff4f7 68%, #eafbf7 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  letter-spacing: 0;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.app {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 36px 28px 72px;
}

.hero,
.result-card,
.panel,
.question-card {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 60px rgba(60, 50, 35, 0.08);
}

.hero {
  position: relative;
  min-height: auto;
  margin-top: clamp(22px, 6vh, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(58px, 6vw, 76px) 68px 48px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-top,
.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero > :not(.hero-emoji-layer) {
  position: relative;
  z-index: 2;
}

.hero-emoji-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.hero-emoji {
  position: absolute;
  display: inline-block;
  line-height: 1;
  filter: drop-shadow(0 8px 13px rgba(218, 96, 130, 0.16));
  transform-origin: center;
}

.emoji-top-left {
  top: 70px;
  left: 28%;
  font-size: 46px;
  opacity: 0.9;
  transform: rotate(-16deg);
}

.emoji-top-right {
  top: 80px;
  left: 72%;
  font-size: 36px;
  opacity: 0.86;
  transform: rotate(14deg);
}

.emoji-top-note {
  top: 82px;
  left: 67%;
  font-size: 28px;
  opacity: 0.75;
  transform: rotate(-12deg);
}

.emoji-left-high {
  top: 36%;
  left: 14%;
  font-size: 44px;
  opacity: 0.82;
  transform: rotate(-18deg);
}

.emoji-left-mid {
  top: 55%;
  left: 13%;
  font-size: 40px;
  opacity: 0.9;
  transform: rotate(15deg);
}

.emoji-left-low {
  top: 43%;
  right: 6%;
  left: auto;
  font-size: 60px;
  opacity: 0.88;
  transform: rotate(13deg);
}

.emoji-burst-main {
  right: auto;
  bottom: 28%;
  left: 78%;
  font-size: 66px;
  opacity: 0.92;
  transform: rotate(-12deg);
}

.emoji-burst-fire {
  top: 58%;
  right: auto;
  bottom: auto;
  left: 25%;
  font-size: 40px;
  opacity: 0.86;
  transform: rotate(17deg);
}

.emoji-burst-pop {
  right: 7%;
  bottom: 41%;
  font-size: 32px;
  opacity: 0.82;
  transform: rotate(-15deg);
}

.emoji-burst-heart {
  right: 14%;
  top: 30%;
  font-size: 38px;
  opacity: 0.86;
  transform: rotate(18deg);
}

.pill,
.badges span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 700;
}

.pill.muted {
  color: var(--muted);
  background: transparent;
}

.hero-badge {
  min-height: 38px;
  padding: 7px 30px;
  background: rgba(255, 255, 255, 0.74);
  color: #dd8ca1;
  letter-spacing: 0.14em;
  word-spacing: 0.22em;
}

h1 {
  margin: 24px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(51px, 4.9vw, 68px);
  line-height: 1.06;
}

h1 span {
  display: block;
  white-space: nowrap;
}

.subtitle {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.64;
}

.hero-note {
  margin: 10px 0 32px;
  color: var(--muted);
  font-size: 18px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.6;
}

.hero-actions {
  justify-content: center;
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.type-chips {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
  max-width: 860px;
}

.type-chips span:not(.chip-note) {
  min-height: 42px;
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: #5f5254;
  font-weight: 900;
}

.chip-note {
  color: var(--muted);
  font-weight: 600;
}

.footer-note {
  margin: 24px 0 0;
  color: var(--muted);
  width: min(640px, 100%);
  padding: 14px 16px 15px;
  border: 1px solid rgba(236, 160, 185, 0.18);
  border-radius: 22px;
  background: rgba(255, 253, 251, 0.54);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 400;
  box-shadow: 0 14px 36px rgba(218, 96, 130, 0.06);
}

.footer-note p {
  margin: 0;
}

.footer-note-title {
  color: #705f61;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

.share-route {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(260px, 1.2fr);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}

.share-route-prompt {
  justify-self: end;
  color: rgba(112, 95, 97, 0.78);
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  white-space: nowrap;
}

.share-targets {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.chat-item {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  width: min(420px, 100%);
  min-height: 50px;
  padding: 7px 12px;
  border: 1px solid rgba(236, 160, 185, 0.14);
  border-radius: 14px;
  background: rgba(255, 250, 252, 0.72);
  box-shadow: 0 10px 22px rgba(218, 96, 130, 0.055);
  transform-origin: 24px center;
}

.chat-item i {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(236, 160, 185, 0.2);
  background: rgba(255, 244, 247, 0.96);
  box-shadow: 0 6px 16px rgba(218, 96, 130, 0.08);
  font-style: normal;
  font-size: 17px;
}

.chat-item b {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #675557;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
}

.chat-item-one {
  transform: rotate(-2deg);
}

.chat-item-two {
  margin-top: -1px;
  margin-left: 18px;
  transform: rotate(1.5deg);
}

.chat-item-three {
  margin-top: -1px;
  margin-left: 6px;
  transform: rotate(-1deg);
}

.footer-note-end {
  margin-top: 12px !important;
  color: rgba(112, 95, 97, 0.76);
  font-size: 13px;
  font-weight: 500;
}

.primary,
.secondary {
  min-height: 52px;
  padding: 0 28px;
  border-radius: 16px;
  font-weight: 800;
}

.primary {
  background: var(--accent);
  color: white;
}

.primary:disabled {
  background: #beb7aa;
  cursor: not-allowed;
}

.secondary {
  background: var(--paper);
  color: var(--accent);
  border: 1px solid var(--line);
}

.hidden {
  display: none;
}

.sticky-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(12px);
}

.sticky-bar > div:first-child {
  display: flex;
  gap: 10px;
  align-items: baseline;
  white-space: nowrap;
}

.eyebrow,
.result-kicker {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.progress {
  position: relative;
  height: 10px;
  overflow: visible;
  border-radius: 999px;
  background: var(--soft);
  --heart-one-fill: 0%;
  --heart-two-fill: 0%;
  --ring-one-fill: 0%;
  --ring-two-fill: 0%;
}

#progressFill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f39aae, #ffc2cf, #74d6c6);
  transition: width 0.2s ease;
  overflow: hidden;
}

.progress-heart {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(
    to top,
    var(--ring-color) 0 var(--ring-fill),
    rgba(255, 253, 251, 0.96) var(--ring-fill) 100%
  );
  box-shadow:
    0 2px 8px rgba(243, 154, 174, 0.2),
    inset 0 0 0 1px rgba(243, 154, 174, 0.2);
  pointer-events: none;
  z-index: 3;
}

.progress-heart::before,
.progress-heart::after {
  content: "♥";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  z-index: 1;
}

.progress-heart::before {
  color: rgba(243, 154, 174, 0.22);
}

.progress-heart::after {
  color: #f39aae;
  text-shadow: 0 1px 4px rgba(243, 154, 174, 0.28);
}

.progress-heart-one {
  left: 50%;
  --heart-fill: var(--heart-one-fill);
  --ring-fill: var(--ring-one-fill);
  --ring-color: #fff1a8;
}

.progress-heart-one::after {
  clip-path: inset(calc(100% - var(--heart-fill)) 0 0 0);
}

.progress-heart-two {
  left: 85%;
  --heart-fill: var(--heart-two-fill);
  --ring-fill: var(--ring-two-fill);
  --ring-color: #7fe7dc;
}

.progress-heart-two::after {
  clip-path: inset(calc(100% - var(--heart-fill)) 0 0 0);
}

.progress-bubble {
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 2px solid rgba(255, 126, 169, 0.78);
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.72),
    0 2px 8px rgba(255, 126, 169, 0.16);
  animation: bubble-rise 1s ease-out forwards;
  pointer-events: none;
  z-index: 4;
}

.progress-bubble::before,
.progress-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 154, 188, 0.7);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.72);
}

.progress-bubble::before {
  top: 11px;
  width: 6px;
  height: 6px;
  transform: translateX(-50%);
}

.progress-bubble::after {
  top: 22px;
  width: 4px;
  height: 4px;
  transform: translateX(-50%);
}

@keyframes bubble-rise {
  from {
    opacity: 0;
    transform: translate(-50%, 18px) scale(0.45) rotate(-8deg);
  }
  25% {
    opacity: 1;
  }
  55% {
    transform: translate(10px, -12px) scale(1) rotate(6deg);
  }
  to {
    opacity: 0;
    transform: translate(34px, -46px) scale(1.55) rotate(12deg);
  }
}

.question-card {
  margin-bottom: 14px;
  padding: 22px;
}

.question-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.q-index {
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  opacity: 0.76;
}

.category {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(233, 251, 247, 0.72);
  color: rgba(221, 126, 151, 0.72);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.question-title {
  margin: 0;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.option {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.option:hover,
.option.selected {
  border-color: var(--accent);
  background: #f5efe4;
}

.option .letter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--accent);
  font-weight: 900;
  line-height: 1;
}

.option-text {
  flex: 1;
  display: flex;
  align-items: center;
  color: var(--ink);
  line-height: 1.48;
}

.submit {
  width: 100%;
  margin: 18px 0 48px;
}

.result {
  padding-bottom: 64px;
}

.result-card,
.panel {
  position: relative;
  margin-bottom: 18px;
  padding: 28px;
}

.language-tabs {
  position: absolute;
  top: 20px;
  right: 22px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
}

.language-tabs span {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
}

.language-tabs .active {
  background: var(--accent);
  color: white;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.result-kicker {
  margin: 0 0 16px;
  color: #8b817d;
  font-size: 16px;
  font-weight: 650;
}

#typeCode {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 17vw, 118px);
  line-height: 0.92;
}

#typeName {
  margin: 4px 0 0;
  font-size: 30px;
}

.result-avatar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(220px, 34vw);
  aspect-ratio: 1 / 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(236, 160, 185, 0.26);
  border-radius: 24px;
  background: rgba(255, 250, 252, 0.8);
}

.result-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

blockquote {
  margin: 28px 0;
  padding-left: 18px;
  border-left: 6px solid var(--accent);
  color: var(--muted);
  font-size: 22px;
  font-style: italic;
  line-height: 1.55;
}

blockquote span {
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

blockquote strong {
  color: var(--muted);
  font-weight: 700;
}

.type-code {
  display: grid;
  gap: 18px;
  margin-top: 26px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.type-code span {
  color: var(--accent);
  font-weight: 900;
}

.type-code p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.dimension-bars {
  display: grid;
  gap: 18px;
}

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

.dimension-labels,
.dimension-meter {
  display: grid;
  gap: 12px;
  align-items: center;
}

.dimension-labels {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.dimension-meter {
  grid-template-columns: 48px minmax(120px, 1fr) 48px;
}

.dimension-labels {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.dimension-left {
  text-align: left;
}

.dimension-right {
  text-align: right;
}

.dimension-vs {
  color: #d59bab;
  font-size: 13px;
  font-weight: 900;
}

.dimension-percent {
  color: var(--muted);
  font-weight: 900;
}

.dimension-active {
  color: var(--accent);
}

.dimension-track {
  position: relative;
  min-width: 120px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe7ee, #eeeeea 50%, #ffe7ee);
}

.dimension-track::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 1px;
  height: 18px;
  background: rgba(111, 119, 116, 0.22);
}

.dimension-dot {
  position: absolute;
  top: 50%;
  left: var(--dot-position);
  width: 18px;
  height: 18px;
  border: 3px solid white;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(243, 154, 174, 0.34);
  transform: translate(-50%, -50%);
}

.result-stats-card {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 24px;
  padding: 10px;
  border: 1px solid #f3d8df;
  border-radius: 16px;
  background: rgba(255, 247, 249, 0.82);
}

.result-stats-card span {
  flex: 1 1 150px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.result-stats-card strong {
  color: var(--accent);
  font-size: 16px;
}

.result-inner-panel {
  margin: 24px 0 0;
  box-shadow: none;
}

.author-contact-card {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid rgba(236, 160, 185, 0.28);
  border-radius: 20px;
  background: rgba(255, 250, 252, 0.75);
  color: #777;
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
}

.author-contact-title {
  margin-bottom: 6px;
  color: #555;
  font-weight: 700;
  text-align: center;
}

.author-contact-text {
  color: #777;
  text-align: center;
}

.author-contact-handle {
  margin-top: 6px;
  color: #e98dad;
  font-weight: 700;
  text-align: center;
}

.long-desc,
.population,
.disclaimer p {
  color: #625d56;
  font-size: 17px;
  line-height: 1.75;
}

.long-desc {
  display: grid;
  gap: 18px;
  margin-top: 0;
}

.long-desc p {
  margin: 0;
}

.sub-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 22px;
  align-items: start;
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.sub-card span,
.mini-cards span {
  color: var(--muted);
  font-weight: 800;
}

.sub-card strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
  line-height: 0.95;
}

.sub-card h4 {
  margin: 8px 0 0;
  font-size: 22px;
}

.sub-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.sub-card .sub-definition {
  color: #4f4a43;
}

.mini-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.mini-cards div {
  min-height: 140px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.mini-cards strong {
  display: block;
  margin-top: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
}

.mini-cards p {
  margin: 6px 0 0;
  color: var(--muted);
}

.mini-cards small {
  display: block;
  margin-top: 12px;
  color: #625d56;
  font-size: 14px;
  line-height: 1.55;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel h3 {
  margin: 0;
  font-size: 26px;
}

.ghost {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-weight: 900;
}

.radar-wrap {
  display: grid;
  place-items: center;
  padding-top: 16px;
}

.radar-code-line {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

canvas {
  max-width: 100%;
  width: min(100%, 440px);
  height: auto;
}

.details {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.detail-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.detail-row strong {
  font-size: 17px;
}

.detail-row p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.score {
  color: var(--accent);
  font-weight: 900;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.share-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(32, 31, 29, 0.45);
}

.share-modal-overlay.hidden {
  display: none;
}

.share-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(420px, 100%);
  max-height: 88vh;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(236, 160, 185, 0.35);
  border-radius: 24px;
  background: #fffdf8;
  box-shadow: 0 22px 70px rgba(32, 31, 29, 0.24);
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.share-modal-header h3 {
  margin: 0;
  font-size: 20px;
}

.share-modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
}

.share-modal-tip {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.share-preview-scroll {
  max-height: 62vh;
  overflow-y: auto;
  border-radius: 18px;
}

.share-preview-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(236, 160, 185, 0.35);
  border-radius: 16px;
  object-fit: contain;
}

.share-modal-actions {
  display: flex;
  gap: 12px;
}

.share-modal-actions button {
  flex: 1;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
}

.gallery {
  padding-bottom: 64px;
}

.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 250, 251, 0.92);
}

.gallery-head h2 {
  margin: 4px 0 0;
  font-size: 34px;
}

.avatar-gallery {
  display: grid;
  gap: 18px;
}

.zone-section {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 250, 251, 0.92);
}

.zone-head {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  color: #2d2929;
}

.zone-head h3 {
  margin: 0;
  font-size: 24px;
}

.zone-head p {
  margin: 0;
  color: rgba(32, 31, 29, 0.68);
  line-height: 1.5;
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  padding: 12px;
}

.avatar-tile {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.atlas-card-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 250, 252, 0.8);
}

.atlas-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.avatar-tile strong {
  display: block;
  margin-top: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.avatar-tile span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 680px) {
  .app {
    width: min(760px, 100%);
    padding: 8px;
  }

  .hero {
    width: min(88vw, 340px);
    margin: 34px auto 0;
    padding: 30px 8px 22px;
    border-radius: 22px;
  }

  .emoji-top-left {
    top: 14px;
    left: 13%;
    font-size: 34px;
  }

  .emoji-top-right {
    top: 22px;
    left: 72%;
    font-size: 28px;
  }

  .emoji-top-note {
    display: none;
  }

  .emoji-left-high {
    top: 35%;
    left: -3%;
    font-size: 34px;
  }

  .emoji-left-mid {
    top: 54%;
    left: -2%;
    font-size: 32px;
  }

  .emoji-left-low {
    top: 43%;
    right: -4%;
    left: auto;
    font-size: 52px;
  }

  .emoji-burst-main {
    right: auto;
    bottom: 19%;
    left: 68%;
    font-size: 54px;
  }

  .emoji-burst-fire {
    top: 61%;
    right: auto;
    bottom: auto;
    left: 14%;
    font-size: 32px;
  }

  .emoji-burst-pop {
    top: 58%;
    right: 1%;
    bottom: auto;
    font-size: 28px;
  }

  .emoji-burst-heart {
    top: 31%;
    right: 9%;
    bottom: auto;
    font-size: 32px;
  }

  .hero-badge {
    min-height: 30px;
    padding: 6px 13px;
    font-size: 10px;
    letter-spacing: 0.09em;
    word-spacing: 0.18em;
  }

  h1 {
    margin: 20px 0 14px;
    font-size: clamp(29px, 9.1vw, 36px);
    line-height: 1.1;
  }

  .subtitle {
    max-width: 280px;
    font-size: 14px;
    line-height: 1.66;
  }

  .hero-note {
    margin: 16px 0 22px;
    font-size: 14px;
    line-height: 1.66;
  }

  .type-chips {
    max-width: 300px;
    gap: 7px 4px;
  }

  .type-chips span:not(.chip-note) {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .chip-note {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    font-size: 10px;
  }

  .hero-actions {
    margin-top: 24px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .hero-actions .primary,
  .hero-actions .secondary {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    font-size: 14px;
  }

  .footer-note {
    margin-top: 18px;
    max-width: 292px;
    padding: 12px 11px 13px;
    border-radius: 18px;
    font-size: 11.5px;
    line-height: 1.55;
  }

  .footer-note-title {
    font-size: 12.5px;
    font-weight: 500;
  }

  .share-route {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .share-route-prompt {
    justify-self: center;
    font-size: 11.5px;
    white-space: normal;
  }

  .share-targets {
    justify-items: center;
    gap: 4px;
  }

  .chat-item {
    width: min(268px, 100%);
    min-height: 48px;
    gap: 8px;
    padding: 7px 9px;
  }

  .chat-item i {
    flex-basis: 33px;
    width: 33px;
    height: 33px;
    font-size: 15px;
  }

  .chat-item b {
    font-size: 11.5px;
    line-height: 1.34;
  }

  .chat-item-one {
    transform: rotate(-1.8deg);
  }

  .chat-item-two {
    margin-left: 12px;
    transform: rotate(1.2deg);
  }

  .chat-item-three {
    margin-left: -3px;
    transform: rotate(-1deg);
  }

  .footer-note-end {
    margin-top: 9px !important;
    font-size: 11.6px;
    font-weight: 500;
  }

  .hero-actions,
  .sub-card,
  .mini-cards,
  .actions {
    grid-template-columns: 1fr;
  }

  .sticky-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sticky-bar > div:first-child {
    gap: 8px;
  }

  #progressStatus,
  #progressText {
    font-size: 12px;
  }

  .progress-heart {
    width: 16px;
    height: 16px;
  }

  .progress-heart::before,
  .progress-heart::after {
    font-size: 11px;
  }

  .question-card {
    padding: 22px 20px;
  }

  .q-index {
    font-size: 12px;
  }

  .category {
    padding: 4px 8px;
    font-size: 9.5px;
  }

  .question-title {
    font-size: 17px;
    line-height: 1.34;
    letter-spacing: -0.01em;
  }

  .option {
    gap: 12px;
    padding: 13px;
  }

  .option .letter {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .option-text {
    font-size: 14px;
    line-height: 1.5;
  }

  .result-card,
  .panel {
    padding: 20px;
    border-radius: 20px;
  }

  .result-head {
    align-items: flex-start;
  }

  .result-kicker {
    margin-bottom: 12px;
    font-size: 14px;
  }

  #typeCode {
    font-size: clamp(48px, 15vw, 78px);
  }

  #typeName {
    font-size: 23px;
  }

  .result-avatar-wrap {
    width: min(126px, 34vw);
    border-radius: 18px;
  }

  blockquote {
    margin: 22px 0;
    font-size: 18px;
  }

  .long-desc,
  .population,
  .disclaimer p {
    font-size: 15px;
  }

  .author-contact-card {
    padding: 16px;
    font-size: 12.5px;
  }

  .type-code {
    padding: 16px;
  }

  .dimension-labels {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    gap: 8px;
  }

  .dimension-meter {
    grid-template-columns: 40px minmax(84px, 1fr) 40px;
    gap: 8px;
  }

  .dimension-labels {
    font-size: 12px;
  }

  .dimension-percent {
    font-size: 13px;
  }

  .dimension-track {
    min-width: 84px;
  }

  .result-stats-card {
    margin-bottom: 20px;
  }
}
