:root {
  color-scheme: dark;
  --ink: #120905;
  --leather: #241108;
  --leather-2: #351b0d;
  --leather-3: #4b2814;
  --gold: #f5cc75;
  --gold-strong: #d99935;
  --cream: #fff2cf;
  --muted: #c9aa7e;
  --line: rgba(238, 190, 102, 0.29);
  --green: #20bd67;
  --red: #e74845;
  --blue: #458dd8;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #100704;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% -12%, rgba(187, 112, 39, 0.38), transparent 38rem),
    linear-gradient(145deg, #0e0603 0%, #1f0e07 52%, #0b0503 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.17;
  background-image:
    repeating-linear-gradient(19deg, transparent 0 4px, rgba(255,255,255,.035) 5px, transparent 6px),
    repeating-linear-gradient(113deg, transparent 0 8px, rgba(0,0,0,.14) 9px, transparent 11px);
  pointer-events: none;
}

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

button,
a,
label,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

.hidden {
  display: none !important;
}

.page-glow {
  position: fixed;
  inset: -30vh -40vw auto;
  height: 70vh;
  background: radial-gradient(circle, rgba(231, 165, 66, 0.14), transparent 64%);
  filter: blur(8px);
  pointer-events: none;
}

.app-shell {
  width: min(100%, 540px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 16px max(34px, env(safe-area-inset-bottom));
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 4px 22px;
  text-align: left;
}

.brand-header h1 {
  margin: 1px 0;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.72rem, 7vw, 2.15rem);
  font-weight: 650;
  letter-spacing: 0.075em;
  line-height: 1;
  text-shadow: 0 2px 20px rgba(226, 160, 62, 0.25);
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  border: 1px solid rgba(246, 206, 127, 0.58);
  border-radius: 50%;
  background: linear-gradient(145deg, #4d2a15, #1b0d07);
  box-shadow: inset 0 1px 2px rgba(255,255,255,.12), 0 8px 24px rgba(0,0,0,.35);
}

.brand-mark svg {
  width: 32px;
  fill: var(--gold);
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.35));
}

.brand-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold-strong);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.35;
}

.status-card,
.hero-card,
.form-card,
.pet-card,
.action-card,
.info-card,
.modal-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(67, 34, 16, 0.96), rgba(30, 14, 7, 0.98)),
    var(--leather);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), var(--shadow);
}

.status-card {
  min-height: 340px;
  padding: 70px 28px;
  border-radius: 28px;
  text-align: center;
}

.status-card h2,
.hero-card h2,
.lost-banner h2,
.modal-card h2 {
  margin: 10px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.08;
}

.status-card p,
.hero-card p,
.modal-card > p {
  color: var(--muted);
  line-height: 1.58;
}

.spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 24px;
  border: 3px solid rgba(245, 204, 117, 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-size: 1.5rem;
  font-weight: 900;
}

.activation-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 24px 25px;
  border-radius: 28px;
}

.activation-hero::after {
  position: absolute;
  right: -28px;
  bottom: -45px;
  content: "🐾";
  color: rgba(246, 205, 119, 0.07);
  font-size: 8rem;
  transform: rotate(-16deg);
}

.activation-hero h2 {
  max-width: 390px;
  margin: 12px 0;
  color: var(--cream);
  font-size: clamp(2rem, 9vw, 2.8rem);
}

.activation-hero > p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin-bottom: 20px;
}

.code-pill,
.verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(103, 217, 144, 0.38);
  border-radius: 99px;
  color: #b6f4cd;
  background: rgba(24, 112, 60, 0.17);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.code-pill {
  margin-bottom: 22px;
  padding: 7px 11px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #42e77f;
  box-shadow: 0 0 0 4px rgba(66,231,127,.12), 0 0 14px rgba(66,231,127,.6);
}

