/* 站酷快乐体（OFL 免费商用），只截取了页面用到的字 */
@font-face {
  font-family: "KuaiLe";
  src: url(kuaile.woff2) format("woff2");
  font-display: swap;
}

:root {
  --pink: #ff7fae;
  --pink-d: #ec5b92;
  --pink-l: #ffd3e2;
  --pink-xl: #fff0f6;
  --lav: #d9c6ff;
  --mint: #bfe9d4;
  --ink: #6b3a55;
  --ink-l: #a0718b;
  --cream: #fffafc;
  --round: "KuaiLe", ui-rounded, "SF Pro Rounded", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
}

[hidden] { display: none !important; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--round);
  font-synthesis: none; /* 快乐体本身就圆胖，不要再假加粗 */
  letter-spacing: .5px;
  color: var(--ink);
  background-color: #ffd9e7;
  /* 粉色格子布 */
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.55) 1.5px, transparent 2px),
    linear-gradient(90deg, rgba(255,255,255,.42) 50%, transparent 50%),
    linear-gradient(rgba(255,255,255,.42) 50%, transparent 50%);
  background-size: 38px 38px, 38px 38px, 38px 38px;
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
svg { display: block; }

#bg3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 50px; padding: 0 22px; border-radius: 25px;
  font-size: 17px; font-weight: 800; letter-spacing: .5px;
  transition: transform .15s;
}
.btn:active { transform: scale(.94); }
.btn-main {
  color: #fff; background: linear-gradient(180deg, #ff9cc2, var(--pink-d));
  box-shadow: 0 5px 0 #c9417a, 0 10px 22px rgba(236,91,146,.35), inset 0 2px 0 rgba(255,255,255,.45);
  text-shadow: 0 1px 0 rgba(160,40,90,.35);
}
.btn-main:active { box-shadow: 0 2px 0 #c9417a, 0 5px 12px rgba(236,91,146,.3), inset 0 2px 0 rgba(255,255,255,.45); transform: translateY(3px) scale(.97); }
.btn-soft {
  color: var(--pink-d); background: #fff;
  box-shadow: 0 5px 0 #ffc1d7, 0 8px 18px rgba(236,91,146,.18);
  border: 2px solid #ffc1d7;
}
.btn-soft:active { box-shadow: 0 2px 0 #ffc1d7; transform: translateY(3px) scale(.97); }
.ico { width: 20px; height: 20px; }
.mini { display: inline-block; width: 14px; height: 15px; vertical-align: -2px; }
.mini.h { color: var(--pink); width: 13px; height: 12px; }

/* ---------- 开场 ---------- */
.intro {
  position: fixed; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: calc(var(--st) + 20px) 24px calc(var(--sb) + 20px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.6,-0.3,.7,1);
}
.intro.leave { opacity: 0; transform: scale(1.35); pointer-events: none; }
.intro-bunny { width: 120px; height: 128px; margin: 0 auto 6px; animation: bunnyIn 1s cubic-bezier(.3,1.6,.5,1) both, floaty 3s 1s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(200,80,130,.25)); }
.hello { margin: 0; font-weight: 900; line-height: 1.15; }
.hello .line { display: block; font-size: 30px; color: var(--ink); }
.hello .line.big { font-size: 46px; margin: 4px 0; color: var(--pink-d);
  -webkit-text-stroke: 1.5px #fff; paint-order: stroke fill;
  text-shadow: 0 4px 0 #ffb3cd, 0 8px 18px rgba(236,91,146,.35); }
.hello .ch { display: inline-block; opacity: 0; transform: translateY(30px) scale(.3) rotate(-20deg);
  animation: pop .6s cubic-bezier(.3,1.8,.5,1) forwards; animation-delay: calc(var(--i) * 90ms + 500ms); }
.intro-sub { margin: 18px 0 26px; font-size: 16px; font-weight: 700; color: var(--ink-l); opacity: 0; animation: fadeUp .6s 2.2s forwards; }
.intro-btn { opacity: 0; animation: fadeUp .6s 2.6s forwards, wiggle 2.4s 3.4s ease-in-out infinite; height: 56px; padding: 0 34px; font-size: 19px; border-radius: 28px; }
.intro-tip { margin: 16px 0 0; font-size: 13px; color: var(--ink-l); opacity: 0; animation: fadeUp .6s 3s forwards; }

@keyframes pop { to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bunnyIn { from { opacity: 0; transform: translateY(-80px) scale(.4); } to { opacity: 1; transform: none; } }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@keyframes wiggle { 0%, 80%, 100% { rotate: 0deg; } 85% { rotate: -5deg; } 90% { rotate: 5deg; } 95% { rotate: -3deg; } }

/* ---------- 主页面 ---------- */
.main {
  position: relative; z-index: 3;
  min-height: 100dvh;
  padding: calc(var(--st) + 14px) 18px calc(var(--sb) + 18px);
  display: flex; flex-direction: column; align-items: center;
  opacity: 0; transform: translateY(30px); pointer-events: none;
  transition: opacity .6s ease, transform .8s cubic-bezier(.3,1.5,.5,1);
}
.main.show { opacity: 1; transform: none; pointer-events: auto; }

.top { text-align: center; }
.date-pill {
  display: inline-block; padding: 5px 14px; border-radius: 14px;
  background: rgba(255,255,255,.85); color: var(--pink-d); font-size: 13px; font-weight: 800;
  border: 2px dashed #ffb3cd;
}
.title { margin: 10px 0 0; font-size: 20px; font-weight: 800; line-height: 1.25; color: var(--ink); }
.title span { font-size: 32px; font-weight: 900; color: var(--pink-d); -webkit-text-stroke: 1.2px #fff; paint-order: stroke fill; text-shadow: 0 3px 0 #ffb3cd; letter-spacing: 2px; }

.stage { position: relative; width: 100%; max-width: 380px; height: 118px; margin-top: 4px; }
.pal { position: absolute; bottom: -14px; z-index: 2; filter: drop-shadow(0 6px 6px rgba(160,60,110,.2)); }
.bunny-btn { left: 50%; margin-left: -96px; width: 104px; height: 111px; }
.kitty-btn { left: 50%; margin-left: 8px; width: 92px; height: 84px; bottom: -16px; }
.pal svg { width: 100%; height: 100%; }
.bunny-btn svg { animation: floaty 2.8s ease-in-out infinite; }
.kitty-btn svg { animation: floaty 3.2s .6s ease-in-out infinite; }
.pal.jump svg { animation: jump .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes jump { 0% { transform: scale(1,1); } 20% { transform: scale(1.15,.82); } 50% { transform: translateY(-34px) scale(.92,1.1) rotate(-6deg); } 80% { transform: scale(1.08,.92); } 100% { transform: none; } }

.bubble {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  max-width: 92%; width: max-content;
  padding: 7px 14px; border-radius: 16px; z-index: 3;
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 800;
  border: 2px solid #ffc1d7; box-shadow: 0 4px 0 #ffe0ea;
  transition: transform .3s cubic-bezier(.3,1.8,.5,1), opacity .3s;
}
.bubble::after { content: ""; position: absolute; left: 34%; bottom: -9px; width: 14px; height: 14px; background: #fff; border-right: 2px solid #ffc1d7; border-bottom: 2px solid #ffc1d7; transform: rotate(45deg); border-radius: 0 0 4px 0; }
.bubble.pop { animation: bubblePop .45s cubic-bezier(.3,1.8,.5,1); }
@keyframes bubblePop { 0% { transform: translateX(-50%) scale(.6); } 100% { transform: translateX(-50%) scale(1); } }

.card {
  position: relative; width: 100%; max-width: 380px;
  padding: 26px 16px 18px; border-radius: 30px;
  background: rgba(255,250,252,.93);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px #ffc1d7, 0 14px 30px rgba(220,90,140,.22);
  text-align: center;
}
.card::before { /* 蕾丝花边 */
  content: ""; position: absolute; left: 14px; right: 14px; top: 8px; height: 8px;
  background: radial-gradient(circle at 6px 0, #ffd3e2 4px, transparent 4.5px) 0 0 / 14px 8px repeat-x;
  opacity: .9;
}
.deco { position: absolute; z-index: 2; }
.deco.d1 { width: 38px; height: 42px; right: -8px; top: -18px; transform: rotate(14deg); animation: floaty 2.6s ease-in-out infinite; }
.deco.d2 { width: 52px; height: 36px; left: -10px; bottom: 48px; transform: rotate(-12deg); }

.ribbon {
  display: inline-block; position: relative; margin-top: 4px;
  padding: 6px 18px; border-radius: 6px;
  background: var(--pink); color: #fff; font-size: 15px; font-weight: 900; letter-spacing: 1px;
  box-shadow: 0 3px 0 var(--pink-d);
}
.ribbon::before, .ribbon::after { content: ""; position: absolute; top: 6px; width: 16px; height: 100%; background: #ff9cc2; z-index: -1; }
.ribbon::before { left: -11px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.ribbon::after { right: -11px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }

.clock { display: flex; justify-content: center; align-items: flex-start; gap: 4px; margin: 18px 0 6px; }
.seg { display: grid; grid-template-columns: auto auto; gap: 4px; }
.seg i { grid-column: 1 / -1; margin-top: 4px; text-align: center; font-style: normal; font-size: 13px; color: var(--ink-l); }
.dg {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 58px; border-radius: 14px;
  font-size: 40px; font-weight: 900; font-variant-numeric: tabular-nums; color: #fff;
  background: linear-gradient(180deg, #ffa3c6 0 50%, #ff86b3 50% 100%);
  box-shadow: 0 4px 0 #e05a8f, inset 0 2px 0 rgba(255,255,255,.5);
  text-shadow: 0 2px 0 rgba(180,40,100,.3);
}
.dg.tick { animation: flip .38s cubic-bezier(.3,1.7,.5,1); }
@keyframes flip { 0% { transform: translateY(-6px) scale(1.12, .86); } 100% { transform: none; } }
.colon { font-size: 34px; font-weight: 900; color: var(--pink); line-height: 54px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.big-word {
  margin: 14px 0 6px; font-size: 52px; font-weight: 900; color: var(--pink-d);
  -webkit-text-stroke: 2px #fff; paint-order: stroke fill;
  text-shadow: 0 5px 0 #ffb3cd, 0 10px 20px rgba(236,91,146,.3);
  animation: bounceWord 1.4s ease-in-out infinite;
}
@keyframes bounceWord { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08) rotate(2deg); } }

.progress { margin: 34px 4px 0; }
.bar { position: relative; height: 18px; border-radius: 9px; background: #ffe6ef; box-shadow: inset 0 2px 3px rgba(220,90,140,.18); }
.fill {
  height: 100%; width: 0; border-radius: 9px;
  background: repeating-linear-gradient(-45deg, #ff8fb8 0 8px, #ffa8c8 8px 16px);
  background-size: 22.6px 22.6px; animation: stripes 1s linear infinite;
  transition: width .8s ease;
}
@keyframes stripes { to { background-position: 22.6px 0; } }
.runner { position: absolute; top: -26px; left: 0; width: 34px; height: 36px; margin-left: -17px; transition: left .8s ease; animation: hop .7s ease-in-out infinite; }
@keyframes hop { 50% { transform: translateY(-4px) rotate(4deg); } }
.ends { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 11.5px; font-weight: 800; color: var(--ink-l); }
.ends #pct { color: var(--pink-d); font-size: 12.5px; }

.msg { margin: 16px 6px 4px; min-height: 44px; font-size: 15.5px; font-weight: 800; line-height: 1.45; color: var(--ink); }
.shelf { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.shelf svg { width: 40px; height: 27px; }
.shelf svg:nth-child(odd) { transform: translateY(2px) rotate(-6deg); }
.shelf svg:nth-child(even) { transform: rotate(6deg); }

.actions { display: flex; gap: 14px; margin-top: 22px; width: 100%; max-width: 380px; }
.actions .btn { flex: 1; padding: 0 10px; font-size: 16px; }
.foot { margin: 18px 0 0; font-size: 12px; font-weight: 700; color: var(--ink-l); opacity: .8; }

body.standalone #saveBtn { display: none; }

/* ---------- 小教程 ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(110,40,80,.32);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
  animation: fadeIn .3s ease;
}
.sheet-mask[hidden] { display: none; }
.sheet-mask.closing { animation: fadeOut .3s ease forwards; }
.sheet-mask.closing .sheet { animation: sheetDown .3s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.sheet {
  position: relative; width: 100%;
  padding: 10px 0 calc(var(--sb) + 16px);
  border-radius: 30px 30px 0 0;
  background: var(--cream);
  background-image: radial-gradient(#ffe0eb 1.3px, transparent 1.6px);
  background-size: 18px 18px;
  box-shadow: 0 -6px 0 #ffc1d7, 0 -16px 40px rgba(160,50,100,.25);
  animation: sheetUp .5s cubic-bezier(.3,1.4,.5,1);
}
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: #ffc1d7; margin: 0 auto 8px; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 0 18px; }
.sheet-bunny { width: 54px; height: 58px; flex: none; animation: floaty 2.4s ease-in-out infinite; }
.sheet-head h3 { margin: 0; font-size: 19px; font-weight: 900; color: var(--pink-d); }
.sheet-head p { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--ink-l); }
.sheet-close { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; background: #ffe3ed; color: var(--pink-d); font-size: 24px; font-weight: 800; line-height: 1; flex: none; }

.steps {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-top: 12px; -webkit-overflow-scrolling: touch;
}
.steps::-webkit-scrollbar { display: none; }
.step { flex: 0 0 100%; scroll-snap-align: center; padding: 4px 22px; }
.step-card {
  border-radius: 24px; background: #fff; border: 2.5px solid #ffd1e1;
  box-shadow: 0 5px 0 #ffe3ed; padding: 14px 14px 16px; text-align: center;
}
.step-no {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: 40px; height: 36px; color: var(--pink); margin-bottom: 4px;
}
.step-no svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.step-no b { position: relative; color: #fff; font-size: 16px; font-weight: 900; margin-top: -2px; }
.step h4 { margin: 0 0 10px; font-size: 17px; font-weight: 900; color: var(--ink); }
.step p { margin: 10px 0 0; font-size: 13.5px; font-weight: 700; line-height: 1.5; color: var(--ink-l); }
.step p em { font-style: normal; color: var(--pink-d); }
.kbd { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 8px; background: #ffeef4; color: var(--pink-d); font-weight: 900; }
.kbd svg { width: 15px; height: 15px; }

/* 迷你手机示意图 */
.mock {
  position: relative; margin: 0 auto; width: 210px; height: 150px;
  border-radius: 22px; background: #fdf3f7; border: 3px solid #f3c6d8; overflow: hidden;
}
.mock .page { position: absolute; inset: 8px 8px 46px; border-radius: 12px; background: repeating-linear-gradient(90deg, #ffe3ed 0 10px, #fff0f5 10px 20px); }
.mock .page::after { content: "♡ 下班倒计时 ♡"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; color: var(--pink); }
.mock .tbar { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; display: flex; justify-content: space-around; align-items: center; background: #fff; border-top: 1.5px solid #f3d7e2; color: #9fb4d8; }
.mock .tbar span { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; border-radius: 9px; }
.mock .tbar svg { width: 20px; height: 20px; }
.hl { color: #fff !important; background: var(--pink) !important; animation: ring 1.4s ease-out infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255,127,174,.7); } 100% { box-shadow: 0 0 0 12px rgba(255,127,174,0); } }
.mock .finger { position: absolute; font-size: 24px; animation: tap 1.4s ease-in-out infinite; }
@keyframes tap { 0%, 100% { transform: translate(6px, 8px); } 45% { transform: none; } 55% { transform: scale(.85); } }

.mock .wx-top { position: absolute; left: 0; right: 0; top: 0; height: 30px; background: #fff; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; border-bottom: 1.5px solid #f3d7e2; }
.mock .wx-top span { width: 30px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #666; font-weight: 900; letter-spacing: 1px; font-size: 12px; }
.mock .wx-menu { position: absolute; left: 8px; right: 8px; bottom: 8px; border-radius: 14px; background: #fff; padding: 8px; display: flex; gap: 6px; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.mock .wx-menu div { font-size: 10px; font-weight: 800; color: #888; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 50px; }
.mock .wx-menu i { width: 32px; height: 32px; border-radius: 10px; background: #f3f3f3; font-style: normal; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.mock .wx-menu .on { color: var(--pink-d); }
.mock .wx-menu .on i { background: var(--pink); color: #fff; animation: ring 1.4s ease-out infinite; }

.mock .menu { position: absolute; inset: 10px 10px 10px; border-radius: 14px; background: #fff; padding: 6px 8px; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.mock .menu div { display: flex; justify-content: space-between; align-items: center; height: 26px; padding: 0 8px; border-radius: 8px; font-size: 11.5px; font-weight: 800; color: #9a8a92; }
.mock .menu div svg { width: 16px; height: 16px; }
.mock .menu .on { background: #ffeef4; color: var(--pink-d); animation: ring 1.4s ease-out infinite; }

.mock .addhead { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: 12px; font-weight: 800; color: #9fb4d8; background: #fff; border-bottom: 1.5px solid #f3d7e2; }
.mock .addhead b { color: var(--ink); font-size: 12px; }
.mock .addhead .add { color: #fff; background: var(--pink); padding: 3px 10px; border-radius: 10px; animation: ring 1.4s ease-out infinite; }
.mock .addbody { display: flex; align-items: center; gap: 10px; padding: 14px 14px; }
.mock .addbody img { width: 50px; height: 50px; border-radius: 12px; box-shadow: 0 3px 8px rgba(220,90,140,.25); }
.mock .addbody div { flex: 1; height: 30px; border-radius: 8px; background: #fff; border: 1.5px solid #f3d7e2; display: flex; align-items: center; padding: 0 8px; font-size: 12px; font-weight: 800; color: var(--ink); }

.mock.home { background: linear-gradient(160deg, #ffd3e2, #e2d3ff); }
.mock .grid { position: absolute; inset: 14px 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; }
.mock .grid i { aspect-ratio: 1; border-radius: 10px; background: rgba(255,255,255,.6); }
.mock .grid .me { background: url(apple-touch-icon.png) center / cover; box-shadow: 0 3px 8px rgba(220,90,140,.35); animation: jiggle 1.2s ease-in-out infinite; }
@keyframes jiggle { 0%, 100% { transform: rotate(-4deg) scale(1.05); } 50% { transform: rotate(4deg) scale(1.12); } }

.dots { display: flex; justify-content: center; gap: 7px; margin: 14px 0 12px; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: #ffd1e1; transition: width .3s, background .3s; }
.dots i.on { width: 22px; background: var(--pink); }
.sheet-actions { display: flex; gap: 12px; padding: 0 22px; }
.sheet-actions .btn { flex: 1; height: 46px; font-size: 16px; }
.sheet-actions #prevStep { flex: 0 0 100px; }

/* 小屏幕（iPhone SE / mini）收一点 */
@media (max-height: 700px) {
  .stage { height: 96px; }
  .bunny-btn { width: 86px; height: 92px; margin-left: -80px; }
  .kitty-btn { width: 76px; height: 70px; }
  .dg { width: 36px; height: 52px; font-size: 35px; }
  .clock { margin-top: 14px; }
  .msg { margin-top: 12px; }
  .actions { margin-top: 16px; }
  .title span { font-size: 28px; }
}
@media (max-width: 360px) {
  .dg { width: 33px; font-size: 32px; }
}
