:root {
  --cream: #fff8e7;
  --gold: #ffd966;
  --orange: #e67e22;
  --brown-dark: #5c3d1e;
  --brown-mid: #7d5a3a;
  --brown-light: #a08060;
  --pink: #ff6b9d;
  --teal: #4ecdc4;
  --green: #27ae60;
  --red: #e74c3c;
  --shadow: 0 4px 20px rgba(92, 61, 30, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Nunito", "Segoe UI", system-ui, sans-serif;
  --game-footer-block: calc(5px + 0.65rem * 1.3 + max(5px, env(safe-area-inset-bottom, 0px)));
  --bottom-nav-height: calc(((min(100vw - 8px, 712px) - 21px) / 8 * 1.1) + 16px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: linear-gradient(160deg, var(--cream) 0%, #ffe8c8 50%, var(--gold) 100%);
  min-height: 100vh;
  color: var(--brown-dark);
  line-height: 1.5;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-height) + var(--game-footer-block) + 4px);
  position: relative;
}

/* Screens */
.screen {
  display: none;
  padding: 24px 20px;
  animation: fadeIn 0.35s ease;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Welcome */
#screen-welcome.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 90px);
  text-align: center;
  gap: 32px;
}

.welcome-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--brown-dark);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.welcome-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 12px 0;
  color: var(--brown-dark);
}

.welcome-sub {
  font-size: 1.05rem;
  color: var(--brown-mid);
  max-width: 480px;
  margin: 0 auto 8px;
}

.welcome-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 480px;
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  text-align: left;
}

.feature-card span {
  font-size: 1.6rem;
}

.feature-card strong {
  display: block;
  margin: 6px 0 2px;
  font-size: 0.9rem;
}

.feature-card p {
  font-size: 0.78rem;
  color: var(--brown-light);
}

/* Buttons */
.btn {
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  border-radius: 50px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), #d35400);
  color: white;
  box-shadow: 0 4px 14px rgba(230, 126, 34, 0.4);
  padding: 10px 20px;
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.5);
}

.btn-secondary {
  background: white;
  color: var(--brown-dark);
  border: 2px solid var(--gold);
  padding: 10px 18px;
}

.btn-secondary:hover {
  background: var(--cream);
}

.btn-lg {
  font-size: 1.05rem;
  padding: 14px 32px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--orange);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  margin-top: 4px;
}

.btn-reset {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--brown-light);
  background: white;
  color: var(--brown-mid);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 50;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.btn-reset:hover {
  opacity: 1;
}

#app.no-nav .bottom-nav {
  display: none;
}

/* Screen headers */
.screen-header {
  text-align: center;
  margin-bottom: 24px;
}

.screen-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
}

.screen-header p {
  color: var(--brown-mid);
  font-size: 0.95rem;
  margin-top: 4px;
}

.screen-header-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.screen-header-art-badge {
  width: 158px;
  aspect-ratio: 1;
  border: 2.5px solid #c8860a;
  border-radius: 20px;
  overflow: hidden;
  background: #fff8e7;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 0 rgba(166, 107, 8, 0.55),
    0 4px 10px rgba(92, 64, 20, 0.12);
  line-height: 0;
}

.screen-header-art-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.screen-header-art h2 {
  margin-top: 2px;
}

.section-sub {
  font-size: 1rem;
  margin: 20px 0 12px;
  color: var(--brown-mid);
}

/* Create */
.create-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.create-form label,
.form-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brown-mid);
}

.create-form input {
  font-family: var(--font);
  font-size: 1.1rem;
  padding: 12px 16px;
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  background: white;
  outline: none;
  transition: border-color 0.2s;
}

.create-form input:focus {
  border-color: var(--orange);
}

.form-label {
  margin-top: 8px;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.create-form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.create-form-actions.has-cancel {
  flex-direction: column-reverse;
}

@media (min-width: 480px) {
  .create-form-actions.has-cancel {
    flex-direction: row;
    align-items: stretch;
  }

  .create-form-actions.has-cancel .create-cancel-btn {
    flex: 0 0 auto;
    min-width: 140px;
  }

  .create-form-actions.has-cancel #btn-create-pet {
    flex: 1 1 auto;
  }
}

.pet-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
}

.pet-name-row h2 {
  margin: 0;
}

.modal-field-input {
  display: block;
  width: 100%;
  margin: 12px 0 4px;
  font-family: var(--font);
  font-size: 1.1rem;
  padding: 12px 16px;
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  background: white;
  outline: none;
}

.modal-field-input:focus {
  border-color: var(--orange);
}

.modal-field-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brown-mid);
}

.avatar-card {
  background: white;
  border: 3px solid transparent;
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}

.avatar-card:hover {
  transform: translateY(-2px);
}

.avatar-card.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.25);
}

.avatar-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  border-radius: var(--radius-sm);
  display: block;
  background: var(--cream);
}

.avatar-preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
  transform: scale(1.1);
  transform-origin: center center;
  background: var(--cream);
}

.avatar-preview {
  position: relative;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--cream);
}

.avatar-card.taken {
  opacity: 0.55;
  cursor: not-allowed;
}

.avatar-taken {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--green);
  margin-top: 4px;
}

/* Pet switcher */
.pet-switcher {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: none;
}

.pet-switcher::-webkit-scrollbar {
  display: none;
}

.pet-chip-row {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.pet-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 6px;
  border: 2px solid transparent;
  border-radius: 50px;
  background: white;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brown-mid);
  transition: border-color 0.2s, transform 0.15s;
}

.pet-chip.active {
  border-color: var(--orange);
  color: var(--brown-dark);
}

.pet-chip.add-chip {
  font-size: 1.2rem;
  padding: 6px 16px;
  color: var(--orange);
}

.pet-chip:hover:not(.add-chip) {
  transform: translateY(-1px);
}

.pet-chip.leaderboard-pup {
  border-color: rgba(255, 193, 7, 0.45);
}

.pet-chip-crown {
  font-size: 0.85rem;
  line-height: 1;
}

.pet-chip-remove {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(139, 69, 19, 0.08);
  color: var(--brown-mid);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s, color 0.15s;
}

.pet-chip-remove:hover {
  background: rgba(220, 53, 69, 0.15);
  color: #c0392b;
}

/* Achievements */
.ach-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ach-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px 14px;
  border: 2px solid #e8dcc8;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #fff 0%, #fff8ed 100%);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.ach-category-card:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: 0 6px 18px rgba(139, 69, 19, 0.12);
}

.ach-category-card:active {
  transform: translateY(0);
}

.ach-category-card.ach-category-complete {
  border-color: #38a169;
  background: linear-gradient(160deg, #f0fff4 0%, #fffef8 100%);
}

.ach-category-emoji {
  font-size: 2rem;
  line-height: 1;
}

.ach-category-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--brown-dark);
  line-height: 1.25;
}

.ach-category-count {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--gold-dark, #c8860a);
}

.ach-category-bar {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #efe4d4;
  overflow: hidden;
  margin-top: 2px;
}

.ach-category-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4a623, #c8860a);
}

.ach-category-complete .ach-category-bar-fill {
  background: linear-gradient(90deg, #48bb78, #38a169);
}

.ach-category-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ach-category-back {
  align-self: flex-start;
}

.ach-category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.achievements-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.achievement-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  opacity: 0.65;
}

.achievement-card.unlocked {
  opacity: 1;
  border-left: 4px solid var(--gold);
}

.achievement-card.elite {
  border: 2px solid #c8860a;
  background: linear-gradient(135deg, #fffef8 0%, #fdebd0 100%);
}

.achievement-card.elite.unlocked {
  box-shadow: 0 0 0 2px rgba(200, 134, 10, 0.2), var(--shadow);
}

.elite-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #f4a623, #c8860a);
  color: white;
  padding: 2px 6px;
  border-radius: 6px;
  vertical-align: middle;
  margin-left: 4px;
}

.ultimate-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #9b59b6, #6c3483);
  color: white;
  padding: 2px 6px;
  border-radius: 6px;
  vertical-align: middle;
  margin-left: 4px;
}

