
/* Global invisible scrollbars */
body.reskin-active * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body.reskin-active *::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

/* ============================================================
   DAYTOY reskin CSS v6
   Clean source of truth for PNG-room layout.
   Original index.html remains untouched.
   ============================================================ */

body.reskin-active {
  background: #f7e7e5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

body.reskin-active #room-canvas { z-index: 1 !important; }
body.reskin-active #body-canvas { z-index: 2 !important; }
body.reskin-active #fx-canvas { z-index: 4 !important; }

/* Top HUD */
body.reskin-active #top-bar {
  position: absolute !important;
  top: calc(18px + env(safe-area-inset-top, 30px)) !important;
  left: 12px !important;
  right: 12px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.26fr) !important;
  gap: 8px !important;
  align-items: start !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
  z-index: 18 !important;
}

body.reskin-active #top-bar::before,
body.reskin-active #top-bar::after,
body.reskin-active #app::before,
body.reskin-active #app::after {
  content: none !important;
  display: none !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.reskin-active .reskin-name-card,
body.reskin-active .reskin-xp-card {
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 24px !important;
  background: #fffafd !important;
  background-image: none !important;
  border: 1px solid rgba(255,255,255,0.95) !important;
  box-shadow: 0 7px 16px rgba(137,95,116,0.16), inset 0 1px 0 rgba(255,255,255,0.95) !important;
  display: flex !important;
  align-items: center !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  min-width: 0 !important;
}

body.reskin-active .reskin-name-card {
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 7px 10px 7px 14px !important;
}

body.reskin-active .reskin-paw { display: none !important; }

body.reskin-active #pet-name-label {
  font-size: clamp(16px, 4.6vw, 20px) !important;
  line-height: 1 !important;
  color: #2c2a2c !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  min-width: 0 !important;
}


body.reskin-active #pet-name-label::before {
  content: none !important;
  display: none !important;
}
body.reskin-active #pet-name-label {
  background: transparent !important;
  background-image: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.reskin-active .reskin-lv-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 28px !important;
  min-width: 48px !important;
  padding: 0 8px !important;
  border-radius: 16px !important;
  background: #ffe3eb !important;
  background-image: none !important;
  color: #8b4e65 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75) !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

body.reskin-active .reskin-xp-card {
  gap: 7px !important;
  padding: 7px 8px 7px 10px !important;
}

body.reskin-active .reskin-star {
  width: 25px !important;
  height: 25px !important;
  min-width: 25px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffdee8 !important;
  color: #f4779b !important;
  font-size: 15px !important;
  box-shadow: 0 3px 7px rgba(244,119,155,0.2) !important;
}

body.reskin-active .reskin-xp-main { flex: 1 1 auto !important; min-width: 0 !important; }
body.reskin-active .reskin-xp-label {
  font-size: 14px !important;
  font-weight: 750 !important;
  color: #4e454a !important;
  margin-bottom: 4px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
body.reskin-active .xp-bar-bg {
  height: 7px !important;
  border-radius: 999px !important;
  background: rgba(82,68,78,0.12) !important;
  overflow: hidden !important;
  box-shadow: inset 0 1px 2px rgba(80,60,70,0.12) !important;
}
body.reskin-active .xp-bar-fill {
  height: 100% !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg,#ff92b2,#b99cff) !important;
  transition: width 0.35s ease !important;
}
body.reskin-active #settings-cog-btn {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 50% !important;
  border: 0 !important;
  background: #e6f5ff !important;
  color: #608aa6 !important;
  font-size: 19px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 5px 10px rgba(80,135,170,0.18), inset 0 1px 0 rgba(255,255,255,0.9) !important;
  cursor: pointer !important;
}

/* Stat card */
body.reskin-active #stats-bar {
  position: absolute !important;
  left: 14px !important;
  right: 14px !important;
  bottom: calc(116px + env(safe-area-inset-bottom, 0px)) !important;
  height: auto !important;
  min-height: 58px !important;
  padding: 8px 8px !important;
  border-radius: 24px !important;
  background: rgba(255,250,246,0.96) !important;
  background-image: none !important;
  border: 1px solid rgba(255,255,255,0.9) !important;
  box-shadow: 0 8px 20px rgba(137,95,116,0.16), inset 0 1px 0 rgba(255,255,255,0.95) !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  z-index: 20 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.reskin-active .reskin-stat {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  column-gap: 6px !important;
  align-items: center !important;
  min-width: 0 !important;
  padding: 0 6px !important;
}

body.reskin-active .reskin-stat > div {
  display: grid !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  gap: 0 !important;
}

body.reskin-active .reskin-stat + .reskin-stat { border-left: 1px solid rgba(125,88,104,0.16) !important; }
body.reskin-active .reskin-stat-icon { width: 34px !important; height: 34px !important; object-fit: contain !important; display: block !important; }
body.reskin-active .reskin-stat-label { font-size: 14px !important; font-weight: 780 !important; color: #6a4f5a !important; line-height: 1 !important; margin-bottom: 5px !important; white-space: nowrap !important; }
body.reskin-active .reskin-stat-track { width: 100% !important; height: 8px !important; border-radius: 999px !important; background: rgba(87,69,80,0.13) !important; overflow: hidden !important; box-shadow: inset 0 1px 3px rgba(70,54,65,0.12) !important; }
body.reskin-active .reskin-stat-fill { height: 100% !important; border-radius: 999px !important; transition: width 0.4s ease !important; }
body.reskin-active #sbar-hunger { background: linear-gradient(90deg,#ffa3bd,#f06f9a) !important; }
body.reskin-active #sbar-clean { background: linear-gradient(90deg,#8ed4ff,#4aa9e4) !important; }
body.reskin-active #sbar-happy { background: linear-gradient(90deg,#ffd36b,#ff9c3b) !important; }

/* Bottom action buttons */
body.reskin-active #action-row {
  position: absolute !important;
  left: 12px !important;
  right: 12px !important;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  height: 90px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0,1fr)) !important;
  gap: 5px !important;
  z-index: 21 !important;
}
body.reskin-active .act-btn {
  width: 100% !important;
  aspect-ratio: auto !important;
  min-height: 0 !important;
  height: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  transform: none !important;
}
body.reskin-active .act-btn:active { transform: scale(0.96) !important; }
body.reskin-active .act-btn img { width: 100% !important; height: 100% !important; object-fit: contain !important; display: block !important; filter: none !important; -webkit-filter: none !important; pointer-events: none !important; }
body.reskin-active .act-btn .ico,
body.reskin-active .act-btn .lbl { display: none !important; }

