/* Life Rush. Layout: one portrait play column; on wide, near-square screens (iPhone Duo open, tablets, desktop)
   a two-page spread with the road on the left page, a life journal on the right, and the middle kept free for the fold.
   Skins swap the tokens below via [data-skin]. */
:root, :root[data-skin="emoji"] {
  --night: #211936;
  --night-2: #3b2b5e;
  --ink: #2b2140;
  --ink-2: #625677;
  --paper: #fffdf8;
  --paper-2: #f3edf6;
  --line: #e5dcea;
  --sunrise: #ff6f3c;
  --sunrise-deep: #c4471b;
  --hud: rgba(33, 25, 54, 0.62);
  --hud-ink: #ffffff;
  --good: #2f8cff;
  --bad: #ff4d6d;
  --trade: #9a5cff;
  --mystery: #ffb627;
  --opp: #12b886;
  --opp-ink: #0b7a59;
  --up: #2fbf71;
  --down: #ff4d6d;
  --up-bg: #dcf6e7; --up-ink: #0b6b3a;
  --down-bg: #ffe2e8; --down-ink: #a3112e;
  --r0: #8d95a3; --r0d: #5d6470;
  --r1: #3d8bff; --r1d: #1d5fc2;
  --r2: #9a5cff; --r2d: #6a34cc;
  --r3: #f2a100; --r3d: #a86400;
  --grade-s: #c77700; --grade-a: #0f8f69; --grade-b: #1f6fe0; --grade-c: #7b45e0; --grade-d: #6b7280;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4;
  --radius-card: 22px;
  --radius-btn: 16px;
  --font-display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Baloo 2", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-weight: 400;
  color-scheme: light;
}
:root:lang(zh-Hans) {
  --font-display: "Lilita One", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
  --font-body: "Baloo 2", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
  --display-weight: 800;
}
:root:lang(ja) {
  --font-display: "Lilita One", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  --font-body: "Baloo 2", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  --display-weight: 800;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--night); color: var(--ink);
  font: 500 15px/1.4 var(--font-body);
  overflow: hidden; overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; touch-action: manipulation; }

/* ---------- layout ---------- */
.layout {
  height: 100vh; height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center;
  background: radial-gradient(120% 70% at 50% 0%, var(--night-2), var(--night) 70%);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.stage { position: relative; width: 100%; max-width: 520px; height: 100%; overflow: hidden; background: var(--night); isolation: isolate; }
.crease, .journal { display: none; }
@media (min-width: 700px) and (min-aspect-ratio: 3/4) {
  .layout { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); justify-items: stretch; max-width: 1180px; margin: 0 auto; }
  .stage { max-width: none; border-radius: 0; }
  .crease { display: block; }
  .journal { display: block; }
}
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- HUD ---------- */
.hud {
  position: absolute; inset: 0 0 auto; z-index: 10; display: grid; gap: 7px; pointer-events: none; color: var(--hud-ink);
  padding-block: 10px 10px; padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
  background: linear-gradient(to bottom, rgba(33, 25, 54, 0.6), rgba(33, 25, 54, 0));
}
.hud-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.age { display: flex; align-items: center; gap: 8px; min-width: 0; }
.age .av { font-size: 30px; line-height: 1; }
.age b { font: var(--display-weight) 28px/1 var(--font-display); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.age small { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.92; white-space: nowrap; }
.hud-btns { display: flex; align-items: center; gap: 6px; pointer-events: auto; }
.wish-count { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--hud); white-space: nowrap; }
.wish-count:empty { display: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--hud); color: var(--hud-ink); font-size: 17px; cursor: pointer; display: grid; place-items: center; }
.icon-btn.dark { background: var(--paper-2); color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.stat { display: flex; align-items: center; justify-content: center; gap: 3px; height: 32px; padding: 0 4px; border-radius: 999px; background: var(--hud); font: 800 13.5px/1 var(--font-body); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.stat i { font-style: normal; font-size: 13px; }
.stat.up { animation: pulse-up 0.5s ease-out; }
.stat.down { animation: pulse-down 0.5s ease-out; }
.stat.warn { box-shadow: inset 0 0 0 2px var(--down); animation: warn 1s infinite; }
.goal { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.goal-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-need { font-variant-numeric: tabular-nums; white-space: nowrap; }
.goal-bar { flex: 0 0 64px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.28); overflow: hidden; }
.goal-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--mystery); transition: width 0.2s; }
.goal.met .goal-bar i { background: var(--up); }

