:root {
  color-scheme: light;
  --ink: #191a17;
  --ink-soft: #373832;
  --paper: #f4efe4;
  --paper-deep: #e7dece;
  --surface: #fffdf7;
  --surface-soft: #faf6ec;
  --muted: #706d64;
  --line: #d8cfbf;
  --line-strong: #bfb3a0;
  --red: #c74a3a;
  --red-dark: #963328;
  --red-soft: #f4dfda;
  --gold: #e6b955;
  --gold-dark: #a77920;
  --gold-soft: #f7edcf;
  --green: #153b31;
  --green-mid: #1e5244;
  --green-light: #2f705d;
  --green-ink: #0b2821;
  --green-soft: #dfece5;
  --blue: #365f7d;
  --blue-soft: #e5edf2;
  --tile: #fff8e8;
  --tile-top: #fffdf6;
  --tile-side: #d3c39e;
  --tile-back: #b43e33;
  --tile-back-dark: #7f2b25;
  --shadow-sm: 0 8px 22px rgba(41, 36, 28, 0.09);
  --shadow-md: 0 16px 38px rgba(41, 36, 28, 0.15);
  --shadow-lg: 0 28px 70px rgba(22, 25, 20, 0.2);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --content: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(230, 185, 85, 0.16), transparent 26rem),
    radial-gradient(circle at 92% 18%, rgba(199, 74, 58, 0.1), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page-grain {
  display: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(54, 95, 125, 0.45);
  outline-offset: 4px;
}

button[disabled] {
  cursor: default;
}

[hidden] {
  display: none !important;
}

svg {
  display: block;
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid rgba(191, 179, 160, 0.65);
  background: rgba(244, 239, 228, 0.82);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  width: min(calc(100% - 40px), var(--content));
  min-height: 80px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 43px;
  height: 43px;
  overflow: hidden;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(25, 26, 23, 0.28);
  border-radius: 50%;
  background: linear-gradient(to bottom, #1c1c1a 0 33.33%, #c74a3a 33.33% 66.66%, #e6b955 66.66% 100%);
  box-shadow: var(--shadow-sm);
}

.brand-mark::after {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  content: "";
}

.brand-mark span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.94);
  font-family: "Iowan Old Style", "Songti TC", "Noto Serif TC", serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

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

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

.brand-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.68);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.tool-button:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.tool-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.tool-button[aria-pressed="false"] .sound-wave {
  display: none;
}

.screen {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.intro-screen {
  display: grid;
  min-height: calc(100svh - 80px);
  align-items: center;
  gap: clamp(46px, 7vw, 92px);
  padding-block: 64px 82px;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 0.9fr);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.eyebrow span {
  color: var(--red);
  font-size: 8px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Songti TC", "Noto Serif TC", serif;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.intro-copy h1 {
  max-width: 700px;
  font-size: clamp(48px, 5.2vw, 68px);
  line-height: 1.08;
}

.intro-copy h1 span,
.end-screen h1 span {
  color: var(--red);
}

.intro-lead {
  max-width: 640px;
  margin: 25px 0 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.85;
}

.intro-actions {
  display: grid;
  justify-items: start;
  gap: 14px;
  margin-top: 30px;
}

.intro-actions > p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.intro-actions > p svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--green-light);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.primary-button,
.secondary-button,
.purchase-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 21px;
  border-radius: 999px;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 25px rgba(151, 51, 40, 0.22);
}

.primary-button:hover,
.purchase-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(30, 30, 24, 0.2);
}

.primary-button svg,
.secondary-button svg,
.purchase-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.chapter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 29px 0 0;
  padding: 0;
  list-style: none;
}

.chapter-chips li {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.55);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.intro-table {
  position: relative;
  width: 100%;
  min-height: 520px;
  overflow: hidden;
  border: 10px solid #a67236;
  border-radius: 44px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 44%),
    repeating-linear-gradient(117deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 7px),
    var(--green);
  box-shadow:
    inset 0 0 0 3px #6f4723,
    inset 0 0 80px rgba(0, 0, 0, 0.22),
    var(--shadow-lg);
}

.intro-table::before {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(230, 185, 85, 0.2);
  border-radius: 29px;
  content: "";
}

