/* =========================================================================
 * Lumina 像素墙 · 样式（浅色主题）
 * ========================================================================= */

/* ------------------------------------------------------------- 设计变量 */
:root {
  --bg:            #f4f5f7;
  --bg-deep:       #eceef2;
  --surface:       #ffffff;
  --surface-2:     #fafbfc;

  --line:          #e5e8ee;
  --line-strong:   #d3d8e0;

  --ink:           #0f172a;
  --ink-2:         #475467;
  --ink-3:         #667085;
  --muted:         #98a2b3;

  --accent:        #ff5c33;
  --accent-dark:   #e0431a;
  --accent-soft:   #fff2ee;

  --ok:            #12b76a;
  --ok-soft:       #ecfdf3;
  --warn:          #f79009;
  --danger:        #e5484d;

  --radius:        16px;
  --radius-md:     12px;
  --radius-sm:     9px;

  --shadow-xs:     0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm:     0 2px 8px rgba(16, 24, 40, .06);
  --shadow:        0 10px 30px rgba(16, 24, 40, .09);
  --shadow-lg:     0 28px 72px rgba(16, 24, 40, .18);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --header-h: 72px;
}

/* ---------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
[hidden] { display: none !important; }

.wrap { width: min(1280px, calc(100% - 48px)); margin: 0 auto; }

/* ================================================================ 顶栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0;
}

/* 左上角：网站名称 + 域名 */
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-mark {
  width: 40px; height: 40px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #ff8f4d);
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(255, 92, 51, .32);
  letter-spacing: -.02em;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }

.brand-name {
  font-size: 16.5px;
  font-weight: 750;
  letter-spacing: -.015em;
  white-space: nowrap;
}

.brand-domain {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
  white-space: nowrap;
}
.brand-domain::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 6px;
  vertical-align: 1.5px;
}

/* 右上角：已用 / 未用像素 */
.header-right { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

.stats { display: flex; gap: 10px; }

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  min-width: 116px;
}
.stat-label {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .02em;
  white-space: nowrap;
}
.stat-value {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.stat-used .stat-value { color: var(--accent-dark); }
.stat-free .stat-value { color: var(--ink); }

/* 顶栏积分卡（点击打开积分中心） */
.stat-points {
  cursor: pointer;
  border-color: #ffd9cd;
  background: linear-gradient(135deg, #fff4f0, #ffe8df);
  transition: all .16s ease;
}
.stat-points .stat-label { color: var(--accent-dark); font-weight: 600; }
.stat-points .stat-value { color: var(--accent-dark); }
.stat-points:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.stat-points::after {
  content: "赚积分 ›";
  display: block;
  font-size: 10.5px;
  color: var(--accent-dark);
  opacity: .72;
  line-height: 1.1;
  margin-top: 1px;
}

.progress {
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: var(--bg-deep);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), #ff9a5c);
  transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

/* ================================================================ 主体 */
.page { padding: 28px 0 64px; }

/* ------------------------------------------------------------ 工具栏 */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pills { display: flex; gap: 8px; flex-wrap: wrap; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 99px;
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
}
.pill b { color: var(--ink); font-weight: 700; }
.pill-accent {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: #ffd9cd;
}
.pill-accent b { color: var(--accent-dark); }

.zoom { display: flex; align-items: center; gap: 6px; }

.zbtn {
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  box-shadow: var(--shadow-xs);
  transition: all .15s ease;
}
.zbtn:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }
.zbtn:active { transform: translateY(1px); }

.zoom input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  height: 4px;
  border-radius: 99px;
  background: var(--bg-deep);
  outline: none;
}
.zoom input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}
.zoom input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  cursor: pointer;
}

.zoom-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  min-width: 42px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 工具栏右侧：鼠标工具 + 缩放 */
.toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.seg-tool { padding: 3px; border-radius: 10px; }
.seg-tool .seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12.5px;
  border-radius: 7px;
}
.seg-tool .seg-ic { font-size: 12px; line-height: 1; opacity: .85; }

