/* Pet Name Generator — warm minimal Panjool */
.png-shell {
  --png-ink: #3d342f;
  --png-muted: #8a7d74;
  --png-faint: #b5a89e;
  --png-line: rgba(86, 71, 65, 0.1);
  --png-accent: #f69946;
  --png-accent-deep: #e0703a;
  --png-accent-soft: rgba(246, 153, 70, 0.14);
  --png-bg: #faf7f3;
  --png-surface: #ffffff;
  --png-fill: #f5efe8;
  color: var(--png-ink);
  min-height: calc(100vh - 160px);
  padding: 1.75rem 1rem 6.5rem;
  background:
    radial-gradient(ellipse 90% 50% at 100% 0%, rgba(246, 153, 70, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 40% at 0% 100%, rgba(224, 112, 58, 0.06), transparent 50%),
    var(--png-bg);
}

[x-cloak] { display: none !important; }

.png-wrap {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

/* Hero */
.png-hero {
  margin-bottom: 1.4rem;
  text-align: center;
}
.png-hero__title {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.35;
  color: #2c241f;
}
.png-hero__sub {
  margin: 0.5rem 0 0;
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--png-muted);
}

/* Progress */
.png-nav {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
.png-progress {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.png-progress__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--png-muted);
}
.png-progress__label {
  color: var(--png-accent-deep);
  font-weight: 800;
}
.png-progress__track {
  height: 4px;
  border-radius: 99px;
  background: rgba(86, 71, 65, 0.08);
  overflow: hidden;
}
.png-progress__bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #f69946, #e0703a);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.png-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.png-nav__prev {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--png-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.25rem;
  cursor: pointer;
  min-width: 3.5rem;
}
.png-nav__prev:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.png-nav__prev:not(:disabled):hover {
  color: var(--png-accent-deep);
}
.png-nav__next {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.9rem;
  padding: 0.7rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f69946, #e58935);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(246, 153, 70, 0.28);
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
}
.png-nav__next:hover:not(:disabled) {
  box-shadow: 0 10px 24px rgba(246, 153, 70, 0.36);
}
.png-nav__next:active:not(:disabled) {
  transform: scale(0.985);
}
.png-nav__next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* Card */
.png-card {
  background: var(--png-surface);
  border-radius: 1.4rem;
  padding: 1.35rem 1.2rem 1.4rem;
  box-shadow: 0 10px 36px rgba(86, 71, 65, 0.06);
  animation: pngIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pngIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.png-card__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #2c241f;
}
.png-card__hint {
  margin: 0 0 1.15rem;
  font-size: 0.8rem;
  color: var(--png-muted);
  line-height: 1.65;
}
.png-card__optional {
  display: inline;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--png-accent-deep);
}

/* Chips */
.png-grid {
  display: grid;
  gap: 0.55rem;
}
.png-grid--2 { grid-template-columns: 1fr 1fr; }
.png-grid--3 { grid-template-columns: 1fr 1fr 1fr; }

.png-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  text-align: right;
  padding: 0.8rem 0.85rem;
  border-radius: 1.05rem;
  border: 1px solid transparent;
  background: var(--png-fill);
  color: var(--png-ink);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.png-chip:hover {
  background: #efe6dc;
  transform: translateY(-1px);
}
.png-chip.is-active {
  background: linear-gradient(145deg, #fff8f1, #ffffff);
  box-shadow: 0 0 0 1.5px rgba(246, 153, 70, 0.55), 0 6px 16px rgba(246, 153, 70, 0.12);
  color: var(--png-accent-deep);
}
.png-chip__emoji {
  font-size: 1.15rem;
  line-height: 1;
}
.png-species-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  color: #6b5c52;
  transition: color 0.15s ease, transform 0.15s ease;
}
.png-species-icon svg {
  width: 100%;
  height: 100%;
}
.png-chip--species:hover .png-species-icon {
  color: var(--png-accent-deep);
  transform: translateY(-1px);
}
.png-chip--species.is-active .png-species-icon {
  color: var(--png-accent-deep);
}
.png-chip--species {
  flex-direction: column;
  justify-content: center;
  min-height: 5.8rem;
  gap: 0.55rem;
}
.png-chip--gender {
  justify-content: center;
  min-height: 3.15rem;
}
.png-chip--trait {
  justify-content: center;
  padding: 0.55rem 0.8rem;
  font-size: 0.78rem;
  border-radius: 999px;
  width: auto;
}

.png-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

/* Themes: horizontal scroll */
.png-themes {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  margin: 0 -0.15rem 0.25rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.png-themes::-webkit-scrollbar { display: none; }
.png-themes .png-chip {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

/* Breed */
.png-breed__any {
  margin-bottom: 0.75rem;
}
.png-breed {
  border-radius: 1.15rem;
  overflow: hidden;
  background: var(--png-fill);
}
.png-breed__search {
  padding: 0.65rem 0.65rem 0.4rem;
}
.png-breed__input {
  width: 100%;
  min-height: 2.55rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid transparent;
  background: #fff;
  color: var(--png-ink);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
}
.png-breed__input:focus {
  box-shadow: 0 0 0 3px rgba(246, 153, 70, 0.16);
  border-color: rgba(246, 153, 70, 0.4);
}
.png-breed__selected {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.95rem 0.65rem;
  font-size: 0.75rem;
  color: var(--png-muted);
}
.png-breed__selected strong {
  color: var(--png-accent-deep);
  font-weight: 800;
}
.png-breed__list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0.4rem 0.5rem;
  max-height: 15.5rem;
  overflow-y: auto;
  background: #fff;
}
.png-breed__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: right;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: 0.85rem;
  background: transparent;
  color: var(--png-ink);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
}
.png-breed__row:hover {
  background: var(--png-fill);
}
.png-breed__row.is-active {
  background: var(--png-accent-soft);
  color: var(--png-accent-deep);
}
.png-breed__en {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--png-faint);
  white-space: nowrap;
}
.png-breed__empty {
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--png-muted);
  font-weight: 600;
}