.table-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(230, 185, 85, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.table-glow::before,
.table-glow::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(230, 185, 85, 0.1);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.table-glow::before {
  width: 245px;
  height: 245px;
}

.table-glow::after {
  width: 130px;
  height: 130px;
}

.mahjong-tile {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(120, 101, 67, 0.35);
  border-radius: 9px 9px 12px 12px;
  background: linear-gradient(145deg, var(--tile-top), var(--tile));
  color: var(--green-ink);
  box-shadow:
    0 8px 0 var(--tile-side),
    0 12px 20px rgba(0, 0, 0, 0.28),
    inset 0 0 0 3px rgba(255, 255, 255, 0.62),
    inset 0 -7px 12px rgba(151, 119, 62, 0.06);
  font-family: "Iowan Old Style", "Songti TC", "Noto Serif TC", serif;
  line-height: 1;
}

.mahjong-tile::before {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(167, 121, 32, 0.15);
  border-radius: 5px;
  content: "";
  pointer-events: none;
}

.mahjong-tile b,
.mahjong-tile small {
  position: relative;
  z-index: 1;
}

.mahjong-tile b {
  color: var(--green-mid);
  font-weight: 750;
}

.mahjong-tile small {
  margin-top: 9px;
  color: var(--red-dark);
  font-family: inherit;
  font-weight: 750;
}

.hero-hand {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  transform: translate(-50%, -50%) rotate(-3deg);
}

.hero-tile {
  width: 66px;
  height: 92px;
  transform: translateY(var(--lift, 0)) rotate(var(--tilt, 0));
  animation: deal-in 620ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.hero-tile b {
  font-size: 32px;
}

.hero-tile small {
  font-size: 11px;
}

.tile-1 { --tilt: -4deg; --lift: 7px; animation-delay: 40ms; }
.tile-2 { --tilt: -2deg; --lift: 2px; animation-delay: 110ms; }
.tile-3 { --tilt: 0deg; --lift: 0; animation-delay: 180ms; }
.tile-4 { --tilt: 2deg; --lift: 3px; animation-delay: 250ms; }
.tile-5 { --tilt: 4deg; --lift: 9px; animation-delay: 320ms; }

.tile-hidden,
.final-hidden-tile {
  border-color: #7e2b25;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.14) 0 2px, transparent 2.5px) 0 0 / 12px 12px,
    linear-gradient(145deg, #c74a3a, var(--tile-back-dark));
  color: #fff4d5;
  box-shadow:
    0 8px 0 #4c7a65,
    0 12px 20px rgba(0, 0, 0, 0.28),
    inset 0 0 0 4px rgba(255, 239, 195, 0.18),
    inset 0 0 0 7px rgba(95, 27, 24, 0.24);
}

.tile-hidden::before,
.final-hidden-tile::before {
  border-color: rgba(255, 244, 213, 0.32);
}

.tile-hidden b,
.tile-hidden small,
.final-hidden-tile b,
.final-hidden-tile small {
  color: #fff4d5;
}

.tile-hidden {
  margin-left: 12px;
  --tilt: 8deg;
  --lift: -9px;
  animation-delay: 510ms;
}

.wall-stack {
  position: absolute;
  z-index: 2;
  display: flex;
  gap: 3px;
}

.wall-stack-left {
  top: 32px;
  left: 34px;
  transform: rotate(-4deg);
}

.wall-stack-right {
  right: 32px;
  bottom: 33px;
  transform: rotate(176deg);
}

.wall-stack i {
  display: block;
  width: 39px;
  height: 28px;
  border: 1px solid rgba(101, 84, 53, 0.4);
  border-radius: 5px;
  background: linear-gradient(to bottom, var(--tile), #e2d6bc);
  box-shadow: 0 5px 0 #4d7563, 0 8px 11px rgba(0, 0, 0, 0.2);
}

.round-marker {
  position: absolute;
  top: 47px;
  right: 46px;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid rgba(230, 185, 85, 0.43);
  border-radius: 50%;
  color: #fff7e4;
  text-align: center;
}

.round-marker span {
  position: absolute;
  top: -15px;
  left: -12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  font-family: "Iowan Old Style", "Songti TC", serif;
  font-weight: 700;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.24);
}

.round-marker strong {
  margin-top: 5px;
  font-family: "Iowan Old Style", serif;
  font-size: 28px;
  line-height: 1;
}

.round-marker small {
  margin-top: -18px;
  color: rgba(255, 247, 228, 0.65);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.book-peek {
  position: absolute;
  z-index: 5;
  right: 42px;
  bottom: 35px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px 10px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(8, 33, 27, 0.73);
  color: rgba(255, 249, 232, 0.78);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  backdrop-filter: blur(8px);
}

.book-peek img {
  width: 45px;
  height: 64px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

@keyframes deal-in {
  from {
    opacity: 0;
    transform: translate(90px, -60px) rotate(18deg);
  }
}

.game-screen {
  padding-block: 40px 88px;
}

.game-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
}

.progress-block {
  width: min(100%, 470px);
}

.progress-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-deep);
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #e16d5c);
  transition: width 320ms ease;
}

.hand-strip {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.hand-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.hand-slots {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}

.hand-slot {
  position: relative;
  display: grid;
  width: 34px;
  height: 44px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 5px;
  background: rgba(255, 253, 247, 0.42);
  color: var(--muted);
  font-family: "Iowan Old Style", "Songti TC", serif;
  font-size: 9px;
  font-weight: 700;
}

.hand-slot.is-filled {
  border-style: solid;
  border-color: rgba(111, 91, 51, 0.38);
  background: linear-gradient(145deg, var(--tile-top), var(--tile));
  color: var(--green-mid);
  font-size: 19px;
  box-shadow: 0 4px 0 var(--tile-side), 0 7px 11px rgba(44, 37, 26, 0.16);
  animation: hand-pop 280ms ease both;
}

.hand-slot.is-current {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(199, 74, 58, 0.1);
}

@keyframes hand-pop {
  50% { transform: translateY(-7px); }
}

.score-rack {
  display: grid;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: var(--shadow-sm);
  grid-template-columns: repeat(3, 1fr);
}

.score-item {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 22px;
}

.score-item:not(:last-child) {
  border-right: 1px solid var(--line);
}

.score-item > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.score-item strong {
  color: var(--ink);
  font-family: "Iowan Old Style", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.score-item strong small {
  color: var(--muted);
  font-family: "Avenir Next", "PingFang TC", sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.scene-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(191, 179, 160, 0.85);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  grid-template-columns: minmax(260px, 0.68fr) minmax(0, 1.32fr);
}

.scene-table {
  position: relative;
  display: grid;
  min-height: 670px;
  overflow: hidden;
  place-items: center;
  padding: 48px 32px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.08), transparent 48%),
    repeating-linear-gradient(117deg, rgba(255, 255, 255, 0.011) 0 2px, transparent 2px 7px),
    var(--green);
  color: #fff8e5;
}

.scene-table::before,
.scene-table::after {
  position: absolute;
  border: 1px solid rgba(230, 185, 85, 0.14);
  border-radius: 50%;
  content: "";
}

.scene-table::before {
  width: 370px;
  height: 370px;
}

.scene-table::after {
  width: 235px;
  height: 235px;
}

.scene-wind {
  position: absolute;
  top: 22px;
  left: 22px;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid rgba(230, 185, 85, 0.35);
  border-radius: 50%;
  color: var(--gold);
  font-family: "Iowan Old Style", "Songti TC", serif;
  font-size: 20px;
  font-weight: 700;
}

.draw-area {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
}

.draw-area > p:first-child {
  max-width: 220px;
  margin: 0 0 28px;
  color: rgba(255, 248, 229, 0.66);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.drawn-tile-wrap {
  position: relative;
  display: grid;
  width: 120px;
  height: 165px;
  place-items: center;
}

.drawn-tile {
  z-index: 2;
  width: 103px;
  height: 139px;
}

.drawn-tile.is-drawing {
  animation: tile-draw 460ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.drawn-tile b {
  font-size: 53px;
}

.drawn-tile small {
  font-size: 13px;
}

.tile-shadow {
  position: absolute;
  z-index: 1;
  right: 2px;
  bottom: 4px;
  left: 2px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  filter: blur(10px);
}

@keyframes tile-draw {
  from {
    opacity: 0;
    transform: translate(55px, -75px) rotate(14deg) scale(0.8);
  }
}

.scene-source {
  max-width: 230px;
  margin: 30px 0 0;
  padding-top: 19px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 248, 229, 0.58);
  font-size: 10px;
  line-height: 1.5;
}

.scene-body {
  padding: clamp(36px, 5vw, 62px);
}

.scene-meta {
  margin: 0 0 10px;
  color: var(--red-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.scene-heading h2 {
  max-width: 670px;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.17;
}

.scene-heading h2:focus,
.result-card h1:focus {
  outline: none;
}

.message-card {
  display: grid;
  gap: 13px;
  margin: 24px 0 29px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  background: var(--surface-soft);
  grid-template-columns: 25px 1fr;
}

.message-card > span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold-dark);
}

.message-card svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.message-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-style: normal;
  line-height: 1.72;
}

.choice-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-fieldset legend {
  width: 100%;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

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

.choice-button {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 216px;
  flex-direction: column;
  align-items: center;
  gap: 17px;
  padding: 18px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(250, 246, 236, 0.72);
  color: var(--ink);
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.choice-button:hover:not([disabled]) {
  z-index: 2;
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.choice-button[disabled] {
  opacity: 0.54;
}

.choice-button.is-selected {
  opacity: 1;
  border-color: var(--green-light);
  background: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(47, 112, 93, 0.12);
}

.choice-button.is-danger.is-selected {
  border-color: var(--red);
  background: var(--red-soft);
  box-shadow: 0 0 0 3px rgba(199, 74, 58, 0.1);
}

.choice-button.is-mixed.is-selected {
  border-color: var(--gold-dark);
  background: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(230, 185, 85, 0.15);
}

.choice-tile {
  width: 58px;
  height: 78px;
  flex: 0 0 auto;
}

.choice-tile b {
  font-size: 29px;
}

.choice-tile small {
  font-size: 9px;
}

.choice-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.62;
}

.choice-letter {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: 9px;
}

.feedback-panel {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-soft);
  animation: feedback-in 260ms ease both;
}

.feedback-panel.is-safe {
  border-color: rgba(47, 112, 93, 0.34);
  background: linear-gradient(135deg, var(--green-soft), var(--surface));
}

.feedback-panel.is-mixed {
  border-color: rgba(167, 121, 32, 0.34);
  background: linear-gradient(135deg, var(--gold-soft), var(--surface));
}

.feedback-panel.is-danger {
  border-color: rgba(199, 74, 58, 0.32);
  background: linear-gradient(135deg, var(--red-soft), var(--surface));
}

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

.feedback-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 10px;
}

.feedback-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.is-mixed .feedback-badge {
  background: var(--gold-dark);
}

.is-danger .feedback-badge {
  background: var(--red-dark);
}

.effect-line {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.feedback-panel > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.72;
}

.mini-lesson {
  display: grid;
  align-items: center;
  gap: 11px;
  margin-top: 17px;
  padding-top: 16px;
  border-top: 1px solid rgba(191, 179, 160, 0.65);
  grid-template-columns: 31px 1fr;
}

.mini-lesson > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  font-family: "Iowan Old Style", "Songti TC", serif;
  font-size: 14px;
  font-weight: 700;
}

.mini-lesson p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.mini-lesson strong {
  color: var(--ink-soft);
}

.next-button {
  width: 100%;
  margin-top: 19px;
}

.end-screen {
  padding-block: 48px 90px;
}

.winning-hand {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  margin-bottom: 34px;
}

.hand-slots-final {
  gap: 8px;
}

.hand-slots-final .hand-slot {
  width: 48px;
  height: 64px;
  font-size: 25px;
  box-shadow: 0 6px 0 var(--tile-side), 0 10px 18px rgba(44, 37, 26, 0.2);
}

.hand-plus {
  margin: 0 2px 18px;
  color: var(--muted);
  font-size: 22px;
}

.final-hidden-tile {
  width: 54px;
  height: 72px;
  transform: rotate(7deg) translateY(-7px);
  animation: final-tile-pulse 1.4s ease-in-out 2;
}

.final-hidden-tile b {
  font-size: 28px;
}

.final-hidden-tile small {
  font-size: 9px;
}

@keyframes final-tile-pulse {
  50% { transform: rotate(7deg) translateY(-14px); }
}

.end-layout {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr);
}

