:root {
  --bg: #fff6fb;
  --card: rgba(255, 255, 255, 0.86);
  --ink: #6b5b66;
  --ink-strong: #4e424b;
  --muted: #9b8793;
  --pink: #ffd3e0;
  --pink-strong: #ff92b3;
  --cream: #ffe9a8;
  --mint: #d9f2d9;
  --sky: #c9e7ff;
  --line: rgba(196, 154, 174, 0.24);
  --shadow: 0 24px 60px rgba(181, 126, 155, 0.22);
  --radius: 30px;
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-weight: 600;
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 211, 224, 0.9), transparent 28%),
    radial-gradient(circle at 92% 14%, rgba(201, 231, 255, 0.86), transparent 30%),
    radial-gradient(circle at 20% 96%, rgba(217, 242, 217, 0.9), transparent 32%),
    linear-gradient(180deg, #fff6fb 0%, #fffdf5 100%);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid rgba(255, 146, 179, 0.52);
  outline-offset: 4px;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--ink-strong);
  text-decoration: none;
  font-weight: 900;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 24px rgba(181, 126, 155, 0.2);
}

.brand__text {
  font-size: 1rem;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--line);
  white-space: nowrap;
}

.app-main {
  position: relative;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
  animation: screenIn 240ms ease-out both;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 22px;
  text-align: center;
}

.hero-card > :not(.floating-seed) {
  position: relative;
  z-index: 1;
}

.hero-hamster-cloud {
  position: relative;
  width: min(74vw, 330px);
  height: min(52vw, 218px);
  min-height: 188px;
  margin-bottom: 18px;
}

.hero-hamster-cloud::before {
  content: "";
  position: absolute;
  inset: 18% 8% 8%;
  border-radius: 44% 56% 50% 50%;
  background: radial-gradient(circle at 45% 35%, rgba(255, 211, 224, 0.62), rgba(255, 233, 168, 0.34) 45%, rgba(217, 242, 217, 0.22) 76%);
  filter: blur(2px);
}

.hero-hamster {
  position: absolute;
  display: block;
  object-fit: cover;
  border: 5px solid rgba(255, 255, 255, 0.76);
  border-radius: 42%;
  box-shadow: 0 18px 26px rgba(181, 126, 155, 0.16);
}

.hero-hamster--main {
  left: 50%;
  top: 0;
  width: min(39vw, 150px);
  height: min(39vw, 150px);
  transform: translateX(-50%) rotate(-1.5deg);
}

.hero-hamster--mini {
  width: min(22vw, 84px);
  height: min(22vw, 84px);
  border-width: 4px;
  opacity: 0.94;
}

.hero-hamster--left {
  left: 12px;
  top: 76px;
  transform: rotate(-8deg);
}

.hero-hamster--right {
  right: 10px;
  top: 76px;
  transform: rotate(8deg);
}

.hero-hamster--bottom {
  left: 50%;
  bottom: 2px;
  width: min(20vw, 76px);
  height: min(20vw, 76px);
  transform: translateX(-50%) rotate(3deg);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--pink-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(2rem, 8vw, 3.4rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.lead {
  max-width: 31em;
  margin: 18px auto 24px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.85;
}

.purpose-card {
  width: min(100%, 560px);
  margin: 0 auto 24px;
  padding: 18px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 246, 251, 0.72)),
    radial-gradient(circle at 10% 12%, rgba(255, 233, 168, 0.54), transparent 36%),
    radial-gradient(circle at 92% 100%, rgba(217, 242, 217, 0.58), transparent 34%);
  box-shadow: inset 0 0 0 1px rgba(255, 211, 224, 0.66), 0 16px 28px rgba(181, 126, 155, 0.12);
  text-align: left;
}

.purpose-card h2 {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 0 0 10px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 146, 179, 0.16);
  color: var(--pink-strong);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.4;
}

.purpose-card p {
  margin: 0;
  color: var(--ink-strong);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.85;
}

.purpose-card p + p {
  margin-top: 10px;
}

.purpose-note {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 233, 168, 0.4);
  color: var(--ink);
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.primary-button {
  padding: 0 28px;
  color: #fff;
  background: linear-gradient(135deg, #ff8fb1, #ffb6c9);
  box-shadow: 0 14px 26px rgba(255, 146, 179, 0.34);
}

.secondary-button {
  padding: 0 22px;
  color: var(--ink-strong);
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 146, 179, 0.28);
}

.ghost-button {
  min-height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tiny-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.floating-seed {
  position: absolute;
  z-index: 0;
  width: 48px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 233, 168, 0.8);
  transform: rotate(-18deg);
  pointer-events: none;
}

.floating-seed--one {
  top: 42px;
  left: 28px;
}

.floating-seed--two {
  right: 32px;
  bottom: 42px;
  transform: rotate(18deg);
}

.question-card,
.result-card {
  padding: 22px;
}

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

#question-count {
  color: var(--pink-strong);
  font-weight: 900;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 211, 224, 0.42);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff92b3, #ffe9a8);
  transition: width 220ms ease-out;
}

.question-axis {
  display: inline-flex;
  margin: 26px 0 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(201, 231, 255, 0.58);
  color: #5c768a;
  font-size: 0.86rem;
  font-weight: 900;
}

#question-title {
  min-height: 5.4em;
  margin: 0 0 24px;
  color: var(--ink-strong);
  font-size: clamp(1.45rem, 6vw, 2.35rem);
  line-height: 1.45;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.scale-labels span:nth-child(2) {
  color: var(--pink-strong);
  font-size: 0.78rem;
}

