:root {
  --ink: #120e0b;
  --ink-soft: #2b211a;
  --paper: #f4ead7;
  --paper-deep: #e2cfab;
  --red: #c80d23;
  --red-deep: #780815;
  --gold: #c69a52;
  --jade: #287343;
  --line: rgba(244, 234, 215, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 20% 0%, rgba(200, 13, 35, 0.12), transparent 34rem),
    linear-gradient(135deg, #080706, #17100d 48%, #050404);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Microsoft YaHei", serif;
  line-height: 1.7;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(244, 234, 215, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 234, 215, 0.05) 1px, transparent 1px);
  background-size: 92px 92px;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.54), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.48)),
    radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.38));
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgba(244, 234, 215, 0.12);
  background: rgba(12, 9, 7, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  width: 136px;
  min-width: 110px;
}

.progress-nav {
  position: relative;
  display: grid;
  width: min(560px, 54vw);
  justify-items: end;
  gap: 10px;
}

.chapter-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid rgba(198, 154, 82, 0.34);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(12, 9, 7, 0.62);
  cursor: pointer;
  box-shadow: inset 0 0 18px rgba(198, 154, 82, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.chapter-pill:hover,
.chapter-pill[aria-expanded="true"] {
  border-color: rgba(198, 154, 82, 0.62);
  background: rgba(22, 14, 10, 0.82);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.chapter-count {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.chapter-title {
  color: rgba(244, 234, 215, 0.9);
  font-size: 15px;
  min-width: 0;
  white-space: nowrap;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.chapter-title.updating {
  opacity: 0;
  transform: translateY(2px);
}

.reading-progress {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(8, minmax(18px, 1fr));
  gap: 5px;
}

.reading-progress button {
  position: relative;
  height: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.reading-progress button::before {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  content: "";
  border-radius: 999px;
  background: rgba(244, 234, 215, 0.12);
  transform: translateY(-50%);
  transition: background 0.2s ease, box-shadow 0.2s ease, height 0.2s ease;
}

.reading-progress button.is-complete::before {
  background: rgba(120, 8, 21, 0.72);
}

.reading-progress button.is-current::before {
  height: 4px;
  background: linear-gradient(90deg, rgba(200, 13, 35, 0.92), rgba(198, 154, 82, 0.96));
  box-shadow: 0 0 16px rgba(198, 154, 82, 0.28);
}

.reading-progress button:hover::before,
.reading-progress button:focus-visible::before {
  background: rgba(198, 154, 82, 0.7);
}

.chapter-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 22;
  display: grid;
  width: min(280px, 80vw);
  padding: 10px;
  border: 1px solid rgba(198, 154, 82, 0.28);
  border-radius: 8px;
  background: rgba(10, 7, 6, 0.96);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.chapter-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chapter-menu button {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: rgba(244, 234, 215, 0.78);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.chapter-menu button:hover,
.chapter-menu button[aria-current="true"] {
  color: var(--paper);
  border-color: rgba(198, 154, 82, 0.34);
  background: rgba(198, 154, 82, 0.1);
}

.section {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 110px clamp(18px, 4vw, 32px);
  scroll-margin-top: 96px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
  align-items: center;
  max-width: none;
  width: 100%;
  min-height: 100vh;
  gap: clamp(34px, 6vw, 84px);
  padding: 130px max(24px, calc((100vw - var(--max)) / 2 + 32px)) 110px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 24% 38%, rgba(126, 18, 22, 0.24), transparent 36rem),
    radial-gradient(ellipse at 72% 44%, rgba(198, 154, 82, 0.1), transparent 32rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(18, 12, 10, 0.86) 22%, rgba(18, 13, 11, 0.82) 62%, rgba(0, 0, 0, 0.76));
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(244, 234, 215, 0.035), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.28)),
    radial-gradient(ellipse at 52% 50%, rgba(244, 234, 215, 0.035), transparent 42rem);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.54);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 690px;
  margin-bottom: 18px;
  color: #fff7ea;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.08;
  font-weight: 800;
}

h2 {
  margin-bottom: 16px;
  color: #fff7ea;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.14;
}

h3 {
  color: #fff6e9;
  font-size: 24px;
  line-height: 1.25;
}

.hero-copy,
.section-heading p {
  max-width: 720px;
  color: rgba(244, 234, 215, 0.76);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(244, 234, 215, 0.24);
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

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

.button.primary {
  border-color: var(--red);
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: white;
  box-shadow: 0 14px 34px rgba(200, 13, 35, 0.28);
}

.button.ghost {
  background: rgba(244, 234, 215, 0.08);
}

.hero-table {
  position: relative;
  min-height: 560px;
  background: transparent;
  box-shadow: none;
}

.hero-table::before {
  position: absolute;
  inset: 7% -6% 3%;
  z-index: -1;
  content: "";
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, rgba(198, 154, 82, 0.14), transparent 58%),
    radial-gradient(ellipse at 48% 42%, rgba(255, 246, 233, 0.08), transparent 42%);
  filter: blur(18px);
}

.table-card {
  position: absolute;
  width: 145px;
  border-radius: 4px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.36);
  transform-origin: center;
  animation: cardFloat 5s ease-in-out infinite;
}

.table-card-1 {
  left: 40px;
  top: 72px;
  transform: rotate(-14deg);
}

.table-card-2 {
  right: 58px;
  top: 56px;
  transform: rotate(12deg);
  animation-delay: 0.4s;
}

.table-card-3 {
  left: 50%;
  top: 170px;
  transform: translateX(-50%) rotate(2deg);
  animation-delay: 0.8s;
}

.table-card-4 {
  left: 92px;
  bottom: 44px;
  transform: rotate(10deg);
  animation-delay: 1.2s;
}

.table-token {
  position: absolute;
  right: 62px;
  bottom: 60px;
  width: 118px;
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

@keyframes cardFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

.section-heading {
  margin-bottom: 38px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.quick-grid article,
.component-card,
.setup-panel,
.card-annotation,
.turn-flow article,
.win-layout article,
.duel-panel,
.accordion details,
.faq-grid details,
.key-card-grid article,
.symbol-board {
  border: 1px solid rgba(198, 154, 82, 0.24);
  background:
    linear-gradient(160deg, rgba(244, 234, 215, 0.1), rgba(244, 234, 215, 0.035)),
    rgba(14, 10, 8, 0.72);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
}

.quick-grid article {
  min-height: 190px;
  padding: 24px;
}

.quick-grid span,
.setup-result span,
.key-card-grid span {
  display: block;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
}

.quick-grid strong {
  display: block;
  margin: 10px 0;
  color: white;
  font-size: 34px;
  line-height: 1;
}

.quick-grid p,
.rule-strip p,
.component-card p,
.turn-flow p,
.win-layout p,
.key-card-grid p,
.symbol-detail p,
.accordion p,
.faq-grid p,
.tie-rules p {
  color: rgba(244, 234, 215, 0.72);
}

.rule-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 28px;
  border: 1px solid rgba(198, 154, 82, 0.24);
  background: rgba(198, 154, 82, 0.24);
}

.rule-strip > div {
  padding: 22px;
  background: rgba(17, 12, 9, 0.88);
}

.rule-strip b {
  color: #fff6e9;
}

.setup-panel {
  padding: clamp(22px, 4vw, 36px);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.segmented button,
.duel-controls button {
  min-width: 86px;
  padding: 10px 16px;
  border: 1px solid rgba(244, 234, 215, 0.18);
  border-radius: 4px;
  color: var(--paper);
  cursor: pointer;
  background: rgba(244, 234, 215, 0.07);
}

.segmented button.active,
.duel-controls button.active {
  border-color: var(--red);
  background: rgba(200, 13, 35, 0.28);
}

.setup-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.setup-result div {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(244, 234, 215, 0.1);
}

.setup-result strong {
  display: block;
  color: white;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.2;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: setup;
}

.setup-steps li {
  position: relative;
  padding: 46px 18px 18px;
  min-height: 136px;
  border: 1px solid rgba(244, 234, 215, 0.12);
  background: rgba(244, 234, 215, 0.05);
  color: rgba(244, 234, 215, 0.8);
}

.setup-steps li::before {
  position: absolute;
  top: 14px;
  left: 18px;
  counter-increment: setup;
  content: "0" counter(setup);
  color: var(--gold);
  font-weight: 800;
}

.component-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 18px;
}

.component-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.component-card.large {
  min-height: 340px;
}

.mini-deck {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: 28px;
  display: flex;
  align-items: end;
  min-height: 190px;
  transform: translateX(-50%);
}

.mini-deck img {
  width: 92px;
  margin-left: -38px;
  border-radius: 4px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.34);
}

.mini-deck img:first-child {
  margin-left: 0;
}

.mini-deck img:nth-child(1) {
  rotate: -12deg;
}

.mini-deck img:nth-child(2) {
  rotate: -5deg;
}

.mini-deck img:nth-child(4) {
  rotate: 6deg;
}

.mini-deck img:nth-child(5) {
  rotate: 12deg;
}

.token-preview {
  width: 150px;
  margin: 20px auto 0;
  border-radius: 4px;
}

.deck-gallery {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}

.gallery-control {
  width: 48px;
  height: 96px;
  border: 1px solid rgba(198, 154, 82, 0.28);
  border-radius: 4px;
  color: var(--paper);
  background: rgba(244, 234, 215, 0.08);
  cursor: pointer;
  font-size: 34px;
}

.card-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 18px 4px 24px;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(198, 154, 82, 0.7) rgba(244, 234, 215, 0.12);
}