.result-card {
  padding: clamp(34px, 5vw, 58px);
  background: var(--surface);
}

.result-card h1 {
  font-size: clamp(39px, 5vw, 64px);
  line-height: 1.08;
}

.result-score {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 34px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-score > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.result-score strong {
  color: var(--red-dark);
  font-family: "Iowan Old Style", serif;
  font-size: 54px;
  line-height: 1;
}

.result-score small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.result-tier {
  margin-top: 25px;
}

.result-tier > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.result-tier h2 {
  margin-top: 3px;
  font-size: 30px;
  line-height: 1.2;
}

.result-tier p {
  margin: 11px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.72;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.secondary-button:hover {
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.text-button {
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.text-button:hover {
  color: var(--red-dark);
}

.cliffhanger-card {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 5vw, 62px);
  background:
    radial-gradient(circle at 90% 5%, rgba(230, 185, 85, 0.16), transparent 22rem),
    repeating-linear-gradient(117deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 7px),
    var(--green);
  color: #fff8e5;
}

.cliffhanger-card::after {
  position: absolute;
  right: -95px;
  bottom: -95px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(230, 185, 85, 0.14);
  border-radius: 50%;
  content: "";
}

.cliffhanger-time {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 248, 229, 0.64);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(199, 74, 58, 0.13);
  animation: pulse 1.4s ease-in-out 3;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 9px rgba(199, 74, 58, 0.04); }
}

.offer-notification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 17px 0 27px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
}