/* Food picker */
body.reskin-active #food-picker {
  bottom: calc(206px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 36 !important;
  background: rgba(255,255,255,0.98) !important;
  border: 1px solid rgba(255,255,255,0.95) !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 26px rgba(137,95,116,0.2) !important;
}

/* Bottom sheets / drawers */
body.reskin-active .drawer {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  max-height: calc(86% - env(safe-area-inset-bottom, 0px)) !important;
  transform: translateY(110%) !important;
  border-radius: 24px 24px 0 0 !important;
  padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)) !important;
  background: linear-gradient(165deg,#fffdf4,#ffe9b8) !important;
  box-shadow: 0 -14px 32px rgba(137,95,116,0.22) !important;
  z-index: 50 !important;
  transition: transform 0.28s ease !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
}
body.reskin-active .drawer.open { transform: translateY(0) !important; }
body.reskin-active .drawer-pad { padding-bottom: calc(38px + env(safe-area-inset-bottom, 0px)) !important; }
body.reskin-active .drawer-header { padding-bottom: 14px !important; background: #fffdf4 !important; }

/* v7 drawer typography scale-up */
body.reskin-active .drawer {
  font-size: 17px !important;
  line-height: 1.45 !important;
}
body.reskin-active .drawer-header span {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #6b4255 !important;
}
body.reskin-active .drawer-header button {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 50% !important;
  font-size: 16px !important;
  border: 1.5px solid #e0457b !important;
  background: #fbe0ea !important;
  color: #8b2f52 !important;
}
body.reskin-active .drawer button,
body.reskin-active .drawer input,
body.reskin-active .drawer select,
body.reskin-active .drawer textarea {
  font-size: 16px !important;
}
body.reskin-active .drawer .setting-row,
body.reskin-active .drawer .setting-label,
body.reskin-active .drawer .wardrobe-item,
body.reskin-active .drawer .game-card,
body.reskin-active .drawer label,
body.reskin-active .drawer p,
body.reskin-active .drawer div {
  font-size: inherit;
}
body.reskin-active .drawer .small,
body.reskin-active .drawer .muted,
body.reskin-active .drawer small {
  font-size: 14px !important;
}

@media (max-width: 380px) {
  body.reskin-active #top-bar { left: 10px !important; right: 10px !important; gap: 7px !important; }
  body.reskin-active .reskin-name-card,
  body.reskin-active .reskin-xp-card { height: 42px !important; min-height: 42px !important; }
  body.reskin-active #pet-name-label { font-size: 16px !important; }
  
body.reskin-active #pet-name-label::before {
  content: none !important;
  display: none !important;
}
body.reskin-active #pet-name-label {
  background: transparent !important;
  background-image: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.reskin-active .reskin-lv-pill { height: 27px !important; min-width: 45px !important; font-size: 13px !important; padding: 0 7px !important; }
  body.reskin-active .reskin-star { width: 24px !important; height: 24px !important; min-width: 24px !important; }
  body.reskin-active .reskin-xp-label { font-size: 13px !important; }
  body.reskin-active #settings-cog-btn { width: 32px !important; height: 32px !important; min-width: 32px !important; font-size: 18px !important; }
  body.reskin-active #stats-bar { left: 12px !important; right: 12px !important; bottom: calc(116px + env(safe-area-inset-bottom, 0px)) !important; min-height: 54px !important; padding: 7px 7px !important; }
  body.reskin-active .reskin-stat { grid-template-columns: 32px minmax(0,1fr) !important; column-gap: 5px !important; padding: 0 5px !important; }
  body.reskin-active .reskin-stat-icon { width: 30px !important; height: 30px !important; }
  body.reskin-active .reskin-stat-label { font-size: 13px !important; }
  body.reskin-active #action-row { left: 8px !important; right: 8px !important; gap: 4px !important; height: 90px !important; }
}

/* v6 regression fixes after CSS split: override original ID-based polish selectors */
body.reskin-active #pet-name-label::before {
  content: none !important;
  display: none !important;
}
body.reskin-active #pet-name-label {
  background: transparent !important;
  background-image: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.reskin-active #stats-bar .reskin-stat {
  background: transparent !important;
  background-image: none !important;
  padding: 0 6px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  gap: 0 !important;
}
body.reskin-active #stats-bar .reskin-stat > div {
  display: grid !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  gap: 0 !important;
}
body.reskin-active #stats-bar .reskin-stat-track {
  width: 100% !important;
  height: 8px !important;
  border-radius: 999px !important;
  background: rgba(87,69,80,0.13) !important;
  overflow: hidden !important;
  box-shadow: inset 0 1px 3px rgba(70,54,65,0.12) !important;
}
body.reskin-active #stats-bar .reskin-stat-fill {
  display: block !important;
  height: 100% !important;
  border-radius: 999px !important;
}
body.reskin-active #action-row .act-btn {
  max-width: none !important;
  height: 100% !important;
}


