:root {
  color-scheme: light;
  --ink: #243230;
  --muted: #697773;
  --line: #d9e2de;
  --paper: #ffffff;
  --canvas: #f7f8f4;
  --salmon: #ff8177;
  --salmon-deep: #d95f59;
  --salmon-soft: #ffe7e2;
  --mint: #67cdb9;
  --mint-deep: #278f82;
  --mint-soft: #e2f6f0;
  --yellow-soft: #fff4ce;
  --gold: #bd8831;
  --shadow: 0 18px 46px rgba(36, 50, 48, 0.1);
  --card-shadow: 0 28px 68px rgba(36, 50, 48, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  border-top: 7px solid var(--salmon);
  background: var(--canvas);
  color: var(--ink);
  font-family:
    "Avenir Next", "Helvetica Neue", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

body::before,
body::after {
  position: absolute;
  top: 0;
  z-index: 0;
  width: 50%;
  height: 150px;
  content: "";
}

body::before {
  left: 0;
  background: var(--salmon-soft);
}

body::after {
  right: 0;
  background: var(--mint-soft);
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(39, 143, 130, 0.28);
  outline-offset: 3px;
}

[hidden],
.hidden,
.dev-only {
  display: none !important;
}

.demo-mode .dev-only {
  display: inline-flex !important;
}

.app {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 56px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  border-bottom: 1px solid rgba(217, 226, 222, 0.9);
  background: rgba(247, 248, 244, 0.93);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-number {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--salmon);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.brand-card-icon {
  position: relative;
  display: block;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
}

.brand-card-icon::before,
.brand-card-icon span {
  position: absolute;
  width: 32px;
  height: 43px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  content: "";
}

.brand-card-icon::before {
  top: 2px;
  left: 5px;
  background: var(--mint);
  box-shadow: 3px 3px 0 var(--navy);
  transform: rotate(-10deg);
}

.brand-card-icon span {
  right: 4px;
  bottom: 2px;
  background:
    linear-gradient(135deg, var(--salmon) 0 48%, var(--yellow) 48% 100%);
  box-shadow: 3px 3px 0 var(--navy);
  transform: rotate(7deg);
}

.brand-card-icon span::after {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--navy);
  border-radius: 50%;
  background: #fff;
  content: "";
}

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

.topbar h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.15;
}

.topbar .eyebrow {
  font-size: 12px;
}

.eyebrow,
.section-label,
.result-label {
  margin: 0 0 7px;
  color: var(--salmon-deep);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.screen {
  min-height: calc(100vh - 93px);
}

.start-screen {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
  align-items: center;
  gap: clamp(36px, 6vw, 84px);
  padding: 48px 0 56px;
}

.intro-copy {
  max-width: 570px;
}

.intro-copy h2 {
  max-width: 560px;
  margin: 0;
  font-size: clamp(38px, 5.3vw, 64px);
  font-weight: 500;
  line-height: 1.12;
  text-wrap: balance;
}

.intro-copy h2 span,
.intro-lead span {
  display: block;
}

.intro-copy h2 span:first-child {
  margin-bottom: 7px;
  font-size: 0.66em;
}

.intro-copy h2 span:last-child {
  font-size: clamp(32px, 4.1vw, 52px);
  white-space: nowrap;
}

.intro-lead {
  max-width: 520px;
  margin: 20px 0 0;
  color: #4f625e;
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.8;
}

.intro-lead span + span {
  margin-top: 2px;
  color: var(--navy);
  font-weight: 700;
}

.intro-copy h2,
.intro-lead {
  font-family:
    "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro",
    "M PLUS Rounded 1c", "Yu Gothic", sans-serif;
}

.intro-copy h2 span:first-child {
  display: inline-block;
  padding: 7px 12px;
  border: 2px solid var(--navy);
  border-radius: 7px;
  background: var(--mint);
  color: var(--navy);
  box-shadow: 3px 3px 0 var(--navy);
  transform: rotate(-2deg);
}

.intro-copy h2 span:last-child {
  width: fit-content;
  margin-top: 13px;
  padding: 8px 12px 10px;
  border-bottom: 7px solid var(--yellow);
  color: var(--navy);
  font-weight: 900;
  text-shadow:
    2px 2px 0 #fff,
    4px 4px 0 var(--salmon);
}

.intro-lead {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: clamp(14px, 1.45vw, 17px);
  line-height: 1.7;
}

.intro-lead span:first-child {
  color: var(--muted);
  font-weight: 500;
}

.intro-lead span + span {
  margin-top: 2px;
  color: var(--navy);
  font-weight: 600;
}

.intro-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-stats span {
  display: grid;
  min-width: 116px;
  padding: 15px 20px 14px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.intro-stats span + span {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.intro-stats strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.target-picker {
  min-width: 0;
}

.target-picker > .section-label {
  margin-bottom: 12px;
  color: var(--mint-deep);
}

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

.target-card {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(36, 50, 48, 0.12);
  border-radius: 8px;
  background: var(--paper);
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.target-card:hover,
.target-card:focus-visible {
  border-color: var(--salmon);
  box-shadow: 0 24px 56px rgba(36, 50, 48, 0.16);
  outline: none;
  transform: translateY(-4px);
}

.target-card:disabled {
  cursor: wait;
  opacity: 0.56;
  transform: none;
}

.target-visual {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  background-position: center;
  background-size: cover;
}

.target-card[data-target="female"] .target-visual {
  background-image: url("./assets/faces/female-016.jpg");
}

.target-card[data-target="male"] .target-visual {
  background-image: url("./assets/faces/male-046.jpg");
}

.target-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 15px 16px 16px;
}

.target-title {
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 500;
}

.target-action {
  flex: 0 0 auto;
  color: var(--mint-deep);
  font-size: 11px;
  font-weight: 600;
}

.rating-screen {
  padding: 26px 0 50px;
}

.progress-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
}

.progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.progress-copy .eyebrow {
  margin: 0;
}

.progress-row h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

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

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--mint-deep);
  transition: width 220ms ease;
}

.rating-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  min-height: min(680px, calc(100vh - 170px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.portrait-panel {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 7px 0 0 7px;
  background: #edf2ef;
}

.portrait-panel img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 610px;
  object-fit: cover;
}

.portrait-panel figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.rating-panel {
  display: grid;
  align-content: center;
  gap: 30px;
  padding: clamp(30px, 5vw, 64px);
}

.rating-question h2 {
  margin: 0;
  max-width: none;
  font-size: clamp(20px, 2.7vw, 36px);
  font-weight: 500;
  line-height: 1.18;
  white-space: nowrap;
}

.rating-question .eyebrow {
  font-size: 13px;
}

.rating-question > p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.profile-meta {
  display: grid;
  justify-items: start;
  gap: 6px;
  margin-top: -8px;
}

.profile-meta > span {
  color: var(--salmon-deep);
  font-size: 10px;
  font-weight: 800;
}

.mood-label {
  max-width: 100%;
  margin: 0;
  padding: 8px 11px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  box-shadow: 3px 3px 0 var(--navy);
}

.rating-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.rating-buttons button {
  display: grid;
  min-width: 0;
  min-height: 112px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 12px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.rating-buttons button[data-score="2"] {
  background: #f5f7f6;
}

.rating-buttons button[data-score="3"] {
  background: var(--yellow-soft);
}

.rating-buttons button[data-score="4"] {
  background: var(--mint-soft);
}

.rating-buttons button[data-score="5"] {
  background: var(--salmon-soft);
}

.rating-buttons button:hover,
.rating-buttons button:focus-visible {
  border-color: var(--salmon);
  outline: none;
  transform: translateY(-3px);
}

.rating-buttons strong {
  color: var(--salmon-deep);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.rating-buttons span {
  color: #51635f;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.rating-scale {
  display: flex;
  justify-content: space-between;
  margin-top: -22px;
  color: #89938f;
  font-size: 10px;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.icon-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

.icon-text-button.ghost {
  background: transparent;
}

.icon-text-button.soft {
  border-color: rgba(39, 143, 130, 0.28);
  background: var(--mint-soft);
  color: #236f67;
}

.icon-text-button.primary {
  min-height: 54px;
  border-color: var(--salmon-deep);
  background: var(--salmon);
  color: #fff;
  font-size: 16px;
  box-shadow: 0 12px 28px rgba(217, 95, 89, 0.22);
}

.icon-text-button:hover:not(:disabled) {
  filter: brightness(0.98);
}

.icon-text-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.result-screen {
  display: grid;
  gap: 34px;
  padding: 34px 0 60px;
}

.result-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.result-heading .eyebrow,
.result-heading p {
  margin: 0;
}

.result-heading > p:last-child {
  color: var(--muted);
  font-size: 14px;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: clamp(34px, 6vw, 78px);
  align-items: start;
}

.result-summary {
  min-width: 0;
  padding-top: 12px;
}

.result-label {
  color: var(--mint-deep);
}

.result-summary > h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 500;
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.lead {
  max-width: 660px;
  margin: 20px 0 0;
  color: #51635f;
  font-size: 17px;
  line-height: 1.85;
}

.liked-summary {
  margin-top: 34px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.liked-summary .section-label {
  color: var(--salmon-deep);
}

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

.liked-summary li {
  padding: 8px 11px;
  border: 1px solid rgba(39, 143, 130, 0.24);
  border-radius: 999px;
  background: var(--mint-soft);
  color: #315f59;
  font-size: 13px;
  line-height: 1.3;
}

.result-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 28px;
}

.result-insights > div {
  min-width: 0;
  padding-right: 24px;
}

.result-insights > div + div {
  padding-right: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.result-insights span {
  color: var(--salmon-deep);
  font-size: 10px;
  font-weight: 700;
}

.result-insights h3 {
  margin: 6px 0 10px;
  font-size: 17px;
  font-weight: 500;
}

.result-insights p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.ideal-panel {
  display: grid;
  gap: 13px;
  min-width: 0;
  margin: 0;
}

.unlock-heading {
  text-align: center;
}

.unlock-heading h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.35;
}

.unlock-copy {
  max-width: none;
  margin: 7px auto 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  white-space: nowrap;
}

.gacha-stage {
  position: relative;
  display: grid;
  min-height: 620px;
  place-items: center;
  padding: 28px 22px;
  overflow: hidden;
  border: 1px solid rgba(39, 143, 130, 0.16);
  border-radius: 8px;
  background: var(--mint-soft);
}

.gacha-orbit {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  pointer-events: none;
}

.face-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  width: min(100%, 370px);
  aspect-ratio: 2.5 / 3.5;
  padding: 16px;
  overflow: hidden;
  border: 3px solid var(--navy);
  border-radius: 14px;
  background: #243130;
  box-shadow:
    9px 9px 0 rgba(33, 51, 79, 0.18),
    0 22px 52px rgba(36, 49, 48, 0.24);
  transform-style: preserve-3d;
}

.face-card::before {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: linear-gradient(
    115deg,
    transparent 0 38%,
    rgba(255, 255, 255, 0.7) 48%,
    transparent 58% 100%
  );
  content: "";
  pointer-events: none;
  transform: translateX(-120%);
}

.face-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 216, 77, 0.22), transparent 24%),
    radial-gradient(circle at 84% 28%, rgba(101, 205, 185, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(21, 30, 48, 0.42) 0%, transparent 22%),
    linear-gradient(180deg, transparent 0 52%, rgba(21, 30, 48, 0.08) 62%, rgba(21, 30, 48, 0.88) 100%);
  content: "";
  pointer-events: none;
}

.card-heading {
  position: absolute;
  top: 15px;
  right: 16px;
  left: 16px;
  z-index: 3;
  display: grid;
  gap: 1px;
  color: #fff;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 10px rgba(0, 0, 0, 0.42);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  color: rgba(255, 255, 255, 0.82);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
}

.card-topline span {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: none;
}

.card-titleline {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding-right: 52px;
}

.card-titleline strong {
  position: absolute;
  top: -8px;
  right: -2px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 25%, #fffdf4 0 18%, #ffd84d 34%, #ff8177 74%, #21334f 100%);
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.52);
  box-shadow:
    0 0 0 2px rgba(33, 51, 79, 0.72),
    0 4px 14px rgba(0, 0, 0, 0.36);
}

.card-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #eef3f0;
}

