:root {
  --page: #eef4ff;
  --paper: #ffffff;
  --border: #9db3d4;
  --blue: #126ce6;
  --cyan: #17c8d4;
  --deep: #0962c4;
  --text: #10213b;
  --muted: #50627a;
  --green: #21c46d;
  --gold: #f6a400;
}

.game-toast {
  position: fixed;
  top: 76px;
  left: 50%;
  z-index: 9999;
  min-width: 260px;
  max-width: min(460px, calc(100vw - 32px));
  transform: translate(-50%, -14px);
  border: 1px solid #58c884;
  border-radius: 8px;
  background: #eafff1;
  color: #08723a;
  box-shadow: 0 14px 32px rgba(18, 42, 76, 0.2);
  padding: 12px 18px;
  text-align: center;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
}

.game-toast.is-showing {
  animation: toast-pop 3200ms ease forwards;
}

.game-toast.is-error {
  border-color: #ef8888;
  background: #fff0f0;
  color: #c42626;
}

.world-boss-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  align-items: center;
  margin: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: linear-gradient(135deg, #fff8e8, #eef7ff);
}

.world-boss-card h4 {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 18px;
}

.world-boss-card p {
  margin: 4px 0;
  color: var(--text);
  font-weight: 700;
}

.world-boss-sprite {
  min-height: 112px;
  display: grid;
  place-items: center;
}

.world-boss-sprite img,
.world-boss-sprite svg {
  max-width: 112px;
  max-height: 112px;
}

@keyframes toast-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -18px);
  }
  10%,
  84% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  height: 58px;
  border-bottom: 1px solid #b7c4d8;
  background: #fbfbfd;
}