/* v8 trophy + level progress readability */
body.reskin-active #trophy-grid {
  gap: 14px 10px !important;
  padding: 4px 2px 18px !important;
}
body.reskin-active #trophy-grid > div {
  font-size: 14px !important;
  line-height: 1.35 !important;
}
body.reskin-active .rank-panel .section-title,
body.reskin-active #panel-trophy .section-title,
body.reskin-active #panel-rank-progress .section-title {
  font-size: 20px !important;
  font-weight: 850 !important;
  color: #6b4255 !important;
  margin: 8px 0 14px !important;
}
body.reskin-active .progress-row {
  gap: 10px !important;
  padding: 11px 10px !important;
  border-bottom: 1px solid #f2dfe8 !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
}
body.reskin-active .progress-row.current {
  border-radius: 14px !important;
  background: #fff0f7 !important;
  box-shadow: 0 5px 12px rgba(137,95,116,0.08) !important;
}
body.reskin-active .progress-lvl {
  min-width: 48px !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  color: #b7658d !important;
}
body.reskin-active .progress-name {
  min-width: 0 !important;
  font-size: 16px !important;
  font-weight: 750 !important;
  color: #5f4a54 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.reskin-active .progress-bar-bg {
  width: 74px !important;
  height: 10px !important;
  border-radius: 999px !important;
  background: #eadde5 !important;
}
body.reskin-active .progress-bar-fill {
  border-radius: 999px !important;
  background: linear-gradient(90deg,#ff9bc5,#b9a5ff) !important;
}
body.reskin-active .progress-status {
  min-width: 42px !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  color: #9a7b8a !important;
}
@media (max-width: 380px) {
  body.reskin-active .progress-row { gap: 7px !important; padding: 10px 7px !important; }
  body.reskin-active .progress-lvl { min-width: 42px !important; font-size: 14px !important; }
  body.reskin-active .progress-name { font-size: 15px !important; }
  body.reskin-active .progress-bar-bg { width: 58px !important; }
  body.reskin-active .progress-status { min-width: 34px !important; font-size: 13px !important; }
}


/* Match-3 visual correction patch */
body.reskin-active #minigame-modal {
  background: url("../reskin/match3-ui/bg-room.jpg") center top / cover no-repeat !important;
}
body.reskin-active #minigame-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,246,250,0.12) 0%, rgba(255,240,246,0.28) 100%);
  pointer-events: none;
}
body.reskin-active #mg-scene {
  position: relative;
  z-index: 1;
  gap: 18px;
}
body.reskin-active #mg-topbar {
  width: min(100%, 760px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
body.reskin-active #mg-hud-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,246,248,0.92));
  border: 1px solid rgba(255,226,234,0.95);
  box-shadow: 0 10px 24px rgba(212,158,175,0.26), inset 0 3px 0 rgba(255,255,255,0.96), inset 0 -3px 0 rgba(243,209,220,0.92);
}
body.reskin-active .mg-timer-ico {
  font-size: 19px;
  line-height: 1;
}
body.reskin-active #mg-time-label {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #994f6b !important;
}
body.reskin-active #mg-board-shell {
  position: relative;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border-radius: 42px;
  background: linear-gradient(180deg, rgba(255,246,248,0.88), rgba(255,231,238,0.92));
  border: 1px solid rgba(255,225,234,0.98);
  box-shadow: 0 18px 42px rgba(202,150,168,0.3), inset 0 3px 0 rgba(255,255,255,0.94), inset 0 -5px 0 rgba(238,200,213,0.92);
}
body.reskin-active #mg-board-shell::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 32px;
  border: 2px solid rgba(255,241,246,0.96);
  box-shadow: inset 0 0 0 1px rgba(243,218,227,0.9);
  pointer-events: none;
}
body.reskin-active #mg-board {
  position: relative;
  border-radius: 24px !important;
  background: transparent !important;
}
body.reskin-active .mg-cell {
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,248,250,0.96), rgba(249,235,240,0.96));
  border: 1px solid rgba(240,222,228,0.92);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.96), inset 0 -2px 0 rgba(238,223,228,0.85), 0 2px 6px rgba(221,188,198,0.18);
}
body.reskin-active .mg-cell-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
body.reskin-active .mg-cell-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 2px rgba(92, 55, 73, 0.08));
  pointer-events: none;
}
body.reskin-active .mg-cell[data-item="heart"] .mg-cell-img {
  width: 36px;
  height: 36px;
}
body.reskin-active .mg-cell-burst .mg-cell-img {
  animation: mgBurstPop 0.25s ease-out forwards;
}
@keyframes mgBurstPop {
  0% { transform: scale(1); }
  60% { transform: scale(1.12) rotate(3deg); }
  100% { transform: scale(0.72) rotate(-5deg); }
}
body.reskin-active #mg-overlay {
  backdrop-filter: blur(1px) !important;
  -webkit-backdrop-filter: blur(1px) !important;
}
body.reskin-active #mg-overlay-title {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
  color: #92536d;
  margin-bottom: 10px;
  text-align: center;
}

body.reskin-active #mg-overlay-card {
  min-width: 230px;
  max-width: 80%;
  padding: 22px 22px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,246,249,0.92));
  border: 1px solid rgba(255,226,234,0.98);
  box-shadow: 0 14px 34px rgba(208,156,173,0.24), inset 0 2px 0 rgba(255,255,255,0.95), inset 0 -2px 0 rgba(239,210,220,0.85);
  text-align: center;
}
body.reskin-active #mg-overlay-text {
  color: #8d5670 !important;
  text-shadow: 0 1px 6px rgba(255,255,255,0.75) !important;
}
body.reskin-active #mg-start-btn {
  background: linear-gradient(180deg, #ffedf4 0%, #ffd6e3 100%) !important;
  border: 1px solid rgba(241,177,198,0.95) !important;
  color: #b4547b !important;
  box-shadow: 0 10px 20px rgba(223,173,191,0.22), inset 0 2px 0 rgba(255,255,255,0.95), inset 0 -3px 0 rgba(241,189,206,0.75) !important;
}
@media (max-width: 430px) {
  body.reskin-active #mg-topbar {
    gap: 10px;
  }
  body.reskin-active #mg-hud-main {
    padding: 10px 12px;
    gap: 6px;
  }
  body.reskin-active #mg-time-label { font-size: 15px !important; }
  body.reskin-active #mg-board-shell {
    padding: 18px;
    border-radius: 34px;
  }
  body.reskin-active #mg-board-shell::before {
    inset: 10px;
    border-radius: 26px;
  }
  body.reskin-active .mg-cell-img { width: 36px; height: 36px; }
  body.reskin-active .mg-cell[data-item="heart"] .mg-cell-img { width: 34px; height: 34px; }
}


/* Match-3 polish patch: centered layout + stacked HUD */
body.reskin-active #mg-scene {
  justify-content: center !important;
  padding-top: calc(16px + env(safe-area-inset-top, 0px)) !important;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  gap: 16px !important;
}
body.reskin-active #mg-topbar {
  align-items: stretch !important;
  gap: 12px !important;
}
body.reskin-active #mg-hud-main {
  padding: 10px 16px !important;
  gap: 6px !important;
}
body.reskin-active #mg-board-shell {
  margin-top: 0 !important;
}
body.reskin-active .mg-cell[data-item="heart"] .mg-cell-img {
  width: 37px !important;
  height: 37px !important;
}
@media (max-width: 430px) {
  body.reskin-active #mg-scene {
    gap: 14px !important;
    padding-top: calc(14px + env(safe-area-inset-top, 0px)) !important;
  }
  body.reskin-active #mg-hud-main {
    padding: 9px 10px !important;
    gap: 4px !important;
  }
}