.offer-notification div {
  display: grid;
  gap: 2px;
}

.offer-notification span:first-child {
  color: rgba(255, 248, 229, 0.58);
  font-size: 9px;
}

.offer-notification strong {
  font-size: 13px;
}

.notification-count {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 11px;
  font-weight: 800;
}

.cliffhanger-card > h2 {
  max-width: 700px;
  font-size: clamp(31px, 4vw, 50px);
  line-height: 1.18;
}

.cliffhanger-copy {
  max-width: 660px;
  margin: 18px 0 0;
  color: rgba(255, 248, 229, 0.72);
  font-size: 14px;
  line-height: 1.75;
}

.locked-grid {
  display: grid;
  gap: 9px;
  margin-top: 25px;
  grid-template-columns: repeat(3, 1fr);
}

.locked-grid > div {
  display: grid;
  min-width: 0;
  align-items: center;
  gap: 2px 9px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  grid-template-columns: 30px 1fr;
}

.locked-grid > div > span {
  display: grid;
  width: 30px;
  height: 38px;
  place-items: center;
  border-radius: 5px;
  background: var(--tile);
  color: var(--green);
  font-family: "Iowan Old Style", "Songti TC", serif;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 3px 0 var(--tile-side);
  grid-row: 1 / 3;
}

.locked-grid strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.locked-grid small {
  overflow: hidden;
  color: rgba(255, 248, 229, 0.5);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-offer {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: center;
  gap: 17px;
  margin-top: 27px;
  padding: 17px;
  border: 1px solid rgba(230, 185, 85, 0.26);
  border-radius: 16px;
  background: rgba(8, 31, 26, 0.52);
  grid-template-columns: 74px 1fr;
}

.product-cover-mini {
  position: relative;
  width: 67px;
  padding: 4px 0 4px 5px;
  border-radius: 4px;
  background: #e9e0d1;
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.35);
}

