:root {
  color-scheme: light;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #ffe7d8, #fff9f0);
  color: #3d2b1f;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 92px 20px 40px;
  box-sizing: border-box;
}

.card {
  width: min(100%, 480px);
  background: rgba(255,255,255,0.95);
  border-radius: 24px;
  padding: 24px 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.brand-mark {
  font-size: 2rem;
  min-width: 3rem;
  min-height: 3rem;
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  border-radius: 14px;
}

.app-name {
  margin: 0;
  font-size: 1.6rem;
  color: #b34f22;
}

.app-subtitle {
  margin: 2px 0 0;
  color: #6b4f3f;
  font-size: 0.95rem;
}

.hero-title {
  text-align: center;
  font-size: 1.35rem;
  margin: 10px 0 14px;
  color: #61351e;
}

.title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  color: #b34f22;
}

.subtitle {
  text-align: center;
  margin: 0 0 16px;
  color: #6b4f3f;
}

.terms {
  text-align: center;
  color: #6b4f3f;
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.animation-box {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.animation-box img {
  width: 180px;
  height: 180px;
  border-radius: 20px;
  object-fit: cover;
  background: #ffefdf;
  padding: 8px;
  animation: bounce 1.4s infinite ease-in-out;
}

.btn,
button {
  display: block;
  width: 100%;
  border: 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, #ff8a3d, #ff5b3c);
  color: white;
  font-size: 1rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.btn.secondary {
  background: #fff4ea;
  color: #a15523;
  border: 1px solid #f4cda5;
}

.btn:hover,
button:hover {
  filter: brightness(1.05);
}

.text-link {
  display: block;
  text-align: center;
  margin-top: 8px;
  color: #b34f22;
  font-weight: 700;
  text-decoration: none;
}

.auth-card {
  display: grid;
  gap: 10px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.auth-links a {
  color: #b34f22;
  font-weight: 700;
  text-decoration: none;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff6ed;
  border: 1px solid #f2c096;
  border-radius: 18px;
  padding: 16px 12px;
  text-align: center;
  text-decoration: none;
  color: #61351e;
}

.category-icon {
  font-size: 2rem;
  margin-bottom: 4px;
}

.category-photo-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-name {
  font-weight: 700;
}

.small-animation {
  margin-bottom: 8px;
}

.small-animation img {
  width: 120px;
  height: 120px;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7ed, #ffe2c2);
  border: 1px solid #f2c096;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.page-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 24px;
  background: rgba(255,255,255,0.98);
  color: #61351e;
  border-bottom: 1px solid #f2c096;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  box-sizing: border-box;
}

.page-topbar__brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.page-topbar__add,
.page-topbar__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff8a3d, #ff5b3c);
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(255, 90, 60, 0.24);
}

.page-topbar__back {
  font-size: 1.3rem;
}

.pet-list {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

.pet-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff8f0;
  border: 1px solid #f2c096;
  text-decoration: none;
  color: inherit;
}

.pet-card__photo {
  width: min(86px, 24vw);
  height: min(86px, 24vw);
  max-width: 86px;
  max-height: 86px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
  background: #ffe2c2;
}

.pet-card__content {
  display: grid;
  gap: 4px;
}

.pet-card__name {
  font-weight: 700;
  color: #61351e;
  margin-bottom: 4px;
}

.pet-card__meta {
  color: #7a4624;
  font-size: 0.95rem;
}

.pet-profile {
  display: grid;
  gap: 14px;
}

.pet-profile__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(280px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff2e6, #ffe2c2);
  border: 1px dashed #f2c096;
  font-size: 3rem;
  color: #a15523;
  cursor: pointer;
  overflow: hidden;
}

.pet-profile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.pet-profile__content {
  display: grid;
  gap: 8px;
  text-align: center;
}

.pet-profile__name {
  font-size: 1.8rem;
  font-weight: 800;
  color: #61351e;
}

.pet-profile__age {
  font-size: 1rem;
  font-weight: 700;
  color: #b34f22;
}

.pet-profile__details {
  display: grid;
  gap: 4px;
  color: #7a4624;
  font-size: 0.95rem;
  justify-items: center;
}

.reminder-block {
  border: 1px solid #f2c096;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff8f0;
}

.reminder-title {
  margin: 0 0 10px;
  font-weight: 700;
  color: #61351e;
}

.switch-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.option-btn {
  flex: 1;
  margin-bottom: 0;
  padding: 10px 12px;
  background: #f0c9a4;
  color: #7a4624;
  border-radius: 999px;
}

.option-btn.active {
  background: linear-gradient(135deg, #ff8a3d, #ff5b3c);
  color: white;
}

form {
  display: grid;
  gap: 12px;
}

label {
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #f1c79d;
  border-radius: 10px;
  font-size: 1rem;
  box-sizing: border-box;
}

.gender-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.gender-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.message {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-weight: 600;
}

.message.success {
  background: #eaf8ea;
  color: #246b2d;
}

.message.error {
  background: #fdeceb;
  color: #b42318;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
