/* ==========================================================================
 * 赚豆通用顶部栏 · earn_topbar.css
 * [20261110 老板令·宠物V2二期] 跟读/闯关/书童三个赚豆页共用一套顶栏，
 * 各页只接内容区，不再各写各的头。纯 CSS 零依赖，未挂载时不影响页面。
 * ========================================================================== */

.earn-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  background: linear-gradient(180deg, #FF9A3C 0%, #FF8A1E 60%, #F97F12 100%);
  box-shadow: 0 2px 8px rgba(249, 127, 18, .28);
  -webkit-tap-highlight-color: transparent;
}

.earn-topbar .etb-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background .15s;
}
.earn-topbar .etb-back:active {
  background: rgba(255, 255, 255, .38);
  transform: scale(.94);
}

.earn-topbar .etb-titles {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.earn-topbar .etb-title {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(180, 80, 0, .28);
}
.earn-topbar .etb-sub {
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.earn-topbar .etb-bean {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(180, 80, 0, .18);
}
.earn-topbar .etb-bean-icon {
  font-size: 15px;
  line-height: 1;
}
.earn-topbar .etb-bean-num {
  color: #E2650A;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
@keyframes etbBeanPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}
.earn-topbar .etb-bean-num.etb-pop {
  animation: etbBeanPop .38s ease-out;
}

.earn-body {
  box-sizing: border-box;
  width: 100%;
}
