/* The lobby's shared sketch board (lobby/sketch.js, docs/lobby-sketch.md): a pen toolbar, the dotted paper and the
   cursors of the people drawing. Aspen Origin: flat graphite fills, no gradients or broad shadows, text ≥14px,
   70ms press / 180ms state / 240ms entrance, reduced motion and forced colors. The inks match sketch-core.mjs. */
.lobby-board{--board-table:#191919;--board-strip:#262626;--board-chosen:#3b3b3b;display:flex;flex-direction:column;min-width:0;min-height:0;container:lobby-board/inline-size}
.lobby-board [hidden]{display:none!important}

/* Toolbar: pen sizes and inks (one tab stop each, arrow keys choose), then undo, clear mine, report and fit. */
.lobby-board-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;min-height:52px;padding:4px 0 10px}
.lobby-board-pen{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.lobby-board-sizes,.lobby-board-colors{display:flex;align-items:center;gap:2px;padding:3px;border-radius:12px;background:var(--board-strip)}
.lobby-page .lobby-board-sizes button,.lobby-page .lobby-board-colors button{display:grid;place-items:center;width:30px;height:30px;min-height:30px;padding:0;border-radius:9px;background:transparent;color:#d9d9d9;transition:background-color 180ms cubic-bezier(.2,.8,.2,1),transform 70ms ease-out}
.lobby-page .lobby-board-sizes button[aria-checked=true],.lobby-page .lobby-board-colors button[aria-checked=true]{background:var(--board-chosen)}
.lobby-page .lobby-board-sizes button:active,.lobby-page .lobby-board-colors button:active,.lobby-page .lobby-board-tool:active{transform:scale(.94)}
.lobby-board-sizes i{display:block;border-radius:50%;background:currentColor}
.lobby-board-sizes [data-size="4"] i{width:4px;height:4px}
.lobby-board-sizes [data-size="9"] i{width:8px;height:8px}
.lobby-board-sizes [data-size="20"] i{width:15px;height:15px}
.lobby-board-colors i{display:block;width:18px;height:18px;border-radius:50%;background:var(--swatch);transition:transform 180ms cubic-bezier(.2,.8,.2,1)}
.lobby-board-colors [aria-checked=true] i{transform:scale(1.18)}
.lobby-board-colors [data-color=chalk]{--swatch:#ececec}
.lobby-board-colors [data-color=silver]{--swatch:#b8b8b8}
.lobby-board-colors [data-color=slate]{--swatch:#8c8c8c}
.lobby-board-colors [data-color=clay]{--swatch:#d4a191}
.lobby-board-colors [data-color=sand]{--swatch:#d6c48f}
.lobby-board-colors [data-color=sage]{--swatch:#a2bf9c}
.lobby-board-colors [data-color=sky]{--swatch:#97b3d4}
.lobby-board-actions{display:flex;align-items:center;gap:2px;margin-left:auto}
.lobby-page .lobby-board-tool{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:36px;height:36px;min-height:36px;padding:0 8px;border-radius:10px;background:transparent;color:#cdcdcd;font:500 14px/1 var(--sans);white-space:nowrap;transition:background-color 180ms cubic-bezier(.2,.8,.2,1),color 180ms,transform 70ms ease-out}
.lobby-board-tool svg,.lobby-board-login svg{flex:none;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
.lobby-board-text>span:first-of-type{display:none}
@container lobby-board (min-width:600px){.lobby-board-text>span:first-of-type{display:inline}}
.lobby-board-count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 7px;border-radius:11px;background:#e2e2e2;color:#1c1c1c;font:600 14px/1 var(--sans)}
.lobby-page .lobby-board-login{display:inline-flex;align-items:center;gap:9px;min-height:40px;padding:0 16px 0 13px;border-radius:10px;background:#e1e1e1;color:#1c1c1c;font:500 14px/1 var(--sans);transition:background-color 180ms cubic-bezier(.2,.8,.2,1),transform 70ms ease-out}
.lobby-page .lobby-board-login:active{transform:scale(.97)}
/* Only players who can draw see the pen; everyone keeps "fit". Loading keeps the row's height without flashing tools. */
.lobby-board:not([data-mode=draw]) .lobby-board-pen,.lobby-board:not([data-mode=draw]) #lobby-board-undo,.lobby-board:not([data-mode=draw]) #lobby-board-clear,.lobby-board:not([data-mode=draw]) #lobby-board-report{display:none}
.lobby-board[data-mode=loading] .lobby-board-tools{visibility:hidden}

/* The table and its paper (drawn by the canvas), the live layer, cursors and short notes. */
/* Stacked (phones), the stage has the paper's own 4:3 shape; beside the chat it fills the column's height. */
.lobby-board-stage{position:relative;flex:none;aspect-ratio:4/3;min-height:0;border-radius:14px;background:var(--board-table);overflow:hidden;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
@container lobby-space (min-width:760px){.lobby-board-stage{flex:1;aspect-ratio:auto}}
.lobby-board-canvas,.lobby-board-live{position:absolute;inset:0;display:block;width:100%;height:100%;border-radius:inherit}
.lobby-board-canvas{outline:none;touch-action:pan-y;cursor:default}
.lobby-board[data-mode=draw] .lobby-board-canvas{touch-action:none;cursor:crosshair}
.lobby-board[data-zoomed=true] .lobby-board-canvas{touch-action:none}
.lobby-board[data-grab=true] .lobby-board-canvas{cursor:grab}
.lobby-board[data-panning=true] .lobby-board-canvas{cursor:grabbing}
.lobby-board-canvas:focus-visible{outline:2px solid #d1d1d1;outline-offset:-2px}
.lobby-board-live,.lobby-board-cursors,.lobby-board-empty,.lobby-board-notice{pointer-events:none}
.lobby-board-cursors{position:absolute;inset:0;overflow:hidden}
.lobby-board-cursor{position:absolute;left:0;top:0;display:flex;align-items:flex-start;will-change:transform;transition:opacity 600ms ease;animation:lobby-board-enter 180ms cubic-bezier(.22,1,.36,1) both}
.lobby-board-cursor i{display:block;flex:none;width:10px;height:10px;margin:-5px 0 0 -5px;border-radius:50%;background:var(--cursor-ink,#ececec);box-shadow:0 0 0 2px var(--board-table)}
.lobby-board-cursor span{margin:9px 0 0 4px;padding:4px 10px;border-radius:999px;background:#303030;color:#f0f0f0;font:500 14px/1.25 var(--sans);white-space:nowrap}
.lobby-board-cursor[data-idle]{opacity:0}
.lobby-board-empty{position:absolute;left:50%;top:50%;width:min(80%,360px);margin:0;transform:translate(-50%,-50%);text-align:center;color:#8f8f8f;font:400 15px/1.6 var(--sans);letter-spacing:-.01em;animation:lobby-board-fade 240ms ease-out both}
.lobby-board[data-mode=soon] .lobby-board-empty{color:#b5b5b5;font-size:16px}
.lobby-board-notice{position:absolute;left:50%;top:12px;max-width:calc(100% - 24px);margin:0;padding:8px 14px;border-radius:10px;background:#2e2e2e;color:#eeeeee;font:500 14px/1.4 var(--sans);transform:translateX(-50%);text-align:center;animation:lobby-board-drop 180ms cubic-bezier(.22,1,.36,1) both}

/* Live or every three seconds, and who is drawing. */
.lobby-board-foot{display:flex;align-items:center;flex-wrap:wrap;gap:4px 14px;min-height:40px;padding-top:8px}
.lobby-board-status{display:flex;align-items:center;gap:9px;min-width:0;margin:0;color:#a3a3a3;font-size:14px;line-height:1.4}
.lobby-board-status i{flex:none;width:7px;height:7px;border-radius:50%;background:#c2c2c2}
.lobby-board[data-realtime=poll] .lobby-board-status i{background:transparent;box-shadow:inset 0 0 0 1.5px #8d8d8d}
.lobby-board[data-mode=loading] .lobby-board-status i{background:#5c5c5c;box-shadow:none}
/* Before the migration the paper itself says 画板即将开放; the status line stays quiet. */
.lobby-board[data-mode=soon] .lobby-board-status{visibility:hidden}
.lobby-board[data-drawing=true] .lobby-board-status i{animation:lobby-board-pulse 1.4s ease-in-out infinite}
.lobby-board-note{margin-left:auto;color:#808080;font-size:14px;line-height:1.4}
.lobby-page .lobby-board-retry{min-height:32px;padding:0 12px;border-radius:9px;background:#2c2c2c;color:#e0e0e0;font:500 14px var(--sans)}

.lobby-page .lobby-board-tool:focus-visible,.lobby-page .lobby-board-sizes button:focus-visible,.lobby-page .lobby-board-colors button:focus-visible,.lobby-page .lobby-board-login:focus-visible,.lobby-page .lobby-board-retry:focus-visible{outline:2px solid #d1d1d1;outline-offset:2px}
.lobby-page .lobby-board-tool:disabled{opacity:.36;cursor:default}
@media(hover:hover){
 .lobby-page .lobby-board-tool:not(:disabled):hover,.lobby-page .lobby-board-retry:hover{background:#2b2b2b;color:#f2f2f2}
 .lobby-page .lobby-board-sizes button[aria-checked=false]:hover,.lobby-page .lobby-board-colors button[aria-checked=false]:hover{background:#303030}
 .lobby-page .lobby-board-login:hover{background:#efefef}
}
@keyframes lobby-board-enter{from{opacity:0}}
@keyframes lobby-board-fade{from{opacity:0}}
@keyframes lobby-board-drop{from{opacity:0;transform:translate(-50%,-4px)}}
@keyframes lobby-board-pulse{50%{opacity:.35}}

/* Narrow boards (phones): the inks get their own row, then sizes and actions; targets grow to 36–40px. */
@container lobby-board (max-width:479px){
 .lobby-board[data-mode=draw] .lobby-board-tools::before{content:'';order:2;flex-basis:100%;height:0}
 .lobby-board-pen{display:contents}
 .lobby-board-colors{order:1}
 .lobby-board-sizes{order:3}
 .lobby-board-actions{order:4}
 .lobby-page .lobby-board-sizes button,.lobby-page .lobby-board-colors button{width:36px;height:36px;min-height:36px}
 .lobby-page .lobby-board-tool{min-width:40px;height:40px;min-height:40px}
 .lobby-board-note{margin-left:0}
}

/* The confirmation for clearing your strokes, reporting the board and (moderators) clearing it. */
.lobby-sketch-dialog{width:min(420px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:22px 22px 18px;border:0;border-radius:20px;background:#262626;color:#e6e6e6;box-shadow:none}
.lobby-sketch-dialog::backdrop{background:#080808b0}
.lobby-sketch-dialog[open]{animation:lobby-board-enter 240ms cubic-bezier(.22,1,.36,1) both}
.lobby-sketch-dialog h2{margin:0;font:500 18px/1.35 var(--sans);letter-spacing:-.02em}
.lobby-sketch-dialog p{margin:10px 0 22px;color:#ababab;font-size:14px;line-height:1.65}
.lobby-sketch-dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.lobby-page .lobby-sketch-dialog-actions button{min-height:42px;padding:0 18px;border-radius:10px;background:#333;color:#e2e2e2;font:500 14px var(--sans);transition:background-color 180ms cubic-bezier(.2,.8,.2,1),transform 70ms ease-out}
.lobby-page .lobby-sketch-dialog-actions .lobby-sketch-dialog-confirm{background:#e2e2e2;color:#1c1c1c}
.lobby-page #lobby-sketch-dialog-extra{margin-right:auto;background:transparent;color:#bdbdbd}
.lobby-page .lobby-sketch-dialog-actions button:active{transform:scale(.97)}
.lobby-page .lobby-sketch-dialog-actions button:focus-visible{outline:2px solid #d1d1d1;outline-offset:2px}

@media(prefers-reduced-motion:reduce){
 .lobby-board-cursor,.lobby-board-empty,.lobby-board-notice,.lobby-sketch-dialog[open]{animation:none}
 .lobby-board-cursor{transition:none}
 .lobby-board[data-drawing=true] .lobby-board-status i{animation:none}
}
@media(forced-colors:active){
 .lobby-board-stage,.lobby-board-sizes,.lobby-board-colors,.lobby-sketch-dialog{border:1px solid CanvasText}
 .lobby-page .lobby-board-sizes button[aria-checked=true],.lobby-page .lobby-board-colors button[aria-checked=true]{outline:2px solid Highlight;outline-offset:-2px}
 .lobby-board-colors i{forced-color-adjust:none;border:1px solid CanvasText}
 .lobby-board-sizes i{forced-color-adjust:none;background:CanvasText}
 .lobby-board-cursor i{forced-color-adjust:none;background:Highlight;box-shadow:none}
 .lobby-board-cursor span,.lobby-board-notice,.lobby-page .lobby-board-login,.lobby-board-count{border:1px solid CanvasText}
 .lobby-board-status i{background:CanvasText}
}
