:root {
  --ink: #181916;
  --muted: #62685f;
  --paper: #fbfbf7;
  --surface: #ffffff;
  --line: #d9ded2;
  --green: #3f6f60;
  --rust: #a15c3f;
  --blue: #4d6684;
  --gold: #b08a3c;
  --shadow: 0 18px 48px rgba(24, 25, 22, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: top 0.18s ease;
}

.skip-link:focus-visible {
  top: 14px;
}

:focus-visible {
  outline: 3px solid rgba(176, 138, 60, 0.72);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 251, 247, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner,
.section-inner,
.hero-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.mark {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  background: rgba(63, 111, 96, 0.1);
}

.hero {
  position: relative;
  min-height: 68svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 78% 24%, rgba(176, 138, 60, 0.2), transparent 26%),
    linear-gradient(135deg, #f7f8f2 0%, #eef4ef 46%, #f7f3ee 100%);
}

.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 72px 0 86px;
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-weight: 680;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  font-size: clamp(38px, 7vw, 76px);
}

h2 {
  font-size: clamp(26px, 4vw, 42px);
}

h3 {
  font-size: 20px;
}

.lead {
  max-width: 660px;
  margin: 24px 0 0;
  color: #3e443b;
  font-size: 18px;
}

.hero-actions,
.page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 6px;
  font-weight: 650;
}

.button {
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  border-color: var(--line);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(24, 25, 22, 0.12);
}

.button:active {
  transform: translateY(0);
}

.text-link {
  color: var(--green);
  min-height: auto;
}

.section {
  padding: 72px 0;
}

.section.compact {
  padding: 48px 0;
}

.band {
  background: #eef3ee;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head p,
.page-intro p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
}

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

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

