@import url('./tokens.css');
:root { --paper:#fafafa; --ink:#171717; --dim:#737373; --line:#0000000e; --r:28px; font-family:Selecta,Arial,sans-serif; color-scheme:light; }
* { box-sizing:border-box; }
html,body { margin:0; }
html { -webkit-tap-highlight-color:transparent; -webkit-text-size-adjust:100%; }
body { background:var(--paper); color:var(--ink); font:400 14px/1.45 Selecta,Arial,sans-serif; -webkit-font-smoothing:antialiased; }
button,input,select { font:inherit; color:inherit; }
button,a,input,select { touch-action:manipulation; }
button { cursor:pointer; user-select:none; -webkit-user-select:none; border:0; }
button:disabled { cursor:default; opacity:.4; }
button:active:not(:disabled) { background-color:#e4e4e4; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible { outline:2px solid var(--hs-blue); outline-offset:4px; }
[hidden] { display:none!important; }
svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; flex:none; }
h1,h2,h3,p { margin:0; }
h1,h2 { font-size:15px; font-weight:500; }
.glass { background:linear-gradient(140deg,#ffffffbd,#ffffff63 50%,#ffffffe8); border:1px solid #ffffffee; box-shadow:0 0 0 1px #00000008,inset 0 1px 1px #fff,inset 0 -1px 1px #0000000d,0 4px 12px #00000008; backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); }
.top { height:110px; display:grid; grid-template-columns:1fr auto 1fr; gap:24px; align-items:center; padding:20px 36px; max-width:1720px; margin:auto; }
.brand { display:flex; align-items:center; gap:10px; color:var(--ink); text-decoration:none; font-size:23px; font-weight:500; letter-spacing:-.7px; }
.brand-icon { font:36px/.8 Kalice,Georgia,serif; display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:var(--hs-dark-face); box-shadow:var(--hs-dark-shadow); color:#fff; padding-bottom:6px; }
.brand-divider { width:1px; height:16px; background:#d2d2d2; margin:0 4px; }
.brand-context { color:var(--dim); font-size:14px; font-weight:400; letter-spacing:0; }
.tabs { display:flex; gap:3px; padding:5px; border-radius:999px; }
.tabs button { min-height:38px; border-radius:999px; padding:0 19px; color:#676767; background:transparent; }
.tabs button.on { background:linear-gradient(#fff,#f0f0f0); box-shadow:0 1px 3px #0002,inset 0 1px 0 #fff; color:var(--ink); }
.collection-count { justify-self:end; color:var(--dim); font-size:13px; font-variant-numeric:tabular-nums; }
.view { display:none; max-width:1648px; margin:0 auto; padding:12px 36px 36px; }
.view.on { display:block; }
.studio { display:grid; grid-template-columns:280px minmax(0,1fr) 240px; gap:32px; min-height:580px; height:calc(100dvh - 152px); max-height:900px; }
.library { display:flex; flex-direction:column; min-height:0; min-width:0; padding-top:5px; }
.library-heading,.inspector-title,.details-title { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.library-heading { margin-bottom:19px; padding-inline:2px; }
.library-heading span { font-size:12px; color:var(--dim); }
.search { display:flex; align-items:center; gap:8px; background:#f2f2f2; border:1px solid #00000005; box-shadow:var(--hs-shadow-inset); border-radius:12px; min-height:42px; padding:0 12px; color:var(--dim); }
.search svg { width:17px; height:17px; }
.search input { background:none; border:0; min-width:0; width:100%; height:40px; font-size:14px; }
.search input::placeholder { color:#737373; }
.search:focus-within { outline:2px solid var(--hs-blue); outline-offset:2px; }
.search input:focus-visible { outline:none; }
.library-filters { display:flex; gap:8px; margin:12px 0 18px; align-items:center; }
.segmented { display:flex; border-radius:12px; background:#f0f0f0; padding:4px; box-shadow:inset 0 1px 2px #0000000d,0 1px 0 #fff; }
.segmented button { flex:1; border-radius:9px; background:none; min-height:35px; display:flex; align-items:center; justify-content:center; gap:8px; color:#666; padding:0 10px; white-space:nowrap; }
.segmented button[aria-pressed=true] { color:var(--ink); background:linear-gradient(#fff,#f7f7f7); box-shadow:0 1px 3px #0002,inset 0 1px 0 #fff; }
.selbar { flex:1; }
.selbar button { font-size:13px; min-height:31px; padding:0 8px; gap:5px; }
#keepCount { color:var(--dim); font-size:11px; font-variant-numeric:tabular-nums; }
select { min-height:40px; max-width:100%; border:1px solid #ddd; border-radius:10px; padding:0 8px; background:#fafafa; }
#settingFilter { max-width:109px; font-size:12px; border-color:transparent; background:transparent; padding:0 2px; }
.library-scroll { overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#d0d0d0 transparent; padding:4px 5px; margin:0 -5px; flex:1; }
.grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:19px 13px; }
.card { position:relative; min-width:0; }
.avatar-choice { padding:0; background:transparent; width:100%; display:block; text-align:center; border-radius:50%; }
.avatar-choice img { width:100%; aspect-ratio:1; display:block; object-fit:cover; border-radius:50%; border:3px solid var(--paper); box-shadow:0 0 0 1px #0000000d; }
.avatar-choice[aria-pressed=true] img { box-shadow:0 0 0 2px var(--hs-blue); }
.avatar-choice .cid { font-size:12px; color:#6b6b6b; display:block; margin-top:7px; font-variant-numeric:tabular-nums; }
.avatar-choice[aria-pressed=true] .cid { color:var(--hs-blue); }
.card.keep::after { content:'✓'; position:absolute; right:2px; top:1px; border:2px solid var(--paper); border-radius:50%; width:20px; height:20px; background:var(--hs-blue); color:white; display:grid; place-items:center; pointer-events:none; font-size:11px; }
.card.drop img { opacity:.35; filter:grayscale(1); }
.card.drop::after { content:'×'; position:absolute; top:0; right:0; width:22px; height:22px; display:grid; place-items:center; background:#555; color:#fff; border-radius:50%; border:2px solid var(--paper); }
.library-bottom { display:flex; align-items:center; justify-content:space-between; gap:6px; padding-top:16px; margin-top:14px; border-top:1px solid var(--line); font-size:12px; color:var(--dim); }
.text-button { padding:4px 0; color:#737373; font-size:12px; min-height:32px; background:transparent; }
.empty { color:var(--dim); padding:32px 4px; text-align:center; }
.editor { min-width:0; display:flex; flex-direction:column; align-items:center; gap:20px; }
.editor-stage { width:100%; flex:1; min-height:450px; position:relative; border-radius:32px; background:radial-gradient(ellipse at 50% 32%,#fff 0%,#f6f6f6 74%,#f2f2f2 100%); box-shadow:inset 0 0 0 1px #00000004,inset 0 2px 6px #00000003,0 1px 0 #fff; display:grid; place-items:center; overflow:hidden; }
.stage-top,.stage-bottom { position:absolute; left:24px; right:24px; display:flex; justify-content:space-between; align-items:center; color:#717171; z-index:1; font-size:13px; }
.stage-top { top:20px; }
.stage-top>span { text-transform:uppercase; letter-spacing:.08em; font-size:12px; }
.stage-bottom { bottom:22px; text-transform:capitalize; }
.stage-bottom span+span { color:#777; }
.icon-button { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:transparent; padding:0; }
.icon-button[aria-pressed=true] { color:var(--hs-blue); }
.icon-button[aria-pressed=true] svg { fill:currentColor; }
.avatar-object { width:68%; max-width:380px; aspect-ratio:1; border-radius:50%; box-shadow:0 2px 3px #0000000a,0 12px 22px -9px #00000020,0 35px 42px -18px #00000026; line-height:0; background:transparent; }
.avatar-object.square { border-radius:0; }
.avatar-object.cutout { background:conic-gradient(#e6e6e6 25%,#f5f5f5 0 50%,#e6e6e6 0 75%,#f5f5f5 0) 0 0 / 16px 16px; }
#avatarCanvas { display:block; width:100%; height:100%; border-radius:inherit; }
.editor-stage[aria-busy=true] .avatar-object { opacity:.45; }
.image-error { position:absolute; bottom:76px; padding:12px 24px; color:#555; text-align:center; }
.editor-toolbar { display:flex; align-items:center; gap:6px; border-radius:999px; padding:5px; margin-bottom:2px; }
.shuffle-button { display:flex; align-items:center; gap:9px; height:40px; padding:0 16px; background:transparent; border-radius:999px; }
.shuffle-button svg { width:17px; height:17px; }
.inspector { padding-top:5px; min-width:0; }
.inspector-title { margin-bottom:32px; }
fieldset { border:0; margin:0 0 29px; padding:0; min-width:0; }
legend { padding:0; font-size:13px; margin-bottom:12px; }
.shape-icon { display:inline-block; width:14px; height:14px; border:1.5px solid currentColor; border-radius:3px; }
.shape-icon.circle { border-radius:50%; }
.range-field { display:grid; grid-template-columns:1fr auto; margin-bottom:30px; font-size:13px; }
.range-field output { color:var(--dim); font-size:12px; font-variant-numeric:tabular-nums; }
input[type=range] { grid-column:1/-1; width:100%; margin:16px 0 5px; height:6px; appearance:none; border-radius:999px; border:1px solid #dcdcdc; background:#e4e4e4; box-shadow:inset 0 1px 2px #0000000e; cursor:pointer; }
input[type=range]::-webkit-slider-thumb { appearance:none; width:21px; height:21px; border-radius:50%; background:linear-gradient(#fff,#eaeaea); border:1px solid #ccc; box-shadow:0 2px 4px #0002,inset 0 1px 1px #fff; }
input[type=range]::-moz-range-thumb { width:21px; height:21px; border-radius:50%; background:linear-gradient(#fff,#eaeaea); border:1px solid #ccc; box-shadow:0 2px 4px #0002; }
.primary { display:flex; align-items:center; justify-content:center; gap:10px; min-height:48px; padding:0 22px; border-radius:100px; color:#fff; background:var(--hs-dark-face); box-shadow:var(--hs-dark-shadow); font-weight:500; }
.primary:active:not(:disabled) { background:var(--hs-dark-pressed); box-shadow:var(--hs-dark-shadow); }
.primary svg { width:18px; height:18px; }
.export-block { display:flex; flex-direction:column; align-items:center; gap:14px; }
.export-block .primary { width:100%; }
#exportInfo { color:var(--dim); font-size:12px; }
.details-block { border-top:1px solid var(--line); margin-top:36px; padding-top:24px; }
.details-title h2 { font-size:13px; }
.details-title .text-button { font-size:12px; }
dl { display:grid; grid-template-columns:auto 1fr; gap:10px; font-size:13px; margin:14px 0 0; }
dt { color:var(--dim); }
dd { margin:0; text-align:right; text-transform:capitalize; }
.reject-button { margin-top:20px; }
.reject-button[aria-pressed=true] { color:var(--hs-blue); }
.pile-layout { display:grid; grid-template-columns:minmax(0,1fr) 240px; gap:40px; }
.stage { position:relative; border-radius:28px; overflow:hidden; min-height:400px; aspect-ratio:16/9; display:grid; place-items:center; box-shadow:inset 0 0 0 1px #00000008; }
.pileWrap { position:absolute; inset:0; display:grid; place-items:center; text-align:center; padding:0 8%; }
.line { font-size:clamp(22px,3.5vw,50px); font-weight:500; letter-spacing:-.04em; line-height:1.12; max-width:90%; overflow-wrap:anywhere; }
.stage.dark .line { color:#fff; text-shadow:0 1px 18px #0005; }
.faces { position:absolute; inset:0; pointer-events:none; }
.faces img { position:absolute; border-radius:50%; object-fit:cover; transform:translate(-50%,-50%); max-width:22%; height:auto; aspect-ratio:1; }
.faces img.ring { box-shadow:0 0 0 2.5px #fff; }
.faces img.ring.shadow { box-shadow:0 0 0 2.5px #fff,0 6px 18px #0004; }
.faces img.shadow:not(.ring) { box-shadow:0 6px 18px #0004; }
.pile-controls h1 { margin-bottom:24px; }
.stacked { display:grid; position:relative; gap:12px; font-size:13px; margin-bottom:25px; }
.stacked input:not([type=range]) { width:100%; border:1px solid #ddd; border-radius:12px; min-height:44px; padding:0 12px; background:#f3f3f3; box-shadow:var(--hs-shadow-inset); }
.stacked output { position:absolute; right:0; color:var(--dim); }
.stacked input[type=range] { margin-top:5px; }
.toggle-row { display:flex; align-items:center; justify-content:space-between; margin:18px 0; font-size:13px; }
.switch { appearance:none; width:38px; height:24px; border-radius:999px; background:#ddd; box-shadow:inset 0 1px 3px #0002; position:relative; cursor:pointer; border:1px solid #0000000c; margin:0; }
.switch::before { content:''; width:18px; height:18px; background:linear-gradient(#fff,#eee); border-radius:50%; position:absolute; left:2px; top:2px; box-shadow:0 1px 3px #0004; transition:transform 120ms var(--hs-ease); }
.switch:checked { background:var(--hs-blue); }
.switch:checked::before { transform:translateX(14px); }
.soft-button { min-height:42px; padding:0 18px; border-radius:999px; background:linear-gradient(#fff,#eee); box-shadow:0 0 0 1px #ddd,inset 0 1px 1px white,0 3px 6px #00000008; }
.pile-controls>.soft-button { width:100%; margin:16px 0; }
.note { font-size:13px; color:var(--dim); }
.secondary-view { padding-top:25px; }
.view-heading { display:flex; gap:20px; justify-content:space-between; align-items:center; margin-bottom:24px; }
.view-heading h1 { font:30px/1.1 Kalice,Georgia,serif; }
.view-heading span { color:var(--dim); font-size:13px; }
.skies { display:grid; gap:32px; }
.fam { padding:24px; background:#fff; border:1px solid #ededed; border-radius:24px; }
.fam h2,.sky h3 { font-weight:500; text-transform:capitalize; }
.fam .t,.used { color:var(--dim); font-size:12px; }
.fam>.t { margin:4px 0 20px; }
.famrow { display:grid; grid-template-columns:repeat(auto-fit,minmax(112px,1fr)); gap:16px; }
.sky h3 { font-size:14px; }
.sky .t { min-height:54px; margin:4px 0 12px; }
.ramp { position:relative; height:300px; border-radius:14px; overflow:hidden; }
.bandmark { position:absolute; left:0; right:0; border-block:1px solid #ffffff8c; font-size:12px; color:white; text-shadow:0 0 4px #000; display:grid; place-items:center; }
.bandmark.no { background:#0006; }
.bandmark.no::after { content:'×'; }
.used { margin-top:12px; }
.prow.set { background:#ededed; }
.prow.set>div>div:first-child { font-weight:500; text-transform:capitalize; }
.sheet { padding:32px; width:min(760px,calc(100vw - 32px)); max-height:calc(100dvh - 48px); border:1px solid #fff; border-radius:28px; background:#fafafa; color:var(--ink); box-shadow:0 30px 100px #0003; }
.sheet::backdrop { background:#0004; backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.sheet .x { position:absolute; top:16px; right:16px; background:#ececec; }
.sheetIn img { width:160px; aspect-ratio:1; border-radius:50%; object-fit:cover; display:block; margin:8px auto 24px; }
.sheetIn h2 { font-size:22px; margin-bottom:24px; }
.sheetIn dl { gap:12px 20px; }
.sheetIn dd { text-align:left; text-transform:none; }
.sheetIn pre { white-space:pre-wrap; font:12px/1.65 ui-monospace,monospace; background:#eee; padding:18px; border-radius:14px; overflow-wrap:anywhere; }
.sheetIn summary { cursor:pointer; font-size:14px; padding:22px 0 8px; }
.gen { margin-top:30px; padding:24px; border:1px solid #ddd; border-radius:20px; }
.genrow { display:flex; flex-wrap:wrap; gap:16px; align-items:center; }
.genrow label { display:flex; gap:8px; align-items:center; }
.genrow button:not(.primary) { min-height:42px; border-radius:999px; padding:0 18px; background:#eee; }
.genbar { height:3px; background:#ddd; margin:16px 0; overflow:hidden; }
.genbar i { display:block; height:100%; width:0; background:var(--hs-blue); }
.genlog { white-space:pre-wrap; max-height:150px; overflow:auto; font:12px/1.5 ui-monospace,monospace; color:var(--dim); }
.toast { position:fixed; z-index:100; bottom:max(24px,env(safe-area-inset-bottom)); left:50%; transform:translate(-50%,8px); padding:12px 20px; border-radius:999px; opacity:0; visibility:hidden; pointer-events:none; transition:opacity 180ms var(--hs-ease),transform 180ms var(--hs-ease),visibility 180ms; white-space:nowrap; max-width:calc(100vw - 32px); font-size:13px; }
.toast.visible { opacity:1; visibility:visible; transform:translate(-50%,0); }
body.cover .top,body.cover main { display:none; }
body.cover .cover-stage { border-radius:0; aspect-ratio:auto; height:100dvh; width:100vw; }
body.cover .faces img { max-width:none; }
@media(hover:hover) and (pointer:fine) {
  .primary:hover:not(:disabled) { background:var(--hs-dark-hover); box-shadow:var(--hs-dark-hover-shadow); }
  .primary:active:not(:disabled) { background:var(--hs-dark-pressed); }
  .text-button:hover { color:var(--ink); }
  .avatar-choice:not([aria-pressed=true]):hover img { box-shadow:0 0 0 2px #bbb; }
  .icon-button:hover,.shuffle-button:hover { background-color:#ffffff90; }
  .tabs button:not(.on):hover { color:var(--ink); }
}
body[data-input=keyboard] *,body[data-input=keyboard] *::before { transition:none!important; }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; animation:none!important; } }
@media(prefers-reduced-transparency:reduce) { .glass { backdrop-filter:none; -webkit-backdrop-filter:none; background:#fafafa; } .sheet::backdrop { backdrop-filter:none; } }
@media(forced-colors:active) { button,.glass,.search,.segmented { border:1px solid ButtonText; } button[aria-pressed=true],.tabs .on { outline:2px solid Highlight; } .avatar-choice[aria-pressed=true] img { outline:2px solid Highlight; } }
@media(min-width:1500px) { .studio { grid-template-columns:320px minmax(0,1fr) 264px; gap:40px; } .grid { gap:24px 18px; } }
@media(max-width:1150px) { .top { padding-inline:24px; } .view { padding-inline:24px; } .studio { grid-template-columns:228px minmax(0,1fr) 220px; gap:22px; } .library-filters { flex-direction:column; align-items:stretch; gap:4px; } #settingFilter { max-width:none; min-height:30px; } .grid { gap:15px 9px; } .avatar-object { width:75%; } .brand-context,.brand-divider { display:none; } }
@media(max-width:900px) { .top { height:96px; } .studio { grid-template-columns:minmax(0,1fr) 240px; gap:24px; height:auto; max-height:none; } .library { grid-column:1/-1; grid-row:2; } .editor { grid-column:1; grid-row:1; } .inspector { grid-column:2; grid-row:1; } .editor-stage { min-height:450px; } .library-scroll { max-height:440px; padding:6px; } .grid { grid-template-columns:repeat(7,minmax(0,1fr)); gap:24px 18px; } .library-filters { flex-direction:row; } .selbar { max-width:200px; } #settingFilter { min-width:130px; } .library-heading { margin-bottom:14px; } .search { max-width:360px; } .collection-count { display:none; } .top { grid-template-columns:1fr auto; } .pile-layout { grid-template-columns:1fr; } .pile-controls { max-width:520px; width:100%; margin:auto; } .stage { min-height:360px; } }
@media(max-width:600px) { .top { height:auto; padding:22px 20px 24px; grid-template-columns:1fr; gap:24px; padding-top:max(22px,env(safe-area-inset-top)); } .brand { justify-content:center; } .brand-context,.brand-divider { display:block; } .tabs { justify-self:center; width:100%; max-width:370px; } .tabs button { flex:1; padding:0 12px; min-height:40px; } .view { padding:0 20px calc(28px + env(safe-area-inset-bottom)); } .studio { display:flex; flex-direction:column; gap:28px; } .editor { order:0; gap:16px; } .editor-stage { min-height:0; aspect-ratio:1; border-radius:28px; } .avatar-object { width:64%; } .stage-top,.stage-bottom { left:20px; right:20px; } .stage-top { top:14px; } .stage-bottom { bottom:17px; font-size:12px; } .inspector { order:1; } .inspector-title { margin-bottom:24px; } fieldset { margin-bottom:25px; } .details-block { margin-top:28px; } .library { order:2; padding-top:26px; border-top:1px solid var(--line); } .grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:22px 16px; } .library-scroll { max-height:470px; } .library-filters { margin-bottom:16px; } .search { max-width:none; } input:not([type=range]),select,.search input,#settingFilter { font-size:16px; } .segment button { min-height:40px; } .text-button { min-height:40px; } .shape-icon { width:15px; height:15px; } .primary { min-height:50px; } .inspector legend,.range-field { font-size:14px; } .stage { min-height:0; aspect-ratio:1; } .pile-layout { gap:28px; } .line { font-size:27px; } .fam { padding:20px; } .famrow { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 16px; } .sky .t { min-height:60px; } .ramp { height:240px; } .sheet { padding:25px; } .sheetIn dl { display:block; } .sheetIn dt { margin-top:15px; } .sheetIn dd { margin-top:4px; } .collection-count { display:none; } }
.avatar-choice img { height:auto; }
.library-actions { position:relative; }
.library-actions summary { cursor:pointer; list-style:none; min-width:32px; min-height:32px; display:grid; place-items:center; border-radius:50%; font-size:18px; }
.library-actions summary::-webkit-details-marker { display:none; }
.library-actions[open] summary { background:#e9e9e9; }
.library-actions-menu { position:absolute; bottom:40px; right:0; min-width:160px; padding:6px; border-radius:14px; z-index:5; background:#fff; box-shadow:0 8px 30px #0002,0 0 0 1px #ddd; }
.library-actions-menu button { display:block; text-align:left; width:100%; min-height:40px; border-radius:8px; padding:0 10px; background:transparent; font-size:13px; }
@media(hover:hover) and (pointer:fine) { .library-actions-menu button:hover { background:#f1f1f1; } }
@media(max-width:600px) { .segmented button { min-height:40px; } }
@media(min-width:901px) and (max-height:820px) {
  .studio { min-height:510px; }
  .inspector-title { margin-bottom:20px; }
  fieldset { margin-bottom:22px; }
  .range-field { margin-bottom:24px; }
  .details-block { margin-top:25px; padding-top:15px; }
  #portraitDetails { gap:7px; margin-top:10px; }
  .reject-button { margin-top:10px; }
  .editor-stage { min-height:410px; }
  .inspector:has(#backgroundField:not([hidden])) fieldset { margin-bottom:14px; }
  .inspector:has(#backgroundField:not([hidden])) .range-field { margin-bottom:16px; }
  .inspector:has(#backgroundField:not([hidden])) .details-block { margin-top:18px; }
}

@media(min-width:901px) and (max-height:820px) { .view { padding-bottom:24px; } }

/* Facepile builder */
.pile-studio { min-height:670px; max-height:980px; }
.pile-library-actions { display:flex; justify-content:space-between; padding:8px 2px 13px; }
.pile-choice { position:relative; }
.pile-badge:not(:empty) { position:absolute; top:1px; right:0; display:grid; place-items:center; min-width:22px; height:22px; padding:0 4px; border:2px solid var(--paper); border-radius:999px; background:var(--hs-blue); color:white; font:11px/1 Selecta,Arial,sans-serif; font-variant-numeric:tabular-nums; }
.pile-stage { min-height:400px; }
.pile-stage .stage-top { top:18px; }
.pile-viewport { position:absolute; inset:90px 24px 40px; display:grid; place-items:center; }
.pile-artwork { flex:none; max-width:100%; overflow:hidden; }
.pile-artwork.checker { background:conic-gradient(#00000004 25%,transparent 0 50%,#00000004 0 75%,transparent 0) 0 0 / 16px 16px; }
#pileCanvas { display:block; width:100%; height:100%; }
.pile-stage[aria-busy=true] #pileCanvas { opacity:.4; }
.pile-stage>.empty { position:relative; padding-inline:24px; }
.pile-error { position:relative; text-align:center; padding:20px; background:#fafafaee; border-radius:20px; }
.pile-error button { margin-top:16px; }
.pile-order-panel { width:100%; }
.pile-order-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; font-size:12px; color:var(--dim); }
.pile-order-tools { display:flex; }
.pile-order-tools .icon-button { width:36px; height:36px; }
.pile-order { display:flex; gap:10px; overflow-x:auto; padding:6px 4px 10px; min-height:64px; scrollbar-width:thin; }
.order-face { padding:3px; border-radius:50%; background:var(--paper); width:50px; height:50px; flex:none; }
.order-face img { display:block; border-radius:50%; width:44px; height:44px; }
.order-face[aria-pressed=true] { box-shadow:0 0 0 2px var(--hs-blue); }
.pile-inspector .inspector-title { margin-bottom:22px; }
.pile-inspector fieldset { margin-bottom:24px; }
.pile-layouts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
.pile-layouts button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; min-height:67px; border:1px solid #ddd; border-radius:12px; background:linear-gradient(#fff,#f0f0f0); box-shadow:inset 0 1px 1px white,0 2px 3px #00000004; padding:8px 2px; font-size:11px; color:#666; }
.pile-layouts svg { width:42px; height:24px; stroke-width:1.5; fill:#f6f6f6; }
.pile-layouts button[aria-pressed=true] { color:var(--hs-blue); border-color:var(--hs-blue); background:#fff; box-shadow:0 0 0 1px var(--hs-blue); }
.pile-inspector .range-field { margin-bottom:23px; }
.pile-inspector .toggle-row { margin:8px 0 26px; min-height:32px; }
.pile-export-settings { display:grid; grid-template-columns:minmax(0,1fr) 66px; gap:12px; }
.pile-export-settings .stacked { margin-bottom:24px; gap:10px; }
#pileExportInfo { color:var(--dim); font-size:12px; font-variant-numeric:tabular-nums; }
@media(min-width:901px) and (max-height:820px) {
  .pile-studio { min-height:560px; }
  .pile-inspector .inspector-title { margin-bottom:14px; }
  .pile-inspector fieldset { margin-bottom:18px; }
  .pile-inspector .range-field { margin-bottom:11px; }
  .pile-inspector input[type=range] { margin-top:12px; }
  .pile-layouts button { min-height:61px; }
  .pile-inspector .toggle-row { margin:4px 0 16px; }
  .pile-export-settings .stacked { margin-bottom:16px; }
}
@media(max-width:900px) {
  .pile-studio { min-height:0; }
  .pile-stage { min-height:480px; }
  .pile-library .grid { grid-template-columns:repeat(7,minmax(0,1fr)); }
  .pile-order-tools .icon-button { width:44px; height:44px; }
}
@media(max-width:600px) {
  .pile-stage { min-height:0; }
  .pile-viewport { inset:78px 16px 30px; }
  .pile-editor { gap:10px; }
  .pile-inspector { display:grid; grid-template-columns:1fr 1fr; gap:0 22px; }
  .pile-inspector .inspector-title,.pile-inspector fieldset,.pile-inspector .toggle-row,.pile-export-settings,.pile-inspector .export-block { grid-column:1/-1; }
  .pile-layouts { gap:10px; }
  .pile-layouts button { min-height:74px; font-size:12px; }
  .pile-library .grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .pile-export-settings { grid-template-columns:minmax(0,1fr) 80px; }
  .pile-inspector .export-block { width:100%; }
}
