/* 幻想繪卷 — studio */
.screen-studio { background: var(--cream); }
.st-top { position: absolute; left: 0; right: 0; top: 0; height: 52px; padding: 4px 70px 4px 6px; display: flex; align-items: center; gap: 4px; z-index: 6;
  background: linear-gradient(#fffaf0, #f3e6cd); border-bottom: 2px solid var(--gold); box-shadow: 0 2px 0 rgba(231,207,150,.6); }
.st-ib { appearance: none; border: 0; cursor: pointer; width: 44px; height: 44px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 40% 30%, #fff, #f5e8cf); box-shadow: 0 0 0 2px var(--gold-soft), 0 2px 5px rgba(60,40,40,.18); color: var(--navy);
  transition: transform .12s cubic-bezier(.3,1.6,.5,1), opacity .15s, box-shadow .15s; pointer-events: auto; }
.st-ib svg { width: 24px; height: 24px; fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.st-ib:active { transform: scale(.88); }
.st-ib.dim { opacity: .35; }
.st-ib.on { box-shadow: 0 0 0 2.5px var(--rose), 0 2px 5px rgba(60,40,40,.18); background: radial-gradient(circle at 40% 30%, #fff, #f9d9df); }
.st-ib.flip svg { transform: scaleX(-1); }
.st-top .btn { margin-left: auto; min-width: 64px; }

.st-area { position: absolute; left: 0; right: 0; pointer-events: none; }
.st-name { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); max-width: 150px; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 800; color: var(--navy);
  background: rgba(255,250,240,.85); box-shadow: 0 0 0 1.5px var(--gold-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-zoom { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.st-ref { position: absolute; left: 8px; top: 8px; width: 100px; padding: 4px; border-radius: 6px; background: #fffaf0; pointer-events: auto; cursor: pointer;
  box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px #fffaf0, 0 4px 10px rgba(40,30,50,.3); transform: rotate(-2deg); transition: transform .25s cubic-bezier(.2,1.5,.4,1), opacity .2s; }
.st-ref img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; background: #eee; }
.st-ref.hide { opacity: 0; transform: scale(.6) rotate(-8deg); pointer-events: none; }
.st-loading { position: absolute; inset: 0; background: var(--cream); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px;
  font-size: 16px; font-weight: 800; color: var(--navy); pointer-events: auto; transition: opacity .3s; }
.st-loading.out { opacity: 0; pointer-events: none; }
.st-spin { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--gold-soft); border-top-color: var(--rose); animation: stSpin .9s linear infinite; }
@keyframes stSpin { to { transform: rotate(360deg); } }

/* dock */
.st-dock { position: absolute; left: 0; right: 0; bottom: 0; height: 176px; z-index: 6; padding-top: 4px; display: flex; flex-direction: column;
  background: linear-gradient(#fffaf0, #f6ebd4); border-top: 2px solid var(--gold); }
.st-dock::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 10px; pointer-events: none;
  background: radial-gradient(circle at 7px 10px, #fffaf0 6px, transparent 6.5px) 0 0 / 14px 10px repeat-x; filter: drop-shadow(0 -1px 0 var(--gold-soft)); }
.st-tools { flex: none; height: 70px; display: flex; gap: 2px; padding: 0 6px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; scrollbar-width: none; align-items: flex-start; }
.st-tools::-webkit-scrollbar { display: none; }
.st-tool { appearance: none; border: 0; background: none; cursor: pointer; flex: none; width: 52px; height: 56px; padding-top: 5px; display: flex; flex-direction: column; align-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 12px; color: var(--navy); position: relative; transition: height .25s cubic-bezier(.3,1.5,.5,1), color .15s; }
.st-tool img { width: 30px; height: 30px; object-fit: contain; }
.st-tool span { margin-top: 1px; max-width: 52px; white-space: nowrap; overflow: hidden; text-overflow: clip; line-height: 14px; }
.st-tool.active { height: 68px; color: #fffaf2; -webkit-text-stroke: 2px rgba(43,53,96,.6); paint-order: stroke fill;
  background: linear-gradient(90deg, rgba(0,0,0,.1), transparent 20%, transparent 80%, rgba(0,0,0,.1)), var(--blue);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 88%, 0 100%); box-shadow: inset 0 0 0 2px rgba(255,236,190,.6); }
.st-tool.active::before { content: ""; position: absolute; inset: 3px 4px 10px; border: 1px dashed rgba(255,236,190,.8); pointer-events: none; }
.st-tool:active { transform: scale(.94); }
.st-row2 { flex: none; height: 52px; display: flex; align-items: center; gap: 6px; padding: 0 8px; }
.st-swatch { appearance: none; flex: none; width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--gold); cursor: pointer; padding: 0;
  box-shadow: 0 0 0 2px #fffaf0, 0 2px 6px rgba(0,0,0,.28), inset 0 0 0 2px rgba(255,255,255,.5); transition: transform .12s cubic-bezier(.3,1.6,.5,1); }
.st-swatch:active { transform: scale(.9); }
.st-sl { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-sl-h { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--navy); line-height: 14px; white-space: nowrap; }
.st-sl-h b { color: var(--rose); font-weight: 900; }
.st-toggle { appearance: none; border: 0; background: none; cursor: pointer; flex: none; width: 58px; height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-family: var(--font-display); font-weight: 800; font-size: 12px; color: var(--navy); }
.st-toggle i { width: 34px; height: 18px; border-radius: 9px; background: #e4d8c0; box-shadow: inset 0 0 0 2px var(--gold-soft); position: relative; transition: background .2s; }
.st-toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e9d9b8); box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: left .2s cubic-bezier(.3,1.6,.5,1); }
.st-toggle.on i { background: var(--rose); }
.st-toggle.on i::after { left: 18px; }
.st-row3 { flex: none; height: 48px; display: flex; align-items: center; padding: 0 6px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; scrollbar-width: none; gap: 0; }
.st-row3::-webkit-scrollbar { display: none; }
.st-row3 > div { display: flex; flex: none; align-items: center; }
.st-sep { width: 2px; height: 28px; background: var(--gold-soft); margin: 0 6px; border-radius: 1px; flex: none; }
.st-chip { appearance: none; border: 0; background: none; cursor: pointer; width: 44px; height: 44px; flex: none; padding: 0; display: flex; align-items: center; justify-content: center; }
.st-chip i { width: 32px; height: 32px; border-radius: 50%; border: 2.5px solid #fffaf0; box-shadow: 0 0 0 1.5px var(--gold), 0 2px 3px rgba(0,0,0,.2); transition: transform .12s cubic-bezier(.3,1.6,.5,1); }
.st-chip:active i { transform: scale(.82); }
.st-chip.sel i { box-shadow: 0 0 0 2.5px var(--rose), 0 2px 3px rgba(0,0,0,.2); transform: scale(1.1); }
.st-chip.none i { background: repeating-linear-gradient(45deg, #fff 0 4px, #e6d7d7 4px 8px); }

/* range */
.st-range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; touch-action: none; cursor: pointer; }
.st-range::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: var(--trk, linear-gradient(#fffaf0, #f1e3c6)); box-shadow: 0 0 0 1.5px var(--gold), inset 0 1px 2px rgba(0,0,0,.15); }
.st-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -7px; border-radius: 50%; border: 2.5px solid var(--gold);
  background: radial-gradient(circle at 35% 30%, #ffe3e8, var(--rose) 60%, #a84a60); box-shadow: 0 2px 3px rgba(0,0,0,.3); }
.st-range::-moz-range-track { height: 10px; border-radius: 5px; background: var(--trk, linear-gradient(#fffaf0, #f1e3c6)); box-shadow: 0 0 0 1.5px var(--gold); }
.st-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--gold); background: radial-gradient(circle at 35% 30%, #ffe3e8, var(--rose) 60%, #a84a60); }

/* colour sheet */
.st-csheet { touch-action: pan-y; }
.st-csheet .panel-inner { display: flex; flex-direction: column; gap: 8px; }
.st-prev { display: flex; align-items: center; gap: 10px; }
.st-prev-big { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--gold); box-shadow: 0 0 0 2px #fffaf0, 0 3px 8px rgba(0,0,0,.25); flex: none; }
.st-hex { font-weight: 900; font-size: 18px; color: var(--navy); letter-spacing: .06em; }
.st-hsv { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 0 8px; font-size: 14px; font-weight: 800; color: var(--navy); }
.st-gt { font-size: 14px; font-weight: 900; color: var(--rose); margin-top: 4px; border-bottom: 1.5px solid var(--gold-soft); }
.st-gl { font-size: 12px; font-weight: 800; color: var(--ink-soft); margin: 2px 0 -2px 4px; }
.st-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.st-c2 { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.st-lock { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: rgba(231,207,150,.3); box-shadow: inset 0 0 0 2px var(--gold-soft); font-size: 14px; font-weight: 700; color: var(--ink); }
.st-lock img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.st-lock > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.st-btns { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.st-prevcv { display: block; max-width: 100%; max-height: 360px; margin: 0 auto; border-radius: 6px; box-shadow: 0 0 0 2px var(--gold), 0 4px 10px rgba(0,0,0,.25); background: #fff; }
.st-refbig { display: block; width: 100%; max-height: 480px; object-fit: contain; border-radius: 6px; }

/* layers sheet */
.st-ov { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.st-ls { position: absolute; right: 0; top: 52px; bottom: 8px; width: 78%; display: flex; flex-direction: column; padding: 8px 10px 10px; pointer-events: auto;
  background: linear-gradient(#fffaf0, #f6ebd4); border-radius: 18px 0 0 18px; box-shadow: 0 0 0 2.5px var(--gold), 0 0 0 5px #fffaf0, -6px 4px 16px rgba(40,30,60,.35);
  transform: translateX(110%); visibility: hidden; transition: transform .24s cubic-bezier(.2,1.25,.4,1), visibility 0s .24s; }
.st-ls.open { transform: none; visibility: visible; transition: transform .24s cubic-bezier(.2,1.25,.4,1), visibility 0s; }
.st-ls-h { display: flex; align-items: center; justify-content: space-between; height: 44px; flex: none; }
.st-ls-h h3 { font-size: 20px; }
.st-line { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px; margin-bottom: 4px; border-radius: 10px; background: rgba(127,147,196,.18); font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.st-line svg { width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 2.2; flex: none; }
.st-list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; touch-action: pan-y; scrollbar-width: none; }
.st-list::-webkit-scrollbar { display: none; }
.st-lr { flex: none; position: relative; display: flex; align-items: center; gap: 8px; height: 74px; padding: 4px 4px 4px 12px; border-radius: 10px; background: rgba(255,255,255,.55); cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--gold-soft); }
.st-lr.active { background: #fbe3e8; box-shadow: inset 0 0 0 2px var(--rose); }
.st-lr.active::before { content: ""; position: absolute; left: 2px; top: -2px; width: 8px; height: 26px; background: var(--rose); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%); }
.st-lr canvas { width: 44px; height: 66px; flex: none; border-radius: 4px; box-shadow: 0 0 0 1.5px var(--gold); background: repeating-conic-gradient(#f3ead8 0 25%, #fff 0 50%) 0 0 / 10px 10px; }
.st-lr-n { flex: 1; min-width: 0; font-size: 14px; font-weight: 800; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-lr .st-ib { width: 44px; height: 44px; }
.st-lr .st-ib.off svg { opacity: .35; }
.st-lc { flex: none; padding-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.st-bchip { appearance: none; border: 0; cursor: pointer; height: 32px; padding: 0 8px; border-radius: 16px; font-family: var(--font-display); font-weight: 800; font-size: 12px; color: var(--navy);
  background: #fffaf0; box-shadow: inset 0 0 0 1.5px var(--gold-soft); transition: transform .12s cubic-bezier(.3,1.6,.5,1); }
.st-bchip.sel { background: var(--rose); color: #fff; box-shadow: inset 0 0 0 1.5px var(--gold); }
.st-bchip:active { transform: scale(.92); }
.st-lbtn { display: flex; gap: 4px; }
.st-lbtn button { flex: 1; min-width: 0; height: 44px; padding: 0 2px; border-radius: 12px; border: 0; cursor: pointer; font-family: var(--font-display); font-weight: 900; font-size: 13px; color: var(--navy);
  background: linear-gradient(#fffaf0, #f1e1c3); box-shadow: 0 0 0 2px var(--gold-soft), 0 2px 0 rgba(120,90,40,.25); transition: transform .12s cubic-bezier(.3,1.6,.5,1); white-space: nowrap; overflow: hidden; }
.st-lbtn button:active { transform: scale(.9); }
.st-lbtn button.danger { color: #a83f55; }
