* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", sans-serif;
  background: #eef2f7;
  color: #222;
}
.wrap { max-width: 960px; margin: 24px auto; padding: 0 16px; text-align: center; }
.title { margin-bottom: 8px; }
.hint { color: #666; font-size: 14px; margin-bottom: 12px; }
.paste-section { margin-bottom: 8px; }
textarea {
  width: 100%;
  max-width: 720px;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}
textarea::placeholder {
  color: #888;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.btns { margin: 12px 0; flex-wrap: wrap; display: flex; justify-content: center; gap: 8px; }
.btns button,
.toolbar button {
  padding: 8px 16px;
  border: 0;
  border-radius: 4px;
  background: #2471a3;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}
.btns button:disabled,
.toolbar button:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: #1a6b3c; }
.btn-tool { background: #5d6d7e; font-size: 13px; padding: 7px 12px; }
.msg { min-height: 24px; color: #c0392b; font-size: 14px; }
.result-section { margin-top: 16px; }
.result-section.hidden { display: none; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border-radius: 8px;
  overflow: hidden;
}
th, td {
  border: 1px solid #ddd;
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}
th { background: #dfe6ee; }
.col-seq { width: 52px; }
.col-code,
.col-mail,
.code-cell,
.mail-cell {
  width: 120px;
  max-width: 120px;
}
tr.row-ok { background: #fff; }
tr.row-error { background: #fdecea; color: #922b21; }
tr.row-wait { background: #fef9e7; }
tr.row-pending { background: #fafafa; }
.seq-cell { color: #666; }
.code-cell { cursor: pointer; user-select: none; }
.code-cell.has-code { color: #1a5276; font-weight: 600; }
.code-cell.has-code:hover { background: #eaf2f8; }
.code-waiting {
  color: #2471a3;
  font-style: normal;
  animation: pulseWait 1.4s ease-in-out infinite;
}
.code-waiting .dots {
  display: inline-block;
  width: 1.2em;
  text-align: left;
}
@keyframes pulseWait {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.code-waiting .dots::after {
  content: "...";
  animation: dotCycle 1.5s steps(4, end) infinite;
}
@keyframes dotCycle {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}
.code-pending { color: #888; }
.mail-cell {
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.2s;
}
.toast.hidden { display: block !important; opacity: 0; }
.hidden { display: none !important; }
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 18px;
}
.tab-btn {
  padding: 8px 16px;
  border: 1px solid #2471a3;
  background: #fff;
  color: #2471a3;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}
.tab-btn.active {
  background: #2471a3;
  color: #fff;
}
.tab-panel.hidden { display: none; }
.card-box {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin: 0 auto 16px;
  max-width: 720px;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.sub { font-size: 16px; margin: 0 0 10px; }
.shop-notice { color: #555; font-size: 14px; line-height: 1.6; margin: 0 auto 12px; max-width: 720px; text-align: left; }
.domain-list { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 14px; }
.domain-item { font-size: 14px; }
.buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 8px 0; }
.price-line { font-weight: 600; color: #1a6b3c; }
.mem-label, .card-box label { display: block; margin: 8px 0; font-size: 14px; }
.mem-label input, .card-box input[type="text"], .card-box input[type="number"],
#qOrderNo, #qMemory, #memoryCode, #buyQty {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-left: 8px;
  font-size: 14px;
}
.pay-qrs { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin: 12px 0; }
.pay-col { flex: 1; min-width: 220px; text-align: center; }
.qr { width: 200px; height: 200px; object-fit: contain; border: 1px solid #eee; background: #fafafa; }
.kefu-qr { width: 240px; height: 240px; }
.btn-tiny { padding: 2px 8px; font-size: 12px; border: 0; border-radius: 4px; background: #5d6d7e; color: #fff; cursor: pointer; }
.order-card { border: 1px solid #eee; border-radius: 6px; padding: 10px; margin: 8px 0; }
.order-card table { margin-top: 8px; }
#tab-buy .btn-primary, #tab-query .btn-primary { margin-top: 8px; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal.hidden { display: none; }
.modal-box {
  background: #fff; width: min(640px, 92vw); max-height: 80vh; overflow: auto;
  padding: 20px; border-radius: 8px; text-align: left; position: relative;
}
.modal-close { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 24px; cursor: pointer; }
#modalBody { white-space: pre-wrap; word-break: break-word; }