/* Match-3 HUD merge patch */
body.reskin-active #mg-topbar {
  width: min(100%, 760px) !important;
  display: block !important;
}
body.reskin-active #mg-hud-main {
  width: 100% !important;
  justify-content: space-between !important;
  gap: 4px !important;
  padding: 10px 14px !important;
}
body.reskin-active #mg-time-label {
  font-size: 13px !important;
  line-height: 1.05 !important;
}
body.reskin-active .mg-timer-icon {
  width: 26px !important;
  height: 26px !important;
}
@media (max-width: 430px) {
  body.reskin-active #mg-hud-main {
    padding: 8px 8px !important;
    gap: 2px !important;
  }
  body.reskin-active #mg-time-label {
    font-size: 11px !important;
  }
  body.reskin-active .mg-timer-icon {
    width: 22px !important;
    height: 22px !important;
  }
}


/* Catching Stars game */
body.reskin-active #catch-modal {
  background: linear-gradient(180deg, #dff5ff 0%, #fff0f5 56%, #ffe7ef 100%) !important;
}
body.reskin-active #cg-scene {
  position: relative;
  z-index: 1;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 18px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
}
body.reskin-active #cg-topbar {
  width: min(100%, 390px);
}
body.reskin-active #cg-hud-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,246,250,0.92));
  border: 1px solid rgba(255,226,234,0.95);
  box-shadow: 0 10px 24px rgba(212,158,175,0.22), inset 0 2px 0 rgba(255,255,255,0.96);
}
body.reskin-active .cg-hud-item {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
body.reskin-active .cg-hud-k {
  display: block;
  font-size: 10px;
  color: #9d7185;
  margin-bottom: 3px;
  white-space: nowrap;
}
body.reskin-active .cg-hud-v {
  display: block;
  font-size: 18px;
  line-height: 1;
  font-weight: 850;
  color: #8f4f68;
}
body.reskin-active .cg-hud-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, rgba(233,197,209,0.9) 22%, rgba(233,197,209,0.9) 78%, transparent);
}
body.reskin-active #cg-lane-shell {
  position: relative;
  width: min(100%, 360px);
  display: flex;
  justify-content: center;
}
body.reskin-active #cg-lane {
  position: relative;
  width: 100%;
  height: min(62vh, 520px);
  max-height: 520px;
  min-height: 430px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, #98ddff 0%, #d8f4ff 56%, #8ad17d 57%, #67b95b 100%);
  border: 1px solid rgba(255,225,234,0.98);
  box-shadow: 0 18px 42px rgba(202,150,168,0.28), inset 0 3px 0 rgba(255,255,255,0.72), inset 0 -4px 0 rgba(255,255,255,0.28);
}
body.reskin-active #cg-lane::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0) 18%, rgba(255,255,255,0) 78%, rgba(0,0,0,0.06) 100%);
}

body.reskin-active #cg-basket {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: min(28%, 104px);
  height: auto;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
}
body.reskin-active #cg-basket img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
body.reskin-active .cg-item {
  position: absolute;
  transform: translate(-50%, -50%);
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
body.reskin-active .cg-item.bomb {
  z-index: 2;
}
body.reskin-active #cg-lane.cg-hit {
  animation: cgLaneHit 180ms ease-out;
}
@keyframes cgLaneHit {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-4px); }
  70% { transform: translateX(4px); }
}
body.reskin-active #cg-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  background: rgba(255, 244, 249, 0.26);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
body.reskin-active #cg-overlay-card {
  width: min(84%, 310px);
  text-align: center;
  padding: 22px 20px 18px;
  border-radius: 26px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(255,226,234,0.96);
  box-shadow: 0 16px 34px rgba(206,155,174,0.26);
}
body.reskin-active #cg-overlay-title {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 900;
  color: #92536d;
  margin-bottom: 10px;
}
body.reskin-active #cg-overlay-text {
  white-space: pre-line;
  font-size: 13px;
  line-height: 1.55;
  color: #7e6270;
  margin-bottom: 16px;
}
body.reskin-active #cg-start-btn{
  border-radius: 999px;
  border: none;
}
body.reskin-active #cg-start-btn {
  min-width: 118px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(180deg, #ff9fbf, #f07ca3);
  box-shadow: 0 10px 20px rgba(233,126,168,0.28);
}
@media (max-width: 420px) {
  body.reskin-active #cg-scene { gap: 12px; padding-left: 10px; padding-right: 10px; }
  body.reskin-active #cg-topbar { width: min(100%, 360px); }
  body.reskin-active #cg-lane-shell { width: min(100%, 330px); }
  body.reskin-active #cg-lane { height: min(58vh, 500px); min-height: 400px; }
}

/* 战战快跑 runner game */
body.reskin-active #zzkp-modal {
  background: linear-gradient(180deg, #dff5ff 0%, #fff0f5 56%, #ffe7ef 100%) !important;
}
body.reskin-active #zzkp-scene {
  position: relative;
  z-index: 1;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 18px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
}
body.reskin-active #zzkp-topbar {
  width: min(100%, 390px);
}
body.reskin-active #zzkp-hud-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,246,250,0.92));
  border: 1px solid rgba(255,226,234,0.95);
  box-shadow: 0 10px 24px rgba(212,158,175,0.22), inset 0 2px 0 rgba(255,255,255,0.96);
}
body.reskin-active .zzkp-hud-item {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
body.reskin-active .zzkp-hud-k {
  display: block;
  font-size: 10px;
  color: #9d7185;
  margin-bottom: 3px;
  white-space: nowrap;
}
body.reskin-active .zzkp-hud-v {
  display: block;
  font-size: 18px;
  line-height: 1;
  font-weight: 850;
  color: #8f4f68;
}
body.reskin-active .zzkp-hud-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(180deg, transparent, rgba(233,197,209,0.9) 22%, rgba(233,197,209,0.9) 78%, transparent);
}
body.reskin-active #zzkp-lane-shell {
  position: relative;
  width: min(100%, 360px);
  height: min(62vh, 520px);
  max-height: 520px;
  min-height: 430px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,238,244,0.92));
  border: 1px solid rgba(255,225,234,0.98);
  box-shadow: 0 18px 42px rgba(202,150,168,0.28), inset 0 3px 0 rgba(255,255,255,0.94), inset 0 -4px 0 rgba(238,200,213,0.74);
}
body.reskin-active #zzkp-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
body.reskin-active #zzkp-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  background: rgba(255, 244, 249, 0.26);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
body.reskin-active #zzkp-overlay-card {
  width: min(84%, 310px);
  text-align: center;
  padding: 22px 20px 18px;
  border-radius: 26px;
  background: rgba(255,255,255,0.91);
  border: 1px solid rgba(255,226,234,0.98);
  box-shadow: 0 16px 38px rgba(156, 93, 123, 0.23), inset 0 2px 0 rgba(255,255,255,0.95);
}
body.reskin-active #zzkp-overlay-title {
  font-size: 22px;
  font-weight: 850;
  color: #9a4f70;
  margin-bottom: 10px;
}
body.reskin-active #zzkp-overlay-text {
  color: #8d5670;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-line;
}
body.reskin-active #zzkp-close-btn {
  border: none;
  cursor: pointer;
  font-weight: 850;
}
body.reskin-active #zzkp-guide {
  width: min(100%, 360px);
  text-align: center;
  color: #9d7185;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
