/* =========================================================
   MARCAM AI — LAYERED ART STUDIO VARIABLES
   ========================================================= */
:root{
  --la-bg:#0f0b16;
  --la-bg-2:#171020;
  --la-panel:rgba(255,255,255,.065);
  --la-panel-strong:rgba(255,255,255,.085);
  --la-border:rgba(255,255,255,.11);
  --la-border-soft:rgba(255,255,255,.075);
  --la-text:rgba(255,255,255,.94);
  --la-muted:rgba(255,255,255,.66);
  --la-dim:rgba(255,255,255,.43);
  --la-orange:#ff5a3c;
  --la-orange-2:#ff8069;
  --la-purple:#8d5cff;
}

/* =========================================================
   MAIN WORKSPACE
   ========================================================= */

body.layered-art-page .studio-grid{
  display:grid;
  grid-template-columns:270px minmax(520px,1fr) 320px;
  gap:12px;
  width:100%;
  height:calc(100vh - 112px);
  min-height:650px;
  padding:12px 14px;
  align-items:stretch;
}

body.layered-art-page .left-panel,
body.layered-art-page .right-panel,
body.layered-art-page .workspace{
  min-width:0;
  min-height:0;
  border:1px solid rgba(255,255,255,.095);
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 15px 45px rgba(0,0,0,.20);
}

body.layered-art-page .left-panel,
body.layered-art-page .right-panel{
  background:
    linear-gradient(180deg,rgba(255,255,255,.065),rgba(255,255,255,.038));
  overflow-y:auto;
  overflow-x:hidden;
}

body.layered-art-page .workspace{
  position:relative;
  display:flex;
  flex-direction:column;
  background:#fff;
}

/* =========================================================
   LEFT CONTROLS
   ========================================================= */

body.layered-art-page .panel-section,
body.layered-art-page .right-section{
  padding:14px;
  border-bottom:1px solid rgba(255,255,255,.065);
}

body.layered-art-page .panel-section:last-child,
body.layered-art-page .right-section:last-child{
  border-bottom:0;
}

body.layered-art-page .section-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

body.layered-art-page .panel-section h2,
body.layered-art-page .right-section h2{
  margin:0 0 8px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.01em;
}

body.layered-art-page .char-count{
  font-size:8px;
  color:var(--la-dim);
  font-weight:750;
}

body.layered-art-page textarea,
body.layered-art-page select{
  width:100%;
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  outline:none;
  background:rgba(255,255,255,.045);
  color:rgba(255,255,255,.9);
  font:inherit;
  font-size:10px;
  transition:.18s ease;
}

body.layered-art-page textarea{
  min-height:94px;
  padding:10px;
  resize:vertical;
  line-height:1.45;
}

body.layered-art-page select{
  height:38px;
  padding:0 10px;
}

body.layered-art-page textarea:focus,
body.layered-art-page select:focus{
  border-color:rgba(255,90,60,.55);
  box-shadow:0 0 0 2px rgba(255,90,60,.08);
}

body.layered-art-page select option{
  background:#20182a;
  color:#fff;
}

body.layered-art-page .field-label{
  display:block;
  margin:12px 0 7px;
  font-size:9px;
  font-weight:850;
  color:rgba(255,255,255,.78);
}

body.layered-art-page .field-label span{
  font-weight:600;
  color:var(--la-dim);
}

body.layered-art-page .style-help,
body.layered-art-page .shape-help,
body.layered-art-page .help-copy{
  margin:7px 0 0;
  color:var(--la-dim);
  font-size:8.5px;
  line-height:1.45;
}

body.layered-art-page .upload-box{
  position:relative;
  display:flex;
  min-height:88px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:5px;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:11px;
  background:rgba(255,255,255,.025);
  text-align:center;
  cursor:pointer;
  overflow:hidden;
}

body.layered-art-page .upload-box:hover{
  border-color:rgba(255,90,60,.55);
  background:rgba(255,90,60,.045);
}

body.layered-art-page .upload-box input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}

body.layered-art-page .upload-icon{
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,90,60,.25);
  border-radius:9px;
  background:rgba(255,90,60,.10);
  color:var(--la-orange-2);
  font-size:16px;
  font-weight:900;
}

body.layered-art-page .upload-box strong{
  font-size:10px;
  font-weight:850;
}

body.layered-art-page .upload-box small{
  font-size:8px;
  color:var(--la-dim);
}

body.layered-art-page .reference-preview{
  position:relative;
  margin-top:9px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:10px;
  background:#0c0910;
  overflow:hidden;
}

