/* The /play kit: a prototype's page and its control panel, in the site's own tokens (system.css) */
.pp { max-width: 1240px; margin: 0 auto; padding: clamp(18px, 3vw, 36px) var(--gut) 0; }
.pp-head { display: grid; gap: 10px; margin-bottom: clamp(18px, 2.4vw, 28px); }
.pp-k { font: 400 13px/1 var(--mono); color: var(--muted); } .pp-k a { color: inherit; } .pp-k a:hover { color: var(--cobalt); } .pp-k span { color: var(--cobalt); }
.pp-h { font: 300 clamp(34px, 4vw, 60px)/1 var(--sans); letter-spacing: -0.05em; color: var(--cobalt); }
.pp-line { max-width: 52ch; font: 400 clamp(16px, 1.2vw, 19px)/1.45 var(--sans); color: var(--ink-2); text-wrap: pretty; }
.pp-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--gap); align-items: start; }
/* the panel */
.pk { border-radius: var(--r); background: var(--paper-2); padding: 18px; display: grid; gap: 16px; position: sticky; top: 72px; }
.pk-row { display: grid; gap: 8px; }
.pk-l { font-size: 12px; color: var(--muted); }
.pk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-chip { min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: 400 14px/1 var(--sans); cursor: pointer; transition: background .2s var(--ease), color .2s var(--ease); }
.pk-chip:hover { box-shadow: inset 0 0 0 1px var(--cobalt); }
.pk-chip[aria-checked="true"] { background: var(--cobalt); color: var(--white); box-shadow: none; }
.pk-sw { position: relative; width: 46px; height: 28px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background .25s var(--ease); }
.pk-sw span { position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: translate .3s var(--ease), background .25s var(--ease); }
.pk-sw[aria-checked="true"] { background: var(--cobalt); } .pk-sw[aria-checked="true"] span { translate: 18px 0; background: var(--white); }
.pk-range { display: grid; grid-template-columns: minmax(0, 1fr) 3ch; gap: 10px; align-items: center; }
.pk-range input { width: 100%; accent-color: var(--cobalt); } .pk-range output { font-size: 13px; color: var(--ink-2); text-align: right; }
/* the actions lead the panel, so Surprise me is always in reach; a panel taller than the window scrolls inside it */
.pk-acts { order: -1; display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
@media (min-width: 901px) { .pk { max-height: calc(100svh - 90px); overflow: auto; overscroll-behavior: contain; } }
.pk-rand { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--chart); color: var(--navy); font: 500 14px/1 var(--mono); cursor: pointer; transition: background .2s var(--ease); }
.pk-rand:hover { background: var(--pink); }
.pk-reset { min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--ink-2); font-size: 13px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.pk-reset:hover { color: var(--cobalt); text-decoration-color: var(--cobalt); }
.pk-more { display: none; }
/* on a phone the panel is a bottom sheet: Randomize and a handle stay in reach, the rest slides up when asked */
@media (max-width: 900px) {
  .pp-body { grid-template-columns: minmax(0, 1fr); padding-bottom: 96px; }
  .pk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; top: auto; border-radius: 22px 22px 0 0; max-height: 70svh; overflow: auto; box-shadow: 0 -10px 30px rgba(11, 13, 18, .14);
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); gap: 14px; }
  .pk > .pk-row { display: none; } .pk.open > .pk-row { display: grid; }
  .pk-acts { order: -1; justify-content: space-between; padding-bottom: 0; border-bottom: 0; }
  .pk-more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--ink-2); font: 400 13px/1 var(--mono); cursor: pointer; }
  .pk-more i { display: inline-block; transition: rotate .3s var(--ease); font-style: normal; } .pk.open .pk-more i { rotate: 180deg; }
  .pk-chip { min-height: 44px; padding: 0 14px; } .pk-rand, .pk-reset { min-height: 44px; } .pk-sw { width: 52px; height: 32px; } .pk-sw span { width: 24px; height: 24px; } .pk-sw[aria-checked="true"] span { translate: 20px 0; }
}
@media (prefers-reduced-motion: reduce) { .pk *, .pk { transition: none !important; } }