.card-track img {
  flex: 0 0 auto;
  width: 118px;
  border-radius: 4px;
  scroll-snap-align: start;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.card-track img:hover {
  transform: translateY(-8px);
}

.card-anatomy {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
}

.card-anatomy-visual {
  display: grid;
  justify-items: center;
  padding: clamp(20px, 4vw, 36px) clamp(20px, 4vw, 36px) clamp(72px, 8vw, 96px);
}

.annotated-card {
  position: relative;
  width: min(320px, 78vw);
  border-radius: 5px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
  overflow: visible;
}

.annotated-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.annotated-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  border-radius: 5px;
  pointer-events: none;
  background: rgba(9, 6, 5, 0.06);
  transition: background 0.2s ease;
}

.card-hotspot {
  position: absolute;
  z-index: 3;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  overflow: visible;
  transform: none;
}

.hotspot-dot {
  position: absolute;
  top: var(--dot-top, 50%);
  left: var(--dot-left, 50%);
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(210, 154, 72, 0.72);
  box-shadow: 0 0 0 4px rgba(210, 154, 72, 0.1), 0 0 14px rgba(210, 154, 72, 0.38);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.hotspot-dot::after {
  position: absolute;
  inset: -9px;
  content: "";
  border-radius: inherit;
  background: radial-gradient(circle, rgba(210, 154, 72, 0.28), transparent 68%);
  opacity: 0.42;
}

.card-hotspot:hover .hotspot-dot,
.card-hotspot:focus-visible .hotspot-dot,
.card-hotspot.active .hotspot-dot {
  width: 16px;
  height: 16px;
  background: rgba(255, 229, 173, 0.92);
  box-shadow: 0 0 0 5px rgba(210, 154, 72, 0.12), 0 0 22px rgba(210, 154, 72, 0.72), 0 0 42px rgba(200, 13, 35, 0.18);
}

.card-hotspot.active .hotspot-dot {
  animation: hotspotPulse 1.9s ease-in-out infinite;
}

.hotspot-point {
  left: 7%;
  top: 2%;
  width: 19%;
  height: 14%;
}

.hotspot-symbol {
  left: 8%;
  top: 13%;
  width: 21%;
  height: 8%;
}

.hotspot-pattern {
  left: 30%;
  top: 24%;
  width: 41%;
  height: 53%;
}

.hotspot-function {
  left: 78%;
  top: 7%;
  width: 17%;
  height: 48%;
}

.card-hotspot-tabs {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  z-index: 4;
  display: grid;
  width: min(480px, 92vw);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  transform: translateX(-50%);
}

.card-hotspot-tabs button {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(198, 154, 82, 0.28);
  border-radius: 999px;
  color: rgba(244, 234, 215, 0.72);
  background: rgba(244, 234, 215, 0.06);
  cursor: pointer;
  font-size: 13px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.card-hotspot-tabs button:hover,
.card-hotspot-tabs button.active {
  color: #fff7ea;
  border-color: rgba(198, 154, 82, 0.72);
  background: rgba(198, 154, 82, 0.14);
  box-shadow: 0 0 18px rgba(198, 154, 82, 0.1);
}

.card-hotspot-tabs button:focus-visible {
  outline: 2px solid rgba(198, 154, 82, 0.56);
  outline-offset: 3px;
}

.card-annotation {
  min-height: 360px;
  padding: clamp(30px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(198, 154, 82, 0.1), transparent 42%),
    rgba(16, 11, 9, 0.74);
}

.card-annotation.is-changing {
  animation: annotationIn 0.28s ease;
}

.annotation-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(198, 154, 82, 0.34);
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.card-annotation h3 {
  max-width: 620px;
  font-size: clamp(28px, 4vw, 48px);
}

.card-annotation > p:last-of-type {
  max-width: 620px;
  color: rgba(244, 234, 215, 0.74);
  font-size: 18px;
  line-height: 1.9;
}

@keyframes hotspotPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes annotationIn {
  0% {
    opacity: 0.62;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.turn-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.turn-flow article {
  position: relative;
  min-height: 220px;
  padding: 28px;
}

.turn-flow span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 32px;
  border: 1px solid rgba(198, 154, 82, 0.42);
  color: var(--gold);
}

.symbol-board {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 410px;
}

.symbol-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(198, 154, 82, 0.18);
}

.symbol-tabs button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 204px;
  border: 0;
  color: var(--paper);
  cursor: pointer;
  background: rgba(13, 9, 7, 0.9);
}

.symbol-tabs button.active {
  background:
    linear-gradient(160deg, rgba(200, 13, 35, 0.22), rgba(13, 9, 7, 0.9)),
    rgba(13, 9, 7, 0.9);
}

.symbol-tabs img {
  width: 70px;
  height: 112px;
  object-fit: cover;
  object-position: center;
  border-radius: 3px;
}

.symbol-tabs span {
  font-size: 20px;
  font-weight: 700;
}

.symbol-detail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 58px);
}

