:root {
  /* 翡翠金桌（Emerald & Gold）— 跟随 poker-miniapp/src/index.css */
  /* 背景 / 表面（墨绿俱乐部质感） */
  --bg: #0a0e0d;
  --bg-2: #0d1311;
  --surface: #101614;
  --surface-2: #18211e;
  --surface-3: #22302c;
  --line: #2a3b36;
  --line-strong: #3a4f48;

  /* 文字层级 */
  --text: #f2f5f3;
  --text-2: #f2f5f3;
  --text-3: #9aaaa3;
  --text-muted: #9aaaa3;
  --text-faint: #5f6e68;

  /* 品牌色（翡翠金桌） */
  --primary: #e8b54d;       /* 古金 */
  --primary-2: #c9962f;     /* 古金深 */
  --primary-3: #f0c263;     /* 古金亮 */
  --accent: #1e8a5e;        /* 翡翠绿 */
  --accent-2: #2aa574;      /* 翡翠绿亮 */
  --gold: #e8b54d;

  /* 牌桌（felt 径向渐变 — 来自 miniapp） */
  --felt-1: #23996b;
  --felt-2: #0f5234;
  --felt-3: #072314;
  --felt-deep: #0f5234;
  --felt-deep-border: #4a3417;

  /* 警示（古金调暖色，避色冲突） */
  --warn: #f0913c;
  --warn-bg: rgba(240, 145, 60, .08);
  --warn-border: rgba(240, 145, 60, .35);

  /* 短牌 6+ 品牌紫（点缀） */
  --sd-purple: #7c5cd6;
  --sd-bright: #a98fe8;

  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .35), 0 0 0 1px rgba(232, 181, 77, .05);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, .45), 0 0 0 1px rgba(232, 181, 77, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
    "Hiragino Sans GB", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--primary); color: #221a07; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
:focus-visible { outline: 2px solid var(--primary-3); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
header.site {
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 13, .82);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.brand::before {
  content: "\2660"; /* ♠ */
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--primary-3), var(--primary) 55%, var(--primary-2));
  color: #221a07;
  font-size: 15px;
  line-height: 28px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(232, 181, 77, .35);
}
.brand span { color: var(--primary); }

nav.main { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
nav.main a { color: var(--text-3); font-size: 15px; position: relative; padding: 3px 0; }
nav.main a:hover, nav.main a.active { color: var(--primary); text-decoration: none; }
nav.main a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-3));
}
/* 试玩入口(nav 常驻按钮)—— 古金实心,与导航文字区分 */
nav.main a.nav-play {
  background: linear-gradient(180deg, var(--primary-3), var(--primary) 55%, var(--primary-2));
  color: #221a07;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(232, 181, 77, .3);
  transition: transform .15s ease, box-shadow .15s ease;
}
nav.main a.nav-play:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(232, 181, 77, .45);
}
@media (max-width: 600px) {
  nav.main a.nav-play { padding: 4px 10px; font-size: 13px; }
}

