@charset "UTF-8";
:root {
  --paper:#f5f1e8;
  --ink:#1b3e3c;
  --muted:#78837a;
  --line:#dcded1;
  --orange:#bb512e;
  --white:#fffdf6;
  --light:#eee5cd;
  --dark:#7e9d91;
  --sans:Inter,"Segoe UI",Arial,sans-serif;
  --serif:Georgia,"Nirmala UI",serif;
  color-scheme:light
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  font-size:14px
}
button,select,textarea {
  font:inherit
}
button,select,a {
  -webkit-tap-highlight-color:transparent
}
button {
  cursor:pointer
}
button:disabled {
  cursor:default;
  opacity:.4
}
button:focus-visible,a:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid var(--orange);
  outline-offset:4px
}
button {
  color:inherit
}
a {
  color:inherit
}
button[hidden],[hidden] {
  display:none!important
}
.page {
  max-width:1280px;
  margin:auto;
  padding:0 60px
}
.site-header {
  height:102px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line)
}
.brand {
  display:flex;
  align-items:center;
  gap:13px;
  text-decoration:none;
  font-weight:700;
  letter-spacing:.18em;
  font-size:15px
}
.brand-mark {
  display:grid;
  place-items:center;
  width:43px;
  height:43px;
  background:var(--ink);
  color:var(--paper);
  font-family:"Nirmala UI",sans-serif;
  font-size:26px;
  letter-spacing:0;
  border-radius:8px
}
.brand-sub {
  display:block;
  font-size:8px;
  letter-spacing:.16em;
  color:var(--muted);
  margin-top:5px
}
.header-right {
  display:flex;
  align-items:center;
  gap:30px
}
.runtime-status {
  font-size:11px;
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--muted)
}
.runtime-status::before {
  content:"";
  height:6px;
  width:6px;
  border-radius:50%;
  background:#bd9263
}
.runtime-status.ready::before {
  background:#75967b
}
.source-link {
  font-size:12px;
  text-underline-offset:5px;
  text-decoration:none
}
.source-link:hover {
  text-decoration:underline
}
.source-link span {
  margin-left:5px
}
.intro {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:42px 0 34px
}
.eyebrow {
  font-size:9px;
  font-weight:700;
  letter-spacing:.2em;
  color:var(--orange);
  margin:0 0 14px
}
h1 {
  margin:0;
  display:flex;
  align-items:baseline;
  gap:0;
  font-weight:500;
  font-family:"Nirmala UI",var(--serif);
  font-size:63px;
  line-height:1.2;
  letter-spacing:-.04em
}
.title-dot {
  color:var(--orange);
  margin-left:3px
}
.title-english {
  font-family:var(--serif);
  font-size:23px;
  letter-spacing:-.03em;
  margin-left:21px;
  color:#5b7167;
  font-style:italic
}
.intro-note {
  font-family:var(--serif);
  font-size:19px;
  line-height:1.4;
  margin:0;
  color:#5b7167
}
.intro-note span {
  display:block;
  font-family:var(--sans);
  font-size:10px;
  font-style:normal;
  margin-top:9px;
  color:var(--muted)
}
.game-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 304px;
  gap:48px;
  align-items:start
}
.play-area {
  min-width:0
}
.player-strip {
  display:flex;
  align-items:center;
  gap:11px;
  padding:17px 4px
}
.player-strip.opponent {
  padding-top:1px;
  padding-bottom:17px
}
.avatar {
  display:grid;
  place-items:center;
  width:35px;
  height:35px;
  background:#e1e6dc;
  border:1px solid #cbd2c4;
  border-radius:9px;
  font-size:23px
}
.avatar.human {
  background:#ece7d9
}
.player-strip strong {
  display:block;
  font-size:12px;
  font-weight:600
}
.player-strip>div>span {
  display:block;
  font-size:10px;
  color:var(--muted);
  margin-top:4px
}
.player-color {
  margin-left:auto;
  font-size:8px;
  letter-spacing:.13em;
  border:1px solid var(--line);
  padding:6px 9px;
  border-radius:4px;
  color:#6b7d72
}
.board-shell {
  border-radius:4px;
  background:#315d52;
  padding:9px;
  box-shadow:0 16px 30px -24px #163c3b99
}
.board {
  display:grid;
  grid-template-columns:repeat(8,1fr);
  aspect-ratio:1;
  overflow:hidden;
  border-radius:1px
}
.square {
  position:relative;
  display:grid;
  place-items:center;
  min-width:0;
  border:0;
  border-radius:0;
  padding:0;
  background:var(--light);
  aspect-ratio:1
}
.square.dark {
  background:var(--dark)
}
.square:disabled {
  opacity:1
}
.square.selected {
  box-shadow:inset 0 0 0 4px var(--orange);
  z-index:1
}
.square.last-move {
  background:#e2ca87
}
.square.dark.last-move {
  background:#a8ad73
}
.square.checked {
  background:#cb8068
}
.square.legal::after {
  content:"";
  position:absolute;
  width:19%;
  height:19%;
  background:#173e3c55;
  border-radius:50%;
  pointer-events:none
}
.square.legal.capture::after {
  width:89%;
  height:89%;
  border:4px solid #173e3c66;
  background:none
}
.square:focus-visible {
  outline:3px solid var(--orange);
  outline-offset:-3px;
  z-index:2
}
.piece {
  height:80%;
  width:80%;
  filter:drop-shadow(0 2px 1px #153e3b24);
  pointer-events:none;
  transition:transform .15s
}
.square:hover:not(:disabled) .piece {
  transform:translateY(-2px)
}
.coordinate {
  position:absolute;
  font-size:9px;
  font-weight:600;
  opacity:.7;
  pointer-events:none
}
.rank-coordinate {
  top:5px;
  left:5px
}
.file-coordinate {
  bottom:3px;
  right:5px
}
.square.dark .coordinate {
  color:#f5f0de
}
.board-toolbar {
  display:flex;
  gap:20px;
  border-top:1px solid var(--line);
  padding:17px 2px;
  flex-wrap:wrap
}
.quiet-button {
  border:0;
  background:none;
  padding:0;
  display:flex;
  align-items:center;
  gap:7px;
  font-size:11px;
  color:#62766b;
  line-height:20px
}
.quiet-button span {
  font-size:17px
}
.quiet-button:hover:not(:disabled) {
  color:var(--orange)
}
.stop-button {
  color:var(--orange);
  margin-left:auto
}
.sidebar {
  padding-top:0
}
.control-card {
  background:#fffdf575;
  border:1px solid #deded0;
  border-radius:12px;
  padding:24px
}
.status-heading {
  display:flex;
  align-items:center;
  gap:8px
}
.status-light {
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--orange)
}
.status-heading p {
  margin:0;
  font-size:15px;
  font-weight:600;
  letter-spacing:-.02em
}
.turn-hindi {
  font-family:"Nirmala UI",sans-serif;
  font-size:20px;
  margin:7px 0 0;
  line-height:1.6;
  color:#6a7f6c
}
.game-message {
  font-size:11px;
  color:#7b8579;
  line-height:1.6;
  margin:9px 0 21px;
  min-height:34px
}
.settings {
  border-top:1px solid var(--line);
  padding-top:21px
}
.settings label {
  font-size:8px;
  font-weight:700;
  letter-spacing:.13em;
  display:block;
  margin-bottom:8px;
  color:#6a7c6e
}
.select-wrap {
  position:relative;
  margin-bottom:20px
}
.select-wrap::after {
  content:"⌄";
  position:absolute;
  right:12px;
  top:10px;
  pointer-events:none;
  color:#71816f
}
select {
  appearance:none;
  width:100%;
  padding:11px 26px 11px 12px;
  border:1px solid var(--line);
  background:#f9f7ee;
  border-radius:5px;
  color:var(--ink);
  font-size:11px
}
.setting-row {
  display:flex;
  justify-content:space-between;
  align-items:baseline
}
.setting-row>span {
  font-family:var(--serif);
  font-style:italic;
  font-size:12px;
  color:var(--muted)
}
.level-options {
  display:flex;
  gap:7px
}
.level-options button {
  flex:1;
  height:33px;
  border:1px solid var(--line);
  border-radius:4px;
  background:#f9f7ee;
  font-size:11px
}
.level-options button[aria-pressed=true] {
  color:var(--white);
  border-color:var(--ink);
  background:var(--ink)
}
.level-note {
  font-size:9px;
  color:var(--muted);
  margin:8px 0 19px
}
.primary-button,.secondary-button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  width:100%;
  border-radius:5px;
  padding:12px 16px;
  font-size:11px;
  border:1px solid var(--ink);
  background:var(--ink);
  color:var(--white)
}
.primary-button span {
  margin-left:auto;
  font-size:17px
}
.primary-button:hover:not(:disabled) {
  background:#2f5951
}
.secondary-button {
  color:var(--ink);
  background:transparent;
  border-color:var(--line);
  margin-top:9px
}
.secondary-button:hover:not(:disabled) {
  background:#e9eddf
}
.history-card {
  margin-top:24px
}
.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid var(--line);
  padding:0 2px 12px
}
.section-heading h2 {
  font-size:8px;
  letter-spacing:.14em;
  margin:0;
  font-weight:700
}
.section-heading span {
  font-size:9px;
  color:var(--muted)
}
.history {
  max-height:185px;
  min-height:115px;
  overflow:auto;
  scrollbar-width:thin
}
.empty-history {
  display:flex;
  gap:13px;
  align-items:center;
  justify-content:center;
  padding:22px 0;
  color:#8c9787
}
.empty-history>span {
  font-size:25px;
  color:#a8b19c
}
.empty-history p {
  font-family:var(--serif);
  font-style:italic;
  font-size:15px;
  line-height:1.45;
  margin:0
}
.history-row {
  display:grid;
  grid-template-columns:27px 1fr 1fr;
  gap:6px;
  padding:10px 3px;
  border-bottom:1px solid #e5e6da;
  font-size:11px;
  font-variant-numeric:tabular-nums
}
.history-row .move-number {
  color:#99a18e;
  font-size:10px
}
.history-row span:last-child {
  color:#5d7768
}
.language-note {
  display:flex;
  gap:14px;
  padding:23px 1px 0;
  border-top:1px solid var(--line);
  margin-top:8px
}
.language-symbol {
  font-family:"Nirmala UI",sans-serif;
  font-size:27px;
  line-height:1.3;
  color:#a6af98
}
.language-note strong {
  font-size:10px;
  font-weight:600
}
.language-note p {
  font-size:10px;
  color:#8a9383;
  line-height:1.7;
  margin:5px 0
}
.text-button {
  background:none;
  border:0;
  padding:3px 0;
  color:var(--orange);
  font-size:10px;
  text-underline-offset:4px
}
.text-button:hover {
  text-decoration:underline
}
footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:26px 0;
  margin-top:25px;
  border-top:1px solid var(--line);
  font-size:10px;
  color:#89927f
}
footer strong {
  font-weight:400;
  color:#577365
}
footer>span:last-child {
  font-size:8px;
  letter-spacing:.12em
}
.error-banner {
  margin-top:16px;
  border:1px solid #c98165;
  background:#fff2e6;
  border-radius:7px;
  padding:13px;
  display:flex;
  gap:10px;
  justify-content:space-between;
  font-size:12px;
  line-height:1.6
}
.error-banner button {
  border:0;
  background:none;
  font-size:20px
}
.visually-hidden {
  position:absolute;
  clip:rect(0,0,0,0);
  width:1px;
  height:1px;
  overflow:hidden
}
dialog {
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--paper);
  color:var(--ink);
  width:min(92vw,480px);
  padding:30px;
  box-shadow:0 25px 100px #132e3b33
}
dialog::backdrop {
  background:#163e3b66;
  backdrop-filter:blur(3px)
}
dialog h2 {
  font-family:var(--serif);
  font-weight:400;
  font-size:26px;
  margin:0 0 12px
}
dialog>p {
  font-size:12px;
  line-height:1.8;
  color:#71816f
}
dialog textarea {
  width:100%;
  margin:10px 0 0;
  background:#fffdf5;
  border:1px solid var(--line);
  padding:14px;
  border-radius:6px;
  resize:vertical;
  font-family:monospace;
  font-size:12px;
  line-height:1.6
}
dialog pre {
  font-size:14px;
  line-height:1.9;
  white-space:pre-wrap;
  background:#e5e9dc;
  border-radius:7px;
  padding:18px;
  font-family:Consolas,"Nirmala UI",monospace
}
#code-dialog .secondary-button {
  margin-top:18px
}
.dialog-actions {
  display:flex;
  gap:10px
}
.dialog-actions button {
  margin-top:0
}
.dialog-feedback {
  min-height:20px;
  margin:5px 0 8px
}
.promotion-options {
  display:flex;
  gap:10px;
  margin:20px 0
}
.promotion-options button {
  width:25%;
  border:1px solid var(--line);
  background:#e4e9dc;
  border-radius:7px;
  padding:7px
}
.promotion-options button:hover {
  background:#d2dcc7
}
.promotion-options svg {
  width:100%;
  height:auto
}
.board[aria-busy=true] {
  opacity:.72
}
.loading-pulse .status-light {
  animation:pulse 1.2s infinite
}
@keyframes pulse {
  50% {
    opacity:.25
  }
}
@media(min-width:1300px) {
  .page {
    max-width:1210px
  }
  .game-layout {
    grid-template-columns:620px 304px;
    gap:46px
  }
}
@media(max-width:1050px) {
  .page {
    padding:0 30px
  }
  .game-layout {
    gap:26px;
    grid-template-columns:minmax(0,1fr) 280px
  }
  .control-card {
    padding:20px
  }
  .intro-note {
    font-size:16px
  }
  .title-english {
    font-size:20px
  }
  h1 {
    font-size:55px
  }
}
@media(max-width:780px) {
  .page {
    padding:0 22px
  }
  .site-header {
    height:83px
  }
  .intro {
    padding:28px 0
  }
  .intro-note {
    display:none
  }
  h1 {
    font-size:52px
  }
  .game-layout {
    grid-template-columns:minmax(0,1fr) 250px;
    gap:20px
  }
  .control-card {
    padding:17px
  }
  .title-english {
    font-size:20px
  }
  .header-right {
    gap:18px
  }
  .runtime-status {
    font-size:10px
  }
  .language-note {
    display:none
  }
  .board-toolbar {
    gap:15px
  }
  .quiet-button {
    font-size:10px
  }
  .player-strip>div>span {
    font-size:9px
  }
  footer>span:last-child {
    display:none
  }
}
@media(max-width:640px) {
  .page {
    padding:0 18px
  }
  .header-right .source-link {
    display:none
  }
  .brand-mark {
    width:35px;
    height:35px;
    font-size:23px
  }
  .brand {
    font-size:13px
  }
  .brand-sub {
    font-size:7px
  }
  .runtime-status {
    max-width:130px;
    text-align:right
  }
  .intro {
    padding:25px 0 28px
  }
  .eyebrow {
    font-size:8px
  }
  h1 {
    font-size:48px
  }
  .title-english {
    font-size:18px;
    margin-left:15px
  }
  .game-layout {
    display:flex;
    flex-direction:column;
    gap:22px
  }
  .play-area,.sidebar {
    width:100%
  }
  .control-card {
    padding:23px
  }
  .sidebar {
    display:grid;
    grid-template-columns:1fr
  }
  .game-message {
    min-height:0
  }
  .settings {
    display:grid;
    grid-template-columns:1fr;
    gap:0
  }
  .history-card {
    margin:24px 0
  }
  .history {
    max-height:180px
  }
  .language-note {
    display:flex
  }
  .board-toolbar {
    gap:20px
  }
  .quiet-button {
    font-size:11px
  }
  .coordinate {
    font-size:8px
  }
  .board-shell {
    padding:7px
  }
  .player-strip strong {
    font-size:12px
  }
  .player-strip>div>span {
    font-size:10px
  }
  footer {
    font-size:9px;
    margin-top:25px
  }
  .intro h1 {
    flex-wrap:wrap
  }
  .piece {
    width:86%;
    height:86%
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation:none!important;
    transition:none!important
  }
}
