:root {
  --paper: #f3ebdf;
  --paper-deep: #e8ddce;
  --cream: #fbf7f0;
  --ink: #3d2419;
  --ink-soft: #6c5549;
  --brown: #6e3825;
  --coffee: #25150f;
  --orange: #d96032;
  --yellow: #e9b949;
  --sage: #899276;
  --line: rgba(61, 36, 25, 0.18);
  --shadow: 0 24px 80px rgba(61, 36, 25, 0.14);
  --radius: 28px;
}

/* CBTI identity-card sharing */
.share-card-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.share-card-modal[hidden] {
  display: none !important;
}

.share-card-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(33, 17, 8, 0.78);
  backdrop-filter: blur(9px);
  cursor: default;
}

.share-card-dialog {
  position: relative;
  width: min(900px, 96vw);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(116, 70, 35, 0.58);
  border-radius: 24px;
  background:
    linear-gradient(rgba(255, 249, 235, 0.97), rgba(240, 217, 178, 0.98)),
    #f5e3c5;
  box-shadow: 0 30px 90px rgba(19, 8, 2, 0.48);
  color: #3d210f;
}

.share-card-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(87, 48, 22, 0.32);
  border-radius: 50%;
  background: rgba(255, 250, 238, 0.84);
  color: #4b2813;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.share-card-header {
  padding: 2px 48px 15px 2px;
}

.share-card-header p {
  margin: 0 0 4px;
  color: #a26635;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.share-card-header h2 {
  margin: 0;
  color: #3c210f;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(25px, 4vw, 36px);
  line-height: 1.15;
}

.share-card-header span {
  display: inline-block;
  margin-top: 5px;
  color: #80502d;
  font-weight: 700;
}

.share-card-preview-wrap {
  overflow: hidden;
  border: 1px solid rgba(89, 50, 24, 0.38);
  border-radius: 15px;
  background: #c69668;
  box-shadow: 0 14px 35px rgba(69, 36, 17, 0.2);
}

.share-card-preview-wrap img {
  display: block;
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  background: #c69668;
}

.share-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.share-card-actions button {
  min-height: 54px;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.share-card-actions button span {
  margin-right: 7px;
  font-size: 20px;
}

.share-card-save {
  border: 1px solid #744323;
  background: #fff5df;
  color: #5a3018;
}

.share-card-share {
  border: 1px solid #4b2813;
  background: linear-gradient(135deg, #6d3d1f, #3e210f);
  color: #fff8e9;
  box-shadow: 0 10px 24px rgba(72, 36, 16, 0.24);
}

.share-card-wechat {
  display: block;
  margin: 14px auto 0;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: #7b4c2b;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.share-card-guide {
  margin-top: 10px;
  padding: 13px 15px;
  border: 1px dashed rgba(108, 64, 34, 0.5);
  border-radius: 12px;
  background: rgba(255, 249, 235, 0.72);
}

.share-card-guide[hidden] {
  display: none !important;
}

.share-card-guide strong {
  display: block;
  margin-bottom: 4px;
}

.share-card-guide p,
.share-card-note {
  margin: 0;
  color: #745039;
  font-size: 13px;
  line-height: 1.65;
}

.share-card-note {
  margin-top: 11px;
  text-align: center;
}

@media (max-width: 640px) {
  .share-card-modal {
    align-items: end;
    padding: 0;
  }

  .share-card-dialog {
    width: 100%;
    max-height: 94vh;
    padding: 17px 14px calc(17px + env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .share-card-header {
    padding-bottom: 12px;
  }

  .share-card-preview-wrap img {
    max-height: 52vh;
  }

  .share-card-actions {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .share-card-actions button {
    min-height: 50px;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(217, 96, 50, 0.48);
  outline-offset: 4px;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.topbar {
  position: relative;
  z-index: 30;
  height: 88px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 235, 223, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.brand strong {
  display: block;
  font-size: 19px;
  letter-spacing: 0.18em;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.brand-bean,
.mini-bean {
  position: relative;
  width: 28px;
  height: 36px;
  display: inline-block;
  border-radius: 52% 48% 48% 52% / 58% 56% 44% 42%;
  background: var(--brown);
  transform: rotate(14deg);
}

.brand-bean::after,
.mini-bean::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 3px;
  width: 2px;
  height: 29px;
  border-radius: 50%;
  background: var(--paper);
  transform: rotate(10deg);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.top-note {
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.text-button {
  padding: 9px 0 7px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.screen {
  display: none;
  min-height: calc(100vh - 88px);
}

.screen.is-active {
  display: block;
  animation: screen-in 0.5s ease both;
}

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

.hero {
  min-height: 710px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 70px;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 60px;
}

.eyebrow,
.kicker {
  margin: 0 0 18px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--ink);
  font-size: 18px;
}

.hero h1 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(64px, 7vw, 104px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero-lead {
  max-width: 500px;
  margin: 28px 0 34px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions,
.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--cream);
  background: var(--ink);
  box-shadow: 0 12px 28px rgba(61, 36, 25, 0.18);
}

.button-primary:hover {
  background: var(--brown);
  box-shadow: 0 16px 32px rgba(61, 36, 25, 0.24);
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.4);
}

.hero-meta {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 19px;
  color: var(--ink-soft);
  font-size: 11px;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-meta i {
  color: var(--orange);
  font-style: normal;
  font-weight: 800;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
}

.bean-poster {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 49% 51% 48% 52% / 45% 46% 54% 55%;
  border: 1px solid rgba(61, 36, 25, 0.16);
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
  background: var(--cream);
}

.bean-poster img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.04);
}

.visual-orbit {
  position: absolute;
  border: 1px solid rgba(61, 36, 25, 0.2);
  border-radius: 50%;
}

.orbit-one {
  width: 90%;
  aspect-ratio: 1.2;
  transform: rotate(12deg);
}

.orbit-two {
  width: 75%;
  aspect-ratio: 1;
  transform: rotate(-16deg);
}

.floating-tag {
  position: absolute;
  z-index: 3;
  width: 118px;
  height: 118px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  text-align: center;
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: 0.1em;
  box-shadow: 0 12px 35px rgba(61, 36, 25, 0.12);
}

.floating-tag strong {
  font-size: 17px;
}

.tag-top {
  top: 22px;
  right: 8px;
  color: var(--cream);
  background: var(--orange);
  transform: rotate(8deg);
}

.tag-bottom {
  bottom: 4px;
  left: 22px;
  background: var(--yellow);
  transform: rotate(-12deg);
}

.tag-bottom strong {
  font-family: "Noto Serif SC", serif;
  font-size: 34px;
  line-height: 0.9;
}

.marquee {
  overflow: hidden;
  padding: 15px 0 17px;
  color: var(--cream);
  background: var(--ink);
  white-space: nowrap;
}

.marquee div {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 24px;
  animation: marquee 28s linear infinite;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.marquee b {
  color: var(--yellow);
}

@keyframes marquee {
  from { transform: translateX(2%); }
  to { transform: translateX(-50%); }
}

.beans-section {
  padding-top: 130px;
  padding-bottom: 130px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 55px;
}

.section-heading h2,
.philosophy h2,
.result-story h2,
.profile-section h2,
.closing-cta h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.section-heading > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
}

.bean-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.bean-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.25s ease;
}

.bean-card:hover {
  background: rgba(255, 255, 255, 0.46);
}

.bean-card::after {
  content: "↗";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0;
  transform: translateY(5px);
  transition: 0.2s ease;
}

.bean-card:hover::after {
  opacity: 1;
  transform: none;
}

.bean-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  mix-blend-mode: multiply;
  transition: transform 0.35s ease;
}

.bean-card:hover img {
  transform: scale(1.025);
}

.bean-card-info {
  padding: 0 22px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.bean-card-info strong {
  font-family: "Noto Serif SC", serif;
  font-size: 20px;
}

.bean-card-info span {
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.bean-card-info small {
  max-width: 100px;
  color: var(--ink-soft);
  text-align: right;
  line-height: 1.4;
}

.philosophy {
  padding: 110px 70px;
  border-radius: var(--radius);
  color: var(--cream);
  background: var(--coffee);
}

.philosophy .kicker {
  color: var(--yellow);
}

.formation-flow {
  margin-top: 75px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.formation-flow > div {
  min-width: 0;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.formation-flow span,
.formation-flow strong,
.formation-flow small {
  display: block;
}

.formation-flow span {
  margin-bottom: 25px;
  color: var(--yellow);
  font-size: 11px;
}

.formation-flow strong {
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
}

.formation-flow small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.58);
}

.formation-flow i {
  color: rgba(255, 255, 255, 0.4);
  font-style: normal;
}

.closing-cta {
  margin-top: 120px;
  padding: 100px 0;
  text-align: center;
  color: var(--cream);
  background: var(--orange);
}

.closing-cta p {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.closing-cta h2 {
  margin: 18px auto 34px;
  font-size: clamp(38px, 5vw, 60px);
}

.button-light {
  color: var(--ink);
  border-color: var(--cream);
  background: var(--cream);
}

.footer {
  min-height: 80px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.1em;
}

/* Quiz */
.quiz-screen {
  background: var(--coffee);
}

.quiz-screen.is-active {
  display: block;
}

.quiz-layout {
  width: min(920px, calc(100% - 48px));
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 0;
  padding-top: 40px;
  padding-bottom: 40px;
}

.quiz-side {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 34px 30px;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 78% 36%, rgba(233, 185, 73, 0.28), transparent 22%),
    linear-gradient(125deg, #2a1710 0%, #44261b 56%, #713923 100%);
  isolation: isolate;
}

.quiz-side::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}

.stage-topline {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-topline > span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.back-home {
  width: fit-content;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
  font-size: 13px;
}

.stage-copy {
  position: relative;
  z-index: 4;
  width: 52%;
  margin-top: 52px;
}

.stage-copy .kicker {
  margin-bottom: 8px;
  color: var(--yellow);
  font-size: 10px;
}

.quiz-side h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.stage-copy > p:last-child {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.6;
}

.stage-caption {
  position: absolute;
  z-index: 4;
  left: 34px;
  bottom: 24px;
  display: none;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.stage-caption i {
  width: 25px;
  height: 1px;
  background: var(--yellow);
}

.stage-animation {
  position: absolute;
  z-index: 2;
  top: 45px;
  right: 30px;
  width: 320px;
  height: 230px;
}

.stage-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-a {
  width: 250px;
  height: 150px;
  animation: stage-orbit-a 7s linear infinite;
}

.orbit-b {
  width: 190px;
  height: 210px;
  animation: stage-orbit-b 9s linear infinite reverse;
}

.stage-prop {
  position: absolute;
  width: 42px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(5px);
}

.prop-a {
  left: 27px;
  top: 50px;
  transform: rotate(-12deg);
  animation: prop-float-a 3.4s ease-in-out infinite;
}

.prop-b {
  right: 24px;
  top: 35px;
  transform: rotate(11deg);
  animation: prop-float-b 4s ease-in-out infinite;
}

.prop-c {
  right: 44px;
  bottom: 14px;
  width: 58px;
  height: 36px;
  transform: rotate(-7deg);
  animation: prop-float-a 3.7s ease-in-out infinite reverse;
}

.quiz-bean {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 48%;
  width: 94px;
  height: 126px;
  border-radius: 51% 49% 46% 54% / 58% 57% 43% 42%;
  background: linear-gradient(125deg, #a9663e 0%, #6f351f 54%, #4f2518 100%);
  box-shadow: inset -13px -9px 24px rgba(35, 17, 11, 0.28), 0 22px 32px rgba(18, 9, 6, 0.3);
  transform: translate(-50%, -50%) rotate(4deg);
  animation: bean-bob 2.8s ease-in-out infinite;
}

.quiz-bean::before,
.quiz-bean::after {
  content: "";
  position: absolute;
  top: 41px;
  width: 28px;
  height: 33px;
  border-radius: 50%;
  background: #f8efe0;
  box-shadow: inset 0 -2px 0 rgba(61, 36, 25, 0.12);
}

.quiz-bean::before { left: 17px; }
.quiz-bean::after { right: 16px; }

.bean-eye {
  position: absolute;
  z-index: 2;
  top: 52px;
  width: 7px;
  height: 10px;
  border-radius: 50%;
  background: var(--coffee);
  animation: eye-look 4s steps(1, end) infinite;
}

.eye-left { left: 29px; }
.eye-right { right: 28px; }

.quiz-bean > i {
  position: absolute;
  z-index: 3;
  left: 47px;
  top: 8px;
  width: 3px;
  height: 108px;
  border-radius: 50%;
  background: rgba(246, 220, 190, 0.62);
  transform: rotate(7deg);
}

.bean-shadow {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 22px;
  width: 110px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 7, 4, 0.36);
  filter: blur(5px);
  transform: translateX(-50%);
  animation: shadow-breathe 2.8s ease-in-out infinite;
}

.motion-1 .quiz-bean { animation-name: bean-sway; }
.motion-2 .stage-animation { transform: rotate(-3deg); }
.motion-2 .prop-a, .motion-2 .prop-b { border-radius: 50%; }
.motion-3 .quiz-bean { animation-duration: 1.9s; }
.motion-3 .stage-orbit { border-style: dashed; }
.motion-4 .stage-animation { transform: scale(0.94); }
.motion-4 .prop-c { width: 36px; height: 58px; }

.quiz-side.is-preference {
  background:
    radial-gradient(circle at 78% 45%, rgba(233, 185, 73, 0.38), transparent 28%),
    linear-gradient(125deg, #25150f 0%, #5e321f 54%, #9f4f2d 100%);
}

.quiz-side.is-preference .stage-prop {
  border-radius: 50%;
  animation-duration: 5s;
}

@keyframes bean-bob {
  0%, 100% { transform: translate(-50%, -50%) rotate(4deg); }
  50% { transform: translate(-50%, calc(-50% - 10px)) rotate(-3deg); }
}

@keyframes bean-sway {
  0%, 100% { transform: translate(-50%, -50%) rotate(-8deg); }
  50% { transform: translate(-50%, calc(-50% - 6px)) rotate(9deg); }
}

@keyframes eye-look {
  0%, 45%, 100% { transform: translateX(0); }
  50%, 70% { transform: translateX(4px); }
  75%, 95% { transform: translateX(-3px); }
}

@keyframes shadow-breathe {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.75; }
  50% { transform: translateX(-50%) scaleX(0.78); opacity: 0.46; }
}

@keyframes prop-float-a {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@keyframes prop-float-b {
  0%, 100% { translate: 0 0; }
  50% { translate: 8px 10px; }
}

@keyframes stage-orbit-a {
  from { transform: translate(-50%, -50%) rotate(0); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes stage-orbit-b {
  from { transform: translate(-50%, -50%) rotate(15deg); }
  to { transform: translate(-50%, -50%) rotate(375deg); }
}

.quiz-card {
  min-height: 660px;
  padding: 34px 46px 28px;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.progress-track {
  position: relative;
  height: 14px;
  margin: 28px 34px 0;
  overflow: visible;
  background: var(--paper-deep);
  border: 1px solid rgba(22, 48, 25, 0.12);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(22, 48, 25, 0.1);
}

.progress-track div {
  position: relative;
  width: 0;
  height: 100%;
  background: var(--orange);
  transition: width 0.35s ease;
  border-radius: inherit;
  box-shadow: 0 2px 8px rgba(230, 108, 46, 0.24);
}

.progress-runner {
  position: absolute;
  z-index: 2;
  right: -20px;
  top: 50%;
  width: 42px;
  height: 63px;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-52%);
  filter: drop-shadow(0 7px 7px rgba(22, 48, 25, 0.26));
}

.progress-runner-source {
  position: fixed;
  width: 1px;
  height: 1px;
  left: -10px;
  top: -10px;
  opacity: 0;
  pointer-events: none;
}

.progress-runner canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.question-wrap {
  flex: 1;
  padding: 48px 0 28px;
  animation: question-in 0.35s ease;
}

.question-wrap.is-changing {
  animation: question-in 0.35s ease;
}

@keyframes question-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: none; }
}

.question-scene {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.question-wrap h1 {
  max-width: 680px;
  margin: 0 0 32px;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.35;
  letter-spacing: -0.03em;
}

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

.options.is-locked {
  pointer-events: none;
}

.options.is-locked .option:not(.is-selected) {
  opacity: 0.58;
}

.options.is-locked .option.is-selected {
  transform: translateX(4px);
  box-shadow: 0 9px 24px rgba(19, 55, 31, 0.16);
}

.option {
  width: 100%;
  min-height: 68px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 34px 1fr 24px;
  gap: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.option:hover {
  border-color: rgba(61, 36, 25, 0.55);
  background: var(--paper);
  transform: translateX(3px);
}

.option.is-selected {
  color: var(--cream);
  border-color: var(--ink);
  background: var(--ink);
}

.option-letter {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.option-text {
  line-height: 1.55;
}

.option-check {
  opacity: 0;
  font-weight: 800;
}

.option.is-selected .option-check {
  opacity: 1;
}

.quiz-nav {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.nav-button {
  padding: 8px 0;
  border: 0;
  background: none;
  font-weight: 700;
  cursor: pointer;
}

.nav-button:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.nav-next {
  color: var(--orange);
}

/* Result */
.result-screen {
  padding: 36px 0 100px;
  background: var(--paper);
}

.result-back {
  margin-bottom: 36px;
}

.result-hero {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  align-items: center;
}

.result-art-wrap {
  position: relative;
  max-width: 500px;
  padding: 28px;
}

.result-art-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-radius: 47% 53% 52% 48% / 46% 48% 52% 54%;
  background: var(--cream);
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}

.result-art-card img {
  width: 100%;
  display: block;
  mix-blend-mode: multiply;
}

.result-index {
  position: absolute;
  top: -8px;
  left: 2px;
  color: var(--orange);
  font-family: "Noto Serif SC", serif;
  font-size: 70px;
  font-weight: 900;
  line-height: 1;
}

.result-stamp {
  position: absolute;
  z-index: 2;
  right: -5px;
  bottom: 8px;
  width: 100px;
  height: 100px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  color: var(--cream);
  background: var(--orange);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  transform: rotate(11deg);
}

.result-intro h1 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(65px, 8vw, 108px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.result-intro h1 small {
  display: block;
  margin-top: 14px;
  color: var(--orange);
  font-family: "DM Sans", sans-serif;
  font-size: 17px;
  letter-spacing: 0.32em;
}

.result-line {
  max-width: 600px;
  margin: 28px 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.85;
}

.cup-match {
  margin-bottom: 28px;
  padding: 19px 0;
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cup-match span,
.cup-match small {
  color: var(--ink-soft);
  font-size: 11px;
}

.cup-match strong {
  font-size: 22px;
}

.result-content {
  margin-top: 110px;
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 28px;
}

.result-story,
.flavor-card {
  border-radius: var(--radius);
}

.result-story {
  padding: 55px 60px;
  color: var(--cream);
  background: var(--coffee);
}

.result-story .kicker {
  color: var(--yellow);
}

.result-story h2 {
  font-size: clamp(38px, 4vw, 55px);
}

.result-story > p:not(.kicker) {
  margin: 30px 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.9;
}

.result-story blockquote {
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.7;
}

.flavor-card {
  padding: 42px 38px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.25);
}

.flavor-card h3 {
  margin: 0 0 27px;
  font-family: "Noto Serif SC", serif;
  font-size: 30px;
}

.flavor-card > p:last-child {
  margin: 28px 0 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.flavor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.flavor-tags span {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  font-size: 12px;
}

.profile-section {
  padding: 120px 0 75px;
}

.section-heading.compact {
  grid-template-columns: 1fr 0.55fr;
  margin-bottom: 45px;
}

.profile-section h2 {
  font-size: 50px;
}

.dimension-list {
  display: grid;
  gap: 25px;
}

.dimension-row {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  gap: 22px;
  align-items: center;
}

.dimension-row > span:first-child {
  text-align: right;
}

.dimension-row > span {
  font-size: 12px;
  font-weight: 700;
}

.dimension-track {
  position: relative;
  height: 9px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--sage), var(--paper-deep) 50%, var(--orange));
}

.dimension-track::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 1px;
  height: 17px;
  background: var(--ink-soft);
}

.dimension-dot {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 4px solid var(--cream);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 3px 8px rgba(61, 36, 25, 0.22);
  transform: translate(-50%, -50%);
}

.preference-note {
  padding: 25px 28px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--cream);
}

.note-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--cream);
  background: var(--orange);
  font-family: serif;
  font-weight: 800;
}

.preference-note strong {
  display: block;
  margin-bottom: 4px;
}

.preference-note p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.result-footer-card {
  margin-top: 80px;
  padding: 80px 50px;
  border-radius: var(--radius);
  color: var(--cream);
  background: var(--orange);
  text-align: center;
}

.result-footer-card p {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.result-footer-card h2 {
  max-width: 780px;
  margin: auto;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(36px, 5vw, 57px);
  line-height: 1.3;
}

.result-footer-card small {
  display: block;
  max-width: 720px;
  margin: 28px auto 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(30, 16, 11, 0.7);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 52px;
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}

.modal-card h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 45px;
  line-height: 1.25;
}

.modal-card > p:not(.kicker) {
  color: var(--ink-soft);
  line-height: 1.85;
}

.method-dimensions {
  margin: 32px 0;
  border-top: 1px solid var(--line);
}

.method-dimensions div {
  padding: 16px 0;
  display: grid;
  grid-template-columns: 36px 1fr 25px 1fr;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.method-dimensions span {
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
}

.method-dimensions i {
  color: var(--ink-soft);
  font-style: normal;
  text-align: center;
}

.modal-footnote {
  margin-bottom: 0;
  padding: 20px;
  border-radius: 14px;
  background: var(--paper);
  font-size: 13px;
}

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 30px;
  padding: 12px 20px;
  border-radius: 999px;
  color: var(--cream);
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 0.25s ease;
  font-size: 13px;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Enchanted forest visual system */
:root {
  --paper: #eef1dd;
  --paper-deep: #d9dec4;
  --cream: #faf8e9;
  --ink: #21351f;
  --ink-soft: #53664c;
  --brown: #5d3b25;
  --coffee: #10271a;
  --orange: #b98228;
  --yellow: #e4c562;
  --sage: #7e9671;
  --line: rgba(29, 60, 36, 0.2);
  --shadow: 0 24px 80px rgba(8, 34, 20, 0.22);
}

body {
  background-color: #0d2718;
  background-image:
    linear-gradient(180deg, rgba(5, 23, 14, 0.42), rgba(6, 28, 17, 0.63)),
    url("assets/enchanted-forest-bg.png");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

.topbar {
  color: var(--cream);
  border-bottom-color: rgba(255, 255, 255, 0.17);
  background: rgba(8, 34, 20, 0.78);
  box-shadow: 0 10px 35px rgba(2, 17, 9, 0.15);
}

.topbar .brand small,
.topbar .top-note {
  color: rgba(255, 255, 255, 0.63);
}

.topbar .brand-bean {
  background: var(--yellow);
}

.topbar .brand-bean::after {
  background: #183522;
}

#home-screen {
  color: var(--cream);
  background: transparent;
}

#home-screen .hero-lead,
#home-screen .hero-meta {
  color: rgba(255, 255, 255, 0.74);
  text-shadow: 0 2px 18px rgba(3, 24, 12, 0.45);
}

#home-screen .hero h1 {
  text-shadow: 0 5px 34px rgba(2, 20, 10, 0.4);
}

#home-screen .eyebrow,
#home-screen .eyebrow span {
  color: var(--yellow);
}

#home-screen .button-primary {
  color: #17311f;
  border-color: var(--cream);
  background: var(--cream);
}

#home-screen .button-primary:hover {
  background: var(--yellow);
}

#home-screen .button-ghost {
  color: var(--cream);
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(9, 45, 27, 0.24);
  backdrop-filter: blur(10px);
}

#home-screen .button-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.bean-poster {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 26px 90px rgba(2, 24, 12, 0.43);
}

.visual-orbit {
  border-color: rgba(255, 255, 255, 0.27);
}

.marquee {
  background: rgba(7, 38, 23, 0.94);
}

.beans-section {
  margin-top: 95px;
  padding: 90px 70px;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: var(--radius);
  background: rgba(244, 247, 226, 0.9);
  box-shadow: 0 35px 100px rgba(3, 27, 14, 0.3);
  backdrop-filter: blur(20px);
}

.bean-card {
  background: rgba(255, 255, 255, 0.2);
}

.bean-card:hover {
  background: rgba(255, 255, 255, 0.56);
}

.philosophy {
  margin-top: 80px;
  color: var(--cream);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 43, 25, 0.91);
  box-shadow: 0 30px 100px rgba(2, 22, 11, 0.34);
  backdrop-filter: blur(16px);
}

.closing-cta {
  color: var(--cream);
  background: rgba(42, 91, 50, 0.94);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16);
}

.footer {
  color: rgba(255, 255, 255, 0.64);
  border-top-color: rgba(255, 255, 255, 0.14);
  background: rgba(6, 31, 18, 0.88);
  backdrop-filter: blur(14px);
}

.quiz-screen {
  background: rgba(4, 25, 14, 0.55);
  backdrop-filter: blur(2px);
}

.quiz-side {
  background:
    radial-gradient(circle at 78% 36%, rgba(229, 197, 98, 0.28), transparent 23%),
    linear-gradient(125deg, rgba(7, 39, 22, 0.98) 0%, rgba(24, 76, 43, 0.97) 57%, rgba(69, 111, 50, 0.94) 100%);
}

.quiz-side.is-preference {
  background:
    radial-gradient(circle at 78% 45%, rgba(229, 197, 98, 0.38), transparent 28%),
    linear-gradient(125deg, rgba(8, 37, 22, 0.98) 0%, rgba(39, 88, 47, 0.97) 54%, rgba(119, 128, 56, 0.93) 100%);
}

.quiz-card {
  background: rgba(250, 248, 233, 0.96);
  backdrop-filter: blur(22px);
}

.result-screen {
  background: rgba(238, 242, 220, 0.975);
  backdrop-filter: blur(6px);
}

.result-story {
  background: rgba(7, 43, 25, 0.94);
}

.flavor-card,
.preference-note {
  background: rgba(250, 248, 233, 0.76);
  backdrop-filter: blur(15px);
}

.result-footer-card {
  background: linear-gradient(135deg, rgba(34, 89, 48, 0.95), rgba(94, 118, 53, 0.94));
}

.modal-card {
  background: rgba(250, 248, 233, 0.96);
  backdrop-filter: blur(24px);
}

@media (max-width: 960px) {
  .hero,
  .result-hero,
  .result-content,
  .quiz-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 10px;
    padding-top: 80px;
  }

  .hero-copy {
    position: relative;
    z-index: 4;
  }

  .hero-visual {
    min-height: 520px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 25px;
  }

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

  .formation-flow {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .formation-flow i {
    display: none;
  }

  .quiz-side {
    min-height: 280px;
  }

  .result-art-wrap {
    margin-inline: auto;
  }

  .result-content {
    gap: 20px;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .topbar {
    height: 72px;
    padding-inline: 16px;
  }

  .top-note {
    display: none;
  }

  .brand small {
    display: none;
  }

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

  .hero {
    min-height: auto;
    padding-top: 54px;
    padding-bottom: 40px;
  }

  .hero h1 {
    font-size: 57px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-actions .button {
    width: 100%;
  }

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

  .hero-visual {
    min-height: 340px;
  }

  .floating-tag {
    width: 80px;
    height: 80px;
  }

  .tag-top {
    top: 8px;
  }

  .tag-bottom {
    left: 4px;
    bottom: 0;
  }

  .floating-tag strong {
    font-size: 12px;
  }

  .tag-bottom strong {
    font-size: 24px;
  }

  .beans-section {
    margin-top: 50px;
    padding-right: 18px;
    padding-left: 18px;
    padding-top: 85px;
    padding-bottom: 85px;
  }

  .section-heading h2,
  .philosophy h2 {
    font-size: 40px;
  }

  .bean-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bean-card-info {
    padding: 0 12px 15px;
    align-items: flex-start;
    flex-direction: column;
  }

  .bean-card-info small {
    max-width: none;
    text-align: left;
  }

  .philosophy {
    width: 100%;
    padding: 75px 28px;
    border-radius: 0;
  }

  .formation-flow {
    margin-top: 45px;
  }

  .closing-cta {
    margin-top: 0;
    padding: 80px 0;
  }

  .footer {
    padding: 24px 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .quiz-layout {
    width: 100%;
    min-height: calc(100vh - 72px);
    gap: 0;
    padding: 14px 0 0;
  }

  .quiz-side {
    min-height: 226px;
    padding: 18px 18px 20px;
    border-radius: 22px 22px 0 0;
  }

  .stage-topline > span {
    font-size: 8px;
  }

  .stage-copy {
    width: 58%;
    margin-top: 38px;
  }

  .quiz-side h2 {
    font-size: 23px;
    line-height: 1.18;
  }

  .stage-copy .kicker {
    margin-bottom: 7px;
    font-size: 8px;
  }

  .stage-copy > p:last-child {
    max-width: 170px;
    margin-top: 8px;
    font-size: 10px;
  }

  .stage-caption {
    display: none;
  }

  .stage-animation {
    top: 40px;
    right: -25px;
    width: 190px;
    height: 170px;
    transform: scale(0.82);
    transform-origin: center;
  }

  .motion-2 .stage-animation,
  .motion-4 .stage-animation {
    transform: scale(0.78) rotate(-3deg);
  }

  .quiz-bean {
    width: 76px;
    height: 101px;
  }

  .quiz-bean::before,
  .quiz-bean::after {
    top: 33px;
    width: 23px;
    height: 27px;
  }

  .quiz-bean::before { left: 13px; }
  .quiz-bean::after { right: 13px; }

  .bean-eye { top: 42px; }
  .eye-left { left: 23px; }
  .eye-right { right: 23px; }

  .quiz-bean > i {
    left: 38px;
    height: 87px;
  }

  .quiz-card {
    min-height: 650px;
    padding: 25px 18px 20px;
    border-radius: 0;
  }

  .question-wrap {
    padding: 34px 0 20px;
  }

  .question-wrap h1 {
    margin-bottom: 25px;
    font-size: 27px;
  }

  .option {
    min-height: 61px;
    padding: 11px 13px;
    grid-template-columns: 30px 1fr 18px;
    gap: 9px;
  }

  .option-text {
    font-size: 14px;
  }

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

  .result-hero {
    gap: 30px;
  }

  .result-art-wrap {
    padding: 20px;
  }

  .result-index {
    font-size: 52px;
  }

  .result-stamp {
    width: 76px;
    height: 76px;
    font-size: 9px;
  }

  .result-intro h1 {
    font-size: 68px;
  }

  .cup-match {
    grid-template-columns: 75px 1fr;
  }

  .cup-match small {
    grid-column: 2;
  }

  .result-actions .button {
    flex: 1;
  }

  .result-content {
    margin-top: 75px;
  }

  .result-story,
  .flavor-card {
    padding: 35px 24px;
  }

  .result-story blockquote {
    font-size: 20px;
  }

  .profile-section {
    padding-top: 85px;
  }

  .section-heading.compact {
    grid-template-columns: 1fr;
  }

  .profile-section h2 {
    font-size: 40px;
  }

  .dimension-row {
    grid-template-columns: 75px 1fr 75px;
    gap: 10px;
  }

  .dimension-row > span {
    font-size: 10px;
  }

  .result-footer-card {
    padding: 60px 22px;
  }

  .modal-card {
    padding: 44px 22px 28px;
  }

  .modal-card h2 {
    font-size: 36px;
  }

  .method-dimensions div {
    grid-template-columns: 29px 1fr 20px 1fr;
    font-size: 12px;
  }
}

/* Keep the entry and result views on one stable phone canvas when viewed on larger screens. */
@media (min-width: 431px) {
  body[data-screen="home-screen"],
  body[data-screen="result-screen"] {
    background: #102013;
  }

  body[data-screen="home-screen"] .topbar,
  body[data-screen="result-screen"] .topbar {
    width: 430px;
    max-width: 100%;
    margin-inline: auto;
  }

  body[data-screen="home-screen"] .topbar {
    top: 24px;
    left: 50%;
    right: auto;
    padding-inline: 17px;
    transform: translateX(-50%);
  }

  #home-screen,
  #result-screen {
    width: 430px;
    max-width: 100%;
    margin: 24px auto;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 24px 70px rgba(0, 0, 0, 0.38);
  }

  body[data-screen="result-screen"] .topbar {
    margin-top: 24px;
    margin-bottom: 0;
  }

  #home-screen .home-video-hero {
    height: 844px;
    min-height: 844px;
  }

  #home-screen .home-video-rule {
    left: 18px;
    right: 18px;
  }

  #result-screen .poster-result-stage,
  #result-screen .static-result-poster {
    width: 430px;
    max-width: 100%;
  }
}

/* Forest estate result layout: inspired by the illustrated CBTI reference poster. */
#result-screen {
  padding: 18px 12px 30px !important;
  background:
    linear-gradient(180deg, rgba(8, 31, 17, 0.98), rgba(23, 61, 32, 0.96) 22%, #e6c68b 22%, #f6e3bb 100%) !important;
  color: #3d2819;
}

#result-screen .poster-result-stage,
#result-screen .mobile-result-cards {
  display: none !important;
}

