/* 计时小猫：全局悬浮球 + 接单进度面板 */
.cat-timer-root {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  pointer-events: none;
  font-family: inherit;
}
.cat-timer-root[hidden] { display: none; }
.cat-timer-ball {
  position: fixed;
  width: 78px;
  height: 78px;
  padding: 0;
  border: 2px solid rgba(175, 215, 255, .7);
  border-radius: 50%;
  background: radial-gradient(circle at 45% 35%, #fff, #dce9ff 58%, #8fb7f2);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, .46),
    0 0 0 5px rgba(92, 157, 255, .12),
    0 0 28px rgba(97, 196, 255, .32);
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  overflow: visible;
  transition: transform .18s ease, box-shadow .18s ease;
}
.cat-timer-ball:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 24px 50px rgba(0, 0, 0, .5), 0 0 0 6px rgba(92, 157, 255, .16), 0 0 38px rgba(97, 196, 255, .45); }
.cat-timer-ball.is-dragging { cursor: grabbing; transition: none; }
.cat-timer-ball.is-open { box-shadow: 0 18px 42px rgba(0, 0, 0, .46), 0 0 0 6px rgba(120, 236, 166, .18), 0 0 40px rgba(82, 240, 141, .38); }
.cat-timer-ball > img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 42%;
  display: block;
  pointer-events: none;
  transform: scale(1.12);
}
.cat-timer-ball-halo {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(105, 236, 255, .8), transparent 45%, rgba(120, 255, 167, .75), transparent 78%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: cat-halo-spin 5.5s linear infinite;
  pointer-events: none;
}
@keyframes cat-halo-spin { to { transform: rotate(360deg); } }
.cat-timer-ball-dot {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #0b1322;
  background: #64ef8f;
  box-shadow: 0 0 14px rgba(100, 239, 143, .9);
}
.cat-timer-ball-label {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(8, 15, 30, .9);
  border: 1px solid rgba(126, 168, 235, .36);
  color: #b9d0f8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  white-space: nowrap;
}
.cat-timer-panel {
  position: fixed;
  right: 26px;
  bottom: 98px;
  width: min(980px, calc(100vw - 40px));
  height: min(620px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  color: #eef4ff;
  border: 1px solid rgba(114, 155, 232, .42);
  border-radius: 26px;
  background:
    radial-gradient(680px 420px at 18% 20%, rgba(53, 93, 210, .22), transparent 65%),
    radial-gradient(520px 360px at 92% 86%, rgba(97, 58, 205, .24), transparent 70%),
    linear-gradient(150deg, rgba(13, 21, 41, .985), rgba(5, 9, 20, .99));
  box-shadow: 0 34px 100px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .035) inset, 0 0 70px rgba(75, 111, 255, .14);
  animation: cat-panel-in .22s cubic-bezier(.2, .8, .2, 1);
}
.cat-timer-panel[hidden] { display: none; }
@keyframes cat-panel-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.cat-timer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 18px 0 20px;
  border-bottom: 1px solid rgba(135, 167, 223, .14);
  background: rgba(8, 14, 28, .55);
}
.cat-timer-head-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cat-timer-head-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #8ef3b0;
  background: rgba(91, 237, 145, .1);
  border: 1px solid rgba(113, 238, 161, .25);
  font-size: 14px;
}
.cat-timer-head-title strong { display: block; color: #f4f8ff; font-size: 14px; letter-spacing: .03em; }
.cat-timer-head-title small { display: block; margin-top: 2px; color: #7d8ba8; font-size: 9px; }
.cat-timer-head-actions { display: flex; align-items: center; gap: 5px; }
.cat-timer-icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #b5c4df;
  font-size: 17px;
  cursor: pointer;
  transition: .16s ease;
}
.cat-timer-icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .07); border-color: rgba(160, 187, 235, .2); }
.cat-timer-icon-btn.is-close:hover { color: #fff; background: rgba(222, 67, 67, .3); border-color: rgba(255, 125, 125, .35); }
.cat-timer-icon-btn.is-spinning { animation: cat-spin 1s linear infinite; }
@keyframes cat-spin { to { transform: rotate(360deg); } }
.cat-timer-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 310px minmax(0, 1fr); }
.cat-timer-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 0;
  padding: 14px 18px 18px;
  overflow: hidden;
  border-right: 1px solid rgba(135, 167, 223, .13);
  background: linear-gradient(180deg, rgba(22, 37, 73, .48), rgba(7, 12, 24, .3));
}
.cat-timer-hero-glow {
  position: absolute;
  left: 50%;
  top: 22%;
  width: 250px;
  height: 250px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(86, 187, 255, .28), rgba(84, 90, 235, .12) 45%, transparent 70%);
  filter: blur(8px);
}
.cat-timer-hero img {
  position: relative;
  width: min(270px, 92%);
  max-height: 330px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .45));
  -webkit-mask-image: radial-gradient(ellipse 78% 72% at 50% 52%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 72% at 50% 52%, #000 58%, transparent 100%);
  user-select: none;
  pointer-events: none;
}
.cat-timer-clock-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  margin-top: -8px;
  padding: 10px 14px;
  border: 1px solid rgba(140, 166, 216, .34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(58, 67, 87, .96), rgba(27, 33, 48, .98));
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}
.cat-timer-clock-card span { color: #fff; font-size: 33px; font-weight: 900; letter-spacing: .05em; font-variant-numeric: tabular-nums; line-height: 1; }
.cat-timer-clock-card b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8c99b0;
  font-size: 11px;
  white-space: nowrap;
}
.cat-timer-clock-card b::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #59657b; }
.cat-timer-clock-card b.is-live { color: #a6ffc0; }
.cat-timer-clock-card b.is-live::before { background: #64ef8f; box-shadow: 0 0 10px rgba(100, 239, 143, .9); }
.cat-timer-hero > p { position: relative; margin: 10px 0 4px; color: #96a5c1; font-size: 11px; text-align: center; line-height: 1.5; }
.cat-timer-hero-tip { position: relative; color: #65738d; font-size: 9px; letter-spacing: .04em; }
.cat-timer-orders {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(112, 138, 184, .5) transparent;
}
.cat-timer-group { display: flex; flex-direction: column; gap: 9px; }
.cat-timer-group-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 3px; }
.cat-timer-group-head span { display: flex; align-items: center; gap: 8px; color: #dce6f8; font-size: 12px; font-weight: 800; }
.cat-timer-group-head i { width: 7px; height: 7px; border-radius: 50%; }
.cat-timer-group-head i.is-companion { background: #62ed93; box-shadow: 0 0 10px rgba(98, 237, 147, .7); }
.cat-timer-group-head i.is-boss { background: #b992ff; box-shadow: 0 0 10px rgba(185, 146, 255, .7); }
.cat-timer-group-head b { min-width: 23px; height: 20px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, .07); color: #aebbd3; font-size: 10px; }
.cat-timer-list { display: flex; flex-direction: column; gap: 8px; }
.cat-order-card {
  display: flex;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(111, 145, 208, .2);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(24, 39, 76, .74), rgba(12, 21, 42, .8));
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22), 0 0 0 1px rgba(255, 255, 255, .025) inset;
  transition: border-color .16s ease, transform .16s ease;
}
.cat-order-card:hover { border-color: rgba(116, 180, 255, .45); transform: translateY(-1px); }
.cat-order-card.is-paused { border-color: rgba(255, 193, 92, .35); background: linear-gradient(135deg, rgba(60, 45, 25, .55), rgba(24, 20, 15, .75)); }
.cat-order-avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, hsl(var(--cat-avatar-hue) 65% 58%), hsl(calc(var(--cat-avatar-hue) + 42) 70% 42%));
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .28);
}
.cat-order-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cat-order-main { flex: 1; min-width: 0; }
.cat-order-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat-order-title strong { color: #f1f6ff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-order-state { flex: 0 0 auto; padding: 2px 7px; border-radius: 999px; background: rgba(94, 235, 143, .12); border: 1px solid rgba(94, 235, 143, .28); color: #86f0a8; font-size: 9px; font-weight: 800; }
.cat-order-state.is-paused { background: rgba(255, 193, 92, .12); border-color: rgba(255, 193, 92, .3); color: #ffd28a; }
.cat-order-main > p { margin: 4px 0 8px; color: #7d8ca8; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-order-progress { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.cat-order-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffd445, #ffe993); box-shadow: 0 0 12px rgba(255, 215, 77, .38); transition: width .35s linear; }
.cat-order-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 6px; }
.cat-order-foot b { color: #f6f9ff; font-size: 14px; font-variant-numeric: tabular-nums; }
.cat-order-foot small { color: #7f8da7; font-size: 9px; }
.cat-order-empty {
  padding: 22px 14px;
  text-align: center;
  border: 1px dashed rgba(117, 145, 195, .2);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
}
.cat-order-empty strong { display: block; color: #9eacc5; font-size: 11px; }
.cat-order-empty span { display: block; margin-top: 4px; color: #65728a; font-size: 9px; }
.cat-timer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 18px;
  border-top: 1px solid rgba(135, 167, 223, .12);
  background: rgba(5, 10, 20, .55);
}
.cat-timer-foot > span { color: #6f7d96; font-size: 9px; }
.cat-timer-go { border: 0; background: transparent; color: #8cc7ff; font-size: 10px; font-weight: 800; cursor: pointer; }
.cat-timer-go:hover { color: #b8ddff; }
@media (max-width: 860px) {
  .cat-timer-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: calc(100vh - 16px); border-radius: 22px; }
  .cat-timer-body { grid-template-columns: 1fr; overflow-y: auto; }
  .cat-timer-hero { min-height: 290px; border-right: 0; border-bottom: 1px solid rgba(135, 167, 223, .13); }
  .cat-timer-hero img { max-height: 200px; width: 190px; }
  .cat-timer-orders { overflow: visible; padding: 14px; }
}
@media (max-width: 520px) {
  .cat-timer-ball { width: 68px; height: 68px; }
  .cat-timer-clock-card span { font-size: 28px; }
  .cat-timer-head-title small { display: none; }
  .cat-timer-foot > span { display: none; }
}

/* 已并入聊天浮窗：不再单独显示第二个悬浮球。 */
.cat-timer-ball { display: none !important; }
.cat-timer-panel.is-embedded {
  position: relative !important;
  inset: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none;
  min-height: 0;
  flex: 1;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(620px 380px at 18% 18%, rgba(53, 93, 210, .18), transparent 66%),
    radial-gradient(460px 320px at 92% 88%, rgba(97, 58, 205, .18), transparent 70%),
    transparent;
  box-shadow: none;
  animation: none;
}
.cat-timer-panel.is-embedded .cat-timer-head {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  background: rgba(8, 14, 28, .28);
}
.cat-timer-panel.is-embedded #cat-timer-minimize { display: none; }
.cat-timer-panel.is-embedded .cat-timer-head-note { color: #6f82a5; }
@media (max-width: 860px) {
  .cat-timer-panel.is-embedded { height: 100% !important; }
  .cat-timer-panel.is-embedded .cat-timer-body { overflow-y: auto; }
}
