:root { --green: #1f7a3a; --green-dark: #14562a; --bg: #f6f7f4; --card: #fff; --ink: #1d1f1c; --muted: #6b716a; --line: #e2e5df; --amber: #c7881f; --red: #b2362c; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--green-dark); }
header { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
header .logo { width: 32px; height: 32px; border-radius: 50%; background: var(--green); display: grid; place-items: center; color: #fff; font-weight: 800; }
header .brand { font-weight: 800; letter-spacing: .04em; text-decoration: none; color: var(--ink); }
header nav { display: flex; gap: 4px; margin-left: auto; }
header nav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--muted); }
header nav a.on, header nav a:hover { background: #e8f3ea; color: var(--green-dark); font-weight: 600; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; }
h1 { font-size: 34px; line-height: 1.15; margin: 0 0 8px; } h2 { font-size: 20px; margin: 24px 0 10px; }
.muted { color: var(--muted); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eee; color: #444; text-transform: lowercase; vertical-align: middle; }
.pill.live { background: #e3f3e6; color: var(--green-dark); } .pill.verify, .pill.paused { background: #fbeedb; color: var(--amber); } .pill.finished, .pill.stopped { background: #eceeea; color: var(--muted); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 6px; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.grid.boards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .grid.boards { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid.boards { grid-template-columns: repeat(4, 1fr); } }
.tile { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.tile:hover { border-color: var(--green); }
.tile .names { display: flex; justify-content: space-between; font-size: 13px; margin: 4px 0; gap: 8px; }
.tile .names b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; width: 100%; border-radius: 6px; overflow: hidden; user-select: none; }
.board div { background-size: 88%; background-repeat: no-repeat; background-position: center; }
.board .l { background-color: #f0d9b5; } .board .d { background-color: #b58863; }
.board .l.hl { background-color: #cdd16a; } .board .d.hl { background-color: #aaa23a; }
.tabs { display: flex; gap: 6px; margin: 8px 0 16px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; font: inherit; cursor: pointer; color: var(--muted); }
.tabs button.on { color: var(--green-dark); border-bottom-color: var(--green); font-weight: 600; }
button.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 7px 12px; border-radius: 8px; font: inherit; cursor: pointer; }
button.ghost:disabled { opacity: .4; cursor: default; }
a.button { display: inline-block; text-decoration: none; background: var(--green); color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 600; }
a.button.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; padding: 28px 0 8px; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } h1 { font-size: 28px; } }
.hero p { font-size: 17px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.steps .card b { display: block; margin-bottom: 4px; }
.steps .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #e8f3ea; color: var(--green-dark); font-weight: 700; margin-right: 8px; }
/* game page */
.game { display: grid; grid-template-columns: minmax(280px, 560px) minmax(240px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .game { grid-template-columns: 1fr; } }
.player { display: flex; justify-content: space-between; align-items: center; padding: 6px 2px; font-weight: 600; }
.player .r { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.controls { display: flex; gap: 6px; justify-content: center; margin: 10px 0; }
.controls button { min-width: 48px; font-size: 18px; }
.moves { background: #fff; border: 1px solid var(--line); border-radius: 12px; max-height: 60vh; overflow: auto; }
.moves table { width: 100%; border-collapse: collapse; }
.moves td { padding: 4px 8px; border-bottom: 1px solid #f1f2ee; cursor: pointer; }
.moves td.n { width: 40px; color: var(--muted); text-align: right; }
.moves td.on { background: #e8f3ea; color: var(--green-dark); font-weight: 700; }
.result { text-align: center; font-weight: 700; padding: 8px; }
.note { color: var(--amber); font-size: 13px; padding: 4px 0; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px; }