.product-cover-mini::after {
  position: absolute;
  top: 4px;
  right: -4px;
  bottom: 4px;
  width: 4px;
  border-radius: 0 2px 2px 0;
  background: #c8bda9;
  content: "";
}

.product-cover-mini img {
  display: block;
  width: 62px;
  height: 88px;
  border-radius: 2px;
  object-fit: cover;
}

.product-copy > p {
  margin: 0 0 3px;
  color: rgba(255, 248, 229, 0.52);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.product-copy h3 {
  max-width: 500px;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}

.price-line del {
  color: rgba(255, 248, 229, 0.42);
  font-size: 11px;
}

.price-line strong {
  color: var(--gold);
  font-family: "Iowan Old Style", serif;
  font-size: 24px;
  line-height: 1;
}

.price-line span {
  color: rgba(255, 248, 229, 0.46);
  font-size: 8px;
}

.purchase-button {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: 15px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--green-ink);
  text-align: center;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.purchase-note {
  position: relative;
  z-index: 2;
  margin: 9px 0 0;
  color: rgba(255, 248, 229, 0.48);
  font-size: 9px;
  text-align: center;
}

.reader-quote {
  position: relative;
  z-index: 2;
  margin: 19px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 248, 229, 0.68);
  font-family: "Iowan Old Style", "Songti TC", serif;
  font-size: 12px;
  font-style: normal;
}

.reader-quote cite {
  display: block;
  margin-top: 3px;
  color: rgba(255, 248, 229, 0.42);
  font-family: "Avenir Next", "PingFang TC", sans-serif;
  font-size: 8px;
  font-style: normal;
}