body.layered-art-page .reference-preview[hidden]{
  display:none;
}

body.layered-art-page .reference-preview img{
  display:block;
  width:100%;
  max-height:180px;
  object-fit:contain;
}

body.layered-art-page .reference-preview .full{
  width:100%;
  margin:0;
  padding:8px;
  border:0;
  border-top:1px solid rgba(255,255,255,.08);
  border-radius:0;
  background:rgba(255,255,255,.055);
  color:#fff;
  font:inherit;
  font-size:9px;
  font-weight:800;
  cursor:pointer;
}

body.layered-art-page .reference-preview .full:hover{
  background:var(--la-orange);
}


body.layered-art-page .outer-design-tabs{
  display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:0 0 8px;
  padding:3px;border:1px solid rgba(255,255,255,.10);border-radius:10px;background:rgba(255,255,255,.025);
}
body.layered-art-page .outer-design-tab{
  border:0;border-radius:7px;padding:8px 10px;background:transparent;color:rgba(255,255,255,.62);
  font:inherit;font-size:8px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;cursor:pointer;transition:.18s ease;
}
body.layered-art-page .outer-design-tab:hover{color:#fff;background:rgba(255,90,60,.06)}
body.layered-art-page .outer-design-tab.active{color:#fff;background:rgba(255,90,60,.16);box-shadow:inset 0 0 0 1px rgba(255,90,60,.42)}
body.layered-art-page .shape-picker[hidden]{display:none!important}
body.layered-art-page .sign-icon{width:34px;height:25px;display:block;overflow:visible}
body.layered-art-page .sign-icon path{fill:none;stroke:currentColor;stroke-width:4;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
body.layered-art-page .sign-option{min-height:58px}

body.layered-art-page .shape-picker{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
}

body.layered-art-page .shape-option{
  min-width:0;
  min-height:53px;
  padding:5px 3px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:9px;
  background:rgba(255,255,255,.035);
  color:rgba(255,255,255,.72);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:4px;
  font:inherit;
  font-size:7.5px;
  font-weight:800;
  transition:.18s ease;
}

body.layered-art-page .shape-option:hover{
  border-color:rgba(255,90,60,.38);
  background:rgba(255,90,60,.055);
  color:#fff;
}

body.layered-art-page .shape-option.active{
  border-color:rgba(255,90,60,.58);
  background:rgba(255,90,60,.13);
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,90,60,.10);
}

body.layered-art-page .shape-icon{
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--la-orange-2);
  font-size:15px;
  line-height:1;
}

body.layered-art-page .shape-none{
  font-size:18px;
}

body.layered-art-page .square-icon,
body.layered-art-page .circle-icon,
body.layered-art-page .rounded-square-icon,
body.layered-art-page .hexagon-icon,
body.layered-art-page .octagon-icon{
  border:2px solid currentColor;
}

body.layered-art-page .square-icon{
  border-radius:2px;
}

body.layered-art-page .circle-icon{
  border-radius:50%;
}

body.layered-art-page .rounded-square-icon{
  border-radius:6px;
}

body.layered-art-page .hexagon-icon{
  clip-path:polygon(25% 4%,75% 4%,100% 50%,75% 96%,25% 96%,0 50%);
  background:currentColor;
}

body.layered-art-page .hexagon-icon::after{
  content:"";
  width:18px;
  height:18px;
  background:#1b1424;
  clip-path:inherit;
}

body.layered-art-page .octagon-icon{
  clip-path:polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%);
  background:currentColor;
}

body.layered-art-page .octagon-icon::after{
  content:"";
  width:18px;
  height:18px;
  background:#1b1424;
  clip-path:inherit;
}

body.layered-art-page .star-icon,
body.layered-art-page .heart-icon{
  color:var(--la-orange-2);
}

body.layered-art-page .locked-setting{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:12px;
  padding:9px 10px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:9px;
  background:rgba(255,255,255,.035);
  font-size:8px;
  color:var(--la-muted);
}

body.layered-art-page .locked-setting strong{
  font-size:9px;
  color:#fff;
}

body.layered-art-page .sticky-generate{
  position:sticky;
  bottom:0;
  background:linear-gradient(180deg,rgba(20,14,30,.60),rgba(20,14,30,.98));
  backdrop-filter:blur(10px);
  z-index:3;
}

