:root {
  --paper: #F3EEE5;
  --panel: #FAF6EF;
  --ink: #191919;
  --muted: #6E665D;
  --line: #1B1B1B;
  --soft-line: #D6CEC2;
  --accent: #2B8AB8;
  --accent-soft: #D5E9F1;
  --accent-strong: #1F6E96;
  --quiz-accent: #69B9F7;
  --quiz-accent-soft: rgba(105, 185, 247, 0.16);
  --rail: #2B8AB8;
  --shadow: rgba(33, 57, 71, 0.16);
  --bg: #F0EAE0;
  --font-serif: "Noto Serif TC", Georgia, serif;
  --font-sans: "Noto Sans TC", "Helvetica Neue", sans-serif;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-slow: 2.18s;
  --motion-mid: 1.48s;
  --motion-fast: 0.56s;
}

body[data-scene="signal"] {
  --accent: #2B8AB8;
  --accent-soft: #D7EAF2;
  --accent-strong: #1E6D96;
  --rail: #2B8AB8;
  --shadow: rgba(27, 89, 116, 0.16);
}

body[data-scene="petal"] {
  --accent: #D85E7D;
  --accent-soft: #F4DEE4;
  --accent-strong: #B74463;
  --rail: #E65F7D;
  --shadow: rgba(163, 63, 91, 0.16);
}

body[data-scene="cathedral"] {
  --accent: #7D3240;
  --accent-soft: #E8D9DD;
  --accent-strong: #602634;
  --rail: #19534C;
  --shadow: rgba(69, 39, 47, 0.18);
}

body[data-scene="forge"] {
  --accent: #BF5735;
  --accent-soft: #F3E1D6;
  --accent-strong: #A34424;
  --rail: #1F7E76;
  --shadow: rgba(111, 59, 37, 0.18);
}

body[data-scene="parade"] {
  --accent: #4E86C8;
  --accent-soft: #DDE8F7;
  --accent-strong: #2E6AAE;
  --rail: #F28E2B;
  --shadow: rgba(60, 95, 143, 0.16);
}

body[data-scene="shore"] {
  --accent: #2F9B90;
  --accent-soft: #D9ECE8;
  --accent-strong: #247A70;
  --rail: #2F9B90;
  --shadow: rgba(47, 107, 101, 0.16);
}