body.reskin-active #zzkp-jump-spacer {
  width: min(100%, 240px);
  height: 48px;
  flex: 0 0 48px;
  pointer-events: none;
}
body.reskin-active #zzkp-close-btn {
  min-width: 230px;
  padding: 13px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,250,252,0.98), rgba(255,232,240,0.98));
  color: #c05a84;
  border: 1px solid rgba(245,193,211,0.96);
  box-shadow: 0 10px 20px rgba(223,173,191,0.2), inset 0 2px 0 rgba(255,255,255,0.95), inset 0 -3px 0 rgba(241,189,206,0.75);
}
@media (max-width: 430px) {
  body.reskin-active #zzkp-scene { gap: 12px; padding-left: 10px; padding-right: 10px; }
  body.reskin-active #zzkp-hud-main { padding: 10px 10px; }
  body.reskin-active .zzkp-hud-k { font-size: 10px; }
  body.reskin-active .zzkp-hud-v { font-size: 17px; }
  body.reskin-active #zzkp-lane-shell { height: min(58vh, 500px); min-height: 400px; }
  body.reskin-active #zzkp-jump-spacer {
  width: min(100%, 240px);
  height: 48px;
  flex: 0 0 48px;
  pointer-events: none;
}
  body.reskin-active #zzkp-close-btn { min-width: 220px; }
}

/* Boss battle v1.1: make 战斗 a full-page view instead of a bottom drawer */
body.reskin-active #fight-drawer {
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  border-radius: 0 !important;
  padding: 0 16px !important;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(105%) !important;
  z-index: 90 !important;
  box-shadow: none !important;
  background: rgba(255,255,255,0.985) !important;
}
body.reskin-active #fight-drawer.open {
  transform: translateX(0) !important;
}
body.reskin-active #fight-drawer .drawer-header {
  padding-top: calc(14px + env(safe-area-inset-top, 0px)) !important;
  border-bottom: 1px solid rgba(240,216,184,0.8) !important;
}
body.reskin-active #fight-drawer .drawer-pad {
  padding-bottom: calc(46px + env(safe-area-inset-bottom, 0px)) !important;
}
body.reskin-active #close-fight {
  width: auto !important;
  min-width: 72px !important;
  border-radius: 999px !important;
  padding: 7px 12px !important;
  font-size: 15px !important;
  background: #FFF3DF !important;
  color: #8B4B24 !important;
  font-weight: 800 !important;
}



/* Boss battle v1.3: layered background + boss hit feedback */
body.reskin-active .boss-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 800 / 505;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(100,65,35,.18);
  background: #F7E7D0;
  isolation: isolate;
}
body.reskin-active .boss-scene-bg,
body.reskin-active .boss-sprite {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
body.reskin-active .boss-scene-bg {
  z-index: 1;
}
body.reskin-active .boss-sprite {
  z-index: 2;
  transform-origin: 50% 82%;
  will-change: transform, filter;
}
body.reskin-active .boss-sprite.is-hit {
  animation: bossHitPress 160ms ease-out;
}
body.reskin-active .boss-damage-fx {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 3;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
body.reskin-active .boss-damage-pop {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.95);
  border: 1px solid rgba(255, 112, 112, 0.55);
  color: #F05A48;
  font-weight: 950;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,.75);
  box-shadow: 0 4px 12px rgba(120,60,20,.18);
  animation: bossDamagePop 680ms ease-out forwards;
  white-space: nowrap;
}
@keyframes bossHitPress {
  0% { transform: translateY(0) scale(1); filter: brightness(1); }
  42% { transform: translateY(5px) scale(0.985, 0.955); filter: brightness(1.12); }
  72% { transform: translateY(-1px) scale(1.006, 1.01); filter: brightness(1.04); }
  100% { transform: translateY(0) scale(1); filter: brightness(1); }
}
@keyframes bossDamagePop {
  0% { opacity: 0; transform: translate(-50%, -35%) scale(.8); }
  16% { opacity: 1; transform: translate(-50%, -60%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -155%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  body.reskin-active .boss-sprite.is-hit,
  body.reskin-active .boss-damage-pop {
    animation-duration: 1ms !important;
  }
}


/* Boss battle v1.4: keep high-traffic lists compact */
body.reskin-active .boss-recent-scroll {
  max-height: 188px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}
body.reskin-active .boss-recent-scroll > div {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 243, 223, 0.72);
}
body.reskin-active #boss-leaderboard > div {
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(255, 243, 223, 0.58);
}

/* Boss battle v1.5: attack controls placed under boss scene */

/* v1.37.2.11: 数字追踪 mini game layout fix */
body.reskin-active #number-track-modal {
  position: absolute !important;
  inset: 0 !important;
  z-index: 120 !important;
  display: none;
  overflow: hidden !important;
  background: linear-gradient(180deg, #fff5f9 0%, #ffe7f0 50%, #f8d6e4 100%) !important;
  color: #5b3b34 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif !important;
}
body.reskin-active #nt-scene {
  position: relative !important;
  z-index: 1 !important;
  height: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 13px !important;
  padding: 18px 14px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  padding-top: calc(18px + env(safe-area-inset-top, 0px)) !important;
}
body.reskin-active #nt-topbar {
  width: min(100%, 390px) !important;
}
body.reskin-active #nt-hud-main {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 11px 14px !important;
  border-radius: 28px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,246,250,0.92)) !important;
  border: 1px solid rgba(255,226,234,0.95) !important;
  box-shadow: 0 10px 24px rgba(212,158,175,0.22), inset 0 2px 0 rgba(255,255,255,0.96) !important;
}
body.reskin-active .nt-hud-item {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  text-align: center !important;
}
body.reskin-active .nt-hud-item span:first-child {
  display: block !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  color: #9d7185 !important;
  margin-bottom: 3px !important;
  white-space: nowrap !important;
  font-weight: 650 !important;
}
body.reskin-active .nt-hud-item span:last-child {
  display: block !important;
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  color: #8f4f68 !important;
}
body.reskin-active .nt-hud-divider {
  width: 1px !important;
  align-self: stretch !important;
  background: linear-gradient(180deg, transparent, rgba(233,197,209,0.9) 22%, rgba(233,197,209,0.9) 78%, transparent) !important;
}
body.reskin-active #nt-board {
  width: min(100%, 370px) !important;
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 7px !important;
  padding: 10px !important;
  box-sizing: border-box !important;
  border-radius: 26px !important;
  background: linear-gradient(180deg, rgba(255,246,248,0.92), rgba(255,229,238,0.94)) !important;
  border: 1px solid rgba(255,225,234,0.98) !important;
  box-shadow: 0 18px 42px rgba(202,150,168,0.24), inset 0 3px 0 rgba(255,255,255,0.94), inset 0 -5px 0 rgba(238,200,213,0.9) !important;
  touch-action: manipulation !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