#result-screen .result-page {
  display: block !important;
  width: 100% !important;
  max-width: 640px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
}

#result-screen .reveal-heading {
  position: relative;
  min-height: 128px;
  margin: 0 0 14px !important;
  padding: 26px 28px 20px !important;
  display: block !important;
  overflow: hidden;
  border: 3px solid #604023;
  border-radius: 28px 28px 20px 20px;
  color: #3a2415;
  text-align: center;
  background:
    linear-gradient(105deg, rgba(255, 242, 202, 0.8), rgba(210, 162, 97, 0.52)),
    repeating-linear-gradient(0deg, rgba(87, 51, 22, 0.08) 0 2px, transparent 2px 7px),
    #e7bd78;
  box-shadow: 0 8px 0 #2c1d12, 0 17px 30px rgba(0, 0, 0, 0.28);
}

#result-screen .reveal-heading::before,
#result-screen .reveal-heading::after {
  content: "☕";
  position: absolute;
  top: 26px;
  color: #5b351a;
  font-size: 23px;
}

#result-screen .reveal-heading::before { left: 22px; }
#result-screen .reveal-heading::after { right: 22px; transform: scaleX(-1); }

#result-screen .reveal-heading .back-home,
#result-screen .reveal-heading .share-seal { display: none !important; }

#result-screen .reveal-heading h1 {
  margin: 0;
  color: #422817;
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: clamp(26px, 7vw, 38px);
  letter-spacing: 0.05em;
}

#result-screen .reveal-heading p {
  margin: 8px 0 0;
  color: #634220;
  font-weight: 800;
  letter-spacing: 0.09em;
  font-size: 12px;
}

#result-screen .bean-world {
  position: relative;
  min-height: 360px;
  margin: 0 0 18px;
  padding: 56px 14px 16px;
  overflow: hidden;
  border: 3px solid #5d3a1e;
  border-radius: 24px;
  isolation: isolate;
  background: #284b2a;
  box-shadow: 0 10px 24px rgba(44, 26, 12, 0.27);
}

#result-screen .bean-world::before {
  content: "12 种豆格 · 点选查看完整反馈";
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 30px);
  padding: 9px 17px;
  border: 1px solid rgba(255, 239, 188, 0.6);
  border-radius: 999px;
  color: #fff6d7;
  background: rgba(34, 62, 31, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  font-weight: 800;
  transform: translateX(-50%);
}

#result-screen .bean-world::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 38, 20, 0.12), rgba(12, 34, 16, 0.6)),
    url("assets/personality-map-forest.png") center 36% / cover no-repeat;
}

#result-screen .world-vignette { display: none; }

#result-screen .world-roster {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  transform: none !important;
}

#result-screen .world-bean {
  position: relative;
  min-width: 0;
  aspect-ratio: 0.78;
  padding: 2px 2px 6px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  border: 1px solid rgba(255, 235, 177, 0.64);
  border-radius: 12px;
  color: #fff8df;
  cursor: pointer;
  background: rgba(28, 54, 25, 0.54);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, background 0.18s ease;
}