.privacy-promise,
.privacy-banner {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 15px;
  border: 1px solid rgba(93, 169, 218, 0.23);
  border-radius: 15px;
  color: #cce7f7;
  background: rgba(36, 98, 138, 0.13);
  font-size: 0.84rem;
  line-height: 1.45;
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.form-card {
  padding: 22px 18px;
  border-radius: 23px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
}

.section-heading h3 {
  margin: 0;
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.34rem;
  font-weight: 600;
}

.section-heading .eyebrow {
  margin-bottom: 2px;
}

.step-number {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  place-items: center;
  border: 1px solid rgba(245, 203, 116, 0.47);
  border-radius: 50%;
  color: var(--gold);
  background: linear-gradient(145deg, rgba(123,68,26,.65), rgba(47,22,9,.8));
  font-family: Georgia, serif;
  font-weight: 700;
}

.lock-step {
  color: #9ed9ff;
  border-color: rgba(87,158,205,.45);
  background: rgba(26,73,105,.35);
}

.photo-uploader {
  position: relative;
  display: block;
  width: 100%;
  min-height: 220px;
  overflow: hidden;
  margin: 0 0 20px;
  border: 1px dashed rgba(245,204,117,.52);
  border-radius: 20px;
  background: rgba(10,5,3,.37);
  cursor: pointer;
}

.photo-uploader input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photo-placeholder {
  display: grid;
  min-height: 220px;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.photo-placeholder strong {
  margin: 9px 0 4px;
  color: var(--cream);
}

.photo-placeholder small {
  font-size: .73rem;
}

.camera-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  background: var(--leather-3);
  font-size: 1.5rem;
}

.photo-preview {
  width: 100%;
  height: 270px;
  object-fit: cover;
}

.photo-change {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: none;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 99px;
  color: #fff;
  background: rgba(15,7,3,.78);
  backdrop-filter: blur(8px);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.photo-uploader:has(.photo-preview:not(.hidden)) .photo-change {
  display: block;
}

.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px 12px;
}

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

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid rgba(233, 190, 113, 0.25);
  border-radius: 12px;
  outline: none;
  color: var(--cream);
  background: rgba(10, 5, 3, 0.53);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.field textarea {
  resize: vertical;
  line-height: 1.45;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(245,204,117,.72);
  background: rgba(13, 7, 4, .78);
  box-shadow: 0 0 0 3px rgba(245,204,117,.11);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #826c55;
}

.private-card {
  border-color: rgba(83, 157, 205, 0.27);
  background: linear-gradient(145deg, rgba(31,57,73,.65), rgba(22,18,14,.96));
}

.private-label {
  margin-left: 5px;
  color: #8bd2ff;
  font-size: .57rem;
  letter-spacing: .09em;
}

.form-note {
  margin: -7px 0 18px;
  color: var(--muted);
  font-size: .79rem;
  line-height: 1.5;
}

.switch-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(233,190,113,.16);
  border-radius: 16px;
  background: rgba(233,190,113,.12);
}

.switch-row,
.lost-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 67px;
  padding: 12px 13px;
  background: rgba(18, 9, 5, .82);
  cursor: pointer;
}

.switch-row > span:first-child,
.lost-toggle > span:nth-child(2) {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.switch-row strong,
.lost-toggle strong {
  color: var(--cream);
  font-size: .84rem;
}

.switch-row small,
.lost-toggle small {
  color: var(--muted);
  font-size: .69rem;
  line-height: 1.35;
}

.switch-row input,
.lost-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-row i,
.lost-toggle i {
  position: relative;
  width: 44px;
  height: 25px;
  flex: 0 0 44px;
  border-radius: 99px;
  background: #56483b;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.38);
  transition: background .18s;
}

.switch-row i::after,
.lost-toggle i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  content: "";
  border-radius: 50%;
  background: #e9dbc6;
  box-shadow: 0 2px 5px rgba(0,0,0,.4);
  transition: transform .18s;
}

.switch-row input:checked + i {
  background: #b57d31;
}

.switch-row input:checked + i::after,
.lost-toggle input:checked + i::after {
  transform: translateX(19px);
}