body.layered-art-page .generate-btn{
  width:100%;
  min-height:43px;
  padding:0 13px;
  border:1px solid rgba(255,90,60,.62);
  border-radius:11px;
  background:linear-gradient(180deg,#ff684d,#ff5238);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font:inherit;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
  box-shadow:none;
}

body.layered-art-page .generate-btn:hover{
  filter:brightness(1.05);
}

body.layered-art-page .generate-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}

body.layered-art-page .login-hint,
body.layered-art-page .error-box{
  margin-bottom:8px;
  padding:8px 9px;
  border-radius:9px;
  font-size:8px;
  line-height:1.4;
}

body.layered-art-page .login-hint{
  border:1px solid rgba(255,255,255,.09);
  background:rgba(255,255,255,.035);
  color:var(--la-muted);
}

body.layered-art-page .error-box{
  border:1px solid rgba(255,107,107,.28);
  background:rgba(255,107,107,.08);
  color:#ffb0b0;
}

/* =========================================================
   LAYER COUNT CONTROL
   ========================================================= */
body.layered-art-page .layer-count-control{
  margin-top:4px;
  padding:9px 10px 8px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:10px;
  background:rgba(255,255,255,.035);
}
body.layered-art-page .layer-count-top{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  color:var(--la-muted);font-size:8px;line-height:1.2;font-weight:650;
}
body.layered-art-page .layer-count-top output{
  flex:0 0 auto;padding:3px 6px;border:1px solid rgba(255,90,60,.28);
  border-radius:6px;background:rgba(255,90,60,.07);color:#fff;font-size:8px;font-weight:900;
}
body.layered-art-page .layer-count-control input[type="range"]{
  display:block;width:100%;height:16px;margin:6px 0 1px;accent-color:var(--la-orange);cursor:pointer;
}
body.layered-art-page .layer-count-scale{display:flex;justify-content:space-between;color:var(--la-dim);font-size:7px;font-weight:750;padding:0 1px}

/* =========================================================
   CENTRE WORKSPACE
   ========================================================= */

body.layered-art-page .workspace-toolbar{
  flex:0 0 48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 12px;
  border-bottom:1px solid #ddd8df;
  background:#17111d;
  position:relative;
  z-index:5;
}

body.layered-art-page .toolbar-right{
  display:flex;
  align-items:center;
  gap:10px;
}

body.layered-art-page .status-pill{
  padding:6px 8px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  font-size:7.5px;
  font-weight:900;
  letter-spacing:.08em;
}

body.layered-art-page .status-pill.ready{
  border-color:rgba(255,90,60,.26);
  background:rgba(255,90,60,.08);
  color:#ff9c89;
}

body.layered-art-page .status-pill.working{
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.07);
  color:#a9a5ad;
}

body.layered-art-page .status-pill.error{
  border-color:rgba(255,107,107,.32);
  background:rgba(255,107,107,.08);
  color:#ff9999;
}

/*
   IMPORTANT:
   The preview area is deliberately solid white.
   The generated PNGs remain transparent, allowing the
   white canvas to show through instead of a checkerboard.
*/

body.layered-art-page .preview-canvas{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff !important;
  color:#21182a;
}

body.layered-art-page .empty-state{
  width:min(470px,90%);
  text-align:center;
  padding:30px;
  color:#21182a;
}

body.layered-art-page .empty-state h1{
  margin:18px 0 8px;
  font-size:20px;
  line-height:1.15;
  letter-spacing:-.025em;
  color:#21182a;
}

body.layered-art-page .empty-state p{
  margin:0;
  color:#5e5365;
  font-size:10px;
  line-height:1.55;
}

body.layered-art-page .layer-icon{
  position:relative;
  width:92px;
  height:72px;
  margin:0 auto;
}

body.layered-art-page .layer-icon i{
  position:absolute;
  width:66px;
  height:44px;
  border:1px solid #d7d0da;
  border-radius:8px;
  background:#fff;
}

body.layered-art-page .layer-icon i:nth-child(1){
  left:2px;
  top:23px;
}

body.layered-art-page .layer-icon i:nth-child(2){
  left:7px;
  top:18px;
}

body.layered-art-page .layer-icon i:nth-child(3){
  left:12px;
  top:13px;
}

body.layered-art-page .layer-icon i:nth-child(4){
  left:17px;
  top:8px;
}

body.layered-art-page .layer-icon i:nth-child(5){
  left:22px;
  top:3px;
  border-color:rgba(255,90,60,.50);
  background:#fff;
}

/* =========================================================
   GENERATED PREVIEWS
   ========================================================= */

body.layered-art-page .stack-stage{
  position:relative;
  width:min(92%,820px);
  height:min(78vh,700px);
  min-height:420px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff !important;
  overflow:hidden;
}

