/* Plugin playgrounds: the plugin's own panel, playable in the page (js/playground-*.js). */
.pg-km, .pg-plug { max-width: 980px; margin: 0 auto; }
.pg-stage { position: relative; border-radius: 22px; overflow: hidden; background: #120d0a;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.pg-canvas { display: block; width: 100%; height: auto; touch-action: pan-y; outline: none; -webkit-tap-highlight-color: transparent; }
.pg-km .pg-canvas { aspect-ratio: 2156 / 1514; }
.pg-canvas:focus-visible { box-shadow: inset 0 0 0 2px #f0b429; }
.pg-toast { position: absolute; left: 50%; bottom: 14px; z-index: 2; display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 24px);
  padding: 8px 8px 8px 16px; border-radius: 14px; background: rgba(10, 10, 10, 0.92); border: 1px solid #33363a; color: #fafaf8;
  font: 500 14px/1.35 "Inter", system-ui, sans-serif; opacity: 0; transform: translate(-50%, 14px); pointer-events: none;
  visibility: hidden;
  transition: opacity .2s ease, transform .25s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear .25s; }
.pg-toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; visibility: visible; transition-delay: 0s; }
.pg-toast-btn { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; background: #f0b429; color: #0a0a0a;
  font: 700 12.5px/1 "Inter", system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.pg-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pg-lab { font: 600 12px "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.12em; text-transform: uppercase; color: #9a9c9f; margin-right: 4px; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pg-chip { appearance: none; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid #33363a; background: #121314; color: #fafaf8;
  font: 600 14px "Inter", system-ui, sans-serif; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.pg-chip:hover { border-color: #6a6d72; }
.pg-huge { --pg-accent: #f0b429; }
.pg-better { --pg-accent: #4fb3ee; }
.pg-chip[aria-pressed="true"] { border-color: var(--pg-accent, #5cb4ff); color: var(--pg-accent, #5cb4ff); background: rgba(92, 180, 255, 0.1);
  background: color-mix(in srgb, var(--pg-accent, #5cb4ff) 12%, transparent); }
.pg-chip:focus-visible { outline: 2px solid #f0b429; outline-offset: 2px; }
.pg-next { border-style: dashed; color: #c9cbce; }
.pg-next span { display: inline-block; margin-right: 6px; }
.pg-next[hidden] { display: none; }
/* HUGE and BETTER: Play lives on the picture (above the device); under it, the sound picker is the one row that
   matters: a segmented control of the groups plus "Another ...", then the quiet extras (mono, the tour) */
.pg-huge .pg-chips, .pg-better .pg-chips { flex-basis: 100%; order: 0; align-items: center; gap: 10px; }
.pg-huge .pg-mono, .pg-huge .pg-how, .pg-better .pg-how { order: 1; }
.pg-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.pg-seg { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 4px; border-radius: 26px; background: #0e0f10;
  border: 1px solid #2a2c2f; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03); }
.pg-seg .pg-chip { min-height: 44px; padding: 0 20px; border: 0; border-radius: 22px; background: transparent; color: #c9cbce; font-weight: 600; }
.pg-seg .pg-chip:hover { color: #fafaf8; background: rgba(255, 255, 255, 0.05); }
.pg-seg .pg-chip[aria-pressed="true"] { background: var(--pg-accent, #5cb4ff); color: #0a0a0a; box-shadow: 0 6px 18px -8px var(--pg-accent, #5cb4ff); }
.pg-chips .pg-next { border: 1px solid #2a2c2f; background: transparent; color: #c9cbce; font-weight: 600; }
.pg-chips .pg-next:hover { color: #fafaf8; border-color: #4a4d52; }
.pg-chips .pg-next span { color: var(--pg-accent, #5cb4ff); font-size: 16px; }
.pg-huge .pg-mono { border-color: transparent; background: transparent; color: #b8babd; }
.pg-huge .pg-mono:hover { color: #fafaf8; border-color: #33363a; }
/* ?gain on BETTER: Makeup and limiter tuner, with the peaks before and after */
.pg-tune { display: grid; gap: 10px; margin: 16px auto 0; padding: 16px 18px; max-width: 720px; border-radius: 16px; border: 1px dashed #4fb3ee;
  background: #0c1116; color: #dfe6ec; font: 600 14px "Inter", system-ui, sans-serif; }
.pg-tune label { display: grid; grid-template-columns: 150px 1fr 82px; align-items: center; gap: 12px; }
.pg-tune input[type=range] { width: 100%; accent-color: #4fb3ee; }
.pg-tune b { font-variant-numeric: tabular-nums; text-align: right; }
.pg-tune .pg-tune-chk { display: flex; gap: 8px; }
.pg-tune-meters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 4px; }
.pg-tune-meters span { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: #111a22; color: #9fb3c3; font-size: 12.5px; }
.pg-tune-meters b { text-align: left; color: #e8f4fc; font-size: 20px; }
.pg-tune-meters b.hot { color: #ff6a55; }
.pg-frame-fonts { display: contents; }
.pg-tune-bands { display: grid; gap: 6px; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #111a22; }
.pg-tune-bands div { display: grid; grid-template-columns: 180px 1fr 56px; gap: 10px; align-items: center; color: #9fb3c3; font-size: 12.5px; }
.pg-tune-bands i { height: 8px; border-radius: 4px; background: #1d2a35; overflow: hidden; }
.pg-tune-bands u { display: block; height: 100%; background: #4fb6ff; transition: width 80ms linear; }
.pg-tune-bands b { color: #e8f4fc; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .pg-tune-bands div { grid-template-columns: 1fr 48px; } .pg-tune-bands i { grid-column: 1 / -1; grid-row: 2; } }
.pg-tune-act { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pg-tune-note { margin: 0; color: #8aa0b0; font: 500 12.5px/1.4 "Inter", system-ui, sans-serif; text-align: center; }
@media (max-width: 600px) { .pg-tune label { grid-template-columns: 1fr 70px; } .pg-tune label span { grid-column: 1 / -1; } .pg-tune-meters { grid-template-columns: 1fr; } }
.pg-huge .pg-sep, .pg-better .pg-sep { display: none; }
.pg-sep { width: 1px; height: 28px; background: #33363a; margin: 0 4px; }
.pg-flash { border-radius: 14px; animation: pg-flash 1s cubic-bezier(0.22, 1, 0.36, 1) 2; }
@keyframes pg-flash { 0% { box-shadow: 0 0 0 0 rgba(240, 180, 41, 0.6); } 100% { box-shadow: 0 0 0 18px rgba(240, 180, 41, 0); } }
.pg-own { margin: 16px 0 0; text-align: center; color: #b8babd; font: 500 16px/1.5 "Inter", system-ui, sans-serif; }
.pg-own a { color: #f0b429; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(240, 180, 41, 0.4); }
.pg-own a:hover { border-bottom-color: #f0b429; }
.pg-hint { margin: 12px 0 0; text-align: center; color: #85888c; font: 500 13px/1.4 "Inter", system-ui, sans-serif; }
.pg-mob { display: none; }
@media (max-width: 700px) {
  .pg-mob { display: grid; gap: 10px; margin-top: 14px; }
  .pg-mob-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
  .pg-mob button { appearance: none; min-height: 48px; border-radius: 12px; border: 1px solid #33363a; background: #121314; color: #fafaf8;
    font: 600 15px "Inter", system-ui, sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .pg-mob button:active { background: #1d1f21; }
  .pg-mob button[aria-pressed="true"] { border-color: var(--pg-accent, #5cb4ff); color: var(--pg-accent, #5cb4ff); }
  .pg-mob [data-act="newpair"] { color: #ff5a46; border-color: rgba(255, 90, 70, 0.45); }
  .pg-mob [data-act="clean"][aria-pressed="true"] { background: rgba(255, 90, 70, 0.14); border-color: #ff5a46; color: #ff5a46; }
  .pg-mob-dist { display: grid; gap: 6px; padding: 10px 14px 12px; border-radius: 12px; border: 1px solid #33363a; background: #121314;
    font: 600 14px "Inter", system-ui, sans-serif; color: #b8babd; }
  .pg-mob-dist b { color: #fafaf8; }
  .pg-mob-dist input { width: 100%; height: 32px; accent-color: #5cb4ff; }
}
@media (max-width: 560px) { .pg-sep { display: none; } .pg-stage { border-radius: 14px; } .pg-toast { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .pg-toast { transition: none; } }

/* ---- switched off at first: headphones or monitors, then the one thing to do is switch it on (PGOnCard) */
.pg-plug { position: relative; }
.pg-on { position: absolute; z-index: 3; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px;
  width: max-content; max-width: min(340px, calc(100% - 32px)); padding: 18px 20px 20px; border-radius: 18px; text-align: center;
  background: rgba(10, 10, 10, 0.86); border: 1px solid rgba(255, 255, 255, 0.12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.8); color: #fafaf8; cursor: pointer; }
.pg-on[hidden] { display: none; }
.pg-on-t { display: inline-flex; align-items: center; gap: 8px; font: 700 17px/1.25 "Inter", system-ui, sans-serif; }
.pg-on-t svg { flex: none; color: #f0b429; }
.pg-on-s { font: 500 14px/1.45 "Inter", system-ui, sans-serif; color: #b8babd; text-wrap: balance; }
.pg-on-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 6px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px;
  background: #f0b429; color: #0a0a0a; cursor: pointer; font: 800 15px/1 "Inter", system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase;
  animation: pg-on 1.8s ease-in-out infinite; }
.pg-on-btn span { font-size: 20px; line-height: 1; }
.pg-on-btn:hover { background: #ffc94d; }
.pg-on-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@keyframes pg-on { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 180, 41, 0.55); } 50% { box-shadow: 0 0 0 14px rgba(240, 180, 41, 0); } }

/* ---- phones: no demo (a phone speaker plays none of it). The picture, the reason, and the way on (PGPhone) */
.pg-phone { display: grid; gap: 8px; margin-top: 14px; padding: 16px; border-radius: 16px; background: #121314; border: 1px solid #26282b; color: #fafaf8; }
.pg-phone-t { display: flex; align-items: center; gap: 8px; font: 700 17px/1.3 "Inter", system-ui, sans-serif; }
.pg-phone-t svg { flex: none; color: #f0b429; }
.pg-phone-s { font: 500 15px/1.45 "Inter", system-ui, sans-serif; color: #b8babd; text-wrap: pretty; }
.pg-phone-row { display: grid; gap: 6px; margin-top: 8px; }
.pg-phone-go { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; border-radius: 12px; background: #f0b429; color: #0a0a0a;
  font: 700 15px/1.2 "Inter", system-ui, sans-serif; text-align: center; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.pg-phone-go:active { background: #ffc94d; }
.pg-phone-copy { appearance: none; min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid #44474b; background: #1a1b1d; color: #fafaf8;
  cursor: pointer; font: 600 15px/1.2 "Inter", system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
.pg-phone-copy:active { background: #232528; }
.pg-phone-or { margin: 4px 0 2px; text-align: center; color: #85888c; font: 500 13px/1.3 "Inter", system-ui, sans-serif; }

/* ---- the guided tour (js/playground-tour.js) */
.pg-ring { position: absolute; z-index: 4; pointer-events: none; border: 2px solid #f0b429; animation: pg-ring 1.4s ease-out infinite; }
@keyframes pg-ring { 0% { box-shadow: 0 0 0 0 rgba(240, 180, 41, 0.6); } 100% { box-shadow: 0 0 0 16px rgba(240, 180, 41, 0); } }
.pg-tip { position: absolute; z-index: 6; display: grid; gap: 4px; padding: 14px 16px 12px; border-radius: 16px; background: #fafaf8; color: #0a0a0a;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.75); font-family: "Inter", system-ui, sans-serif; }
.pg-tip::after { content: ""; position: absolute; left: var(--arrow, 50%); width: 14px; height: 14px; background: #fafaf8; transform: translateX(-50%) rotate(45deg); }
.pg-tip.is-above::after { bottom: -7px; }
.pg-tip.is-below::after { top: -7px; }
.pg-tip-n { font: 600 11px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.12em; text-transform: uppercase; color: #6b6e72; }
.pg-tip b { font: 700 17px/1.3 "Inter", system-ui, sans-serif; }
.pg-tip-sub { font: 500 14px/1.45 "Inter", system-ui, sans-serif; color: #3d4044; }
.pg-tip-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.pg-tip-go { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: #0a0a0a; color: #fafaf8;
  font: 700 12.5px/1 "Inter", system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.pg-tip-skip { min-height: 40px; padding: 0 10px; border: 0; background: none; color: #6b6e72; font: 600 13px "Inter", system-ui, sans-serif; cursor: pointer; }
.pg-tip-skip:hover { color: #0a0a0a; }
a.pg-tip-skip { display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 3px; }   /* a link sits on the button's line */
.pg-how { appearance: none; min-height: 44px; padding: 0 16px; border: 0; background: none; color: #b8babd; cursor: pointer;
  font: 600 14px "Inter", system-ui, sans-serif; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(184, 186, 189, 0.4); }
.pg-how:hover { color: #fafaf8; }
@media (prefers-reduced-motion: reduce) { .pg-on-btn, .pg-ring { animation: none; } }

/* ---- the playable plugin at the top of a plugin page, beside the name and the email box */
.pcard.has-pg { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; }
/* computer: the playable card runs wide (Emanuele's tuner pick: 1593px at 1920 wide); smaller screens get the full width */
@media (min-width: 981px) { .pg-hero .wrap { max-width: calc(1593px + 2 * var(--gutter)); } }
.pcard.has-pg .pleft { align-self: center; }
.pcard .pg-plug { max-width: none; }
.pcard .pg-plug > img { display: block; width: 100%; height: auto; border-radius: 14px; }
.pcard .pg-stage { border-radius: 14px; }
.pcard .pg-controls { margin-top: 12px; }
.pcard .pg-own { display: none; }   /* the email box is right there */
@media (max-width: 980px) { .pcard.has-pg { grid-template-columns: minmax(0, 1fr); } }
/* the same on the Reddit page, where the download buttons sit beside it */
.dl-card:has(.pg-plug) { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; max-width: 1180px; }
.dl-left .pg-plug .pg-own { display: none; }
.dl-left .pg-stage { border-radius: 14px; }
@media (max-width: 860px) { .dl-card:has(.pg-plug) { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .pg-on { gap: 6px; padding: 12px 14px 14px; border-radius: 14px; }
  .pg-on-t { font-size: 15px; } .pg-on-s { font-size: 13px; }
  .pg-on-btn { min-height: 44px; padding: 0 18px; font-size: 13px; gap: 8px; } .pg-on-btn span { font-size: 16px; }
}

/* ?pick: every demo sound listed for choosing, the device kept in view beside the list on a wide screen */
.pg-picking { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(270px, 1fr); gap: 18px; align-items: start; }
.pg-picking .pg-stage { grid-column: 1; grid-row: 1 / span 3; position: sticky; top: 84px; }
.pg-picking .pg-controls { grid-column: 2; grid-row: 1; margin-top: 0; justify-content: flex-start; }
.pg-picking .pg-own { display: none; }
.pg-picklist { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 6px; }
.pg-pickhead { font: 600 12px "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.12em; text-transform: uppercase; color: #9a9c9f; margin: 10px 0 2px; text-align: left; }
.pg-pickitem { display: flex; border: 1px solid #33363a; border-radius: 12px; overflow: hidden; background: #121314; }
.pg-pickplay { appearance: none; flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 0; background: none; color: #fafaf8; text-align: left;
  font: 600 14px "Inter", system-ui, sans-serif; cursor: pointer; overflow-wrap: anywhere; }
.pg-pickplay i { font: 600 12px "JetBrains Mono", ui-monospace, monospace; font-style: normal; color: #9a9c9f; margin-right: 6px; }
.pg-pickplay[aria-pressed="true"] { color: var(--pg-accent, #5cb4ff); background: color-mix(in srgb, var(--pg-accent, #5cb4ff) 12%, transparent); }
.pg-pickplay[aria-pressed="true"] i { color: inherit; }
.pg-keep { appearance: none; min-height: 44px; min-width: 88px; padding: 0 12px; border: 0; border-left: 1px solid #33363a; background: none; color: #b8babd;
  font: 600 13px "Inter", system-ui, sans-serif; cursor: pointer; }
.pg-keep[aria-pressed="true"] { background: var(--pg-accent, #5cb4ff); color: #0b0c0d; }
.pg-pickplay:focus-visible, .pg-keep:focus-visible { outline: 2px solid #f0b429; outline-offset: -2px; }
.pg-pickbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; position: sticky; top: 64px; z-index: 2; background: #0b0c0d; }
.pg-pickbar output { flex: 1 1 100%; font: 600 13px "JetBrains Mono", ui-monospace, monospace; color: #fafaf8; overflow-wrap: anywhere; }
@media (max-width: 900px) { .pg-picking { display: block; } .pg-picking .pg-stage { position: relative; top: 0; } .pg-picking .pg-controls { margin-top: 18px; } }
.pg-tune select { min-height: 36px; border-radius: 8px; background: #111a22; color: #e8f4fc; border: 1px solid #2c3a46; font: inherit; }
.pg-frame { border-color: #f0b429; margin-top: 16px; }

.pg-wave { display: grid; gap: 8px; }
.pg-wave canvas { width: 100%; height: 96px; border-radius: 10px; touch-action: none; cursor: pointer; display: block; }
.pg-wave-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; opacity: .85; }

.pg-helpmenu { position: absolute; z-index: 7; display: grid; gap: 2px; padding: 6px; min-width: 230px; border-radius: 14px; background: #fafaf8; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.pg-helpmenu button, .pg-helpmenu a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: #0a0a0a; font: 600 15px/1.2 Inter, system-ui, sans-serif; text-align: left; text-decoration: none; cursor: pointer; }
.pg-helpmenu button:hover, .pg-helpmenu a:hover, .pg-helpmenu button:focus-visible, .pg-helpmenu a:focus-visible { background: rgba(0,0,0,.07); outline: none; }
