@charset "UTF-8";
:root {
  --paper: #f7f5ef;
  --white: #fffefa;
  --ink: #223b32;
  --muted: #68766b;
  --green: #315e48;
  --green-hover: #214b35;
  --line: #dfe3d9;
  --wash: #eef0e8;
  --accent: #b97749;
  --light: #ecebd6;
  --dark: #8da084;
  --shadow: 0 20px 60px #233c3210;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button,
input,
select {
  border: 1px solid var(--line);
}
input,
select {
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 11px 12px;
  max-width: 100%;
}
button {
  background: transparent;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.04em;
}
h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}
em {
  color: #588269;
  font-weight: 400;
}
a:hover {
  color: var(--green);
}
:focus-visible {
  outline: 3px solid #b77d31;
  outline-offset: 4px;
}
button:hover:not(:disabled) {
  filter: brightness(0.97);
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.skip-link {
  position: fixed;
  top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 10px;
  z-index: 20;
}
.skip-link:focus {
  top: 0;
}
.header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1440px;
  padding: 0 58px;
  margin: auto;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: Georgia, serif;
  font-size: 24px;
  letter-spacing: -0.6px;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-icon {
  font-family: Georgia, serif;
  font-size: 34px;
  width: 46px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
  color: #f9f5e4;
}
.brand small {
  font-family: Arial, sans-serif;
  display: block;
  letter-spacing: 2.2px;
  font-size: 8px;
  font-weight: 700;
  margin-top: 6px;
  color: var(--muted);
}
.main-nav {
  display: flex;
  gap: 32px;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
}
.main-nav a {
  padding: 12px 0;
}
.main-nav a[aria-current] {
  border-bottom: 2px solid var(--green);
}
.profile-button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  font-size: 12px;
  padding: 8px 0;
}
.avatar {
  width: 32px;
  height: 32px;
  background: #e6eadd;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
}
.page {
  max-width: 1440px;
  padding: 0 58px;
  margin: auto;
}
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6%;
  align-items: center;
  padding: 64px 0 56px;
  min-height: 624px;
}
.eyebrow {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  line-height: 1.7;
  color: var(--muted);
}
.hero-copy > .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.tiny-line {
  width: 25px;
  height: 1px;
  background: var(--green);
}
.hero h1 {
  font-size: clamp(42px, 4.5vw, 66px);
  line-height: 1.075;
}
.hero-description {
  color: var(--muted);
  margin: 26px 0 24px;
  font-size: 14px;
  line-height: 1.9;
}
.hero-actions {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 21px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.primary:hover:not(:disabled) {
  background: var(--green-hover);
  color: white;
}
.paper {
  background: var(--white);
}
.subtle {
  background: var(--wash);
}
.text-link {
  font-size: 12px;
  font-weight: 600;
  border: 0;
  padding: 5px 0;
  line-height: 1.6;
}
.hero-note {
  font-size: 10px;
  color: var(--muted);
  margin-top: 27px;
}
.hero-note span {
  color: var(--accent);
  margin-right: 6px;
}
.hero-table {
  background: #e9edde;
  border: 1px solid #dfe4d4;
  border-radius: 14px;
  max-width: 540px;
  position: relative;
  padding: 22px 30px 18px;
  box-shadow: 0 14px 60px #41574108;
}
.hero-table-top {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #526951;
}
.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #5a8e60;
  border-radius: 50%;
  margin: 0 6px 1px 0;
}
.hero-board-wrap {
  padding: 24px 26px 20px;
  perspective: 1000px;
}
.hero-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  aspect-ratio: 1;
  transform: rotateX(10deg) rotateZ(-7deg);
  border: 12px solid #eee8d5;
  border-radius: 3px;
  box-shadow:
    10px 16px 0 #c1c8ac,
    15px 26px 32px #233d3224;
  overflow: hidden;
}
.hero-square {
  display: grid;
  place-items: center;
  font-family: Georgia, "Segoe UI Symbol", serif;
  font-size: clamp(18px, 2.5vw, 36px);
  line-height: 1;
  color: #243c31;
  text-shadow: 0 2px 0 #ffffff30;
}
.hero-square.light {
  background: #f0eddc;
}
.hero-square.dark {
  background: #819276;
}
.hero-square.white-piece {
  color: #fffcec;
  text-shadow:
    0 1px 1px #253426,
    1px 0 #253426,
    -1px 0 #253426;
}
.hero-table-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.hero-table-bottom small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.8px;
  color: var(--muted);
}
.hero-table-bottom strong {
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 400;
}
.round-link {
  border: 1px solid #adb9a3;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}
.floating-note {
  position: absolute;
  bottom: 78px;
  right: -26px;
  background: var(--white);
  border: 1px solid #e9eadf;
  box-shadow: 0 8px 30px #354b3115;
  border-radius: 8px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  transform: rotate(3deg);
}
.floating-note > span {
  color: #5c7355;
  font-size: 32px;
}
.floating-note strong {
  font-size: 11px;
  font-weight: 600;
  display: block;
}
.floating-note small {
  font-size: 9px;
  color: var(--muted);
}
.values-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
  padding: 22px 0;
  gap: 10px;
  font-size: 11px;
}
.values-strip > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-right: 1px solid var(--line);
}
.values-strip > span:last-child {
  border: 0;
}
.values-strip b {
  font-family: Georgia, serif;
  color: #8d9b87;
  font-size: 16px;
  font-weight: 400;
}
.collection {
  padding: 58px 0;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 20px;
}
.section-heading h2 {
  font-size: 40px;
  margin-top: 9px;
}
.section-heading > p {
  color: var(--muted);
  font-size: 12px;
}
.catalog-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  border-radius: 25px;
  padding: 9px 14px;
  font-size: 11px;
  white-space: nowrap;
}
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.chip span {
  opacity: 0.65;
  margin-left: 5px;
  font-size: 10px;
}
.search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0 14px;
  background: var(--white);
}
.search > span {
  font-size: 24px;
  line-height: 1;
}
.search input {
  border: 0;
  background: transparent;
  width: 143px;
  font-size: 11px;
  padding: 10px;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.game-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card-image {
  display: block;
  aspect-ratio: 1.45;
  overflow: hidden;
  background: #e3e3d7;
  position: relative;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s;
}
.game-card:hover .card-image img {
  transform: scale(1.035);
}
.card-play {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: #fffef3ed;
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}
.game-card:hover .card-play,
.game-card:focus-within .card-play {
  opacity: 1;
}
.favorite {
  position: absolute;
  right: 11px;
  top: 11px;
  border: 0;
  border-radius: 50%;
  background: #fffef0f2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}
.favorite[aria-pressed="true"] {
  color: #a95f46;
}
.card-copy {
  padding: 16px 17px 13px;
}
.card-origin {
  font-size: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.card-copy h3 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 23px;
  display: flex;
  justify-content: space-between;
  margin: 5px 0 9px;
  letter-spacing: -0.5px;
}
.card-copy h3 span {
  font-family: Arial;
  font-size: 15px;
  color: var(--muted);
}
.card-copy p {
  font-size: 10px;
  color: var(--muted);
  min-height: 32px;
  line-height: 1.6;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
  font-size: 9px;
  color: var(--muted);
}
.card-meta span:last-child {
  background: #f0f1e8;
  border-radius: 4px;
  padding: 3px 7px;
}
.empty {
  padding: 50px;
  text-align: center;
}
.discovery-banner {
  background: #e9edde;
  border-radius: 12px;
  padding: 42px;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0 0 60px;
}
.discovery-number {
  font-family: Georgia, serif;
  font-size: 130px;
  line-height: 1;
  color: #879e7f;
  padding: 0 18px;
}
.discovery-banner h2 {
  font-size: 32px;
  margin: 10px 0 15px;
}
.discovery-banner p:not(.eyebrow) {
  font-size: 12px;
  color: var(--muted);
}
.discovery-banner > .button {
  margin-left: auto;
  white-space: nowrap;
}
.footer {
  max-width: 1440px;
  padding: 32px 58px;
  margin: auto;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 25px;
  color: var(--muted);
  font-size: 10px;
}
.footer-brand {
  font-family: Georgia, serif;
  font-size: 20px;
  color: var(--ink);
}
.footer > a:nth-last-child(2) {
  margin-left: auto;
}
.footer small {
  font-size: 9px;
}
.dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 35px;
  width: min(480px, calc(100% - 28px));
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
}
.dialog::backdrop {
  background: #142c2680;
  backdrop-filter: blur(4px);
}
.dialog h2 {
  font-size: 30px;
  margin: 8px 0 22px;
}
.dialog p {
  margin: 14px 0;
}
.close {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 25px;
  width: 36px;
  height: 36px;
  border: 0;
}
.setting {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  margin: 18px 0;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  font-size: 12px;
}
.toggle input {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
}
.dialog-actions {
  display: flex;
  justify-content: end;
  gap: 10px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 22px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--ink);
  color: white;
  max-width: 90%;
  font-size: 12px;
  z-index: 30;
}
.editorial-heading {
  padding: 65px 0 45px;
}
.editorial-heading h1 {
  font-size: 60px;
  margin: 18px 0 24px;
}
.editorial-heading > p:last-child {
  color: var(--muted);
  font-size: 14px;
}
.learn-intro {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  border-block: 1px solid var(--line);
  padding: 32px 0;
  margin-bottom: 55px;
}
.learn-intro span {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 25px;
}
.learn-intro h3 {
  font-family: Georgia, serif;
  margin: 10px 0;
  font-weight: 400;
  font-size: 25px;
}
.learn-intro p {
  font-size: 13px;
  color: var(--muted);
}
.learn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 30px 0 60px;
}
.learn-card {
  display: flex;
  gap: 20px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}