.header-inner {
  width: min(1230px, calc(100% - 24px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 112px;
  height: 47px;
  display: grid;
  place-items: center;
  border: 2px solid #7c9146;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent),
    linear-gradient(45deg, #7ecf46, #0aa6cf 42%, #f1cf44);
  color: #fff04f;
  font-size: 21px;
  font-weight: 900;
  text-shadow: 2px 2px 0 #0952a8, -1px -1px 0 #0952a8;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.zalo-logo {
  width: 64px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid #0b77ff;
  border-radius: 8px;
  background:
    radial-gradient(circle at 22% 22%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 28%),
    linear-gradient(135deg, #16b8ff, #0868ee);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 4px 10px rgba(8, 104, 238, 0.22);
}

.zalo-logo:hover {
  filter: brightness(1.06);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9a7a00;
}

.moon-button,
.logout-button,
.auto-actions button,
.command-footer button {
  border: 1px solid #9db3d4;
  background: #fff;
  color: #1a2a43;
  cursor: pointer;
}

.moon-button {
  width: 42px;
  height: 34px;
  border-radius: 8px;
  color: #2d6cdf;
}

.vip-badge {
  padding: 4px 8px;
  border-radius: 4px;
  background: #ff9800;
  color: #fff;
  font-size: 12px;
}

.logout-button {
  height: 34px;
  padding: 0 14px;
  border-radius: 4px;
  font-weight: 700;
}

.page-shell {
  width: min(1260px, calc(100% - 24px));
  margin: 16px auto 28px;
  display: grid;
  grid-template-columns: 260px minmax(540px, 696px) 260px;
  gap: 16px;
  align-items: start;
}

.sidebar {
  display: grid;
  gap: 12px;
  padding-top: 80px;
}

.menu-box {
  overflow: hidden;
  border-radius: 6px;
  background: #24cad6;
  color: #fff;
}

.menu-box h2 {
  height: 33px;
  margin: 0;
  padding: 0 8px 0 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(180deg, #05bfd2 0%, #1368e6 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.menu-box h2 button {
  width: 20px;
  height: 20px;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.menu-box a {
  display: block;
  padding: 6px 16px;
  color: #fff;
  font-weight: 800;
  line-height: 1.35;
}

.menu-box a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.menu-box a span,
.gold {
  color: var(--gold);
}

.content-card {
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--paper);
  overflow: hidden;
}

.content-title {
  height: 33px;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, #2867e7, #08bace);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.currency-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 14px;
  color: #293a55;
  font-weight: 800;
}

.mode-label {
  margin: 8px 0 26px;
  text-align: center;
  color: #293a55;
  font-size: 12px;
  font-weight: 700;
}

.auto-box {
  width: min(576px, calc(100% - 32px));
  min-height: 59px;
  margin: 0 auto 22px;
  padding: 13px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #eaf3ff;
}

.auto-box strong,
.auto-box span {
  display: block;
}

.auto-box span {
  margin-top: 3px;
  color: #435371;
  font-size: 11px;
}

.auto-actions {
  display: flex;
  gap: 8px;
}

.auto-actions button {
  min-width: 74px;
  height: 30px;
  border-radius: 4px;
}

.auto-actions .active {
  border-color: #067a5f;
  background: #07996f;
  color: #fff;
  font-weight: 800;
}

.auto-panel {
  width: min(576px, calc(100% - 32px));
  margin: -10px auto 22px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f7fbff;
}

.auto-package-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.auto-package-row button,
.auto-config-form button {
  min-height: 32px;
  border: 1px solid #2f78ff;
  border-radius: 4px;
  background: #fff;
  color: #0d63ff;
  font-weight: 800;
  cursor: pointer;
}

.auto-config-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auto-config-form label {
  display: grid;
  gap: 4px;
  color: #0d63ff;
  font-weight: 800;
}

.auto-config-form select {
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.auto-config-form .auto-check {
  display: flex;
  align-items: center;
  gap: 7px;
}

.auto-log-box {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.auto-log-list {
  display: grid;
  align-content: start;
  gap: 6px;
  height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
}

.auto-log-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid #c7d7ef;
  border-radius: 4px;
  background: #fff;
  padding: 7px 8px;
  min-width: 0;
}

.auto-log-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auto-log-row strong {
  color: var(--text);
  font-size: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-panel {
  width: calc(100% - 24px);
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.admin-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  background: #eaf3ff;
}

.admin-title h3 {
  margin: 0;
  color: #075de7;
  font-size: 15px;
}

.admin-title button,
.form-actions button {
  height: 32px;
  border: 1px solid #8eadd8;
  border-radius: 4px;
  background: #fff;
  color: #123456;
  cursor: pointer;
  font-weight: 700;
}

.pet-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-bottom: 12px;
}

.pet-form label {
  display: grid;
  gap: 4px;
  color: #075de7;
  font-size: 12px;
  font-weight: 800;
}

.pet-form input,
.pet-form select,
.pet-form textarea {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #aebfda;
  border-radius: 4px;
  background: #fff;
  color: #111;
}

.pet-form input,
.pet-form select {
  height: 34px;
}

.pet-form textarea {
  min-height: 70px;
  resize: vertical;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: center;
  padding-top: 4px;
}

.form-actions #savePetBtn {
  min-width: 150px;
  border-color: #5791ff;
  color: #126ce6;
}

.admin-collection,
.login-panel,
.map-panel,
.tower-panel,
.collection-panel,
.shop-panel {
  margin: 12px 0 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f9fcff;
  overflow: hidden;
}

.map-panel,
.tower-panel,
.collection-panel {
  width: calc(100% - 24px);
  margin: 0 auto 14px;
}

.shop-panel {
  width: calc(100% - 24px);
  margin: 0 auto 14px;
}

.login-panel {
  width: calc(100% - 24px);
  margin: 0 auto 14px;
}

.login-form {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  background: #fff;
}

.login-form label {
  display: grid;
  gap: 4px;
  color: #075de7;
  font-size: 12px;
  font-weight: 800;
}

.login-form input {
  height: 34px;
  padding: 6px 8px;
  border: 1px solid #aebfda;
  border-radius: 4px;
}

.login-form button {
  min-width: 90px;
  height: 34px;
  border: 1px solid #5791ff;
  border-radius: 4px;
  background: #fff;
  color: #126ce6;
  cursor: pointer;
  font-weight: 900;
}

.login-message {
  margin: 0;
  padding: 0 12px 12px;
  color: #d12f2f;
  font-size: 12px;
  font-weight: 800;
}

.collection-heading,
.map-title {
  min-height: 34px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  background: #eaf3ff;
}

.collection-heading h4,
.map-title h3 {
  margin: 0;
  color: #075de7;
  font-size: 14px;
}

.collection-heading span,
.map-title span {
  color: #41516b;
  font-size: 12px;
  font-weight: 800;
}

.map-search-meter {
  margin: 10px 10px 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #9fb9e6;
  border-radius: 4px;
  background: linear-gradient(90deg, #eef6ff, #f8fbff);
  color: #17345a;
  font-weight: 900;
  padding: 0 10px;
}

.map-search-meter strong {
  min-width: 48px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  background: #0d6efd;
  color: #fff;
}

.collection-list {
  min-height: 58px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.collection-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: #50627a;
  text-align: center;
  font-size: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.stats-grid article {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #eef6ff;
  padding: 10px;
}

.stats-grid strong {
  display: block;
  color: var(--blue);
  font-size: 20px;
}

.stats-grid span {
  color: #263a57;
  font-weight: 800;
  font-size: 12px;
}

.honor-list {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.honor-row {
  border: 1px solid #b7c4d8;
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(255, 245, 194, 0.95), rgba(255, 255, 255, 0.98) 38%),
    #fff;
  padding: 10px 12px;
  position: relative;
  overflow: hidden;
  animation: honor-enter 420ms ease both;
}

.honor-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -45%;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: skewX(-18deg);
  animation: honor-shine 2800ms ease-in-out infinite;
}

.honor-row strong,
.honor-row span,
.honor-row small {
  display: block;
}

.honor-row strong {
  color: #075de7;
}

.honor-row span {
  margin-top: 4px;
  color: #172842;
  font-weight: 800;
  line-height: 1.35;
  position: relative;
}

.honor-row small {
  margin-top: 5px;
  color: #50627a;
  font-size: 11px;
  position: relative;
}

@keyframes honor-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes honor-shine {
  0%,
  55% {
    left: -45%;
  }
  100% {
    left: 120%;
  }
}

.collection-card {
  min-height: 78px;
  padding: 8px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid #b7c4d8;
  border-radius: 4px;
  background: #fff;
}

.collection-card.is-clickable {
  cursor: pointer;
}

.collection-card.is-clickable:hover {
  border-color: #5791ff;
  background: #f5f9ff;
}

.market-card b {
  display: block;
  margin-top: 4px;
  color: #0c7a43;
}

.market-sell-controls {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 82px auto;
  gap: 6px;
}

.market-sell-controls input,
.market-sell-controls select {
  min-height: 30px;
  border: 1px solid #9fb9e6;
  border-radius: 4px;
  padding: 4px 6px;
  font-weight: 800;
}

.pet-detail-panel {
  margin-top: 10px;
  border: 1px solid #b7c4d8;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.pet-detail-body {
  padding: 12px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
}

.pet-detail-body span,
.pet-detail-body strong {
  display: block;
  margin-top: 4px;
}

.acc-image-grid {
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.acc-image-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border: 1px solid #aebfda;
  border-radius: 4px;
  background: #fff;
}

.acc-detail-body {
  grid-template-columns: 170px 1fr;
}

.button-link {
  min-height: 30px;
  padding: 6px 12px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #5791ff;
  border-radius: 4px;
  background: #fff;
  color: #075de7;
  font-weight: 900;
  text-decoration: none;
}

.button-link.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.collection-card.is-missing {
  background: #f7f9fc;
}

.collection-card.is-missing .pet-art,
.collection-card.is-missing .pet-image-art {
  filter: grayscale(1);
  opacity: 0.45;
}

.collection-status {
  display: inline-block;
  width: fit-content;
  margin-top: 5px;
  padding: 2px 7px;
  border: 1px solid #b7c4d8;
  border-radius: 4px;
  color: #50627a;
  font-size: 11px;
  line-height: 1.2;
}

.collection-card.is-owned .collection-status {
  border-color: #22b56a;
  background: #e9fff3;
  color: #008a46;
}

.collection-card.is-missing .collection-status {
  border-color: #d1d9e8;
  background: #eef3fb;
  color: #6d7b90;
}

.collection-card .pet-art,
.collection-card .pet-image-art {
  width: 54px;
  max-width: 54px;
  max-height: 52px;
}

.gift-code-icon {
  width: 54px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px dashed #5791ff;
  border-radius: 4px;
  color: #075de7;
  background: #eef5ff;
  font-size: 11px;
  font-weight: 900;
}

.collection-card strong,
.wild-pet-card strong {
  display: block;
  color: #075de7;
  font-size: 13px;
}

.collection-card span,
.wild-pet-card span {
  display: block;
  margin-top: 3px;
  color: #50627a;
  font-size: 11px;
  font-weight: 700;
}

.collection-card button,
.map-actions button {
  height: 28px;
  margin-top: 6px;
  border: 1px solid #5791ff;
  border-radius: 4px;
  background: #fff;
  color: #126ce6;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.card-actions button {
  min-width: 48px;
}

.card-actions .danger-button {
  border-color: #ff6b6b;
  color: #d93030;
}

.card-actions .danger-button:hover {
  background: #fff0f0;
}

.tower-floor-picker {
  border-bottom: 1px solid var(--border);
  background: #f3f8ff;
}

.tower-floor-picker details {
  padding: 0;
}

.tower-floor-picker summary {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  color: #075de7;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.tower-floor-picker summary::-webkit-details-marker {
  display: none;
}

.tower-floor-picker summary::after {
  content: "Mo";
  min-width: 46px;
  padding: 4px 8px;
  border: 1px solid #5791ff;
  border-radius: 4px;
  background: #fff;
  color: #126ce6;
  text-align: center;
  font-size: 12px;
}

.tower-floor-picker details[open] summary::after {
  content: "Dong";
}

.tower-floor-picker summary span {
  margin-left: auto;
  color: #2e3d56;
  font-size: 12px;
}

.tower-floor-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 6px;
  padding: 8px 12px 12px;
  border-top: 1px solid #c9d8ef;
  background: #fff;
}

.tower-floor-list button {
  height: 30px;
  border: 1px solid #9fb9e6;
  border-radius: 4px;
  background: #fff;
  color: #19324f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.tower-floor-list button.is-selected {
  border-color: #4285ff;
  background: #eaf2ff;
  color: #075de7;
}

.tower-floor-list button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.collection-card button:disabled,
.map-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.map-field {
  padding: 10px;
  background: #fff;
}

.map-grass {
  min-height: 176px;
  display: grid;
  place-items: center;
  border: 1px solid #a9c5a5;
  border-radius: 4px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.28) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.28) 25%, transparent 25%),
    linear-gradient(135deg, #89df86, #5fc46e 55%, #4bae67);
  background-size: 26px 26px, 26px 26px, auto;
}

.wild-pet-spot {
  width: min(310px, calc(100% - 20px));
  min-height: 112px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.wild-pet-spot > span {
  color: #2d4b2b;
  font-size: 12px;
  font-weight: 800;
}

.wild-pet-card {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.search-effect {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #075de7;
  font-size: 12px;
  font-weight: 900;
}

.search-lens {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid #5791ff;
  border-radius: 50%;
  background: #eef5ff;
  font-size: 23px;
  animation: search-sweep 1s ease-in-out infinite;
}

@keyframes search-sweep {
  0% {
    transform: translateX(-22px) rotate(-18deg) scale(0.95);
  }
  50% {
    transform: translateX(22px) rotate(16deg) scale(1.06);
  }
  100% {
    transform: translateX(-22px) rotate(-18deg) scale(0.95);
  }
}

.wild-pet-card .pet-art,
.wild-pet-card .pet-image-art {
  width: 94px;
  max-width: 94px;
  max-height: 86px;
}

.map-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-top: 10px;
}

.map-actions button,
.map-actions select {
  min-width: 96px;
}

.map-actions select {
  height: 28px;
  margin-top: 6px;
  border: 1px solid #5791ff;
  border-radius: 4px;
  background: #fff;
  color: #126ce6;
  font-size: 12px;
  font-weight: 800;
}

.storage-actions {
  padding: 8px 10px;
  text-align: right;
  background: #f4f8ff;
  border-bottom: 1px solid #b7c4d8;
}

.storage-actions button {
  height: 28px;
  border: 1px solid #5791ff;
  border-radius: 4px;
  background: #fff;
  color: #126ce6;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.shop-row {
  padding: 12px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
  background: #fff;
}

.shop-row.is-bought {
  animation: shop-bought 650ms ease;
}

#shopMessage {
  min-height: 18px;
  margin: 8px 12px;
  color: #008a46;
  text-align: center;
  font-weight: 900;
}

#shopMessage.is-error {
  color: #d32626;
}

@keyframes shop-bought {
  0% {
    background: #fff;
    transform: scale(1);
  }
  35% {
    background: #e9fff3;
    transform: scale(1.01);
  }
  100% {
    background: #fff;
    transform: scale(1);
  }
}

.shop-row strong,
.shop-row span {
  display: block;
}

.shop-row strong {
  color: #075de7;
}

.shop-row span {
  margin-top: 3px;
  color: #50627a;
  font-size: 12px;
}

.shop-row button {
  min-width: 110px;
  height: 34px;
  border: 1px solid #5791ff;
  border-radius: 4px;
  background: #fff;
  color: #126ce6;
  cursor: pointer;
  font-weight: 900;
}

.recharge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.recharge-grid button {
  min-height: 58px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
  font-weight: 900;
}

.recharge-grid button.is-selected {
  border-color: #0d63ff;
  background: #eaf3ff;
  box-shadow: inset 0 0 0 1px #0d63ff;
}

.recharge-grid span {
  color: #08723a;
  font-size: 12px;
}

.payment-card {
  margin: 0 12px 14px;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 16px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 14px;
}

.payment-qr {
  min-height: 230px;
  display: grid;
  place-items: center;
  border: 1px solid #d6e1f2;
  border-radius: 6px;
  background: #f8fbff;
}

.payment-qr img {
  width: 210px;
  height: 210px;
  object-fit: contain;
}

.payment-info h4 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 18px;
}

.payment-info p {
  margin: 7px 0;
  color: var(--text);
}

.recharge-history {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.recharge-history-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  padding: 10px;
}

.recharge-history-row strong,
.recharge-history-row span {
  display: block;
}

.recharge-history-row strong {
  color: var(--blue);
}

.recharge-history-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.recharge-status {
  border-radius: 999px;
  padding: 4px 8px;
  background: #eaf3ff;
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}

.recharge-status.is-paid {
  background: #eafff1;
  color: #08723a;
}

.recharge-status.is-mismatch,
.recharge-status.is-expired {
  background: #fff0f0;
  color: #c42626;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-card {
  border: 1px solid #a9bfdf;
  border-radius: 4px;
  padding: 10px;
  background: #f8fbff;
}

.account-card h4 {
  margin: 0 0 8px;
  color: #075de7;
}

.account-card label {
  display: block;
  margin-bottom: 8px;
  color: #075de7;
  font-size: 12px;
  font-weight: 900;
}

.account-card input {
  width: 100%;
  height: 34px;
  margin-top: 4px;
  border: 1px solid #9fb7dc;
  border-radius: 4px;
  padding: 0 8px;
  font-weight: 800;
}

.account-card button {
  height: 34px;
  border: 1px solid #5791ff;
  border-radius: 4px;
  background: #fff;
  color: #126ce6;
  cursor: pointer;
  font-weight: 900;
}

.compact-title {
  margin-top: 10px;
}

.bag-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bag-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 3px 8px;
  align-items: center;
  border: 1px solid #a9bfdf;
  border-radius: 4px;
  padding: 8px;
  background: #fff;
}

