:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-soft: #eef5ef;
  --ink: #17211b;
  --muted: #66726b;
  --line: #dbe4dc;
  --green: #2f9b66;
  --green-dark: #167348;
  --mint: #bfead2;
  --sun: #f6c453;
  --coral: #ef7b63;
  --blue: #477de5;
  --shadow: 0 18px 50px rgba(31, 56, 42, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(244, 247, 245, 0.96), rgba(233, 241, 235, 0.92)),
    url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23cbdccf' stroke-width='1'%3E%3Cpath d='M0 80h160M80 0v160'/%3E%3Ccircle cx='80' cy='80' r='36'/%3E%3C/g%3E%3C/svg%3E");
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  box-shadow: 0 10px 24px rgba(47, 155, 102, 0.25);
}

.brand-mark svg,
.nav-item svg,
.icon-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.brand strong,
.brand span,
.user-chip span,
.stat-card span,
.stat-card small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand span,
.user-chip span,
small {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #506057;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--surface-soft);
  color: var(--green-dark);
}

.nav-item.active {
  background: #e1f3e8;
  color: var(--green-dark);
  font-weight: 700;
}

.guard-card {
  margin-top: auto;
  padding: 16px;
  border-radius: var(--radius);
  background: #173321;
  color: white;
}

.guard-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.main {
  padding: 28px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.eyebrow {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(31, 56, 42, 0.08);
}

.pet-chip {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: #fffaf0;
  cursor: pointer;
}

.pet-chip strong,
.pet-chip span {
  display: block;
  text-align: left;
}

.pet-chip span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.pet-mini {
  position: relative;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 46% 46% 44% 44%;
  background:
    radial-gradient(circle at 35% 44%, #17211b 0 2px, transparent 3px),
    radial-gradient(circle at 65% 44%, #17211b 0 2px, transparent 3px),
    radial-gradient(circle at 50% 58%, #ef7b63 0 3px, transparent 4px),
    linear-gradient(145deg, #ffe1a1, #f4b45f);
  box-shadow:
    inset 0 -5px 0 rgba(154, 99, 32, 0.1),
    0 0 0 3px #fff7de;
}

.pet-mini::before,
.pet-mini::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 13px;
  height: 13px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: #f4b45f;
}

.pet-mini::before {
  left: 2px;
  transform: rotate(-28deg);
}

.pet-mini::after {
  right: 2px;
  transform: rotate(28deg);
}

.pet-mini.ready-evolve {
  box-shadow:
    inset 0 -5px 0 rgba(154, 99, 32, 0.1),
    0 0 0 3px #fff7de,
    0 0 0 7px rgba(246, 196, 83, 0.2);
}

.pet-mini.stage-2 {
  background:
    radial-gradient(circle at 35% 44%, #17211b 0 2px, transparent 3px),
    radial-gradient(circle at 65% 44%, #17211b 0 2px, transparent 3px),
    radial-gradient(circle at 50% 58%, #ef7b63 0 3px, transparent 4px),
    linear-gradient(145deg, #ffd886, #f2a64f);
}

.pet-mini.stage-3 {
  background:
    radial-gradient(circle at 35% 44%, #17211b 0 2px, transparent 3px),
    radial-gradient(circle at 65% 44%, #17211b 0 2px, transparent 3px),
    radial-gradient(circle at 50% 58%, #ef7b63 0 3px, transparent 4px),
    linear-gradient(145deg, #ffd886, #7ccf9a);
}

.pet-mini.stage-4 {
  background:
    radial-gradient(circle at 35% 44%, #17211b 0 2px, transparent 3px),
    radial-gradient(circle at 65% 44%, #17211b 0 2px, transparent 3px),
    radial-gradient(circle at 50% 58%, #ef7b63 0 3px, transparent 4px),
    linear-gradient(145deg, #ffe3a4, #477de5);
}

.avatar,
.profile-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-panel,
.panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 22px;
  padding: 24px;
  overflow: hidden;
}

.hero-copy {
  min-width: 0;
  align-self: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #def3e7;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h2 {
  margin: 18px 0 10px;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.02;
  max-width: 760px;
}

.hero-copy p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.primary-action,
.ghost-action,
.segment,
.icon-button {
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  min-height: 40px;
}

.primary-action {
  padding: 0 16px;
  color: white;
  background: var(--green);
  font-weight: 800;
}

.primary-action:hover {
  background: var(--green-dark);
}

.primary-action.is-secondary {
  color: var(--green-dark);
  background: #e8f5ed;
}

.primary-action.small {
  min-height: 36px;
}

.ghost-action {
  padding: 0 16px;
  color: var(--green-dark);
  background: #e8f5ed;
  font-weight: 800;
}

.campus-card {
  min-height: 330px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(23, 51, 33, 0.92), rgba(39, 89, 59, 0.84)),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 480 360' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 260 C120 180 130 90 230 130 S360 240 460 120' fill='none' stroke='%23ffffff' stroke-opacity='.16' stroke-width='18'/%3E%3Cpath d='M60 80h80v70H60zM330 65h95v95h-95zM220 220h150v80H220z' fill='%23ffffff' fill-opacity='.08'/%3E%3C/svg%3E");
  color: white;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.campus-track {
  display: flex;
  gap: 8px;
}

.track-node {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.track-node.active {
  background: var(--sun);
}

.campus-map {
  position: absolute;
  inset: 62px 18px 74px;
}

.map-place {
  position: absolute;
  min-width: 70px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.dorm { left: 10px; top: 44px; }
.library { right: 8px; top: 10px; }
.field { left: 40%; bottom: 8px; }

.runner-dot {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  left: 38%;
  top: 42%;
  background: var(--sun);
  border: 4px solid white;
  box-shadow: 0 0 0 12px rgba(246, 196, 83, 0.18);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  50% { transform: scale(1.08); }
}

.mini-report {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.mini-report span {
  color: rgba(255, 255, 255, 0.78);
}

.summary-grid,
.content-grid,
.page-grid,
.team-layout,
.challenge-grid,
.growth-grid,
.metrics-grid {
  display: grid;
  gap: 18px;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
}

.pet-home-panel {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(246, 196, 83, 0.18), rgba(71, 125, 229, 0.08)),
    #ffffff;
}

.pet-scene {
  display: grid;
  place-items: center;
}

.pet-mascot {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  border-radius: 48% 48% 43% 43%;
  background:
    radial-gradient(circle at 50% 78%, rgba(255, 245, 218, 0.92) 0 17%, transparent 18%),
    radial-gradient(circle at 33% 28%, rgba(255, 255, 255, 0.46), transparent 18%),
    linear-gradient(145deg, #ffe0a1 0%, #f5b866 62%, #e69544 100%);
  box-shadow:
    inset 0 -11px 0 rgba(132, 81, 33, 0.1),
    0 18px 34px rgba(154, 99, 32, 0.18);
  transform-origin: 50% 88%;
  animation: petIdle 3.2s ease-in-out infinite;
}

.pet-mascot.large { width: 52px; height: 56px; }
.pet-mascot.medium { width: 72px; height: 76px; margin: 0 auto 12px; }
.pet-mascot.small { width: 52px; height: 56px; }

.pet-mascot::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 11%;
  z-index: -1;
  width: 46%;
  height: 42%;
  transform: translateX(-50%);
  border-radius: 48% 48% 42% 42%;
  background:
    radial-gradient(circle at 48% 28%, rgba(255, 255, 255, 0.9), transparent 24%),
    linear-gradient(180deg, #ffe8bc, #f4b45f);
}

.pet-mascot::after {
  content: "";
  position: absolute;
  right: -14%;
  bottom: 16%;
  z-index: -1;
  width: 38%;
  height: 18%;
  border-radius: 999px;
  border: 9px solid #f4b45f;
  border-left: 0;
  border-bottom-color: transparent;
  transform: rotate(-18deg);
}

.pet-ear {
  position: absolute;
  top: -14%;
  width: 31%;
  height: 34%;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background:
    radial-gradient(circle at 50% 68%, #ffd6c5 0 22%, transparent 23%),
    linear-gradient(145deg, #f7c276, #e89a46);
}

.pet-ear.left {
  left: 12%;
  transform: rotate(-22deg);
}

.pet-ear.right {
  right: 12%;
  transform: rotate(22deg);
}

.pet-face {
  position: relative;
  width: 58%;
  height: 45%;
  display: block;
  margin-top: 10px;
}

.pet-face i {
  position: absolute;
  top: 8px;
  width: 7px;
  height: 10px;
  border-radius: 50%;
  background: #17211b;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.pet-face i:first-child { left: 8px; }
.pet-face i:nth-child(2) { right: 8px; }

.pet-face::before,
.pet-face::after {
  content: "";
  position: absolute;
  top: 26px;
  width: 22px;
  height: 10px;
  border-top: 2px solid rgba(23, 33, 27, 0.58);
  border-bottom: 2px solid rgba(23, 33, 27, 0.42);
}

.pet-face::before {
  left: -14px;
  transform: rotate(8deg);
}

.pet-face::after {
  right: -14px;
  transform: rotate(-8deg);
}

.pet-face b {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 16px;
  height: 8px;
  transform: translateX(-50%);
  border-bottom: 3px solid #17211b;
  border-radius: 0 0 999px 999px;
}

.pet-face b::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 9px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 50% 50% 55% 55%;
  background: #ef7b63;
}

.pet-mascot.stage-2 {
  background:
    radial-gradient(circle at 50% 78%, rgba(255, 245, 218, 0.94) 0 17%, transparent 18%),
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.5), transparent 18%),
    linear-gradient(145deg, #ffd886 0%, #f2a64f 58%, #d9873e 100%);
}

.pet-mascot.stage-3 {
  background:
    radial-gradient(circle at 50% 78%, rgba(255, 245, 218, 0.94) 0 17%, transparent 18%),
    linear-gradient(145deg, #ffd886 0%, #f2a64f 48%, #7ccf9a 100%);
}

.pet-mascot.stage-4 {
  background:
    radial-gradient(circle at 50% 78%, rgba(255, 245, 218, 0.94) 0 17%, transparent 18%),
    linear-gradient(145deg, #ffe3a4 0%, #7ccf9a 52%, #477de5 100%);
}

.pet-mascot.ready-evolve {
  box-shadow:
    inset 0 -11px 0 rgba(132, 81, 33, 0.1),
    0 18px 34px rgba(154, 99, 32, 0.18),
    0 0 0 8px rgba(246, 196, 83, 0.16),
    0 0 26px rgba(246, 196, 83, 0.48);
}

.pet-mascot.is-fed { animation: petFeed 0.7s ease both; }
.pet-mascot.is-patted { animation: petPat 0.7s ease both; }
.pet-mascot.is-playing { animation: petPlay 0.8s ease both; }
.pet-mascot.is-evolved { animation: petEvolve 0.9s ease both; }

@keyframes petIdle {
  50% { transform: translateY(-3px) rotate(1deg); }
}

@keyframes petFeed {
  35% { transform: translateY(-7px) scale(1.08); }
  70% { transform: translateY(1px) scale(0.98); }
}

@keyframes petPat {
  35% { transform: rotate(-7deg) translateY(2px); }
  70% { transform: rotate(6deg) translateY(0); }
}

@keyframes petPlay {
  25% { transform: translateX(-8px) rotate(-8deg); }
  60% { transform: translateX(8px) rotate(8deg); }
}

@keyframes petEvolve {
  20% { transform: scale(0.92); filter: brightness(1); }
  55% { transform: scale(1.18); filter: brightness(1.35); }
  100% { transform: scale(1); filter: brightness(1); }
}

.pet-shadow {
  width: 72px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: rgba(23, 33, 27, 0.12);
}

.pet-home-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.pet-home-copy h3,
.pet-home-copy p {
  margin: 0;
}

.pet-home-copy p {
  color: var(--muted);
  line-height: 1.55;
}

.pet-bars {
  display: grid;
  gap: 8px;
}

.pet-bars div {
  display: grid;
  grid-template-columns: 44px 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pet-bars b {
  color: var(--green-dark);
}

.pet-bars i {
  height: 9px;
  border-radius: 999px;
  background: #e0e9e3;
  overflow: hidden;
}

.pet-bars em {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sun), var(--green));
}

.pet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 30px;
}

.two-col,
.team-layout,
.growth-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.page-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.panel {
  padding: 20px;
}

.panel.wide {
  min-width: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h3 {
  margin: 4px 0 0;
  font-size: 22px;
}

.icon-button {
  width: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: #eaf5ee;
}

.task-stack,
.task-board,
.logic-list,
.mvp-list,
.reward-list,
.leaderboard,
.member-grid,
.badge-grid,
.calendar {
  display: grid;
  gap: 12px;
}

.task-board {
  grid-template-columns: 1fr;
}

.task-filter-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 4px 2px;
  color: var(--muted);
  font-size: 13px;
}

.task-filter-state span,
.task-filter-state small {
  display: block;
}

.task-filter-state b {
  color: var(--green-dark);
}

.task-filter-state small {
  text-align: right;
  line-height: 1.35;
}

.task-group {
  display: grid;
  gap: 12px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.task-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.task-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-group-heading h4 {
  margin: 3px 0 0;
  font-size: 18px;
}

.task-group-heading small {
  flex: 0 0 auto;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #e1f3e8;
  font-weight: 800;
}

.task-group > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.task-card,
.logic-list div,
.mvp-list div,
.reward-list div,
.leaderboard div,
.member-card,
.badge-card,
.metrics-grid article,
.challenge-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfb;
}

.task-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.pet-task-card {
  display: grid;
  gap: 8px;
  place-items: center;
  text-align: center;
  padding: 16px;
  border: 1px solid rgba(246, 196, 83, 0.52);
  border-radius: var(--radius);
  background: #fffaf0;
}

.pet-task-card strong {
  font-size: 22px;
}

.pet-task-card span {
  color: var(--muted);
  line-height: 1.45;
}

.task-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-title {
  margin: 0;
  font-size: 18px;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.tag {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf4ef;
  color: #526259;
  font-weight: 700;
}

.task-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--green-dark);
  font-weight: 800;
  cursor: pointer;
}

.task-button.done {
  color: #7d877f;
  background: #eef2ef;
}

.logic-list div {
  padding: 14px;
  display: grid;
  gap: 4px;
}

.logic-list span {
  color: var(--muted);
  line-height: 1.55;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: #edf3ee;
  border-radius: var(--radius);
}

.segment {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.segment.active {
  color: var(--green-dark);
  background: white;
  font-weight: 800;
}

.segment-count {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #6b7770;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
}

.segment.active .segment-count {
  color: white;
  background: var(--green);
}

.mvp-list div,
.reward-list div,
.leaderboard div {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mvp-list b,
.leaderboard span {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e1f3e8;
  color: var(--green-dark);
}

.team-panel {
  min-height: 360px;
}

.progress-wrap {
  padding: 16px;
  background: #f1f7f2;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.progress-bar {
  height: 12px;
  border-radius: 999px;
  background: #dfe9e2;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--sun));
  transition: width 0.35s ease;
}

.member-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-card {
  padding: 14px;
}

.member-card strong,
.member-card span {
  display: block;
}

.member-card span {
  margin-top: 6px;
  color: var(--muted);
}

.leaderboard em {
  margin-left: auto;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.challenge-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.challenge-card {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.challenge-card span {
  color: var(--muted);
  line-height: 1.55;
}

.challenge-card small {
  color: var(--green-dark);
  font-weight: 800;
}

.challenge-action,
.reward-action {
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--green);
  font-weight: 800;
  cursor: pointer;
}

.challenge-action.joined,
.reward-action.locked {
  color: var(--green-dark);
  background: #e8f5ed;
}

.reward-action.claimed,
.reward-action:disabled {
  color: #6f7b72;
  background: #edf3ef;
  cursor: default;
}

.badge-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.badge-card {
  padding: 16px;
  display: grid;
  gap: 8px;
  min-height: 130px;
  position: relative;
}

.badge-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-weight: 900;
}

.badge-card.locked {
  opacity: 0.58;
}

.badge-card.locked .badge-icon {
  background: #9ca8a0;
}

.badge-copy {
  display: grid;
  gap: 4px;
}

.badge-copy span {
  color: var(--muted);
  line-height: 1.45;
}

.rarity {
  justify-self: start;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #e1f3e8;
  font-size: 11px;
  font-weight: 900;
}

.rarity.rare {
  color: #9a6514;
  background: #fff0c9;
}

.rarity.limited {
  color: #3f65b6;
  background: #e5edff;
}

.reward-hero {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(47, 155, 102, 0.12), rgba(246, 196, 83, 0.13)),
    #ffffff;
}

.pet-reward-panel {
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(246, 196, 83, 0.14), rgba(47, 155, 102, 0.1)),
    #ffffff;
}

.pet-reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.pet-reward-row b {
  flex: 0 0 auto;
  color: var(--green-dark);
}

.reward-hero h2 {
  margin: 6px 0 8px;
  font-size: 24px;
  line-height: 1.15;
}

.reward-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.reward-hero p b {
  color: var(--ink);
}

.reward-orb {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 16px 34px rgba(47, 155, 102, 0.22);
}

.reward-orb strong,
.reward-orb span {
  display: block;
}

.reward-orb strong {
  font-size: 24px;
}

.reward-orb span {
  font-size: 11px;
  opacity: 0.86;
}

.next-reward-card {
  margin-bottom: 12px;
}

.next-reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.next-reward-row b,
.next-reward-row span {
  display: block;
}

.next-reward-row span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.ghost-action.compact {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.next-reward-progress {
  margin-top: 12px;
}

.reward-list b {
  flex: 0 0 54px;
  color: var(--green-dark);
}

.reward-list div {
  align-items: stretch;
}

.reward-item {
  border-radius: 16px;
  position: relative;
}

.reward-item.ready {
  border-color: rgba(47, 155, 102, 0.42);
  background: #f4fbf6;
}

.reward-item.claimed {
  opacity: 0.76;
}

.reward-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.reward-main {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}

.reward-main span,
.reward-main small {
  display: block;
}

.reward-main small {
  color: var(--muted);
  line-height: 1.4;
}

.reward-progress {
  height: 6px;
  border-radius: 999px;
  background: #dfe9e2;
  overflow: hidden;
}

.reward-progress em {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--sun));
}

.reward-action {
  align-self: center;
  min-width: 66px;
  padding: 0 10px;
}

.profile-card {
  text-align: center;
}

.growth-grid .wide {
  grid-column: 1 / -1;
}

.pet-profile-card {
  display: grid;
  gap: 10px;
  text-align: center;
  background:
    linear-gradient(180deg, #fffaf0, #ffffff);
}

.pet-profile-card h3,
.pet-profile-card p {
  margin: 0;
}

.pet-profile-card p {
  color: var(--muted);
  line-height: 1.55;
}

.pet-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pet-profile-stats div {
  padding: 10px;
  border-radius: 14px;
  background: #f0f6f2;
}

.pet-profile-stats b,
.pet-profile-stats span {
  display: block;
}

.pet-profile-stats span {
  color: var(--muted);
  font-size: 12px;
}

.profile-avatar {
  width: 78px;
  height: 78px;
  margin: 6px auto 14px;
  font-size: 28px;
}

.profile-card p {
  color: var(--muted);
  line-height: 1.65;
}

.profile-card .progress-bar {
  margin: 18px 0 10px;
}

.metrics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metrics-grid article {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.metrics-grid span {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.metrics-grid b {
  line-height: 1.55;
}

.calendar {
  grid-template-columns: repeat(15, minmax(18px, 1fr));
}

.day {
  aspect-ratio: 1;
  border-radius: 6px;
  background: #e1e8e3;
}

.day.light { background: #c7ead7; }
.day.mid { background: #73c994; }
.day.strong { background: #2f9b66; }
.day.rest { background: #f2d794; }

.today-plan {
  margin-bottom: 12px;
}

.plan-route {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: #f0f6f2;
  overflow: hidden;
}

.plan-route span {
  flex: 0 0 auto;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.plan-route i {
  height: 2px;
  min-width: 22px;
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--sun));
}

.plan-note {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.plan-note b {
  color: var(--ink);
}

.feed-list {
  display: grid;
  gap: 10px;
}

.feed-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdfb;
}

.feed-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--blue));
  font-weight: 900;
}

.feed-item strong,
.feed-item span,
.feed-item small {
  display: block;
}

.feed-item span {
  color: var(--muted);
  line-height: 1.5;
}

.feed-item small {
  margin-top: 4px;
  color: var(--green-dark);
  font-weight: 800;
}

.activity-sheet,
.result-sheet,
.pet-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
}

.activity-sheet.open,
.result-sheet.open,
.pet-sheet.open {
  display: grid;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 21, 19, 0.46);
  backdrop-filter: blur(8px);
}

.sheet-card {
  position: relative;
  width: min(390px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 60px));
  overflow-y: auto;
  padding: 20px;
  border-radius: 26px;
  background: #fbfdfb;
  box-shadow: 0 24px 80px rgba(16, 21, 19, 0.32);
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #edf3ef;
  cursor: pointer;
  font-size: 22px;
}

.sheet-card h2 {
  margin: 6px 36px 8px 0;
  font-size: 24px;
  line-height: 1.18;
}

.sheet-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.live-ring {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  margin: 20px auto 14px;
  border-radius: 50%;
  background:
    conic-gradient(var(--green) var(--progress, 0%), #e3ebe5 0);
}

.live-ring > div {
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: white;
}

.live-ring strong {
  font-size: 36px;
}

.live-ring span {
  color: var(--muted);
  font-size: 13px;
}

.live-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.live-stats div {
  padding: 10px 6px;
  border-radius: 14px;
  background: #f0f6f2;
  text-align: center;
}

.live-stats b,
.live-stats span {
  display: block;
}

.live-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.checkin-field {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.checkin-field textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  color: var(--ink);
  background: white;
  font: inherit;
  line-height: 1.5;
  outline: none;
}

.checkin-field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 155, 102, 0.12);
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  margin-top: 14px;
}

.result-card {
  text-align: center;
}

.result-medal {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin: 4px auto 12px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--blue));
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(47, 155, 102, 0.22);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0 12px;
}

.pet-sheet-card {
  text-align: center;
}

.pet-sheet-card .pet-mascot {
  margin: 8px auto 12px;
}

.pet-speech {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 16px;
  color: #7a5520;
  background: #fff4d8;
  line-height: 1.45;
  font-weight: 800;
}

.pet-sheet-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.pet-sheet-stats div {
  padding: 10px 6px;
  border-radius: 14px;
  background: #f0f6f2;
}

.pet-sheet-stats b,
.pet-sheet-stats span {
  display: block;
}

.pet-sheet-stats span {
  color: var(--muted);
  font-size: 12px;
}

.pet-interactions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.pet-interactions button {
  min-height: 36px;
  border: 0;
  border-radius: 14px;
  color: var(--green-dark);
  background: #e8f5ed;
  font-weight: 900;
  cursor: pointer;
}

.pet-interactions button:last-child {
  color: #7a5520;
  background: #fff0c9;
}

.pet-interactions button:disabled {
  color: #8a968e;
  background: #edf3ef;
  cursor: default;
}

.result-stats div {
  padding: 10px 6px;
  border-radius: 14px;
  background: #f0f6f2;
}

.result-stats b,
.result-stats span {
  display: block;
}

.result-stats span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.result-note {
  padding: 12px;
  border-radius: 14px;
  color: var(--muted);
  background: #fbf4df;
  line-height: 1.5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(16px);
  min-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--radius);
  color: white;
  background: #17211b;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 12px;
  }

  .brand div:last-child,
  .nav-item span,
  .guard-card {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .hero-panel,
  .two-col,
  .page-grid,
  .team-layout,
  .growth-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid,
  .challenge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: auto 12px 12px;
    z-index: 10;
    height: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .brand {
    display: none;
  }

  .nav {
    grid-template-columns: repeat(5, 1fr);
  }

  .main {
    padding: 18px 14px 92px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-panel {
    padding: 18px;
  }

  .campus-card {
    min-height: 260px;
  }

	  .summary-grid,
	  .pet-home-panel,
	  .task-board,
	  .task-group-grid,
  .member-grid,
  .challenge-grid,
  .badge-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    flex-direction: column;
  }

  .calendar {
    grid-template-columns: repeat(10, minmax(18px, 1fr));
  }
}

/* Mobile app prototype shell */
body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(47, 155, 102, 0.16), transparent 34%),
    linear-gradient(135deg, #dfe9e3, #f8faf8 48%, #e8f0eb);
}

.app-shell {
  position: relative;
  display: block;
  width: min(430px, calc(100vw - 28px));
  height: min(900px, calc(100vh - 44px));
  min-height: 720px;
  overflow: hidden;
  border: 10px solid #101513;
  border-radius: 36px;
  background: #f5f8f5;
  box-shadow:
    0 26px 70px rgba(19, 36, 27, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.app-shell::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 20;
  width: 112px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #101513;
}

.phone-status {
  position: absolute;
  inset: 0 0 auto;
  z-index: 18;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  color: #17211b;
  font-size: 13px;
  font-weight: 800;
  background: rgba(245, 248, 245, 0.86);
  backdrop-filter: blur(14px);
}

.phone-signals {
  display: flex;
  align-items: center;
  gap: 8px;
}

.signal-bars {
  width: 18px;
  height: 12px;
  display: block;
  background:
    linear-gradient(to top, #17211b 35%, transparent 36%) 0 0 / 4px 100% no-repeat,
    linear-gradient(to top, #17211b 55%, transparent 56%) 7px 0 / 4px 100% no-repeat,
    linear-gradient(to top, #17211b 78%, transparent 79%) 14px 0 / 4px 100% no-repeat;
}

.wifi-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid #17211b;
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-45deg);
}

.battery {
  width: 22px;
  height: 11px;
  display: block;
  border: 2px solid #17211b;
  border-radius: 3px;
  position: relative;
}

.battery::before {
  content: "";
  position: absolute;
  right: -5px;
  top: 2px;
  width: 2px;
  height: 5px;
  border-radius: 0 2px 2px 0;
  background: #17211b;
}

.battery::after {
  content: "";
  position: absolute;
  inset: 2px 6px 2px 2px;
  border-radius: 1px;
  background: var(--green);
}

.sidebar {
  position: absolute;
  inset: auto 0 0;
  z-index: 16;
  height: 78px;
  padding: 8px 14px 12px;
  border: 0;
  border-top: 1px solid rgba(219, 228, 220, 0.9);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 -12px 30px rgba(31, 56, 42, 0.08);
  backdrop-filter: blur(18px);
}

.brand,
.guard-card {
  display: none;
}

.nav {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.nav-item {
  min-height: 58px;
  padding: 5px 0 3px;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-radius: 14px;
  font-size: 12px;
}

.nav-item span {
  display: block;
}

.nav-item svg {
  width: 21px;
  height: 21px;
}

.main {
  height: 100%;
  overflow-y: auto;
  padding: 58px 14px 94px;
  scrollbar-width: none;
}

.main::-webkit-scrollbar {
  display: none;
}

.topbar {
  position: sticky;
  top: -58px;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: -4px -14px 14px;
  padding: 10px 14px 12px;
  background: rgba(245, 248, 245, 0.88);
  backdrop-filter: blur(16px);
}

.topbar > div:first-child {
  min-width: 0;
}

	  .topbar h1 {
	    margin-top: 2px;
	    font-size: 26px;
	    line-height: 1.15;
	  }

	  .topbar-actions {
	    gap: 8px;
	  }

	  .pet-chip {
	    width: 44px;
	    min-height: 44px;
	    padding: 0;
	    justify-content: center;
	    border-radius: 50%;
	  }

	  .pet-chip > div {
	    display: none;
	  }

	  .pet-mini {
	    flex-basis: 32px;
	    width: 32px;
	    height: 32px;
	  }

.eyebrow {
  font-size: 11px;
}

.user-chip {
  width: 146px;
  flex: 0 0 auto;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 20px;
  box-shadow: none;
}

.user-chip .avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.user-chip .avatar::before {
  content: "Z";
  color: white;
  font-size: 13px;
  line-height: 1;
}

.user-chip strong,
.user-chip span {
  font-size: 11px;
  line-height: 1.15;
}

.user-chip > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.user-chip strong {
  display: flex;
  gap: 2px;
  align-items: baseline;
  white-space: nowrap;
}

.user-chip span span {
  display: inline;
}

.user-chip .xp-line {
  display: block;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0;
}

	  .hero-panel,
	  .panel,
	  .stat-card,
	  .task-card,
	  .pet-task-card,
	  .logic-list div,
.mvp-list div,
.reward-list div,
.leaderboard div,
.member-card,
.badge-card,
.metrics-grid article,
.challenge-card {
  border-radius: 18px;
}

	  .hero-panel {
	    display: block;
	    padding: 16px;
	    box-shadow: 0 14px 36px rgba(31, 56, 42, 0.1);
	  }

	  .pet-home-panel {
	    grid-template-columns: 82px minmax(0, 1fr);
	    gap: 12px;
	  }

	  .pet-mascot.large {
	    width: 72px;
	    height: 76px;
	  }

	  .pet-bars div {
	    grid-template-columns: 38px 38px minmax(0, 1fr);
	  }

.status-pill {
  min-height: 26px;
  font-size: 12px;
}

.hero-copy h2 {
  margin: 14px 0 8px;
  font-size: 27px;
  line-height: 1.12;
}

.hero-copy p {
  font-size: 14px;
  line-height: 1.58;
}

.hero-actions {
  gap: 10px;
  margin-top: 16px;
}

.primary-action,
.ghost-action {
  min-height: 40px;
  border-radius: 14px;
}

.campus-card {
  min-height: 230px;
  margin-top: 16px;
  border-radius: 22px;
}

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

.stat-card {
  padding: 13px;
}

.stat-card strong {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 24px;
  line-height: 1.05;
  white-space: nowrap;
}

.stat-card strong span {
  display: inline;
}

  .content-grid,
  .page-grid,
  .team-layout,
  .growth-grid,
  .challenge-grid,
  .task-group-grid,
  .task-board,
  .badge-grid,
.metrics-grid,
.member-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.panel {
  padding: 15px;
  box-shadow: 0 12px 32px rgba(31, 56, 42, 0.08);
}

.section-heading {
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.section-heading h3 {
  font-size: 18px;
  line-height: 1.28;
}

.task-card {
  padding: 14px;
}

.task-title {
  font-size: 16px;
}

.task-meta {
  gap: 6px;
  font-size: 12px;
}

.task-button {
  min-height: 40px;
  border-radius: 13px;
}

.segmented {
  width: 100%;
  justify-content: space-between;
  border-radius: 14px;
}

.segment {
  flex: 1;
  border-radius: 11px;
}

.leaderboard div,
.mvp-list div,
.reward-list div {
  min-height: 54px;
}

	  .calendar {
	    grid-template-columns: repeat(10, minmax(18px, 1fr));
	  }

	  .result-stats {
	    grid-template-columns: repeat(2, 1fr);
	  }

.toast {
  bottom: 98px;
  min-width: min(350px, calc(100vw - 60px));
  border-radius: 16px;
}

@media (max-width: 480px) {
  body {
    padding: 0;
    background: #101513;
  }

  .app-shell {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .app-shell::before {
    top: 6px;
  }
}

/* Pixel cat pet module */
.pet-chip {
  min-width: 74px;
  min-height: 54px;
  padding: 6px 8px;
  background: #fff8df;
  border-color: #eadfbe;
}

.pixel-pet-mini {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 38px;
  display: block;
  overflow: hidden;
  border: 2px solid #17211b;
  border-radius: 8px;
  background:
    linear-gradient(#dff6ef 0 20px, #bfead2 20px 25px, #8bcf9f 25px 100%);
  box-shadow: inset 0 -3px 0 rgba(23, 33, 27, 0.16);
  image-rendering: pixelated;
}

.pixel-cat-mini {
  --cat-main: #f4b45f;
  --cat-dark: #9c6533;
  position: absolute;
  left: 8px;
  bottom: 7px;
  width: 20px;
  height: 15px;
  background:
    radial-gradient(ellipse 50% 44% at 55% 74%, #ffe4b3 0% 50%, transparent 65%),
    var(--cat-main);
  border: 1.5px solid #17211b;
  border-radius: 6px 6px 4px 4px;
  animation: miniCatPlay 1.6s steps(2, end) infinite;
}

/* Head */
.pixel-cat-mini::before {
  content: "";
  position: absolute;
  left: 10px;
  bottom: 8px;
  width: 16px;
  height: 15px;
  background:
    radial-gradient(circle at 32% 52%, #17211b 0 1.5px, transparent 2px),
    radial-gradient(circle at 68% 52%, #17211b 0 1.5px, transparent 2px),
    radial-gradient(circle at 35% 46%, rgba(255,255,255,0.9) 0 0.6px, transparent 1px),
    radial-gradient(circle at 71% 46%, rgba(255,255,255,0.9) 0 0.6px, transparent 1px),
    radial-gradient(ellipse at 50% 71%, #e8748c 0 1.2px, transparent 1.8px),
    #ffe4b3;
  border: 1.5px solid #17211b;
  border-radius: 4px 4px 4px 4px;
  clip-path: polygon(
    0% 26%, 8% 26%, 19% 2%, 30% 26%,
    70% 26%, 81% 2%, 92% 26%, 100% 26%,
    100% 100%, 0% 100%
  );
}

/* Tail */
.pixel-cat-mini::after {
  content: "";
  position: absolute;
  left: -9px;
  bottom: 9px;
  width: 12px;
  height: 11px;
  border: 1.5px solid #17211b;
  border-right: 0;
  border-bottom: 0;
  border-radius: 5px 0 0 0;
  transform-origin: right bottom;
  transform: rotate(18deg);
  animation: miniTailWag 0.8s steps(2, end) infinite;
}

.pixel-yarn-mini {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 10px;
  height: 10px;
  border: 1.5px solid #17211b;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.3) 0 28%, transparent 38%),
    #ef7b63;
  animation: miniYarnRoll 1.6s steps(4, end) infinite;
}

.pixel-cat-mini.stage-2 { --cat-main: #f2a64f; }
.pixel-cat-mini.stage-3 { --cat-main: #7ccf9a; --cat-dark: #2f9b66; }
.pixel-cat-mini.stage-4 { --cat-main: #477de5; --cat-dark: #2454aa; }
.pixel-cat-mini.ready-evolve { filter: drop-shadow(0 0 5px rgba(246, 196, 83, 0.9)); }

@keyframes miniCatPlay {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(4px, -2px); }
}

@keyframes miniTailWag {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(46deg); }
}

@keyframes miniYarnRoll {
  0% { transform: translateX(0) rotate(0); }
  50% { transform: translateX(-5px) rotate(90deg); }
  100% { transform: translateX(0) rotate(180deg); }
}

.pet-mascot {
  --cat-main: #f9f5f0;
  --cat-light: #fff8f2;
  --cat-patch-1: #e89030;
  --cat-patch-2: #b06020;
  --cat-eye-color: #4a8cc8;
  --cat-dark: #9c6533;
  position: relative;
  width: 56px;
  height: 52px;
  display: block;
  border-radius: 8px;
  background:
    linear-gradient(#dff6ef 0 52%, #bfead2 52% 63%, #8bcf9f 63% 100%);
  border: 3px solid #17211b;
  box-shadow: 0 18px 34px rgba(47, 155, 102, 0.18), inset 0 -5px 0 rgba(23, 33, 27, 0.12);
  image-rendering: pixelated;
  animation: none;
}

.pet-mascot.large { width: 56px; height: 52px; }
.pet-mascot.medium { width: 104px; height: 96px; margin: 0 auto 12px; }
.pet-mascot.small { width: 82px; height: 78px; }

.pet-mascot::before,
.pet-mascot::after {
  display: none;
}

.pet-body {
  position: absolute;
  left: 28%;
  bottom: 22%;
  width: 43%;
  height: 30%;
  border: 3px solid #17211b;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 0 16%, rgba(156, 101, 51, 0.2) 17% 27%, transparent 28% 100%),
    var(--cat-main);
  animation: pixelCatBounce 1.4s steps(2, end) infinite;
}

.pet-tail {
  position: absolute;
  left: 16%;
  bottom: 39%;
  width: 26%;
  height: 17%;
  border: 3px solid #17211b;
  border-right: 0;
  border-bottom: 0;
  border-radius: 6px 0 0 0;
  transform-origin: right bottom;
  transform: rotate(18deg);
  animation: pixelTailWag 0.8s steps(2, end) infinite;
}

.pet-face {
  position: absolute;
  left: 42%;
  bottom: 42%;
  width: 34%;
  height: 32%;
  margin: 0;
  display: block;
  border: 2px solid #17211b;
  border-radius: 9px;
  background: var(--cat-light);
  overflow: visible;
  animation: pixelHeadTilt 1.4s steps(2, end) infinite;
}

.pet-ear {
  display: block;
  position: absolute;
  width: 14px;
  height: 16px;
  background: var(--cat-main);
  border: 2px solid #17211b;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  z-index: 0;
}

.pet-ear::before {
  content: "";
  position: absolute;
  inset: 3px 3px 0;
  background: #ffb8c8;
  border-radius: 2px 2px 0 0;
}

.pet-ear.left {
  left: 45%;
  bottom: 72%;
  transform: skewX(-6deg);
}

.pet-ear.right {
  left: 62%;
  bottom: 72%;
  transform: skewX(6deg);
}

/* Eyes */
.pet-face i {
  display: block;
  position: absolute;
  width: 6px;
  height: 7px;
  background: #17211b;
  border-radius: 50%;
  bottom: 52%;
}

.pet-face i:first-child { left: 17%; }
.pet-face i:last-of-type { right: 17%; }

/* Eye shine */
.pet-face i::before {
  content: "";
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  top: 1px;
  right: 1px;
}

/* Nose */
.pet-face b {
  display: block;
  position: absolute;
  bottom: 26%;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  height: 5px;
  background: #e8748c;
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  font-style: normal;
  font-weight: normal;
}

/* Smile curve */
.pet-face b::before {
  display: block;
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 5px;
  border: 1.5px solid rgba(26, 26, 26, 0.22);
  border-top: none;
  border-radius: 0 0 6px 6px;
}

/* Left whiskers */
.pet-face::before {
  display: block;
  content: "";
  position: absolute;
  left: -24px;
  bottom: 36%;
  width: 22px;
  height: 1.5px;
  background: rgba(20, 20, 20, 0.28);
  box-shadow: 0 6px 0 rgba(20, 20, 20, 0.22), 0 -6px 0 rgba(20, 20, 20, 0.18);
  transform: rotate(-4deg);
}

/* Right whiskers */
.pet-face::after {
  display: block;
  content: "";
  position: absolute;
  right: -24px;
  bottom: 36%;
  width: 22px;
  height: 1.5px;
  background: rgba(20, 20, 20, 0.28);
  box-shadow: 0 6px 0 rgba(20, 20, 20, 0.22), 0 -6px 0 rgba(20, 20, 20, 0.18);
  transform: rotate(4deg);
}

.pet-toy {
  position: absolute;
  right: 17%;
  bottom: 18%;
  width: 17%;
  aspect-ratio: 1;
  border: 2px solid #17211b;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.35) 0 30%, transparent 40%),
    linear-gradient(135deg, #f47060, #ef7b63 50%, #e05a4a);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15);
  animation: pixelYarnRoll 1.6s steps(4, end) infinite;
}

.pet-sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #f6c453;
  box-shadow:
    8px 0 0 #f6c453,
    0 8px 0 #f6c453,
    8px 8px 0 #f6c453;
  opacity: 0;
}

.pet-sparkle.one {
  left: 10%;
  top: 14%;
  animation: pixelSpark 1.8s steps(2, end) infinite;
}

.pet-sparkle.two {
  right: 12%;
  top: 18%;
  animation: pixelSpark 1.8s steps(2, end) infinite 0.7s;
}

.pet-mascot.stage-2 {
  --cat-main: #f2a64f;
  --cat-light: #ffe0a1;
}

.pet-mascot.stage-3 {
  --cat-main: #7ccf9a;
  --cat-light: #dff6df;
  --cat-dark: #2f9b66;
}

.pet-mascot.stage-4 {
  --cat-main: #477de5;
  --cat-light: #dfe9ff;
  --cat-dark: #2454aa;
}

.pet-mascot.ready-evolve {
  box-shadow:
    0 18px 34px rgba(47, 155, 102, 0.18),
    inset 0 -5px 0 rgba(23, 33, 27, 0.12),
    0 0 0 7px rgba(246, 196, 83, 0.22),
    0 0 30px rgba(246, 196, 83, 0.5);
}

.pet-mascot.is-fed,
.pet-mascot.is-patted,
.pet-mascot.is-playing {
  animation: none;
}

.pet-mascot.is-fed .pet-body,
.pet-mascot.is-fed .pet-face { animation: pixelFeed 0.7s steps(3, end) both; }
.pet-mascot.is-patted .pet-face { animation: pixelPat 0.7s steps(3, end) both; }
.pet-mascot.is-playing .pet-body,
.pet-mascot.is-playing .pet-face { animation: pixelPlay 0.8s steps(4, end) both; }
.pet-mascot.is-evolved { animation: pixelEvolve 0.9s steps(4, end) both; }

@keyframes pixelCatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes pixelHeadTilt {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(4px, -3px); }
}

@keyframes pixelTailWag {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(48deg); }
}

@keyframes pixelYarnRoll {
  0% { transform: translateX(0) rotate(0); }
  50% { transform: translateX(-10px) rotate(90deg); }
  100% { transform: translateX(0) rotate(180deg); }
}

@keyframes pixelSpark {
  0%, 45%, 100% { opacity: 0; transform: scale(0.7); }
  55%, 75% { opacity: 1; transform: scale(1); }
}

@keyframes pixelFeed {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-8px) scale(1.08); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes pixelPat {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-6px); }
  70% { transform: translateX(6px); }
}

@keyframes pixelPlay {
  0% { transform: translateX(0); }
  30% { transform: translateX(-12px); }
  65% { transform: translateX(10px); }
  100% { transform: translateX(0); }
}

@keyframes pixelEvolve {
  0% { filter: brightness(1); transform: scale(1); }
  35% { filter: brightness(1.5); transform: scale(0.92); }
  70% { filter: brightness(1.35); transform: scale(1.08); }
  100% { filter: brightness(1); transform: scale(1); }
}

@media (max-width: 720px) {
  .pet-chip {
    width: 64px;
    min-width: 64px;
    border-radius: 16px;
  }

  .pixel-pet-mini {
    flex-basis: 48px;
    width: 48px;
    height: 34px;
  }

  .pet-chip > div {
    display: none;
  }

  .pet-mascot.large {
    width: 96px;
    height: 90px;
  }
}

/* Friendly top playground strip */
.cat-play-strip {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: -6px 0 14px;
  padding: 9px 12px;
  border: 1px solid #dbe8dc;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(243, 250, 244, 0.92)),
    #f8fbf7;
  box-shadow: 0 12px 28px rgba(31, 56, 42, 0.08);
  cursor: pointer;
}

.cat-strip-stage {
  position: relative;
  min-width: 0;
  height: 42px;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(47, 155, 102, 0.08) 1px, transparent 1px) 0 0 / 22px 100%,
    linear-gradient(#ecfbf3 0 62%, #d7f1df 62% 72%, #a7dbb7 72% 100%);
  image-rendering: pixelated;
}

.cat-strip-copy {
  display: grid;
  gap: 2px;
  text-align: right;
}

.cat-strip-copy strong {
  color: var(--green-dark);
  font-size: 13px;
}

.cat-strip-copy small {
  white-space: nowrap;
  font-size: 11px;
}

.strip-cloud {
  position: absolute;
  top: 8px;
  width: 22px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  animation: stripCloud 6s linear infinite;
}

.strip-cloud::before,
.strip-cloud::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: inherit;
}

.strip-cloud::before { left: 4px; }
.strip-cloud::after { right: 4px; }
.strip-cloud.one { left: 12%; }
.strip-cloud.two { left: 70%; animation-delay: -3s; }

.strip-cat {
  --strip-cat: #f9f5f0;
  --strip-cat-light: #fff8f2;
  --strip-patch-1: #e89030;
  position: absolute;
  left: 8px;
  bottom: 0;
  width: 40px;
  height: 48px;
  animation: catIdleBob 2.4s ease-in-out infinite;
}

.strip-body {
  position: absolute;
  left: 8px;
  bottom: 5px;
  width: 28px;
  height: 20px;
  border: 1.5px solid #26342b;
  border-radius: 11px 11px 7px 7px;
  background:
    radial-gradient(ellipse 52% 46% at 55% 74%, var(--strip-cat-light) 0% 50%, transparent 65%),
    var(--strip-cat);
  animation: stripCatHop 0.65s steps(2, end) infinite;
}

/* Front paw */
.strip-body::before {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 4px;
  width: 9px;
  height: 7px;
  background: var(--strip-cat);
  border: 1.5px solid #26342b;
  border-top: none;
  border-radius: 0 0 5px 5px;
}

/* Back paw */
.strip-body::after {
  content: "";
  position: absolute;
  bottom: -7px;
  right: 4px;
  width: 9px;
  height: 7px;
  background: var(--strip-cat);
  border: 1.5px solid #26342b;
  border-top: none;
  border-radius: 0 0 5px 5px;
}

.strip-head {
  position: absolute;
  left: 32px;
  bottom: 17px;
  width: 24px;
  height: 22px;
  border: 1.5px solid #26342b;
  border-radius: 8px 8px 6px 6px;
  background:
    /* eyes */
    radial-gradient(circle at 31% 52%, #26342b 0 2.5px, transparent 3px),
    radial-gradient(circle at 69% 52%, #26342b 0 2.5px, transparent 3px),
    /* eye shine */
    radial-gradient(circle at 34% 47%, rgba(255,255,255,0.95) 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 47%, rgba(255,255,255,0.95) 0 1px, transparent 1.5px),
    /* tiny pink nose */
    radial-gradient(ellipse at 50% 72%, #e8748c 0 2px, transparent 2.5px),
    /* cheek blush */
    radial-gradient(ellipse at 16% 69%, rgba(232,116,156,0.2) 0 4px, transparent 5px),
    radial-gradient(ellipse at 84% 69%, rgba(232,116,156,0.2) 0 4px, transparent 5px),
    var(--strip-cat-light);
  animation: stripCatNod 0.65s steps(2, end) infinite;
}

/* Left ear */
.strip-head::before {
  content: "";
  position: absolute;
  left: 2px;
  bottom: calc(100% - 2px);
  width: 8px;
  height: 9px;
  background: var(--strip-cat);
  border: 1.5px solid #26342b;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}

/* Right ear */
.strip-head::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: calc(100% - 2px);
  width: 8px;
  height: 9px;
  background: var(--strip-cat);
  border: 1.5px solid #26342b;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}

.strip-tail {
  position: absolute;
  left: -1px;
  bottom: 17px;
  width: 15px;
  height: 15px;
  border: 1.5px solid #26342b;
  border-right: 0;
  border-bottom: 0;
  border-radius: 6px 0 0 0;
  transform-origin: right bottom;
  animation: stripTail 0.55s steps(2, end) infinite;
}

.strip-yarn {
  position: absolute;
  left: 75%;
  bottom: 9px;
  width: 14px;
  height: 14px;
  border: 1.5px solid #26342b;
  border-radius: 7px;
  background:
    linear-gradient(90deg, transparent 42%, rgba(38, 52, 43, 0.35) 43% 57%, transparent 58%),
    #ef7b63;
  animation: stripYarn 4.8s ease-in-out infinite;
}

.strip-cat.stage-2 { --strip-cat: #f2a64f; --strip-cat-light: #ffe0a1; }
.strip-cat.stage-3 { --strip-cat: #7ccf9a; --strip-cat-light: #e8ffe9; }
.strip-cat.stage-4 { --strip-cat: #477de5; --strip-cat-light: #e5edff; }
.strip-cat.ready-evolve {
  filter: drop-shadow(0 0 8px rgba(246, 196, 83, 0.9));
}

@keyframes stripCatRun {
  0%, 100% { transform: translateX(0) scaleX(1); }
  44% { transform: translateX(calc(100% + 150px)) scaleX(1); }
  50% { transform: translateX(calc(100% + 150px)) scaleX(-1); }
  94% { transform: translateX(0) scaleX(-1); }
}

@keyframes catIdleBob {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
  60% { transform: translateY(-4px); }
}

@keyframes stripCatHop {
  50% { transform: translateY(-3px); }
}

@keyframes stripCatNod {
  50% { transform: translate(2px, -2px); }
}

@keyframes stripTail {
  0%, 100% { transform: rotate(15deg); }
  50% { transform: rotate(52deg); }
}

@keyframes stripYarn {
  0%, 100% { transform: translateX(0) rotate(0); }
  44% { transform: translateX(-90px) rotate(-360deg); }
  50% { transform: translateX(-90px) rotate(-380deg); }
  94% { transform: translateX(0) rotate(0); }
}

@keyframes stripCloud {
  from { transform: translateX(0); }
  to { transform: translateX(-90px); }
}

/* Softer in-panel cat: keep it playful, less icon-like */
.pet-mascot {
  border: 2px solid #26342b;
  border-radius: 16px;
  background:
    linear-gradient(#ecfbf3 0 58%, #d7f1df 58% 70%, #a7dbb7 70% 100%);
}

.pet-body,
.pet-tail,
.pet-toy {
  border-width: 2px;
}

/* Rounder, cuter body with belly highlight */
.pet-body {
  border-radius: 10px 10px 8px 8px;
  background:
    radial-gradient(ellipse 50% 44% at 55% 74%, var(--cat-light) 0% 48%, transparent 62%),
    linear-gradient(90deg, transparent 0 16%, rgba(156, 101, 51, 0.12) 17% 27%, transparent 28% 100%),
    var(--cat-main);
}

.pet-face {
  border-radius: 10px;
  clip-path: none;
}

/* Ear inner color adapts per stage */
.pet-mascot.stage-3 .pet-ear::before { background: #b8ffd4; }
.pet-mascot.stage-4 .pet-ear::before { background: #c4d8ff; }

@media (max-width: 720px) {
  .cat-play-strip {
    min-height: 58px;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px;
  }

  .cat-strip-copy {
    display: flex;
    justify-content: space-between;
    text-align: left;
  }

  .cat-strip-stage {
    height: 42px;
  }
}

/* ========================================
   INLINE SVG CAT — replaces CSS-only boxes
   ======================================== */

/* Strip stage: taller to show cat ears */
.cat-strip-stage { height: 50px; }

/* Strip cat container size to match SVG */
.strip-cat {
  left: 6px;
  bottom: 4px;
  width: 68px;
  height: 42px;
}

/* Hide old CSS span elements (replaced by SVG) */
.strip-body, .strip-head, .strip-tail { display: none !important; }
.pet-body, .pet-face, .pet-ear, .pet-tail, .pet-toy { display: none !important; }

/* Strip cat SVG base */
.strip-cat-svg {
  display: block;
  overflow: visible;
  width: 48px;
  height: 53px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Pet mascot SVG base */
.pet-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ── Strip cat SVG part animations ── */
.sc-tail {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: scTailWag 0.55s steps(2, end) infinite;
}
.sc-body { animation: scBodyHop 0.65s steps(2, end) infinite; }
.sc-head { animation: scHeadNod 0.65s steps(2, end) infinite; }

@keyframes scBodyHop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes scHeadNod {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(2px, -2px); }
}
@keyframes scTailWag {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(22deg); }
}

/* ── Pet mascot SVG part animations ── */
.pm-tail {
  transform-box: fill-box;
  transform-origin: 100% 100%;
  animation: pmTailWag 0.8s steps(2, end) infinite;
}
.pm-body { animation: pmBodyBounce 1.4s steps(2, end) infinite; }
.pm-head { animation: pmHeadTilt 1.4s steps(2, end) infinite; }
.pm-toy {
  transform-box: fill-box;
  transform-origin: center center;
  animation: pmToyRoll 1.6s steps(4, end) infinite;
}

@keyframes pmBodyBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes pmHeadTilt {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(4px, -3px); }
}
@keyframes pmTailWag {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(22deg); }
}
@keyframes pmToyRoll {
  0%   { transform: translateX(0)    rotate(0deg); }
  50%  { transform: translateX(-12px) rotate(90deg); }
  100% { transform: translateX(0)    rotate(180deg); }
}

/* ── Interaction state overrides ── */
.pet-mascot.is-fed .pm-body,
.pet-mascot.is-fed .pm-head   { animation: pmFeed 0.7s steps(3, end) both; }
.pet-mascot.is-patted .pm-head { animation: pmPat  0.7s steps(3, end) both; }
.pet-mascot.is-playing .pm-body,
.pet-mascot.is-playing .pm-head { animation: pmPlay 0.8s steps(4, end) both; }
.pet-mascot.is-evolved .pet-svg  { animation: pmEvolve 0.9s steps(4, end) both; }

@keyframes pmFeed {
  0%   { transform: translateY(0)   scale(1); }
  45%  { transform: translateY(-8px) scale(1.08); }
  100% { transform: translateY(0)   scale(1); }
}
@keyframes pmPat {
  0%, 100% { transform: translateX(0); }
  35%      { transform: translateX(-6px); }
  70%      { transform: translateX(6px); }
}
@keyframes pmPlay {
  0%   { transform: translateX(0); }
  30%  { transform: translateX(-12px); }
  65%  { transform: translateX(10px); }
  100% { transform: translateX(0); }
}
@keyframes pmEvolve {
  0%   { filter: brightness(1);    transform: scale(1); }
  35%  { filter: brightness(1.5);  transform: scale(0.92); }
  70%  { filter: brightness(1.35); transform: scale(1.08); }
  100% { filter: brightness(1);    transform: scale(1); }
}

/* ─── Cat Adoption Section ─── */
.cat-adopt-section {
  margin-top: 20px;
  border-top: 1.5px solid rgba(23, 33, 27, 0.1);
  padding-top: 18px;
}

.cat-adopt-header {
  margin-bottom: 10px;
}

.cat-adopt-header .eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #2f9b66;
  margin-bottom: 3px;
}

.cat-adopt-header p {
  margin: 0;
  font-size: 12px;
  color: #55705e;
  line-height: 1.4;
}

.cat-adopt-progress {
  height: 6px;
  background: rgba(23, 33, 27, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.cat-adopt-progress em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2f9b66, #4ac484);
  border-radius: 3px;
  transition: width 0.5s ease;
  width: 0%;
}

.cat-adopt-hint {
  display: block;
  font-size: 11px;
  color: #7a9280;
  margin-bottom: 14px;
  line-height: 1.4;
}

.cat-catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 6px;
  border-radius: 10px;
  border: 1.5px solid rgba(23, 33, 27, 0.12);
  background: #faf7f3;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.cat-card:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 155, 102, 0.18);
  border-color: rgba(47, 155, 102, 0.4);
}

.cat-card:active:not(:disabled) {
  transform: scale(0.96);
}

.cat-card.cat-active {
  background: #e8f7ef;
  border-color: #2f9b66;
  box-shadow: 0 2px 8px rgba(47, 155, 102, 0.22);
}

.cat-card.cat-adoptable {
  border-color: #e89030;
  background: #fff8ef;
  animation: adoptPulse 2s ease-in-out infinite;
}

.cat-card.cat-locked {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.cat-card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-card-name {
  font-size: 10px;
  font-weight: 600;
  color: #26342b;
  text-align: center;
  line-height: 1.2;
}

.cat-card-label {
  font-size: 9px;
  color: #7a9280;
  text-align: center;
  line-height: 1.2;
}

.cat-card.cat-active .cat-card-label {
  color: #2f9b66;
  font-weight: 600;
}

.cat-card.cat-adoptable .cat-card-label {
  color: #e89030;
  font-weight: 600;
}

@keyframes adoptPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 144, 48, 0.3); }
  50%       { box-shadow: 0 0 0 5px rgba(232, 144, 48, 0); }
}