.lost-card {
  border-color: rgba(238,76,70,.32);
  background: linear-gradient(145deg, rgba(91,25,18,.74), rgba(33,13,8,.98));
}

.lost-toggle {
  min-height: 74px;
  padding: 0;
  background: transparent;
}

.lost-toggle input:checked + i {
  background: var(--red);
}

.lost-icon,
.pulse-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--red);
  font-weight: 900;
}

.inline-error {
  padding: 12px 14px;
  border: 1px solid rgba(245,88,81,.38);
  border-radius: 13px;
  color: #ffd4ce;
  background: rgba(128,31,25,.32);
  font-size: .83rem;
  line-height: 1.4;
}

.button {
  position: relative;
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 16px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #211208;
  font-weight: 900;
  letter-spacing: .035em;
  line-height: 1.18;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s, filter .12s, box-shadow .12s;
}

.button::before {
  position: absolute;
  inset: 1px 7px auto;
  height: 45%;
  content: "";
  border-radius: 12px 12px 50% 50%;
  background: linear-gradient(rgba(255,255,255,.35), transparent);
  pointer-events: none;
}

.button:active {
  transform: translateY(2px);
  filter: brightness(.94);
}

.button:focus-visible {
  outline: 3px solid rgba(255,255,255,.72);
  outline-offset: 2px;
}

.button[disabled] {
  cursor: wait;
  filter: grayscale(.35) brightness(.72);
}

.button-gold {
  border-color: #ffe2a0;
  background: linear-gradient(180deg, #ffe7a7 0%, #efb84e 58%, #c78727 100%);
  box-shadow: inset 0 -3px 0 rgba(99,51,8,.4), 0 8px 18px rgba(189,119,27,.2);
}

.button-large {
  min-height: 58px;
  border-radius: 17px;
  font-size: .94rem;
}

.button-whatsapp {
  border-color: #88efb1;
  color: #fff;
  background: linear-gradient(180deg, #36d77d 0%, #16a955 62%, #087d3a 100%);
  box-shadow: inset 0 -3px 0 rgba(4,86,37,.42), 0 8px 18px rgba(19,164,82,.2);
}

.button-location {
  border-color: #ff9a91;
  color: #fff;
  background: linear-gradient(180deg, #f86c65 0%, #d93d39 62%, #a72220 100%);
  box-shadow: inset 0 -3px 0 rgba(86,14,12,.42), 0 8px 18px rgba(203,49,45,.2);
  font-size: .78rem;
}

.button-ghost {
  border-color: rgba(245,204,117,.32);
  color: var(--gold);
  background: rgba(37,18,9,.64);
}

.button-ghost::before {
  display: none;
}

.terms-note {
  margin: -2px 20px 8px;
  color: #90785d;
  font-size: .68rem;
  line-height: 1.45;
  text-align: center;
}

.lost-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(255,111,103,.55);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(146,37,29,.92), rgba(83,18,13,.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 14px 42px rgba(116,22,17,.35);
}

.lost-banner .pulse-icon {
  width: 47px;
  height: 47px;
  flex-basis: 47px;
  border: 2px solid rgba(255,255,255,.72);
  animation: pulse 1.7s ease-in-out infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 8px rgba(255,255,255,.08); }
}

.lost-banner h2 {
  margin: 0;
  color: white;
  font-size: clamp(1.6rem, 7.5vw, 2.1rem);
}

.lost-banner .eyebrow {
  color: #ffc6bf;
}

.pet-card {
  overflow: hidden;
  border-radius: 28px;
}

.pet-photo-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 260px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(233,173,73,.25), transparent 42%),
    #100704;
}

.pet-photo-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pet-photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(245,204,117,.5);
  font-size: 5rem;
}

.verified-pill {
  position: absolute;
  left: 50%;
  bottom: 12px;
  padding: 8px 12px;
  white-space: nowrap;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
  background: rgba(9,45,23,.78);
}