.langs { display: flex; gap: 6px; align-items: center; }
.lang {
  font-size: 13px;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 9px;
  white-space: nowrap;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.lang:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.lang.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(232, 181, 77, .1);
  font-weight: 600;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding: 58px 0 52px;
  background:
    radial-gradient(110% 120% at 12% -10%, rgba(30, 138, 94, .35) 0%, rgba(30, 138, 94, 0) 58%),
    radial-gradient(80% 90% at 98% 8%, rgba(232, 181, 77, .14) 0%, rgba(232, 181, 77, 0) 62%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(232, 181, 77, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(232, 181, 77, .05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(85% 75% at 18% 25%, #000 0%, transparent 78%);
  mask-image: radial-gradient(85% 75% at 18% 25%, #000 0%, transparent 78%);
  pointer-events: none;
}
.hero::after {
  content: "\2660 \2665 \2666 \2663";
  position: absolute;
  right: -12px;
  bottom: -34px;
  font-size: 148px;
  line-height: 1;
  letter-spacing: .06em;
  color: rgba(232, 181, 77, .06);
  white-space: nowrap;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }

@keyframes rise {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}
.hero .wrap > * { animation: rise .55s cubic-bezier(.2, .7, .3, 1) both; }
.hero .wrap > *:nth-child(2) { animation-delay: .06s; }
.hero .wrap > *:nth-child(3) { animation-delay: .12s; }
.hero .wrap > *:nth-child(4) { animation-delay: .18s; }

.hero h1 { font-size: 33px; line-height: 1.35; margin: 0 0 14px; letter-spacing: -0.5px; color: var(--text); }
.hero h1 .accent { color: var(--primary); }
.hero p.lead { font-size: 17px; color: var(--text-3); margin: 0 0 24px; max-width: 640px; }

/* 36 張牌示意 */
.deck { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 26px; }
.deck i {
  font-style: normal;
  min-width: 34px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.deck i.out {
  color: var(--text-faint);
  background: var(--bg-2);
  border-style: dashed;
  text-decoration: line-through;
  box-shadow: none;
}

.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--primary-3), var(--primary) 55%, var(--primary-2));
  color: #221a07;
  padding: 11px 22px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(232, 181, 77, .35);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover {
  background: linear-gradient(180deg, var(--primary-3), var(--primary) 45%, var(--primary-2));
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232, 181, 77, .45);
}
.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn.ghost:hover { background: rgba(232, 181, 77, .12); }
/* 试玩主 CTA —— 比默认 .btn 更亮一点,首屏最显眼 */
.btn.play {
  box-shadow: 0 4px 16px rgba(232, 181, 77, .4);
}
.btn.play:hover {
  box-shadow: 0 8px 22px rgba(232, 181, 77, .55);
}
/* CTA 下方合规说明 */
.cta-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-faint);
}
/* 页内试玩引导块(规则页 FAQ 之后) */
.play-cta {
  margin: 36px 0 0;
  padding: 26px 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(90% 120% at 8% 0%, rgba(30, 138, 94, .16) 0%, rgba(30, 138, 94, 0) 62%),
    var(--surface);
  box-shadow: var(--shadow-md);
}
.play-cta h3 { margin: 0 0 6px; color: var(--text); }
.play-cta p { margin: 0 0 16px; color: var(--text-3); font-size: 15px; }
.play-cta .cta { margin: 0; }

/* 術語頁篩選框 */
.gloss-search { max-width: 420px; }
.gloss-search input {
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gloss-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 181, 77, .15);
}

/* ---------- sections ---------- */
section { padding: 52px 0; }
section.alt {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
h2 { font-size: 24px; margin: 0 0 8px; letter-spacing: -0.3px; color: var(--text); }
h2::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  margin-bottom: 13px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
h2 + .sub { color: var(--text-3); margin: 0 0 24px; font-size: 15px; }
h3 { font-size: 18px; margin: 28px 0 8px; color: var(--text); }
p { margin: 0 0 14px; color: var(--text); }
ul, ol { margin: 0 0 16px; padding-left: 22px; color: var(--text); }
li { margin-bottom: 7px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 22px; }
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
}
.card:hover::before { transform: scaleX(1); }
.card h3 { margin-top: 0; font-size: 17px; color: var(--text); }
.card p { margin: 0; color: var(--text-3); font-size: 15px; }

/* ---------- tables ---------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 22px 0;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
th, td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 11px 13px;
  text-align: left;
  vertical-align: top;
  color: var(--text);
}
th:last-child, td:last-child { border-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
th {
  background: linear-gradient(180deg, rgba(30, 138, 94, .25), rgba(30, 138, 94, .12));
  color: var(--primary-3);
  font-weight: 700;
  white-space: nowrap;
}
td.mid, th.mid { background: var(--bg-2); }
tbody tr { transition: background .15s ease; }
tbody tr:hover td { background: rgba(232, 181, 77, .06); }
.diff { color: var(--primary); font-weight: 700; }
.yes { color: var(--accent-2); font-weight: 700; }

/* ---------- note ---------- */
.note {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn);
  padding: 16px 20px;
  border-radius: 4px var(--radius) var(--radius) 4px;
  margin: 22px 0;
  font-size: 15px;
  box-shadow: var(--shadow-sm);
  border-top: 1px solid var(--warn-border);
  border-right: 1px solid var(--warn-border);
  border-bottom: 1px solid var(--warn-border);
  color: var(--text);
}
.note strong { color: var(--warn); }

/* ---------- rank list ---------- */
.ranklist { counter-reset: r; list-style: none; padding: 0; margin: 18px 0; }
.ranklist li {
  counter-increment: r;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  color: var(--text);
}
.ranklist li:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}
.ranklist li::before {
  content: counter(r);
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 50%;
  background: rgba(232, 181, 77, .15);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(232, 181, 77, .25);
}
.ranklist li.flip {
  background: rgba(240, 145, 60, .1);
  border-color: rgba(240, 145, 60, .35);
}
.ranklist li.flip::before {
  background: rgba(240, 145, 60, .2);
  color: var(--warn);
  box-shadow: inset 0 0 0 1px rgba(240, 145, 60, .35);
}

