.desktop-pet-host {
  display: none !important;
  visibility: hidden !important;
}

.roco-pet-app {
  width: min(1180px, calc(100vw - 32px));
  margin: 24px auto 56px;
  color: #24313f;
}

.roco-pet-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.roco-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 4px;
}

.roco-page-title {
  margin: 0;
  color: #173247;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
}

.roco-page-subtitle {
  margin: 6px 0 0;
  color: #667789;
  font-size: 14px;
  line-height: 1.6;
}

.roco-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid #d9e4ea;
  border-radius: 8px;
  background: #ffffff;
}

.roco-tab {
  min-width: 84px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #435464;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.roco-tab.is-active {
  background: #1f7a8c;
  color: #ffffff;
}

.roco-summary-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) repeat(3, minmax(150px, 0.65fr));
  gap: 14px;
}

.roco-summary-panel,
.roco-stat-panel,
.roco-pet-card,
.roco-admin-panel,
.roco-empty {
  border: 1px solid #dce7ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(28, 47, 63, 0.06);
}

.roco-summary-panel {
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: center;
  gap: 18px;
  min-height: 150px;
  padding: 18px;
}

.roco-current-preview,
.roco-card-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #e0e8ec;
  border-radius: 8px;
  background: #f8fafb;
}

.roco-current-preview {
  width: 104px;
  height: 104px;
}

.roco-current-preview img,
.roco-card-preview img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  image-rendering: auto;
}

.roco-current-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: #152f3f;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.roco-current-meta,
.roco-card-meta,
.roco-admin-meta {
  color: #637387;
  font-size: 13px;
  line-height: 1.55;
}

.roco-stat-panel {
  min-height: 150px;
  padding: 18px;
}

.roco-stat-label {
  color: #637387;
  font-size: 13px;
  font-weight: 600;
}

.roco-stat-value {
  margin-top: 12px;
  color: #153448;
  font-size: 28px;
  font-weight: 800;
}

.roco-stat-note {
  margin-top: 8px;
  color: #758395;
  font-size: 12px;
  line-height: 1.5;
}

.roco-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 0;
  color: #183447;
  font-size: 18px;
  font-weight: 700;
}

.roco-pet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 14px;
}

.roco-pet-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
}

.roco-card-preview {
  width: 100%;
  aspect-ratio: 1 / 0.72;
}

.roco-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.roco-card-title h3 {
  min-width: 0;
  margin: 0;
  color: #1c3446;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.roco-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.roco-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4f6;
  color: #45606c;
  font-size: 12px;
  font-weight: 600;
}

.roco-tag.is-current {
  background: #e4f4f7;
  color: #126d7e;
}

.roco-tag.is-shop {
  background: #fff3dc;
  color: #8d5b08;
}

.roco-tag.is-danger {
  background: #fdecec;
  color: #a83f3f;
}

.roco-level-block {
  margin-top: 12px;
}

.roco-level-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #4a5c6c;
  font-size: 13px;
  font-weight: 600;
}

.roco-progress {
  height: 8px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef1;
}

.roco-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f7a8c, #c78228);
}

.roco-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.roco-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cfdce3;
  border-radius: 6px;
  background: #ffffff;
  color: #294050;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.roco-btn:hover {
  border-color: #1f7a8c;
  color: #1f7a8c;
}

.roco-btn.primary {
  border-color: #1f7a8c;
  background: #1f7a8c;
  color: #ffffff;
}

.roco-btn.warning {
  border-color: #c78228;
  background: #c78228;
  color: #ffffff;
}

.roco-btn.danger {
  border-color: #bb4d4d;
  background: #bb4d4d;
  color: #ffffff;
}

.roco-btn:disabled {
  border-color: #d8e0e5;
  background: #f3f6f8;
  color: #9aa8b3;
  cursor: not-allowed;
}

.roco-empty {
  padding: 28px;
  text-align: center;
}

.roco-empty h2 {
  margin: 0 0 8px;
  color: #1d3547;
  font-size: 20px;
}

.roco-empty p {
  margin: 0;
  color: #667789;
  line-height: 1.6;
}

.roco-admin-panel {
  overflow-x: auto;
}

.roco-admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.roco-admin-table th,
.roco-admin-table td {
  padding: 12px;
  border-bottom: 1px solid #e6edf1;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.roco-admin-table th {
  color: #4f6476;
  font-weight: 700;
  background: #f7fafb;
}

.roco-admin-table input[type="number"],
.roco-admin-table select {
  width: 96px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #ccd8df;
  border-radius: 6px;
  background: #ffffff;
  color: #24313f;
}

.roco-admin-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.roco-toast {
  position: fixed;
  right: 22px;
  top: 78px;
  z-index: 3000;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #173247;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(16, 31, 43, 0.2);
  font-size: 13px;
  line-height: 1.5;
}

