/* ============================================================
   zx 制图工具 · 设计系统（对齐主站 480px 卡片风格）
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #E9EBF0; color: #1F2937; font-size: 14px; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.icon { flex-shrink: 0; display: block; }

/* ── 应用外壳 ── */
.zx-app {
  max-width: 480px; margin: 0 auto; min-height: 100vh;
  background: #F5F6F8; position: relative;
  box-shadow: 0 0 24px rgba(0,0,0,0.05);
  padding-bottom: 24px;
}

/* ── 顶部栏：左上返回首页 + 居中标题 ── */
.zx-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  height: 50px; background: #fff;
  border-bottom: 1px solid #EEF0F4;
}
.zx-back {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #2563EB; background: #EAF1FE;
}
.zx-back:active { background: #DCE7FD; }
.zx-back span { display: none; }
.zx-title { font-size: 16px; font-weight: 700; color: #1F2937; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 区块标题 ── */
.zx-section-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 16px 12px; }
.zx-section-title { font-size: 16px; font-weight: 700; color: #1F2937; display: flex; align-items: center; gap: 8px; }
.zx-section-title::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: #2563EB; }
.zx-section-count { font-size: 12px; color: #8A96A8; }

/* ── 工具列表（与主站 res-item 风格一致） ── */
.tool-list { padding: 0 14px; display: flex; flex-direction: column; gap: 10px; }
.tool-card {
  position: relative; display: flex; align-items: flex-start; gap: 13px;
  padding: 13px; border-radius: 14px; background: #fff;
  box-shadow: 0 2px 10px rgba(30,41,82,0.04);
}
.tool-card:active { background: #FAFBFE; }
.tool-thumb {
  position: relative; width: 58px; height: 58px; border-radius: 14px; flex-shrink: 0;
  overflow: hidden; background: #F1F3F6;
}
.tool-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tool-body { flex: 1; min-width: 0; padding-top: 1px; }
.tool-name { font-size: 15px; font-weight: 700; color: #111827; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-desc { font-size: 11px; color: #98A0AC; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-enter {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: #F1F3F6; color: #7A8494;
  display: flex; align-items: center; justify-content: center;
  align-self: center;
}
.tool-tag {
  position: absolute; top: -5px; left: -5px; z-index: 2;
  font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 999px; line-height: 1.3;
  color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.tag-hot { background: #F43F5E; }
.tag-new { background: #12A36B; }
.tag-act { background: #F59E0B; }

/* ── 子页面通用容器 ── */
.wrapper { padding: 14px; }
.wrapper br { display: none; }

/* 表单页图标 */
.wrapper > img[width="50%"] {
  width: 92px !important; height: 92px !important;
  margin: 14px auto 18px !important; border-radius: 22px;
  object-fit: cover; display: block;
  box-shadow: 0 8px 22px rgba(37,99,235,0.18);
}

/* ── 表单（兼容 frozen 类名，全新卡片样式） ── */
.ui-form {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(30,41,82,0.04);
}
.ui-form form { margin: 0; }
.ui-form-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid #F0F2F6;
}
.ui-form-item:last-child { border-bottom: none; }
.ui-form-item label {
  flex-shrink: 0; width: 58px;
  font-size: 14px; font-weight: 600; color: #374151;
}
.ui-form-item input[type="text"] {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 14px; color: #1F2937; padding: 4px 0;
}
.ui-form-item input[type="text"]::placeholder { color: #B3BAC6; }
.ui-select { flex: 1; min-width: 0; position: relative; }
.ui-select::after {
  content: ''; position: absolute; right: 2px; top: 50%;
  width: 7px; height: 7px; border-right: 2px solid #98A0AC; border-bottom: 2px solid #98A0AC;
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}
.ui-select select {
  width: 100%; border: none; outline: none; appearance: none; -webkit-appearance: none;
  background: transparent; font-size: 14px; color: #1F2937;
  padding: 4px 22px 4px 0;
}

/* 提交按钮 */
.ui-btn-wrap { padding: 18px 14px 6px; }
.ui-btn-wrap button,
button.ui-btn-lg {
  width: 100%; border: none; outline: none; cursor: pointer;
  font-size: 15px; font-weight: 700; letter-spacing: 2px; color: #fff;
  background: linear-gradient(135deg, #60A5FA, #2563EB);
  padding: 13px 0; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(37,99,235,0.30);
  transition: transform .15s;
}
.ui-btn-wrap button:active,
button.ui-btn-lg:active { transform: scale(0.98); }

/* ── 结果图提示与展示 ── */
.zx-tip {
  margin: 14px 14px 0; padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: #2563EB; background: #EAF1FE;
  border-radius: 12px;
}
.zx-tip::before {
  content: ''; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%;
  background: #2563EB; box-shadow: 0 0 6px rgba(37,99,235,.6);
}
.wrapper img {
  border-radius: 14px; margin: 0 auto;
  box-shadow: 0 4px 18px rgba(30,41,82,0.08);
}
.zx-again {
  display: block; margin: 14px 14px 0; text-align: center;
  font-size: 14px; font-weight: 700; color: #2563EB;
  background: #EAF1FE; padding: 12px 0; border-radius: 999px;
}
.zx-again:active { background: #DCE7FD; }