body[data-scene="archive"] {
  --accent: #6E5C96;
  --accent-soft: #E5DFF1;
  --accent-strong: #56467B;
  --rail: #6F6A64;
  --shadow: rgba(79, 65, 106, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
}

body.lang-gate-open,
body.image-preview-open {
  overflow: hidden;
}

button,
a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rule {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

.rule-dashed {
  border: none;
  border-top: 1px dashed var(--soft-line);
  margin: 20px 0;
}

.rule-double {
  height: 0;
  border-top: 3px double var(--line);
  margin: 12px 0;
}

.anim {
  opacity: 0;
  transform: translateY(22px);
}

.anim.anim-in {
  animation: fade-up var(--motion-slow) var(--motion-ease) forwards;
  animation-delay: calc(var(--d, 0) * 0.22s);
}

.anim-left.anim-in {
  animation-name: fade-left;
}

.anim-right.anim-in {
  animation-name: fade-right;
}

.anim-right-soft.anim-in {
  animation-name: fade-right-soft;
}

.anim-diag-right.anim-in {
  animation-name: fade-diag-right;
}

.glyph {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.42em);
  animation: glyph-in 1.18s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-left {
  from {
    opacity: 0;
    transform: translate3d(-34px, 10px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fade-right {
  from {
    opacity: 0;
    transform: translate3d(34px, 10px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fade-right-soft {
  from {
    opacity: 0;
    transform: translate3d(18px, 0, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fade-diag-right {
  from {
    opacity: 0;
    transform: translate3d(22px, 20px, 0) rotate(-4deg);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
}

@keyframes glyph-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Repeat visits preserve the composition without replaying the full sequence. */
.page.anim-quick .anim.anim-in {
  animation-duration: 0.56s;
  animation-delay: 0s;
}

.page.anim-quick .glyph {
  animation-duration: 0.36s;
  animation-delay: 0s;
}

.page.anim-quick .band-wipe::before,
.page.anim-quick .wipe-badge::after,
.page.anim-quick .wipe-fill::before,
.page.anim-quick .wipe-fill::after {
  animation-duration: 0.72s;
  animation-delay: 0s;
}

.band-wipe {
  overflow: hidden;
}

.band-wipe::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--panel);
  transform: translateX(0);
  animation: band-uncover 2.44s var(--motion-ease) forwards;
  animation-delay: calc(var(--d, 0) * 0.24s + 0.18s);
}

.band-wipe-left::before {
  transform-origin: left center;
}

@keyframes band-uncover {
  0% {
    transform: translateX(0);
  }

  48% {
    transform: translateX(102%);
  }

  100% {
    transform: translateX(102%);
    opacity: 0;
  }
}

.wipe-badge {
  position: relative;
  overflow: hidden;
}

.wipe-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  transform: translateX(-102%);
  animation: badge-frame 2.48s var(--motion-ease) forwards;
  animation-delay: 0.9s;
}

@keyframes badge-frame {
  0% {
    transform: translateX(-102%);
  }

  55% {
    transform: translateX(102%);
  }

  100% {
    transform: translateX(0);
  }
}

.wipe-fill {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.wipe-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--panel);
  transform: translateX(-101%);
  animation: fill-pass 2.56s var(--motion-ease) forwards;
  animation-delay: 0.92s;
  z-index: -1;
}

.wipe-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-101%);
  animation: fill-return 2.56s var(--motion-ease) forwards;
  animation-delay: 1.42s;
  z-index: -1;
}

.wipe-fill.wipe-fill-ghost::after {
  background: var(--panel);
}

.wipe-fill > * {
  position: relative;
  z-index: 1;
}

@keyframes fill-pass {
  0% {
    transform: translateX(-101%);
  }

  48% {
    transform: translateX(104%);
  }

  100% {
    transform: translateX(104%);
  }
}

@keyframes fill-return {
  0%,
  38% {
    transform: translateX(104%);
  }

  100% {
    transform: translateX(0);
  }
}

.lang-control {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
}

.lang-select {
  min-width: 92px;
  height: 40px;
  padding: 0 36px 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 1px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23191919' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.lang-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 86px 20px 28px;
  background: rgba(243, 238, 229, 0.96);
  backdrop-filter: blur(10px);
  transition: opacity 1.2s ease, visibility 1.2s ease;
}

.lang-gate.is-dismissing,
.lang-gate.is-hidden {
  opacity: 0;
}

.lang-gate.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.lang-gate-panel {
  width: min(100%, 660px);
  padding: 28px 24px 22px;
  text-align: center;
}

.lang-gate-kicker,
.lang-gate-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.lang-gate-title {
  margin: 12px 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}

.lang-gate-subtitle {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.lang-gate-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.lang-gate-button {
  min-height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background-color 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.lang-gate-button:hover,
.lang-gate-button.is-current {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.lang-guide-toast {
  position: fixed;
  top: 68px;
  right: 16px;
  z-index: 39;
  max-width: min(240px, calc(100vw - 32px));
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.36s ease, transform 0.36s ease;
}

.lang-guide-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 34;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
}

.page-transition.is-active {
  opacity: 1;
}

.page-transition-slice,
.page-transition-line {
  position: absolute;
  inset: auto;
}

.page-transition-slice {
  top: -18%;
  bottom: -18%;
  width: 42%;
  background:
    linear-gradient(180deg, rgba(250, 246, 239, 0.96), rgba(243, 238, 229, 0.98)),
    var(--paper);
  border-right: 1.5px solid rgba(25, 25, 25, 0.16);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28) inset;
  opacity: 0;
}

.page-transition-slice-a {
  left: -48%;
  transform: skewX(-18deg);
}

.page-transition-slice-b {
  width: 32%;
  left: -34%;
  background:
    linear-gradient(180deg, rgba(215, 234, 242, 0.26), rgba(243, 238, 229, 0.96)),
    var(--paper);
  transform: skewX(-14deg);
}

.page-transition-slice-c {
  width: 18%;
  right: -24%;
  background: rgba(25, 25, 25, 0.94);
  border-right: none;
  box-shadow: none;
  transform: skewX(-12deg);
}

.page-transition-line {
  height: 1.5px;
  background: var(--line);
  opacity: 0;
  transform-origin: left center;
}

.page-transition-line-a {
  top: 26%;
  left: -12%;
  width: 48%;
  transform: rotate(-16deg) scaleX(0);
}

.page-transition-line-b {
  right: -10%;
  bottom: 24%;
  width: 38%;
  transform: rotate(-10deg) scaleX(0);
}

.page-transition.is-active .page-transition-slice-a {
  animation: transition-slice-a 1.34s var(--motion-ease) forwards;
}

.page-transition.is-active .page-transition-slice-b {
  animation: transition-slice-b 1.44s var(--motion-ease) forwards;
}

.page-transition.is-active .page-transition-slice-c {
  animation: transition-slice-c 1.2s var(--motion-ease) forwards;
}

.page-transition.is-active .page-transition-line-a {
  animation: transition-line-a 1.08s var(--motion-ease) forwards;
}

.page-transition.is-active .page-transition-line-b {
  animation: transition-line-b 1.12s var(--motion-ease) forwards;
}

.page-transition[data-direction="back"] {
  transform: scaleX(-1);
}

@keyframes transition-slice-a {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) skewX(-18deg);
  }

  18% {
    opacity: 1;
  }

  52% {
    opacity: 1;
    transform: translate3d(168%, 0, 0) skewX(-18deg);
  }

  100% {
    opacity: 0;
    transform: translate3d(244%, 0, 0) skewX(-18deg);
  }
}

@keyframes transition-slice-b {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) skewX(-14deg);
  }

  24% {
    opacity: 0.92;
  }

  62% {
    opacity: 0.92;
    transform: translate3d(232%, 0, 0) skewX(-14deg);
  }

  100% {
    opacity: 0;
    transform: translate3d(314%, 0, 0) skewX(-14deg);
  }
}

@keyframes transition-slice-c {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) skewX(-12deg);
  }

  24% {
    opacity: 1;
  }

  62% {
    opacity: 1;
    transform: translate3d(-164%, 0, 0) skewX(-12deg);
  }

  100% {
    opacity: 0;
    transform: translate3d(-240%, 0, 0) skewX(-12deg);
  }
}

@keyframes transition-line-a {
  0% {
    opacity: 0;
    transform: rotate(-16deg) scaleX(0);
  }

  40% {
    opacity: 0.78;
    transform: rotate(-16deg) scaleX(1);
  }

  100% {
    opacity: 0;
    transform: rotate(-16deg) scaleX(1.18);
  }
}

@keyframes transition-line-b {
  0% {
    opacity: 0;
    transform: rotate(-10deg) scaleX(0);
  }

  46% {
    opacity: 0.34;
    transform: rotate(-10deg) scaleX(1);
  }

  100% {
    opacity: 0;
    transform: rotate(-10deg) scaleX(1.12);
  }
}

.page {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  justify-content: center;
  align-items: center;
  padding: 16px 0 20px;
}

.page.active {
  display: flex;
}

.route-frame {
  position: relative;
  width: min(calc(100vw - 30px), 1220px);
  min-height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1.5px solid var(--line);
  box-shadow: 0 22px 60px var(--shadow);
  overflow: hidden;
}

.route-frame::after {
  content: "";
  position: absolute;
  inset: 52px 0 36px;
  background:
    linear-gradient(118deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 86% 24%, rgba(255, 255, 255, 0.18), transparent 28%),
    radial-gradient(circle at 12% 72%, rgba(0, 0, 0, 0.03), transparent 34%);
  pointer-events: none;
}

.paper-masthead {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 52px;
  padding: 0 20px;
  background: rgba(25, 25, 25, 0.98);
  color: #F7F1EA;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}

.masthead-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

.masthead-home-link {
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid currentColor;
}

.masthead-home-link:hover {
  opacity: 0.72;
}

.masthead-home-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.masthead-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.masthead-volume,
.masthead-date,
.masthead-route {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.masthead-date {
  text-align: right;
}

.page-surface {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(transparent 0, transparent calc(100% - 1px), rgba(0, 0, 0, 0.02) calc(100% - 1px), rgba(0, 0, 0, 0.02) 100%);
}

.page-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(-24deg, rgba(0, 0, 0, 0.02) 0 2px, transparent 2px 34px);
  opacity: 0.4;
  pointer-events: none;
}

.vertical-band {
  position: absolute;
  top: 52px;
  left: 0;
  bottom: 36px;
  width: 72px;
  background: var(--rail);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: #fff;
}

.vertical-band span {
  writing-mode: vertical-rl;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
}

.surface-grid {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: start;
  grid-template-columns: minmax(460px, 0.98fr) minmax(420px, 1.02fr);
  grid-template-areas:
    "hero covers"
    "summary covers"
    "actions covers";
  gap: 24px 28px;
  padding: 70px 42px 40px 108px;
  min-height: 720px;
}

body[data-layout="stack"] .surface-grid {
  grid-template-areas:
    "hero covers"
    "summary covers"
    "actions covers";
}

body[data-layout="asym"] .surface-grid {
  grid-template-columns: minmax(460px, 0.98fr) minmax(420px, 1.02fr);
  grid-template-areas:
    "hero covers"
    "summary covers"
    "actions covers";
}

.corner-lines,
.surface-diagonal,
.surface-thread {
  position: absolute;
  pointer-events: none;
}

.corner-lines {
  top: 26px;
  left: 120px;
  width: 220px;
  height: 90px;
}

.corner-lines::before,
.corner-lines::after {
  content: "";
  position: absolute;
  left: 0;
  height: 3px;
  background: var(--line);
  transform-origin: left center;
  animation: line-in-left 1.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.corner-lines::before {
  top: 0;
  width: 162px;
  transform: rotate(-18deg) scaleX(0);
}

.corner-lines::after {
  top: 30px;
  width: 138px;
  transform: rotate(-18deg) scaleX(0);
  animation-delay: 0.18s;
}

.surface-diagonal {
  top: 114px;
  right: 52px;
  width: 132px;
  height: 26px;
  border: 1.5px solid var(--line);
  transform: rotate(-8deg);
  opacity: 0.6;
}

.surface-thread {
  height: 1.5px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.22));
  opacity: 0;
  transform-origin: left center;
}

.surface-thread::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--line);
  background: var(--panel);
  transform: translateY(-50%) rotate(45deg);
}

