/* 宠物打工事务所 · 淘宝双11
   视觉主题：一张会呼吸的工牌 —— 奶油底 + 淘宝橙 + 硬描边贴纸卡片 */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --orange: #FF4E00;
  --orange-2: #FF8A1F;
  --orange-3: #FFB067;
  --red: #E8220E;
  --cream: #FFF7ED;
  --cream-2: #FFE9D2;
  --ink: #2B1B12;
  --ink-2: #6B5344;
  --ink-3: #A2887A;
  --amber: #FFC53D;
  --mint: #1FBF8F;
  --sky: #7FCDF5;
  --card: #FFFFFF;
  --bd: 3px;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --sh: 5px 5px 0 var(--ink);
  --sh-sm: 3px 3px 0 var(--ink);
  --sh-lg: 8px 8px 0 var(--ink);
  --tap: cubic-bezier(.34,1.56,.64,1);
}

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: var(--ink);
  background-color: #FFE3C4;
  background-image:
    radial-gradient(1100px 520px at 50% -12%, #FFD1A6 0%, rgba(255,209,166,0) 62%),
    radial-gradient(700px 420px at 8% 108%, #FFDCC0 0%, rgba(255,220,192,0) 60%),
    radial-gradient(rgba(43,27,18,.075) 1.4px, transparent 1.5px);
  background-size: auto, auto, 18px 18px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
b, strong { font-weight: 800; }

/* ── 布局 ─────────────────────────────────────────── */
.app {
  max-width: 448px;
  margin: 0 auto;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(255,247,237,.94), rgba(255,247,237,.99) 320px),
    var(--cream);
  border-left: 3px solid rgba(43,27,18,.14);
  border-right: 3px solid rgba(43,27,18,.14);
  padding: 0 16px calc(96px + env(safe-area-inset-bottom));
  position: relative;
}
@media (min-width: 520px) {
  .app { box-shadow: 0 0 0 8px rgba(43,27,18,.06), 0 30px 80px rgba(43,27,18,.22); border-radius: 0 0 28px 28px; }
}

.screen { padding-top: 14px; animation: screenIn .34s var(--tap) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px) scale(.99); } }

/* ── 顶栏 ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 12px 0 10px;
  background: linear-gradient(180deg, var(--cream) 62%, rgba(255,247,237,0));
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; flex: none; border-radius: 11px;
  background: linear-gradient(150deg, var(--orange-2), var(--red));
  color: #fff; font-weight: 900; font-size: 18px;
  display: grid; place-items: center;
  border: var(--bd) solid var(--ink); box-shadow: var(--sh-sm);
}
.brand-txt { min-width: 0; }
.brand-txt b { display: block; font-size: 15px; font-weight: 900; letter-spacing: -.2px; line-height: 1.2; }
.brand-txt small { display: block; font-size: 10.5px; color: var(--ink-3); font-weight: 700; letter-spacing: .3px; }
.topbar-right { display: flex; align-items: center; gap: 7px; flex: none; }

.countdown {
  font-size: 11px; font-weight: 800; color: var(--red);
  background: #FFE1DA; border: 2px solid var(--ink); border-radius: 999px;
  padding: 4px 9px; white-space: nowrap;
}
.speed-toggle {
  font-size: 11px; font-weight: 900; letter-spacing: .2px;
  background: #fff; border: 2px solid var(--ink); border-radius: 999px;
  padding: 4px 10px; box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s var(--tap), background .18s;
  white-space: nowrap;
}
.speed-toggle:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.speed-toggle[aria-pressed="true"] { background: var(--amber); }
.speed-toggle[aria-pressed="true"]::before { content: "● "; color: var(--red); }

/* ── 卡片 / 按钮 ──────────────────────────────────── */
.card {
  background: var(--card);
  border: var(--bd) solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  padding: 16px;
  margin-bottom: 16px;
}
.card-tight { padding: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: var(--bd) solid var(--ink); border-radius: 15px;
  padding: 12px 18px; font-weight: 900; font-size: 15px; letter-spacing: .2px;
  background: #fff; box-shadow: var(--sh-sm);
  transition: transform .12s var(--tap), box-shadow .12s, filter .18s, opacity .18s;
}
.btn:active { transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: linear-gradient(160deg, var(--orange-2), var(--orange) 55%, var(--red)); color: #fff; }
.btn-primary:hover { filter: saturate(1.12) brightness(1.03); }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .38; cursor: not-allowed; box-shadow: var(--sh-sm); transform: none; filter: grayscale(.5); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 11px; border-width: 2.5px; box-shadow: 2px 2px 0 var(--ink); }
.btn-sm:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }

.label { font-size: 11px; font-weight: 800; color: var(--ink-3); letter-spacing: .6px; }

/* ── 建档页 ───────────────────────────────────────── */
.hero { padding: 6px 2px 18px; }
.hero h1 {
  margin: 0 0 10px; font-size: clamp(30px, 9vw, 40px); line-height: 1.06;
  font-weight: 900; letter-spacing: -1.4px;
}
.hero h1 em {
  font-style: normal; position: relative; color: var(--orange);
  background: linear-gradient(transparent 62%, var(--amber) 62%);
  padding: 0 2px;
}
.hero p { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); font-weight: 500; }
.hero p b { color: var(--ink); font-weight: 800; }

.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--cream-2); border: 2.5px solid var(--ink); border-radius: 14px;
  padding: 4px; margin-bottom: 16px;
}
.seg-btn {
  border: 0; background: transparent; border-radius: 10px; padding: 9px 6px;
  font-weight: 800; font-size: 13px; color: var(--ink-2); transition: all .2s var(--tap);
}
.seg-btn.is-on { background: #fff; color: var(--ink); box-shadow: 2px 2px 0 var(--ink); font-weight: 900; }

.stage {
  position: relative; height: 236px; border-radius: var(--r-md);
  background:
    radial-gradient(120% 80% at 50% 0%, #FFF1DE 0%, #FFE2C4 60%, #FFD5AC 100%);
  border: 2.5px dashed rgba(43,27,18,.3);
  display: grid; place-items: center; overflow: hidden; margin-bottom: 14px;
}
.stage::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: 26px; height: 14px;
  background: rgba(43,27,18,.1); border-radius: 50%; filter: blur(6px);
}
.stage-hint { position: absolute; bottom: 10px; font-size: 11.5px; color: var(--ink-3); font-weight: 700; z-index: 2; }
.pet-frame { position: relative; z-index: 1; width: 196px; height: 196px; display: grid; place-items: center; }
.pet-frame svg, .pet-frame img { width: 100%; height: 100%; display: block; }
.pet-frame.is-empty { opacity: .3; filter: grayscale(1); }

.upload-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: var(--bd) solid var(--ink); border-radius: 15px; padding: 13px;
  background: var(--amber); font-weight: 900; font-size: 14.5px;
  box-shadow: var(--sh-sm); cursor: pointer; transition: transform .12s var(--tap), box-shadow .12s;
}
.upload-btn:active { transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }

.style-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 12px 0 0; }
.style-chip {
  border: 2.5px solid var(--ink); border-radius: 13px; background: #fff; padding: 8px 6px;
  text-align: center; transition: all .18s var(--tap); box-shadow: 2px 2px 0 var(--ink);
}
.style-chip b { display: block; font-size: 13px; font-weight: 900; }
.style-chip small { display: block; font-size: 10px; color: var(--ink-3); font-weight: 700; margin-top: 2px; }
.style-chip[aria-pressed="true"] { background: var(--orange); color: #fff; }
.style-chip[aria-pressed="true"] small { color: rgba(255,255,255,.85); }
.style-chip:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }

.note { margin: 11px 2px 0; font-size: 11px; color: var(--ink-3); line-height: 1.6; font-weight: 600; }

