style.css 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. /* 世界树 · 太阳系 —— 样式:单屏游戏感(深空底 + 玻璃卡 + 生命绿),移动端优先。署名:FmodeCode */
  2. :root {
  3. --bg0: #070c18; --bg1: #0d1424; --bg2: #121c33;
  4. --ink: #e9f1ff; --muted: #8fa2c4; --line: rgba(150, 190, 255, .14);
  5. --green: #5fd68a; --green2: #9cffc0; --gold: #f4c95d; --red: #ff7a6b; --blue: #7fb2ff;
  6. --glass: rgba(18, 28, 51, .72);
  7. --radius: 16px;
  8. --safe-b: env(safe-area-inset-bottom, 0px);
  9. --tap: 44px;
  10. font-synthesis: none;
  11. }
  12. * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  13. html, body { margin: 0; height: 100%; }
  14. body {
  15. background: radial-gradient(1200px 700px at 50% -10%, #1b2b4d 0%, var(--bg1) 45%, var(--bg0) 100%);
  16. color: var(--ink);
  17. font-family: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  18. overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none;
  19. }
  20. button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
  21. svg { display: block; }
  22. [hidden] { display: none !important; }
  23. .app { display: flex; flex-direction: column; height: 100dvh; max-width: 560px; margin: 0 auto; position: relative; overflow: hidden; }
  24. /* ── 顶栏 ── */
  25. .topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(4px + env(safe-area-inset-top, 0px)) 14px 4px; gap: 8px; }
  26. .res { display: flex; align-items: center; gap: 6px; min-width: 0; }
  27. .res .ico-res { width: 22px; height: 22px; color: var(--green); filter: drop-shadow(0 0 6px rgba(95,214,138,.6)); }
  28. .res b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
  29. .res span { font-size: 12px; color: var(--green2); opacity: .85; white-space: nowrap; }
  30. .top-right { display: flex; align-items: center; gap: 8px; }
  31. /* 触控目标 ≥44px:文字保持 32px 视觉高度,用透明内边距补足可点击区域 */
  32. .chip { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); font-size: 13px; min-width: var(--tap); justify-content: center; }
  33. .chip svg { width: 16px; height: 16px; color: var(--green); }
  34. .chip.gold svg { color: var(--gold); }
  35. .chip::before { content: ""; position: absolute; inset: -6px -2px; }
  36. .top-right { padding-block: 12px; margin-block: -12px; }
  37. #res-box { position: relative; }
  38. #res-box::before { content: ""; position: absolute; inset: -8px -4px; }
  39. .chip b { font-variant-numeric: tabular-nums; }
  40. .icon-btn { width: var(--tap); height: var(--tap); display: grid; place-items: center; font-size: 20px; border-radius: 50%; color: var(--muted); }
  41. .icon-btn:active { background: rgba(255,255,255,.06); }
  42. /* ── 目标 ── */
  43. .goal { margin: 6px 12px 0; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; min-height: 52px;
  44. border-radius: 14px; background: linear-gradient(90deg, rgba(95,214,138,.16), rgba(95,214,138,.04) 70%, rgba(18,28,51,.4));
  45. border: 1px solid rgba(95,214,138,.32); box-shadow: 0 0 0 1px rgba(95,214,138,.06) inset; }
  46. .goal .goal-pin { color: var(--green2); font-size: 18px; animation: pulse 2.2s infinite; }
  47. .goal .goal-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  48. .goal b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  49. .goal small { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  50. .goal .goal-go { color: var(--green); font-size: 22px; }
  51. .goal.flash { animation: goalflash .9s; }
  52. /* ── 星图 ── */
  53. .stage { position: relative; flex: 1; min-height: 0; margin: 4px 0 0; }
  54. #system { position: absolute; inset: 0; width: 100%; height: 100%; }
  55. .stage::before { content: ""; position: absolute; inset: 6% 4%; border-radius: 50%; border: 1px dashed rgba(150,190,255,.07); }
  56. .stage::after { content: ""; position: absolute; left: 50%; bottom: 4%; width: 70%; height: 22%; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(95,214,138,.10), transparent 70%); pointer-events: none; }
  57. .system-planet { cursor: pointer; }
  58. .system-planet .halo { transition: opacity .6s, transform .6s; transform-origin: center; }
  59. .system-planet.pulse .halo { animation: ringpulse 2.4s infinite; }
  60. .system-planet.pulse .body { animation: bob 3s ease-in-out infinite; }
  61. .system-planet.locked { opacity: .42; filter: grayscale(.6); }
  62. .system-planet .label { fill: var(--muted); font-size: 9.5px; text-anchor: middle; pointer-events: none; }
  63. .system-planet.current .label { fill: var(--ink); font-weight: 600; }
  64. .sun-body { animation: sunspin 60s linear infinite; transform-origin: center; }
  65. .planet-chip { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); background: rgba(7,12,24,.72); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; font-size: 12px; color: var(--muted); white-space: nowrap; backdrop-filter: blur(8px); }
  66. .planet-chip b { color: var(--ink); }
  67. /* ── 底部:树 / 进度 / 生命 ── */
  68. .dock { padding: 0 12px 6px; display: grid; grid-template-columns: 78px 1fr; grid-template-rows: auto auto; gap: 8px 10px; }
  69. .tree-wrap { grid-row: 1 / span 2; display: grid; place-items: end center; }
  70. .tree { position: relative; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, rgba(95,214,138,.22), rgba(95,214,138,0) 70%); }
  71. .tree svg { width: 68px; height: 68px; transition: transform .12s; filter: drop-shadow(0 0 10px rgba(95,214,138,.55)); }
  72. .tree:active svg { transform: scale(.9); }
  73. .tree.hint { animation: hint 1.6s infinite; }
  74. .tree-crown { transform-origin: 60px 55px; transition: transform .3s; }
  75. .tree-fruit { animation: twinkle 3s infinite; }
  76. .tree-float { position: absolute; top: -4px; left: 50%; font-size: 14px; font-weight: 700; color: var(--green2); opacity: 0; pointer-events: none; white-space: nowrap; }
  77. .tree-float.go { animation: floatup .9s ease-out; }
  78. .progress-card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 9px; min-width: 0; }
  79. .pc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  80. .pc-name { font-weight: 700; font-size: 15px; }
  81. .pc-env { font-size: 11px; color: var(--muted); }
  82. .pc-env.bad { color: var(--red); } .pc-env.good { color: var(--green2); }
  83. .bar { position: relative; height: 14px; border-radius: 7px; background: rgba(140,170,220,.14); margin: 7px 0 6px; overflow: hidden; }
  84. .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 7px; background: linear-gradient(90deg, #2f9e62, var(--green), var(--green2)); box-shadow: 0 0 12px rgba(95,214,138,.6); transition: width .4s linear; }
  85. .bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: translateX(-100%); animation: shine 2.6s infinite; }
  86. .bar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
  87. .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
  88. .pc-foot > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  89. .pc-foot { position: relative; }
  90. .mini-hit { display: none; }
  91. .mini { position: relative; height: 30px; min-width: var(--tap); padding: 0 12px; border-radius: 15px; font-size: 12.5px; font-weight: 600; background: rgba(95,214,138,.14); color: var(--green2); border: 1px solid rgba(95,214,138,.35); flex: none; }
  92. .mini { margin-block: 7px; }
  93. .pc-foot { padding-block: 4px; }
  94. .mini:disabled { opacity: .38; }
  95. .mini.gold { background: rgba(244,201,93,.14); color: var(--gold); border-color: rgba(244,201,93,.35); }
  96. .mini.red { background: rgba(255,122,107,.16); color: var(--red); border-color: rgba(255,122,107,.4); animation: hint 1.2s infinite; }
  97. .lives { grid-column: 2; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  98. .lives::-webkit-scrollbar { display: none; }
  99. .life-btn { flex: none; min-width: 68px; height: 62px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 6px; position: relative; }
  100. .life-btn svg { width: 22px; height: 22px; color: var(--green2); }
  101. .life-btn .nm { font-size: 11px; }
  102. .life-btn .lv { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
  103. .life-btn.buyable { border-color: rgba(95,214,138,.7); box-shadow: 0 0 14px rgba(95,214,138,.28); }
  104. .life-btn.buyable::after { content: "↑"; position: absolute; top: 2px; right: 6px; color: var(--green2); font-weight: 700; }
  105. .life-btn.locked { opacity: .5; }
  106. .life-btn.locked svg { color: var(--muted); }
  107. .life-btn.locked .lv { color: var(--green); }
  108. .life-btn.flash { animation: lifebuy .5s; }
  109. .life-btn .next-tag { position: absolute; bottom: -1px; font-size: 9px; color: var(--gold); }
  110. /* ── 底栏 ── */
  111. .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(7,12,24,.85); backdrop-filter: blur(10px); padding-bottom: var(--safe-b); }
  112. .tabbar button { height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); position: relative; }
  113. .tabbar svg { width: 22px; height: 22px; }
  114. .tabbar button.on { color: var(--green2); }
  115. .tabbar button .dot { position: absolute; top: 8px; right: calc(50% - 16px); width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
  116. .era-badge { position: absolute; right: 14px; top: calc(58px + env(safe-area-inset-top, 0px)); font-size: 11px; color: var(--gold); background: rgba(244,201,93,.12); border: 1px solid rgba(244,201,93,.3); padding: 3px 8px; border-radius: 10px; }
  117. /* ── 开场故事 ── */
  118. .screen.prologue { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: #05080f; }
  119. .pro-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(.55) saturate(1.05); transition: opacity .8s; animation: kenburns 18s ease-in-out infinite alternate; }
  120. .pro-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,8,15,.35), rgba(5,8,15,.2) 40%, rgba(5,8,15,.95) 85%); }
  121. .pro-body { position: relative; padding: 0 26px 12px; animation: fadeup .9s both; }
  122. .pro-kicker { color: var(--green2); font-size: 12px; letter-spacing: 3px; margin-bottom: 10px; }
  123. .pro-text { font-size: 24px; line-height: 1.5; font-weight: 700; white-space: pre-line; text-shadow: 0 2px 16px rgba(0,0,0,.6); }
  124. .pro-lines { margin-top: 14px; color: #c7d4ec; font-size: 14.5px; line-height: 1.85; }
  125. .pro-lines p { margin: 0; }
  126. .pro-foot { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 26px calc(22px + var(--safe-b)); }
  127. .pro-dots { display: flex; gap: 6px; flex: 1; }
  128. .pro-dots i { width: 18px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.2); }
  129. .pro-dots i.on { background: var(--green2); }
  130. .btn { min-height: var(--tap); padding: 0 22px; border-radius: 22px; font-weight: 700; font-size: 15px; }
  131. .btn.primary { background: linear-gradient(135deg, #38b46f, #7ff0a6); color: #06130b; box-shadow: 0 6px 24px rgba(95,214,138,.35); }
  132. .btn.primary:active { transform: scale(.97); }
  133. .btn.ghost { border: 1px solid var(--line); color: var(--muted); }
  134. .link { color: var(--muted); font-size: 13px; padding: 0 6px; min-height: var(--tap); }
  135. /* ── 底部抽屉(生命 / 星图 / 纪元 / 成就)── */
  136. .sheet-mask { position: fixed; inset: 0; background: rgba(3,6,12,.55); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
  137. .sheet { width: 100%; max-width: 560px; max-height: 82dvh; display: flex; flex-direction: column; background: linear-gradient(180deg, #14203a, #0c1323); border-radius: 22px 22px 0 0; border: 1px solid var(--line); border-bottom: 0; animation: sheetup .28s cubic-bezier(.2,.8,.2,1); padding-bottom: var(--safe-b); }
  138. .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 18px; }
  139. .sheet-head h2 { margin: 0; font-size: 18px; }
  140. .sheet-body { overflow-y: auto; padding: 6px 16px 14px; -webkit-overflow-scrolling: touch; }
  141. .sheet-foot { padding: 0 16px 14px; }
  142. .sec-title { font-size: 12px; color: var(--muted); letter-spacing: 1px; margin: 14px 0 8px; }
  143. .card { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
  144. .row { display: flex; align-items: center; gap: 10px; }
  145. .row .grow { flex: 1; min-width: 0; }
  146. .kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; }
  147. .kv + .kv { border-top: 1px dashed rgba(150,190,255,.1); }
  148. .kv .k { color: var(--muted); }
  149. .kv .v { font-variant-numeric: tabular-nums; font-weight: 600; }
  150. .muted { color: var(--muted); }
  151. .small { font-size: 12px; }
  152. .lore { font-size: 13px; line-height: 1.75; color: #c8d5ea; white-space: pre-line; }
  153. .life-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; }
  154. .life-card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(95,214,138,.1); }
  155. .life-card .ic svg { width: 26px; height: 26px; color: var(--green2); }
  156. .life-card.locked .ic svg { color: var(--muted); }
  157. .life-card h4 { margin: 0 0 2px; font-size: 14.5px; }
  158. .life-card p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
  159. .buy { min-width: 76px; min-height: 40px; padding: 0 12px; border-radius: 12px; background: rgba(95,214,138,.16); border: 1px solid rgba(95,214,138,.4); color: var(--green2); font-weight: 700; font-size: 13px; }
  160. .buy:disabled { opacity: .4; }
  161. .buy .c { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); }
  162. .planet-list { display: grid; gap: 8px; }
  163. .pcard { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
  164. .pcard.cleared { border-color: rgba(95,214,138,.4); background: linear-gradient(90deg, rgba(95,214,138,.12), rgba(255,255,255,.02)); }
  165. .pcard.locked { opacity: .55; }
  166. .pcard.cur { border-color: rgba(95,214,138,.7); box-shadow: 0 0 18px rgba(95,214,138,.18); }
  167. .pcard .orb { width: 40px; height: 40px; border-radius: 50%; }
  168. .pcard h4 { margin: 0; font-size: 14px; } .pcard p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
  169. .pcard .go { font-size: 12px; color: var(--green2); font-weight: 700; }
  170. .pcard .go.lock { color: var(--muted); }
  171. .ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  172. .ach { text-align: center; padding: 10px 6px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); opacity: .5; }
  173. .ach.on { opacity: 1; border-color: rgba(244,201,93,.4); background: linear-gradient(180deg, rgba(244,201,93,.12), rgba(255,255,255,.02)); }
  174. .ach .ic { width: 38px; height: 38px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: rgba(244,201,93,.12); }
  175. .ach .ic svg { width: 22px; height: 22px; color: var(--gold); }
  176. .ach b { font-size: 11.5px; display: block; } .ach small { font-size: 10px; color: var(--muted); display: block; margin-top: 2px; line-height: 1.35; }
  177. .era-hero { text-align: center; padding: 6px 0 4px; }
  178. .era-hero .big { font-size: 40px; font-weight: 800; color: var(--gold); text-shadow: 0 0 24px rgba(244,201,93,.5); font-variant-numeric: tabular-nums; }
  179. .era-hero .lbl { color: var(--muted); font-size: 12px; letter-spacing: 2px; }
  180. .lock-note { display: flex; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255,122,107,.08); border: 1px solid rgba(255,122,107,.25); font-size: 13px; line-height: 1.6; color: #ffd4cf; }
  181. .lock-note svg { width: 22px; height: 22px; color: var(--red); flex: none; }
  182. .curio-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  183. .curio { padding: 12px 8px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); text-align: center; }
  184. .curio svg { width: 26px; height: 26px; margin: 0 auto 6px; color: var(--gold); }
  185. .curio b { display: block; font-size: 13px; } .curio small { font-size: 10.5px; color: var(--muted); display: block; margin-top: 3px; line-height: 1.4; }
  186. .curio .own { font-size: 10px; color: var(--gold); margin-top: 4px; }
  187. /* ── 事件 / 里程碑弹窗 ── */
  188. .modal-mask { position: fixed; inset: 0; z-index: 60; background: rgba(3,6,12,.62); display: grid; place-items: center; padding: 18px; animation: fade .25s; backdrop-filter: blur(3px); }
  189. .modal { width: 100%; max-width: 420px; max-height: 88dvh; overflow-y: auto; border-radius: 22px; background: linear-gradient(180deg, #17243f, #0c1323); border: 1px solid rgba(150,190,255,.18); box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: pop .32s cubic-bezier(.2,.9,.3,1.2); }
  190. .modal-art { height: 86px; background: radial-gradient(120% 140% at 50% 0%, rgba(95,214,138,.35), transparent 70%); position: relative; overflow: hidden; }
  191. .modal-art::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255,255,255,.55) 1px, transparent 1px); background-size: 34px 34px; opacity: .35; }
  192. .modal-art .sigil { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; transform: translate(-50%, -30%); border-radius: 50%; display: grid; place-items: center; background: rgba(7,12,24,.7); border: 1px solid rgba(95,214,138,.45); }
  193. .modal-art .sigil svg { width: 34px; height: 34px; color: var(--green2); }
  194. .modal-body { padding: 4px 20px 18px; }
  195. .modal-kicker { font-size: 11px; letter-spacing: 2px; color: var(--green2); }
  196. .modal h2 { margin: 6px 0 10px; font-size: 22px; }
  197. .modal-text { font-size: 14.5px; line-height: 1.85; color: #d4e0f3; white-space: pre-line; }
  198. .modal-choices { display: grid; gap: 8px; margin-top: 16px; }
  199. .choice { text-align: left; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); min-height: var(--tap); }
  200. .choice b { display: block; font-size: 14px; font-weight: 600; }
  201. .choice small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--green2); }
  202. .choice:active { background: rgba(95,214,138,.12); }
  203. .modal-choices .btn { width: 100%; }
  204. .story-line { border-left: 2px solid rgba(95,214,138,.5); padding-left: 12px; margin: 10px 0; color: #c8d5ea; font-size: 13.5px; line-height: 1.75; }
  205. /* ── 提示 / 成就 toast ── */
  206. #toasts { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 8px; width: min(94vw, 420px); pointer-events: none; }
  207. .toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(18,28,51,.94); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 13px; animation: toastin .35s cubic-bezier(.2,.9,.3,1.2); }
  208. .toast.ach { border-color: rgba(244,201,93,.55); background: linear-gradient(90deg, rgba(244,201,93,.2), rgba(18,28,51,.96) 60%); }
  209. .toast .ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(244,201,93,.16); flex: none; }
  210. .toast .ic svg { width: 18px; height: 18px; color: var(--gold); }
  211. .toast b { display: block; font-size: 13px; } .toast small { color: var(--muted); font-size: 11.5px; }
  212. .toast.out { animation: toastout .3s forwards; }
  213. .toast.green { border-color: rgba(95,214,138,.5); }
  214. /* ── 特效层 ── */
  215. #fx { position: fixed; inset: 0; pointer-events: none; z-index: 65; overflow: hidden; }
  216. .fly { position: absolute; font-size: 13px; font-weight: 800; color: var(--green2); text-shadow: 0 0 8px rgba(95,214,138,.8); animation: flyup .85s ease-out forwards; }
  217. .spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--green2); box-shadow: 0 0 10px var(--green2); animation: sparkfade .6s ease-out forwards; }
  218. .confetti { position: absolute; width: 8px; height: 12px; border-radius: 2px; animation: confetti 2.2s ease-in forwards; }
  219. .ripple { position: absolute; border-radius: 50%; border: 2px solid var(--green2); animation: ripple .7s ease-out forwards; }
  220. .global-flash { animation: gf 1.2s; }
  221. /* ── 动画 ── */
  222. @keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
  223. @keyframes ringpulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
  224. @keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
  225. @keyframes sunspin { to { transform: rotate(360deg); } }
  226. @keyframes twinkle { 0%,100% { opacity: .6; } 50% { opacity: 1; } }
  227. @keyframes hint { 0%,100% { filter: drop-shadow(0 0 6px rgba(95,214,138,.5)); } 50% { filter: drop-shadow(0 0 16px rgba(156,255,192,.95)); } }
  228. @keyframes floatup { 0% { opacity: 1; transform: translate(-50%, 0) scale(.9); } 100% { opacity: 0; transform: translate(-50%, -42px) scale(1.15); } }
  229. @keyframes shine { 0% { transform: translateX(-100%); } 60%,100% { transform: translateX(100%); } }
  230. @keyframes lifebuy { 0% { transform: scale(1); } 40% { transform: scale(1.12); border-color: var(--green2); } 100% { transform: scale(1); } }
  231. @keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
  232. @keyframes fadeup { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  233. @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  234. @keyframes sheetup { from { transform: translateY(100%); } to { transform: none; } }
  235. @keyframes pop { from { opacity: 0; transform: scale(.92) translateY(10px); } to { opacity: 1; transform: none; } }
  236. @keyframes toastin { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
  237. @keyframes toastout { to { opacity: 0; transform: translateY(-10px); } }
  238. @keyframes flyup { 0% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -56px) scale(1.2); } }
  239. @keyframes sparkfade { to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); } }
  240. @keyframes confetti { 0% { opacity: 1; transform: translate(var(--x0), 0) rotate(0); } 100% { opacity: 0; transform: translate(calc(var(--x0) + var(--dx)), 110vh) rotate(720deg); } }
  241. @keyframes ripple { to { opacity: 0; transform: scale(2.2); } }
  242. @keyframes goalflash { 0%,100% { box-shadow: none; } 40% { box-shadow: 0 0 30px rgba(95,214,138,.6); } }
  243. @keyframes gf { 0% { box-shadow: inset 0 0 0 rgba(95,214,138,0); } 30% { box-shadow: inset 0 0 120px rgba(95,214,138,.55); } 100% { box-shadow: inset 0 0 0 rgba(95,214,138,0); } }
  244. /* ── 桌面:居中单屏,加大留白 ── */
  245. @media (min-width: 720px) {
  246. body { background: radial-gradient(1400px 900px at 50% -20%, #1d3057 0%, #0a1120 55%, #05080f 100%); }
  247. .app { max-width: 520px; height: 100dvh; border-left: 1px solid rgba(150,190,255,.07); border-right: 1px solid rgba(150,190,255,.07); background: radial-gradient(800px 600px at 50% 30%, rgba(30,50,90,.35), transparent 70%); }
  248. }
  249. @media (max-width: 360px) {
  250. .res b { font-size: 19px; } .goal b { font-size: 13px; } .life-btn { min-width: 62px; }
  251. }
  252. @media (prefers-reduced-motion: reduce) {
  253. *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important; }
  254. }
  255. body.in-prologue #app { visibility: hidden; }
  256. .kv .k svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
  257. .kv .k { white-space: nowrap; }
  258. .progress-card.cleared { border-color: rgba(95,214,138,.45); background: linear-gradient(90deg, rgba(95,214,138,.16), var(--glass) 70%); }
  259. #toasts { pointer-events: none; }
  260. .chip { margin-block: 6px; }
  261. /* 无障碍:键盘焦点可见(按钮、抽屉、卡片) */
  262. button:focus-visible, .pcard:focus-visible, .curio:focus-visible { outline: 2px solid var(--green2); outline-offset: 2px; }
  263. .skip-link { position: absolute; left: -999px; }
  264. .skip-link:focus { left: 8px; top: 8px; z-index: 100; background: var(--bg1); padding: 8px 12px; border-radius: 8px; }