#result-screen .world-bean:hover,
#result-screen .world-bean:focus-visible {
  outline: none;
  transform: translateY(-3px);
  background: rgba(63, 102, 42, 0.78);
}

#result-screen .world-bean img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
  border-radius: 10px;
  mix-blend-mode: multiply;
}

#result-screen .world-bean strong,
#result-screen .world-bean small {
  width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px #162513;
}

#result-screen .world-bean strong { font-size: 12px; line-height: 1.35; }
#result-screen .world-bean small { color: #d9ef9a; font-size: 9px; font-weight: 800; }

#result-screen .world-bean.is-current {
  border: 2px solid #e6ec8a;
  background: rgba(116, 154, 49, 0.88);
  box-shadow: 0 0 0 3px rgba(228, 237, 123, 0.3), 0 7px 16px rgba(0, 0, 0, 0.35);
}

#result-screen .world-bean span {
  position: absolute;
  top: -8px;
  left: 50%;
  padding: 3px 8px;
  border-radius: 999px;
  color: #1e3d21;
  background: #e3eb84;
  font-size: 9px;
  font-weight: 900;
  transform: translateX(-50%);
}

#result-screen .parchment-panel,
#result-screen .archive-profile,
#result-screen .archive-note,
#result-screen .archive-footer-card {
  border: 2px solid #8c5d31 !important;
  border-radius: 20px !important;
  background:
    linear-gradient(145deg, rgba(255, 250, 221, 0.98), rgba(232, 196, 132, 0.96)) !important;
  box-shadow: inset 0 0 0 5px rgba(255, 244, 204, 0.55), 0 8px 18px rgba(73, 42, 17, 0.18) !important;
}

#result-screen .result-dashboard {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px;
}

#result-screen .identity-card {
  min-height: 0 !important;
  padding: 22px 18px 18px !important;
  display: grid !important;
  grid-template-columns: 42% 1fr;
  align-items: center;
  gap: 12px;
}

#result-screen .result-index {
  z-index: 2;
  top: 12px !important;
  left: 16px !important;
  color: #a3632f !important;
  font-size: 36px !important;
}

#result-screen .identity-portrait {
  min-height: 190px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(132, 83, 39, 0.36);
  border-radius: 18px;
  background: radial-gradient(circle, #f6d49b 0%, #d69c51 100%);
}

#result-screen .identity-portrait img {
  width: 88% !important;
  height: 182px !important;
  object-fit: contain !important;
  mix-blend-mode: multiply;
}

#result-screen .portrait-heart { display: none !important; }
#result-screen .identity-copy { padding-top: 18px; }
#result-screen .panel-kicker { color: #8d5a2d !important; font-size: 10px !important; letter-spacing: 0.14em; }
#result-screen .identity-copy h2 { margin: 4px 0 9px !important; color: #3a2516 !important; font-size: 32px !important; }
#result-screen .identity-copy h2 small { display: block; margin: 3px 0 0 !important; color: #8e673d !important; font-size: 16px !important; }
#result-screen .result-line { color: #4e3420 !important; font-size: 14px !important; line-height: 1.65; }
#result-screen .result-actions { display: none !important; }
#result-screen .corner-mark { display: none !important; }

#result-screen .result-side-stack { display: contents !important; }
#result-screen .drink-card,
#result-screen .detail-card,
#result-screen .evidence-card { margin: 0 !important; padding: 20px !important; }
#result-screen .panel-title { margin: 0 0 14px !important; color: #472b19 !important; }
#result-screen .panel-title h3 { font-size: 19px !important; }
#result-screen .panel-title span { background: #bc8650 !important; }
#result-screen .drink-card-body { align-items: center !important; }
#result-screen .drink-facts strong { color: #412716 !important; font-size: 17px !important; }
#result-screen .drink-facts small { color: #80613e !important; line-height: 1.5; }
#result-screen .drink-card > p,
#result-screen .detail-card blockquote,
#result-screen .evidence-card p { color: #573b22 !important; font-size: 14px !important; line-height: 1.8 !important; }

#result-screen .evidence-card,
#result-screen .profile-section,
#result-screen .relation-grid,
#result-screen .preference-note,
#result-screen .result-footer-card { margin-top: 14px !important; }
#result-screen .profile-section { padding: 20px !important; }
#result-screen .relation-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 14px; }
#result-screen .relation-panel { padding: 20px !important; }
#result-screen .preference-note { padding: 16px 18px !important; color: #4d321b !important; }
#result-screen .result-footer-card { padding: 25px 20px !important; color: #fff5d4 !important; background: #294929 !important; border-color: #6e8d50 !important; }
#result-screen .result-footer-card h2,
#result-screen .result-footer-card p,
#result-screen .result-footer-card small { color: inherit !important; }

#result-screen .poster-controls {
  position: static !important;
  width: 100% !important;
  margin: 16px auto 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

#result-screen .poster-controls button {
  min-height: 42px;
  padding: 7px !important;
  border: 1px solid #7b502b !important;
  border-radius: 11px !important;
  color: #fff7d8 !important;
  background: #31532f !important;
  font-weight: 800;
}

#result-screen .poster-controls .is-primary { color: #274025 !important; background: #d9e77b !important; }

@media (max-width: 420px) {
  #result-screen { padding-inline: 8px !important; }
  #result-screen .identity-card { grid-template-columns: 39% 1fr; padding-inline: 13px !important; }
  #result-screen .identity-portrait { min-height: 166px; }
  #result-screen .identity-portrait img { height: 160px !important; }
  #result-screen .identity-copy h2 { font-size: 28px !important; }
  #result-screen .world-roster { gap: 7px; }
}

/* Standalone forest coffee-estate result page. Legacy result layers stay mounted only as data sinks. */
body[data-screen="result-screen"] .topbar { display: none !important; }

#result-screen {
  min-height: 100svh;
  padding: 16px 10px 28px !important;
  background:
    linear-gradient(180deg, rgba(12, 38, 20, 0.96), rgba(21, 64, 34, 0.9) 18%, rgba(240, 214, 165, 0.98) 18%, #f0d6a5 100%),
    url("assets/personality-map-forest.png") center top / cover fixed !important;
}

#result-screen > .poster-result-stage,
#result-screen > .mobile-result-cards,
#result-screen > .poster-controls,
#result-screen > .result-page {
  display: none !important;
}

#result-screen .forest-result-layout {
  display: block !important;
  width: min(100%, 640px);
  margin: 0 auto;
  color: #442b19;
}

#result-screen .forest-title-board {
  position: relative;
  margin: 0 0 16px;
  padding: 21px 48px 18px;
  overflow: hidden;
  border: 3px solid #64401f;
  border-radius: 28px 28px 23px 23px;
  text-align: center;
  background:
    linear-gradient(100deg, rgba(255, 244, 210, 0.73), rgba(192, 137, 72, 0.4)),
    repeating-linear-gradient(0deg, rgba(86, 53, 25, 0.08) 0 2px, transparent 2px 7px),
    #e5b86d;
  box-shadow: 0 8px 0 #2b1b10, 0 18px 30px rgba(0, 0, 0, 0.3);
}

#result-screen .forest-title-board::before,
#result-screen .forest-title-board::after {
  content: "●";
  position: absolute;
  top: 43%;
  color: #5a371d;
  font-size: 25px;
}

#result-screen .forest-title-board::before { left: 22px; }
#result-screen .forest-title-board::after { right: 22px; }
#result-screen .forest-title-board > span { color: #5b361b; font: 900 15px Georgia, serif; letter-spacing: 0.3em; }
#result-screen .forest-title-board h1 { margin: 4px 0 3px; color: #3e2515; font: 900 clamp(27px, 8vw, 42px) / 1.12 "Noto Serif SC", Georgia, serif; letter-spacing: 0.04em; }
#result-screen .forest-title-board p { margin: 0; color: #684521; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; }

#result-screen .forest-hero-card {
  position: relative;
  min-height: 282px;
  margin-bottom: 16px;
  padding: 17px;
  display: grid;
  grid-template-columns: minmax(152px, 41%) 1fr;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  border: 3px solid #5b3b21;
  border-radius: 23px;
  background: #365a30;
  box-shadow: 0 9px 22px rgba(45, 26, 12, 0.29);
}

#result-screen .forest-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background:
    linear-gradient(90deg, rgba(15, 41, 20, 0.12), rgba(15, 41, 20, 0.72)),
    url("assets/personality-map-forest.png") center 37% / cover no-repeat;
}

#result-screen .forest-current-bean,
#result-screen .forest-hero-copy { position: relative; z-index: 1; }

#result-screen .forest-current-bean {
  min-height: 235px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 234, 174, 0.74);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 244, 207, 0.78), rgba(172, 113, 55, 0.58));
  box-shadow: inset 0 0 0 5px rgba(94, 54, 23, 0.16);
}

#result-screen .forest-current-bean img {
  width: 92%;
  height: 220px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

#result-screen .forest-index {
  position: absolute;
  top: 8px;
  left: 10px;
  color: #965c2c;
  font: 900 30px Georgia, serif;
}

#result-screen .forest-current-badge {
  position: absolute;
  right: 8px;
  bottom: 9px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #223c21;
  background: #dce77e;
  font-size: 10px;
  font-weight: 900;
}

#result-screen .forest-hero-copy { color: #fff6d4; text-shadow: 0 2px 5px rgba(7, 23, 11, 0.8); }
#result-screen .forest-hero-copy p { margin: 0 0 8px; color: #e5ef9a; font-size: 10px; font-weight: 900; letter-spacing: 0.16em; }
#result-screen .forest-hero-copy h2 { margin: 0; color: #fff4ce; font: 900 clamp(32px, 10vw, 48px) / 1 "Noto Serif SC", Georgia, serif; }
#result-screen .forest-hero-copy strong { display: block; margin-top: 5px; color: #e8ed9a; font-size: 17px; letter-spacing: 0.14em; }
#result-screen .forest-hero-copy blockquote { margin: 15px 0 0; color: #fff5da; font-size: 14px; font-weight: 700; line-height: 1.7; }

#result-screen .forest-feedback-grid { display: grid; grid-template-columns: 1fr; gap: 13px; }
#result-screen .forest-info-card {
  position: relative;
  padding: 20px 18px;
  overflow: hidden;
  border: 2px solid #8e5d2c;
  border-radius: 19px;
  background:
    linear-gradient(135deg, rgba(255, 248, 215, 0.98), rgba(230, 188, 117, 0.95)),
    repeating-linear-gradient(0deg, rgba(89, 56, 25, 0.04) 0 2px, transparent 2px 7px);
  box-shadow: inset 0 0 0 5px rgba(255, 248, 217, 0.48), 0 7px 16px rgba(71, 40, 16, 0.17);
}

#result-screen .forest-info-card::before,
#result-screen .forest-info-card::after {
  content: "◆";
  position: absolute;
  top: 9px;
  color: rgba(108, 69, 32, 0.46);
  font-size: 11px;
}

#result-screen .forest-info-card::before { left: 10px; }
#result-screen .forest-info-card::after { right: 10px; }
#result-screen .forest-card-label { margin: 0 0 11px; color: #70441f; font-size: 11px; font-weight: 900; letter-spacing: 0.14em; text-align: center; }
#result-screen .forest-info-card > p:last-child { margin: 0; color: #533720; font-size: 14px; line-height: 1.85; }
#result-screen .forest-drink-card { text-align: center; background: linear-gradient(135deg, #fff0c8, #d7b168); }
#result-screen .forest-drink-card h3 { margin: 0; color: #3d2515; font: 900 21px / 1.35 "Noto Serif SC", Georgia, serif; }
#result-screen .forest-drink-card small { display: block; margin: 5px 0 11px; color: #76552d; font-size: 12px; }

#result-screen .forest-directory {
  position: relative;
  margin-top: 16px;
  padding: 18px 12px 14px;
  overflow: hidden;
  border: 3px solid #5a3a20;
  border-radius: 22px;
  background: rgba(31, 72, 38, 0.96);
  box-shadow: 0 9px 20px rgba(52, 28, 11, 0.27);
}

#result-screen .forest-directory::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background: url("assets/personality-map-forest.png") center 43% / cover no-repeat;
}

#result-screen .forest-directory-title,
#result-screen .forest-directory > p,
#result-screen .forest-roster { position: relative; z-index: 1; }
#result-screen .forest-directory-title { display: flex; align-items: center; justify-content: center; gap: 9px; color: #fff2c7; }
#result-screen .forest-directory-title h2 { margin: 0; font: 900 22px "Noto Serif SC", Georgia, serif; }
#result-screen .forest-directory-title span { color: #dce981; }
#result-screen .forest-directory > p { margin: 7px auto 15px; color: #e7f0bb; text-align: center; font-size: 11px; line-height: 1.5; }

#result-screen .forest-roster {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

#result-screen .forest-roster .world-bean {
  position: relative;
  min-width: 0;
  min-height: 134px;
  padding: 4px 4px 6px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  overflow: visible;
  border: 1px solid rgba(255, 239, 183, 0.62);
  border-radius: 14px;
  color: #fff6d7;
  cursor: pointer;
  background: rgba(27, 56, 30, 0.7);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#result-screen .forest-roster .world-bean img { width: 100%; height: 94px; object-fit: contain; mix-blend-mode: multiply; }
#result-screen .forest-roster .world-bean strong,
#result-screen .forest-roster .world-bean small { display: block; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px #142613; }
#result-screen .forest-roster .world-bean strong { font-size: 12px; line-height: 1.3; }
#result-screen .forest-roster .world-bean small { color: #dfee9a; font-size: 9px; font-weight: 800; }
#result-screen .forest-roster .world-bean.is-current { border: 2px solid #e6ef8a; background: rgba(110, 150, 52, 0.94); box-shadow: 0 0 0 3px rgba(225, 239, 124, 0.3), 0 5px 12px rgba(0, 0, 0, 0.34); }
#result-screen .forest-roster .world-bean span { position: absolute; top: -8px; left: 50%; padding: 3px 8px; border-radius: 999px; color: #254423; background: #e2ea83; font-size: 9px; font-weight: 900; transform: translateX(-50%); }

#result-screen .forest-result-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
#result-screen .forest-result-actions button { min-height: 42px; padding: 7px 5px; border: 1px solid #79502a; border-radius: 11px; color: #fff5d4; background: #315631; font-size: 12px; font-weight: 900; }
#result-screen .forest-result-actions button:nth-child(2) { color: #284324; background: #d8e47e; }

@media (min-width: 520px) {
  #result-screen .forest-feedback-grid { grid-template-columns: 1fr 1fr; }
  #result-screen .forest-wide-card { grid-column: 1 / -1; }
  #result-screen .forest-roster { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 360px) {
  #result-screen .forest-hero-card { grid-template-columns: 38% 1fr; padding: 12px; gap: 10px; }
  #result-screen .forest-current-bean { min-height: 200px; }
  #result-screen .forest-current-bean img { height: 186px; }
  #result-screen .forest-hero-copy h2 { font-size: 30px; }
}

/* Pixel-faithful poster mode: the supplied reference governs the complete result-page layout. */
#result-screen {
  padding: 0 !important;
  background: #0a160d !important;
}

#result-screen .forest-result-layout {
  position: relative;
  width: min(100%, 836px) !important;
  min-height: 0 !important;
  aspect-ratio: auto;
  margin: 0 auto !important;
  overflow: visible;
  background: none !important;
}

#result-screen .forest-result-layout > .forest-title-board,
#result-screen .forest-result-layout > .forest-hero-card,
#result-screen .forest-result-layout > .forest-feedback-grid,
#result-screen .forest-result-layout > .forest-directory,
#result-screen .forest-result-layout > .forest-result-actions {
  display: none !important;
}

#result-screen .forest-poster-spacer {
  display: block;
  width: 100%;
  aspect-ratio: 836 / 1881;
  background: url("assets/result-layout-reference.png") center top / 100% 100% no-repeat;
}

#result-screen .poster-hotspot-layer { position: absolute; z-index: 2; top: 0; right: 0; left: 0; aspect-ratio: 836 / 1881; }
#result-screen .poster-hotspot { position: absolute; padding: 0; border: 0; outline: 0; background: transparent; cursor: pointer; }
#result-screen .poster-hotspot:focus-visible { outline: 3px solid #ddea80; outline-offset: -3px; border-radius: 12px; }
#result-screen .poster-hotspot-result { left: 7%; top: 14.5%; width: 86%; height: 34%; }
#result-screen .poster-hotspot-method { left: 10%; top: 49%; width: 80%; height: 12%; }
#result-screen .poster-hotspot-receive { left: 10%; top: 61%; width: 80%; height: 8%; }
#result-screen .poster-hotspot-steps { left: 7%; top: 69%; width: 86%; height: 12%; }
#result-screen .poster-hotspot-share { left: 7%; top: 81%; width: 86%; height: 7%; }
#result-screen .poster-hotspot-start { left: 7%; top: 88%; width: 86%; height: 12%; }

#result-screen .forest-detail-board {
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 18px 12px 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  background:
    radial-gradient(circle at 9% 4%, rgba(76, 123, 50, 0.75), transparent 25%),
    radial-gradient(circle at 92% 90%, rgba(67, 111, 45, 0.6), transparent 28%),
    linear-gradient(135deg, #365d30, #153e23 48%, #375e32);
}

#result-screen .detail-board-card {
  position: relative;
  padding: 20px 17px;
  overflow: hidden;
  border: 3px solid #8c5c31;
  border-radius: 20px;
  color: #4a301c;
  background:
    linear-gradient(135deg, rgba(255, 248, 217, 0.98), rgba(229, 188, 120, 0.96)),
    repeating-linear-gradient(0deg, rgba(92, 56, 26, 0.07) 0 2px, transparent 2px 7px);
  box-shadow: inset 0 0 0 5px rgba(255, 247, 214, 0.58), 0 8px 15px rgba(11, 31, 16, 0.32);
}

#result-screen .detail-board-card::before,
#result-screen .detail-board-card::after {
  content: "✦";
  position: absolute;
  top: 8px;
  color: rgba(104, 66, 31, 0.42);
  font-size: 14px;
}

