.stair-studio {
  --studio-ink: #222622;
  --studio-muted: #565d55;
  --studio-line: #d9dcd3;
  --studio-paper: #fffefa;
  --studio-accent: #304b3b;
  --studio-tint: #edf2e9;
  --studio-serif: var(--font-source-serif-4, Georgia), Georgia, serif;
  color: var(--studio-ink);
  background: #f7f7f2;
  font-family: var(--font-inter, Inter), Arial, sans-serif;
  line-height: 1.5;
}
.stair-studio *, .stair-studio *::before, .stair-studio *::after { box-sizing: border-box; }
.stair-studio [hidden] { display: none !important; }
.stair-studio button, .stair-studio input, .stair-studio select { font: inherit; }
.stair-studio button { cursor: pointer; color: inherit; }
.stair-studio :is(button, a, input, select, summary):focus-visible { outline: 3px solid #487d66; outline-offset: 3px; }
.stair-studio button:disabled { cursor: default; opacity: .52; }
.studio-shell { max-width: 1600px; width: 100%; padding: 1.7rem clamp(1rem, 3.6vw, 4rem) 4rem; margin: 0 auto; }
.studio-crumb, .studio-crumb a { color: var(--studio-muted); text-decoration: none; font-size: .88rem; }
.studio-crumb { display: flex; align-items: center; gap: .62rem; margin-bottom: 1.05rem; }
.studio-crumb a:hover { text-decoration: underline; }
.studio-heading, .studio-catalogue-heading, .studio-stage-head, .studio-dialog-head, .studio-viewbar, .studio-dialog-actions { display: flex; gap: 1rem; justify-content: space-between; align-items: center; }
.studio-heading { padding-bottom: 1.06rem; }
.stair-studio h1, .stair-studio h2, .stair-studio h3, .stair-studio p { margin: 0; }
.studio-heading h1 { color: var(--studio-ink); font: 500 clamp(2.8rem,5.4vw,5.1rem)/1.04 var(--studio-serif); letter-spacing: -.055em; }
.studio-heading p, .studio-catalogue-heading p { color: var(--studio-muted); margin-top: .55rem; font-size: clamp(1rem,1.18vw,1.15rem); }
.studio-primary, .studio-outline { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid var(--studio-accent); border-radius: .55rem; font-weight: 640; padding: .67rem 1.04rem; min-height: 44px; }
.stair-studio .studio-primary { background: var(--studio-accent); color: #fff; }
.studio-outline { background: transparent; border-color: #b9c1b6; }
.studio-primary:hover { background: #263f31; }
.studio-outline:hover { border-color: var(--studio-accent); background: var(--studio-tint); }
.studio-modes { display: flex; align-items: flex-end; gap: 1.7rem; border-bottom: 1px solid #c8cfc4; margin-bottom: 1.35rem; }
.studio-modes button { padding: .7rem 0 .8rem; border: 0; border-bottom: 3px solid transparent; background: transparent; font-size: 1rem; font-weight: 560; color: var(--studio-muted); }
.studio-modes button[aria-pressed=true] { border-color: var(--studio-accent); color: var(--studio-accent); font-weight: 700; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: clamp(.85rem, 2.1vw, 2rem); align-items: start; }
.studio-preview, .studio-controls, .studio-catalogue { min-width: 0; }
.studio-preview { border: 1px solid var(--studio-line); background: var(--studio-paper); border-radius: .95rem; overflow: clip; position: sticky; top: calc(var(--proto-header, 72px) + .65rem); }
.studio-stage-head { padding: .63rem 1rem .63rem 1.15rem; }
.studio-stage-head h2 { font: 550 clamp(1.22rem, 1.9vw, 1.7rem)/1.2 var(--studio-serif); letter-spacing: -.024em; }
.studio-switch, .studio-views { display: inline-flex; gap: .15rem; }
.studio-switch { background: #eaece5; padding: .18rem; border-radius: 2rem; }
.studio-switch button, .studio-views button, .studio-designbar button { min-height: 40px; border: 0; background: transparent; font-size: .9rem; line-height: 1.2; }
.studio-switch button { padding: .48rem .85rem; border-radius: 2rem; }
.studio-switch button[aria-pressed=true] { color: #fff; background: var(--studio-accent); }
.studio-stage { isolation: isolate; position: relative; aspect-ratio: 1.48; min-height: 270px; max-height: min(64vh, 680px); background: #d9d5ca; overflow: hidden; }
.studio-cover, .studio-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.studio-cover { object-fit: cover; }
.studio-stage canvas { opacity: 0; touch-action: pan-y; }
.studio-stage.is-live canvas { opacity: 1; }
.studio-stage.is-live .studio-cover { visibility: hidden; }
.studio-stage.is-live canvas:active { cursor: grabbing; }
.studio-expand { position: absolute; inset: .75rem .75rem auto auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,252,.93); border: 1px solid #ffffff8a; box-shadow: 0 1px 8px #1820161c; }
.studio-expand svg { width: 21px; height: 21px; }
.studio-stage:fullscreen, .studio-stage.is-large { background: #d9d5ca; max-height: none; aspect-ratio: auto; width: 100%; height: 100%; height: 100dvh; }
.studio-stage.is-large { position: fixed; inset: 0; z-index: 20000; }
body:has(.studio-stage.is-large) { overflow: hidden; }
.studio-viewbar { padding: .42rem .8rem; border-bottom: 1px solid var(--studio-line); flex-wrap: wrap; gap: .2rem .45rem; }
.studio-viewbar > span { color: var(--studio-muted); font-size: .88rem; }
.studio-views button { padding: .5rem .58rem; border-radius: .4rem; }
.studio-views button[aria-pressed=true] { background: var(--studio-tint); color: #294331; font-weight: 650; }
.studio-designbar { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; padding: .34rem .95rem; }
.studio-designbar button { color: var(--studio-accent); padding: .4rem .12rem; font-weight: 610; }
.studio-designbar button:hover, .studio-link:hover { text-decoration: underline; }
.studio-designbar button:last-child { margin-left: auto; }
[data-share-fallback] { padding: .5rem 1rem 1rem; }
.studio-controls { display: grid; gap: .52rem; }
.studio-accordion { background: var(--studio-paper); border: 1px solid var(--studio-line); border-radius: .85rem; overflow: clip; scroll-margin-top: 6rem; }
.studio-accordion summary { display: flex; gap: .65rem; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; padding: .85rem 1.05rem; }
.studio-accordion summary::-webkit-details-marker { display: none; }
.studio-accordion summary::after { content: ''; width: .56rem; height: .56rem; border-right: 1.6px solid #5b6358; border-bottom: 1.6px solid #5b6358; transform: rotate(45deg); flex: none; margin-right: .18rem; }
.studio-accordion[open] summary::after { transform: rotate(225deg); }
.studio-section-name { font-weight: 660; font-size: 1.03rem; }
.studio-section-value { font-size: .83rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--studio-muted); text-align: right; margin-left: auto; max-width: 48%; }
.studio-accordion[open] { border-color: #aab7a8; }
.studio-accordion[open] summary { border-bottom: 1px solid var(--studio-line); }
.studio-fields { padding: .85rem 1.04rem 1.14rem; display: grid; gap: .92rem; }
.studio-fields fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
.studio-fields legend, .studio-fields label, .studio-filters label, [data-share-fallback] label { padding: 0; font-size: .91rem; font-weight: 650; line-height: 1.4; }
.studio-fields legend { margin-bottom: .45rem; }
.studio-fields label, .studio-filters label { display: grid; gap: .38rem; }
.stair-studio :is(.studio-fields,.studio-filters,[data-share-fallback]) :is(select,input) { width: 100%; background-color: #fffefa; color: var(--studio-ink); border: 1px solid #afb8aa; border-radius: .45rem; min-height: 43px; padding: .5rem .7rem; font-size: 1rem; font-weight: 440; }
.stair-studio :is(.studio-fields,.studio-filters) select { appearance: none; padding-right: 2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23334b38' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5'/%3E%3C/svg%3E"); background-position: right .68rem center; background-repeat: no-repeat; }
.studio-tiles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .42rem; }
.studio-tile { display: flex; flex-flow: column; align-items: stretch; overflow: hidden; width: 100%; padding: 0; border: 1px solid var(--studio-line); background: #f9f9f4; border-radius: .48rem; position: relative; }
.studio-tile img { display: block; width: 100%; height: clamp(62px, 6.9vw, 104px); object-fit: contain; background: #f1efe9; }
.studio-tile span { display: grid; place-items: center; min-height: 2.35rem; padding: .28rem .18rem; font-size: .86rem; line-height: 1.2; font-weight: 540; text-wrap: balance; }
.studio-tile[aria-pressed=true], .studio-chip[aria-pressed=true] { border-color: var(--studio-accent); box-shadow: inset 0 0 0 1px var(--studio-accent); background: var(--studio-tint); }
.studio-tile[aria-pressed=true]::after { content: '✓'; position: absolute; top: .24rem; right: .24rem; display: grid; place-items: center; width: 19px; height: 19px; color: #fff; background: var(--studio-accent); border-radius: 50%; font: 650 13px/1 Arial,sans-serif; }
.studio-tile:hover, .studio-chip:hover { border-color: #798a76; }
.studio-options { display: flex; gap: .35rem; flex-wrap: wrap; }
.studio-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .43rem .63rem; border: 1px solid #c0c7ba; border-radius: .47rem; background: #fffefa; min-height: 40px; font-size: .88rem !important; line-height: 1.25; }
.studio-chip[aria-pressed=true] { font-weight: 620; }
.studio-swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid #0003; background: var(--swatch); flex: none; }
.studio-link { color: var(--studio-accent) !important; border: 0; padding: 0 .1rem; margin-top: .38rem; background: transparent; min-height: 35px; font-size: .9rem !important; font-weight: 630 !important; }
.studio-small, .studio-fields .studio-small { color: var(--studio-muted); font-size: .89rem; font-weight: 450; }
.studio-catalogue-heading { margin-bottom: 1.05rem; }
.studio-catalogue-heading h2, .studio-dialog h2 { font: 520 clamp(1.6rem,3vw,2.3rem)/1.14 var(--studio-serif); letter-spacing: -.035em; }
.studio-filters { display: grid; grid-template-columns: 1.65fr 1fr 1fr; gap: .8rem; padding: 1rem; border: 1px solid var(--studio-line); background: var(--studio-paper); border-radius: .75rem; }
.studio-result-count { margin: .8rem 0 !important; color: var(--studio-muted); font-size: .92rem; }
.studio-results { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,245px),1fr)); gap: .62rem; }
.studio-item { border-radius: .7rem; border: 1px solid var(--studio-line); background: var(--studio-paper); padding: .8rem; min-width: 0; display: flex; flex-flow: column; align-items: stretch; }
.studio-item button.studio-item-name { border: 0; background: transparent; padding: 0; color: var(--studio-ink); width: 100%; text-align: left; display: flex; gap: .65rem; align-items: flex-start; font-size: 1rem; font-weight: 650; line-height: 1.35; }
.studio-item-name:hover span { text-decoration: underline; }
.studio-item-name img { width: 72px; height: 72px; border-radius: .35rem; object-fit: contain; flex: none; background: #f2f0e9; }
.studio-item p, .studio-item small, .studio-item-detail-code { color: var(--studio-muted); overflow-wrap: anywhere; font-size: .87rem; }
.studio-item .studio-item-meta { margin: .45rem 0 .6rem; }
.studio-item-buttons { margin-top: auto; display: flex; gap: .65rem; flex-wrap: wrap; }
.studio-item-buttons button { font-size: .9rem; }
.studio-item-buttons .studio-link { margin-top: 0; }
.studio-pagination-status { align-self: center; color: var(--studio-muted); }
.studio-pager { margin: 1.3rem 0 .25rem; display: flex; gap: 1rem; justify-content: center; }
.studio-notice { position: fixed; z-index: 100; bottom: clamp(1rem,2vw,2rem); left: 50%; transform: translateX(-50%); color: #fff; background: #233a2c; border-radius: .55rem; padding: .65rem 1rem; box-shadow: 0 5px 18px #18261725; max-width: min(92vw,550px); width: max-content; }
.studio-notice:empty { display: none; }
.studio-dialog { color: var(--studio-ink); width: min(96vw,600px); max-height: 87dvh; padding: clamp(1.05rem,3vw,1.6rem); border: 1px solid var(--studio-line); border-radius: .9rem; background: var(--studio-paper); margin: auto; box-shadow: 0 15px 80px #1115; }
.studio-dialog::backdrop { background: rgba(20,28,22,.55); }
.studio-dialog-head { margin-bottom: 1rem; }
.studio-dialog dl { margin: 0; }
.studio-pair { display: grid; grid-template-columns: minmax(110px,.75fr) 1.35fr; gap: .85rem; border-bottom: 1px solid var(--studio-line); padding: .44rem 0; }
.studio-pair dt { color: var(--studio-muted); font-size: .9rem; }
.studio-pair dd { margin: 0; font-size: .95rem; }
.studio-dialog h3 { font-size: 1.05rem; margin: 1rem 0 .35rem; }
.studio-dialog ul { padding: 0; margin: 0; list-style: none; }
.studio-dialog li { display: flex; justify-content: space-between; gap: .7rem; align-items: baseline; padding: .28rem 0; }
.studio-dialog-actions { margin-top: 1.05rem; flex-wrap: wrap; }
.studio-detail-img { display: block; width: min(100%,235px); margin: .5rem auto .85rem; background: #f4f2ed; border-radius: .5rem; }
.studio-dialog .studio-detail-title { font-size: 1.21rem; margin: .25rem 0 .55rem; }
.studio-inquiry { scroll-margin-top: 85px; max-width: 980px; margin: 2rem auto 0; }
.studio-loading { padding: 1rem; color: var(--studio-muted); }
.studio-fallback { position: absolute; inset: 0; display: grid; align-content: center; padding: .75rem; background: #efefe8; text-align: center; overflow-y: auto; }
.studio-fallback p { font-size: .85rem; color: var(--studio-muted); }
.studio-fallback .studio-board { display: flex; justify-content: center; gap: .6rem; margin: .5rem 0; }
.studio-board figure { margin: 0; flex: 0 1 30%; min-width: 0; }
.studio-board img { display: block; width: 100%; height: min(16vh,150px); object-fit: contain; }
.studio-board figcaption { font-size: .83rem; line-height: 1.25; }
.studio-fallback .studio-finish-line { display: inline-flex; justify-content: center; gap: .35rem; align-items: center; flex-wrap: wrap; }
@media (max-width: 880px) {
  .studio-grid { grid-template-columns: minmax(0,1.35fr) minmax(285px,1fr); }
  .studio-section-value { max-width: 41%; }
  .studio-viewbar { display: grid; justify-items: start; }
  .studio-stage { aspect-ratio: 1.16; }
}
@media (max-width: 720px) {
  .studio-shell { padding: 1.05rem .92rem 2.5rem; }
  .studio-crumb { margin-bottom: .65rem; }
  .studio-heading { align-items: flex-start; gap: .55rem; padding-bottom: .6rem; }
  .studio-heading h1 { font-size: clamp(2.55rem,9vw,3.1rem); }
  .studio-heading p { font-size: .96rem; max-width: 28ch; }
  .studio-heading > .studio-primary { font-size: .86rem; padding: .55rem .7rem; white-space: nowrap; margin-top: .25rem; }
  .studio-modes { margin-bottom: .7rem; gap: 1.3rem; }
  .studio-modes button { font-size: .96rem; }
  .studio-grid { display: flex; flex-flow: column; gap: .72rem; }
  .studio-preview { width: 100%; position: static; }
  .studio-stage-head { padding: .42rem .65rem; }
  .studio-stage { aspect-ratio: 1.38; min-height: 210px; max-height: 52vh; }
  .studio-controls { width: 100%; }
  .studio-tile img { height: 83px; }
  .studio-designbar { gap: .14rem .7rem; padding: .12rem .65rem; }
  .studio-designbar button { font-size: .86rem; }
  .studio-viewbar { display: flex; padding: .18rem .5rem; }
  .studio-viewbar > span { font-size: .78rem; }
  .studio-views button { padding: .4rem .4rem; font-size: .81rem; }
  .studio-filters { grid-template-columns: 1fr 1fr; padding: .7rem; gap: .55rem; }
  .studio-filters label:first-child { grid-column: 1/-1; }
  .studio-catalogue-heading { align-items: flex-start; }
  .studio-catalogue-heading p { font-size: .92rem; }
  .studio-catalogue-heading .studio-outline { padding: .45rem .6rem; font-size: .86rem; flex-shrink: 0; }
  .studio-section-value { max-width: 52%; }
  .studio-inquiry { margin-top: 1.3rem; }
}
@media (max-width: 370px) { .studio-viewbar > span { display: none; } .studio-designbar { justify-content: space-between; gap: 0; } }
@media (prefers-reduced-motion: reduce) { .stair-studio * { scroll-behavior: auto !important; } }

.studio-crumb, .studio-modes, #stair-preview, .studio-result-count { scroll-margin-top: 85px; }
.studio-back { display: none; }
@media (max-width:720px) {
  .stair-studio:has([data-page="designer"]:not([hidden])) .studio-back:not([hidden]) { display: block; position: fixed; z-index: 5; right: 1rem; bottom: max(1rem,env(safe-area-inset-bottom)); border-radius: 2rem; padding: .62rem .95rem; border: 1px solid var(--studio-accent); background: var(--studio-paper); color: var(--studio-accent); box-shadow: 0 3px 14px #1d2e211f; font-weight: 650; }
}

.studio-stage.is-live.is-poster .studio-cover { visibility: visible; }
.studio-stage.is-live.is-poster canvas { opacity: 0; }

.studio-part-img { border-radius: .35rem; flex: none; display: block; width: 72px; height: 72px; }
.studio-plate { background-size: 400% 400%; background-repeat: no-repeat; aspect-ratio: 1; }
.studio-variant { display: grid; gap: .3rem; font-size: .92rem; margin-bottom: .75rem; font-weight: 600; }
.studio-variant select { width: 100%; min-height: 44px; border-radius: .35rem; border: 1px solid var(--studio-line); padding: .45rem; background: #fffefa; color: var(--studio-ink); }
