/* Product page (Sticker Poster hero + Showroom structure). product.js sets --c (the product colour) on <body>, plus --ratio and --pos on #product. */
#product { --ratio: 4 / 3; --pos: center; }
.pd-missing { padding-block: 72px 96px; display: grid; gap: 20px; justify-items: start; }

/* Hero: a coloured panel, with a white card (text, buy) beside the screenshot */
.pd-hero { padding-block: 24px 72px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 18px; align-items: center; }
.crumbs .link { min-height: 32px; font-weight: 700; }
.pd-poster { border: var(--line); border-radius: var(--r-lg); box-shadow: 12px 12px 0 var(--ink); padding: clamp(16px, 3vw, 36px); }
.pd-hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px); align-items: center; }
.pd-card { background: var(--white); border: var(--line); border-radius: var(--r-md); box-shadow: 6px 6px 0 var(--ink); padding: clamp(18px, 2.4vw, 30px); }
.pd-chips { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pd-card h1 { font-size: clamp(44px, 5vw, 76px); line-height: .88; }
.pd-tag { font: 800 var(--t-sub)/1.1 var(--f-display); letter-spacing: -.02em; margin: 14px 0 0; }
.buy { margin-top: 22px; border-top: 3px solid var(--ink); padding-top: 18px; display: grid; gap: 14px; justify-items: start; }
.buy__status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }
.buy__price { font: 800 clamp(26px, 2.6vw, 34px)/1.1 var(--f-display); letter-spacing: -.02em; }
.buy .fine { margin: 0; font-size: 14px; }
.buy__licence .link { min-height: 0; display: inline; }
.pd-stage { position: relative; margin: 0; min-width: 0; }
.pd__zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--r-sm); }
.pd__zoom .screen { box-shadow: 8px 8px 0 var(--ink); }
.pd__zoom img { aspect-ratio: var(--ratio); object-fit: cover; object-position: var(--pos); }
.pd-stage .sticker { left: -24px; bottom: -26px; transform: rotate(6deg); }
.pd-stage figcaption { margin-top: 18px; text-align: right; }
.pd-poster.bg-pink .pd-stage figcaption, .pd-poster.bg-blue .pd-stage figcaption { color: var(--white); }
.pd-poster.bg-pink .pd-stage figcaption { font-size: 13px; font-weight: 700; display: inline-block; float: right; background: var(--ink); color: var(--lime); padding: 6px 12px; border-radius: var(--r-sm); }
.pd-poster.bg-pink .pd-stage::after { content: ""; display: block; clear: both; }
@media (max-width: 900px) {
  .pd-hero { padding-block: 16px 56px; }
  .pd-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .pd-poster { box-shadow: 6px 6px 0 var(--ink); }
  .pd-stage { order: -1; }
  .pd-stage .sticker { left: auto; right: -8px; bottom: auto; top: -30px; }
}

