* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #eef1f6; color: #1f2430;
  display: flex; flex-direction: column;
}
h1 { font-size: 16px; margin: 0; font-weight: 700; }

.top {
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center;
  justify-content: space-between; padding: 12px 18px;
  background: #fff; border-bottom: 1px solid #dfe4ee;
  box-shadow: 0 1px 3px rgba(20, 30, 60, .06);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand em { color: #7c869b; font-style: normal; font-size: 12px; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #07c160; box-shadow: 0 0 0 4px rgba(7, 193, 96, .18);
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
button {
  font: inherit; font-size: 13px; padding: 7px 13px; cursor: pointer;
  border: 1px solid #ccd4e2; background: #fff; color: #25324a;
  border-radius: 8px; transition: .12s;
}
button:hover { border-color: #9fb0cc; background: #f7f9fd; }
button:disabled { opacity: .45; cursor: progress; }
button.primary { background: #1a6bd6; border-color: #1a6bd6; color: #fff; }
button.ok { background: #07c160; border-color: #07c160; color: #fff; }

.status {
  padding: 8px 18px; font-size: 13px; color: #5b6478;
  background: #f6f8fc; border-bottom: 1px solid #e3e8f2;
}
.status.ok { background: #eafaf1; color: #0b7a45; }
.status.err { background: #fdeeee; color: #b32b2b; }
.status.run { background: #fff8e6; color: #8a6100; }

.wrap { flex: 1; display: grid; grid-template-columns: minmax(360px, 520px) 1fr; gap: 14px; padding: 14px; min-height: 0; }
.panel { background: #fff; border: 1px solid #dfe4ee; border-radius: 12px; min-height: 0; }
.left { padding: 14px; overflow: auto; }
.right { display: flex; flex-direction: column; overflow: hidden; }

.lbl { display: block; font-size: 12px; color: #7c869b; margin: 12px 0 5px; }
input[type=text], textarea {
  width: 100%; font: inherit; font-size: 13px; padding: 8px 10px;
  border: 1px solid #d5dce9; border-radius: 8px; background: #fbfcfe;
  color: #1f2430; outline: none;
}
input[type=text]:focus, textarea:focus { border-color: #1a6bd6; background: #fff; }
textarea { resize: vertical; }
#html-src { height: 150px; font-family: Consolas, Menlo, monospace; font-size: 12px; }
#out-code { height: 220px; font-family: Consolas, Menlo, monospace; font-size: 12px; }

.checks { display: grid; gap: 6px; margin-top: 12px; font-size: 13px; color: #3b4557; }
.checks label { display: flex; gap: 8px; align-items: flex-start; color: #3b4557; }
.checks label.sel-line { flex-wrap: wrap; align-items: center; }
.checks select {
  font: inherit; font-size: 12.5px; padding: 5px 8px; border: 1px solid #d5dce9;
  border-radius: 7px; background: #fbfcfe; color: #25324a; max-width: 100%;
}

.meta-card { border: 1px solid #e6ebf4; border-radius: 10px; padding: 10px 12px; background: #fbfcfe; }
.meta-row { padding: 8px 0; border-bottom: 1px dashed #e6ebf4; }
.meta-row:last-child { border-bottom: 0; }
.meta-k { display: block; font-size: 12px; color: #7c869b; margin-bottom: 4px; }
.meta-row textarea { display: block; width: 100%; resize: vertical; font-size: 13px; }
.mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mini button { padding: 5px 10px; font-size: 12px; }
.meta-info { font-size: 13px; color: #3b4557; padding: 6px 9px; background: #f6f8fc; border-radius: 8px; }
.meta-info b { color: #1a6bd6; }
.cover-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 96px; max-height: 190px; overflow: hidden;
  background: #f2f4f8; border: 1px dashed #d5dce9; border-radius: 8px;
}
.cover-wrap img { max-width: 100%; max-height: 190px; display: block; }
.cover-wrap span { font-size: 12px; color: #9aa4b8; }
#cover-url { margin-top: 6px; font-size: 12px; }

.stat { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.stat-row { display: flex; justify-content: space-between; border-bottom: 1px dashed #e6ebf4; padding: 3px 0; font-size: 13px; }
.stat-row span { color: #7c869b; }

.warn { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: #8a6100; }
.code-box { margin-top: 14px; }
.code-box summary { cursor: pointer; font-size: 12px; color: #7c869b; }

.phone-head {
  display: flex; align-items: center; gap: 6px; padding: 9px 14px;
  border-bottom: 1px solid #e6ebf4; font-size: 12px; color: #7c869b;
}
.phone-head i { width: 9px; height: 9px; border-radius: 50%; background: #dfe4ee; }
.phone-head span { margin-left: 8px; }
.phone { flex: 1; overflow: auto; background: #f2f4f8; padding: 18px 10px 60px; }
.preview {
  width: 677px; max-width: 100%; margin: 0 auto; background: #fff;
  padding: 22px 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(20, 30, 60, .08);
  overflow-wrap: break-word;
}
.preview img { max-width: 100%; height: auto; }

#copy-holder {
  position: fixed; left: -99999px; top: 0; width: 677px;
  background: #fff; overflow: hidden;
}

body.busy { cursor: progress; }