#result-screen .detail-board-card::before { left: 11px; }
#result-screen .detail-board-card::after { right: 11px; }
#result-screen .detail-board-card h3 { margin: 0 0 12px; color: #4a2e1b; font: 900 20px "Noto Serif SC", Georgia, serif; }
#result-screen .detail-board-card > p { margin: 0; color: #513520; font-size: 14px; line-height: 1.85; }

#result-screen .detail-board-profile { display: grid; grid-template-columns: minmax(124px, 40%) 1fr; align-items: center; gap: 12px; }
#result-screen .detail-board-profile > img { width: 100%; height: 220px; object-fit: contain; mix-blend-mode: multiply; }
#result-screen .detail-board-label { margin: 0; color: #764923; font-size: 12px; font-weight: 900; }
#result-screen .detail-board-profile h2 { margin: 4px 0; color: #3f2717; font: 900 37px / 1 "Noto Serif SC", Georgia, serif; }
#result-screen .detail-board-profile h2 small { display: inline-block; margin-left: 7px; color: #805b31; font: 900 20px Georgia, serif; }
#result-screen .detail-board-title { margin: 0; color: #6c4929; font-size: 13px; font-weight: 800; }
#result-screen .detail-board-profile blockquote { margin: 13px 0; color: #593921; font: 800 16px / 1.6 "Noto Serif SC", serif; }
#result-screen .detail-board-tags { display: flex; flex-wrap: wrap; gap: 6px; }
#result-screen .detail-board-tags span { padding: 5px 9px; border-radius: 999px; color: #55351d; background: #dbb369; font-size: 10px; font-weight: 900; }
#result-screen .detail-board-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
#result-screen .detail-board-actions button { min-height: 40px; border: 1px solid #7e522c; border-radius: 11px; color: #fff2ce; background: #5a371d; font-weight: 900; }
#result-screen .detail-board-actions button + button { color: #59371e; background: #efcf91; }

#result-screen .detail-board-drink-content { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 12px; }
#result-screen .detail-board-cup { width: 76px; height: 76px; display: grid; place-items: center; border: 2px solid #a96d3a; border-radius: 50%; color: #704020; background: #f3d9a1; font-size: 38px; box-shadow: inset 0 0 0 6px rgba(255, 245, 215, 0.7); }
#result-screen .detail-board-drink-content strong { display: block; color: #442716; font: 900 21px / 1.35 "Noto Serif SC", Georgia, serif; }
#result-screen .detail-board-drink-content small { display: block; margin-top: 4px; color: #7c542e; font-size: 11px; line-height: 1.5; }
#result-screen .detail-board-drink-content p { margin: 8px 0 0; color: #553722; font-size: 13px; line-height: 1.65; }

#result-screen .forest-feedback-sheet { position: fixed; z-index: 20; inset: 6% max(14px, calc((100vw - 620px) / 2)); }

@media (min-width: 660px) {
  #result-screen .forest-detail-board { grid-template-columns: 1fr 1.15fr; }
  #result-screen .detail-board-profile { grid-row: span 2; }
  #result-screen .detail-board-origin { grid-column: 1; }
  #result-screen .detail-board-drink { grid-column: 2; }
  #result-screen .detail-board-match { grid-column: 2; }
}

/* Reference-card fidelity: clipped parchment corners, inset frame, and blended character art. */
#result-screen .detail-board-card {
  --cut: clamp(11px, 1.8vw, 18px);
  border: 3px solid transparent;
  border-radius: 0;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  background:
    linear-gradient(135deg, rgba(255, 247, 213, 0.98), rgba(229, 187, 118, 0.98)) padding-box,
    linear-gradient(135deg, #7d4d25, #e2b96f 17%, #70421f 52%, #edc777 83%, #77471f) border-box;
  box-shadow: none;
  filter: drop-shadow(0 8px 7px rgba(71, 39, 14, 0.28));
}

#result-screen .detail-board-card::before {
  content: "";
  inset: 6px;
  z-index: 0;
  border: 1px solid rgba(123, 78, 35, 0.38);
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  background: repeating-linear-gradient(0deg, rgba(100, 61, 27, 0.035) 0 1px, transparent 1px 5px);
}

#result-screen .detail-board-card::after {
  content: "✦";
  z-index: 1;
  top: 11px;
  right: 13px;
  left: auto;
  color: rgba(117, 75, 35, 0.46);
  font-size: clamp(10px, 1.7vw, 16px);
}

#result-screen .detail-board-card > *,
#result-screen .detail-board-card > div { position: relative; z-index: 1; }

#result-screen .detail-board-card h3 {
  padding-left: 3px;
  color: #412616;
  font-weight: 900;
}

#result-screen .detail-board-card h3::first-letter { color: #70421f; }

#result-screen .detail-board-profile {
  background:
    linear-gradient(135deg, rgba(255, 246, 209, 0.99), rgba(224, 179, 105, 0.98)) padding-box,
    linear-gradient(135deg, #70421f, #efc777 24%, #78461f 67%, #e9be70) border-box;
}

#result-screen .detail-board-profile > img {
  width: 104%;
  max-width: none;
  height: clamp(165px, 31vw, 315px);
  margin: -5px -2% -12px;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: multiply;
  filter: contrast(1.18) saturate(0.76) sepia(0.16) drop-shadow(0 7px 5px rgba(65, 35, 13, 0.34));
  -webkit-mask-image: radial-gradient(ellipse 68% 70% at 50% 50%, #000 62%, rgba(0, 0, 0, 0.72) 76%, transparent 100%);
  mask-image: radial-gradient(ellipse 68% 70% at 50% 50%, #000 62%, rgba(0, 0, 0, 0.72) 76%, transparent 100%);
}

#result-screen .detail-board-profile > div:nth-child(2) {
  margin-top: -4px;
}

#result-screen .detail-board-drink-content {
  align-items: center;
}

#result-screen .detail-board-cup {
  width: clamp(58px, 13vw, 118px);
  height: clamp(58px, 13vw, 118px);
  border: 3px solid #86512a;
  border-radius: 50%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.08) sepia(0.08);
  box-shadow: 0 3px 0 rgba(255, 242, 201, 0.75), 0 7px 12px rgba(70, 38, 15, 0.3);
}

#result-screen .detail-board-actions button {
  border-radius: 0;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  box-shadow: inset 0 0 0 1px rgba(255, 239, 188, 0.28);
}

/* Final result composition: the new reference image defines the scene, with live result cards underneath. */
#result-screen {
  min-height: 0 !important;
  background: #b98248 !important;
}

#result-screen .forest-result-layout {
  width: min(100%, 941px) !important;
  background: #bd8950 !important;
}

#result-screen .forest-poster-spacer {
  aspect-ratio: 941 / 912;
  background: url("assets/result-layout-scene.png") center top / 100% auto no-repeat;
}

#result-screen .poster-hotspot-layer {
  width: 100%;
  height: auto;
  aspect-ratio: 941 / 912;
}

#result-screen .poster-hotspot-result { inset: 0; width: auto; height: auto; }
#result-screen .poster-hotspot:not(.poster-hotspot-result) { display: none; }

#result-screen .result-scene-marker {
  --scene-x: 50%;
  --scene-y: 50%;
  position: absolute;
  z-index: 3;
  left: var(--scene-x);
  top: var(--scene-y);
  width: clamp(48px, 10vw, 94px);
  aspect-ratio: 1;
  border: clamp(2px, 0.45vw, 4px) solid #e7f18d;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 241, 135, 0.24) 0 38%, rgba(222, 239, 114, 0.09) 62%, transparent 73%);
  box-shadow: 0 0 0 clamp(5px, 1.4vw, 13px) rgba(228, 241, 120, 0.22), 0 0 clamp(18px, 5vw, 46px) rgba(242, 237, 132, 0.95), inset 0 0 18px rgba(255, 255, 214, 0.8);
  animation: result-scene-glow 1.8s ease-in-out infinite;
}

#result-screen .result-scene-marker::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  padding: 5px 9px;
  border: 1px solid rgba(255, 246, 176, 0.82);
  border-radius: 999px;
  color: #1f4427;
  background: linear-gradient(135deg, #ecf18d, #b8d35c);
  box-shadow: 0 4px 12px rgba(24, 59, 32, 0.34);
  font-size: clamp(8px, 1.65vw, 13px);
  font-weight: 900;
  white-space: nowrap;
  transform: translateX(-50%);
}

@keyframes result-scene-glow {
  0%, 100% { transform: translate(-50%, -50%) scale(0.94); opacity: 0.88; }
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}
#result-screen .forest-feedback-sheet { display: none !important; }

#result-screen .forest-detail-board {
  padding: clamp(12px, 2.6vw, 26px);
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: clamp(9px, 1.7vw, 16px);
  background:
    radial-gradient(ellipse at 8% 7%, rgba(255, 225, 170, 0.5), transparent 30%),
    radial-gradient(ellipse at 90% 97%, rgba(105, 61, 25, 0.22), transparent 37%),
    repeating-linear-gradient(22deg, rgba(107, 62, 25, 0.035) 0 1px, transparent 1px 7px),
    #c89457;
}

#result-screen .detail-board-card {
  padding: clamp(11px, 2.3vw, 22px);
  border-width: clamp(2px, 0.32vw, 3px);
  border-radius: clamp(14px, 2.2vw, 22px);
  box-shadow: inset 0 0 0 clamp(3px, 0.55vw, 6px) rgba(255, 247, 214, 0.58), 0 7px 14px rgba(67, 37, 15, 0.24);
}

#result-screen .detail-board-profile { grid-column: 1; grid-row: 1 / span 2; display: grid; grid-template-columns: 1fr; gap: 4px; align-content: start; }
#result-screen .detail-board-profile > img { width: 112%; height: clamp(190px, 34vw, 350px); margin: -10px -6% -14px; object-fit: contain; }
#result-screen .detail-board-profile > div:nth-child(2) { text-align: center; }
#result-screen .detail-board-label { font-size: clamp(9px, 1.7vw, 14px); }
#result-screen .detail-board-profile h2 { margin: 3px 0; font-size: clamp(26px, 5.2vw, 49px); }
#result-screen .detail-board-profile h2 small { margin-left: clamp(3px, 0.7vw, 8px); font-size: clamp(14px, 2.4vw, 23px); }
#result-screen .detail-board-title { font-size: clamp(9px, 1.55vw, 14px); }
#result-screen .detail-board-profile blockquote { margin: clamp(7px, 1.2vw, 13px) 0; font-size: clamp(12px, 2vw, 18px); }
#result-screen .detail-board-tags { justify-content: center; gap: 4px; }
#result-screen .detail-board-tags span { padding: clamp(3px, 0.6vw, 6px) clamp(5px, 1vw, 10px); font-size: clamp(8px, 1.35vw, 11px); }
#result-screen .detail-board-actions { gap: 6px; }
#result-screen .detail-board-actions button { min-height: clamp(31px, 5.3vw, 47px); border-radius: clamp(7px, 1.2vw, 12px); font-size: clamp(9px, 1.5vw, 13px); }

#result-screen .detail-board-analysis { grid-column: 2; grid-row: 1; }
#result-screen .detail-board-drink { grid-column: 2; grid-row: 2; }
#result-screen .detail-board-origin { grid-column: 1; grid-row: 3; }
#result-screen .detail-board-match { grid-column: 2; grid-row: 3; }
#result-screen .detail-board-card h3 { margin-bottom: clamp(7px, 1.3vw, 13px); font-size: clamp(14px, 2.5vw, 24px); }
#result-screen .detail-board-card > p { font-size: clamp(10px, 1.8vw, 16px); line-height: 1.72; }
#result-screen .detail-board-drink-content { grid-template-columns: clamp(42px, 8vw, 84px) 1fr; gap: clamp(6px, 1.1vw, 12px); }
#result-screen .detail-board-cup { width: clamp(40px, 7.8vw, 78px); height: clamp(40px, 7.8vw, 78px); display: block; object-fit: cover; border: 2px solid #a96d3a; border-radius: 50%; box-shadow: inset 0 0 0 5px rgba(255, 245, 215, 0.7), 0 2px 7px rgba(70, 38, 15, 0.24); }
#result-screen .detail-board-drink-content strong { font-size: clamp(13px, 2.2vw, 22px); }
#result-screen .detail-board-drink-content small { font-size: clamp(8px, 1.4vw, 12px); }
#result-screen .detail-board-drink-content p { margin-top: clamp(4px, 0.8vw, 8px); font-size: clamp(9px, 1.55vw, 14px); line-height: 1.55; }

@media (min-width: 660px) {
  #result-screen .forest-detail-board { grid-template-columns: 1.04fr 1fr; }
  #result-screen .detail-board-profile { grid-row: 1 / span 2; }
  #result-screen .detail-board-origin { grid-column: 1; grid-row: 3; }
  #result-screen .detail-board-drink { grid-column: 2; grid-row: 2; }
  #result-screen .detail-board-match { grid-column: 2; grid-row: 3; }
}

#result-screen .forest-feedback-sheet {
  position: absolute;
  z-index: 5;
  inset: 2.5% 4%;
  padding: 24px 20px 18px;
  overflow: auto;
  border: 3px solid #68421f;
  border-radius: 24px;
  color: #482c18;
  background:
    linear-gradient(135deg, rgba(255, 249, 218, 0.98), rgba(226, 182, 110, 0.98)),
    repeating-linear-gradient(0deg, rgba(91, 57, 25, 0.06) 0 2px, transparent 2px 7px);
  box-shadow: 0 13px 35px rgba(0, 0, 0, 0.42), inset 0 0 0 6px rgba(255, 246, 208, 0.58);
}

#result-screen .forest-feedback-sheet[hidden] { display: none !important; }
#result-screen .forest-sheet-close { position: sticky; z-index: 2; top: -12px; float: right; width: 34px; height: 34px; border: 1px solid #84572c; border-radius: 50%; color: #fff6d7; background: #31552e; font-size: 23px; line-height: 1; }
#result-screen .forest-feedback-sheet > p { margin: 0 0 12px; color: #7b4b22; font-size: 11px; font-weight: 900; letter-spacing: 0.17em; }
#result-screen .forest-sheet-identity { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 13px; padding: 12px; border-radius: 17px; background: rgba(116, 74, 32, 0.12); }
#result-screen .forest-sheet-identity img { width: 96px; height: 122px; object-fit: contain; mix-blend-mode: multiply; }
#result-screen .forest-sheet-identity h2 { margin: 0; color: #3d2515; font: 900 35px / 1 "Noto Serif SC", Georgia, serif; }
#result-screen .forest-sheet-identity strong { color: #7a552d; font-size: 16px; letter-spacing: 0.13em; }
#result-screen .forest-feedback-sheet blockquote { margin: 14px 0; color: #563720; font-weight: 800; line-height: 1.75; }
#result-screen .forest-feedback-sheet article { margin-top: 12px; padding: 13px 14px; border: 1px solid rgba(124, 79, 35, 0.4); border-radius: 14px; background: rgba(255, 246, 208, 0.55); }
#result-screen .forest-feedback-sheet article small { color: #805025; font-size: 11px; font-weight: 900; letter-spacing: 0.12em; }
#result-screen .forest-feedback-sheet article h3 { margin: 6px 0; color: #422716; font: 900 18px / 1.4 "Noto Serif SC", Georgia, serif; }
#result-screen .forest-feedback-sheet article p { margin: 5px 0 0; color: #553822; font-size: 13px; line-height: 1.8; }
#result-screen .forest-sheet-share { width: 100%; margin-top: 15px; min-height: 43px; border: 1px solid #7d5229; border-radius: 12px; color: #213d22; background: #dbe67f; font-weight: 900; }

@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;
  }
}

@media print {
  .topbar,
  .footer,
  .result-back,
  .result-actions,
  .noise {
    display: none !important;
  }

  .result-screen {
    display: block !important;
    padding-top: 0;
  }

  .result-content,
  .profile-section {
    break-inside: avoid;
  }
}

/* Result archive — sandstone dossier inspired by the supplied reference */
.result-screen {
  padding: 0 0 90px;
  color: #5a351c;
  background:
    radial-gradient(circle at 18% 5%, rgba(255, 240, 207, 0.72), transparent 24%),
    radial-gradient(circle at 86% 16%, rgba(122, 74, 38, 0.14), transparent 22%),
    linear-gradient(135deg, #d6b17e, #c89761 48%, #b9824e);
  backdrop-filter: none;
}

.result-page {
  position: relative;
  width: min(1050px, calc(100% - 36px));
  padding: 36px 0 0;
}

.result-page::before {
  content: "";
  position: fixed;
  inset: 88px 0 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.42' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='.65'/%3E%3C/svg%3E");
}

.reveal-heading {
  position: relative;
  min-height: 120px;
  padding: 0 100px 22px 0;
  display: flex;
  align-items: flex-end;
  gap: 36px;
  border-bottom: 1px solid rgba(91, 52, 28, 0.35);
}

.reveal-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 420px;
  height: 9px;
  background: linear-gradient(90deg, #7b4a28 0 4px, transparent 4px 10px, #7b4a28 10px 410px, transparent 410px);
  clip-path: polygon(0 50%, 7px 0, 14px 50%, 7px 100%, 0 50%, 100% 50%);
}

.reveal-heading .result-back {
  align-self: flex-start;
  margin: 8px 0 0;
  color: #694127;
  white-space: nowrap;
}

.reveal-heading h1 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(45px, 6vw, 72px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
}

.reveal-heading p {
  margin: 12px 0 0;
  color: rgba(90, 53, 28, 0.72);
  font-size: 16px;
  letter-spacing: 0.08em;
}

.share-seal {
  position: absolute;
  right: 0;
  top: 8px;
  width: 64px;
  height: 70px;
  border: 4px double rgba(255, 239, 205, 0.78);
  border-radius: 12px;
  color: #f8ddb0;
  background: #6e4227;
  box-shadow: 0 7px 20px rgba(76, 42, 21, 0.22);
  cursor: pointer;
}

.share-seal span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f1b85e;
}