.card-art::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.55) 0 2px, transparent 5px),
    radial-gradient(circle at 88% 18%, rgba(255, 216, 77, 0.42) 0 2px, transparent 5px),
    radial-gradient(circle at 86% 78%, rgba(255, 255, 255, 0.36) 0 2px, transparent 5px);
  mix-blend-mode: screen;
  opacity: 0.2;
  content: "";
  pointer-events: none;
}

.face-card.is-female-card .card-art::after {
  background:
    radial-gradient(circle at 12% 13%, rgba(181, 236, 220, 0.58) 0 2px, transparent 5px),
    radial-gradient(circle at 88% 18%, rgba(255, 216, 77, 0.44) 0 2px, transparent 5px),
    radial-gradient(circle at 86% 78%, rgba(255, 255, 255, 0.36) 0 2px, transparent 5px);
}

.face-card.is-male-card .card-art::after {
  background:
    radial-gradient(circle at 12% 13%, rgba(155, 194, 255, 0.52) 0 2px, transparent 5px),
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.44) 0 2px, transparent 5px),
    radial-gradient(circle at 86% 78%, rgba(255, 216, 77, 0.34) 0 2px, transparent 5px);
}

.ideal-panel .card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  transition:
    filter 300ms ease,
    transform 300ms ease;
}

.card-lock {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 5px;
  background: rgba(36, 50, 48, 0.22);
  color: #fff;
  text-align: center;
  backdrop-filter: blur(2px);
}

.card-lock strong {
  font-size: 24px;
  font-weight: 600;
}

.card-lock span {
  font-size: 10px;
  font-weight: 600;
}

.face-card.is-locked .card-art img {
  filter: blur(16px) saturate(0.6);
  transform: scale(1.08);
}

.face-card:not(.is-locked) .card-lock {
  display: none;
}

.face-card figcaption {
  display: none;
}

.face-card h3 {
  position: static;
  z-index: auto;
  min-width: 0;
  margin: 0;
  background: linear-gradient(90deg, #fffdf4 0%, #ffd84d 42%, #ff8177 100%);
  color: #ffd84d;
  font-size: clamp(22px, 5.4vw, 29px);
  font-weight: 900;
  line-height: 1.08;
  -webkit-background-clip: text;
  background-clip: text;
  overflow-wrap: normal;
  text-align: left;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.34),
    0 2px 10px rgba(0, 0, 0, 0.48);
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
  word-break: keep-all;
}

.face-card h3.is-card-long-name {
  font-size: clamp(15px, 3.9vw, 21px);
}

.face-card h3.is-card-very-long-name {
  font-size: clamp(12px, 3.1vw, 17px);
}

.card-score-row {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
}

.card-score-row span {
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
}

.card-score-row strong {
  color: var(--salmon-deep);
  font-size: 17px;
  font-weight: 900;
}

.card-trait-chips {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
}

.card-trait-chips span {
  padding: 5px 7px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 7px;
  background: rgba(228, 248, 242, 0.86);
  color: var(--navy);
  font-size: 9px;
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.card-feature-label {
  position: relative;
  order: 2;
  z-index: 2;
  align-self: flex-start;
  margin: 0 0 6px;
  color: var(--yellow);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28),
    0 2px 9px rgba(0, 0, 0, 0.42);
}

.card-catch-copy {
  position: relative;
  order: 3;
  z-index: 2;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  background: rgba(12, 24, 35, 0.32);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  text-align: left;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(4px);
  white-space: pre-line;
}

.card-spec-list {
  display: none;
  gap: 5px;
  margin: 0;
}

.card-spec-list div {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(7px);
}

.card-spec-list dt {
  color: var(--yellow);
  font-size: 9px;
  font-weight: 900;
}

.card-spec-list dd {
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.card-bottom-slogan {
  position: relative;
  order: 4;
  z-index: 2;
  margin: 10px 0 0;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 0;
  background: transparent;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  box-shadow: none;
}

.purchase-summary {
  display: flex;
  justify-content: center;
  gap: 0;
  color: var(--muted);
  font-size: 11px;
}

.purchase-summary span {
  padding: 0 10px;
}

.purchase-summary span + span {
  border-left: 1px solid var(--line);
}

.card-actions {
  display: grid;
  gap: 8px;
}

.price-note,
.image-status {
  margin: 0;
  text-align: center;
}

.price-note {
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.image-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.share-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 28px;
  border-top: 1px solid rgba(39, 143, 130, 0.22);
  border-bottom: 1px solid rgba(39, 143, 130, 0.22);
  background: var(--mint-soft);
}

.share-section h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
}

.share-section p:last-child {
  max-width: 720px;
  margin: 8px 0 0;
  color: #4f625e;
  font-size: 14px;
  line-height: 1.65;
}

.result-details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-details summary {
  padding: 18px 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 36px;
  padding: 10px 0 28px;
}

.detail-grid h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 500;
}

.detail-grid ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.prompt-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.prompt-heading h3 {
  margin: 0;
}

.prompt-heading .icon-text-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
}

textarea {
  width: 100%;
  min-height: 150px;
  padding: 13px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4b5c58;
  font-size: 12px;
  line-height: 1.65;
}

.ideal-panel.is-revealing .face-card {
  animation: card-reveal 820ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ideal-panel.is-revealing .face-card::before {
  animation: card-shine 900ms ease;
}

.ideal-panel.is-generating .gacha-orbit {
  animation: loading-frame 1.2s ease-in-out infinite alternate;
}

.gacha-loading {
  position: absolute;
  inset: 18px;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-content: center;
  justify-items: center;
  gap: 10px;
  border: 3px solid var(--navy);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 216, 77, 0.42), transparent 36%),
    rgba(255, 253, 249, 0.92);
  color: var(--navy);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.ideal-panel.is-generating .gacha-loading {
  opacity: 1;
  transform: scale(1);
}

.gacha-pack {
  position: relative;
  width: 112px;
  height: 152px;
  border: 3px solid var(--navy);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--salmon) 0 48%, var(--mint) 48% 100%);
  box-shadow: 7px 7px 0 rgba(33, 51, 79, 0.2);
  animation: gacha-pack-pop 900ms ease-in-out infinite;
}

.gacha-pack::before,
.gacha-pack::after {
  position: absolute;
  inset: 14px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 5px;
  content: "";
}

.gacha-pack::after {
  inset: auto 20px 20px;
  height: 28px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--navy);
}

.gacha-pack span {
  position: absolute;
  top: -16px;
  left: 50%;
  width: 42px;
  height: 42px;
  border: 3px solid var(--navy);
  border-radius: 50%;
  background: var(--yellow);
  transform: translateX(-50%);
}

.gacha-pack strong {
  position: absolute;
  top: 54px;
  left: 50%;
  padding: 4px 9px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 18px;
  transform: translateX(-50%) rotate(-5deg);
}

.gacha-loading p {
  margin: 0;
  padding: 5px 10px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: var(--yellow);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 3px 3px 0 var(--navy);
}

