:root {
  --cream: #fff9f2;
  --pink: #ffd8e8;
  --pink-strong: #ff78a9;
  --purple: #65415b;
  --mint: #d9f5ea;
  --yellow: #ffe9a8;
  --text: #342833;
  --muted: #7d6878;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 45px rgba(91, 60, 83, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, var(--pink), transparent 34rem),
    radial-gradient(circle at bottom right, var(--mint), transparent 28rem),
    var(--cream);
}

body.page-ready > main,
body.page-ready > header {
  opacity: 0;
  transform: translateY(12px) scale(0.992);
}

body.page-entered > main,
body.page-entered > header {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 360ms ease, transform 420ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

a {
  color: inherit;
}

.fa-solid {
  line-height: 1;
}

.soft-link .fa-solid,
.pill-button .fa-solid,
.add-cat-button .fa-solid,
.primary-button .fa-solid,
.secondary-button .fa-solid,
.danger-button .fa-solid,
.brand .fa-solid,
.admin-topbar a .fa-solid {
  margin-right: 0.42rem;
}

h1 > .fa-solid,
h2 > .fa-solid {
  display: inline-grid;
  place-items: center;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.25em;
  color: var(--pink-strong);
  filter: drop-shadow(0 6px 12px rgba(255, 120, 169, 0.18));
}

button,
input,
select,
textarea {
  font: inherit;
}

.map-shell,
.page-shell,
.wizard-shell,
.admin-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto;
}

.map-shell {
  width: 100%;
  min-height: 100vh;
}

.map-panel {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.cat-map {
  width: 100%;
  height: 100vh;
  background: #f4efe7;
}

.leaflet-control-attribution {
  position: relative;
  z-index: 300;
}

.map-toolbar {
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.map-toolbar > *,
.filter-card,
.add-cat-button {
  pointer-events: auto;
}

.soft-link,
.pill-button,
.add-cat-button,
.primary-button,
.secondary-button,
.danger-button {
  border: 0;
  border-radius: 999px;
  color: var(--purple);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 0.78rem 1rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 0.58rem 0.78rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.language-switch a {
  color: inherit;
  text-decoration: none;
}

.language-switch a.is-active {
  color: var(--purple);
}

.soft-link:hover,
.pill-button:hover,
.add-cat-button:hover,
.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  transform: translateY(-2px) scale(1.02);
  filter: saturate(1.08);
  box-shadow: 0 22px 52px rgba(91, 60, 83, 0.23);
}

.soft-link:active,
.pill-button:active,
.add-cat-button:active,
.primary-button:active,
.secondary-button:active,
.danger-button:active {
  transform: translateY(1px) scale(0.98);
}

.pill-button,
.primary-button,
.add-cat-button {
  background: linear-gradient(135deg, var(--pink), var(--yellow));
}

.filter-card {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 108px;
  z-index: 920;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.filter-card label {
  min-width: 0;
}

.filter-card label > span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-card label .custom-select .custom-select-menu {
  bottom: calc(100% + 8px);
  top: auto !important;
  transform-origin: bottom center;
}

.filter-card label,
.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 2px solid #f2dbe5;
  border-radius: 18px;
  background: #fffafc;
  color: var(--text);
  padding: 0.88rem 1rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--pink-strong);
}

.native-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  min-width: 0;
}

.custom-select-trigger {
  position: relative;
  width: 100%;
  min-height: 48px;
  border: 2px solid #f2dbe5;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 250, 252, 0.96), rgba(255, 255, 255, 0.9)),
    #fffafc;
  color: var(--text);
  padding: 0.88rem 2.7rem 0.88rem 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.custom-select-trigger::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 3px solid var(--purple);
  border-bottom: 3px solid var(--purple);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 180ms ease;
}

.custom-select-trigger:hover,
.custom-select-trigger:focus {
  border-color: var(--pink-strong);
  box-shadow: 0 12px 26px rgba(91, 60, 83, 0.12);
  outline: none;
}

