/* 샤봇 포켓볼 — 어두운 당구장, 등불 아래 파란 천 당구대 */
.stage.pl { padding: 6px; gap: 6px; justify-content: flex-start; touch-action: none; overscroll-behavior: none;
  background: radial-gradient(90% 70% at 50% 45%, #2a2547 0%, #191a35 55%, #0d0e1f 100%); }
.stage.pl::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40% 32% at 50% 48%, rgba(255, 230, 170, 0.07), transparent 70%); }
.pl-parts[hidden] { display: none; }

/* 위 · 아래 줄(보통 화면) */
.pl-top { position: relative; z-index: 1; flex: none; width: 100%; max-width: 1120px; display: flex; gap: 6px; align-items: stretch; }
.pl-ctrl { position: relative; z-index: 1; flex: none; width: 100%; max-width: 760px; height: 50px; display: flex; gap: 8px; align-items: stretch; }
.pl-left, .pl-right { display: none; }
.pl-main { position: relative; z-index: 1; flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }

.pl-pc { flex: 1 1 0; min-width: 0; border-radius: 12px; padding: 5px 10px 6px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(143, 150, 255, 0.14);
  display: flex; flex-direction: column; gap: 4px; transition: background 0.25s, border-color 0.25s, box-shadow 0.25s; }