.symbol-kicker {
  color: var(--gold);
  font-weight: 700;
}

.symbol-detail h3 {
  max-width: 620px;
  font-size: clamp(28px, 4vw, 48px);
}

.key-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.key-card-grid article {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 26px;
}

.key-card-grid img {
  width: 150px;
  border-radius: 4px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
}

.duel-panel {
  padding: clamp(22px, 4vw, 34px);
}

.duel-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.duel-table {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 0.8fr) 1fr;
  align-items: center;
  gap: clamp(16px, 4vw, 42px);
  min-height: 360px;
}

.duel-player {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.duel-player span {
  color: var(--gold);
  font-weight: 700;
}

.duel-player img {
  width: 150px;
  border-radius: 4px;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.36);
  transition: transform 0.24s ease, filter 0.24s ease;
}

.duel-player img.flipped {
  transform: rotateY(360deg);
}

.duel-player strong {
  color: white;
  font-size: 34px;
  line-height: 1;
}

.duel-vs {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.duel-vs span {
  min-height: 74px;
  color: rgba(244, 234, 215, 0.78);
}

.tie-rules {
  margin-top: 24px;
  padding: 18px;
  border-left: 3px solid var(--red);
  background: rgba(0, 0, 0, 0.2);
}

.win-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.win-layout article {
  min-height: 290px;
  padding: 28px;
}

.badge-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.badge-row img {
  width: 70px;
  border-radius: 3px;
  animation: tokenGlow 2.4s ease-in-out infinite;
}

.badge-row img:nth-child(2) {
  animation-delay: 0.3s;
}

.badge-row img:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes tokenGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(200, 13, 35, 0));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(200, 13, 35, 0.5));
  }
}

