body {
  margin: 0;
  background: #f0f2f5;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #333;
}
#base {
  position: relative;
  min-height: 100vh;
  padding: 24px 32px 88px;
  max-width: 1440px;
  margin: 0 auto;
}
body.page-form-narrow #base {
  max-width: 920px;
  padding: 20px 20px 88px;
}
body.page-form-narrow .page-title {
  text-align: center;
  margin-bottom: 16px;
}
body.page-form-narrow .page-sub {
  text-align: center;
}
body.page-form-narrow .back-link {
  display: block;
  text-align: center;
  margin-bottom: 10px;
}

/* Element 风格日期时间选择 */
.dtr-field { position: relative; max-width: 560px; z-index: 1; }
.dtr-field:has(.dtr-trigger.open) { z-index: 70; }
.dtr-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 34px; width: 100%; max-width: 560px;
  padding: 4px 12px; box-sizing: border-box;
  border: 1px solid #d1d5db; border-radius: 6px; background: #fff;
  cursor: pointer; color: #9ca3af; font-size: 13px; flex-wrap: wrap;
}
.dtr-trigger:hover, .dtr-trigger.open { border-color: #1677ff; }
.dtr-trigger .dtr-ico { flex-shrink: 0; opacity: 0.55; }
.dtr-trigger .dtr-sep { color: #bfbfbf; }
.dtr-trigger .dtr-val { color: #111827; }
.dtr-trigger .dtr-ph { color: #bfbfbf; }
.dtr-panel {
  display: none; position: fixed !important; left: 0; top: 0;
  z-index: 99999 !important; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  overflow: visible;
}
.dtr-panel.show { display: flex; }
.dtr-panel.range { width: min(720px, calc(100vw - 48px)); }
.dtr-panel.single { width: min(340px, calc(100vw - 48px)); }
.dtr-side {
  width: 112px; flex-shrink: 0;
  border-right: 1px solid #f0f0f0;
  padding: 8px 0; background: #fafafa;
}
.dtr-side button {
  display: block; width: 100%; text-align: left;
  border: none; background: transparent; cursor: pointer;
  padding: 8px 14px; font-size: 13px; color: #374151;
}
.dtr-side button:hover { color: #1677ff; background: #f0f7ff; }
.dtr-side button.on { color: #1677ff; font-weight: 700; background: #e6f4ff; }
.dtr-main { flex: 1; min-width: 0; padding: 12px; }
.dtr-inputs {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px;
  align-items: center; margin-bottom: 10px;
}
.dtr-panel.single .dtr-inputs { grid-template-columns: 1fr; }
.dtr-inputs .pair { display: flex; gap: 6px; min-width: 0; }
.dtr-inputs input {
  height: 28px; width: 100%; max-width: none; padding: 0 8px;
  border: 1px solid #d9d9d9; border-radius: 4px; font-size: 12px;
  box-sizing: border-box;
}
.dtr-inputs .chev { color: #9ca3af; font-size: 14px; }
.dtr-cals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dtr-panel.single .dtr-cals { grid-template-columns: 1fr; }
.dtr-cal-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; font-weight: 600; font-size: 13px; color: #111827;
}
.dtr-cal-hd .nav { display: flex; gap: 2px; min-width: 52px; }
.dtr-cal-hd .nav.right { justify-content: flex-end; }
.dtr-cal-hd button {
  border: none; background: transparent; cursor: pointer;
  color: #6b7280; padding: 2px 6px; border-radius: 4px; font-size: 14px;
}
.dtr-cal-hd button:hover { background: #f5f5f5; color: #111; }
.dtr-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
  text-align: center; font-size: 12px;
}
.dtr-grid .dow { color: #9ca3af; padding: 4px 0; }
.dtr-grid .day {
  height: 28px; line-height: 28px; border-radius: 4px; cursor: pointer;
  color: #111827;
}
.dtr-grid .day:hover { background: #e6f4ff; }
.dtr-grid .day.other { color: #d1d5db; }
.dtr-grid .day.selected { background: #1677ff; color: #fff; }
.dtr-grid .day.in-range { background: #e6f4ff; color: #1677ff; }
.dtr-ft {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0f0f0;
}
.dtr-ft .btn-text {
  border: none; background: none; color: #1677ff;
  cursor: pointer; padding: 0 10px; font-size: 13px;
}
.dtr-ft .btn-ok {
  height: 28px; padding: 0 14px; border-radius: 4px;
  border: 1px solid #1677ff; background: #fff;
  color: #1677ff; font-size: 13px; cursor: pointer;
}
.dtr-ft .btn-ok:hover { background: #e6f4ff; }

.page-title { font-size: 20px; font-weight: 600; margin-bottom: 20px; }
.page-sub { font-size: 13px; color: #888; margin: -12px 0 20px; }
.back-link {
  display: inline-block; margin-bottom: 12px; color: #1890ff;
  text-decoration: none; font-size: 14px;
}
.back-link:hover { text-decoration: underline; }

.page-block {
  background: #fff; border: 1px solid #e8e8e8; border-radius: 6px;
  padding: 24px 28px 28px; margin-bottom: 20px;
}
.block-head {
  font-size: 16px; font-weight: 600; color: #333; margin: 0 0 20px;
  padding-bottom: 12px; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; gap: 8px;
}
.block-head .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: #1890ff; color: #fff;
  font-size: 12px; font-weight: 600;
}
.block-head .req { color: #d9001b; margin: 0 2px; font-weight: 700; }

.section-title {
  font-size: 14px; font-weight: 600; color: #d9001b; margin: 20px 0 14px;
  padding-left: 8px; border-left: 3px solid #d9001b;
}
.section-title:first-of-type { margin-top: 0; }

.form-row {
  display: flex; align-items: flex-start; margin-bottom: 18px; min-height: 36px;
}
.form-label {
  width: 148px; flex-shrink: 0; text-align: right; padding-right: 16px;
  font-size: 14px; line-height: 36px; color: #333;
}
.form-label.top { line-height: 1.5; padding-top: 8px; }
.form-label .req { color: #d9001b; }
.form-body { flex: 1; min-width: 0; }
.form-body .inline-text { line-height: 36px; font-size: 14px; }

.upload-box {
  width: 120px; height: 80px; border: 1px dashed #d9d9d9; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: #fafafa; color: #999; font-size: 12px; cursor: pointer;
  flex-direction: column; gap: 4px;
}
.upload-box:hover { border-color: #1890ff; color: #1890ff; }
.upload-box.has-file {
  border-style: solid; border-color: #91d5ff; background: #e6f7ff; color: #1890ff;
}
.upload-hint { font-size: 12px; color: #999; margin-top: 6px; line-height: 1.6; }
.validity-inline {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.validity-inline .input-text.medium { margin: 0; flex: 0 0 auto; }
.upload-hint.inline {
  margin: 0; flex: 1; min-width: 220px; line-height: 1.45; color: #8c8c8c;
}

.dual-upload { display: flex; gap: 24px; flex-wrap: wrap; }
.upload-cell { flex: 0 0 auto; }
.upload-tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 3px; margin-bottom: 8px;
}
.upload-tag.h5 { background: #e6f7ff; color: #096dd9; border: 1px solid #91d5ff; }
.upload-tag.pc { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }

.block-head .tag-pub {
  display: inline-block; margin-left: 8px;
  padding: 1px 8px; border-radius: 3px;
  background: #e6f7ff; color: #096dd9; border: 1px solid #91d5ff;
  font-size: 12px; font-weight: 600; vertical-align: middle;
}
.asset-upload-box {
  border: 1px dashed #cbd5e1; border-radius: 8px;
  padding: 16px 18px; background: #f8fafc;
  width: 100%; max-width: 640px;
}
.asset-upload-box .pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.asset-slot .tip {
  margin-top: 8px; font-size: 12px; color: #999;
  line-height: 1.5; text-align: center;
}
.ph {
  height: 88px; border-radius: 8px; background: #e5e7eb;
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af; font-size: 12px; font-weight: 600;
  position: relative; overflow: hidden; cursor: pointer;
}
.ph:hover { background: #e2e8f0; color: #1890ff; }
.ph input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.ph img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.ph.has-img .ph-txt { display: none; }
.slot-port {
  font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 6px;
}
.ph .ph-status {
  display: none;
  position: absolute; right: 6px; bottom: 4px; z-index: 2;
  padding: 1px 6px; border-radius: 3px;
  background: rgba(16, 24, 40, .62); color: #fff; font-size: 11px;
  pointer-events: none;
}
.ph.has-img .ph-status { display: inline-block; }
.asset-slot.can-del { position: relative; }
.slot-del {
  display: none;
  margin: 6px auto 0;
  border: 0; background: none;
  color: #ff4d4f; font-size: 12px; cursor: pointer;
}
.asset-slot.can-del.has-file .slot-del { display: block; text-align: center; width: 100%; }

.block-head.block-head--flex {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.block-head-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.block-head .tag-muted {
  display: inline-block; margin-left: 8px;
  font-size: 12px; font-weight: 500; color: #999; vertical-align: middle;
}
.prd-chip {
  height: 28px; padding: 0 12px; border-radius: 4px; cursor: pointer;
  border: 1px solid #91caff; background: #e6f7ff; color: #1890ff;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.prd-chip:hover { border-color: #1890ff; }

.admin-prd-panel {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 68px;
  width: min(420px, 34vw);
  z-index: 40;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .18);
  overflow: hidden;
  flex-direction: column;
}
.admin-prd-panel.show {
  display: flex;
}
.admin-prd-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: #e6f7ff;
  color: #1890ff;
  border-bottom: 1px solid #91caff;
  flex-shrink: 0;
}
.admin-prd-tag {
  font-size: 11px;
  font-weight: 700;
  color: #1890ff;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.admin-prd-hd #prdModalTitle {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  color: #1890ff;
}
.admin-prd-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #1890ff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.admin-prd-close:hover { color: #096dd9; }
.admin-prd-bd {
  overflow: auto;
  padding: 14px 16px 20px;
  font-size: 13px;
  line-height: 1.65;
  color: #1f2937;
  background: #f8fafc;
}
.prd-doc-bd .prd-block {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.prd-doc-bd .prd-block:last-child { margin-bottom: 0; }
.prd-doc-bd h4 { margin: 0 0 8px; font-size: 14px; }
.prd-doc-bd .sub { font-weight: 700; margin: 10px 0 6px; color: #111827; }
.prd-doc-bd .blue { color: #1677ff; font-weight: 700; }
.prd-doc-bd p { margin: 0 0 8px; }
.prd-doc-bd ul { margin: 0 0 8px; padding-left: 1.2em; }
.prd-doc-bd li { margin: 3px 0; }
.prd-doc-bd .imp { color: #cf1322; font-weight: 800; }
.prd-doc-bd .prd-table {
  width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0;
  background: rgba(255,255,255,.8);
}
.prd-doc-bd .prd-table th,
.prd-doc-bd .prd-table td {
  border: 1px solid #d1d5db; padding: 6px 8px; text-align: left; vertical-align: top;
}
.prd-doc-bd .prd-table th { background: #f8fafc; font-weight: 700; }
.prd-doc-bd .note {
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 6px;
  padding: 8px 10px; margin: 8px 0; color: #9a3412;
}
@media (max-width: 1180px) {
  .admin-prd-panel { width: min(380px, calc(100vw - 32px)); }
}
.btn-link {
  border: 0; background: none; color: #1890ff; cursor: pointer; font-size: 13px; padding: 0 4px;
}
.btn-link.danger { color: #ff4d4f; }
.btn-link:hover { text-decoration: underline; }
.type-pill {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  background: #f0f5ff; color: #2f54eb; font-size: 12px; margin-right: 4px;
}
.img-block-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.btn-insert {
  height: 32px; padding: 0 14px; border-radius: 4px; cursor: pointer;
  border: 1px solid #91caff; background: #e6f7ff; color: #1890ff; font-size: 13px;
}
.btn-insert:hover { border-color: #1890ff; }
.img-block-note { font-size: 12px; color: #ff4d4f; font-weight: 600; }
.img-block-table .empty-row td {
  text-align: center; color: #999; padding: 36px 12px; background: #fafafa;
}
.img-block-table .thumb,
.img-block-table .thumb-ph {
  width: 48px; height: 36px; border-radius: 4px; object-fit: cover;
  background: #f0f0f0; display: inline-block; vertical-align: middle;
}
.img-block-table .thumb-ph {
  color: #bbb; font-size: 12px; line-height: 36px; text-align: center;
}
.img-block-table .cell-upload {
  position: relative; width: 56px; height: 40px; border-radius: 4px;
  background: #f3f4f6; overflow: hidden; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: #9ca3af; font-size: 11px; font-weight: 600;
}
.img-block-table .cell-upload:hover { color: #1890ff; background: #e8f3ff; }
.img-block-table .cell-upload input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.img-block-table .cell-upload img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.img-block-table .cell-upload.has-img span { display: none; }
.img-block-table .input-text.tiny-sort { max-width: 56px; text-align: center; }
.type-pill.img { background: #fff7e6; color: #d46b08; }

.admin-modal-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, 0.45);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.admin-modal-mask.show { display: flex; }
.admin-modal {
  width: min(480px, 100%);
  background: #fff; border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
  overflow: hidden;
}
.admin-modal .am-hd {
  position: relative; text-align: center;
  padding: 16px 44px 12px; font-size: 16px; font-weight: 800;
  border-bottom: 1px solid #e8e8e8;
}
.admin-modal .am-close {
  position: absolute; right: 12px; top: 10px;
  width: 32px; height: 32px; border: none; background: transparent;
  font-size: 22px; cursor: pointer; color: #6b7280; line-height: 1;
}
.admin-modal .am-bd { padding: 18px 22px 8px; }
.admin-modal .am-ft {
  display: flex; justify-content: center; gap: 12px;
  padding: 8px 22px 20px;
}
.am-row { margin-bottom: 14px; }
.am-row > .am-label { font-weight: 700; margin-bottom: 8px; color: #374151; }
.am-row .req { color: #ff4d4f; }
.am-radios { display: flex; gap: 20px; align-items: center; }
.am-radios label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; }
.am-field input[type="text"],
.am-field textarea {
  width: 100%; max-width: none;
  border: 1px solid #d9d9d9; border-radius: 4px; padding: 0 12px; font-size: 14px;
  box-sizing: border-box; font-family: inherit;
}
.am-field input[type="text"] { height: 36px; }
.am-field textarea {
  min-height: 88px; padding: 8px 12px; resize: vertical; line-height: 1.5;
}
.am-field input[type="text"]:focus,
.am-field textarea:focus { border-color: #1890ff; outline: none; }
.am-type-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.am-type-row > .am-label { margin-bottom: 0; }
.admin-modal.block-modal { width: min(520px, 100%); }
.admin-modal.winner-modal { width: min(560px, 100%); }
.admin-modal.winner-modal .am-hd { text-align: left; padding-left: 20px; }
.admin-modal.winner-modal .am-ft { justify-content: flex-end; }
.winner-modal-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.winner-modal-grid .am-row { margin-bottom: 0; }
.winner-note {
  background: #f5f5f5; border-radius: 6px; padding: 10px 14px;
  font-size: 13px; color: #595959; line-height: 1.7; margin: 0 0 16px;
}
.winner-cfg-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin-bottom: 16px;
}
.btn-status {
  display: inline-block; min-width: 64px; height: 28px; padding: 0 12px;
  border: 1px solid #b7eb8f; border-radius: 4px; background: #f6ffed;
  color: #52c41a; font-size: 13px; font-weight: 600; cursor: pointer;
}
.btn-status.off {
  border-color: #d9d9d9; background: #f5f5f5; color: #8c8c8c;
}
.am-err { color: #ff4d4f; font-size: 12px; margin-top: 6px; display: none; }
.am-err.show { display: block; }
.am-hint { font-size: 12px; color: #999; margin-top: 4px; line-height: 1.6; }
.am-upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.am-upload-slot .slot-label { font-weight: 700; margin-bottom: 8px; font-size: 13px; }
.am-asset-upload { max-width: none; margin-top: 4px; }
.am-plus {
  width: 96px; height: 96px; border: 1px dashed #cbd5e1; border-radius: 8px;
  background: #fafafa; display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: #9ca3af; cursor: pointer; position: relative; overflow: hidden;
}
.am-plus:hover { border-color: #1890ff; color: #1890ff; }
.am-plus input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.am-plus img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.am-plus.has-img .plus-ico { display: none; }
.img-block-table .table-upload-slot {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.img-block-table .ph.table-ph {
  width: 112px; height: 72px; margin: 0 auto;
}
.img-block-table .table-upload-tip {
  font-size: 11px; color: #999; line-height: 1.4; text-align: center;
}

/* 获取抽奖机会 */
.chance-cfg-note {
  background: #e6f7ff; border: 1px solid #91d5ff; border-radius: 6px;
  padding: 10px 14px; font-size: 13px; color: #0958d9; margin-bottom: 16px; line-height: 1.6;
}
.chance-toggle-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px;
}
.chance-toggle-card {
  border: 1px solid #e8e8e8; border-radius: 8px; background: #fff;
  padding: 14px 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.chance-toggle-card h4 { margin: 0 0 6px; font-size: 14px; color: #1f1f1f; }
.chance-toggle-card p { margin: 0; font-size: 12px; color: #8c8c8c; line-height: 1.5; }
.switch {
  position: relative; width: 44px; height: 22px; border-radius: 11px;
  background: #d9d9d9; cursor: pointer; flex-shrink: 0; transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s;
}
.switch.on { background: #1890ff; }
.switch.on::after { left: 24px; }
.chance-tabs {
  display: flex; gap: 0; border-bottom: 1px solid #e8e8e8; margin-bottom: 14px;
}
.chance-tabs[hidden] { display: none; }
.chance-tab {
  appearance: none; border: 0; background: none; padding: 10px 18px; cursor: pointer;
  font-size: 14px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.chance-tab[hidden] { display: none; }
.chance-tab.is-active { color: #1890ff; font-weight: 600; border-bottom-color: #1890ff; }
.chance-tabs-empty { font-size: 13px; color: #999; margin: 0 0 14px; }
.chance-way-prd-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 12px;
}
.chance-way-prd-row .prd-chip {
  height: 28px; padding: 0 10px; font-size: 12px;
}
.chance-way-prd-row .prd-chip.is-active {
  background: #e6f7ff; border-color: #1890ff; color: #1890ff; font-weight: 600;
}
.chance-pane-fields {
  background: #fafafa; border: 1px solid #f0f0f0; border-radius: 8px;
  padding: 16px 18px; margin-bottom: 12px;
}
.chance-field-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.chance-field label {
  display: block; font-size: 13px; color: #595959; margin-bottom: 8px; font-weight: 600;
}
.chance-field .req { color: #ff4d4f; }
.chance-field select,
.chance-field input[type="number"],
.chance-field input[type="text"] {
  width: 100%; height: 36px; border: 1px solid #d9d9d9; border-radius: 4px;
  padding: 0 10px; font-size: 13px; background: #fff; box-sizing: border-box;
}
.chance-field select:focus,
.chance-field input[type="number"]:focus,
.chance-field input[type="text"]:focus { border-color: #1890ff; outline: none; }
.chance-field--wide { margin-top: 16px; }
.chance-tier-note { font-size: 12px; color: #8c8c8c; margin: 10px 0 0; }
.chance-field-hint {
  margin: 8px 0 0; font-size: 12px; color: #8c8c8c; line-height: 1.6;
}
.chance-field-grid.is-login-daily {
  grid-template-columns: minmax(280px, 1.2fr) minmax(220px, .8fr);
}
.chance-tier-bar {
  display: flex; align-items: center; gap: 10px; margin: 8px 0 10px;
}
.chance-pane-fields > .chance-tier-bar { margin-top: 0; margin-bottom: 12px; }
.chance-tier-title {
  font-size: 14px; font-weight: 600; color: #262626; margin-right: auto;
}
.btn-add-tier {
  height: 32px; padding: 0 14px; border-radius: 4px; cursor: pointer;
  border: 1px solid #1890ff; background: #1890ff; color: #fff; font-size: 13px;
}
.btn-add-tier:hover { background: #40a9ff; }
.btn-add-tier:disabled {
  opacity: .45; cursor: not-allowed; pointer-events: none;
}
.btn-link.danger[disabled] {
  opacity: .4; cursor: not-allowed; pointer-events: none; color: #bbb;
}
.chance-tier-table {
  table-layout: fixed; width: 100%;
}
.chance-tier-table th,
.chance-tier-table td {
  width: 25%;
  text-align: center;
  vertical-align: middle;
}
.chance-tier-table td.ops { text-align: center; }
.chance-tier-table .input-text,
.chance-tier-table .input-text.tiny {
  max-width: 120px;
  margin: 0 auto;
  display: inline-block;
  text-align: center;
}
.chance-tier-table .unit {
  margin-left: 6px; color: #8c8c8c; font-size: 12px;
}
@media (max-width: 1100px) {
  .chance-toggle-row,
  .chance-field-grid { grid-template-columns: 1fr; }
}

/* 大转盘奖品列表 */
.prize-table-wrap {
  overflow-x: auto;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
}
.prize-table {
  min-width: 1480px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.prize-table th,
.prize-table td {
  text-align: center;
  vertical-align: middle;
  padding: 18px 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  line-height: 1.45;
}
.prize-table th {
  background: #fafafa;
  font-weight: 600;
  color: #595959;
  white-space: normal;
}
.prize-table .th-sub {
  display: block;
  font-weight: 500;
  color: #8c8c8c;
  font-size: 11px;
  margin-top: 2px;
}
.prize-table tbody tr:hover { background: #fafcff; }
.prize-table .prize-name-cell { font-weight: 600; color: #262626; }
.prize-table .prize-sub {
  display: block; margin-top: 4px; color: #8c8c8c; font-weight: 400; font-size: 11px;
}
.prize-table .prize-thumb {
  width: 36px; height: 48px; object-fit: cover; border-radius: 4px;
  background: #f5f5f5; display: inline-block; vertical-align: middle;
}
.prize-table .prize-thumb-ph {
  width: 36px; height: 48px; border-radius: 4px; background: #f5f5f5;
  display: inline-block; vertical-align: middle;
}
.prize-table th.col-limit,
.prize-table td.col-limit {
  width: 120px;
  min-width: 120px;
  padding: 14px 12px;
  vertical-align: middle;
}
.prize-table th.col-account,
.prize-table td.col-account {
  width: 110px;
  min-width: 110px;
  white-space: nowrap;
  padding: 14px 12px;
}
.vip-tag-grid {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: auto;
  margin: 0;
}
.vip-tag {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; padding: 0 6px; border-radius: 3px;
  background: #722ed1; color: #fff; font-size: 11px; font-weight: 600;
  line-height: 1;
}
.prize-edit-ops {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.prize-ico-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid #d9d9d9;
  background: #f5f5f5; color: #595959; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; padding: 0;
}
.prize-ico-btn:hover { border-color: #1890ff; color: #1890ff; }
.prize-ico-btn.edit {
  border-radius: 4px; background: #1890ff; border-color: #1890ff; color: #fff;
}
.prize-ico-btn.edit:hover { background: #40a9ff; border-color: #40a9ff; color: #fff; }
.prize-ico-btn.danger { border-radius: 4px; color: #ff4d4f; }
.prize-ico-btn.danger:hover { border-color: #ff4d4f; background: #fff1f0; }
.prize-ico-btn:disabled { opacity: .35; cursor: not-allowed; }
.prize-table .empty-row td {
  text-align: center; color: #999; padding: 36px 12px; background: #fafafa;
}

/* 奖品新增/编辑弹窗 */
.prize-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}
.prize-modal-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  text-align: left !important;
  padding: 18px 22px 12px !important;
  border-bottom: 1px solid #f0f0f0;
}
.prize-modal-hd-text { min-width: 0; flex: 1; }
.prize-modal-title {
  font-size: 18px;
  font-weight: 650;
  color: #1f1f1f;
  line-height: 1.3;
}
.prize-modal-sub {
  margin: 6px 0 0;
  font-size: 12px;
  color: #8c8c8c;
  line-height: 1.5;
}
.prize-modal .am-bd {
  overflow-y: auto;
  flex: 1;
  padding: 16px 22px 8px !important;
  background: #f7f8fa;
}
.prize-modal-ft {
  justify-content: flex-end !important;
  gap: 10px;
  padding: 12px 22px 16px !important;
  border-top: 1px solid #f0f0f0;
  background: #fff;
}

.prize-form .pf-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.prize-form .pf-card-hd {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 650;
  color: #262626;
  background: #f0f5fa;
  border-bottom: 1px solid #e8eef5;
}
.prize-form .pf-card-bd { padding: 16px; }
.prize-form .pf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
.prize-form .pf-field { min-width: 0; }
.prize-form .pf-field--full { grid-column: 1 / -1; }
.prize-form .pf-field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #595959;
}
.prize-form .pf-field-label .req { color: #ff4d4f; margin-right: 2px; }
.prize-form .pf-field-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #8c8c8c;
  line-height: 1.5;
}
.prize-form .pf-field input[type="text"],
.prize-form .pf-field input[type="number"],
.prize-form .pf-field input[type="datetime-local"],
.prize-form .pf-field select {
  width: 100%;
  height: 36px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 13px;
  box-sizing: border-box;
  background: #fff;
}
.prize-form .pf-field input:focus,
.prize-form .pf-field select:focus,
.prize-form .pf-account-area:focus {
  border-color: #1890ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, .12);
}
.prize-form .pf-radios {
  display: flex;
  gap: 24px;
  align-items: center;
  min-height: 36px;
}
.prize-form .pf-radios label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #262626;
}
.prize-form .pf-range {
  display: flex;
  align-items: center;
  gap: 10px;
}
.prize-form .pf-range input { flex: 1; max-width: none; }
.prize-form .pf-range .range-sep { color: #bfbfbf; flex: none; }
.prize-form .pf-check-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 13px;
}
.prize-form .vip-box {
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 12px 14px;
  background: #fafafa;
}
.prize-form .vip-check-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px 10px;
  max-width: none;
}
.prize-form .vip-check-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}
.prize-upload-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 120px;
  border: 1px dashed #c0c4cc;
  border-radius: 6px;
  background: #fafafa;
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
}
.prize-upload-area:hover { border-color: #1890ff; color: #1890ff; }
.prize-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.prize-upload-plus {
  font-size: 28px;
  line-height: 1;
  color: #8c8c8c;
  font-weight: 300;
}
.prize-upload-text { font-size: 13px; color: #8c8c8c; }
.prize-upload-area.has-img .prize-upload-plus,
.prize-upload-area.has-img .prize-upload-text { display: none; }
.prize-upload-area--sm { min-height: 100px; }
.pf-style-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}
.pf-style-title {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 650;
  color: #262626;
}
.prize-upload-area img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  pointer-events: none;
}
.prize-img-slot { width: 96px; height: 96px; }
.pf-cond[hidden],
.pf-after-days[hidden],
.pf-range[hidden],
.pf-field[hidden],
.pf-type-block[hidden],
.pf-grid[hidden] {
  display: none !important;
}
.pf-type-block .th-sub,
.pf-field-label .th-sub {
  font-weight: 500;
  color: #8c8c8c;
  font-size: 11px;
}
.pf-after-days {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pf-after-days input { max-width: 220px; }
.pf-after-unit { font-size: 13px; color: #595959; }
.pf-account-area {
  display: block;
  width: 100%;
  min-height: 110px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
}

@media (max-width: 720px) {
  .prize-form .pf-grid { grid-template-columns: 1fr; }
  .prize-form .vip-check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.input-text {
  width: 100%; max-width: 420px; height: 32px; border: 1px solid #d9d9d9;
  border-radius: 4px; padding: 0 10px; font-size: 13px; box-sizing: border-box;
}
.input-text.short { max-width: 100px; }
.input-text.medium { max-width: 180px; }
.textarea {
  width: 100%; max-width: 560px; min-height: 120px; border: 1px solid #d9d9d9;
  border-radius: 4px; padding: 8px 10px; font-size: 13px; box-sizing: border-box;
  resize: vertical; font-family: inherit; line-height: 1.6;
}
.range-inputs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 560px;
}
.range-inputs .range-sep { color: #999; font-size: 13px; }
.input-datetime {
  width: 100%; max-width: 260px; height: 32px; border: 1px solid #d9d9d9;
  border-radius: 4px; padding: 0 10px; font-size: 13px; box-sizing: border-box;
  color: #333; background: #fff;
}
.input-datetime:focus, .textarea:focus, .input-text:focus {
  outline: none; border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.15);
}
.input-datetime::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .65; }

.radio-group, .check-group {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center;
  line-height: 36px; font-size: 14px;
}
.radio-group label, .check-group label {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
}

.switch-row { display: flex; align-items: center; gap: 10px; line-height: 36px; font-size: 14px; }
.switch {
  width: 44px; height: 22px; background: #bfbfbf; border-radius: 11px;
  position: relative; flex-shrink: 0; cursor: pointer; border: 0; padding: 0;
}
.switch.on { background: #1890ff; }
.switch::after {
  content: ""; position: absolute; width: 18px; height: 18px; background: #fff;
  border-radius: 50%; top: 2px; left: 2px; transition: left .15s;
}
.switch.on::after { left: auto; right: 2px; }

.tip-warn {
  background: #fffbe6; border: 1px solid #ffe58f; border-radius: 4px;
  padding: 8px 12px; font-size: 12px; color: #ad6800; margin-top: 8px; max-width: 560px;
}
.tip-info {
  background: #e6f7ff; border: 1px solid #91d5ff; border-radius: 4px;
  padding: 8px 12px; font-size: 12px; color: #096dd9; margin: -4px 0 16px; max-width: 640px;
}
.tip-info--oneline {
  max-width: none;
  white-space: nowrap;
}

.table-wrap { overflow-x: auto; margin-bottom: 12px; }
.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px;
}
.data-table th, .data-table td {
  border: 1px solid #e8e8e8; padding: 10px 12px; text-align: left;
}
.data-table th { background: #fafafa; font-weight: 600; color: #666; }
.data-table td.ops { white-space: nowrap; }
.data-table .input-text { max-width: 100%; }
.data-table .input-text.tiny { max-width: 72px; text-align: center; }
.prob-sum {
  margin-top: 8px; font-size: 13px; color: #666;
}
.prob-sum.ok { color: #389e0d; }
.prob-sum.bad { color: #d9001b; font-weight: 600; }

.link-btn {
  color: #1890ff; cursor: pointer; margin-right: 12px; background: none; border: none;
  font-size: 13px; padding: 0;
}
.link-btn.danger { color: #ff4d4f; }
.btn-add-row {
  padding: 6px 16px; font-size: 13px; border: 1px dashed #1890ff; color: #1890ff;
  background: #e6f7ff; border-radius: 4px; cursor: pointer;
}
.btn-add-row:disabled { opacity: .45; cursor: not-allowed; }

.divider { height: 1px; background: #f0f0f0; margin: 8px 0 4px; }

.footer-btns {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 1px solid #e8e8e8; padding: 12px 32px; display: flex;
  justify-content: center; gap: 12px; z-index: 10;
}
.btn {
  padding: 8px 24px; border-radius: 4px; font-size: 14px; cursor: pointer;
  border: 1px solid #d9d9d9; background: #fff;
}
.btn-primary { background: #1890ff; color: #fff; border-color: #1890ff; }
.btn-primary:hover { background: #40a9ff; }

.sticky-note {
  position: fixed; right: 24px; top: 80px; width: 320px; max-height: calc(100vh - 120px);
  overflow-y: auto; background: #d0e17d; border: 1px solid #b8c96a; border-radius: 4px;
  padding: 16px; font-size: 12px; line-height: 1.8; box-shadow: 0 2px 8px rgba(0,0,0,.08);
  z-index: 5;
}
.sticky-note h4 { margin: 0 0 8px; font-size: 13px; }
.sticky-note .red { color: #d9001b; font-weight: 600; }
.sticky-note ol { margin: 0; padding-left: 18px; }
.sticky-note code {
  background: rgba(0,0,0,.06); padding: 0 4px; border-radius: 2px; font-size: 11px;
}

.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-12px);
  background: rgba(0,0,0,.75); color: #fff; padding: 10px 20px; border-radius: 4px;
  font-size: 13px; z-index: 2000; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 索引页 */
.hub {
  max-width: 720px; margin: 48px auto; padding: 0 24px;
}
.hub h1 { font-size: 24px; margin: 0 0 8px; }
.hub .desc { color: #888; font-size: 14px; margin-bottom: 28px; }
.hub-card {
  display: block; background: #fff; border: 1px solid #e8e8e8; border-radius: 8px;
  padding: 20px 24px; margin-bottom: 14px; text-decoration: none; color: inherit;
  transition: box-shadow .15s, border-color .15s;
}
.hub-card:hover { border-color: #91d5ff; box-shadow: 0 4px 16px rgba(24,144,255,.12); }
.hub-card h3 { margin: 0 0 6px; font-size: 16px; color: #1890ff; }
.hub-card p { margin: 0; font-size: 13px; color: #666; line-height: 1.6; }

.name-with-count { position: relative; max-width: 360px; }
.name-with-count .input-text { width: 100%; max-width: 360px; padding-right: 56px; }
.name-with-count .count {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: #999; pointer-events: none;
}
.form-body > select.input-text { max-width: 360px; }
.agent-radios { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 8px; margin-bottom: 10px; }
.agent-radios label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.agent-box textarea {
  width: 100%; max-width: 640px; min-height: 120px;
}
.agent-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 8px; max-width: 640px; flex-wrap: wrap;
}
.agent-foot .meta { font-size: 12px; color: #888; }
.dev-mark-box {
  margin: 8px 0 18px;
  padding: 12px 12px 4px;
  border: 2px dashed #d9001b;
  border-radius: 6px;
  background: transparent;
}
.dev-mark-box .form-row:last-child { margin-bottom: 12px; }
.prize-weight-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px;
  margin: 0 0 12px; padding-left: 0; border-left: 0;
}
.prize-weight-head .hint-danger { font-weight: 400; }
.guarantee-row { margin-top: 16px; margin-bottom: 8px; }
.hint-danger { margin-top: 6px; font-size: 12px; color: #d9001b; }
.vip-all {
  display: inline-flex; align-items: center; gap: 6px;
  color: #1890ff; cursor: pointer; margin-bottom: 10px; line-height: 1.4;
}
.vip-grid { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.vip-grid label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.inline-ctrl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 36px; }
.inline-ctrl .inline-txt { font-size: 14px; color: #333; }
.hint-danger.inline { margin-top: 0; }
.game-panel {
  border: 1px solid #e8e8e8; border-radius: 4px; padding: 12px 14px; background: #fafafa;
}
.game-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid #e8e8e8; margin-bottom: 12px; }
.game-tabs button {
  border: 0; background: none; padding: 8px 16px; cursor: pointer;
  color: #666; font-size: 13px;
}
.game-tabs button.on { color: #1890ff; font-weight: 600; box-shadow: inset 0 -2px 0 #1890ff; }
.game-list { display: flex; flex-direction: column; gap: 8px; }
.game-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.game-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.gift-slots {
  display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 16px; max-width: 920px;
}
.gift-slots-2 { grid-template-columns: repeat(2, minmax(160px, 280px)); }
.gift-slots .ph { height: 120px; background: #f0f0f0; }
.gift-slots .ph.tall { height: 160px; }
.gift-slots .ph-txt { font-size: 28px; font-weight: 400; color: #bfbfbf; }

@media (max-width: 1280px) {
  .sticky-note { display: none; }
}