.gacha-loading small {
  max-width: 220px;
  color: #40534f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

@keyframes gacha-pack-pop {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  45% {
    transform: translateY(-10px) rotate(4deg) scale(1.03);
  }
}

@keyframes card-reveal {
  0% {
    opacity: 0;
    transform: translateY(28px) rotateX(14deg) scale(0.96);
  }
  70% {
    opacity: 1;
    transform: translateY(-5px) rotateX(0) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

@keyframes card-shine {
  to {
    transform: translateX(120%);
  }
}

@keyframes loading-frame {
  to {
    border-color: rgba(255, 129, 119, 0.8);
  }
}

@media (max-width: 900px) {
  body::before,
  body::after {
    height: 120px;
  }

  .app {
    width: min(100% - 24px, 720px);
  }

  .start-screen,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .start-screen {
    align-content: start;
    padding-top: 38px;
  }

  .intro-copy {
    max-width: 680px;
  }

  .target-picker {
    width: 100%;
  }

  .rating-layout {
    grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  }

  .rating-panel {
    padding: 32px 24px;
  }

  .result-layout {
    gap: 44px;
  }

  .result-summary {
    max-width: 720px;
  }

  .ideal-panel {
    width: min(100%, 500px);
    justify-self: center;
  }
}

@media (max-width: 680px) {
  .app {
    width: min(100% - 18px, 520px);
  }

  .topbar {
    min-height: 74px;
  }

  .brand-number {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .brand-card-icon {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .brand-card-icon::before,
  .brand-card-icon span {
    width: 27px;
    height: 36px;
  }

  .topbar .eyebrow {
    display: none;
  }

  .topbar h1 {
    font-size: 21px;
  }

  .topbar .icon-text-button {
    min-height: 38px;
    padding: 0 11px;
    font-size: 12px;
  }

  .screen {
    min-height: calc(100vh - 81px);
  }

  .start-screen {
    gap: 32px;
    padding: 32px 0 40px;
  }

  .intro-copy h2 {
    font-size: 38px;
  }

  .intro-copy h2 span:last-child {
    font-size: clamp(27px, 8vw, 38px);
  }

  .intro-lead {
    font-size: 15px;
  }

  .intro-stats span {
    min-width: 0;
    flex: 1 1 33%;
    padding-right: 10px;
  }

  .intro-stats span + span {
    padding-left: 10px;
  }

  .intro-stats strong {
    font-size: 20px;
  }

  .target-grid {
    gap: 8px;
  }

  .target-copy {
    display: grid;
    gap: 3px;
    padding: 11px;
  }

  .target-title {
    font-size: 16px;
  }

  .target-action {
    font-size: 9px;
  }

  .rating-screen {
    padding-top: 16px;
  }

  .progress-row {
    grid-template-columns: 120px 1fr;
    gap: 13px;
  }

  .progress-copy {
    display: block;
  }

  .progress-copy .eyebrow {
    margin-bottom: 4px;
  }

  .progress-row h2 {
    font-size: 18px;
  }

  .rating-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .portrait-panel {
    border-radius: 7px 7px 0 0;
  }

  .portrait-panel img {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 4.5;
    object-position: center 30%;
  }

  .rating-panel {
    gap: 22px;
    padding: 24px 14px 18px;
  }

  .rating-question {
    text-align: center;
  }

  .rating-question h2 {
    font-size: clamp(20px, 6vw, 27px);
  }

  .rating-question > p:last-child {
    font-size: 13px;
  }

  .profile-meta {
    justify-items: center;
    margin-top: -4px;
  }

  .mood-label {
    font-size: 14px;
    text-align: center;
  }

  .rating-buttons {
    gap: 5px;
  }

  .rating-buttons button {
    min-height: 82px;
    padding: 9px 2px;
  }

  .rating-buttons strong {
    font-size: 24px;
  }

  .rating-buttons span {
    font-size: 9px;
  }

  .rating-scale {
    margin-top: -15px;
  }

  .result-screen {
    gap: 26px;
    padding-top: 24px;
  }

  .result-heading {
    display: block;
  }

  .result-heading > p:last-child {
    margin-top: 6px;
    font-size: 12px;
  }

  .result-summary > h2 {
    font-size: 38px;
  }

  .lead {
    font-size: 15px;
  }

  .result-insights {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .result-insights > div {
    padding: 0;
  }

  .result-insights > div + div {
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .gacha-stage {
    min-height: auto;
    padding: 20px 14px;
  }

  .unlock-copy {
    font-size: 11px;
  }

  .face-card {
    width: min(100%, 340px);
  }

  .purchase-summary {
    font-size: 10px;
  }

  .share-section {
    display: grid;
    padding: 22px 18px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

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

/* Pop card-gacha theme */
:root {
  --yellow: #ffd84d;
  --yellow-soft: #fff4b8;
  --navy: #21334f;
  --blue: #6f9cff;
  --shadow: 7px 7px 0 rgba(33, 51, 79, 0.14);
  --card-shadow: 9px 9px 0 rgba(33, 51, 79, 0.2);
}

body {
  border-top-color: var(--navy);
}

.topbar {
  border-bottom: 3px solid var(--navy);
}

.brand-number {
  border: 2px solid var(--navy);
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--navy);
  transform: rotate(-3deg);
}

.topbar h1,
.intro-copy h2,
.rating-question h2,
.result-summary > h2,
.unlock-heading h2,
.share-section h2 {
  color: var(--navy);
  font-weight: 800;
}

.intro-copy h2 {
  text-shadow: 3px 3px 0 rgba(255, 216, 77, 0.72);
}

.eyebrow,
.section-label,
.result-label {
  font-weight: 800;
}

.intro-stats {
  overflow: hidden;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: #fff;
  box-shadow: 5px 5px 0 rgba(33, 51, 79, 0.14);
}

.intro-stats span {
  padding: 15px 18px;
}

.intro-stats span + span {
  padding-left: 18px;
  border-left: 2px solid var(--navy);
}

.intro-stats strong,
.target-picker > .section-label {
  color: var(--navy);
}

.target-picker > .section-label {
  font-size: 12px;
}

.target-card {
  border: 3px solid var(--navy);
  box-shadow: var(--card-shadow);
}

.target-card:hover,
.target-card:focus-visible {
  border-color: var(--navy);
  box-shadow: 4px 4px 0 rgba(33, 51, 79, 0.24);
  transform: translate(3px, 3px);
}

.target-card::before {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 9px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: var(--yellow);
  color: var(--navy);
  content: "PICK 01";
  font-size: 10px;
  font-weight: 800;
  box-shadow: 2px 2px 0 var(--navy);
}

.target-card[data-target="male"]::before {
  background: var(--mint);
  content: "PICK 02";
}

.target-copy {
  border-top: 3px solid var(--navy);
  background: var(--yellow-soft);
}

.target-card[data-target="male"] .target-copy {
  background: var(--mint-soft);
}

.target-title,
.target-action {
  color: var(--navy);
  font-weight: 800;
}

.progress-row {
  padding: 12px 14px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: #fff;
  box-shadow: 4px 4px 0 rgba(33, 51, 79, 0.12);
}

.progress-row h2 {
  color: var(--navy);
  font-weight: 800;
}

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

.progress-track span {
  background: var(--salmon);
}

.rating-layout {
  border: 3px solid var(--navy);
  box-shadow: var(--card-shadow);
}

.portrait-panel {
  border-right: 3px solid var(--navy);
  background: var(--mint-soft);
}

.portrait-panel figcaption {
  border: 2px solid var(--navy);
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
}

.rating-buttons button {
  border: 2px solid var(--navy);
}

.rating-buttons button[data-score="2"] {
  background: #eaf0ff;
}

.rating-buttons button:hover,
.rating-buttons button:focus-visible {
  border-color: var(--navy);
  box-shadow: 3px 3px 0 var(--navy);
  transform: translate(-2px, -2px);
}

.rating-buttons strong,
.rating-buttons span {
  color: var(--navy);
  font-weight: 800;
}

.icon-text-button {
  border: 2px solid var(--navy);
  font-weight: 700;
}

.icon-text-button.ghost {
  background: #fff;
}

.icon-text-button.soft {
  border-color: var(--navy);
  color: var(--navy);
}

.icon-text-button.primary {
  border-color: var(--navy);
  font-weight: 800;
  box-shadow: 5px 5px 0 var(--navy);
}

.icon-text-button:hover:not(:disabled) {
  box-shadow: 2px 2px 0 var(--navy);
  filter: none;
  transform: translate(3px, 3px);
}

.result-heading {
  border-bottom: 3px solid var(--navy);
}

.result-heading .eyebrow {
  padding: 7px 10px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: var(--yellow);
  color: var(--navy);
  box-shadow: 2px 2px 0 var(--navy);
}

.result-label {
  color: var(--salmon-deep);
}

.liked-summary {
  border-top: 3px solid var(--navy);
  border-bottom: 3px solid var(--navy);
}

.liked-summary li {
  border: 2px solid var(--navy);
  border-radius: 6px;
  color: var(--navy);
  font-weight: 700;
}

.result-insights > div + div {
  border-left: 2px solid var(--navy);
}

.result-insights span {
  display: inline-block;
  padding: 4px 7px;
  border: 2px solid var(--navy);
  border-radius: 5px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
}

.result-insights > div + div span {
  background: var(--mint);
}

.result-insights h3 {
  color: var(--navy);
  font-weight: 700;
}

.gacha-stage {
  border: 3px solid var(--navy);
  background:
    repeating-linear-gradient(
      135deg,
      var(--mint-soft) 0,
      var(--mint-soft) 18px,
      #fff 18px,
      #fff 36px
    );
  box-shadow: 7px 7px 0 rgba(33, 51, 79, 0.14);
}

.gacha-orbit {
  border: 3px dashed var(--salmon);
}

.face-card {
  border: 3px solid var(--navy);
  background: #243130;
}

.card-topline {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.card-titleline strong {
  border: 2px solid rgba(255, 255, 255, 0.86);
  color: var(--navy);
  font-weight: 900;
  box-shadow:
    0 0 0 2px rgba(33, 51, 79, 0.72),
    0 4px 14px rgba(0, 0, 0, 0.36);
}

.card-art {
  border: 0;
}

.card-lock {
  background: rgba(33, 51, 79, 0.46);
}

.card-lock strong {
  padding: 7px 10px;
  border: 2px solid #fff;
  background: var(--salmon);
  font-weight: 800;
}

.card-score-row {
  display: none;
  border: 0;
}

.card-score-row span,
.card-score-row strong {
  font-weight: 800;
}

.card-score-row span {
  color: var(--navy);
}

.card-score-row strong {
  color: var(--salmon-deep);
}

.card-trait-chips span {
  border-color: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}

.purchase-summary {
  color: var(--navy);
  font-weight: 700;
}

.purchase-summary span + span {
  border-left: 2px solid var(--navy);
}

.price-note {
  justify-self: center;
  padding: 6px 10px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  box-shadow: 2px 2px 0 var(--navy);
}

.share-section {
  border: 3px solid var(--navy);
  border-radius: 8px;
  background: var(--yellow-soft);
  box-shadow: 6px 6px 0 rgba(33, 51, 79, 0.14);
}

.result-details {
  border-top: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
}

@media (max-width: 680px) {
  .portrait-panel {
    border-right: 0;
    border-bottom: 3px solid var(--navy);
  }

  .intro-stats span {
    padding: 12px 8px;
  }

  .intro-stats span + span {
    padding-left: 8px;
  }

  .result-insights > div + div {
    border-top: 2px solid var(--navy);
    border-left: 0;
  }

  .target-card::before {
    top: 8px;
    left: 8px;
    padding: 4px 6px;
    font-size: 8px;
  }
}

@media (max-width: 390px) {
  .intro-copy h2 span:last-child {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 24px;
  }

  .intro-lead {
    padding: 0;
    font-size: 13px;
  }
}

/* Result analysis: long-form preference report */
.result-insights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 28px;
}

.result-insights > div,
.result-insights > div + div {
  min-width: 0;
  padding: 22px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: #fff;
  box-shadow: 4px 4px 0 rgba(33, 51, 79, 0.12);
}

.result-insights > div + div {
  background: #f5f7f6;
}

.result-insights p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-line;
}

@media (max-width: 680px) {
  .result-insights > div,
  .result-insights > div + div {
    padding: 18px;
    border: 2px solid var(--navy);
  }
}

/* Result title and detailed analysis readability */
#resultTypeName {
  max-width: 100%;
  font-size: clamp(28px, 3.1vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  text-wrap: nowrap;
}

#resultTypeName.is-medium-name {
  font-size: clamp(24px, 2.65vw, 37px);
}

#resultTypeName.is-long-name {
  font-size: clamp(18px, 2.05vw, 29px);
}

#resultTypeName.is-very-long-name {
  font-size: clamp(15px, 1.75vw, 24px);
}

.insight-report {
  display: grid;
  gap: 16px;
}

.insight-block {
  padding: 0 0 16px 15px;
  border-left: 3px solid rgba(39, 143, 130, 0.36);
}

.insight-block + .insight-block {
  padding-top: 16px;
  border-top: 1px dashed rgba(33, 51, 79, 0.2);
}

.result-insights .insight-kicker {
  margin: 0 0 5px;
  color: var(--salmon-deep);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.insight-block h4 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
}

.result-insights .insight-copy,
.result-insights .insight-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.result-insights .insight-note {
  margin-top: 9px;
  padding: 9px 11px;
  border: 1px solid rgba(33, 51, 79, 0.16);
  border-radius: 6px;
  background: rgba(181, 236, 220, 0.24);
  color: #40534f;
  font-size: 12px;
  line-height: 1.75;
}

@media (max-width: 680px) {
  .unlock-copy {
    font-size: 11px;
  }

  #resultTypeName {
    font-size: clamp(22px, 6.2vw, 30px);
  }

  #resultTypeName.is-medium-name {
    font-size: clamp(19px, 5.2vw, 24px);
  }

  #resultTypeName.is-long-name {
    font-size: clamp(14px, 4vw, 18px);
  }

  #resultTypeName.is-very-long-name {
    font-size: clamp(12px, 3.4vw, 15px);
  }

  .insight-block {
    padding-left: 12px;
  }

  .insight-block h4 {
    font-size: 15px;
  }
}

@media (max-width: 380px) {
  .unlock-copy {
    font-size: 10px;
  }
}

/* Result analysis transition */
.analysis-screen {
  position: relative;
  display: grid;
  min-height: calc(100vh - 118px);
  place-items: center;
  overflow: hidden;
  padding: 48px 20px 72px;
  background:
    linear-gradient(135deg, rgba(255, 231, 226, 0.9), rgba(255, 255, 255, 0.96) 48%, rgba(226, 246, 240, 0.92));
}

.analysis-screen::before,
.analysis-screen::after {
  position: absolute;
  width: 150px;
  height: 210px;
  border: 2px solid rgba(33, 51, 79, 0.12);
  border-radius: 14px;
  content: "";
}

.analysis-screen::before {
  top: 13%;
  left: -54px;
  background: rgba(255, 129, 119, 0.12);
  transform: rotate(-12deg);
}

.analysis-screen::after {
  right: -42px;
  bottom: 10%;
  background: rgba(103, 205, 185, 0.14);
  transform: rotate(11deg);
}

.analysis-stage {
  position: relative;
  z-index: 2;
  width: min(100%, 620px);
  text-align: center;
}

.analysis-card-stack {
  position: relative;
  display: grid;
  width: 108px;
  height: 146px;
  margin: 0 auto 28px;
  place-content: center;
  border: 3px solid var(--navy);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--salmon-soft), #fff 48%, var(--mint-soft));
  box-shadow: 8px 9px 0 rgba(33, 51, 79, 0.13);
  color: var(--navy);
  animation: analysis-card-float 1.8s ease-in-out infinite;
}

.analysis-card-stack::before,
.analysis-card-stack::after,
.analysis-card-stack span {
  position: absolute;
  inset: 0;
  border: 2px solid var(--navy);
  border-radius: 11px;
  background: var(--yellow-soft);
  content: "";
}

.analysis-card-stack::before {
  z-index: -2;
  transform: rotate(-9deg) translate(-13px, 4px);
}

.analysis-card-stack::after {
  z-index: -1;
  background: var(--mint-soft);
  transform: rotate(8deg) translate(13px, 3px);
}

.analysis-card-stack span {
  inset: 10px;
  border: 1px solid rgba(33, 51, 79, 0.25);
  background: transparent;
}

.analysis-card-stack strong,
.analysis-card-stack small {
  position: relative;
  z-index: 1;
}

.analysis-card-stack strong {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.analysis-card-stack small {
  margin-top: 5px;
  color: var(--salmon-deep);
  font-size: 10px;
  font-weight: 900;
}

.analysis-stage > .eyebrow {
  color: var(--mint-deep);
  font-size: 11px;
  font-weight: 900;
}

.analysis-stage h2 {
  margin-top: 8px;
  color: var(--navy);
  font-size: clamp(28px, 6vw, 46px);
  font-weight: 900;
}

.analysis-lead {
  margin: 12px auto 0;
  color: #586b66;
  font-size: 15px;
  line-height: 1.8;
}

.analysis-progress {
  width: min(100%, 470px);
  height: 12px;
  margin: 30px auto 24px;
  overflow: hidden;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: #fff;
}

.analysis-progress span {
  display: block;
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, var(--salmon), var(--yellow), var(--mint));
  transition: width 500ms ease;
}