.accordion,
.faq-grid {
  display: grid;
  gap: 12px;
}

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

details {
  padding: 0;
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 22px;
  color: #fff6e9;
  font-weight: 700;
}

summary::-webkit-details-marker {
  display: none;
}

details p {
  padding: 0 22px 22px;
  margin: 0;
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 70px 20px;
  border-top: 1px solid rgba(244, 234, 215, 0.12);
  background: rgba(0, 0, 0, 0.24);
}

.site-footer img {
  width: 150px;
}

.site-footer p {
  color: rgba(244, 234, 215, 0.62);
}

.icp-link {
  color: rgba(244, 234, 215, 0.48);
  font-size: 13px;
  transition: color 0.18s ease;
}

.icp-link:hover {
  color: rgba(198, 154, 82, 0.86);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .progress-nav {
    width: min(440px, 58vw);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-table {
    min-height: 500px;
  }

  .quick-grid,
  .turn-flow,
  .setup-steps,
  .win-layout {
    grid-template-columns: repeat(2, 1fr);
  }

  .component-layout,
  .symbol-board,
  .key-card-grid,
  .card-anatomy {
    grid-template-columns: 1fr;
  }

  .symbol-board {
    min-height: 0;
  }

  .duel-table {
    grid-template-columns: 1fr;
  }

  .duel-vs {
    order: -1;
  }
}

@media (max-width: 680px) {
  .site-header {
    gap: 12px;
    padding: 12px 16px 14px;
  }

  .brand {
    width: 112px;
    min-width: 94px;
  }

  .progress-nav {
    width: min(220px, calc(100vw - 156px));
    gap: 8px;
  }

  .chapter-pill {
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    gap: 7px;
  }

  .chapter-count {
    font-size: 12px;
  }

  .chapter-title {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
  }

  .reading-progress {
    gap: 3px;
  }

  .reading-progress button {
    height: 10px;
  }

  .reading-progress button::before {
    height: 2px;
  }

  .reading-progress button.is-current::before {
    height: 3px;
  }

  .chapter-menu {
    right: 0;
    width: min(260px, calc(100vw - 32px));
  }

  .section {
    padding: 82px 16px;
    scroll-margin-top: 84px;
  }

  .hero {
    padding-top: 104px;
  }

  .hero-bg {
    inset: 0;
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 31px;
  }

  .hero-copy,
  .section-heading p {
    font-size: 16px;
  }

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

  .hero-table {
    min-height: 420px;
  }

  .table-card {
    width: 104px;
  }

  .table-card-1 {
    left: 20px;
    top: 62px;
  }

  .table-card-2 {
    right: 22px;
    top: 46px;
  }

  .table-card-3 {
    top: 150px;
  }

  .table-card-4 {
    left: 34px;
    bottom: 46px;
  }

  .table-token {
    right: 30px;
    bottom: 52px;
    width: 90px;
  }

  .quick-grid,
  .rule-strip,
  .setup-result,
  .setup-steps,
  .turn-flow,
  .win-layout,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .quick-grid article {
    min-height: auto;
  }

  .component-card.large {
    min-height: 430px;
  }

  .mini-deck {
    left: 50%;
    bottom: 30px;
  }

  .mini-deck img {
    width: 76px;
    margin-left: -30px;
  }

  .deck-gallery {
    grid-template-columns: 1fr;
  }

  .gallery-control {
    display: none;
  }

  .card-track img {
    width: 104px;
  }

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

  .symbol-tabs button {
    min-height: 176px;
  }

  .symbol-tabs img {
    width: 58px;
    height: 94px;
  }

  .key-card-grid article {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
  }

  .key-card-grid img {
    width: 110px;
  }

  .card-anatomy-visual {
    padding: 10px 0 112px;
  }

  .annotated-card {
    width: min(300px, 72vw);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.38);
  }

  .annotated-card img {
    box-shadow: none;
  }

  .card-hotspot {
    position: absolute;
    transform: none;
  }

  .hotspot-point {
    width: 52px;
    height: 64px;
  }

  .hotspot-symbol {
    width: 58px;
    height: 32px;
  }

  .hotspot-pattern {
    width: 126px;
    height: 196px;
  }

  .hotspot-function {
    width: 40px;
    height: 182px;
  }

  .card-hotspot-tabs {
    top: calc(100% + 14px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .card-hotspot-tabs button {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .card-annotation {
    min-height: 260px;
    padding: 24px;
  }

  .duel-player img {
    width: 126px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
