#studio {
  --st-ink: #17241a;
  --st-paper: #fffef7;
  --st-green: #b7ee78;
  --st-mono: var(--mono, "Courier New", monospace);
  color: var(--st-ink);
  background-color: #edf5db;
  background-image: radial-gradient(#8da27859 .7px, transparent .9px);
  background-size: 7px 7px;
  border-block: 2px solid var(--st-ink);
  scroll-margin-top: 40px;
}
#studio *, #studio *::before, #studio *::after { box-sizing: border-box; }
.st-wrap { width: min(1190px, calc(100% - clamp(40px, 9vw, 156px))); margin-inline: auto; padding-block: clamp(58px, 8vw, 104px); }
.st-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: clamp(27px, 3.8vw, 52px); }
#studio .st-heading h2 {
  font: 800 clamp(3.2rem, 6.7vw, 6.6rem)/.87 var(--display, "Arial Black", Arial, sans-serif);
  letter-spacing: -.085em; margin: 0; color: var(--st-ink);
}
.st-heading h2 em { font: italic 500 1.12em/.85 Georgia, serif; letter-spacing: -.095em; }
#studio .st-heading p { max-width: 290px; font: 600 clamp(.98rem, 1.2vw, 1.12rem)/1.44 var(--body, Arial, sans-serif); margin: 0 0 .1em; }
.st-workbench {
  display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  border: 2px solid var(--st-ink); background: var(--st-paper);
  box-shadow: 5px 6px 0 var(--st-ink);
}
.st-view { min-width: 0; background: #e0e9ce; border-right: 2px solid var(--st-ink); padding: clamp(16px,2.4vw,36px); display:flex; flex-direction:column; justify-content:center; gap: 17px; }
.st-print {
  width: 100%; aspect-ratio: 1; background: white; border: 1.5px solid var(--st-ink);
  position: relative; isolation: isolate; box-shadow: 2px 3px 0 #73806b;
}
.st-print::before {
  content: ""; position: absolute; z-index: 2; top:-8px; left: 13%; width: 30%; height: 15px;
  transform: rotate(-4deg); background: repeating-linear-gradient(90deg, transparent 0 5px, #71735938 5px 6px), #f4e299c9;
  clip-path: polygon(1% 5%,99% 1%,100% 24%,98% 43%,100% 75%,98% 96%,0 100%,2% 74%,0 55%,2% 35%);
  pointer-events: none;
}
.st-print canvas { display: block; width: 100%; height: 100%; aspect-ratio: 1; }
.st-corners {
  --st-mark: linear-gradient(var(--st-ink),var(--st-ink));
  position:absolute; inset:12px; opacity:.34; pointer-events:none;
  background: var(--st-mark) left top/9px 1px, var(--st-mark) left top/1px 9px,
    var(--st-mark) right top/9px 1px, var(--st-mark) right top/1px 9px,
    var(--st-mark) left bottom/9px 1px, var(--st-mark) left bottom/1px 9px;
  background-repeat:no-repeat;
}
#studio button { appearance:none; color:var(--st-ink); cursor:pointer; font-family:inherit; }
#studio button:focus-visible, #studio input:focus-visible { outline: 3px solid #92420d; outline-offset:3px; z-index:3; }
#studio button:disabled { cursor:default; opacity:.42; }
#studio button svg { width: 19px; height:19px; flex:none; }
#studio .st-zoom, #studio .st-page-btn {
  display:grid; place-items:center; background:white;
  border:1.5px solid var(--st-ink); padding:0; border-radius:50%;
}
#studio .st-zoom { width:38px; height:38px; bottom:10px; right:10px; position:absolute; }
#studio .st-zoom[aria-pressed=true] { background:var(--st-green); }
.st-output { min-width:0; }
.st-actions { display: flex; flex-wrap:wrap; gap: 7px; }
#studio .st-button {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:1.5px solid var(--st-ink); border-radius:4px;
  min-height:43px; padding: 8px 14px; background:white;
  box-shadow:1.5px 2px 0 var(--st-ink);
  font: 750 .98rem/1.1 var(--body, Arial, sans-serif);
}
#studio .st-save { background:var(--st-ink); color:#fff; }
#studio .st-share { background:var(--st-paper); }
#studio .st-shuffle { background:var(--st-green); font-size:.94rem; }
#studio .st-button:active:not(:disabled) { transform:translate(1px,1px); box-shadow:0 0 0; }
#studio .st-feedback { min-height:1.2em; margin:8px 0 0; font:600 .85rem/1.2 var(--st-mono); }
.st-fallback { width:100%; min-width:0; border:1px solid var(--st-ink); padding:.3em; font-size:16px; background:white; }
.st-fallback[hidden] { display:none; }
.st-drawer { min-width:0; display:flex; flex-direction:column; padding:clamp(16px,2.5vw,36px); }
.st-tools { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 20px; }
#studio .st-tools h3 { font:800 clamp(1.7rem,2.8vw,3rem)/.95 var(--display, "Arial Black", Arial, sans-serif); letter-spacing:-.07em; margin:0; }
.st-tabs { display:flex; flex-wrap:wrap; gap:5px; padding-bottom:15px; border-bottom:1px dashed #697566; }
#studio .st-tabs button {
  padding:6px 10px; min-height:34px; border:1px solid #bdc3b4;
  border-radius:3px; color:var(--st-ink); background:#fff;
  font:700 .88rem/1 var(--st-mono); white-space:nowrap; text-transform:lowercase;
}
#studio .st-tabs button.has-item:not([aria-pressed=true]) { border-bottom-color:var(--st-ink); border-bottom-width:2px; }
#studio .st-tabs button[aria-pressed=true] { background:var(--st-ink); border-color:var(--st-ink); color:#fff; }
.st-items { display:grid; gap:8px; grid-template-columns:repeat(4,minmax(0,1fr)); margin-block:14px; }
#studio .st-tile {
  position:relative; border:1px solid #b2b5a8; background:#fff;
  border-radius:3px; display:flex; min-width:0; align-items:center; justify-content:center;
  flex-direction:column; gap:2px; padding:5px 3px 7px;
}
#studio .st-tile canvas { display:block; width:min(80%, 75px); height:auto; aspect-ratio:1; }
#studio .st-tile span { display:block; font:700 clamp(.76rem,1.05vw,.88rem)/1.08 var(--body, Arial, sans-serif); text-align:center; text-wrap:balance; overflow-wrap:anywhere; }
#studio .st-tile[aria-pressed=true] { border-color:var(--st-ink); box-shadow:inset 0 0 0 1px var(--st-ink); background:#effbdc; }
#studio .st-tile[aria-pressed=true]::after {
  content:""; position:absolute; width:9px; height:9px; top:5px; right:5px;
  background:var(--st-ink); clip-path:polygon(5% 48%,18% 33%,40% 56%,82% 4%,100% 18%,43% 89%);
}
.st-pager { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:auto; padding-top:12px; border-top:1px dashed #697566; }
#studio .st-plain { border:0; background:transparent; padding:5px 0; font:700 .88rem var(--st-mono); text-decoration:underline; text-underline-offset:.2em; }
.st-page-buttons { display:flex; align-items:center; gap:10px; }
#studio .st-page-btn { width:35px; height:35px; }
#studio .st-page-btn svg { width:15px; height:15px; }
.st-page { min-width:35px; font:700 .85rem var(--st-mono); text-align:center; }
@media(hover:hover) {
  #studio .st-zoom:hover, #studio .st-page-btn:not(:disabled):hover, #studio .st-tabs button:not([aria-pressed=true]):hover, #studio .st-tile:hover { border-color:var(--st-ink); background-color:#effbdc; }
}
@media(max-width:900px) and (min-width:701px) {
  .st-wrap { width:calc(100% - 44px); }
  .st-workbench { grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); }
  .st-view,.st-drawer { padding:18px; }
  .st-items { gap:5px; }
  #studio .st-button { font-size:.88rem; padding:7px 10px; }
  #studio .st-tabs button { padding:5px 7px; }
}
@media(max-width:700px) {
  .st-wrap { width:calc(100% - 32px); padding-block:56px; }
  .st-heading { display:block; margin-bottom:23px; }
  #studio .st-heading h2 { font-size:clamp(3.1rem, 11vw, 4.65rem); }
  #studio .st-heading p { margin-top:13px; max-width:410px; }
  .st-workbench { display:block; box-shadow:3px 4px 0 var(--st-ink); }
  .st-view {
    display:grid; align-items:center; grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);
    gap:clamp(10px,4vw,22px); border-right:0; border-bottom:2px solid var(--st-ink); padding:14px;
    position:sticky; top:var(--spot-studio-sticky-top,0px); z-index:4;
  }
  .st-print { width:min(100%,165px); justify-self:center; }
  .st-print::before { height:11px; top:-5px; }
  .st-corners { inset:7px; }
  #studio .st-zoom { width:30px; height:30px; bottom:4px; right:4px; }
  #studio .st-zoom svg { width:15px; height:15px; }
  .st-actions { display:grid; gap:7px; justify-content:stretch; }
  .st-output { max-width:200px; width:100%; }
  #studio .st-feedback:empty { display:none; }
  #studio .st-feedback { margin-top:6px; font-size:.76rem; }
  #studio .st-button { min-height:39px; padding:7px; font-size:.88rem; }
  .st-drawer { padding:16px; }
  .st-tools { margin-bottom:12px; }
  .st-tabs { padding-bottom:12px; }
  #studio .st-tabs button { min-height:37px; }
  .st-items { margin-block:12px; min-height:0; }
  #studio .st-tile canvas { width:min(85%,75px); }
}
@media(max-width:419px) {
  .st-wrap { width:calc(100% - 26px); }
  .st-view { padding:11px; grid-template-columns:minmax(0, .9fr) minmax(0,1.1fr); gap:12px; }
  .st-drawer { padding:12px; }
  .st-items { gap:5px; }
  #studio .st-tile { padding:3px 2px 6px; }
  #studio .st-tile span { font-size:.74rem; }
}
@media(max-height:520px) and (max-width:700px) {
  .st-view { position:static; }
}
@media(prefers-reduced-motion:reduce) {
  #studio *, #studio *::before, #studio *::after { animation:none !important; scroll-behavior:auto !important; }
}