.pd-jump { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Spec strip */
.specs { background: var(--ink); color: var(--white); border-block: var(--line); --ring: var(--lime); }
.specs dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.specs dl > div { padding: 22px 20px; border-left: 2px solid #3a3a3a; }
.specs dl > div:first-child { border-left: 0; padding-left: 0; }
.specs dt { color: var(--lime); margin-bottom: 8px; }
.specs dd { margin: 0; font: 800 22px/1.15 var(--f-display); letter-spacing: -.01em; overflow-wrap: anywhere; }
@media (max-width: 700px) { .specs dl { grid-template-columns: 1fr 1fr; } .specs dl > div { border-left: 0; border-top: 2px solid #3a3a3a; padding: 16px 12px 16px 0; } .specs dl > div:nth-child(-n+2) { border-top: 0; } }

/* What it does */
.does { padding-block: 88px; }
.does__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px 56px; align-items: end; margin-bottom: 40px; }
.does__head h2 { margin-top: 12px; }
.does__head .lead { margin: 0; }
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.feature { background: var(--white); border: var(--line); border-radius: var(--r-md); box-shadow: 6px 6px 0 var(--ink); padding: 22px 22px 24px; }
.feature__no { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 50%; background: var(--orange); font: 800 20px/1 var(--f-display); margin-bottom: 14px; }
.feature:nth-child(2) .feature__no { background: var(--lime); } .feature:nth-child(3) .feature__no { background: var(--white); } .feature:nth-child(4) .feature__no { background: var(--paper); }
.feature p { margin: 0; font-weight: 500; font-size: 19px; line-height: 1.35; }
@media (max-width: 900px) { .does { padding-block: 64px; } .does__head { grid-template-columns: 1fr; } }

/* Hear it */
.hear { padding-bottom: 88px; }
.hear__card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; background: var(--lime); border: var(--line); border-radius: var(--r-lg); box-shadow: 10px 10px 0 var(--ink); padding: 36px 40px; }
.hear__card h2 { font-size: var(--t-h3); margin: 14px 0 10px; }
.hear__card p { margin: 0 0 18px; max-width: 52ch; font-size: var(--t-lead); font-weight: 500; }
.hear__card audio { width: 100%; max-width: 560px; min-height: 44px; }
.hear__media { margin: 0; width: min(100%, 280px); }
.pd-video__play { position: relative; display: block; width: 100%; padding: 0; border: var(--line); border-radius: var(--r-md); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; background: var(--ink); cursor: pointer; }
.pd-video__play img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }
.pd-video__play .keycap { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); pointer-events: none; white-space: nowrap; }
.hear__media video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border: var(--line); border-radius: var(--r-md); background: var(--ink); }
.hear__media figcaption { margin-top: 10px; }
.demo-grid { list-style: none; margin: 18px 0 0; padding: 0 8px 8px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: min(100%, 560px); }
.demo-pad { position: relative; overflow: hidden; width: 100%; min-height: 64px; padding: 0 12px; background: var(--white); color: var(--ink); border: var(--line); border-radius: var(--r-sm); box-shadow: 0 6px 0 var(--ink); font: 800 20px/1 var(--f-display); cursor: pointer; transition: transform .1s, box-shadow .1s; }
.demo-pad:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.demo-pad:focus-visible { outline: 4px solid var(--ink); outline-offset: 4px; }
.demo-pad[aria-pressed="true"] { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); background: var(--paper); }
.demo-pad__fill { position: absolute; inset: 0; background: var(--orange); transform: scaleX(0); transform-origin: left; }
.demo-pad__label { position: relative; }
.demo-pad[aria-pressed="true"] .demo-pad__label::before { content: "\25A0  "; font-size: .7em; vertical-align: .1em; }
@media (max-width: 480px) { .demo-grid { gap: 12px; } .demo-pad { font-size: 16px; padding: 0 4px; white-space: nowrap; } }
.demo-err { margin: 12px 0 0; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .demo-pad, .demo-pad__fill { transition: none !important; } }
@media (max-width: 700px) { .hear { padding-bottom: 64px; } .hear__card { grid-template-columns: 1fr; padding: 24px 20px; box-shadow: 6px 6px 0 var(--ink); } }

/* Trust */
.trust { padding-block: 72px 0; }
.trust h2 { font-size: var(--t-h2); margin-bottom: 36px; max-width: 16ch; }
.trust__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; list-style: none; margin: 0; padding: 0; }
.trust__grid .ticket { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.trust__grid .ticket p { margin: 0; }
.trust__grid .ticket .link { margin-top: auto; }
.trust .tm { margin-top: 28px; max-width: none; }

/* Other plugins */
.others { padding-block: 72px 96px; }
.others h2 { font-size: var(--t-h2); margin-bottom: 36px; }
.others__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; list-style: none; margin: 0; padding: 0; }
.mini { display: flex; flex-direction: column; height: 100%; text-decoration: none; border: var(--line); border-radius: var(--r-md); box-shadow: 8px 8px 0 var(--ink); overflow: hidden; transition: transform .12s, box-shadow .12s; }
.mini:hover { transform: translateY(-2px); box-shadow: 8px 10px 0 var(--ink); }
.mini__name { font: 800 clamp(30px, 3vw, 44px)/.95 var(--f-display); letter-spacing: -.03em; padding: 22px 20px; min-height: 120px; display: flex; align-items: flex-end; }
.mini--pink .mini__name, .mini--blue .mini__name { color: var(--white); }
.mini__tab { background: var(--white); border-top: var(--line); padding: 14px 20px 18px; flex: 1; display: grid; gap: 8px; justify-items: start; }
@media (max-width: 700px) { .others { padding-bottom: 72px; } .others__grid { grid-template-columns: minmax(0, 1fr); } .trust, .others { padding-block-start: 56px; } }
.pd-hero ~ .section { padding-top: 88px; }