.share-seal span:nth-child(1) { left: 17px; top: 31px; }
.share-seal span:nth-child(2) { right: 15px; top: 18px; }
.share-seal span:nth-child(3) { right: 15px; bottom: 14px; }
.share-seal i {
  position: absolute;
  left: 25px;
  width: 24px;
  height: 2px;
  background: #f1b85e;
  transform-origin: left center;
}
.share-seal i:nth-of-type(1) { top: 34px; transform: rotate(-29deg); }
.share-seal i:nth-of-type(2) { top: 35px; transform: rotate(31deg); }

.bean-world {
  position: relative;
  height: 510px;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid rgba(94, 55, 30, 0.38);
  border-radius: 8px 42px 8px 42px;
  background:
    linear-gradient(145deg, transparent 0 62%, rgba(95, 57, 32, 0.12) 62% 64%, transparent 64%),
    radial-gradient(circle at 50% 20%, #f3d8ab, #d6aa72 62%, #aa7445);
  box-shadow: 0 24px 50px rgba(78, 45, 23, 0.22);
}

.bean-world::before,
.bean-world::after {
  content: "";
  position: absolute;
  z-index: 0;
  background: rgba(112, 72, 42, 0.13);
  transform: rotate(13deg);
}

.bean-world::before {
  right: -30px;
  top: 45px;
  width: 260px;
  height: 340px;
  clip-path: polygon(18% 0, 100% 12%, 78% 100%, 0 77%);
}

.bean-world::after {
  left: -40px;
  bottom: -60px;
  width: 330px;
  height: 240px;
  clip-path: polygon(0 15%, 86% 0, 100% 73%, 26% 100%);
}

.world-roster {
  position: absolute;
  z-index: 1;
  inset: 18px 26px 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 5px 8px;
}

.world-bean {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.world-bean img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: sepia(0.66) saturate(0.82) contrast(0.94);
  mix-blend-mode: multiply;
  opacity: 0.84;
}

.world-bean.is-current {
  z-index: 4;
  border: 2px solid rgba(255, 239, 196, 0.92);
  background: rgba(255, 241, 210, 0.88);
  box-shadow: 0 0 0 7px rgba(245, 180, 71, 0.17), 0 14px 32px rgba(79, 40, 17, 0.3);
  transform: scale(1.12) translateY(-5px);
  animation: roster-glow 2.6s ease-in-out infinite;
}

.world-bean.is-current img {
  opacity: 1;
  filter: sepia(0.25) saturate(0.95);
}

.world-bean > span {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: -9px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #6a3b1f;
  background: #f4d18e;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transform: translateX(-50%);
}

@keyframes roster-glow {
  0%, 100% { box-shadow: 0 0 0 6px rgba(245, 180, 71, 0.15), 0 14px 32px rgba(79, 40, 17, 0.28); }
  50% { box-shadow: 0 0 0 11px rgba(245, 180, 71, 0.23), 0 18px 38px rgba(79, 40, 17, 0.34); }
}

.world-vignette {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 56%, rgba(96, 55, 29, 0.58));
}

.world-selected {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 16px;
  width: 190px;
  height: 230px;
  display: grid;
  justify-items: center;
  color: #fff3d7;
  transform: translateX(-50%);
  filter: drop-shadow(0 12px 18px rgba(75, 38, 16, 0.35));
}

.world-selected::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 22px 10px 15px;
  border-radius: 48%;
  background: radial-gradient(circle, rgba(255, 239, 177, 0.9), rgba(240, 176, 76, 0.28) 55%, transparent 72%);
  animation: selected-glow 2.5s ease-in-out infinite;
}

.world-selected > span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #6a3b1f;
  background: #f4d18e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.world-selected img {
  width: 176px;
  margin-top: -10px;
  mix-blend-mode: multiply;
}

.world-selected strong {
  margin-top: -32px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 239, 205, 0.54);
  background: rgba(88, 49, 26, 0.82);
  font-size: 13px;
  letter-spacing: 0.08em;
}

@keyframes selected-glow {
  0%, 100% { transform: scale(0.95); opacity: 0.72; }
  50% { transform: scale(1.05); opacity: 1; }
}

.result-dashboard {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
  align-items: stretch;
}

.parchment-panel,
.archive-profile {
  position: relative;
  border: 1px solid rgba(109, 65, 34, 0.34);
  background:
    radial-gradient(circle at 10% 5%, rgba(255,255,255,0.58), transparent 34%),
    linear-gradient(145deg, rgba(255, 243, 215, 0.97), rgba(239, 211, 169, 0.97));
  box-shadow: 0 15px 30px rgba(83, 47, 24, 0.16);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

.identity-card {
  min-height: 610px;
  padding: 26px 28px 30px;
  display: grid;
  grid-template-rows: 1fr auto;
}

.identity-card .result-index {
  top: 22px;
  left: 24px;
  z-index: 4;
  color: #a6672e;
  font-size: 58px;
}

.identity-portrait {
  position: relative;
  min-height: 365px;
  display: grid;
  place-items: center;
}

.identity-portrait::before {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.7), rgba(240, 200, 139, 0.25) 66%, transparent 68%);
}

.identity-portrait img {
  position: relative;
  z-index: 2;
  width: min(390px, 95%);
  mix-blend-mode: multiply;
  filter: drop-shadow(0 16px 13px rgba(83, 47, 24, 0.18));
}

.portrait-heart {
  position: absolute;
  z-index: 3;
  color: #c94e38;
  font-size: 32px;
  text-shadow: 0 3px 0 #f7d8a7;
  animation: heart-float 2.7s ease-in-out infinite;
}

.heart-a { left: 18%; top: 35%; }
.heart-b { right: 17%; top: 22%; animation-delay: -1.2s; }

@keyframes heart-float {
  0%, 100% { transform: translateY(0) rotate(-7deg); }
  50% { transform: translateY(-10px) rotate(7deg); }
}

.identity-copy {
  position: relative;
  z-index: 3;
  padding: 10px 12px 0;
}

.panel-kicker {
  margin: 0 0 6px;
  color: #a16832;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.identity-copy h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 54px;
  line-height: 1;
}

.identity-copy h2 small {
  margin-left: 14px;
  color: #704126;
  font-family: "DM Sans", sans-serif;
  font-size: 20px;
  letter-spacing: 0.12em;
}

.identity-copy .result-line {
  margin: 18px 0 20px;
  color: #765138;
  font-size: 14px;
  line-height: 1.8;
}

.result-actions {
  gap: 9px;
}

.archive-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(95, 55, 29, 0.52);
  border-radius: 8px;
  color: #613a23;
  background: rgba(255,255,255,0.22);
  font-weight: 700;
  cursor: pointer;
}

.archive-button.is-filled {
  color: #fff1d1;
  background: #714326;
}

.corner-mark {
  position: absolute;
  width: 70px;
  height: 70px;
  border-color: #b4733e;
  opacity: 0.8;
}
.corner-one { left: 12px; top: 12px; border-left: 2px solid; border-top: 2px solid; }
.corner-two { right: 12px; bottom: 12px; border-right: 2px solid; border-bottom: 2px solid; }

.result-side-stack {
  display: grid;
  grid-template-rows: 1.15fr 0.85fr;
  gap: 22px;
}

.drink-card,
.detail-card,
.evidence-card,
.relation-panel {
  padding: 26px 28px;
}

.panel-title {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: center;
  color: #6a3f25;
}

.panel-title i {
  color: #a56a32;
  font-style: normal;
  font-size: 11px;
}

.panel-title h3 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
}

.panel-title span {
  height: 1px;
  background: linear-gradient(90deg, rgba(100, 58, 31, 0.45), transparent);
}

.drink-card-body {
  min-height: 215px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: center;
}

.cup-illustration {
  position: relative;
  width: 145px;
  height: 140px;
  justify-self: center;
}

.cup-illustration::before {
  content: "";
  position: absolute;
  left: 15px;
  bottom: 10px;
  width: 105px;
  height: 94px;
  border-radius: 8px 8px 34px 34px;
  background: linear-gradient(135deg, #a56837, #6b3d22);
  box-shadow: inset 9px 0 rgba(255,255,255,0.09), 0 14px 18px rgba(75,42,20,0.2);
}

.cup-rim {
  position: absolute;
  z-index: 2;
  left: 13px;
  bottom: 92px;
  width: 109px;
  height: 24px;
  border-radius: 50%;
  border: 5px solid #c3905c;
  background: #4f2c19;
}

.cup-handle {
  position: absolute;
  right: 2px;
  bottom: 30px;
  width: 47px;
  height: 58px;
  border: 13px solid #7e4b2b;
  border-left: 0;
  border-radius: 0 50% 50% 0;
}

.cup-illustration > strong {
  position: absolute;
  z-index: 3;
  left: 44px;
  bottom: 43px;
  color: #f4d39c;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.steam {
  position: absolute;
  bottom: 115px;
  width: 2px;
  height: 40px;
  border-radius: 50%;
  background: rgba(111, 68, 37, 0.38);
  animation: steam-rise 2.3s ease-in-out infinite;
}
.steam-one { left: 48px; }
.steam-two { left: 80px; animation-delay: -1.1s; }
@keyframes steam-rise {
  from { transform: translateY(15px) scaleY(0.5); opacity: 0; }
  45% { opacity: 0.7; }
  to { transform: translateY(-12px) translateX(8px) scaleY(1.1); opacity: 0; }
}

.drink-facts > strong {
  display: block;
  font-family: "Noto Serif SC", serif;
  font-size: 28px;
}

.drink-facts > small {
  display: block;
  margin: 5px 0 16px;
  color: #96643a;
}

.drink-card .flavor-tags span {
  color: #6f4326;
  border-color: rgba(104, 61, 32, 0.3);
  background: rgba(255, 245, 222, 0.68);
}

.drink-card > p {
  margin: 8px 0 0;
  color: #7c583d;
  line-height: 1.7;
}

.detail-card blockquote {
  position: relative;
  margin: 26px 0 0;
  padding: 23px 24px;
  border: 1px dashed rgba(115, 68, 35, 0.36);
  border-radius: 12px;
  color: #725039;
  font-family: "Noto Serif SC", serif;
  font-size: 16px;
  line-height: 1.8;
}

.detail-card blockquote::after {
  content: "”";
  position: absolute;
  right: 15px;
  bottom: -20px;
  color: rgba(130, 80, 42, 0.2);
  font-size: 70px;
}

.evidence-card {
  margin-top: 22px;
}

.evidence-card > p {
  margin: 20px 0 0;
  color: #725039;
  font-size: 15px;
  line-height: 1.9;
}

.archive-profile {
  margin-top: 22px;
  padding: 30px 34px 36px;
}

.archive-profile.profile-section {
  padding-top: 30px;
  padding-bottom: 36px;
}

.profile-caption {
  margin: 10px 0 26px;
  color: #8a6548;
  font-size: 12px;
}

.archive-profile .dimension-row > span {
  color: #654028;
}

.archive-profile .dimension-track {
  background: linear-gradient(90deg, #af9269, #e6cfa6 50%, #a86935);
}

.relation-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.relation-panel > p {
  margin: 8px 0 18px;
  color: #8a6548;
  font-size: 11px;
}

.relation-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.relation-bean {
  min-width: 0;
  padding: 8px 6px 10px;
  border: 1px solid rgba(108, 64, 33, 0.26);
  border-radius: 8px 8px 18px 8px;
  background: rgba(255, 242, 215, 0.58);
  text-align: center;
}

.relation-bean img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.relation-bean strong,
.relation-bean small {
  display: block;
}

.relation-bean strong {
  font-family: "Noto Serif SC", serif;
  font-size: 12px;
}

.relation-bean small {
  margin-top: 2px;
  color: #99704e;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.archive-note {
  margin-top: 22px;
  color: #673f25;
  border-color: rgba(105, 61, 31, 0.34);
  background: rgba(255, 238, 204, 0.85);
}

.archive-note .note-icon {
  background: #8a552f;
}

.archive-note p {
  color: #7c583d;
}

.archive-footer-card {
  margin-top: 22px;
  color: #fff0cf;
  background: linear-gradient(135deg, #754426, #a76d38);
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 22px), calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 22px), 0 22px);
}

@media (max-width: 760px) {
  .result-screen {
    padding-bottom: 0;
  }

  .result-page {
    width: 100%;
    padding-top: 18px;
  }

  .reveal-heading {
    min-height: 105px;
    padding: 0 76px 18px 16px;
    align-items: flex-end;
  }

  .reveal-heading .result-back {
    position: absolute;
    left: 16px;
    top: 0;
    margin: 0;
    font-size: 11px;
  }

  .reveal-heading h1 {
    font-size: 40px;
  }

  .reveal-heading p {
    margin-top: 7px;
    font-size: 11px;
  }

  .reveal-heading::after {
    left: 16px;
    width: 240px;
  }

  .share-seal {
    right: 14px;
    top: 19px;
    width: 50px;
    height: 56px;
  }

  .share-seal span:nth-child(1) { left: 12px; top: 24px; }
  .share-seal span:nth-child(2) { right: 10px; top: 12px; }
  .share-seal span:nth-child(3) { right: 10px; bottom: 10px; }
  .share-seal i { left: 20px; width: 18px; }
  .share-seal i:nth-of-type(1) { top: 27px; }
  .share-seal i:nth-of-type(2) { top: 28px; }

  .bean-world {
    height: 400px;
    margin: 14px 10px 0;
    border-radius: 7px 28px 7px 28px;
  }

  .world-roster {
    inset: 16px 10px 14px;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 3px 4px;
  }

  .world-bean.is-current {
    transform: scale(1.08) translateY(-2px);
  }

  .result-dashboard {
    margin: 12px 10px 0;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .identity-card {
    min-height: 570px;
    padding: 20px 18px 24px;
  }

  .identity-card .result-index {
    top: 18px;
    left: 18px;
    font-size: 48px;
  }

  .identity-portrait {
    min-height: 335px;
  }

  .identity-portrait::before {
    width: 250px;
    height: 250px;
  }

  .identity-portrait img {
    width: min(340px, 112%);
  }

  .identity-copy h2 {
    font-size: 45px;
  }

  .identity-copy h2 small {
    display: block;
    margin: 8px 0 0;
    font-size: 16px;
  }

  .result-actions .archive-button {
    flex: 1;
    padding-inline: 10px;
  }

  .result-side-stack {
    gap: 12px;
  }

  .drink-card,
  .detail-card,
  .evidence-card,
  .relation-panel {
    padding: 22px 18px;
  }

  .panel-title h3 {
    font-size: 21px;
  }

  .drink-card-body {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 10px;
  }

  .cup-illustration {
    transform: scale(0.8);
  }

  .drink-facts > strong {
    font-size: 23px;
  }

  .evidence-card,
  .archive-profile,
  .relation-grid,
  .archive-note,
  .archive-footer-card {
    margin-right: 10px;
    margin-left: 10px;
  }

  .archive-profile {
    padding: 24px 18px 28px;
  }

  .archive-profile.profile-section {
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .archive-profile .dimension-row {
    grid-template-columns: 62px 1fr 62px;
    gap: 8px;
  }

  .relation-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .relation-cards {
    gap: 5px;
  }

  .relation-bean {
    padding: 5px 3px 8px;
  }

  .relation-bean strong {
    font-size: 10px;
  }

  .archive-note {
    padding: 20px 18px;
  }

  .archive-footer-card {
    margin-bottom: 24px;
    padding: 52px 18px;
  }
}

/* The result is intentionally presented as the supplied finished poster. */
.result-screen {
  min-height: 0;
  padding: 0;
  background: #cda16f;
}

.static-result-poster {
  width: min(942px, 100%);
  height: auto;
  display: block;
  margin: 0 auto;
}

.result-screen .result-page {
  display: none;
}

.poster-result-stage {
  position: relative;
  width: min(941px, 100%);
  margin: 0 auto;
  overflow: hidden;
  container-type: inline-size;
  background: #cda16f;
}

.poster-result-stage .static-result-poster {
  width: 100%;
}

.poster-world-dim {
  --glow-x: 50%;
  --glow-y: 50%;
  position: absolute;
  z-index: 4;
  left: 0;
  top: 8.5%;
  width: 100%;
  height: 47%;
  pointer-events: none;
  background: radial-gradient(
    circle 14cqw at var(--glow-x) var(--glow-y),
    rgba(24, 12, 6, 0) 0 36%,
    rgba(24, 12, 6, 0.12) 54%,
    rgba(24, 12, 6, 0.7) 100%
  );
}

.poster-world-dim::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 10, 5, 0.72);
  opacity: 0;
}

.poster-world-dim.is-revealing::before {
  animation: poster-dark-intro 1.15s ease-out both;
}

@keyframes poster-dark-intro {
  0%, 35% { opacity: 1; }
  100% { opacity: 0; }
}

.poster-beacon {
  position: absolute;
  z-index: 6;
  width: 16%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 225, 139, 0.82);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 229, 139, 0.22), rgba(240, 173, 62, 0.05) 58%, transparent 70%);
  box-shadow: 0 0 0 1cqw rgba(255, 206, 95, 0.12), 0 0 4cqw rgba(255, 219, 123, 0.88);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
}

.poster-beacon.is-revealing {
  animation: poster-beacon-in 0.8s 0.45s cubic-bezier(.2,.8,.2,1) both, poster-beacon-pulse 2.4s 1.3s ease-in-out infinite;
}

.poster-beacon span {
  position: absolute;
  left: 50%;
  bottom: -2.5cqw;
  padding: 0.55cqw 1.2cqw;
  border: 1px solid rgba(255, 235, 187, 0.64);
  border-radius: 999px;
  color: #fff1cd;
  background: rgba(87, 47, 24, 0.9);
  font-size: 1.15cqw;
  font-weight: 800;
  white-space: nowrap;
  transform: translateX(-50%);
}