.learn-card img {
  border-radius: 10px;
  flex-shrink: 0;
}
.learn-card h3 {
  font-family: Georgia, serif;
  margin: 5px 0 12px;
  font-weight: 400;
  font-size: 25px;
}
.learn-card p {
  font-size: 12px;
  margin-bottom: 12px;
}
.learn-card .eyebrow {
  font-size: 8px;
}
.resume-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 60px;
}
.resume-card img {
  border-radius: 10px;
}
.resume-card h2 {
  margin: 18px 0;
}
.resume-card p {
  margin-bottom: 20px;
  font-size: 12px;
  color: var(--muted);
}
.resume-card a {
  margin: 4px;
}
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 50px 20px 80px;
  background: var(--wash);
  border-radius: 14px;
}
.empty-state > span {
  font-size: 70px;
}
.empty-state h2 {
  font-size: 34px;
  margin: 10px;
}
.empty-state p {
  color: var(--muted);
  margin-bottom: 25px;
}
.prose {
  max-width: 760px;
  padding: 65px 0 75px;
  margin: auto;
}
.prose h1 {
  font-size: 56px;
  margin: 15px 0 45px;
}
.prose h2 {
  font-size: 28px;
  margin: 30px 0 15px;
}
.prose p {
  color: var(--muted);
  margin: 15px 0;
}
.prose .button {
  margin-top: 25px;
}
.play-page {
  max-width: 1280px;
  padding: 30px 50px 60px;
  margin: auto;
}
.play-heading {
  display: flex;
  gap: 25px;
  align-items: center;
  margin-bottom: 28px;
}
.back-link {
  font-size: 11px;
  color: var(--muted);
}
.play-heading h1 {
  font-size: 38px;
  margin-top: 4px;
}
.play-tools {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.icon-button {
  border-radius: 7px;
  width: 39px;
  height: 39px;
  font-size: 20px;
  display: grid;
  place-items: center;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 325px;
  gap: 38px;
  align-items: start;
}
.board-area {
  min-width: 0;
}
.board-frame {
  padding: 14px;
  background: #ede6d5;
  border: 1px solid #ded7c5;
  box-shadow: 0 12px 35px #293b3110;
  border-radius: 9px;
}
.board {
  position: relative;
  display: grid;
  overflow: hidden;
  background: var(--light);
  aspect-ratio: 1;
  grid-template-columns: repeat(8, 1fr);
  --columns: 8;
  --rows: 8;
  isolation: isolate;
}
.board-loading {
  grid-column: 1/-1;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}
.square {
  min-width: 0;
  aspect-ratio: 1;
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
  z-index: 1;
  touch-action: manipulation;
  font-size: clamp(17px, 3.7vw, 53px);
  line-height: 1;
  overflow: visible;
  user-select: none;
}
.square .piece {
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", Georgia, serif;
  pointer-events: none;
  line-height: 1;
  color: #263b32;
  text-shadow: 0 2px 1px #ffffff50;
  position: relative;
  z-index: 2;
}
.square.side-1 .piece {
  color: #fffdec;
  text-shadow:
    1px 0 #2a402d,
    -1px 0 #2a402d,
    0 1px #2a402d,
    0 -1px #2a402d,
    0 3px 2px #2a402d50;
}
.board.squares .square.dark {
  background: var(--dark);
}
.board.squares .square.light {
  background: var(--light);
}
.square.selected {
  box-shadow: inset 0 0 0 4px #c29039 !important;
  background: #d4b665 !important;
}
.square.destination::after {
  content: "";
  width: 23%;
  height: 23%;
  position: absolute;
  background: #244c37a8;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #f6f5e5aa;
  z-index: 4;
}
.square.destination.side-1::after,
.square.destination.side-2::after {
  width: 85%;
  height: 85%;
  background: transparent;
  border: 4px solid #2d6148;
  box-shadow: none;
}
.square.last-move {
  box-shadow: inset 0 0 0 3px #a88e4c80;
}
.square:focus-visible {
  outline-offset: -4px;
  z-index: 5;
}
.square .coord {
  position: absolute;
  left: 3px;
  bottom: 2px;
  font-size: 9px;
  line-height: 1;
  font-family: Arial, sans-serif;
  color: #344e3a;
  opacity: 0.8;
  pointer-events: none;
}
.square.dead .piece {
  opacity: 0.3;
}
.board-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.board-lines line {
  stroke: #57704a;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}
.board.intersections,
.board.xiangqi {
  background: #e3c895;
}
.board.intersections .square .piece {
  font-size: 0.66em;
  text-shadow: 0 3px 3px #28342088;
}
.board.intersections .square.side-1 .piece {
  color: #263731;
}
.board.intersections .square.side-2 .piece {
  color: #fffbe9;
}
.board.xiangqi .piece {
  border-radius: 50%;
  background: #fbecd0;
  border: 2px solid currentColor;
  width: 82%;
  height: 82%;
  display: grid;
  place-items: center;
  font-size: 0.6em;
  color: #354734;
  box-shadow: 0 3px 1px #71542a40;
  text-shadow: none;
}
.board.xiangqi .side-1 .piece {
  color: #a34233;
  text-shadow: none;
}
.board.shogi .square {
  border-right: 1px solid #ae945b;
  border-bottom: 1px solid #ae945b;
  background: #e4cb97;
}
.board.shogi .piece {
  font-size: 0.58em;
  color: #252e22;
  background: #f5d99d;
  clip-path: polygon(50% 0, 85% 14%, 100% 100%, 0 100%, 15% 14%);
  width: 77%;
  height: 88%;
  display: grid;
  place-items: center;
  text-shadow: none;
}
.board.shogi .side-1 .piece {
  color: #222e20;
  text-shadow: none;
}
.board.shogi .side-2 .piece {
  transform: rotate(180deg);
}
.board.mancala {
  aspect-ratio: 2.6;
  background: #b9986a;
  border-radius: 12px;
  gap: 7px;
  padding: 12px;
}
.board.mancala .square {
  border-radius: 50%;
  background: #765333;
  box-shadow: inset 0 3px 8px #30261666;
  aspect-ratio: 1.1;
}
.board.mancala .piece {
  color: #f7e2b5 !important;
  text-shadow: none !important;
  font-family: Georgia, serif;
  font-size: 0.7em;
}
.board.track {
  aspect-ratio: 3;
  background: #d8bd8e;
  align-items: center;
  gap: 3px;
  padding: 10px;
}
.board.track .square {
  background: #b29465;
  border-radius: 4px;
  aspect-ratio: 0.6;
  font-size: 23px;
}
.board.track .square:nth-child(2n) {
  background: #ead4a5;
}
.board.cross_track {
  aspect-ratio: 1;
  background: #e5c590;
}
.board.cross_track .square {
  position: absolute;
  width: 7%;
  height: 7%;
  font-size: 25px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: #e9ddb7;
  border: 1px solid #a78a59;
  border-radius: 3px;
}
.board.cross_track .square.special {
  background: #a7c0a1;
}
.board.cross_track .coord {
  font-size: 7px;
}
.board[data-game="tafl"] .square.special {
  background: #c5b276;
}
.player-bar {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  min-height: 73px;
}
.player-avatar {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  background: #e0e7d9;
  border-radius: 8px;
  font-size: 24px;
}
.player-avatar.opponent {
  background: #ede7d9;
}
.player-bar strong {
  display: block;
  font-size: 12px;
}
.player-bar small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.side-tag {
  margin-left: auto;
  border: 1px solid var(--line);
  font-size: 10px;
  border-radius: 5px;
  padding: 4px 10px;
}
.turn-status {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px 15px;
  text-align: center;
  font-size: 13px;
  background: var(--wash);
}
.turn-status.error {
  color: #934430;
  background: #fff2e9;
  border-color: #e5c7b7;
}
.board-controls {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  padding: 15px 0;
}
.danger {
  color: #955345 !important;
}
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 23px;
  margin-bottom: 17px;
}
.panel h2 {
  font-family: Georgia, serif;
  font-size: 25px;
  margin: 7px 0 14px;
}
.panel p {
  font-size: 12px;
  line-height: 1.8;
}
.mode-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 10px;
  border-radius: 7px;
  text-align: left;
  width: 100%;
  margin: 11px 0;
  background: var(--white);
  transition: border-color 0.2s;
}
.mode-button:hover {
  border-color: var(--green);
}
.mode-button > span:last-child {
  margin-left: auto;
}
.mode-button strong {
  font-size: 12px;
  display: block;
}
.mode-button small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.mode-icon {
  width: 28px;
  text-align: center;
  font-size: 23px;
}
.join-details {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 13px;
}
summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 0;
}
#join-form {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}
#room-code {
  width: 120px;
  text-transform: uppercase;
  letter-spacing: 3px;
}
#join-form button {
  padding-inline: 12px;
}
.service-note {
  background: #f4f0e6;
  color: #826342;
  padding: 10px;
  border-radius: 6px;
  font-size: 10px !important;
  margin-top: 13px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-heading h2 {
  font-size: 21px;
  margin-top: 0;
}
.panel-heading > span {
  font-size: 12px;
  color: var(--muted);
}
.guide-panel > p {
  color: var(--muted);
}
.guide-panel details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.guide-panel details p {
  margin-bottom: 12px;
}
.guide-panel ol {
  padding-left: 19px;
  font-size: 12px;
  color: var(--muted);
}
.guide-panel li {
  margin-bottom: 9px;
}
.guide-panel details a {
  font-size: 11px;
  display: block;
  padding: 10px 0;
}
.move-list-label {
  font-size: 11px;
  display: block;
  margin: 16px 0 7px;
}
.guide-panel select {
  font-size: 11px;
  width: 100%;
  padding: 9px;
}
.guide-panel > .button {
  margin-top: 9px;
  width: 100%;
}
.history-panel ol {
  max-height: 230px;
  overflow: auto;
  font-size: 11px;
  padding-left: 24px;
}
.history-panel li {
  padding: 5px;
  border-bottom: 1px solid var(--line);
}
.history-panel li:nth-child(2n) {
  background: var(--wash);
}
.history-panel .small {
  font-size: 10px;
}
.room-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.invite-code {
  display: block;
  font-size: 32px;
  letter-spacing: 7px;
  margin: 8px 0;
  font-weight: 500;
}
.panel .button {
  margin: 7px 0;
}
.special-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.special-actions button,
.hand button {
  font-size: 11px;
  border-radius: 5px;
  padding: 8px 13px;
  min-height: 40px;
  background: var(--white);
}
.hand {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.hand:empty {
  display: none;
}
.move-confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #e5ecdb;
  padding: 12px;
  margin: 12px 0;
  border-radius: 7px;
  font-size: 12px;
}
#choice-list {
  display: grid;
  gap: 10px;
}
#choice-list button {
  padding: 12px;
  border-radius: 7px;
}
.zen .header,
.zen .footer,
.zen .game-sidebar,
.zen .back-link {
  display: none;
}
.zen .play-page {
  max-width: 800px;
}
.zen .game-layout {
  grid-template-columns: 1fr;
}
.zen .play-heading {
  margin-bottom: 5px;
}
.zen .board-area {
  max-width: 650px;
  margin: auto;
  width: 100%;
}
.theme-wood {
  --light: #ecd8ae;
  --dark: #af865d;
}
.theme-contrast {
  --light: #fffbea;
  --dark: #456b53;
}
@media (min-width: 1441px) {
  .hero h1 {
    font-size: 68px;
  }
  .hero-square {
    font-size: 37px;
  }
}
@media (max-width: 1100px) {
  .header {
    padding: 0 30px;
  }
  .page {
    padding: 0 30px;
  }
  .hero {
    gap: 4%;
    padding-top: 50px;
  }
  .hero-table {
    padding: 20px;
  }
  .hero-board-wrap {
    padding: 20px 15px;
  }
  .floating-note {
    right: -8px;
    bottom: 65px;
  }
  .hero h1 {
    font-size: 52px;
  }
  .game-grid {
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
  }
  .catalog-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .search {
    align-self: flex-end;
  }
  .discovery-banner {
    padding: 30px;
    gap: 20px;
  }
  .discovery-banner h2 {
    font-size: 27px;
  }
  .discovery-number {
    font-size: 95px;
  }
  .discovery-banner > .button {
    white-space: normal;
    text-align: center;
  }
  .footer {
    padding: 28px 30px;
    flex-wrap: wrap;
  }
  .play-page {
    padding-inline: 28px;
  }
  .game-layout {
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .square {
    font-size: 4.5vw;
  }
  .panel {
    padding: 18px;
  }
  .main-nav {
    gap: 22px;
  }
}
@media (max-width: 780px) {
  .header {
    height: 82px;
    padding: 0 20px;
    gap: 14px;
  }
  .brand {
    font-size: 20px;
  }
  .brand-icon {
    width: 36px;
    height: 40px;
    font-size: 27px;
  }
  .main-nav {
    gap: 16px;
    font-size: 11px;
  }
  .profile-label {
    display: none;
  }
  .profile-button > span:last-child {
    display: none;
  }
  .page {
    padding: 0 22px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 35px 0 38px;
  }
  .hero h1 {
    font-size: 55px;
  }
  .hero-description br {
    display: none;
  }
  .hero-description {
    max-width: 400px;
    margin: 22px 0;
  }
  .hero-note {
    margin-top: 20px;
  }
  .hero-table {
    max-width: 460px;
    width: 90%;
    margin: 0 auto;
  }
  .hero-square {
    font-size: 36px;
  }
  .hero-board-wrap {
    padding: 20px 25px;
  }
  .floating-note {
    right: -20px;
  }
  .hero-table-top {
    font-size: 7px;
  }
  .values-strip {
    font-size: 9px;
    gap: 6px;
    padding: 16px 0;
  }
  .values-strip > span {
    gap: 8px;
    text-align: center;
  }
  .values-strip b {
    font-size: 14px;
  }
  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 13px;
  }
  .section-heading h2 {
    font-size: 36px;
  }
  .collection {
    padding: 36px 0;
  }
  .catalog-toolbar {
    gap: 15px;
  }
  .filters {
    gap: 5px;
  }
  .chip {
    font-size: 10px;
    padding: 8px 10px;
  }
  .search {
    align-self: stretch;
  }
  .search input {
    width: 100%;
  }
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .card-copy {
    padding: 13px;
  }
  .card-copy h3 {
    font-size: 21px;
  }
  .card-meta {
    font-size: 8px;
  }
  .card-meta span:last-child {
    padding: 3px 5px;
  }
  .card-copy p {
    font-size: 10px;
    min-height: 36px;
  }
  .card-origin {
    font-size: 7px;
  }
  .discovery-banner {
    padding: 26px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .discovery-number {
    font-size: 70px;
    display: none;
  }
  .discovery-banner h2 {
    font-size: 30px;
  }
  .discovery-banner > .button {
    margin: 0;
  }
  .discovery-banner p br {
    display: none;
  }
  .footer {
    padding: 25px 22px;
    gap: 15px;
  }
  .footer > a:nth-last-child(2) {
    margin-left: 0;
  }
  .editorial-heading h1 {
    font-size: 46px;
  }
  .learn-intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .learn-grid {
    grid-template-columns: 1fr;
  }
  .learn-card {
    padding: 20px;
  }
  .resume-grid {
    grid-template-columns: 1fr 1fr;
  }
  .prose h1 {
    font-size: 44px;
  }
  .play-page {
    padding: 20px 16px 35px;
  }
  .game-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .board-area {
    width: 100%;
    max-width: 610px;
    margin: auto;
  }
  .game-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .game-sidebar > .panel {
    margin-bottom: 0;
  }
  .history-panel {
    grid-column: 1/-1;
  }
  .play-heading {
    gap: 13px;
    flex-wrap: wrap;
  }
  .play-heading h1 {
    font-size: 32px;
  }
  .play-heading > .back-link {
    width: 100%;
    font-size: 10px;
  }
  .play-tools {
    gap: 6px;
  }
  .square {
    font-size: clamp(20px, 8.8vw, 52px);
  }
  .board-frame {
    padding: 10px;
  }
  .hero-actions {
    gap: 20px;
  }
  .board-controls {
    gap: 15px;
  }
  .hero h1 br:nth-of-type(2) {
    display: none;
  }
  .hero h1 em::before {
    content: " ";
  }
}
@media (max-width: 480px) {
  .header {
    height: auto;
    min-height: 85px;
    flex-wrap: wrap;
    padding-top: 16px;
    padding-bottom: 12px;
    row-gap: 10px;
  }
  .brand {
    order: 0;
  }
  .profile-button {
    order: 1;
    margin-left: auto;
  }
  .main-nav {
    order: 2;
    width: 100%;
    justify-content: center;
    gap: 40px;
  }
  .main-nav a {
    padding: 5px 0;
  }
  .hero h1 {
    font-size: 45px;
  }
  .hero h1 em {
    display: block;
  }
  .hero-copy > .eyebrow {
    font-size: 8px;
    margin-bottom: 17px;
  }
  .hero-description {
    font-size: 12px;
  }
  .hero-note {
    font-size: 8px;
  }
  .hero-table {
    padding: 16px;
    width: 95%;
  }
  .hero-board-wrap {
    padding: 19px 13px;
  }
  .hero-square {
    font-size: 29px;
  }
  .hero-table-bottom strong {
    font-size: 21px;
  }
  .floating-note {
    padding: 9px 12px;
    bottom: 58px;
    right: -10px;
  }
  .floating-note strong {
    font-size: 9px;
  }
  .floating-note small {
    font-size: 8px;
  }
  .values-strip {
    font-size: 8px;
  }
  .values-strip > span {
    flex-direction: column;
    gap: 4px;
  }
  .game-grid {
    gap: 12px;
  }
  .card-copy {
    padding: 11px;
  }
  .card-copy h3 {
    font-size: 19px;
    min-height: 44px;
    align-items: start;
  }
  .card-copy p {
    min-height: 48px;
  }
  .card-meta {
    align-items: start;
    gap: 6px;
    flex-direction: column;
  }
  .favorite {
    width: 29px;
    height: 29px;
    right: 7px;
    top: 7px;
  }
  .game-sidebar {
    grid-template-columns: 1fr;
  }
  .square .coord {
    font-size: 7px;
  }
  .board-frame {
    padding: 7px;
  }
  .turn-status {
    font-size: 12px;
  }
  .play-tools .icon-button {
    width: 34px;
    height: 34px;
  }
  .play-heading .eyebrow {
    font-size: 8px;
  }
  .play-heading h1 {
    font-size: 29px;
  }
  .move-confirm {
    flex-wrap: wrap;
  }
  .move-confirm > span {
    width: 100%;
  }
  .learn-card img {
    width: 55px;
    height: 55px;
  }
  .learn-card {
    gap: 14px;
  }
  .editorial-heading h1 {
    font-size: 42px;
  }
  .resume-grid {
    grid-template-columns: 1fr;
  }
  .dialog {
    padding: 27px;
  }
  .board.cross_track .square {
    font-size: 18px;
  }
  .board.track .square {
    font-size: 16px;
  }
  .footer > span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.reduce-motion * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
.board.shogi.flipped .side-1 .piece {
  transform: rotate(180deg);
}
.board.shogi.flipped .side-2 .piece {
  transform: none;
}
.board {
  container-type: inline-size;
}
.board .square {
  font-size: calc(78cqw / var(--columns));
}
.board.shogi .piece {
  font-size: 0.75em;
}
.board.cross_track .square {
  font-size: 5cqw;
}
.board.track .square {
  font-size: 4cqw;
}
.board[data-game="chess"] .piece {
  width: 90%;
  height: 90%;
  display: grid;
  place-items: center;
}
.piece-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 1px #20382a44);
}
.mode-button small {
  font-size: 11px;
}
.card-copy p {
  font-size: 12px;
}
.card-meta {
  font-size: 10px;
}
.card-origin {
  font-size: 9px;
}
.board .square {
  min-height: 0;
  aspect-ratio: auto;
}
.board .piece {
  min-height: 0;
}
.board.cross_track .square {
  aspect-ratio: 1;
  width: 5.5%;
  height: 5.5%;
}
.board-frame.zoomed { overflow:auto; max-height:75vh; }
.board.shogi .piece.long-label { font-size:.48em; }
.check-setting { display:flex; align-items:flex-start; gap:10px; margin:16px 0; font-size:13px; cursor:pointer; }
.check-setting input { width:18px; height:18px; flex:none; accent-color:var(--accent); }
.check-setting small { display:block; margin-top:4px; font-size:11px; line-height:1.5; }
/* Choices follow a waiting table and use the current theme's readable buttons. */
.quick-search-choices{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--border, #61776d)}
.quick-search-choices .button{margin:.25rem .5rem .25rem 0}
.quick-search-choices [role=status]:empty{display:none}
