/* Foundations: a quiet draughts club. Layout and runtime board states live in app.css. */
:root {
  color-scheme: dark;
  --bg: #302e2b;
  --surface: #262421;
  --surface-alt: #3d3b38;
  --ink: #f7f6f5;
  --ink-secondary: #dedbd7;
  --muted: #c3c0bc;
  --line: #53504b;
  --line-strong: #8b8882;
  --accent: #81b64c;
  --accent-hover: #95c65f;
  --accent-active: #72a33e;
  --accent-ink: #18220e;
  --sidebar: #262421;
  --sidebar-text: #f7f6f5;
  --sidebar-muted: #c3c0bc;
  --sidebar-hover: #3d3b38;
  --sidebar-active: #3d3b38;
  --inverse: #f7f6f5;
  --inverse-hover: #d6e8c0;
  --inverse-active: #c0d6a4;
  --danger: #ffb9ac;
  --danger-hover: #762623;
  --danger-fill: #8c302e;
  --danger-ink: #fff4ec;
  --warn-bg: #423b25;
  --warn-border: #c3aa68;
  --warn-text: #f2d997;
  --ok-bg: #293b27;
  --ok-border: #90aa73;
  --ok-text: #c5e3a6;
  --error-bg: #402a29;
  --focus: #abd573;
  --board-light: #ebecd0;
  --board-dark: #779556;
  --board-border: #52673d;
  --piece-white: #fffaea;
  --piece-black: #17241f;
  --font: "Inter", "Noto Sans Armenian", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: var(--font);
  --fs-11: 14px; --fs-12: 14px; --fs-13: 14px; --fs-14: 14px;
  --fs-15: 16px; --fs-16: 16px; --fs-18: 18px; --fs-20: 20px;
  --fs-24: 24px; --fs-28: 28px; --fs-32: 32px;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700; --fw-extrabold: 700;
  --s-2: 2px; --s-4: 4px; --s-6: 6px; --s-8: 8px; --s-10: 10px;
  --s-12: 12px; --s-14: 14px; --s-16: 16px; --s-18: 18px; --s-20: 20px;
  --s-24: 24px; --s-28: 28px; --s-32: 32px; --s-40: 40px; --s-48: 48px;
  --radius-sm: 4px; --radius-card: 8px; --radius-lg: 8px;
  --sidebar-width: 170px;
  --header-mobile: 56px;
  --bottom-nav: calc(68px + env(safe-area-inset-bottom, 0px));
  --content-width: 1200px;
  --motion: 160ms ease;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-padding-block: 80px 100px; }
body { margin: 0; min-height: 100vh; font: 400 16px/1.55 var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font: 700 30px/1.2 var(--font-display); letter-spacing: -.025em; text-wrap: balance; }
h2 { font-size: 22px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
h3 { font-size: 18px; line-height: 1.35; font-weight: 600; }
:lang(hy) h1, :lang(hy) .sidebar-brand { font-family: var(--font); letter-spacing: 0; }
:lang(hy) h1 { font-size: 28px; font-weight: 600; }
a { color: inherit; text-decoration: none; }
p a, .text-link { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button, input, select, textarea { max-width: 100%; }
button { color: inherit; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden], .hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
[data-lucide] { width: 20px; height: 20px; stroke-width: 2; flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border: 1px solid transparent; border-radius: 6px; font-size: 15px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; transition: background-color var(--motion), border-color var(--motion), color var(--motion); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary:active:not(:disabled) { background: var(--accent-active); }
.btn-ghost, .btn-secondary { background: var(--surface-alt); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled), .btn-secondary:hover:not(:disabled) { background: var(--surface-alt); border-color: var(--accent); }
.btn-inverse { background: var(--inverse); color: #18220e; border-color: var(--inverse); }
.btn-inverse:hover:not(:disabled) { background: var(--inverse-hover); }
.btn-inverse:active:not(:disabled) { background: var(--inverse-active); }
.btn-inverse:focus-visible { outline-color: var(--inverse); }
.btn-danger { background: var(--danger-fill); color: var(--danger-ink); border-color: var(--danger-fill); }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }
.btn-danger-quiet { color: var(--danger); background: transparent; border-color: var(--line-strong); }
.btn-danger-quiet:hover:not(:disabled) { background: var(--error-bg); border-color: var(--danger); }
.btn:disabled { background: var(--surface-alt); border-color: var(--line); color: var(--muted); }
.btn-sm { min-height: 44px; padding: 8px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn { width: 44px; min-height: 44px; padding: 10px; border: 0; border-radius: 4px; background: transparent; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--surface-alt); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .input-label { font-size: 14px; font-weight: 600; color: var(--ink); }
input, select, textarea { min-height: 48px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 16px; }
input::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--focus); }
input.is-error, input[aria-invalid=true] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 14px; }
.field-error:empty { display: none; }
.actions-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) { h1 { font-size: 28px; } :lang(hy) h1 { font-size: 26px; } h2 { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
