:root {
  color-scheme: light;
  --bg: #f7f2ea;
  --paper: #fffdf8;
  --ink: #4f463c;
  --heading: #3d3832;
  --muted: #85796b;
  --line: #e7d6bd;
  --gold: #c89f64;
  --gold-dark: #a77b41;
  --gold-soft: #f4eadb;
  --sage: #9faa91;
  --sage-soft: #eef2ea;
  --rose-soft: #f6e8e2;
  --shadow: 0 18px 44px rgba(95, 73, 45, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, serif;
  user-select: none;
  -webkit-user-select: none;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(247, 242, 234, 0.96)),
    radial-gradient(circle at 18% 8%, rgba(200, 159, 100, 0.13), transparent 32%),
    radial-gradient(circle at 84% 12%, rgba(159, 170, 145, 0.16), transparent 34%);
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

.app-shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 6vw, 76px) 0;
}

.intro,
.quiz,
.result {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(231, 214, 189, 0.9);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
  padding: clamp(26px, 6vw, 64px);
}

.intro {
  padding-bottom: clamp(18px, 3.5vw, 36px);
}

.intro::before,
.result::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(200, 159, 100, 0.09), transparent 18%, transparent 82%, rgba(159, 170, 145, 0.08)),
    radial-gradient(circle at 90% 16%, rgba(246, 232, 226, 0.6), transparent 28%);
}

.intro > *,
.result > *,
.quiz > * {
  position: relative;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
 text-align: center;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(34px, 6.4vw, 60px);
  font-weight: 500;
  line-height: 1.28;
}

h1 span {
  display: block;
  margin-bottom: 6px;
  color: var(--gold-dark);
  font-size: clamp(20px, 3.2vw, 30px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.title-visual {
  width: min(620px, 100%);
  margin: 0 auto 28px;
}

.title-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border-radius: 10px;
}

.intro-text {
  display: grid;
  gap: 12px;
  max-width: 740px;
  margin: 0 auto;
}

.intro-text p,
.result-copy,
#treatmentIntro,
#ctaText {
  margin: 0;
  color: #5f554b;
  font-size: 16px;
  line-height: 2;
}

.note,
.fine-print {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
  font-size: 13px;
  line-height: 1.8;
}

.note {
  max-width: 740px;
  margin: 12px auto 0;
}

button,
.link-button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

button:active,
.link-button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 26px;
  color: #fff;
  background: linear-gradient(180deg, #d4ad73, var(--gold-dark));
  box-shadow: 0 8px 18px rgba(167, 123, 65, 0.22);
}

.primary-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #c79a5c, #956a37);
}

#startButton {
  display: flex;
  width: fit-content;
  margin: 26px auto 0;
}

.secondary-button {
  padding: 0 20px;
  color: var(--gold-dark);
  border: 1px solid #d8bd94;
  background: rgba(255, 253, 248, 0.92);
}

.secondary-button:hover:not(:disabled) {
  background: var(--gold-soft);
}

.text-button {
  min-height: auto;
  padding: 0;
  color: var(--gold-dark);
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hidden {
  display: none !important;
}

.mobile-only {
  display: none;
}

.progress-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 30px;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #efe6d8;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--sage));
  transition: width 220ms ease;
}

.question-card {
  min-height: 356px;
}

.question-number {
  margin: 0 0 12px;
  color: var(--gold-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.question-card h2 {
  min-height: 92px;
  margin: 0 0 28px;
  color: var(--heading);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 500;
  line-height: 1.55;
}

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

.choice {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 13px;
  align-items: center;
  min-height: 58px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
}

.choice:hover {
  border-color: #d2aa73;
  background: #fff;
}

.choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold-dark);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}

.result h2 {
  margin: 0;
  color: var(--heading);
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

.result-title-prefix,
.result-title-dog,
.result-title-suffix {
  display: block;
}

.result-title-prefix {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: clamp(18px, 3vw, 24px);
}

.result-title-dog {
  color: var(--gold-dark);
  font-size: clamp(30px, 5.3vw, 48px);
  white-space: nowrap;
}

.result-title-suffix {
  margin-top: 4px;
  color: var(--heading);
  font-size: clamp(22px, 4vw, 32px);
}

.dog-result {
  width: min(360px, 88%);
  margin: 24px auto 20px;
}

.dog-result img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(231, 214, 189, 0.88);
  border-radius: 10px;
  background: #fffaf0;
  box-shadow: 0 14px 34px rgba(95, 73, 45, 0.12);
}