/* ------------------------------------------------------------ 像素墙 */
.wall-viewport {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: auto;
  max-height: 76vh;
  overscroll-behavior: contain;
}

.wall-stage { position: relative; }

.wall {
  position: relative;
  width: 1000px;                 /* 初始值，实际尺寸由 wall.js 按缩放写入 */
  height: 1000px;
  background: #fff;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

/* 拖动模式（工具栏切换 / 按住空格 / 鼠标中键） */
.wall-viewport.is-pan .wall { cursor: grab; }
.wall-viewport.is-pan .ad { cursor: inherit; }
.wall-viewport.is-grabbing .wall,
.wall-viewport.is-grabbing .ad { cursor: grabbing !important; }

/* 网格线由 wall.js 按缩放分级绘制（1px / 10px / 100px），此处只负责定位 */
.wall-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* 已售广告位 */
.wall-ads { position: absolute; inset: 0; }

.ad {
  position: absolute;
  overflow: hidden;
  background: #f2f4f7;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .07);
  transition: box-shadow .15s ease, filter .15s ease;
  display: block;
  cursor: pointer;
}
.ad.no-link { cursor: default; }
.ad:hover {
  box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 3px rgba(255, 92, 51, .18);
  z-index: 5;
}
.ad img { width: 100%; height: 100%; object-fit: cover; }
.ad.fit-contain img { object-fit: contain; background: #fff; }

.ad-text {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  padding: 4px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  overflow: hidden;
  word-break: break-word;
}

/* 纯色块内容 */
.ad-color { width: 100%; height: 100%; }

/* 属于自己的像素块：淡橙色描边 + 悬停出现编辑铅笔（单击可改内容） */
.ad.is-mine { box-shadow: inset 0 0 0 1px rgba(255, 92, 51, .38); }
.ad.is-mine:hover { box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 3px rgba(255, 92, 51, .2); }

.ad-edit {
  position: absolute;
  top: 4px; right: 4px;
  z-index: 3;
  width: 22px; height: 22px;
  display: none;
  place-items: center;
  border-radius: 7px;
  background: rgba(15, 23, 42, .82);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(15, 23, 42, .3);
  transition: opacity .14s ease, background .15s ease, transform .12s ease;
}
.ad.has-edit .ad-edit { display: grid; opacity: 0; }
.ad.has-edit:hover .ad-edit,
.ad.has-edit:focus-within .ad-edit { opacity: 1; }
.ad-edit:hover { background: var(--accent); transform: scale(1.08); }
.ad-edit svg { width: 12px; height: 12px; }

.ad.is-new { animation: adPop .7s cubic-bezier(.22, 1.2, .36, 1) both; }
@keyframes adPop {
  0%   { transform: scale(.4); opacity: 0; z-index: 9; }
  60%  { transform: scale(1.06); opacity: 1; z-index: 9; }
  100% { transform: scale(1); opacity: 1; z-index: 1; }
}

/* 选择框 */
.wall-selection {
  position: absolute;
  border: 2px dashed var(--accent);
  background: rgba(255, 92, 51, .14);
  pointer-events: none;
  z-index: 8;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .8) inset;
}
.wall-selection.is-conflict {
  border-color: var(--danger);
  background: rgba(229, 72, 77, .16);
}
.wall-selection.is-poor {
  border-color: var(--warn);
  background: rgba(247, 144, 9, .16);
}

/* 悬浮计价气泡 */
.float-badge {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(15, 23, 42, .94);
  color: #fff;
  font-size: 12px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow);
  transform: translate(14px, 16px);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .12s ease;
}
.float-badge.is-on { opacity: 1; }
.float-badge b { color: #ffb59b; font-weight: 700; }
.float-badge .fb-warn { color: #ff9b9b; }

/* 广告位信息提示 */
.tip {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  max-width: 260px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, .94);
  color: #fff;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity .12s ease;
  transform: translate(14px, 16px);
}
.tip.is-on { opacity: 1; }
.tip .tip-title { font-weight: 700; color: #fff; }
.tip .tip-meta { color: rgba(255, 255, 255, .68); font-family: var(--mono); font-size: 11px; }

/* 键盘可访问性 */
.wall:focus-visible { outline: 3px solid rgba(255, 92, 51, .4); outline-offset: 2px; }

/* ------------------------------------------------------------ 提示条 */
.hint-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 11px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  font-size: 13px;
  box-shadow: var(--shadow-xs);
}
.hint-bar .kbd {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.hint-bar .dot { color: var(--line-strong); }

/* ============================================================== 区块 */
.section { margin-top: 56px; }

.section-head { margin-bottom: 22px; }
.section-kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.section-title { font-size: 27px; letter-spacing: -.02em; }
.section-desc { margin-top: 8px; color: var(--ink-3); font-size: 14.5px; max-width: 720px; }

/* 承诺卡片 */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.card-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin-bottom: 15px;
}
.card-icon svg { width: 21px; height: 21px; }

.card h3 { font-size: 16.5px; margin-bottom: 8px; }
.card p { color: var(--ink-3); font-size: 14px; }

/* 流程 */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }

.step {
  position: relative;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.step-num {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 15.5px; margin-bottom: 6px; }
.step p { font-size: 13.5px; color: var(--ink-3); }

/* 常见问题 */
.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.qa {
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}
.qa h3 { font-size: 15px; margin-bottom: 7px; display: flex; gap: 8px; }
.qa h3::before {
  content: "Q";
  flex: none;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 11.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.qa p { font-size: 13.5px; color: var(--ink-3); padding-left: 28px; }
.qa code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-deep);
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--ink-2);
}

/* 承诺横幅 */
.pledge {
  margin-top: 56px;
  border-radius: 20px;
  padding: 34px 38px;
  background: linear-gradient(135deg, #101828, #1d2939 55%, #243b53);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.pledge-main { flex: 1 1 380px; }
.pledge-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  margin-bottom: 14px;
}
.pledge h2 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 10px; }
.pledge p { color: rgba(255, 255, 255, .74); font-size: 14.5px; max-width: 620px; }
.pledge-stats { display: flex; gap: 30px; }
.pledge-stat b {
  display: block;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.pledge-stat span { font-size: 12.5px; color: rgba(255, 255, 255, .62); }

/* ================================================================ 页脚 */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 30px 0;
  margin-top: 64px;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ink-3);
  font-size: 13px;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--accent-dark); }