.achievement-card.ultimate {
  border: 2px solid #8e44ad;
  background: linear-gradient(135deg, #fdfaff 0%, #ede0f5 100%);
}

.achievement-card.ultimate.unlocked {
  box-shadow: 0 0 0 2px rgba(142, 68, 173, 0.25), var(--shadow);
}

.ach-reward-hint {
  font-size: 0.78rem;
  color: var(--brown-mid);
  margin-top: 6px;
  font-weight: 700;
}

.achievement-reward-unlock {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fffef5 0%, #fdebd0 100%);
  border: 2px solid var(--gold);
}

.achievement-reward-item {
  margin: 6px 0;
  font-size: 0.95rem;
}

.ach-body {
  flex: 1;
}

.btn-ach-share {
  margin-top: 8px;
}

.achievement-unlock-name {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.weekly-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: white;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.weekly-share-bar .profile-bar-hint {
  margin: 4px 0 0;
}

.ach-emoji {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.achievement-card strong {
  display: block;
  font-size: 0.95rem;
}

.achievement-card p {
  font-size: 0.82rem;
  color: var(--brown-mid);
  margin-top: 2px;
}

.btn-sound {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(160, 128, 96, 0.45);
  background: rgba(255, 255, 255, 0.9);
  font-size: 0.62rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.2s, border-color 0.2s;
}

.btn-sound:hover {
  opacity: 1;
  border-color: var(--brown-light);
}

.avatar-name {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 4px;
}

.avatar-coat {
  display: block;
  font-size: 0.72rem;
  color: var(--brown-light);
}

/* Dashboard */
.dashboard-layout {
  display: grid;
  gap: 16px;
}

.pet-panel {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

/* Dashboard — animated portrait stage */
.pet-stage {
  margin: 0 auto 12px;
  max-width: 280px;
}

.pet-avatar-wrap {
  position: relative;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: visible;
  transition: box-shadow 0.4s, filter 0.4s;
}

.pet-avatar-wrap.pet-portrait-tappable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pet-avatar-wrap.pet-portrait-tappable .pet-portrait-frame {
  transition: transform 0.15s ease, box-shadow 0.4s, filter 0.4s;
}

.pet-avatar-wrap.pet-portrait-tappable:active .pet-portrait-frame,
.pet-avatar-wrap.pet-portrait-boop .pet-portrait-frame {
  transform: scale(0.97);
}

.pet-portrait-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 4px solid var(--gold);
  background: var(--cream);
  line-height: 0;
}

.pet-portrait-frame .pet-portrait-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 42%;
  transform-origin: center center;
  will-change: transform;
  background: var(--cream);
}

.pet-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

/* Mood border glow */
.pet-avatar-wrap.mood-thriving .pet-portrait-frame {
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(39, 174, 96, 0.35);
}

.pet-avatar-wrap.mood-happy .pet-portrait-frame {
  border-color: var(--teal);
}

.pet-avatar-wrap.mood-okay .pet-portrait-frame {
  border-color: var(--gold);
}

.pet-avatar-wrap.mood-sad .pet-portrait-frame {
  border-color: var(--orange);
  filter: saturate(0.85);
}

.pet-avatar-wrap.mood-critical .pet-portrait-frame {
  border-color: var(--red);
  filter: saturate(0.7) brightness(0.95);
}

/* Primary animations on the portrait image */
.anim-thriving .pet-portrait-frame .pet-portrait-media {
  animation: anim-thriving 2.4s ease-in-out infinite;
}

.anim-happy .pet-portrait-frame .pet-portrait-media {
  animation: anim-happy 2.8s ease-in-out infinite;
}

.anim-idle .pet-portrait-frame .pet-portrait-media {
  animation: anim-idle 3.5s ease-in-out infinite;
}

.anim-sad .pet-portrait-frame .pet-portrait-media {
  animation: anim-sad 4s ease-in-out infinite;
}

.anim-critical .pet-portrait-frame .pet-portrait-media {
  animation: anim-critical 0.5s ease-in-out infinite;
}

.anim-sleepy .pet-portrait-frame .pet-portrait-media {
  animation: anim-sleepy 5s ease-in-out infinite;
  filter: brightness(0.92);
}

.anim-hungry .pet-portrait-frame .pet-portrait-media {
  animation: anim-hungry 1.2s ease-in-out infinite;
}

@keyframes anim-thriving {
  0%, 100% { transform: scale(1.12) translateY(0) rotate(0deg); }
  25% { transform: scale(1.14) translateY(-4px) rotate(-1deg); }
  75% { transform: scale(1.13) translateY(-2px) rotate(1deg); }
}

@keyframes anim-happy {
  0%, 100% { transform: scale(1.12) translateY(0); }
  50% { transform: scale(1.14) translateY(-4px); }
}

@keyframes anim-idle {
  0%, 100% { transform: scale(1.12) translateY(0); }
  50% { transform: scale(1.13) translateY(-2px); }
}

@keyframes anim-sad {
  0%, 100% { transform: scale(1.1) translateY(1px) rotate(-1deg); }
  50% { transform: scale(1.11) translateY(0) rotate(0deg); }
}

@keyframes anim-critical {
  0%, 100% { transform: scale(1.12) translateX(0); }
  25% { transform: scale(1.12) translateX(-3px); }
  75% { transform: scale(1.12) translateX(3px); }
}

@keyframes anim-sleepy {
  0%, 100% { transform: scale(1.1) translateY(1px); }
  50% { transform: scale(1.11) translateY(2px); }
}

@keyframes anim-hungry {
  0%, 100% { transform: scale(1.12) translateY(0); }
  30% { transform: scale(1.13) translateY(-1px); }
  35% { transform: scale(1.12) translateY(1px); }
  40% { transform: scale(1.13) translateY(-1px); }
}

/* Action burst animations (after feed/play/bathe/vet) */
.pet-avatar-wrap.action-feed .pet-portrait-frame .pet-portrait-media {
  animation: action-nom 0.85s ease !important;
}

.pet-avatar-wrap.action-play .pet-portrait-frame .pet-portrait-media {
  animation: action-bounce 0.85s ease !important;
}

.pet-avatar-wrap.action-bathe .pet-portrait-frame .pet-portrait-media {
  animation: action-shake 0.85s ease !important;
}

.pet-avatar-wrap.action-vet .pet-portrait-frame .pet-portrait-media {
  animation: action-relief 0.85s ease !important;
}

@keyframes action-nom {
  0%, 100% { transform: scale(1.12); }
  30% { transform: scale(1.16) translateY(-3px); }
  60% { transform: scale(1.1); }
}

@keyframes action-bounce {
  0%, 100% { transform: scale(1.12) translateY(0); }
  30% { transform: scale(1.14) translateY(-6px) rotate(-2deg); }
  55% { transform: scale(1.13) translateY(-3px); }
  75% { transform: scale(1.14) translateY(-5px); }
}

@keyframes action-shake {
  0%, 100% { transform: scale(1.12) rotate(0deg); }
  20% { transform: scale(1.12) rotate(-3deg); }
  40% { transform: scale(1.12) rotate(3deg); }
  60% { transform: scale(1.12) rotate(-2deg); }
  80% { transform: scale(1.12) rotate(2deg); }
}

@keyframes action-relief {
  0% { transform: scale(1.12); filter: brightness(1); }
  40% { transform: scale(1.15); filter: brightness(1.08); }
  100% { transform: scale(1.12); filter: brightness(1); }
}

/* Effect overlays */
.fx-bubble {
  position: absolute;
  font-size: 1.4rem;
  background: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  animation: fx-pop 2s ease-in-out infinite;
}

.fx-hungry { top: -8px; right: -4px; animation-delay: 0s; }
.fx-dirty { top: 20%; left: -10px; animation-delay: 0.4s; }
.fx-tired { top: -6px; left: -4px; animation-delay: 0.2s; }
.fx-unwell { bottom: 10%; right: -8px; animation-delay: 0.6s; }
.fx-alert { top: 40%; right: -12px; animation: fx-alert-pulse 1s ease infinite; }

@keyframes fx-pop {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.12) translateY(-4px); }
}

@keyframes fx-alert-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

.fx-zzz {
  position: absolute;
  top: 0;
  right: 8%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fx-zzz span {
  font-weight: 800;
  color: var(--brown-light);
  font-size: 0.85rem;
  opacity: 0;
  animation: fx-zzz-float 2.5s ease infinite;
}

.fx-zzz span:nth-child(1) { animation-delay: 0s; font-size: 0.7rem; }
.fx-zzz span:nth-child(2) { animation-delay: 0.6s; font-size: 0.85rem; }
.fx-zzz span:nth-child(3) { animation-delay: 1.2s; font-size: 1rem; }

@keyframes fx-zzz-float {
  0% { opacity: 0; transform: translateY(0) translateX(0); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-28px) translateX(8px); }
}

.fx-dirt-specks {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 70%, rgba(92, 61, 30, 0.15) 0 6px, transparent 7px),
    radial-gradient(circle at 75% 80%, rgba(92, 61, 30, 0.12) 0 5px, transparent 6px),
    radial-gradient(circle at 50% 90%, rgba(92, 61, 30, 0.1) 0 8px, transparent 9px);
  animation: fx-dirt-wiggle 3s ease infinite;
}

@keyframes fx-dirt-wiggle {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.fx-pulse-ring {
  position: absolute;
  inset: -6px;
  border: 3px solid var(--red);
  border-radius: var(--radius);
  animation: fx-ring-pulse 1.5s ease infinite;
}

@keyframes fx-ring-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(1.03); }
}

.fx-hearts {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
}

.fx-hearts-ok {
  color: var(--pink);
  animation: fx-heart-beat 1.4s ease infinite;
}

.fx-hearts-low {
  color: var(--red);
  animation: fx-heart-worry 0.8s ease infinite;
}

@keyframes fx-heart-beat {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.2); }
}

@keyframes fx-heart-worry {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(0.9); opacity: 0.6; }
}

/* Thriving sparkle particles */
.pet-avatar-wrap.mood-thriving::before,
.pet-avatar-wrap.mood-thriving::after {
  content: "✨";
  position: absolute;
  font-size: 1rem;
  z-index: 2;
  animation: fx-sparkle 2s ease infinite;
}

.pet-avatar-wrap.mood-thriving::before {
  top: -12px;
  left: 10%;
  animation-delay: 0s;
}

.pet-avatar-wrap.mood-thriving::after {
  top: 5%;
  right: 5%;
  animation-delay: 1s;
}

@keyframes fx-sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(20deg); }
}

.status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
  min-height: 24px;
}

.status-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  background: #fef5e7;
  color: var(--orange);
}

.pet-chip .pet-chip-thumb {
  width: 32px;
  height: 32px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
}

.pet-panel h2 {
  font-size: 1.6rem;
  font-weight: 800;
}

.coat-label {
  font-size: 0.85rem;
  color: var(--brown-light);
}

.mood-bubble {
  display: inline-block;
  margin-top: 10px;
  background: var(--cream);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brown-mid);
}

.stats-panel,
.alerts-panel,
.log-panel,
.dashboard-side-block {
  background: white;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.stats-panel h3,
.alerts-panel h3,
.log-panel h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--brown-mid);
}

.btn-report-card-link {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 14px 18px;
  min-height: 48px;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--brown-dark);
  background: linear-gradient(180deg, #fffaf0 0%, #fff0cc 100%);
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  box-shadow: 0 3px 10px rgba(139, 90, 43, 0.14);
}

.btn-report-card-link:hover {
  background: linear-gradient(180deg, #fff5e0 0%, #ffe4a8 100%);
  box-shadow: 0 4px 14px rgba(139, 90, 43, 0.2);
}

.stat-row {
  display: grid;
  grid-template-columns: 110px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  position: relative;
  cursor: help;
}

.stat-label {
  font-size: 0.82rem;
  font-weight: 600;
}

.stat-tip-icon {
  display: inline-block;
  margin-left: 3px;
  font-size: 0.72rem;
  color: var(--brown-light);
  opacity: 0.85;
}

.stat-tooltip {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: var(--brown-dark);
  color: white;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.stat-row:hover .stat-tooltip,
.stat-row:focus-within .stat-tooltip {
  display: block;
}

.profile-bar-hint {
  font-size: 0.85rem;
  color: var(--brown-mid);
  margin-bottom: 10px;
}

.stat-bar-track {
  height: 10px;
  background: #f0e6d6;
  border-radius: 5px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s ease, background 0.3s;
}

.stat-bar-fill.good { background: linear-gradient(90deg, var(--green), #2ecc71); }
.stat-bar-fill.mid { background: linear-gradient(90deg, var(--gold), var(--orange)); }
.stat-bar-fill.low { background: linear-gradient(90deg, var(--red), #c0392b); }

.stat-value {
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
  color: var(--brown-light);
}

/* Health alerts */
.no-alerts {
  font-size: 0.88rem;
  color: var(--green);
  font-weight: 600;
}

.health-alert {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  align-items: flex-start;
}

.health-alert.severity-low { background: #fef9e7; border-left: 4px solid var(--gold); }
.health-alert.severity-medium { background: #fef5e7; border-left: 4px solid var(--orange); }
.health-alert.severity-high { background: #fdedec; border-left: 4px solid var(--red); }
.health-alert.severity-critical { background: #fdedec; border-left: 4px solid var(--red); animation: pulse-red 2s ease infinite; }

.alert-emoji { font-size: 1.4rem; flex-shrink: 0; }
.alert-body strong { font-size: 0.9rem; }
.alert-body p { font-size: 0.82rem; color: var(--brown-mid); margin-top: 2px; }

/* Activity log */
#activity-log {
  list-style: none;
  font-size: 0.82rem;
}

#activity-log li {
  padding: 6px 0;
  border-bottom: 1px solid #f0e6d6;
}

.log-time {
  color: var(--brown-light);
  font-size: 0.75rem;
  margin-right: 6px;
}

/* Action cards */
.action-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.action-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: white;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.2s;
  font-family: var(--font);
  color: var(--brown-dark);
  position: relative;
  width: 100%;
}

.action-card.action-card-grid {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 14px 10px 12px;
  min-height: 0;
}

/* Compact squares on phones; content-height tiles on wider viewports (less empty space on PC). */
@media (max-width: 479px) {
  .action-card.action-card-grid {
    aspect-ratio: 1;
    justify-content: center;
  }
}

@media (min-width: 480px) {
  .action-card.action-card-grid {
    min-height: 128px;
  }

  .action-list {
    gap: 10px;
  }
}

.action-card.action-card-grid .action-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  justify-content: flex-start;
}

.action-card.action-card-grid .action-emoji {
  font-size: 2.4rem;
  margin-bottom: 6px;
}

.action-card.action-card-grid .action-info strong {
  font-size: 0.88rem;
  line-height: 1.2;
  margin-bottom: 6px;
}

.action-card.action-card-grid .action-tip {
  font-size: 0.72rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.action-card.action-card-grid .action-cost-line {
  font-size: 0.75rem;
  font-weight: 800;
  color: #c05621;
  margin: 0 0 4px;
}

.action-card.action-card-grid.clue-target,
.action-card.action-card-grid.recommended {
  transform: none;
}

.action-card.action-card-grid.clue-target:active,
.action-card.action-card-grid.recommended:active {
  transform: scale(0.98);
}

.action-card.recommended {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2), var(--shadow);
  animation: rec-glow 2s ease-in-out infinite;
}

@keyframes rec-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2), var(--shadow); }
  50% { box-shadow: 0 0 0 6px rgba(230, 126, 34, 0.35), var(--shadow); }
}

.rec-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--orange);
  color: white;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

.action-card.clue-target {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.35), var(--shadow);
  animation: clue-glow 1.4s ease-in-out infinite;
  transform: scale(1.02);
}

@keyframes clue-glow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.35), var(--shadow); }
  50% { box-shadow: 0 0 0 8px rgba(78, 205, 196, 0.5), 0 8px 24px rgba(78, 205, 196, 0.25); }
}