.analysis-steps {
  display: grid;
  width: min(100%, 470px);
  gap: 7px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: left;
}

.analysis-steps li {
  position: relative;
  padding: 8px 12px 8px 34px;
  color: #91a09c;
  font-size: 13px;
  font-weight: 700;
  transition: color 220ms ease, transform 220ms ease;
}

.analysis-steps li::before {
  position: absolute;
  top: 9px;
  left: 8px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 2px solid #cbd6d2;
  border-radius: 50%;
  content: "";
}

.analysis-steps li.is-active {
  color: var(--navy);
  transform: translateX(4px);
}

.analysis-steps li.is-active::before {
  border-color: var(--salmon);
  background: var(--salmon);
  box-shadow: 0 0 0 5px rgba(255, 129, 119, 0.13);
  animation: analysis-pulse 800ms ease-in-out infinite;
}

.analysis-steps li.is-complete {
  color: var(--mint-deep);
}

.analysis-steps li.is-complete::before {
  border-color: var(--mint-deep);
  background: var(--mint);
  color: var(--navy);
  content: "✓";
  font-size: 10px;
  font-weight: 900;
}

.analysis-status {
  min-height: 22px;
  margin: 20px 0 0;
  color: var(--salmon-deep);
  font-size: 11px;
  font-weight: 800;
}

.analysis-sparkles span {
  position: absolute;
  z-index: 1;
  color: var(--salmon);
  font-size: 22px;
  animation: analysis-twinkle 1.4s ease-in-out infinite alternate;
}

.analysis-sparkles span:nth-child(1) {
  top: 20%;
  left: 18%;
}

.analysis-sparkles span:nth-child(2) {
  top: 14%;
  right: 21%;
  color: var(--mint-deep);
  animation-delay: 300ms;
}

.analysis-sparkles span:nth-child(3) {
  right: 17%;
  bottom: 23%;
  color: var(--salmon-deep);
  animation-delay: 600ms;
}

.analysis-sparkles span:nth-child(4) {
  bottom: 17%;
  left: 22%;
  color: var(--gold);
  animation-delay: 900ms;
}

@keyframes analysis-card-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes analysis-pulse {
  50% {
    box-shadow: 0 0 0 8px rgba(255, 129, 119, 0.05);
  }
}

@keyframes analysis-twinkle {
  from {
    opacity: 0.35;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1.14);
  }
}

/* Result experience */
.result-screen {
  gap: 26px;
}

.result-heading {
  border-bottom: 2px solid var(--navy);
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
  gap: 0;
}

.result-summary {
  display: grid;
  gap: 0;
  max-width: none;
  padding-top: 0;
}

.result-hero {
  position: relative;
  padding: clamp(30px, 6vw, 58px) clamp(18px, 5vw, 48px);
  overflow: hidden;
  border: 3px solid var(--navy);
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--mint-soft) 0 67%, var(--salmon-soft) 67% 100%);
  box-shadow: 7px 7px 0 rgba(33, 51, 79, 0.12);
}

.result-hero::after {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 62px;
  height: 84px;
  border: 3px solid var(--navy);
  border-radius: 7px;
  background: var(--yellow);
  box-shadow: 5px 5px 0 rgba(33, 51, 79, 0.16);
  content: "";
  opacity: 0.76;
  transform: rotate(5deg);
}

.result-hero .result-label {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: var(--salmon-deep);
  font-size: 12px;
  font-weight: 900;
}

.result-hero #resultTypeName {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 68px);
  color: var(--navy);
  font-weight: 900;
  text-shadow: 2px 2px 0 rgba(255, 216, 77, 0.66);
}

.result-hero .lead {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 18px 0 0;
  color: #334640;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.75;
}

.result-core-reading {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 15px 0 0;
  color: #41534f;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.85;
}

.result-source-note {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  color: #61716d;
  font-size: 11px;
  line-height: 1.6;
}

.summary-meta {
  display: grid;
  gap: 12px;
  padding: 22px 0 6px;
}

.summary-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(150px, 0.72fr) minmax(150px, 0.72fr);
  gap: 10px;
}

.summary-meta-grid article,
.preference-map {
  min-width: 0;
  padding: 17px 18px;
  border: 2px solid var(--navy);
  border-radius: 7px;
  background: #fff;
  box-shadow: 3px 3px 0 rgba(33, 51, 79, 0.08);
}

.summary-meta-grid article:nth-child(1) {
  background: var(--mint-soft);
}

.summary-meta-grid article:nth-child(2) {
  background: var(--yellow-soft);
}

.summary-meta-grid article:nth-child(3) {
  background: var(--salmon-soft);
}

.summary-meta-label {
  color: var(--salmon-deep);
  font-size: 8px;
  font-weight: 900;
}

.summary-meta h3,
.preference-map h3 {
  margin: 5px 0 10px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
}

.summary-meta article > strong {
  display: block;
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.4;
}

.summary-meta article > small {
  display: block;
  margin-top: 5px;
  color: #687973;
  font-size: 9px;
  line-height: 1.5;
}

.summary-combination > strong {
  color: var(--mint-deep) !important;
}

.summary-match > strong {
  color: var(--salmon-deep) !important;
  font-size: 28px !important;
}

.preference-map {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  background: #fbfcfa;
}

.preference-map h3 {
  margin-bottom: 0;
}

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

.preference-axis-list > div > p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
  color: #4b5e59;
  font-size: 10px;
  font-weight: 800;
}

.preference-axis-list > div > p strong {
  color: var(--navy);
}

.preference-axis-reading {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding: 14px 16px;
  border-left: 4px solid var(--salmon);
  background: rgba(255, 255, 255, 0.76);
  color: #4b5e59;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.8;
}

.preference-axis-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebe8;
}

.preference-axis-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--salmon));
  transition: width 700ms ease;
}

.result-section {
  padding: 32px 6px;
  border-bottom: 2px solid rgba(33, 51, 79, 0.16);
}

.result-section-heading,
.ideal-section-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.result-section-heading > span {
  display: grid;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
}

.result-section-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.35;
}

.result-section-heading > div {
  min-width: 0;
}

.result-section-heading > div > p {
  margin: 4px 0 0;
  color: #687973;
  font-size: 11px;
  line-height: 1.55;
}

.liked-summary {
  margin-top: 0;
  border-top: 0;
}

.liked-summary ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.liked-summary li {
  position: relative;
  display: grid;
  min-height: 142px;
  align-content: start;
  padding: 16px 14px;
  border: 2px solid var(--navy);
  border-radius: 7px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  box-shadow: 3px 3px 0 rgba(33, 51, 79, 0.1);
}

.liked-summary li::before {
  display: none;
}

.liked-summary .trait-rank {
  color: var(--salmon-deep);
  font-size: 8px;
  font-weight: 900;
}

.liked-summary li > strong {
  margin-top: 5px;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.45;
}

.liked-summary li > p {
  margin: 7px 0 0;
  color: #5e706b;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.6;
}

.liked-summary li > small {
  align-self: end;
  margin-top: 9px;
  color: var(--mint-deep);
  font-size: 8px;
  font-weight: 900;
}

.decisive-section {
  position: relative;
  padding: 30px 24px;
  border: 2px solid rgba(33, 51, 79, 0.18);
  border-radius: 8px;
  background: linear-gradient(115deg, #fff, var(--salmon-soft));
}

.decisive-kicker {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--navy);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
}

.decisive-title,
.gentle-title,
.clarity-title {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: clamp(19px, 3vw, 27px);
  font-weight: 900;
  line-height: 1.45;
}

.decisive-title {
  color: var(--salmon-deep);
}

.result-copy,
.interpretation-grid p {
  margin: 0;
  color: #4b5e59;
  font-size: 15px;
  line-height: 1.85;
}

.conclusion-section {
  padding: 34px 26px;
  border: 3px solid var(--navy);
  border-radius: 8px;
  background: var(--yellow-soft);
  box-shadow: 5px 5px 0 rgba(33, 51, 79, 0.12);
}

.conclusion-copy {
  margin: 0;
  color: var(--navy);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.85;
}

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

.interpretation-grid article {
  min-width: 0;
  padding: 18px 16px;
  border: 2px solid var(--navy);
  border-radius: 7px;
  background: #fff;
}

.interpretation-grid article:nth-child(2) {
  background: var(--mint-soft);
}

.interpretation-grid article:nth-child(3) {
  background: var(--salmon-soft);
}

.interpretation-grid span {
  color: var(--salmon-deep);
  font-size: 9px;
  font-weight: 900;
}

.interpretation-grid h4 {
  margin: 5px 0 9px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
}

.interpretation-grid p {
  font-size: 13px;
  line-height: 1.75;
}

.gentle-section {
  background: #f7f8f6;
}

.gentle-note {
  margin: 14px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--mint-deep);
  color: #667672;
  font-size: 12px;
  line-height: 1.75;
}

.ideal-panel {
  width: min(100%, 580px);
  justify-self: center;
  gap: 14px;
  padding: 34px 0;
  border-bottom: 2px solid rgba(33, 51, 79, 0.16);
}

.ideal-section-heading {
  width: 100%;
  margin-bottom: 2px;
}

.unlock-heading h2 {
  color: var(--navy);
  font-size: 25px;
  font-weight: 900;
}

.unlock-copy {
  max-width: 520px;
  color: #51635f;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
  white-space: normal;
}

.face-reflection-grid {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.face-reflection-grid article {
  min-width: 0;
  padding: 16px;
  border: 2px solid var(--navy);
  border-radius: 7px;
  background: var(--mint-soft);
}

.face-reflection-grid article:nth-child(2) {
  background: #f7f8f6;
}

.face-reflection-grid article > span {
  color: var(--salmon-deep);
  font-size: 8px;
  font-weight: 900;
}

.face-reflection-grid h4 {
  margin: 4px 0 9px;
  color: var(--navy);
  font-size: 13px;
}

.face-reflection-grid ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.face-reflection-grid li {
  padding: 5px 7px;
  border: 1px solid rgba(33, 51, 79, 0.22);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  color: #425550;
  font-size: 9px;
  font-weight: 800;
}

.face-generation-note {
  width: 100%;
  margin: 0;
  padding-left: 11px;
  border-left: 3px solid var(--salmon);
  color: #5c6d68;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.7;
}

.clarity-section {
  width: min(100%, 860px);
  justify-self: center;
}

.clarity-meter {
  width: 100%;
  height: 12px;
  margin: 2px 0 18px;
  overflow: hidden;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: #fff;
}

.clarity-meter span {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--salmon);
  transition: width 500ms ease;
}

