*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:linear-gradient(180deg,#f8fafc 0%,#f4f0ff 52%,#fff7fb 100%);color:#111827}.wrap{max-width:1240px;margin:auto;padding:18px}.hero{display:grid;grid-template-columns:1.05fr .95fr;gap:22px;align-items:center;padding:22px 0}.pill{display:inline-flex;padding:8px 13px;background:rgba(255,255,255,.76);border:1px solid rgba(255,255,255,.9);border-radius:999px;box-shadow:0 10px 30px rgba(79,70,229,.08);font-size:13px;color:#6d28d9;font-weight:900}h1{font-size:clamp(34px,5.6vw,58px);line-height:1.04;margin:14px 0;letter-spacing:-1.4px}.sub{color:#64748b;font-size:16px;line-height:1.75;max-width:640px}.card,.panel{background:rgba(255,255,255,.88);border:1px solid rgba(255,255,255,.95);border-radius:28px;box-shadow:0 24px 70px rgba(79,70,229,.10);backdrop-filter:blur(14px)}.card-inner,.panel{padding:18px}.features{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}.features div{background:linear-gradient(180deg,#faf5ff,#f8fafc);border:1px solid #ede9fe;border-radius:18px;padding:14px 8px;text-align:center;font-size:13px;color:#4c1d95;font-weight:900}.plans{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.plans button{background:linear-gradient(145deg,#111827,#312e81);color:white;border:0;border-radius:24px;padding:18px;cursor:pointer;text-align:left;box-shadow:0 18px 44px rgba(17,24,39,.16)}.plans button:nth-child(2){background:linear-gradient(145deg,#7c3aed,#ec4899)}.plans button:nth-child(3){background:linear-gradient(145deg,#4c1d95,#7c3aed)}.plans button:nth-child(4){background:linear-gradient(145deg,#0f172a,#475569)}.plans b{display:block;font-size:27px}.plans span{display:block;font-size:12px;opacity:.9;margin-top:6px}.app{display:grid;grid-template-columns:390px 1fr;gap:20px}.btn{display:inline-flex;justify-content:center;align-items:center;width:100%;border:0;text-decoration:none;border-radius:18px;padding:13px 14px;font-weight:900;cursor:pointer;font-size:15px;transition:.15s;margin:6px 0;min-height:48px}.btn-primary{background:linear-gradient(135deg,#7c3aed,#ec4899);color:white;box-shadow:0 12px 30px rgba(236,72,153,.18)}.btn-secondary{background:#f1f5f9;color:#111827;border:1px solid #e5e7eb}.btn-dark{background:#0f172a;color:white}.btn-ghost{background:white;color:#111827;border:1px solid #e5e7eb}.btn:disabled{opacity:.45;cursor:not-allowed}.hero-actions{display:flex;gap:10px;max-width:430px}.input{width:100%;border:1px solid #e5e7eb;border-radius:15px;padding:12px 13px;font-size:15px;background:white;margin:6px 0;outline:none}.input:focus{border-color:#a78bfa;box-shadow:0 0 0 4px rgba(167,139,250,.16)}.inline{display:grid;grid-template-columns:1fr 126px;gap:8px}.status{border-radius:20px;padding:13px 14px;line-height:1.65;background:#f8fafc;border:1px solid #e5e7eb;margin:12px 0}.status.ok{background:#ecfdf5;border-color:#bbf7d0;color:#047857}.status.bad{background:#fff1f2;border-color:#fecdd3;color:#be123c}.line{height:1px;background:#e5e7eb;margin:14px 0}.field{background:rgba(248,250,252,.92);border:1px solid #ece7ff;border-radius:22px;padding:14px;margin:12px 0}.row{display:flex;justify-content:space-between;align-items:center;gap:8px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.check{display:block;margin:9px 0;color:#334155;font-size:14px;line-height:1.55}.canvasBox{min-height:650px;display:block;overflow:auto}.empty{min-height:520px;border:1px dashed #c4b5fd;border-radius:24px;display:flex;align-items:center;justify-content:center;color:#7c3aed;text-align:center;padding:20px;width:100%;background:linear-gradient(180deg,#fff,#faf5ff)}canvas{max-width:100%;background:white;border:1px solid #e5e7eb;border-radius:20px;box-shadow:0 12px 36px rgba(15,23,42,.10);margin:8px auto;display:block;touch-action:none}.stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.stats div{background:#fdf2f8;border-radius:18px;padding:14px}.stats span{display:block;color:#64748b;font-size:12px}.orders{font-size:13px;line-height:1.8;color:#475569}.modal{position:fixed;inset:0;background:rgba(15,23,42,.65);z-index:99;display:none;align-items:center;justify-content:center;padding:18px}.modal.show{display:flex}.modal-card{width:100%;max-width:480px;background:#fff;border-radius:30px;padding:22px;box-shadow:0 28px 80px rgba(0,0,0,.28);max-height:92vh;overflow:auto}.qr{width:220px;height:220px;margin:14px auto;border-radius:22px;display:grid;place-items:center;background:white;border:10px solid white;outline:1px solid #e5e7eb}.qr img{width:100%;height:100%;object-fit:contain}.notice{background:#f5f3ff;color:#6d28d9;border-radius:18px;padding:13px;line-height:1.7;font-size:14px;margin-bottom:10px}.profileCard{display:grid;grid-template-columns:82px 1fr;gap:12px;align-items:center;background:linear-gradient(180deg,#fff,#f8fafc);border:1px solid #e5e7eb;border-radius:22px;padding:12px;margin:12px 0}.avatar{width:70px;height:70px;border-radius:50%;object-fit:cover;background:linear-gradient(135deg,#ede9fe,#fce7f3);border:3px solid #fff;box-shadow:0 8px 22px rgba(88,28,135,.12)}.avatarUpload{display:block;margin-top:6px;font-size:12px;color:#7c3aed;cursor:pointer;font-weight:900;text-align:center}.profileInfo p{margin:4px 0;color:#475569;font-size:13px}.renewBtns{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:8px}.renewBtns .btn{font-size:12px;padding:9px 8px;margin:0;border-radius:12px;min-height:38px}.uploadPay{display:block;text-align:center;background:#fff7ed;border:1px dashed #fb923c;color:#c2410c;border-radius:16px;padding:13px 14px;font-weight:900;cursor:pointer;margin:8px 0}.ocrStatus{background:#f8fafc;border:1px solid #e5e7eb;color:#475569;border-radius:14px;padding:10px 12px;font-size:12px;line-height:1.55;margin:8px 0}.doubleBtns,.editTools{display:grid;grid-template-columns:1fr 1fr;gap:8px}.editTools{display:none;background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:10px;margin:8px 0}.editTools.show{display:grid}.miniBtn{border:0;border-radius:999px;background:#f3e8ff;color:#6d28d9;padding:8px 12px;font-weight:900;cursor:pointer}.recommendGood{color:#166534;font-weight:900}.recommendWarn{color:#b45309;font-weight:900}.stageBadge{display:inline-block;padding:6px 10px;border-radius:999px;background:#f3e8ff;color:#6d28d9;font-weight:900;margin:8px 0}.canvasBox canvas{image-rendering:pixelated}.pixelNote{font-size:12px;color:#64748b;line-height:1.5;margin-top:6px}.toolPanel{background:#fff}.toolGrid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}.smallTip{font-size:12px;color:#64748b}.legendChip{cursor:pointer}.legendChip:hover{filter:brightness(.95);outline:2px solid #f59e0b}.singleModeBar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0;padding:10px;border-radius:14px;background:#fff7ed;color:#9a3412;font-size:13px;font-weight:900}.singleModeBar button{border:0;border-radius:999px;background:#fed7aa;color:#9a3412;padding:6px 10px;font-weight:900}.canvasScroll{overflow:auto;max-width:100%}
@media(max-width:900px){body{background:#f8fafc}.wrap{padding:10px}.hero{display:block;padding:12px 0}.hero .card{margin-top:12px}h1{font-size:34px;letter-spacing:-.8px}.sub{font-size:14px;line-height:1.65}.hero-actions{display:block}.features{grid-template-columns:1fr 1fr 1fr}.plans{grid-template-columns:1fr}.app{grid-template-columns:1fr;gap:12px}.panel{border-radius:24px;padding:14px}.canvasBox{min-height:360px;padding:10px;order:2}.app aside{order:1}.toolGrid{grid-template-columns:1fr}.toolPanel .btn{min-height:46px}.editTools.show{position:fixed;left:10px;right:10px;bottom:10px;z-index:80;box-shadow:0 -10px 32px rgba(15,23,42,.16);max-height:42vh;overflow:auto;grid-template-columns:1fr 1fr}.field{padding:12px}.btn{min-height:48px}.doubleBtns{grid-template-columns:1fr}.inline{grid-template-columns:1fr}.renewBtns{grid-template-columns:1fr 1fr}.modal-card{border-radius:24px}.canvasBox canvas{min-width:320px}.empty{min-height:260px}.card,.panel{box-shadow:0 12px 34px rgba(79,70,229,.08)}}
@media(max-width:480px){.wrap{padding:8px}.features{grid-template-columns:1fr 1fr}.grid2{grid-template-columns:1fr 1fr}.profileCard{grid-template-columns:76px 1fr}.plans button{padding:16px}.card-inner,.panel{padding:13px}.toolGrid{grid-template-columns:1fr}.stats{grid-template-columns:1fr 1fr}.qr{width:190px;height:190px}.check{font-size:13px}.hero{padding-top:8px}}


/* ===== 6.11.3 仅移动端编辑增强：不修改生成算法 ===== */
.mobileEditBar{position:fixed;left:10px;right:10px;bottom:10px;z-index:120;background:rgba(255,255,255,.96);border:1px solid #e9d5ff;border-radius:24px;box-shadow:0 -14px 44px rgba(76,29,149,.20);padding:10px;display:none;backdrop-filter:blur(14px)}
.mobileEditBar.show{display:block}.mobileEditTop{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.mobileEditTitle{font-weight:900;color:#4c1d95;font-size:13px;line-height:1.35}.mobileEditHint{font-size:11px;color:#64748b;font-weight:700}.mobileToolRow{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:8px}.mobileToolBtn{border:0;border-radius:15px;min-height:42px;background:#f8fafc;color:#111827;font-weight:900;font-size:13px;border:1px solid #e5e7eb}.mobileToolBtn.active{background:linear-gradient(135deg,#7c3aed,#ec4899);color:#fff;border-color:transparent;box-shadow:0 8px 18px rgba(124,58,237,.18)}.mobileColorStrip{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 8px;scrollbar-width:none}.mobileColorStrip::-webkit-scrollbar{display:none}.mobileColorChip{flex:0 0 auto;width:44px;height:44px;border-radius:16px;border:2px solid #fff;box-shadow:0 0 0 1px #e5e7eb,0 8px 18px rgba(15,23,42,.08);position:relative}.mobileColorChip.active{box-shadow:0 0 0 3px #f97316,0 10px 22px rgba(249,115,22,.20)}.mobileColorChip span{position:absolute;left:50%;bottom:-15px;transform:translateX(-50%);font-size:9px;font-weight:900;color:#334155}.mobileZoomRow{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:8px}.mobileZoomRow .mobileToolBtn{min-height:38px}.mobileEditOn .canvasBox{padding-bottom:174px}.mobileEditOn canvas{cursor:crosshair;touch-action:none;max-width:none}.canvasBox{overscroll-behavior:contain}.editToast{position:fixed;left:50%;bottom:190px;transform:translateX(-50%);z-index:121;background:rgba(15,23,42,.92);color:white;padding:9px 13px;border-radius:999px;font-size:12px;font-weight:900;opacity:0;pointer-events:none;transition:.2s}.editToast.show{opacity:1}
@media(max-width:900px){.editTools.show{display:none}.mobileEditBar.show{display:block}.canvasBox{overflow:auto;-webkit-overflow-scrolling:touch}.canvasBox canvas{max-width:none;width:auto}.doubleBtns .btn,.toolPanel .btn{font-size:14px}.canvasBox.panel{border-radius:22px}.panel.canvasBox{background:#fff}.mobileEditOn .wrap{padding-bottom:178px}}
@media(min-width:901px){.mobileEditBar{max-width:520px;margin:auto;left:auto;right:24px;width:460px}}

.qualityHint{margin-top:8px;padding:10px 12px;border-radius:14px;background:#fff7ed;color:#7c2d12;font-size:13px;line-height:1.6;border:1px solid rgba(251,146,60,.25)}
.sizeChips{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:10px}
.sizeChips button{border:0;border-radius:999px;padding:10px 8px;background:linear-gradient(135deg,#fff,#fdf2f8);box-shadow:0 6px 18px rgba(236,72,153,.10);font-weight:800;color:#7c3aed}
@media(max-width:760px){.qualityHint{font-size:12px}.sizeChips{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.sizeChips button{padding:9px 6px;font-size:12px}}


/* ===== Mobile Result Scroll & Zoom Fix ===== */
html,
body {
  width: 100% !important;
  min-height: 100% !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-x pan-y pinch-zoom !important;
}

body,
main,
.container,
.page,
.app,
.wrapper {
  max-width: 100vw !important;
}

body.no-scroll,
body.modal-open,
html.no-scroll,
html.modal-open {
  overflow-y: auto !important;
  position: static !important;
  height: auto !important;
}

/* 生成结果、图纸、画布、预览区域允许横向/纵向滑动 */
#result,
#resultBox,
#resultSection,
.result,
.result-box,
.result-section,
.preview,
.preview-box,
.preview-panel,
.output,
.output-box,
.output-panel,
.canvas-wrap,
.canvas-wrapper,
.pattern-wrap,
.pattern-wrapper,
.grid-wrap,
.grid-wrapper,
.paper-wrap,
.paper-wrapper,
.editor,
.editor-panel,
.work-area {
  max-width: 100vw !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y pinch-zoom !important;
}

/* 图片/画布不要把手机页面撑死 */
img,
canvas,
svg {
  max-width: 100% !important;
  height: auto;
  touch-action: pan-x pan-y pinch-zoom !important;
}

/* 手机端弹窗、生成结果弹层允许滚动 */
.modal,
.dialog,
.popup,
.sheet,
.drawer,
.mask-content,
.pay-modal,
.preview-modal {
  max-height: 92dvh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y pinch-zoom !important;
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
    padding-bottom: 90px;
  }

  .container,
  .main,
  .app,
  .card,
  .panel,
  .section {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .result-toolbar,
  .edit-toolbar,
  .mobile-toolbar,
  .bottom-toolbar,
  .floating-toolbar {
    position: sticky !important;
    bottom: 0;
    z-index: 50;
  }

  table,
  .grid,
  .pattern-table {
    max-width: none !important;
  }
}
/* ===== End Mobile Result Scroll & Zoom Fix ===== */

/* ===== TTP Bottom Overlap Fix ===== */
:root {
  --ttp-mobile-bottom-space: max(130px, calc(110px + env(safe-area-inset-bottom)));
}

html,
body {
  min-height: 100% !important;
  height: auto !important;
  overflow-y: auto !important;
  overscroll-behavior-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

body {
  padding-bottom: var(--ttp-mobile-bottom-space) !important;
}

@media (max-width: 768px) {
  main,
  .main,
  .container,
  .app,
  .page,
  .wrapper,
  #app {
    padding-bottom: var(--ttp-mobile-bottom-space) !important;
    margin-bottom: 40px !important;
  }

  #result,
  #resultBox,
  #resultSection,
  .result,
  .result-box,
  .result-section,
  .preview,
  .preview-box,
  .output,
  .output-box,
  .canvas-wrap,
  .grid-wrap,
  .paper-wrap,
  .editor,
  .work-area {
    padding-bottom: var(--ttp-mobile-bottom-space) !important;
    margin-bottom: 40px !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y pinch-zoom !important;
  }

  .result-toolbar,
  .edit-toolbar,
  .mobile-toolbar,
  .bottom-toolbar,
  .floating-toolbar {
    max-height: 34vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  footer,
  .footer {
    margin-bottom: var(--ttp-mobile-bottom-space) !important;
  }

  .ttp-last-result-fab {
    position: fixed;
    right: 14px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 9999;
    border: none;
    border-radius: 999px;
    padding: 11px 15px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #7c3cff, #ff4fc3);
    box-shadow: 0 10px 26px rgba(124, 60, 255, .35);
  }

  .ttp-restore-panel {
    margin: 18px 12px var(--ttp-mobile-bottom-space);
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 12px 34px rgba(25, 20, 60, .16);
    color: #111;
  }

  .ttp-restore-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-weight: 800;
  }

  .ttp-restore-close {
    border: none;
    border-radius: 999px;
    padding: 6px 10px;
    background: #111;
    color: #fff;
  }

  .ttp-restore-content {
    max-height: 72vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
    border-radius: 14px;
  }

  .ttp-restore-content img,
  .ttp-restore-content canvas,
  .ttp-restore-content svg {
    max-width: 100%;
    height: auto;
  }
}
/* ===== End TTP Bottom Overlap Fix ===== */

/* ===== TTP Mobile Back Toast ===== */
.ttp-back-toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 99999;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 20, 32, .88);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  white-space: nowrap;
}
/* ===== End TTP Mobile Back Toast ===== */



/* ===== TTP White Screen Recovery ===== */
html,
body {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 100% !important;
  height: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

body > * {
  visibility: visible;
}

@media (max-width: 768px) {
  body {
    padding-bottom: max(120px, calc(100px + env(safe-area-inset-bottom))) !important;
  }

  main,
  .main,
  .container,
  .app,
  .page,
  .wrapper,
  #app {
    display: block;
    visibility: visible;
    opacity: 1;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
  }
}
/* ===== End TTP White Screen Recovery ===== */


/* ===== TTP Mobile Stable Fix V2 ===== */

:root {
  --ttp-bottom-space: max(140px, calc(120px + env(safe-area-inset-bottom)));
}

html,
body {
  width: 100% !important;
  min-height: 100% !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y pinch-zoom !important;
  overscroll-behavior-y: auto !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body {
  padding-bottom: var(--ttp-bottom-space) !important;
}

body.no-scroll,
body.modal-open,
body.lock-scroll,
html.no-scroll,
html.modal-open,
html.lock-scroll {
  overflow-y: auto !important;
  position: static !important;
  height: auto !important;
}

body > * {
  visibility: visible;
}

img,
canvas,
svg {
  max-width: 100% !important;
  height: auto;
  touch-action: pan-x pan-y pinch-zoom !important;
}

#result,
#resultBox,
#resultSection,
.result,
.result-box,
.result-section,
.preview,
.preview-box,
.output,
.output-box,
.canvas-wrap,
.canvas-wrapper,
.pattern-wrap,
.pattern-wrapper,
.grid-wrap,
.grid-wrapper,
.paper-wrap,
.paper-wrapper,
.editor,
.editor-panel,
.work-area {
  max-width: 100vw !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y pinch-zoom !important;
  padding-bottom: var(--ttp-bottom-space) !important;
  margin-bottom: 40px !important;
}

.modal,
.dialog,
.popup,
.sheet,
.drawer,
.mask-content,
.pay-modal,
.preview-modal {
  max-height: 92dvh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y pinch-zoom !important;
}

.ttp-last-result-fab {
  position: fixed;
  right: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 9999;
  border: none;
  border-radius: 999px;
  padding: 11px 15px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #7c3cff, #ff4fc3);
  box-shadow: 0 10px 26px rgba(124, 60, 255, .35);
}

.ttp-restore-panel {
  margin: 18px 12px var(--ttp-bottom-space);
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 34px rgba(25, 20, 60, .16);
  color: #111;
}

.ttp-restore-panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-weight: 900;
}

.ttp-restore-close {
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  background: #111;
  color: #fff;
}

.ttp-restore-content {
  max-height: 72vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
  border-radius: 14px;
}

.ttp-back-toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 99999;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 20, 32, .88);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
    padding-bottom: var(--ttp-bottom-space) !important;
  }

  main,
  .main,
  .container,
  .app,
  .page,
  .wrapper,
  #app,
  .card,
  .panel,
  .section {
    display: block;
    visibility: visible;
    opacity: 1;
    width: 100% !important;
    max-width: 100vw !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    padding-bottom: var(--ttp-bottom-space) !important;
  }

  table,
  .grid,
  .pattern-table {
    max-width: none !important;
  }

  .result-toolbar,
  .edit-toolbar,
  .mobile-toolbar,
  .bottom-toolbar,
  .floating-toolbar {
    max-height: 34vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  footer,
  .footer {
    margin-bottom: var(--ttp-bottom-space) !important;
  }
}

/* ===== End TTP Mobile Stable Fix V2 ===== */


/* ===== 6.12 手机编辑防误触增强：默认移动/缩放，选择画笔后才编辑 ===== */
.mobileToolRow{grid-template-columns:repeat(4,1fr)}
.mobileEditOn.mobilePanMode canvas{touch-action:pan-x pan-y pinch-zoom !important;cursor:grab}
.mobileEditOn.mobilePaintMode canvas{touch-action:none !important;cursor:crosshair}
.mobileEditOn.mobilePanMode .canvasBox{overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.mobileEditOn.mobilePanMode .mobileColorStrip{opacity:.72}
.mobileEditOn.mobilePanMode .mobileEditHint::after{content:'｜当前：移动';color:#7c3aed;font-weight:900}
.mobileEditOn.mobilePaintMode .mobileEditHint::after{content:'｜当前：编辑';color:#ec4899;font-weight:900}
@media(max-width:900px){.plans{grid-template-columns:1fr}.renewBtns{grid-template-columns:1fr 1fr}.mobileEditTop{align-items:flex-start}.mobileToolBtn{font-size:12px}.mobileEditOn .canvasBox{padding-bottom:210px}}