.card {
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card,
.download-card,
.guide-item,
.faq-list details {
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.card:hover,
.download-card:hover,
.guide-item:hover,
.faq-list details:hover {
  border-color: rgba(63, 111, 96, 0.42);
  transform: translateY(-1px);
}

.card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eef3ee;
  color: var(--green);
  font-size: 13px;
  font-weight: 650;
}

.tag.rust {
  background: #f4eee9;
  color: var(--rust);
}

.tag.blue {
  background: #edf1f5;
  color: var(--blue);
}

.tag.gold {
  background: #f6f0df;
  color: var(--gold);
}

.timeline {
  display: grid;
  gap: 14px;
}

.entry {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.entry time {
  color: var(--muted);
  font-size: 14px;
}

.entry p {
  margin: 8px 0 0;
  color: var(--muted);
}

.page-hero {
  padding: 72px 0 52px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f8faf6 0%, #eef4ef 100%);
}

.page-intro {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
}

.page-intro h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.empty-state {
  padding: 34px;
  border: 1px dashed #b9c1b5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.empty-state p {
  margin: 10px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.empty-state code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  padding: 2px 6px;
  color: var(--ink);
  font-size: 0.92em;
}

.download-list {
  display: grid;
  gap: 14px;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.download-card h2 {
  margin-top: 12px;
  font-size: 24px;
}

.download-card p {
  margin: 10px 0 0;
  color: var(--muted);
}

.file-meta {
  font-size: 14px;
}

.hash {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: var(--muted);
}

.guide-list {
  display: grid;
  gap: 12px;
}

.guide-item {
  display: grid;
  grid-template-columns: 56px 220px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.guide-item span {
  color: var(--gold);
  font-weight: 750;
}

.guide-item strong {
  font-size: 20px;
}

.guide-item em {
  color: var(--muted);
  font-style: normal;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.status-strip > div {
  padding: 22px;
  background: rgba(255, 255, 255, 0.78);
}

.status-strip span {
  display: block;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.status-strip strong {
  display: block;
  font-size: 20px;
}

.status-strip p {
  margin: 10px 0 0;
  color: var(--muted);
}

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

.process-list article {
  padding: 20px;
  border-top: 3px solid var(--green);
  background: rgba(255, 255, 255, 0.76);
  border-radius: 8px;
}

.process-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}

.process-list p,
.article-stack p,
.spec-list dd,
.faq-list p {
  color: var(--muted);
}

.article-stack {
  display: grid;
  gap: 18px;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.feature-list article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.feature-list span {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.feature-list p {
  margin: 12px 0 0;
  color: var(--muted);
}

.article-stack article {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.article-stack p {
  margin: 12px 0 0;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.spec-list div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.spec-list dt {
  margin-bottom: 8px;
  font-weight: 750;
}

.spec-list dd {
  margin: 0;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px 20px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 750;
}

.faq-list p {
  margin: 12px 0 0;
}

.tool-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.tool-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.tool-head h2 {
  margin-top: 10px;
  font-size: 28px;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.field span,
.tool-note {
  color: var(--muted);
  font-size: 14px;
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.tool-note {
  margin: 12px 0 0;
}

.result-grid {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.result-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(238, 243, 238, 0.5);
}

.result-item span {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.result-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 650;
}

.result-item.warning {
  grid-template-columns: 72px 1fr;
  background: #f6f0df;
}

.copy-button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.poker-hero {
  background: linear-gradient(135deg, #f5f6ef 0%, #edf4ef 48%, #f4efe8 100%);
}

.poker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.poker-table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f9faf5;
  box-shadow: var(--shadow);
}

.poker-topbar,
.user-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.poker-topbar h2 {
  margin-top: 8px;
  font-size: 28px;
}

.pot-box {
  min-width: 112px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-align: right;
}

.pot-box span,
.community-area span,
.user-panel span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pot-box span {
  color: rgba(255, 255, 255, 0.68);
}

.pot-box strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

.poker-table {
  position: relative;
  min-height: 560px;
  padding: 26px;
  background:
    radial-gradient(ellipse at center, rgba(63, 111, 96, 0.22), transparent 58%),
    linear-gradient(145deg, #e9f0e9, #f9faf5);
}

.community-area {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(420px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  padding: 18px;
  border: 1px solid rgba(63, 111, 96, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.cards-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.community-cards {
  justify-content: center;
  margin-top: 12px;
}

.playing-card {
  width: 46px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfd5ca;
  border-radius: 7px;
  background: #fff;
  color: #161712;
  font-size: 19px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(24, 25, 22, 0.1);
}

.red-card {
  color: #b64235;
}

.card-back {
  background:
    linear-gradient(135deg, rgba(77, 102, 132, 0.18), rgba(63, 111, 96, 0.16)),
    #222822;
  color: #fff;
}

.empty-card {
  color: #9aa297;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: none;
}

.players-ring {
  position: absolute;
  inset: 20px;
}

.poker-player {
  position: absolute;
  width: 190px;
  min-height: 138px;
  padding: 12px;
  border: 1px solid rgba(217, 222, 210, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.poker-player:nth-child(1) {
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

.poker-player:nth-child(2) {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.poker-player:nth-child(3) {
  left: 24%;
  top: 0;
}

.poker-player:nth-child(4) {
  right: 24%;
  top: 0;
}

.poker-player:nth-child(5) {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.poker-player.acting {
  outline: 3px solid rgba(176, 138, 60, 0.48);
}

.poker-player.folded {
  opacity: 0.52;
}

.poker-player.dealer-seat::after {
  content: "D";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-weight: 800;
}

.player-head,
.player-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.player-head span,
.player-meta span,
.poker-player p {
  color: var(--muted);
  font-size: 13px;
}

.mini-cards {
  margin: 12px 0;
}

.mini-cards .playing-card {
  width: 38px;
  height: 52px;
  font-size: 16px;
}

.user-panel {
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.user-panel .cards-row {
  margin-top: 10px;
}

.action-panel {
  max-width: 520px;
  text-align: right;
}

.action-panel p {
  margin: 0 0 12px;
  color: var(--muted);
}

.action-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.action-buttons button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.poker-side {
  display: grid;
  gap: 16px;
}

.poker-log {
  max-height: 460px;
  overflow: auto;
  margin: 16px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.poker-log li + li {
  margin-top: 8px;
}

.xiangqi-hero {
  background: linear-gradient(135deg, #f6f7ef 0%, #eef4ef 48%, #f6efe9 100%);
}

.xiangqi-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.xiangqi-board-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9faf5;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.xiangqi-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.xiangqi-topbar h2 {
  margin-top: 8px;
  font-size: 28px;
}

.xiangqi-topbar p {
  margin: 8px 0 0;
  color: var(--muted);
}

.engine-pill {
  min-width: 112px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.engine-pill.ready {
  background: #eef3ee;
  color: var(--green);
}

.xiangqi-board-wrap {
  min-width: 0;
  padding: 30px;
  background:
    radial-gradient(circle at 50% 45%, rgba(176, 138, 60, 0.14), transparent 38%),
    linear-gradient(145deg, #ede6d9, #f8f4ec);
}

.xiangqi-board {
  --xiangqi-piece-size: clamp(34px, 7vw, 52px);
  position: relative;
  min-width: 0;
  width: min(calc(100% - var(--xiangqi-piece-size)), 620px);
  aspect-ratio: 8 / 9;
  margin: 0 auto;
  background:
    linear-gradient(#b58b62 1px, transparent 1px),
    linear-gradient(90deg, #b58b62 1px, transparent 1px),
    #f5dfbd;
  background-size: calc(100% / 8) calc(100% / 9);
  background-position: 0 0;
  outline: 2px solid #9d7650;
}

.xiangqi-cell {
  position: absolute;
  width: var(--xiangqi-piece-size);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  padding: 0;
}

.xiangqi-cell.selected::after,
.xiangqi-cell.target::after {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 2px solid rgba(63, 111, 96, 0.72);
  pointer-events: none;
}

.xiangqi-cell.target::after {
  inset: 36%;
  background: rgba(63, 111, 96, 0.42);
  border: 0;
}

.xiangqi-piece {
  position: relative;
  z-index: 1;
  width: min(100%, calc(var(--xiangqi-piece-size) - 6px));
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #fff7e8;
  box-shadow: 0 8px 18px rgba(24, 25, 22, 0.12);
  font-size: clamp(16px, 3.6vw, 25px);
  font-weight: 800;
  line-height: 1;
}

.xiangqi-piece.red {
  color: #b64235;
}

.xiangqi-piece.black {
  color: #1d2420;
}

.xiangqi-side {
  display: grid;
  gap: 16px;
}

.xiangqi-actions {
  justify-content: flex-start;
  margin-top: 18px;
}

.xiangqi-readout {
  display: grid;
  gap: 10px;
  margin: 0;
}

.xiangqi-readout div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.xiangqi-readout div:last-child {
  border-bottom: 0;
}

.xiangqi-readout dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.xiangqi-readout dd {
  margin: 0;
  font-weight: 760;
}

.xiangqi-log {
  max-height: 300px;
  overflow: auto;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.xiangqi-log li + li {
  margin-top: 8px;
}

.idea-machine {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: stretch;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.idea-part {
  min-height: 112px;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(238, 243, 238, 0.9), rgba(255, 255, 255, 0.86));
  border: 1px solid rgba(217, 222, 210, 0.86);
}

.idea-part span {
  display: block;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.idea-part strong {
  display: block;
  font-size: 20px;
  line-height: 1.35;
}

.idea-machine .button {
  align-self: center;
  white-space: nowrap;
}

.mini-card {
  position: relative;
  overflow: hidden;
}

.mini-card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(63, 111, 96, 0.22);
  opacity: 0.72;
}

.lab-shell {
  min-height: calc(100svh - 64px);
  background:
    radial-gradient(circle at 78% 14%, rgba(77, 102, 132, 0.25), transparent 28%),
    radial-gradient(circle at 20% 82%, rgba(176, 138, 60, 0.13), transparent 24%),
    #080b0d;
  color: #f4f7f1;
}

.lab-top {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 44px 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.lab-kicker {
  margin: 0 0 12px;
  color: #9fc7b8;
  font-size: 13px;
  font-weight: 760;
}

.lab-top h1 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 62px);
}

.lab-top p {
  max-width: 720px;
  margin: 14px 0 0;
  color: rgba(244, 247, 241, 0.72);
  font-size: 16px;
}

.lab-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lab-actions a,
.lab-actions button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #f4f7f1;
  font: inherit;
  cursor: pointer;
}

.lab-workbench {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  padding: 28px 0 42px;
}

.lab-panel,
.lab-stage {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.lab-panel {
  padding: 18px;
}

.lab-panel-head h2 {
  margin-top: 10px;
  font-size: 28px;
}

.lab-control {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.lab-control span,
.lab-check,
.lab-readout dt {
  color: rgba(244, 247, 241, 0.7);
  font-size: 13px;
  font-weight: 650;
}

.lab-control output {
  float: right;
  color: #f4f7f1;
}

.lab-control select,
.lab-control input[type="range"] {
  width: 100%;
}

.lab-control select {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: #121719;
  color: #f4f7f1;
  font: inherit;
}

.lab-control input[type="range"] {
  accent-color: #9fc7b8;
}

.lab-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.lab-check input {
  width: 18px;
  height: 18px;
  accent-color: #9fc7b8;
}

.lab-button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.lab-button-row button {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f7f1;
  font: inherit;
  cursor: pointer;
}

.lab-readout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 20px 0 0;
}

.lab-readout div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.lab-readout dd {
  margin: 0;
  color: #f4f7f1;
  font-weight: 750;
}

.lab-stage {
  position: relative;
  min-height: 640px;
  overflow: hidden;
}

#labCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.not-found {
  min-height: calc(100svh - 64px);
  display: grid;
  place-items: center;
  padding: 48px 16px;
  text-align: center;
}

.not-found p {
  max-width: 560px;
  margin: 18px auto 0;
  color: var(--muted);
}

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 780px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
    gap: 10px;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: 72svh;
  }

  .hero canvas {
    opacity: 0.16;
  }

  .hero-inner {
    padding: 58px 0 70px;
  }

  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .idea-machine {
    grid-template-columns: 1fr;
  }

  .guide-item,
  .status-strip,
  .process-list,
  .spec-list,
  .feature-list,
  .tool-layout,
  .poker-layout,
  .xiangqi-layout {
    grid-template-columns: 1fr;
  }

  .xiangqi-board-wrap {
    padding: 22px;
  }

  .xiangqi-board {
    --xiangqi-piece-size: clamp(28px, 8.2vw, 38px);
    width: calc(100% - var(--xiangqi-piece-size));
  }

  .tool-head {
    flex-direction: column;
  }

  .result-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .download-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .poker-table {
    min-height: auto;
    padding: 16px;
  }

  .community-area,
  .players-ring,
  .poker-player {
    position: static;
    transform: none !important;
    width: auto;
  }

  .community-area {
    width: auto;
    margin-bottom: 14px;
  }

  .players-ring {
    display: grid;
    gap: 12px;
  }

  .poker-topbar,
  .xiangqi-topbar,
  .user-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .action-panel {
    max-width: none;
    text-align: left;
  }

  .action-buttons {
    justify-content: flex-start;
  }

  .idea-part {
    min-height: auto;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .lab-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .lab-workbench {
    grid-template-columns: 1fr;
  }

  .lab-stage {
    order: -1;
    min-height: 62svh;
  }
}

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