@media (max-width: 680px) {
  .analysis-screen {
    min-height: calc(100vh - 92px);
    padding: 34px 8px 54px;
  }

  .analysis-card-stack {
    width: 88px;
    height: 120px;
    margin-bottom: 24px;
  }

  .analysis-stage h2 {
    font-size: 28px;
  }

  .analysis-lead {
    font-size: 13px;
  }

  .result-heading {
    padding-bottom: 11px;
  }

  .result-hero {
    padding: 28px 18px;
  }

  .result-hero::after {
    width: 42px;
    height: 58px;
    opacity: 0.54;
  }

  .result-hero #resultTypeName {
    max-width: calc(100% - 40px);
  }

  .result-hero .lead {
    font-size: 15px;
    line-height: 1.75;
  }

  .result-core-reading {
    font-size: 13px;
    line-height: 1.75;
  }

  .summary-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .summary-combination {
    grid-column: 1 / -1;
  }

  .summary-meta-grid article,
  .preference-map {
    padding: 15px;
  }

  .preference-map {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .result-section {
    padding: 27px 3px;
  }

  .result-section-heading h3 {
    font-size: 18px;
  }

  .liked-summary ul,
  .interpretation-grid {
    grid-template-columns: 1fr;
  }

  .liked-summary li {
    min-height: 0;
  }

  .conclusion-section {
    padding: 26px 18px;
  }

  .conclusion-copy {
    font-size: 15px;
  }

  .ideal-panel {
    padding: 30px 0;
  }

  .unlock-copy {
    font-size: 13px;
  }

  .face-reflection-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .topbar {
    gap: 8px;
  }

  .brand-lockup {
    gap: 7px;
  }

  .brand-card-icon {
    flex-basis: 38px;
    width: 38px;
    height: 42px;
  }

  .topbar h1 {
    overflow-wrap: normal;
    font-size: 16px;
    white-space: nowrap;
  }

  .topbar .icon-text-button {
    min-height: 36px;
    padding: 0 9px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analysis-card-stack,
  .analysis-steps li.is-active::before,
  .analysis-sparkles span {
    animation: none;
  }
}

/* Collectible card system */
.gacha-stage {
  min-height: auto;
  padding: 20px 8px 28px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.gacha-orbit {
  display: none;
}

.face-card {
  --rarity-a: #c7d0d4;
  --rarity-b: #f8fbfc;
  --rarity-c: #8a969b;
  --rarity-glow: rgba(199, 208, 212, 0.38);
  --portrait-safe-end: 67%;
  --card-info-accent: #f8fbfc;
  --card-info-border: rgba(255, 255, 255, 0.48);
  --card-info-background: linear-gradient(
    180deg,
    rgba(56, 70, 82, 0.54),
    rgba(23, 37, 49, 0.8)
  );
  position: relative;
  display: block;
  width: min(100%, 390px);
  aspect-ratio: 5 / 7;
  padding: 0;
  overflow: hidden;
  border: 4px solid transparent;
  border-radius: 16px;
  background:
    linear-gradient(#111a22, #111a22) padding-box,
    linear-gradient(135deg, var(--rarity-a), var(--rarity-b), var(--rarity-c), var(--rarity-b)) border-box;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.5),
    0 18px 44px rgba(18, 29, 39, 0.3),
    0 0 28px var(--rarity-glow);
  transform-style: preserve-3d;
}

.face-card.rarity-r {
  --rarity-a: #aeb8bd;
  --rarity-b: #f4f7f8;
  --rarity-c: #6f7c82;
  --rarity-glow: rgba(174, 184, 189, 0.28);
}

.face-card.rarity-sr {
  --rarity-a: #e3b84d;
  --rarity-b: #fff4bd;
  --rarity-c: #68c9b7;
  --rarity-glow: rgba(227, 184, 77, 0.34);
}

.face-card.rarity-ssr {
  --rarity-a: #ff8177;
  --rarity-b: #fff6c7;
  --rarity-c: #65cdb9;
  --rarity-glow: rgba(255, 129, 119, 0.4);
}

.face-card.rarity-ur {
  --rarity-a: #63d7cf;
  --rarity-b: #fff7d3;
  --rarity-c: #ef7ea1;
  --rarity-glow: rgba(99, 215, 207, 0.46);
}

.face-card.is-female-card {
  --card-info-accent: #ffe1eb;
  --card-info-border: rgba(255, 221, 233, 0.66);
  --card-info-background: linear-gradient(
    180deg,
    rgba(235, 118, 155, 0.52),
    rgba(171, 54, 105, 0.72) 48%,
    rgba(92, 29, 71, 0.84)
  );
}

.face-card.is-male-card {
  --card-info-accent: #dff3ff;
  --card-info-border: rgba(214, 240, 255, 0.68);
  --card-info-background: linear-gradient(
    180deg,
    rgba(77, 168, 224, 0.5),
    rgba(37, 105, 171, 0.72) 48%,
    rgba(18, 55, 104, 0.86)
  );
}

.face-card::before {
  z-index: 7;
}

.face-card::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    transparent 0 63%,
    rgba(8, 15, 21, 0.05) 67%,
    rgba(8, 15, 21, 0.2) 82%,
    rgba(8, 15, 21, 0.36) 100%
  );
  content: "";
  pointer-events: none;
}

.card-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 12px;
}

.face-card .card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
  transform: scale(1.12);
  transform-origin: 50% 27%;
}

.face-card.is-male-card .card-art img {
  transform-origin: 50% 60%;
}

.card-art::after {
  display: none;
}

.card-foil {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(circle at 7% 9%, rgba(255, 255, 255, 0.72) 0 1px, transparent 4px),
    radial-gradient(circle at 93% 15%, var(--rarity-b) 0 1px, transparent 5px),
    radial-gradient(circle at 6% 43%, var(--rarity-a) 0 1px, transparent 5px),
    radial-gradient(circle at 94% 48%, rgba(255, 255, 255, 0.48) 0 1px, transparent 4px),
    linear-gradient(90deg, color-mix(in srgb, var(--rarity-a) 14%, transparent), transparent 8% 92%, color-mix(in srgb, var(--rarity-c) 14%, transparent));
  box-shadow:
    inset 12px 0 20px color-mix(in srgb, var(--rarity-a) 18%, transparent),
    inset -12px 0 20px color-mix(in srgb, var(--rarity-c) 18%, transparent);
  mix-blend-mode: screen;
  opacity: 0.38;
  pointer-events: none;
}

.collectible-card-header {
  position: absolute;
  top: 12px;
  right: 14px;
  left: 14px;
  z-index: 5;
  max-height: 20%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(5, 12, 18, 0.72),
    0 2px 8px rgba(5, 12, 18, 0.38);
  backdrop-filter: none;
  pointer-events: none;
}

.collectible-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 6px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.card-id-group {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.card-id-group strong {
  background: linear-gradient(135deg, #fff, var(--rarity-b), var(--rarity-a));
  color: var(--rarity-b);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.64));
  -webkit-text-fill-color: transparent;
}

.collectible-card-title-row {
  display: block;
  margin-top: 3px;
}

.collectible-card-title-row h3 {
  min-width: 0;
  margin: 0;
  background: linear-gradient(90deg, #fff 0%, var(--rarity-b) 42%, var(--rarity-a) 78%, #fff 100%);
  color: #fff;
  display: -webkit-box;
  max-height: 54px;
  padding-bottom: 2px;
  overflow: hidden;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 1px 1px rgba(3, 10, 16, 0.82))
    drop-shadow(0 2px 5px rgba(3, 10, 16, 0.42));
  -webkit-text-stroke: 0.25px rgba(8, 18, 27, 0.42);
  -webkit-text-fill-color: transparent;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.collectible-card-title-row h3.is-card-long-name {
  font-size: 20px;
}

.collectible-card-title-row h3.is-card-very-long-name {
  font-size: 16px;
}

.card-subline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 1px;
}

.card-subtype {
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 7px;
  font-weight: 700;
  line-height: 1.3;
}

.card-subline > span {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.82);
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0;
}

.collectible-card-info {
  position: absolute;
  top: var(--portrait-safe-end);
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  min-height: 0;
  padding: 9px 12px 8px;
  overflow: hidden;
  border: 1px solid var(--card-info-border);
  border-radius: 11px;
  background: var(--card-info-background);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(7px) saturate(1.12);
}

.card-attributes {
  display: grid;
  gap: 0;
  margin: 0;
}

.card-attributes div {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.card-attributes dt {
  color: var(--card-info-accent);
  font-size: 8.5px;
  font-weight: 900;
  line-height: 1.4;
}

.card-attributes dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.94);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-attribute-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 21px;
  margin-top: 3px;
  overflow: hidden;
}

.card-attribute-tags span {
  min-width: 0;
  padding: 3px 6px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rarity-b) 42%, transparent);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 7px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-flavor-block {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  margin-top: 2px;
}

.card-flavor-block > span {
  padding-top: 1px;
  color: var(--card-info-accent);
  font-size: 7px;
  font-weight: 900;
  line-height: 1.4;
}

.card-flavor {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  display: -webkit-box;
  max-height: 25px;
  overflow: hidden;
  font-size: 8px;
  font-weight: 500;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-match-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.card-issued-label {
  color: rgba(255, 255, 255, 0.54);
  font-size: 7px;
  font-weight: 900;
  line-height: 1.2;
}

.card-match-rate {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.card-match-rate small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 7px;
  font-weight: 800;
}

.card-match-rate strong {
  color: var(--card-info-accent);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.collectible-card-info .card-bottom-slogan {
  margin: 0;
  padding: 3px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--card-info-accent);
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.face-card.is-locked .card-art img {
  filter: blur(16px) saturate(0.5);
}

.face-card.is-card-dense .collectible-card-title-row h3 {
  font-size: 16px;
}

.face-card.is-card-dense .card-attributes div {
  padding: 1px 0;
}

.face-card.is-card-dense .card-attributes dd {
  font-size: 9px;
}

.face-card.is-card-dense .card-attribute-tags {
  margin-top: 3px;
}

.face-card.is-card-dense .card-flavor-block {
  margin-top: 3px;
}

.face-card.is-card-dense .card-flavor {
  font-size: 7px;
}

.face-card.is-card-dense .card-match-row {
  margin-top: 3px;
  padding-top: 3px;
}

.card-lock {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-content: center;
  gap: 5px;
  background: linear-gradient(180deg, rgba(17, 32, 43, 0.66), rgba(9, 20, 29, 0.94));
  color: #fff;
  text-align: center;
  backdrop-filter: blur(4px);
}

.card-lock strong {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  background: rgba(255, 129, 119, 0.86);
  font-size: 16px;
  font-weight: 900;
}

.card-lock span {
  font-size: 7px;
  font-weight: 800;
}

.face-card:not(.is-locked) .card-lock {
  display: none;
}

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

.card-actions #generateFaceButton {
  grid-column: 1 / -1;
}

@media (max-width: 420px) {
  .face-card {
    width: min(100%, 350px);
  }

  .collectible-card-title-row h3 {
    font-size: 21px;
  }

  .collectible-card-title-row h3.is-card-long-name {
    font-size: 18px;
  }

  .collectible-card-title-row h3.is-card-very-long-name {
    font-size: 15px;
  }

  .collectible-card-info {
    --portrait-safe-end: 67%;
    padding-right: 10px;
    padding-left: 10px;
  }

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

  .card-actions #generateFaceButton {
    grid-column: auto;
  }
}

/* Start experience */
.start-screen {
  position: relative;
  display: block;
  min-height: auto;
  padding: 0 0 48px;
  overflow: hidden;
}

.start-screen::before {
  position: absolute;
  inset: 0 calc(50% - 50vw) auto;
  z-index: -2;
  height: 720px;
  background:
    linear-gradient(110deg, rgba(255, 231, 226, 0.88), rgba(255, 250, 235, 0.9) 48%, rgba(226, 246, 240, 0.9));
  border-bottom: 1px solid rgba(33, 51, 79, 0.1);
  content: "";
}

.start-screen::after {
  position: absolute;
  top: 52px;
  right: 1%;
  z-index: -1;
  width: 174px;
  height: 220px;
  border: 2px solid rgba(33, 51, 79, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.28);
  content: "";
  transform: rotate(9deg);
}

.start-decorations span {
  position: absolute;
  z-index: 0;
  color: var(--salmon);
  font-family: "Avenir Next", sans-serif;
  font-weight: 900;
  pointer-events: none;
}

.start-decorations span:nth-child(1) {
  top: 58px;
  left: 45%;
  font-size: 30px;
  transform: rotate(12deg);
}

.start-decorations span:nth-child(2) {
  top: 238px;
  left: 2%;
  color: var(--mint-deep);
  font-size: 34px;
  transform: rotate(-13deg);
}

.start-decorations span:nth-child(3) {
  top: 565px;
  right: 2%;
  color: var(--gold);
  font-size: 27px;
}

.start-decorations span:nth-child(4) {
  top: 760px;
  left: 7%;
  color: var(--mint);
  font-size: 24px;
}

.start-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
  align-items: center;
  gap: clamp(38px, 5vw, 72px);
  min-height: 634px;
  padding: 52px 0 62px;
}

.start-hero .intro-copy {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

.hero-sticker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 20px;
  padding: 0 12px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 3px 3px 0 var(--navy);
  transform: rotate(-2deg);
}

.start-hero .intro-copy h2 {
  max-width: 590px;
  margin: 0;
  color: var(--navy);
  font-family:
    "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro",
    "M PLUS Rounded 1c", "Yu Gothic", sans-serif;
  font-size: clamp(35px, 3.7vw, 48px);
  font-weight: 900;
  line-height: 1.16;
  text-shadow: none;
}

