m.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. /* ============================================================
  2. m.css — 手机版(AI 设计 / 订单 / 物流)
  3. ============================================================ */
  4. .m-body {
  5. margin: 0; background: #f4f1ea; color: #17140f;
  6. font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
  7. min-height: 100vh; min-height: 100dvh;
  8. padding-bottom: 62px; /* tabbar */
  9. }
  10. .m-body button { font-family: inherit; }
  11. /* 头部 */
  12. .m-head {
  13. position: sticky; top: 0; z-index: 30;
  14. display: flex; align-items: center; gap: 10px;
  15. background: #17140f; color: #fffdf8;
  16. padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  17. }
  18. .m-logo { display: flex; align-items: center; gap: 7px; text-decoration: none; color: inherit; }
  19. .m-logo svg { width: 22px; height: 22px; }
  20. .m-logo b { font-size: 15px; }
  21. .m-quota { margin-left: auto; font-size: 10.5px; color: rgba(255,253,248,.72); }
  22. .m-login {
  23. border: 1px solid rgba(255,253,248,.4); background: none; color: #fffdf8;
  24. border-radius: 999px; padding: 5px 13px; font-size: 12.5px; cursor: pointer;
  25. }
  26. /* 视图 */
  27. .m-view {
  28. display: flex; flex-direction: column;
  29. min-height: calc(100dvh - 62px - 54px);
  30. }
  31. .m-view[hidden] { display: none; }
  32. /* ---------------- AI 聊天 ---------------- */
  33. .m-chat {
  34. flex: 1; overflow-y: auto; padding: 14px 12px 6px;
  35. display: flex; flex-direction: column; gap: 10px;
  36. }
  37. .m-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.65; white-space: normal; }
  38. .m-msg.ai { background: #fff; border: 1px solid #e8e2d5; border-top-left-radius: 4px; align-self: flex-start; }
  39. .m-msg.user { background: #ff5c2b; color: #fff; border-top-right-radius: 4px; align-self: flex-end; }
  40. .m-msg.step { background: none; border: none; color: #6b665e; font-size: 12px; padding: 2px 6px; }
  41. .m-msg.step.pending { opacity: .65; }
  42. .m-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ff5c2b; margin-right: 5px; animation: mblink 1.1s infinite; }
  43. @keyframes mblink { 50% { opacity: .25; } }
  44. /* 方案状态卡 */
  45. .m-agentcard { margin: 4px 12px 0; background: #fff; border: 1px solid #e8e2d5; border-radius: 13px; padding: 11px 12px; }
  46. .m-agentcard[hidden] { display: none; }
  47. .m-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  48. .m-chips span { background: #f4f1e9; border-radius: 6px; padding: 3px 8px; font-size: 11px; color: #4c473f; }
  49. .m-agentcard .m-actions { display: flex; gap: 8px; margin-top: 10px; }
  50. .m-actions button {
  51. flex: 1; border-radius: 9px; padding: 9px 0; font-size: 13px; font-weight: 700; cursor: pointer;
  52. }
  53. .m-btn-ghost { border: 1px solid #ddd5c6; background: #fff; color: #4c473f; }
  54. .m-btn-primary { border: 0; background: #ff5c2b; color: #fff; }
  55. .m-btn-primary:active { background: #e64d1f; }
  56. /* 3D 预览舞台 */
  57. .m-3dwrap {
  58. margin: 10px 12px 0; position: relative;
  59. background: radial-gradient(120% 90% at 50% 12%, #fffdf8 0%, #f1ebe0 78%, #e8e0d1 100%);
  60. border: 1px solid #e8e2d5; border-radius: 16px; overflow: hidden;
  61. }
  62. .m-3dwrap[hidden] { display: none; }
  63. .m-3d { position: relative; height: 320px; touch-action: none; }
  64. .m-3d canvas { border-radius: 16px; }
  65. .m-3d-hint {
  66. position: absolute; left: 0; right: 0; bottom: 8px; text-align: center;
  67. font-size: 11px; color: #a79d8d; pointer-events: none; letter-spacing: .3px;
  68. }
  69. /* 预览图(2D 正背面缩略图) */
  70. .m-agentpreview { margin: 10px 12px 0; }
  71. .m-agentpreview[hidden] { display: none; }
  72. .m-faces { display: flex; gap: 8px; }
  73. .m-faces.box {
  74. display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  75. }
  76. .m-faces.box .m-face { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; padding: 6px; }
  77. .m-boxface {
  78. width: 100%; height: 100%; border-radius: 8px;
  79. display: flex; align-items: center; justify-content: center; overflow: hidden;
  80. }
  81. .m-boxface b { max-width: 90%; text-align: center; line-height: 1.2; word-break: break-word; }
  82. .m-face { flex: 1; background: #fff; border: 1px solid #e8e2d5; border-radius: 12px; padding: 8px; position: relative; }
  83. .m-face svg { width: 100%; height: auto; display: block; }
  84. .m-face i { position: absolute; right: 8px; top: 8px; font-style: normal; font-size: 9px; color: #a79d8d; }
  85. /* 快捷提问 */
  86. .m-quick { display: flex; gap: 7px; padding: 10px 12px 4px; overflow-x: auto; }
  87. .m-quick button {
  88. flex: none; border: 1px solid #ddd5c6; background: #fff; color: #4c473f;
  89. border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; white-space: nowrap;
  90. }
  91. .m-quick button:active { border-color: #ff5c2b; color: #ff5c2b; }
  92. /* 输入栏 */
  93. .m-inputbar {
  94. position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 8px;
  95. padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  96. background: linear-gradient(180deg, rgba(244,241,234,0), #f4f1ea 28%);
  97. }
  98. .m-inputbar textarea {
  99. flex: 1; resize: none; border: 1px solid #ddd5c6; border-radius: 12px;
  100. background: #fff; padding: 10px 12px; font-size: 14px; line-height: 1.4;
  101. max-height: 96px; outline: none; font-family: inherit;
  102. }
  103. .m-inputbar textarea:focus { border-color: #ff5c2b; }
  104. .m-inputbar button {
  105. width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%;
  106. background: #ff5c2b; color: #fff; cursor: pointer; display: grid; place-items: center;
  107. }
  108. .m-inputbar button svg { width: 20px; height: 20px; }
  109. .m-inputbar button:disabled { opacity: .5; }
  110. /* ---------------- 订单列表 ---------------- */
  111. .m-orders { flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
  112. .m-order-card { background: #fff; border: 1px solid #e8e2d5; border-radius: 13px; padding: 13px 14px; cursor: pointer; }
  113. .m-order-top { display: flex; align-items: center; gap: 8px; }
  114. .m-order-top b { font-size: 13.5px; }
  115. .m-order-top .st { margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
  116. .st.producing { background: #fff4ec; color: #ff5c2b; }
  117. .st.pending_payment { background: #fdf6ea; color: #d98a1f; }
  118. .st.shipped { background: #eef6f0; color: #3a8a5c; }
  119. .st.done, .st.completed { background: #f1f0ec; color: #6b665e; }
  120. .st.cancelled { background: #f7f0ef; color: #a05a52; }
  121. .m-order-sum { font-size: 12px; color: #6b665e; margin-top: 6px; }
  122. .m-order-foot { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
  123. .m-order-foot .price { margin-left: auto; color: #ff5c2b; font-weight: 800; font-size: 15px; }
  124. .m-order-foot small { color: #a79d8d; font-size: 10.5px; }
  125. .m-orders-empty { text-align: center; padding: 60px 20px; color: #a79d8d; font-size: 13px; }
  126. .m-orders-empty b { display: block; color: #17140f; margin-bottom: 6px; }
  127. /* ---------------- 订单详情 ---------------- */
  128. .m-order-detail { flex: 1; padding: 12px; }
  129. .m-detail-card { background: #fff; border: 1px solid #e8e2d5; border-radius: 13px; padding: 14px; margin-bottom: 10px; }
  130. .m-detail-card h4 { margin: 0 0 10px; font-size: 13px; }
  131. .m-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 4px 0; }
  132. .m-kv span { color: #8a8478; flex: none; }
  133. .m-kv b { font-weight: 600; text-align: right; word-break: break-all; }
  134. .m-track { border-left: 2px solid #eee7da; margin: 4px 0 0 6px; padding-left: 14px; }
  135. .m-track-item { position: relative; padding: 7px 0; font-size: 12.5px; }
  136. .m-track-item::before {
  137. content: ''; position: absolute; left: -19.5px; top: 13px;
  138. width: 7px; height: 7px; border-radius: 50%; background: #ff5c2b;
  139. }
  140. .m-track-item small { display: block; color: #a79d8d; font-size: 10.5px; margin-top: 2px; }
  141. .m-paybar { position: sticky; bottom: 62px; padding: 10px 12px; background: #f4f1ea; }
  142. .m-paybar button {
  143. width: 100%; border: 0; border-radius: 11px; padding: 13px 0;
  144. background: #ff5c2b; color: #fff; font-size: 15px; font-weight: 800; cursor: pointer;
  145. }
  146. .m-back { border: 0; background: none; color: #4c473f; font-size: 13px; padding: 4px 2px; cursor: pointer; }
  147. /* ---------------- 下单面板 ---------------- */
  148. .m-sheet-mask { position: fixed; inset: 0; background: rgba(23,20,15,.45); z-index: 80; }
  149. .m-sheet {
  150. position: fixed; left: 0; right: 0; bottom: 0; z-index: 81;
  151. background: #fffdf8; border-radius: 18px 18px 0 0; max-height: 88dvh;
  152. display: flex; flex-direction: column;
  153. animation: msheet .22s ease-out;
  154. }
  155. .m-sheet[hidden] { display: none; }
  156. @keyframes msheet { from { transform: translateY(40px); opacity: .4; } }
  157. .m-sheet-head {
  158. display: flex; align-items: center; justify-content: space-between;
  159. padding: 14px 16px 10px; border-bottom: 1px solid #f0ece2;
  160. }
  161. .m-sheet-head b { font-size: 15px; }
  162. .m-sheet-head button { border: 0; background: none; font-size: 15px; color: #8a8478; cursor: pointer; }
  163. .m-sheet-body { padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; }
  164. .m-sheet.m-tip .m-sheet-body { text-align: center; padding-top: 20px; }
  165. .m-tip-ic { margin-bottom: 6px; }
  166. .m-tip b { font-size: 15.5px; }
  167. .m-tip p { font-size: 12.5px; color: #6b665e; line-height: 1.7; margin: 8px 0 14px; }
  168. .m-tip-actions { display: flex; gap: 9px; }
  169. .m-tip-actions button { flex: 1; border-radius: 10px; padding: 11px 0; font-size: 13.5px; font-weight: 700; cursor: pointer; }
  170. #mTipCopy { border: 1px solid #ddd5c6; background: #fff; color: #4c473f; }
  171. #mTipOk { border: 0; background: #ff5c2b; color: #fff; }
  172. /* 表单 */
  173. .m-form-row { margin-bottom: 11px; }
  174. .m-form-row label { display: block; font-size: 11px; color: #8a8478; margin-bottom: 5px; font-weight: 600; }
  175. .m-form-row input, .m-form-row select {
  176. width: 100%; box-sizing: border-box; height: 40px; border: 1px solid #ddd5c6;
  177. border-radius: 9px; background: #faf8f2; padding: 0 11px; font-size: 14px;
  178. outline: none; font-family: inherit; color: #17140f;
  179. }
  180. .m-form-row input:focus, .m-form-row select:focus { border-color: #ff5c2b; background: #fff; }
  181. .m-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  182. .m-quote {
  183. display: flex; align-items: baseline; justify-content: space-between;
  184. background: #fff4ec; border-radius: 10px; padding: 11px 13px; margin: 4px 0 12px;
  185. }
  186. .m-quote span { font-size: 12px; color: #8a6a4a; }
  187. .m-quote b { color: #ff5c2b; font-size: 19px; }
  188. .m-quote b small { font-size: 11px; color: #b39277; font-weight: 600; }
  189. .m-submit {
  190. width: 100%; border: 0; border-radius: 11px; padding: 13px 0;
  191. background: #ff5c2b; color: #fff; font-size: 15px; font-weight: 800; cursor: pointer;
  192. }
  193. .m-submit:disabled { opacity: .55; }
  194. /* ---------------- Tabbar ---------------- */
  195. .m-tabbar {
  196. position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  197. display: flex; background: #fff; border-top: 1px solid #e8e2d5;
  198. padding-bottom: env(safe-area-inset-bottom);
  199. }
  200. .m-tabbar button {
  201. flex: 1; border: 0; background: none; cursor: pointer;
  202. display: flex; flex-direction: column; align-items: center; gap: 2px;
  203. padding: 7px 0 6px; color: #a79d8d; font-size: 10px;
  204. }
  205. .m-tabbar button svg { width: 21px; height: 21px; }
  206. .m-tabbar button.on { color: #ff5c2b; font-weight: 700; }
  207. /* Toast */
  208. .m-toast {
  209. position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  210. background: rgba(23,20,15,.92); color: #fff; font-size: 13px;
  211. border-radius: 9px; padding: 9px 16px; z-index: 99; max-width: 84vw; text-align: center;
  212. }
  213. .m-toast[hidden] { display: none; }
  214. /* 桌面访问提示条 */
  215. .m-desktop-tip {
  216. background: #fff4ec; color: #b35a1f; font-size: 12px;
  217. padding: 8px 14px; text-align: center;
  218. }