:root {
  --pet-ink: #473a32;
  --pet-orange: #ee7b4a;
  --pet-orange-dark: #d85f35;
  --pet-cream: #fff8ec;
  --pet-yellow: #ffd86d;
  --pet-mint: #dcefe6;
  --pet-blue: #dce9f8;
  --pet-readable-font: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
}

.pet-profile-entry {
  min-height: 44px;
  padding: 5px 10px 5px 6px;
  border: 1.5px solid rgba(71,58,50,.2);
  border-radius: 999px;
  background: #fffaf1;
  color: var(--pet-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(71,58,50,.12);
  transition: transform .18s ease, box-shadow .18s ease;
  font-family: var(--pet-readable-font);
}

.pet-profile-entry:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 5px 0 rgba(71,58,50,.11); }
.pet-profile-entry:hover .pet-profile-entry__avatar { animation: pet-avatar-wiggle .58s ease; }
.pet-profile-entry:active { transform: translateY(2px) scale(.96); box-shadow: 0 1px 0 rgba(71,58,50,.12); }
.pet-profile-entry:focus-visible { outline: 3px solid rgba(238,123,74,.3); outline-offset: 2px; }
.pet-profile-entry__avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--pet-yellow); display: grid; place-items: center; overflow: hidden; font-size: 18px; transform-origin: 50% 90%; }
.pet-profile-entry__avatar img { width: 100%; height: 100%; object-fit: cover; }
.pet-profile-entry__copy { display: grid; text-align: left; line-height: 1.05; }
.pet-profile-entry__copy small { font-size: 9px; letter-spacing: .08em; color: #90796b; }
.pet-profile-entry__copy b { margin-top: 3px; font-size: 13px; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hero-main-actions { margin-top: 24px; display: flex; align-items: stretch; gap: 13px; flex-wrap: wrap; }
.hero-main-actions .hero-cta { margin: 0; min-height: 72px; align-self: stretch; }
.hero-pet-profile-cta {
  position: relative;
  min-height: 72px;
  min-width: min(330px, 100%);
  padding: 8px 48px 8px 8px;
  border: 1.8px solid var(--pet-ink);
  border-radius: 20px 25px 18px 23px;
  background: linear-gradient(135deg, #fff7df 0 72%, #ffe6a8 72% 100%);
  color: var(--pet-ink);
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  font-family: var(--pet-readable-font);
  box-shadow: 4px 5px 0 rgba(71,58,50,.15);
  cursor: pointer;
  overflow: visible;
  transition: transform .2s cubic-bezier(.2,.9,.3,1.4), box-shadow .2s ease;
}
.hero-pet-profile-cta::before { content: "♡"; position: absolute; right: 15px; top: -10px; color: var(--pet-orange); font-size: 23px; opacity: .75; transform: rotate(12deg); }
.hero-pet-profile-cta::after { content: ""; position: absolute; inset: 5px; border: 1px dashed rgba(238,123,74,.3); border-radius: 15px 19px 14px 18px; pointer-events: none; }
.hero-pet-profile-cta:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: 6px 9px 0 rgba(71,58,50,.12); }
.hero-pet-profile-cta:active { transform: translateY(3px) scale(.97); box-shadow: 1px 1px 0 rgba(71,58,50,.14); }
.hero-pet-profile-cta:hover .hero-pet-profile-cta__avatar { animation: pet-avatar-wiggle .58s ease; }
.hero-pet-profile-cta__avatar { position: relative; z-index: 1; flex: 0 0 54px; width: 54px; height: 54px; border-radius: 50% 46% 52% 45%; background: var(--pet-yellow); display: grid; place-items: center; overflow: hidden; font-size: 27px; transform-origin: 50% 90%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.8); }
.hero-pet-profile-cta__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-pet-profile-cta__copy { position: relative; z-index: 1; min-width: 0; display: grid; }
.hero-pet-profile-cta__copy small { color: var(--pet-orange-dark); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.hero-pet-profile-cta__copy b { margin-top: 2px; font-size: 17px; line-height: 1.25; font-weight: 900; }
.hero-pet-profile-cta__copy em { margin-top: 2px; color: #78675d; font-size: 10px; line-height: 1.3; font-style: normal; }
.hero-pet-profile-cta > i { position: absolute; z-index: 1; right: 15px; bottom: 11px; width: 27px; height: 27px; border-radius: 50%; background: var(--pet-orange); color: #fff; display: grid; place-items: center; font-size: 17px; font-style: normal; transition: transform .2s ease; }
.hero-pet-profile-cta:hover > i { transform: translateX(4px) rotate(-8deg); }
.hero-customize-cta { background: linear-gradient(135deg, #eef5ff 0 72%, #cfe1ff 72% 100%); }
.hero-customize-cta::before { content: "✦"; color: #1558d6; transform: rotate(-8deg); }
.hero-customize-cta::after { border-color: rgba(21,88,214,.28); }
.hero-customize-cta .hero-pet-profile-cta__copy small { color: #1558d6; }
.hero-customize-cta > i { background: #1558d6; }
.hero-customize-cta__avatar { background: #dce9ff; }
.hero-customize-cta:hover { background: linear-gradient(135deg, #e8f1ff 0 72%, #bfd6ff 72% 100%); }

body.has-pet-profile-modal { overflow: hidden; }
.pet-profile-modal[hidden], .pet-profile-dialog [hidden] { display: none !important; }
.pet-profile-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 18px; }
.pet-profile-modal__backdrop { position: absolute; inset: 0; border: 0; background: rgba(53,42,35,.52); backdrop-filter: blur(5px); cursor: default; }
.pet-profile-dialog {
  position: relative;
  width: min(900px, 100%);
  max-height: min(860px, calc(100dvh - 36px));
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--pet-ink);
  background: var(--pet-cream);
  border: 2px solid var(--pet-ink);
  border-radius: 30px 24px 32px 22px;
  box-shadow: 10px 12px 0 rgba(47,38,32,.18);
  scrollbar-width: thin;
  animation: pet-profile-pop .25s cubic-bezier(.2,.8,.2,1);
  font-family: var(--pet-readable-font);
}
.pet-profile-dialog button,
.pet-profile-dialog input,
.pet-profile-dialog select { font-family: var(--pet-readable-font); }
.pet-profile-dialog::before { content: "♡  ·  ᴥ  ·  ♡"; position: absolute; right: 78px; top: 27px; color: var(--pet-orange); font-size: 13px; letter-spacing: 6px; transform: rotate(2deg); }
@keyframes pet-profile-pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.pet-profile-dialog__head { position: sticky; top: 0; z-index: 4; min-height: 82px; padding: 20px 72px 15px 28px; display: flex; align-items: center; background: rgba(255,248,236,.94); border-bottom: 1px dashed rgba(71,58,50,.24); backdrop-filter: blur(10px); }
.pet-profile-kicker { display: block; color: var(--pet-orange-dark); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.pet-profile-dialog__head h2 { margin: 5px 0 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.15; font-weight: 800; letter-spacing: .01em; }
.pet-profile-close { position: absolute; right: 20px; top: 18px; width: 44px; height: 44px; border: 1.5px solid var(--pet-ink); border-radius: 50%; background: #fff; color: var(--pet-ink); font: 28px/1 sans-serif; cursor: pointer; box-shadow: 2px 3px 0 rgba(71,58,50,.14); }
.pet-profile-close::after { content: "♡"; position: absolute; right: -5px; top: -9px; color: var(--pet-orange); font: 800 15px/1 var(--pet-readable-font); opacity: 0; transform: rotate(18deg) scale(.3); }
.pet-profile-close:hover { transform: rotate(8deg); background: #fff2da; }
.pet-profile-close:hover::after { opacity: 1; animation: pet-heart-pop .55s ease; }
.pet-profile-close:active { transform: rotate(-7deg) scale(.9); }

.pet-profile-home { padding: 24px 28px 20px; }
.pet-profile-card { min-height: 310px; padding: 24px; border: 1.5px solid rgba(71,58,50,.35); border-radius: 24px 30px 22px 28px; background: #fff; display: grid; grid-template-columns: minmax(220px, .8fr) 1.2fr; gap: 28px; box-shadow: 5px 6px 0 var(--pet-blue); }
.pet-profile-card__portrait { min-height: 250px; border-radius: 19px 25px 18px 23px; background: linear-gradient(145deg, #ffe4b3, #ffd879); display: grid; place-items: center; overflow: hidden; position: relative; }
.pet-profile-card__portrait::after { content: "♡"; position: absolute; top: 10px; right: 15px; color: #fff; font-size: 32px; transform: rotate(12deg); }
.pet-profile-card__portrait span { font-size: 86px; filter: drop-shadow(0 6px 0 rgba(255,255,255,.6)); }
.pet-profile-card__portrait img { width: 100%; height: 100%; object-fit: cover; }
  .pet-profile-card__body { align-self: center; min-width: 0; }
.pet-profile-card__eyebrow { color: var(--pet-orange-dark); font-size: 12px; font-weight: 900; letter-spacing: .08em; }
.pet-profile-card__body h3 { margin: 7px 0 4px; font-size: clamp(32px, 5vw, 48px); line-height: 1.12; font-weight: 800; letter-spacing: .01em; overflow-wrap: anywhere; }
.pet-profile-card__body > p { margin: 0; color: #806f65; font-size: 14px; }
.pet-profile-facts { margin-top: 23px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pet-profile-facts > div { min-height: 72px; padding: 10px 11px; border-radius: 14px 17px 13px 16px; background: #fff4df; display: grid; align-content: center; }
.pet-profile-facts > div:nth-child(2) { background: var(--pet-mint); }
.pet-profile-facts > div:nth-child(3) { background: var(--pet-blue); }
.pet-profile-facts small { font-size: 10px; color: #807064; }
.pet-profile-facts b { margin-top: 3px; font-size: 14px; line-height: 1.2; }
.pet-profile-card__body .pet-profile-card__note { margin-top: 12px; font-size: 11px; line-height: 1.5; color: #846f61; }
.pet-profile-switcher-wrap { margin-top: 22px; }
.pet-profile-switcher-wrap > span { font-size: 12px; font-weight: 900; }
.pet-profile-switcher { margin-top: 8px; padding: 3px 0 8px; display: flex; gap: 9px; overflow-x: auto; }
.pet-profile-switcher button { flex: 0 0 auto; min-height: 44px; padding: 5px 13px 5px 6px; border: 1px solid rgba(71,58,50,.25); border-radius: 999px; background: #fff; color: inherit; display: inline-flex; align-items: center; gap: 7px; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.pet-profile-switcher button:hover { transform: translateY(-2px) rotate(-1deg); background: #fff7e8; }
.pet-profile-switcher button:hover i { animation: pet-avatar-hop .52s ease; }
.pet-profile-switcher button:active { transform: translateY(1px) scale(.94); }
.pet-profile-switcher button.is-active { border-color: var(--pet-orange); background: #fff0e8; }
.pet-profile-switcher i { width: 32px; height: 32px; border-radius: 50%; background: var(--pet-yellow); display: grid; place-items: center; overflow: hidden; font-style: normal; }
.pet-profile-switcher img { width: 100%; height: 100%; object-fit: cover; }
.pet-profile-home__actions, .pet-profile-editor__actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 10px; }

.pet-profile-button { position: relative; min-height: 48px; padding: 11px 20px; border: 1.5px solid var(--pet-ink); border-radius: 14px 17px 13px 16px; background: var(--pet-orange); color: #fff; font: inherit; font-weight: 900; cursor: pointer; box-shadow: 3px 4px 0 rgba(71,58,50,.16); overflow: visible; transition: transform .18s cubic-bezier(.2,.9,.3,1.4), box-shadow .18s ease, background .18s ease; }
.pet-profile-button::before { content: "🐾"; position: absolute; right: 5px; top: -15px; font-size: 15px; opacity: 0; transform: translateY(8px) rotate(16deg) scale(.4); pointer-events: none; }
.pet-profile-button:hover { background: var(--pet-orange-dark); transform: translateY(-3px) rotate(-.7deg); box-shadow: 4px 7px 0 rgba(71,58,50,.13); }
.pet-profile-button:hover::before { animation: pet-paw-peek .68s ease both; }
.pet-profile-button:active { transform: translateY(3px) scale(.95); box-shadow: 1px 1px 0 rgba(71,58,50,.16); }
.pet-profile-button--ghost { background: #fff; color: var(--pet-ink); }
.pet-profile-button--ghost::before { content: "♡"; color: var(--pet-orange); font-size: 20px; }
.pet-profile-button--ghost:hover { background: #fff2dc; }

.pet-profile-editor { padding: 24px 28px 20px; display: grid; grid-template-columns: 1fr 250px; column-gap: 24px; }
.pet-profile-editor__main { display: grid; grid-template-columns: 170px 1fr; gap: 20px; min-width: 0; }
.pet-profile-photo-block { text-align: center; }
.pet-profile-photo-preview { aspect-ratio: 1; border: 1.5px dashed rgba(71,58,50,.5); border-radius: 50% 47% 52% 45%; background: linear-gradient(145deg, #ffeac0, #ffd778); display: grid; place-items: center; overflow: hidden; }
.pet-profile-photo-preview span { font-size: 62px; }
.pet-profile-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.pet-profile-photo-button { position: relative; min-height: 44px; margin-top: 10px; padding: 9px 10px; border: 1px solid rgba(71,58,50,.36); border-radius: 12px; background: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 900; cursor: pointer; overflow: hidden; transition: transform .18s ease, background .18s ease; }
.pet-profile-photo-button::after { content: ""; position: absolute; inset: -30% auto -30% -45%; width: 30%; background: rgba(255,255,255,.86); transform: rotate(18deg); }
.pet-profile-photo-button:hover { transform: rotate(-1deg) translateY(-2px); background: #fff3d7; }
.pet-profile-photo-button:hover::after { animation: pet-camera-flash .7s ease; }
.pet-profile-photo-button:active { transform: scale(.94); }
.pet-profile-photo-remove { min-height: 44px; margin: 3px auto 0; padding: 8px 10px; border: 0; border-radius: 999px; background: transparent; color: #a1523b; text-decoration: underline; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.pet-profile-photo-remove:hover { background: #ffe5df; transform: rotate(1deg); }
.pet-profile-photo-remove:active { transform: scale(.9); }
.pet-profile-photo-block > small { display: block; margin-top: 6px; color: #78675d; font-size: 11px; line-height: 1.45; }
.pet-profile-fields { display: grid; gap: 14px; align-content: start; }
.pet-profile-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.pet-profile-fieldset legend, .pet-profile-field > span { margin-bottom: 7px; color: var(--pet-ink); font-size: 13px; font-weight: 900; }
.pet-profile-segment, .pet-profile-age-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pet-profile-segment { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pet-profile-segment input, .pet-profile-age-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.pet-profile-segment span, .pet-profile-age-tabs span { position: relative; min-height: 46px; padding: 9px; border: 1.5px solid rgba(71,58,50,.25); border-radius: 12px 15px 11px 14px; background: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 900; cursor: pointer; text-align: center; transition: transform .18s cubic-bezier(.2,.9,.3,1.5), box-shadow .18s ease, background .18s ease; }
.pet-profile-segment span:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 4px 0 rgba(71,58,50,.1); }
.pet-profile-segment label:nth-child(2) span:hover { transform: translateY(-2px) rotate(1deg); }
.pet-profile-segment span:active, .pet-profile-age-tabs span:active { transform: translateY(2px) scale(.94); box-shadow: none; }
.pet-profile-segment input:checked + span, .pet-profile-age-tabs input:checked + span { border-color: var(--pet-orange); background: #fff0e6; box-shadow: inset 0 0 0 1px var(--pet-orange); }
.pet-profile-segment input:checked + span { animation: pet-choice-bounce .42s cubic-bezier(.2,.9,.3,1.5); }
.pet-profile-age-tabs span:hover { transform: translateY(-2px) scale(1.01); background: #fff8e9; }
.pet-profile-age-tabs input:checked + span::after { content: "✦"; position: absolute; right: 8px; top: 4px; color: var(--pet-orange); font-size: 11px; animation: pet-sparkle 1.5s ease-in-out infinite; }
.pet-profile-field { min-width: 0; display: grid; }
.pet-profile-field input, .pet-profile-field select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1.5px solid rgba(71,58,50,.34); border-radius: 11px 14px 10px 13px; background: #fff; color: var(--pet-ink); font: inherit; font-size: 15px; }
.pet-profile-field input:focus, .pet-profile-field select:focus { outline: 3px solid rgba(238,123,74,.2); border-color: var(--pet-orange); }
.pet-profile-field small { margin-top: 5px; color: #78675d; font-size: 11px; line-height: 1.5; }
.pet-profile-age-block { grid-column: 1 / -1; margin-top: 2px; padding: 18px; border: 1px dashed rgba(71,58,50,.35); border-radius: 19px 22px 17px 21px; background: rgba(255,255,255,.55); }
.pet-profile-help { margin: -1px 0 10px; color: #88766a; font-size: 12px; }
.pet-profile-age-tabs span { min-height: 50px; }
.pet-profile-age-panel { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pet-profile-age-panel--split { grid-template-columns: 1fr 1fr; }
.pet-profile-preview { padding: 18px; border: 1.5px solid rgba(71,58,50,.35); border-radius: 21px 25px 18px 23px; background: #fff; text-align: center; box-shadow: 4px 5px 0 var(--pet-mint); align-self: start; }
.pet-profile-preview h3 { margin: 4px 0 8px; font-size: 21px; }
.pet-profile-preview__pet { width: 112px; height: 112px; margin: 0 auto 10px; border-radius: 50%; background: var(--pet-yellow); display: grid; place-items: center; overflow: hidden; font-size: 52px; }
.pet-profile-preview__pet img { width: 100%; height: 100%; object-fit: cover; }
.pet-profile-preview > b { display: block; font-size: 20px; overflow-wrap: anywhere; }
.pet-profile-preview > span:not(.pet-profile-kicker) { display: block; margin-top: 3px; color: #826f63; font-size: 11px; }
.pet-profile-preview__result { margin-top: 12px; padding: 9px; border-radius: 12px; background: #fff3da; display: grid; }
.pet-profile-preview__result:nth-of-type(2) { background: var(--pet-blue); }
.pet-profile-preview__result small { font-size: 11px; color: #766459; }
.pet-profile-preview__result strong { margin-top: 2px; font-size: 15px; }
.pet-profile-preview p { margin: 10px 0 0; color: #776459; font-size: 11px; line-height: 1.5; }
.pet-profile-error { grid-column: 1 / -1; margin: 16px 0 0; padding: 10px 13px; border-radius: 10px; background: #ffe5df; color: #a0392c; font-size: 12px; }
.pet-profile-editor__actions { grid-column: 1 / -1; }
.pet-profile-local-note { padding: 12px 28px calc(12px + env(safe-area-inset-bottom)); border-top: 1px dashed rgba(71,58,50,.24); color: #68584f; background: #fff3dc; font-size: 11px; line-height: 1.5; text-align: center; }

.pet-cute-burst { position: fixed; z-index: 1400; width: 1px; height: 1px; pointer-events: none; }
.pet-cute-burst i { position: absolute; left: 0; top: 0; color: var(--pet-orange); font: normal 800 15px/1 var(--pet-readable-font); opacity: 0; animation: pet-burst-fly .72s ease-out forwards; }
.pet-cute-burst i:nth-child(1) { --pet-burst-x: -27px; --pet-burst-y: -31px; --pet-burst-r: -20deg; }
.pet-cute-burst i:nth-child(2) { --pet-burst-x: 2px; --pet-burst-y: -42px; --pet-burst-r: 12deg; animation-delay: .04s; }
.pet-cute-burst i:nth-child(3) { --pet-burst-x: 29px; --pet-burst-y: -27px; --pet-burst-r: 25deg; animation-delay: .08s; }
.pet-cute-burst i:nth-child(4) { --pet-burst-x: 20px; --pet-burst-y: -7px; --pet-burst-r: 38deg; animation-delay: .02s; }

@keyframes pet-avatar-wiggle { 0%,100% { transform: rotate(0) } 25% { transform: rotate(-12deg) scale(1.08) } 55% { transform: rotate(10deg) scale(1.1) } 75% { transform: rotate(-5deg) } }
@keyframes pet-avatar-hop { 0%,100% { transform: translateY(0) } 45% { transform: translateY(-7px) rotate(-6deg) } 70% { transform: translateY(1px) rotate(4deg) } }
@keyframes pet-heart-pop { 0% { opacity: 0; transform: translateY(6px) rotate(18deg) scale(.3) } 55% { opacity: 1; transform: translateY(-4px) rotate(8deg) scale(1.25) } 100% { opacity: 1; transform: translateY(0) rotate(18deg) scale(1) } }
@keyframes pet-paw-peek { 0% { opacity: 0; transform: translateY(8px) rotate(16deg) scale(.4) } 55% { opacity: 1; transform: translateY(-5px) rotate(-8deg) scale(1.2) } 100% { opacity: 1; transform: translateY(0) rotate(8deg) scale(1) } }
@keyframes pet-camera-flash { 0% { left: -45%; opacity: 0 } 30% { opacity: .95 } 100% { left: 125%; opacity: 0 } }
@keyframes pet-choice-bounce { 0% { transform: scale(.94) } 60% { transform: scale(1.06) rotate(-1deg) } 100% { transform: scale(1) } }
@keyframes pet-sparkle { 0%,100% { opacity: .35; transform: rotate(0) scale(.75) } 50% { opacity: 1; transform: rotate(25deg) scale(1.2) } }
@keyframes pet-burst-fly { 0% { opacity: 0; transform: translate(0,0) rotate(0) scale(.5) } 25% { opacity: 1 } 100% { opacity: 0; transform: translate(var(--pet-burst-x),var(--pet-burst-y)) rotate(var(--pet-burst-r)) scale(1.15) } }

@media (max-width: 760px) {
  .pet-profile-entry { padding-right: 6px; }
  .pet-profile-entry__copy small { display: none; }
  .pet-profile-entry__copy b { max-width: 52px; font-size: 11px; }
  .hero-main-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-pet-profile-cta { width: 100%; min-width: 0; }
  .hero-main-actions .hero-cta { width: 100%; min-height: 58px; }
  .pet-profile-modal { place-items: end center; padding: 0; }
  .pet-profile-dialog { width: 100%; max-height: 94dvh; border-width: 1.5px 0 0; border-radius: 26px 26px 0 0; box-shadow: 0 -8px 32px rgba(47,38,32,.2); }
  .pet-profile-dialog::before { display: none; }
  .pet-profile-dialog__head { min-height: 70px; padding: 15px 66px 13px 18px; }
  .pet-profile-close { right: 13px; top: 12px; }
  .pet-profile-home { padding: 16px 16px 18px; }
  .pet-profile-card { min-height: 0; padding: 15px; grid-template-columns: 92px 1fr; gap: 14px; border-radius: 20px; box-shadow: 4px 5px 0 var(--pet-blue); }
  .pet-profile-card__portrait { min-height: 108px; align-self: start; }
  .pet-profile-card__portrait span { font-size: 45px; }
  .pet-profile-card__portrait::after { font-size: 20px; }
  .pet-profile-card__body { display: contents; }
  .pet-profile-card__eyebrow { font-size: 9px; }
  .pet-profile-card__body .pet-profile-card__eyebrow { grid-column: 2; align-self: end; }
  .pet-profile-card__body h3 { grid-column: 2; margin: 2px 0 0; font-size: 28px; align-self: center; }
  .pet-profile-card__body > p:not(.pet-profile-card__note) { grid-column: 2; align-self: start; font-size: 12px; }
  .pet-profile-facts { grid-column: 1 / -1; margin-top: 7px; grid-template-columns: 1fr; gap: 6px; }
  .pet-profile-facts > div { min-height: 54px; grid-template-columns: 88px 1fr; align-items: center; }
  .pet-profile-facts b { margin-top: 0; }
  .pet-profile-card__body .pet-profile-card__note { grid-column: 1 / -1; }
  .pet-profile-home__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .pet-profile-button { padding-inline: 12px; font-size: 13px; }
  .pet-profile-editor { padding: 16px; grid-template-columns: 1fr; gap: 18px; }
  .pet-profile-editor__main { grid-template-columns: 102px 1fr; gap: 13px; }
  .pet-profile-photo-button { padding-inline: 4px; font-size: 10px; line-height: 1.25; }
  .pet-profile-photo-block > small { display: none; }
  .pet-profile-fields { gap: 11px; }
  .pet-profile-segment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pet-profile-fieldset legend, .pet-profile-field > span { font-size: 12px; }
  .pet-profile-field input, .pet-profile-field select { min-height: 46px; font-size: 16px; }
  .pet-profile-age-block { padding: 14px; }
  .pet-profile-age-tabs { grid-template-columns: 1fr; }
  .pet-profile-age-panel { grid-template-columns: 1fr; }
  .pet-profile-age-panel--split { grid-template-columns: 1fr 1fr; }
  .pet-profile-preview { display: grid; grid-template-columns: 68px 1fr; text-align: left; gap: 3px 12px; }
  .pet-profile-preview .pet-profile-kicker, .pet-profile-preview h3 { grid-column: 1 / -1; }
  .pet-profile-preview h3 { margin-bottom: 6px; }
  .pet-profile-preview__pet { grid-row: span 2; width: 68px; height: 68px; margin: 0; font-size: 34px; }
  .pet-profile-preview > b { align-self: end; font-size: 18px; }
  .pet-profile-preview > span:not(.pet-profile-kicker) { align-self: start; }
  .pet-profile-preview__result, .pet-profile-preview p { grid-column: 1 / -1; }
  .pet-profile-editor__actions { position: sticky; bottom: 0; z-index: 3; margin: 0 -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255,248,236,.96); box-shadow: 0 -8px 18px rgba(71,58,50,.07); display: grid; grid-template-columns: .8fr 1.2fr; }
  .pet-profile-local-note { padding-inline: 16px; }
}

@media (max-width: 420px) {
  .pet-profile-card { grid-template-columns: 78px 1fr; }
  .pet-profile-card__portrait { min-height: 94px; }
  .pet-profile-editor__main { grid-template-columns: 86px 1fr; }
  .pet-profile-segment span { padding-inline: 4px; font-size: 11px; }
}

@media (max-width: 360px) {
  .site-header { padding-inline: 10px; gap: 7px; }
  .site-header .brand { min-width: auto; }
  .site-header .brand b { display: none; }
  .site-header .brand-mark { width: 48px; }
  .header-actions { gap: 6px; }
  .pet-profile-entry__copy b { max-width: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .pet-profile-dialog { animation: none; }
  .pet-profile-entry, .pet-profile-button { transition: none; }
  .pet-cute-burst { display: none; }
  .pet-profile-entry:hover .pet-profile-entry__avatar,
  .hero-pet-profile-cta:hover .hero-pet-profile-cta__avatar,
  .pet-profile-switcher button:hover i,
  .pet-profile-button:hover::before,
  .pet-profile-photo-button:hover::after,
  .pet-profile-segment input:checked + span,
  .pet-profile-age-tabs input:checked + span::after { animation: none; }
}
