:root {
  color-scheme: dark;
  --felt: #073f37;
  --felt-deep: #032b27;
  --felt-light: #0d584b;
  --ink: #0b2420;
  --ivory: #f5f0e3;
  --paper: #fffdf6;
  --gold: #d8b665;
  --gold-bright: #f2d58a;
  --gold-dim: rgba(216, 182, 101, 0.28);
  --red: #c7523e;
  --green: #71b483;
  --text: #f5f0e3;
  --muted: rgba(245, 240, 227, 0.64);
  --line: rgba(245, 240, 227, 0.13);
  --display: "Noto Serif SC", "Songti SC", "STSong", serif;
  --body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--felt-deep);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(63, 130, 102, 0.24), transparent 36rem),
    radial-gradient(circle at 90% 48%, rgba(189, 153, 75, 0.09), transparent 30rem),
    linear-gradient(155deg, #0b5046 0%, var(--felt) 38%, #052f2a 100%);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

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

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.felt-noise {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    repeating-linear-gradient(
      35deg,
      transparent 0,
      transparent 5px,
      rgba(255, 255, 255, 0.018) 6px,
      transparent 7px
    ),
    repeating-linear-gradient(
      -48deg,
      transparent 0,
      transparent 7px,
      rgba(0, 0, 0, 0.018) 8px,
      transparent 9px
    );
}

.ambient {
  position: fixed;
  z-index: -2;
  border: 1px solid rgba(216, 182, 101, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  position: absolute;
  content: "";
  inset: 11%;
  border: 1px solid rgba(216, 182, 101, 0.1);
  border-radius: inherit;
}

.ambient::after {
  inset: 24%;
}

.ambient-a {
  width: 520px;
  height: 520px;
  top: -290px;
  right: -260px;
}

.ambient-b {
  width: 340px;
  height: 340px;
  bottom: -220px;
  left: -190px;
}

#app {
  width: min(100%, 560px);
  min-height: 100svh;
  margin: 0 auto;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.018), transparent);
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.2);
}

