:root { --n: #0f2d57; --blue: #1f5fae; --ink: #17233b; --mut: #55637a; --line: #d9e1ec; --bg: #f3f6fa; --card: #fff; --soft: #eaf1fa; --lt: #e6edf6; --dk: #7d9fcc; --bad: #b42318; --ok: #1d6b3a; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root { --n: #cfe0f7; --blue: #7fb0f0; --ink: #e7edf6; --mut: #a3b1c6; --line: #2b3a52; --bg: #0c1524; --card: #142036; --soft: #1c2c48; --bad: #ff9d90; --ok: #7fd6a0; color-scheme: dark; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.7 "Cairo", "Segoe UI", Tahoma, sans-serif; min-height: 100dvh; }
h1, h2, h3 { margin: 0; color: var(--n); line-height: 1.4; } h1 { font-size: clamp(1.4rem, 4vw, 2rem); } h2 { font-size: 1.15rem; margin-block-end: 12px; }
p { margin: 0 0 10px; } a { color: var(--blue); } small { color: var(--mut); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.skip { position: absolute; inset-inline-start: -9999px; } .skip:focus { inset-inline-start: 12px; top: 8px; z-index: 9; background: var(--card); padding: 8px 14px; }
.vh { position: absolute; clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; white-space: nowrap; }
.bar { background: #0f2d57; color: #fff; padding: 10px max(16px, calc((100% - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bar a { color: #fff; } .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; min-height: 48px; }
.logo .pc { width: 34px; height: 34px; }
#acct { display: flex; align-items: center; gap: 14px; } #acct span { display: grid; line-height: 1.3; text-align: end; } #acct small { color: #c3d3ea; }
#acct .link { color: #dbe6f5; } #acct .btn { background: #fff; color: #0f2d57; border-color: #fff; }
main { max-width: 1120px; margin: 0 auto; padding: 20px 16px 48px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; } .cols > div { display: grid; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 4px 18px; border: 1.5px solid #6f7f98; border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.main { background: #1f5fae; border-color: #1f5fae; color: #fff; } .btn.bad { color: var(--bad); border-color: currentColor; } .btn:disabled { opacity: .55; cursor: default; }
.link { border: 0; background: none; color: var(--blue); font: inherit; font-weight: 700; text-decoration: underline; min-height: 44px; cursor: pointer; padding: 0 4px; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; }
.rows { list-style: none; margin: 0; padding: 0; } .rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-block-start: 1px solid var(--line); flex-wrap: wrap; } .rows li:first-child { border: 0; }
.rows b, .rows small { display: block; overflow-wrap: anywhere; } .rows li > div { min-width: 0; }
.tag { font-size: .84rem; font-weight: 700; background: var(--soft); color: var(--n); border-radius: 99px; padding: 2px 12px; white-space: nowrap; }
.lives p { grid-column: 1 / -1; } .lives { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; } .lives a { text-decoration: none; color: inherit; display: grid; gap: 6px; } .lives b, .lives small { overflow-wrap: anywhere; line-height: 1.4; }
.field { margin-block-end: 12px; } .field label { display: block; font-weight: 700; margin-block-end: 4px; }
input, select { width: 100%; min-height: 48px; font: inherit; font-size: max(1rem, 1em); padding: 4px 12px; border: 1.5px solid #76839a; border-radius: 10px; background: var(--card); color: inherit; }
table { width: 100%; border-collapse: collapse; } th, td { text-align: start; padding: 8px 6px; border-block-end: 1px solid var(--line); } th { font-size: .84rem; color: var(--mut); } td:not(.nm), th:not(.nm) { text-align: center; white-space: nowrap; } .nm { overflow-wrap: anywhere; }
tr.me { background: var(--soft); } .scroll { overflow-x: auto; }
dialog { border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: inherit; padding: 22px; width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; } dialog::backdrop { background: rgb(5 15 32 / .55); } dialog .acts { margin-block-start: 14px; }
.promo .pc { width: 48px; height: 48px; }
#toast { position: fixed; inset-inline: 16px; bottom: max(16px, env(safe-area-inset-bottom)); margin: 0 auto; width: fit-content; max-width: 420px; background: #0b1f3d; color: #fff; padding: 10px 18px; border-radius: 12px; border: 1px solid #3a5680; visibility: hidden; z-index: 20; } #toast.on { visibility: visible; }
/* the pieces and the board */
.pc { display: block; width: 100%; height: 100%; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; } .pc.w { fill: #fff; stroke: #14233d; } .pc.b { fill: #1b2b47; stroke: #0a1424; } .pc .l { fill: none; } .pc.b .l { stroke: #cdd9ea; } .pc .e { stroke: none; fill: #14233d; } .pc.b .e { fill: #cdd9ea; }
.mini { display: grid; grid-template-columns: repeat(8, 1fr); direction: ltr; border-radius: 8px; overflow: hidden; } .mini i { aspect-ratio: 1; background: var(--lt); } .mini .d { background: var(--dk); }
.board { direction: ltr; width: 100%; max-width: min(100%, calc(100dvh - 210px)); min-width: min(100%, 300px); margin-inline: auto; border-radius: 10px; overflow: hidden; user-select: none; } .sq { touch-action: manipulation; } .sq.mv { touch-action: none; }
.rw { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); } .rw > div { aspect-ratio: 1; }
.sq { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--lt); border-radius: 0; cursor: default; } .sq.d { background: var(--dk); } .sq.mv, .sq.to, .sq.cap { cursor: pointer; }
.sq.last { background: #f3e08b; } .sq.d.last { background: #d8bf58; } .sq.sel { background: #9fd08f; } .sq.d.sel { background: #76b463; } .sq.chk { background: #f08a7c; }
.sq:focus-visible { outline-offset: -4px; outline-color: #0f2d57; z-index: 2; }
.sq.to::after, .sq.cap::after { content: ""; position: absolute; inset: 35%; border-radius: 50%; background: rgb(15 45 87 / .45); pointer-events: none; } .sq.cap::after { inset: 4%; background: none; border: 4px solid rgb(15 45 87 / .55); }
.sq .f, .sq .r { position: absolute; font: 700 .68rem/1 system-ui; color: #14305a; pointer-events: none; } .sq .f { right: 3px; bottom: 3px; } .sq .r { left: 3px; top: 3px; }
.pc.drag { position: relative; z-index: 5; pointer-events: none; }
.sq:has(.drag) { z-index: 6; } .board:has(.drag) { overflow: visible; }
.play { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.seat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px; max-width: calc(100dvh - 210px); min-width: min(100%, 300px); margin-inline: auto; } .seat b { overflow-wrap: anywhere; }
.clock { font: 700 1.5rem/1 ui-monospace, Consolas, monospace; direction: ltr; padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); min-width: 104px; text-align: center; } .clock.on { background: #0f2d57; border-color: #0f2d57; color: #fff; } .clock.low { background: #b42318; border-color: #b42318; color: #fff; }
.moves { direction: ltr; max-height: 260px; overflow-y: auto; display: grid; grid-template-columns: 40px 1fr 1fr; margin: 0 0 10px; } .moves span { color: var(--mut); padding: 6px; } .moves button { border: 0; background: none; font: inherit; color: inherit; text-align: left; padding: 6px 8px; border-radius: 6px; cursor: pointer; min-height: 36px; } .moves [aria-current] { background: var(--soft); font-weight: 800; }
.steps { direction: ltr; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-block-end: 12px; } .steps .btn { padding: 0; }
.note { background: var(--soft); border-radius: 12px; padding: 10px 14px; margin-block-end: 12px; }
.off { background: #b42318; color: #fff; text-align: center; padding: 8px; font-weight: 700; }
.ko { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 14px; overflow-x: auto; } .ko .m { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-block-end: 10px; } .ko .win { font-weight: 800; color: var(--ok); }
.lv1 { border-inline-start: 4px solid #c58a00; padding-inline-start: 10px; } .lv2 { border-inline-start: 4px solid #d1392b; padding-inline-start: 10px; }
@media (max-width: 820px) { .cols, .play { grid-template-columns: minmax(0, 1fr); } .board, .seat { max-width: 100%; } main { padding-inline: 12px; } }
main > .card { margin-block-end: 16px; }