.surface-thread.anim {
  transform: scaleX(0) rotate(var(--thread-rot, 0deg));
}

.surface-thread.anim.anim-in {
  animation: surface-thread-in 2.08s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--d, 0) * 0.24s + 0.28s);
}

.surface-thread-a {
  top: 248px;
  left: 30%;
  width: 52%;
  --thread-rot: 6deg;
}

.surface-thread-b {
  top: 468px;
  left: 18%;
  width: 58%;
  --thread-rot: -5deg;
}

@keyframes surface-thread-in {
  from {
    opacity: 0;
    transform: scaleX(0) rotate(var(--thread-rot, 0deg));
  }

  to {
    opacity: 0.38;
    transform: scaleX(1) rotate(var(--thread-rot, 0deg));
  }
}

@keyframes line-in-left {
  to {
    transform: rotate(-18deg) scaleX(1);
  }
}

.home-hero {
  grid-area: hero;
  max-width: none;
  position: relative;
  z-index: 3;
  padding-top: 8px;
}

.editorial-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 144px;
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  background: var(--line);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.home-title {
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
}

.home-title-primary,
.home-title-secondary {
  display: block;
  font-family: var(--font-serif);
  font-weight: 900;
  line-height: 0.92;
  text-wrap: balance;
}

.home-title-primary {
  font-size: clamp(3.6rem, 6vw, 6.2rem);
}

.home-title-secondary {
  font-size: clamp(2.8rem, 4.8vw, 4.9rem);
  color: var(--accent);
  transform: translateX(12px) rotate(-7deg);
}

.home-subtitle {
  margin: 0;
  max-width: 31rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.26rem);
  line-height: 1.9;
  text-wrap: balance;
}

.home-summary-card {
  grid-area: summary;
  position: relative;
  justify-self: start;
  align-self: start;
  margin-top: 0;
  width: min(100%, 420px);
  min-height: auto;
  height: fit-content;
  padding: 28px 24px 28px;
  border: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(250, 246, 239, 0.96)),
    rgba(250, 246, 239, 0.92);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(7px);
  z-index: 4;
}

.home-summary-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

.home-summary-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 132px;
  height: 1.5px;
  background: var(--accent);
}

.home-summary-card .repo-link-inline {
  position: relative;
}

.home-summary-card .repo-link-inline::before {
  content: "";
  position: absolute;
  right: -18px;
  top: 50%;
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, rgba(27, 27, 27, 0.24), rgba(27, 27, 27, 0));
  transform: translateY(-50%);
}

.summary-kicker {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.summary-scene {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.04;
}

.summary-deck {
  margin-top: 12px;
  color: var(--accent-strong);
  font-size: 13px;
  letter-spacing: 1px;
}

.summary-note,
.summary-spotlight-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.88;
}

.summary-spectrum {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding-right: 18px;
}

.summary-spectrum-key {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px 0 16px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  transform: skewX(-14deg);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.05);
}

.summary-spectrum-key:nth-child(2) {
  background: var(--accent-soft);
  transform: translateX(12px) skewX(-14deg);
}

.summary-spectrum-key:nth-child(3) {
  transform: translateX(28px) skewX(-14deg);
}

.summary-spectrum-key::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--line);
  transform: translateY(-50%) skewX(14deg);
}

.summary-divider {
  height: 1px;
  margin: 18px 0 16px;
  background: var(--soft-line);
}

.summary-spotlight-label,
.repo-link-inline-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.summary-spotlight-name {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  line-height: 1.18;
}