body.layered-art-page .stack-layer{
  position:absolute;
  left:50%;
  top:50%;
  max-width:94%;
  max-height:94%;
  width:auto;
  height:auto;
  object-fit:contain;
  transform:translate(-50%,-50%);
  filter:none;
  display:block;
}

body.layered-art-page .view-stacked .stack-layer:nth-child(1),
body.layered-art-page .view-stacked .stack-layer:nth-child(2),
body.layered-art-page .view-stacked .stack-layer:nth-child(3),
body.layered-art-page .view-stacked .stack-layer:nth-child(4),
body.layered-art-page .view-stacked .stack-layer:nth-child(5){
  transform:translate(-50%,-50%);
}


/* All Images is a scrolling document, not a vertically-centred preview. */
body.layered-art-page .preview-canvas.all-images-view{
  display:block;
  overflow-y:auto;
  overflow-x:hidden;
  padding-top:22px;
}

body.layered-art-page .preview-canvas.all-images-view .layer-grid-stage{
  width:100%;
  margin:0;
  align-content:start;
}

body.layered-art-page .layer-grid-stage{
  width:100%;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  align-content:start;
}

body.layered-art-page .grid-card{
  border:1px solid #ded9e2;
  border-radius:12px;
  background:#fff;
  padding:9px;
  overflow:hidden;
  color:#21182a;
}

body.layered-art-page .grid-card img{
  width:100%;
  height:250px;
  object-fit:contain;
  background:#fff !important;
  border:1px solid #eee;
  border-radius:8px;
  display:block;
}

body.layered-art-page .grid-card b{
  display:block;
  margin-top:7px;
  font-size:9px;
}

body.layered-art-page .grid-card small{
  display:block;
  margin-top:3px;
  color:#6b6272;
  font-size:7.5px;
}

/* =========================================================
   PROGRESS
   ========================================================= */

body.layered-art-page .progress-overlay{
  position:absolute;
  inset:48px 0 0;
  z-index:20;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:10px;
  background:rgba(15,11,22,.88);
  backdrop-filter:blur(10px);
}

body.layered-art-page .progress-overlay[hidden]{
  display:none!important;
}

body.layered-art-page .spinner{
  width:36px;
  height:36px;
  border:3px solid rgba(255,255,255,.12);
  border-top-color:var(--la-orange);
  border-radius:50%;
  animation:laSpin .8s linear infinite;
}

@keyframes laSpin{
  to{transform:rotate(360deg)}
}

body.layered-art-page .progress-overlay strong{
  font-size:11px;
}

body.layered-art-page .progress-overlay>span{
  max-width:360px;
  text-align:center;
  color:var(--la-muted);
  font-size:8.5px;
}

body.layered-art-page .progress-track{
  width:min(340px,70%);
  height:5px;
  border-radius:99px;
  overflow:hidden;
  background:rgba(255,255,255,.10);
}

body.layered-art-page .progress-track i{
  display:block;
  width:0;
  height:100%;
  background:var(--la-orange);
  transition:width .25s ease;
}

body.layered-art-page .progress-percent{
  font-size:9px;
  color:#ff9c89;
}

/* =========================================================
   RIGHT GALLERY / CENTRE DOWNLOAD
   ========================================================= */
body.layered-art-page .workspace-bottom-bar{
  position:relative;
  flex:0 0 54px;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:6px 120px 10px 12px;
  background:#fff;
  border-top:1px solid rgba(33,24,42,.08);
}

body.layered-art-page .workspace-download-btn{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  min-height:34px;
  padding:7px 12px;
  border:1px solid rgba(255,90,60,.38);
  border-radius:10px;
  background:rgba(255,90,60,.08);
  color:#d94b32;
  font:inherit;
  font-size:9px;
  font-weight:850;
  cursor:pointer;
  transition:.18s ease;
}

body.layered-art-page .workspace-download-btn:hover{
  background:var(--la-orange);
  border-color:var(--la-orange);
  color:#fff;
}

body.layered-art-page .workspace-download-btn:disabled{
  opacity:.65;
  cursor:wait;
}

/* =========================================================
   RIGHT LAYERS
   ========================================================= */

body.layered-art-page .right-panel{
  display:flex;
  flex-direction:column;
}

body.layered-art-page .right-panel .right-section{
  flex:1;
  overflow-y:auto;
  overflow-x:hidden;
}

