:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #68635d;
  --paper: #fffbed;
  --white: #ffffff;
  --red: #e5484d;
  --green: #2f6f63;
  --yellow: #f3c742;
  --blue: #dceeff;
  --peach: #ffe3d8;
  --line: #202124;
  --shadow: 4px 4px 0 var(--ink);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(47,111,99,.09) 1px, transparent 1px),
    linear-gradient(180deg, rgba(47,111,99,.09) 1px, transparent 1px),
    var(--paper);
  background-size: 30px 30px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, a { font: inherit; }
button:disabled { opacity: .42; cursor: not-allowed; }
h1, h2, h3, p { letter-spacing: 0; }

.hidden { display: none !important; }

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(255, 251, 237, .74);
  overflow-x: hidden;
}

.screen {
  min-height: 100vh;
  padding: max(18px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.topbar, .brand-lockup, .hero-actions, .button-row, .quiz-top, .progress-meta, .split-actions, .atlas-header, .modal-head {
  display: flex;
  align-items: center;
}

.topbar, .progress-meta, .atlas-header, .modal-head { justify-content: space-between; }
.topbar { gap: 12px; align-items: flex-start; }
.brand-lockup { gap: 10px; }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  box-shadow: var(--shadow);
  font-weight: 950;
}

.brand-sub { color: var(--muted); font-weight: 800; }

.hero-layout {
  min-height: calc(100vh - 122px);
  display: flex;
  align-items: center;
}

.kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 15px;
  font-weight: 900;
}

h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1;
}

.lede {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
  font-weight: 650;
}

.teaser-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.teaser-panel span {
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--white);
  font-size: 13px;
  font-weight: 850;
  box-shadow: 2px 2px 0 var(--ink);
}

.teaser-panel span:nth-child(2n) { background: var(--blue); }
.teaser-panel span:nth-child(3n) { background: var(--yellow); }

.hero-actions, .button-row {
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-actions .primary-btn, .hero-actions .secondary-btn { width: 100%; }
.fine-print { margin: 6px 0 0; color: var(--muted); font-size: 13px; font-weight: 750; }

.primary-btn, .secondary-btn, .ghost-btn, .icon-btn, .primary-link, .text-link {
  border-radius: 8px;
  min-height: 48px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 900;
}

.primary-btn, .secondary-btn, .ghost-btn, .primary-link {
  border: 2px solid var(--ink);
  padding: 0 18px;
}

.primary-btn, .primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: var(--red);
  box-shadow: var(--shadow);
}

.secondary-btn { background: var(--white); color: var(--ink); }
.ghost-btn { background: transparent; color: var(--ink); }
.full { width: 100%; }

.icon-btn {
  width: 48px;
  flex: 0 0 48px;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-size: 24px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ink);
  text-decoration: underline;
}

.compact-panel, .loading-card, .project-panel {
  width: 100%;
  margin: 12vh auto 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.compact-panel h2, .loading-card h2, .project-panel h2 {
  margin: 0 0 18px;
  font-size: 34px;
  line-height: 1.05;
}

input {
  width: 100%;
  min-height: 58px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
}

.project-panel {
  margin-top: 6vh;
}

.project-lede {
  margin: -6px 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 750;
}

.project-options {
  display: grid;
  gap: 10px;
}

.project-option {
  min-height: 54px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
  font-weight: 900;
  box-shadow: 3px 3px 0 var(--ink);
}

.project-custom-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.project-panel .primary-btn {
  margin-top: 12px;
}

.project-custom-field span,
.project-context {
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}

.project-context {
  margin: 4px 0 0;
  text-align: center;
}

.project-skip {
  justify-self: center;
  margin-top: 8px;
  border: 0;
  background: transparent;
}

.screen-quiz { display: flex; flex-direction: column; justify-content: center; }
.quiz-top { gap: 12px; margin-bottom: 24px; align-items: flex-start; }
.progress-wrap { flex: 1; min-width: 0; }

.progress-meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  gap: 6px;
  align-items: flex-start;
  flex-direction: column;
}

