:root {
  color-scheme: light;
  --primary: #ff7043;
  --primary-strong: #ef5b30;
  --secondary: #26c6da;
  --background: #fffaf5;
  --warm: #fff0ea;
  --cool: #effbfc;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --selected: #fff3ee;
  --text: #242120;
  --text-soft: #6f6966;
  --border: #eadfd9;
  --shadow: 0 24px 70px rgba(91, 52, 34, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 112, 67, 0.1), transparent 26rem),
    radial-gradient(circle at 90% 70%, rgba(38, 198, 218, 0.1), transparent 30rem),
    var(--background);
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(38, 198, 218, 0.7);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  background: var(--text);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: 42% 58% 65% 35%;
  filter: blur(2px);
  opacity: 0.28;
}

.ambient-one {
  top: 16%;
  left: -150px;
  background: #ffd6c9;
  transform: rotate(20deg);
}

.ambient-two {
  right: -170px;
  bottom: 5%;
  background: #bdeef2;
  transform: rotate(-18deg);
}

.site-header,
.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

.brand {
  display: block;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 76px;
  height: auto;
}

.language-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(111, 105, 102, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(14px);
}

.language-switcher button,
.language-switcher .lang-link,
.language-switcher .lang-active {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
}

.language-switcher button,
.language-switcher .lang-link {
  color: var(--text-soft);
  cursor: pointer;
  text-decoration: none;
}

.language-switcher button[aria-pressed="true"],
.language-switcher .lang-active {
  border: 1px solid var(--primary);
  background: var(--selected);
  color: var(--text);
}

#campaign-app {
  width: min(1040px, calc(100% - 32px));
  min-height: calc(100vh - 164px);
  margin: 16px auto 64px;
}

#campaign-app:focus {
  outline: none;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  min-height: 620px;
}

.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 6vw, 76px);
}

.eyebrow {
  width: fit-content;
  margin: 0 0 20px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #b54524;
  background: var(--warm);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

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

h1 {
  max-width: 630px;
  margin-bottom: 20px;
  font-size: clamp(2.45rem, 6vw, 5.25rem);
  line-height: 1.08;
  letter-spacing: -0.065em;
}

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

.lead {
  max-width: 580px;
  margin-bottom: 30px;
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.75;
}

.intro-art {
  position: relative;
  display: grid;
  min-height: 480px;
  place-items: center;
  padding: 40px;
  background:
    linear-gradient(145deg, rgba(255, 240, 234, 0.94), rgba(239, 251, 252, 0.96)),
    #fff;
}

.pet-pair {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  gap: clamp(10px, 3vw, 28px);
}

.pet-high-five {
  position: relative;
  display: grid;
  width: min(430px, 96%);
  aspect-ratio: 1;
  place-items: center;
}

.pet-high-five img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 24px rgba(85, 65, 53, 0.12));
}

.intro-decorations {
  position: absolute;
  z-index: 1;
  width: min(620px, 132%);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(85, 65, 53, 0.08));
  pointer-events: none;
}

.species-label {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 800;
}

.species-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.species-button,
.option-button,
.tie-button {
  border: 1px solid var(--border);
  background: var(--surface-solid);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.species-button:hover,
.option-button:hover,
.tie-button:hover {
  border-color: rgba(255, 112, 67, 0.55);
  transform: translateY(-2px);
}

.species-button {
  display: flex;
  align-items: center;
  min-height: 76px;
  gap: 13px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  text-align: left;
}

.species-button[aria-pressed="true"],
.option-button[aria-pressed="true"],
.tie-button[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--selected);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.species-emoji {
  font-size: 2rem;
}

.species-name {
  display: block;
  font-weight: 850;
}

.species-hint {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  padding: 0 22px;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 12px 24px rgba(239, 91, 48, 0.24);
}

.primary-button:disabled {
  box-shadow: none;
  cursor: not-allowed;
  filter: grayscale(0.5);
  opacity: 0.48;
}

.secondary-button {
  padding: 0 22px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.text-button {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
}

.flow-panel {
  width: min(760px, 100%);
  margin-inline: auto;
  padding: clamp(24px, 5vw, 48px);
}

.flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}

.progress-copy {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 750;
}

.progress-track {
  height: 7px;
  margin-bottom: 34px;
  overflow: hidden;
  border-radius: 999px;
  background: #f0e9e5;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #ffab8f);
  transition: width 240ms ease;
}

.question-title,
.tie-title {
  margin-bottom: 12px;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.question-hint,
.tie-copy {
  margin-bottom: 28px;
  color: var(--text-soft);
  line-height: 1.65;
}

.option-list,
.tie-list {
  display: grid;
  gap: 11px;
}

.option-button,
.tie-button {
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border-radius: var(--radius-md);
  text-align: left;
  line-height: 1.5;
}

.option-index {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--cool);
  color: #127b88;
  font-size: 0.8rem;
  font-weight: 850;
}

.option-button[aria-pressed="true"] .option-index,
.tie-button[aria-pressed="true"] .option-index {
  background: var(--primary);
  color: #fff;
}

.flow-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
}

.flow-actions .primary-button {
  width: auto;
  min-width: 180px;
}

.result-wrap {
  display: grid;
  gap: 22px;
}

