* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #44403c 0%, #292524 100%);
    min-height: 100vh;
    color: #fafaf9;
    padding: 12px;
}
.wrap { max-width: 560px; margin: 0 auto; }
.head { text-align: center; margin-bottom: 12px; }
.head h1 { font-size: 1.55rem; margin-bottom: 10px; text-shadow: 0 2px 4px rgba(0,0,0,0.35); }
.stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.stat {
    background: rgba(0,0,0,0.28);
    padding: 8px 18px;
    border-radius: 8px;
    max-width: 100%;
}
.stat .lbl { opacity: 0.88; margin-right: 8px; font-size: 0.9rem; }
#status { font-weight: 600; }
.canvas-wrap {
    display: flex;
    justify-content: center;
    margin: 12px 0;
}
#board {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 3px solid rgba(255,255,255,0.15);
    touch-action: manipulation;
    cursor: crosshair;
    outline: none;
    background: #dcb35c;
}
#board:focus-visible {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.55), 0 8px 32px rgba(0,0,0,0.4);
}
.toolbar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.btn {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.btn:hover:not(:disabled) { background: rgba(255,255,255,0.25); }
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.hint {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 12px;
    line-height: 1.55;
}
