/* The requested Chess.com proportions, surfaces and controls, adapted to draughts. */
:root {
  --bg: #302e2b;
  --surface: #262421;
  --surface-alt: #3d3b38;
  --sidebar: #262421;
  --accent-ink: #fff;
  --font-display: 'Chess Sans', 'Inter', 'Noto Sans Armenian', sans-serif;
  --board-light: #eeeed2;
  --board-dark: #739552;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; }
.btn { border: 0; border-radius: 6px; font-weight: 700; box-shadow: inset 0 1px 0 #ffffff14, 0 2px 0 #0003; transition: background-color 150ms, filter 150ms, transform 100ms; }
.btn-primary { color: #fff; background: linear-gradient(#8cbb53, #639536); box-shadow: inset 0 1px 1px #c6e69a66, 0 3px 0 #4c7429, 0 4px 5px #0003; text-shadow: 0 1px 1px #0003; }
.btn-primary:hover:not(:disabled) { background: linear-gradient(#9bca60, #76a744); }
.btn-primary:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 1px #ffffff25, 0 1px 0 #4c7429; }
.btn-ghost, .btn-secondary { background: linear-gradient(#ffffff1a, #ffffff0d); border: 0; color: #f5f5f4; }
.btn-ghost:hover:not(:disabled), .btn-secondary:hover:not(:disabled) { background: linear-gradient(#ffffff26, #ffffff16); }

/* The final score gets a dedicated card, while the board stays in view. */
.gameover-backdrop { background: #13120fd1; backdrop-filter: blur(5px); }
.gameover-dialog {
  --result-color: #c4c0b8;
  --result-glow: #c4c0b812;
  position: relative;
  width: min(420px,100%);
  padding: 32px;
  border: 1px solid #ffffff14;
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 0%,var(--result-glow),transparent 64%), #282622;
  box-shadow: 0 28px 80px #0008, inset 0 1px 0 #ffffff08;
  text-align: center;
}
[data-result="win"] .gameover-dialog { --result-color: #e9c779; --result-glow: #d8b45b1c; }
[data-result="draw"] .gameover-dialog { --result-color: #b2c9e0; --result-glow: #8eafd41a; }
.gameover-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #b5b0a7; }
.gameover-close:hover { background: #ffffff0d; color: #fff; }
.gameover-close svg { width: 20px; height: 20px; }
.gameover-dialog .gameover-eyebrow { margin: 0 24px 24px; color: #b5b0a7; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.gameover-emblem { position: relative; display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto 24px; border: 1px solid color-mix(in srgb,var(--result-color) 32%,transparent); border-radius: 50%; color: var(--result-color); background: radial-gradient(circle at 38% 25%,#ffffff0c,transparent 70%), var(--result-glow); box-shadow: 0 0 0 8px color-mix(in srgb,var(--result-color) 4%,transparent), 0 12px 32px #0002, inset 0 1px 0 #ffffff14; }
.gameover-emblem::before, .gameover-emblem::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--result-color); opacity: .65; }
.gameover-emblem::before { top: 13px; left: -22px; box-shadow: 130px 52px 0 -1px var(--result-color); }
.gameover-emblem::after { top: -7px; right: -12px; width: 3px; height: 3px; box-shadow: -115px 77px 0 0 var(--result-color); }
.gameover-symbol { display: none; }
.gameover-symbol svg { display: block; width: 44px; height: 44px; stroke-width: 1.7; }
[data-result="win"] [data-result-symbol="win"], [data-result="loss"] [data-result-symbol="loss"], [data-result="draw"] [data-result-symbol="draw"], [data-result="finished"] [data-result-symbol="finished"] { display: block; }
.gameover-dialog h2 { margin: 0; font-size: clamp(28px,6vw,36px); line-height: 1.15; letter-spacing: -.035em; text-wrap: balance; }
[data-result="win"] .gameover-dialog h2 { color: #e7ce94; }
.gameover-dialog .gameover-reason { margin: 10px 0 0; color: #bcb7af; font-size: 14px; }
.gameover-match { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 16px; margin: 28px 0 24px; padding: 20px 12px 16px; border: 1px solid #ffffff08; border-radius: 12px; background: #0000001f; }
.gameover-player { display: grid; justify-items: center; gap: 9px; min-width: 0; }
.gameover-avatar { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #ffffff14; border-radius: 12px; color: #dbd6ce; background: #45423b; font-size: 19px; font-weight: 700; }
.gameover-player.is-winner .gameover-avatar { background: #81b64c1f; border-color: #81b64c80; color: #b7d990; box-shadow: 0 0 0 3px #81b64c0a; }
.gameover-player-name { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c9c4bc; font-size: 12px; font-weight: 600; }
.gameover-score { display: flex; align-items: center; gap: 10px; padding-bottom: 24px; font: 800 30px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.gameover-score-divider { color: #78736b; font-size: 20px; font-weight: 400; }
.gameover-actions { display: grid; gap: 12px; }
.gameover-actions .btn { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 9px; font-size: 15px; }
.gameover-actions svg { width: 18px; height: 18px; flex: none; }
.gameover-actions .btn-secondary { background: #ffffff07; border: 1px solid #ffffff12; box-shadow: none; color: #dedad3; }
.gameover-actions .btn-secondary:hover { background: #ffffff10; }
.gameover-lobby { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-top: 16px; color: #b5b0a7; font-size: 13px; }
.gameover-lobby:hover { color: #f7f6f5; }
.gameover-lobby svg { width: 15px; height: 15px; }
@media (prefers-reduced-motion: no-preference) {
  .gameover-backdrop:not(.hidden) .gameover-dialog { animation: gameover-arrive 240ms ease-out both; }
  @keyframes gameover-arrive { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
}
@media (max-width: 480px), (max-height: 650px) {
  .gameover-dialog { padding: 24px; border-radius: 16px; }
  .gameover-dialog .gameover-eyebrow { margin-bottom: 20px; }
  .gameover-emblem { width: 76px; height: 76px; margin-bottom: 20px; }
  .gameover-symbol svg { width: 36px; height: 36px; }
  .gameover-match { margin-top: 24px; }
}
.sidebar { padding: 16px 8px; }
.sidebar-brand { gap: 3px; padding: 0 4px 16px; font-family: var(--font-display); font-size: 21px; font-weight: 800; line-height: 1; letter-spacing: -.6px; }
.brand-checkers { flex: none; width: 33px; height: 38px; }
.sidebar-brand > span { max-width: 108px; }
.sidebar-nav { gap: 0; margin-inline: -8px; }
.nav-link { min-height: 42px; padding: 8px 16px; gap: 12px; border-radius: 0; color: #dedddc; font-size: 16px; font-weight: 700; }
.nav-link.is-active { background: #0002; }
.nav-link.is-active::before { display: none; }
.nav-link:hover { background: #0003; }
.nav-color-icon { flex: none; width: 25px; height: 25px; object-fit: contain; }
.sidebar-foot { gap: 16px; padding-top: 32px; }
.sidebar-auth { display: grid; gap: 12px; }
.sidebar-auth .btn { min-height: 40px; font-size: 14px; padding: 8px 4px; }
.account-block { border-color: #ffffff14; padding: 16px 4px 0; }
.account-avatar { border-radius: 4px; border: 0; background: #ffffff14; }
.lang-switch { border-top: 1px solid #ffffff0d; padding-top: 8px; }
.lang-switch [data-lang] { border: 0; min-height: 40px; }
.lang-switch .is-active { background: #ffffff0a; }
.bottom-nav .nav-color-icon { width: 24px; height: 24px; }

/* Board preview: coordinates belong to the board, with players above and below. */
.position-board { width: 100%; max-width: none; border-radius: 3px; }
.preview-player, .preview-caption { width: 100%; max-width: none; }
.preview-player { gap: 10px; min-height: 50px; align-items: flex-start; font-size: 14px; line-height: 20px; }
.preview-player strong { padding-top: 1px; }
.preview-avatar { display: grid; place-items: center; width: 40px; height: 40px; background: #ffffff16; color: #161513; border-radius: 3px; }
.preview-avatar svg { width: 34px; height: 34px; fill: currentColor; stroke-width: 1; transform: translateY(3px); }
.preview-player-self { padding-top: 10px; }
.preview-player-self .preview-avatar { background: #ffffff80; color: #e5e4e0; }
.preview-variant { margin-left: auto; color: #b6b4b1; font-size: 12px; padding-top: 2px; }
.position-rank, .position-file { position: absolute; z-index: 3; font: 700 clamp(10px,1.1vw,15px)/1 Arial,sans-serif; pointer-events: none; }
.position-rank { top: 5px; left: 5px; }
.position-file { bottom: 4px; right: 5px; }
.position-square.light { color: var(--board-dark); }
.position-square.dark { color: var(--board-light); }
/* Raised wooden discs replace the reference's chess pieces. */
.piece.white, .preview-piece.white { background: radial-gradient(circle at 35% 25%, #fffef4, #f4eed6 70%, #d0c6a7); border: 2px solid #655b48; box-shadow: 0 3px 0 #86795f, 0 4px 3px #0006, inset 0 1px 2px #fff; color: #655b48; }
.piece.black, .preview-piece.black { background: radial-gradient(circle at 35% 25%, #64635e, #41413c 70%, #292a26); border: 2px solid #24251f; outline: 0; box-shadow: 0 3px 0 #1d1e19, 0 4px 3px #0006, inset 0 1px 2px #a5a398; color: #b9b7ab; }
.piece::before { inset: 15%; border: 1px solid currentColor; opacity: .65; box-shadow: 0 1px 0 #fff3, inset 0 1px 1px #0003; }
.position-square .piece { inset: 10% 12% 15%; }

/* /play: left board, right scrollable menu, with full-card native buttons. */
.play-launcher-content { padding: 16px 18px 24px; }
.play-launcher-grid { width: 100%; max-width: 1100px !important; margin: 0; grid-template-columns: minmax(0,min(728px,calc(100svh - 152px))) 320px; gap: 32px; align-items: start; }
.play-launcher-board { display: block; padding: 0; }
.play-launcher-board .lobby-table { max-width: none; }
.play-launcher-options { order: 0; width: 100%; min-width: 0; margin: 0; border-radius: 5px; background: var(--surface); max-height: calc(100svh - 32px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #151412 transparent; }
.play-launcher-heading { display: flex; gap: 10px; align-items: center; justify-content: center; min-height: 86px; padding: 16px 12px; background: #0002; }
.play-launcher-heading h1 { font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -.4px; }
.play-launcher-heading p { margin-top: 4px; color: #b8b6b3; font-size: 12px; line-height: 1.4; }
.play-launcher-heading > img { flex: none; }
.play-launcher-options .mode-selector { padding: 16px; container-type: normal; }
.play-launcher-options .mode-strip { display: grid; gap: 8px; background: none; border: 0; border-radius: 0; }
.play-launcher-options .mode-tile { display: block; padding: 0; border: 0; margin: 0; background: none; border-radius: 10px; }
.mode-card { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 116px; padding: 22px 24px; border: 0; border-radius: 10px; background: linear-gradient(#ffffff1a, #ffffff0d); color: #fff; text-align: left; box-shadow: inset 0 1px 0 #ffffff14, 0 1px 2px #00000024, 0 2px 4px #0000001a; cursor: pointer; transition: background-color 150ms, box-shadow 150ms; }
.mode-card:hover:not(:disabled) { background-color: #ffffff0d; }
.mode-card:active:not(:disabled) { background-color: #0002; box-shadow: inset 0 2px 3px #0003; }
.mode-card:disabled { opacity: .6; cursor: wait; }
.mode-card-icon { width: 48px; height: 48px; flex: none; object-fit: contain; }
.mode-card-copy { display: flex; flex-direction: column; min-width: 0; }
.mode-card-title { font: 800 24px/1.14 var(--font-display); letter-spacing: -.2px; }
.mode-card-description { color: #c3c1bf; font: 400 14px/1.4 var(--font); margin-top: 5px; }
.bot-level { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 12px 1px; font-size: 12px; color: #b9b7b4; }
.bot-level .difficulty-select { width: auto; min-width: 0; min-height: 32px; padding: 3px 22px 3px 8px; font-size: 12px; background: transparent; border: 0; }
.play-launcher-options .mm-search-box { min-height: 116px; padding: 16px; border-radius: 10px; background: #ffffff0d; }
.play-launcher-options .mode-links { display: flex; justify-content: space-between; gap: 6px; padding: 12px 0 4px; }
.play-launcher-options .mode-links a { gap: 7px; color: #c3c1bf; font-size: 13px; text-decoration: none; }
.play-launcher-options .mode-links a:hover { color: #fff; }
.play-launcher-options .join-code-row { margin-top: 8px; padding-top: 12px; border-top-color: #ffffff12; }
.play-launcher-options .join-code-copy label { font-size: 14px; }
.play-launcher-options .join-code-copy p { font-size: 12px; }
.play-launcher-options .join-code-row input { min-height: 40px; background: #0002; border-color: #ffffff1a; font-size: 14px; }
.play-launcher-options .join-code-row .btn { min-height: 40px; font-size: 12px; }

/* Home keeps the reference's large board and centered primary actions. */
.home-content { padding: 40px 32px 48px; }
.home-grid, .home-grid.has-account, .home-grid.has-active:not(.has-account), .home-grid.has-account.has-active { max-width: 1080px; grid-template-columns: minmax(0,1fr) 320px; grid-template-areas: none; gap: 32px; }
.home-grid > * { grid-area: auto; }
.home-start { grid-column: 1/-1; display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); align-items: center; gap: 56px; border: 0; padding: 0 0 24px; }
.home-hero-board { min-width: 0; }
.home-hero-board .preview-player, .home-hero-board .preview-player-self { display: none; }
.home-hero-board .position-board { box-shadow: 0 4px 16px #0002; }
.home-hero-copy { min-width: 0; text-align: center; }
.home-heading { margin: 0; }
.home-heading h1 { font: 800 clamp(36px,3.4vw,50px)/1.08 var(--font-display); letter-spacing: -.7px; text-wrap: balance; }
.home-heading p { margin: 20px auto 0; max-width: 38ch; color: #c3c1bf; font-size: 16px; line-height: 1.6; }
.home-hero-copy .site-stats { justify-content: center; gap: 10px 22px; margin: 22px 0 28px; font-size: 12px; color: #aaa8a5; }
.home-hero-copy .site-stats strong { color: #dedddb; }
.online-dot { display: inline-block; width: 7px; height: 7px; background: #81b64c; border-radius: 50%; align-self: center; }
.home-start-actions { display: block; margin: 0 auto; max-width: 400px; min-height: 0; }
.home-action { width: 100%; min-height: 96px; padding: 18px 22px; gap: 20px; text-align: left; justify-content: flex-start; }
.home-action > img { flex: none; }
.home-action > span { min-width: 0; }
.home-action strong { display: block; font: 800 28px/1.1 var(--font-display); letter-spacing: -.3px; }
.home-action small { display: block; font-size: 13px; font-weight: 400; margin-top: 5px; line-height: 1.35; }
.home-action.btn-primary small { color: #f1f8e9; }
.home-secondary-actions { display: flex; flex-direction: column; max-width: 400px; gap: 12px; margin: 20px auto 0; }
.home-secondary-actions a { text-decoration: none; color: #fff; }
.home-secondary-actions .home-action { min-height: 92px; }
.home-secondary-actions .home-action small { color: #c3c1bf; }
.home-secondary-actions .home-friend-link { display: inline-flex; align-self: center; gap: 8px; min-height: 44px; color: #c3c1bf; font-size: 14px; }
.home-friend-link:hover { color: #fff; }
.home-friend-link svg { width: 16px; height: 16px; color: inherit; }
.home-active-games { grid-column: 1/-1; margin: 0; border: 0; border-radius: 6px; background: var(--surface); padding: 20px 24px; }
.home-task { display: grid; grid-column: 1/-1; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 8px 48px; align-items: center; border: 0; padding: 36px 48px; background: var(--surface); border-radius: 6px; }
.home-task .task-preview-link { grid-column: 1; grid-row: 1/4; margin: 0; }
.home-task .mini-board { width: min(100%,320px); margin: 0 auto; border: 0; border-radius: 3px; overflow: hidden; }
.home-task .panel-title-row { grid-column: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.home-task .panel-title-row h2 { font: 800 32px/1.1 var(--font-display); }
.home-task .panel-title-row time { font-size: 13px; }
.home-task > p { grid-column: 2; margin: 0; }
.home-task > .btn { grid-column: 2; width: min(100%,240px); justify-self: start; }
.home-task > .text-button { grid-column: 2; }
.home-progress { grid-column: 2; padding: 20px; border: 0; border-radius: 6px; background: var(--surface); }
.home-recent { grid-column: 1; grid-row: auto; }
.home-grid:not(.has-account) .home-recent { grid-column: 1/-1; }
:lang(ru) .mode-card { padding-inline: 18px; gap: 14px; }
:lang(ru) .mode-card-title { font-size: 22px; }
:lang(ru) .play-launcher-heading h1 { font-size: 26px; }
:lang(hy) .mode-card-title { font-size: 21px; }
:lang(hy) .home-heading h1 { font-size: clamp(30px,3vw,44px); font-weight: 800; }
:lang(hy) .home-action strong { font-size: 24px; }
:lang(hy) .play-launcher-heading h1 { font-size: 27px; }
@media (min-width: 1600px) { .play-launcher-grid { margin-inline: auto; } }
@media (min-width: 901px) and (max-width: 1199px) {
  .play-launcher-grid { grid-template-columns: minmax(0,1fr) 300px; gap: 24px; }
  .mode-card { padding-inline: 18px; gap: 12px; }
  .home-content { padding-inline: 24px; }
  .home-start { gap: 28px; }
  .home-action { padding-inline: 16px; gap: 12px; }
  .home-action strong { font-size: 25px; }
}
@media (max-width: 900px) {
  .sidebar-brand > span { max-width: none; }
  .sidebar-brand { padding-right: 44px; }
  .play-launcher-content { padding: 72px 16px calc(var(--bottom-nav) + 24px); }
  .play-launcher-grid { display: block; max-width: 540px !important; margin-inline: auto; }
  .play-launcher-board { display: none; }
  .play-launcher-options { max-height: none; overflow: visible; }
  .play-launcher-heading { min-height: 86px; }
  .play-launcher-heading h1 { font-size: 30px; }
  .mode-card { min-height: 104px; padding: 20px 24px; }
  .home-content { padding: 88px 20px calc(var(--bottom-nav) + 24px); }
  .home-grid, .home-grid.has-account, .home-grid.has-active:not(.has-account), .home-grid.has-account.has-active { display: flex; flex-direction: column; gap: 28px; }
  .home-grid > * { width: 100%; }
  .home-start { display: block; padding: 0; }
  .home-hero-board { display: none; }
  .home-hero-copy { max-width: 520px; margin-inline: auto; }
  .home-heading h1 { font-size: 42px; }
  .home-heading p { margin-top: 16px; }
  .home-action { min-height: 90px; }
  .home-start-actions > .btn { width: 100%; }
  .home-task { padding: 28px; gap: 16px 28px; }
  .home-task .mini-board { width: 100%; max-width: 280px; }
  .home-task .panel-title-row h2 { font-size: 28px; }
  .home-progress, .home-recent { padding: 20px; background: var(--surface); border: 0; border-radius: 6px; }
}
@media (max-width: 480px) {
  .home-heading h1 { font-size: 38px; }
  .home-heading p { font-size: 15px; }
  .home-hero-copy .site-stats { gap: 8px 14px; margin-block: 18px 24px; }
  .home-action strong { font-size: 27px; }
  .home-action small { font-size: 12px; }
  .home-secondary-actions { margin-top: 16px; }
  .home-task { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px 20px; padding: 20px; }
  .home-task .panel-title-row h2 { font-size: 24px; }
  .home-task > p { font-size: 13px; }
  .home-task time { font-size: 12px; }
  .home-task > .btn { min-height: 44px; }
  .play-launcher-options .mode-selector { padding: 12px; }
  .mode-card { padding: 20px; gap: 16px; }
  .mode-card-title { font-size: 24px; }
  .mode-card-description { font-size: 13px; }
  :lang(hy) .mode-card { gap: 12px; padding-inline: 16px; }
  :lang(hy) .mode-card-title { font-size: 20px; }
  :lang(hy) .home-action strong { font-size: 22px; }
  :lang(hy) .home-heading h1 { font-size: 33px; }
}