/* Sticky buy bar (mobile only) */
.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ink); color: var(--white); border-top: 3px solid var(--lime); padding: 10px var(--gutter) calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; transform: translateY(110%); transition: transform .2s ease; --ring: var(--lime); }
.sticky-buy.is-on { transform: translateY(0); }
.sticky-buy__name { min-width: 0; font: 800 20px/1 var(--f-display); letter-spacing: -.02em; }
.sticky-buy__name small { display: block; font: 700 11px/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lime); margin-top: 4px; }
.sticky-buy .keycap { flex: none; white-space: nowrap; padding: 8px 14px; font-size: 16px; }
@media (min-width: 901px) { .sticky-buy { display: none; } }
@media (max-width: 900px) { body.has-sticky { padding-bottom: 84px; } }
@media (prefers-reduced-motion: reduce) { .sticky-buy, .mini { transition: none; } .mini:hover { transform: none; } }

/* Playground (paint-demo.js / shaper-demo.js markup), dressed in the product colour */
.pd-play { padding-block: clamp(48px, 7vw, 88px); display: grid; gap: 28px; }
.playground { --line: var(--ink); max-width: 980px; font-family: var(--f-body); }
.playground .shaper-demo { margin-top: 0; border-top: 0; padding-top: 0; }
.playground .sd-heading h3 { font: 800 var(--t-sub)/1.05 var(--f-display); letter-spacing: -.02em; margin: 0 0 8px; }
.playground .sd-sticker, .playground .eyebrow { display: none; }
.playground #pd-status { margin-top: 22px; }
.playground .sd-intro, .playground .sd-footnote, .playground .demo-uses p, .playground #pd-status, .playground .pd-sound p { font-size: 15px; line-height: 1.5; color: var(--ink); }
.playground .sd-footnote { margin-top: 14px; }
.playground .pd-panel { border: 4px solid var(--ink); border-radius: var(--r-lg); background: var(--paper); overflow: hidden; box-shadow: 10px 10px 0 var(--ink); }
.playground .pd-toolbar { background: var(--c); border-bottom: 4px solid var(--ink); }
.playground .pd-dial { background: #fff; border-color: var(--ink); }
.playground button { min-height: 44px; font-size: 15px; font-family: var(--f-body); }
.playground .button { display: inline-flex; align-items: center; justify-content: center; border: 4px solid var(--ink); border-radius: var(--r-sm); padding: 10px 18px; background: var(--paper); color: var(--ink); font: 700 16px var(--f-body); box-shadow: 4px 4px 0 var(--ink); cursor: pointer; }
.playground .button.dark, .playground .pd-sound .button { background: var(--ink); color: var(--lime); }
.playground .pd-toolbar button.selected, .playground .sd-modes button.selected { background: var(--ink); color: var(--lime); border-color: var(--ink); }
.playground .pd-guide { color: var(--ink); }
.playground #pd-readout { color: var(--ink); font-weight: 700; }
.playground .pd-range input { accent-color: var(--ink); }
.playground .pd-sound h4, .playground .demo-uses h4 { font: 800 22px/1.15 var(--f-display); letter-spacing: -.01em; margin: 6px 0 10px; }


/* Zoom dialog */
dialog#zoom { width: min(96vw, 1500px); max-height: 94vh; border: 4px solid var(--ink); border-radius: var(--r-sm); padding: 20px; background: var(--paper); color: var(--ink); }
dialog#zoom::backdrop { background: rgba(20, 20, 20, .78); }
dialog#zoom img { display: block; max-width: 100%; max-height: 78vh; margin: 16px auto 0; object-fit: contain; }
dialog#zoom { width: min(96vw, 1500px); }
@media (max-width: 760px) { dialog#zoom { padding: 14px; } }

/* Pinball playground */
.pb { --pb-badge: 26px; display: grid; gap: 16px; max-width: 980px; font-family: var(--f-body); }
.pb-intro { margin: 0; font: 500 clamp(17px, 1.5vw, 20px)/1.45 var(--f-body); max-width: 60ch; }
.pb-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: clamp(14px, 2.4vw, 26px); background: var(--c); border: 4px solid var(--ink); border-radius: var(--r-lg); box-shadow: 10px 10px 0 var(--ink); min-width: 0; }
.pb-panel:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.pb-table, .pb-seq { display: grid; gap: 12px; align-content: start; min-width: 0; }
.pb-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pb-balls { margin-left: auto; font: 600 15px/1.2 var(--f-body); }
.pb-key { font-weight: 600; opacity: .75; margin-left: 4px; }
.pb-canvas { display: block; width: 100%; max-width: 400px; margin-inline: auto; aspect-ratio: 4 / 5; height: auto; border: 4px solid var(--ink); border-radius: 36px 36px var(--r-sm) var(--r-sm); background: #EFE9DA; touch-action: manipulation; }
.pb-flips { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 400px; width: 100%; margin-inline: auto; }
.pb-flips .btn { min-height: 48px; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.pb-flips .btn.is-held { background: var(--ink); color: var(--paper); }
.pb-keys { margin: 0; max-width: 400px; margin-inline: auto; text-align: center; font: 500 15px/1.4 var(--f-body); }
.pb-controls { display: grid; gap: 12px; }
.pb-bpm { display: inline-flex; align-items: center; gap: 8px; font: 700 15px/1.2 var(--f-body); }
.pb-bpm input { width: 76px; min-height: 44px; padding: 6px 10px; border: 4px solid var(--ink); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); font: 700 var(--t-body)/1 var(--f-body); }
.pb-recall, .pb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pb-recall__label { font: 700 15px/1.2 var(--f-body); margin-right: 2px; }
.pb-recall .btn[aria-pressed="true"], .pb-actions .btn-ink[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.pb-actions .pb-backing[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pb-gridwrap { display: grid; gap: 14px; padding: 10px; background: var(--paper); border: 4px solid var(--ink); border-radius: var(--r-sm); min-width: 0; overflow: visible; }
.pb-block { display: grid; gap: 3px; min-width: 0; }
.pb-barlabel { font: 700 15px/1.2 var(--f-body); }
.pb-head, .pb-row { display: grid; grid-template-columns: var(--pb-badge) repeat(16, minmax(0, 1fr)); gap: 3px; align-items: center; min-width: 0; }
.pb-head span { grid-column: span 4; font: 700 12px/16px var(--f-body); padding-left: 2px; }
.pb-badge { display: grid; place-items: center; width: var(--pb-badge); height: var(--pb-badge); border-radius: 50%; border: 2px solid var(--ink); background: var(--tc); color: var(--ink); font: 800 13px/1 var(--f-display); transition: transform .08s; }
.pb-badge.lit { transform: scale(1.15); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.pb-cell { display: block; width: 100%; min-width: 0; height: 26px; padding: 0; border: 1.5px solid var(--ink); border-radius: 4px; background: #E9E4D3; cursor: pointer; }
.pb-cell--beat { background: #DCD6C2; }
.pb-cell.on, .pb-row .pb-cell.on { background: var(--tc, var(--c)); }
.pb-cell.now { outline: 2px solid var(--ink); outline-offset: -2px; }
.pb-cell:hover { filter: brightness(.94); }
.pb-note { margin: 0; font: 500 15px/1.35 var(--f-body); }
.pb-status { margin: 0; min-height: 1.5em; font: 600 var(--t-body)/1.45 var(--f-body); }
@media (min-width: 860px) {
  .pb-panel { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 480px) {
  .pb-panel { border-radius: 24px; box-shadow: 6px 6px 0 var(--ink); }
  .pb-recall .btn, .pb-actions .btn { flex: 1 1 auto; }
  .pb { --pb-badge: 22px; }
  .pb-badge { font-size: 11px; border-width: 1.5px; }
  .pb-gridwrap { padding: 8px 6px; }
}

.mini__tab { min-width: 0; } .mini__tab .chip { white-space: normal; max-width: 100%; }

/* YouTube walkthroughs (click to load) */
.hear__card--youtube { grid-template-columns: 1fr; }
.yt-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.yt-play { position: relative; display: block; width: 100%; padding: 0; border: var(--line); border-radius: var(--r-md); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; background: var(--ink); cursor: pointer; }
.yt-play img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.yt-play .keycap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.yt-play:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.yt-play:focus-visible { outline: 4px solid var(--ring); outline-offset: 4px; }
.yt-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: var(--line); border-radius: var(--r-md); background: var(--ink); }
.yt-title { margin: 12px 0 0; font-weight: 700; }
.yt-note { margin: 16px 0 0; font-size: 14px; opacity: .75; }
@media (max-width: 700px) { .yt-list { grid-template-columns: 1fr; } }