.custom-select.is-open .custom-select-trigger {
  border-color: var(--pink-strong);
  transform: translateY(-1px);
}

.custom-select.is-open .custom-select-trigger::after {
  transform: translateY(-35%) rotate(225deg);
}

.custom-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 900;
  display: grid;
  gap: 6px;
  max-height: min(280px, 48vh);
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(255, 120, 169, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 232, 0.92), transparent 11rem),
    radial-gradient(circle at bottom right, rgba(217, 245, 234, 0.9), transparent 10rem),
    rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(91, 60, 83, 0.24);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.custom-select.is-open .custom-select-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.custom-select-option {
  width: 100%;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--purple);
  padding: 0.82rem 0.9rem;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease, color 150ms ease;
}

.custom-select-option:hover,
.custom-select-option:focus {
  background: rgba(255, 255, 255, 0.82);
  color: var(--pink-strong);
  outline: none;
  transform: translateX(3px);
}

.custom-select-option.is-selected {
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  color: var(--purple);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.66);
}

.custom-select-option.is-selected::before {
  content: "✓ ";
}

.wizard-step .custom-select-menu {
  max-height: min(240px, 42vh);
}

.add-cat-button {
  position: fixed;
  left: 14px;
  bottom: 18px;
  z-index: 930;
  animation: cta-breathe 2.8s ease-in-out infinite;
}

.add-cat-button::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px solid rgba(255, 120, 169, 0.35);
  border-radius: inherit;
  opacity: 0;
  transform: scale(0.88);
  animation: cta-ring 2.8s ease-in-out infinite;
}

.cat-marker {
  width: 54px;
  height: 62px;
  background: transparent;
  overflow: visible !important;
}

.cat-marker-photo {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  box-shadow:
    0 0 0 3px rgba(255, 120, 169, 0.72),
    0 0 0 8px rgba(255, 216, 232, 0.35),
    0 14px 28px rgba(52, 40, 51, 0.28);
  overflow: visible;
}

.cat-marker-photo-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  overflow: hidden;
  border-radius: 50%;
  background: inherit;
}

.cat-marker-photo > .fa-solid {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 1.25rem;
  text-shadow: 0 2px 8px rgba(101, 65, 91, 0.35);
}

.cat-marker-photo::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 15px;
  height: 15px;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
  border-radius: 0 0 6px 0;
  background: var(--pink-strong);
  box-shadow: 4px 4px 0 rgba(255, 120, 169, 0.28);
  transform: translateX(-50%) rotate(45deg);
  z-index: -1;
}

.cat-marker-photo-frame img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.cat-marker-photo.has-photo > .fa-solid {
  display: none;
}

.cat-marker-photo.is-missing {
  background: linear-gradient(135deg, var(--pink-strong), var(--yellow));
}

.cat-counter {
  position: fixed;
  top: 72px;
  left: 14px;
  z-index: 910;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  max-width: calc(100% - 28px);
  padding: 0.78rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--purple);
  box-shadow: var(--shadow);
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.cat-counter .fa-solid {
  color: var(--pink-strong);
}

.cat-counter strong {
  font-size: 1.15em;
}

.user-location-marker {
  display: grid;
  place-items: center;
}

.user-location-marker span {
  width: 18px;
  height: 18px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--pink-strong);
  box-shadow: 0 0 0 7px rgba(255, 120, 169, 0.24), 0 10px 26px rgba(52, 40, 51, 0.28);
}

.pill-button[disabled] {
  cursor: wait;
  opacity: 0.82;
}

.pill-button[data-state="loading"] {
  animation: locate-pulse 780ms ease-in-out infinite;
}

.cat-popup {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  max-width: 280px;
}

.cat-popup img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 22px;
}

.cat-popup h3,
.cat-popup p {
  margin: 0 0 6px;
}

