/* TheUncoder Playground */
.pg { padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 4vw, 3rem); }
.pg-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 2rem; margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
html:root .pg-head h1 { margin: 0 0 .5rem; font: 500 clamp(2.4rem, 5vw, 4rem)/.98 var(--display); letter-spacing: -.045em; }
.pg-sub { max-width: 40rem; margin: 0; color: var(--muted); }
.pg-export { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.pg-reset { border: 0; background: none; padding: .5rem; font: 600 .9rem/1 var(--body); color: var(--muted); text-decoration: underline; cursor: pointer; }
.pg-app { display: grid; gap: 1rem; width: min(100% - 2 * var(--gut), 100rem); margin-inline: auto; }
@media (min-width: 64rem) { .pg-app { grid-template-columns: 22rem minmax(0, 1fr); align-items: start; } }

/* panel */
.pg-panel { padding: 1rem; border: 1px solid var(--line); border-radius: 1.4rem; background: var(--surface); }
@media (min-width: 64rem) { .pg-panel { position: sticky; top: calc(var(--head-h) + .75rem); max-height: calc(100vh - var(--head-h) - 1.5rem); overflow: auto; } }
.pg-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .25rem; margin-bottom: 1rem; border-radius: 999px; background: var(--panel); }
.pg-tabs button { padding: .7rem; border: 0; border-radius: 999px; background: none; font: 600 .92rem/1 var(--body); color: var(--muted); cursor: pointer; }
.pg-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.pg-k { margin: 1.25rem 0 .6rem; font: 600 .68rem/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pg-pan > .pg-k:first-child { margin-top: .25rem; }
.pg-presets { display: flex; flex-wrap: wrap; gap: .4rem; }
.pg-presets button { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .7rem .45rem .45rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: 500 .82rem/1 var(--body); color: var(--ink); cursor: pointer; transition: border-color .2s, transform .2s; }
.pg-presets button:hover { border-color: var(--ink); transform: translateY(-1px); }
.pg-presets button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pg-mini { display: inline-flex; } .pg-mini i { width: .8rem; height: 1.3rem; } .pg-mini i:first-child { border-radius: 999px 0 0 999px; } .pg-mini i:last-child { border-radius: 0 999px 999px 0; }
#pgPresetsF button { padding-left: .7rem; } #pgPresetsF b { font-size: 1rem; color: var(--accent); }
.pg-shuffle { width: 100%; margin-top: .75rem; padding: .8rem; border: 1.5px dashed var(--line-strong); border-radius: .9rem; background: none; font: 600 .9rem/1 var(--body); color: var(--ink); cursor: pointer; transition: background .2s, border-color .2s; }
.pg-shuffle:hover { background: var(--panel); border-color: var(--ink); }
.pg-cs { display: grid; gap: .35rem; }
.pg-c { display: flex; align-items: center; gap: .75rem; padding: .45rem; border-radius: .8rem; transition: background .3s; }
.pg-c:hover { background: var(--panel); }
.pg-c.is-flash { animation: pgFlash 1.2s; }
@keyframes pgFlash { 0%, 40% { background: color-mix(in srgb, var(--accent) 18%, transparent); box-shadow: inset 0 0 0 2px var(--accent); } }
.pg-sw { position: relative; flex: none; width: 2.6rem; height: 2.6rem; border-radius: .65rem; overflow: hidden; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.pg-sw i { position: absolute; inset: 0; pointer-events: none; }
.pg-sw input { position: absolute; inset: -.5rem; width: calc(100% + 1rem); height: calc(100% + 1rem); opacity: 0; cursor: pointer; }
.pg-sw:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pg-c-t { display: grid; gap: .1rem; min-width: 0; flex: 1; }
.pg-c-t b { font: 600 .88rem/1.2 var(--body); }
.pg-hex { width: 100%; padding: .15rem 0; border: 0; border-bottom: 1px dashed transparent; background: none; font: 500 .8rem/1.2 ui-monospace, Menlo, monospace; color: var(--muted); text-transform: uppercase; }
.pg-hex:hover, .pg-hex:focus { border-bottom-color: var(--line-strong); outline: none; color: var(--ink); }
.pg-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.pg-checks li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .82rem; }
.pg-pair { display: inline-flex; align-items: center; gap: .5rem; }
.pg-pair i { display: grid; place-items: center; width: 1.9rem; height: 1.5rem; border-radius: .35rem; font: 700 .72rem/1 var(--body); font-style: normal; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.pg-checks b { white-space: nowrap; font-size: .76rem; padding: .25rem .5rem; border-radius: 999px; }
.pg-checks .ok b { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pg-checks .meh b { background: color-mix(in srgb, var(--c-yellow) 30%, transparent); color: #6b5200; }
.pg-checks .bad b { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
.pg-f, .pg-r { display: grid; gap: .4rem; margin-top: 1rem; font: 600 .85rem/1.2 var(--body); }
.pg-f select { width: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; font: 500 .95rem/1.2 var(--body); color: var(--ink); }
.pg-r span { display: flex; justify-content: space-between; }
.pg-r output { font-weight: 500; color: var(--muted); }
.pg-r input { width: 100%; accent-color: var(--accent); }

/* stage */
.pg-stage { border: 1px solid var(--line); border-radius: 1.4rem; background: var(--panel); overflow: hidden; }
.pg-bar { display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.pg-dots { display: inline-flex; gap: .35rem; } .pg-dots i { width: .65rem; height: .65rem; border-radius: 50%; background: var(--line); } .pg-dots i:first-child { background: var(--c-orange); } .pg-dots i:nth-child(2) { background: var(--c-yellow); } .pg-dots i:nth-child(3) { background: var(--c-green); }
.pg-url { flex: 1; max-width: 22rem; padding: .4rem .8rem; border-radius: 999px; background: var(--panel); font: 500 .8rem/1 var(--body); color: var(--muted); }
.pg-dev { display: inline-flex; margin-left: auto; padding: .2rem; border-radius: 999px; background: var(--panel); }
.pg-dev button { padding: .45rem .8rem; border: 0; border-radius: 999px; background: none; font: 600 .78rem/1 var(--body); color: var(--muted); cursor: pointer; }
.pg-dev button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pg-frame-wrap { display: grid; justify-items: center; padding: 0; transition: padding .4s; }
.pg-frame-wrap iframe { display: block; width: 100%; height: min(78vh, 56rem); border: 0; background: #fff; transition: width .45s cubic-bezier(.65,0,.25,1), border-radius .45s; }
.pg-stage.is-mob .pg-frame-wrap { position: relative; padding: 24px 0; align-content: start; overflow: hidden; }
.pg-stage.is-mob iframe { flex: none; width: 402px; max-width: none; height: 874px; border-radius: 55px; transform-origin: top center; box-shadow: 0 0 0 12px #121212, 0 0 0 14px #3a3a3e, 0 40px 60px -24px rgba(0,0,0,.45); }
@media (max-width: 63.99rem) { .pg-stage { order: -1; } .pg-frame-wrap iframe { height: 70vh; } .pg-dev { display: none; } }
/* reset site-wide input styles on the hex fields */
html:root .pg .pg-hex { height: auto; min-height: 0; padding: .15rem 0; margin: 0; border: 0; border-bottom: 1px dashed transparent; border-radius: 0; background: none; box-shadow: none; font: 500 .8rem/1.2 ui-monospace, Menlo, monospace; }
html:root .pg .pg-hex:hover, html:root .pg .pg-hex:focus { border-bottom-color: var(--line-strong); }
.pg-head { width: min(100% - 2 * var(--gut), 100rem); }
@media (max-width: 63.99rem) {
  .pg-stage { position: sticky; top: calc(var(--head-h) + .25rem); z-index: 5; box-shadow: 0 18px 30px -20px rgba(0,0,0,.35); }
  .pg-frame-wrap iframe { height: 44vh; }
  .pg-bar { padding: .5rem .8rem; }
}
/* breathing room around the breadcrumb */
.pg { padding-top: clamp(2rem, 4vw, 3.25rem); }
html:root:not(#unc-a) .pg .crumbs { margin: clamp(.75rem, 2vw, 1.5rem) 0 clamp(2rem, 4vw, 3rem) !important; }

/* phone notice */
.pg-note { position: fixed; inset: 0; z-index: 200; display: grid; place-items: end center; padding: 1rem; background: rgba(18,18,18,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: pgFade .3s both; }
.pg-note[hidden] { display: none; }
@keyframes pgFade { from { opacity: 0; } }
.pg-note__card { width: min(100%, 26rem); padding: 1.75rem 1.5rem 1.5rem; border-radius: 1.6rem; background: var(--paper); color: var(--ink); text-align: center; animation: pgUp .45s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes pgUp { from { transform: translateY(40px); opacity: 0; } }
.pg-note__ic { display: inline-grid; place-items: center; width: 3.5rem; height: 3.5rem; margin-bottom: 1rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.pg-note__ic svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html:root .pg-note h2 { margin: 0 0 .5rem; font-size: 1.6rem; }
.pg-note p { margin: 0 0 1.25rem; color: var(--muted); }
.pg-note__row { display: grid; gap: .5rem; }
.pg-note__row .btn { width: 100%; justify-content: center; }
.pg-note__link { padding: .6rem; border: 0; background: none; font: 600 .9rem/1 var(--body); color: var(--muted); cursor: pointer; }

/* TUNED: playground (2026-10-16) */
@media (min-width: 700px) {
html:root:not(#unc-a):not(#unc-b) .pg-head p.pg-sub { font-size: 15px !important; letter-spacing: 0em !important; }
}
@media (max-width: 699.98px) {
html:root:not(#unc-a):not(#unc-b) :is(.pg-head p.pg-sub, .pg-note__card p, .pg-note__link, .pg-f span, .pg-r span, .pg-checks li) { font-size: 13.5px !important; }
}