.progress-track {
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--white);
  overflow: hidden;
}

.progress-bar { height: 100%; width: 0; background: var(--green); transition: width .22s ease; }

#questionTitle {
  margin: 0 0 24px;
  font-size: 28px;
  line-height: 1.16;
}

.options { display: grid; gap: 12px; }

.option-btn {
  width: 100%;
  min-height: 62px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 15px 16px;
  background: var(--white);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  font-weight: 820;
  line-height: 1.45;
}

.option-btn.selected { background: #fff1ad; box-shadow: 4px 4px 0 var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .option-btn:hover { background: #fff1ad; box-shadow: 4px 4px 0 var(--ink); }
}

.spinner-grid {
  width: 96px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}

.spinner-grid span {
  height: 42px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  animation: blink 1.1s infinite alternate;
}

.spinner-grid span:nth-child(2) { background: var(--red); animation-delay: .15s; }
.spinner-grid span:nth-child(3) { background: var(--green); animation-delay: .3s; }
.spinner-grid span:nth-child(4) { background: var(--blue); animation-delay: .45s; }
@keyframes blink { from { transform: translateY(0); } to { transform: translateY(8px); } }

.result-layout {
  min-height: calc(100vh - 48px);
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.result-card, .action-panel, .why-card, .project-cta, .atlas-card, .modal-panel {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.result-card {
  padding: 22px;
  min-height: 560px;
  display: flex;
  flex-direction: column;
}

.card-owner { color: var(--green); font-weight: 900; }

.result-card h2 {
  margin: 0;
  font-size: 44px;
  line-height: 1;
}

blockquote {
  margin: 24px 0 0;
  color: var(--red);
  font-size: 25px;
  line-height: 1.25;
  font-weight: 900;
}

.result-side { display: grid; gap: 14px; }
.action-panel, .why-card, .project-cta { padding: 18px; }
.action-panel { display: grid; gap: 12px; }
.split-actions { gap: 8px; }
.split-actions .ghost-btn { flex: 1; padding: 0 10px; }
.why-card summary { cursor: pointer; font-weight: 950; }
.why-card p, .project-cta p { color: var(--muted); line-height: 1.6; font-weight: 700; }
.dim-line { font-size: 13px; word-break: break-word; }
.project-cta h3 { margin: 0; font-size: 28px; line-height: 1.1; }
.project-cta .primary-link { width: 100%; margin: 8px 0; }

.atlas-header { padding-top: 8px; gap: 14px; align-items: flex-start; }
.atlas-header h2 { margin: 0; font-size: 38px; line-height: 1; }
.atlas-grid { display: grid; gap: 26px; margin-top: 26px; }
.atlas-group h3 { font-size: 25px; margin: 0 0 12px; }
.atlas-cards { display: grid; gap: 12px; }
.atlas-card { padding: 16px; box-shadow: none; }
.atlas-card.active { background: #fff1ad; box-shadow: var(--shadow); }
.atlas-card span { color: var(--red); font-weight: 950; }
.atlas-card strong { display: block; margin-top: 6px; font-size: 22px; }
.atlas-card p { color: var(--muted); line-height: 1.45; font-weight: 700; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(32, 33, 36, .42);
}

.modal-panel {
  width: min(100%, 430px);
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 16px;
}

.modal-head h2 { margin: 0; font-size: 22px; }

.share-name-field {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.share-name-field span {
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}

.share-name-panel {
  margin-top: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px;
  background: var(--white);
}

.share-name-panel summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 950;
}

.share-name-panel .secondary-btn {
  margin-top: 12px;
}

canvas {
  display: none;
}

.share-image {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
}

.share-tip {
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px;
  background: #fff1ad;
  color: var(--ink);
  line-height: 1.55;
  font-weight: 900;
}

@media (max-width: 380px) {
  h1 { font-size: 41px; }
  .lede { font-size: 17px; }
  #questionTitle { font-size: 25px; }
  .result-card h2 { font-size: 39px; }
  blockquote { font-size: 22px; }
}

@media (min-width: 760px) {
  .app-shell {
    width: min(100%, 480px);
    border-left: 2px solid rgba(32, 33, 36, .1);
    border-right: 2px solid rgba(32, 33, 36, .1);
  }
}

/* 2026-05-03 visual refactor: Image2 UI direction */
.brand-mark {
  position: relative;
  border-width: 3px;
  box-shadow: 5px 5px 0 var(--ink);
}

.brand-mark.mini {
  width: 46px;
  height: 46px;
  font-size: 18px;
}

.ghost-btn.compact {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--white);
}

.screen-hero {
  display: flex;
  flex-direction: column;
}

.hero-layout {
  min-height: auto;
  display: block;
  padding-top: 68px;
}

.screen-hero .kicker {
  margin-bottom: 20px;
  font-size: 18px;
}

.screen-hero h1 {
  font-size: clamp(50px, 15vw, 68px);
  line-height: .98;
  font-weight: 1000;
  animation: title-pop .48s cubic-bezier(.2, 1.3, .3, 1) both;
}

.screen-hero .lede {
  margin-top: 24px;
  font-size: 17px;
  font-weight: 760;
}

.hero-stickers {
  position: relative;
  height: 238px;
  margin: 26px 0 10px;
}

.hero-sticker {
  position: absolute;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 0 rgba(32, 33, 36, .12));
  animation: floaty 3.8s ease-in-out infinite;
}

.ghost-sticker {
  left: -8px;
  bottom: 4px;
  width: 38%;
}

.cosmo-sticker {
  left: 28%;
  bottom: -6px;
  width: 45%;
  z-index: 1;
  animation-delay: .3s;
}

.prmt-sticker {
  right: -8px;
  bottom: 12px;
  width: 34%;
  animation-delay: .65s;
}

.primary-btn, .secondary-btn, .ghost-btn, .icon-btn, .primary-link {
  border-width: 3px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.primary-btn {
  min-height: 62px;
  font-size: 24px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f04c54, #df343d);
  box-shadow: 6px 6px 0 var(--ink);
}

.secondary-btn {
  border-width: 3px;
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 19px;
}

.primary-btn:active, .secondary-btn:active, .ghost-btn:active, .icon-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0 var(--ink);
}

.teaser-panel span {
  border-width: 3px;
  font-size: 14px;
}

.screen-quiz {
  justify-content: flex-start;
  padding-top: max(88px, env(safe-area-inset-top));
}

.quiz-top {
  margin-bottom: 54px;
}

.quiz-top .icon-btn {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  font-size: 34px;
  border-radius: 9px;
  box-shadow: 4px 4px 0 var(--ink);
}

.progress-meta {
  font-size: 18px;
}

#progressText {
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
}