.start-hero .intro-copy h2 span,
.start-hero .intro-copy h2 span:first-child,
.start-hero .intro-copy h2 span:last-child {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1em;
  font-weight: 900;
  line-height: inherit;
  white-space: nowrap;
  box-shadow: none;
  text-shadow: none;
  transform: none;
}

.start-hero .intro-copy h2 .hero-title-accent {
  width: fit-content;
  padding: 0 3px 1px;
  border-bottom: 7px solid var(--yellow);
  color: var(--salmon-deep);
  text-shadow: 2px 2px 0 #fff;
}

.start-hero .intro-lead {
  max-width: 520px;
  margin: 24px 0 0;
  color: #53655f;
  font-family:
    "Avenir Next", "Helvetica Neue", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.9;
}

.start-hero .intro-lead span {
  display: inline;
  color: var(--navy);
  font-size: 1.04em;
  font-weight: 900;
}

.hero-reward-note {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin-top: 19px;
  padding: 9px 13px;
  border: 1px solid rgba(217, 95, 89, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--salmon-deep);
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 8px 22px rgba(33, 51, 79, 0.07);
}

.hero-reward-note span {
  color: var(--gold);
  font-size: 18px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 310px;
  min-height: 60px;
  margin-top: 25px;
  padding: 0 20px 0 24px;
  border: 3px solid var(--navy);
  border-radius: 8px;
  background: var(--salmon);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 6px 6px 0 var(--navy);
  transition:
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.hero-cta span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 20px;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  background: #f47268;
  box-shadow: 3px 3px 0 var(--navy);
  outline: none;
  transform: translate(3px, 3px);
}

.world-copy {
  margin: 19px 0 0;
  color: rgba(33, 51, 79, 0.54);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.start-hero .target-picker {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.target-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.target-heading .section-label {
  width: fit-content;
  margin: 0;
  color: var(--mint-deep);
  font-size: 11px;
}

.target-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(22px, 2.3vw, 31px);
  font-weight: 900;
  line-height: 1.3;
}

.target-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.start-hero .target-grid {
  gap: 16px;
}

.start-hero .target-card {
  overflow: visible;
  border: 3px solid var(--navy);
  border-radius: 10px;
  background: #fff;
  box-shadow: 8px 8px 0 rgba(33, 51, 79, 0.18);
  transform: rotate(-1.3deg);
}

.start-hero .target-card:nth-child(2) {
  transform: rotate(1.3deg);
}

.start-hero .target-card::before {
  display: none;
  content: none;
}

.start-hero .target-card:hover,
.start-hero .target-card:focus-visible {
  border-color: var(--navy);
  box-shadow:
    4px 4px 0 rgba(33, 51, 79, 0.2),
    0 20px 48px rgba(33, 51, 79, 0.18);
  transform: translateY(-7px) rotate(0);
}

.start-hero .target-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 7px 7px 0 0;
  background-position: center 18%;
  transition: transform 300ms ease;
}

.start-hero .target-card:hover .target-visual,
.start-hero .target-card:focus-visible .target-visual {
  transform: translateY(-2px);
}

.start-hero .target-visual::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(22, 35, 54, 0.05), transparent 56%, rgba(22, 35, 54, 0.42));
  content: "";
}

.target-type-label {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 2;
  padding: 6px 8px;
  border: 2px solid var(--navy);
  border-radius: 5px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 2px 2px 0 var(--navy);
}

.target-card[data-target="male"] .target-type-label {
  background: var(--mint);
}

.target-sparkle {
  position: absolute;
  right: 13px;
  bottom: 11px;
  z-index: 2;
  color: #fff;
  font-size: 26px;
  text-shadow: 0 2px 8px rgba(33, 51, 79, 0.35);
}

.start-hero .target-copy {
  display: grid;
  align-items: start;
  gap: 7px;
  min-height: 108px;
  padding: 15px 14px 14px;
  border-top: 3px solid var(--navy);
  border-radius: 0 0 7px 7px;
  background: var(--salmon-soft);
}

.start-hero .target-card[data-target="male"] .target-copy {
  background: var(--mint-soft);
}

.start-hero .target-title {
  color: var(--navy);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.start-hero .target-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--salmon-deep);
  font-size: 10px;
  font-weight: 900;
}

.start-hero .target-card[data-target="male"] .target-action {
  color: var(--mint-deep);
}

.reward-preview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: clamp(44px, 8vw, 112px);
  margin: 68px 0 0;
  padding: 66px clamp(28px, 5vw, 72px);
  overflow: hidden;
  border: 3px solid var(--navy);
  border-radius: 8px;
  background:
    linear-gradient(115deg, #fff7df 0 48%, #e5f7f2 48% 100%);
  box-shadow: 9px 9px 0 rgba(33, 51, 79, 0.16);
}

.reward-preview::before {
  position: absolute;
  top: 24px;
  right: 34px;
  color: rgba(217, 95, 89, 0.32);
  content: "✦  ✧  ♡";
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 14px;
}

.reward-preview-copy {
  position: relative;
  z-index: 2;
}

.reward-preview-copy .section-label,
.how-to-heading .section-label {
  color: var(--salmon-deep);
  font-size: 11px;
}

.reward-preview-copy h3,
.how-to-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 900;
  line-height: 1.28;
}

.reward-title-line {
  display: block;
  white-space: nowrap;
}

.reward-preview-copy > p:not(.section-label, .reward-english) {
  max-width: 480px;
  margin: 20px 0 0;
  color: #53645f;
  font-size: 15px;
  line-height: 1.85;
}

.reward-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 23px;
}

.reward-tags span {
  padding: 7px 10px;
  border: 1px solid rgba(33, 51, 79, 0.22);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--navy);
  font-size: 10px;
  font-weight: 900;
}

.reward-english {
  margin: 25px 0 0;
  color: var(--mint-deep);
  font-size: 10px;
  font-weight: 900;
}

.reward-card-showcase {
  position: relative;
  display: grid;
  min-height: 480px;
  place-items: center;
}

.reward-back-card,
.sample-face-card {
  position: absolute;
  width: min(270px, 78%);
  aspect-ratio: 5 / 7;
  border: 3px solid var(--navy);
  border-radius: 14px;
}

.reward-back-card-mint {
  background: var(--mint);
  box-shadow: 7px 7px 0 rgba(33, 51, 79, 0.2);
  transform: translate(-52px, 12px) rotate(-9deg);
}

.reward-back-card-pink {
  background: var(--salmon);
  box-shadow: 7px 7px 0 rgba(33, 51, 79, 0.16);
  transform: translate(54px, 14px) rotate(9deg);
}

.sample-face-card {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: #111a22;
  box-shadow:
    0 24px 50px rgba(33, 51, 79, 0.28),
    0 0 28px rgba(255, 216, 77, 0.28);
  transform: rotate(-1deg);
}

.sample-face-card::before {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 5px solid transparent;
  border-radius: 11px;
  background:
    linear-gradient(135deg, #ff8177, #fff4b8, #67cdb9, #fff4b8) border-box;
  content: "";
  mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.sample-face-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 62%, rgba(128, 38, 76, 0.08) 67%, rgba(96, 30, 71, 0.38) 100%);
  content: "";
  pointer-events: none;
}

.sample-face-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 8%;
  transform: scale(1.1);
  transform-origin: center 27%;
}

.sample-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.92);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0;
}

.sample-card-topline strong {
  color: var(--yellow-soft);
  font-size: 12px;
}

.sample-card-overlay {
  position: absolute;
  top: 12px;
  right: 14px;
  left: 14px;
  z-index: 2;
  max-height: 20%;
  overflow: hidden;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(5, 12, 18, 0.76),
    0 2px 7px rgba(5, 12, 18, 0.42);
  pointer-events: none;
}

.sample-card-overlay > p {
  margin: 3px 0 0;
  color: #fff7cf;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}

.sample-card-subline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 6px;
  font-weight: 800;
}