.cat-gallery-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  color: var(--purple);
  padding: 0.52rem 0.72rem;
  font-size: 0.85rem;
  font-weight: 900;
  cursor: pointer;
}

.cat-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(52, 40, 51, 0.42);
  backdrop-filter: blur(8px);
}

.cat-gallery-dialog {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(720px, 100%);
  max-height: min(78vh, 720px);
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 232, 0.86), transparent 16rem),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(52, 40, 51, 0.32);
  padding: 18px;
}

.cat-gallery-dialog h2 {
  margin: 0;
  color: var(--purple);
  font-size: 1.25rem;
  line-height: 1.15;
}

.cat-gallery-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--purple);
  box-shadow: 0 10px 22px rgba(91, 60, 83, 0.16);
  cursor: pointer;
}

.cat-gallery-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 78%);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 2px 4px 8px;
}

.cat-gallery-strip img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 24px;
  object-fit: cover;
  scroll-snap-align: center;
  box-shadow: 0 14px 34px rgba(91, 60, 83, 0.16);
}

.page-shell,
.wizard-shell,
.admin-shell {
  padding: 16px 0 32px;
}

.hero-card,
.wizard-card,
.admin-card {
  padding: clamp(20px, 4vw, 34px);
  border-radius: 34px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-card h1,
.wizard-card h1,
.admin-card h1 {
  margin: 0 0 12px;
  color: var(--purple);
  font-size: clamp(2rem, 9vw, 4.2rem);
  line-height: 0.95;
}

.hero-card > .soft-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 0.58rem 0.86rem;
}

.hero-card h1 {
  display: flex;
  align-items: center;
  gap: 0.32em;
  font-size: clamp(2.25rem, 6vw, 3.7rem);
  letter-spacing: -0.045em;
}

.hero-card h1 > .fa-solid {
  width: auto;
  height: auto;
  margin-right: 0;
  font-size: 0.62em;
  transform: translateY(0.03em);
}

.wizard-card > .soft-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 0.58rem 0.86rem;
}

.wizard-card h1 {
  display: flex;
  align-items: center;
  gap: 0.32em;
  max-width: 980px;
  font-size: clamp(2.35rem, 6vw, 3.7rem);
  letter-spacing: -0.045em;
}

.wizard-card h1 > .fa-solid {
  width: auto;
  height: auto;
  margin-right: 0;
  font-size: 0.66em;
  transform: translateY(0.03em);
}

.wizard-card h2 {
  margin: 0;
  font-size: clamp(1.18rem, 3vw, 1.55rem);
  line-height: 1.15;
}

.hero-card p {
  max-width: 880px;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

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

.stack-form {
  display: grid;
  gap: 16px;
}

.wizard-progress {
  display: flex;
  gap: 6px;
  margin: 16px 0 22px;
}

.wizard-progress span {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #f2dbe5;
}

.wizard-progress span.is-active {
  background: var(--pink-strong);
}

.wizard-viewport {
  overflow: hidden;
  transition: height 220ms ease;
  will-change: height;
}

.wizard-track {
  display: flex;
  align-items: flex-start;
  transition: transform 260ms ease;
}

.wizard-step {
  flex: 0 0 100%;
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 0;
  padding: 4px;
}

.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.range-labels,
.char-count {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.age-keypad-card {
  display: grid;
  gap: 14px;
}

.age-keypad-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.age-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.55rem;
  padding: 18px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 232, 0.82), transparent 12rem),
    rgba(255, 255, 255, 0.86);
  color: var(--purple);
  box-shadow: inset 0 0 0 1px rgba(255, 120, 169, 0.12);
}

.age-display strong {
  font-size: clamp(2.8rem, 12vw, 4.5rem);
  line-height: 0.9;
}

.age-display span {
  color: var(--muted);
  font-weight: 900;
}