.summary-spotlight-meta {
  margin-top: 10px;
  color: var(--accent-strong);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.home-meta-url,
.repo-link-inline-value {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
}

.repo-link-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.home-cover-stage {
  grid-area: covers;
  position: relative;
  min-height: 610px;
  margin: -18px -2% 0 -8%;
  overflow: visible;
}

.home-cover-stage::before {
  content: "";
  position: absolute;
  top: 54px;
  left: 10%;
  width: 82%;
  height: 78%;
  border: 1.5px solid rgba(27, 27, 27, 0.2);
  clip-path: polygon(0 0, 100% 0, 100% 86%, 86% 100%, 0 100%);
  pointer-events: none;
}

.home-cover-stage::after {
  content: "";
  position: absolute;
  right: 2%;
  top: 22px;
  width: 108px;
  height: 108px;
  border-top: 1.5px solid var(--line);
  border-right: 1.5px solid var(--line);
  opacity: 0.28;
  pointer-events: none;
}

.stage-thread {
  position: absolute;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.08));
  opacity: 0.28;
  transform-origin: left center;
  animation: stage-thread-in 2.14s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.stage-thread::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 8px;
  height: 8px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}

@keyframes stage-thread-in {
  from {
    opacity: 0;
    transform: scaleX(0) rotate(var(--line-rot, 0deg));
  }

  to {
    opacity: 0.28;
    transform: scaleX(1) rotate(var(--line-rot, 0deg));
  }
}

.cover-panel {
  position: absolute;
  z-index: 2;
  transition:
    top 1.58s cubic-bezier(0.22, 1, 0.36, 1),
    left 1.58s cubic-bezier(0.22, 1, 0.36, 1),
    right 1.58s cubic-bezier(0.22, 1, 0.36, 1),
    bottom 1.58s cubic-bezier(0.22, 1, 0.36, 1),
    width 1.58s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.58s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 1.16s ease;
}

.cover-panel-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: rgba(246, 240, 232, 0.94);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.14);
}

.cover-panel::before {
  content: "";
  position: absolute;
  inset: auto auto -12px 20px;
  width: 44%;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), rgba(43, 138, 184, 0));
  z-index: 3;
}

.cover-panel-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.36);
  pointer-events: none;
}

.cover-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #F6F0E8;
}

.cover-panel-caption {
  position: absolute;
  left: 0;
  bottom: -34px;
  max-width: min(100%, 320px);
  min-height: 30px;
  padding: 7px 12px 6px;
  border: 1.5px solid var(--line);
  background: rgba(250, 246, 239, 0.94);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

body[data-compose="ribbon"] .cover-panel-a {
  top: 10px;
  left: -16%;
  width: 82%;
  transform: rotate(-7deg);
}

body[data-compose="ribbon"] .cover-panel-b {
  top: 148px;
  right: 2%;
  width: 68%;
  transform: rotate(6deg);
}

body[data-compose="ribbon"] .cover-panel-c {
  bottom: 126px;
  left: 8%;
  width: 58%;
  transform: rotate(-3deg);
}

body[data-compose="ribbon"] .cover-panel-d {
  bottom: 24px;
  right: 10%;
  width: 44%;
  transform: rotate(3deg);
}

body[data-compose="hinge"] .cover-panel-a {
  top: 0;
  left: -8%;
  width: 70%;
  transform: rotate(-10deg);
}

body[data-compose="hinge"] .cover-panel-b {
  top: 180px;
  right: -2%;
  width: 76%;
  transform: rotate(7deg);
}

body[data-compose="hinge"] .cover-panel-c {
  bottom: 120px;
  left: 12%;
  width: 50%;
  transform: rotate(-5deg);
}

body[data-compose="hinge"] .cover-panel-d {
  top: 62px;
  right: 12%;
  width: 38%;
  transform: rotate(2deg);
}

body[data-compose="cascade"] .cover-panel-a {
  top: 18px;
  left: -10%;
  width: 72%;
  transform: rotate(-5deg);
}

body[data-compose="cascade"] .cover-panel-b {
  top: 122px;
  right: 0;
  width: 62%;
  transform: rotate(8deg);
}

body[data-compose="cascade"] .cover-panel-c {
  bottom: 134px;
  left: 2%;
  width: 70%;
  transform: rotate(-2deg);
}

body[data-compose="cascade"] .cover-panel-d {
  bottom: 16px;
  right: 8%;
  width: 40%;
  transform: rotate(4deg);
}

body[data-compose="ledger"] .cover-panel-a {
  top: 8px;
  left: -6%;
  width: 74%;
  transform: rotate(-4deg);
}

body[data-compose="ledger"] .cover-panel-b {
  top: 166px;
  right: -2%;
  width: 84%;
  transform: rotate(4deg);
}

body[data-compose="ledger"] .cover-panel-c {
  bottom: 116px;
  left: 18%;
  width: 48%;
  transform: rotate(-6deg);
}

body[data-compose="ledger"] .cover-panel-d {
  bottom: 20px;
  right: 10%;
  width: 52%;
  transform: rotate(2deg);
}

body[data-compose="crossfade"] .cover-panel-a {
  top: 6px;
  left: -14%;
  width: 76%;
  transform: rotate(-9deg);
}

body[data-compose="crossfade"] .cover-panel-b {
  top: 96px;
  right: 4%;
  width: 56%;
  transform: rotate(10deg);
}

body[data-compose="crossfade"] .cover-panel-c {
  bottom: 132px;
  left: 6%;
  width: 74%;
  transform: rotate(-1deg);
}

body[data-compose="crossfade"] .cover-panel-d {
  bottom: 24px;
  right: -2%;
  width: 46%;
  transform: rotate(6deg);
}

body[data-compose="ribbon"] .stage-thread-a {
  top: 124px;
  left: 10%;
  width: 72%;
  --line-rot: 8deg;
}

body[data-compose="ribbon"] .stage-thread-b {
  top: 278px;
  left: 26%;
  width: 54%;
  --line-rot: -4deg;
}

body[data-compose="ribbon"] .stage-thread-c {
  top: 412px;
  left: 0;
  width: 62%;
  --line-rot: 3deg;
}

body[data-compose="hinge"] .stage-thread-a {
  top: 72px;
  left: 18%;
  width: 48%;
  --line-rot: -10deg;
}

body[data-compose="hinge"] .stage-thread-b {
  top: 238px;
  left: 8%;
  width: 72%;
  --line-rot: 6deg;
}

body[data-compose="hinge"] .stage-thread-c {
  top: 408px;
  left: 20%;
  width: 42%;
  --line-rot: -4deg;
}

body[data-compose="cascade"] .stage-thread-a {
  top: 96px;
  left: 12%;
  width: 64%;
  --line-rot: -6deg;
}

body[data-compose="cascade"] .stage-thread-b {
  top: 248px;
  left: 30%;
  width: 50%;
  --line-rot: 9deg;
}

body[data-compose="cascade"] .stage-thread-c {
  top: 394px;
  left: 6%;
  width: 66%;
  --line-rot: -1deg;
}

body[data-compose="ledger"] .stage-thread-a {
  top: 116px;
  left: 4%;
  width: 84%;
  --line-rot: 2deg;
}

body[data-compose="ledger"] .stage-thread-b {
  top: 286px;
  left: 22%;
  width: 58%;
  --line-rot: -6deg;
}

body[data-compose="ledger"] .stage-thread-c {
  top: 438px;
  left: 10%;
  width: 46%;
  --line-rot: 4deg;
}

body[data-compose="crossfade"] .stage-thread-a {
  top: 98px;
  left: 12%;
  width: 56%;
  --line-rot: -9deg;
}

body[data-compose="crossfade"] .stage-thread-b {
  top: 232px;
  left: 34%;
  width: 48%;
  --line-rot: 11deg;
}

body[data-compose="crossfade"] .stage-thread-c {
  top: 404px;
  left: 2%;
  width: 76%;
  --line-rot: -2deg;
}

.home-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  position: relative;
  z-index: 4;
  margin-top: 0;
}