.progress-track {
  height: 20px;
  border-width: 3px;
}

#questionTitle {
  margin-bottom: 54px;
  font-size: clamp(34px, 10vw, 46px);
  line-height: 1.18;
  font-weight: 1000;
}

.options {
  gap: 18px;
}

.option-btn {
  position: relative;
  min-height: 88px;
  border-width: 3px;
  padding: 22px 54px 22px 20px;
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.option-btn.selected::after {
  content: "✓";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--green);
  color: var(--white);
  transform: translateY(-50%);
}

.screen-result {
  padding-top: max(18px, env(safe-area-inset-top));
}

.result-card {
  min-height: auto;
  padding: 16px 16px 20px;
  overflow: hidden;
  animation: card-in .38s ease both;
}

.result-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.result-kicker {
  margin: 30px 0 4px;
  color: var(--green);
  font-size: 18px;
  font-weight: 950;
}

.result-card h2 {
  margin: 0;
  font-size: clamp(62px, 18vw, 82px);
  line-height: .96;
  font-weight: 1000;
}

.result-code-line {
  margin-top: 4px;
  color: var(--green);
  font-size: clamp(46px, 14vw, 68px);
  line-height: 1;
  font-weight: 1000;
}

.result-visual {
  position: relative;
  margin: -2px -8px 0;
  min-height: 330px;
  display: grid;
  place-items: center;
}