@keyframes poster-beacon-in {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes poster-beacon-pulse {
  0%, 100% { box-shadow: 0 0 0 0.8cqw rgba(255, 206, 95, 0.1), 0 0 3.5cqw rgba(255, 219, 123, 0.72); }
  50% { box-shadow: 0 0 0 1.5cqw rgba(255, 206, 95, 0.18), 0 0 5cqw rgba(255, 229, 148, 0.96); }
}

.poster-share-hotspot {
  position: absolute;
  z-index: 12;
  right: 2.1%;
  top: 1.8%;
  width: 6.8%;
  aspect-ratio: 0.9;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.poster-share-hotspot:hover {
  box-shadow: 0 0 0 0.5cqw rgba(255, 225, 143, 0.24);
}

.poster-identity-overlay,
.poster-drink-overlay,
.poster-detail-overlay,
.poster-relation-overlay {
  position: absolute;
  z-index: 8;
  overflow: hidden;
  color: #60391f;
  border: 1px solid rgba(105, 62, 31, 0.32);
  background:
    radial-gradient(circle at 12% 4%, rgba(255,255,255,0.62), transparent 38%),
    linear-gradient(145deg, #f9e6bd, #edcca0);
  clip-path: polygon(3% 0, 97% 0, 100% 4%, 100% 96%, 97% 100%, 3% 100%, 0 96%, 0 4%);
}

.poster-identity-overlay {
  left: 2.1%;
  top: 55.1%;
  width: 47.2%;
  height: 28.8%;
  display: grid;
  grid-template-rows: 63% 37%;
  padding: 1.8cqw 2cqw 1.5cqw;
}

.poster-identity-overlay > img {
  width: 96%;
  height: 100%;
  justify-self: center;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.poster-identity-overlay > div {
  padding: 0 2cqw;
}

.poster-identity-overlay p {
  margin: 0 0 0.5cqw;
  color: #9b5f2e;
  font-size: 0.95cqw;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.poster-identity-overlay h2 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
  font-size: 4.4cqw;
  line-height: 1;
}

.poster-identity-overlay h2 small {
  margin-left: 1cqw;
  font-family: "DM Sans", sans-serif;
  font-size: 1.8cqw;
  letter-spacing: 0.12em;
}

.poster-identity-overlay blockquote {
  margin: 1.1cqw 0 0;
  color: #765138;
  font-size: 1.3cqw;
  line-height: 1.65;
}

.poster-drink-overlay {
  left: 51.2%;
  top: 55.1%;
  width: 46.6%;
  height: 17.3%;
  padding: 1.7cqw 2.1cqw;
  display: grid;
  grid-template-columns: 44% 56%;
  grid-template-rows: auto 1fr;
  align-items: center;
}

.poster-drink-overlay > p,
.poster-detail-overlay > p,
.poster-relation-overlay > p {
  margin: 0;
  color: #6b3d22;
  font-family: "Noto Serif SC", serif;
  font-size: 1.65cqw;
  font-weight: 800;
}

.poster-drink-overlay > p {
  grid-column: 1 / -1;
}

.poster-cup {
  position: relative;
  width: 12cqw;
  height: 9cqw;
  justify-self: center;
  border-radius: 0.8cqw 0.8cqw 2.5cqw 2.5cqw;
  background: linear-gradient(135deg, #9f6035, #6a3c22);
  box-shadow: inset 1cqw 0 rgba(255,255,255,0.08), 0 1.2cqw 2cqw rgba(76,42,21,0.2);
}

.poster-cup::before {
  content: "";
  position: absolute;
  left: -0.2cqw;
  top: -0.8cqw;
  width: 12.4cqw;
  height: 2.2cqw;
  border-radius: 50%;
  border: 0.6cqw solid #bd8450;
  background: #4d2a18;
}

.poster-cup::after {
  content: "";
  position: absolute;
  right: -3.4cqw;
  top: 2cqw;
  width: 3.8cqw;
  height: 4.4cqw;
  border: 1.2cqw solid #7a4728;
  border-left: 0;
  border-radius: 0 50% 50% 0;
}

.poster-cup i {
  position: absolute;
  left: 5.8cqw;
  bottom: 9.5cqw;
  width: 0.2cqw;
  height: 3.3cqw;
  background: rgba(106, 63, 35, 0.3);
  animation: steam-rise 2.3s ease-in-out infinite;
}

.poster-cup span {
  position: absolute;
  left: 4.2cqw;
  top: 4.2cqw;
  color: #f4d39c;
  font-size: 0.9cqw;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.poster-drink-overlay > div:last-child > strong,
.poster-drink-overlay > div:last-child > small {
  display: block;
}

.poster-drink-overlay > div:last-child > strong {
  font-family: "Noto Serif SC", serif;
  font-size: 2.6cqw;
  line-height: 1.25;
}

.poster-drink-overlay > div:last-child > small {
  margin: 0.5cqw 0 1.2cqw;
  color: #90613d;
  font-size: 1.1cqw;
}

#poster-flavor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5cqw;
}

#poster-flavor-tags span {
  padding: 0.45cqw 0.8cqw;
  border: 1px solid rgba(98, 55, 29, 0.3);
  border-radius: 999px;
  font-size: 0.9cqw;
}

.poster-detail-overlay {
  left: 51.2%;
  top: 73.2%;
  width: 46.6%;
  height: 11.5%;
  padding: 1.7cqw 2.1cqw;
}

.poster-detail-overlay blockquote {
  margin: 1.5cqw 0 0;
  padding: 1.2cqw 1.5cqw;
  border: 1px dashed rgba(108, 63, 33, 0.34);
  border-radius: 1cqw;
  color: #765138;
  font-family: "Noto Serif SC", serif;
  font-size: 1.15cqw;
  line-height: 1.65;
}

.poster-relation-overlay {
  top: 85.4%;
  width: 47%;
  height: 12.2%;
  padding: 1.3cqw 1.4cqw;
}

.poster-adjacent-overlay { left: 2.1%; }
.poster-opposite-overlay { left: 50.9%; }

.poster-relation-overlay > div {
  margin-top: 1.1cqw;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7cqw;
}

.poster-relation-overlay > div > span {
  min-width: 0;
  padding: 0.5cqw;
  display: grid;
  place-items: center;
  border: 1px solid rgba(105, 60, 31, 0.25);
  border-radius: 0.7cqw;
  background: rgba(255, 241, 211, 0.56);
}

.poster-relation-overlay img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.poster-relation-overlay b {
  margin-top: -0.4cqw;
  font-size: 0.82cqw;
}

.poster-controls {
  width: min(941px, 100%);
  margin: 0 auto;
  padding: 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
  background: #cda16f;
}

.poster-controls button {
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(91, 51, 27, 0.55);
  border-radius: 9px;
  color: #60391f;
  background: #f2d6a7;
  font-weight: 800;
  cursor: pointer;
}

.poster-controls button.is-primary {
  color: #fff1d1;
  background: #6f4226;
}

.mobile-result-cards {
  display: none;
}

@media (max-width: 520px) {
  body {
    background-attachment: scroll;
  }

  button,
  .option {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 70;
  }

  .result-screen {
    padding-bottom: 74px;
  }

  .poster-result-stage {
    height: 99cqw;
    overflow: hidden;
  }

  .poster-result-stage .static-result-poster {
    position: absolute;
    inset: 0 auto auto 0;
  }

  .poster-world-dim {
    top: 15.1cqw;
    height: 83.5cqw;
  }

  .poster-beacon {
    top: var(--beacon-y-cqw) !important;
    width: 17%;
  }

  .poster-beacon span {
    bottom: -3.3cqw;
    padding: 1cqw 2cqw;
    font-size: 2.3cqw;
  }

  .poster-share-hotspot {
    top: 3.2cqw;
  }

  .poster-identity-overlay,
  .poster-drink-overlay,
  .poster-detail-overlay,
  .poster-relation-overlay {
    display: none;
  }

  .mobile-result-cards {
    width: calc(100% - 16px);
    margin: 10px auto 0;
    display: grid;
    gap: 10px;
  }

  .mobile-archive-card {
    position: relative;
    overflow: hidden;
    color: #60391f;
    border: 1px solid rgba(105, 62, 31, 0.34);
    background:
      radial-gradient(circle at 12% 4%, rgba(255,255,255,0.68), transparent 38%),
      linear-gradient(145deg, #f9e6bd, #edcca0);
    box-shadow: 0 10px 24px rgba(79, 43, 21, 0.16);
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  }

  .mobile-result-identity {
    padding: 18px 18px 22px;
  }

  .mobile-result-number {
    position: absolute;
    z-index: 3;
    left: 18px;
    top: 15px;
    color: #a4672d;
    font-family: "Noto Serif SC", serif;
    font-size: 44px;
    font-weight: 900;
  }

  .mobile-result-identity > img {
    width: 100%;
    display: block;
    border-radius: 10px;
    mix-blend-mode: multiply;
  }

  .mobile-result-identity > div {
    padding: 16px 10px 2px;
  }

  .mobile-result-identity p {
    margin: 0 0 6px;
    color: #9a5e2e;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.15em;
  }

  .mobile-result-identity h2 {
    margin: 0;
    font-family: "Noto Serif SC", serif;
    font-size: 44px;
    line-height: 1;
  }

  .mobile-result-identity h2 small {
    display: block;
    margin-top: 8px;
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    letter-spacing: 0.14em;
  }

  .mobile-result-identity blockquote {
    margin: 18px 0 0;
    color: #755139;
    font-size: 16px;
    line-height: 1.75;
  }

  .mobile-result-drink,
  .mobile-result-detail,
  .mobile-result-relations,
  .mobile-result-note {
    padding: 22px 18px;
  }

  .mobile-card-title {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(101, 59, 31, 0.24);
  }

  .mobile-card-title > span {
    color: #9b5e2d;
  }

  .mobile-card-title h3 {
    margin: 0;
    font-family: "Noto Serif SC", serif;
    font-size: 23px;
  }

  .mobile-drink-body {
    min-height: 165px;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 18px;
    align-items: center;
  }

  .mobile-cup {
    position: relative;
    width: 108px;
    height: 88px;
    border-radius: 8px 8px 28px 28px;
    background: linear-gradient(135deg, #9f6035, #6a3c22);
    box-shadow: inset 8px 0 rgba(255,255,255,0.08), 0 12px 20px rgba(76,42,21,0.2);
  }

  .mobile-cup::before {
    content: "";
    position: absolute;
    left: -2px;
    top: -10px;
    width: 110px;
    height: 22px;
    border-radius: 50%;
    border: 6px solid #bd8450;
    background: #4d2a18;
  }

  .mobile-cup::after {
    content: "";
    position: absolute;
    right: -35px;
    top: 23px;
    width: 40px;
    height: 43px;
    border: 12px solid #7a4728;
    border-left: 0;
    border-radius: 0 50% 50% 0;
  }

  .mobile-cup i {
    position: absolute;
    left: 53px;
    bottom: 97px;
    width: 2px;
    height: 34px;
    background: rgba(106, 63, 35, 0.3);
    animation: steam-rise 2.3s ease-in-out infinite;
  }

  .mobile-cup strong {
    position: absolute;
    left: 34px;
    top: 43px;
    color: #f4d39c;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .mobile-drink-body h4 {
    margin: 0;
    font-family: "Noto Serif SC", serif;
    font-size: 24px;
    line-height: 1.3;
  }

  .mobile-drink-body small {
    display: block;
    margin-top: 5px;
    color: #90613d;
  }

  .mobile-flavor-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .mobile-flavor-tags span {
    padding: 6px 9px;
    border: 1px solid rgba(99, 56, 29, 0.3);
    border-radius: 999px;
    background: rgba(255, 243, 216, 0.54);
    font-size: 11px;
  }

  .mobile-result-drink > p,
  .mobile-result-detail > p {
    margin: 0;
    color: #79543a;
    font-size: 14px;
    line-height: 1.75;
  }

  .mobile-result-detail blockquote {
    margin: 18px 0 15px;
    padding: 16px;
    border: 1px dashed rgba(105, 60, 31, 0.34);
    border-radius: 10px;
    color: #6b472f;
    font-family: "Noto Serif SC", serif;
    font-size: 16px;
    line-height: 1.75;
  }

  .mobile-result-relations > div:last-child {
    padding-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .mobile-result-relations > div:last-child > span {
    padding: 7px;
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    border: 1px solid rgba(105, 60, 31, 0.25);
    border-radius: 9px;
    background: rgba(255, 241, 211, 0.5);
  }

  .mobile-result-relations img {
    width: 58px;
    height: 46px;
    object-fit: cover;
    mix-blend-mode: multiply;
  }

  .mobile-result-relations b {
    font-family: "Noto Serif SC", serif;
    font-size: 13px;
  }

  .mobile-result-note {
    display: flex;
    gap: 12px;
  }

  .mobile-result-note > span {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff1d1;
    background: #79502f;
    font-weight: 800;
  }

  .mobile-result-note strong {
    display: block;
    margin-bottom: 5px;
  }

  .mobile-result-note p {
    margin: 0;
    color: #79543a;
    font-size: 13px;
    line-height: 1.65;
  }

  .poster-controls {
    position: fixed;
    z-index: 80;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 8px max(10px, env(safe-area-inset-bottom));
    gap: 6px;
    border-top: 1px solid rgba(96, 54, 29, 0.3);
    background: rgba(205, 161, 111, 0.93);
    box-shadow: 0 -10px 30px rgba(55, 30, 15, 0.2);
    backdrop-filter: blur(14px);
  }

  .poster-controls button {
    flex: 1;
    min-height: 40px;
    padding: 0 6px;
    font-size: 12px;
  }
}

/* Glossy game-style controls inspired by the supplied UI reference */
:root {
  --game-cyan: #d7df58;
  --game-sky: #8fa83a;
  --game-blue: #4f7b31;
  --game-indigo: #285436;
  --game-purple: #123c2d;
  --game-deep: #08291f;
  --game-ink: #fffce8;
}

.button,
.archive-button,
.poster-controls button,
.nav-button,
.text-button {
  position: relative;
  overflow: hidden;
  color: var(--game-ink);
  border: 1px solid rgba(220, 232, 116, 0.58);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), transparent 43%),
    linear-gradient(135deg, var(--game-cyan) 0%, var(--game-blue) 48%, var(--game-purple) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    inset 0 -5px 8px rgba(4, 35, 25, 0.38),
    0 8px 18px rgba(5, 42, 29, 0.28),
    0 0 0 1px rgba(211, 224, 85, 0.1);
  text-shadow: 0 2px 3px rgba(3, 31, 21, 0.5);
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.button::before,
.archive-button::before,
.poster-controls button::before,
.nav-button::before,
.text-button::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 2px;
  height: 35%;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), transparent);
}

.button:hover,
.archive-button:hover,
.poster-controls button:hover,
.nav-button:hover,
.text-button:hover {
  color: #fff;
  filter: saturate(1.15) brightness(1.08);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -5px 8px rgba(4, 35, 25, 0.34),
    0 11px 24px rgba(5, 42, 29, 0.36),
    0 0 18px rgba(215, 223, 88, 0.34);
}

.button:active,
.archive-button:active,
.poster-controls button:active,
.nav-button:active,
.text-button:active {
  transform: translateY(1px) scale(0.985);
  box-shadow:
    inset 0 4px 8px rgba(4, 35, 25, 0.48),
    0 3px 9px rgba(5, 42, 29, 0.28);
}

.button-primary,
#home-screen .button-primary,
.archive-button.is-filled,
.poster-controls button.is-primary {
  color: #fff;
  border-color: rgba(232, 238, 133, 0.74);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), transparent 42%),
    linear-gradient(135deg, #b8c94a 0%, #688d30 46%, #24553a 100%);
}

.button-ghost,
#home-screen .button-ghost,
.archive-button:not(.is-filled),
.poster-controls button:not(.is-primary) {
  color: #f7f9ff;
  border-color: rgba(157, 186, 90, 0.5);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.13), transparent 42%),
    linear-gradient(135deg, rgba(50, 91, 48, 0.97), rgba(24, 66, 44, 0.98) 58%, rgba(10, 43, 32, 0.98));
}

.button-light {
  color: #fff;
  border-color: rgba(229, 237, 126, 0.7);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.24), transparent 43%),
    linear-gradient(135deg, #c3cf4d, #668f32 54%, #245a3b);
}

.text-button {
  min-height: 38px;
  padding: 0 15px;
  border-bottom: 1px solid rgba(220, 232, 116, 0.58);
  border-radius: 999px;
  font-size: 12px;
}

.back-home {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(208, 225, 106, 0.48);
  border-radius: 999px;
  color: #f5f8ff;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.15), transparent),
    linear-gradient(135deg, rgba(154, 179, 51, 0.96), rgba(36, 91, 54, 0.96));
  box-shadow: inset 0 1px rgba(255,255,255,0.28), 0 6px 14px rgba(5, 43, 29, 0.28);
  font-weight: 800;
  text-shadow: 0 2px 3px rgba(3, 31, 21, 0.48);
}

.option {
  color: #f8f9ff;
  border-color: rgba(128, 166, 78, 0.52);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), transparent 42%),
    linear-gradient(135deg, #315b3a 0%, #1d4937 56%, #0d3026 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.17),
    inset 0 -5px 9px rgba(3, 31, 22, 0.28),
    0 7px 16px rgba(5, 43, 29, 0.2);
}

.option:hover {
  color: #fff;
  border-color: rgba(218, 231, 100, 0.76);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), transparent 42%),
    linear-gradient(135deg, #7f9e37 0%, #3c7337 55%, #175039 100%);
  box-shadow: 0 9px 22px rgba(7, 57, 35, 0.3), 0 0 16px rgba(211, 224, 85, 0.2);
}

.option.is-selected {
  color: #fff;
  border-color: rgba(238, 242, 142, 0.94);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.24), transparent 42%),
    linear-gradient(135deg, #becd42 0%, #6e9733 48%, #21603d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    inset 0 -5px 8px rgba(5, 45, 29, 0.28),
    0 9px 24px rgba(8, 65, 38, 0.36),
    0 0 22px rgba(218, 229, 91, 0.38);
}

.option-letter {
  color: #fff;
  border-color: rgba(239, 244, 164, 0.72);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.24), transparent),
    linear-gradient(135deg, #a6b943, #2e693d);
  box-shadow: inset 0 1px rgba(255,255,255,0.3), 0 4px 10px rgba(5, 45, 29, 0.28);
}

.nav-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(220, 232, 116, 0.52);
  border-radius: 999px;
}

.nav-button:disabled,
.button:disabled {
  opacity: 0.38;
  filter: grayscale(0.35);
  transform: none;
  cursor: not-allowed;
}

