/* 创作台：左侧创作类型导航 → 中间「参数」白色面板 → 右侧「结果」瓷白舞台；配色只用 base.css 的变量 */
.studio {
  display: grid;
  height: 100vh;
  margin-left: var(--rail-width);
  padding-top: var(--header-height);
  overflow: hidden;
  grid-template-columns: 208px minmax(0, 1fr);
}

/* ---------- 左侧创作类型导航 ---------- */
.studio-side {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 10px;
  padding: 16px 12px 14px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--surface-sunken);
}

.side-nav {
  display: grid;
  gap: 6px;
}

/* 四个入口：带色图标块 + 名称 + 模型数；选中态白底投影 + 左侧蓝条 */
.side-nav button {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 9px 10px 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted-strong);
  background: none;
  text-align: left;
  transition:
    background 0.12s,
    box-shadow 0.12s;
}

.side-nav button svg {
  width: 34px;
  height: 34px;
  flex: none;
  padding: 8px;
  border-radius: 10px;
  color: hsl(var(--mode-hue, 224) 55% 42%);
  background: hsl(var(--mode-hue, 224) 60% 95%);
}

.side-nav button[data-mode="image"] {
  --mode-hue: 224;
}

.side-nav button[data-mode="video"] {
  --mode-hue: 22;
}

.side-nav button[data-mode="avatar"] {
  --mode-hue: 268;
}

.side-nav button[data-mode="voice"] {
  --mode-hue: 156;
}

.side-nav-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.side-nav-text strong {
  color: var(--text);
  font-size: 13.5px;
  letter-spacing: -0.01em;
}

.side-nav-text small {
  color: var(--muted);
  font-size: 11px;
}

.side-nav button em {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 1px 5px;
  border-radius: 999px;
  color: white;
  background: var(--danger);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.side-nav button:hover {
  background: var(--surface-hover);
}

.side-nav button[aria-selected="true"] {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: 0 6px 16px rgba(27, 29, 34, 0.08);
}

.side-nav button[aria-selected="true"]::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: -1px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  content: "";
}

.side-nav button[aria-selected="true"] svg {
  color: white;
  background: hsl(var(--mode-hue, 224) 55% 42%);
}

.side-nav button[aria-selected="true"] strong {
  color: var(--accent-text);
}

.side-foot {
  display: grid;
  gap: 2px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.side-foot a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted-strong);
  font-size: 12.5px;
  font-weight: 600;
}

.side-foot a:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.side-foot output {
  padding: 0 6px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-sunken);
  font-size: 11px;
}

/* 中间面板标题：标题一行、说明一行，不再和按钮挤 */
.compose-head {
  display: grid;
  gap: 3px;
  padding: 0 2px;
}

.compose-head h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.compose-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.link-action {
  padding: 0;
  border: 0;
  color: var(--accent-text);
  background: none;
  font-size: 11.5px;
  font-weight: 600;
}

.link-action:hover {
  text-decoration: underline;
}

.ghost-action {
  display: inline-flex;
  min-height: 30px;
  flex: none;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted-strong);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.ghost-action:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface-hover);
}

/* 生成方式：等宽分段页签，列数由 create.js 按数量写进 --tab-cols（≤4 个一行，5–6 个三列两行，更多四列） */
.segment-tabs {
  display: grid;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-sunken);
  grid-template-columns: repeat(var(--tab-cols, 3), minmax(0, 1fr));
}

.segment-tabs button {
  min-width: 0;
  min-height: 34px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  color: var(--muted-strong);
  background: none;
  font-size: 12.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segment-tabs button:hover {
  color: var(--text);
  background: var(--surface);
}

.segment-tabs button[aria-selected="true"] {
  color: white;
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(31, 58, 138, 0.25);
}

/* ---------- 两栏：参数栏给足宽度，卡片名称与价格不再挤在一起 ---------- */
.workbench {
  display: grid;
  min-height: 0;
  grid-template-columns: 416px minmax(0, 1fr);
}

.compose {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 20px;
  padding: 20px 22px 0 24px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.compose > * {
  min-width: 0;
  flex: none;
}


/* ---------- 字段 ---------- */
.field {
  display: grid;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  gap: 8px;
}

.field-head {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 0;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
}

.field-head label {
  cursor: pointer;
}

.field-head em {
  margin-left: 3px;
  color: var(--danger);
  font-style: normal;
}

.field-head em[data-optional] {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.field-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.field-tools button,
.field-tools a {
  padding: 0;
  border: 0;
  color: var(--accent-text);
  background: none;
  font-size: 11.5px;
  font-weight: 600;
}

.field-tools button:hover,
.field-tools a:hover {
  text-decoration: underline;
}

.field-readout {
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