.png-skip {
  margin-top: 0.85rem;
  text-align: center;
}
.png-skip-link {
  border: 0;
  background: transparent;
  color: var(--png-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem;
}
.png-skip-link:hover {
  color: var(--png-accent-deep);
}

.png-more-link {
  border: 0;
  background: transparent;
  color: var(--png-accent-deep);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.4rem 0.15rem;
}

.png-textarea {
  width: 100%;
  min-height: 5rem;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  background: var(--png-fill);
  color: var(--png-ink);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.7;
  resize: vertical;
  outline: none;
}
.png-textarea:focus {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(246, 153, 70, 0.16);
  border-color: rgba(246, 153, 70, 0.4);
}
.png-textarea::placeholder {
  color: var(--png-faint);
  font-weight: 500;
}

/* Results */
.png-results__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.png-results__title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #2c241f;
}
.png-results__sub {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  color: var(--png-muted);
}
.png-link-btn {
  border: 0;
  background: var(--png-accent-soft);
  color: var(--png-accent-deep);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}
.png-link-btn:hover {
  background: rgba(246, 153, 70, 0.22);
}

.png-name-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.png-name-item {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.95rem 0.15rem;
  border-bottom: 1px solid var(--png-line);
  animation: pngIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.png-name-item:first-child {
  padding-top: 0.45rem;
}
.png-name-item:last-child {
  border-bottom: 0;
}
.png-name-item.is-top {
  background: linear-gradient(90deg, rgba(246, 153, 70, 0.07), transparent 70%);
  margin: 0 -0.55rem;
  padding-right: 0.55rem;
  padding-left: 0.55rem;
  border-radius: 0.85rem;
  border-bottom-color: transparent;
}
.png-name-item.is-top + .png-name-item:not(.is-top) {
  border-top: 1px solid var(--png-line);
}
.png-name-item:nth-child(2) { animation-delay: 0.03s; }
.png-name-item:nth-child(3) { animation-delay: 0.06s; }
.png-name-item:nth-child(4) { animation-delay: 0.09s; }
.png-name-item:nth-child(5) { animation-delay: 0.12s; }
.png-name-rank {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--png-faint);
  padding-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}
.png-name-item.is-top .png-name-rank {
  color: var(--png-accent-deep);
}
.png-name-text { min-width: 0; }
.png-name-text__name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.png-name-item.is-top .png-name-text__name {
  font-size: 1.12rem;
  color: #2c241f;
}
.png-name-text__meaning {
  margin: 0.22rem 0 0;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--png-muted);
}
.png-name-copy {
  border: 0;
  background: transparent;
  color: var(--png-accent-deep);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-top: 0.1rem;
  opacity: 0.75;
}
.png-name-copy:hover {
  opacity: 1;
}

.png-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 1.2rem;
}
.png-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.9rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  border: 0;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s;
}
.png-btn:active { transform: scale(0.98); }
.png-btn--primary {
  width: 100%;
  background: linear-gradient(135deg, #f69946, #e58935);
  color: #fff;
  box-shadow: 0 8px 20px rgba(246, 153, 70, 0.28);
}
.png-btn--primary:hover:not(:disabled) {
  box-shadow: 0 10px 24px rgba(246, 153, 70, 0.36);
}
.png-btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.png-btn--ghost {
  width: 100%;
  background: transparent;
  color: var(--png-muted);
  font-weight: 600;
  min-height: auto;
  padding: 0.5rem;
}
.png-btn--ghost:hover {
  color: var(--png-accent-deep);
}

/* Guide */
.png-guide {
  margin-top: 2.75rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--png-line);
}
.png-guide__eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--png-accent-deep);
}
.png-guide__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #2c241f;
}
.png-guide__intro {
  margin: 0 0 1.25rem;
  font-size: 0.86rem;
  line-height: 1.8;
  color: var(--png-muted);
}
.png-guide__article {
  display: grid;
  gap: 1.25rem;
}
.png-guide__section p {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  line-height: 1.85;
  color: #5a4f48;
}
.png-guide__section p:last-child {
  margin-bottom: 0;
}
.png-guide__heading {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #2c241f;
  letter-spacing: -0.01em;
}
.png-guide__tips {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: rgba(246, 153, 70, 0.08);
  display: grid;
  gap: 0.55rem;
}
.png-guide__tips li {
  position: relative;
  padding-right: 0.95rem;
  font-size: 0.8rem;
  line-height: 1.65;
  color: #6b5344;
  font-weight: 600;
}
.png-guide__tips li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.55rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--png-accent);
}

.png-toast {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: #564741;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(86, 71, 65, 0.25);
}
.png-error {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.8rem;
  border-radius: 0.9rem;
  background: rgba(185, 28, 28, 0.07);
  color: #b91c1c;
  font-size: 0.8rem;
  font-weight: 700;
}
.png-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.png-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pngSpin 0.7s linear infinite;
}
@keyframes pngSpin {
  to { transform: rotate(360deg); }
}

@media (min-width: 640px) {
  .png-wrap { max-width: 30rem; }
  .png-hero__title { font-size: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .png-card, .png-name-item, .png-spinner, .png-progress__bar, .png-chip {
    animation: none !important;
    transition: none !important;
  }
}