/* ---------- footer ---------- */
footer.site {
  margin-top: 48px;
  border-top: 0;
  padding: 56px 0 44px;
  position: relative;
  color: var(--text-3);
  font-size: 14px;
  background:
    radial-gradient(60% 110% at 50% 0%, rgba(30, 138, 94, .18) 0%, rgba(30, 138, 94, 0) 72%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}
footer.site::before {
  content: "";
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 96px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  border-radius: 0 0 4px 4px;
}
footer.site::after {
  content: "♠ ♥ ♦ ♣";
  position: absolute; right: 32px; bottom: 18px;
  font-size: 36px; letter-spacing: 8px;
  color: rgba(232, 181, 77, .1);
  pointer-events: none;
}
footer.site .wrap { max-width: 720px; text-align: center; }
footer.site p { margin: 4px 0; color: var(--text-3); }
footer.site p:first-child {
  font-size: 16px; color: var(--primary);
  font-weight: 600; margin-bottom: 8px;
}
footer.site p:last-child { font-size: 12px; opacity: .65; margin-top: 14px; }
footer.site a { color: var(--text-3); }
footer.site a:hover { color: var(--primary); }
/* Telegram 承接入口(试玩后的沉淀路径) */
footer.site .tg-entry {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
footer.site .tg-entry a {
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid rgba(232, 181, 77, .4);
}
footer.site .tg-entry a:hover { color: var(--primary-3); text-decoration: none; }
footer.site .tg-note { font-size: 12px; opacity: .7; }
@media (max-width: 600px) {
  footer.site::after { font-size: 24px; right: 16px; }
}

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 100;
  background: linear-gradient(90deg, var(--accent), var(--primary), var(--primary-2));
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform .08s linear;
  pointer-events: none;
}

/* ---------- scroll-to-top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px;
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(180deg, var(--primary-3), var(--primary) 55%, var(--primary-2));
  color: #221a07;
  display: flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s, transform .25s, background .2s;
  z-index: 60;
}
.to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: linear-gradient(180deg, var(--primary-3), var(--primary) 45%, var(--primary-2)); }
.to-top svg { width: 18px; height: 18px; fill: none; stroke: #221a07; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 600px) { .to-top { right: 14px; bottom: 14px; width: 40px; height: 40px; } }

/* ---------- h1 区卡牌角标（内容页 hero 也吃到）---------- */
.hero .wrap { position: relative; }
.hero .wrap::after {
  content: "♠";
  position: absolute;
  right: 6px; top: -10px;
  font-size: 132px; line-height: 1;
  color: rgba(232, 181, 77, .12);
  pointer-events: none;
  transform: rotate(-14deg);
  transition: transform .45s ease, color .3s;
  font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols2", sans-serif;
}
.hero:hover .wrap::after { transform: rotate(-6deg) scale(1.06); color: rgba(232, 181, 77, .2); }
@media (max-width: 600px) {
  .hero .wrap::after { font-size: 86px; right: 4px; top: -6px; }
}

/* ---------- 入场动画（IntersectionObserver 触发 .in）---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .05s; }
.reveal[data-d="2"] { transition-delay: .12s; }
.reveal[data-d="3"] { transition-delay: .2s; }
.reveal[data-d="4"] { transition-delay: .28s; }

/* ---------- 自定义滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; border: 2px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
* { scrollbar-color: var(--line-strong) var(--bg-2); scrollbar-width: thin; }

/* ---------- 内容区链接下划线动画 ---------- */
main a, section a, .lead a, p a, li a:not(.lang):not(.active) {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .25s ease;
}
main a:hover, section a:hover, .lead a:hover, p a:hover,
li a:hover:not(.lang):not(.active) {
  background-size: 100% 1.5px;
}

/* ---------- 表格行 hover 强化 ---------- */
tbody tr { transition: background .15s, box-shadow .15s, transform .15s; }
tbody tr:hover {
  background: linear-gradient(90deg, rgba(232, 181, 77, .12) 0%, rgba(232, 181, 77, .04) 100%);
  box-shadow: 0 2px 10px rgba(232, 181, 77, .08);
  transform: translateX(2px);
}

/* ---------- responsive ---------- */
@media (max-width: 600px) {
  .hero { padding: 38px 0 34px; }
  .hero h1 { font-size: 26px; }
  .hero::after { font-size: 96px; bottom: -22px; }
  .deck i { min-width: 30px; height: 40px; font-size: 13px; padding: 0 4px; }
  section { padding: 36px 0; }
  h2 { font-size: 21px; }
  table { font-size: 14px; }
  th, td { padding: 9px 10px; }
  nav.main { gap: 14px; }
}

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