m.css 11 KB

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