.result-visual img {
  display: block;
  width: min(112%, 420px);
  max-height: 390px;
  object-fit: contain;
  animation: character-pop .46s cubic-bezier(.2, 1.35, .3, 1) both;
}

.result-visual figcaption {
  position: absolute;
  right: 10px;
  bottom: 18px;
  max-width: 54%;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff1ad;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.result-card blockquote {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: clamp(27px, 7.5vw, 36px);
  line-height: 1.28;
  font-weight: 1000;
}

.result-rarity-line {
  margin: 14px 0 18px;
  color: var(--green);
  font-size: 16px;
  font-weight: 950;
}

.result-insight-grid {
  display: grid;
  gap: 10px;
}

.result-info-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
  border: 3px solid var(--ink);
  border-radius: 9px;
  padding: 12px;
  background: var(--white);
}

.result-info-card h3 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.1;
}

.result-info-card p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 750;
}

.info-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #ffe3d8;
  color: var(--red);
  font-weight: 1000;
}

.info-icon.green {
  background: #dff3df;
  color: var(--green);
}

.card-owner {
  margin: 18px 0 0;
  text-align: center;
}

.action-panel {
  border-width: 3px;
  padding: 16px;
}

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

.why-card, .project-cta {
  border-width: 3px;
}

.atlas-header {
  padding-top: 24px;
}

.atlas-header .kicker {
  font-size: 20px;
}

.atlas-header h2 {
  font-size: clamp(44px, 13vw, 62px);
  line-height: .98;
}

.atlas-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.atlas-card {
  min-width: 0;
  border-width: 3px;
  border-radius: 9px;
  padding: 6px;
  background: var(--white);
  box-shadow: none;
  animation: atlas-in .36s ease both;
  animation-delay: var(--stagger, 0ms);
}

.atlas-card.active {
  position: relative;
  background: #fff1ad;
  box-shadow: 4px 4px 0 var(--ink);
}

.atlas-card.active::after {
  content: "★";
  position: absolute;
  right: -8px;
  top: -10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-size: 14px;
}

.atlas-thumb {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #fffdf2;
}

.atlas-thumb img {
  width: 114%;
  height: 114%;
  object-fit: contain;
}

.atlas-thumb span {
  color: var(--muted);
  font-size: 21px;
  font-weight: 1000;
}

.atlas-meta {
  padding: 5px 2px 2px;
}

.atlas-meta span {
  display: block;
  color: var(--red);
  font-size: 14px;
  line-height: 1;
  font-weight: 1000;
}

.atlas-meta strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(13px, 3.7vw, 16px);
  line-height: 1.12;
  font-weight: 950;
}

/* 2026-05-03 mobile pass: first-screen conversion and lighter image layout */
.screen {
  padding: max(14px, env(safe-area-inset-top)) 14px max(22px, env(safe-area-inset-bottom));
}

.screen-hero {
  min-height: 100svh;
}

.screen-hero .topbar {
  min-height: 46px;
}

.screen-hero .brand-mark {
  width: 44px;
  height: 44px;
  font-size: 18px;
  box-shadow: 4px 4px 0 var(--ink);
}

.screen-hero .brand-sub {
  font-size: 18px;
}

.hero-layout {
  flex: 1;
  padding-top: clamp(34px, 7svh, 62px);
}

.screen-hero .kicker {
  margin-bottom: 14px;
  font-size: 17px;
}

.screen-hero h1 {
  max-width: 390px;
  font-size: clamp(44px, 12.8vw, 58px);
  line-height: 1.02;
}

.screen-hero .lede {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.5;
}

