mobile.css 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. /* ===== Mobile Experience Upgrade ===== */
  2. /* Import this file in all articles: <link rel="stylesheet" href="../css/mobile.css"> */
  3. /* 品牌紫主题(口径手册 2026-11-23):主色 #534AB7,强调色 #0f6e56,卡片克制边框、留白优先 */
  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. .concept-loop-track {
  193. gap: .35rem !important;
  194. }
  195. .concept-chip {
  196. padding: .35rem .6rem !important;
  197. font-size: .8rem !important;
  198. }
  199. .compliance-note {
  200. font-size: .72rem !important;
  201. text-align: left !important;
  202. padding: .75rem 1rem !important;
  203. }
  204. }
  205. /* === Small phones (≤480px) === */
  206. @media (max-width: 480px) {
  207. .hero h1 {
  208. font-size: 1.5rem !important;
  209. }
  210. .hero-stat .num {
  211. font-size: 1.25rem !important;
  212. }
  213. .info-card h2,
  214. .card h3 {
  215. font-size: 1.15rem !important;
  216. }
  217. .data-table {
  218. min-width: 500px;
  219. }
  220. }
  221. /* === Touch target sizing === */
  222. @media (hover: none) and (pointer: coarse) {
  223. a, button, .toc-inner a, .section-nav a {
  224. min-height: var(--touch-target);
  225. min-width: var(--touch-target);
  226. }
  227. /* Increase tap area for links in text */
  228. p a {
  229. padding: 0.125rem 0;
  230. border-bottom: 1px solid currentColor;
  231. }
  232. }
  233. /* === Safe area for notched phones === */
  234. @supports (padding: env(safe-area-inset-bottom)) {
  235. .site-footer {
  236. padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  237. }
  238. }