.species-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 13px; }
.species-chip {
  position: relative; border: 2.5px solid var(--ink); border-radius: 15px; background: #fff;
  padding: 7px 4px 6px; text-align: center; box-shadow: 2px 2px 0 var(--ink);
  transition: all .18s var(--tap);
}
.species-chip svg { width: 100%; height: 58px; display: block; }
.species-chip b { display: block; font-size: 11.5px; font-weight: 900; margin-top: 1px; }
.species-chip small { display: block; font-size: 9.5px; color: var(--ink-3); font-weight: 700; }
.species-chip[aria-pressed="true"] { background: var(--cream-2); transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.species-chip[aria-pressed="true"]::after {
  content: "✓"; position: absolute; top: -7px; right: -7px; width: 20px; height: 20px;
  background: var(--mint); color: #fff; border: 2.5px solid var(--ink); border-radius: 50%;
  font-size: 11px; font-weight: 900; display: grid; place-items: center;
}
.limited-flag {
  position: absolute; top: -8px; left: -6px; z-index: 2;
  background: var(--red); color: #fff; font-size: 9px; font-weight: 900;
  border: 2px solid var(--ink); border-radius: 7px; padding: 1px 5px; transform: rotate(-7deg);
}

.color-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.color-dot {
  width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--ink);
  box-shadow: 2px 2px 0 rgba(43,27,18,.35); transition: transform .16s var(--tap);
}
.color-dot[aria-pressed="true"] { transform: scale(1.18); box-shadow: 0 0 0 3px var(--amber), 2px 2px 0 rgba(43,27,18,.4); }

.field { margin: 16px 0 14px; }
.field label { display: block; font-size: 12px; font-weight: 800; color: var(--ink-2); margin-bottom: 7px; }
.field input {
  width: 100%; border: var(--bd) solid var(--ink); border-radius: 14px; padding: 12px 14px;
  background: #fff; font-size: 16px; font-weight: 800; box-shadow: inset 2px 2px 0 rgba(43,27,18,.07);
  outline: none;
}
.field input:focus { box-shadow: 0 0 0 3px var(--amber), inset 2px 2px 0 rgba(43,27,18,.07); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.chip {
  border: 2px solid rgba(43,27,18,.3); background: var(--cream); border-radius: 999px;
  padding: 4px 10px; font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  transition: all .16s var(--tap);
}
.chip:hover { border-color: var(--ink); background: var(--amber); color: var(--ink); }

/* ── 入职页 ───────────────────────────────────────── */
.page-head { padding: 4px 2px 14px; }
.page-head h2 { margin: 0 0 6px; font-size: 25px; font-weight: 900; letter-spacing: -.8px; }
.page-head p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.65; font-weight: 500; }

.job-list { display: grid; gap: 11px; margin-bottom: 16px; }
.job-card {
  display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: start;
  background: #fff; border: var(--bd) solid var(--ink); border-radius: var(--r-md);
  padding: 13px; box-shadow: var(--sh-sm); text-align: left; width: 100%;
  transition: transform .16s var(--tap), box-shadow .16s;
  position: relative; overflow: hidden;
}
.job-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--jc, var(--orange)); }
.job-card[aria-pressed="true"] { transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); background: var(--ja, #FFE9D2); }
.job-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--ja, #FFE9D2); border: 2.5px solid var(--ink);
}
.job-main h3 { margin: 0; font-size: 16px; font-weight: 900; letter-spacing: -.3px; }
.job-main .dept { font-size: 10.5px; color: var(--ink-3); font-weight: 700; margin: 2px 0 5px; }
.job-main .duty { font-size: 12px; color: var(--ink-2); line-height: 1.55; margin: 0 0 7px; font-weight: 500; }
.job-main .desc { font-size: 11.5px; color: var(--ink-3); line-height: 1.55; margin: 0 0 8px; }
.coupon-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--jc, var(--orange)); color: #fff; font-size: 11px; font-weight: 900;
  border: 2px solid var(--ink); border-radius: 999px; padding: 3px 10px;
}

