/* Prism Pop: one canvas draws the boards, the launcher and every bubble; the HUD and menus are HTML around it */
.pp { display: flex; flex-direction: column; color: #dfe9ff; --pp-hud: 50px; font-variant-numeric: tabular-nums; }
.pp [hidden] { display: none !important; }
.pp-stage { position: relative; display: flex; flex-direction: column; width: 100%; height: min(calc(100vh - 150px), 760px); min-height: 460px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, #071030 0%, #040817 55%, #02040b 100%);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
@media (max-width: 600px) { .pp-stage { height: calc(100svh - 112px); max-height: 860px; min-height: 520px; } }
@media (orientation: landscape) and (max-height: 520px) { .pp-stage { height: calc(100svh - 70px); min-height: 300px; } }
.stage.is-immersive .stage-body > .pp { min-height: 0; }
.stage.is-immersive .pp-stage { flex: 1 1 auto; height: auto; max-height: none; min-height: 0; }
.stage.is-immersive .pp-help { display: none; }

/* HUD */
.pp-hud { flex: none; height: var(--pp-hud); display: flex; align-items: center; gap: 8px; padding: 0 8px; z-index: 3; }
.pp-title { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.pp-title b { font-size: 15px; font-weight: 900; letter-spacing: 0.04em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-title span { font-size: 11.5px; font-weight: 700; color: #8aa3c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-sp { flex: 1 1 auto; }
.pp-time { font-size: 20px; font-weight: 800; color: #fff; min-width: 3.2em; text-align: right; letter-spacing: 0.01em; text-shadow: 0 0 12px rgba(85,214,255,0.35); }
.pp-time.pp-off { color: #6f84a3; text-shadow: none; }
.pp-tool { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; border: 1px solid #1c2b4a; background: rgba(11,19,40,0.8);
  color: #bfe0ff; cursor: pointer; touch-action: manipulation; padding: 0; transition: border-color .15s, color .15s, opacity .15s; }
.pp-tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .pp-tool:hover:not(:disabled) { border-color: #55d6ff; color: #fff; } }
.pp-tool:disabled { opacity: 0.35; cursor: default; }
#pp-pause .pl { display: none; fill: currentColor; } #pp-pause.is-paused .pl { display: inline; } #pp-pause.is-paused .pz { display: none; }
#pp-sound .off { display: none; } #pp-sound[aria-pressed="true"] { color: #6f84a3; } #pp-sound[aria-pressed="true"] .on { display: none; } #pp-sound[aria-pressed="true"] .off { display: inline; }
@media (max-width: 380px) { .pp-hud { gap: 5px; padding: 0 5px; } .pp-tool { width: 36px; height: 36px; } .pp-time { font-size: 18px; } }

  background: rgba(8,14,34,0.85); border: 1px solid #1c2b4a; }

/* the online bar (online.js) */
.pp-ol { flex: none; padding: 0 8px; }
.pp-ol .ol-bar { margin: 0 0 4px; padding: 6px 10px; gap: 4px 10px; background: rgba(11,21,48,0.85); flex-direction: row; flex-wrap: wrap; align-items: center; }
.pp-ol .ol-players { display: none; }   /* the boards show who's playing */
.pp-ol .ol-msg { flex: 1 1 auto; font-size: 13px; min-height: 0; }
.pp-ol .ol-btn { padding: 5px 10px; }

/* the play area */
.pp-area { position: relative; flex: 1 1 auto; min-height: 0; }
#pp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.pp-kb #pp-canvas:focus { box-shadow: inset 0 0 0 2px rgba(85,214,255,0.55); }
.pp-cover { position: absolute; inset: 0; display: grid; place-items: center; z-index: 2; pointer-events: none; }
.pp-count { font-size: clamp(64px, 20vw, 140px); font-weight: 900; color: #fff; text-shadow: 0 0 30px rgba(85,214,255,0.9), 0 0 60px rgba(255,79,216,0.5); animation: pp-pop .9s ease-out both; }
@keyframes pp-pop { from { transform: scale(1.6); opacity: 0; } 30% { transform: scale(1); opacity: 1; } to { transform: scale(.9); opacity: .0; } }


/* menus and results */
.pp-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px; z-index: 5; overflow: auto;
  background: radial-gradient(ellipse at center, rgba(3,6,16,0.45), rgba(3,5,12,0.84)); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.pp-panel { position: relative; width: min(100%, 400px); margin: auto; text-align: center; padding: 20px 18px 18px; border: 1px solid #1c2b4a; border-radius: 18px;
  background: rgba(8,13,30,0.92); box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(85,214,255,0.06) inset; animation: pp-in .28s cubic-bezier(.2,.9,.25,1.1); }
.pp-panel.pp-wide { width: min(100%, 460px); }
@keyframes pp-in { from { opacity: 0; transform: scale(.94) translateY(8px); } }
.pp-x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: #8aa3c4; font-size: 22px; line-height: 1; cursor: pointer; }
.pp-x:hover { color: #fff; border-color: #1c2b4a; } .pp-x:focus-visible { outline: 2px solid #55d6ff; }
.pp-logo { margin: 0 0 2px; font-size: clamp(30px, 9vw, 42px); font-weight: 900; letter-spacing: 0.06em; line-height: 1.05;
  background: linear-gradient(90deg, #3dffb5, #55d6ff 28%, #a66bff 55%, #ff4fd8 80%, #ffd166); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(85,214,255,0.35)); }
.pp-tag { margin: 0 0 14px; color: #8aa3c4; font-size: 13.5px; line-height: 1.45; }
.pp-h { margin: 0 0 6px; font-size: 22px; font-weight: 900; color: #fff; letter-spacing: 0.01em; }
.pp-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 13px; background: #050a18; border: 1px solid #1c2b4a; margin: 0 0 8px; }
.pp-seg button { font: inherit; font-size: 13px; font-weight: 700; color: #8aa3c4; background: transparent; border: 0; border-radius: 10px; min-height: 40px; padding: 0 4px; cursor: pointer; touch-action: manipulation; transition: background .15s, color .15s; white-space: nowrap; }
.pp-seg button[aria-checked="true"] { background: #13234a; color: #fff; box-shadow: inset 0 0 0 1px rgba(85,214,255,0.45), 0 0 16px rgba(85,214,255,0.18); }
.pp-seg.pp-tabs button[aria-checked="true"] { background: linear-gradient(135deg, rgba(61,255,181,0.18), rgba(166,107,255,0.22)); }
@media (hover: hover) { .pp-seg button:hover { color: #fff; } }
.pp-seg button:focus-visible { outline: 2px solid #55d6ff; outline-offset: 1px; }
.pp-seg button small { display: block; font-size: 10px; font-weight: 700; color: #6f84a3; margin-top: -2px; }
.pp-l { margin: 10px 0 5px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #6f84a3; text-align: left; }
.pp-desc { margin: 2px 0 12px; font-size: 12.5px; color: #8aa3c4; min-height: 1.4em; line-height: 1.45; }
.pp-desc b { color: #dfe9ff; }
.pp-actions { display: flex; flex-direction: column; gap: 8px; }
.pp-row { display: flex; gap: 8px; } .pp-row > * { flex: 1 1 0; }
.pp-pbtn { font: inherit; font-weight: 700; font-size: 14.5px; padding: 10px 14px; min-height: 46px; border-radius: 12px; cursor: pointer; touch-action: manipulation;
  border: 1px solid #1c2b4a; background: #0b1328; color: #dfe9ff; transition: background .15s, border-color .15s, transform .1s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
@media (hover: hover) { .pp-pbtn:hover:not(:disabled) { border-color: #55d6ff; } }
.pp-pbtn:active { transform: translateY(1px); } .pp-pbtn:disabled { opacity: .4; cursor: default; }
.pp-pbtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pp-go { background: linear-gradient(135deg, #3dffb5, #55d6ff 55%, #a66bff); color: #03141c; border-color: transparent; font-size: 16.5px; font-weight: 900; box-shadow: 0 6px 24px rgba(85,214,255,0.3); }
@media (hover: hover) { .pp-go:hover:not(:disabled) { border-color: transparent; filter: brightness(1.08); } }
.pp-go.pp-pink { background: linear-gradient(135deg, #ff4fd8, #ff9ec8 55%, #ffd166); color: #22041a; box-shadow: 0 6px 24px rgba(255,79,216,0.3); }
.pp-links { margin: 12px 0 0; font-size: 12.5px; color: #6f84a3; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.pp-links button { font: inherit; color: #55d6ff; background: none; border: 0; padding: 4px 2px; cursor: pointer; font-weight: 700; }
.pp-links button:hover { color: #fff; } .pp-links button:focus-visible { outline: 2px solid #55d6ff; border-radius: 4px; }
.pp-num { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 10px; }
.pp-num button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid #1c2b4a; background: #0b1328; color: #bfe0ff; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.pp-num button:disabled { opacity: .35; cursor: default; }
.pp-num span { min-width: 9em; font-size: 14px; font-weight: 800; color: #fff; }
.pp-num span small { display: block; font-size: 11.5px; font-weight: 700; color: #8aa3c4; }
.pp-panel [data-rg-daily] { display: block; margin: 0 0 10px; font-size: 12.5px; color: #b9c9e4; }

/* results */
.pp-kicker { margin: 0 0 2px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #8aa3c4; }
.pp-big { margin: 0; font-size: 54px; font-weight: 900; color: #fff; line-height: 1.05; text-shadow: 0 0 24px rgba(85,214,255,0.5); }
.pp-big.pp-lose { text-shadow: 0 0 24px rgba(255,79,216,0.5); }
.pp-badge { display: inline-block; margin: 6px 0 2px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase;
  color: #1a1200; background: linear-gradient(90deg, #ffd166, #fff1b8, #ffd166); background-size: 200% 100%; animation: pp-shine 1.6s linear infinite; box-shadow: 0 0 22px rgba(255,209,102,0.55); }
@keyframes pp-shine { to { background-position: -200% 0; } }
.pp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 14px; }
.pp-stats div { padding: 8px 4px; border-radius: 10px; background: #050a18; border: 1px solid #16223d; }
.pp-stats span { display: block; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #6f84a3; font-weight: 700; }
.pp-stats b { display: block; margin-top: 2px; font-size: 17px; color: #dfe9ff; }
.pp-stats .gold b { color: #ffd166; }
.pp-table { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 13px; }
.pp-table th { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #6f84a3; font-weight: 800; padding: 4px; text-align: right; }
.pp-table th:first-child, .pp-table td:first-child { text-align: left; }
.pp-table td { padding: 6px 4px; border-top: 1px solid #16223d; text-align: right; color: #dfe9ff; }
.pp-table td b { color: #ffd166; }

/* the daily calendar */
.pp-cal { margin: 4px 0 12px; }
.pp-cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px; }
.pp-cal-head b { font-size: 14px; color: #fff; }
.pp-cal-head button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid #1c2b4a; background: #0b1328; color: #bfe0ff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; }
.pp-cal-head button:disabled { opacity: .3; cursor: default; }
.pp-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.pp-cal-grid span { font-size: 10px; font-weight: 800; color: #6f84a3; padding: 2px 0; }
.pp-cal-grid button { position: relative; height: 34px; border-radius: 8px; border: 1px solid #16223d; background: #060c1e; color: #b9c9e4; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 0; }
.pp-cal-grid button:disabled { opacity: .28; cursor: default; }
.pp-cal-grid button.pp-done { color: #04150f; background: linear-gradient(135deg, #3dffb5, #55d6ff); border-color: transparent; box-shadow: 0 0 10px rgba(61,255,181,0.35); }
.pp-cal-grid button.pp-part::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #ffd166; }
.pp-cal-grid button.pp-today { box-shadow: inset 0 0 0 2px #ff4fd8; }
.pp-cal-grid button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.pp-streak { display: flex; justify-content: center; gap: 16px; margin: 0 0 8px; font-size: 12.5px; color: #8aa3c4; }
.pp-streak b { color: #ffd166; font-size: 15px; }

/* how to play */
.pp-rules { text-align: left; font-size: 13.5px; line-height: 1.5; color: #b9c9e4; }
.pp-rules p { margin: 0 0 8px; } .pp-rules b { color: #fff; }
.pp-rules ul { margin: 0 0 10px; padding-left: 18px; } .pp-rules li { margin: 0 0 4px; }
.pp-rules kbd { background: #16213a; color: #bfe9ff; border-radius: 3px; padding: 0 5px; font-family: inherit; font-size: 12px; }

.pp-toast { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); z-index: 6; width: max-content; max-width: min(360px, calc(100% - 24px)); padding: 8px 14px; border-radius: 14px; background: #dfe9ff; color: #04060f;
  font-size: 13px; font-weight: 700; animation: pp-toast-in .2s ease-out; pointer-events: none; text-align: center; }
@keyframes pp-toast-in { from { opacity: 0; transform: translate(-50%, -6px); } }
.pp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pp-help .hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .pp-help .hint-kb { display: none; } .pp-help .hint-touch { display: inline; } }
@media (prefers-reduced-motion: reduce) { .pp-panel, .pp-count, .pp-toast { animation: none; } .pp-badge { animation: none; } }
/* short screens (a phone on its side): a compact menu */
@media (max-height: 520px) {
  .pp-overlay { padding: 6px; }
  .pp-panel { padding: 10px 14px 12px; }
  .pp-logo { font-size: 24px; } .pp-tag { display: none; }
  .pp-seg button { min-height: 32px; } .pp-l { margin: 4px 0 3px; } .pp-desc { margin: 2px 0 6px; font-size: 12px; }
  .pp-pbtn { min-height: 38px; padding: 6px 12px; } .pp-num { margin: 0 0 6px; } .pp-num button { width: 32px; height: 32px; }
  .pp-big { font-size: 38px; } .pp-stats { margin: 8px 0; } .pp-links { margin: 6px 0 0; }
  .pp-cal-grid button { height: 26px; } .pp-cal { margin: 2px 0 6px; }
  .pp-panel.pp-wide { width: min(100%, 560px); }
}

/* Prism Pop's own pieces */
.pp-score { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; min-width: 4.2em; margin-right: 2px; }
.pp-score .pp-k { font-size: 9.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #6f84a3; }
.pp-score b { font-size: 20px; font-weight: 900; color: #fff; text-shadow: 0 0 12px rgba(85,214,255,0.4); transition: transform .12s; }
.pp-score b.pp-bump { transform: scale(1.18); }
@media (max-width: 380px) { .pp-score b { font-size: 17px; } }
.pp-levels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin: 4px 0 10px; max-height: min(42vh, 312px); overflow: auto; padding: 2px; align-content: start; }
.pp-levels button { position: relative; height: 46px; border-radius: 14px; border: 1px solid #1c2b4a; background: radial-gradient(circle at 35% 30%, #1d2c58, #0a1230 70%);
  color: #dfe9ff; font: inherit; font-size: 14px; font-weight: 900; cursor: pointer; padding: 0 0 8px; touch-action: manipulation; }
.pp-levels button small { position: absolute; left: 0; right: 0; bottom: 5px; font-size: 8px; letter-spacing: -1px; color: #ffd166; line-height: 1; }
.pp-levels button small i { font-style: normal; color: #2d3a5c; }
.pp-levels button.pp-cur { box-shadow: 0 0 0 2px #ff4fd8, 0 0 14px rgba(255,79,216,0.5); }
.pp-levels button.pp-three { background: radial-gradient(circle at 35% 30%, #5a4a16, #2a1f05 70%); border-color: #8a6a1a; }
.pp-levels button:disabled { opacity: .3; cursor: default; }
.pp-levels button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
@media (hover: hover) { .pp-levels button:hover:not(:disabled) { border-color: #55d6ff; } }
.pp-stars { font-size: 34px; letter-spacing: 6px; margin: 4px 0 0; color: #2d3a5c; }
.pp-stars i { font-style: normal; display: inline-block; }
.pp-stars i.on { color: #ffd166; text-shadow: 0 0 18px rgba(255,209,102,0.8); animation: pp-star .5s cubic-bezier(.2,.9,.3,1.4) both; }
.pp-stars i.on:nth-child(2) { animation-delay: .25s; } .pp-stars i.on:nth-child(3) { animation-delay: .5s; }
@keyframes pp-star { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
.pp-diff { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 0 0 8px; }
.pp-diff button { font: inherit; font-size: 13px; font-weight: 800; padding: 8px 2px; min-height: 52px; border-radius: 12px; border: 1px solid #1c2b4a; background: #0b1328; color: #b9c9e4; cursor: pointer; }
.pp-diff button small { display: block; font-size: 10px; font-weight: 700; color: #6f84a3; margin-top: 2px; }
.pp-diff button[aria-checked="true"] { border-color: #ff4fd8; color: #fff; box-shadow: 0 0 14px rgba(255,79,216,0.3); background: rgba(255,79,216,0.1); }
.pp-diff button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.pp-gallery { display: flex; justify-content: center; gap: 14px; margin: 4px 0 12px; flex-wrap: wrap; }
.pp-gallery div { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: #8aa3c4; max-width: 78px; }
.pp-gallery canvas { width: 56px; height: 56px; margin: -6px 0 -4px; }
@media (max-height: 520px) { .pp-levels { grid-template-columns: repeat(10, 1fr); max-height: 40vh; } .pp-levels button { height: 34px; font-size: 12px; padding-bottom: 6px; } .pp-levels button small { bottom: 2px; } .pp-stars { font-size: 26px; } .pp-diff button { min-height: 40px; padding: 4px 2px; } }
.pp-row .pp-go { font-size: 14.5px; box-shadow: 0 4px 16px rgba(255,79,216,0.25); }
.pp-big.pp-word { font-size: clamp(32px, 10vw, 46px); }
.pp-stars { font-size: 46px; }
.pp-levels button small { font-size: 10px; letter-spacing: 0; }
.pp-h, .pp-logo { text-transform: none; }