.teaser-panel {
  margin-top: 16px;
  gap: 7px;
}

.teaser-panel span {
  padding: 6px 9px;
  font-size: 13px;
}

.teaser-panel span:nth-child(n+4) {
  display: none;
}

.hero-stickers {
  height: clamp(104px, 20svh, 168px);
  margin: 14px 0 0;
  overflow: hidden;
}

.ghost-sticker {
  left: 2%;
  bottom: -20px;
  width: 33%;
}

.cosmo-sticker {
  left: 35%;
  bottom: -28px;
  width: 37%;
}

.prmt-sticker {
  right: 0;
  bottom: -18px;
  width: 30%;
}

.hero-actions {
  margin-top: 16px;
  gap: 10px;
}

.hero-actions .primary-btn {
  min-height: 58px;
}

.hero-actions .secondary-btn {
  min-height: 48px;
  font-size: 17px;
}

.fine-print {
  margin-top: 10px;
  font-size: 12px;
}

.screen-quiz {
  min-height: 100svh;
  padding-top: max(18px, env(safe-area-inset-top));
}

.quiz-top {
  gap: 10px;
  margin-bottom: clamp(22px, 5svh, 38px);
}

.quiz-top .icon-btn {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  min-height: 46px;
  font-size: 26px;
}

.progress-meta {
  margin-bottom: 7px;
  font-size: 13px;
}

#progressText {
  font-size: 18px;
}

.progress-track {
  height: 14px;
}

#questionTitle {
  margin-bottom: clamp(22px, 5svh, 36px);
  font-size: clamp(29px, 8.1vw, 36px);
  line-height: 1.18;
}

.options {
  gap: 12px;
}

.option-btn {
  min-height: 72px;
  padding: 15px 42px 15px 16px;
  font-size: clamp(17px, 4.8vw, 20px);
  line-height: 1.36;
}

.option-btn.selected::after {
  right: 12px;
}

.screen-result {
  padding: max(8px, env(safe-area-inset-top)) 10px max(22px, env(safe-area-inset-bottom));
}

.result-layout {
  gap: 8px;
}

.result-card-image-wrap {
  width: calc(100% - 4px);
  margin-top: 0;
  padding: 0;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  overflow: hidden;
}

.result-card-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.result-card-fallback {
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 18px;
  background: var(--white);
  box-shadow: 4px 4px 0 var(--ink);
}

.result-card-fallback h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
}

.result-card-fallback blockquote {
  margin: 14px 0 0;
  color: var(--ink);
}

.result-action-card {
  display: grid;
  gap: 10px;
  width: calc(100% - 4px);
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 4px 4px 0 var(--ink);
}

.result-card {
  padding: 14px;
}

.result-topbar .brand-sub {
  font-size: 15px;
}

.brand-mark.mini {
  width: 38px;
  height: 38px;
  font-size: 15px;
  box-shadow: 4px 4px 0 var(--ink);
}

.ghost-btn.compact {
  min-height: 38px;
  padding: 0 12px;
  font-size: 15px;
}

.result-kicker {
  margin-top: 18px;
  font-size: 15px;
}

.result-card h2 {
  font-size: clamp(42px, 12.5vw, 58px);
  line-height: 1.02;
}

.result-code-line {
  font-size: clamp(34px, 10vw, 48px);
}

.result-visual {
  min-height: clamp(178px, 30svh, 260px);
  margin: 2px -4px 0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(47,111,99,.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(47,111,99,.08) 1px, transparent 1px),
    #fffdf2;
  background-size: 18px 18px;
}

.result-visual img {
  width: min(92%, 300px);
  max-height: clamp(176px, 29svh, 250px);
}

.result-visual figcaption {
  right: 8px;
  bottom: 8px;
  max-width: 60%;
  font-size: 11px;
  padding: 5px 8px;
}

.result-card blockquote {
  margin-top: 10px;
  font-size: clamp(22px, 6.2vw, 28px);
  line-height: 1.24;
}