.clue-badge {
  position: absolute;
  top: -10px;
  left: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--teal), #3dbdb5);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  text-align: center;
  letter-spacing: 0.2px;
  z-index: 1;
}

.clue-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(135deg, #e8faf8, #d4f5f2);
  border: 2px solid var(--teal);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.clue-banner-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.care-guide-clue-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.care-guide-clue-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brown-dark);
  line-height: 1;
}

.care-guide-clue {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(135deg, #fff8e7, #ffe8c8);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  box-shadow: var(--shadow);
}

.care-guide-clue-body strong {
  display: block;
  color: var(--brown-dark);
  margin-bottom: 4px;
}

.care-clue-detail,
.care-clue-more {
  font-size: 0.85rem;
  color: var(--brown-mid);
  margin-top: 6px;
}

.care-clue-more {
  font-style: italic;
}

.stat-row.stat-clue {
  background: rgba(78, 205, 196, 0.12);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  margin: -4px -6px;
  animation: stat-clue-pulse 2s ease-in-out infinite;
}

.stat-row.stat-max .stat-value {
  color: var(--green);
  font-weight: 800;
}

.stat-clue-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  background: var(--teal);
  color: white;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: middle;
}

@keyframes stat-clue-pulse {
  0%, 100% { background: rgba(78, 205, 196, 0.12); }
  50% { background: rgba(78, 205, 196, 0.22); }
}

.action-detail {
  font-size: 0.78rem;
  color: var(--brown-mid);
  margin-top: 6px;
  line-height: 1.45;
  padding-top: 6px;
  border-top: 1px dashed #f0e6d6;
}

/* Care guide on dashboard */
.care-guide {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

#player-score-strip {
  margin-bottom: 14px;
}

.care-guide-clear {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #eafaf1;
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 4px solid var(--green);
}

.care-guide-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.care-guide-clear strong {
  display: block;
  color: var(--green);
  margin-bottom: 4px;
}

.care-guide-clear p {
  font-size: 0.85rem;
  color: var(--brown-mid);
  margin: 0;
}

.care-guide-card {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
}

.care-guide-card.priority-high {
  border-left-color: var(--orange);
  background: #fffbf5;
}

.care-guide-body strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.care-guide-body p {
  font-size: 0.8rem;
  color: var(--brown-mid);
  margin: 0;
  line-height: 1.4;
}

.btn-care-action {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--orange), #d35400);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 8px 14px;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-care-action:hover {
  filter: brightness(1.05);
}

/* Educational intro on action screens */
.action-intro {
  margin-bottom: 16px;
}

.care-intro-box {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--teal);
}

.care-intro-box h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

.care-intro-box > p {
  font-size: 0.85rem;
  color: var(--brown-mid);
  line-height: 1.55;
  margin: 0;
}

.care-intro-need {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f0e6d6;
}

.care-intro-need strong {
  font-size: 0.85rem;
  color: var(--orange);
}

.care-intro-need p {
  font-size: 0.85rem;
  color: var(--brown-dark);
  margin: 6px 0 0;
}

.care-intro-edu {
  font-size: 0.8rem !important;
  color: var(--brown-mid) !important;
  font-style: italic;
}

/* Nav urgency badges */
.nav-btn {
  position: relative;
}

.nav-btn.nav-urgent .nav-btn-art-img,
.nav-btn.nav-urgent .nav-icon img,
.nav-btn.nav-urgent .nav-icon svg {
  animation: nav-pulse 1.5s ease infinite;
}

.nav-btn.nav-urgent .nav-btn-art-img {
  animation: nav-pulse 1.5s ease infinite;
}

.nav-btn.nav-urgent:not(.active) {
  color: var(--orange);
}

.nav-btn.nav-clue:not(.active) {
  color: var(--orange);
  animation: nav-clue-pulse 1.5s ease-in-out infinite;
}

.nav-btn.nav-clue:not(.active)::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 6px rgba(230, 126, 34, 0.6);
}

.nav-btn.nav-clue:not(.active) .nav-btn-art-img {
  filter: drop-shadow(0 0 6px rgba(230, 126, 34, 0.55));
  animation: nav-clue-bounce 1.5s ease-in-out infinite;
}

.nav-btn.nav-clue:not(.active) .nav-icon img,
.nav-btn.nav-clue:not(.active) .nav-icon svg {
  filter: drop-shadow(0 0 6px rgba(230, 126, 34, 0.6));
  animation: nav-clue-bounce 1.5s ease-in-out infinite;
}

@keyframes nav-clue-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(230, 126, 34, 0.45)) saturate(0.88); }
  50% { filter: drop-shadow(0 0 9px rgba(230, 126, 34, 0.75)) saturate(1); }
}

@keyframes nav-clue-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.06); }
}

@keyframes nav-clue-pulse {
  0%, 100% { background: rgba(255, 217, 102, 0.35); border-radius: 12px; }
  50% { background: rgba(255, 217, 102, 0.65); }
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  background: var(--red);
  color: white;
  font-size: 0.55rem;
  font-weight: 800;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

@keyframes nav-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(92, 61, 30, 0.15);
}

.action-card:active {
  transform: scale(0.98);
}

.action-card:disabled,
.action-card.action-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  animation: none;
}

.action-emoji {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}

.action-info strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.action-tip {
  font-size: 0.82rem;
  color: var(--brown-mid);
  line-height: 1.4;
}

/* Vet */
.vet-events {
  margin-bottom: 8px;
}

.vet-events h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.vet-event-card {
  display: flex;
  gap: 12px;
  background: white;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  align-items: flex-start;
}

.vet-event-card span { font-size: 1.6rem; }
.vet-event-card strong { font-size: 0.9rem; }
.vet-event-card p { font-size: 0.82rem; color: var(--brown-mid); margin-top: 2px; }

.vet-clear {
  background: #eafaf1;
  color: var(--green);
  padding: 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}

/* Learn */
.learn-section {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.learn-section h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.learn-section > p {
  font-size: 0.92rem;
  color: var(--brown-mid);
  line-height: 1.6;
}

.trait-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.trait-card {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.trait-card strong {
  display: block;
  font-size: 0.88rem;
  color: var(--orange);
  margin-bottom: 4px;
}

.trait-card p {
  font-size: 0.82rem;
  color: var(--brown-mid);
}

.health-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.health-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px;
  background: var(--cream);
  border-radius: var(--radius-sm);
}

.health-name {
  font-weight: 700;
  font-size: 0.88rem;
  grid-column: 1;
}

.health-risk {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  align-self: start;
}

.risk-very-high { background: #fdedec; color: var(--red); }
.risk-high { background: #fef5e7; color: var(--orange); }
.risk-moderate { background: #fef9e7; color: #d4ac0d; }
.risk-low-but-critical { background: #fdedec; color: var(--red); }

.health-desc {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: var(--brown-mid);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.tip-card {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 14px;
  border-left: 4px solid var(--orange);
}

.tip-emoji {
  font-size: 1.4rem;
}

.tip-card strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 0.9rem;
}

.tip-card p {
  font-size: 0.82rem;
  color: var(--brown-mid);
  line-height: 1.5;
}

.facts-list {
  padding-left: 20px;
}

.facts-list li {
  font-size: 0.88rem;
  color: var(--brown-mid);
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Learn hub — Encyclopedia & Quizzes */
.learn-hub-intro {
  text-align: center;
  color: var(--brown-mid);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.learn-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.learn-hub-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 24px 18px;
  border: 2px solid #c8860a;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: var(--font);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.learn-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(92, 61, 30, 0.14);
}

.learn-hub-art {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 4px;
}

.learn-hub-card strong {
  font-size: 1.1rem;
  color: var(--brown-dark);
}

.learn-hub-desc {
  font-size: 0.85rem;
  color: var(--brown-mid);
  line-height: 1.45;
}

.learn-hub-stat {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange);
  margin-top: 4px;
}

.learn-classic {
  margin-top: 28px;
  padding-top: 8px;
  border-top: 2px solid rgba(200, 134, 10, 0.25);
}

.learn-classic-heading {
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 6px;
}

.learn-classic-sub {
  text-align: center;
  font-size: 0.88rem;
  color: var(--brown-mid);
  margin-bottom: 18px;
}

.learn-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.learn-panel-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}

.learn-panel-sub {
  text-align: center;
  color: var(--brown-mid);
  font-size: 0.92rem;
  margin-bottom: 18px;
  line-height: 1.5;
}

.learn-enc-volumes {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.learn-enc-volume-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 16px;
  border: 2px solid rgba(200, 134, 10, 0.35);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  width: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.learn-enc-volume-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.learn-enc-volume-card.learn-article-read {
  border-left: 5px solid var(--orange);
}

.learn-enc-volume-num {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--orange);
  flex-shrink: 0;
  min-width: 52px;
  padding-top: 4px;
}

.learn-enc-read-time {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brown-light);
  margin-top: 6px;
}

.learn-enc-longform {
  max-width: 100%;
}

.learn-enc-volume-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--orange);
  margin-bottom: 8px;
}

.learn-enc-chapter {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(200, 134, 10, 0.15);
}

.learn-enc-chapter:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.learn-enc-chapter h4 {
  font-size: 1.08rem;
  margin-bottom: 14px;
}

.learn-enc-prose p {
  font-size: 0.95rem;
  color: var(--brown-mid);
  line-height: 1.75;
  margin-bottom: 14px;
}

.learn-enc-prose p:last-child {
  margin-bottom: 0;
}

.learn-article-info .learn-enc-read-time {
  margin-top: 8px;
}

.learn-enc-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.learn-enc-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: var(--font);
}