.answer-scale {
  --selected: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
  min-height: 86px;
  padding: 18px 10px 12px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 0 0 1px rgba(255, 211, 224, 0.54), 0 12px 28px rgba(181, 126, 155, 0.1);
}

.answer-scale::before,
.answer-scale::after {
  content: "";
  position: absolute;
  left: 32px;
  right: 32px;
  top: 32px;
  height: 14px;
  border-radius: 999px;
  pointer-events: none;
}

.answer-scale::before {
  background: linear-gradient(90deg, #ffe2eb, #ffe9a8, #c9e7ff);
}

.answer-scale::after {
  right: auto;
  width: calc((100% - 64px) * var(--selected) / 100);
  background: linear-gradient(90deg, #ff92b3, #ffc7d6);
}

.answer-button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-strong);
  background: transparent;
  box-shadow: none;
  font-size: 0.95rem;
  font-weight: 900;
  transform: translateY(18px);
}

.answer-button::before {
  content: "";
  position: absolute;
  top: -10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 3px rgba(255, 146, 179, 0.26), 0 7px 14px rgba(181, 126, 155, 0.14);
}

.answer-button[aria-pressed="true"] {
  color: var(--pink-strong);
}

.answer-button[aria-pressed="true"]::before {
  background: linear-gradient(135deg, #ff8fb1, #ffc0d1);
  box-shadow: 0 0 0 8px rgba(255, 146, 179, 0.16), 0 9px 16px rgba(255, 146, 179, 0.28);
}

.result-card {
  --family-bg: #fff0bd;
  --family-accent: #f4b35f;
}

.family-badge {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--family-bg);
  color: var(--ink-strong);
  font-size: 0.88rem;
  font-weight: 900;
}

.result-hero {
  display: grid;
  grid-template-columns: 116px 1fr;
  align-items: center;
  gap: 16px;
}

.result-hamster {
  width: 112px;
  height: 112px;
  overflow: hidden;
  border-radius: 34px;
  background: var(--family-bg);
  box-shadow: inset 0 -12px 0 rgba(255, 255, 255, 0.32), 0 16px 26px rgba(181, 126, 155, 0.18);
}

.result-hamster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#result-name {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(2rem, 8vw, 3.1rem);
  line-height: 1.08;
}

.result-catch {
  margin: 10px 0 0;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.65;
}

.result-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px dashed rgba(196, 154, 174, 0.38);
}

.result-section h3,
.share-panel h3,
.shared-cta-panel h3 {
  margin: 0 0 10px;
  color: var(--pink-strong);
  font-size: 1rem;
}

.result-section p {
  margin: 0;
  line-height: 1.9;
  font-weight: 700;
  white-space: pre-line;
}

.feature-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 211, 224, 0.52);
  line-height: 1.6;
  font-weight: 800;
}

.axis-bars {
  display: grid;
  gap: 14px;
}

.axis-row {
  display: grid;
  gap: 6px;
}

.axis-row__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.axis-row__bar {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(201, 231, 255, 0.54);
}

.axis-row__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--family-accent), #ffb6c9);
}

.memo-grid {
  display: grid;
  gap: 18px;
}

.memo-list,
.compat-list {
  display: grid;
  gap: 10px;
}

.memo-item,
.compat-item {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 211, 224, 0.55), 0 10px 20px rgba(181, 126, 155, 0.08);
}

.memo-item span,
.compat-item span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 8px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 146, 179, 0.16);
  color: var(--pink-strong);
  font-size: 0.8rem;
  font-weight: 900;
}

.memo-item p,
.compat-item p {
  color: var(--ink-strong);
}

.compat-item {
  display: grid;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 233, 168, 0.34));
}

.compat-item strong {
  color: var(--ink-strong);
  font-size: 1.05rem;
  line-height: 1.45;
}

.adventure-box {
  padding: 18px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 233, 168, 0.58), rgba(217, 242, 217, 0.62));
}

.share-panel,
.shared-cta-panel {
  margin-top: 26px;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 211, 224, 0.38);
}

.share-panel p,
.shared-cta-panel p {
  margin: 0;
  line-height: 1.7;
}

.shared-cta-panel {
  display: grid;
  gap: 14px;
  background: linear-gradient(135deg, rgba(255, 211, 224, 0.42), rgba(255, 233, 168, 0.42));
}

.shared-cta-panel[hidden] {
  display: none;
}

.shared-cta-panel .primary-button {
  justify-self: start;
  white-space: nowrap;
}

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

.share-actions .primary-button,
.share-actions .secondary-button {
  white-space: nowrap;
}

.share-status {
  min-height: 1.7em;
  margin-top: 10px !important;
  color: var(--muted);
  font-size: 0.88rem;
}

.ad-slot {
  display: none;
  margin-top: 24px;
  padding: 16px;
  border: 1px dashed rgba(155, 135, 147, 0.4);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  text-align: center;
}

.ad-slot span {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(107, 91, 102, 0.08);
  font-size: 0.76rem;
  font-weight: 900;
}

.ad-slot p {
  margin: 0;
  font-size: 0.86rem;
}

@media (min-width: 720px) {
  .app-shell {
    padding-top: 26px;
  }

  .hero-card {
    min-height: 650px;
  }

  .question-card,
  .result-card {
    padding: 34px;
  }

  .memo-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 380px) {
  .app-shell {
    padding-inline: 10px;
  }

  .brand__text {
    font-size: 0.9rem;
  }

  .header-pill {
    font-size: 0.72rem;
    padding-inline: 10px;
  }

  .result-hero {
    grid-template-columns: 92px 1fr;
  }

  .result-hamster {
    width: 92px;
    height: 92px;
  }

  .share-actions {
    grid-template-columns: 1fr;
  }
}

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

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