.site-footer {
  display: flex;
  width: min(calc(100% - 40px), var(--content));
  min-height: 120px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer > div {
  display: grid;
  gap: 2px;
  flex: 0 0 auto;
}

.site-footer strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.site-footer span {
  font-size: 10px;
}

.site-footer p {
  max-width: 660px;
  margin: 0;
  font-size: 9px;
  line-height: 1.65;
  text-align: right;
}

.analytics-settings-button {
  position: fixed;
  z-index: 1500;
  right: 14px;
  bottom: 14px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.97);
  box-shadow: var(--shadow-sm);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-settings-button:hover {
  color: var(--green-light);
}

.analytics-consent {
  position: fixed;
  z-index: 1600;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  width: min(calc(100% - 36px), 920px);
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 247, 0.98);
  box-shadow: var(--shadow-lg);
}

.analytics-consent-copy {
  min-width: 0;
}

.analytics-consent-copy strong {
  display: block;
  color: var(--green);
  font-size: 14px;
}

.analytics-consent-copy p {
  max-width: 660px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.analytics-consent-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.analytics-choice-button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.analytics-choice-button.is-quiet {
  background: var(--surface);
  color: var(--muted);
}

.analytics-choice-button.is-primary {
  border-color: var(--green);
  background: var(--green);
  color: var(--surface);
}

.analytics-choice-button.is-primary:hover {
  background: var(--green-mid);
}

body.share-dialog-open {
  overflow: hidden;
}

.share-dialog {
  width: min(940px, calc(100% - 28px));
  max-width: none;
  max-height: min(92dvh, 980px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: var(--ink);
}

.share-dialog::backdrop {
  background: rgba(9, 25, 21, 0.74);
  backdrop-filter: blur(9px);
}

.share-sheet {
  max-height: min(92dvh, 980px);
  padding: 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  background:
    radial-gradient(circle at 96% 2%, rgba(230, 185, 85, 0.17), transparent 18rem),
    var(--surface);
  box-shadow: 0 34px 90px rgba(4, 22, 17, 0.4);
  scrollbar-gutter: stable;
}

.share-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.share-kicker {
  margin: 0 0 4px;
  color: var(--red-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.share-sheet-header h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Songti TC", "Noto Serif TC", serif;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.share-sheet-header p:last-child {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.share-close-button {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.78);
  color: var(--ink-soft);
}

.share-close-button:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.share-close-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.share-preview-frame {
  position: relative;
  display: grid;
  width: min(100%, 520px);
  min-height: 320px;
  margin: 24px auto 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(21, 59, 49, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent),
    var(--green);
  box-shadow: 0 20px 48px rgba(21, 59, 49, 0.2);
}

.share-loading {
  display: grid;
  min-height: 320px;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: var(--tile);
  text-align: center;
}

.share-loading strong {
  font-size: 12px;
  letter-spacing: 0.04em;
}

.share-loading-tile {
  display: grid;
  width: 74px;
  height: 96px;
  place-items: center;
  border-radius: 12px;
  background: var(--tile);
  color: var(--red-dark);
  box-shadow:
    0 8px 0 var(--tile-side),
    0 16px 30px rgba(0, 0, 0, 0.28);
  font-family: "Iowan Old Style", "Songti TC", "Noto Serif TC", serif;
  font-size: 36px;
  font-weight: 700;
  animation: share-tile-turn 1s ease-in-out infinite alternate;
}

@keyframes share-tile-turn {
  from { transform: rotate(-4deg) translateY(2px); }
  to { transform: rotate(4deg) translateY(-7px); }
}

.share-preview-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;
}

.share-error {
  width: min(100%, 520px);
  margin: 16px auto 0;
  padding: 11px 14px;
  border: 1px solid rgba(163, 58, 47, 0.28);
  border-radius: 12px;
  background: var(--red-soft);
  color: var(--red-dark);
  font-size: 11px;
  font-weight: 700;
}

.share-modal-actions {
  display: grid;
  margin-top: 23px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.share-action-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.share-action-button:hover:not([disabled]) {
  border-color: var(--line-strong);
  background: var(--surface);
  transform: translateY(-1px);
}

.share-action-button.is-primary {
  border-color: var(--green);
  background: var(--green);
  color: var(--tile);
}

.share-action-button.is-primary:hover:not([disabled]) {
  border-color: var(--green-mid);
  background: var(--green-mid);
}

.share-action-button[disabled] {
  opacity: 0.46;
}

.share-action-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.share-dialog-toast-region {
  display: grid;
  width: min(100%, 520px);
  margin-inline: auto;
  gap: 8px;
  pointer-events: none;
}

.share-dialog-toast-region:not(:empty) {
  margin-top: 14px;
}

.share-dialog-toast-region .toast {
  max-width: none;
  background: var(--green);
  text-align: center;
}

.share-text-fallback {
  display: grid;
  margin-top: 15px;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.share-text-fallback textarea {
  width: 100%;
  resize: vertical;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
}

.share-privacy-note {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.toast-region {
  position: fixed;
  z-index: 1200;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: min(360px, calc(100vw - 36px));
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-md);
  font-size: 11px;
  font-weight: 700;
  animation: toast-in 220ms ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.noscript-message {
  width: min(calc(100% - 40px), 720px);
  margin: 40px auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}

@media (max-width: 980px) {
  .intro-screen {
    grid-template-columns: 1fr;
  }

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

  .intro-table {
    width: min(100%, 640px);
    min-height: 540px;
    margin-inline: auto;
  }

  .scene-card {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .choice-button {
    min-height: 104px;
    flex-direction: row;
    padding: 13px 16px;
  }

  .choice-copy {
    align-items: center;
    font-size: 13px;
  }

  .end-layout {
    grid-template-columns: 0.8fr 1.2fr;
  }

  .locked-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .header-inner,
  .screen,
  .site-footer {
    width: min(calc(100% - 28px), var(--content));
  }

  .game-topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 17px;
  }

  .progress-block {
    width: 100%;
  }

  .hand-strip {
    align-items: center;
    justify-content: space-between;
  }

  .hand-label {
    margin: 0;
  }

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

  .scene-table {
    min-height: 270px;
    padding: 37px 24px;
  }

  .scene-table::before {
    width: 310px;
    height: 310px;
  }

  .scene-table::after {
    width: 180px;
    height: 180px;
  }

  .draw-area {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    width: 100%;
  }

  .draw-area > p:first-child {
    margin: 0;
    text-align: right;
  }

  .drawn-tile-wrap {
    width: 92px;
    height: 126px;
  }

  .drawn-tile {
    width: 77px;
    height: 103px;
    box-shadow:
      0 6px 0 var(--tile-side),
      0 10px 18px rgba(0, 0, 0, 0.28),
      inset 0 0 0 3px rgba(255, 255, 255, 0.62);
  }

  .drawn-tile b {
    font-size: 39px;
  }

  .drawn-tile small {
    margin-top: 7px;
    font-size: 10px;
  }

  .scene-source {
    margin: 0;
    padding: 0;
    border: 0;
    text-align: left;
  }

  .end-layout {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .site-footer p {
    text-align: left;
  }

  .analytics-consent {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: calc(100% - 24px);
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

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

@media (max-width: 580px) {
  .site-header {
    background: rgba(244, 239, 228, 0.94);
  }

  .header-inner {
    min-height: 68px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-mark span {
    width: 25px;
    height: 25px;
    font-size: 15px;
  }

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

  .brand-copy small {
    font-size: 8px;
  }

  .tool-button {
    min-width: 42px;
    padding-inline: 11px;
  }

  .tool-button span {
    display: none;
  }

  .intro-screen {
    min-height: auto;
    gap: 38px;
    padding-block: 43px 58px;
  }

  .intro-copy h1 {
    font-size: clamp(42px, 13vw, 60px);
  }

  .intro-lead {
    font-size: 16px;
    line-height: 1.78;
  }

  .intro-actions {
    justify-items: stretch;
  }

  .intro-actions > p {
    align-items: flex-start;
  }

  .primary-button {
    width: 100%;
  }

  .intro-table {
    min-height: 410px;
    border-width: 7px;
    border-radius: 30px;
  }

  .intro-table::before {
    inset: 12px;
    border-radius: 20px;
  }

  .table-glow {
    width: 285px;
    height: 285px;
  }

  .hero-hand {
    gap: 5px;
  }

  .hero-tile {
    width: 45px;
    height: 63px;
    border-radius: 6px 6px 8px 8px;
    box-shadow:
      0 5px 0 var(--tile-side),
      0 9px 13px rgba(0, 0, 0, 0.28),
      inset 0 0 0 2px rgba(255, 255, 255, 0.62);
  }

  .hero-tile::before {
    inset: 4px;
  }

  .hero-tile b {
    font-size: 22px;
  }

  .hero-tile small {
    margin-top: 6px;
    font-size: 8px;
  }

  .tile-hidden {
    margin-left: 5px;
  }

  .wall-stack-left {
    top: 22px;
    left: 23px;
  }

  .wall-stack-right {
    right: 22px;
    bottom: 23px;
  }

  .wall-stack i {
    width: 28px;
    height: 20px;
  }

  .round-marker {
    top: 34px;
    right: 32px;
    width: 59px;
    height: 59px;
  }

  .round-marker span {
    width: 29px;
    height: 29px;
    font-size: 13px;
  }

  .round-marker strong {
    font-size: 22px;
  }

  .book-peek {
    right: 24px;
    bottom: 22px;
  }

  .book-peek img {
    width: 37px;
    height: 53px;
  }

  .game-screen {
    padding-block: 26px 58px;
  }

  .score-rack {
    border-radius: 13px;
  }

  .score-item {
    min-width: 0;
    min-height: 70px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 11px 12px;
  }

  .score-item strong {
    font-size: 19px;
  }

  .scene-card {
    border-radius: 22px;
  }

  .scene-table {
    min-height: 235px;
    padding: 30px 20px;
  }

  .scene-wind {
    top: 14px;
    left: 14px;
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .draw-area {
    grid-template-columns: minmax(0, 1fr) 75px minmax(0, 1fr);
    gap: 8px;
  }

  .draw-area > p:first-child,
  .scene-source {
    font-size: 8px;
    line-height: 1.45;
  }

  .drawn-tile-wrap {
    width: 75px;
    height: 105px;
  }

  .drawn-tile {
    width: 64px;
    height: 86px;
  }

  .drawn-tile b {
    font-size: 32px;
  }

  .scene-body {
    padding: 27px 18px 22px;
  }

  .scene-heading h2 {
    font-size: 31px;
  }

  .message-card {
    margin-block: 19px 23px;
    padding: 15px;
  }

  .message-card p {
    font-size: 13px;
  }

  .choice-button {
    min-height: 96px;
    gap: 14px;
    padding: 12px;
  }

  .choice-tile {
    width: 49px;
    height: 66px;
    box-shadow:
      0 5px 0 var(--tile-side),
      0 8px 13px rgba(0, 0, 0, 0.19),
      inset 0 0 0 2px rgba(255, 255, 255, 0.62);
  }

  .choice-tile b {
    font-size: 24px;
  }

  .choice-copy {
    font-size: 12px;
    line-height: 1.55;
  }

  .feedback-panel {
    padding: 17px;
  }

  .feedback-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .winning-hand {
    gap: 10px;
    margin-bottom: 27px;
  }

  .hand-slots-final {
    gap: 5px;
  }

  .hand-slots-final .hand-slot {
    width: 39px;
    height: 52px;
    font-size: 21px;
  }

  .final-hidden-tile {
    width: 44px;
    height: 59px;
  }

  .hand-plus {
    margin-bottom: 14px;
  }

  .end-screen {
    padding-block: 32px 60px;
  }

  .end-layout {
    border-radius: 23px;
  }

  .result-card,
  .cliffhanger-card {
    padding: 31px 20px;
  }

  .result-card h1 {
    font-size: 42px;
  }

  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .share-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 22px;
  }

  .share-sheet {
    max-height: calc(100dvh - 16px);
    padding: 21px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 22px;
  }

  .share-sheet-header {
    gap: 12px;
  }

  .share-sheet-header h2 {
    font-size: 30px;
  }

  .share-preview-frame {
    margin-top: 19px;
    border-radius: 18px;
  }

  .share-modal-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .locked-grid {
    grid-template-columns: 1fr;
  }

  .product-offer {
    grid-template-columns: 62px 1fr;
  }

  .product-cover-mini {
    width: 56px;
  }

  .product-cover-mini img {
    width: 51px;
    height: 73px;
  }

  .purchase-button {
    min-height: 58px;
    padding-inline: 16px;
    font-size: 13px;
  }

  .site-footer {
    min-height: 0;
    padding-block: 25px 35px;
  }
}

@media (max-width: 360px) {
  .brand-copy small {
    display: none;
  }

  .header-tools {
    gap: 5px;
  }

  .tool-button {
    min-width: 38px;
    min-height: 38px;
    padding: 8px;
  }

  .hand-slot {
    width: 30px;
    height: 40px;
  }

  .hand-slots-final .hand-slot {
    width: 35px;
    height: 47px;
  }

  .intro-table {
    min-height: 365px;
  }

  .book-peek span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