.share-seal {
  border-color: rgba(232, 239, 131, 0.74);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), transparent),
    linear-gradient(135deg, #b9c943, #5f8831 55%, #1e5638);
  box-shadow: inset 0 1px rgba(255,255,255,0.34), 0 8px 18px rgba(6, 49, 31, 0.32), 0 0 18px rgba(211, 224, 85, 0.22);
}

.share-seal span,
.share-seal i {
  background: #f4f3b4;
}

.poster-controls {
  border-color: rgba(126, 160, 73, 0.42);
  background: rgba(7, 42, 30, 0.94);
}

@media (max-width: 520px) {
  .poster-controls {
    border-top-color: rgba(161, 190, 81, 0.44);
    background: rgba(6, 38, 28, 0.96);
    box-shadow: 0 -10px 30px rgba(3, 28, 20, 0.4);
  }

  .poster-controls button {
    border-radius: 14px;
    font-size: 12px;
  }

  .option {
    border-radius: 18px;
  }
}

/* Interactive video map on the result page */
.interactive-bean-map {
  --active-x: 50%;
  --active-y: 50%;
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  width: 100%;
  height: 55.1%;
  overflow: hidden;
  isolation: isolate;
  color: #fff7d4;
  background: #503721;
}

.interactive-bean-map video,
.interactive-bean-map .personality-map-background {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 0;
  width: auto;
  height: 100%;
  max-width: none;
  display: block;
  transform: translateX(-50%);
  pointer-events: none;
}

.interactive-bean-map .personality-map-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
}

.interactive-map-shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle 13% at var(--active-x) var(--active-y),
    rgba(31, 19, 10, 0) 0 36%,
    rgba(31, 19, 10, 0.2) 55%,
    rgba(20, 12, 7, 0.66) 100%
  );
  transition: background-position 0.35s ease;
}

.bean-map-hotspots {
  position: absolute;
  z-index: 3;
  inset: 0;
}

.bean-map-hotspot {
  position: absolute;
  left: var(--bean-x);
  top: var(--bean-y);
  width: clamp(42px, 10cqw, 94px);
  aspect-ratio: 1;
  padding: 0;
  border: 1px dashed rgba(255, 229, 143, 0.2);
  border-radius: 50%;
  color: #fff5ce;
  background: rgba(255, 226, 126, 0.01);
  box-shadow: inset 0 0 18px rgba(255, 226, 126, 0.03);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.bean-map-hotspot:hover,
.bean-map-hotspot:focus-visible {
  outline: none;
  border-color: rgba(255, 235, 164, 0.72);
  background: rgba(255, 222, 112, 0.12);
  box-shadow: 0 0 20px rgba(255, 222, 112, 0.45), inset 0 0 18px rgba(255, 236, 174, 0.16);
  transform: translate(-50%, -50%) scale(1.06);
}

.bean-map-hotspot.is-active {
  border: 2px solid rgba(255, 239, 172, 0.96);
  background: radial-gradient(circle, rgba(255, 231, 134, 0.24), rgba(255, 213, 91, 0.05) 62%, transparent 72%);
  box-shadow:
    0 0 0 8px rgba(255, 215, 94, 0.13),
    0 0 28px 8px rgba(255, 227, 132, 0.76),
    inset 0 0 20px rgba(255, 245, 207, 0.2);
  animation: interactive-bean-pulse 2.2s ease-in-out infinite;
}

.bean-map-hotspot.is-original:not(.is-active) {
  border: 2px solid rgba(203, 225, 87, 0.92);
  background: rgba(104, 139, 47, 0.16);
  box-shadow: 0 0 0 5px rgba(194, 218, 76, 0.11), 0 0 18px rgba(211, 226, 101, 0.55);
}

.bean-map-hotspot span,
.bean-map-hotspot em {
  position: absolute;
  left: 50%;
  padding: 4px 8px;
  border: 1px solid rgba(255, 236, 177, 0.5);
  border-radius: 999px;
  font-size: clamp(9px, 1.25cqw, 12px);
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.bean-map-hotspot span {
  bottom: -20px;
  color: #fff5ce;
  background: rgba(77, 43, 22, 0.92);
}

.bean-map-hotspot em {
  top: -22px;
  color: #173c29;
  border-color: rgba(241, 244, 155, 0.78);
  background: linear-gradient(135deg, #e0e36f, #9eb341);
  box-shadow: 0 4px 12px rgba(24, 55, 34, 0.28);
}

.bean-map-hotspot.is-active span,
.bean-map-hotspot.is-original em {
  opacity: 1;
}

.bean-map-hotspot.is-active.is-original span {
  display: none;
}

@keyframes interactive-bean-pulse {
  0%, 100% {
    box-shadow: 0 0 0 7px rgba(255, 215, 94, 0.11), 0 0 25px 7px rgba(255, 227, 132, 0.64), inset 0 0 20px rgba(255, 245, 207, 0.18);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(255, 215, 94, 0.18), 0 0 36px 12px rgba(255, 235, 158, 0.86), inset 0 0 24px rgba(255, 250, 222, 0.28);
  }
}

.map-instruction {
  position: absolute;
  z-index: 5;
  right: 2.2%;
  top: 16%;
  padding: 7px 12px;
  border: 1px solid rgba(246, 232, 169, 0.42);
  border-radius: 999px;
  color: #fff3ca;
  background: rgba(57, 38, 21, 0.76);
  box-shadow: 0 6px 16px rgba(43, 26, 14, 0.22);
  backdrop-filter: blur(7px);
  font-size: clamp(10px, 1.25cqw, 13px);
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.map-selection-bar {
  position: absolute;
  z-index: 5;
  left: 2%;
  right: 2%;
  bottom: 2%;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.map-viewing-chip,
.map-original-chip {
  min-width: 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(246, 232, 169, 0.38);
  border-radius: 14px;
  color: #fff4cf;
  background: rgba(53, 34, 19, 0.78);
  box-shadow: 0 7px 18px rgba(38, 23, 13, 0.24), inset 0 1px rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}

.map-original-chip {
  color: #173b29;
  border-color: rgba(235, 240, 139, 0.76);
  background: linear-gradient(135deg, rgba(224, 227, 111, 0.94), rgba(123, 157, 52, 0.96));
  cursor: pointer;
  pointer-events: auto;
}

.map-viewing-chip small,
.map-original-chip small {
  opacity: 0.78;
  font-size: clamp(8px, 1cqw, 11px);
}

.map-viewing-chip strong,
.map-original-chip strong {
  overflow: hidden;
  font-size: clamp(10px, 1.35cqw, 14px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-original-chip span {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 251, 200, 0.42);
  font-size: clamp(8px, 0.9cqw, 10px);
  white-space: nowrap;
}

.interactive-bean-map:not(.is-browsing) .map-original-chip {
  cursor: default;
}

@media (max-width: 520px) {
  .interactive-bean-map {
    height: 100%;
  }

  .interactive-bean-map video,
  .interactive-bean-map .personality-map-background {
    height: 100%;
  }

  .bean-map-hotspot {
    width: 42px;
  }

  .bean-map-hotspot span,
  .bean-map-hotspot em {
    padding: 3px 6px;
    font-size: 9px;
  }

  .bean-map-hotspot span { bottom: -16px; }
  .bean-map-hotspot em { top: -18px; }

  .map-instruction {
    top: 16%;
    right: 2%;
    padding: 5px 8px;
    font-size: 9px;
  }

  .map-selection-bar {
    left: 7px;
    right: 7px;
    bottom: 6px;
    gap: 5px;
  }

  .map-viewing-chip,
  .map-original-chip {
    padding: 6px 8px;
    gap: 5px;
    border-radius: 11px;
  }

  .map-viewing-chip small,
  .map-original-chip small {
    display: none;
  }

  .map-viewing-chip strong,
  .map-original-chip strong {
    font-size: 10px;
  }

  .map-original-chip span {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bean-map-hotspot.is-active {
    animation: none;
  }
}

/* Forest-light background for the question area; content and layout stay unchanged. */
#question-wrap {
  background-color: #edf2d9;
  background-image:
    linear-gradient(180deg, rgba(248, 250, 230, 0.73) 0%, rgba(236, 243, 216, 0.66) 48%, rgba(226, 237, 205, 0.76) 100%),
    radial-gradient(circle at 56% 8%, rgba(250, 255, 185, 0.58) 0%, rgba(235, 246, 178, 0.2) 28%, transparent 55%),
    url("assets/enchanted-forest-bg.png");
  background-repeat: no-repeat;
  background-position: center, center, center 46%;
  background-size: cover, cover, cover;
}

/* Full-screen cinematic homepage, based on the supplied reference. */
.brand-character {
  position: relative;
  width: 42px;
  height: 54px;
  flex: 0 0 auto;
  overflow: hidden;
}

.brand-character img {
  position: absolute;
  left: 50%;
  top: 51%;
  width: 78px;
  height: auto;
  max-width: none;
  transform: translate(-50%, -50%);
}

.home-audio-toggle {
  display: none;
}

body[data-screen="home-screen"] .topbar {
  position: absolute;
  inset: 0 0 auto;
  height: 108px;
  padding-inline: max(42px, calc((100vw - 1240px) / 2));
  color: #fffdf1;
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(7, 17, 7, 0.52), rgba(7, 17, 7, 0));
  box-shadow: none;
  backdrop-filter: none;
}

body[data-screen="home-screen"] .brand {
  gap: 13px;
  color: #fffdf1;
}

body[data-screen="home-screen"] .brand strong {
  font-size: 25px;
  letter-spacing: 0.13em;
}

body[data-screen="home-screen"] .brand small {
  margin-top: 6px;
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 9px;
  letter-spacing: 0.14em;
}

body[data-screen="home-screen"] .brand-character {
  width: 45px;
  height: 62px;
}

body[data-screen="home-screen"] .brand-character img {
  width: 87px;
}

body[data-screen="home-screen"] .top-note {
  display: none;
}

body[data-screen="home-screen"] .top-actions {
  gap: 9px;
}

body[data-screen="home-screen"] .text-button {
  min-height: 50px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(10, 19, 9, 0.24);
  box-shadow: inset 0 1px rgba(255,255,255,0.08), 0 8px 26px rgba(0,0,0,0.14);
  backdrop-filter: blur(8px);
  font-size: 12px;
}

body[data-screen="home-screen"] .home-audio-toggle {
  min-height: 50px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  color: #fffef3;
  background: rgba(10, 19, 9, 0.3);
  box-shadow: inset 0 1px rgba(255,255,255,0.08), 0 8px 26px rgba(0,0,0,0.18);
  backdrop-filter: blur(8px);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

body[data-screen="home-screen"] .home-audio-toggle:hover {
  border-color: rgba(255, 214, 119, 0.9);
  background: rgba(91, 48, 20, 0.58);
  transform: translateY(-1px);
}

body[data-screen="home-screen"] .home-audio-toggle.is-on {
  color: #3c210e;
  border-color: #ffd477;
  background: #ffd477;
}

.home-video-hero {
  position: relative;
  width: 100%;
  min-height: 100svh;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  place-items: center;
  isolation: isolate;
  color: #fffdf1;
  background: #142112 url("assets/home-hero-fallback.jpg") center / cover no-repeat;
}

.home-hero-video {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 48%;
  image-rendering: auto;
}

.home-video-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, rgba(31, 19, 8, 0.04) 0 24%, rgba(9, 17, 7, 0.28) 68%, rgba(5, 12, 5, 0.55) 100%),
    linear-gradient(180deg, rgba(6, 14, 5, 0.38) 0%, rgba(10, 17, 7, 0.28) 48%, rgba(5, 11, 4, 0.58) 100%);
}

.home-video-copy {
  position: relative;
  z-index: 2;
  padding-top: 96px;
  padding-bottom: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.5);
}

.home-video-kicker {
  margin: 0 0 18px;
  color: #ffd477;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.home-video-kicker::before,
.home-video-kicker::after {
  content: "";
  width: 34px;
  height: 1px;
  margin: 0 12px 4px;
  display: inline-block;
  background: currentColor;
  opacity: 0.72;
}

.home-video-copy h1 {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 17px;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(58px, 6.8vw, 104px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.home-video-copy h1 span {
  color: #fffdf1;
}

.home-video-copy h1 em {
  color: #ffd477;
  font-style: normal;
}

.home-video-lead {
  margin: 27px 0 25px;
  color: rgba(255, 255, 255, 0.84);
  font-family: "Noto Serif SC", serif;
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.04em;
}

.home-start-button {
  position: relative;
  overflow: hidden;
  min-width: 310px;
  min-height: 72px;
  padding: 8px 9px 8px 29px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid rgba(220, 235, 108, 0.94);
  border-radius: 999px;
  color: #fffdf0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 39%),
    linear-gradient(128deg, #b7cf49 0%, #699e3f 38%, #286d3d 66%, #0b4735 100%);
  box-shadow:
    0 15px 40px rgba(3, 31, 21, 0.38),
    inset 0 2px 1px rgba(255, 255, 255, 0.4),
    inset 0 -10px 18px rgba(3, 42, 28, 0.3),
    0 0 0 3px rgba(151, 189, 67, 0.14);
  text-shadow: 0 2px 7px rgba(3, 31, 21, 0.5);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-start-button::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 16%;
  right: 17%;
  top: 5px;
  height: 17px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.06));
  pointer-events: none;
}

.home-start-button strong {
  position: relative;
  z-index: 1;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.home-start-button > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff9e9;
  border: 1px solid rgba(225, 238, 124, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 42%),
    linear-gradient(145deg, #3f853d, #073c31);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.35), 0 4px 12px rgba(2, 31, 22, 0.32);
  font-size: 25px;
  transition: transform 0.2s ease;
}

.home-start-button:hover {
  transform: translateY(-3px);
  box-shadow:
    0 20px 48px rgba(2, 35, 23, 0.46),
    inset 0 2px 1px rgba(255, 255, 255, 0.44),
    inset 0 -10px 18px rgba(3, 42, 28, 0.27),
    0 0 30px rgba(188, 220, 80, 0.24);
}

.home-start-button:hover > span {
  transform: translateX(3px);
}

.home-video-meta {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}

.home-video-meta b {
  color: #fff4cd;
  font-weight: 800;
}

.home-video-meta i {
  color: #ffd477;
  font-style: normal;
}

.home-browse-link {
  margin-top: 28px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

.home-browse-link span {
  margin-left: 5px;
  color: #ffd477;
}

.home-video-rule {
  position: absolute;
  z-index: 2;
  left: max(24px, calc((100vw - 1240px) / 2));
  right: max(24px, calc((100vw - 1240px) / 2));
  bottom: 17px;
  height: 2px;
  background: linear-gradient(90deg, #ffe08b, rgba(255, 224, 139, 0.28), #ffe08b);
}

@media (max-width: 680px) {
  body[data-screen="home-screen"] .topbar {
    height: 82px;
    padding-inline: 17px;
  }

  body[data-screen="home-screen"] .brand {
    gap: 6px;
  }

  body[data-screen="home-screen"] .brand-character {
    width: 31px;
    height: 46px;
  }

  body[data-screen="home-screen"] .brand-character img {
    width: 62px;
  }

  body[data-screen="home-screen"] .brand strong {
    font-size: 18px;
  }

  body[data-screen="home-screen"] .brand small {
    margin-top: 4px;
    font-size: 5.5px;
    letter-spacing: 0.08em;
  }

  body[data-screen="home-screen"] .home-audio-toggle {
    min-height: 40px;
    padding: 0 9px;
    gap: 6px;
    font-size: 10px;
    white-space: nowrap;
  }

  body[data-screen="home-screen"] .top-actions {
    gap: 4px;
    flex: 0 0 auto;
  }

  body[data-screen="home-screen"] .text-button {
    min-height: 40px;
    padding: 0 8px;
    font-size: 9px;
    white-space: nowrap;
  }

  .home-video-hero {
    min-height: 100svh;
  }

  .home-hero-video {
    object-position: center;
  }

  .home-video-shade {
    background:
      radial-gradient(circle at 50% 48%, rgba(32, 18, 7, 0.04) 0 20%, rgba(7, 15, 5, 0.23) 62%, rgba(4, 10, 3, 0.58) 100%),
      linear-gradient(180deg, rgba(5, 12, 4, 0.44), rgba(7, 14, 5, 0.25) 48%, rgba(4, 9, 3, 0.65));
  }

  .home-video-copy {
    width: calc(100% - 28px);
    padding-top: 92px;
    padding-bottom: 58px;
  }

  .home-video-kicker {
    margin-bottom: 15px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .home-video-kicker::before,
  .home-video-kicker::after {
    width: 18px;
    margin-inline: 7px;
  }

  .home-video-copy h1 {
    display: block;
    font-size: clamp(47px, 15vw, 62px);
    line-height: 1.04;
  }

  .home-video-copy h1 span,
  .home-video-copy h1 em {
    display: block;
  }

  .home-video-lead {
    margin: 20px 0 23px;
    font-size: 14px;
    line-height: 1.8;
  }

  .home-start-button {
    width: min(292px, 94vw);
    min-width: 0;
    min-height: 64px;
    padding-left: 22px;
    gap: 10px;
  }

  .home-start-button strong {
    font-size: 17px;
  }

  .home-start-button > span {
    width: 48px;
    height: 48px;
    font-size: 21px;
  }

  .home-video-meta {
    margin-top: 20px;
    gap: 8px;
    font-size: 10px;
  }

  .home-browse-link {
    margin-top: 18px;
    font-size: 11px;
  }

  .home-video-rule {
    left: 16px;
    right: 16px;
    bottom: 12px;
  }
}

/* Final phone-canvas lock: keep the opening and result views calm on larger displays. */
@media (min-width: 431px) {
  body[data-screen="home-screen"],
  body[data-screen="result-screen"] {
    background: #030503 !important;
  }

  body[data-screen="home-screen"] .topbar,
  body[data-screen="result-screen"] .topbar {
    width: 430px !important;
    max-width: 100% !important;
  }

  body[data-screen="home-screen"] .topbar {
    inset: 24px auto auto 50% !important;
    height: 82px;
    margin: 0 !important;
    padding-inline: 17px !important;
    transform: translateX(-50%);
  }

  body[data-screen="result-screen"] .topbar {
    margin: 24px auto 0 !important;
  }

  #home-screen,
  #result-screen {
    width: 430px !important;
    max-width: 100% !important;
    margin: 24px auto !important;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 24px 70px rgba(0, 0, 0, 0.38);
  }

  #home-screen .home-video-hero {
    width: 100%;
    height: 844px;
    min-height: 844px;
  }

  #home-screen .home-video-rule {
    left: 18px;
    right: 18px;
  }

  #result-screen .poster-result-stage,
  #result-screen .static-result-poster {
    width: 430px !important;
    max-width: 100% !important;
  }
}

/* Result page canvas: carry the reference's warm parchment all the way to the viewport edge. */
body[data-screen="result-screen"] {
  background:
    radial-gradient(ellipse at 18% 8%, rgba(255, 219, 157, 0.55), transparent 30%),
    radial-gradient(ellipse at 84% 90%, rgba(117, 69, 31, 0.24), transparent 38%),
    repeating-linear-gradient(-18deg, rgba(91, 49, 18, 0.035) 0 1px, transparent 1px 9px),
    #c18b50 !important;
}

body[data-screen="result-screen"] #result-screen {
  margin: 0 auto !important;
  box-shadow: none !important;
  background:
    radial-gradient(ellipse at 5% 14%, rgba(255, 223, 169, 0.43), transparent 31%),
    radial-gradient(ellipse at 96% 78%, rgba(102, 58, 25, 0.19), transparent 38%),
    #c18b50 !important;
}

body[data-screen="result-screen"] #result-screen .forest-result-layout {
  background: transparent !important;
}

/* The generated bean art already carries its name; do not print the same name again below it. */
#result-screen .detail-board-profile .detail-board-label,
#result-screen .detail-board-profile h2 {
  display: none;
}

/* Drink card follows the reference: one generous drink image on the left, concise name and flavour chips on the right. */
#result-screen .detail-board-drink-content {
  grid-template-columns: 45% minmax(0, 1fr);
  align-items: center;
  gap: clamp(8px, 1.8vw, 18px);
}

#result-screen .detail-board-cup {
  width: 100%;
  height: clamp(88px, 17vw, 165px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

#result-screen .detail-board-drink-content small {
  display: none;
}

#result-screen .detail-board-drink-content strong {
  font-size: clamp(14px, 2.4vw, 25px);
  line-height: 1.42;
}

