:root {
  --paper: #f7f6f0;
  --white: #fffefa;
  --ink: #233b32;
  --muted: #5f6b62;
  --line: #dedfd3;
  --orange: #c54724;
  --orange-light: #fff0dc;
  --green: #227453;
  --green-light: #e7f2ec;
  --sans: "Helvetica Neue", Arial, "PingFang HK", "Noto Sans CJK TC", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
[hidden] { display: none !important; }
h1 { font-size: 32px; line-height: 1.3; margin: 0 0 12px; }
h2 { font-size: 22px; line-height: 1.4; margin: 0; }
.sr-only, .skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { top: -80px; left: 16px; z-index: 10; width: auto; height: auto; clip: none; padding: 10px 20px; border-radius: 5px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 10px; }

.site-shell { max-width: 1000px; padding: 0 32px 40px; margin: auto; }
.site-header { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { position: relative; display: grid; place-items: center; background: var(--orange); color: var(--white); width: 44px; height: 44px; font-size: 28px; font-weight: 700; border-radius: 10px 10px 10px 2px; }
.brand-mark > span { position: absolute; right: -5px; top: -7px; background: var(--paper); color: var(--orange); font-size: 22px; width: 20px; height: 22px; line-height: 22px; }
.brand-type { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.nav { display: flex; gap: 28px; }
.nav-link { border: 0; background: none; padding: 16px 0; color: var(--muted); font-size: 16px; text-decoration: none; }
.nav-link:hover { color: var(--ink); text-decoration: underline; }
.demo-badge { display: flex; align-items: center; gap: 8px; font-size: 14px; border: 1px solid var(--line); border-radius: 24px; padding: 4px 12px; white-space: nowrap; }
.demo-badge > span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

.hero { padding: 32px 0 24px; }
.hero p { margin: 0; color: var(--muted); }

.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.game-card { position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 26px 28px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.game-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.game-card p { margin: 0; color: var(--muted); }
.game-card:hover .game-cta { color: var(--orange); }
.game-tag { align-self: flex-start; font-size: 13px; border-radius: 24px; padding: 2px 12px; white-space: nowrap; }
.game-tag.score { color: var(--green); background: var(--green-light); border: 1px solid #bfdccb; }
.game-tag.practice { color: var(--orange); background: var(--orange-light); border: 1px solid #f0cfae; }
.game-cta { margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--ink); }

.flow-pointer { margin: 0 0 20px; padding: 14px 18px; background: var(--orange-light); border: 1px solid #f0cfae; border-radius: 12px; }
.flow-pointer a { color: var(--ink); font-weight: 600; }

.lobby-note { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.lobby-note a { color: var(--ink); }

@media (max-width: 760px) {
  .site-shell { padding: 0 16px 32px; }
  .site-header { flex-wrap: wrap; gap: 8px 24px; padding: 12px 0; min-height: 0; }
  .nav { gap: 20px; }
  .game-grid { grid-template-columns: 1fr; }
  .hero { padding: 24px 0 18px; }
  h1 { font-size: 28px; }
}