.btn-primary,
.btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 216px;
  min-height: 58px;
  padding: 0 24px;
  border: 1.5px solid var(--line);
  border-radius: 0;
  background: var(--line);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  z-index: 0;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.btn-secondary {
  background: var(--panel);
  color: var(--ink);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.56;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.home-watermark {
  position: absolute;
  right: 36px;
  top: 102px;
  font-family: var(--font-serif);
  font-size: clamp(4rem, 11vw, 9rem);
  font-weight: 900;
  line-height: 0.86;
  color: rgba(0, 0, 0, 0.05);
  text-align: right;
  writing-mode: vertical-rl;
  pointer-events: none;
}

.home-scroll-hint {
  position: absolute;
  right: 24px;
  bottom: 26px;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid rgba(27, 27, 27, 0.34);
  background: rgba(250, 246, 239, 0.94);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 2px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(6px);
}

.home-scroll-hint.is-mobile-visible {
  display: inline-flex;
}

.home-scroll-line {
  width: 44px;
  height: 1px;
  background: var(--line);
}

.home-scroll-arrow {
  width: 11px;
  height: 11px;
  border-right: 1.5px solid var(--line);
  border-bottom: 1.5px solid var(--line);
  transform: rotate(45deg);
  animation: scroll-arrow 1.6s ease-in-out infinite;
}

@keyframes scroll-arrow {
  0%,
  100% {
    transform: rotate(45deg) translate(0, 0);
  }

  50% {
    transform: rotate(45deg) translate(4px, 4px);
  }
}

.poster-band {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 16px 0 14px;
  border-top: 1.5px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)),
    repeating-linear-gradient(90deg, transparent 0 84px, rgba(0, 0, 0, 0.03) 84px 85px);
  overflow: hidden;
}

.poster-band::before,
.poster-band::after {
  content: "";
  position: absolute;
  left: 72px;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(27, 27, 27, 0), rgba(27, 27, 27, 0.28), rgba(27, 27, 27, 0));
  pointer-events: none;
}

.poster-band::before {
  top: 8px;
}

.poster-band::after {
  bottom: 6px;
}

.poster-marquee {
  overflow: visible;
}

.poster-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: track-left 88s linear infinite;
  --loop-shift: -1200px;
}

.poster-track[data-direction="right"] {
  animation-name: track-right;
  animation-duration: 96s;
}

.poster-group {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding-right: 12px;
}

.poster-item {
  height: 96px;
  width: auto;
  flex-shrink: 0;
  border: 1.5px solid var(--line);
  background: #F6F0E8;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
  transform: translateY(var(--poster-lift, 0));
}

.poster-group .poster-item:nth-child(odd) {
  --poster-lift: 4px;
}

.poster-group .poster-item:nth-child(3n) {
  --poster-lift: -2px;
}

.poster-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes track-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(var(--loop-shift));
  }
}

@keyframes track-right {
  from {
    transform: translateX(var(--loop-shift));
  }

  to {
    transform: translateX(0);
  }
}

.paper-footer {
  position: relative;
  z-index: 1;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 20px 0 86px;
  border-top: 1.5px solid var(--line);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.paper-footer-dot {
  color: var(--accent);
}

.quiz-layout,
.result-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  gap: 30px;
  padding: 48px 42px 38px 108px;
}

.quiz-aside,
.result-side {
  position: relative;
  border: 1.5px solid var(--line);
  background: rgba(250, 246, 239, 0.9);
  padding: 24px 22px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.06);
}

.quiz-aside::before,
.result-side::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 62px;
  height: 1.5px;
  background: var(--accent);
}

.result-side::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: 1.5px;
  background: rgba(25, 25, 25, 0.14);
}

.quiz-q-mark {
  font-family: var(--font-serif);
  font-size: clamp(3.3rem, 9vw, 5.5rem);
  line-height: 0.86;
}

.quiz-progress-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.quiz-progress-caption {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.quiz-progress-text {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.quiz-prev {
  width: 100%;
  margin-top: 16px;
}

.quiz-progress-bar {
  height: 18px;
  margin-top: 18px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
}

.quiz-progress-fill {
  width: 0;
  height: 100%;
  background: var(--quiz-accent);
  transition: width 0.34s ease;
}

.quiz-scene-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--soft-line);
}

.quiz-scene-label {
  font-family: var(--font-serif);
  font-size: 1.4rem;
}

.quiz-scene-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.quiz-scene-cover {
  margin-top: 16px;
  border: 1.5px solid var(--line);
  background: #F6F0E8;
  overflow: hidden;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.08);
}

.quiz-scene-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quiz-stage {
  min-width: 0;
  position: relative;
}