.result-subtitle {
  margin: 0 0 16px;
  color: var(--gold-dark);
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.6;
  text-align: center;
}

.result-copy {
  max-width: 760px;
  margin: 0 auto 28px;
}

.result-panel,
.cta-panel {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid rgba(231, 214, 189, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
}

.cta-panel {
  border-color: #dfc79e;
  background: linear-gradient(135deg, var(--gold-soft), var(--sage-soft));
}

.result-panel h3,
.cta-panel h3 {
  margin: 0 0 12px;
  color: var(--heading);
  font-size: 20px;
  font-weight: 500;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 8px 12px;
  border: 1px solid rgba(216, 189, 148, 0.7);
  border-radius: 999px;
  color: var(--gold-dark);
  background: #fffaf1;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.treatment-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.treatment-card {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
}

.treatment-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--heading);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
}

.treatment-card span {
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
  font-size: 13px;
  line-height: 1.65;
}

.link-button {
  margin-top: 10px;
  text-decoration: none;
}

.share-panel {
  margin-top: 18px;
  text-align: center;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 18px auto 0;
}

.share-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
  font-size: 12px;
  line-height: 1.7;
}

.cta-panel .link-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: fit-content;
  min-height: 64px;
  margin: 18px auto 0;
  line-height: 1.25;
  text-align: center;
}

.counseling-button-main,
.counseling-button-price {
  display: block;
}

.counseling-button-price {
  font-size: 0.86em;
}

.reset-button {
  margin-top: 20px;
}

.site-footer {
  width: min(960px, calc(100% - 32px));
  margin: clamp(20px, 4vw, 42px) auto 0;
  padding-bottom: 24px;
}

.footer-inner {
  overflow: hidden;
  border: 1px solid rgba(231, 214, 189, 0.9);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 12px 30px rgba(95, 73, 45, 0.08);
}

.footer-visual {
  margin: 0;
}

.footer-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
  object-position: center top;
}

.footer-message {
  padding: clamp(22px, 4vw, 34px);
  text-align: center;
}

.footer-message h2 {
  margin: 0 0 12px;
  color: var(--heading);
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 500;
  line-height: 1.55;
}

.footer-message p {
  margin: 0;
  color: #5f554b;
  font-size: clamp(14px, 2.1vw, 17px);
  line-height: 1.9;
}

.footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 48px;
  margin: 18px auto 0;
  text-decoration: none;
}

.copyright {
  margin: 16px 0 0;
  color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", YuGothic, sans-serif;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 960px);
    padding: 10px 0;
  }

  .intro,
  .quiz,
  .result {
    padding: 20px 16px;
  }

  .intro {
    padding-bottom: 16px;
  }

  .title-visual {
    width: min(100%, 430px);
    margin-bottom: 22px;
  }

  .intro-text p,
  .result-copy,
  #treatmentIntro,
  #ctaText {
    font-size: 15px;
    line-height: 1.9;
  }

  .question-card {
    min-height: auto;
    padding-bottom: 0;
  }

  .question-card h2 {
    min-height: 0;
    margin-bottom: 18px;
    font-size: 20px;
    line-height: 1.45;
  }

  .progress-row {
    margin-bottom: 18px;
  }

  .question-number {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .choices {
    gap: 8px;
    margin-bottom: 20px;
  }

  .choice {
    border-radius: 12px;
    min-height: 50px;
    padding: 11px 14px;
    font-size: 14px;
  }

  .share-button,
  .cta-panel .link-button {
    width: min(100%, 320px);
  }

  .nav-row {
    position: static;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    background: transparent;
  }

  .result-title-dog {
    font-size: clamp(27px, 8vw, 32px);
  }

  .site-footer {
    width: min(100% - 20px, 960px);
    margin-top: 18px;
  }

  .footer-visual img {
    aspect-ratio: 16 / 7;
  }

  .footer-message {
    padding: 22px 18px;
  }

  .footer-message h2 {
    font-size: 21px;
  }

  .mobile-only {
    display: block;
  }

  .footer-message p {
    font-size: 14px;
  }
}
