@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-ui: Vazirmatn, Tahoma, Arial, sans-serif;
  --bg: #fff7d6;
  --paper: #fffdf2;
  --ink: #111111;
  --muted: #5b5549;
  --line: #111111;
  --pink: #ff5a7a;
  --yellow: #ffe66d;
  --blue: #53d8fb;
  --green: #66e28a;
  --orange: #ff9f1c;
  --purple: #b896ff;
  --red: #ff3b3b;
  --shadow: 7px 7px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --radius: 12px;
}

* { box-sizing: border-box; }
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  scroll-behavior: smooth;
}
[hidden] { display: none !important; }
body {
  margin: 0;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  font-family: var(--font-ui);
  background:
    linear-gradient(90deg, rgba(17,17,17,.05) 1px, transparent 1px),
    linear-gradient(rgba(17,17,17,.05) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
  color: var(--ink);
  line-height: 1.75;
  padding-bottom: 96px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}
button, input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(38px, 7vw, 76px); line-height: 1.05; letter-spacing: 0; }
h2 { font-size: clamp(24px, 4vw, 38px); line-height: 1.15; }

.site-main { width: min(1120px, calc(100vw - 24px)); max-width: 100%; margin: 0 auto; padding: 22px 0 56px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 12px clamp(12px, 4vw, 42px);
  background: rgba(255, 247, 214, .94);
  border-bottom: 4px solid var(--ink);
  backdrop-filter: blur(10px);
}
.brand, .nav-links, .nav-account, .user-chip, .hero-actions, .profile-actions, .card-actions, .status-row, .switches, .mini-stats, .feed-owner, .post-head, .owner-link {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.brand { font-size: 23px; font-weight: 1000; }
.brand-mark {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 50%;
  background: var(--pink); box-shadow: var(--shadow-sm); color: #fff;
}
.nav-links { justify-content: flex-start; font-weight: 900; min-width: 0; }
.nav-account { justify-content: flex-end; flex-wrap: nowrap; }
.nav-links > a {
  padding: 8px 12px; border: 3px solid transparent; border-radius: 999px;
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}
.nav-links > a:hover, .nav-links > a.is-active { background: var(--yellow); border-color: var(--ink); box-shadow: var(--shadow-sm); transform: translate(-2px, -2px); }
.nav-action { background: var(--ink); color: #fff; border-color: var(--ink) !important; }
.user-chip { background: var(--paper); border: 3px solid var(--ink) !important; box-shadow: var(--shadow-sm); }
.bottom-nav {
  position: fixed; right: 50%; bottom: 14px; transform: translateX(50%); z-index: 80;
  width: min(318px, calc(100vw - 32px)); height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  border: 3px solid var(--ink); border-radius: 999px; background: rgba(255, 253, 242, .98);
  box-shadow: 5px 5px 0 var(--ink); padding: 7px 14px; backdrop-filter: blur(14px);
}
.bottom-nav-item {
  width: 46px; height: 46px; justify-self: center; display: inline-grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 50%; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  font-weight: 1000; transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}
.bottom-icon { width: 24px; height: 24px; display: block; fill: none; stroke: var(--ink); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-brand {
  width: 60px; height: 60px; display: grid; place-items: center;
  border-radius: 50%; background: transparent;
  transition: transform .14s ease, box-shadow .14s ease;
}
.bottom-brand-mark { width: 52px; height: 52px; font-size: 27px; border-width: 3px; box-shadow: 4px 4px 0 var(--ink); }
.bottom-nav-item.is-active, .bottom-brand.is-active {
  background: var(--blue); border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: translate(-1px, -1px);
}
.bottom-brand.is-active { background: transparent; border-color: transparent; box-shadow: none; }
.bottom-nav-item:hover, .bottom-brand:hover { transform: translate(-1px, -1px); }
.bottom-nav-item .avatar-mini { width: 30px; height: 30px; border-width: 2px; }
.avatar-mini, .avatar-sm, .avatar-lg, .avatar-xl, .circle-photo, .profile-photo { border-radius: 50%; object-fit: cover; border: 4px solid var(--ink); background: var(--yellow); }
.avatar-mini, .avatar-sm, .avatar-lg, .avatar-xl, .circle-photo, .profile-photo { cursor: zoom-in; }
.bottom-nav .avatar-mini, .avatar-editor .avatar-xl { cursor: pointer; }
.avatar-mini { width: 28px; height: 28px; border-width: 2px; }
.avatar-sm { width: 42px; height: 42px; border-width: 3px; }
.avatar-lg { width: 92px; height: 92px; }
.avatar-xl { width: 170px; height: 170px; box-shadow: var(--shadow); }

.footer { text-align: center; padding: 28px; border-top: 4px solid var(--ink); background: var(--paper); font-weight: 800; }
.flash, .error {
  border: 4px solid var(--ink); box-shadow: var(--shadow-sm); border-radius: var(--radius);
  padding: 13px 16px; margin-bottom: 14px; font-weight: 900;
}
.flash-success { background: var(--green); }
.flash-error, .error { background: #ffd0d0; }

.btn {
  min-height: 50px; border: 4px solid var(--ink); border-radius: var(--radius);
  padding: 10px 18px; display: inline-flex; justify-content: center; align-items: center;
  font: inherit; font-size: 16px; font-weight: 1000; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:disabled { opacity: .65; cursor: wait; transform: none; }
.btn-primary { background: var(--pink); color: #fff; }
.btn-soft { background: var(--blue); color: var(--ink); }
.btn-danger { background: var(--red); color: #fff; }
.btn-tiny { min-height: 36px; padding: 5px 10px; font-size: 13px; border-width: 3px; box-shadow: 3px 3px 0 var(--ink); width: auto; }
.btn-ghost { background: #fff; color: var(--ink); }

.hero, .dashboard-hero, .feed-hero, .parent-hero, .pet-profile-hero, .form-hero {
  border: 5px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow);
  background: var(--paper); padding: clamp(20px, 5vw, 42px); margin-bottom: 28px;
}
.hero { min-height: 500px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 28px; background: linear-gradient(135deg, var(--paper) 0 58%, var(--yellow) 58%); }
.hero p, .page-head p, .dashboard-hero p, .feed-hero p, .form-hero p, .profile-meta, .muted, .hint { color: var(--muted); font-size: 18px; font-weight: 700; }
.username-chip {
  display: inline-flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%;
  margin: 4px 0 10px; direction: ltr; unicode-bidi: isolate;
  border: 3px solid var(--ink); border-radius: 999px; background: #fff;
  box-shadow: 3px 3px 0 var(--ink); padding: 3px 11px;
  color: var(--ink); font-size: 14px; font-weight: 1000; line-height: 1.45;
  text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.username-inline {
  direction: ltr; unicode-bidi: isolate; display: inline-block;
  text-align: left; font-weight: 1000;
}
.bidi-token {
  direction: ltr; unicode-bidi: isolate; display: inline-block;
  text-align: left;
}
.profile-dashboard-main > div,
.parent-hero > div,
.profile-info {
  min-width: 0; width: 100%; justify-self: stretch; text-align: right;
}
.profile-dashboard-main > div { display: grid; justify-items: start; align-content: start; gap: 5px; }
.profile-dashboard-main h1 {
  max-width: 100%; overflow-wrap: anywhere; word-break: normal; margin-top: 0;
}
.owner-dashboard-hero .profile-dashboard-main > div { padding-left: 104px; }
.profile-bio {
  display: block; width: 100%; margin: 8px 0 0;
  unicode-bidi: plaintext; text-align: right; overflow-wrap: anywhere;
}
.profile-card-bio {
  grid-column: 1 / -1; justify-self: stretch;
  display: grid; gap: 8px; margin: -2px 0 0; padding: 0; text-align: right;
}
.profile-link-chip {
  display: inline-flex; width: fit-content; max-width: 100%; justify-self: start;
  border: 3px solid var(--ink); border-radius: 999px; background: var(--green);
  box-shadow: 3px 3px 0 var(--ink); padding: 4px 11px;
  direction: ltr; unicode-bidi: isolate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 1000;
}
.edit-profile-card { gap: 18px; }
.edit-profile-card .form-grid label:last-child { grid-column: 1 / -1; }
.edit-profile-head { text-align: center; display: grid; justify-items: center; gap: 6px; }
.edit-profile-head h1 { margin: 0; font-size: clamp(34px, 8vw, 56px); }
.avatar-editor { display: grid; justify-items: center; gap: 10px; }
.avatar-edit-frame { position: relative; width: 164px; height: 164px; }
.avatar-edit-frame .avatar-xl { width: 164px; height: 164px; box-shadow: 5px 5px 0 var(--ink); }
.avatar-edit-button {
  position: absolute; left: 4px; bottom: 4px; width: 44px; height: 44px;
  display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 50%;
  background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}
.avatar-edit-button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.avatar-edit-button svg {
  width: 21px; height: 21px; fill: none; stroke: var(--ink);
  stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 900; }
.username-status.is-ok { color: #046a25; }
.username-status.is-bad { color: var(--red); }
.crop-modal[hidden] { display: none; }
.crop-modal { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 16px; }
.crop-backdrop { position: absolute; inset: 0; background: rgba(17,17,17,.38); backdrop-filter: blur(8px); }
.crop-card {
  position: relative; width: min(430px, 100%); display: grid; gap: 14px;
  border: 5px solid var(--ink); border-radius: 24px; background: var(--paper);
  box-shadow: 9px 9px 0 var(--ink); padding: 16px;
}
.crop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 1000; }
.crop-stage {
  position: relative; width: min(300px, 74vw); aspect-ratio: 1; margin: 0 auto;
  overflow: hidden; border: 5px solid var(--ink); border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); touch-action: none; cursor: grab;
}
.crop-stage:active { cursor: grabbing; }
.crop-stage img {
  position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: center center;
  user-select: none; pointer-events: none;
}
.crop-zoom-label { display: grid; gap: 8px; font-weight: 1000; }
.crop-zoom-label input { accent-color: var(--pink); }
.crop-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.eyebrow, .badge, .sticker, .code-badge, .pill, .badge-inline {
  display: inline-flex; width: fit-content; align-items: center; justify-content: center;
  border: 3px solid var(--ink); border-radius: 999px; padding: 5px 12px;
  background: var(--yellow); box-shadow: var(--shadow-sm); font-weight: 1000; font-size: 13px;
}
.hero-visual {
  min-height: 340px; position: relative; overflow: hidden;
  border: 5px solid var(--ink); border-radius: 18px; background: var(--blue); box-shadow: var(--shadow);
}
.pet-bubble { position: absolute; right: 42px; top: 42px; font-size: 124px; filter: drop-shadow(5px 5px 0 #111); }
.mini-card {
  position: absolute; inset: auto 22px 22px 22px; background: var(--paper);
  border: 4px solid var(--ink); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}

.feature-grid, .pet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.dashboard-pets-head + .pet-grid,
.parent-pet-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 235px));
  justify-content: center;
  align-items: start;
}
.feature-card, .pet-card, .form-card, .soft-box, .empty-state, .post-card, .health-item, .lost-alert, .brutal-card, .feed-card, .story-card, .digital-card {
  background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
}
.feature-card { padding: 20px; }
.feature-card:nth-child(1), .story-card:nth-child(3n+1) { background: var(--yellow); }
.feature-card:nth-child(2), .story-card:nth-child(3n+2) { background: var(--blue); }
.feature-card:nth-child(3), .story-card:nth-child(3n+3) { background: var(--green); }
.feature-card span { font-size: 30px; font-weight: 1000; }
.page-head, .section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 28px 0 16px; }
.section-title span { font-weight: 900; color: var(--muted); }

.pet-card { overflow: hidden; transition: transform .14s ease, box-shadow .14s ease; }
.clickable-pet-card { position: relative; }
.clickable-pet-card .pet-card-main-link { position: absolute; inset: 0; z-index: 1; }
.clickable-pet-card .card-actions,
.clickable-pet-card .pet-card-icon-action { position: relative; z-index: 2; }
.link-card:hover, .pet-card:hover, .feed-card:hover, .story-card:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--ink); }
.pet-card > img { width: 100%; aspect-ratio: 1; object-fit: cover; margin: 18px auto 0; width: calc(100% - 36px); }
.pet-type-ribbon {
  display: block; width: fit-content; max-width: calc(100% - 52px); margin: -7px auto 0; position: relative; z-index: 2;
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink); padding: 2px 10px; text-align: center; font-size: 12px; font-weight: 1000;
  pointer-events: none;
}
.pet-card-body { padding: 16px; }
.pet-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dashboard-card .pet-card-top { display: block; text-align: center; }
.dashboard-card .pet-card-top h2 { margin-bottom: 0; overflow-wrap: anywhere; }
.mini-stats { gap: 8px; margin: 12px 0; }
.mini-stats span, .feed-stats span {
  border: 3px solid var(--ink); background: #fff; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 900;
}
.ok { color: #046a25; font-weight: 1000; }
.danger { color: var(--red); font-weight: 1000; }
.card-actions { margin-top: 12px; }
.card-actions a { border-bottom: 3px solid var(--ink); font-weight: 1000; }
.pet-card-icon-actions { justify-content: center; gap: 9px; flex-wrap: nowrap; }
.pet-card-icon-action {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border: 3px solid var(--ink) !important; border-radius: 50%; background: #fff;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}
.pet-card-icon-action:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.pet-card-icon-action svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round;
}
.post-icon-action { background: var(--green); }
.edit-icon-action { background: var(--yellow); }

.empty-state { text-align: center; padding: 34px 18px; }
.brutal-empty { background: var(--purple); }
.empty-icon {
  width: 96px; height: 96px; margin: 0 auto 14px; display: grid; place-items: center;
  border: 5px solid var(--ink); border-radius: 50%; background: var(--yellow);
  box-shadow: var(--shadow-sm); font-size: 24px; font-weight: 1000;
}

.auth-box, .form-wrap, .card-page { max-width: 760px; margin: 0 auto; }
.auth-screen {
  min-height: calc(100svh - 160px); display: grid; align-items: center;
  width: min(100%, calc(100vw - 24px), 760px); margin: 0 auto; padding: 8px 0 18px;
}
.auth-panel {
  position: relative; overflow: hidden; display: grid; gap: 16px;
  border: 5px solid var(--ink); border-radius: 28px; background: var(--paper);
  box-shadow: var(--shadow); padding: clamp(18px, 5vw, 30px);
}
.auth-panel::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 142px;
  background: linear-gradient(135deg, var(--yellow) 0 52%, var(--blue) 52%);
  border-bottom: 5px solid var(--ink); z-index: 0;
}
.auth-panel > * { position: relative; z-index: 1; }
.auth-art {
  min-height: 164px; display: grid; place-items: center; isolation: isolate;
}
.auth-brand-badge {
  width: 110px; height: 110px; display: grid; place-items: center;
  border: 5px solid var(--ink); border-radius: 50%; background: var(--pink); color: #fff;
  box-shadow: 7px 7px 0 var(--ink); font-size: 58px; font-weight: 1000; line-height: 1;
}
.auth-orbit {
  position: absolute; border: 4px solid var(--ink); border-radius: 999px; background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}
.auth-orbit-one { width: 54px; height: 54px; right: clamp(18px, 8vw, 72px); top: 32px; background: var(--green); }
.auth-orbit-two { width: 40px; height: 40px; left: clamp(22px, 10vw, 88px); top: 92px; background: var(--purple); }
.auth-paw {
  position: absolute; left: clamp(18px, 7vw, 58px); top: 24px;
  border: 4px solid var(--ink); border-radius: 999px; background: #fff;
  box-shadow: 4px 4px 0 var(--ink); padding: 4px 11px; font-weight: 1000; letter-spacing: 0;
}
.auth-content { display: grid; justify-items: start; gap: 6px; text-align: right; }
.auth-content h1 { margin: 0; font-size: clamp(38px, 10vw, 58px); line-height: 1.03; }
.auth-content p { margin: 0; color: var(--muted); font-size: 16px; font-weight: 900; }
.auth-form { display: grid; gap: 14px; }
.auth-form input {
  border-radius: 16px; min-height: 58px; font-size: 20px; text-align: left;
  direction: ltr; letter-spacing: 0;
}
.auth-form label small { color: var(--muted); font-size: 12px; font-weight: 900; }
.auth-submit { min-height: 56px; border-radius: 16px; font-size: 18px; }
.auth-note {
  margin: 0; border: 3px solid var(--ink); border-radius: 16px; background: #fff;
  box-shadow: 3px 3px 0 var(--ink); padding: 9px 11px; color: var(--muted);
  font-size: 13px; font-weight: 950; text-align: center;
}
.otp-preview {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
  border: 4px solid var(--ink); border-radius: 20px; background: var(--green);
  box-shadow: 5px 5px 0 var(--ink); padding: 12px;
}
.otp-preview span { font-weight: 1000; color: var(--ink); }
.otp-preview strong {
  border: 4px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 5px 12px; font-size: 24px; font-weight: 1000; letter-spacing: 4px;
}
.otp-input { text-align: center !important; font-size: 28px !important; font-weight: 1000 !important; letter-spacing: 8px !important; }
.auth-back-link {
  justify-self: center; border-bottom: 3px solid var(--ink); font-weight: 1000;
}
.form-card { padding: 22px; display: grid; gap: 16px; }
.pet-profile-form { gap: 18px; }
.pet-form-head { display: grid; justify-items: center; gap: 6px; text-align: center; }
.pet-form-head h1 { margin: 0; font-size: clamp(34px, 8vw, 54px); }
.pet-photo-editor {
  border: 4px solid var(--ink); border-radius: 22px; box-shadow: 5px 5px 0 var(--ink);
  background: linear-gradient(135deg, var(--green) 0 42%, #fff 42%);
  padding: 18px 14px 14px; margin-bottom: 2px;
}
.pet-edit-frame,
.pet-edit-frame .avatar-xl {
  width: 172px; height: 172px;
}
.pet-edit-frame .avatar-xl {
  object-fit: cover; background: #fff; border: 4px solid var(--ink);
}
.post-compose-card { gap: 18px; }
.post-compose-head {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 14px;
  border: 4px solid var(--ink); border-radius: 22px; box-shadow: 5px 5px 0 var(--ink);
  background: linear-gradient(135deg, var(--yellow) 0 34%, #fff 34%);
  padding: 12px;
}
.post-compose-head .avatar-lg { width: 76px; height: 76px; box-shadow: 3px 3px 0 var(--ink); }
.post-compose-head h1 { margin: 4px 0 2px; font-size: clamp(28px, 7vw, 42px); }
.post-compose-head p { margin: 0; color: var(--muted); font-weight: 1000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-upload-box {
  position: relative; min-height: 260px; display: grid; place-items: center; overflow: hidden;
  border: 4px dashed var(--ink); border-radius: 24px; box-shadow: 5px 5px 0 var(--ink);
  background:
    linear-gradient(90deg, rgba(17,17,17,.06) 1px, transparent 1px),
    linear-gradient(rgba(17,17,17,.06) 1px, transparent 1px),
    #fff;
  background-size: 24px 24px;
  cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.post-upload-box:hover { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 var(--ink); background-color: #fffdf2; }
.post-upload-preview {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.post-upload-empty {
  position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px;
  width: min(calc(100% - 28px), 320px); text-align: center;
  border: 3px solid var(--ink); border-radius: 20px; box-shadow: 4px 4px 0 var(--ink);
  background: var(--paper); padding: 18px 14px;
}
.post-upload-box.has-preview .post-upload-empty {
  align-self: end; margin-bottom: 12px; width: min(calc(100% - 24px), 360px);
  background: rgba(255,253,242,.93);
}
.post-upload-empty svg {
  width: 42px; height: 42px; fill: none; stroke: var(--ink);
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.post-upload-empty strong { font-size: 18px; }
.post-upload-empty small { color: var(--muted); font-weight: 1000; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.full { grid-column: 1 / -1; }
label, .field-group { display: grid; gap: 7px; font-weight: 1000; }
.field-label { font-weight: 1000; }
input, select, textarea {
  width: 100%; min-height: 52px; border: 4px solid var(--ink); border-radius: 10px;
  padding: 10px 12px; background: #fff; color: var(--ink); font: inherit; font-weight: 800;
  box-shadow: 3px 3px 0 var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 4px solid var(--blue); }
textarea { resize: vertical; }
small { color: var(--muted); font-weight: 800; }
.date-triplet { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 10px; }
.check { display: flex; grid-template-columns: none; align-items: center; gap: 10px; }
.check input { width: 22px; min-height: 22px; box-shadow: none; }
.profile-edit-row { display: grid; grid-template-columns: 100px 1fr; gap: 16px; align-items: center; }

.feed-hero { background: linear-gradient(135deg, var(--pink) 0 45%, var(--paper) 45%); color: var(--ink); }
.rail-section { margin-bottom: 18px; }
.story-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 176px; gap: 14px; overflow-x: auto; padding: 4px 8px 14px; scroll-snap-type: x mandatory; }
.story-card { scroll-snap-align: start; min-height: 270px; padding: 10px; display: grid; grid-template-rows: 38px 1fr 38px; gap: 8px; text-align: center; }
.story-card a { display: grid; gap: 8px; }
.pet-card-parent {
  height: 38px; display: flex !important; grid-template-columns: none; align-items: center; justify-content: flex-start;
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 4px 7px; text-align: right; font-size: 12px; font-weight: 1000; overflow: hidden;
}
.pet-card-parent .avatar-mini { flex: 0 0 auto; }
.pet-card-parent span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-discovery-main { min-height: 156px; align-content: start; }
.pet-discovery-photo { width: 104px; height: 104px; object-fit: cover; border: 4px solid var(--ink); border-radius: 50%; margin: 0 auto; background: var(--paper); }
.pet-card-actions { display: flex; justify-content: center; gap: 7px; align-items: center; flex-wrap: nowrap; }
.pet-card-actions .inline-form { width: auto; }
.story-follow, .story-follow .btn { justify-self: center; width: auto; }
.feed-list { display: grid; max-width: 760px; margin: 0 auto; gap: 22px; }
.feed-card { overflow: hidden; }
.feed-owner { padding: 14px; border-bottom: 4px solid var(--ink); background: var(--yellow); font-weight: 1000; justify-content: space-between; }
.feed-owner-link { display: flex; align-items: center; gap: 10px; }
.feed-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #fff; }
.feed-body { padding: 16px; display: grid; gap: 10px; }
.feed-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.caption { font-size: 17px; font-weight: 800; }
.inline-hashtag {
  display: inline; color: var(--ink); font-weight: 1000;
  text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--green);
  text-underline-offset: 4px;
}
.inline-hashtag:active { color: var(--pink); }

.pet-profile-hero { display: grid; grid-template-columns: 280px 1fr; align-items: center; gap: 28px; background: linear-gradient(135deg, var(--blue) 0 36%, var(--paper) 36%); }
.app-pet-hero {
  grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start;
  padding: clamp(16px, 4vw, 24px); border-width: 4px; border-radius: 26px;
  background:
    linear-gradient(135deg, var(--yellow) 0 28%, transparent 28%),
    linear-gradient(315deg, rgba(83,216,251,.55) 0 28%, transparent 28%),
    var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
}
.pet-avatar-wrap { position: relative; width: min(280px, 100%); margin: 0 auto; }
.app-pet-hero .pet-avatar-wrap { width: min(260px, 100%); padding-bottom: 16px; }
.profile-photo { width: 100%; aspect-ratio: 1; }
.app-pet-hero .profile-photo { border-width: 4px; box-shadow: 5px 5px 0 var(--ink); background: #fff; }
.code-badge { position: absolute; right: 50%; transform: translateX(50%); bottom: -12px; background: var(--pink); color: #fff; }
.app-pet-hero .code-badge { bottom: -8px; font-size: 12px; padding: 4px 10px; box-shadow: 3px 3px 0 var(--ink); }
.profile-info h1 { margin: 8px 0 10px; }
.app-pet-hero .profile-info { display: grid; gap: 10px; }
.pet-title-row { min-width: 0; display: grid; justify-items: start; gap: 7px; }
.pet-title-row h1 {
  max-width: 100%; margin: 0; font-size: clamp(42px, 8vw, 74px);
  overflow-wrap: anywhere; line-height: 1;
}
.pet-hero-meta { margin: -2px 0 0; font-size: 15px; }
.app-pet-hero .profile-bio { margin-top: 0; font-size: 16px; line-height: 1.9; }
.pet-hero-bio {
  grid-column: 1 / -1; width: 100%; margin: 0;
  border: 3px solid var(--ink); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink);
  background: #fff; padding: 11px 13px; text-align: right;
}
.bio { font-size: 18px; font-weight: 800; }
.pet-photo-actions {
  position: absolute; left: 8px; top: 8px; z-index: 4; display: grid; gap: 7px;
}
.pet-photo-action {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink); color: var(--ink); cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.pet-photo-action:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); background: #fff; }
.pet-photo-action svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.pet-photo-actions .pet-photo-action:nth-child(2) { background: var(--green); }
.pet-photo-actions .pet-photo-action:nth-child(3),
.pet-photo-actions .pet-photo-action:last-child { background: var(--blue); }
.stats-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0;
}
.stats-strip.compact-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 360px; }
.app-pet-hero .compact-stats {
  max-width: 330px; margin: 2px 0 0; gap: 8px;
}
.app-pet-hero .compact-stats .stat-card {
  border-width: 3px; border-radius: 16px; box-shadow: 3px 3px 0 var(--ink); padding: 9px;
}
.stats-strip div {
  background: #fff; border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 12px; display: grid; gap: 2px;
}
.stats-strip .stat-card {
  background: #fff; border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 12px; display: grid; gap: 2px; min-width: 0; text-align: center;
}
.stats-strip a.stat-card, .stats-strip button.stat-card {
  color: var(--ink); font: inherit; text-align: center; cursor: pointer;
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}
.stats-strip button.stat-card { appearance: none; -webkit-appearance: none; }
.stats-strip .stat-link:hover {
  background: var(--yellow); transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink);
}
.stats-strip strong { font-size: 22px; font-weight: 1000; overflow-wrap: anywhere; text-align: center; }
.stats-strip span { color: var(--muted); font-weight: 900; font-size: 12px; text-align: center; }
.pet-quick-stats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px;
}
.pet-quick-stat {
  min-width: 96px; display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: center; gap: 6px;
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 5px 11px; color: var(--ink); font: inherit; cursor: default;
}
a.pet-quick-stat,
button.pet-quick-stat { cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, background .14s ease; }
a.pet-quick-stat:hover,
button.pet-quick-stat:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); background: var(--yellow); }
.pet-quick-stat strong { font-size: 20px; font-weight: 1000; line-height: 1; }
.pet-quick-stat span { color: var(--muted); font-size: 12px; font-weight: 1000; }
.profile-layout { display: grid; grid-template-columns: 330px 1fr; gap: 22px; align-items: start; }
.profile-sidebar { display: grid; gap: 18px; }
.brutal-card { padding: 16px; }
.owner-link { margin: 14px 0; }
.owner-link strong { display: block; font-size: 20px; }
.owner-link small { color: var(--muted); font-weight: 900; }
.vet-card { background: var(--green); }
.health-panel { background: var(--yellow); }
.lost-alert, .brutal-alert { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: #ffd0d0; margin-bottom: 20px; padding: 18px; }

.timeline { min-width: 0; }
.pet-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.pet-hero-actions .inline-form { width: auto; }
.pet-hero-actions .btn {
  min-height: 40px; width: auto; padding: 6px 12px; border-width: 3px;
  border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); font-size: 13px;
}
.pet-tab-panel { max-width: 760px; margin: 0 auto; }
.social-post { margin-bottom: 18px; overflow: hidden; }
.pet-view-post {
  border-radius: 22px; border-width: 4px; box-shadow: 6px 6px 0 var(--ink); background: #fff;
}
.pet-view-post .post-head {
  background: var(--yellow); padding: 12px;
}
.post-head { padding: 14px; border-bottom: 4px solid var(--ink); background: var(--paper); }
.post-head time { display: block; color: var(--muted); font-size: 13px; font-weight: 900; }
.post-image { width: 100%; max-height: 620px; object-fit: cover; border-bottom: 4px solid var(--ink); }
.post-card .caption { padding: 16px; margin: 0; white-space: pre-line; }
.health-item { box-shadow: var(--shadow-sm); padding: 12px; margin: 12px 0; background: #fff; display: grid; gap: 2px; }
.health-item span { color: var(--red); font-weight: 1000; }
.health-item small { color: var(--muted); font-weight: 800; }
.microchip-line { font-weight: 1000; border: 3px solid var(--ink); background: var(--yellow); box-shadow: var(--shadow-sm); border-radius: 999px; padding: 5px 12px; width: fit-content; }
.post-head { justify-content: space-between; }
.post-head-main, .post-owner-tools {
  min-width: 0; display: inline-flex; align-items: center; gap: 9px;
}
.post-owner-tools { margin-inline-start: auto; flex: 0 0 auto; }
.post-owner-tools .inline-form { width: auto; }
.post-action-bar { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: nowrap; padding: 10px; border-top: 4px solid var(--ink); background: var(--blue); direction: rtl; }
.post-action-bar .inline-form { width: auto; flex: 0 0 auto; }
.post-action, .mini-action {
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 5px 10px; font: inherit; font-weight: 1000; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; line-height: 1;
}
.action-icon {
  width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor;
  stroke-width: 2.45; stroke-linecap: round; stroke-linejoin: round;
}
.post-action.is-active, .mini-action.is-active { background: var(--pink); color: #fff; }
.post-action.is-active .action-icon-heart, .mini-action.is-active .action-icon-heart { fill: currentColor; }
.post-tool-action {
  width: 34px; height: 34px; display: inline-grid; place-items: center; flex: 0 0 auto;
  border: 2px solid var(--ink); border-radius: 50%; background: #fff; color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink); cursor: pointer;
}
.post-tool-action .action-icon { width: 17px; height: 17px; stroke-width: 2.6; }
.post-tool-danger { background: #ffe1e8; }
.form-actions-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-actions-row .btn { width: auto; }
.comments-panel {
  min-width: 0; overflow: hidden; padding: 12px; display: grid; gap: 10px;
  background: linear-gradient(180deg, #fffdf2, #fff8d8);
}
.comments-panel[hidden] { display: none; }
.comments-panel.is-open {
  position: fixed; z-index: 120; right: 50%; bottom: 0; transform: translateX(50%);
  width: min(760px, calc(100vw - 12px)); max-height: min(78dvh, 720px); overflow-y: auto; overflow-x: hidden;
  border: 4px solid var(--ink); border-bottom: 0; border-radius: 28px 28px 0 0;
  box-shadow: 0 -18px 36px rgba(17,17,17,.18), 0 -5px 0 var(--ink);
  padding: 10px 12px calc(18px + env(safe-area-inset-bottom));
}
.comments-backdrop {
  position: fixed; inset: 0; z-index: 119; background: rgba(17,17,17,.24);
  backdrop-filter: blur(5px);
}
.comments-sheet-open { overflow: hidden; }
.comments-sheet-handle {
  justify-self: center; width: 48px; height: 6px; border: 2px solid var(--ink);
  border-radius: 999px; background: var(--ink); opacity: .9; margin: 0 0 2px;
}
.comments-sheet-head, .feed-comments-head {
  position: sticky; top: -10px; z-index: 2; display: flex; justify-content: space-between;
  align-items: center; gap: 10px; padding: 8px 2px 10px; background: #fffdf2; font-weight: 1000;
}
.comment-auth-cta {
  position: sticky; top: 45px; z-index: 3; width: 100%; justify-content: center;
  min-height: 44px; margin-bottom: 4px; background: var(--yellow);
}
.sheet-close {
  width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50%;
  background: var(--pink); color: #fff; box-shadow: 2px 2px 0 var(--ink);
  font: inherit; font-size: 24px; font-weight: 1000; line-height: 1; cursor: pointer;
}
.feed-comments-panel { padding: 10px 14px 14px; }
.feed-comments-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 1000; }
.feed-comments-head a { border-bottom: 3px solid var(--ink); font-size: 13px; }
.inline-comment-list { display: grid; gap: 9px; }
.feed-comment-empty {
  border: 3px dashed var(--ink); border-radius: var(--radius); background: #fff; padding: 10px;
  color: var(--muted); font-weight: 1000; text-align: center;
}
.feed-report-action { margin-inline-start: auto; }
.comment-form, .reply-form, .search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.comment-form, .reply-form {
  min-width: 0; border: 2px solid var(--ink); border-radius: 999px; background: #fff;
  box-shadow: 2px 2px 0 var(--ink); padding: 6px;
}
.comment-form input, .reply-form input {
  min-width: 0; min-height: 34px; border: 0; background: transparent;
  padding: 4px 9px; box-shadow: none; font-size: 14px;
}
.comment-form .btn, .reply-form .btn {
  width: 34px; height: 34px; min-height: 34px; padding: 0; border-width: 2px;
  border-radius: 50%; box-shadow: 2px 2px 0 var(--ink);
}
.comment-item {
  width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
  display: block; margin-top: 9px;
}
.comment-item .avatar-sm { width: 34px; height: 34px; border-width: 2px; box-shadow: 2px 2px 0 var(--ink); }
.comment-item.is-reply { margin: 9px 0 0; }
.feed-comment-item { margin-top: 0; }
.feed-comment-item .avatar-sm { width: 30px; height: 30px; border-width: 2px; }
.feed-comment-item .comment-body { border-width: 2px; box-shadow: 2px 2px 0 var(--ink); padding: 8px; }
.feed-comment-item .comment-body p { margin: 4px 0 0; font-size: 14px; font-weight: 800; }
.feed-comment-item .comment-meta { font-size: 12px; gap: 6px; }
.comment-body {
  min-width: 0; max-width: 100%; overflow: hidden;
  border: 2px solid var(--ink); border-radius: 18px 18px 6px 18px;
  box-shadow: 2px 2px 0 var(--ink); padding: 9px 10px; background: #fff;
}
.comment-item.is-reply .comment-body { background: #eefaff; border-radius: 18px 18px 6px 18px; }
.comment-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.comment-body p {
  margin: 5px 0 7px; font-size: 14px; font-weight: 850; line-height: 1.85;
  text-align: right; unicode-bidi: plaintext; overflow-wrap: anywhere; word-break: normal;
}
.comment-meta {
  min-width: 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  font-size: 12px; font-weight: 1000;
}
.comment-meta strong { min-width: 0; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-meta time { color: var(--muted); font-size: 11px; }
.owner-badge { border: 2px solid var(--ink); background: var(--green); border-radius: 999px; padding: 0 6px; font-size: 10px; }
.reply-to-badge {
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--yellow);
  padding: 0 7px; font-size: 10px;
}
.comment-actions { display: flex; gap: 5px; flex-wrap: nowrap; align-items: center; }
.comment-actions .inline-form { width: auto; }
.mini-action {
  min-height: 27px; padding: 2px 8px; border-width: 2px; box-shadow: none;
  font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 3px;
}
.reply-form[hidden] { display: none; }
.reply-form { margin-top: 8px; }
.achievement-grid { display: grid; gap: 10px; }
.achievement-badge { border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 10px; background: var(--yellow); display: grid; gap: 3px; }
.achievement-badge b { font-size: 24px; }
.search-hero { background: linear-gradient(135deg, var(--green) 0 44%, var(--paper) 44%); }
.search-results { margin-bottom: 26px; }
.search-app-head {
  position: sticky; top: calc(10px + env(safe-area-inset-top)); z-index: 14;
  border: 4px solid var(--ink); border-radius: 28px; background: rgba(255,253,242,.96);
  box-shadow: 5px 5px 0 var(--ink); padding: 9px; margin-bottom: 16px; backdrop-filter: blur(12px);
}
.search-app-head.is-loading { box-shadow: 5px 5px 0 var(--ink), inset 0 -5px 0 var(--blue); }
.search-app-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.search-field {
  min-width: 0; min-height: 50px; display: flex; grid-template-columns: none; align-items: center; gap: 8px;
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 5px 11px; font-weight: 1000;
}
.search-field svg {
  width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: var(--ink);
  stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round;
}
.search-field input {
  min-height: 34px; border: 0; box-shadow: none; padding: 0; background: transparent; border-radius: 0;
}
.search-field input:focus { outline: none; }
.search-clear {
  width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow); box-shadow: 2px 2px 0 var(--ink);
  font-size: 24px; line-height: 1; font-weight: 1000;
}
.search-submit { min-height: 50px; border-radius: 999px; padding-inline: 18px; }
.search-start-card {
  border: 4px solid var(--ink); border-radius: 26px; box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--green) 0 34%, var(--paper) 34%);
  padding: 22px; display: grid; justify-items: start; gap: 10px;
}
.search-start-icon {
  width: 68px; height: 68px; display: grid; place-items: center;
  border: 4px solid var(--ink); border-radius: 22px; background: var(--yellow);
  box-shadow: var(--shadow-sm); font-size: 22px; font-weight: 1000;
}
.search-start-card h1 { margin: 0; font-size: clamp(32px, 8vw, 54px); }
.search-start-card p { margin: 0; color: var(--muted); font-weight: 900; }
.search-live-region { transition: opacity .14s ease, transform .14s ease; }
.search-live-region.is-loading { opacity: .58; transform: translateY(2px); pointer-events: none; }
.search-result-shell { display: grid; gap: 12px; }
.search-result-head {
  display: flex; align-items: end; justify-content: space-between; gap: 12px;
  border: 4px solid var(--ink); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow-sm);
  padding: 14px;
}
.search-result-head h1 {
  margin: 4px 0 0; font-size: clamp(27px, 7vw, 46px);
  overflow-wrap: anywhere;
}
.search-result-head > strong {
  flex: 0 0 auto; border: 3px solid var(--ink); border-radius: 999px; background: var(--blue);
  box-shadow: 3px 3px 0 var(--ink); padding: 5px 11px; font-weight: 1000;
}
.search-tab-bar {
  position: sticky; top: calc(86px + env(safe-area-inset-top)); z-index: 13;
  margin: 0 0 4px; padding: 6px 4px 12px; background: linear-gradient(to bottom, var(--bg) 75%, transparent);
}
.search-panel { display: grid; gap: 10px; }
.search-result-list { display: grid; gap: 10px; }
.search-result-card {
  min-width: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 11px;
  border: 3px solid var(--ink); border-radius: 22px; background: #fff; box-shadow: 4px 4px 0 var(--ink);
  padding: 10px; transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.search-result-card:nth-child(3n+1) { background: #fff; }
.search-result-card:nth-child(3n+2) { background: #ecfbff; }
.search-result-card:nth-child(3n+3) { background: #fff6cf; }
.search-result-card:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.search-result-avatar {
  width: 64px; height: 64px; object-fit: cover; border: 3px solid var(--ink); border-radius: 50%;
  background: var(--yellow); box-shadow: 3px 3px 0 var(--ink);
}
.search-result-card > div { min-width: 0; display: grid; gap: 3px; }
.search-card-title { min-width: 0; display: flex; align-items: center; gap: 7px; justify-content: space-between; }
.search-card-title strong {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 18px; font-weight: 1000;
}
.search-card-title span {
  flex: 0 0 auto; border: 2px solid var(--ink); border-radius: 999px; background: var(--pink); color: #fff;
  box-shadow: 2px 2px 0 var(--ink); padding: 1px 8px; font-size: 11px; font-weight: 1000;
}
.search-result-card small {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 900;
}
.search-empty-mini {
  border: 3px dashed var(--ink); border-radius: 22px; background: rgba(255,255,255,.72);
  padding: 18px; text-align: center; font-weight: 1000; color: var(--muted);
}
.tab-bar { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 14px; margin: 12px 0 18px; }
.tab-button { border: 4px solid var(--ink); background: #fff; border-radius: 999px; box-shadow: var(--shadow-sm); padding: 9px 16px; font: inherit; font-weight: 1000; cursor: pointer; white-space: nowrap; }
.tab-button.is-active { background: var(--pink); color: #fff; transform: translate(-2px,-2px); }
.tab-count { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; margin-right: 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--yellow); color: var(--ink); padding: 1px 6px; font-size: 12px; }
.pet-tab-switch {
  position: sticky; top: 10px; z-index: 12;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
  overflow: visible; margin: 10px 0 18px; padding: 6px;
  border: 4px solid var(--ink); border-radius: 24px; background: var(--ink);
  box-shadow: 6px 6px 0 rgba(17,17,17,.18);
}
.pet-tab-button {
  min-width: 0; min-height: 62px; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border-width: 3px; border-radius: 18px; box-shadow: none;
  padding: 8px 10px; background: #fff; color: var(--ink); text-align: right;
  transition: transform .14s ease, background .14s ease, color .14s ease;
}
.pet-tab-button.is-active {
  background: var(--yellow); color: var(--ink); transform: translateY(-2px);
  box-shadow: 3px 3px 0 #000;
}
.pet-tab-icon {
  width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 12px; background: var(--blue);
  font-size: 18px; line-height: 1; box-shadow: 2px 2px 0 var(--ink);
}
.pet-tab-button.is-active .pet-tab-icon { background: var(--pink); color: #fff; }
.pet-tab-copy { min-width: 0; display: grid; gap: 1px; }
.pet-tab-copy strong { font-size: 15px; line-height: 1.3; }
.pet-tab-copy small {
  color: var(--muted); font-size: 11px; font-weight: 1000;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pet-tab-button.is-active .pet-tab-copy small { color: rgba(17,17,17,.7); }
.achievement-badge.is-locked { filter: grayscale(.9); opacity: .72; background: #eee; }
.hashtag-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px 14px; }
.hashtag-row a { color: var(--ink); background: var(--green); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); padding: 3px 9px; font-weight: 1000; }
.parent-mini-card .owner-link { align-items: center; }
.mini-parent-badge { display: inline-flex; width: fit-content; margin-top: 6px; border: 3px solid var(--ink); border-radius: 999px; background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); padding: 3px 10px; font-weight: 1000; }
.parent-stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.clinic-mini-card .owner-link { align-items: center; }
.pet-profile-panel { display: grid; gap: 14px; }
.pet-profile-relations { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.pet-parent-card, .pet-care-card, .pet-achievement-showcase { min-width: 0; }
.profile-card-head, .achievement-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.profile-card-head h2, .achievement-head h2 { margin: 6px 0 0; font-size: 22px; }
.profile-row-link, .care-row {
  display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 18px; background: #fff;
  box-shadow: 3px 3px 0 var(--ink); padding: 10px;
}
.profile-row-link > div, .care-row > div { min-width: 0; display: grid; gap: 2px; }
.profile-row-link strong, .care-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.profile-row-link small, .care-row small { color: var(--muted); font-weight: 1000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.care-list { display: grid; gap: 10px; }
.care-row .avatar-lg, .profile-row-link .avatar-lg { width: 58px; height: 58px; flex: 0 0 auto; }
.care-row.is-empty { background: #fff8d8; }
.care-placeholder {
  width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--green);
  box-shadow: 3px 3px 0 var(--ink); font-weight: 1000;
}
.pet-achievement-showcase { background: #fff; }
.achievement-head { margin-bottom: 10px; }
.achievement-head strong {
  border: 3px solid var(--ink); border-radius: 999px; background: var(--pink); color: #fff;
  box-shadow: 3px 3px 0 var(--ink); padding: 5px 10px; white-space: nowrap;
}
.achievement-progress {
  height: 14px; border: 3px solid var(--ink); border-radius: 999px; background: #fff;
  box-shadow: 3px 3px 0 var(--ink); overflow: hidden; margin-bottom: 12px;
}
.achievement-progress span { display: block; height: 100%; background: var(--green); }
.profile-achievement-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pet-profile-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.profile-combo-card { min-width: 0; }
.pet-profile-vet-block { grid-column: 1 / -1; display: grid; gap: 10px; }
.vet-clinic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.achievements-card.profile-combo-card { grid-column: 1 / -1; }
.compact-section-title { margin: 0; }
.compact-section-title h2 { margin: 0; }
.profile-combo-card .bio { font-size: 16px; }
.care-profile-hero {
  display: grid; grid-template-columns: 154px minmax(0, 1fr); align-items: start; gap: 18px;
  border: 4px solid var(--ink); border-radius: 26px; box-shadow: 6px 6px 0 var(--ink);
  background: linear-gradient(135deg, var(--green) 0 34%, var(--paper) 34%);
  padding: 16px; margin-bottom: 16px;
}
.vet-care-profile { align-items: start; }
.clinic-care-profile { background: linear-gradient(135deg, var(--blue) 0 34%, var(--paper) 34%); }
.care-hero-media { position: relative; width: 154px; display: grid; justify-items: center; gap: 8px; }
.care-hero-media .avatar-xl {
  width: 154px; height: 154px; object-fit: cover; border-width: 4px; box-shadow: 5px 5px 0 var(--ink);
  background: #fff;
}
.care-status-badge {
  display: inline-flex; align-items: center; justify-content: center; max-width: 100%;
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 3px 10px; font-size: 12px; font-weight: 1000; text-align: center;
}
.care-status-badge.is-verified { background: var(--yellow); }
.care-hero-copy { min-width: 0; display: grid; justify-items: start; gap: 9px; text-align: right; }
.vet-care-profile .care-hero-copy {
  padding-top: 0; align-self: start;
}
.vet-care-profile .care-chip-row,
.vet-care-profile .care-bio,
.vet-care-profile .vet-compact-stats {
  margin-right: 0; justify-self: stretch;
}
.care-hero-copy h1 {
  margin: 0; max-width: 100%; font-size: clamp(30px, 8vw, 52px);
  line-height: 1.12; overflow-wrap: anywhere;
}
.care-chip-row { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
.care-chip {
  display: inline-flex; align-items: center; justify-content: center; max-width: 100%;
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 4px 10px; font-size: 13px; font-weight: 1000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.care-address {
  margin: 0; width: 100%; border: 3px solid var(--ink); border-radius: 18px;
  background: #fff; box-shadow: 3px 3px 0 var(--ink); padding: 8px 10px;
  font-size: 14px; font-weight: 900; text-align: right; overflow-wrap: anywhere;
}
.care-bio {
  width: 100%; margin: 0; font-size: 15px; font-weight: 850; line-height: 1.9;
  text-align: right; justify-self: stretch; unicode-bidi: plaintext; overflow-wrap: anywhere;
}
.vet-compact-stats { justify-content: start; }
.care-stats { width: min(100%, 360px); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2px; }
.care-stats .stat-card { padding: 9px 7px; border-width: 3px; box-shadow: 3px 3px 0 var(--ink); }
.care-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.care-info-card { min-width: 0; display: grid; gap: 10px; background: #fff; }
.care-avatar-stack { margin: 0; padding: 3px 0 22px; }
.doctor-mini-list { display: grid; gap: 9px; }
.doctor-mini-card {
  min-width: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  border: 3px solid var(--ink); border-radius: 18px; background: #fff;
  box-shadow: 3px 3px 0 var(--ink); padding: 8px; transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.doctor-mini-card:nth-child(even) { background: #ecfbff; }
.doctor-mini-card:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.doctor-mini-card .avatar-lg { width: 52px; height: 52px; border-width: 3px; box-shadow: 2px 2px 0 var(--ink); }
.doctor-mini-card > div { min-width: 0; display: grid; gap: 1px; }
.doctor-mini-card strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 1000; }
.doctor-mini-card small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 900; }
.doctor-mini-card > span {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--green); box-shadow: 2px 2px 0 var(--ink);
  font-weight: 1000;
}
.clinic-official-profile {
  overflow: hidden; border: 4px solid var(--ink); border-radius: 28px; background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink); margin-bottom: 14px;
}
.clinic-cover {
  min-height: 170px; border-bottom: 4px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(17,17,17,.08) 0 25%, transparent 25% 50%, rgba(17,17,17,.08) 50% 75%, transparent 75%),
    linear-gradient(135deg, #dff7ff 0%, #fff7d6 52%, #e7fff0 100%);
  background-size: 42px 42px, cover;
  background-position: center;
  background-repeat: repeat, no-repeat;
}
.clinic-cover[style] {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}
.clinic-identity-card {
  display: grid; justify-items: center; gap: 8px; text-align: center;
  padding: 0 18px 18px; margin-top: -64px;
}
.clinic-logo {
  width: 128px; height: 128px; object-fit: cover; border: 5px solid var(--ink); border-radius: 50%;
  background: #fff; box-shadow: 6px 6px 0 var(--ink);
}
.clinic-identity-card h1 {
  margin: 0; font-size: clamp(32px, 8vw, 54px); line-height: 1.12;
  overflow-wrap: anywhere;
}
.clinic-bio {
  width: min(100%, 620px); margin: 0; font-size: 15px; font-weight: 850; line-height: 1.9;
  text-align: center; unicode-bidi: plaintext; overflow-wrap: anywhere; color: var(--muted);
}
.clinic-compact-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 92px)); justify-content: center; gap: 8px;
  margin-top: 4px;
}
.clinic-compact-stats div {
  border: 3px solid var(--ink); border-radius: 17px; background: #fff;
  box-shadow: 3px 3px 0 var(--ink); padding: 6px 8px; display: grid; gap: 0;
}
.clinic-compact-stats strong { font-size: 19px; font-weight: 1000; line-height: 1.1; }
.clinic-compact-stats span { font-size: 11px; color: var(--muted); font-weight: 1000; }
.clinic-detail-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.clinic-contact-card,
.clinic-section-card { min-width: 0; background: #fff; }
.clinic-contact-card {
  background:
    linear-gradient(135deg, rgba(102,226,138,.22) 0 34%, transparent 34%),
    #fff;
}
.clinic-contact-card { position: sticky; top: calc(12px + env(safe-area-inset-top)); }
.clinic-info-list { display: grid; gap: 8px; }
.clinic-info-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; column-gap: 9px; row-gap: 1px;
  border: 3px solid var(--ink); border-radius: 20px;
  background: var(--paper); box-shadow: 3px 3px 0 var(--ink); padding: 9px 10px;
}
.clinic-info-row i {
  grid-row: 1 / span 2; width: 34px; height: 34px; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--yellow);
  box-shadow: 2px 2px 0 var(--ink); font-style: normal; font-weight: 1000;
}
.clinic-info-row span { color: var(--muted); font-size: 12px; font-weight: 1000; line-height: 1.2; }
.clinic-info-row strong {
  font-size: 14px; font-weight: 1000; overflow-wrap: anywhere;
}
.clinic-pet-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  max-height: 334px; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin;
  padding: 4px 3px 10px; align-items: start;
}
.clinic-pet-item {
  min-width: 0; display: grid; justify-items: center; gap: 4px; text-align: center;
  border: 2px solid var(--ink); border-radius: 18px; background: #fffdf2;
  box-shadow: 2px 2px 0 var(--ink); padding: 8px 5px;
}
.clinic-pet-item img {
  width: 72px; height: 72px; object-fit: cover; border: 3px solid var(--ink); border-radius: 50%;
  background: var(--yellow); box-shadow: 3px 3px 0 var(--ink);
}
.clinic-pet-item strong,
.clinic-pet-item small {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.clinic-pet-item strong { font-size: 13px; font-weight: 1000; }
.clinic-pet-item small { font-size: 11px; font-weight: 900; color: var(--muted); }
.clinic-doctors-card { grid-column: 2; }
.clinic-scroll-list {
  max-height: 368px; overflow-y: auto; overscroll-behavior-y: contain;
  padding: 2px 3px 8px; scrollbar-width: thin;
}
.clinic-scroll-list .doctor-mini-card { box-shadow: 2px 2px 0 var(--ink); }
.pet-avatar-stack { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 24px; }
.covered-pet-avatar { position: relative; display: inline-flex; width: 64px; height: 64px; border-radius: 50%; transition: transform .14s ease; }
.covered-pet-avatar img { width: 64px; height: 64px; object-fit: cover; border: 4px solid var(--ink); border-radius: 50%; background: var(--yellow); box-shadow: var(--shadow-sm); }
.covered-pet-avatar span {
  position: absolute; right: 50%; transform: translateX(50%); bottom: -28px; opacity: 0; pointer-events: none;
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 2px 8px; font-size: 12px; font-weight: 1000; white-space: nowrap;
}
.covered-pet-avatar:hover { transform: translateY(-3px); }
.covered-pet-avatar:hover span, .covered-pet-avatar:focus span { opacity: 1; }
.auth-modal[hidden] { display: none; }
.auth-modal { position: fixed; inset: 0; z-index: 240; display: grid; place-items: center; padding: 18px; }
.auth-modal-backdrop { position: absolute; inset: 0; background: rgba(17,17,17,.32); backdrop-filter: blur(8px); }
.auth-modal-card { position: relative; width: min(480px, 100%); border: 5px solid var(--ink); border-radius: 18px; box-shadow: 10px 10px 0 var(--ink); background: var(--yellow); padding: 24px; }
.image-viewer[hidden] { display: none; }
.image-viewer {
  position: fixed; inset: 0; z-index: 230; display: grid; place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}
.image-viewer-backdrop {
  position: absolute; inset: 0; border: 0; background: rgba(17,17,17,.72);
  backdrop-filter: blur(8px); cursor: zoom-out;
}
.image-viewer-card {
  position: relative; z-index: 1; width: min(92vw, 520px); display: grid; justify-items: center; gap: 12px;
  margin: 0; padding: 16px; border: 5px solid var(--ink); border-radius: 28px;
  background: var(--paper); box-shadow: 10px 10px 0 var(--ink);
}
.image-viewer-card img {
  width: min(78vw, 420px); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 5px solid var(--ink); background: var(--yellow); box-shadow: 6px 6px 0 var(--ink);
}
.image-viewer-card figcaption {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 1000; text-align: center;
}
.image-viewer-close {
  position: absolute; left: 12px; top: 12px; width: 38px; height: 38px;
  border: 3px solid var(--ink); border-radius: 50%; background: var(--pink); color: #fff;
  box-shadow: 3px 3px 0 var(--ink); font: inherit; font-size: 25px; font-weight: 1000;
  line-height: 1; cursor: pointer;
}
.image-viewer-open { overflow: hidden; }
.app-toast {
  position: fixed; right: 50%; bottom: 96px; transform: translateX(50%); z-index: 120;
  width: min(420px, calc(100vw - 28px)); border: 4px solid var(--ink); border-radius: 16px;
  background: var(--yellow); box-shadow: var(--shadow-sm); padding: 12px 14px; text-align: center; font-weight: 1000;
}
.install-prompt[hidden] { display: none; }
.install-prompt {
  position: fixed; right: 50%; bottom: 92px; transform: translateX(50%);
  z-index: 130; width: min(520px, calc(100vw - 24px));
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  border: 4px solid var(--ink); border-radius: 22px; background: var(--paper);
  box-shadow: 7px 7px 0 var(--ink); padding: 10px;
}
.install-prompt-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 17px; background: var(--pink); color: #fff;
  box-shadow: 3px 3px 0 var(--ink); font-weight: 1000; font-size: 28px; line-height: 1;
}
.install-prompt-copy { min-width: 0; display: grid; gap: 1px; }
.install-prompt-copy strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 1000;
}
.install-prompt-copy span {
  color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 900;
}
.install-prompt-actions { display: flex; align-items: center; gap: 7px; }
.install-prompt-button,
.install-prompt-close {
  display: inline-grid; place-items: center; border: 3px solid var(--ink); font: inherit; font-weight: 1000;
  cursor: pointer; transition: transform .14s ease, box-shadow .14s ease;
}
.install-prompt-button {
  min-height: 38px; border-radius: 999px; background: var(--green); box-shadow: 3px 3px 0 var(--ink); padding: 5px 12px;
}
.install-prompt-close {
  width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 2px 2px 0 var(--ink); font-size: 23px; line-height: 1;
}
.install-prompt-button:hover,
.install-prompt-close:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }

.admin-body { background: #f5f1e7; color: var(--ink); }
.admin-body .site-main { width: min(calc(100vw - 24px), 1280px); }
.admin-topbar {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px;
  border-bottom: 5px solid var(--ink); background: var(--paper); padding: 12px clamp(12px, 4vw, 28px);
  box-shadow: 0 5px 0 rgba(17,17,17,.12);
}
.admin-topbar .brand {
  border: 4px solid var(--ink); border-radius: var(--radius); background: var(--pink); color: #fff;
  box-shadow: 5px 5px 0 var(--ink); padding: 9px 14px; font-size: 20px; white-space: nowrap;
}
.admin-nav { display: flex; gap: 8px; overflow-x: auto; padding: 5px 3px 9px; scrollbar-width: thin; }
.admin-nav a {
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 7px 12px; white-space: nowrap; font-weight: 1000; transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.admin-nav a:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); background: var(--blue); }
.admin-nav a.is-active { background: var(--yellow); box-shadow: 5px 5px 0 var(--ink); transform: translate(-1px,-1px); }
.admin-main { display: grid; gap: 18px; }
.admin-main .page-head {
  border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  background: #fff; padding: 14px; margin: 0 0 4px;
}
.admin-main .page-head h1 { margin: 0; font-size: clamp(30px, 6vw, 48px); }
.admin-page-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.admin-page-head p { margin: 6px 0 0; color: var(--muted); font-weight: 900; }
.admin-eyebrow {
  display: inline-flex; border: 3px solid var(--ink); border-radius: 999px; background: var(--blue);
  box-shadow: 3px 3px 0 var(--ink); padding: 4px 10px; font-size: 12px; font-weight: 1000;
}
.admin-hero { background: linear-gradient(135deg, var(--yellow) 0 38%, var(--paper) 38%); margin-bottom: 0; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 18px 0; }
.admin-stat {
  border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  background: #fff; padding: 14px; display: grid; gap: 4px; min-height: 104px;
  text-decoration: none; transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.admin-stat:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--ink); }
.admin-stat.is-yellow { background: var(--yellow); }
.admin-stat.is-green { background: var(--green); }
.admin-stat.is-blue { background: var(--blue); }
.admin-stat.is-pink { background: var(--pink); color: #fff; }
.admin-stat.is-red { background: #ff6b6b; color: #fff; }
.admin-stat.is-paper { background: #fff; }
.admin-stat strong { font-size: 28px; font-weight: 1000; }
.admin-stat span { color: inherit; opacity: .78; font-weight: 1000; }
.admin-grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-table-wrap { overflow-x: auto; border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; margin-top: 8px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { border-bottom: 3px solid var(--ink); padding: 12px; text-align: right; vertical-align: top; font-weight: 800; }
.admin-table th { position: sticky; top: 0; background: var(--yellow); font-weight: 1000; z-index: 1; }
.admin-table tr:nth-child(even) td { background: #fffaf0; }
.admin-table tr:hover td { background: #e9fbff; }
.admin-table small { display: block; margin-top: 3px; }
.admin-table-rich { min-width: 940px; }
.admin-main-cell { min-width: 300px; }
.admin-entity-link, .admin-row-link {
  color: var(--ink); text-decoration: none; font-weight: 1000;
  border-bottom: 3px solid transparent; overflow-wrap: anywhere;
}
.admin-entity-link:hover, .admin-row-link:hover { border-bottom-color: var(--ink); color: #0b6bff; }
.admin-entity-link-strong { display: inline-block; font-size: 16px; line-height: 1.8; }
.admin-row-meta { display: block; color: var(--muted); font-size: 12px; font-weight: 900; margin-top: 4px; }
.admin-reply-preview {
  display: block; margin-top: 8px; border: 3px solid var(--ink); border-radius: 12px;
  background: #f4f8ff; box-shadow: 3px 3px 0 var(--ink); padding: 8px 10px;
  color: var(--ink); text-decoration: none; font-size: 13px; line-height: 1.8;
}
.admin-avatar-line, .admin-post-preview {
  display: inline-grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; min-width: 0;
}
.admin-post-preview { grid-template-columns: 78px minmax(0, 1fr); }
.admin-avatar-line strong, .admin-post-preview strong { display: block; overflow-wrap: anywhere; }
.admin-avatar-line small, .admin-post-preview small { color: var(--muted); }
.admin-thumb-empty {
  display: grid; place-items: center; background: var(--yellow); font-size: 11px; font-weight: 1000;
}
.admin-status-pill {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  border: 3px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  padding: 5px 10px; background: #fff; font-size: 12px; font-weight: 1000;
}
.admin-status-pill.is-published, .admin-status-pill.is-active, .admin-status-pill.is-reviewed { background: var(--green); }
.admin-status-pill.is-pending, .admin-status-pill.is-open { background: var(--yellow); }
.admin-status-pill.is-hidden, .admin-status-pill.is-inactive, .admin-status-pill.is-dismissed { background: #e6e6e6; }
.admin-status-pill.is-rejected, .admin-status-pill.is-banned, .admin-status-pill.is-action_taken { background: #ff6b6b; color: #fff; }
.admin-warning-note {
  margin-top: 8px; border: 3px solid var(--ink); border-radius: 12px; background: #fff1f1;
  box-shadow: 3px 3px 0 var(--ink); padding: 8px 10px; font-weight: 950;
}
.admin-empty {
  border: 3px dashed var(--ink); border-radius: 16px; background: #fffaf0;
  padding: 16px; text-align: center; font-weight: 1000;
}
.admin-panel-card { display: grid; gap: 12px; }
.admin-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-panel-head h2 { margin: 0; }
.admin-panel-head a {
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 6px 10px; text-decoration: none; color: var(--ink); font-weight: 1000;
}
.admin-list { display: grid; gap: 10px; }
.admin-list-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px;
  border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 9px 10px; text-decoration: none; color: var(--ink);
}
.admin-list-row.admin-avatar-line { grid-template-columns: 46px minmax(0, 1fr) auto; }
.admin-list-compact .admin-list-row { grid-template-columns: minmax(140px, 1fr) minmax(0, 1fr) auto; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 220px; }
.table-actions .inline-form { width: auto; }
.admin-gender-form { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; }
.admin-gender-form select { min-width: 112px; }
.admin-table select, .admin-table input { min-height: 38px; border-width: 3px; box-shadow: 2px 2px 0 var(--ink); padding: 5px 8px; }
.admin-thumb { width: 72px; height: 72px; object-fit: cover; border: 3px solid var(--ink); border-radius: 10px; display: block; margin-bottom: 6px; }
.moderation-reason-cell { min-width: 320px; max-width: 520px; }
.moderation-reason {
  white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9;
  border: 3px solid var(--ink); border-radius: 12px; background: #fff1f1;
  box-shadow: 3px 3px 0 var(--ink); padding: 10px; font-weight: 950;
}
.moderation-raw { margin-top: 10px; }
.moderation-raw summary {
  cursor: pointer; display: inline-flex; border: 3px solid var(--ink); border-radius: 999px;
  background: var(--blue); box-shadow: 3px 3px 0 var(--ink); padding: 5px 10px; font-weight: 1000;
}
.moderation-raw pre {
  direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto;
  border: 3px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  padding: 10px; margin: 10px 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px;
}
.admin-mini-input { min-height: 36px; width: 120px; border-width: 3px; padding: 4px 8px; }
.code-sample {
  direction: ltr; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere;
  border: 3px solid var(--ink); border-radius: 14px; background: #fff;
  box-shadow: 3px 3px 0 var(--ink); padding: 12px; font-weight: 900;
}
.admin-import-hero { display: grid; gap: 10px; background: linear-gradient(135deg, var(--green) 0 42%, var(--paper) 42%); }
.admin-import-hero .btn { width: fit-content; }
.import-guide { display: grid; gap: 10px; background: #fff; }
.import-columns { display: flex; flex-wrap: wrap; gap: 8px; direction: ltr; justify-content: flex-end; }
.import-columns code {
  border: 3px solid var(--ink); border-radius: 999px; background: var(--blue); box-shadow: 3px 3px 0 var(--ink);
  padding: 5px 10px; font-weight: 1000;
}
.admin-upload-card { background: var(--yellow); }
.admin-upload-card input[type="file"] { background: #fff; }
.admin-body .form-wrap { max-width: 900px; }
.admin-body .form-hero { margin-bottom: 16px; }
.admin-body .form-card { box-shadow: var(--shadow-sm); }
.admin-body .tab-bar { margin: 0; padding-bottom: 8px; }
.admin-body .tab-button { text-decoration: none; }
.admin-body .brutal-card h2 { margin-top: 0; }
.admin-body .flash { margin: 0; }

.parent-hero { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 24px; background: linear-gradient(135deg, var(--yellow) 0 32%, var(--paper) 32%); }
.parent-hero { align-items: start; }
.parent-pet-grid .pet-card { text-align: center; }
.connections-head {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 14px;
  max-width: 760px; margin: 0 auto 18px; padding: 2px 0 4px;
}
.connections-head h1 { margin: 0; font-size: clamp(24px, 6vw, 36px); line-height: 1.18; }
.connections-back {
  width: 58px; height: 52px; display: grid; place-items: center;
  border: 4px solid var(--ink); border-radius: 18px; background: var(--yellow);
  box-shadow: 5px 5px 0 var(--ink); color: var(--ink);
  font-size: 40px; line-height: .8; font-weight: 1000;
  transition: transform .14s ease, box-shadow .14s ease;
}
.connections-back:hover { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 var(--ink); }
.connections-tabs { max-width: 760px; margin: 0 auto; }
.connection-tab-bar {
  margin: 0 0 12px; padding: 5px; gap: 6px; overflow: visible;
  border: 3px solid var(--ink); border-radius: 20px; background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}
.connection-tab-bar .tab-button {
  flex: 1 1 0; justify-content: center; min-height: 42px;
  border-width: 2px; border-radius: 14px; box-shadow: none; background: transparent;
}
.connection-tab-bar .tab-button.is-active { background: var(--blue); box-shadow: 2px 2px 0 var(--ink); }
.connection-list { display: grid; gap: 9px; max-width: 640px; margin: 0 auto; }
.connection-card {
  position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 10px;
  color: var(--ink); background: #fff; padding: 8px 16px 8px 8px;
  border: 3px solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.connection-card::before {
  content: ''; position: absolute; inset-block: 0; right: 0; width: 9px;
  background: var(--blue); border-left: 3px solid var(--ink);
}
.parent-connection-card::before { background: var(--green); }
.pet-connection-card::before { background: var(--yellow); }
.connection-card:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); background: #fffdf2; }
.connection-card .avatar-lg { width: 54px; height: 54px; border-width: 3px; box-shadow: 2px 2px 0 var(--ink); }
.connection-card > div { min-width: 0; display: grid; gap: 2px; }
.connection-card strong { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-card small { color: var(--muted); font-size: 12px; font-weight: 1000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-card p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-badge {
  border: 3px solid var(--ink); border-radius: 999px; background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink); padding: 5px 10px; font-size: 12px; font-weight: 1000; white-space: nowrap;
}
.connection-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.connection-tags span {
  border: 2px solid var(--ink); border-radius: 999px; background: var(--blue);
  box-shadow: 2px 2px 0 var(--ink); padding: 2px 8px; font-size: 11px; font-weight: 1000; white-space: nowrap;
}
.parent-connection-card .connection-tags span:first-child { background: var(--green); }
.connection-owner { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 1000; }
.connection-owner .avatar-mini { width: 24px; height: 24px; border-width: 2px; flex: 0 0 auto; }
.connection-owner .username-inline::before { content: '· '; direction: rtl; unicode-bidi: isolate; }
.profile-dashboard-hero {
  position: relative; display: grid; gap: 18px; border: 5px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--blue) 0 34%, var(--paper) 34%); padding: clamp(18px, 4vw, 30px); margin-bottom: 24px;
}
.profile-quick-actions {
  position: absolute; left: 14px; top: 14px; z-index: 3;
  display: flex; align-items: center; gap: 8px;
}
.profile-icon-action {
  width: 42px; height: 42px; display: inline-grid; place-items: center;
  border: 3px solid var(--ink); border-radius: 50%; background: #fff;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}
.profile-icon-action:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.profile-icon-action svg {
  width: 21px; height: 21px; fill: none; stroke: currentColor;
  stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.profile-edit-action { background: var(--yellow); }
.profile-logout-action { background: #fff; color: var(--muted); opacity: .92; }
.profile-logout-action:hover { background: #ffe4e4; color: var(--ink); opacity: 1; }
.profile-dashboard-main { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: start; }
.parent-public-hero .profile-dashboard-main { padding-top: 0; }
.profile-overview-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.profile-overview-stats .stat-card { background: #fff; }
.dashboard-pets-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 20px 0 12px; padding: 12px 14px;
  border: 4px solid var(--ink); border-radius: 18px; background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}
.dashboard-pets-head h2 { margin: 0; font-size: clamp(22px, 5vw, 34px); }
.dashboard-pets-head > span {
  border: 3px solid var(--ink); border-radius: 999px; background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink); padding: 4px 10px; font-weight: 1000; white-space: nowrap;
}
.dashboard-add-pet-btn { width: 100%; justify-content: center; margin-top: 14px; }
.parent-pets-head h2 { overflow-wrap: anywhere; }
.public-pet-card .pet-card-body { padding-bottom: 16px; }
.parent-follow-row { margin-top: 10px; display: flex; align-items: center; gap: 8px; }
.parent-follow-row .inline-form { width: auto; }

.digital-card {
  display: grid; grid-template-columns: 1fr 160px; gap: 18px; align-items: center;
  padding: 26px; background: linear-gradient(135deg, var(--yellow) 0 42%, var(--paper) 42%);
}
.digital-card img { width: 150px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 4px solid var(--ink); }
.digital-card a { direction: ltr; display: block; overflow-wrap: anywhere; font-weight: 900; }
.qr-placeholder {
  grid-column: 1 / -1; width: 168px; height: 168px; display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; padding: 10px; background: #fff; border: 4px solid var(--ink); position: relative; direction: ltr;
}
.qr-placeholder span { background: #eee; }
.qr-placeholder span.on { background: var(--ink); }
.qr-placeholder small { position: absolute; inset: auto 8px 8px; background: #fff; font-weight: 1000; text-align: center; }

.skeleton {
  min-height: 120px; border: 4px solid var(--ink); border-radius: var(--radius);
  background: linear-gradient(90deg, #fff 0%, #ffe66d 45%, #fff 90%);
  background-size: 220% 100%; animation: skeleton-move 1s linear infinite; box-shadow: var(--shadow-sm);
}
@keyframes skeleton-move { to { background-position: -220% 0; } }

@media (max-width: 860px) {
  .topbar { grid-template-columns: 1fr; align-items: stretch; }
  .nav-account { justify-content: flex-start; }
  .admin-topbar { grid-template-columns: 1fr; align-items: stretch; }
  .admin-page-head { display: grid; align-items: stretch; }
  .nav-links { width: 100%; justify-content: flex-start; }
  .hero, .pet-profile-hero, .profile-layout, .parent-hero, .digital-card { grid-template-columns: 1fr; }
  .profile-dashboard-main { grid-template-columns: 1fr; text-align: center; }
  .profile-dashboard-main .avatar-xl { margin: 0 auto; }
  .profile-dashboard-main .profile-actions { justify-content: center; }
  .hero { min-height: auto; }
  .hero-visual { min-height: 260px; }
  .pet-avatar-wrap { width: 240px; }
  .profile-sidebar { order: 2; }
}

@media (max-width: 620px) {
  .site-main { width: min(calc(100vw - 18px), 1120px); padding-top: 16px; }
  .auth-screen { min-height: calc(100svh - 112px); padding-top: 0; }
  .auth-panel { border-width: 4px; border-radius: 24px; box-shadow: 5px 5px 0 var(--ink); padding: 16px; }
  .auth-panel::before { height: 120px; border-bottom-width: 4px; }
  .auth-art { min-height: 134px; }
  .auth-brand-badge { width: 92px; height: 92px; font-size: 48px; border-width: 4px; box-shadow: 5px 5px 0 var(--ink); }
  .auth-orbit-one { width: 42px; height: 42px; top: 26px; }
  .auth-orbit-two { width: 32px; height: 32px; top: 78px; }
  .auth-content h1 { font-size: clamp(34px, 11vw, 46px); }
  .otp-preview { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .otp-preview strong { font-size: 22px; letter-spacing: 3px; }
  .form-grid, .date-triplet, .stats-strip:not(.profile-overview-stats), .profile-edit-row { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-tiny, .post-action, .mini-action { width: auto; }
  .inline-form { width: 100%; }
  .feed-owner .inline-form { width: auto; }
  .stats-strip:not(.profile-overview-stats), .stats-strip.compact-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .profile-overview-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }
  .profile-overview-stats .stat-card {
    border-width: 2px;
    border-radius: 13px;
    box-shadow: 2px 2px 0 var(--ink);
    padding: 7px 4px;
    text-align: center;
  }
  .profile-overview-stats strong {
    font-size: 16px;
  }
  .profile-overview-stats span {
    font-size: 10px;
  }
  .post-action-bar { justify-content: flex-start; gap: 5px; overflow: hidden; }
  .post-action { flex: 0 0 auto; text-align: center; padding: 4px 8px; font-size: 13px; min-height: 32px; }
  .post-action .action-icon { width: 17px; height: 17px; }
  .mini-action { padding: 3px 7px; font-size: 12px; box-shadow: none; }
  .post-owner-tools { gap: 6px; }
  .post-tool-action { width: 31px; height: 31px; box-shadow: 1px 1px 0 var(--ink); }
  .form-actions-row .btn { width: 100%; }
  .comment-actions { justify-content: flex-start; }
  .comment-actions .inline-form { width: auto; }
  .comment-form .btn, .reply-form .btn { width: 34px; }
  .admin-grid-two { grid-template-columns: 1fr; }
  .admin-body .site-main { width: min(calc(100vw - 16px), 1280px); }
  .admin-main .page-head { display: grid; align-items: stretch; }
  .admin-main .search-form { grid-template-columns: 1fr; }
  .admin-import-hero .btn { width: 100%; }
  .admin-table { min-width: 700px; }
  .admin-panel-head { align-items: stretch; flex-direction: column; }
  .admin-panel-head a { text-align: center; }
  .admin-list-row, .admin-list-row.admin-avatar-line, .admin-list-compact .admin-list-row { grid-template-columns: 1fr; align-items: start; }
  .search-app-head { top: calc(8px + env(safe-area-inset-top)); border-width: 3px; border-radius: 22px; padding: 7px; }
  .search-app-form { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .search-field { min-height: 46px; border-width: 2px; box-shadow: 2px 2px 0 var(--ink); padding-inline: 9px; }
  .search-field svg { width: 20px; height: 20px; }
  .search-submit { width: auto; min-height: 46px; padding: 7px 13px; border-width: 3px; box-shadow: 3px 3px 0 var(--ink); }
  .search-result-head { align-items: start; border-width: 3px; border-radius: 20px; padding: 12px; }
  .search-result-head > strong { font-size: 12px; padding: 4px 8px; }
  .search-tab-bar { top: calc(74px + env(safe-area-inset-top)); padding-bottom: 9px; }
  .search-tab-bar .tab-button { padding: 7px 11px; border-width: 3px; box-shadow: 3px 3px 0 var(--ink); font-size: 13px; }
  .search-result-card { grid-template-columns: 54px minmax(0, 1fr); border-width: 3px; border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); padding: 8px; }
  .search-result-avatar { width: 54px; height: 54px; border-width: 3px; box-shadow: 2px 2px 0 var(--ink); }
  .search-card-title strong { font-size: 16px; }
  .search-card-title span { font-size: 10px; padding-inline: 6px; }
  .search-start-card { border-width: 3px; border-radius: 22px; padding: 16px; }
  .nav-links > a { padding: 7px 10px; }
  .story-rail { grid-auto-columns: 164px; }
  .user-chip span { display: none; }
  .bottom-nav { bottom: 10px; height: 64px; padding: 7px 12px; }
  .bottom-nav-item { width: 44px; height: 44px; }
  .bottom-icon { width: 23px; height: 23px; }
  .bottom-brand { width: 58px; height: 58px; }
  .bottom-brand-mark { width: 50px; height: 50px; }
  h1 { font-size: clamp(34px, 13vw, 56px); }
}

/* App shell pass: mobile web app rhythm */
body {
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,0) 280px),
    var(--bg);
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
  overscroll-behavior-y: contain;
}

.site-main {
  width: min(760px, calc(100vw - 24px));
  max-width: 100%;
  padding: calc(14px + env(safe-area-inset-top)) 0 calc(28px + env(safe-area-inset-bottom));
}

.bottom-nav {
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(336px, calc(100vw - 32px));
  height: 68px;
  grid-template-columns: 1fr 70px 1fr;
  border-width: 3px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(17,17,17,.18), 4px 4px 0 var(--ink);
  padding: 7px 14px;
}

.bottom-nav-item {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: none;
}

.bottom-nav-item.is-active {
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(-1px, -1px);
}

.bottom-brand {
  align-self: center;
  justify-self: center;
  width: 64px;
  height: 64px;
  margin-top: -14px;
}

.bottom-brand-mark {
  width: 56px;
  height: 56px;
  border-width: 3px;
  box-shadow: 4px 4px 0 var(--ink);
}

.feed-list {
  max-width: 560px;
  gap: 18px;
}

.feed-card,
.post-card {
  border-width: 3px;
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--ink);
}

.feed-owner {
  padding: 10px 12px;
  border-bottom-width: 3px;
}

.feed-photo {
  aspect-ratio: 1 / 1;
}

.feed-body {
  padding: 12px;
  gap: 8px;
}

.caption {
  font-size: 15px;
  line-height: 1.9;
}

.post-action-bar {
  border-top-width: 3px;
  padding: 8px 10px;
  gap: 7px;
  background: #dff7ff;
}

.post-action {
  min-height: 34px;
  padding: 4px 10px;
  border-width: 2px;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 14px;
}

.rail-section {
  max-width: 100%;
  overflow: hidden;
  margin: 0 0 12px;
  padding-inline: 12px;
}

.story-rail {
  grid-auto-columns: 144px;
  gap: 10px;
  max-width: 100%;
  overscroll-behavior-x: contain;
  padding: 3px 2px 12px;
}

.story-card {
  min-height: 224px;
  grid-template-rows: 34px 1fr 34px;
  padding: 8px;
  border-width: 3px;
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink);
}

.pet-card-parent {
  height: 34px;
  border-width: 2px;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 11px;
}

.pet-card-parent .avatar-mini {
  width: 24px;
  height: 24px;
}

.pet-discovery-main {
  min-height: 132px;
}

.pet-discovery-photo {
  width: 86px;
  height: 86px;
  border-width: 3px;
}

.pet-discovery-main strong {
  font-size: 15px;
  line-height: 1.35;
}

.pet-discovery-main small {
  font-size: 11px;
}

.story-follow .btn {
  min-height: 32px;
  padding: 3px 9px;
  border-width: 2px;
  box-shadow: 2px 2px 0 var(--ink);
  font-size: 12px;
}

.profile-dashboard-hero {
  border-width: 3px;
  border-radius: 22px;
  box-shadow: 5px 5px 0 var(--ink);
  padding: 16px;
  background: var(--paper);
}

.profile-dashboard-main {
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: start;
  padding-top: 26px;
  margin-bottom: 0;
}

.profile-dashboard-main .avatar-xl {
  width: 112px;
  height: 112px;
  box-shadow: 4px 4px 0 var(--ink);
}

.profile-dashboard-main h1 {
  font-size: clamp(28px, 8vw, 42px);
  margin-bottom: 6px;
}

.profile-dashboard-main .bio {
  font-size: 15px;
}

.profile-actions {
  gap: 8px;
}

.profile-actions .btn {
  min-height: 42px;
  padding: 7px 12px;
  border-width: 3px;
  box-shadow: 3px 3px 0 var(--ink);
}

.profile-overview-stats {
  gap: 8px;
}

.profile-overview-stats .stat-card {
  border-width: 3px;
  padding: 9px;
  box-shadow: 3px 3px 0 var(--ink);
}

.profile-overview-stats strong {
  font-size: 19px;
}

.pet-grid {
  gap: 12px;
}

.dashboard-card {
  border-width: 3px;
  box-shadow: 4px 4px 0 var(--ink);
}

.dashboard-card > img {
  margin-top: 12px;
  width: calc(100% - 24px);
}

.dashboard-card .pet-type-ribbon {
  max-width: calc(100% - 42px);
  border-width: 2px;
  box-shadow: 2px 2px 0 var(--ink);
}

.auth-modal-card {
  border-radius: 24px;
  box-shadow: 7px 7px 0 var(--ink);
}

@media (max-width: 620px) {
  .site-main {
    width: min(calc(100vw - 16px), 760px);
    padding-top: 10px;
  }

  .bottom-nav {
    width: min(316px, calc(100vw - 28px));
    height: 64px;
    grid-template-columns: 1fr 66px 1fr;
  }

  .bottom-nav-item {
    width: 44px;
    height: 44px;
  }

  .bottom-brand {
    width: 60px;
    height: 60px;
    margin-top: -12px;
  }

  .bottom-brand-mark {
    width: 52px;
    height: 52px;
  }

  .feed-list {
    max-width: none;
  }

  .profile-dashboard-main {
    grid-template-columns: 86px 1fr;
    text-align: right;
    align-items: start;
    padding-top: 28px;
  }

  .profile-dashboard-main > div {
    gap: 3px;
  }

  .owner-dashboard-hero .profile-dashboard-main > div {
    padding-left: 88px;
  }

  .profile-quick-actions {
    left: 12px;
    top: 12px;
    gap: 6px;
  }

  .profile-icon-action {
    width: 38px;
    height: 38px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .profile-icon-action svg {
    width: 19px;
    height: 19px;
  }

  .profile-dashboard-main .avatar-xl {
    width: 86px;
    height: 86px;
    margin: 0;
  }

  .profile-dashboard-main .profile-actions {
    justify-content: flex-start;
  }

  .connections-head {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }

  .connections-back {
    width: 50px;
    height: 46px;
    border-width: 3px;
    box-shadow: 4px 4px 0 var(--ink);
    font-size: 35px;
  }

  .connection-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 9px;
    padding: 8px 15px 8px 8px;
    border-width: 3px;
    border-radius: 17px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .connection-card .avatar-lg {
    width: 48px;
    height: 48px;
    border-width: 3px;
  }

  .connection-badge {
    grid-column: 2;
    justify-self: start;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 12px;
  }

  .connection-tab-bar {
    border-width: 2px;
    border-radius: 17px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .connection-tab-bar .tab-button {
    min-height: 38px;
    padding: 5px 8px;
    font-size: 13px;
  }

  .connection-card strong {
    font-size: 16px;
  }

  .profile-actions .btn {
    width: auto;
    font-size: 13px;
  }

  .profile-actions .btn-ghost {
    display: none;
  }

  .pet-profile-detail-grid,
  .vet-clinic-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .care-profile-hero {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px; border-width: 3px; border-radius: 22px; box-shadow: 5px 5px 0 var(--ink);
    padding: 12px;
  }

  .care-hero-media { width: 108px; }

  .care-hero-media .avatar-xl {
    width: 108px; height: 108px; border-width: 3px; box-shadow: 4px 4px 0 var(--ink);
  }

  .care-status-badge {
    border-width: 2px; box-shadow: 2px 2px 0 var(--ink); padding: 2px 7px; font-size: 10px;
  }

  .care-hero-copy { gap: 6px; }

  .care-hero-copy h1 { font-size: clamp(27px, 9vw, 42px); }

  .care-chip {
    border-width: 2px; box-shadow: 2px 2px 0 var(--ink); padding: 2px 8px; font-size: 11px;
  }

  .care-address,
  .care-bio { font-size: 13px; line-height: 1.75; }

  .care-stats { gap: 6px; }

  .care-stats .stat-card {
    border-width: 2px; box-shadow: 2px 2px 0 var(--ink); padding: 6px 4px;
  }

  .care-profile-grid { grid-template-columns: 1fr; gap: 12px; }

  .care-info-card { border-width: 3px; box-shadow: 4px 4px 0 var(--ink); }

  .doctor-mini-card {
    grid-template-columns: 46px minmax(0, 1fr) auto; border-width: 3px;
    border-radius: 17px; box-shadow: 3px 3px 0 var(--ink); padding: 7px;
  }

  .doctor-mini-card .avatar-lg { width: 46px; height: 46px; border-width: 3px; }

  .doctor-mini-card strong { font-size: 15px; }

  .clinic-official-profile {
    border-width: 3px; border-radius: 24px; box-shadow: 5px 5px 0 var(--ink);
  }

  .clinic-cover {
    min-height: 136px; border-bottom-width: 3px;
  }

  .clinic-identity-card {
    padding: 0 12px 14px; margin-top: -54px;
  }

  .clinic-logo {
    width: 108px; height: 108px; border-width: 4px; box-shadow: 4px 4px 0 var(--ink);
  }

  .clinic-bio {
    font-size: 13px; line-height: 1.75;
  }

  .clinic-compact-stats {
    grid-template-columns: repeat(2, minmax(0, 78px)); gap: 6px;
  }

  .clinic-compact-stats div {
    border-width: 2px; border-radius: 14px; box-shadow: 2px 2px 0 var(--ink); padding: 5px;
  }

  .clinic-detail-grid {
    grid-template-columns: 1fr; gap: 12px;
  }

  .clinic-contact-card { position: static; }

  .clinic-doctors-card { grid-column: auto; }

  .clinic-pet-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; max-height: 300px; padding-bottom: 8px;
  }

  .clinic-pet-item img {
    width: 58px; height: 58px; border-width: 3px; box-shadow: 2px 2px 0 var(--ink);
  }

  .clinic-pet-item {
    border-width: 2px; border-radius: 15px; padding: 6px 4px; box-shadow: 2px 2px 0 var(--ink);
  }

  .clinic-pet-item strong { font-size: 12px; }

  .clinic-pet-item small { font-size: 10px; }

  .clinic-info-row {
    grid-template-columns: 30px minmax(0, 1fr); gap: 7px; border-width: 2px;
    border-radius: 17px; box-shadow: 2px 2px 0 var(--ink); padding: 8px;
  }

  .clinic-info-row i {
    width: 30px; height: 30px; border-width: 2px; box-shadow: 1px 1px 0 var(--ink);
  }

  .clinic-scroll-list { max-height: 330px; }

  .app-pet-hero {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 13px;
    border-width: 3px;
    border-radius: 22px;
    box-shadow: 5px 5px 0 var(--ink);
    padding: 13px;
  }

  .app-pet-hero .pet-avatar-wrap {
    width: 132px;
  }

  .app-pet-hero .code-badge {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    padding: 3px 8px;
  }

  .pet-title-row {
    gap: 5px;
  }

  .pet-title-row h1 {
    font-size: clamp(30px, 11vw, 46px);
  }

  .pet-hero-meta,
  .app-pet-hero .profile-bio {
    font-size: 13px;
  }

  .pet-hero-actions {
    grid-column: 1 / -1;
  }

  .pet-photo-actions {
    left: 5px;
    top: 5px;
    gap: 5px;
  }

  .pet-photo-action {
    width: 34px;
    height: 34px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .pet-photo-action svg {
    width: 17px;
    height: 17px;
  }

  .pet-quick-stats {
    gap: 6px;
  }

  .pet-quick-stat {
    min-width: 78px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
    padding: 4px 8px;
  }

  .pet-quick-stat strong {
    font-size: 17px;
  }

  .pet-hero-actions .btn {
    min-height: 36px;
    padding: 5px 10px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .pet-parent-card,
  .pet-care-card,
  .pet-achievement-showcase {
    border-width: 3px;
    border-radius: 18px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .pet-profile-relations {
    grid-template-columns: 1fr;
  }

  .profile-card-head,
  .achievement-head {
    margin-bottom: 9px;
  }

  .profile-card-head h2,
  .achievement-head h2 {
    font-size: 19px;
  }

  .profile-row-link,
  .care-row {
    border-width: 2px;
    border-radius: 15px;
    padding: 9px;
  }

  .care-row .avatar-lg,
  .profile-row-link .avatar-lg,
  .care-placeholder {
    width: 50px;
    height: 50px;
  }

  .profile-row-link strong,
  .care-row strong {
    font-size: 15px;
  }

  .profile-row-link small,
  .care-row small {
    font-size: 12px;
  }

  .profile-achievement-grid {
    grid-template-columns: 1fr;
  }

  .edit-profile-card .form-grid label:last-child {
    grid-column: auto;
  }

  .avatar-edit-frame,
  .avatar-edit-frame .avatar-xl {
    width: 140px;
    height: 140px;
  }

  .crop-actions {
    grid-template-columns: 1fr;
  }

  .pet-tab-switch {
    top: 8px;
    border-width: 3px;
    border-radius: 20px;
    padding: 5px;
    gap: 5px;
  }

  .pet-tab-button {
    min-height: 56px;
    gap: 6px;
    border-width: 2px;
    border-radius: 15px;
    padding: 7px 6px;
  }

  .pet-tab-icon {
    width: 30px;
    height: 30px;
    border-width: 2px;
    border-radius: 10px;
    font-size: 15px;
  }

  .pet-tab-copy strong {
    font-size: 14px;
  }

  .pet-tab-copy small {
    max-width: 92px;
    font-size: 10px;
  }

  .pet-profile-vet-block,
  .achievements-card.profile-combo-card {
    grid-column: auto;
  }

  .pet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-pets-head + .pet-grid,
  .parent-pet-grid {
    grid-template-columns: repeat(auto-fit, minmax(142px, 164px));
    justify-content: center;
  }

  .dashboard-pets-head + .pet-grid > .dashboard-card:last-child:nth-child(odd),
  .parent-pet-grid > .dashboard-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 164px);
  }

  .dashboard-card .pet-card-body {
    padding: 10px;
  }

  .dashboard-card h2 {
    font-size: 20px;
  }

  .dashboard-card .mini-stats {
    justify-content: center;
  }

  .dashboard-card .mini-stats span {
    font-size: 11px;
    padding: 3px 7px;
  }

  .pet-card-icon-action {
    width: 36px;
    height: 36px;
    border-width: 2px !important;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .pet-card-icon-action svg {
    width: 18px;
    height: 18px;
  }

  .card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }

  .card-actions a {
    font-size: 12px;
  }

  .install-prompt {
    bottom: 88px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 8px;
    border-width: 3px;
    border-radius: 18px;
    box-shadow: 5px 5px 0 var(--ink);
    padding: 8px;
  }

  .install-prompt-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 24px;
  }

  .install-prompt-copy strong {
    font-size: 13px;
  }

  .install-prompt-copy span {
    font-size: 11px;
  }

  .install-prompt-button {
    min-height: 34px;
    padding: 4px 10px;
    font-size: 12px;
  }

  .install-prompt-close {
    width: 34px;
    height: 34px;
  }
}

@media print {
  .topbar, .footer, .print-btn, .hint { display: none !important; }
  body { background: #fff; }
  .site-main { width: 100%; padding: 0; }
  .digital-card { box-shadow: none; break-inside: avoid; }
}