.pl-pc.on { border-color: #3ee0b5; background: rgba(62, 224, 181, 0.1); box-shadow: inset 0 0 0 1px #3ee0b5, 0 0 18px rgba(62, 224, 181, 0.22); }
.pl-pc.win { border-color: #ffd23f; background: rgba(255, 210, 63, 0.12); box-shadow: inset 0 0 0 1px #ffd23f, 0 0 20px rgba(255, 210, 63, 0.3); }
.pl-nm { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; overflow: hidden; min-width: 0; }
.pl-nm b { font-family: var(--title); font-weight: 400; font-size: 17px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pl-nm em { font-style: normal; font-size: 11.5px; color: #a9afd6; flex: none; }
.pl-p1 .pl-nm, .pl-p1 .pl-balls { flex-direction: row-reverse; }
.pl-balls { display: flex; gap: 3px; min-height: 14px; align-items: center; }
.pl-mb { flex: none; width: 14px; height: 14px; border-radius: 50%; display: block;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.8) 0 10%, rgba(255, 255, 255, 0) 32%), var(--c);
  box-shadow: inset -2px -2px 3px rgba(0, 0, 0, 0.38); }
.pl-mb.st { background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.8) 0 10%, rgba(255, 255, 255, 0) 32%), linear-gradient(#f4f1e6 0 27%, var(--c) 27% 73%, #f4f1e6 73%); }
.pl-mb.off { opacity: 0.16; filter: grayscale(0.7); }
.pl-mb.e8 { margin-left: 3px; opacity: 0.28; }
.pl-mb.e8.go { opacity: 1; box-shadow: inset -2px -2px 3px rgba(0, 0, 0, 0.38), 0 0 0 2px #ffd23f, 0 0 8px rgba(255, 210, 63, 0.8); }
.pl-open { font-size: 11.5px; color: #8c93c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-msg { flex: 1.25 1 0; min-width: 0; display: grid; place-items: center; text-align: center; font-size: 14px; line-height: 1.25; color: #e3e6ff; padding: 0 4px; }
.pl-pause { flex: none; width: 44px; border-radius: 12px; border: 1px solid rgba(143, 150, 255, 0.25); background: rgba(255, 255, 255, 0.07); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.pl-pause svg { width: 20px; height: 20px; fill: currentColor; }
.pl-pause:hover, .pl-spinbtn:hover { background: rgba(255, 255, 255, 0.13); }

/* 당점 단추 · 힘 막대 · 미세 조준 띠 */
.pl-spinbtn { flex: none; display: flex; align-items: center; gap: 7px; padding: 0 12px 0 9px; border-radius: 12px; border: 1px solid rgba(143, 150, 255, 0.25);
  background: rgba(255, 255, 255, 0.07); color: #dfe2ff; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pl-spinbtn.set { border-color: #ffd23f; box-shadow: 0 0 12px rgba(255, 210, 63, 0.25); }
.pl-sb { position: relative; display: block; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 36% 30%, #fff 0 14%, #ecebe2 42%, #bdbaac 100%); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4); }
.pl-sd { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #ff3d55; box-shadow: 0 0 0 1.5px #fff; }
.pl-power { flex: 1 1 auto; min-width: 110px; position: relative; border-radius: 12px; overflow: hidden; touch-action: none; cursor: ew-resize;
  background: rgba(255, 255, 255, 0.06) repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(255, 255, 255, 0.12) calc(10% - 1px) 10%);
  border: 1px solid rgba(143, 150, 255, 0.28); }
.pl-pfill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 0) * 100%);
  background: linear-gradient(90deg, #17b39b, #3ee0b5 30%, #ffd23f 65%, #ff6b5a); box-shadow: 0 0 14px rgba(255, 210, 63, 0.35); }
.pl-plab { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--title); font-size: 17px; letter-spacing: 0.06em; color: #e3e6ff; pointer-events: none; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.pl-power.live .pl-plab { opacity: 0.35; }
.pl-pval { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-family: var(--title); font-weight: 400; font-size: 18px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); pointer-events: none; }
.pl-power.hint { animation: pl-hint 1.3s ease-in-out infinite; }
@keyframes pl-hint { 50% { border-color: #3ee0b5; box-shadow: 0 0 0 2px rgba(62, 224, 181, 0.6), 0 0 18px rgba(62, 224, 181, 0.45); } }
.pl-fine { flex: 0 0 118px; position: relative; border-radius: 12px; overflow: hidden; touch-action: none; cursor: ew-resize;
  border: 1px solid rgba(143, 150, 255, 0.25); background: rgba(255, 255, 255, 0.05); }
.pl-ftick { position: absolute; inset: 0; background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.3) 0 2px, transparent 2px 9px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent); mask-image: linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent); }
.pl-fine span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: #dfe2ff; pointer-events: none; text-shadow: 0 1px 3px #000; text-align: center; line-height: 1.15; padding: 0 4px; }

/* 가로로 낮은 화면(폰 가로): 양옆 기둥 */
.stage.pl.pl-side { flex-direction: row; align-items: stretch; justify-content: center; }
.pl-side .pl-top, .pl-side .pl-ctrl { display: none; }
.pl-side .pl-left, .pl-side .pl-right { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; flex: 0 0 clamp(98px, 15vw, 150px); min-height: 0; }
.pl-side .pl-main { width: auto; flex: 1 1 auto; min-width: 0; }
.pl-side .pl-pc { flex: none; padding: 5px 8px; }
.pl-side .pl-p1 .pl-nm, .pl-side .pl-p1 .pl-balls { flex-direction: row; }
.pl-side .pl-balls { flex-wrap: wrap; }
.pl-side .pl-nm { flex-wrap: wrap; row-gap: 0; }
.pl-side .pl-nm b { font-size: 15px; }
.pl-side .pl-power { flex: 1 1 auto; min-width: 0; min-height: 80px; cursor: ns-resize;
  background: rgba(255, 255, 255, 0.06) repeating-linear-gradient(0deg, transparent 0 calc(10% - 1px), rgba(255, 255, 255, 0.12) calc(10% - 1px) 10%); }
.pl-side .pl-pfill { top: auto; right: 0; width: auto; height: calc(var(--p, 0) * 100%); background: linear-gradient(0deg, #17b39b, #3ee0b5 30%, #ffd23f 65%, #ff6b5a); }
.pl-side .pl-plab { writing-mode: horizontal-tb; }
.pl-side .pl-pval { right: auto; left: 50%; top: 8px; transform: translateX(-50%); }
.pl-side .pl-spinbtn { flex: none; height: 46px; justify-content: center; }
.pl-side .pl-fine { flex: 1 1 auto; min-height: 70px; cursor: ns-resize; }
.pl-side .pl-ftick { background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.3) 0 2px, transparent 2px 9px);
  -webkit-mask-image: linear-gradient(0deg, transparent, #000 28%, #000 72%, transparent); mask-image: linear-gradient(0deg, transparent, #000 28%, #000 72%, transparent); }
.pl-side .pl-pause { width: auto; height: 40px; flex: none; }
.pl-side .pl-msg { flex: none; font-size: 12.5px; padding: 2px 0; min-height: 34px; }

/* 당구대 */
.pl-wrap { position: relative; flex: none; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.4); }
.pl-cv { display: block; touch-action: none; cursor: crosshair; }

.pl-banner { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); z-index: 2; pointer-events: none; text-align: center;
  padding: 12px 26px 11px; border-radius: 18px; max-width: 92%; white-space: nowrap;
  background: linear-gradient(135deg, rgba(100, 112, 255, 0.95), rgba(68, 80, 220, 0.95)); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(62, 224, 181, 0.7); }
.pl-banner.bad { background: linear-gradient(135deg, rgba(232, 70, 80, 0.96), rgba(170, 30, 60, 0.95)); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(255, 190, 190, 0.8); }
.pl-banner.gold { background: linear-gradient(135deg, rgba(255, 200, 61, 0.97), rgba(255, 140, 70, 0.95)); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45), 0 0 0 2px #fff, 0 0 40px rgba(255, 200, 61, 0.55); }
.pl-banner[hidden] { display: none; }
.pl-banner b { display: block; font-family: var(--title); font-weight: 400; font-size: 32px; line-height: 1.15; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.pl-banner span { display: block; font-size: 14.5px; font-weight: 700; color: #eef0ff; white-space: normal; margin-top: 2px; }
.pl-banner span[hidden] { display: none; }
.pl-banner.gold b, .pl-banner.gold span { color: #3a2400; text-shadow: none; }
.pl-banner.show { animation: pl-banner 2.2s ease-out both; }
@keyframes pl-banner {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  18% { transform: translate(-50%, -50%) scale(1); }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}
.pl-tip { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); z-index: 2; pointer-events: none; width: max-content; max-width: 88%;
  padding: 8px 15px; border-radius: 14px; background: rgba(10, 12, 32, 0.84); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.35; text-align: center;
  border: 1px solid rgba(62, 224, 181, 0.55); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.pl-tip.top { bottom: auto; top: 7%; }
.pl-tip[hidden] { display: none; }
.pl-tip.show { animation: pl-tip 0.35s ease-out both; }
@keyframes pl-tip { from { opacity: 0; transform: translate(-50%, 8px); } }

/* 시작 · 일시정지 · 끝 · 당점 화면 */
.pl .panel [hidden] { display: none; }
.pl .overlay { background: rgba(10, 11, 28, 0.6); }
.pl .panel { background: linear-gradient(180deg, #262b5c, #1b1f46); color: #fff; border: 1px solid rgba(100, 112, 255, 0.45); touch-action: pan-y;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(100, 112, 255, 0.2); width: min(430px, 100%); }
.pl .panel h2 { color: #fff; }
.pl .panel p, .pl .panel ul { color: #cfd3ff; }
.pl .panel ul { font-size: 14px; line-height: 1.48; margin-bottom: 10px; }
.pl .panel li::marker { color: #3ee0b5; }
.pl .panel .seg { margin: 2px 0 10px; }
.pl .panel .seg button { background: rgba(255, 255, 255, 0.06); border-color: rgba(143, 150, 255, 0.25); color: #cfd3ff; cursor: pointer; font-size: 14.5px; }
.pl .panel .seg button.on { border-color: #3ee0b5; background: rgba(62, 224, 181, 0.17); color: #fff; }
.pl .panel .stats div { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(143, 150, 255, 0.18); }
.pl .panel .stats b { color: #ffd23f; }
.pl .panel .stats span { color: #a9afd6; }
.pl .big-btn { background: linear-gradient(135deg, #17b39b, #0f8f7c); box-shadow: 0 8px 22px rgba(23, 179, 155, 0.4); cursor: pointer; }
.pl .big-btn:hover { filter: brightness(1.08); }
.pl .sub-btn { background: rgba(255, 255, 255, 0.06); border-color: rgba(143, 150, 255, 0.25); color: #cfd3ff; text-decoration: none; cursor: pointer; }
.pl-art { display: block; width: 220px; height: auto; margin: -4px auto 0; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4)); }
.pl .panel .pl-keys { font-size: 12.5px; color: #a9afd6; margin-bottom: 8px; }
.pl .panel .pl-rec, .pl .panel .e-rec { margin: 10px 0 0; font-size: 14px; color: #ffd23f; }
.pl .panel .e-rec { margin: 0 0 10px; }
.pl .panel .e-why { font-size: 15px; }
.pl-spinpanel { text-align: center; }
.pl-sball { position: relative; width: min(220px, 58vw, 40vh); aspect-ratio: 1; margin: 4px auto 10px; border-radius: 50%; touch-action: none; cursor: crosshair;
  background: radial-gradient(circle at 37% 31%, #fff 0 9%, #f0eee5 34%, #cfccbe 78%, #a9a698 100%); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), inset -8px -10px 20px rgba(0, 0, 0, 0.12); }
.pl-scross { position: absolute; inset: 6%; border-radius: 50%; pointer-events: none;
  background: linear-gradient(rgba(30, 40, 90, 0.22), rgba(30, 40, 90, 0.22)) center / 1.5px 100% no-repeat, linear-gradient(rgba(30, 40, 90, 0.22), rgba(30, 40, 90, 0.22)) center / 100% 1.5px no-repeat;
  box-shadow: inset 0 0 0 1.5px rgba(30, 40, 90, 0.16); }
.pl-sdot { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #ff8d98, #e0203a); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 4px 10px rgba(0, 0, 0, 0.45); }
.pl .panel .pl-shelp { font-size: 13.5px; line-height: 1.45; }
.pl-sbtns { display: flex; gap: 8px; align-items: stretch; }
.pl-sbtns .sub-btn, .pl-sbtns .big-btn { margin-top: 0; }
.pl-sbtns .sub-btn { flex: 0 0 36%; }

/* 작은 화면 */
@media (max-width: 560px) {
  .pl-pc { padding: 4px 7px 5px; }
  .pl-nm { gap: 5px; }
  .pl-nm b { font-size: 15px; }
  .pl-nm em { font-size: 10.5px; }
  .pl-mb { width: 12px; height: 12px; }
  .pl-balls { gap: 2px; }
  .pl-msg { font-size: 12.5px; flex-basis: 0; flex-grow: 1; }
  .pl-pause { width: 38px; }
  .pl-spinbtn span { display: none; }
  .pl-spinbtn { padding: 0 9px; }
  .pl-fine { flex-basis: 92px; }
  .pl-ctrl { height: 48px; }
}
@media (max-width: 380px) { .pl-msg { font-size: 11.5px; } .pl-fine { flex-basis: 76px; } }
@media (pointer: coarse) { .pl .panel .pl-keys { display: none; } }
@media (max-height: 700px) {
  .pl-art { width: 160px; }
  .pl .panel { padding: 16px 18px; }
  .pl .panel h2 { font-size: 28px; margin: 0 0 4px; }
  .pl .panel p { margin-bottom: 8px; font-size: 14px; }
  .pl .panel ul { font-size: 12.8px; line-height: 1.38; margin-bottom: 8px; }
  .pl .big-btn { padding: 11px; font-size: 22px; }
}
@media (max-height: 460px) {
  .pl .panel { width: min(640px, 100%); padding: 12px 18px; }
  .pl-art { display: none; }
  .pl .panel h2 { font-size: 24px; }
  .pl .panel p { font-size: 13px; margin-bottom: 6px; }
  .pl .panel ul { font-size: 12px; line-height: 1.33; margin-bottom: 6px; }
  .pl .panel .stats { margin: 6px 0 8px; }
  .pl .panel .stats b { font-size: 22px; }
  .pl-sball { width: min(150px, 34vh); }
}