.result-rarity-line {
  margin: 10px 0 0;
  font-size: 14px;
}

.card-owner {
  margin-top: 8px;
  font-size: 13px;
}

.action-panel {
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 4;
  background: rgba(255, 255, 255, .96);
}

.action-panel .primary-btn {
  min-height: 58px;
}

.split-actions .ghost-btn {
  min-height: 48px;
  font-size: 16px;
}

.result-insight-grid {
  margin-top: 0;
}

.result-info-card {
  grid-template-columns: 34px 1fr;
  padding: 11px;
}

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

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

.info-icon {
  width: 32px;
  height: 32px;
  border-width: 2px;
}

.project-cta h3 {
  font-size: 24px;
}

.atlas-header {
  padding-top: 12px;
}

.atlas-header h2 {
  font-size: clamp(38px, 11vw, 50px);
}

.atlas-header .secondary-btn {
  min-width: 58px;
  min-height: 58px;
  padding: 0 14px;
  line-height: 1.05;
}

.atlas-grid {
  gap: 8px;
  margin-top: 18px;
}

.atlas-card {
  padding: 5px;
}

.atlas-thumb img {
  width: 108%;
  height: 108%;
}

.atlas-thumb span {
  font-size: clamp(18px, 5vw, 22px);
}

.atlas-meta strong {
  font-size: clamp(12px, 3.5vw, 15px);
}

.modal {
  align-items: end;
  padding: 10px;
}

.modal-panel {
  max-height: min(88svh, 760px);
  padding: 14px;
}

.modal-head h2 {
  font-size: 20px;
}

.share-image {
  max-height: 52svh;
  object-fit: contain;
}

.share-loading {
  min-height: 36svh;
  margin-top: 14px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(32, 33, 36, .58);
  border-radius: 8px;
  background: #fffdf2;
  color: var(--green);
  font-weight: 950;
}

.share-name-panel h3 {
  margin: 0;
  color: var(--green);
  font-size: 18px;
}

.share-name-panel {
  display: grid;
  gap: 10px;
}

.share-name-panel summary {
  display: none;
}

.share-status {
  min-height: 20px;
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

@media (max-height: 780px) {
  .hero-layout {
    padding-top: 24px;
  }

  .screen-hero h1 {
    font-size: clamp(40px, 11.5vw, 50px);
  }

  .screen-hero .lede {
    margin-top: 12px;
    font-size: 15px;
  }

  .hero-stickers {
    height: 96px;
  }

  .fine-print {
    display: none;
  }

  #questionTitle {
    font-size: clamp(26px, 7.3vw, 32px);
    margin-bottom: 18px;
  }

  .option-btn {
    min-height: 66px;
    padding-top: 13px;
    padding-bottom: 13px;
    font-size: 17px;
  }

  .result-visual {
    min-height: 168px;
  }

  .result-visual img {
    max-height: 164px;
  }
}

/* 2026-05-03 V2 result page: share-first report layout */
.result-page-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 24px;
  width: calc(100% - 4px);
  padding: 0 1px;
}

.result-page-topbar .ghost-btn.compact {
  display: none;
}

.result-brand {
  gap: 7px;
  min-width: 0;
}

.result-brand .brand-sub {
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  font-weight: 950;
}

.result-brand .brand-sub.muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.icon-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  white-space: nowrap;
}

.result-hero-card {
  position: relative;
  min-height: auto;
  margin-top: 14px;
  padding: 16px 18px 16px;
  border-radius: 18px;
  border: 2.5px solid var(--ink);
  background:
    url("./assets/ui-elements/paper-mid.png"),
    linear-gradient(180deg, #fefaf0 0%, #fef6e6 50%, #fdf3de 100%);
  background-size: cover, auto;
  background-position: center, 0 0;
  background-blend-mode: soft-light, normal;
  box-shadow: 5px 5px 0 var(--ink);
  overflow: hidden;
}

/* 纸胶带装饰 - 左上 */
.result-hero-card::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 24px;
  width: 90px;
  height: 28px;
  background: url("./assets/ui-elements/tape.png") no-repeat center;
  background-size: cover;
  transform: rotate(-38deg);
  pointer-events: none;
  opacity: .92;
  filter: drop-shadow(0 1px 3px rgba(80, 60, 20, .12));
}

