.adopt-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

#adopt-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: 400px;
  max-width: 100%;
  height: auto;
  cursor: pointer;
  border-radius: 8px;
}

.adopt-chirp {
  position: fixed;
  font-style: italic;
  font-size: .95rem;
  color: #444;
  text-align: center;
  background: #fff;
  border: 2px solid #c8dce8;
  border-radius: 14px;
  padding: .55rem 1.1rem;
  max-width: 240px;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 100;
}
.adopt-chirp::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #c8dce8;
}
.adopt-chirp::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #fff;
}
.adopt-chirp.show { opacity: 1; }
.adopt-chirp.fade { opacity: 0; }

.adopt-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  width: 100%;
}

.adopt-zones {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .5rem;
  width: 100%;
  max-width: 360px;
}

.adopt-zones .button {
  font-size: .9rem;
  padding: .5rem .25rem;
}

.adopt-score {
  font-weight: 600;
  font-size: 1rem;
}

.adopt-end {
  background: none;
  border: none;
  font-size: .8rem;
  color: #999;
  cursor: pointer;
  padding: .25rem .5rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.adopt-end:hover { color: #555; }

.hidden { display: none; }

#adopt-pre {
  text-align: center;
}

#adopt-pre .muted {
  margin-bottom: .8rem;
}

.adopt-stats {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .8rem 0;
}

.adopt-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .9rem;
}

.adopt-bar-track {
  height: 8px;
  background: #e8f0f8;
  border-radius: 4px;
  overflow: hidden;
}

.adopt-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .4s ease, background .4s ease;
}

.adopt-bar-xp { background: #6e98b8; }
.adopt-bar-mood { background: #4caf50; }

.adopt-career {
  font-size: .85rem;
  color: #666;
  text-align: center;
  margin: .2rem 0 0;
}

.adopt-days {
  font-size: .78rem;
  color: #999;
  text-align: center;
  margin: 0;
}

.adopt-modal {
  border: 2px solid #c8dce8;
  border-radius: 14px;
  padding: 2rem 2.5rem;
  max-width: 360px;
  width: 90%;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.adopt-modal[open] {
  display: flex;
}
.adopt-modal::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.adopt-modal-close {
  background: none;
  border: none;
  font-size: .8rem;
  color: #999;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.adopt-modal-close:hover { color: #555; }

.adopt-modal-title {
  font-size: 1.3rem;
  margin: 0;
}

.adopt-modal-body {
  font-size: 0.95rem;
  color: #444;
  margin: 0;
  line-height: 1.6;
}

.adopt-customize {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: .8rem 0;
  border-top: 1px solid #c8dce8;
}

.adopt-customize-heading {
  font-size: .9rem;
  font-weight: 600;
  color: #3a5878;
  margin: 0 0 .2rem;
  text-align: center;
}

.adopt-cust-slot {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.adopt-cust-label {
  font-size: .82rem;
  color: #666;
  min-width: 80px;
  flex-shrink: 0;
}

.adopt-cust-swatches {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  align-items: center;
}

.adopt-cust-swatch {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color .15s, transform .1s;
}
.adopt-cust-swatch:hover  { transform: scale(1.12); }
.adopt-cust-swatch.active { border-color: #3a5878; }

.adopt-cust-locked {
  font-size: .78rem;
  color: #aaa;
}

.adopt-cust-coming-soon {
  font-size: .82rem;
  color: #6e98b8;
  font-style: italic;
}

.adopt-debug-toggle {
  margin-top: 1.5rem;
  text-align: center;
}

.adopt-debug-btn {
  background: none;
  border: 1px solid #c8dce8;
  border-radius: 6px;
  padding: .25rem .7rem;
  font-size: .75rem;
  font-family: monospace;
  color: #888;
  cursor: pointer;
}
.adopt-debug-btn:hover { color: #444; border-color: #8aacbe; }

.adopt-debug {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .8rem 1rem;
  padding: 1.5rem 0;
  width: 100%;
  border-top: 1px solid #c8dce8;
  margin-top: .5rem;
}

.adopt-debug-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}

.adopt-debug-label {
  font-size: .72rem;
  font-family: monospace;
  color: #666;
}