body.reskin-active .nt-cell {
  appearance: none !important;
  -webkit-appearance: none !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #fffefd, #fff5f8) !important;
  color: #5b3b34 !important;
  font-size: 20px !important;
  font-weight: 850 !important;
  box-shadow: 0 6px 12px rgba(160,112,132,0.16), inset 0 2px 0 rgba(255,255,255,0.96), inset 0 -3px 0 rgba(241,210,222,0.9) !important;
  transition: transform .08s ease, opacity .12s ease, filter .12s ease, background .12s ease !important;
  cursor: pointer !important;
}
body.reskin-active .nt-cell:active {
  transform: translateY(1px) scale(0.96) !important;
  filter: brightness(0.97) !important;
}
body.reskin-active .nt-cell.done {
  opacity: 0.28 !important;
  transform: scale(0.92) !important;
  pointer-events: none !important;
  background: linear-gradient(180deg, #e9f9ef, #d9f0e0) !important;
  color: #6a9b78 !important;
}
body.reskin-active .nt-cell.wrong {
  animation: ntWrongShake .22s ease !important;
  background: linear-gradient(180deg, #ffe8ed, #ffd3de) !important;
  color: #b85670 !important;
}
@keyframes ntWrongShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
body.reskin-active #nt-overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 4 !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  padding: 22px !important;
  box-sizing: border-box !important;
  background: rgba(255,245,249,0.68) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
}
body.reskin-active #nt-overlay-card {
  width: min(100%, 330px) !important;
  border-radius: 28px !important;
  padding: 22px 20px !important;
  box-sizing: border-box !important;
  text-align: center !important;
  background: rgba(255,255,255,0.96) !important;
  border: 1px solid rgba(255,226,234,0.98) !important;
  box-shadow: 0 18px 42px rgba(160,112,132,0.24), inset 0 3px 0 rgba(255,255,255,0.98) !important;
}
body.reskin-active #nt-overlay-title {
  font-size: 25px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
  color: #8f4f68 !important;
  margin-bottom: 10px !important;
}
body.reskin-active #nt-overlay-text {
  white-space: pre-line !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: #735047 !important;
  margin-bottom: 16px !important;
}
body.reskin-active #nt-start-btn,
body.reskin-active #nt-close-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-weight: 850 !important;
  cursor: pointer !important;
  transition: transform .08s ease, opacity .08s ease, filter .08s ease !important;
}
body.reskin-active #nt-start-btn {
  min-width: 132px !important;
  padding: 12px 22px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #e982aa, #9b71ee) !important;
  box-shadow: 0 9px 18px rgba(154,103,210,0.28), inset 0 2px 0 rgba(255,255,255,0.25) !important;
  font-size: 16px !important;
}
body.reskin-active #nt-close-btn {
  padding: 10px 18px !important;
  color: #8b5e49 !important;
  background: rgba(255,255,255,0.92) !important;
  border: 1px solid rgba(235,210,190,0.9) !important;
  box-shadow: 0 8px 18px rgba(160,112,132,0.14) !important;
  font-size: 15px !important;
}
body.reskin-active #nt-start-btn:active,
body.reskin-active #nt-close-btn:active {
  transform: translateY(1px) scale(0.97) !important;
  opacity: 0.86 !important;
  filter: brightness(0.97) !important;
}
@media (max-width: 390px) {
  body.reskin-active #nt-scene { gap: 10px !important; padding-left: 10px !important; padding-right: 10px !important; }
  body.reskin-active #nt-board { gap: 6px !important; padding: 10px !important; }
  body.reskin-active .nt-cell { aspect-ratio: 1 / 1 !important; height: auto !important; min-height: 0 !important; font-size: 18px !important; border-radius: 13px !important; }
  body.reskin-active #nt-hud-main { padding: 10px 10px !important; }
}





/* v1.37.2.22: Life Spring fullscreen page + real crystal image icons */
body.reskin-active #rank-drawer.spring-fullscreen-drawer {
  top: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  max-height: none !important;
  border-radius: 0 !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  z-index: 80 !important;
  background: rgba(255, 252, 250, 0.98) !important;
}
body.reskin-active #rank-drawer.spring-fullscreen-drawer .drawer-header {
  border-bottom: 1px solid rgba(240, 216, 184, 0.75) !important;
  margin-left: -16px !important;
  margin-right: -16px !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}
body.reskin-active #rank-drawer.spring-fullscreen-drawer .drawer-pad {
  padding-top: 12px !important;
  padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)) !important;
}
body.reskin-active #rank-drawer.spring-fullscreen-drawer #panel-spring {
  min-height: calc(100vh - 96px) !important;
}
body.reskin-active #rank-drawer.spring-fullscreen-drawer #spring-hero-card {
  margin-top: 10px !important;
  border-radius: 24px !important;
}
body.reskin-active #rank-drawer.spring-fullscreen-drawer #spring-hero-img {
  aspect-ratio: 4 / 3 !important;
  max-height: 340px !important;
}
body.reskin-active #rank-drawer.spring-fullscreen-drawer .spring-page-back {
  margin-top: 2px !important;
  margin-bottom: 12px !important;
}
body.reskin-active .spring-crystal-icon-wrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
body.reskin-active .spring-crystal-icon-img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.reskin-active .spring-crystal-icon-fallback {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  border-radius: 8px !important;
  background: rgba(255, 248, 240, 0.85) !important;
  color: #A56A36 !important;
}