.phone-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.phone-keypad button {
  min-height: 58px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--purple);
  box-shadow: inset 0 0 0 1px rgba(255, 120, 169, 0.14), 0 12px 26px rgba(91, 60, 83, 0.1);
  font-size: 1.35rem;
  font-weight: 950;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.phone-keypad button:active {
  transform: scale(0.96);
  background: linear-gradient(135deg, var(--pink), var(--yellow));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.62), 0 8px 18px rgba(91, 60, 83, 0.12);
}

.address-results {
  display: grid;
  gap: 8px;
  max-height: 230px;
  overflow: auto;
  padding-right: 2px;
}

.address-results button {
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 0.8rem 1rem;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 120, 169, 0.12);
}

.address-results button:active,
.address-results button:focus {
  outline: 2px solid var(--pink-strong);
}

.address-loading {
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-weight: 900;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: -4px 0 0;
  padding: 0.78rem 0.9rem;
  border-radius: 18px;
  background: rgba(217, 245, 234, 0.62);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.privacy-note .fa-solid {
  flex: 0 0 auto;
  margin-top: 0.12em;
  color: #318d62;
}

.preview-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.preview-grid img,
.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 20px;
}

.upload-dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px;
  border: 2px dashed rgba(255, 120, 169, 0.5);
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 232, 0.75), transparent 14rem),
    rgba(255, 250, 252, 0.82);
  color: var(--purple);
  font-weight: 900;
  text-align: center;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.upload-dropzone:hover {
  border-color: var(--pink-strong);
  box-shadow: 0 16px 36px rgba(91, 60, 83, 0.12);
  transform: translateY(-1px);
}

.upload-dropzone > .fa-solid {
  color: var(--pink-strong);
  font-size: 1.8rem;
}

.upload-dropzone small {
  color: var(--muted);
  font-weight: 800;
}

.upload-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.portrait-cropper-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 216, 232, 0.68), transparent 14rem),
    rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 120, 169, 0.14), 0 18px 42px rgba(91, 60, 83, 0.12);
}

.portrait-cropper-help {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--purple);
  font-weight: 900;
  line-height: 1.35;
}

.portrait-cropper-help .fa-solid {
  color: var(--pink-strong);
}

.portrait-cropper-shell {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 28px;
  background: #f7edf2;
  box-shadow: inset 0 0 0 1px rgba(255, 120, 169, 0.16);
}

.portrait-cropper-image {
  display: block;
  max-width: 100%;
}

.portrait-cropper-card .cropper-container {
  width: 100%;
  height: 100%;
}

.portrait-cropper-card .cropper-view-box,
.portrait-cropper-card .cropper-face {
  border-radius: 50%;
}

.portrait-cropper-card .cropper-view-box {
  outline: 3px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 999px rgba(52, 40, 51, 0.42), 0 14px 38px rgba(52, 40, 51, 0.2);
}

.portrait-cropper-card .cropper-line,
.portrait-cropper-card .cropper-point {
  display: none;
}

.portrait-cropper-card.is-loading .portrait-cropper-shell::before,
.portrait-cropper-card.is-error .portrait-cropper-shell::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.portrait-cropper-card.is-loading .portrait-cropper-shell::before {
  content: "";
}

.portrait-cropper-card.is-error .portrait-cropper-shell::before {
  content: "";
  color: #8f2640;
}

.portrait-round-guide {
  pointer-events: none;
}

.portrait-cropper-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.portrait-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 120, 169, 0.12);
}

.portrait-result img {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(255, 120, 169, 0.58), 0 12px 28px rgba(91, 60, 83, 0.16);
}

.portrait-result div {
  display: grid;
  gap: 4px;
}

.portrait-result strong {
  color: var(--purple);
}

.portrait-result strong .fa-solid {
  color: #318d62;
  margin-right: 0.35rem;
}

.portrait-result span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

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

.upload-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--pink-strong), var(--yellow));
  transition: width 220ms ease;
}

.upload-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.66rem 0.86rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--purple);
  font-weight: 900;
}

