/* 在线制作页样式：沿用官网配色变量（site.css 里已定义），
   因为站点 CSP 是 style-src 'self'，所以样式必须放在外部文件里。 */

.make-main {
  display: grid;
  gap: 18px;
  padding-bottom: 40px;
}

.make-hero {
  background: linear-gradient(135deg, #eaf1ff 0%, #f7faff 55%, #eef7ff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 26px 24px;
}

.make-hero p.make-eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.make-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 34px);
}

.make-hero small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.make-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.make-badge {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
}

.make-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.make-column {
  display: grid;
  gap: 18px;
  align-content: start;
}

@media (max-width: 880px) {
  .make-layout { grid-template-columns: minmax(0, 1fr); }
}

.make-card {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

.make-card > h2 {
  align-items: center;
  display: flex;
  font-size: 18px;
  gap: 8px;
  margin: 0 0 6px;
}

.make-card > h2 span.make-step {
  align-items: center;
  background: var(--brand);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.make-card > p.make-sub {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 18px;
  line-height: 1.7;
}

.make-field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.make-field > label {
  font-size: 13px;
  font-weight: 600;
}

.make-field input[type="text"],
.make-field input[type="password"] {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.make-field input[type="text"]:focus,
.make-field input[type="password"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.make-field textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  min-height: 72px;
  padding: 11px 13px;
  resize: vertical;
  width: 100%;
}

.make-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.make-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.make-icon-row {
  align-items: center;
  display: flex;
  gap: 14px;
}

.make-icon-preview {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed rgba(15, 23, 42, 0.22);
  border-radius: 20px;
  color: var(--muted);
  display: flex;
  flex: 0 0 auto;
  font-size: 11px;
  height: 84px;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  width: 84px;
}

.make-icon-preview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.make-file-button {
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  padding: 10px 14px;
}

.make-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.make-button {
  background: var(--brand);
  border: 0;
  border-radius: var(--radius-md);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 22px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.make-button:hover { background: var(--brand-dark); }
.make-button:active { transform: translateY(1px); }
.make-button[disabled] { cursor: not-allowed; opacity: 0.55; }

.make-button.ghost {
  background: #eef2f7;
  color: var(--ink);
}

.make-button.ghost:hover { background: #e2e8f0; }

.make-button.small {
  font-size: 13px;
  padding: 8px 14px;
}

.make-feedback {
  border-radius: var(--radius-md);
  display: none;
  font-size: 13px;
  line-height: 1.7;
  margin-top: 14px;
  padding: 12px 14px;
}

.make-feedback.show { display: block; }
.make-feedback.ok { background: rgba(15, 159, 110, 0.1); border: 1px solid rgba(15, 159, 110, 0.3); color: #0b6b4a; }
.make-feedback.bad { background: rgba(220, 38, 38, 0.08); border: 1px solid rgba(220, 38, 38, 0.28); color: #a11d1d; }
.make-feedback.info { background: rgba(37, 99, 235, 0.08); border: 1px solid rgba(37, 99, 235, 0.24); color: var(--brand-dark); }

.make-session {
  align-items: center;
  background: rgba(15, 159, 110, 0.09);
  border: 1px solid rgba(15, 159, 110, 0.26);
  border-radius: var(--radius-md);
  display: none;
  font-size: 13px;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 14px;
}

.make-session.show { display: flex; }
.make-session strong { color: #0b6b4a; }

.make-locked {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.make-hidden { display: none !important; }

.make-progress {
  background: #eef2f7;
  border-radius: 999px;
  height: 8px;
  margin: 14px 0 8px;
  overflow: hidden;
}

.make-progress > i {
  background: linear-gradient(90deg, var(--brand), var(--cyan));
  border-radius: 999px;
  display: block;
  height: 100%;
  transition: width 0.4s ease;
  width: 0;
}

.make-task {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 14px;
}

.make-task-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.make-task b { font-size: 15px; }
.make-task .make-mono { color: var(--muted); font-size: 12px; }

.make-pill {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.make-pill.queued { background: #eef2f7; color: #475569; }
.make-pill.building { background: rgba(220, 139, 18, 0.14); color: #9a6206; }
.make-pill.ready { background: rgba(15, 159, 110, 0.14); color: #0b6b4a; }
.make-pill.failed { background: rgba(220, 38, 38, 0.12); color: #a11d1d; }

.make-list {
  display: grid;
  gap: 12px;
}

.make-record {
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: 8px;
  padding: 14px;
}

.make-record-top {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}

.make-record-name { font-size: 15px; font-weight: 700; }
.make-record-meta { color: var(--muted); font-size: 12px; line-height: 1.7; }
.make-record-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.make-empty {
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 13px;
  padding: 22px;
  text-align: center;
}

.make-log {
  background: #0f172a;
  border-radius: var(--radius-md);
  color: #cbd5f5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.6;
  margin-top: 8px;
  max-height: 180px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
}

.make-note {
  background: #fff8ec;
  border: 1px solid rgba(220, 139, 18, 0.28);
  border-radius: var(--radius-md);
  color: #8a5a08;
  font-size: 12.5px;
  line-height: 1.75;
  margin-top: 16px;
  padding: 12px 14px;
}

/* 自定义资源替换 */
.make-res-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.make-res-item {
  align-items: center;
  background: #f6f9ff;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 10px 12px;
}

.make-res-item .make-res-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.make-res-item .make-res-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  word-break: break-all;
}

.make-res-item .make-res-meta {
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.make-res-empty {
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 12px;
  padding: 14px;
  text-align: center;
}

.make-res-item .make-button.small {
  flex: 0 0 auto;
}

/* 应用内容定制 */
.make-check {
  align-items: center;
  background: #f6f9ff;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  font-size: 13.5px;
  gap: 8px;
  padding: 11px 13px;
}

/* 大白话可视化选项：两个大按钮二选一（例如"要不要卡密"） */
.make-choice-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 4px 0 8px;
}

.make-choice {
  background: #ffffff;
  border: 1.5px solid rgba(24, 33, 48, 0.14);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: block;
  font: inherit;
  padding: 13px 14px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.make-choice b {
  color: var(--ink);
  display: block;
  font-size: 15px;
  margin-bottom: 5px;
}

.make-choice span {
  color: var(--muted);
  display: block;
  font-size: 12.5px;
  line-height: 1.55;
}

.make-choice:hover {
  border-color: rgba(37, 99, 235, 0.35);
}

.make-choice.on {
  background: #f2f7ff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.make-choice.on b::after {
  content: " ✓";
  color: var(--brand);
}

/* 几条大白话要点 */
.make-ticks {
  color: var(--muted);
  font-size: 12.8px;
  line-height: 1.75;
  margin: 6px 0 10px;
  padding-left: 18px;
}

.make-ticks li {
  margin-bottom: 2px;
}

.make-ticks code {
  background: rgba(24, 33, 48, 0.06);
  border-radius: 5px;
  padding: 1px 5px;
}

/* 卡密那种要抄下来的一行，给个复制按钮 */
.make-keyline {
  align-items: center;
  background: #f4fbf6;
  border: 1px solid rgba(22, 138, 80, 0.28);
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  padding: 10px 12px;
}

.make-keyline code {
  color: #0b6b4a;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.make-check input {
  accent-color: var(--brand);
  height: 16px;
  width: 16px;
}

.make-price-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.make-price-row input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 15px;
  padding: 11px 12px;
  text-align: center;
  width: 100%;
}

.make-price-row input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

/* 功能开关可视化增删 */
.make-toggles {
  display: grid;
  gap: 8px;
  margin: 8px 0 12px;
}

.make-toggle-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: flex;
  gap: 10px;
  padding: 10px 12px;
}

.make-toggle-row.removed {
  background: #fff5f5;
  border-color: rgba(220, 38, 38, 0.28);
  opacity: 0.75;
}

.make-toggle-info {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.make-toggle-name {
  font-size: 13.5px;
  font-weight: 600;
  word-break: break-all;
}

.make-toggle-key {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  word-break: break-all;
}

.make-toggle-row.removed .make-toggle-name {
  text-decoration: line-through;
}

.make-switch {
  display: inline-block;
  flex: 0 0 auto;
  height: 24px;
  position: relative;
  width: 44px;
}

.make-switch input {
  height: 0;
  opacity: 0;
  width: 0;
}

.make-switch span {
  background: #cbd5e1;
  border-radius: 999px;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: background 0.2s ease;
}

.make-switch span::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 18px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 0.2s ease;
  width: 18px;
}

.make-switch input:checked + span {
  background: var(--brand);
}

.make-switch input:checked + span::after {
  transform: translateX(20px);
}

.make-toggle-empty {
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 12.5px;
  padding: 12px;
  text-align: center;
}

.make-toggle-add {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
}

@media (max-width: 720px) {
  .make-toggle-add { grid-template-columns: minmax(0, 1fr); }
}

/* 小白友好：单列简洁布局 + 折叠的高级设置 */
.make-simple {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 860px;
}

.make-button.big {
  font-size: 17px;
  padding: 15px 26px;
  width: 100%;
}

.make-advanced {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 4px 18px;
}

.make-advanced > summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 4px;
}

.make-advanced-body {
  display: grid;
  gap: 16px;
  padding: 4px 0 16px;
}

.make-advanced-body .make-card {
  box-shadow: none;
}

.make-toggle-new {
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  margin-top: 8px;
  padding: 10px 12px;
}

.make-toggle-new > summary {
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
}

.make-toggle-new .make-toggle-add {
  margin-top: 10px;
}

.make-toggle-add input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  padding: 10px 12px;
  width: 100%;
}

.make-toggle-add input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}
