.style-page .header-inner {
  max-width: 1100px;
}

.style-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.style-bar {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px 10px;
}

.style-bar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  min-height: 22px;
}

.style-bar-head .nav-label {
  margin: 0;
  padding: 0;
}

.picked {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.style-expand {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.style-expand:hover {
  background: #d5ebe3;
}

.style-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* 默认压成约两行高度，一眼扫过 + 不抢输入区 */
.style-list.is-compact {
  max-height: 64px;
  overflow: hidden;
}

.style-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.style-chip:hover {
  border-color: rgba(15, 110, 86, 0.4);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.style-chip.is-on {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.style-chip .n {
  font-variant-numeric: tabular-nums;
  opacity: 0.55;
  font-size: 0.66rem;
}

.style-chip.is-on .n {
  opacity: 0.85;
  color: #fff;
}

.style-main {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  box-shadow: var(--shadow);
}

.field-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.style-main textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
}

.style-main textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
}

.preview-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
}

.meta-line {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.style-main .prompt-box {
  margin: 0;
  max-height: min(36vh, 280px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px 14px;
  border-radius: 12px;
  background: #152028;
  color: #d7e6df;
  font-size: 0.8rem;
  line-height: 1.5;
  border: 1px solid #243540;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 80;
  box-shadow: var(--shadow);
}

.toast[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .style-layout {
    padding: 10px 14px 28px;
  }

  .style-list.is-compact {
    max-height: 56px;
  }

  .style-main textarea {
    min-height: 96px;
  }
}
