/* 项目零件 · 图片转SVG（手机 H5，工具类） */
.page { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg); padding-bottom: var(--s-6); }
.appbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4); background: var(--bg); }
.appbar .title { flex: 1; min-width: 0; }
.appbar .title .sub { display: block; font-size: var(--fs-xs); color: var(--t3); font-weight: 400; }

/* 上传区：整块虚线感靠明度不靠边框——用 island-2 大圆角 + 居中提示 */
.dropzone { background: var(--island); border-radius: var(--r-island); padding: var(--s-7) var(--s-5);
  text-align: center; cursor: pointer; }
.dropzone .ic { width: 48px; height: 48px; margin: 0 auto var(--s-3); color: var(--t3); }
.dropzone h2 { font-size: var(--fs-read); font-weight: 600; margin-bottom: var(--s-2); }
.dropzone p { color: var(--t2); font-size: var(--fs-s); line-height: var(--lh-s); }
.dropzone .fmt { margin-top: var(--s-3); color: var(--t3); font-size: var(--fs-xs); font-family: var(--mono); }

/* 结果预览：棋盘底（透明指示）+缩放平移 */
.viewport { background: var(--island); border-radius: var(--r-panel); overflow: hidden; position: relative;
  height: 52vh; min-height: 300px; touch-action: none; cursor: grab;
  background-image: linear-gradient(45deg, var(--island-2) 25%, transparent 25%, transparent 75%, var(--island-2) 75%),
    linear-gradient(45deg, var(--island-2) 25%, transparent 25%, transparent 75%, var(--island-2) 75%);
  background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.viewport .canvas-holder { position: absolute; inset: 0; display: grid; place-items: center; }
.viewport img, .viewport svg { max-width: 100%; max-height: 100%; }
.viewport .zoom-read { position: absolute; right: var(--s-2); bottom: var(--s-2); padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--island); font-family: var(--mono); font-size: var(--fs-xs); color: var(--t2); }

/* 参数滑杆行 */
.prow { padding: 12px 0; position: relative; min-width: 0; }
.prow::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.prow:first-of-type::before { display: none; }
.prow .slider { display: block; width: 100%; box-sizing: border-box; margin: 0; }
.prow .plabel { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s-2); gap: var(--s-3); }
.prow .plabel .v { font-family: var(--mono); font-size: var(--fs-s); color: var(--t2); flex: none; }
.prow .hint { font-size: var(--fs-xs); color: var(--t3); margin-top: 4px; overflow-wrap: anywhere; }

/* 三态切换 */
.vseg { display: flex; height: 36px; padding: 3px; border-radius: var(--r-pill); background: var(--island-2); gap: 2px; }
.vseg > button { flex: 1; height: 30px; border: 0; border-radius: var(--r-pill); background: transparent;
  color: var(--t2); font: 500 var(--fs-s)/1 var(--font); cursor: pointer; }
.vseg > button.on { background: var(--island); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }

.bigbtn { display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; height: 52px; padding: 0 var(--s-4); border: 0; border-radius: var(--r-panel);
  background: var(--ink); color: var(--ink-fg); font: 600 var(--fs-read)/1.2 var(--font); cursor: pointer;
  margin-top: var(--s-4); transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.bigbtn:active { transform: scale(0.98); }
.bigbtn:disabled { opacity: 0.45; cursor: default; transform: none; }
.bigbtn.ghost { background: var(--island-3); color: var(--text); }

.fakenote { text-align: center; font-size: var(--fs-xs); color: var(--t3); padding: var(--s-5) 0 var(--s-3); }