.upload-status.is-success {
  background: rgba(217, 245, 234, 0.86);
}

.upload-status.is-loading {
  background: rgba(255, 233, 168, 0.8);
}

.upload-status.is-error {
  background: #ffe3e6;
  color: #8f2640;
}

.gallery-item {
  position: relative;
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(91, 60, 83, 0.12);
}

.remove-photo-button {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #8f2640;
  box-shadow: 0 8px 18px rgba(52, 40, 51, 0.2);
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.recap-list {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
}

.recap-list p {
  margin: 0;
}

.submit-cat-button {
  width: calc(100% - 8px);
  margin: 4px 4px 12px;
  box-shadow: 0 14px 30px rgba(101, 65, 91, 0.12);
}

.submit-cat-button:hover {
  box-shadow: 0 16px 34px rgba(101, 65, 91, 0.16);
}

.alert {
  margin: 0 0 18px;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: #fff0f2;
  color: #8f2640;
  font-weight: 800;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.admin-topbar nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.brand,
.admin-topbar a {
  color: var(--purple);
  font-weight: 900;
  text-decoration: none;
}

.table-wrap {
  overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
  padding: 0.8rem;
  border-bottom: 1px solid #f0dbe3;
  text-align: left;
  vertical-align: top;
}

.admin-thumb {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  object-fit: cover;
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.danger-button {
  background: #ffe3e6;
  color: #8f2640;
}

.screen-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 34%, rgba(255, 216, 232, 0.95), transparent 18rem),
    radial-gradient(circle at 72% 68%, rgba(217, 245, 234, 0.95), transparent 18rem),
    rgba(255, 249, 242, 0.94);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 260ms ease, transform 420ms cubic-bezier(0.3, 0.9, 0.2, 1);
}

.map-toast {
  position: fixed;
  left: 50%;
  top: 76px;
  z-index: 700;
  width: min(420px, calc(100% - 28px));
  padding: 0.9rem 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--purple);
  box-shadow: var(--shadow);
  font-weight: 800;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -12px) scale(0.96);
  transition: opacity 220ms ease, transform 220ms ease;
}

.map-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.is-transitioning .screen-transition {
  opacity: 1;
  transform: translateY(0);
}

.transition-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 220px;
  padding: 24px 26px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--purple);
  box-shadow: var(--shadow);
  transform: translateY(20px) scale(0.92);
  transition: transform 360ms cubic-bezier(0.2, 1.25, 0.25, 1);
}

.is-transitioning .transition-card {
  transform: translateY(0) scale(1);
}

.transition-card strong {
  font-size: 1.5rem;
}

.transition-card span {
  color: var(--muted);
  font-weight: 800;
}

.cat-orbit {
  position: relative;
  width: 82px;
  height: 52px;
}

.cat-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pink-strong);
  box-shadow:
    18px 10px 0 var(--yellow),
    36px 0 0 var(--mint);
  animation: paw-hop 720ms ease-in-out infinite;
}

.cat-dot:nth-child(1) {
  left: 4px;
  top: 8px;
}

.cat-dot:nth-child(2) {
  left: 28px;
  top: 24px;
  animation-delay: 120ms;
}

.cat-dot:nth-child(3) {
  left: 52px;
  top: 8px;
  animation-delay: 240ms;
}

.screen-transition[data-mode="cat-jump"] .transition-card {
  animation: card-pop 620ms ease both;
}

.tap-sparkle {
  position: fixed;
  z-index: 9998;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  pointer-events: none;
  border-radius: 50%;
  background: var(--pink-strong);
  box-shadow:
    18px 0 0 var(--yellow),
    -18px 0 0 var(--mint),
    0 18px 0 var(--pink),
    0 -18px 0 var(--yellow);
  animation: sparkle-pop 520ms ease-out forwards;
}

@keyframes cta-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.025);
  }
}