.sample-card-detail {
  position: absolute;
  top: 67%;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  overflow: hidden;
  padding: 10px 11px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9px;
  background:
    linear-gradient(145deg, rgba(235, 118, 155, 0.54), rgba(153, 47, 99, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(8px);
}

.sample-card-detail dl {
  display: grid;
  gap: 3px;
  margin: 0;
}

.sample-card-detail dl div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 5px;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.sample-card-detail dt {
  color: var(--yellow-soft);
  font-size: 7px;
  font-weight: 900;
}

.sample-card-detail dd {
  margin: 0;
  overflow: hidden;
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sample-card-flavor {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 5px;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 7px;
  line-height: 1.35;
}

.sample-card-flavor strong {
  color: var(--yellow-soft);
  font-size: 7px;
}

.sample-card-match {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.58);
  font-size: 6px;
  font-weight: 900;
}

.sample-card-match strong {
  color: var(--yellow-soft);
  font-size: 13px;
  line-height: 1;
}

.reward-shine {
  position: absolute;
  z-index: 4;
  color: #fff;
  font-size: 34px;
  filter: drop-shadow(0 0 8px rgba(255, 216, 77, 0.7));
}

.reward-shine-one {
  top: 73px;
  right: 13%;
}

.reward-shine-two {
  bottom: 70px;
  left: 14%;
  color: var(--yellow);
}

.how-to-play {
  padding: 88px 0 72px;
}

.how-to-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.how-to-heading h3 {
  max-width: 760px;
  font-size: clamp(28px, 3vw, 40px);
}

.step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 15px;
  min-height: 164px;
  padding: 23px 20px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: #fff;
  box-shadow: 5px 5px 0 rgba(33, 51, 79, 0.12);
}

.step-list li:nth-child(2) {
  background: var(--mint-soft);
}

.step-list li:nth-child(3) {
  background: var(--salmon-soft);
}

.step-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.step-list strong {
  display: block;
  color: var(--navy);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.4;
}

.step-list p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.start-footer {
  display: grid;
  gap: 10px;
  padding: 26px 0 5px;
  border-top: 1px solid rgba(33, 51, 79, 0.18);
  text-align: center;
}

.start-footer p {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.6;
}

.start-footer small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

@media (max-width: 960px) {
  .start-screen::before {
    height: 1140px;
  }

  .start-hero {
    grid-template-columns: 1fr;
    gap: 50px;
    padding-top: 46px;
  }

  .start-hero .intro-copy {
    max-width: 680px;
  }

  .start-hero .target-picker {
    width: 100%;
  }

  .reward-preview {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 28px;
  }
}

@media (max-width: 680px) {
  .start-screen {
    padding-bottom: 32px;
  }

  .start-screen::before {
    height: 1340px;
  }

  .start-screen::after {
    top: 90px;
    right: -90px;
    opacity: 0.62;
  }

  .start-decorations span:nth-child(1) {
    top: 38px;
    right: 4px;
    left: auto;
  }

  .start-decorations span:nth-child(2) {
    top: 330px;
  }

  .start-decorations span:nth-child(3) {
    top: 770px;
  }

  .start-hero {
    gap: 42px;
    min-height: auto;
    padding: 34px 0 46px;
  }

  .hero-sticker {
    margin-bottom: 17px;
    font-size: 9px;
  }

  .start-hero .intro-copy h2 {
    font-size: clamp(34px, 9.4vw, 44px);
    line-height: 1.2;
  }

  .start-hero .intro-copy h2 span,
  .start-hero .intro-copy h2 span:first-child,
  .start-hero .intro-copy h2 span:last-child {
    font-size: 1em;
  }

  .start-hero .intro-lead {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.85;
  }

  .hero-reward-note {
    align-items: flex-start;
    font-size: 11px;
  }

  .hero-cta {
    width: calc(100% - 6px);
    min-width: 0;
    min-height: 58px;
    font-size: 14px;
  }

  .world-copy {
    text-align: center;
  }

  .target-heading h3 {
    font-size: 24px;
  }

  .start-hero .target-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .start-hero .target-card,
  .start-hero .target-card:nth-child(2) {
    grid-template-columns: minmax(128px, 0.42fr) minmax(0, 0.58fr);
    overflow: hidden;
    transform: none;
  }

  .start-hero .target-visual {
    height: 100%;
    min-height: 190px;
    aspect-ratio: auto;
    border-radius: 7px 0 0 7px;
  }

  .start-hero .target-copy {
    align-content: center;
    min-height: 190px;
    padding: 18px 15px;
    border-top: 0;
    border-left: 3px solid var(--navy);
    border-radius: 0 7px 7px 0;
  }

  .start-hero .target-title {
    font-size: 18px;
  }

  .target-type-label {
    top: 8px;
    left: 7px;
    padding: 5px 6px;
    font-size: 7px;
  }

  .reward-preview {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 18px;
    padding: 42px 19px 38px;
  }

  .reward-preview::before {
    top: 14px;
    right: 8px;
    font-size: 20px;
  }

  .reward-preview-copy {
    text-align: center;
  }

  .reward-preview-copy h3 {
    font-size: clamp(23px, 7.1vw, 30px);
    line-height: 1.3;
  }

  .reward-preview-copy > p:not(.section-label, .reward-english) {
    margin-top: 15px;
    font-size: 13px;
  }

  .reward-preview-copy .section-label {
    margin-right: auto;
    margin-left: auto;
  }

  .reward-tags {
    justify-content: center;
  }

  .reward-card-showcase {
    min-height: 420px;
  }

  .reward-back-card,
  .sample-face-card {
    width: min(245px, 74%);
  }

  .how-to-play {
    padding: 66px 0 54px;
  }

  .how-to-heading {
    display: grid;
    gap: 3px;
    margin-bottom: 22px;
  }

  .how-to-heading h3 {
    font-size: clamp(17px, 5vw, 25px);
    line-height: 1.35;
    white-space: nowrap;
  }

  .step-list {
    grid-template-columns: 1fr;
  }

  .step-list li {
    min-height: 0;
    padding: 19px 17px;
  }

  .start-footer {
    text-align: left;
  }
}

@media (max-width: 380px) {
  .start-hero .intro-copy h2 {
    font-size: 35px;
  }

  .start-hero .target-card,
  .start-hero .target-card:nth-child(2) {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .start-hero .target-title {
    font-size: 16px;
  }

  .sample-card-overlay > p {
    font-size: 16px;
  }
}

/* Card-by-card diagnosis experience */
.rating-screen {
  position: relative;
  min-height: calc(100vh - 86px);
  padding: 28px 0 64px;
  overflow-x: clip;
}

.rating-screen::before {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -2;
  background:
    linear-gradient(118deg, rgba(255, 231, 226, 0.72), rgba(255, 250, 235, 0.84) 48%, rgba(226, 246, 240, 0.78));
  content: "";
}

.rating-screen::after {
  position: absolute;
  top: 146px;
  right: -5px;
  z-index: -1;
  color: rgba(217, 95, 89, 0.24);
  content: "✦  ♡  ✧";
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 11px;
  pointer-events: none;
}

.rating-screen .progress-row {
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(300px, 1fr) 76px;
  align-items: center;
  gap: 24px;
  margin: 0 0 26px;
  padding: 13px 16px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 4px 4px 0 rgba(33, 51, 79, 0.12);
  backdrop-filter: blur(12px);
}

.rating-screen .progress-copy {
  align-items: center;
}

.rating-screen .progress-copy > div {
  display: grid;
  gap: 3px;
}

.rating-screen .progress-copy .eyebrow {
  color: var(--salmon-deep);
  font-size: 9px;
  font-weight: 900;
}

.progress-target {
  margin: 0;
  color: var(--navy);
  font-size: 11px;
  font-weight: 900;
}

.rating-screen .progress-row h2 {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.rating-screen .progress-row h2 strong {
  color: var(--navy);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.rating-screen .progress-row h2 span {
  color: #72807c;
  font-size: 13px;
  font-weight: 800;
}

.progress-status {
  display: grid;
  gap: 7px;
}

.rating-screen .progress-track {
  height: 13px;
  overflow: hidden;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: #fff;
}

.rating-screen .progress-track span {
  position: relative;
  display: block;
  min-width: 8px;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--salmon), var(--yellow) 52%, var(--mint));
  transition: width 240ms ease;
}

.rating-screen .progress-track span::after {
  position: absolute;
  inset: 1px 4px auto 4px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  content: "";
}

.progress-status p {
  margin: 0;
  color: #657570;
  font-size: 10px;
  font-weight: 700;
}

.progress-reward {
  display: grid;
  width: 66px;
  height: 54px;
  place-content: center;
  justify-items: center;
  border: 2px solid var(--navy);
  border-radius: 7px;
  background: var(--yellow-soft);
  color: var(--navy);
  box-shadow: 2px 2px 0 var(--navy);
  transform: rotate(2deg);
}

.progress-reward span {
  position: absolute;
  margin: -11px 0 0 48px;
  color: var(--salmon);
  font-size: 15px;
}

.progress-reward strong {
  font-size: 20px;
  font-weight: 900;
  line-height: 0.95;
}

.progress-reward small {
  font-size: 6px;
  font-weight: 900;
}

.rating-screen .rating-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(500px, 1.1fr);
  align-items: center;
  gap: clamp(38px, 5vw, 72px);
  min-height: min(680px, calc(100vh - 190px));
  padding: 26px clamp(24px, 4vw, 48px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rating-screen .portrait-panel {
  position: relative;
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 14px 8px 24px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  place-items: center;
}

.portrait-card-stack {
  position: relative;
  width: min(96%, 470px);
  aspect-ratio: 4 / 5;
}

.portrait-deck-card {
  position: absolute;
  inset: 0;
  border: 3px solid var(--navy);
  border-radius: 15px;
  pointer-events: none;
}

.deck-card-one {
  background: var(--mint);
  box-shadow: 7px 7px 0 rgba(33, 51, 79, 0.15);
  transform: translate(-20px, 8px) rotate(-5deg);
}

.deck-card-two {
  background: var(--salmon);
  box-shadow: 7px 7px 0 rgba(33, 51, 79, 0.15);
  transform: translate(22px, 9px) rotate(5deg);
}

.rating-face-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: 45px minmax(0, 1fr) 36px;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 4px solid var(--navy);
  border-radius: 15px;
  background: #fff;
  box-shadow:
    0 24px 48px rgba(33, 51, 79, 0.22),
    0 0 24px rgba(255, 216, 77, 0.2);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.rating-face-card::before {
  position: absolute;
  inset: 0;
  z-index: 5;
  border: 5px solid transparent;
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(255, 129, 119, 0.8), rgba(255, 244, 184, 0.95), rgba(103, 205, 185, 0.78)) border-box;
  content: "";
  mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.rating-card-meta,
.rating-face-card footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: #fffaf0;
  color: var(--navy);
}

.rating-card-meta {
  border-bottom: 3px solid var(--navy);
}

.rating-card-meta span {
  font-size: 10px;
  font-weight: 900;
}

.rating-card-meta strong {
  color: var(--salmon-deep);
  font-size: 13px;
  font-weight: 900;
}

.rating-card-image {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #edf2ef;
}

.rating-screen .portrait-panel .rating-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center 18%;
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.rating-screen .portrait-panel .rating-card-image img.is-legacy-male-portrait {
  transform: scale(1.1);
  transform-origin: 50% 22%;
}

.rating-screen .portrait-panel .rating-card-image img.is-low-light-portrait {
  filter: brightness(1.16) saturate(0.94);
}

.rating-card-foil {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.82) 0 1px, transparent 5px),
    radial-gradient(circle at 92% 18%, rgba(255, 244, 184, 0.9) 0 1px, transparent 5px),
    radial-gradient(circle at 90% 88%, rgba(255, 255, 255, 0.7) 0 1px, transparent 5px),
    radial-gradient(circle at 9% 82%, rgba(103, 205, 185, 0.72) 0 1px, transparent 5px);
  pointer-events: none;
}

.rating-face-card footer {
  border-top: 3px solid var(--navy);
  background: var(--yellow-soft);
  font-size: 8px;
  font-weight: 900;
}

.rating-face-card footer span:last-child {
  color: var(--salmon);
  font-size: 15px;
}

.rating-screen .ai-portrait-disclaimer {
  position: relative;
  z-index: 3;
  width: min(94%, 500px);
  margin: 50px auto 0;
  color: rgba(33, 51, 79, 0.72);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.65;
  text-align: center;
}

.rating-screen .rating-panel {
  position: relative;
  display: grid;
  align-content: center;
  gap: 25px;
  min-width: 0;
  padding: clamp(30px, 4vw, 50px);
  border: 3px solid var(--navy);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 8px 8px 0 rgba(33, 51, 79, 0.14);
  backdrop-filter: blur(10px);
}

.rating-screen .rating-question .eyebrow {
  margin: 0 0 9px;
  color: var(--salmon-deep);
  font-size: 11px;
  font-weight: 900;
}

.rating-screen .rating-question h2 {
  max-width: 100%;
  margin: 0;
  color: var(--navy);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 900;
  line-height: 1.22;
  white-space: normal;
}

.rating-screen .rating-question > p:last-child {
  margin: 15px 0 0;
  color: #667570;
  font-size: 14px;
  line-height: 1.8;
}

.rating-screen .rating-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.rating-screen .rating-buttons button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 112px;
  place-content: center;
  gap: 9px;
  padding: 11px 4px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  box-shadow: 3px 3px 0 rgba(33, 51, 79, 0.12);
  transition:
    box-shadow 130ms ease,
    transform 130ms ease,
    background 130ms ease;
}

.rating-screen .rating-buttons button[data-score="1"] {
  background: #f4f6f5;
}

.rating-screen .rating-buttons button[data-score="2"] {
  background: #edf2ff;
}

.rating-screen .rating-buttons button[data-score="3"] {
  background: #fff8dc;
}

.rating-screen .rating-buttons button[data-score="4"] {
  background: var(--mint-soft);
}

.rating-screen .rating-buttons button[data-score="5"] {
  background: var(--salmon-soft);
}

.rating-screen .rating-buttons button:hover:not(:disabled),
.rating-screen .rating-buttons button:focus-visible,
.rating-screen .rating-buttons button.is-selected {
  border-color: var(--navy);
  box-shadow: 1px 1px 0 var(--navy);
  outline: none;
  transform: translate(2px, 2px);
}

.rating-screen .rating-buttons button[data-score="4"]:hover:not(:disabled),
.rating-screen .rating-buttons button[data-score="4"].is-selected {
  background: #bfeadd;
}

.rating-screen .rating-buttons button[data-score="5"]:hover:not(:disabled),
.rating-screen .rating-buttons button[data-score="5"].is-selected {
  background: #ffb9b1;
}

.rating-screen .rating-buttons button:disabled {
  cursor: default;
  opacity: 1;
}

.rating-screen .rating-buttons strong {
  color: var(--navy);
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
}

.rating-screen .rating-buttons span {
  color: #50615d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.rating-screen .rating-scale {
  display: flex;
  justify-content: space-between;
  margin-top: -17px;
  color: #7a8984;
  font-size: 9px;
  font-weight: 700;
}

.rating-screen .nav-row {
  padding-top: 0;
}

.rating-screen .nav-row .icon-text-button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #6b7975;
  font-size: 11px;
  box-shadow: none;
}

.rating-screen .nav-row .icon-text-button:hover:not(:disabled) {
  color: var(--navy);
  box-shadow: none;
  transform: none;
}

.rating-reward-reminder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: -8px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(33, 51, 79, 0.14);
  color: var(--mint-deep);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.rating-reward-reminder span {
  color: var(--gold);
  font-size: 15px;
}