/* v1.37.2.23: Spring crystal icon hardening - force real image icons instead of coloured dot fallback */
body.reskin-active .spring-crystal-icon-wrap,
body.reskin-active .spring-crystal-icon-img {
  min-width: 22px !important;
  min-height: 22px !important;
}
body.reskin-active .spring-crystal-icon-img {
  visibility: visible !important;
  opacity: 1 !important;
}

/* v1.37.2.30 bottom nav shadow cleanup
   Remove the PWA-visible white/drop shadow under bottom navigation image buttons. */
body.reskin-active #action-row,
body.reskin-active #action-row .act-btn,
body.reskin-active #action-row .act-btn img {
  box-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
  text-shadow: none !important;
}

/* v1.37.2.31 bottom nav image-shadow hard cleanup */
body.reskin-active #action-row,
body.reskin-active #action-row * {
  box-shadow: none !important;
  text-shadow: none !important;
}
body.reskin-active #action-row .act-btn,
body.reskin-active #action-row .act-btn:hover,
body.reskin-active #action-row .act-btn:active,
body.reskin-active #action-row .act-btn.hi {
  box-shadow: none !important;
}
body.reskin-active #action-row .act-btn img {
  filter: none !important;
  -webkit-filter: none !important;
  box-shadow: none !important;
}

/* v1.37.2.32 bottom nav true haze cleanup
   PWA-only-looking white haze was caused by legacy gradient/highlight layers, not image assets. */
body.reskin-active #action-row {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.reskin-active #action-row::before,
body.reskin-active #action-row::after,
body.reskin-active #action-row .act-btn::before,
body.reskin-active #action-row .act-btn::after,
body.reskin-active #care-btn::before,
body.reskin-active #care-btn::after,
body.reskin-active #fight-btn::before,
body.reskin-active #fight-btn::after,
body.reskin-active #tracker-btn::before,
body.reskin-active #tracker-btn::after,
body.reskin-active #wardrobe-btn::before,
body.reskin-active #wardrobe-btn::after,
body.reskin-active #rank-btn::before,
body.reskin-active #rank-btn::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
}
body.reskin-active #action-row .act-btn,
body.reskin-active #action-row .act-btn:hover,
body.reskin-active #action-row .act-btn.hi {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
}
body.reskin-active #action-row .act-btn:active {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  transform: scale(0.96) !important;
}


/* v1.37.2.43 number track square cells */
body.reskin-active #nt-board {
  grid-auto-rows: 1fr !important;
}
body.reskin-active .nt-cell {
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}


/* DAYTOY RPG shell: Prince task button under XP card */
body.reskin-active .prince-task-btn {
  position: absolute !important;
  right: 2px !important;
  top: 50px !important;
  width: clamp(64px, 16vw, 76px) !important;
  height: clamp(64px, 16vw, 76px) !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  z-index: 22 !important;
}
body.reskin-active .prince-task-btn img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  pointer-events: none !important;
}
body.reskin-active .prince-task-btn:active { transform: scale(0.96) !important; }
body.reskin-active #market-btn::before,
body.reskin-active #market-btn::after { content:none !important; display:none !important; }


/* v3k: unified mini-game modal look + 2048 fix */
body.reskin-active #minigame-modal,
body.reskin-active #catch-modal,
body.reskin-active #zzkp-modal,
body.reskin-active #number-track-modal,
body.reskin-active #game2048-modal {
  z-index: 120 !important;
  background: linear-gradient(180deg, #dff5ff 0%, #fff0f5 56%, #ffe7ef 100%) !important;
  color: #5b3b34 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif !important;
}
body.reskin-active #mg-scene,
body.reskin-active #cg-scene,
body.reskin-active #zzkp-scene,
body.reskin-active #nt-scene,
body.reskin-active #g2048-scene {
  position: relative !important;
  z-index: 1 !important;
  height: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 13px !important;
  padding: 18px 14px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  padding-top: calc(18px + env(safe-area-inset-top, 0px)) !important;
}
body.reskin-active #mg-topbar,
body.reskin-active #cg-topbar,
body.reskin-active #zzkp-topbar,
body.reskin-active #nt-topbar,
body.reskin-active #g2048-topbar {
  width: min(100%, 390px) !important;
}
body.reskin-active #mg-hud-main,
body.reskin-active #cg-hud-main,
body.reskin-active #zzkp-hud-main,
body.reskin-active #nt-hud-main,
body.reskin-active #g2048-hud-main {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 11px 14px !important;
  border-radius: 28px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,246,250,0.92)) !important;
  border: 1px solid rgba(255,226,234,0.95) !important;
  box-shadow: 0 10px 24px rgba(212,158,175,0.22), inset 0 2px 0 rgba(255,255,255,0.96) !important;
}
body.reskin-active .cg-hud-item,
body.reskin-active .zzkp-hud-item,
body.reskin-active .nt-hud-item,
body.reskin-active .g2048-hud-item {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  text-align: center !important;
  display: block !important;
  padding: 0 3px !important;
}
body.reskin-active .mg-hud-k,
body.reskin-active .cg-hud-k,
body.reskin-active .zzkp-hud-k,
body.reskin-active .nt-hud-item span:first-child,
body.reskin-active .g2048-hud-k {
  display: block !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  color: #9d7185 !important;
  margin-bottom: 3px !important;
  white-space: nowrap !important;
  font-weight: 650 !important;
}
body.reskin-active #mg-score-label,
body.reskin-active #mg-best-label,
body.reskin-active #mg-xp-label,
body.reskin-active #mg-time-label,
body.reskin-active .cg-hud-v,
body.reskin-active .zzkp-hud-v,
body.reskin-active .nt-hud-item span:last-child,
body.reskin-active .g2048-hud-v {
  display: block !important;
  font-size: 18px !important;
  line-height: 1 !important;
  font-weight: 850 !important;
  color: #8f4f68 !important;
}
body.reskin-active .cg-hud-divider,
body.reskin-active .zzkp-hud-divider,
body.reskin-active .nt-hud-divider,
body.reskin-active .g2048-hud-divider {
  width: 1px !important;
  align-self: stretch !important;
  background: linear-gradient(180deg, transparent, rgba(233,197,209,0.9) 22%, rgba(233,197,209,0.9) 78%, transparent) !important;
}
body.reskin-active #mg-overlay-card,
body.reskin-active #cg-overlay-card,
body.reskin-active #zzkp-overlay-card,
body.reskin-active #nt-overlay-card,
body.reskin-active #g2048-overlay-card {
  width: min(84%, 330px) !important;
  box-sizing: border-box !important;
  text-align: center !important;
  padding: 22px 20px 18px !important;
  border-radius: 26px !important;
  background: rgba(255,255,255,0.96) !important;
  border: 1px solid rgba(255,226,234,0.98) !important;
  box-shadow: 0 16px 34px rgba(206,155,174,0.26), inset 0 2px 0 rgba(255,255,255,0.96) !important;
}
body.reskin-active #mg-overlay-text,
body.reskin-active #cg-overlay-text,
body.reskin-active #zzkp-overlay-text,
body.reskin-active #nt-overlay-text,
body.reskin-active #g2048-overlay-text {
  white-space: pre-line !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  font-weight: 700 !important;
  color: #7e6270 !important;
  text-shadow: none !important;
  margin-bottom: 14px !important;
}
body.reskin-active #cg-overlay-title,
body.reskin-active #zzkp-overlay-title,
body.reskin-active #nt-overlay-title,
body.reskin-active #g2048-overlay-title {
  font-size: 24px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  color: #92536d !important;
  margin-bottom: 10px !important;
}
body.reskin-active #mg-start-btn,
body.reskin-active #cg-start-btn,
body.reskin-active #nt-start-btn,
body.reskin-active #g2048-start-btn {
  min-width: 132px !important;
  padding: 12px 24px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(241,177,198,0.95) !important;
  background: linear-gradient(180deg, #ffedf4 0%, #ffd6e3 100%) !important;
  color: #b4547b !important;
  font-size: 15px !important;
  font-weight: 850 !important;
  box-shadow: 0 10px 20px rgba(223,173,191,0.22), inset 0 2px 0 rgba(255,255,255,0.95), inset 0 -3px 0 rgba(241,189,206,0.75) !important;
  cursor: pointer !important;
}
body.reskin-active #zzkp-close-btn,
body.reskin-active #nt-close-btn,
body.reskin-active #g2048-close-btn {
  min-width: 230px !important;
  padding: 13px 22px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, rgba(255,250,252,0.98), rgba(255,232,240,0.98)) !important;
  color: #c05a84 !important;
  border: 1px solid rgba(245,193,211,0.96) !important;
  box-shadow: 0 10px 20px rgba(223,173,191,0.2), inset 0 2px 0 rgba(255,255,255,0.95), inset 0 -3px 0 rgba(241,189,206,0.75) !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  cursor: pointer !important;
  align-self: center !important;
  margin-top: 2px !important;
  z-index: 5 !important;
}
body.reskin-active #g2048-gameover-close-btn{
  padding: 10px 18px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, rgba(255,250,252,0.98), rgba(255,232,240,0.98)) !important;
  color: #c05a84 !important;
  border: 1px solid rgba(245,193,211,0.96) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

