:root {
  color-scheme: light;
  --ink: #332a3a;
  --muted: #726778;
  --paper: #fffdfa;
  --paper-warm: #fff4e8;
  --peach: #ffb38a;
  --peach-deep: #e56f5b;
  --yellow: #ffd66b;
  --mint: #bfe5d1;
  --blue: #b9d9ee;
  --pink: #f5c7d8;
  --line: rgba(51, 42, 58, 0.12);
  --shadow: 0 14px 38px rgba(70, 46, 73, 0.13);
  --shadow-soft: 0 8px 20px rgba(70, 46, 73, 0.09);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --tap: 48px;
  font-family: system-ui, "Noto Sans Thai", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #efe9f3;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 214, 107, 0.42), transparent 28%),
    radial-gradient(circle at 92% 20%, rgba(185, 217, 238, 0.48), transparent 30%),
    linear-gradient(150deg, #fff8ef, #f2eef8 70%);
  overflow-x: hidden;
}

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

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #4f74b8;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 4px;
}

.brand-button,
.sound-button,
.text-button {
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.brand-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 4px 7px;
  font-size: 13px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 11px;
  transform: rotate(-4deg);
}

.sound-button {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 750;
}

.app {
  min-height: calc(100dvh - 106px);
}

.screen {
  width: 100%;
  animation: screen-in 340ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.title-screen {
  display: flex;
  min-height: calc(100dvh - 112px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.title-art {
  position: relative;
  width: min(100%, 310px);
  height: 164px;
  margin: -4px auto 0;
}

.title-art .animal-image {
  position: absolute;
  width: 148px;
  filter: drop-shadow(0 10px 14px rgba(60, 42, 57, 0.13));
}

.title-art .animal-image:nth-child(1) {
  left: 2px;
  bottom: 0;
  transform: rotate(-7deg);
}

.title-art .animal-image:nth-child(2) {
  z-index: 2;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
}

.title-art .animal-image:nth-child(3) {
  right: 2px;
  bottom: 0;
  transform: rotate(7deg);
}

.eyebrow,
.result-kicker,
.question-kicker,
.pair-kicker,
.invite-kicker {
  margin: 0;
  color: var(--peach-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
}

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

#game-title:focus,
#question-text:focus,
#result-name:focus,
#collection-title:focus,
#error-title:focus {
  outline: none;
}

h1 {
  max-width: 430px;
  margin: 6px 0 4px;
  font-size: clamp(31px, 9.2vw, 47px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.lead {
  margin: 4px 0 11px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 680;
}

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 9px;
}

.quick-facts span {
  padding: 5px 10px;
  border: 1px solid rgba(51, 42, 58, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
}

.joke-line {
  margin: 0 0 13px;
  font-size: 13px;
  font-weight: 850;
}

.title-actions,
.result-actions {
  display: grid;
  width: min(100%, 390px);
  gap: 8px;
}

.button {
  min-height: var(--tap);
  padding: 10px 16px;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(70, 46, 73, 0.14);
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.button-primary {
  border-color: #cf604f;
  color: #2c2029;
  background: linear-gradient(180deg, #ffc09c, #ff9e7f);
}

.button-dark {
  color: #ffffff;
  background: #332a3a;
}

.button-soft {
  background: #fff1b9;
}

.button-quiet {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.button-large {
  min-height: 55px;
  font-size: 16px;
}

.button-small {
  min-height: 42px;
  padding: 8px 13px;
  font-size: 13px;
}

.disclaimer,
.share-help,
.collection-note {
  max-width: 390px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.invite-banner {
  display: flex;
  width: min(100%, 390px);
  align-items: center;
  gap: 11px;
  margin: 7px auto 10px;
  padding: 9px 12px;
  border: 2px solid #88bfd2;
  border-radius: var(--radius-lg);
  background: #e8f7fb;
  text-align: left;
}

.invite-art {
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
}

.invite-art .animal-image {
  width: 100%;
  height: 100%;
}

.invite-banner p {
  margin: 2px 0;
  font-size: 13px;
  line-height: 1.35;
}

.question-screen {
  display: flex;
  min-height: calc(100dvh - 112px);
  flex-direction: column;
  justify-content: center;
  padding: 4px 0 10px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  margin: 0 4px 7px;
  font-size: 12px;
  font-weight: 850;
}

.progress-percent {
  color: var(--muted);
}

.progress-track {
  height: 8px;
  margin: 0 4px 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(51, 42, 58, 0.09);
}

.progress-fill {
  width: 12.5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--peach-deep), var(--yellow));
  transition: width 300ms ease;
}

.question-card {
  padding: clamp(18px, 5vw, 28px);
  border: 1px solid rgba(51, 42, 58, 0.08);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 250, 0.94);
  box-shadow: var(--shadow);
}

.question-card h2 {
  margin: 6px 0 18px;
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1.18;
}

.answer-list {
  display: grid;
  gap: 9px;
}

.answer-button {
  position: relative;
  width: 100%;
  min-height: 55px;
  padding: 11px 14px 11px 48px;
  border: 2px solid rgba(51, 42, 58, 0.11);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #ffffff;
  text-align: left;
  font-weight: 760;
  cursor: pointer;
  transition: border 160ms ease, transform 160ms ease, background 160ms ease;
}

.answer-button::before {
  position: absolute;
  top: 50%;
  left: 13px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(51, 42, 58, 0.17);
  border-radius: 8px;
  background: var(--paper-warm);
  content: attr(data-letter);
  font-size: 11px;
  font-weight: 900;
  transform: translateY(-50%);
}

.answer-button.is-selected {
  border-color: var(--peach-deep);
  background: #fff0e8;
  transform: translateY(-1px);
}

.answer-button.is-selected::before {
  color: #ffffff;
  background: var(--peach-deep);
}

.text-button {
  align-self: center;
  min-height: 44px;
  margin-top: 9px;
  padding: 7px 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.result-screen {
  padding: 2px 0 18px;
  text-align: center;
}

.result-kicker {
  margin: 3px 0 6px;
}

.result-card {
  position: relative;
  display: flex;
  width: min(100%, 350px);
  aspect-ratio: 1;
  margin: 0 auto 11px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(51, 42, 58, 0.09);
  border-radius: 30px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.85), transparent 25%),
    linear-gradient(145deg, #fff7df, #ffe9e0);
  box-shadow: var(--shadow);
}

.result-card::after {
  position: absolute;
  right: -44px;
  bottom: -44px;
  width: 140px;
  height: 140px;
  border: 24px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  content: "";
}

.result-art {
  width: 47%;
  max-width: 178px;
  margin-top: -2px;
}

.result-art .animal-image {
  display: block;
  width: 100%;
  filter: drop-shadow(0 10px 13px rgba(54, 38, 56, 0.12));
}

.result-card h2 {
  z-index: 1;
  margin: 2px 16px 3px;
  font-size: clamp(23px, 7vw, 34px);
  line-height: 1.08;
}

.result-card p {
  z-index: 1;
  max-width: 86%;
  margin: 0;
  color: #5d4d60;
  font-size: clamp(13px, 3.8vw, 16px);
  font-weight: 760;
}

.result-actions-primary {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  margin: 0 auto;
}

.share-help {
  margin-top: 7px;
}

.download-card-link {
  display: block;
  width: min(100%, 390px);
  margin: 8px auto 0;
  text-decoration: none;
}

.daily-card,
.recommended-card,
.pair-card,
.challenge-row,
.result-details {
  width: min(100%, 420px);
  margin: 12px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.75);
  text-align: left;
}

.daily-card {
  padding: 13px 15px;
}

.daily-card p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.daily-card strong {
  font-size: 14px;
  line-height: 1.5;
}

.recommended-card {
  padding: 14px;
  text-align: left;
  background: linear-gradient(145deg, rgba(255, 246, 207, 0.92), rgba(232, 247, 251, 0.92));
}

.recommended-card h3 {
  margin: 3px 0 11px;
  font-size: 17px;
}

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

.recommended-match {
  min-width: 0;
  padding: 8px 8px 10px;
  border: 1px solid rgba(51, 42, 58, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.recommended-art {
  width: min(100%, 104px);
  margin: -3px auto -2px;
}

.recommended-art .animal-image {
  display: block;
  width: 100%;
}

.recommended-match h4 {
  margin: 1px 0 4px;
  font-size: 12px;
  line-height: 1.25;
}

.recommended-match strong {
  display: block;
  color: #ce5f55;
  font-size: 13px;
}

.recommended-match p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.result-details {
  padding: 0;
  overflow: hidden;
}

.result-details summary {
  min-height: 48px;
  padding: 13px 15px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.result-details ul {
  margin: 0;
  padding: 0 28px 16px 38px;
  color: #564b5a;
  font-size: 13px;
  line-height: 1.6;
}

.pair-card {
  padding: 13px 15px;
  text-align: center;
  background: #eaf7f6;
}

.pair-animals {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
}

.pair-animals .animal-image {
  width: 88px;
  margin: 0 -7px;
  filter: drop-shadow(0 7px 9px rgba(54, 38, 56, 0.1));
}

.pair-card h3,
.pair-card p {
  margin: 3px 0;
}

.pair-card h3 {
  font-size: 18px;
}

.pair-card p {
  font-size: 13px;
}

.pair-card strong {
  font-size: 25px;
}

.challenge-row {
  padding: 12px;
  text-align: center;
}

.challenge-row .button {
  width: 100%;
}

.challenge-row p {
  margin: 7px 6px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.result-utility-actions {
  display: flex;
  width: min(100%, 390px);
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 3px 18px;
  margin: 3px auto 0;
}

.utility-button {
  min-height: 42px;
  padding: 7px 3px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.utility-button:hover {
  color: var(--ink);
}

.utility-button-x {
  color: #168dc9;
}

.collection-screen {
  min-height: calc(100dvh - 112px);
  padding: 8px 0 22px;
}

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

.section-heading h2 {
  margin: 3px 0 0;
  font-size: clamp(25px, 7vw, 34px);
}

.collection-progress {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 13px 0;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.74);
  font-size: 12px;
}

.collection-progress span {
  color: var(--muted);
}

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

.collection-card {
  position: relative;
  min-width: 0;
  min-height: 214px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

button.collection-card {
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.collection-card .animal-image {
  display: block;
  width: min(100%, 128px);
  margin: 0 auto 5px;
}

.collection-card h3,
.collection-card p {
  margin: 3px 0;
}

.collection-card h3 {
  font-size: 14px;
  line-height: 1.25;
}

.collection-card p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.collection-card .card-rarity {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff1b9;
  color: #6c5234;
  font-size: 9px;
  font-weight: 850;
}

.collection-card.is-locked {
  display: grid;
  place-items: center;
  color: #8d8490;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.64) 0 12px, rgba(227, 221, 231, 0.65) 12px 24px);
}

.locked-mark {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 2px dashed rgba(51, 42, 58, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.57);
  font-size: 34px;
  font-weight: 900;
}

.locked-copy {
  margin-top: -24px;
  font-size: 11px;
  font-weight: 800;
}

.error-screen {
  display: grid;
  min-height: calc(100dvh - 112px);
  place-items: center;
}

.error-card {
  width: 100%;
  padding: 27px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.error-card h2 {
  margin: 6px 0;
}

.error-card p:not(.eyebrow) {
  color: var(--muted);
}

.footer {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px 2px;
  color: var(--muted);
  font-size: 10px;
}

.footer a {
  color: inherit;
  font-weight: 800;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 11px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: #332a3a;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
  animation: toast-in 200ms ease both;
}

html[data-ad-paused="true"] .app {
  pointer-events: none;
  filter: saturate(0.85);
}

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

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

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

  .topbar {
    margin-bottom: 0;
  }

  .brand-button {
    font-size: 12px;
  }

  .title-art {
    height: 140px;
  }

  .title-art .animal-image {
    width: 128px;
  }

  .answer-button {
    font-size: 13px;
  }

  .result-actions-primary {
    gap: 6px;
  }

  .result-actions-primary .button {
    padding-inline: 8px;
    font-size: 12px;
  }

  .collection-grid {
    gap: 7px;
  }

  .collection-card {
    min-height: 198px;
    padding: 8px;
  }
}

@media (max-height: 650px) {
  .title-screen {
    justify-content: flex-start;
  }

  .title-art {
    height: 110px;
  }

  .title-art .animal-image {
    width: 104px;
  }

  h1 {
    font-size: 29px;
  }

  .lead {
    margin-block: 2px 7px;
    font-size: 14px;
  }

  .quick-facts {
    margin-bottom: 6px;
  }

  .joke-line {
    margin-bottom: 7px;
  }

  .button-large {
    min-height: 49px;
  }

  .disclaimer {
    margin-top: 6px;
  }

  .question-card {
    padding: 16px;
  }

  .question-card h2 {
    margin-bottom: 12px;
    font-size: 23px;
  }

  .answer-list {
    gap: 6px;
  }

  .answer-button {
    min-height: 49px;
    padding-block: 8px;
  }

  .result-card {
    width: min(100%, 215px);
    border-radius: 22px;
  }

  .result-art {
    width: 43%;
  }

  .result-card h2 {
    font-size: 21px;
  }

  .result-card p {
    font-size: 11px;
  }

  .daily-card {
    margin-top: 8px;
    padding: 9px 12px;
  }

  .recommended-card {
    margin-top: 8px;
  }

  .result-details,
  .challenge-row,
  .pair-card {
    margin-top: 8px;
  }
}

/* Shared-chat poster art direction: cream paper, chunky ink and glossy toy controls. */
:root {
  --ink: #35180d;
  --muted: #725a4c;
  --paper: #fff6dc;
  --paper-warm: #ffe8bd;
  --peach: #ff8a67;
  --peach-deep: #e94e3e;
  --yellow: #ffd24f;
  --mint: #a9d888;
  --blue: #44bde0;
  --pink: #ff9bb0;
  --line: rgba(53, 24, 13, 0.22);
  --shadow: 0 9px 0 rgba(73, 36, 17, 0.2), 0 18px 32px rgba(73, 36, 17, 0.14);
  --shadow-soft: 0 5px 0 rgba(73, 36, 17, 0.16), 0 10px 18px rgba(73, 36, 17, 0.1);
}

html {
  background: #e9c98f;
}

body {
  background-color: #fff2cd;
  background-image:
    radial-gradient(circle at 8% 14%, rgba(234, 78, 62, 0.13) 0 3px, transparent 4px),
    radial-gradient(circle at 91% 22%, rgba(44, 162, 207, 0.15) 0 4px, transparent 5px),
    repeating-linear-gradient(7deg, rgba(111, 65, 29, 0.025) 0 1px, transparent 1px 5px),
    linear-gradient(155deg, #fff8df, #ffe9bd 72%, #fff4d2);
  background-size: 92px 92px, 126px 126px, auto, auto;
}

.page-shell {
  position: relative;
}

.page-shell::before,
.page-shell::after {
  position: fixed;
  z-index: -1;
  color: rgba(217, 74, 55, 0.2);
  content: "✦";
  font-size: 46px;
  font-weight: 900;
  transform: rotate(-13deg);
}

.page-shell::before {
  top: 13%;
  left: max(8px, calc(50% - 306px));
}

.page-shell::after {
  right: max(8px, calc(50% - 310px));
  bottom: 15%;
  color: rgba(33, 152, 197, 0.2);
  transform: rotate(17deg);
}

.topbar {
  margin-bottom: 7px;
}

.brand-mark {
  border: 3px solid var(--ink);
  border-radius: 50% 44% 48% 45%;
  background: linear-gradient(#ffe777, #ffc72f);
  box-shadow: inset 0 3px rgba(255, 255, 255, 0.7), 0 3px 0 #7d401e;
}

.sound-button {
  border: 2px solid var(--ink);
  background: #fff6dc;
  box-shadow: 0 3px 0 #8a5738;
}

.title-screen {
  justify-content: flex-start;
  padding-top: clamp(4px, 2vh, 18px);
}

.title-art {
  width: min(100%, 350px);
  height: 196px;
  margin-top: -8px;
}

.title-art .animal-image {
  width: 170px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 7px 0 rgba(53, 24, 13, 0.14));
}

.title-art .animal-image:nth-child(1) {
  left: -3px;
  bottom: -4px;
  transform: rotate(-7deg);
}

.title-art .animal-image:nth-child(2) {
  width: 184px;
  bottom: 7px;
}

.title-art .animal-image:nth-child(3) {
  right: 0;
  bottom: -5px;
  transform: rotate(8deg);
}

.eyebrow,
.result-kicker,
.question-kicker,
.pair-kicker,
.invite-kicker {
  display: inline-block;
  width: fit-content;
  padding: 5px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px 12px 7px 11px;
  color: #fff9e8;
  background: linear-gradient(#ff735e, #df4335);
  box-shadow: inset 0 3px rgba(255, 255, 255, 0.35), 0 3px 0 #7a301f;
  letter-spacing: 0.045em;
  transform: rotate(-1deg);
}

.title-screen .eyebrow,
.result-screen > .result-kicker {
  margin-inline: auto;
}

h1 {
  margin-top: 11px;
  color: #482416;
  font-size: clamp(33px, 9.7vw, 50px);
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: -0.035em;
  -webkit-text-stroke: 0;
  paint-order: normal;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.92);
  text-wrap: balance;
  transform: rotate(-0.35deg);
}

.lead {
  color: #5b3524;
  font-weight: 850;
}

.quick-facts span {
  border: 2px solid var(--ink);
  background: #fff6d8;
  box-shadow: 0 2px 0 rgba(73, 36, 17, 0.28);
}

.joke-line {
  color: #d74435;
  font-weight: 950;
}

.button {
  border: 3px solid var(--ink);
  border-radius: 13px 17px 12px 16px;
  box-shadow: inset 0 4px rgba(255, 255, 255, 0.36), 0 5px 0 #7b3c25, 0 10px 17px rgba(64, 29, 13, 0.12);
  font-weight: 900;
}

.button:hover {
  box-shadow: inset 0 4px rgba(255, 255, 255, 0.42), 0 6px 0 #7b3c25, 0 12px 20px rgba(64, 29, 13, 0.14);
}

.button-primary {
  border-color: var(--ink);
  color: #fff8e1;
  background: linear-gradient(#ff785f, #e84b3b);
  text-shadow: 0 2px 0 #9f3329;
}

.button-dark {
  color: #fff;
  background: linear-gradient(#39c6ed, #168dc9);
  text-shadow: 0 2px 0 #146b9a;
}

.button-soft {
  background: linear-gradient(#ffe87b, #ffc83f);
}

.button-quiet {
  border-color: var(--ink);
  background: #fff7dd;
  box-shadow: inset 0 3px rgba(255, 255, 255, 0.5), 0 4px 0 #9a6847;
}

.invite-banner,
.question-card,
.daily-card,
.recommended-card,
.pair-card,
.challenge-row,
.result-details,
.collection-progress,
.collection-card,
.error-card {
  border: 3px solid var(--ink);
  background-color: rgba(255, 248, 220, 0.96);
  box-shadow: var(--shadow-soft);
}

.invite-banner {
  background: #dff5e2;
}

.invite-art .animal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.progress-track {
  height: 12px;
  border: 2px solid var(--ink);
  background: #fff6d7;
}

.progress-fill {
  background: linear-gradient(90deg, #ee4b3a, #ffbb38);
  box-shadow: inset 0 3px rgba(255, 255, 255, 0.35);
}

.question-card {
  position: relative;
  border-radius: 23px 29px 22px 27px;
  background-image:
    repeating-linear-gradient(8deg, rgba(112, 63, 28, 0.025) 0 1px, transparent 1px 5px),
    linear-gradient(#fff9e7, #fff0c8);
}

.question-card::after {
  position: absolute;
  inset: 8px;
  border: 2px dashed rgba(111, 57, 28, 0.28);
  border-radius: 16px 21px 15px 19px;
  content: "";
  pointer-events: none;
}

.question-card > * {
  position: relative;
  z-index: 1;
}

.question-card h2 {
  color: #4b2415;
  font-weight: 950;
}

.answer-button {
  border: 2px solid var(--ink);
  border-radius: 12px 16px 11px 15px;
  background: #fff9e9;
  box-shadow: 0 4px 0 rgba(92, 47, 24, 0.22);
  font-weight: 850;
}

.answer-button:nth-child(2n) {
  background: #fff0bf;
}

.answer-button::before {
  border: 2px solid var(--ink);
  background: #ffd34d;
}

.answer-button.is-selected {
  border-color: var(--ink);
  background: #ff8b6e;
}

.answer-button.is-selected::before {
  color: #fff;
  background: #1fa8dc;
}

.result-kicker {
  margin-bottom: 11px;
}

.result-card {
  width: min(100%, 370px);
  border: 4px solid var(--ink);
  border-radius: 24px 31px 25px 29px;
  background:
    radial-gradient(circle at 15% 12%, color-mix(in srgb, var(--result-tint, #ffd685) 45%, transparent), transparent 25%),
    repeating-linear-gradient(7deg, rgba(112, 63, 28, 0.026) 0 1px, transparent 1px 5px),
    linear-gradient(#fff9e7, #ffe9b8);
  box-shadow: 0 8px 0 rgba(84, 43, 22, 0.24), 0 19px 35px rgba(64, 30, 13, 0.16);
}

.result-card::after {
  right: 15px;
  bottom: 11px;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: rgba(221, 72, 51, 0.28);
  content: "✦";
  font-size: 34px;
  font-weight: 950;
  transform: rotate(13deg);
}

.result-art {
  width: 61%;
  max-width: 225px;
  margin-top: -7px;
}

.result-art .animal-image,
.recommended-art .animal-image,
.pair-animals .animal-image,
.collection-card .animal-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 0 rgba(66, 31, 14, 0.13));
}

.result-card h2 {
  color: #482416;
  font-size: clamp(28px, 7.3vw, 36px);
  font-weight: 950;
  line-height: 1.12;
  -webkit-text-stroke: 0;
  paint-order: normal;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.92);
  text-wrap: balance;
}

.result-card p {
  color: #5b3524;
  font-size: clamp(16px, 4.1vw, 17px);
  font-weight: 850;
}

.daily-card {
  background: #fff5d6;
}

.recommended-card {
  background: linear-gradient(145deg, #fff0b9, #dff3db);
}

.recommended-match {
  border: 2px solid var(--ink);
  border-radius: 13px 17px 12px 16px;
  background: #fff9e7;
  box-shadow: 0 3px 0 rgba(82, 40, 20, 0.18);
}

.recommended-match strong {
  color: #dd493a;
}

.recommended-match h4 {
  font-size: 14px;
  line-height: 1.35;
}

.recommended-match strong {
  font-size: 14px;
}

.recommended-match p {
  font-size: 12px;
  line-height: 1.45;
}

.share-help:not([hidden]),
.challenge-row p,
.daily-card p {
  font-size: 12.5px;
  line-height: 1.45;
}

.daily-card strong {
  font-size: 15px;
  line-height: 1.55;
}

.result-details summary {
  font-size: 14px;
}

.result-details ul {
  font-size: 14px;
  line-height: 1.65;
}

.utility-button {
  padding-inline: 6px;
  font-size: 14px;
}

.pair-card {
  background: #dff3ec;
}

.pair-animals .animal-image {
  width: 96px;
  margin: 0 -9px;
}

.collection-progress {
  background: #fff2c8;
}

.collection-card {
  background: #fff7dc;
}

.collection-card .animal-image {
  width: min(100%, 140px);
  margin: 0 auto 3px;
}

.collection-card .card-rarity {
  border: 1px solid var(--ink);
  background: #ffd857;
}

.collection-card.is-locked {
  background: repeating-linear-gradient(135deg, #fff4d2 0 12px, #edd9aa 12px 24px);
}

.answer-reaction {
  position: absolute;
  z-index: 4;
  top: 46%;
  left: 50%;
  display: flex;
  width: max-content;
  max-width: calc(100% - 34px);
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 3px solid var(--ink);
  border-radius: 12px 17px 11px 15px;
  color: var(--ink);
  background: linear-gradient(#ffe66f, #ffc932);
  box-shadow: inset 0 3px rgba(255, 255, 255, 0.55), 0 5px 0 #8b4d22, 0 11px 20px rgba(67, 31, 14, 0.2);
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, -50%) rotate(-3deg);
}

.answer-reaction span {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  color: #fff8df;
  background: #e74c3c;
  font-size: 11px;
  font-weight: 950;
}

.answer-reaction strong {
  font-size: 13px;
  line-height: 1.25;
}

.answer-reaction.is-showing {
  animation: answer-stamp 420ms cubic-bezier(0.2, 0.95, 0.25, 1.2) both;
}

.collection-card.is-new {
  border-color: #e64d3d;
  box-shadow: 0 0 0 4px #ffd54c, 0 7px 0 rgba(118, 52, 25, 0.24), 0 14px 24px rgba(73, 36, 17, 0.15);
}

.new-badge {
  position: absolute;
  z-index: 2;
  top: -9px;
  right: -7px;
  padding: 5px 9px 4px;
  border: 3px solid var(--ink);
  border-radius: 8px 12px 7px 11px;
  color: #fff8df;
  background: #e94e3e;
  box-shadow: 0 3px 0 #7d321f;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.05em;
  transform: rotate(6deg);
}

@keyframes answer-stamp {
  from {
    opacity: 0;
    transform: translate(-50%, -38%) rotate(-10deg) scale(1.35);
  }
  58% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(1deg) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-3deg) scale(1);
  }
}

body[data-state="result"] .result-card {
  animation: result-card-reveal 560ms cubic-bezier(0.18, 0.9, 0.24, 1.15) both;
}

body[data-state="result"] .result-art {
  animation: result-art-reveal 620ms 90ms cubic-bezier(0.18, 0.9, 0.24, 1.12) both;
}

body[data-state="result"] .result-card h2,
body[data-state="result"] .result-card > p {
  animation: result-copy-reveal 420ms 260ms ease-out both;
}

body[data-state="result"] .result-actions-primary {
  animation: result-copy-reveal 420ms 380ms ease-out both;
}

@keyframes result-card-reveal {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-1deg) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
  }
}

@keyframes result-art-reveal {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.78) rotate(-4deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes result-copy-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .recommended-grid {
    grid-template-columns: 1fr;
  }

  .recommended-match {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-areas:
      "art name"
      "art score"
      "art reason";
    column-gap: 10px;
    align-items: center;
    padding: 8px 10px;
    text-align: left;
  }

  .recommended-art {
    grid-area: art;
    width: 88px;
    margin: 0;
  }

  .recommended-match h4 {
    grid-area: name;
    margin: 0 0 1px;
    font-size: 15px;
  }

  .recommended-match strong {
    grid-area: score;
    font-size: 14px;
  }

  .recommended-match p {
    grid-area: reason;
    margin-top: 2px;
    font-size: 12.5px;
  }
}

@media (max-width: 360px) {
  .title-art {
    height: 166px;
  }

  .title-art .animal-image {
    width: 148px;
  }

  .title-art .animal-image:nth-child(2) {
    width: 160px;
  }
}

@media (max-height: 650px) {
  .title-art {
    height: 118px;
  }

  .title-art .animal-image {
    width: 112px;
  }

  .title-art .animal-image:nth-child(2) {
    width: 124px;
  }

  .result-art {
    width: 55%;
  }
}

@media (min-width: 760px) {
  .page-shell {
    width: min(100%, 610px);
    padding-inline: 24px;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