.reaction-toast {
  position: absolute;
  top: 17px;
  right: 20px;
  z-index: 8;
  padding: 8px 12px;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  box-shadow: 3px 3px 0 var(--navy);
  transform: translateY(8px) scale(0.94);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.reaction-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reaction-toast.score-4 {
  background: var(--mint-soft);
  color: var(--mint-deep);
}

.reaction-toast.score-4::before {
  margin-right: 5px;
  color: var(--salmon);
  content: "♡";
}

.reaction-toast.score-5 {
  background: var(--yellow);
  color: var(--navy);
}

.reaction-toast.score-5::before,
.reaction-toast.score-5::after {
  color: #fff;
  content: "✦";
  filter: drop-shadow(0 0 4px rgba(189, 136, 49, 0.8));
}

.reaction-toast.score-5::before {
  margin-right: 6px;
}

.reaction-toast.score-5::after {
  margin-left: 6px;
}

.rating-layout.is-score-4::before,
.rating-layout.is-score-5::before {
  position: absolute;
  top: 14%;
  left: 38%;
  z-index: 10;
  color: var(--salmon);
  content: "♡  ✦";
  font-size: 28px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  animation: rating-particles 460ms ease-out;
}

.rating-layout.is-score-5::before {
  color: var(--gold);
  content: "✦  ✧  ✦";
  font-size: 34px;
}

.rating-layout.is-card-exiting .rating-face-card {
  animation: rating-card-out 240ms ease-in both;
}

.rating-layout.is-card-entering .rating-face-card {
  opacity: 0;
  transform: translateX(28px) rotate(2deg) scale(0.98);
}

@keyframes rating-card-out {
  to {
    opacity: 0;
    transform: translateX(-30px) rotate(-2deg) scale(0.98);
  }
}

@keyframes rating-particles {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.7);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-34px) scale(1.14);
  }
}

@media (max-width: 900px) {
  .rating-screen .progress-row {
    grid-template-columns: minmax(160px, auto) 1fr 70px;
  }

  .rating-screen .rating-layout {
    grid-template-columns: minmax(330px, 0.95fr) minmax(360px, 1.05fr);
    gap: 24px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .rating-screen .rating-panel {
    padding: 30px 24px;
  }

  .rating-screen .rating-buttons button {
    min-height: 104px;
  }
}

@media (max-width: 680px) {
  .rating-screen {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px 0 42px;
  }

  .rating-screen::after {
    top: 88px;
    font-size: 18px;
  }

  .rating-screen .rating-layout {
    order: 1;
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: 0;
    padding: 8px 0 0;
  }

  .rating-screen .portrait-panel {
    padding: 10px 6px 22px;
  }

  .portrait-card-stack {
    width: min(90%, 380px);
  }

  .deck-card-one {
    transform: translate(-10px, 8px) rotate(-4deg);
  }

  .deck-card-two {
    transform: translate(10px, 8px) rotate(4deg);
  }

  .rating-screen .ai-portrait-disclaimer {
    width: min(92%, 390px);
    margin-top: 41px;
    font-size: 9px;
    line-height: 1.6;
  }

  .rating-screen .rating-panel {
    gap: 22px;
    padding: 27px 17px 20px;
  }

  .rating-screen .rating-question h2 {
    font-size: clamp(19px, 5.3vw, 24px);
    line-height: 1.25;
    white-space: nowrap;
  }

  .rating-screen .rating-question > p:last-child {
    font-size: 13px;
  }

  .rating-screen .rating-buttons {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  .gacha-loading small {
    width: max-content;
    max-width: calc(100% - 24px);
    font-size: clamp(9px, 3vw, 12px);
    line-height: 1.4;
    white-space: nowrap;
  }

  .rating-screen .rating-buttons button {
    grid-column: span 2;
    min-height: 90px;
  }

  .rating-screen .rating-buttons button[data-score="4"] {
    grid-column: 2 / span 2;
  }

  .rating-screen .rating-buttons button[data-score="5"] {
    grid-column: 4 / span 2;
  }

  .rating-screen .rating-buttons strong {
    font-size: 27px;
  }

  .rating-screen .rating-buttons span {
    font-size: 10px;
  }

  .rating-screen .rating-scale {
    margin-top: -14px;
  }

  .rating-screen .progress-row {
    position: static;
    order: 2;
    grid-template-columns: 112px minmax(0, 1fr) 54px;
    gap: 10px;
    margin: 0;
    padding: 10px;
    box-shadow:
      4px 4px 0 rgba(33, 51, 79, 0.12),
      0 12px 30px rgba(33, 51, 79, 0.16);
  }

  .rating-screen .progress-copy > div {
    display: none;
  }

  .rating-screen .progress-row h2 strong {
    font-size: 27px;
  }

  .progress-status {
    gap: 5px;
  }

  .progress-status p {
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .progress-reward {
    width: 48px;
    height: 43px;
  }

  .progress-reward strong {
    font-size: 16px;
  }

  .progress-reward span {
    margin: -8px 0 0 35px;
    font-size: 11px;
  }

  .reaction-toast {
    top: 12px;
    right: 14px;
    font-size: 11px;
  }

  .rating-layout.is-score-4::before,
  .rating-layout.is-score-5::before {
    top: 7%;
    left: 67%;
  }
}

@media (max-width: 380px) {
  .portrait-card-stack {
    width: min(91%, 340px);
  }

  .rating-screen .rating-panel {
    padding-right: 13px;
    padding-left: 13px;
  }

  .reward-preview {
    padding-right: 14px;
    padding-left: 14px;
  }

  .reward-preview-copy h3 {
    font-size: clamp(21px, 7vw, 26px);
  }

  .how-to-heading h3 {
    font-size: clamp(16px, 4.8vw, 18px);
  }

  .rating-screen .rating-question h2 {
    font-size: clamp(17px, 5.2vw, 20px);
  }

  .rating-screen .rating-buttons {
    gap: 6px;
  }

  .rating-screen .rating-buttons button {
    min-height: 84px;
  }

  .rating-screen .rating-buttons span {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rating-layout.is-card-exiting .rating-face-card,
  .rating-layout.is-score-4::before,
  .rating-layout.is-score-5::before {
    animation-duration: 0.01ms;
  }
}

/* Compact evaluation flow: keep the portrait and rating controls close. */
.rating-screen {
  padding-top: 18px;
}

.rating-screen .progress-row {
  margin-bottom: 14px;
}

.rating-screen .rating-layout {
  grid-template-columns: minmax(330px, 0.88fr) minmax(430px, 1.12fr);
  gap: clamp(22px, 3vw, 38px);
  min-height: min(610px, calc(100dvh - 180px));
  padding: 14px clamp(12px, 2.4vw, 30px);
}

.rating-screen .portrait-panel {
  padding-bottom: 8px;
}

.rating-screen .portrait-card-stack {
  width: min(94%, 420px);
}

.rating-screen .ai-portrait-disclaimer {
  margin-top: 18px;
  font-size: 9px;
  line-height: 1.5;
}

.rating-screen .rating-panel {
  gap: 18px;
  padding: clamp(24px, 3vw, 38px);
}

.rating-screen .rating-question > p:last-child {
  margin-top: 10px;
}

.rating-screen .rating-buttons button {
  min-height: 92px;
}

@media (max-width: 680px) {
  body.is-rating-active .app {
    padding-bottom: 0;
  }

  body.is-rating-active .topbar {
    min-height: 58px;
  }

  body.is-rating-active .brand-card-icon {
    flex-basis: 34px;
    width: 34px;
    height: 38px;
  }

  body.is-rating-active .brand-card-icon::before,
  body.is-rating-active .brand-card-icon span {
    width: 23px;
    height: 31px;
  }

  body.is-rating-active .topbar h1 {
    font-size: 15px;
  }

  body.is-rating-active .topbar .icon-text-button {
    min-height: 32px;
    padding: 0 8px;
    font-size: 10px;
  }

  .rating-screen {
    display: block;
    min-height: calc(100dvh - 58px);
    padding: 6px 0 76px;
  }

  .rating-screen .rating-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 0;
    padding: 0;
  }

  .rating-screen .portrait-panel {
    padding: 3px 0 0;
  }

  .rating-screen .portrait-card-stack {
    width: auto;
    max-width: calc(100% - 34px);
    height: clamp(286px, 45dvh, 380px);
    aspect-ratio: 4 / 5;
  }

  .rating-screen .rating-face-card {
    grid-template-rows: 34px minmax(0, 1fr) 27px;
  }

  .rating-screen .rating-card-meta,
  .rating-screen .rating-face-card footer {
    padding-right: 10px;
    padding-left: 10px;
  }

  .rating-screen .rating-card-meta span {
    font-size: 8px;
  }

  .rating-screen .rating-card-meta strong {
    font-size: 10px;
  }

  .rating-screen .rating-face-card footer {
    font-size: 7px;
  }

  .rating-screen .ai-portrait-disclaimer {
    width: calc(100% - 32px);
    margin: 19px auto 7px;
    color: rgba(33, 51, 79, 0.8);
    font-size: 8.5px;
    line-height: 1.45;
  }

  .rating-screen .rating-panel {
    gap: 8px;
    padding: 11px 9px 9px;
    border-width: 2px;
    box-shadow: 4px 4px 0 rgba(33, 51, 79, 0.12);
  }

  .rating-screen .rating-question {
    text-align: center;
  }

  .rating-screen .rating-question .eyebrow {
    margin-bottom: 3px;
    font-size: 8px;
  }

  .rating-screen .rating-question h2 {
    font-size: clamp(18px, 5vw, 21px);
    line-height: 1.15;
  }

  .rating-screen .rating-question > p:last-child {
    margin-top: 4px;
    font-size: 10.5px;
    line-height: 1.4;
  }

  .rating-screen .rating-question > p:last-child br {
    display: block;
  }

  .rating-screen .rating-buttons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .rating-screen .rating-buttons button,
  .rating-screen .rating-buttons button[data-score="4"],
  .rating-screen .rating-buttons button[data-score="5"] {
    grid-column: auto;
    min-height: 62px;
    gap: 3px;
    padding: 5px 1px;
    border-radius: 7px;
    box-shadow: 2px 2px 0 rgba(33, 51, 79, 0.1);
  }

  .rating-screen .rating-buttons strong {
    font-size: 21px;
  }

  .rating-screen .rating-buttons span {
    font-size: clamp(7px, 2.2vw, 9px);
    line-height: 1.1;
  }

  .rating-screen .rating-scale {
    display: none;
  }

  .rating-screen .nav-row {
    align-items: center;
    min-height: 30px;
  }

  .rating-screen .nav-row .icon-text-button {
    min-height: 30px;
    padding: 0 7px;
    font-size: 9px;
  }

  .rating-screen .rating-reward-reminder {
    margin: 0;
    padding-top: 5px;
    font-size: 8px;
  }

  .rating-screen .rating-reward-reminder span {
    font-size: 11px;
  }

  .rating-screen .progress-row {
    position: fixed;
    right: 9px;
    bottom: max(7px, env(safe-area-inset-bottom));
    left: 9px;
    z-index: 30;
    width: min(502px, calc(100% - 18px));
    margin: 0 auto;
    grid-template-columns: 72px minmax(0, 1fr) 42px;
    gap: 7px;
    padding: 6px 8px;
    border-width: 2px;
    box-shadow:
      3px 3px 0 rgba(33, 51, 79, 0.14),
      0 8px 24px rgba(33, 51, 79, 0.18);
  }

  .rating-screen .progress-row h2 strong {
    font-size: 22px;
  }

  .rating-screen .progress-row h2 span {
    font-size: 10px;
  }

  .rating-screen .progress-track {
    height: 9px;
  }

  .rating-screen .progress-status {
    gap: 3px;
  }

  .rating-screen .progress-status p {
    font-size: 7.5px;
  }

  .rating-screen .progress-reward {
    width: 38px;
    height: 34px;
    border-width: 1.5px;
    box-shadow: 1px 1px 0 var(--navy);
  }

  .rating-screen .progress-reward strong {
    font-size: 13px;
  }

  .rating-screen .progress-reward small {
    font-size: 5px;
  }

  .rating-screen .progress-reward span {
    margin: -7px 0 0 28px;
    font-size: 9px;
  }

  .rating-screen .reaction-toast {
    top: 7px;
    right: 9px;
    padding: 5px 8px;
    font-size: 9px;
  }
}

@media (max-width: 380px) {
  .rating-screen .portrait-card-stack {
    height: clamp(276px, 44dvh, 332px);
  }

  .rating-screen .rating-panel {
    padding-right: 7px;
    padding-left: 7px;
  }

  .rating-screen .rating-buttons {
    gap: 3px;
  }

  .rating-screen .rating-buttons span {
    font-size: 7px;
  }
}