.screen {
  min-height: 100svh;
  padding:
    max(22px, env(safe-area-inset-top))
    clamp(18px, 5.2vw, 30px)
    max(24px, env(safe-area-inset-bottom));
  animation: screen-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.brand-row,
.quiz-header,
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-seal {
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(216, 182, 101, 0.75);
  color: var(--gold-bright);
  font-family: var(--display);
  font-size: 19px;
  place-items: center;
  transform: rotate(-4deg);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-copy small {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0.22em;
}

.edition,
.report-edition {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 10px;
  letter-spacing: 0.2em;
}

.hero-copy {
  margin-top: clamp(42px, 7vh, 76px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(42px, 12.6vw, 66px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.hero-copy h1 span {
  position: relative;
  display: block;
  width: max-content;
  color: var(--gold-bright);
}

.hero-copy h1 span::after {
  position: absolute;
  right: -18px;
  bottom: 8px;
  width: 10px;
  height: 10px;
  content: "";
  border-top: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
}

.hero-description {
  margin: 20px 0 0;
  color: rgba(245, 240, 227, 0.74);
  font-size: 14px;
  line-height: 1.85;
}

.hero-visual {
  position: relative;
  height: 226px;
  margin-top: 18px;
}

.visual-halo {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 246px;
  height: 180px;
  border: 1px solid rgba(216, 182, 101, 0.16);
  border-radius: 50%;
  transform: translateX(-50%);
}

.visual-halo::after {
  position: absolute;
  inset: 18px;
  content: "";
  border: 1px solid rgba(216, 182, 101, 0.1);
  border-radius: inherit;
}

.hero-tile {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 86px;
  aspect-ratio: 5 / 7;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  background: var(--ivory);
  background-position: center;
  background-size: cover;
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.28);
  transform-origin: 50% 90%;
}

.hero-tile img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: cover;
}

.tile-back {
  opacity: 0.55;
  transform: translate(-134%, -41%) rotate(-20deg) scale(0.8);
}

.tile-middle {
  opacity: 0.82;
  transform: translate(-35%, -55%) rotate(2deg) scale(0.95);
}

.tile-front {
  transform: translate(-52%, -36%) rotate(18deg) scale(1.08);
}

.visual-line {
  position: absolute;
  bottom: 22px;
  left: 0;
  width: 38px;
  height: 1px;
  background: var(--gold);
}

.visual-caption {
  position: absolute;
  bottom: 15px;
  left: 48px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.intro-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-stats div {
  display: grid;
  flex: 1;
  gap: 3px;
  text-align: center;
}

.intro-stats strong {
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}

.intro-stats span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.intro-stats i {
  width: 1px;
  height: 26px;
  background: var(--line);
}

.module-strip {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.module-strip article {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 13px 2px;
  border-bottom: 1px solid rgba(245, 240, 227, 0.08);
}

.module-strip article > span {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 11px;
}

.module-strip strong {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.module-strip p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.intro-actions {
  display: grid;
  gap: 10px;
  margin-top: 25px;
}

.primary-button,
.secondary-button,
.text-button,
.quiet-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border: 1px solid rgba(255, 239, 189, 0.75);
  border-radius: 3px;
  color: #19372f;
  background: linear-gradient(115deg, #f5e7b8, var(--gold) 62%, #c7a64d);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition:
    transform 180ms ease,
    filter 180ms ease;
}

.primary-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: not-allowed;
  filter: saturate(0.4);
  opacity: 0.45;
}

.primary-button svg,
.secondary-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.text-button,
.quiet-button {
  color: var(--muted);
  background: none;
  font-size: 12px;
}

.text-button {
  justify-self: center;
  padding: 8px;
  border-bottom: 1px solid var(--gold-dim);
}

.micro-copy {
  margin: 2px 0 0;
  color: rgba(245, 240, 227, 0.42);
  font-size: 10px;
  text-align: center;
}

.site-footer {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: rgba(245, 240, 227, 0.36);
  font-size: 9px;
  line-height: 1.7;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.compact-brand .brand-seal {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.compact-brand .brand-copy strong {
  font-size: 14px;
}

/* Quiz */
.quiz-screen {
  padding-top: max(18px, env(safe-area-inset-top));
}

.quiet-button {
  padding: 9px 0 9px 12px;
  letter-spacing: 0.06em;
}

.progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 30px;
}

.progress-copy span {
  color: var(--muted);
  font-family: Georgia, var(--body);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.progress-copy strong {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 400;
}

.progress-track {
  height: 2px;
  margin-top: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #a9883c, var(--gold-bright));
  box-shadow: 0 0 12px var(--gold-dim);
  transition: width 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.question-loading {
  display: grid;
  min-height: 62vh;
  align-content: center;
  justify-items: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.loader-ring {
  display: block;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(216, 182, 101, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 27px;
}

.module-pill {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(216, 182, 101, 0.34);
  border-radius: 20px;
  color: var(--gold-bright);
  background: rgba(216, 182, 101, 0.07);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.difficulty-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.hand-panel {
  position: relative;
  margin-top: 16px;
  padding: 21px clamp(8px, 2.5vw, 14px) 19px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(0, 0, 0, 0.06)),
    rgba(2, 42, 38, 0.72);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    var(--shadow);
}

.hand-glow {
  position: absolute;
  top: 42%;
  left: 50%;
  width: 220px;
  height: 120px;
  border-radius: 50%;
  background: rgba(220, 194, 119, 0.08);
  filter: blur(28px);
  transform: translate(-50%, -50%);
}

.hand-groups {
  position: relative;
  display: grid;
  gap: 8px;
}

.hand-row {
  display: flex;
  gap: clamp(2px, 0.65vw, 5px);
  justify-content: center;
}

.mahjong-tile {
  display: block;
  flex: 1 1 0;
  max-width: 45px;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 26, 23, 0.4);
  border-radius: 4px;
  background: var(--paper);
  background-position: center;
  background-size: cover;
  box-shadow:
    0 3px 0 #aaa491,
    0 7px 11px rgba(0, 0, 0, 0.2);
  aspect-ratio: 402 / 528;
}

.mahjong-tile img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  opacity: 0;
  object-fit: contain;
  transition: opacity 180ms ease;
}

.mahjong-tile.is-loaded img,
.mini-tile.is-loaded img {
  opacity: 1;
}

.mahjong-tile.is-broken,
.mini-tile.is-broken {
  display: grid;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), transparent),
    var(--ivory);
  color: var(--ink);
  font-family: var(--display);
  place-items: center;
}

.mahjong-tile.is-broken::after,
.mini-tile.is-broken::after {
  padding: 2px;
  content: attr(data-fallback);
  font-size: clamp(8px, 2.8vw, 13px);
  line-height: 1.05;
  text-align: center;
  writing-mode: vertical-rl;
}

.question-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 25px 2px 16px;
}

.question-index {
  color: rgba(216, 182, 101, 0.45);
  font-family: Georgia, serif;
  font-size: 29px;
  font-style: italic;
}

.question-heading p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 11px;
}

.question-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: 0.02em;
}

.answer-options {
  display: flex;
  gap: clamp(6px, 2vw, 11px);
  justify-content: center;
}

.answer-option {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  max-width: 104px;
  min-width: 0;
  padding: 10px 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 5px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.answer-option:hover:not(:disabled) {
  border-color: rgba(216, 182, 101, 0.55);
  background: rgba(216, 182, 101, 0.075);
  transform: translateY(-3px);
}

.answer-option .mahjong-tile {
  flex: 0 0 auto;
  width: min(66px, 72%);
  max-width: 66px;
  margin: 0 auto 9px;
}

.answer-letter {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.12em;
  text-align: center;
}

.answer-name {
  display: block;
  width: 100%;
  margin-top: 3px;
  color: rgba(245, 240, 227, 0.86);
  font-family: var(--display);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.option-mark {
  position: absolute;
  top: -7px;
  right: -5px;
  display: none;
  width: 23px;
  height: 23px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.answer-option.is-correct {
  border-color: rgba(113, 180, 131, 0.85);
  background: rgba(74, 143, 91, 0.16);
}

.answer-option.is-correct .option-mark {
  display: flex;
  background: var(--green);
}

.answer-option.is-wrong {
  border-color: rgba(199, 82, 62, 0.78);
  background: rgba(199, 82, 62, 0.13);
}

.answer-option.is-wrong .option-mark {
  display: flex;
  background: var(--red);
}

.answer-option:disabled {
  cursor: default;
}

.answer-option.is-muted {
  opacity: 0.46;
}

.feedback-panel {
  margin-top: 22px;
  padding: 15px;
  border-left: 2px solid var(--green);
  background: rgba(113, 180, 131, 0.08);
  animation: feedback-in 0.32s ease-out both;
}

.feedback-panel.is-wrong {
  border-left-color: var(--red);
  background: rgba(199, 82, 62, 0.08);
}

.feedback-heading {
  display: flex;
  gap: 10px;
  align-items: center;
}

.feedback-icon {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--green);
  font-size: 13px;
  place-items: center;
}

.is-wrong .feedback-icon {
  color: var(--red);
}

.feedback-heading strong {
  font-family: var(--display);
  font-size: 15px;
}

.feedback-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.feedback-tip {
  margin: 11px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: rgba(245, 240, 227, 0.82);
  font-size: 12px;
  line-height: 1.7;
}

.next-button {
  margin-top: 17px;
}

.question-error {
  margin-top: 36px;
  padding: 28px 18px;
  border: 1px solid rgba(199, 82, 62, 0.25);
  text-align: center;
}

.question-error span {
  font-family: var(--display);
  font-size: 18px;
}

.question-error p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(216, 182, 101, 0.38);
  border-radius: 3px;
  color: var(--gold-bright);
  background: rgba(216, 182, 101, 0.04);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* Report */
.report-screen {
  padding-bottom: max(40px, env(safe-area-inset-bottom));
}

.report-hero {
  margin-top: 32px;
}

.report-hero > .eyebrow {
  margin-bottom: 12px;
}

.report-slogan {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(30px, 8.8vw, 43px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.035em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.report-slogan strong {
  color: var(--gold-bright);
  font-weight: 700;
}

.report-slogan.is-long {
  font-size: clamp(23px, 7.1vw, 34px);
  line-height: 1.34;
}

.report-slogan.is-extra-long {
  font-size: clamp(21px, 6.1vw, 30px);
  line-height: 1.38;
}

.persona-signature {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: baseline;
  margin: 18px 0 0;
  color: rgba(245, 240, 227, 0.52);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.03em;
}

.persona-signature strong {
  color: rgba(242, 213, 138, 0.9);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
}

.persona-signature i {
  color: rgba(216, 182, 101, 0.42);
  font-style: normal;
}

.score-layout {
  display: flex;
  gap: clamp(18px, 5vw, 30px);
  align-items: center;
  margin-top: 28px;
}

.score-ring {
  --score-angle: 0deg;
  position: relative;
  display: grid;
  flex: 0 0 clamp(132px, 39vw, 166px);
  width: clamp(132px, 39vw, 166px);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--felt) 57%, transparent 59%),
    conic-gradient(
      var(--gold-bright) 0deg,
      var(--gold) var(--score-angle),
      rgba(255, 255, 255, 0.12) var(--score-angle),
      rgba(255, 255, 255, 0.12) 360deg
    );
  box-shadow: 0 0 0 1px rgba(216, 182, 101, 0.12);
  place-items: center;
  aspect-ratio: 1;
}

.score-ring::before {
  position: absolute;
  inset: 11px;
  content: "";
  border: 1px solid rgba(216, 182, 101, 0.15);
  border-radius: inherit;
}

.score-ring > div {
  position: relative;
  display: grid;
  text-align: center;
}

.score-ring span {
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: clamp(44px, 14vw, 58px);
  line-height: 1;
}

.score-ring small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.rank-copy {
  min-width: 0;
}

.rank-label {
  display: block;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(17px, 4.8vw, 21px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.rank-copy p {
  margin: 9px 0 0;
  color: rgba(245, 240, 227, 0.62);
  font-size: 11px;
  line-height: 1.65;
  letter-spacing: 0.015em;
}

.dimension-panel,
.persona-panel,
.advice-panel,
.review-panel,
.all-reviews {
  margin-top: 18px;
  padding: 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(1, 38, 34, 0.38);
}

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

.section-heading > div > span {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0.18em;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 20px;
}

.correct-summary,
.section-note {
  color: var(--muted);
  font-size: 10px;
}

.dimension-bars {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.dimension-row {
  display: grid;
  gap: 7px;
}

.dimension-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dimension-labels strong {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
}

.dimension-labels span {
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 12px;
}

.dimension-track {
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.dimension-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #a98943, var(--gold-bright));
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dimension-row p {
  margin: 0;
  color: rgba(245, 240, 227, 0.5);
  font-size: 10px;
  line-height: 1.55;
}

.persona-panel,
.advice-panel {
  position: relative;
  overflow: hidden;
}

.persona-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 182, 101, 0.13), transparent 44%),
    rgba(1, 38, 34, 0.46);
}

.panel-number {
  position: absolute;
  top: 12px;
  right: 15px;
  color: rgba(216, 182, 101, 0.2);
  font-family: Georgia, serif;
  font-size: 42px;
  font-style: italic;
}

.panel-eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.17em;
}

.persona-panel h2,
.advice-panel h2 {
  max-width: 88%;
  margin: 10px 0;
  font-family: var(--display);
  font-size: 23px;
  line-height: 1.35;
}

.persona-panel > p:not(.panel-eyebrow),
.advice-panel > p:not(.panel-eyebrow) {
  margin: 0;
  color: rgba(245, 240, 227, 0.68);
  font-size: 12px;
  line-height: 1.85;
}

.strength-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.strength-tags span {
  padding: 6px 9px;
  border: 1px solid rgba(216, 182, 101, 0.22);
  border-radius: 2px;
  color: rgba(242, 213, 138, 0.8);
  background: rgba(216, 182, 101, 0.04);
  font-size: 10px;
}

.advice-list {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: advice;
}

.advice-list li {
  position: relative;
  padding: 13px 0 13px 35px;
  border-top: 1px solid var(--line);
  counter-increment: advice;
}

.advice-list li::before {
  position: absolute;
  top: 15px;
  left: 0;
  color: var(--gold);
  content: "0" counter(advice);
  font-family: Georgia, serif;
  font-size: 10px;
}

.advice-list strong {
  display: block;
  font-family: var(--display);
  font-size: 13px;
  line-height: 1.5;
}

.advice-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.featured-reviews {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}

.review-card {
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(0, 0, 0, 0.09);
}

.review-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
}

.review-summary > div {
  min-width: 0;
}

.review-status {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--green);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.review-status.is-wrong {
  color: #f2846c;
}

.review-summary strong {
  display: block;
  font-family: var(--display);
  font-size: 13px;
}

.review-summary p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.review-toggle {
  flex: 0 0 auto;
  padding: 6px 0 6px 10px;
  border: 0;
  color: var(--gold);
  background: none;
  font-size: 10px;
  cursor: pointer;
}

.review-detail {
  display: none;
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}

.review-card.is-open .review-detail {
  display: block;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.review-meta span {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 9px;
}

.review-answer {
  margin: 0 0 10px;
  color: var(--gold-bright);
  font-size: 11px;
}

.review-copy {
  margin: 0;
  color: rgba(245, 240, 227, 0.67);
  font-size: 11px;
  line-height: 1.85;
}

.review-hand {
  display: grid;
  gap: 4px;
  margin-top: 13px;
  padding: 9px 7px;
  background: rgba(255, 255, 255, 0.035);
}

.review-hand-row {
  display: flex;
  gap: 2px;
  justify-content: center;
}

.mini-tile {
  display: block;
  flex: 1 1 0;
  max-width: 29px;
  min-width: 0;
  padding: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  background: var(--ivory);
  background-position: center;
  background-size: cover;
  aspect-ratio: 402 / 528;
}

.mini-tile img {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity 180ms ease;
}

.all-reviews {
  padding: 0;
}

.all-reviews summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  font-family: var(--display);
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}

.all-reviews summary::-webkit-details-marker {
  display: none;
}

.all-reviews summary svg {
  width: 18px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  transition: transform 180ms ease;
}

.all-reviews[open] summary svg {
  transform: rotate(180deg);
}

.review-list {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.review-list .review-card {
  border-color: rgba(255, 255, 255, 0.055);
}

.review-list .review-summary {
  padding: 11px 12px;
}

.review-list .review-detail {
  padding-inline: 12px;
}

.report-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.report-actions .secondary-button {
  width: 100%;
}

.report-footer {
  margin-top: 28px;
}

/* Poster dialog */
.poster-sheet {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
}

.poster-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 13, 11, 0.82);
  backdrop-filter: blur(9px);
  animation: fade-in 0.25s ease both;
}

.poster-sheet-card {
  position: relative;
  width: min(100%, 540px);
  max-height: 94svh;
  padding:
    19px 18px max(18px, env(safe-area-inset-bottom));
  overflow: auto;
  border-top: 1px solid rgba(216, 182, 101, 0.35);
  border-radius: 16px 16px 0 0;
  background: #082f2a;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.35);
  animation: sheet-up 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.poster-sheet-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.poster-sheet-heading span {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0.16em;
}

.poster-sheet-heading h2 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 21px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  place-items: center;
}

.poster-preview {
  display: grid;
  max-height: 62svh;
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    repeating-conic-gradient(#173e38 0 25%, #123630 0 50%) 50% / 14px 14px;
  place-items: center;
}

.poster-preview img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 62svh;
  object-fit: contain;
}

.poster-actions {
  margin-top: 14px;
}

.poster-actions .primary-button {
  width: 100%;
  justify-content: center;
}

.poster-actions p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.poster-actions .poster-privacy-note {
  margin-top: 4px;
  color: rgba(245, 240, 227, 0.38);
}

.toast {
  position: fixed;
  z-index: 50;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  max-width: calc(100vw - 36px);
  padding: 11px 15px;
  border: 1px solid rgba(216, 182, 101, 0.3);
  border-radius: 3px;
  color: var(--text);
  background: rgba(3, 43, 39, 0.96);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
  font-size: 11px;
  text-align: center;
  transform: translateX(-50%);
  animation: toast-in 0.25s ease both;
}

.noscript {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 30px;
  color: white;
  background: #073f37;
  font-size: 16px;
  text-align: center;
  place-items: center;
}

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

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
}

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

@media (max-width: 360px) {
  .screen {
    padding-inline: 15px;
  }

  .hero-copy {
    margin-top: 34px;
  }

  .hero-copy h1 {
    font-size: 38px;
    letter-spacing: -0.06em;
  }

  .hero-visual {
    height: 205px;
    transform: scale(0.92);
    transform-origin: top center;
  }

  .intro-stats span {
    letter-spacing: 0;
  }

  .hand-panel {
    padding-inline: 7px;
  }

  .mahjong-tile {
    border-radius: 3px;
  }

  .answer-option {
    padding-inline: 3px;
  }

  .score-layout {
    gap: 14px;
  }
}

@media (min-width: 700px) {
  body {
    padding: 26px 0;
  }

  #app {
    min-height: calc(100svh - 52px);
    overflow: hidden;
    border: 1px solid rgba(216, 182, 101, 0.13);
    border-radius: 18px;
  }

  .screen {
    min-height: calc(100svh - 52px);
    padding-inline: 34px;
  }
}

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