.bag-item strong {
  grid-column: 2;
  color: #075de7;
}

.bag-item span {
  grid-column: 2;
  color: #50627a;
  font-size: 12px;
  font-weight: 700;
}

.bag-item b {
  grid-row: 1 / span 2;
  grid-column: 3;
  color: #0a8a52;
  font-size: 18px;
}

.ranking-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid #b7c4d8;
  background: #f4f8ff;
}

.ranking-tabs button {
  min-height: 32px;
  border: 1px solid #9fb9e6;
  border-radius: 4px;
  background: #fff;
  color: #126ce6;
  cursor: pointer;
  font-weight: 900;
}

.ranking-tabs button.is-selected {
  border-color: #16bd6a;
  background: #eafff4;
  color: #04854a;
}

.ranking-list {
  padding: 10px;
}

.ranking-pager {
  padding: 0 10px 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.ranking-pager button {
  min-width: 32px;
  height: 30px;
  border: 1px solid #9fb9e6;
  border-radius: 4px;
  background: #fff;
  color: #126ce6;
  cursor: pointer;
  font-weight: 900;
}

.ranking-pager button.is-selected {
  border-color: #16bd6a;
  background: #eafff4;
  color: #04854a;
}

.ranking-row {
  display: grid;
  grid-template-columns: 42px 54px 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #a9bfdf;
  border-radius: 4px;
  padding: 8px;
  background: #fff;
}

.ranking-row + .ranking-row {
  margin-top: 8px;
}

.ranking-place {
  color: #075de7;
  font-size: 16px;
  text-align: center;
}

.ranking-pet {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
}

.ranking-pet img,
.ranking-pet .pet-image-art {
  max-width: 50px;
  max-height: 50px;
}

.ranking-row span {
  display: block;
  margin-top: 2px;
  color: #50627a;
  font-size: 12px;
  font-weight: 700;
}

.ranking-row b {
  color: #0a8a52;
  font-size: 15px;
}

.item-thumb {
  width: 38px;
  height: 38px;
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  border: 1px solid #b8cae6;
  border-radius: 4px;
  background: #eef5ff;
  color: #075de7;
  font-weight: 900;
}

.item-thumb.is-large {
  width: 54px;
  height: 54px;
}

.item-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pet-profile-preview {
  padding: 10px 0 0;
  text-align: center;
}

.preview-image {
  min-height: 96px;
  display: grid;
  place-items: center;
}

.preview-image img {
  max-width: 128px;
  max-height: 112px;
  object-fit: contain;
  image-rendering: auto;
}

.pet-profile-preview h3 {
  margin: 6px 0 4px;
  color: #3368ef;
  font-size: 24px;
}

.pet-profile-preview h3 b {
  color: #f39c12;
}

.preview-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.preview-badges span {
  padding: 5px 9px;
  border-radius: 4px;
  background: #e8f1ff;
  color: #005bf0;
  font-size: 11px;
  font-weight: 900;
}

.preview-badges span:nth-child(2) {
  background: #ffe9ef;
  color: #e01846;
}

.preview-badges span:nth-child(4) {
  background: #fff1d9;
  color: #f18900;
}

.preview-badges span:nth-child(5) {
  background: #efe6ff;
  color: #681ce4;
}

.accordion-row {
  height: 38px;
  margin-top: 16px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #eaf3ff;
  color: #075de7;
  font-size: 13px;
}

.accordion-row span {
  color: #1b2d46;
  font-size: 11px;
  font-weight: 900;
}

.profile-stats {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.profile-stats h4 {
  height: 25px;
  margin: 0;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--border);
  background: #eaf3ff;
  color: #075de7;
  font-size: 13px;
}

.radar-box {
  min-height: 260px;
  display: grid;
  place-items: center;
}

.radar-box svg {
  width: min(320px, 100%);
  height: 230px;
}

.radar-box text {
  fill: #0bb783;
  font-size: 13px;
  font-weight: 800;
}

.radar-box text:nth-of-type(1),
.radar-box text:nth-of-type(2) {
  fill: #4b9aff;
}

.radar-box text:nth-of-type(6) {
  fill: #ff5a66;
}

.stat-table {
  display: grid;
  grid-template-columns: 110px 1fr 110px 1fr;
  border-top: 1px solid var(--border);
  text-align: left;
}

.stat-table span,
.stat-table strong {
  min-height: 33px;
  padding: 9px 10px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat-table span {
  background: #eaf3ff;
  color: #075de7;
  font-weight: 900;
}

.stat-table strong {
  color: #000;
  text-align: center;
}

.battle-card {
  width: calc(100% - 16px);
  margin: 8px auto 12px;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fbff;
}

.fighter-panel {
  min-height: 225px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.fighter-panel h3 {
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #cbd8ec;
  color: #075de7;
  text-align: center;
  font-size: 15px;
}

.enemy-side h3 {
  color: #000;
}

.type-row {
  min-height: 20px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.type-pill {
  padding: 3px 6px;
  border: 1px solid #f3a7c0;
  border-radius: 3px;
  background: #fff1f7;
  color: #cc1760;
  font-size: 10px;
  font-weight: 800;
}

.type-pill.alt {
  border-color: #f7b946;
  background: #fff5d8;
  color: #8f5c00;
}

.hp-line {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  color: #000;
  font-size: 10px;
  font-weight: 900;
}

.hp-track {
  height: 7px;
  overflow: hidden;
  border-radius: 8px;
  background: #e5eef7;
}

.hp-track span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--green);
  transition: width 220ms ease;
}

.level-text,
.energy-text {
  margin: 7px 0 0;
  text-align: center;
  color: #243044;
  font-size: 10px;
  font-weight: 700;
}

.energy-text {
  color: #59677d;
}

.pet-stage {
  height: 105px;
  display: grid;
  place-items: center;
}

.pet-art {
  width: 118px;
  max-height: 104px;
  filter: drop-shadow(0 8px 2px rgba(0, 0, 0, 0.13));
  transform-origin: center bottom;
  transition: transform 160ms ease, filter 160ms ease;
}

.pet-image-art {
  max-width: 124px;
  max-height: 106px;
  object-fit: contain;
  filter: drop-shadow(0 8px 2px rgba(0, 0, 0, 0.13));
  transition: transform 160ms ease, filter 160ms ease;
}

.enemy-side .pet-image-art {
  transform: scaleX(-1);
}

.is-acting .pet-image-art {
  transform: translateY(-8px) scale(1.04);
}

.enemy-side.is-acting .pet-image-art {
  transform: scaleX(-1) translateY(-8px) scale(1.04);
}

.is-hit .pet-image-art {
  filter: drop-shadow(0 8px 2px rgba(0, 0, 0, 0.13)) brightness(1.45);
}

.enemy-side .pet-art {
  transform: scaleX(-1);
}

.is-acting .pet-art {
  transform: translateY(-8px) scale(1.04);
}

.enemy-side .is-acting .pet-art,
.enemy-side.is-acting .pet-art {
  transform: scaleX(-1) translateY(-8px) scale(1.04);
}

.is-hit .pet-art {
  filter: drop-shadow(0 8px 2px rgba(0, 0, 0, 0.13)) brightness(1.45);
}

.command-card {
  width: calc(100% - 16px);
  margin: 0 auto 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.tabs {
  height: 26px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--border);
  background: #edf3fb;
}

.tabs button {
  border: 0;
  border-right: 1px solid #d1dded;
  background: transparent;
  color: #2b3650;
  cursor: pointer;
  font-weight: 700;
}

.tabs .selected {
  border-bottom: 2px solid #24c66d;
  color: #028c33;
}

.skill-list {
  min-height: 116px;
  padding: 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.skill-button {
  min-height: 51px;
  padding: 8px;
  border: 1px solid #b7c4d8;
  border-radius: 4px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.skill-button.is-selected {
  border-color: #4285ff;
  box-shadow: inset 0 0 0 1px #4285ff;
}

.skill-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.skill-button strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #000;
  font-size: 12px;
}

.skill-button span {
  display: block;
  margin-top: 4px;
  color: #435371;
  font-size: 10px;
}

.move-type {
  padding: 2px 4px;
  border-radius: 3px;
  background: #fff1c6;
  color: #8c6100;
  font-size: 9px;
}

.command-footer {
  min-height: 80px;
  padding: 10px;
  display: grid;
  place-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  background: #eaf3ff;
  color: #2f4365;
  text-align: center;
}

.command-footer p {
  margin: 0;
  font-size: 12px;
}

.command-footer button {
  width: 112px;
  height: 38px;
  border-color: #5791ff;
  border-radius: 4px;
  background: #fff;
  color: #126ce6;
  font-weight: 900;
}

.result-card {
  width: calc(100% - 16px);
  margin: 0 auto 12px;
  border: 1px solid #b7a88c;
  border-radius: 3px;
  overflow: hidden;
}

.result-card h3 {
  height: 31px;
  margin: 0;
  display: grid;
  place-items: center;
  border-bottom: 1px solid #b7a88c;
  background: #fff3df;
  color: #000;
  font-size: 14px;
}

.result-body {
  min-height: 82px;
  padding: 13px 14px;
  text-align: center;
}

.result-body p {
  margin: 0 0 8px;
  color: #263b60;
}

.battle-log {
  max-height: 96px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.battle-log li {
  padding: 4px;
  color: #273955;
  font-size: 12px;
}

.chat-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #326df0, #09bcd0);
  color: #fff;
  box-shadow: 0 8px 18px rgba(26, 71, 160, 0.3);
}

.chat-float span {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #8c89a8;
  font-size: 11px;
  line-height: 20px;
}

@media (max-width: 1180px) {
  .page-shell {
    grid-template-columns: 220px minmax(520px, 1fr) 220px;
  }
}

@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-top: 0;
  }

  .left-sidebar {
    order: 2;
  }

  .right-sidebar {
    order: 3;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .header-actions,
  .auto-box,
  .battle-card {
    align-items: stretch;
    flex-direction: column;
  }

  .page-shell {
    width: calc(100% - 12px);
    margin-top: 8px;
  }

  .battle-card,
  .skill-list,
  .tabs {
    grid-template-columns: 1fr;
  }

  .pet-form,
  .stat-table,
  .collection-list,
  .account-grid,
  .bag-list,
  .login-form {
    grid-template-columns: 1fr 1fr;
  }

  .login-form button {
    grid-column: 1 / -1;
  }

  .site-header {
    height: auto;
    padding: 8px 0;
  }

  .currency-row {
    flex-wrap: wrap;
    padding-inline: 8px;
    text-align: center;
  }

  .shop-row {
    grid-template-columns: 42px 1fr;
  }

  .ranking-tabs,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .ranking-place,
  .ranking-row b {
    text-align: left;
  }

  .shop-row button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .account-grid,
  .bag-list {
    grid-template-columns: 1fr;
  }
}