.roco-toast.is-error {
  background: #a83f3f;
}

.roco-pet-host {
  position: fixed;
  left: 32px;
  bottom: 24px;
  z-index: 2600;
  width: 132px;
  height: 156px;
  touch-action: none;
  user-select: none;
}

.roco-pet-avatar {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 132px;
  height: 132px;
  transform: translateX(-50%);
  object-fit: contain;
  cursor: grab;
  filter: drop-shadow(0 14px 18px rgba(32, 43, 52, 0.18));
}

.roco-pet-host[data-action="jump"] .roco-pet-avatar {
  animation: roco-pet-jump 720ms ease-in-out;
}

.roco-pet-host[data-action="wait"] .roco-pet-avatar {
  animation: roco-pet-wait 1040ms ease-in-out;
}

.roco-pet-avatar:active {
  cursor: grabbing;
}

@keyframes roco-pet-jump {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  35% {
    transform: translateX(-50%) translateY(-18px) scale(1.04);
  }
  68% {
    transform: translateX(-50%) translateY(2px) scale(0.98);
  }
}

@keyframes roco-pet-wait {
  0%,
  100% {
    transform: translateX(-50%) rotate(0deg);
  }
  28% {
    transform: translateX(-50%) rotate(-4deg);
  }
  62% {
    transform: translateX(-50%) rotate(4deg);
  }
}

.roco-pet-bubble {
  position: absolute;
  left: 50%;
  bottom: 128px;
  min-width: 92px;
  max-width: 180px;
  transform: translateX(-50%);
  padding: 8px 10px;
  border: 1px solid #d8e4ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #274050;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 8px 18px rgba(33, 45, 55, 0.12);
}

.roco-pet-menu {
  position: fixed;
  left: var(--roco-menu-left, 24px);
  top: var(--roco-menu-top, 24px);
  display: none;
  width: 164px;
  max-height: min(440px, calc(100vh - 16px));
  overflow: hidden;
  border: 1px solid #d7e3ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(19, 38, 53, 0.16);
  overflow-y: auto;
}

.roco-pet-menu.is-open {
  display: block;
}

.roco-pet-menu button {
  display: block;
  width: 100%;
  height: 34px;
  border: 0;
  border-bottom: 1px solid #edf2f5;
  background: #ffffff;
  color: #294050;
  text-align: left;
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
}

.roco-pet-menu button:hover {
  background: #f3f8fa;
}

.roco-pet-menu-separator {
  height: 6px;
  border-bottom: 1px solid #edf2f5;
  background: #f7fafb;
}

.roco-pet-menu button:last-child {
  border-bottom: 0;
}

[data-roco-difficulty="入门"] {
  border-color: #bfdbfe !important;
  color: #2563eb !important;
}

[data-roco-difficulty="普及-"] {
  border-color: #99f6e4 !important;
  color: #0f766e !important;
}

[data-roco-difficulty="普及/提高-"] {
  border-color: #facc15 !important;
  color: #a16207 !important;
}

.el-button--primary[data-roco-difficulty="普及/提高-"],
.is-active[data-roco-difficulty="普及/提高-"],
.active[data-roco-difficulty="普及/提高-"] {
  background: #facc15 !important;
  border-color: #facc15 !important;
  color: #ffffff !important;
}

.roco-fireworks {
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
}

.roco-fireworks canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.roco-fireworks-text {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translate(-50%, -50%);
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(12, 24, 36, 0.72);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
  animation: roco-fireworks-pop 2600ms ease forwards;
}

@keyframes roco-fireworks-pop {
  0% {
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
  }
  12%,
  70% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -56%) scale(0.96);
    opacity: 0;
  }
}

.roco-nav-item {
  cursor: pointer;
}

.roco-admin-pet-menu i {
  margin-right: 5px;
  width: 24px;
  text-align: center;
}

body.roco-admin-pet-page .roco-pet-app {
  width: min(100%, 1180px);
  margin: 10px 0 56px;
}

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

  .roco-summary-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .roco-pet-app {
    width: min(100vw - 20px, 560px);
    margin-top: 142px;
  }

  .roco-page-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .roco-tabs {
    width: 100%;
  }

  .roco-tab {
    flex: 1;
    min-width: 0;
  }

  .roco-summary-grid {
    grid-template-columns: 1fr;
  }

  .roco-summary-panel {
    grid-template-columns: 82px 1fr;
    padding: 14px;
  }

  .roco-current-preview {
    width: 82px;
    height: 82px;
  }

  .roco-current-name {
    font-size: 18px;
  }

  .roco-pet-grid {
    grid-template-columns: 1fr;
  }

  .roco-pet-host {
    width: 110px;
    height: 130px;
  }

  .roco-pet-avatar {
    width: 110px;
    height: 110px;
  }

  .roco-pet-bubble {
    bottom: 106px;
  }
}