/* 2048 modal: same shell style as the other mini games */
body.reskin-active #game2048-modal {
  position: absolute !important;
  inset: 0 !important;
  overflow: hidden !important;
}
body.reskin-active #g2048-board-shell {
  width: min(100%, 360px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}
body.reskin-active #g2048-board {
  width: min(100%, 340px) !important;
  aspect-ratio: 1 / 1 !important;
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  grid-template-rows: repeat(4, 1fr) !important;
  gap: 8px !important;
  padding: 12px !important;
  box-sizing: border-box !important;
  border-radius: 28px !important;
  background: linear-gradient(180deg, rgba(255,246,248,0.92), rgba(255,229,238,0.94)) !important;
  border: 1px solid rgba(255,225,234,0.98) !important;
  box-shadow: 0 18px 42px rgba(202,150,168,0.24), inset 0 3px 0 rgba(255,255,255,0.94), inset 0 -5px 0 rgba(238,200,213,0.9) !important;
  touch-action: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
body.reskin-active .g2048-cell {
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: clamp(20px, 7vw, 30px) !important;
  font-weight: 900 !important;
  color: #8f4f68 !important;
  background: linear-gradient(180deg, #fffefd, #fff5f8) !important;
  box-shadow: 0 6px 12px rgba(160,112,132,0.16), inset 0 2px 0 rgba(255,255,255,0.96), inset 0 -3px 0 rgba(241,210,222,0.9) !important;
}
body.reskin-active .g2048-cell.g2048-tile {
  color: #ffffff !important;
  background: linear-gradient(180deg, #ffb1ca, #f07aa4) !important;
  text-shadow: 0 1px 2px rgba(120,50,80,0.22) !important;
}
body.reskin-active .g2048-tile-4 { background: linear-gradient(180deg, #ffa7bf, #ed709b) !important; }
body.reskin-active .g2048-tile-8 { background: linear-gradient(180deg, #f6a2d7, #d978bd) !important; }
body.reskin-active .g2048-tile-16 { background: linear-gradient(180deg, #c4a8ff, #9678e8) !important; }
body.reskin-active .g2048-tile-32 { background: linear-gradient(180deg, #9ccfff, #68aeea) !important; }
body.reskin-active .g2048-tile-64,
body.reskin-active .g2048-tile-128,
body.reskin-active .g2048-tile-256,
body.reskin-active .g2048-tile-512,
body.reskin-active .g2048-tile-1024,
body.reskin-active .g2048-tile-2048 { background: linear-gradient(180deg, #f0c36f, #d99a3d) !important; }
body.reskin-active #g2048-overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 4 !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  padding: 22px !important;
  box-sizing: border-box !important;
  background: rgba(255,245,249,0.55) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}
@media (max-width: 430px) {
  body.reskin-active #mg-scene,
  body.reskin-active #cg-scene,
  body.reskin-active #zzkp-scene,
  body.reskin-active #nt-scene,
  body.reskin-active #g2048-scene { gap: 11px !important; padding-left: 10px !important; padding-right: 10px !important; }
  body.reskin-active #mg-hud-main,
  body.reskin-active #cg-hud-main,
  body.reskin-active #zzkp-hud-main,
  body.reskin-active #nt-hud-main,
  body.reskin-active #g2048-hud-main { padding: 10px 10px !important; }
  body.reskin-active #g2048-board { width: min(100%, 318px) !important; gap: 7px !important; padding: 10px !important; border-radius: 24px !important; }
  body.reskin-active #zzkp-close-btn,
  body.reskin-active #nt-close-btn,
  body.reskin-active #g2048-close-btn { min-width: 220px !important; }
}