body.layered-art-page .download-all{
  padding:7px 9px;
  color:#ff9c89;
  border-color:rgba(255,90,60,.28);
  background:rgba(255,90,60,.07);
}

body.layered-art-page .download-all:hover{
  background:rgba(255,90,60,.16);
  border-color:rgba(255,90,60,.48);
}

body.layered-art-page .layer-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

body.layered-art-page .layer-placeholder{
  padding:20px 10px;
  text-align:center;
  color:var(--la-dim);
  font-size:8.5px;
  line-height:1.5;
}

body.layered-art-page .layer-card{
  padding:8px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:11px;
  background:rgba(255,255,255,.032);
}

body.layered-art-page .layer-head{
  display:grid;
  grid-template-columns:55px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
}

body.layered-art-page .layer-thumb{
  width:55px;
  height:55px;
  object-fit:contain;
  border-radius:7px;
  background:#fff !important;
  background-image:none !important;
  border:1px solid rgba(0,0,0,.10);
  display:block;
}

body.layered-art-page .layer-name{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

body.layered-art-page .layer-name strong{
  font-size:9px;
}

body.layered-art-page .layer-name span{
  width:max-content;
  max-width:100%;
  padding:3px 5px;
  border:1px solid rgba(255,90,60,.28);
  border-radius:5px;
  color:#ff9c89;
  background:rgba(255,90,60,.05);
  font-size:7px;
  font-weight:800;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body.layered-art-page .layer-actions{
  display:flex;
  gap:4px;
}

body.layered-art-page .layer-actions a{
  padding:4px 5px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:5px;
  color:var(--la-muted);
  font-size:7px;
  font-weight:800;
  text-decoration:none;
}

body.layered-art-page .layer-actions a:hover{
  color:#fff;
  border-color:rgba(255,90,60,.38);
}

body.layered-art-page .layer-metrics{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:4px;
  margin-top:8px;
}

body.layered-art-page .metric{
  padding:5px 3px;
  border-radius:6px;
  background:rgba(255,255,255,.035);
  text-align:center;
}

body.layered-art-page .metric b{
  display:block;
  font-size:8px;
}

body.layered-art-page .metric span{
  display:block;
  margin-top:2px;
  color:var(--la-dim);
  font-size:6.5px;
}

body.layered-art-page .detail-bar{
  height:3px;
  margin-top:7px;
  border-radius:99px;
  background:rgba(255,255,255,.09);
  overflow:hidden;
}

body.layered-art-page .detail-bar i{
  display:block;
  height:100%;
  background:var(--la-orange);
}

/* =========================================================
   SCROLLBARS
   ========================================================= */

body.layered-art-page .left-panel::-webkit-scrollbar,
body.layered-art-page .right-panel::-webkit-scrollbar,
body.layered-art-page .preview-canvas::-webkit-scrollbar{
  width:7px;
  height:7px;
}

body.layered-art-page .left-panel::-webkit-scrollbar-thumb,
body.layered-art-page .right-panel::-webkit-scrollbar-thumb,
body.layered-art-page .preview-canvas::-webkit-scrollbar-thumb{
  background:rgba(0,0,0,.16);
  border-radius:10px;
}

body.layered-art-page .left-panel::-webkit-scrollbar-track,
body.layered-art-page .right-panel::-webkit-scrollbar-track{
  background:transparent;
}

/* =========================================================
   COMPACT LIVE LAYER ADJUSTMENTS
   ========================================================= */

body.layered-art-page .toolbar-adjusters{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
}

body.layered-art-page .toolbar-adjuster{
  width:clamp(135px,16vw,185px);
  min-width:110px;
}

body.layered-art-page .toolbar-adjuster-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  margin-bottom:1px;
  color:rgba(255,255,255,.68);
  font-size:7px;
  line-height:1;
  font-weight:800;
  white-space:nowrap;
}

body.layered-art-page .toolbar-adjuster-top output{
  min-width:32px;
  padding:2px 4px;
  border:1px solid rgba(255,90,60,.24);
  border-radius:5px;
  background:rgba(255,90,60,.07);
  color:#fff;
  text-align:center;
  font-size:7px;
  font-weight:900;
}

body.layered-art-page .toolbar-adjuster input[type="range"]{
  display:block;
  width:100%;
  height:14px;
  margin:0;
  accent-color:var(--la-orange);
  cursor:pointer;
}

body.layered-art-page .toolbar-layer-count-adjuster{
  width:clamp(90px,10vw,120px);
}

body.layered-art-page .toolbar-layer-count-adjuster input[type="range"]{
  accent-color:var(--la-orange);
}

/* The old full-size adjustment panel is intentionally no longer displayed.
   The controls now live in the existing toolbar without increasing its height. */
body.layered-art-page .layer-adjusters{
  display:none!important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width:1350px){
  body.layered-art-page .studio-grid{
    grid-template-columns:255px minmax(460px,1fr) 295px;
  }
}

@media (max-width:1120px){
  body.layered-art-page .studio-grid{
    grid-template-columns:240px minmax(420px,1fr) 275px;
    gap:10px;
    padding:10px;
  }
}

@media (max-width:900px){
  body.layered-art-page .studio-grid{
    height:auto;
    min-height:0;
    grid-template-columns:250px minmax(0,1fr);
  }

  body.layered-art-page .right-panel{
    grid-column:1/-1;
    max-height:460px;
  }

  body.layered-art-page .workspace{
    min-height:650px;
  }

  body.layered-art-page .preview-canvas{
    min-height:600px;
  }

  body.layered-art-page .layer-grid-stage{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:720px){

  body.layered-art-page .studio-grid{
    display:block;
    padding:9px;
  }

  body.layered-art-page .left-panel,
  body.layered-art-page .workspace,
  body.layered-art-page .right-panel{
    margin-bottom:9px;
    min-height:auto;
  }

  body.layered-art-page .left-panel,
  body.layered-art-page .right-panel{
    max-height:none;
    overflow:visible;
  }

  body.layered-art-page .workspace{
    min-height:620px;
  }

  body.layered-art-page .preview-canvas{
    min-height:560px;
    padding:12px;
  }

  body.layered-art-page .stack-stage{
    width:100%;
    height:560px;
    min-height:0;
  }

  body.layered-art-page .layer-grid-stage{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:480px){
  body.layered-art-page .layer-grid-stage{
    grid-template-columns:1fr;
  }

  body.layered-art-page .shape-picker{
    grid-template-columns:repeat(4,1fr);
  }

  body.layered-art-page .workspace{
    min-height:560px;
  }

  body.layered-art-page .preview-canvas{
    min-height:500px;
  }
}


/* =========================================================
   CREATION GALLERY
   ========================================================= */
body.layered-art-page .gallery-section .section-title-row{align-items:flex-start}
body.layered-art-page .gallery-subtitle{margin:3px 0 0;color:var(--la-muted);font-size:9px;line-height:1.35}
body.layered-art-page .gallery-list{padding-top:10px}
body.layered-art-page .gallery-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
body.layered-art-page .gallery-card{appearance:none;border:1px solid rgba(255,255,255,.10);border-radius:9px;background:rgba(255,255,255,.045);padding:4px;color:#fff;text-align:left;cursor:pointer;min-width:0;transition:border-color .18s ease,transform .18s ease,background .18s ease}
body.layered-art-page .gallery-card:hover{border-color:rgba(255,90,60,.65);background:rgba(255,90,60,.07);transform:translateY(-1px)}
body.layered-art-page .gallery-image-wrap{display:block;width:100%;aspect-ratio:1/1;border-radius:8px;overflow:hidden;background:#fff;border:1px solid rgba(0,0,0,.08)}
body.layered-art-page .gallery-image-wrap img{width:100%;height:100%;display:block;object-fit:contain}
body.layered-art-page .gallery-card-meta{display:block;padding:4px 1px 1px;min-width:0}
body.layered-art-page .gallery-card-meta strong,body.layered-art-page .gallery-card-meta small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.layered-art-page .gallery-card-meta strong{font-size:7px}
body.layered-art-page .gallery-card-meta small{margin-top:2px;color:var(--la-muted);font-size:6.5px}
body.layered-art-page .gallery-empty{min-height:180px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:7px;padding:20px 12px;color:var(--la-muted)}
body.layered-art-page .gallery-empty-icon{width:34px;height:34px;border:1px solid rgba(255,90,60,.35);border-radius:9px;display:flex;align-items:center;justify-content:center;color:var(--la-orange);font-size:18px}
body.layered-art-page .gallery-empty strong{color:#fff;font-size:10px}
body.layered-art-page .gallery-empty span{max-width:180px;font-size:8px;line-height:1.4}
body.gallery-modal-open{overflow:hidden}
body.layered-art-page .layer-gallery-modal{position:fixed;inset:0;z-index:1000}
body.layered-art-page .layer-gallery-modal[hidden]{display:none!important}
body.layered-art-page .gallery-modal-backdrop{position:absolute;inset:0;background:rgba(5,3,9,.82);backdrop-filter:blur(8px)}
body.layered-art-page .gallery-modal-dialog{position:relative;width:min(900px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;margin:16px auto;border:1px solid rgba(255,255,255,.13);border-radius:18px;background:#120d18;box-shadow:0 24px 80px rgba(0,0,0,.5);padding:18px}
body.layered-art-page .gallery-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
body.layered-art-page .gallery-modal-kicker{display:block;color:var(--la-orange);font-size:8px;letter-spacing:.12em;font-weight:700}
body.layered-art-page .gallery-modal-header h2{margin:4px 0 0;font-size:18px}
body.layered-art-page .gallery-close{width:32px;height:32px;border-radius:9px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.05);color:#fff;font-size:22px;line-height:1;cursor:pointer}
body.layered-art-page .gallery-close:hover{border-color:var(--la-orange);color:var(--la-orange)}
body.layered-art-page .gallery-modal-preview{margin-top:15px;height:min(54vh,520px);min-height:300px;border-radius:13px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden}
body.layered-art-page .gallery-composite{position:relative;width:min(76%,500px);aspect-ratio:1/1}
body.layered-art-page .gallery-composite img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block}
body.layered-art-page .gallery-composite-layer-1{transform:translate(-14px,14px);opacity:.30}
body.layered-art-page .gallery-composite-layer-2{transform:translate(-10px,10px);opacity:.38}
body.layered-art-page .gallery-composite-layer-3{transform:translate(-6px,6px);opacity:.48}
body.layered-art-page .gallery-composite-layer-4{transform:translate(-3px,3px);opacity:.62}
body.layered-art-page .gallery-composite-layer-5{transform:none;opacity:1}
body.layered-art-page .gallery-modal-downloads{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;justify-content:center}
body.layered-art-page .gallery-download-btn{border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#fff;border-radius:9px;padding:9px 13px;font-size:9px;font-weight:700;cursor:pointer}
body.layered-art-page .gallery-download-btn:hover{border-color:var(--la-orange);color:var(--la-orange)}
body.layered-art-page .gallery-download-btn.primary{background:var(--la-orange);border-color:var(--la-orange);color:#fff}
body.layered-art-page .gallery-layer-downloads{margin-top:13px;border-top:1px solid rgba(255,255,255,.08)}
body.layered-art-page .gallery-layer-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 2px;border-bottom:1px solid rgba(255,255,255,.07)}
body.layered-art-page .gallery-layer-row strong,body.layered-art-page .gallery-layer-row small{display:block}
body.layered-art-page .gallery-layer-row strong{font-size:9px}
body.layered-art-page .gallery-layer-row small{margin-top:2px;color:var(--la-muted);font-size:7.5px}
body.layered-art-page .gallery-layer-links{display:flex;gap:6px}
body.layered-art-page .gallery-layer-links a{text-decoration:none;border:1px solid rgba(255,90,60,.35);color:#ff9c89;border-radius:7px;padding:5px 8px;font-size:8px;font-weight:700}
body.layered-art-page .gallery-layer-links a:hover{background:rgba(255,90,60,.12);border-color:var(--la-orange);color:#fff}
@media(max-width:1100px){body.layered-art-page .gallery-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}}
@media(max-width:850px){body.layered-art-page .gallery-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:620px){body.layered-art-page .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){body.layered-art-page .gallery-modal-dialog{width:calc(100vw - 18px);max-height:calc(100vh - 18px);margin:9px auto;padding:12px}body.layered-art-page .gallery-modal-preview{height:52vh;min-height:260px}body.layered-art-page .gallery-composite{width:88%}}

/* Compact toolbar adjustments on smaller workspaces */
@media (max-width:900px){
  body.layered-art-page .workspace-toolbar{
    gap:7px;
    padding:0 8px;
  }
  body.layered-art-page .toolbar-adjusters{
    gap:6px;
  }
  body.layered-art-page .toolbar-adjuster{
    width:clamp(90px,17vw,140px);
    min-width:78px;
  }
  body.layered-art-page .toolbar-layer-count-adjuster{
    width:clamp(78px,13vw,110px);
  }
  body.layered-art-page .toolbar-adjuster-top{
    font-size:6.5px;
  }
  body.layered-art-page .toolbar-adjuster-top output{
    font-size:6.5px;
    min-width:30px;
  }
}

@media (max-width:650px){
  body.layered-art-page .toolbar-adjusters{
    justify-content:flex-start;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  body.layered-art-page .toolbar-adjuster,
  body.layered-art-page .toolbar-layer-count-adjuster{
    width:auto;
    min-width:0;
  }
  body.layered-art-page .toolbar-adjuster-top span{
    overflow:hidden;
    text-overflow:ellipsis;
  }
}


@media (max-width:650px){
  body.layered-art-page .workspace-view-tabs .view-tab{
    padding:6px 9px;
    font-size:8px;
  }
}

/* =========================================================
   BOTTOM PREVIEW VIEW SWITCHER
   ========================================================= */
body.layered-art-page .workspace-view-tabs{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  position:relative;
  z-index:6;
}

body.layered-art-page .workspace-view-tabs .view-tab{
  appearance:none;
  border:1px solid rgba(33,24,42,.14);
  border-radius:10px;
  background:#f3f0f5;
  color:#3b3042;
  min-height:34px;
  padding:7px 13px;
  font:inherit;
  font-size:9px;
  font-weight:850;
  line-height:1;
  cursor:pointer;
  transition:.18s ease;
}

body.layered-art-page .workspace-view-tabs .view-tab:hover{
  border-color:rgba(255,90,60,.45);
  background:#fff2ee;
  color:#21182a;
}

body.layered-art-page .workspace-view-tabs .view-tab.active{
  border-color:var(--la-orange);
  background:var(--la-orange);
  color:#fff;
  box-shadow:0 0 0 2px rgba(255,90,60,.10);
}

@media (max-width:650px){
  body.layered-art-page .workspace-bottom-bar{
    flex-basis:50px;
    height:50px;
    padding-right:108px;
  }
  body.layered-art-page .workspace-view-tabs{
    gap:4px;
  }
  body.layered-art-page .workspace-view-tabs .view-tab{
    min-height:32px;
    padding:6px 10px;
    font-size:8px;
  }
}

/* =========================================================
   HEADER ACCOUNT / RANK / NOTIFICATION UI
   Match the main index page behaviour without changing the
   Layered Art Studio workspace styling.
   ========================================================= */
body.layered-art-page .notif-popover{
  position:absolute;
  top:calc(100% + 8px);
  right:52px;
  z-index:1000;
  width:330px;
  max-width:calc(100vw - 24px);
  max-height:430px;
  overflow:auto;
  padding:12px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:16px;
  background:rgba(20,14,29,.98);
  box-shadow:0 18px 45px rgba(0,0,0,.35);
  color:rgba(255,255,255,.94);
}
body.layered-art-page .notif-preview-title{
  font-size:12px;
  font-weight:900;
  margin-bottom:8px;
}
body.layered-art-page .notif-preview-body{
  font-size:11px;
  opacity:.72;
  line-height:1.4;
}
body.layered-art-page .notif-item{
  padding:10px 0;
  border-top:1px solid rgba(255,255,255,.08);
}
body.layered-art-page .notif-item-title{
  font-size:11px;
  font-weight:900;
}
body.layered-art-page .notif-item-date{
  margin-top:2px;
  font-size:9px;
  opacity:.55;
}
body.layered-art-page .notif-item-body{
  margin-top:6px;
  font-size:10px;
  opacity:.88;
  line-height:1.4;
}
body.layered-art-page .notif-preview-footer{
  margin-top:8px;
  padding-top:9px;
  border-top:1px solid rgba(255,255,255,.08);
}
body.layered-art-page .notif-preview-footer a{
  color:var(--la-orange);
  font-size:10px;
  font-weight:850;
  text-decoration:none;
}
body.layered-art-page .notif-preview-footer a:hover{
  text-decoration:underline;
}

@media (max-width:650px){
  body.layered-art-page .notif-popover{
    right:8px;
    width:300px;
  }
}

/* Scene Depth: hide controls that do not apply to semantic depth layers. */
.toolbar-adjuster[hidden]{ display:none !important; }\n\n/* Preview-only binary raster copies are already resized + thresholded in JS. */\nbody.layered-art-page .grid-card img,\nbody.layered-art-page .layer-thumb{\n  image-rendering:auto !important;\n  filter:none !important;\n}\n

/* =========================================================
   SCENE DEPTH DETAIL
   ========================================================= */
body.layered-art-page #depthDetailControls {
  margin-top: 12px;
  padding-top: 2px;
}
body.layered-art-page #depthDetailControls[hidden] { display:none !important; }
body.layered-art-page #depthDetail { border-color:rgba(255,90,60,.24); }
body.layered-art-page #depthDetail:focus { border-color:rgba(255,90,60,.62); }