@keyframes cta-ring {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.88);
  }
  45% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes paw-hop {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes locate-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes card-pop {
  0% {
    transform: translateY(26px) scale(0.86) rotate(-2deg);
  }
  55% {
    transform: translateY(-4px) scale(1.04) rotate(1deg);
  }
  100% {
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes sparkle-pop {
  0% {
    opacity: 0.9;
    transform: scale(0.35) rotate(0);
  }
  100% {
    opacity: 0;
    transform: scale(1.9) rotate(45deg);
  }
}

@media (min-width: 760px) {
  .filter-card {
    right: auto;
    width: min(680px, calc(100% - 266px));
    bottom: 20px;
    left: 238px;
  }

  .add-cat-button {
    left: 22px;
    bottom: 22px;
  }
}

@media (max-width: 640px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }

  body.map-page {
    height: 100vh;
    overflow: hidden;
  }

  body.map-page > main,
  .map-shell,
  .map-panel,
  .cat-map {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }

  @supports (height: 100svh) {
    body.map-page,
    body.map-page > main,
    .map-shell,
    .map-panel,
    .cat-map {
      height: 100svh;
      min-height: 100svh;
    }
  }

  .map-toolbar {
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }

  .map-toolbar .soft-link,
  .map-toolbar .pill-button {
    max-width: calc(50% - 4px);
    padding: 0.62rem 0.72rem;
    font-size: 0.82rem;
    white-space: nowrap;
    min-width: 0;
  }

  .map-toolbar .soft-link {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.wizard-page {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .cat-counter {
    top: calc(max(10px, env(safe-area-inset-top)) + 52px);
    left: 10px;
    right: 10px;
    justify-content: center;
    width: auto;
    padding: 0.58rem 0.75rem;
    font-size: 0.84rem;
  }

  .leaflet-bottom.leaflet-right {
    bottom: calc(env(safe-area-inset-bottom) + 166px);
    right: 10px;
  }

  .leaflet-control-zoom {
    border: 0 !important;
    box-shadow: var(--shadow) !important;
    border-radius: 16px;
    overflow: hidden;
  }

  .hero-card {
    border-radius: 26px;
    padding: 18px;
    overflow-wrap: break-word;
  }

  .hero-card h1 {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.42rem;
    max-width: 100%;
    font-size: clamp(1.75rem, 10vw, 2.45rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
    overflow-wrap: break-word;
  }

  .hero-card h1 > .fa-solid {
    margin-top: 0.08em;
    font-size: 0.58em;
  }

  .hero-card p {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .hero-card > .language-switch {
    margin-bottom: 12px;
  }

  .wizard-shell {
    width: min(100% - 14px, 1120px);
    min-height: auto;
    padding: max(14px, env(safe-area-inset-top)) 0 max(16px, env(safe-area-inset-bottom));
  }

  .wizard-card {
    min-width: 0;
    max-width: 100%;
    min-height: auto;
    overflow: visible;
    border-radius: 26px;
    padding: 14px 14px 12px;
  }

  .wizard-card > .soft-link {
    margin-bottom: 6px;
    padding: 0.42rem 0.68rem;
    font-size: 0.84rem;
  }

  .wizard-card h1 {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.38rem;
    width: 100%;
    margin-bottom: 5px;
    font-size: clamp(1.08rem, 5.7vw, 1.42rem);
    line-height: 1.16;
    letter-spacing: -0.025em;
    max-width: 100%;
    overflow: visible;
  }

  .wizard-card h1 > .fa-solid {
    margin-top: 0.08em;
    font-size: 0.72em;
  }

  .wizard-card h1 > span {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .wizard-card > .muted {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .wizard-progress {
    gap: 5px;
    margin: 10px 0 12px;
  }

  .wizard-progress span {
    height: 6px;
  }

  .wizard-card h2 {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 0.38rem;
    min-width: 0;
    font-size: clamp(1.02rem, 5.3vw, 1.28rem);
    line-height: 1.18;
    overflow-wrap: break-word;
  }

  .wizard-card h2 > .fa-solid {
    margin-top: 0.08em;
  }

  .wizard-viewport {
    width: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .wizard-step {
    gap: 10px;
    padding: 2px 2px 6px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .wizard-step.has-open-select {
    min-height: 0;
  }

  .wizard-step .custom-select-menu {
    max-height: 190px;
  }

  .age-keypad-card {
    gap: 10px;
  }

  .age-display {
    padding: 14px;
    border-radius: 22px;
  }

  .age-display strong {
    font-size: clamp(2.5rem, 15vw, 3.6rem);
  }

  .phone-keypad {
    gap: 8px;
  }

  .phone-keypad button {
    min-height: 52px;
    border-radius: 18px;
    font-size: 1.22rem;
  }

  .upload-dropzone {
    gap: 4px;
    padding: 12px;
    border-radius: 20px;
  }

  .upload-dropzone > .fa-solid {
    font-size: 1.25rem;
  }

  .portrait-step.has-portrait {
    gap: 7px;
  }

  .portrait-step.has-portrait > .muted {
    display: none;
  }

  .portrait-step.has-portrait .upload-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 7px 11px;
  }

  .portrait-step.has-portrait .upload-dropzone > .fa-solid {
    font-size: 1rem;
  }

  .portrait-step.has-portrait .upload-dropzone small {
    display: none;
  }

  .portrait-cropper-card {
    gap: 7px;
    padding: 8px;
    border-radius: 22px;
  }

  .portrait-cropper-help {
    display: none;
  }

  .portrait-cropper-shell {
    width: min(240px, 72vw);
    border-radius: 20px;
  }

  .portrait-cropper-actions {
    gap: 8px;
  }

  .portrait-cropper-actions .primary-button,
  .portrait-cropper-actions .secondary-button {
    min-height: 42px;
    padding: 0.58rem 0.72rem;
    font-size: 0.88rem;
  }

  .portrait-result {
    gap: 9px;
    padding: 8px 9px;
    border-radius: 20px;
  }

  .portrait-result img {
    width: 56px;
    height: 56px;
    border-width: 3px;
  }

  .portrait-result span {
    font-size: 0.82rem;
  }

  .portrait-step .upload-status {
    padding: 0.48rem 0.7rem;
    font-size: 0.82rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 8px;
  }

  textarea {
    max-height: 150px;
  }

  .address-results {
    max-height: 180px;
  }

  .wizard-actions {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 20;
    align-items: stretch;
    flex-direction: row;
    gap: 8px;
    margin: 12px -4px 0;
    padding: 8px 4px 2px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 249, 242, 0), rgba(255, 249, 242, 0.94) 28%, rgba(255, 249, 242, 0.98));
    backdrop-filter: blur(8px);
  }

  .filter-card {
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom) + 76px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 9px;
    border-radius: 22px;
  }

  .filter-card label {
    gap: 5px;
    font-size: 0.72rem;
  }

  .filter-card label > span {
    gap: 0.25rem;
  }

  .filter-card .custom-select-trigger {
    min-height: 40px;
    padding: 0.64rem 1.9rem 0.64rem 0.72rem;
    border-radius: 15px;
    font-size: 16px;
  }

  .filter-card .custom-select-trigger::after {
    right: 0.72rem;
    width: 0.5rem;
    height: 0.5rem;
  }

  .filter-card .custom-select-menu {
    max-height: 180px;
    border-radius: 18px;
    padding: 7px;
  }

  .filter-card .custom-select-option {
    padding: 0.66rem 0.7rem;
    border-radius: 13px;
    font-size: 16px;
  }

  .add-cat-button {
    left: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 620;
    padding: 0.8rem 0.96rem;
    font-size: 0.9rem;
  }

  .wizard-actions button {
    width: 100%;
    min-height: 46px;
    padding: 0.72rem 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .screen-transition {
    display: none;
  }
}