.learn-enc-cat-emoji {
  font-size: 1.8rem;
}

.learn-enc-cat-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brown-dark);
  text-align: center;
}

.learn-enc-cat-count {
  font-size: 0.72rem;
  color: var(--orange);
  font-weight: 700;
}

.learn-article-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.learn-article-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  width: 100%;
}

.learn-article-card.learn-article-read {
  border-left: 4px solid var(--orange);
}

.learn-article-emoji {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.learn-article-info strong {
  display: block;
  font-size: 0.95rem;
  color: var(--brown-dark);
  margin-bottom: 2px;
}

.learn-article-info p {
  font-size: 0.82rem;
  color: var(--brown-mid);
  line-height: 1.4;
}

.learn-article-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--orange);
  margin-left: auto;
  flex-shrink: 0;
}

.learn-article-body {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.learn-article-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--cream);
}

.learn-article-header-emoji {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 8px;
}

.learn-article-header h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.learn-article-summary {
  color: var(--brown-mid);
  font-size: 0.92rem;
}

.learn-article-section {
  margin-bottom: 18px;
}

.learn-article-section h4 {
  font-size: 1rem;
  color: var(--orange);
  margin-bottom: 8px;
}

.learn-article-section p {
  font-size: 0.92rem;
  color: var(--brown-mid);
  line-height: 1.65;
}

.learn-quiz-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.learn-quiz-rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.learn-quiz-rule span {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.learn-quiz-rule p {
  font-size: 0.85rem;
  color: var(--brown-mid);
  line-height: 1.4;
}

.learn-quiz-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  font-size: 0.85rem;
  color: var(--brown-mid);
  margin-bottom: 18px;
}

.learn-quiz-intro .learn-quiz-start {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.learn-quiz-limit-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--brown-light);
  margin-top: 12px;
}

.learn-quiz-progress {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--orange);
}

.learn-quiz-progress-bar {
  height: 6px;
  background: var(--cream);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.learn-quiz-progress-bar span {
  display: block;
  height: 100%;
  background: var(--orange);
  border-radius: 3px;
  transition: width 0.25s ease;
}

.learn-quiz-category {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--orange);
  margin-bottom: 8px;
}

.learn-quiz-question {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.45;
}

.learn-quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.learn-quiz-choice {
  padding: 14px 16px;
  border: 2px solid var(--cream);
  border-radius: var(--radius-sm);
  background: white;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brown-dark);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.learn-quiz-choice:hover {
  border-color: var(--gold);
  background: #fff8e7;
}

.learn-quiz-results {
  text-align: center;
}

.learn-quiz-score {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 16px;
}

.learn-quiz-rewards {
  background: white;
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.learn-quiz-rewards p {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.learn-quiz-bonus {
  font-size: 0.82rem;
  color: var(--orange);
  font-weight: 700;
}

.learn-quiz-review {
  text-align: left;
  margin: 16px 0;
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

.learn-quiz-review summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--brown-dark);
}

.learn-quiz-review-list {
  margin-top: 12px;
  padding-left: 20px;
}

.learn-quiz-review-list li {
  font-size: 0.85rem;
  color: var(--brown-mid);
  margin-bottom: 10px;
  line-height: 1.45;
}

.learn-quiz-review-list li.correct strong {
  color: #2e7d32;
}

.learn-quiz-review-list li.wrong strong {
  color: var(--red);
}

.learn-quiz-review-answer {
  display: block;
  font-size: 0.78rem;
  color: var(--brown-light);
  margin-top: 2px;
}

.learn-quiz-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: var(--game-footer-block);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 8px);
  max-width: 720px;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 3px;
  background: #fff8e7;
  border: 2px solid var(--gold);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  z-index: 250;
  padding: 7px 4px 5px;
  overflow: visible;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  padding: 6px 2px;
  margin: 0 1px;
  border: none;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font);
  color: var(--brown-light);
  transition:
    color 0.2s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav-btn.nav-btn-art {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  min-height: unset;
  aspect-ratio: 1;
  display: block;
  line-height: 0;
  padding: 0;
  margin: 0;
  gap: 0;
  border: 1.5px solid #c8860a;
  border-radius: 9px;
  background: #fff8e7;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 1px 0 rgba(166, 107, 8, 0.55),
    0 2px 4px rgba(92, 64, 20, 0.06);
  overflow: hidden;
  transform: scale(1.1);
  transform-origin: center bottom;
  transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.nav-btn-art-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  border: none;
  margin: 0;
  border-radius: 0;
  opacity: 1;
  filter: none;
  clip-path: inset(0 0 1px 0);
  transition:
    filter 0.2s ease,
    transform 0.2s ease;
}

.nav-btn:not(.active) .nav-icon img,
.nav-btn:not(.active) .nav-icon svg {
  opacity: 0.5;
  filter: grayscale(0.2) drop-shadow(0 1px 2px rgba(92, 61, 30, 0.1));
}

.nav-btn:not(.active) .nav-label {
  opacity: 0.75;
}

.nav-btn.active {
  color: var(--brown-dark);
  background: linear-gradient(180deg, #fff8e7 0%, #ffd966 100%);
  box-shadow:
    inset 0 0 0 2px rgba(230, 126, 34, 0.4),
    0 2px 10px rgba(230, 126, 34, 0.22);
  transform: translateY(-1px);
}

.nav-btn.nav-btn-art:hover {
  transform: scale(1.12) translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 2px 0 rgba(166, 107, 8, 0.5),
    0 3px 6px rgba(92, 64, 20, 0.08);
}

.nav-btn.nav-btn-art.active {
  border: 2px solid var(--orange);
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85),
    0 0 10px rgba(230, 126, 34, 0.42),
    0 0 18px rgba(230, 126, 34, 0.22),
    0 2px 0 rgba(166, 107, 8, 0.45);
  transform: scale(1.135) translateY(-2px);
  z-index: 2;
}

.nav-btn.nav-btn-art.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 0;
  background: var(--orange);
  box-shadow: 0 0 6px rgba(230, 126, 34, 0.45);
  pointer-events: none;
}

.nav-btn.nav-btn-art.active .nav-btn-art-img {
  filter: drop-shadow(0 0 5px rgba(230, 126, 34, 0.55));
  transform: scale(1.015);
}

.nav-btn.nav-btn-art:active {
  transform: scale(1.08) translateY(0.5px);
  box-shadow:
    inset 0 1px 3px rgba(92, 64, 20, 0.1),
    0 1px 0 rgba(166, 107, 8, 0.4);
}

.nav-btn.nav-btn-art .nav-badge {
  top: 1px;
  right: 2px;
  min-width: 12px;
  height: 12px;
  font-size: 0.5rem;
}

.nav-btn.active .nav-label {
  color: var(--orange);
  font-weight: 800;
  opacity: 1;
}

.nav-icon {
  position: relative;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.nav-icon img,
.nav-icon svg {
  display: block;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 3px rgba(92, 61, 30, 0.18));
  transition:
    filter 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav-btn.active .nav-icon::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 6px rgba(230, 126, 34, 0.55);
}

.nav-btn.active .nav-icon img,
.nav-btn.active .nav-icon svg {
  opacity: 1;
  transform: scale(1.12);
  filter: drop-shadow(0 3px 6px rgba(230, 126, 34, 0.45));
}

.nav-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  transition: opacity 0.2s ease, color 0.2s ease;
}

@media (max-width: 480px) {
  :root {
    --bottom-nav-height: calc(((100vw - 8px - 14px) / 8 * 1.1) + 13px);
  }

  .bottom-nav {
    gap: 2px;
    padding: 6px 3px 4px;
  }

  .nav-btn.nav-btn-art {
    border-radius: 7px;
    border-width: 1px;
  }

  .nav-btn.nav-btn-art.active {
    border-width: 2px;
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(92, 61, 30, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: white;
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(92, 61, 30, 0.25);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 0;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--brown-light);
  line-height: 1;
  padding: 4px;
}

.modal-body {
  padding: 16px 20px 24px;
  font-size: 0.92rem;
  color: var(--brown-mid);
  line-height: 1.6;
}

.info-box {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 12px 0;
}

.info-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brown-dark);
}

.info-box.prevention {
  border-left: 4px solid var(--teal);
}

.emergency-banner {
  background: var(--red);
  color: white;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-align: center;
  margin-top: 12px;
}

.modal-advice {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--brown-light);
}

.tip-modal-text {
  font-size: 1rem;
  color: var(--brown-dark);
  margin-bottom: 16px;
}

.modal-actions {
  margin-top: 16px;
  text-align: center;
}

.modal-actions-stacked {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-choice-btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 0.95rem;
}

.btn-outline-danger {
  border: 2px solid #c0392b;
  color: #c0392b;
  background: white;
}

.btn-outline-danger:hover {
  background: #fdecea;
}

.event-condition {
  margin-bottom: 8px;
}

/* Site footer */
.game-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px 12px max(5px, env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 0.65rem;
  line-height: 1.3;
  color: var(--brown-light);
  background: rgba(250, 245, 235, 0.94);
  border-top: 1px solid rgba(196, 149, 58, 0.22);
}