/* ---------- feed, banner ---------- */
.feed {
  position: absolute; left: 0; right: 0; top: calc(var(--hud-h, 122px) + 4px); z-index: 9;
  display: grid; justify-items: center; gap: 6px; pointer-events: none;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.toast { max-width: 100%; padding: 5px 12px; border-radius: 14px; background: rgba(33, 25, 54, 0.74); color: #ffffff; font-size: 13px; font-weight: 700; text-align: center; animation: toast 3s ease forwards; }
.evt {
  width: 100%; max-width: 380px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; align-items: center;
  padding: 10px 14px; border-radius: 16px; background: var(--paper); color: var(--ink); border: 3px solid var(--mystery);
  box-shadow: 0 10px 24px rgba(30, 15, 50, 0.3); animation: evt 3.8s ease forwards;
}
.evt.bad { border-color: var(--bad); }
.evt.opp { border-color: var(--opp); }
.evt .ei { font-size: 32px; grid-row: span 2; line-height: 1; }
.evt .et { font-weight: 700; font-size: 14px; line-height: 1.25; }
.evt .chips { gap: 4px; }
.banner {
  position: absolute; left: 0; right: 0; top: 30%; z-index: 9; text-align: center; color: #ffffff; pointer-events: none;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.banner .bi { font-size: 54px; line-height: 1; }
.banner h2 { margin: 6px 0 0; font: var(--display-weight) 42px/1.05 var(--font-display); letter-spacing: 0.02em; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); }
.banner p { margin: 6px 0 0; font-weight: 800; font-size: 16px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4); }
.banner.show { animation: banner 2.6s ease forwards; }

/* ---------- screens and sheets ---------- */
.screen {
  position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-block: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.screen.dim { background: rgba(26, 18, 40, 0.5); }
.sheet { width: 100%; max-width: 460px; max-height: 100%; display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius-card); box-shadow: 0 24px 60px rgba(20, 10, 40, 0.45); overflow: hidden; }
.sheet.small { max-width: 340px; }
.sheet.tall { height: 100%; }
.sheet-body { overflow-y: auto; overflow-x: hidden; min-height: 0; padding: 18px 18px 10px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); background: var(--paper); }
.eyebrow { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.eyebrow.center { text-align: center; }
.sheet-title { margin: 2px 0 0; font: var(--display-weight) 30px/1.08 var(--font-display); color: var(--ink); text-wrap: balance; }
.sub { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.center { justify-content: center; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 9px; border-radius: 999px; font: 800 12.5px/1.6 var(--font-body); background: var(--paper-2); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip.up { background: var(--up-bg); color: var(--up-ink); }
.chip.down { background: var(--down-bg); color: var(--down-ink); }

/* ---------- buttons ---------- */
.btn { appearance: none; border: 0; border-radius: var(--radius-btn); padding: 12px 16px; font: var(--display-weight) 19px/1.1 var(--font-display); letter-spacing: 0.02em; cursor: pointer; transition: transform 0.08s; }
.btn.primary { flex: 1; background: var(--sunrise); color: #ffffff; box-shadow: 0 5px 0 var(--sunrise-deep); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--sunrise-deep); }
.btn.primary:disabled { background: #c9c0d3; box-shadow: 0 5px 0 #a99fb6; cursor: not-allowed; }
.btn.ghost { background: var(--paper-2); color: var(--ink); box-shadow: 0 4px 0 var(--line); }
.btn.ghost:disabled { opacity: 0.5; }
.btn.big { padding: 15px 20px; font-size: 23px; }
.btn:focus-visible, .icon-btn:focus-visible, .talent:focus-visible, .lang:focus-visible, .pill:focus-visible { outline: 3px solid var(--good); outline-offset: 3px; }

/* ---------- title ---------- */
.screen.title { justify-content: space-between; padding-block: 24px 20px; background: linear-gradient(to bottom, rgba(33, 25, 54, 0) 38%, rgba(33, 25, 54, 0.62)); }
.title-top { text-align: center; margin-top: 4vh; }
.logo { margin: 0; color: #ffffff; font: var(--display-weight) clamp(66px, 21vw, 104px)/0.86 var(--font-display); letter-spacing: 0.02em; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 8px 0 var(--ink); transform: rotate(-5deg); }
.logo span { display: block; }
.logo span + span { color: var(--mystery); }
.tagline { margin: 22px 0 0; color: #ffffff; font-weight: 800; font-size: 18px; line-height: 1.3; text-shadow: 0 2px 0 rgba(33, 25, 54, 0.6); text-wrap: balance; }
.title-card { width: 100%; max-width: 410px; display: grid; gap: 12px; padding: 16px; border-radius: var(--radius-card); background: var(--paper); box-shadow: 0 20px 50px rgba(20, 10, 40, 0.4); }
.how { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.how li { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 14.5px; line-height: 1.3; }
.how li span { font-size: 22px; text-align: center; }
.how p { margin: 0; }
.langs { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.lang { border: 0; border-radius: 999px; padding: 5px 12px; background: var(--paper-2); color: var(--ink-2); font-weight: 800; font-size: 13px; cursor: pointer; }
.lang[aria-pressed="true"] { background: var(--ink); color: #ffffff; }
.meta { margin: 0; text-align: center; color: var(--ink-2); font-size: 13px; font-weight: 600; }

/* ---------- talents ---------- */
.talent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.talent {
  --rc: var(--r0); --rcd: var(--r0d);
  position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 8px; align-content: start; text-align: left;
  padding: 10px 10px 10px 8px; border-radius: 14px; border: 2px solid var(--rc); cursor: pointer; min-height: 76px;
  background: color-mix(in srgb, var(--rc) 10%, var(--paper));
}
.talent.r1 { --rc: var(--r1); --rcd: var(--r1d); }
.talent.r2 { --rc: var(--r2); --rcd: var(--r2d); }
.talent.r3 { --rc: var(--r3); --rcd: var(--r3d); animation: legend 1.8s ease-in-out infinite; }
.talent .ti { font-size: 23px; line-height: 1.15; grid-row: span 3; text-align: center; }
.talent .tn { font-weight: 800; font-size: 14px; line-height: 1.2; }
.talent .td { font-size: 12.5px; line-height: 1.25; color: var(--ink-2); }
.talent .tr { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rcd); margin-top: 3px; }
.talent[aria-pressed="true"] { background: var(--rcd); border-color: var(--rcd); color: #ffffff; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(30, 15, 50, 0.25); }
.talent[aria-pressed="true"] .td, .talent[aria-pressed="true"] .tr { color: rgba(255, 255, 255, 0.92); }
.talent[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 6px; right: 9px; font-weight: 900; }

/* ---------- birth certificate ---------- */
.cert { position: relative; padding: 18px 16px 16px; border: 2px solid var(--ink); border-radius: 6px; box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6.5px var(--ink); background: radial-gradient(circle at 100% 0%, var(--paper-2), var(--paper) 60%); }
.cert-title { margin: 2px 0 12px; text-align: center; font: var(--display-weight) 26px/1.1 var(--font-display); color: var(--ink); }
.cert-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 12px; margin: 0; }
.cert-fields dt { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); padding-top: 3px; }
.cert-fields dd { margin: 0; font-weight: 700; font-size: 15px; line-height: 1.3; min-width: 0; }
.wishes { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.wish-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wish-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 6px; font-weight: 700; font-size: 14.5px; }
.wish-list li.done { color: var(--opp-ink); }
.stamp { position: absolute; right: 12px; bottom: 16px; padding: 6px 9px; border: 3px solid var(--bad); border-radius: 10px; color: var(--bad); font: var(--display-weight) 11.5px/1.05 var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; text-align: center; transform: rotate(-14deg); opacity: 0.85; animation: stamp 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) 0.2s both; pointer-events: none; }

/* ---------- boss card ---------- */
.boss-body { text-align: center; }
.boss-icon { font-size: 70px; line-height: 1.1; margin: 6px 0 2px; }
.boss-text { margin: 8px auto 0; max-width: 34ch; font-size: 16px; font-weight: 600; text-wrap: balance; }
.boss-check { margin: 8px 0 0; font-size: 13px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; }
#scr-boss.pass .sheet-title { color: var(--opp-ink); }
#scr-boss.fail .sheet-title { color: var(--sunrise-deep); }

/* ---------- report ---------- */
.screen.report { padding-block: 12px; }
.rp-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 8px; }
.grade { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font: var(--display-weight) 42px/1 var(--font-display); color: #ffffff; background: var(--gc, var(--grade-b)); box-shadow: 0 5px 0 rgba(30, 15, 50, 0.3); }
.rp-title { margin: 0; font: var(--display-weight) 25px/1.08 var(--font-display); text-wrap: balance; }
.rp-ending { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.tile { display: grid; gap: 2px; padding: 8px 2px; border-radius: 12px; background: var(--paper-2); text-align: center; min-width: 0; }
.tile .tv { font: var(--display-weight) 17px/1.1 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .tv.long { font-size: 13px; letter-spacing: -0.02em; }
.tile .tl { font-size: 11px; font-weight: 800; color: var(--ink-2); }
.rp-score { margin: 10px 0 0; font-weight: 800; }
.sec { margin: 18px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.joybar-wrap { position: relative; }
.joybar { display: flex; gap: 2px; height: 18px; }
.joybar .seg { height: 100%; min-width: 3px; outline: none; }
.joybar .seg:first-child { border-radius: 4px 0 0 4px; }
.joybar .seg:last-child { border-radius: 0 4px 4px 0; }
.joybar .seg:only-child { border-radius: 4px; }
.joybar .seg:focus-visible { box-shadow: 0 0 0 3px var(--good); }
.tip { position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 4px 10px; border-radius: 8px; background: var(--ink); color: #ffffff; font-size: 12.5px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.legend { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13.5px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; }
.legend .lv { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 700; }
.lifelog { list-style: none; margin: 0; padding: 0; display: grid; }
.lifelog li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14px; line-height: 1.3; }
.lifelog .la { font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.lifelog li.big { font-weight: 700; }
.epitaph { margin: 16px 0 0; padding: 14px; border-radius: 14px; background: var(--paper-2); font-style: italic; text-align: center; }
.titles { display: flex; flex-wrap: wrap; gap: 6px; }
.tchip { padding: 3px 10px; border-radius: 999px; background: var(--paper-2); font-size: 12.5px; font-weight: 700; }
.tchip.locked { color: var(--ink-2); }
.tchip.now { background: var(--mystery); color: var(--ink); }

/* ---------- journal (wide layout) ---------- */
.journal { height: 100%; overflow-y: auto; background: var(--paper); color: var(--ink); -webkit-overflow-scrolling: touch; }
.journal-inner { padding-block: 22px 28px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); display: grid; gap: 4px; max-width: 520px; }
.journal-title { margin: 0 0 6px; font: var(--display-weight) 28px/1.1 var(--font-display); }
.journal .lifelog li:first-child { animation: fresh 0.6s ease-out; }
.crease { background: linear-gradient(90deg, var(--night), var(--night-2) 50%, var(--night)); }

/* ---------- share box and life page ---------- */
.overlay { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(20, 12, 34, 0.7); padding-block: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.overlay-sheet { width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; display: grid; gap: 10px; padding: 16px; border-radius: var(--radius-card); background: var(--paper); }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sb-formats { display: flex; gap: 6px; }
.pill { border: 0; border-radius: 999px; padding: 5px 14px; background: var(--paper-2); color: var(--ink-2); font-weight: 800; font-size: 13px; cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--ink); color: #ffffff; }
.sb-preview { display: grid; place-items: center; background: var(--paper-2); border-radius: 14px; padding: 10px; }
.sb-preview img { display: block; max-width: 100%; max-height: 52vh; max-height: 52dvh; border-radius: 12px; box-shadow: 0 10px 24px rgba(30, 15, 50, 0.25); -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.sb-hint { margin: 0; text-align: center; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.sb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-actions .btn { flex: 1 1 auto; font-size: 17px; }
.sb-status { margin: 0; min-height: 1.4em; text-align: center; font-size: 13px; font-weight: 700; color: var(--opp-ink); }
.overlay.page { display: block; overflow-y: auto; background: var(--night); -webkit-overflow-scrolling: touch; }
.life-page { width: 100%; max-width: 560px; margin: 0 auto; display: grid; gap: 14px; color: #ffffff; padding-block: 20px 36px; }
.life-page .card-img { display: block; width: 100%; max-width: 380px; justify-self: center; border-radius: 18px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); -webkit-touch-callout: default; }
.life-page .lp-panel { background: var(--paper); color: var(--ink); border-radius: var(--radius-card); padding: 16px 18px; }
.life-page .lp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.life-page .lp-actions .btn { flex: 1 1 200px; }
.life-page .lp-kicker { text-align: center; font: var(--display-weight) 34px/1.1 var(--font-display); text-shadow: 0 4px 0 var(--ink); }
.life-page .lp-note { text-align: center; color: rgba(255, 255, 255, 0.8); font-size: 13px; font-weight: 600; }

/* ---------- motion ---------- */
@keyframes pulse-up { from { transform: scale(1.16); background: var(--up); } to { transform: none; } }
@keyframes pulse-down { from { transform: scale(1.1); background: var(--down); } to { transform: none; } }
@keyframes warn { 50% { box-shadow: inset 0 0 0 2px var(--down), 0 0 12px var(--down); } }
@keyframes toast { 0% { opacity: 0; transform: translateY(-6px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes evt { 0% { opacity: 0; transform: scale(0.9); } 8%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes banner { 0% { opacity: 0; transform: scale(0.8); } 12%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-12px); } }
@keyframes legend { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--r3) 45%, transparent); } }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-14deg) scale(1.8); } 100% { opacity: 0.85; transform: rotate(-14deg) scale(1); } }
@keyframes fresh { from { background: var(--paper-2); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .toast, .evt, .banner.show, .stat.up, .stat.down, .stat.warn, .talent.r3, .stamp, .journal .lifelog li:first-child { animation: none !important; }
  .btn, .goal-bar i { transition: none; }
}
@media (max-height: 560px) {
  .title-top { margin-top: 0; }
  .logo { font-size: 56px; }
  .how { display: none; }
  .banner { top: 22%; }
}
