mobile.css 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. /* ===== Mobile Experience Upgrade ===== */
  2. /* Import this file in all articles: <link rel="stylesheet" href="../css/mobile.css"> */
  3. /* 品牌橙主题(口径手册 V1.1):主色 #F97316,强调色 #0B7A5B,卡片克制边框、留白优先 */
  4. /* === Base Mobile Reset === */
  5. @media (max-width: 768px) {
  6. :root {
  7. --mobile-padding: 1rem;
  8. --mobile-radius: 12px;
  9. --touch-target: 44px; /* Apple HIG minimum */
  10. }
  11. /* Improve text readability */
  12. body {
  13. font-size: 16px; /* Prevent iOS zoom */
  14. line-height: 1.7;
  15. -webkit-text-size-adjust: 100%;
  16. }
  17. /* Hero optimizations */
  18. .hero {
  19. padding: 5rem var(--mobile-padding) 2.5rem !important;
  20. min-height: auto !important;
  21. }
  22. .hero h1 {
  23. font-size: 1.75rem !important;
  24. line-height: 1.3 !important;
  25. }
  26. .hero p {
  27. font-size: 0.95rem !important;
  28. }
  29. .hero-stats {
  30. flex-direction: column;
  31. gap: 0.75rem !important;
  32. }
  33. .hero-stat {
  34. min-width: 100% !important;
  35. padding: 0.75rem !important;
  36. }
  37. .hero-stat .num {
  38. font-size: 1.5rem !important;
  39. }
  40. /* Section padding */
  41. section {
  42. padding: 2rem var(--mobile-padding) !important;
  43. }
  44. /* Card optimizations */
  45. .info-card,
  46. .card {
  47. padding: 1.25rem !important;
  48. border-radius: var(--mobile-radius) !important;
  49. margin-bottom: 1rem !important;
  50. }
  51. .info-card h2,
  52. .card h3 {
  53. font-size: 1.25rem !important;
  54. }
  55. /* Grid → Single column */
  56. .grid-2,
  57. .grid-3,
  58. .infographic,
  59. .pathway-grid {
  60. grid-template-columns: 1fr !important;
  61. gap: 1rem !important;
  62. }
  63. /* Table horizontal scroll */
  64. .data-table-wrap {
  65. overflow-x: auto;
  66. -webkit-overflow-scrolling: touch;
  67. margin: 1rem calc(-1 * var(--mobile-padding)) !important;
  68. padding: 0 var(--mobile-padding);
  69. }
  70. .data-table {
  71. min-width: 600px; /* Force scroll on narrow screens */
  72. font-size: 0.85rem !important;
  73. }
  74. .data-table th,
  75. .data-table td {
  76. padding: 0.6rem 0.75rem !important;
  77. white-space: nowrap;
  78. }
  79. /* Screenshot responsive */
  80. .screenshot-block {
  81. margin: 1rem calc(-1 * var(--mobile-padding)) !important;
  82. border-radius: 0 !important;
  83. }
  84. .screenshot-block img {
  85. max-width: 100%;
  86. height: auto;
  87. }
  88. /* Evidence links */
  89. .evidence-link {
  90. padding: 1rem !important;
  91. flex-direction: column;
  92. gap: 0.75rem !important;
  93. }
  94. .evidence-link .link-icon {
  95. font-size: 1.25rem !important;
  96. }
  97. /* Highlight boxes */
  98. .highlight-box {
  99. padding: 1rem 1.25rem !important;
  100. margin: 1rem 0 !important;
  101. }
  102. /* TOC navigation */
  103. .toc-inner {
  104. padding: 0.5rem var(--mobile-padding) !important;
  105. gap: 0.5rem !important;
  106. }
  107. .toc-inner a {
  108. padding: 0.5rem 0.75rem !important;
  109. font-size: 0.8rem !important;
  110. white-space: nowrap;
  111. }
  112. /* Reference list */
  113. .ref-list {
  114. padding-left: 1.25rem !important;
  115. }
  116. .ref-list li {
  117. font-size: 0.85rem !important;
  118. line-height: 1.6 !important;
  119. }
  120. /* Section nav */
  121. .section-nav {
  122. gap: 0.5rem !important;
  123. }
  124. .section-nav a {
  125. padding: 0.5rem 0.75rem !important;
  126. font-size: 0.8rem !important;
  127. }
  128. /* Footer */
  129. .footer-inner {
  130. flex-direction: column;
  131. gap: 2rem !important;
  132. }
  133. .footer-links {
  134. flex-direction: column;
  135. gap: 1.5rem !important;
  136. }
  137. /* Pathway cards */
  138. .pathway-card {
  139. border-top-width: 3px !important;
  140. padding: 1.25rem !important;
  141. }
  142. .pathway-card h4 {
  143. font-size: 0.95rem !important;
  144. }
  145. /* Warning boxes */
  146. .warning {
  147. padding: 0.875rem 1rem !important;
  148. font-size: 0.875rem !important;
  149. }
  150. /* Infographic items */
  151. .info-item {
  152. padding: 1.25rem !important;
  153. }
  154. .info-item .icon {
  155. font-size: 1.75rem !important;
  156. }
  157. .info-item h4 {
  158. font-size: 0.9rem !important;
  159. }
  160. .info-item p {
  161. font-size: 0.82rem !important;
  162. }
  163. /* 品牌橙 · 温暖生活流 / 时间轴移动端适配 */
  164. .evidence-chain {
  165. padding: 1rem !important;
  166. }
  167. .ec-head {
  168. padding-bottom: .6rem !important;
  169. margin-bottom: .6rem !important;
  170. }
  171. .ec-track::before {
  172. left: 15px;
  173. }
  174. .orbit-item.ec-node {
  175. min-height: 52px !important;
  176. padding: .5rem .65rem !important;
  177. }
  178. .ec-idx {
  179. width: 24px;
  180. height: 24px;
  181. font-size: .68rem !important;
  182. }
  183. .ec-body strong {
  184. font-size: .82rem !important;
  185. }
  186. .ec-body small {
  187. font-size: .7rem !important;
  188. }
  189. .concept-panel {
  190. padding: 1.25rem 1rem !important;
  191. }
  192. /* 三段式主线:移动端堆叠 */
  193. .understand-grid {
  194. grid-template-columns: 1fr !important;
  195. gap: 1rem !important;
  196. }
  197. .understand-card {
  198. padding: 1.25rem 1rem !important;
  199. }
  200. .understand-card h3 {
  201. font-size: 1.15rem !important;
  202. }
  203. .section-tip {
  204. text-align: center !important;
  205. font-size: .85rem !important;
  206. }
  207. .concept-loop-track {
  208. gap: .35rem !important;
  209. }
  210. .concept-chip {
  211. padding: .35rem .6rem !important;
  212. font-size: .8rem !important;
  213. }
  214. .compliance-note {
  215. font-size: .72rem !important;
  216. text-align: left !important;
  217. padding: .75rem 1rem !important;
  218. }
  219. /* 生活方式图片位 */
  220. .lifestyle-shot--hero {
  221. max-width: 100% !important;
  222. aspect-ratio: 16 / 10 !important;
  223. }
  224. .lifestyle-shot-hint {
  225. font-size: .7rem !important;
  226. }
  227. }
  228. /* === Small phones (≤480px) === */
  229. @media (max-width: 480px) {
  230. .hero h1 {
  231. font-size: 1.5rem !important;
  232. }
  233. .hero-stat .num {
  234. font-size: 1.25rem !important;
  235. }
  236. .info-card h2,
  237. .card h3 {
  238. font-size: 1.15rem !important;
  239. }
  240. .data-table {
  241. min-width: 500px;
  242. }
  243. }
  244. /* === Touch target sizing === */
  245. @media (hover: none) and (pointer: coarse) {
  246. a, button, .toc-inner a, .section-nav a {
  247. min-height: var(--touch-target);
  248. min-width: var(--touch-target);
  249. }
  250. /* Increase tap area for links in text */
  251. p a {
  252. padding: 0.125rem 0;
  253. border-bottom: 1px solid currentColor;
  254. }
  255. }
  256. /* === Safe area for notched phones === */
  257. @supports (padding: env(safe-area-inset-bottom)) {
  258. .site-footer {
  259. padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  260. }
  261. }