.pet-intro {
  padding: 23px 20px 25px;
  text-align: center;
}

.pet-intro h2 {
  margin: 5px 0;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.9rem, 15vw, 4.2rem);
  font-weight: 600;
  letter-spacing: .035em;
  line-height: 1;
  text-transform: uppercase;
}

.pet-meta {
  margin: 9px 0 0;
  color: var(--cream);
  font-family: Georgia, serif;
  font-size: 1.08rem;
}

.action-card,
.info-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 17px;
  border-radius: 23px;
}

.action-symbol {
  position: relative;
  z-index: 1;
  font-size: 1.25rem;
}

.action-note {
  margin: 2px 8px 0;
  color: #9e876d;
  font-size: .68rem;
  line-height: 1.45;
  text-align: center;
}

.compact-heading {
  margin: 2px 0 9px;
}

.info-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(245,204,117,.15);
  border-radius: 15px;
  background: rgba(245,204,117,.12);
}

.info-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 1px 10px;
  padding: 13px;
  background: rgba(18,9,5,.9);
}

.info-row .info-icon {
  grid-row: 1 / 3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--gold);
  background: rgba(144,87,30,.28);
}

.info-row dt {
  color: var(--gold-strong);
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.info-row dd {
  margin: 2px 0 0;
  color: var(--cream);
  font-size: .87rem;
  line-height: 1.42;
  white-space: pre-line;
}

.privacy-banner {
  margin-top: 14px;
}

.privacy-banner p {
  margin: 0;
  color: #c7ddec;
  font-size: .78rem;
  line-height: 1.45;
}

.owner-button {
  margin-top: 14px;
  font-size: .75rem;
}

.updated-label {
  margin: 12px 0 0;
  color: #806b54;
  font-size: .65rem;
  text-align: center;
}

.app-footer {
  padding: 30px 10px 8px;
  color: var(--muted);
  text-align: center;
}

.app-footer p:not(.footer-paws) {
  margin: 6px 0;
  font-family: Georgia, serif;
  font-size: .71rem;
  letter-spacing: .24em;
}

.app-footer small {
  color: #776149;
  font-size: .62rem;
  letter-spacing: .08em;
}

.footer-paws {
  margin: 0;
  color: var(--gold-strong);
}

.modal {
  width: min(calc(100% - 28px), 450px);
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: visible;
  border: 0;
  color: var(--cream);
  background: transparent;
}

.modal::backdrop {
  background: rgba(8,4,2,.78);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  overflow: auto;
  max-height: calc(100dvh - 28px);
  padding: 27px 22px 22px;
  border-radius: 24px;
  text-align: center;
}

.modal-card .field {
  margin: 19px 0 13px;
  text-align: left;
}

.modal-card .button + .button {
  margin-top: 9px;
}

.modal-close {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(0,0,0,.24);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-icon {
  display: block;
  margin: 3px 0 12px;
  font-size: 2.2rem;
}

.location-marker {
  color: var(--red);
}

.location-message {
  padding: 15px;
  border: 1px solid rgba(245,204,117,.2);
  border-radius: 13px;
  color: var(--cream) !important;
  background: rgba(10,5,3,.53);
  font-size: .82rem;
  line-height: 1.55 !important;
  text-align: left;
  white-space: pre-line;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 16px;
  z-index: 20;
  max-width: 440px;
  margin: auto;
  padding: 13px 15px;
  border: 1px solid rgba(119,232,161,.3);
  border-radius: 13px;
  color: #dcffe9;
  background: rgba(14,82,42,.94);
  box-shadow: 0 12px 34px rgba(0,0,0,.4);
  font-size: .82rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity .18s, transform .18s;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 390px) {
  .app-shell { padding-right: 11px; padding-left: 11px; }
  .form-card { padding: 20px 14px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .switch-row { padding-right: 10px; padding-left: 10px; }
  .switch-row small { max-width: 215px; }
}

@media (min-width: 760px) {
  .app-shell { padding-top: 36px; }
}

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