/* ── 打工主页 ─────────────────────────────────────── */
.badge-card {
  position: relative; background: #fff; border: var(--bd) solid var(--ink);
  border-radius: var(--r-lg); box-shadow: var(--sh); padding: 13px 14px 14px; margin-bottom: 15px;
  overflow: hidden;
}
.badge-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 62px;
  background: linear-gradient(120deg, var(--jc, var(--orange)), var(--orange-2));
  opacity: .14;
}
.badge-lanyard {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 34px; border: 5px solid var(--jc, var(--orange));
  border-bottom: 0; border-radius: 14px 14px 0 0; opacity: .8;
}
.badge-top {
  position: relative; display: flex; justify-content: space-between; align-items: center;
  font-size: 10.5px; font-weight: 800; color: var(--ink-3); letter-spacing: .5px; margin-bottom: 4px;
}
.badge-top b { color: var(--ink); font-weight: 900; }
.badge-body { position: relative; display: grid; grid-template-columns: 148px 1fr; gap: 10px; align-items: center; }
.scene {
  position: relative; height: 152px; border-radius: var(--r-md);
  background: radial-gradient(110% 78% at 50% 8%, #FFF3E2, #FFE0BE 68%, #FFD3A6);
  border: 2.5px solid var(--ink); overflow: hidden; display: grid; place-items: end center;
}
.scene::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 34px;
  background: repeating-linear-gradient(90deg, rgba(43,27,18,.07) 0 12px, transparent 12px 24px);
  border-top: 2.5px solid rgba(43,27,18,.16);
}
.scene .pet-frame { width: 138px; height: 138px; margin-bottom: 4px; }
.scene-status {
  position: absolute; top: 7px; left: 7px; z-index: 3;
  font-size: 10px; font-weight: 900; letter-spacing: .4px;
  background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 8px;
}
.scene-status.is-full { background: var(--red); color: #fff; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.07); } }

.badge-info { min-width: 0; }
.badge-info h3 {
  margin: 0 0 5px; font-size: 21px; font-weight: 900; letter-spacing: -.6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge-job { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: 12.5px; font-weight: 900; }
.badge-job .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); border: 2px solid var(--ink); flex: none; }
.badge-dept { margin: 0 0 8px; font-size: 10.5px; color: var(--ink-3); font-weight: 700; }
.bubble {
  margin: 0; font-size: 11.5px; line-height: 1.55; color: var(--ink-2); font-weight: 600;
  background: var(--cream); border: 2px solid rgba(43,27,18,.2); border-radius: 11px; padding: 6px 8px;
  min-height: 46px;
}
.badge-switch {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  border: 2px solid var(--ink); background: #fff; border-radius: 999px;
  font-size: 10.5px; font-weight: 900; padding: 3px 9px; box-shadow: 2px 2px 0 var(--ink);
}
.badge-switch:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }

/* 能量槽 */
.tank-card { padding: 14px; }
.tank-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 11px; }
.tank-num { display: block; font-size: 30px; font-weight: 900; letter-spacing: -1.4px; line-height: 1.05; margin-top: 2px; }
.tank-num i { font-style: normal; font-size: 13px; font-weight: 800; color: var(--ink-3); letter-spacing: 0; }
.tank-meta { text-align: right; }
.tank-meta span { display: block; }
.tank-meta span:first-child { font-size: 11px; font-weight: 900; color: var(--mint); }
.tank-meta span:first-child.is-full { color: var(--red); }
.timer { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.4px; margin-top: 2px; }