.quiz-stage-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 -16px 34px;
  padding: 12px 18px 14px;
  border: 1.5px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.48), rgba(250, 246, 239, 0.82)),
    rgba(250, 246, 239, 0.92);
  clip-path: polygon(0 0, 100% 0, calc(100% - 28px) 100%, 0 100%);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.06);
  z-index: 3;
}

.quiz-stage-head::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 50%;
  width: 34px;
  height: 1.5px;
  background: var(--line);
  transform: translateY(-50%);
}

.quiz-stage-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  background: var(--accent-soft);
  font-size: 12px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  transform: skewX(-14deg);
}

.quiz-stage-deck {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
  line-height: 1.7;
}

.quiz-body {
  position: relative;
  border: 1.5px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.04)),
    rgba(250, 246, 239, 0.94);
  padding: 46px 30px 32px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.06);
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.quiz-body::before {
  content: "";
  position: absolute;
  top: 24px;
  right: -14px;
  width: 118px;
  height: 1.5px;
  background: var(--line);
  transform: rotate(-8deg);
}

.quiz-body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(243, 238, 229, 0) 0%, rgba(243, 238, 229, 0.94) 42%, rgba(243, 238, 229, 0.98) 100%);
  transform: translateX(-102%);
  pointer-events: none;
  opacity: 0;
}

.quiz-body.is-transitioning {
  opacity: 0;
  transform: translateY(18px);
}

.quiz-body.is-transitioning::after {
  opacity: 1;
  animation: quiz-body-wipe 0.5s var(--motion-ease) forwards;
}

.quiz-question {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.36;
}

.quiz-options {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.quiz-option {
  width: 100%;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 20px 22px;
  border: 1.5px solid var(--line);
  background: rgba(250, 246, 239, 0.84);
  color: var(--ink);
  text-align: left;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.72;
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  animation: quiz-option-in var(--motion-fast) var(--motion-ease) forwards;
  animation-delay: calc(var(--option-index, 0) * 0.07s + 0.06s);
  transition: background-color 0.24s ease, color 0.24s ease, border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.quiz-option:hover:not(:disabled) {
  transform: translateX(6px) translateY(-1px);
  box-shadow: 0 12px 22px rgba(40, 73, 96, 0.08);
}

.quiz-option.selected {
  border-color: #4EA9F3;
  background:
    linear-gradient(90deg, rgba(105, 185, 247, 0.18), rgba(105, 185, 247, 0.06)),
    #F4FBFF;
  color: #0E3E65;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1;
}

.quiz-option.selected .quiz-option-label {
  border-color: #4EA9F3;
  background: rgba(105, 185, 247, 0.14);
}

.quiz-option-text {
  min-width: 0;
}

@keyframes quiz-body-wipe {
  from {
    transform: translateX(-102%);
  }

  to {
    transform: translateX(102%);
  }
}

@keyframes quiz-option-in {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.result-main {
  min-width: 0;
  padding-right: 8px;
  position: relative;
}

.result-main::before {
  content: "";
  position: absolute;
  top: 92px;
  left: 18px;
  width: min(62%, 420px);
  height: 1.5px;
  background: var(--line);
  transform: rotate(-6deg);
}

.result-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.result-match-strip {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 18px 0 0;
  padding: 10px 16px 10px 18px;
  border: 1.5px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(250, 246, 239, 0.88)),
    rgba(250, 246, 239, 0.92);
  clip-path: polygon(16px 0, 100% 0, calc(100% - 18px) 100%, 0 100%, 0 14px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.06);
}

.result-match-label,
.result-match-count,
.result-preference-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.result-match-scene {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.result-cover-panel {
  position: relative;
  margin: 28px 0 8px;
  padding: 10px 0 0 24px;
}

.result-cover-panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  width: 110px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent), rgba(0, 0, 0, 0));
}

.result-cover-panel::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 24px;
  width: 96px;
  height: 1.5px;
  background: rgba(25, 25, 25, 0.24);
  transform: rotate(-18deg);
}

.result-img-wrap {
  position: relative;
  width: min(100%, 640px);
  padding: 10px;
  border: 1.5px solid var(--line);
  background: #F6F0E8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.12);
}

.result-img-wrap[data-orientation="portrait"] {
  width: min(100%, 360px);
}

.result-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity 0.42s ease;
}

.result-img-wrap img.is-loaded {
  opacity: 1;
}

.result-img-placeholder {
  position: absolute;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: opacity 0.28s ease;
}

.result-img-placeholder.is-hidden {
  opacity: 0;
}

.result-scene-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 12px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  background: var(--accent-soft);
  font-size: 13px;
  letter-spacing: 1px;
  transform: skewX(-14deg);
}

.result-game-name {
  margin: 20px 0 0;
  max-width: 13ch;
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5.5vw, 4.8rem);
  line-height: 1.06;
  text-wrap: balance;
}

.result-game-original {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.3px;
}

.result-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.result-meta-pill {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  font-size: 13px;
  line-height: 1.5;
}

.result-meta-pill strong {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.result-description {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.96;
}

.result-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.result-note-card {
  min-width: 0;
  padding: 12px 12px 10px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.46);
}

.result-note-label,
.result-brief-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.result-note-value {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.78;
}

.result-brief-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.result-brief-block {
  padding: 14px 14px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.34);
}

.result-brief-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.82;
}

.result-preference-strip {
  margin-top: 20px;
}

.result-preference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.result-preference-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  letter-spacing: 1px;
}

.result-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.result-keywords span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  letter-spacing: 1px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn-result {
  min-width: 180px;
}

