/* 世界树 · 太阳系 —— 样式:单屏游戏感(深空底 + 玻璃卡 + 生命绿),移动端优先。署名:FmodeCode */ :root { --bg0: #070c18; --bg1: #0d1424; --bg2: #121c33; --ink: #e9f1ff; --muted: #8fa2c4; --line: rgba(150, 190, 255, .14); --green: #5fd68a; --green2: #9cffc0; --gold: #f4c95d; --red: #ff7a6b; --blue: #7fb2ff; --glass: rgba(18, 28, 51, .72); --radius: 16px; --safe-b: env(safe-area-inset-bottom, 0px); --tap: 44px; font-synthesis: none; } * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; } html, body { margin: 0; height: 100%; } body { background: radial-gradient(1200px 700px at 50% -10%, #1b2b4d 0%, var(--bg1) 45%, var(--bg0) 100%); color: var(--ink); font-family: -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; } button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; } svg { display: block; } [hidden] { display: none !important; } .app { display: flex; flex-direction: column; height: 100dvh; max-width: 560px; margin: 0 auto; position: relative; overflow: hidden; } /* ── 顶栏 ── */ .topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(4px + env(safe-area-inset-top, 0px)) 14px 4px; gap: 8px; } .res { display: flex; align-items: center; gap: 6px; min-width: 0; } .res .ico-res { width: 22px; height: 22px; color: var(--green); filter: drop-shadow(0 0 6px rgba(95,214,138,.6)); } .res b { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: .5px; } .res span { font-size: 12px; color: var(--green2); opacity: .85; white-space: nowrap; } .top-right { display: flex; align-items: center; gap: 8px; } /* 触控目标 ≥44px:文字保持 32px 视觉高度,用透明内边距补足可点击区域 */ .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; } .chip svg { width: 16px; height: 16px; color: var(--green); } .chip.gold svg { color: var(--gold); } .chip::before { content: ""; position: absolute; inset: -6px -2px; } .top-right { padding-block: 12px; margin-block: -12px; } #res-box { position: relative; } #res-box::before { content: ""; position: absolute; inset: -8px -4px; } .chip b { font-variant-numeric: tabular-nums; } .icon-btn { width: var(--tap); height: var(--tap); display: grid; place-items: center; font-size: 20px; border-radius: 50%; color: var(--muted); } .icon-btn:active { background: rgba(255,255,255,.06); } /* ── 目标 ── */ .goal { margin: 6px 12px 0; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; min-height: 52px; border-radius: 14px; background: linear-gradient(90deg, rgba(95,214,138,.16), rgba(95,214,138,.04) 70%, rgba(18,28,51,.4)); border: 1px solid rgba(95,214,138,.32); box-shadow: 0 0 0 1px rgba(95,214,138,.06) inset; } .goal .goal-pin { color: var(--green2); font-size: 18px; animation: pulse 2.2s infinite; } .goal .goal-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .goal b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .goal small { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .goal .goal-go { color: var(--green); font-size: 22px; } .goal.flash { animation: goalflash .9s; } /* ── 星图 ── */ .stage { position: relative; flex: 1; min-height: 0; margin: 4px 0 0; } #system { position: absolute; inset: 0; width: 100%; height: 100%; } .stage::before { content: ""; position: absolute; inset: 6% 4%; border-radius: 50%; border: 1px dashed rgba(150,190,255,.07); } .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; } .system-planet { cursor: pointer; } .system-planet .halo { transition: opacity .6s, transform .6s; transform-origin: center; } .system-planet.pulse .halo { animation: ringpulse 2.4s infinite; } .system-planet.pulse .body { animation: bob 3s ease-in-out infinite; } .system-planet.locked { opacity: .42; filter: grayscale(.6); } .system-planet .label { fill: var(--muted); font-size: 9.5px; text-anchor: middle; pointer-events: none; } .system-planet.current .label { fill: var(--ink); font-weight: 600; } .sun-body { animation: sunspin 60s linear infinite; transform-origin: center; } .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); } .planet-chip b { color: var(--ink); } /* ── 底部:树 / 进度 / 生命 ── */ .dock { padding: 0 12px 6px; display: grid; grid-template-columns: 78px 1fr; grid-template-rows: auto auto; gap: 8px 10px; } .tree-wrap { grid-row: 1 / span 2; display: grid; place-items: end center; } .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%); } .tree svg { width: 68px; height: 68px; transition: transform .12s; filter: drop-shadow(0 0 10px rgba(95,214,138,.55)); } .tree:active svg { transform: scale(.9); } .tree.hint { animation: hint 1.6s infinite; } .tree-crown { transform-origin: 60px 55px; transition: transform .3s; } .tree-fruit { animation: twinkle 3s infinite; } .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; } .tree-float.go { animation: floatup .9s ease-out; } .progress-card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 9px; min-width: 0; } .pc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; } .pc-name { font-weight: 700; font-size: 15px; } .pc-env { font-size: 11px; color: var(--muted); } .pc-env.bad { color: var(--red); } .pc-env.good { color: var(--green2); } .bar { position: relative; height: 14px; border-radius: 7px; background: rgba(140,170,220,.14); margin: 7px 0 6px; overflow: hidden; } .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; } .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; } .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); } .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); } .pc-foot > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pc-foot { position: relative; } .mini-hit { display: none; } .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; } .mini { margin-block: 7px; } .pc-foot { padding-block: 4px; } .mini:disabled { opacity: .38; } .mini.gold { background: rgba(244,201,93,.14); color: var(--gold); border-color: rgba(244,201,93,.35); } .mini.red { background: rgba(255,122,107,.16); color: var(--red); border-color: rgba(255,122,107,.4); animation: hint 1.2s infinite; } .lives { grid-column: 2; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; } .lives::-webkit-scrollbar { display: none; } .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; } .life-btn svg { width: 22px; height: 22px; color: var(--green2); } .life-btn .nm { font-size: 11px; } .life-btn .lv { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; } .life-btn.buyable { border-color: rgba(95,214,138,.7); box-shadow: 0 0 14px rgba(95,214,138,.28); } .life-btn.buyable::after { content: "↑"; position: absolute; top: 2px; right: 6px; color: var(--green2); font-weight: 700; } .life-btn.locked { opacity: .5; } .life-btn.locked svg { color: var(--muted); } .life-btn.locked .lv { color: var(--green); } .life-btn.flash { animation: lifebuy .5s; } .life-btn .next-tag { position: absolute; bottom: -1px; font-size: 9px; color: var(--gold); } /* ── 底栏 ── */ .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); } .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; } .tabbar svg { width: 22px; height: 22px; } .tabbar button.on { color: var(--green2); } .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); } .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; } /* ── 开场故事 ── */ .screen.prologue { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: #05080f; } .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; } .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%); } .pro-body { position: relative; padding: 0 26px 12px; animation: fadeup .9s both; } .pro-kicker { color: var(--green2); font-size: 12px; letter-spacing: 3px; margin-bottom: 10px; } .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); } .pro-lines { margin-top: 14px; color: #c7d4ec; font-size: 14.5px; line-height: 1.85; } .pro-lines p { margin: 0; } .pro-foot { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 26px calc(22px + var(--safe-b)); } .pro-dots { display: flex; gap: 6px; flex: 1; } .pro-dots i { width: 18px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.2); } .pro-dots i.on { background: var(--green2); } .btn { min-height: var(--tap); padding: 0 22px; border-radius: 22px; font-weight: 700; font-size: 15px; } .btn.primary { background: linear-gradient(135deg, #38b46f, #7ff0a6); color: #06130b; box-shadow: 0 6px 24px rgba(95,214,138,.35); } .btn.primary:active { transform: scale(.97); } .btn.ghost { border: 1px solid var(--line); color: var(--muted); } .link { color: var(--muted); font-size: 13px; padding: 0 6px; min-height: var(--tap); } /* ── 底部抽屉(生命 / 星图 / 纪元 / 成就)── */ .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; } .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); } .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 18px; } .sheet-head h2 { margin: 0; font-size: 18px; } .sheet-body { overflow-y: auto; padding: 6px 16px 14px; -webkit-overflow-scrolling: touch; } .sheet-foot { padding: 0 16px 14px; } .sec-title { font-size: 12px; color: var(--muted); letter-spacing: 1px; margin: 14px 0 8px; } .card { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; } .row { display: flex; align-items: center; gap: 10px; } .row .grow { flex: 1; min-width: 0; } .kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; } .kv + .kv { border-top: 1px dashed rgba(150,190,255,.1); } .kv .k { color: var(--muted); } .kv .v { font-variant-numeric: tabular-nums; font-weight: 600; } .muted { color: var(--muted); } .small { font-size: 12px; } .lore { font-size: 13px; line-height: 1.75; color: #c8d5ea; white-space: pre-line; } .life-card { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; } .life-card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(95,214,138,.1); } .life-card .ic svg { width: 26px; height: 26px; color: var(--green2); } .life-card.locked .ic svg { color: var(--muted); } .life-card h4 { margin: 0 0 2px; font-size: 14.5px; } .life-card p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; } .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; } .buy:disabled { opacity: .4; } .buy .c { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); } .planet-list { display: grid; gap: 8px; } .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); } .pcard.cleared { border-color: rgba(95,214,138,.4); background: linear-gradient(90deg, rgba(95,214,138,.12), rgba(255,255,255,.02)); } .pcard.locked { opacity: .55; } .pcard.cur { border-color: rgba(95,214,138,.7); box-shadow: 0 0 18px rgba(95,214,138,.18); } .pcard .orb { width: 40px; height: 40px; border-radius: 50%; } .pcard h4 { margin: 0; font-size: 14px; } .pcard p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); } .pcard .go { font-size: 12px; color: var(--green2); font-weight: 700; } .pcard .go.lock { color: var(--muted); } .ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .ach { text-align: center; padding: 10px 6px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--line); opacity: .5; } .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)); } .ach .ic { width: 38px; height: 38px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; background: rgba(244,201,93,.12); } .ach .ic svg { width: 22px; height: 22px; color: var(--gold); } .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; } .era-hero { text-align: center; padding: 6px 0 4px; } .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; } .era-hero .lbl { color: var(--muted); font-size: 12px; letter-spacing: 2px; } .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; } .lock-note svg { width: 22px; height: 22px; color: var(--red); flex: none; } .curio-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .curio { padding: 12px 8px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); text-align: center; } .curio svg { width: 26px; height: 26px; margin: 0 auto 6px; color: var(--gold); } .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; } .curio .own { font-size: 10px; color: var(--gold); margin-top: 4px; } /* ── 事件 / 里程碑弹窗 ── */ .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); } .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); } .modal-art { height: 86px; background: radial-gradient(120% 140% at 50% 0%, rgba(95,214,138,.35), transparent 70%); position: relative; overflow: hidden; } .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; } .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); } .modal-art .sigil svg { width: 34px; height: 34px; color: var(--green2); } .modal-body { padding: 4px 20px 18px; } .modal-kicker { font-size: 11px; letter-spacing: 2px; color: var(--green2); } .modal h2 { margin: 6px 0 10px; font-size: 22px; } .modal-text { font-size: 14.5px; line-height: 1.85; color: #d4e0f3; white-space: pre-line; } .modal-choices { display: grid; gap: 8px; margin-top: 16px; } .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); } .choice b { display: block; font-size: 14px; font-weight: 600; } .choice small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--green2); } .choice:active { background: rgba(95,214,138,.12); } .modal-choices .btn { width: 100%; } .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; } /* ── 提示 / 成就 toast ── */ #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; } .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); } .toast.ach { border-color: rgba(244,201,93,.55); background: linear-gradient(90deg, rgba(244,201,93,.2), rgba(18,28,51,.96) 60%); } .toast .ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(244,201,93,.16); flex: none; } .toast .ic svg { width: 18px; height: 18px; color: var(--gold); } .toast b { display: block; font-size: 13px; } .toast small { color: var(--muted); font-size: 11.5px; } .toast.out { animation: toastout .3s forwards; } .toast.green { border-color: rgba(95,214,138,.5); } /* ── 特效层 ── */ #fx { position: fixed; inset: 0; pointer-events: none; z-index: 65; overflow: hidden; } .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; } .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; } .confetti { position: absolute; width: 8px; height: 12px; border-radius: 2px; animation: confetti 2.2s ease-in forwards; } .ripple { position: absolute; border-radius: 50%; border: 2px solid var(--green2); animation: ripple .7s ease-out forwards; } .global-flash { animation: gf 1.2s; } /* ── 动画 ── */ @keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } } @keyframes ringpulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } } @keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } } @keyframes sunspin { to { transform: rotate(360deg); } } @keyframes twinkle { 0%,100% { opacity: .6; } 50% { opacity: 1; } } @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)); } } @keyframes floatup { 0% { opacity: 1; transform: translate(-50%, 0) scale(.9); } 100% { opacity: 0; transform: translate(-50%, -42px) scale(1.15); } } @keyframes shine { 0% { transform: translateX(-100%); } 60%,100% { transform: translateX(100%); } } @keyframes lifebuy { 0% { transform: scale(1); } 40% { transform: scale(1.12); border-color: var(--green2); } 100% { transform: scale(1); } } @keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } } @keyframes fadeup { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } } @keyframes fade { from { opacity: 0; } to { opacity: 1; } } @keyframes sheetup { from { transform: translateY(100%); } to { transform: none; } } @keyframes pop { from { opacity: 0; transform: scale(.92) translateY(10px); } to { opacity: 1; transform: none; } } @keyframes toastin { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } } @keyframes toastout { to { opacity: 0; transform: translateY(-10px); } } @keyframes flyup { 0% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -56px) scale(1.2); } } @keyframes sparkfade { to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); } } @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); } } @keyframes ripple { to { opacity: 0; transform: scale(2.2); } } @keyframes goalflash { 0%,100% { box-shadow: none; } 40% { box-shadow: 0 0 30px rgba(95,214,138,.6); } } @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); } } /* ── 桌面:居中单屏,加大留白 ── */ @media (min-width: 720px) { body { background: radial-gradient(1400px 900px at 50% -20%, #1d3057 0%, #0a1120 55%, #05080f 100%); } .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%); } } @media (max-width: 360px) { .res b { font-size: 19px; } .goal b { font-size: 13px; } .life-btn { min-width: 62px; } } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition: none !important; } } body.in-prologue #app { visibility: hidden; } .kv .k svg { width: 18px; height: 18px; color: var(--gold); flex: none; } .kv .k { white-space: nowrap; } .progress-card.cleared { border-color: rgba(95,214,138,.45); background: linear-gradient(90deg, rgba(95,214,138,.16), var(--glass) 70%); } #toasts { pointer-events: none; } .chip { margin-block: 6px; } /* 无障碍:键盘焦点可见(按钮、抽屉、卡片) */ button:focus-visible, .pcard:focus-visible, .curio:focus-visible { outline: 2px solid var(--green2); outline-offset: 2px; } .skip-link { position: absolute; left: -999px; } .skip-link:focus { left: 8px; top: 8px; z-index: 100; background: var(--bg1); padding: 8px 12px; border-radius: 8px; }