.tank {
  position: relative; height: 46px; border: var(--bd) solid var(--ink); border-radius: 14px;
  background: linear-gradient(180deg, #FFF6EA, #FFE8CF); overflow: hidden;
  box-shadow: inset 3px 3px 0 rgba(43,27,18,.08);
}
.tank-fill {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: linear-gradient(180deg, var(--amber), var(--orange-2) 62%, var(--orange));
  transition: width .5s linear;
}
.tank-fill::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.2) 0 10px, transparent 10px 22px);
}
.wave {
  position: absolute; top: -7px; left: 0; width: 200%; height: 14px;
  background: radial-gradient(circle at 12px -2px, transparent 11px, rgba(255,255,255,.55) 12px) repeat-x;
  background-size: 24px 14px; animation: waveMove 2.4s linear infinite;
}
.wave.w2 { opacity: .5; animation-duration: 3.6s; animation-direction: reverse; top: -5px; }
@keyframes waveMove { to { transform: translateX(-24px); } }
.tank-pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 900; color: var(--ink); letter-spacing: .4px;
  text-shadow: 0 1px 0 rgba(255,255,255,.6); font-variant-numeric: tabular-nums;
}
.tank.is-capped { animation: tankShake 1.6s ease-in-out infinite; border-color: var(--red); }
@keyframes tankShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-2px)} 75%{transform:translateX(2px)} }
.tank-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; font-size: 11px; color: var(--ink-3); font-weight: 700; flex-wrap: wrap; }
.tank-foot b { color: var(--ink); font-weight: 900; }
.tank-foot .warn { color: var(--red); font-weight: 900; }