/* 纸胶带装饰 - 右下 */
.result-hero-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: 26px;
  width: 85px;
  height: 26px;
  background: url("./assets/ui-elements/tape.png") no-repeat center;
  background-size: cover;
  transform: rotate(-32deg);
  pointer-events: none;
  opacity: .88;
  filter: drop-shadow(0 1px 3px rgba(80, 60, 20, .1));
}

.stamp-badge {
  width: max-content;
  margin-left: auto;
  margin-bottom: 6px;
  border: 2.5px solid var(--green);
  outline: 1.5px solid var(--green);
  outline-offset: 3px;
  border-radius: 8px;
  padding: 6px 14px;
  color: var(--green);
  background: rgba(255, 255, 255, .76);
  font-size: 17px;
  font-weight: 1000;
  transform: rotate(-3deg);
}

.stamp-badge::before {
  content: "✓ ";
}

.result-title-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 2px;
}

.result-title-line h2 {
  flex: 1 1 176px;
  min-width: 0;
  font-size: clamp(32px, 9.2vw, 46px);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.result-title-sep {
  width: auto;
  height: auto;
  flex: 0 0 auto;
  background: none;
  color: var(--ink);
  font-size: clamp(36px, 10vw, 52px);
  font-weight: 200;
  line-height: 1;
  opacity: .4;
}

.result-title-line .result-code-line {
  flex: 0 1 auto;
  margin: 0;
  color: #f1b300;
  font-size: clamp(30px, 8.4vw, 40px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: 0;
}

.result-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.group-pill,
.rarity-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 2px solid rgba(32, 33, 36, .55);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, .86);
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.rarity-pill {
  color: var(--green);
}

.quote-paper {
  position: relative;
  margin: 14px -2px 0;
  border: 0;
  border-radius: 6px;
  padding: 20px 56px;
  background:
    linear-gradient(180deg, #fffdf6 0%, #fef8ec 100%);
  box-shadow:
    0 4px 14px rgba(32, 33, 36, .1),
    0 1px 4px rgba(32, 33, 36, .06);
  color: var(--ink);
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1.22;
  text-align: center;
  font-weight: 1000;
}

.quote-paper::before,
.quote-paper::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40px;
  height: 36px;
  background-repeat: no-repeat;
  background-size: contain;
  transform: translateY(-50%);
}

.quote-paper::before {
  left: 12px;
  background-image: url("./assets/ui-elements/quote-left.png");
  background-position: left center;
}

.quote-paper::after {
  right: 12px;
  background-image: url("./assets/ui-elements/quote-right.png");
  background-position: right center;
}

.result-roast-note {
  margin: 14px auto 0;
  width: min(96%, 350px);
  padding: 14px 18px;
  border-radius: 4px;
  background:
    url("./assets/ui-elements/paper-light.png"),
    linear-gradient(180deg, #fff8e8 0%, #ffefd0 100%);
  background-size: cover, auto;
  background-position: center, 0 0;
  background-blend-mode: multiply, normal;
  box-shadow:
    0 5px 14px rgba(32, 33, 36, .12),
    inset 0 1px 0 rgba(255, 255, 255, .7);
  color: var(--ink);
  font-size: clamp(18px, 5.2vw, 23px);
  line-height: 1.4;
  text-align: center;
  font-weight: 900;
  transform: rotate(-1.5deg);
}

.result-hero-card .result-visual {
  min-height: clamp(160px, 24svh, 230px);
  margin: 0 -10px;
  background: transparent;
}

.result-hero-card .result-visual img {
  width: min(88%, 290px);
  max-height: clamp(156px, 23svh, 224px);
}

.result-share-btn {
  gap: 10px;
  margin-top: 4px;
}

.result-share-btn svg {
  flex-shrink: 0;
}

.result-summary-card,
.trend-card,
.result-detail-card,
.follow-card {
  border: 2px solid rgba(32, 33, 36, .78);
  border-radius: 14px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 3px 3px 0 rgba(32, 33, 36, .9);
}

.result-summary-card {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.section-kicker {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 14px;
  font-weight: 950;
}

.result-summary-card h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.result-summary-card p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 800;
}

.result-summary-card img {
  width: 104px;
  height: 104px;
  object-fit: contain;
}

.trend-card,
.result-detail-card,
.follow-card {
  padding: 18px 16px;
}

.taped-title {
  display: inline-block;
  margin: 0 0 14px;
  padding: 8px 14px;
  background: #fff4df;
  box-shadow: 0 3px 8px rgba(32, 33, 36, .12);
  font-size: 24px;
  line-height: 1.1;
  transform: rotate(-1deg);
}

.trend-list {
  display: grid;
  gap: 12px;
}

.trend-row {
  display: grid;
  grid-template-columns: 72px 76px 1fr 76px 36px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  font-size: 14px;
}

.trend-row strong {
  font-size: 16px;
  line-height: 1.2;
}

.trend-end {
  color: var(--muted);
  font-weight: 800;
}

.trend-end.right {
  color: var(--ink);
}

.trend-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 26px;
  overflow: hidden;
  border: 2px solid rgba(32, 33, 36, .55);
  border-radius: 999px;
  background: var(--white);
}

.trend-scale span {
  border-right: 1px solid rgba(32, 33, 36, .28);
}

.trend-scale span:last-child {
  border-right: 0;
}

.trend-scale .active {
  position: relative;
}

.trend-scale .active::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #f1b300;
  transform: translate(-50%, -50%);
}

