:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1d1d1d;
  --muted: #72757e;
  --line: #d9dde6;
  --brand: #ffcc55;
  --brand-dark: #b47a00;
  --green: #22c55e;
  --danger: #ff5b5b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

.app-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 16px 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
}

.logo {
  color: var(--brand);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line);
  background: var(--surface);
}

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

.auth-card {
  margin-top: 30px;
}

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

.title-row.compact {
  justify-content: flex-end;
  gap: 8px;
}

.tag-link {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(180, 122, 0, 0.34);
  text-underline-offset: 4px;
}

.tag-link:hover {
  color: var(--brand-dark);
}

.tag-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar-small {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #eef0f4;
  flex: 0 0 auto;
}

.avatar-small.placeholder::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 11px auto;
  border-radius: 50%;
  background: #c7ccd6;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.15;
  margin-bottom: 8px;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 12px;
}

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

.field {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

label {
  font-size: 13px;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #a9afbc;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 9px 11px;
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(255, 204, 85, 0.26);
}

.password-wrap,
.inline-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.button {
  min-height: 40px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: var(--text);
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-outline {
  background: #fff;
}

.button-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--brand-dark);
}

.button-danger {
  border-color: var(--danger);
  background: #fff;
  color: #b42318;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(92vw, 420px);
  border-radius: 8px;
  background: #1d1d1d;
  color: #fff;
  padding: 12px 14px;
  text-align: center;
  z-index: 20;
}

.pet-card {
  position: relative;
  overflow: hidden;
}

.pet-photo {
  width: 112px;
  height: 112px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #eef0f4;
}

.photo-editor {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.photo-placeholder {
  width: 112px;
  height: 112px;
  border: 1px dashed #a9afbc;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fafbfc;
}

.lost-badge {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--brand);
  color: #f04438;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.05;
  flex: 0 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  background: #eef9f1;
  color: #117a37;
  font-weight: 700;
  font-size: 12px;
}

.status-pill.lost {
  background: #fff2c8;
  color: #b42318;
}

.contact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.contact-button {
  min-height: 58px;
  border-radius: 8px;
  border: 1px solid #b9efc9;
  background: #f5fff8;
  color: #15803d;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-weight: 800;
}

.menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(78vw, 320px);
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 28px rgba(20, 25, 38, 0.14);
  padding: 20px;
  z-index: 12;
}

.menu button {
  width: 100%;
  text-align: left;
  margin-top: 10px;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  z-index: 11;
}

.faq-item {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.char-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
}

@media (max-width: 360px) {
  .app-shell {
    padding-inline: 12px;
  }

  .logo {
    font-size: 30px;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .photo-editor {
    grid-template-columns: 1fr;
  }
}