.result-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  overflow: hidden;
}

.result-art {
  position: relative;
  display: grid;
  min-height: 520px;
  place-items: center;
  padding: 40px;
  background: linear-gradient(155deg, var(--result-soft), #fff 86%);
}

.result-halo {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--result-accent);
  opacity: 0.14;
  filter: blur(1px);
}

.result-character-image {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  max-height: 480px;
  object-fit: contain;
  filter: drop-shadow(0 26px 28px rgba(68, 45, 32, 0.16));
}

.result-content {
  padding: clamp(32px, 6vw, 70px);
}

.result-kicker {
  margin-bottom: 12px;
  color: var(--result-deep);
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.result-name {
  margin-bottom: 15px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.result-summary {
  margin-bottom: 30px;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.75;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.insight {
  padding: 18px;
  border-radius: var(--radius-md);
  background: #faf7f5;
}

.insight h3 {
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--result-deep);
}

.insight p {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
}

.result-actions {
  display: flex;
  gap: 10px;
}

.result-actions .primary-button {
  width: auto;
  flex: 1;
}

.care-download-card {
  padding: clamp(30px, 5vw, 54px);
  color: var(--text);
  background:
    radial-gradient(circle at 88% 6%, rgba(38, 198, 218, 0.24), transparent 20rem),
    radial-gradient(circle at 5% 100%, rgba(255, 112, 67, 0.18), transparent 22rem),
    linear-gradient(135deg, #fff6f1, #edfafa);
}

.care-download-card .eyebrow {
  color: #a63f20;
  background: rgba(255, 112, 67, 0.13);
}

.care-download-card h2 {
  max-width: 620px;
  margin-bottom: 14px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.care-download-intro > p:not(.eyebrow, .medical-note, .store-note) {
  max-width: 620px;
  color: var(--text-soft);
  line-height: 1.7;
}

.care-download-intro h3 {
  margin: 30px 0 12px;
  color: var(--text);
  font-size: 0.9rem;
}

.care-download-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.download-side {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(38, 198, 218, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 46px rgba(67, 112, 116, 0.1);
}

.download-eyebrow {
  margin-bottom: 10px;
  color: #147782;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.03em;
}

.download-body {
  margin-bottom: 20px;
  color: var(--text);
  line-height: 1.65;
}

.download-note {
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 0.76rem;
  line-height: 1.6;
}

.store-buttons {
  display: grid;
  align-items: start;
  gap: 8px;
}

.store-badge-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 176px;
  height: 54px;
  overflow: hidden;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.store-badge-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgb(0 0 0 / 16%);
}

.store-badge-link:focus-visible {
  outline: 4px solid rgb(255 112 67 / 30%);
  outline-offset: 3px;
}

.store-badge-image {
  display: block;
  width: 176px;
  height: auto;
  flex: 0 0 auto;
}

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

.care-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 112, 67, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
}

.care-item span:first-child {
  font-size: 1.35rem;
}

.care-item strong {
  display: block;
  font-size: 0.9rem;
}

.medical-note,
.store-note,
.result-disclaimer {
  color: var(--text-soft);
  font-size: 0.8rem;
  line-height: 1.6;
}

.medical-note {
  margin: 16px 0 0;
}

.store-note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.care-download-card .medical-note,
.care-download-card .store-note {
  color: var(--text-soft);
}

.care-download-card .store-note {
  border-top-color: rgba(111, 105, 102, 0.16);
}

.result-disclaimer {
  margin: 18px 0 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 38px;
  border-top: 1px solid rgba(111, 105, 102, 0.15);
  color: var(--text-soft);
  font-size: 0.78rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.footer-links a {
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.footer-links a:hover { color: var(--coral); }
.footer-links a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: 24px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 13px 18px;
  border-radius: 14px;
  background: var(--text);
  color: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
  font-size: 0.88rem;
  font-weight: 750;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .site-header {
    min-height: 70px;
  }

  #campaign-app {
    width: min(100% - 20px, 620px);
    min-height: calc(100vh - 140px);
    margin-top: 8px;
  }

  .intro-panel,
  .result-card {
    grid-template-columns: 1fr;
  }

  .intro-copy {
    padding: 34px 24px 30px;
  }

  h1 {
    font-size: clamp(2.55rem, 14vw, 4.25rem);
    line-height: 1.1;
  }

  .intro-art {
    min-height: 300px;
    order: -1;
  }

  .pet-high-five {
    max-width: 300px;
  }

  .intro-decorations {
    max-width: 430px;
  }

  .flow-panel {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .option-button,
  .tie-button {
    min-height: 68px;
  }

  .result-art {
    min-height: 330px;
  }

  .result-character-image {
    max-width: 290px;
    max-height: 310px;
  }

  .result-content {
    padding: 32px 22px;
  }

  .insight-grid,
  .care-download-grid {
    grid-template-columns: 1fr;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .primary-button,
  .result-actions .secondary-button {
    width: 100%;
  }

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

@media (max-width: 420px) {
  .site-header,
  .site-footer {
    width: calc(100% - 28px);
  }

  .brand {
    font-size: 0.75rem;
  }

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

  .species-button {
    min-height: 66px;
  }

  .flow-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .flow-actions .primary-button {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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