.game-footer a {
  color: var(--brown-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.game-footer a:hover {
  color: var(--brown-dark);
}

.game-footer-sep {
  opacity: 0.55;
}

.game-footer-meta {
  opacity: 0.85;
}

/* Toasts */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: white;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 8px 30px rgba(92, 61, 30, 0.2);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success { border-left: 4px solid var(--green); }
.toast-warning { border-left: 4px solid var(--orange); }
.toast-error { border-left: 4px solid var(--red); }
.toast-info { border-left: 4px solid var(--teal); }

/* Player score strip */
.player-score-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: white;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}

.player-score-strip strong {
  color: var(--orange);
}

.player-score-strip .btn-link-sm {
  background: none;
  border: none;
  color: var(--brown-mid);
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

/* Leaderboard */
.player-profile-bar {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.player-profile-bar label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.player-profile-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.player-profile-row input {
  flex: 1;
  min-width: 140px;
  padding: 12px 14px;
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
}

.player-profile-row #btn-lb-save {
  padding: 12px 28px;
  font-size: 1.05rem;
  min-width: 120px;
  flex-shrink: 0;
}

.player-profile-row #btn-lb-refresh {
  padding: 12px 18px;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.leaderboard-content {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.leaderboard-you {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff8e7, #ffe8c8);
  border-radius: var(--radius-sm);
  border: 2px solid var(--gold);
}

.leaderboard-you.leaderboard-row-btn {
  cursor: pointer;
  transition: filter 0.15s ease;
}

.leaderboard-you.leaderboard-row-btn:hover,
.leaderboard-you.leaderboard-row-btn:focus-visible {
  filter: brightness(0.97);
  outline: none;
}

.lb-you-label {
  display: block;
  font-size: 0.75rem;
  color: var(--brown-mid);
}

.leaderboard-list {
  list-style: none;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid #f0e6d6;
}

.leaderboard-row.is-you {
  background: rgba(255, 217, 102, 0.25);
  border-radius: var(--radius-sm);
}

.leaderboard-row-btn,
.leaderboard-your-pet-btn {
  cursor: pointer;
  transition: background 0.15s ease;
}

.leaderboard-row-btn:hover,
.leaderboard-row-btn:focus-visible,
.leaderboard-your-pet-btn:hover,
.leaderboard-your-pet-btn:focus-visible {
  background: rgba(139, 90, 43, 0.08);
  outline: none;
}

.leaderboard-profile-hint {
  font-size: 0.9rem;
  color: var(--brown-mid);
  margin: 8px 4px 12px;
}

.leaderboard-your-pet-btn {
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  margin: 0 -6px;
}

.pet-profile-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pet-profile-header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.pet-profile-portrait {
  flex: 0 0 120px;
  width: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f5ebe0;
}

.pet-profile-video {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.pet-profile-meta {
  flex: 1;
  min-width: 0;
}

.pet-profile-caregiver {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.pet-profile-points {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: var(--brown-mid);
}

.pet-profile-points-sep {
  margin: 0 4px;
}

.pet-profile-show {
  margin: 0;
  font-size: 0.95rem;
}

.pet-profile-section h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.pet-profile-stats .stat-row {
  margin-bottom: 8px;
}

.pet-profile-accessories .pet-accessories-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.profile-accessory-names {
  margin: 0;
  font-size: 0.85rem;
  color: var(--brown-mid);
}

.profile-sync-time {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-report-empty,
.profile-stale-note {
  font-size: 0.9rem;
  color: var(--brown-mid);
  margin: 0;
}

.profile-stale-note {
  padding: 10px 12px;
  background: rgba(255, 217, 102, 0.2);
  border-radius: var(--radius-sm);
}

.report-grid-compact {
  gap: 6px 12px;
}

.pet-profile-report-card h4 {
  margin: 12px 0 8px;
  font-size: 0.95rem;
}

.pet-profile-report-card h4:first-child {
  margin-top: 0;
}

.profile-loading {
  text-align: center;
  color: var(--brown-mid);
  padding: 24px 0;
}

.lb-rank {
  min-width: 36px;
  font-weight: 800;
  text-align: center;
}

.lb-name {
  flex: 1;
  font-weight: 600;
}

.lb-names {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-player {
  font-weight: 700;
  line-height: 1.2;
}

.lb-pet {
  font-size: 0.85rem;
  color: var(--brown-mid);
  font-weight: 600;
}

.lb-you-names {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lb-you-pet {
  font-size: 0.9rem;
  color: var(--brown-mid);
  font-weight: 600;
}

.leaderboard-your-pets {
  list-style: none;
  margin: 8px 0 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--brown-mid);
}

.leaderboard-your-pets li + li {
  margin-top: 4px;
}

.lb-points {
  font-weight: 800;
  color: var(--orange);
}

.leaderboard-empty,
.leaderboard-loading,
.leaderboard-updated {
  text-align: center;
  color: var(--brown-mid);
  font-size: 0.9rem;
}

.leaderboard-updated {
  margin-top: 12px;
  font-size: 0.8rem;
}

.leaderboard-note.warn {
  background: #fff3cd;
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.scoring-help {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.scoring-help h4 {
  margin-bottom: 8px;
}

.scoring-help h5 {
  margin: 12px 0 6px;
  font-size: 0.9rem;
}

.scoring-intro {
  font-size: 0.9rem;
  color: var(--brown-mid);
  margin-bottom: 8px;
}

.scoring-help ul {
  margin-left: 18px;
  font-size: 0.9rem;
}

.scoring-help li {
  margin-bottom: 4px;
}

.scoring-tip {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--brown-mid);
}

.optional-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brown-mid);
  background: var(--cream);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

.sms-settings,
.email-settings {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  box-shadow: var(--shadow);
}

.sms-settings.hidden,
.email-settings.hidden {
  display: none;
}

.sms-notice {
  background: #fff3cd;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.sms-notice.hidden {
  display: none;
}

.sms-phone-label,
.email-field-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

#sms-phone,
#email-address {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  margin-bottom: 12px;
}

.sms-consent,
.email-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--brown-mid);
  margin-bottom: 14px;
  cursor: pointer;
}

.sms-consent input,
.email-consent input {
  margin-top: 3px;
  flex-shrink: 0;
}

.sms-actions,
.email-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn-sm {
  font-size: 0.9rem;
  padding: 10px 18px;
}

.btn-link-skip {
  background: none;
  border: none;
  color: var(--brown-mid);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.alerts-settings {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.alerts-settings h4 {
  margin-bottom: 8px;
}

.alerts-note {
  font-size: 0.85rem;
  color: var(--brown-mid);
  margin-bottom: 12px;
}

.alerts-actions {
  margin-bottom: 8px;
}

.notify-status {
  font-size: 0.8rem;
  color: var(--brown-mid);
}

.btn-fb-share {
  margin-top: 8px;
  background: #1877f2;
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-fb-share:hover {
  background: #166fe5;
}

.health-alert .alert-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Responsive */
@media (min-width: 600px) {
  .dashboard-layout {
    grid-template-columns: 1fr 1fr;
  }

  .pet-panel {
    grid-row: 1 / -1;
  }

  .dashboard-layout .economy-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .dashboard-layout .treat-jar {
    min-width: 0;
    width: 100%;
  }

  .dashboard-side-block.economy-strip-host,
  .dashboard-side-block.show-ready-host {
    margin-bottom: 0;
  }

  .dashboard-side-block .show-ready-panel {
    background: transparent;
    border: none;
    padding: 0;
  }
}

@media (max-width: 400px) {
  .welcome-features {
    grid-template-columns: 1fr;
  }

  .stat-row {
    grid-template-columns: 90px 1fr 36px;
  }

  .nav-label {
    display: none;
  }
}

/* Leaderboard tabs & weekly awards */
.lb-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.lb-tab {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid var(--gold-light);
  border-radius: var(--radius-sm);
  background: white;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lb-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: white;
}

.leaderboard-week-note,
.leaderboard-subnote {
  font-size: 0.85rem;
  color: var(--brown-mid);
  margin-bottom: 12px;
}

.leaderboard-awards {
  margin-bottom: 16px;
}

.certificates-section {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.certificates-section h4 {
  margin-bottom: 6px;
}

.weekly-top10-section {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.weekly-top10-section h4 {
  margin-bottom: 6px;
}

.weekly-top10-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.weekly-top10-card {
  background: #fff8e7;
  border: 2px solid #f0e6d6;
  border-radius: var(--radius-sm);
  padding: 10px;
}

.weekly-top10-card.is-you {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 217, 102, 0.45);
}

.weekly-top10-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.cert-canvas-sm {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(92, 61, 30, 0.12);
}

.cert-actions-compact {
  margin-top: 10px;
  gap: 8px;
}

.cert-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.cert-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f0e6d6;
}

.cert-list-item:last-child {
  border-bottom: none;
}

.cert-list-meta {
  display: block;
  font-size: 0.85rem;
  color: var(--brown-mid);
}

.cert-list-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cert-preview-inner {
  text-align: center;
}

.cert-preview-badge {
  font-weight: 800;
  color: var(--gold);
}

.cert-canvas {
  display: none;
}

.cert-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Reset warning */
.reset-list {
  margin: 12px 0 12px 20px;
  text-align: left;
}

.reset-list li {
  margin-bottom: 6px;
}

.reset-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.leaderboard-account-danger {
  margin-top: 28px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 2px dashed #e0b4b4;
  background: #fff8f8;
}

.leaderboard-account-danger h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: #922b21;
}

.leaderboard-account-danger p {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--brown-mid);
  line-height: 1.45;
}

.btn-danger {
  background: #c0392b;
  color: white;
  border: none;
}

.btn-danger:hover {
  background: #a93226;
}

.modal-advice.warn {
  color: #856404;
  background: #fff3cd;
  padding: 10px;
  border-radius: var(--radius-sm);
}

.dashboard-side-block.economy-strip-host {
  padding: 14px 16px;
}

.dashboard-side-block.show-ready-host {
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-side-block.show-ready-host .show-ready-panel {
  margin: 0;
}

.economy-strip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fff8e7 0%, #fff 100%);
  border: 1px solid #f0d9a8;
  border-radius: var(--radius-md);
}

.economy-strip-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.economy-bucks {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn-pet-store-shop {
  display: block;
  width: 100%;
  padding: 6px;
  margin: 0;
  border: 3px solid #c8860a;
  background: linear-gradient(180deg, #fff4c9 0%, #ffd966 100%);
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  line-height: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 4px 0 #a66b08,
    0 6px 16px rgba(92, 64, 20, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.btn-pet-store-shop:hover,
.btn-pet-store-shop:focus-visible {
  transform: translateY(-1px);
  border-color: #b87400;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 5px 0 #a66b08,
    0 8px 20px rgba(92, 64, 20, 0.28);
}

.btn-pet-store-shop:focus-visible {
  outline: 3px solid rgba(230, 126, 34, 0.45);
  outline-offset: 2px;
}

.btn-pet-store-shop:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 2px 4px rgba(92, 64, 20, 0.15),
    0 1px 0 #a66b08,
    0 2px 8px rgba(92, 64, 20, 0.18);
}

.btn-pet-store-shop img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(92, 64, 20, 0.12);
}

.economy-bucks-icon {
  font-size: 1.2rem;
}

.treat-jar {
  width: 100%;
  min-width: 0;
}

.treat-jar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.treat-jar-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.treat-jar-amt {
  font-weight: 700;
  color: var(--text);
}

.treat-jar-track {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.treat-jar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f5a623, #f8d347);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.economy-streak {
  font-size: 0.8rem;
  color: #c05621;
  font-weight: 600;
  white-space: nowrap;
}

.btn-collect-jar {
  align-self: flex-start;
  min-width: 88px;
}

.btn-shop-open {
  font-size: 0.95rem;
  font-weight: 800;
  padding: 12px 22px;
  min-height: 44px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.show-ready-host:not(.dashboard-side-block) {
  margin-bottom: 14px;
}

.show-ready-panel {
  padding: 14px 16px;
  background: #f8f5ff;
  border: 1px solid #d4c4f0;
  border-radius: var(--radius-md);
}

.show-ready-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.show-ready-header h3 {
  margin: 0;
  font-size: 1rem;
}

.show-ready-score strong {
  color: #6b46c1;
}

.show-ready-bar-track {
  height: 10px;
  background: #e8e0f5;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.show-ready-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.4s ease;
}

.show-ready-bar-fill.good {
  background: linear-gradient(90deg, #9f7aea, #6b46c1);
}

.show-ready-bar-fill.mid {
  background: linear-gradient(90deg, #ecc94b, #d69e2e);
}

.show-ready-bar-fill.low {
  background: linear-gradient(90deg, #fc8181, #e53e3e);
}

.show-ready-msg {
  font-size: 0.88rem;
  margin: 0 0 10px;
  color: var(--text-muted);
}

.show-ready-msg.warn {
  color: #c05621;
}

.dog-show-result {
  text-align: center;
}

.dog-show-tier {
  font-size: 1.4rem;
  margin: 0 0 8px;
}

.dog-show-rewards {
  font-weight: 700;
  color: #6b46c1;
  margin: 12px 0;
}

.dog-show-story {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--brown);
  margin: 0 0 12px;
  font-style: italic;
}

.shop-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.shop-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.shop-item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.shop-use-block {
  background: #f0fff4;
  border: 2px solid #9ae6b4;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
}

.shop-buy-heading {
  font-size: 0.95rem;
  margin: 0 0 10px;
}

.shop-use-grid {
  margin-top: 10px;
}

.inventory-panel {
  display: none;
  margin-bottom: 14px;
}

.inventory-panel.has-items {
  display: block;
}

.dashboard-side-block.inventory-panel.has-items {
  display: block;
  padding: 14px 16px;
  background: #f0fff4;
  border: 2px solid #9ae6b4;
  box-shadow: var(--shadow);
}

.inventory-panel-inner {
  margin: 0;
}

.inventory-heading {
  font-size: 0.92rem;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--brown-mid);
}

.inventory-sub {
  font-weight: 600;
  color: var(--brown-mid);
  font-size: 0.82rem;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.inventory-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  min-height: 108px;
  background: white;
  border: 2px solid #9ae6b4;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  color: var(--brown-dark);
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s;
}

.inventory-item-btn:hover {
  transform: translateY(-2px);
  border-color: var(--green);
}

.inventory-item-emoji {
  font-size: 1.8rem;
  line-height: 1;
}

.inventory-item-name {
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}

.pet-accessories-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-top: 8px;
  padding: 0 2px;
}

.pet-accessory-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  font-size: 1.35rem;
  line-height: 1;
  background: linear-gradient(180deg, #fffdf8 0%, #fff3d6 100%);
  border: 2px solid var(--gold-light);
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(92, 61, 30, 0.08);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.pet-accessory-empty {
  opacity: 0.35;
  font-size: 0.65rem;
  color: var(--text-muted);
  background: #faf6f0;
  border-style: dashed;
}

.equipped-cosmetic-heading {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.equipped-cosmetics-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-browse-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 12px;
}

.inventory-browse-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 10px;
  border: 2px solid #cfead6;
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-family: var(--font);
  color: var(--brown-dark);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.inventory-browse-btn:hover {
  transform: translateY(-1px);
  border-color: var(--green);
}

.inventory-browse-btn.active {
  border-color: var(--green);
  background: #f0fff4;
}

.inventory-browse-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.inventory-browse-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}

.inventory-browse-count {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--green);
}

.inventory-item-list-grid {
  margin-top: 4px;
}

.inventory-item-effects {
  margin: 2px 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--brown-mid);
  text-align: center;
}

.equipped-cosmetics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.equipped-cosmetic-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  background: #fffaf0;
  border: 1px solid var(--gold-light);
  border-radius: 10px;
  text-align: center;
}

.equipped-cosmetic-name {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.equipped-cosmetic-effects {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--brown-mid);
  text-align: center;
}

.show-bow-equipped {
  color: #6b46c1;
  font-weight: 700;
}

.show-bow-hint {
  font-size: 0.8rem;
  opacity: 0.85;
}

.inventory-item-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
}

.shop-item-emoji {
  font-size: 1.8rem;
}

.shop-item-info {
  flex: 1;
}

.shop-item-info p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.shop-item-cost {
  font-size: 0.85rem;
  font-weight: 700;
  color: #c05621;
}

.shop-owned {
  font-size: 0.8rem;
  color: #38a169;
  margin-top: 4px !important;
}

.shop-use-heading {
  margin: 16px 0 8px;
  font-size: 0.95rem;
}

.shop-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.shop-picker-hint {
  margin-bottom: 14px;
}

.shop-bucks-line {
  margin-bottom: 8px !important;
}

.shop-category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}

@media (min-width: 480px) {
  .shop-category-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.shop-category-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: white;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.shop-category-card:hover,
.shop-category-card:focus-visible {
  border-color: var(--orange);
  box-shadow: var(--shadow);
}

.shop-category-card-emoji {
  font-size: 1.75rem;
  line-height: 1;
}

.shop-category-card-label {
  font-size: 1rem;
  font-weight: 800;
  color: var(--brown-dark);
}

.shop-category-card-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--orange);
}

.shop-category-card-hint {
  font-size: 0.8rem;
  color: var(--brown-mid);
  line-height: 1.35;
}

.shop-cat-owned {
  font-size: 0.75rem;
  font-weight: 700;
  color: #38a169;
  margin-top: 2px;
}

.shop-category-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.shop-bucks-inline {
  font-size: 0.9rem;
  color: var(--brown-mid);
}

.shop-category-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.shop-category-list {
  max-height: 50vh;
  overflow-y: auto;
  margin: 0;
  padding-right: 4px;
}

.shop-catalog {
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
}

.shop-category {
  margin-bottom: 20px;
}

.shop-category-heading {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--brown-mid);
  border-bottom: 2px solid var(--cream-dark);
  padding-bottom: 6px;
}

.shop-rarity {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 4px;
  vertical-align: middle;
}

.shop-rarity-uncommon { background: #e8f4ea; color: #276749; }
.shop-rarity-rare { background: #dbeafe; color: #1e40af; }
.shop-rarity-epic { background: #f3e8ff; color: #6b21a8; }
.shop-rarity-legendary {
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  color: #78350f;
}

.shop-rarity-trophy {
  background: linear-gradient(135deg, #fdebd0, #e67e22);
  color: #5c3d1e;
}

.shop-rarity-ultimate {
  background: linear-gradient(135deg, #e8d5f5, #8e44ad);
  color: #4a235a;
}

.shop-bonus-line {
  font-size: 0.78rem;
  color: #2f855a;
  margin: 4px 0 0 !important;
  font-weight: 600;
}

.shop-item-legendary {
  border: 2px solid #f59e0b;
  background: linear-gradient(135deg, #fffef8 0%, #fff7e6 100%);
}

.shop-item-epic {
  border-left: 3px solid #9333ea;
}

.shop-applied {
  color: #c05621 !important;
}

.btn-use-item {
  margin: 4px 6px 4px 0;
}

.action-cost {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #c05621;
  margin-left: 6px;
}

.action-cost.free {
  color: #38a169;
}

.action-screen-note {
  font-size: 0.88rem;
  padding: 10px 12px;
  background: #ebf8ff;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.fetch-game {
  text-align: center;
  padding: 8px 0;
}

.fetch-game-hint {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.fetch-game-field {
  position: relative;
  height: 160px;
  background: linear-gradient(180deg, #87ceeb 0%, #90ee90 70%);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  cursor: pointer;
}

.fetch-sweet-zone {
  position: absolute;
  left: 38%;
  width: 20%;
  top: 0;
  bottom: 0;
  background: rgba(72, 187, 120, 0.35);
  border-left: 2px dashed #38a169;
  border-right: 2px dashed #38a169;
}

.fetch-ball {
  position: absolute;
  transform: translate(-50%, -50%);
  transition: none;
  pointer-events: none;
  line-height: 0;
}

/* Rubber squeaky toy face (Gentle Fetch) */
.squeaky-toy {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff59d 0%, #fdd835 45%, #f9a825 100%);
  box-shadow:
    inset -4px -6px 10px rgba(0, 0, 0, 0.12),
    inset 3px 3px 8px rgba(255, 255, 255, 0.45),
    0 3px 8px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.squeaky-toy-sm {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 6px;
}

.squeaky-toy-md {
  width: 44px;
  height: 44px;
}

.squeaky-toy-lg {
  width: 56px;
  height: 56px;
}

.squeaky-eye {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.squeaky-eye::after {
  content: "";
  position: absolute;
  background: #1a1a1a;
  border-radius: 50%;
}

.squeaky-toy-sm .squeaky-eye {
  width: 7px;
  height: 7px;
  top: 7px;
}

.squeaky-toy-sm .squeaky-eye::after {
  width: 3px;
  height: 3px;
  bottom: 1px;
  right: 1px;
}

.squeaky-toy-sm .squeaky-eye-left {
  left: 6px;
}

.squeaky-toy-sm .squeaky-eye-right {
  right: 6px;
}

.squeaky-toy-md .squeaky-eye,
.squeaky-toy-lg .squeaky-eye {
  width: 11px;
  height: 11px;
  top: 13px;
}

.squeaky-toy-md .squeaky-eye::after,
.squeaky-toy-lg .squeaky-eye::after {
  width: 5px;
  height: 5px;
  bottom: 2px;
  right: 2px;
}

.squeaky-toy-md .squeaky-eye-left {
  left: 10px;
}

.squeaky-toy-md .squeaky-eye-right {
  right: 10px;
}

.squeaky-toy-lg .squeaky-eye-left {
  left: 12px;
}

.squeaky-toy-lg .squeaky-eye-right {
  right: 12px;
}

.squeaky-mouth {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  border-radius: 0 0 50% 50%;
}

.squeaky-tongue {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #ff6b8a;
  border-radius: 0 0 50% 50%;
}

.squeaky-toy-sm .squeaky-mouth {
  width: 12px;
  height: 8px;
  bottom: 5px;
}

.squeaky-toy-sm .squeaky-tongue {
  width: 6px;
  height: 7px;
  bottom: 2px;
}

.squeaky-toy-md .squeaky-mouth {
  width: 20px;
  height: 12px;
  bottom: 9px;
}

.squeaky-toy-md .squeaky-tongue {
  width: 9px;
  height: 10px;
  bottom: 4px;
}

.squeaky-toy-lg .squeaky-mouth {
  width: 24px;
  height: 14px;
  bottom: 11px;
}

.squeaky-toy-lg .squeaky-tongue {
  width: 11px;
  height: 12px;
  bottom: 5px;
}

.action-emoji .squeaky-toy-md {
  display: block;
  margin: 0 auto 4px;
}

#modal-title .squeaky-toy-sm {
  display: inline-block;
  vertical-align: -6px;
  margin-right: 2px;
}

#modal-title .modal-title-text {
  vertical-align: middle;
}

.fetch-game-status {
  font-weight: 600;
  margin-bottom: 10px;
  min-height: 1.4em;
}

.fetch-tap-btn {
  min-width: 140px;
}

.fetch-result-perfect {
  filter: drop-shadow(0 0 8px gold);
}

.fetch-result-miss {
  opacity: 0.5;
}

.equipped-cosmetic-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fff8e7;
  border: 2px solid #f0d9a8;
  border-radius: var(--radius-sm);
}

.equipped-cosmetic-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.equipped-cosmetic-emoji {
  font-size: 1.4rem;
}

.show-bow-equipped-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.show-bow-equipped-row .show-bow-equipped {
  margin: 0;
  flex: 1;
  min-width: 140px;
}

.inventory-use-label,
.inventory-empty-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.tug-game {
  text-align: center;
  padding: 8px 0;
}

.tug-game-hint {
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.tug-rope-track {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.tug-end {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.tug-rope-bar {
  position: relative;
  flex: 1;
  height: 12px;
  background: linear-gradient(90deg, #9ae6b4, #e2e8f0, #feb2b2);
  border-radius: 6px;
  overflow: visible;
}

.tug-rope-knot {
  position: absolute;
  top: 50%;
  left: 42%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  line-height: 1;
  transition: left 0.05s linear;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.tug-meter-track {
  height: 10px;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.tug-meter-fill {
  height: 100%;
  width: 42%;
  background: linear-gradient(90deg, #ecc94b, #48bb78);
  border-radius: 5px;
  transition: width 0.05s linear;
}

.tug-game-status {
  font-weight: 600;
  margin-bottom: 12px;
  min-height: 1.4em;
  font-size: 0.88rem;
}

.tug-pull-btn {
  min-width: 140px;
}

.tug-result-win .tug-rope-knot {
  filter: drop-shadow(0 0 8px gold);
}

.tug-result-win .tug-meter-fill {
  background: linear-gradient(90deg, #48bb78, #38a169);
}

.walk-game {
  text-align: center;
  padding: 8px 0;
}

.walk-game-hint {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.walk-scene {
  position: relative;
  height: 120px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #bee3f8 0%, #c6f6d5 55%, #9ae6b4 100%);
  overflow: hidden;
}

.walk-path {
  position: absolute;
  bottom: 18px;
  left: 6%;
  right: 6%;
  height: 28px;
  background: #a0aec0;
  border-radius: 6px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.walk-pup {
  position: absolute;
  bottom: 38px;
  left: 12%;
  font-size: 2rem;
  line-height: 1;
  transition: left 0.35s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  z-index: 2;
}

.walk-event-bubble {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 2px solid var(--gold-light);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  min-width: 160px;
  box-shadow: var(--shadow);
  z-index: 3;
}

.walk-event-bubble.walk-event-ok {
  border-color: #48bb78;
  background: #f0fff4;
}

.walk-event-bubble.walk-event-miss {
  border-color: #fc8181;
  background: #fff5f5;
}

.walk-event-emoji {
  font-size: 1.6rem;
  display: block;
}

.walk-event-prompt {
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brown-dark);
}

.walk-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.walk-step {
  width: 28px;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
}

.walk-step.done {
  background: #cbd5e0;
}

.walk-step.hit {
  background: #48bb78;
}

.walk-timer-track {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.walk-timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #48bb78, #ecc94b, #fc8181);
  border-radius: 4px;
  transition: width 0.04s linear;
}

.walk-game-status {
  font-weight: 600;
  margin-bottom: 12px;
  min-height: 1.4em;
  font-size: 0.88rem;
}

.walk-action-btn {
  min-width: 150px;
}

.walk-btn-wait {
  background: #e53e3e;
}

.walk-btn-sniff {
  background: #38a169;
}

.walk-btn-easy {
  background: #d69e2e;
}

.walk-btn-step {
  background: #3182ce;
}

.walk-result-perfect .walk-pup {
  filter: drop-shadow(0 0 8px gold);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Sniff & Explore mini-game */
.sniff-game {
  text-align: center;
  padding: 8px 0;
}

.sniff-game-hint {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text-muted, #5a5a5a);
}

.sniff-yard {
  background: linear-gradient(180deg, #c6f6d5 0%, #9ae6b4 100%);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sniff-pup {
  font-size: 2rem;
}

.sniff-clue {
  font-weight: 600;
  margin-bottom: 12px;
  min-height: 1.4em;
  font-size: 0.95rem;
}

.sniff-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.sniff-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 2px solid #cbd5e0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.sniff-choice:hover:not(:disabled) {
  border-color: #68d391;
  transform: translateY(-2px);
}

.sniff-choice:disabled {
  cursor: default;
  opacity: 0.85;
}

.sniff-choice-emoji {
  font-size: 1.75rem;
}

.sniff-choice-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #718096;
}

.sniff-choice-correct {
  border-color: #38a169;
  background: #f0fff4;
}

.sniff-choice-wrong {
  border-color: #e53e3e;
  background: #fff5f5;
}

.sniff-timer-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.sniff-timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #68d391, #38a169);
  border-radius: 4px;
  transition: width 0.04s linear;
}

.sniff-game-status {
  font-weight: 600;
  font-size: 0.88rem;
  min-height: 1.4em;
}

.sniff-result-perfect .sniff-pup {
  filter: drop-shadow(0 0 8px gold);
}

/* Burrow in Blankets mini-game */
.burrow-game {
  text-align: center;
  padding: 8px 0;
}

.burrow-game-hint {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text-muted, #5a5a5a);
}

.burrow-scene {
  margin-bottom: 14px;
}

.burrow-blankets {
  position: relative;
  background: linear-gradient(180deg, #fed7e2 0%, #fbb6ce 50%, #f687b3 100%);
  border-radius: 14px;
  padding: 20px 16px 28px;
  margin-bottom: 14px;
}

.burrow-blanket {
  font-size: 1.5rem;
  line-height: 1;
}

.burrow-cozy-zone {
  position: absolute;
  left: 42%;
  right: 42%;
  top: 38%;
  bottom: 38%;
  border: 2px dashed rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  pointer-events: none;
}

.burrow-pup {
  font-size: 2.25rem;
  margin: 8px 0;
  display: block;
  transition: transform 0.2s;
}

.burrow-warmth-track {
  position: relative;
  height: 28px;
  background: #e2e8f0;
  border-radius: 14px;
  overflow: visible;
}

.burrow-warmth-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #bee3f8, #fc8181, #f6ad55);
  border-radius: 14px;
  transition: none;
}

.burrow-warmth-marker {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.burrow-game-status {
  font-weight: 600;
  margin-bottom: 12px;
  min-height: 1.4em;
  font-size: 0.88rem;
}

.burrow-tap-btn {
  min-width: 140px;
}

.burrow-result-perfect .burrow-pup {
  filter: drop-shadow(0 0 8px gold);
}

/* Friend challenge */
.challenge-invite-panel,
.challenge-pending-banner {
  background: linear-gradient(135deg, #fff8e7 0%, #fdebd0 100%);
  border: 2px solid var(--gold-light);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.challenge-invite-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.challenge-invite-header h3,
.challenge-pending-banner strong {
  margin: 0;
  font-size: 1rem;
}

.challenge-invite-msg,
.challenge-pending-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.challenge-pending-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.challenge-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.challenge-side {
  border: 2px solid #e2d6c8;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
}

.challenge-side-winner {
  border-color: #38a169;
  background: #f0fff4;
}

.challenge-score {
  font-size: 1.5rem;
  font-weight: 800;
  color: #2d3748;
  margin: 6px 0;
  letter-spacing: 0.02em;
}

.challenge-stats {
  font-size: 0.72rem;
  color: #718096;
  margin: 0;
  word-break: break-word;
}

.challenge-outcome {
  font-weight: 700;
  text-align: center;
  margin: 8px 0;
}

.challenge-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.challenge-link-box {
  background: #f7fafc;
  border-radius: 8px;
  padding: 10px;
  font-size: 0.78rem;
  word-break: break-all;
}

.challenge-compare-modal .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* Playful Fight Challenge */
.play-fight-panel,
.play-fight-notify-banner {
  background: linear-gradient(135deg, #fff0f5 0%, #fde8f0 100%);
  border: 2px solid #f5b8cc;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.play-fight-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.play-fight-panel-header h3 {
  margin: 0;
  font-size: 1rem;
}

.play-fight-panel-msg,
.play-fight-limits,
.play-fight-notify-banner p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.45;
}

.play-fight-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.play-fight-result-modal {
  max-height: min(78vh, 640px);
  overflow-y: auto;
}

.play-fight-top-actions {
  margin-top: 0;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8dcc8;
}

.play-fight-top-actions .btn {
  width: 100%;
}

.play-fight-outcome {
  font-weight: 800;
  text-align: center;
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.play-fight-story {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--brown);
  margin: 0 0 14px;
  font-style: italic;
  text-align: center;
}

.pet-profile-view > .pet-profile-friend-actions {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold-light);
}

.pet-profile-view > .pet-profile-friend-actions .profile-friend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.play-fight-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
  max-width: 100%;
}

.play-fight-side {
  border: 2px solid #e2d6c8;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  background: #fff;
  min-width: 0;
}

.play-fight-pup-thumb {
  width: 72px;
  height: 72px;
  margin: 0 auto 6px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--gold-light);
  background: var(--cream);
}

.play-fight-pup-thumb .pet-chip-thumb,
.play-fight-pup-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-fight-side-winner {
  border-color: var(--green);
  background: #f0fff4;
}

.play-fight-vs {
  align-self: center;
  font-weight: 800;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.play-fight-side-name {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.play-fight-score {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 6px 0;
}

.play-fight-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 6px;
}

.play-fight-item-chip {
  font-size: 0.68rem;
  background: #f7fafc;
  border-radius: 999px;
  padding: 2px 6px;
}

.play-fight-items-empty {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.play-fight-stat-tables {
  margin: 12px 0;
}

.play-fight-subhead {
  margin: 8px 0 4px;
  font-size: 0.82rem;
}

.play-fight-stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.play-fight-stat-table th,
.play-fight-stat-table td {
  padding: 4px 6px;
  border-bottom: 1px solid #f0e6d8;
  text-align: center;
}

.play-fight-stat-label {
  text-align: left !important;
  color: var(--text-muted);
}

.play-fight-stat-win {
  font-weight: 800;
  color: var(--green);
}

.play-fight-top-rewards {
  margin: 4px 0 10px;
  font-size: 0.92rem;
}

.play-fight-rewards {
  text-align: center;
  font-weight: 700;
  color: #6b46c1;
  margin: 10px 0;
}

.play-fight-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(55vh, 420px);
  overflow-y: auto;
  margin: 12px 0;
}

.play-fight-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 2px solid #f0e6d8;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.play-fight-history-row:hover {
  border-color: var(--gold);
}

.play-fight-history-result {
  flex: 0 0 44px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.play-fight-history-won { color: var(--green); }
.play-fight-history-lost { color: #c05621; }
.play-fight-history-draw { color: var(--text-muted); }

.play-fight-history-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
}

.play-fight-history-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.play-fight-unclaimed {
  color: #6b46c1;
  font-weight: 700;
}

.play-fight-history-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.play-fight-history-empty {
  text-align: center;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 520px) {
  .play-fight-compare {
    grid-template-columns: 1fr;
  }
  .play-fight-vs {
    text-align: center;
  }
}

/* Care report card */
.reportcard-content {
  padding: 0 4px 24px;
}

.report-card-block {
  background: white;
  border: 2px solid var(--gold-light);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

.report-card-highlight {
  background: linear-gradient(180deg, #fff 0%, #fffaf0 100%);
}

.report-card-block h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.report-week-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.report-grid {
  display: grid;
  gap: 8px;
}

.report-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f0e6d8;
  font-size: 0.9rem;
}

.report-stat-row:last-child {
  border-bottom: none;
}

.report-delta {
  margin-left: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.report-delta.up {
  color: #38a169;
}

.report-delta.down {
  color: #e53e3e;
}

.report-trend {
  font-size: 0.85rem;
  margin: 12px 0 0;
  padding: 10px;
  border-radius: 8px;
}

.report-trend.warn {
  background: #fffaf0;
  border: 1px solid #f6e05e;
}

.report-trend.good {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
}

.report-best-pup {
  margin: 10px 0 0;
  font-size: 0.9rem;
}

.report-card-tip {
  background: #ebf8ff;
  border-color: #90cdf4;
}

.report-card-tip p {
  margin: 0;
  font-size: 0.85rem;
}

.report-card-traits {
  border-color: #d4a574;
  background: linear-gradient(180deg, #fff 0%, #fff5eb 100%);
}

/* Puppy traits (innate stats) */
.puppy-traits-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.puppy-traits-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.puppy-traits-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.puppy-traits-sub {
  font-weight: 600;
  color: var(--brown-mid);
}

.puppy-trait-score {
  font-size: 0.9rem;
  color: var(--brown-mid);
}

/* Power Level */
.power-level-hero {
  background: linear-gradient(135deg, #fffbeb 0%, #fde68a 45%, #fbbf24 100%);
  border: 3px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 18px 20px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}

.power-level-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.power-level-hero-eyebrow {
  margin: 0 0 4px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #92400e;
}

.power-level-hero-value {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  color: #78350f;
  letter-spacing: -0.02em;
}

.power-level-hero-meta {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: #92400e;
}

.power-level-hero-ring {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  border: 3px solid rgba(146, 64, 14, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.power-level-hero-pct {
  font-size: 1.1rem;
  font-weight: 800;
  color: #78350f;
}

.power-level-hero-bar {
  height: 14px;
  margin-bottom: 10px;
}

.power-level-hero-breakdown {
  margin: 0;
  font-size: 0.82rem;
  color: #92400e;
  line-height: 1.45;
}

.power-level-dashboard {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 10px 12px;
  margin: 10px 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #fbbf24;
}

.power-level-dashboard-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #92400e;
}

.power-level-dashboard-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: #78350f;
}

.power-level-dashboard-hint {
  font-size: 0.72rem;
  color: #b45309;
  width: 100%;
}

.care-points-dashboard {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 10px 12px;
  margin: 0 0 10px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #60a5fa;
}

.care-points-dashboard-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1e40af;
}

.care-points-dashboard-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: #1e3a8a;
}

.care-points-dashboard-hint {
  font-size: 0.72rem;
  color: #2563eb;
  width: 100%;
}

.dashboard-power-level-host:empty {
  display: none;
}

.power-level-panel {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 2px solid #fbbf24;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}

.power-level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.power-level-header h3 {
  margin: 0;
  font-size: 1rem;
}

.power-level-value {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.power-level-bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.power-level-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.power-level-breakdown {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.power-level-badge,
.power-level-inline {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.power-level-low .power-level-bar-fill,
.power-level-low.power-level-value {
  background: linear-gradient(90deg, #94a3b8, #64748b);
  color: #475569;
}

.power-level-mid .power-level-bar-fill,
.power-level-mid.power-level-value {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  color: #b45309;
}

.power-level-strong .power-level-bar-fill,
.power-level-strong.power-level-value {
  background: linear-gradient(90deg, #34d399, #10b981);
  color: #047857;
}

.power-level-elite .power-level-bar-fill,
.power-level-elite.power-level-value {
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
  color: #1d4ed8;
}

.power-level-ultimate .power-level-bar-fill,
.power-level-ultimate.power-level-value {
  background: linear-gradient(90deg, #c084fc, #a855f7);
  color: #7e22ce;
}

.power-level-low.power-level-badge,
.power-level-low.power-level-inline {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.power-level-mid.power-level-badge,
.power-level-mid.power-level-inline {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #b45309;
}

.power-level-strong.power-level-badge,
.power-level-strong.power-level-inline {
  background: #d1fae5;
  border-color: #6ee7b7;
  color: #047857;
}

.power-level-elite.power-level-badge,
.power-level-elite.power-level-inline {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.power-level-ultimate.power-level-badge,
.power-level-ultimate.power-level-inline {
  background: #f3e8ff;
  border-color: #d8b4fe;
  color: #7e22ce;
}

.pet-profile-power {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--brown-mid);
}

.puppy-traits-intro {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.puppy-traits-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.puppy-trait-row {
  display: grid;
  grid-template-columns: 110px 1fr 36px;
  align-items: center;
  gap: 8px;
}

.puppy-trait-row-compact {
  grid-template-columns: 100px 1fr 32px;
}

.puppy-trait-label {
  font-size: 0.82rem;
  font-weight: 600;
}

.puppy-trait-track {
  height: 10px;
  background: #efe6d8;
  border-radius: 999px;
  overflow: hidden;
}

.puppy-trait-fill {
  height: 100%;
  border-radius: 999px;
}

.puppy-trait-fill.good { background: linear-gradient(90deg, #68d391, #38a169); }
.puppy-trait-fill.mid { background: linear-gradient(90deg, #f6e05e, #d69e2e); }
.puppy-trait-fill.low { background: linear-gradient(90deg, #fc8181, #e53e3e); }

.puppy-trait-value {
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

.show-care-readiness {
  margin-top: 10px;
  font-size: 0.85rem;
}

.show-care-bar-track {
  height: 8px;
  margin-top: 4px;
  opacity: 0.85;
}

/* Install / Add to Home Screen */
.install-app-host,
.install-app-dashboard,
.install-app-settings {
  margin-top: 14px;
}

.install-app-panel {
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--gold-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: left;
}

.install-app-panel h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.install-app-panel p {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: var(--brown-mid);
  line-height: 1.45;
}

.install-app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.install-steps {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: var(--brown-mid);
  line-height: 1.5;
}

.install-manual-hint {
  margin-top: 10px !important;
  font-size: 0.82rem !important;
}

.install-app-hint-android {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--brown-mid);
}

.install-app-android .install-app-actions {
  margin-bottom: 8px;
}

.install-app-installed p {
  margin: 0;
  text-align: center;
}

.install-app-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #fff8e7, #ffe8c8);
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.install-app-banner p {
  flex: 1;
  margin: 0;
}

.install-banner-dismiss {
  padding: 4px 8px;
  min-width: auto;
}

@media (max-width: 400px) {
  .challenge-compare {
    grid-template-columns: 1fr;
  }

  .nav-label {
    font-size: 0.55rem;
  }
}

/* Friends */
.friends-panel,
.friends-modal {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #7dd3fc;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.friends-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.friends-panel-header h3 {
  margin: 0;
  font-size: 1rem;
}

.friends-badge {
  background: var(--danger, #e74c3c);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.friends-panel-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.friends-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Find friends (leaderboard search) */
.leaderboard-find-friends {
  margin-bottom: 14px;
}

.find-friends-panel {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.find-friends-panel h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.find-friends-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.find-friends-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.find-friends-input {
  flex: 1 1 180px;
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid #86efac;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.find-friends-results {
  min-height: 2rem;
  overflow: hidden;
}

.find-friends-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.find-friends-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.find-friend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-sm);
  border: 1px solid #bbf7d0;
}

.find-friend-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 160px;
}

.find-friend-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #bbf7d0;
  background: #fff;
}

.find-friend-thumb .pet-chip-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 30%;
}

.find-friend-info {
  min-width: 0;
}

.find-friend-name {
  display: block;
  font-size: 0.95rem;
}

.find-friend-pet {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.find-friend-pet-muted {
  font-style: italic;
}

.find-friend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.friends-inline-alert {
  font-size: 0.82rem;
  margin: 10px 0 0;
  color: var(--text-muted);
}

.friends-modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.friends-tab {
  flex: 1;
  border: 1px solid #bae6fd;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}

.friends-tab.active {
  background: #0ea5e9;
  color: #fff;
  border-color: #0ea5e9;
}

.friends-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.friends-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.friends-row-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.friends-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.friends-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 8px 0;
}

.friends-subheading {
  margin: 12px 0 6px;
  font-size: 0.9rem;
}

.profile-friend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.friend-status-pill {
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
}

.friend-status-pill-ok {
  background: #dcfce7;
  color: #166534;
}

.gift-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.gift-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  border: 2px solid var(--border, #e2e8f0);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}

.gift-picker-item:hover {
  border-color: #0ea5e9;
}

.playdate-story {
  font-size: 1rem;
  line-height: 1.5;
  margin: 12px 0;
}

.playdate-rewards {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.friend-challenge-banner {
  margin-bottom: 12px;
}

.dashboard-side-block.friends-panel-host {
  grid-column: 1 / -1;
}

/* Item tooltips (shop, inventory, achievements, gifts) */
[data-item-id] {
  cursor: help;
}

.item-tooltip-host {
  cursor: help;
}

.btn-use-item,
.btn-buy-item,
.gift-picker-item,
.inventory-item-btn {
  cursor: pointer;
}

.ach-reward-hint.item-tooltip-host {
  display: inline-block;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.item-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: min(320px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid var(--gold);
  box-shadow: 0 10px 32px rgba(92, 61, 30, 0.22);
  pointer-events: none;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--brown-dark);
}

.item-tooltip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.item-tooltip-emoji {
  font-size: 1.25rem;
}

.item-tooltip-title {
  font-size: 0.95rem;
  color: var(--brown-dark);
}

.item-tooltip-desc {
  margin: 0 0 6px;
  color: var(--brown-mid);
}

.item-tooltip-tip {
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: var(--brown-light);
  font-style: italic;
}

.item-tooltip-note {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange);
}

.item-tooltip-bonus {
  margin: 6px 0 0;
  padding-left: 1.1rem;
  color: var(--brown-mid);
  font-size: 0.78rem;
}

.item-tooltip-bonus li {
  margin-bottom: 3px;
}

.item-tooltip-cost {
  margin: 8px 0 0;
  font-weight: 800;
  color: var(--brown-dark);
  font-size: 0.8rem;
}