.result-side-heading,
.result-section-label {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.result-traits {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.trait-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.trait-label,
.trait-value {
  font-size: 13px;
}

.trait-value {
  text-align: right;
  color: var(--accent-strong);
}

.trait-bar {
  height: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.trait-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

.result-section {
  margin-top: 18px;
}

.result-section-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.result-section-item {
  padding: 12px 12px 10px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.44);
}

.result-section-item-name {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.24;
}

.result-section-item-why {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.result-qr-block {
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 20px;
  padding: 16px 14px 0 0;
  border-top: 1px solid var(--soft-line);
}

.result-qr-code {
  width: 102px;
  height: 102px;
  border: 1.5px solid var(--line);
  background: #fff;
}

.result-qr-code > img,
.result-qr-code > canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.result-qr-meta {
  min-width: 0;
}

.result-qr-label {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.result-qr-url {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.72;
  word-break: break-all;
}

.repo-link-inline-side {
  margin-top: 18px;
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
}

.image-preview-panel {
  position: relative;
  width: min(calc(100vw - 24px), 1080px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: 12px auto;
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--line);
  background: var(--panel);
}

.image-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1.5px solid var(--line);
}

.image-preview-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.image-preview-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.image-preview-close {
  min-width: 108px;
  min-height: 42px;
  border: 1.5px solid var(--line);
  background: var(--panel);
  cursor: pointer;
}

.image-preview-body {
  padding: 12px;
  overflow: auto;
}

.image-preview-body img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 640px) {
}

.lang-fly-chip {
  position: fixed;
  z-index: 45;
  min-width: 92px;
  min-height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 1px;
  transform: translate(-50%, -50%);
  transition: transform 1.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 1.28s ease;
}

.result-frame.is-exporting {
  width: min(calc(100vw - 18px), 1220px) !important;
  min-height: auto !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.result-frame.is-exporting * {
  transition: none !important;
}

.result-frame.is-exporting .anim,
.result-frame.is-exporting .glyph,
.result-frame.is-exporting .result-main,
.result-frame.is-exporting .result-side,
.result-frame.is-exporting .result-cover-panel,
.result-frame.is-exporting .result-img-wrap img,
.result-frame.is-exporting .result-game-name,
.result-frame.is-exporting .result-side::before,
.result-frame.is-exporting .result-side::after,
.result-frame.is-exporting .result-main::before,
.result-frame.is-exporting .result-cover-panel::before,
.result-frame.is-exporting .result-cover-panel::after {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

.result-frame.is-exporting .glyph {
  display: inline-block;
}

.result-frame.is-exporting .trait-fill {
  animation: none !important;
}

.result-frame.is-exporting .result-img-wrap img {
  opacity: 1 !important;
}

.result-frame.is-exporting .result-img-placeholder {
  opacity: 0 !important;
}

.result-frame.is-exporting [data-export-hidden="true"],
.result-frame.is-exporting .poster-band-result {
  display: none !important;
}

.result-frame.is-exporting .page-surface {
  padding-bottom: 0 !important;
  background: #F3EEE5 !important;
}

.result-frame.is-exporting .result-side,
.result-frame.is-exporting .result-match-strip,
.result-frame.is-exporting .result-meta-pill,
.result-frame.is-exporting .result-note-card,
.result-frame.is-exporting .result-brief-block,
.result-frame.is-exporting .result-preference-tags span,
.result-frame.is-exporting .result-keywords span,
.result-frame.is-exporting .result-section-item,
.result-frame.is-exporting .result-qr-block {
  background: #FBF8F2 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.result-frame.is-exporting .result-match-strip {
  clip-path: none !important;
  -webkit-clip-path: none !important;
}

.result-frame.is-exporting .result-match-label,
.result-frame.is-exporting .result-match-count,
.result-frame.is-exporting .result-game-original,
.result-frame.is-exporting .result-note-label,
.result-frame.is-exporting .result-brief-label,
.result-frame.is-exporting .result-brief-text,
.result-frame.is-exporting .result-section-label,
.result-frame.is-exporting .result-section-item-why,
.result-frame.is-exporting .result-side-heading,
.result-frame.is-exporting .result-qr-label,
.result-frame.is-exporting .result-qr-url,
.result-frame.is-exporting .repo-link-inline-label,
.result-frame.is-exporting .repo-link-inline-value {
  color: #564F45 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #564F45 !important;
}

.result-frame.is-exporting .result-match-scene,
.result-frame.is-exporting .trait-value {
  opacity: 1 !important;
  -webkit-text-fill-color: currentColor !important;
}

body[data-layout="stack"] .home-title-secondary {
  transform: translateX(16px) rotate(-5deg);
}

body[data-layout="asym"] .home-title {
  max-width: 520px;
}

body[data-layout="asym"] .home-summary-card {
  align-self: start;
}

@media (max-width: 1480px) {
  .surface-grid,
  body[data-layout="stack"] .surface-grid,
  body[data-layout="asym"] .surface-grid {
    grid-template-columns: minmax(420px, 0.98fr) minmax(380px, 1.02fr);
    grid-template-areas:
      "hero covers"
      "summary covers"
      "actions covers";
    gap: 24px 28px;
    min-height: 720px;
  }

  .home-summary-card {
    margin-top: 0;
    width: min(100%, 420px);
  }

  .home-cover-stage {
    min-height: 560px;
    margin: 0 0 0 -2%;
  }

  .home-actions {
    margin-top: 0;
  }

  .home-watermark {
    right: 18px;
    top: 142px;
    font-size: clamp(4rem, 8vw, 6.8rem);
  }

  .summary-spotlight-name {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  }
}

@media (max-width: 1040px) {
  .route-frame {
    width: min(calc(100vw - 18px), 1220px);
  }

  .surface-grid,
  .quiz-layout,
  .result-layout {
    padding-right: 22px;
  }

  .home-cover-stage {
    margin-left: -2%;
  }
}

@media (max-width: 860px) {
  .page {
    padding: 0;
  }

  .route-frame {
    width: 100%;
    min-height: 100dvh;
    border-left: none;
    border-right: none;
  }

  .paper-masthead {
    grid-template-columns: auto 1fr auto;
    padding: 0 14px;
  }

  .brand-lockup {
    font-size: 12px;
  }

  .masthead-volume,
  .masthead-date,
  .masthead-route {
    font-size: 10px;
    letter-spacing: 1.4px;
  }

  .masthead-home-link {
    font-size: 8px;
    letter-spacing: 0.9px;
  }

  .vertical-band {
    width: 56px;
    bottom: 36px;
  }

  .vertical-band span {
    font-size: 12px;
  }

  .surface-grid,
  body[data-layout="stack"] .surface-grid,
  body[data-layout="asym"] .surface-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "actions"
      "summary"
      "covers";
    gap: 18px;
    padding: 28px 16px 30px 72px;
    min-height: auto;
  }

  .corner-lines {
    top: 18px;
    left: 76px;
    width: 160px;
  }

  .surface-diagonal {
    top: 92px;
    right: 18px;
    width: 98px;
  }

  .surface-thread {
    display: none;
  }

  .home-watermark {
    right: 14px;
    top: 144px;
    font-size: 5.4rem;
  }

  .home-cover-stage {
    min-height: 324px;
    margin: 14px 0 0 -12px;
  }

  .cover-panel {
    transition-duration: 1.12s;
  }

  .cover-panel-caption {
    bottom: -30px;
    max-width: 72%;
    padding: 6px 10px 5px;
    font-size: 10px;
  }

  .cover-panel-a,
  .cover-panel-b,
  .cover-panel-c,
  .cover-panel-d {
    right: auto;
    bottom: auto;
  }

  body[data-compose] .cover-panel-a {
    top: 0;
    left: -6%;
    width: 82%;
    transform: rotate(-5deg);
  }

  body[data-compose] .cover-panel-b {
    top: 94px;
    left: 22%;
    width: 68%;
    transform: rotate(6deg);
  }

  body[data-compose] .cover-panel-c {
    top: 172px;
    left: 4%;
    width: 74%;
    transform: rotate(-2deg);
  }

  body[data-compose] .cover-panel-d {
    top: 228px;
    left: 38%;
    width: 48%;
    transform: rotate(4deg);
  }

  .stage-thread-a {
    top: 84px !important;
    left: 10% !important;
    width: 62% !important;
  }

  .stage-thread-b {
    top: 154px !important;
    left: 24% !important;
    width: 50% !important;
  }

  .stage-thread-c {
    top: 238px !important;
    left: 4% !important;
    width: 62% !important;
  }

  .home-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0;
  }

  .btn-primary,
  .btn-secondary,
  .btn-result {
    width: 100%;
    min-width: 0;
  }

  .home-scroll-hint {
    position: fixed;
    right: 12px;
    bottom: 16px;
    width: min(240px, calc(100vw - 24px));
    justify-content: space-between;
    justify-self: start;
    z-index: 22;
  }

  .home-scroll-hint.is-mobile-visible {
    display: inline-flex;
  }

  .quiz-layout,
  .result-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 16px 24px 72px;
  }

  .quiz-aside,
  .result-side {
    padding: 20px 16px;
  }

  .quiz-stage-head {
    margin: 0 0 -10px 14px;
    padding: 10px 12px 12px;
  }

  .quiz-body {
    padding: 34px 18px 22px;
  }

  .quiz-option {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 18px;
  }

  .quiz-option-label {
    min-height: 42px;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-match-strip {
    width: 100%;
  }

  .result-note-grid {
    grid-template-columns: 1fr;
  }

  .result-cover-panel {
    padding-left: 10px;
  }

  .result-cover-panel::before {
    width: 72px;
  }

  .result-preference-tags span {
    min-height: 32px;
  }

  .result-img-wrap {
    width: 100%;
  }

  .result-img-wrap[data-orientation="portrait"] {
    width: min(70vw, 300px);
  }

  .trait-row {
    grid-template-columns: 82px minmax(0, 1fr) 38px;
  }

  .result-qr-block {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .result-qr-code {
    width: 88px;
    height: 88px;
  }

  .paper-footer {
    padding-left: 66px;
  }
}

@media (max-width: 560px) {
  .lang-control {
    top: 12px;
    right: 12px;
  }

  .lang-guide-toast {
    top: 58px;
    right: 12px;
  }

  .lang-gate {
    padding-top: 74px;
  }

  .lang-gate-panel {
    padding: 20px 8px 14px;
  }

  .lang-gate-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-title-primary {
    font-size: 3.2rem;
  }

  .home-title-secondary {
    font-size: 3rem;
  }

  .summary-scene,
  .summary-spotlight-name {
    line-height: 1.16;
  }

  .summary-spectrum {
    gap: 8px;
    padding-right: 0;
  }

  .summary-spectrum-key,
  .summary-spectrum-key:nth-child(2),
  .summary-spectrum-key:nth-child(3) {
    transform: skewX(-14deg);
  }

  .home-cover-stage {
    min-height: 286px;
  }

  .poster-item {
    height: 72px;
  }

  .quiz-question {
    font-size: 2rem;
  }

  .result-game-name {
    font-size: 2.3rem;
  }

  .result-match-strip {
    padding: 10px 12px 10px 14px;
  }

  .quiz-stage-head::before,
  .home-summary-card .repo-link-inline::before {
    display: none;
  }

  .image-preview-panel {
    width: calc(100vw - 10px);
    margin: 5px auto;
    max-height: calc(100dvh - 10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.result-community-block {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 16px 14px 0 0;
  border-top: 1px solid var(--soft-line);
}

.result-community-qr {
  display: block;
  width: 92px;
  height: 92px;
  border: 1.5px solid var(--line);
  background: #fff;
  object-fit: cover;
}

.result-community-meta {
  min-width: 0;
}

.result-community-number {
  display: block;
  margin-top: 5px;
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 0.8px;
}

.result-community-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.result-frame.is-exporting .result-community-block {
  background: #FBF8F2 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.btn-more-tests {
  border-color: var(--accent);
  background: var(--accent);
  color: #fffdf8;
  font-weight: 700;
}

.btn-more-tests:hover,
.btn-more-tests:focus-visible {
  background: var(--line);
  border-color: var(--line);
  color: #fffdf8;
}

@media (max-width: 760px) {
  .result-community-block {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .result-community-qr {
    width: 88px;
    height: 88px;
  }
}
.paper-footer {
  min-height: 52px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.turing-social-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.turing-social-link {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  padding: 0 8px;
  color: var(--ink);
  background: var(--panel);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.turing-social-link:hover,
.turing-social-link:focus-visible {
  color: #fff;
  background: var(--line);
  outline: none;
}

@media (max-width: 700px) {
  .paper-footer {
    gap: 8px;
    justify-content: flex-start;
  }

  .turing-social-links {
    width: 100%;
    justify-content: flex-start;
  }
}