/* ==========================================================================
   Paddy Prompt Studio — perfect pitch test
   Layers on /blog/style.css and /tools/shared/tool-common.css.
   ========================================================================== */

.pp [hidden] { display: none !important; }
.pp-challenge {
  margin: 0 0 0.9rem; padding: 0.6rem 0.9rem; border-radius: 12px; text-align: center;
  background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.3); color: #fde68a; font-weight: 600;
}
.pp-setup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.8rem; }
.pp-level-note { margin: 0.5rem 0 0; font-size: 0.82rem; color: var(--text-dim); }
.pp-start-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 1rem; }
.pp-start { min-width: 15rem; min-height: 54px; font-size: 1.05rem; border-radius: 14px; }

.pp-play-ui { display: none; }
.pp[data-step="play"] .pp-play-ui { display: block; }
.pp[data-step="play"] .pp-setup { display: none; }

.pp-hud { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; }
.pp-round { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--indigo); font-weight: 700; }
.pp-score-now { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.85rem; color: #a7f3d0; }
.pp-progress { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06); margin: 0.5rem 0 0.9rem; overflow: hidden; }
.pp-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #818cf8, #22d3ee); transition: width 0.3s ease; }

.pp-note-orb {
  width: 5.5rem; height: 5.5rem; margin: 0 auto 0.9rem; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.2rem; background: radial-gradient(circle at 50% 40%, rgba(129, 140, 248, 0.4), rgba(15, 18, 32, 0.9) 70%);
  border: 1px solid var(--border);
}
.pp.pp-ping .pp-note-orb { animation: pp-ping 0.6s ease-out; }
@keyframes pp-ping { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.7); transform: scale(1.06); } 100% { box-shadow: 0 0 0 26px rgba(34, 211, 238, 0); transform: scale(1); } }

/* One-octave keyboard */
.pp-keys {
  --bw: calc(100% / 7 * 0.62);
  position: relative; display: flex; height: 13rem; max-width: 36rem; margin: 0 auto;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.pp-key { font: inherit; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.15rem; padding-bottom: 0.55rem; transition: background 0.12s ease, transform 0.05s ease; }
.pp-key.white {
  flex: 1 1 0; position: relative; z-index: 1; margin: 0 2px;
  background: linear-gradient(180deg, #f8fafc, #dfe4f1); color: #1e1b4b;
  border: 1px solid #94a3b8; border-radius: 0 0 10px 10px;
}
.pp-key.black {
  position: absolute; top: 0; z-index: 2; width: var(--bw); height: 60%;
  background: linear-gradient(180deg, #1e1b4b, #0b0d16); color: #c7d2fe;
  border: 1px solid #4338ca; border-radius: 0 0 8px 8px;
}
.pp-key:active { transform: translateY(2px); }
.pp-key.white:hover { background: linear-gradient(180deg, #ffffff, #e0e7ff); }
.pp-key.black:hover { background: linear-gradient(180deg, #312e81, #111327); }
.pp-key:focus-visible { outline: 3px solid #22d3ee; outline-offset: 1px; }
.pp-key[disabled] { cursor: not-allowed; opacity: 0.35; }
.pp-key-name { font-weight: 800; font-size: 1rem; line-height: 1.1; display: grid; text-align: center; }
.pp-key-name small { font-size: 0.66rem; font-weight: 600; opacity: 0.7; }
.pp-key.black .pp-key-name { font-size: 0.78rem; }
.pp-key-hint { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.62rem; opacity: 0.55; }
.pp-key.is-answer.white { background: linear-gradient(180deg, #bbf7d0, #4ade80); }
.pp-key.is-answer.black { background: linear-gradient(180deg, #16a34a, #14532d); color: #fff; }
.pp-key.is-wrong.white { background: linear-gradient(180deg, #fecdd3, #fb7185); }
.pp-key.is-wrong.black { background: linear-gradient(180deg, #e11d48, #881337); color: #fff; }
/* Before the test the keyboard just previews, so it sits back a little. */
.pp[data-step="setup"] .pp-keys { opacity: 0.55; pointer-events: none; }

.pp-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.9rem; }

/* Result */
.pp-result {
  margin-top: 1rem; padding: 1.2rem 1rem; text-align: center; border-radius: 18px;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.2), rgba(8, 145, 178, 0.14));
  border: 1px solid rgba(129, 140, 248, 0.4);
}
.pp-res-score { margin: 0; font-family: "Space Grotesk", "Inter", sans-serif; font-weight: 800; font-size: clamp(2.4rem, 9vw, 3.4rem); line-height: 1; color: #fff; }
.pp-res-badge { display: inline-block; margin: 0.6rem 0 0; padding: 0.25rem 0.8rem; border-radius: 999px; background: rgba(34, 211, 238, 0.15); color: #a5f3fc; font-weight: 700; }
.pp-res-say { margin: 0.7rem auto 0; max-width: 34rem; color: var(--text); }
.pp-res-small { margin: 0.35rem auto 0; max-width: 34rem; font-size: 0.85rem; color: var(--text-dim); }
.pp-res-log { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; padding: 0; margin: 0.8rem 0 0; }
.pp-res-log li { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.75rem; padding: 0.2rem 0.55rem; border-radius: 999px; border: 1px solid var(--border-soft); }
.pp-res-log li.ok { color: #a7f3d0; border-color: rgba(74, 222, 128, 0.4); }
.pp-res-log li.close { color: #fde68a; border-color: rgba(251, 191, 36, 0.4); }
.pp-res-log li.miss { color: #fecdd3; border-color: rgba(251, 113, 133, 0.35); }
.pp-share { margin: 0.9rem auto 0; max-width: 34rem; padding: 0.6rem 0.8rem; border-radius: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-soft); font-size: 0.85rem; text-align: left; word-break: break-word; }
.pp-res-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.8rem; }

@media (max-width: 640px) {
  .pp-keys { height: 11rem; }
  .pp-key-hint { display: none; }
  .pp-key.black .pp-key-name small { display: none; }
  .pp-start { width: 100%; }
}
