/* ==========================================================================
   studio.css — 灯球工坊（魔方 + DIY 二合一）
   --------------------------------------------------------------------------
   本质是一个游戏 HUD 式的底部道具栏：进去（PRESS START）之后，既能转灯球，
   也能改灯球的样子。视觉语言跟 v1b 一致 —— 斜切块、硬投影、Anton 显示体、
   零模糊。字体压到 11~12px，因为这一栏要在 1440 宽里塞下不少控件。
   ========================================================================== */

.studio {
  position: absolute; z-index: 6;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  display: none;                       /* 只有进了魔方才出现 */
  flex-direction: column;              /* 上排=怎么玩，下排=怎么看 */
  gap: 8px;
  width: min(1370px, calc(100vw - 32px));
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(19, 24, 41, .94), rgba(11, 14, 26, .96));
  border: 2px solid var(--line-2);
  /* 斜切：跟菜单块同一套语言 */
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, .55));
  font-family: var(--f-display);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--paper);
  opacity: 0;
  transition: opacity .4s var(--ease) .25s;
}
body.cube-mode .studio { display: flex; opacity: 1; }

/* 每一排都是一个横条，内容再宽也不会挤出屏幕（必要时自己折行） */
.studio__row {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- 品牌角标 --------------------------------------------------------- */
.studio__brand {
  display: flex; flex-direction: column; gap: 1px;
  padding-right: 14px;
  border-right: 2px solid var(--line);
  line-height: 1.15;
}
.studio__brand span {
  font-size: 9px; letter-spacing: .3em;
  color: var(--dim-2); text-transform: uppercase;
}
.studio__brand b { font-weight: 400; font-size: 14px; color: var(--holo-c); }

/* --- 分组 ------------------------------------------------------------- */
.studio__grp {
  display: flex; align-items: center; gap: 5px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}
.studio__grp:last-child { border-right: 0; padding-right: 0; }
.studio__grp > em {
  font-style: normal; font-size: 9px;
  letter-spacing: .18em; color: var(--dim-2);
  text-transform: uppercase;
  white-space: nowrap;               /* 不加这句标签会被压成竖排单字 */
  flex: none;
  margin-right: 2px;
}

/* --- 斜切小按钮（跟菜单块同族） --------------------------------------- */
.stu-chip {
  font-family: inherit; font-size: 11.5px; letter-spacing: .09em;
  white-space: nowrap;                 /* 空间紧张时也不许折行（宁可整体换行） */
  flex: none;
  color: var(--paper);
  background: rgba(124, 77, 255, .16);
  border: 0;
  padding: 7px 9px;
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transition: background .16s var(--ease-snap), color .16s var(--ease-snap),
              filter .16s var(--ease-snap);
}
.stu-chip:hover { background: rgba(0, 229, 255, .24); color: var(--holo-c); }
.stu-chip.is-on {
  background: var(--holo-c); color: var(--ink);
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .5));
}
.stu-chip[disabled] { opacity: .34; cursor: not-allowed; }
/* 自转是一个"开关"而不是"模式"：开着的时候给它一个持续的呼吸感 */
#stuSpin.is-on { animation: spinPulse 1.6s ease-in-out infinite; }
@keyframes spinPulse { 50% { filter: drop-shadow(0 0 8px rgba(0, 229, 255, .8)); } }

/* --- 色板 / 预设的横排容器 ------------------------------------------- */
.studio__sw { display: flex; align-items: center; gap: 4px; }

/* --- 色板 ------------------------------------------------------------- */
.stu-sw {
  width: 17px; height: 17px;
  padding: 0; border: 0;
  cursor: pointer;
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
  outline: 2px solid transparent; outline-offset: 1px;
  transition: transform .14s var(--ease-bounce), outline-color .14s;
}
.stu-sw:hover { transform: translateY(-3px); }
.stu-sw.is-on {
  outline-color: var(--paper);
  transform: translateY(-3px) scale(1.06);
}

/* --- 层数滑块 --------------------------------------------------------- */
.stu-range {
  -webkit-appearance: none; appearance: none;
  width: 72px; height: 4px;
  background: var(--line-2);
  cursor: pointer;
}
.stu-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 16px;
  background: var(--holo-g);
  border: 0;
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}
.stu-out {
  font-size: 12px; color: var(--holo-g);
  min-width: 16px; text-align: center;
}

/* --- 贴图上传：把 input 藏起来，用 label 当按钮 ------------------------ */
.stu-file { position: relative; overflow: hidden; display: inline-block; }
.stu-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* --- 展开图缩略（当前没启用，留着备用） -------------------------------- */
.stu-map {
  width: 96px; height: 48px;
  image-rendering: pixelated;
  border: 1px solid var(--line);
  background: #05060b;
}

/* --- 提示条：贴在面板正上方 -------------------------------------------
   用 bottom: 100% 挂在自己父元素上，这样面板换个高度提示也不会盖住它。
   之前写死 bottom: 92px，面板一长就把提示压在底下了。 */
.studio__hint {
  position: absolute; z-index: 6;
  left: 50%; bottom: calc(var(--stu-h, 150px) + 30px); transform: translateX(-50%);
  font-family: var(--f-display); font-size: 11.5px;
  letter-spacing: .22em; color: var(--dim);
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease) .3s;
}
body.cube-mode .studio__hint { opacity: 1; }

/* 窄屏：让控件折行，别横向挤爆 */
@media (max-width: 1240px) {
  .studio { bottom: 10px; gap: 6px; width: calc(100vw - 24px); }
  .studio__brand { border-right: 0; }
  .studio__hint { bottom: calc(var(--stu-h, 220px) + 30px); }
}
