/* Pocket Billiards — the table on a canvas (cloth = board skin cellB, rails = frame), players above, power bar below. */
body { background: radial-gradient(120% 70% at 50% 0%, #1f3d2c 0%, #0c1610 65%); }
.bl-score { display: flex; gap: 8px; width: min(100%, 440px); margin-bottom: 8px; align-items: stretch; }
.bl-side { flex: 1; min-width: 0; background: var(--card); border-radius: 14px; padding: 5px 8px; text-align: center; border: 2px solid transparent; transition: border-color .2s, box-shadow .2s; }
.bl-side.turn { border-color: var(--gold); box-shadow: 0 0 12px #ffc53355; }
.bl-side .nm { display: block; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-side .gr { display: block; font-size: 11px; color: var(--muted); }
.bl-side .balls { display: flex; justify-content: center; gap: 2px; margin-top: 3px; min-height: 13px; flex-wrap: wrap; }
.bb { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: inset -2px -2px 0 #0004; }
.bb.st { background: linear-gradient(#f7f3e8 0 25%, var(--c) 25% 75%, #f7f3e8 75%); }
.bb.in { opacity: .18; }
.bb.eight { outline: 2px solid var(--gold); }
.bl-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px; }
.bl-mid b { font-size: 15px; } .bl-mid small { font-size: 11px; color: var(--muted); }
.bl-wrap { display: flex; justify-content: center; width: min(100%, 440px); touch-action: none; }
.bl-table { display: block; border-radius: 18px; box-shadow: 0 12px 30px #000b; touch-action: none; }
.bl-controls { display: flex; align-items: center; gap: 8px; width: min(100%, 440px); margin-top: 10px; }
.bl-controls.off { opacity: .35; pointer-events: none; }
.bl-fine { flex: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid #ffffff22; background: var(--card); color: var(--text); font-size: 16px; cursor: pointer; }
.bl-power { position: relative; flex: 1; height: 42px; border-radius: 12px; background: #00000055; border: 1px solid #ffffff22; overflow: hidden; touch-action: none; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.bl-power span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #ffffffaa; pointer-events: none; }
.bl-power-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #3ddc84, #ffc533 70%, #ff5c5c); }
.bl-power.hot { box-shadow: 0 0 14px #ff5c5c88; }
.bl-turn { font-weight: 700; min-height: 24px; margin: 8px 0 4px; text-align: center; font-size: 14px; }
.bl-toast { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); font-size: 22px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #000a, 0 0 16px #000; pointer-events: none; animation: bl-toast 1.5s ease-out forwards; z-index: 20; white-space: nowrap; max-width: 96vw; overflow: hidden; text-overflow: ellipsis; }
@keyframes bl-toast { 0% { opacity: 0; transform: translate(-50%, 16px) scale(.5); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -30px); } }
@media (prefers-reduced-motion: reduce) { .bl-toast { animation: none; opacity: 1; } }