/* 状态格 */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.stat {
  background: #fff; border: 2.5px solid var(--ink); border-radius: var(--r-md);
  padding: 10px 11px; box-shadow: var(--sh-sm);
}
.stat b { display: block; font-size: 20px; font-weight: 900; letter-spacing: -.7px; margin: 2px 0 4px; }
.stat .hint { font-size: 10px; color: var(--ink-3); font-weight: 700; line-height: 1.45; }
.bar { height: 8px; border-radius: 999px; background: var(--cream-2); border: 2px solid var(--ink); overflow: hidden; }
.bar i { display: block; height: 100%; width: 80%; background: linear-gradient(90deg, var(--mint), #7BE0B8); transition: width .4s ease; }
.bar i.low { background: linear-gradient(90deg, var(--red), #FF8A6B); }
.bar i.mid { background: linear-gradient(90deg, var(--amber), #FFE08A); }

/* 操作区 */
.action-row { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 9px; margin-bottom: 12px; }
.act {
  border: var(--bd) solid var(--ink); border-radius: var(--r-md); background: #fff;
  padding: 11px 6px 10px; box-shadow: var(--sh-sm); text-align: center;
  transition: transform .12s var(--tap), box-shadow .12s, filter .2s;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.act:active { transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }
.act:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.act-ico { font-size: 21px; line-height: 1; }
.act b { font-size: 13px; font-weight: 900; }
.act small { font-size: 9.5px; color: var(--ink-3); font-weight: 700; }
.act-main { background: linear-gradient(160deg, var(--orange-2), var(--orange) 55%, var(--red)); color: #fff; }
.act-main small { color: rgba(255,255,255,.85); }
.act-main.is-ready { animation: readyGlow 1.5s ease-in-out infinite; }
@keyframes readyGlow {
  0%,100% { box-shadow: var(--sh-sm), 0 0 0 0 rgba(255,78,0,.5); }
  50% { box-shadow: var(--sh-sm), 0 0 0 9px rgba(255,78,0,0); }
}
.server-note { margin: 0 2px; font-size: 10.5px; color: var(--ink-3); font-weight: 600; line-height: 1.6; text-align: center; }
.server-note b { color: var(--mint); }
.server-note.err b { color: var(--red); }

/* ── 兑换 / 卡包 ──────────────────────────────────── */
.bank-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(120deg, var(--ink), #4A3226); color: #fff;
  border: var(--bd) solid var(--ink); border-radius: var(--r-md); padding: 12px 14px;
  box-shadow: var(--sh-sm); margin-bottom: 14px;
}
.bank-bar .label { color: rgba(255,255,255,.6); }
.bank-bar b { font-size: 26px; font-weight: 900; letter-spacing: -1px; color: var(--amber); display: block; line-height: 1.1; }
.bank-bar .tip { font-size: 10.5px; color: rgba(255,255,255,.72); font-weight: 700; text-align: right; line-height: 1.5; }

.coupon-list { display: grid; gap: 11px; }
.coupon {
  position: relative; display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 11px;
  background: #fff; border: var(--bd) solid var(--ink); border-radius: var(--r-md);
  padding: 11px 12px; box-shadow: var(--sh-sm); overflow: hidden;
}
.coupon::before, .coupon::after {
  content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  background: var(--cream); border: 2.5px solid var(--ink); left: 84px;
}
.coupon::before { top: -9px; } .coupon::after { bottom: -9px; }
.coupon-amt {
  text-align: center; border-right: 2.5px dashed rgba(43,27,18,.28); padding-right: 8px;
}
.coupon-amt .rule { font-size: 14px; font-weight: 900; color: var(--orange); line-height: 1.25; letter-spacing: -.4px; }
.coupon-amt .kind { font-size: 9.5px; color: var(--ink-3); font-weight: 800; margin-top: 3px; }
.coupon-mid { min-width: 0; padding-left: 4px; }
.coupon-mid h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 900; }
.coupon-tag {
  display: inline-block; font-size: 9.5px; font-weight: 900; border: 2px solid var(--ink);
  border-radius: 999px; padding: 1px 7px; background: var(--cream-2);
}
.coupon-tag.hot { background: var(--red); color: #fff; }
.coupon-cost { font-size: 11px; color: var(--ink-2); font-weight: 800; margin-top: 5px; }
.coupon-cost b { color: var(--ink); font-size: 13px; }
.coupon.owned { background: #F3FBF7; }
.coupon.owned .coupon-tag { background: var(--mint); color: #fff; }

.empty {
  text-align: center; padding: 34px 18px; color: var(--ink-3);
  border: 2.5px dashed rgba(43,27,18,.25); border-radius: var(--r-md); background: rgba(255,255,255,.6);
}
.empty .big { font-size: 34px; display: block; margin-bottom: 8px; opacity: .55; }
.empty p { margin: 0; font-size: 12.5px; font-weight: 700; line-height: 1.7; }

/* ── 同事 ─────────────────────────────────────────── */
.mate-list { display: grid; gap: 9px; margin-bottom: 14px; }
.mate {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center;
  background: #fff; border: 2.5px solid var(--ink); border-radius: var(--r-md); padding: 8px 11px;
  box-shadow: var(--sh-sm);
}
.mate svg, .mate img { width: 44px; height: 44px; display: block; border-radius: 50%; }
.mate b { display: block; font-size: 13.5px; font-weight: 900; }
.mate small { font-size: 10.5px; color: var(--ink-3); font-weight: 700; }
.mate .bonus { font-size: 11px; font-weight: 900; color: var(--mint); }
.mate-x { border: 2px solid var(--ink); background: #fff; border-radius: 8px; width: 24px; height: 24px; font-size: 12px; font-weight: 900; line-height: 1; }

.invite-box {
  background: linear-gradient(135deg, #FFF0DC, #FFE0BE); border: 2.5px solid var(--ink);
  border-radius: var(--r-md); padding: 12px; margin-bottom: 12px;
}
.invite-box code {
  display: block; background: #fff; border: 2px dashed rgba(43,27,18,.35); border-radius: 10px;
  padding: 8px 10px; font-size: 11px; font-weight: 700; word-break: break-all; margin: 8px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2);
}

/* ── 底部导航 ─────────────────────────────────────── */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 448px; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: var(--bd) solid var(--ink);
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
}
.tab {
  border: 0; background: transparent; border-radius: 12px; padding: 6px 2px 5px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10.5px; font-weight: 800; color: var(--ink-3); transition: all .18s var(--tap);
  position: relative;
}
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--orange); background: var(--cream-2); font-weight: 900; }
.tab .dot-badge {
  position: absolute; top: 3px; right: calc(50% - 17px); min-width: 15px; height: 15px;
  background: var(--red); color: #fff; border: 2px solid var(--ink); border-radius: 999px;
  font-size: 8.5px; font-weight: 900; display: grid; place-items: center; padding: 0 3px;
}

/* ── 弹层 ─────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(43,27,18,.55); backdrop-filter: blur(4px); padding: 18px;
  animation: fadeIn .22s ease both;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal-card {
  width: 100%; max-width: 396px; max-height: 88dvh; overflow-y: auto;
  background: var(--cream); border: var(--bd) solid var(--ink); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: 18px 16px 16px; text-align: center;
  animation: popIn .38s var(--tap) both;
}
@keyframes popIn { from { opacity: 0; transform: scale(.86) translateY(18px); } }
.modal-card h3 { margin: 0 0 4px; font-size: 22px; font-weight: 900; letter-spacing: -.7px; }
.modal-card .sub { margin: 0 0 14px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.modal-actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 9px; margin-top: 14px; }

.settle-burst { font-size: 46px; line-height: 1; animation: burst .7s var(--tap) both; }
@keyframes burst { 0% { transform: scale(.3) rotate(-14deg); opacity: 0; } 60% { transform: scale(1.18) rotate(4deg); } }
.settle-num {
  font-size: 44px; font-weight: 900; letter-spacing: -2px; color: var(--orange); line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.settle-num small { font-size: 14px; color: var(--ink-3); letter-spacing: 0; font-weight: 800; }

.report {
  background: #fff; border: var(--bd) solid var(--ink); border-radius: var(--r-md);
  box-shadow: var(--sh-sm); overflow: hidden; text-align: left; margin-top: 12px;
}
.report canvas { display: block; width: 100%; height: auto; }
.report-rows { padding: 11px 13px 13px; }
.report-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 5px 0; border-bottom: 1.5px dashed rgba(43,27,18,.14); }
.report-row:last-child { border-bottom: 0; }
.report-row span { color: var(--ink-3); font-weight: 700; }
.report-row b { font-weight: 900; font-variant-numeric: tabular-nums; }
.report-quote {
  margin: 11px 13px 13px; padding: 10px 12px; background: var(--cream-2);
  border-left: 4px solid var(--orange); border-radius: 0 10px 10px 0;
  font-size: 12px; line-height: 1.65; color: var(--ink-2); font-weight: 600;
}

/* 飘能量 */
.fly {
  position: fixed; z-index: 120; pointer-events: none;
  font-size: 15px; font-weight: 900; color: var(--orange);
  text-shadow: 0 1px 0 #fff, 0 0 8px rgba(255,197,61,.9);
  animation: flyUp 1.05s cubic-bezier(.25,.7,.35,1) forwards;
}
@keyframes flyUp {
  0% { opacity: 0; transform: translate(0,0) scale(.6); }
  18% { opacity: 1; transform: translate(0,-14px) scale(1.1); }
  100% { opacity: 0; transform: translate(var(--dx,0), -92px) scale(.85); }
}

/* Toast */
.toast-wrap { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 200; display: grid; gap: 7px; width: max-content; max-width: 90vw; }
.toast {
  background: var(--ink); color: #fff; border-radius: 999px; padding: 9px 16px;
  font-size: 12.5px; font-weight: 700; box-shadow: 0 6px 20px rgba(43,27,18,.35);
  animation: toastIn .3s var(--tap) both; text-align: center;
}
.toast.good { background: var(--mint); color: #06301F; }
.toast.bad { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.9); } }
.toast.out { animation: toastOut .28s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(.94); } }

/* ── 宠物动画 ─────────────────────────────────────── */
.pet-svg { overflow: visible; }
.pet-svg .st { display: none; }
.pet-svg[data-state="work"] .st-open { display: block; }
.pet-svg[data-state="work"] .st-spark { display: block; }
.pet-svg[data-state="doze"] .st-closed { display: block; }
.pet-svg[data-state="doze"] .st-zzz { display: block; }
.pet-svg[data-state="slack"] .st-open-side { display: block; opacity: 1; }
.pet-svg[data-state="slack"] .st-sweat { display: block; }
.pet-svg[data-kind="photo"] .st-open,
.pet-svg[data-kind="photo"] .st-open-side,
.pet-svg[data-kind="photo"] .st-closed { display: none !important; }

.pet-bob { animation: bob 2.9s ease-in-out infinite; transform-box: view-box; transform-origin: 110px 200px; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-5px) rotate(-.7deg); } }
.pet-svg[data-state="doze"] .pet-bob { animation: dozeBob 3.8s ease-in-out infinite; }
@keyframes dozeBob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(3px) rotate(2.5deg); } }

.pet-eyes { animation: blink 5.6s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink { 0%,92%,100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }
.st-open-side { animation: sideGlance 4.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes sideGlance { 0%,100% { transform: translateX(0); } 40%,60% { transform: translateX(4px); } }

.pet-tail { animation: wag 1.7s ease-in-out infinite; transform-box: view-box; transform-origin: 168px 176px; }
.pet-tail-fast { animation-duration: .55s; }
@keyframes wag { 0%,100% { transform: rotate(-9deg); } 50% { transform: rotate(13deg); } }
.pet-ear-l { animation: earL 4.4s ease-in-out infinite; transform-box: view-box; transform-origin: 70px 52px; }
.pet-ear-r { animation: earR 4.4s ease-in-out infinite; transform-box: view-box; transform-origin: 150px 52px; }
@keyframes earL { 0%,88%,100% { transform: rotate(0); } 92% { transform: rotate(-7deg); } }
@keyframes earR { 0%,88%,100% { transform: rotate(0); } 94% { transform: rotate(7deg); } }
.pet-tongue { animation: tongue 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: top center; }
@keyframes tongue { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.72); } }
.pet-crest { animation: crest 3.1s ease-in-out infinite; transform-box: view-box; transform-origin: 118px 38px; }
@keyframes crest { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(6deg); } }

.st-zzz text { transform-box: fill-box; transform-origin: center; }
.st-zzz .z1 { animation: zfloat 2.8s ease-out infinite; }
.st-zzz .z2 { animation: zfloat 2.8s ease-out infinite .5s; }
.st-zzz .z3 { animation: zfloat 2.8s ease-out infinite 1s; }
@keyframes zfloat { 0% { opacity: 0; transform: translate(0,8px) scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(10px,-16px) scale(1.15); } }
.st-sweat { animation: sweat 2.1s ease-in infinite; transform-box: fill-box; transform-origin: top center; }
@keyframes sweat { 0% { opacity: 0; transform: translateY(-5px) scale(.7); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(13px) scale(1); } }
.st-spark .s1 { animation: spark 1.9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.st-spark .s2 { animation: spark 1.9s ease-in-out infinite .7s; transform-box: fill-box; transform-origin: center; }
@keyframes spark { 0%,100% { opacity: .25; transform: scale(.65) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(28deg); } }
.prop-sign { animation: signWave 1.5s ease-in-out infinite; transform-box: view-box; transform-origin: 178px 196px; }
@keyframes signWave { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(7deg); } }
.prop-loupe { animation: loupeMove 3.4s ease-in-out infinite; transform-box: view-box; transform-origin: 184px 150px; }
@keyframes loupeMove { 0%,100% { transform: translate(0,0) rotate(0); } 50% { transform: translate(-7px,-5px) rotate(-9deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