#result-screen .detail-board-drink-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: clamp(8px, 1.4vw, 13px);
}

#result-screen .detail-board-drink-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #55351d;
  background: #dbb369;
  font-size: clamp(8px, 1.35vw, 12px);
  font-weight: 900;
  white-space: nowrap;
}

/* The supplied drink photos carry a thin white export edge. Crop and blend that edge into the parchment. */
#result-screen .detail-board-drink-content {
  overflow: hidden;
}

#result-screen .detail-board-drink-content .detail-board-cup {
  clip-path: inset(7px round 24px);
  transform: scale(1.075);
  filter: contrast(1.06) saturate(0.9) sepia(0.07) drop-shadow(0 5px 5px rgba(69, 37, 14, 0.24));
}

/* One continuous poster: overlap the scene edge with the parchment board instead of splitting it into two canvases. */
#result-screen .forest-detail-board {
  position: relative;
  z-index: 2;
  margin-top: clamp(-26px, -4vw, -14px);
  padding-top: clamp(28px, 5vw, 48px);
  gap: clamp(8px, 1.25vw, 13px);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 225, 168, 0.58), transparent 31%),
    radial-gradient(ellipse at 4% 68%, rgba(116, 69, 29, 0.17), transparent 38%),
    radial-gradient(ellipse at 96% 90%, rgba(255, 219, 158, 0.22), transparent 35%),
    repeating-linear-gradient(148deg, rgba(81, 44, 16, 0.027) 0 1px, transparent 1px 8px),
    #bd8750;
  box-shadow: 0 -10px 24px rgba(93, 54, 22, 0.2);
}

#result-screen .forest-detail-board::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(32px, 6vw, 58px);
  background: linear-gradient(180deg, rgba(72, 39, 17, 0.22), transparent 84%);
  pointer-events: none;
}

/* Match the reference's carved, beveled parchment cards and remove the notebook-like ruled lines. */
#result-screen .detail-board-card {
  --cut: clamp(12px, 1.9vw, 19px);
  border: clamp(2px, 0.35vw, 3px) solid transparent;
  border-radius: 0 !important;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  background:
    radial-gradient(ellipse at 12% 9%, rgba(255, 252, 220, 0.86), transparent 41%),
    radial-gradient(ellipse at 91% 90%, rgba(174, 112, 54, 0.22), transparent 45%),
    linear-gradient(135deg, #f1d79f, #e5bd78 57%, #d8a960) padding-box,
    linear-gradient(135deg, #7b4a24 0%, #e8c47d 19%, #8d582b 48%, #f2d590 78%, #78461f 100%) border-box;
  box-shadow: none;
  filter: drop-shadow(0 6px 5px rgba(73, 39, 14, 0.24));
}

#result-screen .detail-board-card::before {
  inset: clamp(6px, 1vw, 10px);
  border-color: rgba(107, 65, 28, 0.36);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 248, 211, 0.37), transparent 42%),
    repeating-linear-gradient(-12deg, rgba(103, 61, 26, 0.025) 0 1px, transparent 1px 8px);
}

#result-screen .detail-board-card h3 {
  letter-spacing: 0.02em;
}

/* Give the bean-art nameplate, English code, and flavour system three calm, separate reading lines. */
#result-screen .detail-board-profile > img {
  height: clamp(198px, 32vw, 290px);
  margin: -18px -6% -4px;
  object-position: center top;
}

#result-screen .detail-board-profile .detail-board-title {
  margin: 5px 0 0;
  line-height: 1.4;
}

#result-screen .detail-board-profile blockquote {
  margin-top: 12px;
}

/* Final reference-faithful result board: two independent parchment columns. */
#result-screen .forest-detail-board {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(8px, 1.35vw, 14px);
  margin-top: -3px;
  padding: clamp(11px, 2.4vw, 24px);
  background:
    radial-gradient(ellipse at 18% 5%, rgba(244, 199, 130, 0.34), transparent 34%),
    radial-gradient(ellipse at 88% 92%, rgba(91, 51, 20, 0.18), transparent 40%),
    repeating-linear-gradient(121deg, rgba(92, 51, 20, 0.022) 0 1px, transparent 1px 9px),
    #b98248;
  box-shadow: inset 0 12px 24px rgba(79, 43, 16, 0.12);
}

#result-screen .forest-detail-board::before {
  height: 18px;
  background: linear-gradient(180deg, rgba(75, 40, 15, 0.2), transparent);
}

#result-screen .detail-board-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.35vw, 14px);
}

#result-screen .detail-board-card {
  --cut: clamp(9px, 1.45vw, 15px);
  position: relative;
  min-width: 0;
  padding: clamp(10px, 1.8vw, 18px);
  border: clamp(2px, 0.32vw, 3px) solid transparent;
  border-radius: 0 !important;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  color: #3f2819;
  background:
    radial-gradient(ellipse at 14% 7%, rgba(255, 249, 218, 0.72), transparent 43%),
    radial-gradient(ellipse at 92% 94%, rgba(167, 103, 45, 0.17), transparent 42%),
    linear-gradient(135deg, #efd49d 0%, #e9c988 55%, #dfb56f 100%) padding-box,
    linear-gradient(135deg, #82512a 0%, #e4bd75 20%, #86532a 52%, #efcf88 78%, #75451f 100%) border-box;
  box-shadow: none;
  filter: drop-shadow(0 5px 4px rgba(66, 35, 13, 0.23));
}

#result-screen .detail-board-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: clamp(5px, 0.8vw, 8px);
  border: 1px solid rgba(111, 67, 29, 0.34);
  border-radius: 0;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  background: radial-gradient(ellipse at 25% 0%, rgba(255, 250, 219, 0.32), transparent 46%);
  pointer-events: none;
}

#result-screen .detail-board-card::after {
  content: "✦";
  position: absolute;
  z-index: 1;
  top: clamp(8px, 1.2vw, 12px);
  right: clamp(9px, 1.4vw, 14px);
  left: auto;
  color: rgba(116, 74, 34, 0.46);
  font-size: clamp(8px, 1.4vw, 14px);
}

#result-screen .detail-board-card > * {
  position: relative;
  z-index: 1;
}

#result-screen .detail-board-card h3 {
  margin: 0 0 clamp(7px, 1.15vw, 12px);
  padding: 0;
  color: #422718;
  font: 900 clamp(12px, 1.75vw, 18px) / 1.25 "Noto Serif SC", Georgia, serif;
  letter-spacing: 0.02em;
}

#result-screen .detail-board-card > p {
  margin: 0;
  color: #4b3020;
  font-size: clamp(8.5px, 1.43vw, 14px);
  line-height: 1.62;
  text-align: justify;
}

#result-screen .detail-board-profile {
  display: grid;
  grid-template-columns: minmax(0, 0.46fr) minmax(0, 0.54fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: clamp(7px, 1.15vw, 12px);
  padding-top: clamp(13px, 2.1vw, 21px);
  background:
    radial-gradient(ellipse at 14% 7%, rgba(255, 249, 218, 0.72), transparent 43%),
    radial-gradient(ellipse at 92% 94%, rgba(167, 103, 45, 0.17), transparent 42%),
    linear-gradient(135deg, #efd49d 0%, #e9c988 55%, #dfb56f 100%) padding-box,
    linear-gradient(135deg, #82512a 0%, #e4bd75 20%, #86532a 52%, #efcf88 78%, #75451f 100%) border-box;
}

#result-screen .detail-board-profile::before {
  background: radial-gradient(ellipse at 25% 0%, rgba(255, 250, 219, 0.32), transparent 46%);
}

#result-screen .detail-board-portrait {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  min-height: clamp(142px, 28vw, 270px);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 239, 196, 0.3), transparent 72%);
}

#result-screen .detail-board-portrait img {
  position: absolute;
  top: 0;
  left: 50%;
  width: auto;
  max-width: none;
  height: 142%;
  object-fit: contain;
  transform: translateX(-50%);
  mix-blend-mode: normal !important;
  filter: drop-shadow(0 5px 4px rgba(64, 35, 15, 0.22));
  -webkit-mask-image: none;
  mask-image: none;
}

#result-screen .detail-board-identity {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  text-align: left;
}

#result-screen .detail-board-profile .detail-board-label {
  display: inline-block;
  margin: 0 0 clamp(7px, 1vw, 10px);
  padding: 3px 8px;
  border: 1px solid rgba(119, 73, 32, 0.42);
  color: #583820;
  background: rgba(227, 189, 125, 0.56);
  font-size: clamp(7px, 1.1vw, 11px);
  font-weight: 900;
}

#result-screen .detail-board-profile h2 {
  display: block;
  margin: 0;
  color: #3e2516;
  font: 900 clamp(20px, 3.9vw, 39px) / 1.05 "Noto Serif SC", Georgia, serif;
  white-space: nowrap;
}

#result-screen .detail-board-profile h2 small {
  display: inline;
  margin-left: 5px;
  color: #51311d;
  font: 900 clamp(11px, 2vw, 20px) / 1 Georgia, serif;
}

#result-screen .detail-board-profile .detail-board-title {
  margin: clamp(6px, 1vw, 10px) 0 0;
  color: #775333;
  font-size: clamp(7px, 1.15vw, 11px);
  font-weight: 800;
  line-height: 1.35;
}

#result-screen .detail-board-profile blockquote {
  margin: clamp(9px, 1.45vw, 14px) 0;
  color: #674728;
  font: 800 clamp(8.5px, 1.45vw, 14px) / 1.58 "Noto Serif SC", serif;
}

#result-screen .detail-board-tags {
  justify-content: flex-start;
  gap: 4px;
}

#result-screen .detail-board-tags span {
  padding: 3px 6px;
  color: #55351d;
  background: #dcb777;
  font-size: clamp(6.5px, 1.05vw, 10px);
}

#result-screen .detail-board-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(6px, 1vw, 10px);
}

#result-screen .detail-board-actions button {
  min-height: clamp(31px, 5.1vw, 49px);
  border: 1px solid #7c4e28;
  border-radius: 0;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  color: #fff0cc;
  background: linear-gradient(135deg, #74451f, #512f18);
  font-size: clamp(8px, 1.25vw, 12px);
  font-weight: 900;
}

#result-screen .detail-board-actions button + button {
  color: #4c2d19;
  background: linear-gradient(135deg, #f0d49a, #dfb96f);
}

#result-screen .detail-board-drink-content {
  display: grid;
  grid-template-columns: 45% minmax(0, 1fr);
  align-items: center;
  gap: clamp(7px, 1.15vw, 12px);
  overflow: hidden;
}

#result-screen .detail-board-drink-content .detail-board-cup {
  width: 100%;
  height: clamp(77px, 15vw, 145px);
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  clip-path: inset(6px round 18px);
  transform: scale(1.07);
  filter: contrast(1.05) saturate(0.9) sepia(0.06) drop-shadow(0 4px 4px rgba(65, 35, 14, 0.24));
}

#result-screen .detail-board-drink-content strong {
  display: block;
  color: #422718;
  font: 900 clamp(11px, 1.8vw, 18px) / 1.38 "Noto Serif SC", Georgia, serif;
}

#result-screen .detail-board-drink-tags {
  gap: 4px;
  margin-top: clamp(6px, 1vw, 10px);
}

#result-screen .detail-board-drink-tags span {
  padding: 3px 6px;
  background: #dcb777;
  font-size: clamp(6.5px, 1.05vw, 10px);
}

/* Result-scene character browsing and the compact non-result preview. */
#result-screen .scene-character-hotspots,
#result-screen .scene-character-hotspot {
  position: absolute;
}

#result-screen .scene-character-hotspots {
  inset: 0;
  z-index: 4;
}

#result-screen .poster-hotspot-layer::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 2.1%;
  right: 4.1%;
  width: 5.8%;
  aspect-ratio: 1;
  border-radius: 20%;
  background:
    radial-gradient(circle at 58% 42%, rgba(203, 165, 108, 0.32), transparent 48%),
    #a87948;
  box-shadow: 0 0 8px rgba(125, 80, 39, 0.16);
  pointer-events: none;
}

#result-screen .scene-character-hotspot {
  left: var(--hotspot-x);
  top: var(--hotspot-y);
  width: clamp(62px, 14.5%, 136px);
  height: clamp(76px, 18%, 164px);
  padding: 0;
  border: 0;
  border-radius: 44%;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

#result-screen .scene-character-hotspot:hover,
#result-screen .scene-character-hotspot:focus-visible {
  outline: 3px solid rgba(232, 243, 137, 0.94);
  outline-offset: -4px;
  background: rgba(236, 245, 145, 0.12);
}

#result-screen .scene-character-hotspot.is-active {
  box-shadow: inset 0 0 0 3px rgba(231, 241, 141, 0.75);
}

#result-screen .detail-board-actions {
  grid-template-columns: 1fr 1fr;
}

#result-screen .detail-board-actions .detail-board-share {
  grid-column: 1 / -1;
  min-height: clamp(43px, 6.6vw, 62px);
  color: #fff4d5;
  background: linear-gradient(135deg, #7e4a20, #3f2413);
  font-size: clamp(10px, 1.65vw, 15px);
  letter-spacing: 0.08em;
}

#result-screen .forest-detail-board:not(.is-character-preview) .detail-board-portrait img {
  top: 50%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

#result-screen .forest-detail-board.is-character-preview {
  display: block;
  min-height: clamp(420px, 64vw, 610px);
  padding: clamp(18px, 3.5vw, 34px);
}

#result-screen .forest-detail-board.is-character-preview .detail-board-column-right,
#result-screen .forest-detail-board.is-character-preview .detail-board-origin,
#result-screen .forest-detail-board.is-character-preview .detail-board-tags,
#result-screen .forest-detail-board.is-character-preview .detail-board-actions {
  display: none;
}

#result-screen .forest-detail-board.is-character-preview .detail-board-column-left {
  display: block;
}

#result-screen .forest-detail-board.is-character-preview .detail-board-profile {
  width: min(100%, 650px);
  min-height: clamp(370px, 57vw, 540px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(190px, 0.95fr) minmax(220px, 1.05fr);
  grid-template-rows: 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
  padding: clamp(24px, 4vw, 42px);
}

#result-screen .forest-detail-board.is-character-preview .detail-board-portrait {
  grid-column: 1;
  grid-row: 1;
  min-height: clamp(320px, 49vw, 470px);
  overflow: visible;
}

#result-screen .forest-detail-board.is-character-preview .detail-board-portrait img {
  top: 50%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

#result-screen .forest-detail-board.is-character-preview .detail-board-identity {
  grid-column: 2;
  grid-row: 1;
  text-align: left;
}

#result-screen .forest-detail-board.is-character-preview .detail-board-label,
#result-screen .forest-detail-board.is-character-preview .detail-board-profile h2 {
  display: block;
}

#result-screen .forest-detail-board.is-character-preview .detail-board-label::before {
  content: "人物档案 · ";
}

#result-screen .forest-detail-board.is-character-preview .detail-board-profile h2 {
  white-space: normal;
  font-size: clamp(28px, 5.2vw, 52px);
}

#result-screen .forest-detail-board.is-character-preview .detail-board-title {
  margin-top: 12px;
  font-size: clamp(11px, 1.8vw, 16px);
}

#result-screen .forest-detail-board.is-character-preview blockquote {
  margin-top: 18px;
  font-size: clamp(14px, 2.25vw, 21px);
}

@media (max-width: 620px) {
  #result-screen .scene-character-hotspot {
    width: 15.5%;
    height: 19%;
  }

  #result-screen .forest-detail-board.is-character-preview .detail-board-profile {
    grid-template-columns: 44% 56%;
    min-height: 360px;
    padding: 18px 14px;
  }

  #result-screen .forest-detail-board.is-character-preview .detail-board-portrait {
    min-height: 300px;
  }
}