.trend-row b {
  color: var(--green);
  font-size: 18px;
}

.result-detail-card h3,
.follow-card h3 {
  margin-top: 0;
}

.result-detail-card > p {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 760;
}

.reason-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.reason-tags span {
  border: 1px solid rgba(32, 33, 36, .35);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, .82);
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.result-advice-list {
  display: grid;
  gap: 10px;
}

.advice-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(32, 33, 36, .28);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, .88);
}

.advice-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f1b300;
  color: var(--white);
  font-size: 24px;
  font-weight: 1000;
}

.advice-item.weakness .advice-icon { background: #f47a19; }
.advice-item.next .advice-icon { background: #68a846; }

.advice-item h4 {
  margin: 0 0 4px;
  font-size: 19px;
}

.advice-item p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.48;
  font-weight: 760;
}

.follow-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,244,223,.82)),
    #fff8e8;
}

.follow-card h3 {
  margin-bottom: 8px;
  font-size: 29px;
  line-height: 1.15;
}

.follow-card p {
  margin: 0 0 14px;
  color: var(--ink);
  line-height: 1.55;
  font-weight: 760;
}

.result-bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-bottom: 8px;
}

.result-bottom-actions .ghost-btn {
  background: var(--white);
}

.atlas-card.hidden-type {
  background:
    linear-gradient(135deg, rgba(47,111,99,.09), rgba(243,199,66,.12)),
    var(--white);
}

.atlas-meta em {
  display: inline-block;
  margin-top: 5px;
  color: var(--green);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

@media (max-width: 390px) {
  .result-title-line {
    gap: 8px;
  }

  .result-title-sep {
    display: none;
  }

  .result-title-line h2 {
    flex-basis: 100%;
  }

  .trend-row {
    grid-template-columns: 64px 62px 1fr 62px 34px;
    gap: 6px;
    font-size: 12px;
  }

  .trend-row strong {
    font-size: 14px;
  }
}

@keyframes title-pop {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

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

@keyframes character-pop {
  from { opacity: 0; transform: translateY(20px) scale(.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

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