/* ================================================================ 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  overflow: auto;
}
.modal[hidden] { display: none !important; }

.modal-card {
  width: min(940px, 100%);
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn .26s cubic-bezier(.22, 1, .36, 1) both;
  margin: auto;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 19px; }
.modal-head p { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

.modal-close {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
  transition: all .15s ease;
}
.modal-close:hover { background: var(--bg-deep); color: var(--ink); }

.modal-body { display: grid; grid-template-columns: 1fr 340px; }

.form { padding: 24px 26px; display: flex; flex-direction: column; gap: 17px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field .req { color: var(--accent); }
.field .help { font-size: 12px; color: var(--muted); }

.input, .textarea, .select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 92, 51, .14);
}
.textarea { resize: vertical; min-height: 72px; }

.input.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(229, 72, 77, .12); }

/* 上传区 */
.drop {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all .18s ease;
}
.drop:hover, .drop.is-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.drop-icon {
  width: 38px; height: 38px;
  margin: 0 auto 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.drop-icon svg { width: 19px; height: 19px; }
.drop strong { display: block; font-size: 13.5px; color: var(--ink); }
.drop span { font-size: 12px; color: var(--muted); }

.upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.upload-preview img {
  width: 78px; height: 52px;
  object-fit: contain;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--line);
  flex: none;
}
.upload-preview .up-meta { flex: 1; min-width: 0; }
.upload-preview .up-name {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upload-preview .up-size { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.link-btn {
  border: none; background: none; color: var(--accent-dark);
  font-size: 12.5px; font-weight: 600; padding: 4px 6px; border-radius: 6px;
}
.link-btn:hover { background: var(--accent-soft); }

/* 复选框 */
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }

/* 订单摘要侧栏 */
.summary {
  padding: 24px 22px;
  background: var(--surface-2);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.summary h3 { font-size: 14px; }
.sum-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; color: var(--ink-3);
}
.sum-row b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.sum-row.mono b { font-family: var(--mono); }

.sum-divider { height: 1px; background: var(--line); }

.sum-total {
  display: flex; justify-content: space-between; align-items: baseline;
}
.sum-total span { font-size: 13px; color: var(--ink-3); }
.sum-total b {
  font-size: 27px;
  font-weight: 750;
  color: var(--accent-dark);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.sum-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  position: relative;
}
.sum-preview img { width: 100%; height: 100%; object-fit: contain; }
.sum-preview .ph { font-size: 12px; color: var(--muted); text-align: center; padding: 14px; }

.note {
  font-size: 12px;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  line-height: 1.6;
}
.note b { color: var(--ink); }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.modal-foot .foot-hint { font-size: 12.5px; color: var(--muted); }
.foot-actions { display: flex; gap: 10px; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 650;
  transition: all .16s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 92, 51, .3);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 8px 22px rgba(255, 92, 51, .36); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: #fff; border-color: #f5c2c4; color: var(--danger); }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }

/* ================================================================ Toast */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px;
  border-radius: 11px;
  background: rgba(15, 23, 42, .95);
  color: #fff;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s cubic-bezier(.22, 1, .36, 1) both;
  max-width: 90vw;
}
.toast.is-out { animation: toastOut .25s ease forwards; }
.toast .t-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.toast.ok .t-dot { background: #4ade80; }
.toast.err .t-dot { background: #ff8080; }
.toast.info .t-dot { background: #7dd3fc; }

@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ==================================================== 内容类型切换器 */
.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  align-self: flex-start;
}
.seg-btn {
  border: none;
  background: none;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  transition: all .15s ease;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-on {
  background: var(--surface);
  color: var(--accent-dark);
  box-shadow: var(--shadow-xs);
}

/* 取色器 */
.colors { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.color-btn {
  width: 30px; height: 30px;
  border-radius: 9px;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .12);
  background: var(--c, #888);
  transition: transform .12s ease, border-color .12s ease;
}
.color-btn:hover { transform: scale(1.08); }
.color-btn.is-on { border-color: var(--ink); }
.colors input[type="color"] {
  width: 34px; height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
}

/* ======================================================= 积分中心 */
.modal-card-sm { width: min(760px, 100%); }

.modal-body-1 {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: min(72vh, 720px);
  overflow: auto;
}

.pts-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #101828, #1d2939 55%, #2b3f57);
  color: #fff;
}
.pts-balance span { font-size: 12.5px; color: rgba(255, 255, 255, .66); }
.pts-balance b {
  display: block;
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.pts-balance i { font-style: normal; color: #ffb59b; font-weight: 700; }
.pts-code {
  text-align: right;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .66);
}
.pts-code b {
  display: block;
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: .12em;
  color: #fff;
  margin-top: 2px;
}

.pts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.pts-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pts-card h3 { font-size: 14.5px; display: flex; align-items: center; gap: 7px; }
.pts-card h3::before {
  content: "";
  width: 4px; height: 14px;
  border-radius: 2px;
  background: var(--accent);
}
.pts-note { font-size: 12.5px; color: var(--ink-3); }
.pts-note b { color: var(--accent-dark); }

.checkin-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.ck-day {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 7px 2px 6px;
  text-align: center;
  line-height: 1.25;
}
.ck-day span { display: block; font-size: 10.5px; color: var(--muted); }
.ck-day b {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.ck-day.is-done {
  background: var(--ok-soft);
  border-color: #b7ebd0;
}
.ck-day.is-done b { color: #0b7a48; }
.ck-day.is-today {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(255, 92, 51, .12);
}
.ck-day.is-today b { color: var(--accent-dark); }

.invite-row { display: flex; gap: 8px; }
.invite-row .input { font-family: var(--mono); font-size: 12.5px; }
.invite-row .btn { flex: none; height: 38px; }

.ledger {
  max-height: 190px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}
.ledger-row:last-child { border-bottom: none; }
.ledger-row .lg-label { color: var(--ink-2); }
.ledger-row .lg-time { color: var(--muted); font-family: var(--mono); font-size: 11px; margin-left: 7px; }
.ledger-row .lg-amount {
  font-family: var(--mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ledger-row .lg-amount.pos { color: #0b7a48; }
.ledger-row .lg-amount.neg { color: var(--ink-3); }
.ledger-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 12.5px; }

.acct-list { display: flex; flex-direction: column; gap: 6px; }
.acct {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12.5px;
  text-align: left;
  width: 100%;
  transition: all .15s ease;
}
.acct:hover { border-color: var(--line-strong); }
.acct.is-on { border-color: var(--accent); background: var(--accent-soft); }
.acct .acct-code { font-family: var(--mono); font-weight: 700; letter-spacing: .06em; }
.acct .acct-pts { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-3); }

/* 「我的像素块」列表 */
.myad-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.myad-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.myad-thumb {
  flex: none;
  width: 46px; height: 34px;
  border-radius: 7px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #e9edf3;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}
.myad-thumb img { width: 100%; height: 100%; object-fit: cover; }
.myad-thumb.is-text { padding: 2px; text-align: center; line-height: 1.1; }
.myad-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.myad-info b {
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.myad-info span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.myad-acts { flex: none; display: flex; gap: 6px; }

/* 发布面板里的余额提示 */
.notice-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  border: 1px solid #fde3bd;
  background: #fffaf0;
  color: #8a5300;
}
.notice-inline.ok { border-color: #b7ebd0; background: var(--ok-soft); color: #0b7a48; }
.notice-inline .link-btn { color: inherit; text-decoration: underline; }

.sum-balance-neg b { color: var(--danger); }

/* ============================================================ 响应式 */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .modal-body { grid-template-columns: 1fr; }
  .summary { border-left: none; border-top: 1px solid var(--line); }
  .pts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  .site-header .wrap { flex-direction: column; align-items: stretch; gap: 10px; }
  .header-right { align-items: stretch; }
  .stats { width: 100%; flex-wrap: wrap; }
  .stat { flex: 1; min-width: 0; align-items: flex-start; }
  .stat-points { align-items: flex-start; text-align: left; }
  .section-title { font-size: 22px; }
  .cards, .steps, .faq { grid-template-columns: 1fr; }
  .pledge { padding: 26px 22px; gap: 20px; }
  .pledge-stats { gap: 22px; }
  .modal { padding: 10px; }
  .modal-card { border-radius: 16px; }
  .modal-foot { flex-direction: column; align-items: stretch; }
  .foot-actions { justify-content: stretch; }
  .foot-actions .btn { flex: 1; }
  .wall-viewport { max-height: 60vh; }
  .pts-balance b { font-size: 28px; }
  .pts-code { text-align: left; }
  .invite-row { flex-direction: column; }
  .invite-row .btn { width: 100%; }
  .checkin-days { gap: 3px; }
  .toolbar { align-items: flex-start; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .zoom input[type="range"] { width: 76px; }
  .myad-row { flex-wrap: wrap; }
  .myad-acts { width: 100%; }
  .myad-acts .btn { flex: 1; }
}

/* ============================================================ 登录注册与账户（动态版） */

.auth-form { padding: 6px 22px 18px; }
.auth-form .field { margin-bottom: 14px; }
.auth-switch {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
}
.auth-note {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.6;
}
.btn-block { width: 100%; margin-top: 4px; }

.acct-me {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-2, #f7f8fa);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.acct-name { font-weight: 700; }
