:root {
  --bg: #faf5ef;
  --panel: #ffffff;
  --ink: #211916;
  --muted: #87766c;
  --line: #eadbd0;
  --accent: #ff6b4a;
  --accent-soft: #fff0ea;
  --blue: #4f8cff;
  --good: #23b26d;
  --danger: #ef4d5a;
  --gold: #eba51f;
  --shadow: 0 20px 56px rgba(50, 32, 22, 0.18);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(255, 107, 74, 0.38);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 12px;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transform: translate(-50%, calc(-100% - 16px));
  transition: transform 140ms ease;
}

.skip-link:focus-visible {
  outline-color: #fff;
  transform: translate(-50%, 0);
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.app-boot-splash {
  display: none;
}

html[data-auth-pending] body,
html[data-locale-pending] body {
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 146, 104, 0.3), transparent 32rem),
    radial-gradient(circle at 84% 86%, rgba(79, 140, 255, 0.18), transparent 30rem),
    var(--bg);
}

html[data-auth-pending] body > :not(.app-boot-splash),
html[data-locale-pending] body > :not(.app-boot-splash) {
  visibility: hidden;
}

html[data-auth-pending] .app-boot-splash,
html[data-locale-pending] .app-boot-splash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: block;
  overflow-y: auto;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  color: var(--ink);
  text-align: left;
}

.app-boot-content {
  width: min(100%, 720px);
  margin: max(12px, 4vh) auto;
}

.app-boot-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.app-boot-brand img { width: 48px; height: 48px; border-radius: 14px; }
.app-boot-brand strong {
  font-size: 25px;
  letter-spacing: -0.02em;
}

.app-boot-content h1 { margin: 28px 0 12px; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.025em; }
.app-boot-intro { max-width: 60ch; color: var(--muted); line-height: 1.65; }
.app-boot-community { display: inline-block; padding: 12px 0; color: var(--ink); font-weight: 800; text-underline-offset: 5px; }
.app-boot-stories { display: grid; gap: 14px; margin: 20px 0; }
.app-boot-stories:empty { display: none; }
.app-boot-stories article { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.75); overflow-wrap: anywhere; }
.app-boot-stories h2 { margin: 0 0 8px; font-size: 17px; line-height: 1.4; }
.app-boot-stories a { color: var(--ink); text-decoration: none; }
.app-boot-stories a:hover { text-decoration: underline; }
.app-boot-stories p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.app-boot-stories .app-boot-publisher { margin-bottom: 6px; font-size: 12px; font-weight: 750; }
.app-boot-links { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 28px; font-size: 13px; }
.app-boot-links a { color: var(--muted); text-underline-offset: 3px; }
.app-boot-progress { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.app-boot-progress span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.app-boot-progress i {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 3px solid rgba(255, 107, 74, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: app-boot-spin 760ms linear infinite;
}

.app-boot-retry {
  display: inline-block;
  margin-top: 10px;
  padding: 9px 13px;
  border: 1px solid rgba(88, 49, 35, 0.18);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  animation: app-boot-retry-reveal 1ms linear 8s forwards;
}

@keyframes app-boot-retry-reveal {
  to {
    opacity: 1;
    visibility: visible;
  }
}

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

body.is-auth-gate-open {
  overflow: hidden;
}

body.is-auth-gate-open .skip-link {
  display: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 146, 104, 0.32), transparent 30rem),
    radial-gradient(circle at 88% 86%, rgba(79, 140, 255, 0.2), transparent 28rem),
    #f8f3ee;
}

.auth-gate:not([hidden]) {
  animation: auth-gate-enter 180ms ease-out both;
}

.auth-gate:not([hidden]) .auth-gate-surface {
  animation: auth-gate-surface-enter 240ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

@keyframes auth-gate-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes auth-gate-surface-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-gate-surface {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  width: min(960px, 100%);
  min-height: min(700px, calc(100svh - 36px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(226, 208, 196, 0.9);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 90px rgba(57, 36, 26, 0.2);
}

.auth-gate-visual {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(31, 21, 17, 0.05), rgba(31, 21, 17, 0.78)),
    url("../assets/pets/discover/generated/bean-box.webp") center/cover no-repeat;
}

.auth-gate-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 107, 74, 0.38), transparent 48%);
}

.auth-gate-brand-mark,
.auth-gate-mobile-brand span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: var(--accent);
  background: #fff;
  font-size: 22px;
  font-weight: 950;
  box-shadow: 0 10px 30px rgba(30, 18, 12, 0.22);
}

.auth-gate-visual > div {
  position: relative;
  z-index: 1;
}

.auth-gate-visual p {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.auth-gate-visual h1 {
  max-width: 470px;
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.auth-gate-visual div > span {
  display: block;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 750;
}

.auth-gate-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 58px);
  outline: none;
}

.auth-gate-close {
  position: absolute;
  top: 20px;
  left: 22px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: #f7f1ec;
  font-size: 12px;
  font-weight: 850;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin: 24px 0 20px;
  border-radius: 14px;
  background: #f3ece7;
}

.auth-mode-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
}

.auth-mode-tabs button.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 16px rgba(74, 49, 35, 0.09);
}

.auth-consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.auth-consent input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.auth-consent a,
.auth-gate-card footer a {
  color: var(--accent);
  font-weight: 850;
  text-underline-offset: 2px;
}

.auth-gate-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-gate-mobile-brand span {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  font-size: 17px;
}

.auth-gate-form-heading h2 {
  margin: 5px 0 10px;
  font-size: clamp(28px, 4vw, 39px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.auth-gate-form-heading > p:last-child,
.auth-gate-status p,
.auth-gate-warning p,
.auth-gate-invite-note,
.auth-gate-card footer {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-gate-card .auth-login-form {
  gap: 14px;
  margin-top: 24px;
}

.auth-field {
  display: grid;
  gap: 7px;
  color: #4b3b34;
  font-size: 12px;
  font-weight: 850;
}

.auth-password-rule {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}

.auth-password-control {
  position: relative;
  display: block;
  min-width: 0;
}

.auth-password-control .text-input {
  width: 100%;
  padding-inline-end: 72px;
}

.auth-password-visibility {
  position: absolute;
  top: 50%;
  inset-inline-end: 7px;
  min-width: 52px;
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transform: translateY(-50%);
}

.auth-password-visibility:hover {
  background: #f1ece5;
}

.auth-password-visibility:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.auth-password-visibility:active {
  transform: translateY(calc(-50% + 1px));
}

.auth-password-visibility:disabled {
  cursor: default;
  opacity: 0.55;
}

.auth-gate-card .text-input {
  min-height: 49px;
  border-radius: 15px;
  background: #fff;
}

.auth-submit-button {
  min-height: 49px;
  margin-top: 2px;
  border-radius: 15px;
}

.auth-gate-card .auth-activation-card {
  padding: 0;
  border: 0;
  background: transparent;
}

.auth-gate-card .auth-activation-card > div strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.auth-gate-invite-note {
  padding: 12px 14px;
  margin: 18px 0 0;
  border: 1px solid #f0e0d5;
  border-radius: 14px;
  background: #fff9f5;
}

.auth-gate-status {
  display: grid;
  justify-items: center;
  padding: 36px 0;
  text-align: center;
}

.auth-gate-spinner {
  width: 38px;
  height: 38px;
  margin-bottom: 17px;
  border: 4px solid #f2dfd4;
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: auth-gate-spin 800ms linear infinite;
}

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

.auth-gate-warning {
  padding: 15px;
  margin-top: 20px;
  border: 1px solid rgba(239, 77, 90, 0.22);
  border-radius: 16px;
  background: #fff5f5;
}

.auth-gate-warning > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.auth-gate-card footer {
  margin-top: 24px;
  text-align: center;
  font-size: 11px;
}

@media (max-width: 720px) {
  .auth-gate { padding: 0; }
  .auth-gate-surface {
    grid-template-columns: 1fr;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
  }
  .auth-gate-visual { display: none; }
  .auth-gate-card {
    justify-content: flex-start;
    padding: calc(66px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
  }
  .auth-gate-close { top: calc(14px + env(safe-area-inset-top)); }
  .auth-gate-mobile-brand { display: flex; }
}

/* Persistent chat shell and structured chat tools. */
.matches-layout.is-chat-open .chat-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.chat-shell-header {
  position: relative;
  z-index: 7;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  margin-bottom: 8px;
  padding: 0 2px 9px;
  border-bottom: 1px solid rgb(234 219 208 / 78%);
}

.chat-shell-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  color: #74594d;
  background: transparent;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.chat-shell-back:hover,
.chat-shell-back:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
}

.chat-shell-back:active {
  transform: translateX(-1px);
}

.chat-shell-back .ui-icon {
  width: 21px;
  height: 21px;
}

.chat-shell-content {
  min-width: 0;
}

.chat-shell-content .chat-detail-card {
  position: static;
  height: auto;
  margin: 0;
}

.chat-shell-content .chat-detail-topbar {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.chat-shell-pending {
  display: grid;
  gap: 2px;
  min-height: 62px;
  align-content: center;
  padding: 9px 12px;
  border: 1px solid rgb(234 219 208 / 72%);
  border-radius: 18px;
  background: rgb(255 250 247 / 92%);
  box-shadow: 0 8px 22px rgba(50, 32, 22, 0.07);
}

.chat-shell-pending span {
  color: var(--muted);
  font-size: 12px;
}

.chat-battle-step-title {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.chat-battle-theme.is-selected {
  border-color: rgba(255, 107, 74, 0.6);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.12);
}

.chat-battle-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.chat-battle-media-option {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.chat-battle-media-option > span {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  background-position: center !important;
  background-size: cover !important;
}

.chat-battle-media-option strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-battle-media-option:hover,
.chat-battle-media-option:focus-visible {
  border-color: rgba(255, 107, 74, 0.48);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.1);
}

.chat-battle-empty,
.chat-tool-state,
.wishlist-load-error {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.74);
}

.chat-tool-state.is-error,
.wishlist-load-error {
  border-color: rgba(239, 77, 90, 0.28);
  background: #fff6f6;
}

.chat-wishlist-grid {
  display: grid;
  gap: 9px;
}

.chat-wishlist-option {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.chat-wishlist-option .product-art {
  width: 56px;
  min-height: 56px;
  border-radius: 14px;
}

.chat-wishlist-option > span:nth-child(2),
.chat-wishlist-option strong,
.chat-wishlist-option small {
  display: block;
  min-width: 0;
}

.chat-wishlist-option strong,
.chat-wishlist-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-wishlist-option small {
  margin-top: 4px;
  color: var(--muted);
}

.chat-meetup-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.chat-meetup-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-meetup-fields label.is-wide {
  grid-column: 1 / -1;
}

.chat-meetup-fields textarea {
  min-height: 84px;
  resize: vertical;
}

.chat-meetup-safety {
  padding: 11px 12px;
  border-radius: 15px;
  color: #776019 !important;
  background: #fff7d8;
  font-size: 12px;
}

.chat-tool-error {
  margin: 0 !important;
  color: var(--danger) !important;
  font-size: 12px;
  font-weight: 850;
}

.meetup-summary {
  display: grid;
  gap: 7px;
  margin: 9px 0;
}

.meetup-summary > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 9px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
}

.meetup-summary dt,
.meetup-summary dd {
  margin: 0;
}

.meetup-summary dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.meetup-summary dd {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.meetup-summary dd small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 720px) {
  .matches-layout.is-chat-open .chat-workspace {
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
  }

  .chat-shell-header {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 7px;
    min-height: 56px;
    padding-bottom: 7px;
  }

  .chat-shell-back {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }

  .chat-shell-content .chat-detail-topbar {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 7px;
  }

  .chat-shell-content .chat-detail-avatar,
  .chat-shell-content .chat-detail-avatar-button {
    width: 42px;
    height: 42px;
  }

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

  .chat-meetup-fields {
    grid-template-columns: 1fr;
  }

  .chat-meetup-fields label.is-wide {
    grid-column: auto;
  }
}

.storage-data-card {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.storage-data-card p { margin: 0; overflow-wrap: anywhere; }
.storage-data-card > label:not(.storage-clear-consent) { display: grid; gap: 8px; min-width: 0; }
.storage-data-card select { width: 100%; min-width: 0; max-width: 100%; font-size: 16px; }
.storage-data-card button { justify-self: start; min-height: 44px; white-space: normal; text-align: start; }
.storage-clear-consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.storage-clear-consent input { width: 20px; height: 20px; margin: 3px 0 0; }
.storage-clear-consent span { overflow-wrap: anywhere; line-height: 1.5; }
.storage-data-notice { font-size: 13px; line-height: 1.5; }
.storage-performance { min-width: 0; }
.storage-performance summary { padding-block: 10px; cursor: pointer; }
.storage-performance pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; max-height: 240px; overflow: auto; }
.shop-coming-soon { grid-column: 1 / -1; width: min(100%, 680px); margin: 32px auto; padding: 28px; }

@media (max-width: 390px) {
  .chat-shell-content .chat-detail-pet-meta,
  .chat-shell-content .chat-pet-context {
    display: none;
  }

  .chat-shell-content .chat-detail-card {
    padding-inline: 0;
  }
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 155, 98, 0.26), transparent 24rem),
    linear-gradient(180deg, #fffaf5, var(--bg));
}

body.is-chat-overlay-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.is-chat-overlay-open .app-header,
body.is-chat-overlay-open .bottom-tabs {
  visibility: hidden;
  pointer-events: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  overflow-x: clip;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04), var(--shadow);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: calc(64px + env(safe-area-inset-top));
  padding: calc(10px + env(safe-area-inset-top)) 16px 9px;
  background: rgba(250, 245, 239, 0.9);
  backdrop-filter: blur(18px);
}

.app-shell.is-discover .app-header {
  grid-template-columns: 58px minmax(0, 1fr) auto;
}

.app-header-copy {
  min-width: 0;
}

.app-header-copy h1 {
  overflow: hidden;
  font-size: 22px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button,
.tool-button,
.sheet-close {
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  font-weight: 900;
  background: #fff;
}

.icon-button {
  display: grid;
  place-items: center;
  min-width: 54px;
  height: 44px;
  font-size: 13px;
}

.icon-button .ui-icon {
  width: 21px;
  height: 21px;
}

.header-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.header-actions .icon-button {
  min-width: 48px;
  padding: 0 10px;
}

.guest-auth-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.guest-auth-actions[hidden] {
  display: none;
}

.guest-auth-button {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.guest-auth-button.is-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.guest-auth-button.is-primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.guest-plaza-hero {
  display: grid;
  gap: 16px;
  padding: 22px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 107, 74, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 95% 10%, rgba(255, 174, 112, 0.28), transparent 12rem),
    linear-gradient(145deg, #fff 0%, #fff8f3 100%);
  box-shadow: 0 14px 40px rgba(91, 61, 43, 0.09);
}

.guest-plaza-hero[hidden] {
  display: none;
}

.guest-plaza-hero h2 {
  margin: 5px 0 9px;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.guest-plaza-hero p:not(.eyebrow),
.guest-plaza-hero small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.guest-plaza-hero-actions,
.guest-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.guest-plaza-hero-actions small {
  flex-basis: 100%;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
}

h3 {
  margin-bottom: 10px;
}

.main {
  min-height: calc(100vh - 82px);
  min-height: calc(100svh - 82px);
  padding: 0 16px calc(112px + env(safe-area-inset-bottom));
}

.main:focus-visible {
  outline-offset: -4px;
}

.network-experience-banner {
  position: sticky;
  top: calc(64px + env(safe-area-inset-top));
  z-index: 19;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 12px 10px;
  padding: 10px 11px;
  border: 1px solid rgba(79, 140, 255, 0.24);
  border-radius: 16px;
  background: rgba(244, 248, 255, 0.96);
  box-shadow: 0 10px 28px rgba(50, 32, 22, 0.12);
  backdrop-filter: blur(16px);
}

.network-experience-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.12);
}

.network-experience-banner strong,
.network-experience-banner p {
  margin: 0;
}

.network-experience-banner strong {
  display: block;
  font-size: 12px;
}

.network-experience-banner p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.network-experience-banner button {
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.network-experience-banner[data-network-state="offline"] {
  border-color: rgba(93, 83, 77, 0.2);
  background: rgba(249, 247, 245, 0.97);
}

.network-experience-banner[data-network-state="offline"] .network-experience-indicator,
.network-experience-banner[data-network-state="offline"] button {
  background: #746963;
}

.network-experience-banner[data-network-state="degraded"] {
  border-color: rgba(239, 77, 90, 0.24);
  background: rgba(255, 246, 246, 0.97);
}

.network-experience-banner[data-network-state="degraded"] .network-experience-indicator,
.network-experience-banner[data-network-state="degraded"] button {
  background: var(--danger);
}

.network-experience-banner[data-network-state="restored"] {
  border-color: rgba(35, 178, 109, 0.24);
  background: rgba(243, 252, 247, 0.97);
}

.network-experience-banner[data-network-state="restored"] .network-experience-indicator,
.network-experience-banner[data-network-state="restored"] button {
  background: var(--good);
}

.network-experience-banner[data-network-state="checking"] .network-experience-indicator {
  animation: network-experience-pulse 1s ease-in-out infinite;
}

.email-verification-banner {
  position: relative;
  z-index: 18;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 12px 10px;
  padding: 10px 11px;
  border: 1px solid rgba(236, 163, 47, 0.28);
  border-radius: 16px;
  background: rgba(255, 249, 233, 0.97);
  box-shadow: 0 8px 22px rgba(50, 32, 22, 0.09);
}

.email-verification-banner[data-tone="error"] {
  border-color: rgba(239, 77, 90, 0.24);
  background: rgba(255, 244, 245, 0.97);
}

.email-verification-banner[data-tone="verified"] {
  border-color: rgba(35, 178, 109, 0.22);
  background: rgba(239, 250, 245, 0.98);
}

.email-verification-banner-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: #946316;
  background: rgba(236, 163, 47, 0.16);
  font-weight: 950;
}

.email-verification-banner[data-tone="verified"] .email-verification-banner-mark {
  color: #147648;
  background: rgba(35, 178, 109, 0.14);
}

.email-verification-banner[data-tone="error"] .email-verification-banner-mark {
  color: #b72f3b;
  background: rgba(239, 77, 90, 0.13);
}

.email-verification-banner strong,
.email-verification-banner p {
  margin: 0;
}

.email-verification-banner p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.email-verification-banner-actions {
  display: flex;
  gap: 6px;
}

.email-verification-banner-actions button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 11px;
}

@keyframes network-experience-pulse {
  50% {
    opacity: 0.45;
    transform: scale(0.76);
  }
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.discovery-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding-top: 4px;
}

.match-toolbar {
  display: flex;
  min-width: 0;
  gap: 8px;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.match-toolbar::-webkit-scrollbar {
  display: none;
}

.discovery-location-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  margin: -4px 0 12px;
  border: 1px solid rgba(79, 140, 255, 0.22);
  border-radius: 16px;
  background: rgba(244, 248, 255, 0.94);
}

.discovery-location-card[hidden] {
  display: none;
}

.discovery-location-card strong,
.discovery-location-card p {
  margin: 0;
}

.discovery-location-card strong {
  display: block;
  font-size: 12px;
}

.discovery-location-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.discovery-location-card-actions {
  display: flex;
  gap: 6px;
}

.discovery-location-card button {
  min-height: 38px;
  padding: 7px 11px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.discovery-location-card button.is-secondary {
  border: 1px solid rgba(79, 140, 255, 0.2);
  color: var(--blue);
  background: #fff;
}

.discovery-location-card.is-error {
  border-color: rgba(239, 77, 90, 0.24);
  background: rgba(255, 246, 246, 0.96);
}

.discovery-location-card.is-compact {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.discovery-location-card .discovery-location-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid rgba(79, 140, 255, 0.2);
  border-radius: 14px;
  color: var(--ink);
  text-align: left;
  background: rgba(244, 248, 255, 0.94);
}

.discovery-location-summary .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.discovery-location-summary > span {
  min-width: 0;
}

.discovery-location-summary strong,
.discovery-location-summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-location-summary small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.discovery-location-summary .discovery-location-summary-action {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .discovery-location-card {
    grid-template-columns: 1fr;
  }

  .discovery-location-card-actions button {
    flex: 1;
  }
}

.filter-chip,
.shop-mode,
.species-tab {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
}

.filter-chip.is-active,
.shop-mode.is-active,
.species-tab.is-active {
  color: var(--accent);
  border-color: rgba(255, 107, 74, 0.35);
  background: var(--accent-soft);
}

.filter-chip.discovery-more-entry {
  position: relative;
  display: inline-flex;
  width: auto;
  min-height: 44px;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #d5dfd8;
  border-radius: 12px;
  color: #496653;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
}

.discovery-more-arrow { font-size: 20px; font-weight: 400; line-height: 1; }
.filter-chip.discovery-more-entry:is(:hover, .is-active) { border-color: #a8bfaf; background: #edf3ee; color: #355344; }
.filter-chip.discovery-more-entry:focus-visible { outline: 2px solid #6a8d75; outline-offset: 2px; }

@media (max-width: 600px) {
  .discovery-controls { gap: 8px; }
  .match-toolbar { gap: 6px; }
  .match-toolbar .filter-chip { min-height: 44px; padding: 8px 10px; font-size: 13px; }
}

.other-pet-category-toolbar {
  display: flex;
  gap: 7px;
  margin: -6px 0 12px;
  padding: 3px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.other-pet-category-toolbar::-webkit-scrollbar {
  display: none;
}

.other-pet-category-toolbar .filter-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 34px;
  padding: 6px 11px;
  font-size: 12px;
}

.other-pet-category-toolbar .filter-chip > span {
  color: #6570bd;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.other-pet-category-toolbar .filter-chip.is-electronic {
  border-color: rgba(92, 104, 194, 0.28);
  color: #505dad;
  background: #f1f3ff;
}

.pet-category-badge {
  display: inline-flex;
  width: fit-content;
  margin: 4px 0 7px;
  padding: 5px 8px;
  border: 1px solid rgba(73, 132, 112, 0.22);
  border-radius: 999px;
  color: #3d7866;
  background: rgba(235, 250, 244, 0.92);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.025em;
}

.pet-category-badge.is-electronic,
.distance-pill.is-electronic {
  border-color: rgba(161, 171, 255, 0.35);
  color: #fff;
  background: rgba(66, 75, 148, 0.82);
}

.profile-pet-body .pet-category-badge,
.friend-profile-hero .pet-category-badge,
.plaza-author-hero .pet-category-badge {
  color: #505dad;
  background: #f1f3ff;
}

.card-stage {
  position: relative;
  height: min(66vh, 620px);
  height: min(66svh, 620px);
  min-height: 480px;
}

.card-stack {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.pet-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 32px;
  color: #fff;
  background: #211b18;
  box-shadow: var(--shadow);
  touch-action: pan-y;
  user-select: none;
  will-change: transform;
}

.discovery-media-shell,
.discovery-media-shade {
  position: absolute;
  inset: 0;
}

.discovery-media-shell {
  z-index: 0;
  overflow: hidden;
}

.discovery-media-shell.is-detail,
.discovery-media-shell.is-profile {
  touch-action: pan-y;
}

.discovery-media-track {
  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(calc(var(--discovery-media-position, 0%) + var(--discovery-drag-offset, 0px)), 0, 0);
  transition: transform 320ms cubic-bezier(0.22, 0.72, 0.2, 1);
  will-change: transform;
}

.discovery-media-shell.is-dragging .discovery-media-track {
  transition: none;
}

.discovery-media-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
}

.discovery-media-slide[aria-hidden="true"] {
  pointer-events: none;
}

.discovery-media-visual {
  position: absolute;
  inset: 0;
  background-size: cover !important;
  background-position: center !important;
}

.discovery-media-shade {
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.14) 46%, rgba(0, 0, 0, 0.86) 100%);
}

.discovery-media-visual img,
.discovery-media-visual video,
.discovery-detail-hero > video,
.profile-pet-cover > video,
.profile-gallery-item > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.discovery-media-slide.is-media-ready video,
.profile-gallery-item.is-media-ready video,
.plaza-feed-media-slide.is-media-ready video,
.plaza-detail-media-item.is-media-ready video {
  animation: live-media-camera-motion 4.2s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes live-media-camera-motion {
  from { transform: scale(1.005) translate3d(0, 0, 0); }
  to { transform: scale(1.045) translate3d(-0.6%, -0.35%, 0); }
}

.discovery-media-visual.is-media-next,
.discovery-detail-hero.is-media-next {
  animation: discovery-media-next 180ms ease-out;
}

.discovery-media-visual.is-media-previous,
.discovery-detail-hero.is-media-previous {
  animation: discovery-media-previous 180ms ease-out;
}

.discovery-media-visual.is-boundary-previous,
.discovery-detail-hero.is-boundary-previous {
  animation: discovery-media-boundary-previous 190ms ease-out;
}

.discovery-media-visual.is-boundary-next,
.discovery-detail-hero.is-boundary-next {
  animation: discovery-media-boundary-next 190ms ease-out;
}

@keyframes discovery-media-next {
  from { opacity: 0.72; transform: translateX(3%) scale(1.015); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes discovery-media-previous {
  from { opacity: 0.72; transform: translateX(-3%) scale(1.015); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes discovery-media-boundary-previous {
  50% { transform: translateX(7px); }
}

@keyframes discovery-media-boundary-next {
  50% { transform: translateX(-7px); }
}

.live-media-control {
  min-width: 44px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  background: rgba(12, 10, 9, 0.48);
  backdrop-filter: blur(12px);
}

.media-playback-control {
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

.media-playback-status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(14, 11, 10, 0.68);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.media-playback-status[hidden] {
  display: none;
}

.is-media-loading .media-playback-status::before {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  content: "";
  animation: media-playback-spin 720ms linear infinite;
}

.is-media-autoplay-blocked .media-playback-status {
  background: rgba(37, 31, 28, 0.82);
}

.is-media-error .media-playback-status {
  color: #fff2ee;
  border-color: rgba(255, 126, 93, 0.62);
  background: rgba(92, 31, 20, 0.84);
}

.is-media-error video[hidden] {
  display: none;
}

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

.is-live-error .live-media-control {
  color: #ffe3dc;
  border-color: rgba(255, 126, 93, 0.72);
}

.discovery-media-progress {
  position: absolute;
  top: 11px;
  left: 14px;
  right: 14px;
  z-index: 5;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 5px;
}

.discovery-media-progress button {
  height: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.discovery-media-progress button.is-active {
  background: #fff;
}

.discovery-live-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.discovery-live-controls[hidden],
.discovery-detail-live-controls[hidden],
.profile-pet-live-controls[hidden] {
  display: none;
}

.discovery-media-navigation {
  position: absolute;
  inset: 72px 8px 150px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.discovery-media-arrow {
  display: grid;
  place-items: center;
  width: 38px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(12, 10, 9, 0.26);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
  font-size: 30px;
  font-weight: 700;
  pointer-events: auto;
}

.discovery-media-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.live-media-pill,
.discovery-detail-media-count {
  padding: 8px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.05em;
  background: rgba(12, 10, 9, 0.5);
  backdrop-filter: blur(12px);
}

.live-media-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(214, 38, 62, 0.86);
  box-shadow: 0 0 0 0 rgba(255, 73, 92, 0.48);
  animation: live-media-pill-pulse 1.8s ease-out infinite;
}

.live-media-pill::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
  content: "";
  animation: live-media-dot 900ms ease-in-out infinite alternate;
}

@keyframes live-media-pill-pulse {
  55% { box-shadow: 0 0 0 8px rgba(255, 73, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 73, 92, 0); }
}

@keyframes live-media-dot {
  to { opacity: 0.45; transform: scale(0.72); }
}

.pet-card.is-dragging {
  transition: none;
}

.pet-card.is-animating {
  transition: transform 0.26s ease, opacity 0.26s ease;
}

.discovery-ad-card {
  --ad-accent: #ff7048;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.22) 44%, rgba(0, 0, 0, 0.92) 100%),
    var(--photo);
}

.discovery-ad-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5px;
  background: var(--ad-accent);
}

.discovery-ad-label,
.discovery-ad-sponsor {
  color: #fff;
  background: rgba(15, 12, 11, 0.7);
}

.discovery-ad-content {
  display: grid;
  gap: 10px;
}

.discovery-ad-eyebrow,
.discovery-ad-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.discovery-ad-eyebrow {
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discovery-ad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.discovery-ad-actions button {
  min-height: 42px;
  border-radius: 999px;
}

.discovery-ad-actions .primary-button {
  background: var(--ad-accent);
}

.discovery-ad-actions .product-action.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(15, 12, 11, 0.48);
}

.round-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7);
  opacity: 0.38;
}

.round-button.pass.is-ad-skip {
  color: #fff;
  background: #30231e;
}

.round-button.is-preview-action {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 24px rgba(28, 18, 14, 0.2);
}

.pet-card-content {
  position: relative;
  z-index: 2;
  padding: 22px;
}

.discovery-empty-card .pet-card-content {
  display: grid;
  gap: 10px;
}

.discovery-empty-card {
  background: var(--photo);
}

.discovery-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.discovery-empty-actions .product-action {
  min-height: 44px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
}

.discovery-liked-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.discovery-liked-button[hidden] {
  display: none;
}

.discovery-liked-button small {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
  line-height: 1.4;
}

.discovery-preview-cta {
  display: grid;
  gap: 2px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 15px;
  color: #fff;
  background: rgba(22, 13, 9, 0.5);
  text-align: left;
  backdrop-filter: blur(12px);
}

.discovery-preview-cta strong {
  font-size: 12px;
}

.discovery-preview-cta span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
}

.pet-card-top {
  position: absolute;
  top: 28px;
  left: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.distance-pill,
.verify-pill {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
}

.verify-pill {
  background: rgba(35, 178, 109, 0.85);
}

.pet-card-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  pointer-events: auto;
}

.community-directory-footer {
  padding: 24px 20px calc(100px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.community-directory-footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.pet-card-info {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

.swipe-badge {
  position: absolute;
  top: 86px;
  z-index: 3;
  padding: 10px 14px;
  border: 4px solid currentColor;
  border-radius: 14px;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: rotate(-12deg);
}

.swipe-badge.like {
  left: 22px;
  color: var(--good);
}

.swipe-badge.pass {
  right: 22px;
  color: var(--danger);
  transform: rotate(12deg);
}

.pet-card h3 {
  margin: 0 0 4px;
  font-size: 38px;
  line-height: 1;
}

.pet-meta {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.pet-bio {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.discovery-card-tags {
  flex-wrap: nowrap;
  max-width: 100%;
  padding-bottom: 3px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.discovery-card-tags::-webkit-scrollbar,
.pet-card-content::-webkit-scrollbar {
  display: none;
}

.discovery-card-tags > * {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .pet-card-content {
    max-height: 58%;
    padding-bottom: 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }
}

.tag-row span,
.tag-pill {
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
}

.panel .tag-row span:not(.tag-pill),
.product-card .tag-row span:not(.tag-pill),
.breed-detail .tag-row span:not(.tag-pill) {
  color: var(--muted);
  background: #f8f1eb;
}

.tag-pill.is-social {
  color: #9a461c;
  border-color: rgba(255, 107, 74, 0.22);
  background: #fff0ea;
}

.tag-pill.is-mating {
  color: #8b3f97;
  border-color: rgba(139, 63, 151, 0.22);
  background: #f9e9ff;
}

.tag-pill.is-chat {
  color: #1d5ead;
  border-color: rgba(79, 140, 255, 0.22);
  background: #eaf2ff;
}

.tag-pill.is-adoption {
  color: #19734b;
  border-color: rgba(35, 178, 109, 0.22);
  background: #e8f8ef;
}

.tag-pill.is-care {
  color: #785314;
  border-color: rgba(235, 165, 31, 0.26);
  background: #fff5d8;
}

.tag-pill.is-shop {
  color: #7a4b22;
  border-color: rgba(255, 189, 89, 0.24);
  background: #fff3df;
}

.tag-pill.is-safety {
  color: #9a2430;
  border-color: rgba(239, 77, 90, 0.22);
  background: #fff0f2;
}

.tag-pill.is-species,
.tag-pill.is-default {
  color: var(--muted);
  border-color: rgba(135, 118, 108, 0.16);
  background: #f8f1eb;
}

.compatibility {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  color: #2b1b14;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.88);
}

.swipe-actions {
  display: grid;
  grid-template-columns: 72px 56px 72px;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 18px 0 8px;
}

.round-button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 12px 28px rgba(55, 35, 24, 0.18);
}

.round-button .ui-icon {
  width: 30px;
  height: 30px;
  transition: transform 160ms ease;
}

.round-button.save .ui-icon {
  width: 25px;
  height: 25px;
}

.round-button:not(:disabled):hover .ui-icon,
.round-button:not(:disabled):focus-visible .ui-icon {
  transform: scale(1.08);
}

.round-button.pass,
.round-button.like {
  width: 72px;
  height: 72px;
  font-size: 36px;
}

.round-button.save {
  width: 56px;
  height: 56px;
  color: var(--gold);
  font-size: 25px;
}

.round-button.pass {
  color: var(--danger);
}

.round-button.like {
  color: var(--good);
}

.gesture-hint {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.match-toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 50;
  width: min(360px, calc(100vw - 36px));
  padding: 15px 16px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--good), var(--blue));
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.match-toast span {
  display: block;
  margin-top: 4px;
  line-height: 1.45;
}

.route-test-status {
  position: fixed;
  left: 50%;
  bottom: calc(74px + env(safe-area-inset-bottom));
  z-index: 29;
  width: min(230px, calc(100vw - 24px));
  border: 1px solid rgba(79, 140, 255, 0.32);
  border-radius: 999px;
  color: #21436f;
  font-size: 11px;
  font-weight: 900;
  background: rgba(239, 247, 255, 0.94);
  box-shadow: 0 10px 28px rgba(50, 32, 22, 0.12);
  transform: translateX(-50%);
  transition: width 0.18s ease, border-radius 0.18s ease;
}

.route-test-status.is-expanded {
  width: min(390px, calc(100vw - 24px));
  border-radius: 18px;
}

.route-test-status details {
  display: block;
}

.route-test-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 9px;
  cursor: pointer;
  list-style: none;
}

.route-test-summary::-webkit-details-marker {
  display: none;
}

.route-test-summary::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4f8cff;
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.12);
}

.route-test-summary-title {
  flex: 0 0 auto;
}

.route-test-summary small,
.route-test-detail > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-test-summary small {
  flex: 1 1 auto;
  opacity: 0.72;
}

.route-test-detail {
  display: grid;
  gap: 7px;
  padding: 0 9px 9px;
}

.route-test-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.route-test-status button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 4px 7px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  background: #4f8cff;
}

.route-test-status.is-armed {
  border-color: rgba(239, 77, 90, 0.32);
  background: rgba(255, 240, 242, 0.95);
}

.route-test-status.is-armed .route-test-summary::before,
.route-test-status.is-armed button {
  background: var(--danger);
}

body[data-route-test="true"] .app-shell {
  padding-bottom: 44px;
}

body[data-route-test="true"][data-route-test-expanded="true"] .app-shell {
  padding-bottom: 92px;
}

body[data-route-test="true"][data-route-test-pane="chat"] .route-test-status {
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 95;
}

.match-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 84;
}

.match-success-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: rgba(22, 13, 9, 0.48);
  backdrop-filter: blur(10px);
  animation: match-success-backdrop-in 180ms ease-out both;
}

.match-success-card {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  gap: 14px;
  justify-items: center;
  padding: 26px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 189, 89, 0.55), transparent 42%),
    linear-gradient(155deg, rgba(255, 107, 74, 0.96), rgba(79, 140, 255, 0.9));
  box-shadow: 0 26px 68px rgba(22, 13, 9, 0.38);
  text-align: center;
  transform: translate(-50%, -50%);
  animation: match-success-card-in 420ms cubic-bezier(0.2, 0.86, 0.24, 1.12) both;
}

.match-success-card .eyebrow {
  color: #fff7e8;
}

.match-success-card h2 {
  max-width: 300px;
  font-size: 31px;
  line-height: 1.05;
}

.match-success-card p {
  max-width: 320px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.match-success-avatars {
  position: relative;
  display: grid;
  grid-template-columns: 82px 82px;
  gap: 34px;
  align-items: center;
}

.match-success-avatar {
  width: 82px;
  height: 82px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 16px 34px rgba(22, 13, 9, 0.2);
}

.match-success-avatar:first-child {
  animation: match-success-avatar-left-in 480ms 70ms cubic-bezier(0.2, 0.86, 0.24, 1.12) both;
}

.match-success-avatar:last-child {
  animation: match-success-avatar-right-in 480ms 70ms cubic-bezier(0.2, 0.86, 0.24, 1.12) both;
}

.match-success-heart {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: var(--accent);
  background: #fff;
  font-size: 24px;
  box-shadow: 0 14px 28px rgba(22, 13, 9, 0.18);
  transform: translate(-50%, -50%);
  animation: match-success-heart-in 360ms 210ms cubic-bezier(0.18, 0.9, 0.28, 1.35) both;
}

.match-success-card > .eyebrow,
.match-success-card > h2,
.match-success-card > p,
.match-success-card > .match-success-tags,
.match-success-card > .match-success-actions {
  animation: match-success-copy-in 300ms ease-out both;
}

.match-success-card > .eyebrow { animation-delay: 180ms; }
.match-success-card > h2 { animation-delay: 220ms; }
.match-success-card > p { animation-delay: 250ms; }
.match-success-card > .match-success-tags { animation-delay: 280ms; }
.match-success-card > .match-success-actions { animation-delay: 310ms; }

@keyframes match-success-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes match-success-card-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 22px)) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes match-success-avatar-left-in {
  from { opacity: 0; transform: translateX(-38px) rotate(-9deg) scale(0.82); }
  to { opacity: 1; transform: translateX(0) rotate(0) scale(1); }
}

@keyframes match-success-avatar-right-in {
  from { opacity: 0; transform: translateX(38px) rotate(9deg) scale(0.82); }
  to { opacity: 1; transform: translateX(0) rotate(0) scale(1); }
}

@keyframes match-success-heart-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.35) rotate(-18deg); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}

@keyframes match-success-copy-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.match-success-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.match-success-tags span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 900;
}

.match-success-actions {
  display: grid;
  width: 100%;
  gap: 8px;
  margin-top: 4px;
}

.match-success-actions .product-action {
  width: 100%;
  border: 0;
  color: var(--accent);
  background: #fff;
}

.match-success-actions .product-action.secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.14);
}

.discovery-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 83;
}

.discovery-liked-overlay {
  position: fixed;
  inset: 0;
  z-index: 82;
}

body.has-discovery-liked {
  overflow: hidden;
}

.discovery-liked-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: rgba(22, 13, 9, 0.48);
  backdrop-filter: blur(10px);
}

.discovery-liked-card {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100svh - 40px));
  overflow: hidden;
  border-radius: 30px;
  background: #fffdfa;
  box-shadow: 0 28px 78px rgba(22, 13, 9, 0.38);
  transform: translate(-50%, -50%);
}

.discovery-liked-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(95, 72, 61, 0.1);
}

.discovery-liked-header h2,
.discovery-liked-header p,
.discovery-liked-empty p {
  margin: 0;
}

.discovery-liked-header h2 {
  font-size: 24px;
  line-height: 1.1;
}

.discovery-liked-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.discovery-liked-content {
  padding: 16px 18px 22px;
  overflow: auto;
  overscroll-behavior: contain;
}

.discovery-liked-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.discovery-liked-item {
  display: grid;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(95, 72, 61, 0.12);
  border-radius: 20px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  box-shadow: 0 8px 20px rgba(56, 36, 27, 0.08);
}

.discovery-liked-item-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background-size: cover !important;
  background-position: center !important;
}

.discovery-liked-item-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(239, 83, 112, 0.92);
  font-size: 9px;
  font-weight: 900;
}

.discovery-liked-item-copy {
  display: grid;
  gap: 4px;
  padding: 11px 12px 13px;
}

.discovery-liked-item-copy strong,
.discovery-liked-item-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-liked-item-copy small,
.discovery-liked-empty {
  color: var(--muted);
}

.discovery-liked-empty {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 28px 4px;
}

@media (max-width: 620px) {
  .discovery-liked-card {
    top: auto;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    max-height: min(88svh, 760px);
    border-radius: 26px;
    transform: translateX(-50%);
  }

  .discovery-liked-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

body.has-discovery-detail {
  overflow: hidden;
}

.discovery-detail-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: rgba(22, 13, 9, 0.48);
  backdrop-filter: blur(10px);
}

.discovery-detail-card {
  position: absolute;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(410px, calc(100vw - 24px));
  max-height: min(86vh, 720px);
  max-height: min(86svh, 720px);
  overflow: hidden auto;
  overscroll-behavior: contain;
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 26px 68px rgba(22, 13, 9, 0.38);
  transform: translateX(-50%);
}

.discovery-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(95, 72, 61, 0.1);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.discovery-detail-back {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  gap: 7px;
  border: 1px solid rgba(95, 72, 61, 0.13);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 16px rgba(56, 36, 27, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.discovery-detail-back > span:first-child {
  font-size: 20px;
  line-height: 1;
}

.discovery-detail-heading {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.discovery-detail-heading strong,
.discovery-detail-heading small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-detail-heading strong {
  font-size: 15px;
}

.discovery-detail-heading small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.discovery-detail-hero {
  position: relative;
  min-height: 260px;
  background-size: cover !important;
  background-position: center !important;
  touch-action: pan-y;
  overflow: hidden;
}

.discovery-detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.32));
}

.discovery-detail-hero .distance-pill {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  color: #fff;
}

.discovery-detail-hero .discovery-media-navigation {
  inset: 42px 10px 42px;
  z-index: 4;
}

.discovery-detail-live-controls {
  position: absolute;
  left: 16px;
  top: 28px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.discovery-detail-media-count {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 4;
}

.discovery-detail-thumbnails {
  display: flex;
  gap: 8px;
  margin: -4px -2px 0;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.discovery-detail-thumbnails::-webkit-scrollbar {
  display: none;
}

.discovery-detail-thumbnails button {
  position: relative;
  flex: 0 0 56px;
  width: 56px;
  height: 68px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 14px;
  background-size: cover !important;
  background-position: center !important;
}

.discovery-detail-thumbnails button.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.discovery-detail-thumbnails button span {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 3px 5px;
  border-radius: 999px;
  color: #fff;
  font-size: 8px;
  font-weight: 950;
  background: rgba(0, 0, 0, 0.58);
}

.discovery-detail-body {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.discovery-detail-body h2 {
  font-size: 30px;
  line-height: 1.05;
}

.discovery-detail-body .pet-meta {
  margin-bottom: 0;
  color: var(--muted);
}

.discovery-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.discovery-detail-stats span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #7a4b22;
  background: #fff3df;
  font-size: 12px;
  font-weight: 900;
}

.discovery-detail-section {
  display: grid;
  gap: 8px;
}

.discovery-detail-section strong {
  font-size: 13px;
}

.discovery-detail-section p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.discovery-detail-actions {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 8px;
  padding-top: 4px;
}

.discovery-detail-actions .product-action {
  min-height: 44px;
}

.discovery-detail-actions .product-action:last-child {
  grid-column: 1 / -1;
}

@media (min-width: 721px) {
  .discovery-detail-card {
    top: 50%;
    bottom: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    grid-template-rows: auto minmax(0, 1fr);
    width: min(1120px, calc(100vw - 64px));
    height: min(760px, calc(100svh - 64px));
    max-height: none;
    overflow: hidden;
    border-radius: 30px;
    transform: translate(-50%, -50%);
  }

  .discovery-detail-topbar {
    position: relative;
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 68px;
    padding: 12px 18px;
  }

  .discovery-detail-heading strong {
    font-size: 17px;
  }

  .discovery-detail-heading small {
    font-size: 11px;
  }

  .discovery-detail-hero {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    height: 100%;
  }

  .discovery-detail-hero .discovery-media-navigation {
    inset: 54px 18px;
  }

  .discovery-detail-body {
    grid-column: 2;
    grid-row: 2;
    align-content: start;
    min-width: 0;
    min-height: 0;
    padding: 26px;
    overflow: hidden auto;
    border-left: 1px solid rgba(95, 72, 61, 0.1);
    overscroll-behavior: contain;
  }

  .discovery-detail-body h2 {
    font-size: clamp(32px, 3vw, 42px);
  }

  .discovery-detail-thumbnails {
    gap: 10px;
    margin: 0 -2px 2px;
  }

  .discovery-detail-thumbnails button {
    flex-basis: 68px;
    width: 68px;
    height: 82px;
  }

  .discovery-detail-section p {
    font-size: 15px;
  }

  .discovery-detail-actions {
    position: sticky;
    bottom: -26px;
    margin: auto -26px -26px;
    padding: 18px 26px 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), #fff 24%);
  }
}

.other-pet-onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 91;
}

body.is-other-pet-onboarding-open {
  overflow: hidden;
}

.other-pet-onboarding-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: rgba(31, 25, 23, 0.58);
  backdrop-filter: blur(8px);
}

.other-pet-onboarding-sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 16px;
  width: min(720px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 40px));
  max-height: min(820px, calc(100svh - 40px));
  padding: 24px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 30px;
  background: #fffdfa;
  box-shadow: 0 32px 90px rgba(31, 25, 23, 0.3);
  transform: translate(-50%, -50%);
}

.other-pet-onboarding-header,
.other-pet-onboarding-actions,
.other-pet-account-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.other-pet-onboarding-header h2,
.other-pet-onboarding-header p,
.other-pet-onboarding-copy p,
.other-pet-onboarding-error {
  margin: 0;
}

.other-pet-onboarding-header h2 {
  margin-top: 3px;
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.16;
}

.other-pet-onboarding-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: #f1eeeb;
  font-size: 22px;
}

.other-pet-onboarding-copy {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.other-pet-onboarding-copy .is-warning,
.other-pet-onboarding-copy .is-electronic {
  padding: 10px 12px;
  border-radius: 14px;
}

.other-pet-onboarding-copy .is-warning {
  color: #795624;
  background: #fff5d9;
}

.other-pet-onboarding-copy .is-electronic {
  color: #4f5aa4;
  background: #f0f2ff;
}

.other-pet-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.other-pet-bulk-actions { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border-radius: 16px; background: #edf3ee; }
.other-pet-bulk-actions > span { color: #355344; font-size: 13px; font-weight: 750; }
.other-pet-bulk-actions > div { display: flex; gap: 8px; flex-wrap: wrap; }
.other-pet-bulk-actions button { min-height: 44px; padding: 8px 14px; border: 1px solid #acc1b2; border-radius: 999px; font-size: 13px; font-weight: 750; cursor: pointer; }
.other-pet-select-all { background: #295440; color: #fff; }
.other-pet-clear-selection { background: #fff; color: #355344; }

.other-pet-category-grid legend {
  grid-column: 1 / -1;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.other-pet-category-option {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  text-align: left;
  background: #fff;
}

.other-pet-category-option.is-selected {
  border-color: rgba(255, 107, 74, 0.42);
  background: #fff4ef;
  box-shadow: inset 0 0 0 1px rgba(255, 107, 74, 0.12);
}

.other-pet-category-option.is-electronic {
  border-color: rgba(92, 104, 194, 0.28);
  background: #f7f8ff;
}

.other-pet-category-option.is-electronic.is-selected {
  border-color: rgba(92, 104, 194, 0.6);
  background: #eef0ff;
}

.other-pet-category-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: #98553f;
  background: #ffe8dd;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.other-pet-category-option.is-electronic .other-pet-category-mark {
  color: #505dad;
  background: #dfe3ff;
}

.other-pet-category-option strong,
.other-pet-category-option small {
  display: block;
}

.other-pet-category-option strong {
  font-size: 14px;
}

.other-pet-category-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.other-pet-category-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background: #fff;
  font-size: 13px;
  font-weight: 950;
}

.other-pet-category-option.is-selected .other-pet-category-check {
  border-color: var(--accent);
  background: var(--accent);
}

.other-pet-category-option.is-electronic.is-selected .other-pet-category-check {
  border-color: #6470c7;
  background: #6470c7;
}

.other-pet-onboarding-error {
  padding: 9px 11px;
  border-radius: 14px;
  color: var(--danger);
  background: #fff0f2;
  font-size: 12px;
  font-weight: 850;
}

.other-pet-onboarding-actions {
  justify-content: flex-end;
}

.other-pet-onboarding-actions .primary-button,
.other-pet-onboarding-actions .product-action {
  min-height: 44px;
}

.bottom-tabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 430px);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(234, 219, 208, 0.8);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.nav-tab {
  display: grid;
  grid-template-rows: 22px auto;
  gap: 2px;
  place-items: center;
  min-height: 46px;
  padding: 4px 3px;
  border: 0;
  border-radius: 16px;
  color: var(--muted);
  font-weight: 800;
  font-size: 11px;
  background: transparent;
}

.nav-tab .ui-icon {
  width: 21px;
  height: 21px;
  transition: transform 160ms ease;
}

.nav-tab.is-active .ui-icon {
  transform: translateY(-1px);
}

.nav-tab.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.app-shell:not(.is-discover) .discover-only {
  display: none;
}

.panel,
.breed-detail,
.lineage-note,
.pet-profile-card,
.product-card,
.plaza-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(50, 32, 22, 0.09);
}

.panel,
.breed-detail,
.lineage-note {
  padding: 18px;
  margin-bottom: 14px;
}

.match-list,
.chat-preview,
.timeline,
.safety-list,
.plaza-feed,
.merchant-steps {
  display: grid;
  gap: 10px;
}

.chat-preview {
  max-height: min(58vh, 620px);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  padding-right: 4px;
  scroll-behavior: smooth;
  align-content: start;
}

.matches-layout {
  display: grid;
  gap: 14px;
}

.matches-section-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.matches-section-tabs::-webkit-scrollbar {
  display: none;
}

.matches-management-strip {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: -4px 0 -2px;
}

.matches-tool-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(50, 32, 22, 0.08);
}

.matches-tool-icon {
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.matches-tool-icon .ui-icon {
  width: 19px;
  height: 19px;
}

.matches-tool-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.matches-tool-button.is-active {
  color: var(--accent);
  border-color: rgba(255, 107, 74, 0.35);
  background: #fff;
}

.matches-tool-badge:not(:empty) {
  position: absolute;
  top: -3px;
  right: -4px;
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 11px;
}

.matches-management-drawer {
  position: fixed;
  inset: 0;
  z-index: 82;
}

.matches-overlay-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: rgba(22, 13, 9, 0.34);
}

.matches-management-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100%, 430px);
  max-height: min(78vh, 680px);
  max-height: min(78svh, 680px);
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border-radius: 28px 28px 0 0;
  background: #fff;
  box-shadow: 0 -20px 56px rgba(50, 32, 22, 0.24);
  transform: translateX(-50%);
}

.matches-management-sheet .panel {
  margin: 0;
  border-color: rgba(255, 107, 74, 0.18);
  background: #fffaf7;
}

.matches-identity-card,
.profile-account-card {
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #fff4ed);
  box-shadow: 0 14px 34px rgba(50, 32, 22, 0.08);
}

.matches-identity-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.matches-identity-card .matches-identity-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  overflow: hidden;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #ff9b68);
  font-size: 20px;
  font-weight: 950;
}

.matches-identity-card .matches-identity-avatar .account-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.matches-pet-switcher {
  display: flex;
  max-width: 92px;
  gap: 5px;
  padding: 4px;
  overflow-x: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  scrollbar-width: none;
}

.matches-pet-switcher::-webkit-scrollbar {
  display: none;
}

.matches-pet-option {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
}

.matches-pet-option.is-active {
  border-color: var(--accent);
}

.matches-pet-option-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background-size: cover !important;
  background-position: center !important;
  font-size: 11px;
}

.matches-identity-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.matches-identity-main {
  min-width: 0;
}

.matches-identity-main strong,
.matches-identity-main p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matches-identity-main p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-account-panel {
  display: grid;
  gap: 10px;
}

.profile-account-page-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.profile-account-page-heading h3,
.profile-account-page-heading p {
  margin: 0;
  text-align: right;
}

.profile-account-back {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.profile-no-pet-state {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.profile-no-pet-state[hidden] {
  display: none;
}

.profile-no-pet-state h3,
.profile-no-pet-state p {
  margin: 0;
}

.first-pet-onboarding-heading {
  display: flex;
  width: 100%;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.first-pet-onboarding-heading > div {
  display: grid;
  gap: 6px;
}

.first-pet-onboarding-progress {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #946316;
  background: #fff3d2;
  font-size: 11px;
  font-weight: 950;
}

.first-pet-onboarding-steps {
  display: grid;
  width: 100%;
  gap: 8px;
  padding: 0;
  margin: 4px 0 0;
  list-style: none;
}

.first-pet-onboarding-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(107, 87, 73, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.first-pet-onboarding-steps li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(107, 87, 73, 0.08);
  font-size: 12px;
  font-weight: 950;
}

.first-pet-onboarding-steps li.is-current {
  border-color: rgba(255, 107, 74, 0.25);
  background: #fff8f4;
}

.first-pet-onboarding-steps li.is-current > span {
  color: #fff;
  background: var(--accent);
}

.first-pet-onboarding-steps li.is-complete > span {
  color: #147648;
  background: rgba(35, 178, 109, 0.14);
}

.first-pet-onboarding-steps strong,
.first-pet-onboarding-steps small {
  display: block;
}

.first-pet-onboarding-steps small {
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
}

.first-pet-onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-account-card {
  margin-bottom: 0;
}

.release-account-summary {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.release-account-summary.is-signed-out {
  grid-template-columns: minmax(0, 1fr) auto;
}

.release-account-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #ff9b68);
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(255, 107, 74, 0.23);
}

.account-avatar-control {
  position: relative;
  padding: 0;
  overflow: visible;
  border: 0;
  cursor: pointer;
}

.account-avatar-control:focus-visible {
  outline: 3px solid rgba(255, 107, 74, 0.28);
  outline-offset: 3px;
}

.account-avatar-control:disabled {
  cursor: progress;
  opacity: 0.72;
}

.account-avatar-image,
.account-avatar-initial {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: inherit;
}

.account-avatar-image {
  object-fit: cover;
}

.account-avatar-edit-badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 5px 12px rgba(50, 32, 22, 0.2);
}

.account-avatar-edit-badge .ui-icon {
  width: 12px;
  height: 12px;
}

.release-account-identity {
  min-width: 0;
}

.release-account-identity strong,
.release-account-identity p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.release-account-identity p,
.release-account-summary.is-signed-out p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .release-account-identity strong,
  .release-account-identity p,
  .profile-user-identity h2,
  .profile-user-identity > p:last-child {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    touch-action: auto;
  }
}

.release-account-status {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  color: #147648;
  font-size: 11px;
  font-weight: 900;
}

.release-account-status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(35, 178, 109, 0.12);
}

.release-account-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(107, 87, 73, 0.12);
}

.account-avatar-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.account-avatar-status.is-error {
  color: var(--danger);
}

.account-avatar-status[hidden] {
  display: none;
}

@media (max-width: 520px) {
  .profile-account-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-account-page-heading h3,
  .profile-account-page-heading p {
    text-align: left;
  }

  .release-account-summary {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .release-account-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .release-account-actions .product-action {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .release-account-id code {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .release-session-management,
  .account-data-export {
    align-items: stretch;
    flex-direction: column;
  }
}

.email-verification-status {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  margin-top: 12px;
  border: 1px solid rgba(236, 163, 47, 0.22);
  border-radius: 16px;
  background: #fff9e9;
}

.email-verification-status.is-verified {
  border-color: rgba(35, 178, 109, 0.2);
  background: #effaf5;
}

.email-verification-status.is-error {
  border-color: rgba(239, 77, 90, 0.22);
  background: #fff4f5;
}

.email-verification-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #946316;
  background: rgba(236, 163, 47, 0.15);
  font-weight: 950;
}

.email-verification-status.is-verified .email-verification-mark {
  color: #147648;
  background: rgba(35, 178, 109, 0.14);
}

.email-verification-status strong,
.email-verification-status p {
  margin: 0;
}

.email-verification-status p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.admin-console-link {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  margin-top: 12px;
  border: 1px solid rgba(79, 140, 255, 0.18);
  border-radius: 16px;
  color: var(--ink);
  background: #f5f8ff;
  text-decoration: none;
}

.admin-console-link span {
  display: grid;
  gap: 3px;
}

.admin-console-link small {
  color: var(--muted);
  font-size: 11px;
}

.admin-console-link b {
  color: var(--blue);
  font-size: 24px;
}

.profile-preference-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.profile-preference-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
}

.profile-preference-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #b84e35;
  background: #fff0e9;
  font-size: 14px;
  font-weight: 950;
}

.profile-preference-mark.is-other-pets {
  color: #505dad;
  background: #eef0ff;
  font-size: 24px;
}

.profile-preference-copy {
  min-width: 0;
}

.profile-preference-copy strong,
.profile-preference-copy p,
.profile-preference-status {
  margin: 0;
}

.profile-preference-copy strong {
  font-size: 14px;
}

.profile-preference-copy p,
.profile-preference-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.profile-preference-copy p {
  margin-top: 3px;
}

.profile-preference-status {
  padding-top: 9px;
  border-top: 1px solid rgba(107, 87, 73, 0.12);
}

.other-pet-account-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(107, 87, 73, 0.12);
}

.other-pet-account-categories span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #3d7866;
  background: #edf9f4;
  font-size: 10px;
  font-weight: 850;
}

.other-pet-account-categories span.is-electronic {
  color: #505dad;
  background: #eef0ff;
}

.other-pet-account-footer {
  align-items: flex-end;
}

.other-pet-account-footer .profile-preference-status {
  flex: 1;
}

.other-pet-account-footer .product-action {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 11px;
}

.preference-switch {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  min-width: 54px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}

.preference-switch::before {
  position: absolute;
  inset: 6px 0;
  border-radius: 999px;
  background: #d8d4d1;
  content: "";
  transition: background 160ms ease;
}

.preference-switch > span {
  position: absolute;
  top: 10px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(50, 32, 22, 0.22);
  transition: transform 160ms ease;
}

.preference-switch.is-on::before {
  background: var(--accent);
}

.preference-switch.is-on > span {
  transform: translateX(22px);
}

.preference-switch:focus-visible {
  outline: 3px solid rgba(255, 107, 74, 0.3);
  outline-offset: 1px;
}

.preference-switch.is-compact {
  flex-basis: 46px;
  width: 46px;
  min-width: 46px;
  height: 38px;
  min-height: 38px;
}

.preference-switch.is-compact::before {
  inset: 5px 0;
}

.preference-switch.is-compact > span {
  top: 9px;
  width: 20px;
  height: 20px;
}

.preference-switch.is-compact.is-on > span {
  transform: translateX(18px);
}

.experience-settings {
  display: grid;
  gap: 10px;
}

.experience-settings[aria-busy="true"] {
  cursor: progress;
}

.experience-settings-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.experience-settings-group > summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 68px;
  padding: 13px 14px;
  list-style: none;
  cursor: pointer;
}

.experience-settings-group > summary::-webkit-details-marker {
  display: none;
}

.experience-settings-group > summary > span:nth-child(2) {
  min-width: 0;
}

.experience-settings-group > summary strong,
.experience-settings-group > summary small {
  display: block;
}

.experience-settings-group > summary strong {
  font-size: 14px;
}

.experience-settings-group > summary small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experience-settings-group > summary em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.experience-settings-group > summary::after {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  justify-self: end;
  color: var(--muted);
  content: "+";
  font-size: 17px;
  font-weight: 500;
}

.experience-settings-group > summary > em {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
}

.experience-settings-group[open] > summary::after {
  content: "−";
}

.profile-preference-mark.is-notification {
  color: #2f72c8;
  background: #edf5ff;
}

.profile-preference-mark.is-privacy {
  color: #6f57a8;
  background: #f4efff;
}

.experience-settings-body {
  display: grid;
  gap: 0;
  padding: 0 14px 14px;
  border-top: 1px solid rgba(107, 87, 73, 0.1);
}

.experience-setting-row,
.experience-setting-select,
.experience-default-pet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(107, 87, 73, 0.1);
}

.experience-setting-row.is-primary {
  margin: 10px 0 0;
  padding: 11px;
  border: 0;
  border-radius: 16px;
  background: var(--accent-soft);
}

.experience-location-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid rgba(79, 140, 255, 0.18);
  border-radius: 16px;
  background: rgba(244, 248, 255, 0.9);
}

.experience-location-control.is-error {
  border-color: rgba(239, 77, 90, 0.22);
  background: #fff4f5;
}

.experience-location-control strong,
.experience-location-control p {
  margin: 0;
}

.experience-location-control p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.experience-location-control > div:last-child {
  display: flex;
  gap: 7px;
}

.experience-setting-row strong,
.experience-setting-row p,
.experience-setting-select strong,
.experience-setting-select small,
.experience-default-pet strong,
.experience-default-pet p,
.experience-safety-note strong,
.experience-safety-note p {
  margin: 0;
}

.experience-setting-row strong,
.experience-setting-select strong,
.experience-default-pet strong,
.experience-safety-note strong {
  display: block;
  font-size: 12px;
}

.experience-setting-row p,
.experience-setting-select small,
.experience-default-pet p,
.experience-safety-note p {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

.experience-category-list {
  display: grid;
  padding-left: 10px;
  border-left: 2px solid rgba(79, 140, 255, 0.16);
}

.experience-setting-select select,
.quiet-hours-inputs input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
  font-weight: 800;
}

.experience-setting-select select {
  width: min(146px, 38vw);
  padding: 7px 26px 7px 9px;
}

.quiet-hours-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 7px;
  align-items: end;
  padding: 10px 0;
  border-bottom: 1px solid rgba(107, 87, 73, 0.1);
}

.quiet-hours-inputs label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.quiet-hours-inputs input {
  width: 100%;
  padding: 7px;
}

.quiet-hours-inputs > span {
  padding-bottom: 10px;
  color: var(--muted);
}

.experience-default-pet {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.experience-default-pet-avatar,
.experience-pet-visibility-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background-position: center !important;
  background-size: cover !important;
}

.experience-default-pet .product-action {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 10px;
}

.experience-safety-note {
  margin: 12px 0;
  padding: 11px;
  border: 1px solid rgba(35, 178, 109, 0.18);
  border-radius: 15px;
  background: #f1fbf6;
}

.experience-pet-visibility-list {
  display: grid;
  gap: 6px;
}

.experience-pet-visibility-list > button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(107, 87, 73, 0.1);
  border-radius: 14px;
  color: var(--ink);
  text-align: left;
  background: #fbf8f5;
}

.experience-pet-visibility-list .experience-pet-visibility-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.experience-pet-visibility-list span,
.experience-pet-visibility-list strong,
.experience-pet-visibility-list small {
  display: block;
  min-width: 0;
}

.experience-pet-visibility-list strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experience-pet-visibility-list small,
.experience-pet-visibility-list em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.experience-pet-visibility-list em {
  padding: 5px 7px;
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
}

.experience-setting-error,
.media-optimization-hint {
  margin: 9px 0 0;
  padding: 8px 9px;
  border-radius: 11px;
  color: #8a5810;
  background: #fff6d9;
  font-size: 10px;
  line-height: 1.45;
}

.chat-call-permission-note.is-offline {
  padding: 9px 10px;
  border-radius: 12px;
  color: #785314;
  background: #fff5d7;
}

.profile-overview {
  margin-bottom: 14px;
}

.profile-guest-overview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(255, 107, 74, 0.16);
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 176, 118, 0.24), transparent 36%),
    linear-gradient(145deg, #fffdfb, #fff5ef);
  box-shadow: 0 18px 46px rgba(74, 45, 31, 0.08);
}

.profile-guest-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(145deg, #ff8665, #ff5f4b);
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(255, 95, 75, 0.24);
}

.profile-guest-copy {
  min-width: 0;
}

.profile-guest-copy h2,
.profile-guest-copy p {
  margin: 0;
}

.profile-guest-copy h2 {
  margin-top: 3px;
  font-size: clamp(22px, 3vw, 31px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.profile-guest-copy > p:last-child,
.profile-guest-overview > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.profile-guest-copy > p:last-child {
  max-width: 650px;
  margin-top: 8px;
}

.profile-guest-actions {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

.profile-guest-actions > button {
  width: 100%;
  min-height: 42px;
}

.profile-guest-overview > small {
  grid-column: 2 / -1;
}

@media (max-width: 720px) {
  .profile-guest-overview {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 16px;
    border-radius: 22px;
  }

  .profile-guest-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 20px;
  }

  .profile-guest-copy h2 {
    font-size: 23px;
  }

  .profile-guest-copy > p:last-child {
    font-size: 11px;
  }

  .profile-guest-actions,
  .profile-guest-overview > small {
    grid-column: 1 / -1;
  }

  .profile-guest-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-width: 0;
  }

  .profile-guest-overview > small {
    text-align: center;
  }
}

.profile-user-header {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 6%, rgba(255, 189, 89, 0.25), transparent 34%),
    linear-gradient(145deg, #fff, #fff7f2);
  box-shadow: 0 16px 38px rgba(50, 32, 22, 0.08);
}

.profile-user-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.profile-user-avatar {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 999px;
  color: #fff;
  font-size: 25px;
  font-weight: 950;
  background: linear-gradient(145deg, var(--accent), #ff9e5b);
  box-shadow: 0 8px 20px rgba(255, 107, 74, 0.24);
}

.profile-user-avatar.account-avatar-control {
  font: inherit;
}

.profile-user-identity {
  min-width: 0;
}

.profile-user-identity h2,
.profile-user-identity p {
  margin: 0;
}

.profile-user-identity h2 {
  overflow: hidden;
  font-size: 23px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-user-identity > p:last-child {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-account-shortcut {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 900;
}

.profile-social-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 10px 0;
  border-top: 1px solid rgba(107, 87, 73, 0.12);
  border-bottom: 1px solid rgba(107, 87, 73, 0.12);
}

.profile-social-stats span {
  display: grid;
  gap: 2px;
  justify-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.profile-social-stats span + span {
  border-left: 1px solid rgba(107, 87, 73, 0.12);
}

.profile-social-stats strong {
  color: var(--ink);
  font-size: 19px;
}

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

.profile-social-library .profile-panel-heading p:last-child {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-social-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 18px;
  background: #f4eeea;
}

.profile-social-tab {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 40px;
  padding: 7px 8px;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.profile-social-tab.is-active {
  color: var(--accent);
  background: #fff;
  box-shadow: 0 6px 16px rgba(50, 32, 22, 0.08);
}

@media (max-width: 520px) {
  .profile-user-avatar {
    width: 58px;
    height: 58px;
    font-size: 22px;
  }

  .profile-user-identity h2 {
    font-size: clamp(19px, 6vw, 23px);
    line-height: 1.12;
  }

  .profile-social-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .profile-social-tab {
    width: 100%;
    min-height: 42px;
    padding-inline: 10px;
  }
}

.profile-social-posts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.profile-social-post {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.profile-social-post-cover {
  display: grid;
  width: 64px;
  height: 64px;
  overflow: hidden;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background-color: #ff9a72;
  background-position: center;
  background-size: cover;
}

.profile-social-post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-social-post-cover.is-adoption { background-color: #58bd85; }
.profile-social-post-cover.is-event { background-color: #f7ae4b; }
.profile-social-post-cover.is-merchant { background-color: #6e9ef6; }

.profile-social-post-copy,
.profile-social-post-copy strong,
.profile-social-post-copy small {
  display: block;
  min-width: 0;
}

.profile-social-post-copy strong,
.profile-social-post-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-social-post-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.profile-social-post-arrow {
  color: var(--muted);
  font-size: 20px;
}

.profile-social-state {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  padding: 22px;
  border: 0;
  border-radius: 16px;
  color: var(--muted);
  background: #faf7f3;
  text-align: center;
}

.profile-social-state.is-error {
  color: var(--danger);
}

.profile-pet-rail-heading {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}

.profile-pet-rail-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.profile-pet-rail-heading > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.profile-pet-rail {
  display: flex;
  gap: 11px;
  margin: 0 -4px;
  padding: 2px 4px 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.profile-pet-rail::-webkit-scrollbar {
  display: none;
}

.match-toolbar,
.other-pet-category-toolbar,
.discovery-detail-thumbnails,
.matches-section-tabs,
.matches-pet-switcher,
.profile-pet-rail,
.new-matches-rail,
.friend-public-pets,
.plaza-filter-row,
.plaza-search-chips,
.plaza-search-suggestions,
.plaza-identity-options,
.lineage-breadcrumb,
.profile-media-actions,
.shop-category-grid {
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.profile-pet-rail,
.new-matches-rail,
.friend-public-pets,
.shop-category-grid {
  scroll-padding-inline: 4px;
  scroll-snap-type: x proximity;
}

.profile-pet-rail > *,
.new-matches-rail > *,
.friend-public-pets > *,
.shop-category-grid > * {
  scroll-snap-align: start;
}

.profile-pet-rail-item {
  display: grid;
  flex: 0 0 64px;
  gap: 6px;
  justify-items: center;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.profile-pet-rail-item.is-active {
  color: var(--accent);
}

.profile-pet-rail-avatar {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 3px solid #fff;
  border-radius: 999px;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 0 0 2px var(--line);
}

.profile-pet-rail-item.is-active .profile-pet-rail-avatar {
  box-shadow: 0 0 0 3px var(--accent);
}

.profile-pet-rail > .owner-pet-chip {
  display: grid;
  flex: 0 0 64px;
  min-height: 56px;
  place-items: center;
  padding: 7px;
  border-radius: 18px;
  white-space: normal;
}

.matches-layout:not(.is-chat-open) .chat-workspace {
  display: none;
}

.matches-layout.is-chat-open .chat-workspace {
  position: fixed;
  inset: 0 auto 0 50%;
  z-index: 76;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  width: min(100%, 430px);
  min-height: 0;
  padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--bg);
  transform: translateX(-50%);
}

body[data-route-test="true"][data-route-test-pane="chat"] .matches-layout.is-chat-open .chat-workspace {
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

body[data-route-test="true"][data-route-test-pane="chat"][data-route-test-expanded="true"] .matches-layout.is-chat-open .chat-workspace {
  padding-bottom: calc(118px + env(safe-area-inset-bottom));
}

.matches-layout.is-chat-open .chat-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.matches-layout.is-chat-open .chat-back-button,
.matches-layout.is-chat-open .chat-panel > h3 {
  display: none;
}

.matches-layout.is-chat-open[data-active-chat-pet=""] .chat-back-button {
  display: inline-flex;
}

.matches-layout.is-chat-open[data-chat-ready="false"] .chat-back-button {
  display: inline-flex;
}

.matches-layout.is-chat-open[data-chat-ready="false"] .chat-composer,
.matches-layout.is-chat-open[data-active-chat-pet=""] .chat-composer {
  display: none !important;
}

.chat-pending-state {
  display: grid;
  gap: 12px;
  min-height: 260px;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.chat-pending-state p {
  margin: 0;
}

.matches-layout.is-chat-open .chat-preview {
  max-height: none;
  height: 100%;
  min-height: 0;
}

.matches-layout.is-chat-open .chat-composer {
  position: sticky;
  bottom: 0;
  z-index: 6;
  align-items: end;
  margin: 10px -2px 0;
  padding: 10px;
  border: 1px solid rgba(234, 219, 208, 0.82);
  border-radius: 22px;
  background: rgba(255, 250, 246, 0.96);
  box-shadow: 0 -10px 30px rgba(50, 32, 22, 0.08);
  backdrop-filter: blur(16px);
}

.matches-layout.is-chat-open .chat-composer .text-input,
.matches-layout.is-chat-open .chat-composer .small-primary-button,
.matches-layout.is-chat-open .chat-composer .chat-composer-more {
  min-height: 44px;
  border-radius: 16px;
}

.friend-sidebar,
.chat-workspace {
  display: grid;
  gap: 14px;
  align-content: start;
}

.conversation-search-panel {
  display: grid;
  gap: 8px;
}

.new-matches-section,
.conversation-list-section {
  display: grid;
  gap: 10px;
}

.conversation-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.conversation-section-head h4,
.conversation-section-head p {
  margin: 0;
}

.conversation-section-head h4 {
  font-size: 15px;
}

.conversation-section-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.new-matches-rail {
  display: flex;
  gap: 10px;
  margin: 0 -4px;
  padding: 2px 4px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.new-matches-rail::-webkit-scrollbar {
  display: none;
}

.new-match-card {
  display: grid;
  min-width: 78px;
  gap: 6px;
  justify-items: center;
  padding: 4px 4px 8px;
  border: 0;
  border-radius: 18px;
  color: inherit;
  background: transparent;
  text-align: center;
}

.new-match-card.is-active {
  color: var(--accent);
}

.new-match-avatar-wrap {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  padding: 3px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--accent), #ffbd59);
}

.new-match-avatar {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: inset 0 0 0 2px #fff;
}

.new-match-card strong,
.new-match-card small {
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-match-card small {
  color: var(--muted);
  font-size: 11px;
}

.match-item,
.chat-bubble,
.timeline-item,
.safety-item,
.option-card,
.inline-result {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  text-align: left;
  background: #fff;
}

.match-item.is-active {
  border-color: rgba(255, 107, 74, 0.4);
  background: var(--accent-soft);
}

.friend-list-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
}

.conversation-row {
  grid-template-columns: 58px minmax(0, 1fr);
  padding: 10px 4px;
  border-color: transparent transparent var(--line);
  border-radius: 0;
  background: transparent;
}

.conversation-row.is-active {
  border-color: transparent transparent rgba(255, 107, 74, 0.22);
  border-radius: 18px;
}

.conversation-account-group {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  border-radius: 18px;
  background: transparent;
}

.conversation-account-group.is-active {
  background: linear-gradient(135deg, rgba(255, 107, 74, 0.08), rgba(255, 255, 255, 0.82));
}

.conversation-account-header {
  position: relative;
}

.conversation-account-primary {
  display: grid;
  width: 100%;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 54px 12px 4px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.conversation-account-primary .friend-list-main {
  display: block;
}

.conversation-account-primary .conversation-preview-text,
.conversation-account-primary .conversation-draft-preview {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-account-detail {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-account-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 36px;
  min-height: 40px;
  place-items: center;
  gap: 0;
  padding: 4px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 107, 74, 0.18);
  border-radius: 14px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.conversation-account-toggle small {
  font-size: 10px;
  line-height: 1;
}

.conversation-account-unread {
  position: absolute;
  top: 6px;
  right: 4px;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
  font-weight: 900;
  pointer-events: none;
}

.conversation-account-toggle + .conversation-account-unread {
  top: 3px;
  right: 3px;
}

.conversation-context-list {
  display: grid;
  margin: 0 8px 10px 30px;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 107, 74, 0.18);
}

.conversation-context-heading {
  margin: 0;
  padding: 8px 4px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.conversation-context-list[hidden] {
  display: none;
}

.conversation-context-list .conversation-row.is-compact {
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 62px;
  padding: 8px 4px;
}

.conversation-context-list .conversation-avatar-wrap,
.conversation-context-list .friend-list-avatar {
  width: 44px;
  height: 44px;
}

.conversation-context-list .conversation-presence-dot {
  width: 11px;
  height: 11px;
}

.conversation-context-list .friend-list-main p {
  font-size: 12px;
}

.conversation-match-context {
  display: grid;
  width: 100%;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 8px 6px;
  border: 0;
  border-bottom: 1px solid rgba(50, 32, 22, 0.07);
  color: inherit;
  background: transparent;
  text-align: left;
}

.conversation-match-context:last-child {
  border-bottom: 0;
}

.conversation-match-context > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.conversation-match-context strong,
.conversation-match-context small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-match-context small,
.conversation-match-context > span:last-child {
  color: var(--muted);
}

.conversation-match-avatar {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background-position: center !important;
  background-size: cover !important;
}

.conversation-avatar-wrap {
  position: relative;
  display: block;
  width: 58px;
  height: 58px;
}

.pet-avatar {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  color: #8a5a10;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.pet-avatar.has-initial {
  background-size: auto !important;
}

.friend-list-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff0d6, #e2f0ff);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.conversation-row .friend-list-avatar {
  border-radius: 999px;
}

.conversation-presence-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #d8c8bc;
}

.conversation-presence-dot.is-online {
  background: var(--good);
}

.friend-list-main {
  min-width: 0;
}

.friend-list-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.friend-list-head small {
  margin: 0;
  color: var(--accent);
  white-space: nowrap;
}

.conversation-row .friend-list-head small {
  color: var(--muted);
  font-size: 11px;
}

.friend-list-main p {
  margin: 3px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.conversation-row .friend-list-main > small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-list-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.friend-list-badge {
  padding: 3px 7px;
  border: 1px solid rgba(255, 107, 74, 0.22);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
}

.friend-list-badge.is-muted {
  color: var(--muted);
  border-color: rgba(135, 118, 108, 0.18);
  background: #f8f1eb;
}

.friend-list-badge.is-source {
  color: #4f8cff;
  border-color: rgba(79, 140, 255, 0.22);
  background: #edf4ff;
}

.friend-add-choice-list {
  display: grid;
  gap: 8px;
}

.friend-add-choice-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.friend-add-active-pet {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 107, 74, 0.16);
  border-radius: 16px;
  color: var(--muted);
  background: #fff7f1;
  font-size: 12px;
  font-weight: 800;
}

.friend-add-active-pet .friend-list-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.friend-add-choice {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  background: #fff;
  text-align: left;
}

.friend-add-choice .friend-list-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.friend-add-choice span {
  min-width: 0;
}

.friend-add-choice strong,
.friend-add-choice small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-add-choice small {
  margin-top: 3px;
  color: var(--muted);
}

.friend-add-choice em {
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(135, 118, 108, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: #f8f1eb;
  font-size: 11px;
  font-weight: 900;
}

.presence-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.presence-badge.is-online {
  color: #2d9f6f;
  border-color: rgba(45, 159, 111, 0.22);
  background: #eafff5;
}

.safety-summary-card,
.safety-queue-item {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.safety-summary-card {
  background: linear-gradient(145deg, #f1fbf6, #eef5ff);
}

.safety-summary-card span,
.safety-queue-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.safety-summary-card strong {
  display: block;
  margin: 4px 0;
  color: var(--good);
  font-size: 28px;
}

.ops-status-card {
  background: linear-gradient(145deg, #fff, #fff7e8);
}

.ops-status-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.ops-status-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.ops-status-grid p {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.ops-status-grid p strong {
  display: inline;
  margin: 0;
  color: var(--ink);
  font-size: 12px;
}

.ops-warning-line {
  margin-top: 10px;
}

.ops-status-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.support-overview-card {
  background: linear-gradient(145deg, #fff, #f3fbff);
}

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

.support-summary-grid p {
  margin: 0;
  padding: 9px;
  border: 1px solid rgba(79, 140, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.support-summary-grid p strong {
  display: block;
  margin: 0 0 2px;
  color: var(--blue);
  font-size: 18px;
}

.support-case-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.support-case-list p {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(79, 140, 255, 0.12);
}

.support-case-list p strong {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.support-case-list small {
  display: block;
  color: var(--muted);
}

.safety-summary-card p,
.safety-queue-item p {
  margin: 4px 0;
  color: var(--muted);
  line-height: 1.45;
}

.safety-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.safety-tabs button {
  padding: 9px 10px;
  border: 1px solid rgba(35, 178, 109, 0.2);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
  background: #fff;
}

.safety-tabs button.is-active {
  color: var(--good);
  background: #e8f8ef;
}

.safety-filter-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.safety-filter-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.safety-queue-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.safety-review-side,
.safety-review-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

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

.safety-review-actions .product-action {
  min-width: 58px;
  padding: 8px 9px;
  white-space: nowrap;
}

.appeal-review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 8px;
}

.moderation-log-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.audit-log-card p {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(44, 44, 44, 0.08);
}

.audit-log-card p:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.moderation-log-card p strong {
  display: inline;
  margin: 0;
  color: var(--ink);
  font-size: inherit;
}

.match-item small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.conversation-draft-preview {
  color: var(--accent);
}

.conversation-draft-preview strong {
  color: var(--accent);
}

.chat-profile-card {
  padding: 14px;
  border: 1px solid rgba(255, 107, 74, 0.22);
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, #fff5ed);
}

.chat-detail-card {
  display: grid;
  gap: 12px;
}

.matches-layout.is-chat-open .chat-detail-card {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 2px;
  background: rgba(255, 250, 247, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(50, 32, 22, 0.08);
}

.chat-detail-topbar {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.chat-detail-back {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: #fff;
  font-size: 18px;
  font-weight: 900;
}

.chat-detail-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff0d6, #e2f0ff);
  background-size: cover !important;
  background-position: center !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.chat-detail-main {
  min-width: 0;
}

.chat-detail-main h4,
.chat-detail-main p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-profile-card h4 {
  margin: 0 0 4px;
}

.chat-profile-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.chat-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chat-profile-meta span,
.chat-profile-meta button {
  padding: 6px 9px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  background: #fff;
}

.chat-profile-meta .presence-badge {
  color: var(--muted);
  background: #f8f1eb;
}

.chat-profile-meta .presence-badge.is-online {
  color: #2d9f6f;
  background: #eafff5;
}

.chat-profile-meta .chat-sync-time {
  color: var(--blue);
  background: #eaf2ff;
}

.chat-profile-meta .chat-pet-context {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}

.chat-header-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.chat-header-sync,
.chat-header-search,
.chat-header-refresh {
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--blue);
}

.chat-header-sync {
  color: #8a5a10;
  background: #fff1c6;
}

.chat-header-search {
  color: var(--accent);
  background: var(--accent-soft);
}

.chat-header-refresh:disabled {
  cursor: wait;
  opacity: 0.68;
}

.friend-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 82;
}

.chat-action-overlay {
  position: fixed;
  inset: 0;
  z-index: 82;
}

.friend-profile-backdrop,
.chat-action-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: rgba(22, 13, 9, 0.42);
  backdrop-filter: blur(10px);
}

.friend-profile-sheet,
.chat-action-sheet {
  position: absolute;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(410px, calc(100vw - 24px));
  max-height: min(86vh, 720px);
  max-height: min(86svh, 720px);
  overflow: hidden auto;
  padding: 12px;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 26px 68px rgba(22, 13, 9, 0.34);
  transform: translateX(-50%);
}

.friend-profile-close,
.chat-action-close {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: auto;
  margin-bottom: -38px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(22, 13, 9, 0.12);
  font-size: 20px;
  font-weight: 900;
}

.friend-profile-sheet .friend-profile-panel {
  border: 0;
  border-radius: 24px;
  background: linear-gradient(145deg, #f5f9ff, #fff7f0);
}

.chat-action-sheet .chat-safety-panel,
.chat-action-sheet .report-reason-panel,
.chat-action-sheet .chat-actions-panel {
  border: 0;
  border-radius: 24px;
}

.chat-actions-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: linear-gradient(145deg, #fff, #fff5ed);
}

.chat-actions-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.chat-detail-avatar-button {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
}

.chat-detail-avatar-button:focus-visible {
  outline: 3px solid rgba(255, 107, 74, 0.32);
  outline-offset: 3px;
}

.chat-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.chat-action-grid .product-action {
  min-height: 44px;
}

.chat-pet-share-grid {
  display: grid;
  gap: 8px;
}

.chat-pet-share-option {
  display: grid;
  width: 100%;
  grid-template-columns: 52px minmax(0, 1fr) 20px;
  gap: 11px;
  align-items: center;
  min-height: 68px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  text-align: left;
}

.chat-pet-share-option > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.chat-pet-share-option strong,
.chat-pet-share-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-pet-share-option small,
.chat-pet-share-empty {
  color: var(--muted);
}

.chat-pet-share-option > .ui-icon {
  color: var(--accent);
}

.chat-pet-share-avatar {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  background-position: center !important;
  background-size: cover !important;
}

.chat-shared-pet-card {
  display: grid;
  width: min(360px, 100%);
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(255, 107, 74, 0.2);
  border-radius: 20px;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, #fff5ed);
  box-shadow: 0 10px 24px rgba(50, 32, 22, 0.08);
  text-align: left;
}

.chat-shared-pet-photo {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  background-position: center !important;
  background-size: cover !important;
}

.chat-shared-pet-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.chat-shared-pet-copy small {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chat-shared-pet-copy strong,
.chat-shared-pet-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-shared-pet-copy > span,
.chat-shared-pet-open {
  color: var(--muted);
  font-size: 12px;
}

.chat-shared-pet-open {
  padding-right: 2px;
  font-size: 24px;
}

.unmatch-confirm-panel h4 {
  padding-right: 42px;
  font-size: 22px;
  line-height: 1.2;
}

.unmatch-warning {
  display: grid;
  gap: 7px;
  padding: 13px;
  border: 1px solid rgba(239, 77, 90, 0.2);
  border-radius: 16px;
  color: #7c2832;
  background: #fff1f2;
  line-height: 1.45;
}

.unmatch-warning small {
  color: var(--muted);
  font-size: 11px;
}

.unmatch-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 9px;
}

.unmatch-confirm-actions .product-action {
  min-height: 46px;
}

.friend-profile-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(79, 140, 255, 0.22);
  border-radius: 20px;
  background: #f5f9ff;
}

.friend-profile-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.friend-account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 2px;
}

.friend-account-header h3 {
  margin: 2px 0 0;
}

.friend-account-header > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.friend-public-pets {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 1px 8px;
  scrollbar-width: none;
}

.friend-public-pets::-webkit-scrollbar {
  display: none;
}

.friend-public-pet {
  display: grid;
  grid-template-columns: 44px max-content;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  padding: 7px 10px 7px 7px;
  border: 1px solid rgba(79, 140, 255, 0.18);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.friend-public-pet.is-active {
  border-color: rgba(255, 107, 74, 0.58);
  box-shadow: 0 0 0 2px rgba(255, 107, 74, 0.1);
}

.friend-public-pet-avatar {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background-size: cover !important;
  background-position: center !important;
}

.friend-public-pet span,
.friend-public-pet strong,
.friend-public-pet small {
  display: block;
}

.friend-public-pet small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.friend-profile-hero {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
}

.friend-profile-photo {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  background-color: #fff;
  background-size: cover !important;
  background-position: center !important;
}

.friend-profile-media-section {
  display: grid;
  gap: 9px;
}

.friend-profile-media-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.friend-profile-media-heading span {
  display: grid;
  min-width: 24px;
  height: 24px;
  padding-inline: 7px;
  place-items: center;
  border-radius: 999px;
  color: #386fca;
  background: #eef5ff;
  font-size: 11px;
  font-weight: 900;
}

.friend-profile-media-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.friend-profile-media-item {
  position: relative;
  min-width: 0;
  min-height: 116px;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff0d6, #e2f0ff);
}

.friend-profile-media-item.is-featured {
  grid-column: 1 / -1;
  min-height: 210px;
}

.friend-profile-media-item img,
.friend-profile-media-item video,
.friend-profile-media-background {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.friend-profile-media-background {
  background-position: center !important;
  background-size: cover !important;
}

.friend-profile-media-item figcaption {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 12, 10, 0.68);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.friend-profile-media-empty {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 68px;
  padding: 12px;
  border: 1px dashed rgba(79, 140, 255, 0.28);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.friend-profile-media-empty .ui-icon {
  width: 22px;
  height: 22px;
  color: #4f8cff;
}

.friend-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.friend-profile-summary {
  padding: 12px;
  border-radius: 16px;
  background: #fff;
}

.friend-profile-summary span,
.friend-safety-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.friend-profile-summary strong {
  display: block;
  margin-top: 4px;
}

.friend-safety-list {
  display: grid;
  gap: 8px;
}

.friend-safety-list span {
  padding: 10px;
  border-radius: 14px;
  background: #fff;
}

.friend-profile-wishlist {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.friend-profile-product {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 107, 74, 0.2);
  border-radius: 18px;
  background: #fff;
}

.friend-profile-product .product-art {
  width: 62px;
  height: 62px;
  border-radius: 16px;
}

.friend-profile-product .product-action {
  width: 100%;
  margin-top: 8px;
}

.chat-safety-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(35, 178, 109, 0.22);
  border-radius: 20px;
  background: #f1fbf6;
}

.chat-safety-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.chat-safety-header h4 {
  margin: 0;
}

.chat-safety-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.chat-safety-grid div,
.chat-safety-note {
  padding: 12px;
  border-radius: 16px;
  background: #fff;
}

.chat-safety-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-safety-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--good);
  font-size: 18px;
}

.chat-safety-note p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.safety-freeze-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(239, 77, 90, 0.22);
  border-radius: 16px;
  background: #fff0f2;
}

.safety-freeze-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.report-reason-panel,
.report-detail-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(239, 77, 90, 0.22);
  border-radius: 20px;
  background: #fff7f8;
}

.report-reason-panel p,
.report-detail-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.report-detail-input {
  min-height: 88px;
  resize: vertical;
}

.report-reason-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.report-detail-list {
  display: grid;
  gap: 10px;
}

.report-detail-card {
  border-color: rgba(255, 107, 74, 0.2);
  background: #fff;
}

.report-detail-card span,
.report-detail-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.report-detail-card strong {
  display: block;
  margin-top: 3px;
}

.unread-pill {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  background: var(--blue);
}

.unread-pill.is-live {
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(255, 107, 74, 0.18);
}

.unread-pill.is-muted {
  color: var(--muted);
  background: #f8f1eb;
}

.friend-request-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.friend-request-card.friend-list-item {
  grid-template-columns: 58px 1fr;
}

.friend-request-groups,
.friend-request-group {
  display: grid;
  gap: 12px;
}

.friend-request-group h4 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.friend-request-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.friend-request-status {
  display: inline-flex;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  background: #eaf2ff;
}

.friend-request-status.is-busy {
  color: #8a5a10;
  background: #fff1c6;
}

.sync-status-card,
.blocked-pets-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.sync-status-card {
  background: linear-gradient(145deg, #fff, #eef5ff);
}

.sync-status-card strong,
.blocked-pets-panel strong {
  display: block;
  margin-bottom: 8px;
}

.sync-status-grid,
.blocked-pets-list {
  display: grid;
  gap: 8px;
}

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

.auth-switch-button {
  width: fit-content;
}

.auth-panel p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.auth-login-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.auth-activation-card,
.auth-password-change {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 107, 74, 0.22);
  border-radius: 16px;
  background: #fff8f4;
}

.auth-password-change summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.auth-password-change[open] summary {
  margin-bottom: 2px;
}

.owner-pet-switcher {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(107, 87, 73, 0.14);
}

.owner-pet-switcher span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.owner-pet-switcher strong {
  display: block;
  margin-top: 2px;
}

.owner-pet-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-pet-chip {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-weight: 900;
}

.owner-pet-chip.is-active {
  color: var(--accent);
  border-color: rgba(255, 107, 74, 0.35);
  background: var(--accent-soft);
}

.owner-pet-chip.owner-pet-add {
  color: var(--accent);
  border-style: dashed;
  border-color: rgba(255, 107, 74, 0.4);
  background: #fff7f2;
}

.owner-pet-chip.is-disabled {
  opacity: 0.58;
}

.chat-back-button {
  width: fit-content;
  margin-bottom: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: #fff;
  font-weight: 900;
}

.auth-hint,
.auth-error,
.auth-success {
  font-size: 12px;
}

.auth-error {
  color: var(--danger) !important;
  font-weight: 800;
}

.auth-success {
  color: var(--good) !important;
  font-weight: 800;
}

.sync-pill {
  display: inline-flex;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  background: #f8f1eb;
}

.sync-pill.is-online {
  color: var(--good);
  background: #e8f8ef;
}

.sync-pill.is-offline {
  color: var(--danger);
  background: #fff0f2;
}

.sync-pill.is-checking {
  color: var(--blue);
  background: #eaf2ff;
}

.sync-pill.is-warning {
  color: #a16600;
  background: #fff4d8;
}

.blocked-pets-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.blocked-pet-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #fffaf6;
}

.blocked-pet-row span,
.blocked-pet-row small {
  display: block;
}

.blocked-pet-row small {
  margin-top: 4px;
  color: var(--muted);
}

.order-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.order-card-header h4 {
  margin: 0 0 4px;
}

.order-card-header span,
.order-meta-grid span,
.order-notice p {
  color: var(--muted);
}

.order-card-header > strong {
  white-space: nowrap;
  color: var(--accent);
}

.order-meta-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 12px;
  border-radius: 16px;
  background: #fffaf6;
}

.order-notice {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #eaf2ff;
}

.order-notice p {
  margin: 4px 0 0;
  line-height: 1.5;
}

.chat-message-row {
  --chat-bubble-max: min(68%, 238px);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.chat-message-row.is-me {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.chat-message-row.has-card {
  align-items: start;
}

.chat-message-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff0d6, #e2f0ff);
  background-size: cover !important;
  background-position: center !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76);
}

.chat-message-stack {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-message-row.is-me .chat-message-stack {
  justify-items: end;
}

.chat-message-row.is-incoming .chat-message-stack {
  justify-items: start;
}

.chat-system-message {
  justify-self: center;
  max-width: min(88%, 320px);
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  background: #f4f1ed;
}

.chat-call-record {
  justify-self: center;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: min(92%, 380px);
  padding: 9px 12px;
  border: 1px solid rgba(70, 93, 116, 0.12);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(44, 56, 76, 0.06);
}

.chat-call-record-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: var(--blue);
  background: rgba(72, 127, 255, 0.1);
}

.chat-call-record-icon .ui-icon {
  width: 19px;
  height: 19px;
}

.chat-call-record-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chat-call-record-copy strong,
.chat-call-record-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-call-record-copy strong {
  font-size: 13px;
}

.chat-call-record-copy small,
.chat-call-record time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.chat-call-record.is-failed .chat-call-record-icon,
.chat-call-record.is-declined .chat-call-record-icon,
.chat-call-record.is-cancelled .chat-call-record-icon {
  color: var(--danger);
  background: rgba(239, 77, 90, 0.1);
}

@media (max-width: 420px) {
  .chat-call-record {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    width: min(96%, 360px);
    gap: 8px;
    padding: 8px 10px;
  }

  .chat-call-record-icon {
    width: 32px;
    height: 32px;
  }
}

.chat-bubble.me {
  color: #fff;
  background: var(--blue);
}

.chat-message-row .chat-bubble {
  width: fit-content;
  max-width: var(--chat-bubble-max);
  padding: 7px 10px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.chat-message-row.is-me .chat-bubble {
  border-bottom-right-radius: 7px;
}

.chat-message-row.is-incoming .chat-bubble {
  border-bottom-left-radius: 7px;
}

.chat-bubble.me.is-sending {
  opacity: 0.78;
}

.chat-bubble.me.is-failed {
  color: var(--danger);
  border-color: rgba(239, 77, 90, 0.24);
  background: #fff0f2;
}

.chat-bubble.incoming {
  background: #fffaf6;
}

.chat-bubble.is-removed {
  color: var(--muted);
  border-style: dashed;
  background: #f7f7f7;
}

.chat-bubble strong,
.chat-bubble small,
.chat-bubble span {
  display: block;
}

.chat-bubble strong {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 12px;
}

.chat-bubble small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  text-align: right;
}

.chat-bubble.incoming small {
  color: var(--muted);
}

.chat-time-separator {
  justify-self: center;
  margin: 4px 0 2px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  background: #f4f1ed;
}

.chat-message-time {
  max-width: var(--chat-bubble-max);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.chat-message-receipt {
  max-width: var(--chat-bubble-max);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chat-bubble.me .chat-message-time {
  color: rgba(255, 255, 255, 0.82);
}

.chat-message-row.is-me .chat-message-time {
  text-align: right;
}

.chat-message-row.is-incoming .chat-message-time {
  text-align: left;
}

.chat-bubble.me.is-failed small,
.chat-message-detail {
  color: var(--danger);
}

.chat-message-row .chat-message-detail {
  max-width: var(--chat-bubble-max);
  color: var(--danger);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.chat-message-row .chat-message-detail.is-identity {
  color: var(--muted);
  font-weight: 700;
}

.chat-message-row.is-me .chat-message-detail,
.chat-message-row.is-me .chat-message-receipt {
  text-align: right;
}

.chat-history-controls {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 0 2px;
}

.chat-history-controls .product-action {
  width: auto;
  padding: 8px 14px;
}

.chat-history-controls small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chat-new-message-hint-wrap {
  position: sticky;
  top: 8px;
  z-index: 2;
  display: grid;
  justify-self: center;
  justify-items: center;
  width: auto;
  height: 0;
  pointer-events: none;
}

.chat-new-message-hint {
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(107, 74, 43, 0.22);
  pointer-events: auto;
}

.chat-sync-notice {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(239, 77, 90, 0.22);
  border-radius: 18px;
  background: #fff0f2;
}

.chat-sync-notice p,
.chat-sync-notice small {
  display: block;
  margin: 4px 0 0;
  color: var(--danger);
}

.chat-sync-notice .product-action {
  width: auto;
  white-space: nowrap;
}

.chat-sync-panel .chat-sync-notice {
  margin: 0;
}

.chat-sync-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chat-sync-summary small {
  color: var(--muted);
  font-weight: 800;
}

.chat-message-search {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf6;
}

.chat-search-panel .chat-message-search {
  padding: 0;
  border: 0;
  background: transparent;
}

.chat-message-search label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-message-search small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
}

.chat-search-scope {
  margin-top: -4px;
}

.chat-search-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-search-step,
.chat-search-clear,
.chat-search-load-more {
  padding: 9px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  background: var(--accent-soft);
}

.chat-search-load-more {
  grid-column: 1 / -1;
  justify-self: start;
}

.chat-search-step:disabled,
.chat-search-load-more:disabled {
  opacity: 0.5;
}

.chat-bubble.is-search-match,
.chat-media-card.is-search-match,
.chat-audio-card.is-search-match,
.chat-battle-card.is-search-match,
.chat-gift-card.is-search-match,
.meetup-card.is-search-match {
  outline: 2px solid rgba(255, 107, 74, 0.42);
  box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.1);
}

.chat-bubble.is-active-search-match,
.chat-media-card.is-active-search-match,
.chat-audio-card.is-active-search-match,
.chat-battle-card.is-active-search-match,
.chat-gift-card.is-active-search-match,
.meetup-card.is-active-search-match {
  outline-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(255, 107, 74, 0.18);
}

.chat-message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}

.chat-message-actions .chat-message-action {
  color: #fff;
  background: var(--danger);
}

.chat-message-actions .chat-message-action.is-secondary {
  color: var(--danger);
  border: 1px solid rgba(239, 77, 90, 0.24);
  background: #fff;
}

.chat-message-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 18;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
  max-width: min(280px, calc(100vw - 24px));
  padding: 8px;
  border: 1px solid rgba(107, 87, 73, 0.12);
  border-radius: 16px;
  background: rgba(32, 26, 22, 0.92);
  box-shadow: 0 12px 30px rgba(22, 13, 9, 0.2);
}

.chat-message-row.is-incoming .chat-message-menu {
  right: auto;
  left: 0;
}

.chat-message-menu.is-floating {
  position: fixed;
  right: auto;
  bottom: auto;
  left: var(--chat-menu-x, 12px);
  top: var(--chat-menu-y, 12px);
  transform: translate(var(--chat-menu-offset-x, -100%), var(--chat-menu-offset-y, calc(-100% - 8px)));
}

.chat-message-menu.is-floating.is-start {
  --chat-menu-offset-x: 0;
  justify-content: flex-start;
}

.chat-message-menu.is-floating.is-end {
  --chat-menu-offset-x: -100%;
}

.chat-message-menu.is-floating.is-below {
  --chat-menu-offset-y: 8px;
}

.chat-message-menu.is-floating.is-above {
  --chat-menu-offset-y: calc(-100% - 8px);
}

.chat-message-menu[hidden] {
  display: none;
}

.chat-message-action {
  display: inline-grid;
  min-height: 34px;
  place-items: center;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.2);
}

.chat-message-action.is-danger {
  color: #ffd9de;
  background: rgba(239, 77, 90, 0.24);
}

.chat-message-action.is-busy {
  color: #8a5a10;
  background: #fff1c6;
}

[data-chat-message-menu-trigger] {
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
}

.chat-media-card .chat-message-actions {
  justify-content: flex-start;
}

.chat-media-card .chat-message-action {
  color: var(--danger);
  border: 1px solid rgba(239, 77, 90, 0.24);
  background: #fff0f2;
}

.chat-message-row .chat-media-card,
.chat-message-row .chat-audio-card,
.chat-message-row .chat-battle-card,
.chat-message-row .chat-gift-card,
.chat-message-row .meetup-card {
  width: min(100%, 286px);
}

.chat-message-row.is-me .chat-media-card,
.chat-message-row.is-me .chat-audio-card,
.chat-message-row.is-me .chat-battle-card,
.chat-message-row.is-me .chat-gift-card,
.chat-message-row.is-me .meetup-card {
  justify-self: end;
}

.chat-message-row.is-incoming .chat-media-card,
.chat-message-row.is-incoming .chat-audio-card,
.chat-message-row.is-incoming .chat-battle-card,
.chat-message-row.is-incoming .chat-gift-card,
.chat-message-row.is-incoming .meetup-card {
  justify-self: start;
}

.chat-typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  background: #fffaf6;
}

.typing-dots {
  display: inline-flex;
  gap: 3px;
}

.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.72;
}

.chat-composer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chat-composer {
  margin-top: 12px;
  grid-template-columns: 44px minmax(0, 1fr) 74px;
}

.chat-composer .text-input {
  min-height: 44px;
  max-height: 96px;
  padding-block: 11px;
  overflow-y: hidden;
  resize: none;
  line-height: 1.35;
}

.chat-composer .text-input.is-scrollable {
  overflow-y: auto;
}

.chat-composer-more {
  display: grid;
  width: 44px;
  min-height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}

.chat-composer-hint {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.chat-composer-hint.is-warning {
  color: var(--danger);
}

.chat-gift-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 107, 74, 0.24);
  border-radius: 18px;
  background: var(--accent-soft);
}

.chat-gift-card .product-art {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.chat-gift-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.chat-media-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(79, 140, 255, 0.22);
  border-radius: 16px;
  background: #eef5ff;
}

.chat-media-card.has-visual-preview {
  display: block;
  width: min(238px, 70vw);
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
}

.chat-media-copy {
  min-width: 0;
}

.chat-media-card.has-visual-preview .chat-media-copy {
  padding: 8px 10px 9px;
}

.chat-card-heading {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.chat-card-heading > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-card-status {
  flex: 0 0 auto;
  max-width: 118px;
  padding: 3px 6px;
  overflow: hidden;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(79, 140, 255, 0.1);
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-media-file {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-voice-panel {
  background: linear-gradient(145deg, #fff, #f4f7ff);
}

.chat-voice-start {
  display: grid;
  gap: 7px;
  justify-items: center;
  min-height: 154px;
  padding: 18px;
  border: 1px solid rgba(79, 140, 255, 0.24);
  border-radius: 24px;
  color: var(--ink);
  background: #fff;
}

.chat-voice-start > span {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #ff9f61);
  box-shadow: 0 12px 28px rgba(255, 107, 74, 0.26);
  font-size: 13px;
  font-weight: 950;
}

.chat-voice-start strong {
  font-size: 17px;
}

.chat-voice-start small,
.chat-voice-recording small {
  color: var(--muted);
  font-weight: 850;
}

.chat-voice-state,
.chat-voice-recording,
.chat-voice-preview,
.chat-voice-error {
  padding: 16px;
  border: 1px solid rgba(79, 140, 255, 0.2);
  border-radius: 20px;
  background: #fff;
}

.chat-voice-state {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-voice-pulse,
.chat-voice-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 107, 74, 0.38);
  animation: chat-voice-pulse 1.2s infinite;
}

@keyframes chat-voice-pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(255, 107, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 74, 0);
  }
}

.chat-voice-recording {
  display: grid;
  gap: 12px;
}

.chat-voice-recording-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
}

.chat-voice-recording-heading time {
  min-width: 42px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  text-align: right;
}

.chat-voice-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 107, 74, 0.12);
}

.chat-voice-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffbd59);
  transition: width 100ms linear;
}

.chat-voice-preview {
  display: grid;
  gap: 12px;
}

.chat-voice-preview > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.chat-voice-preview audio {
  width: 100%;
  height: 42px;
}

.chat-voice-error {
  color: var(--danger);
  border-color: rgba(239, 77, 90, 0.24);
  background: #fff3f4;
}

.chat-voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-voice-actions .product-action {
  width: auto;
  min-width: 112px;
  flex: 1 1 auto;
}

.chat-audio-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: min(248px, 72vw);
  padding: 9px 11px;
  border: 1px solid rgba(79, 140, 255, 0.22);
  border-radius: 20px;
  background: #f2f7ff;
  box-shadow: 0 7px 18px rgba(45, 71, 112, 0.08);
}

.chat-message-row.is-me .chat-audio-card {
  border-color: rgba(255, 107, 74, 0.22);
  background: #fff3e9;
}

.chat-audio-toggle {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), #7b61ff);
  box-shadow: 0 8px 18px rgba(79, 140, 255, 0.25);
}

.chat-message-row.is-me .chat-audio-toggle {
  background: linear-gradient(145deg, var(--accent), #ff9f61);
  box-shadow: 0 8px 18px rgba(255, 107, 74, 0.22);
}

.chat-audio-toggle:disabled {
  cursor: default;
  opacity: 0.42;
  box-shadow: none;
}

.chat-audio-content {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.chat-audio-wave {
  display: flex;
  height: 14px;
  align-items: center;
  gap: 3px;
  overflow: hidden;
}

.chat-audio-wave i {
  width: 3px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.55);
}

.chat-message-row.is-me .chat-audio-wave i {
  background: rgba(255, 107, 74, 0.58);
}

.chat-audio-wave i:nth-child(3n + 1) {
  height: 13px;
}

.chat-audio-wave i:nth-child(4n + 2) {
  height: 9px;
}

.chat-audio-wave i:nth-child(5n) {
  height: 14px;
}

.chat-audio-progress {
  position: relative;
  width: 100%;
  height: 8px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.15);
}

.chat-audio-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.chat-message-row.is-me .chat-audio-progress {
  background: rgba(255, 107, 74, 0.14);
}

.chat-message-row.is-me .chat-audio-progress span {
  background: var(--accent);
}

.chat-audio-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.chat-audio-meta strong {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chat-audio-meta small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-audio-card audio {
  display: none;
}

.chat-battle-card {
  display: block;
  width: min(238px, 70vw) !important;
  overflow: hidden;
  border: 1px solid rgba(255, 107, 74, 0.25);
  border-radius: 20px;
  background: #fff7f1;
  box-shadow: 0 8px 22px rgba(50, 32, 22, 0.08);
}

.chat-battle-card.is-sending {
  opacity: 0.72;
}

.chat-battle-card.is-failed {
  border-color: rgba(239, 77, 90, 0.38);
  background: #fff2f3;
}

.chat-battle-media {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
  background-position: center !important;
  background-size: cover !important;
}

.chat-battle-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(25, 16, 12, 0.45));
  content: "";
}

.chat-battle-media > span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 1;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  background: rgba(20, 14, 10, 0.62);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.chat-battle-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px 9px;
}

.chat-battle-copy strong,
.chat-battle-copy span,
.chat-battle-copy small {
  margin: 0;
}

.chat-battle-copy strong {
  display: block;
  font-size: 15px;
}

.chat-battle-copy span,
.chat-battle-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-battle-copy small {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(50, 32, 22, 0.06);
  font-size: 9px;
}

.chat-battle-card.is-hiss {
  border-color: rgba(239, 77, 90, 0.3);
  background: #fff2f3;
}

.chat-battle-card.is-sleepy {
  border-color: rgba(79, 140, 255, 0.25);
  background: #f1f6ff;
}

.chat-battle-card.is-proud {
  border-color: rgba(168, 117, 40, 0.3);
  background: #fff8e7;
}

.chat-battle-round-row {
  display: block;
  width: 100%;
  padding: 6px 0;
}

.chat-battle-round-row .chat-message-stack {
  width: min(100%, 720px);
  margin-inline: auto;
  justify-items: stretch;
}

.chat-battle-round-row .chat-message-time {
  max-width: none;
  text-align: center;
}

.chat-battle-showdown {
  width: 100% !important;
  border-color: rgba(255, 107, 74, 0.22);
  border-radius: 24px;
  background: rgba(255, 251, 247, 0.96);
  box-shadow: 0 14px 34px rgba(50, 32, 22, 0.11);
}

.chat-battle-showdown-header,
.chat-battle-showdown-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
}

.chat-battle-showdown-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-battle-showdown-header strong {
  color: var(--accent);
  font-size: 12px;
}

.chat-battle-showdown-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 220px;
  overflow: hidden;
  background: #f2ebe5;
}

.chat-battle-contender {
  position: relative;
  min-width: 0;
  min-height: 220px;
  background-color: #eee5dd !important;
  background-position: center !important;
  background-size: cover !important;
}

.chat-battle-contender::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20, 14, 10, 0.58));
  content: "";
}

.chat-battle-contender > span {
  position: absolute;
  right: 12px;
  bottom: 10px;
  left: 12px;
  z-index: 1;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.chat-battle-contender.is-responder > span {
  text-align: right;
}

.chat-battle-contender.is-empty {
  display: grid;
  place-items: center;
  padding: 24px;
  border-left: 1px dashed rgba(128, 102, 86, 0.28);
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.92), rgba(245, 237, 230, 0.88)) !important;
}

.chat-battle-contender.is-empty::after {
  display: none;
}

.chat-battle-contender.is-empty > span {
  position: static;
  color: var(--muted);
  text-align: center;
  text-shadow: none;
  white-space: normal;
}

.chat-battle-versus {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ff7a55, #ef476f);
  box-shadow: 0 8px 24px rgba(174, 60, 56, 0.32);
  font-size: 15px;
  font-style: italic;
  letter-spacing: -0.04em;
  transform: translate(-50%, -50%) rotate(-7deg);
}

.chat-battle-showdown-footer > span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
}

.chat-battle-showdown-footer > span b {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.chat-battle-showdown-footer small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.chat-battle-round-action {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 7px 16px rgba(255, 107, 74, 0.24);
}

.chat-battle-public-vote {
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 13px;
}

.chat-battle-public-vote > small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chat-battle-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chat-battle-vote-action {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 107, 74, 0.24);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff7a55, #ef476f);
  font-size: 11px;
  font-weight: 900;
}

.chat-battle-vote-action.is-secondary {
  color: var(--muted);
  background: #fff;
}

.chat-battle-vote-action:disabled {
  cursor: wait;
  opacity: 0.58;
}

.chat-battle-locked-theme {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid rgba(255, 107, 74, 0.24);
  border-radius: 16px;
  color: var(--ink);
  background: var(--accent-soft);
}

.chat-battle-locked-theme span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
  font-weight: 950;
}

.chat-battle-sender {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffaf6;
}

.chat-battle-sender-avatar {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background-size: cover !important;
  background-position: center !important;
}

.chat-battle-sender span,
.chat-battle-sender small,
.chat-battle-sender strong {
  display: block;
}

.chat-battle-sender small {
  margin-bottom: 3px;
  color: var(--muted);
}

.chat-battle-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chat-battle-theme {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  text-align: left;
  background: #fff;
}

.chat-battle-theme:hover,
.chat-battle-theme:focus-visible {
  border-color: rgba(255, 107, 74, 0.42);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.1);
}

.chat-battle-theme:disabled {
  cursor: default;
  opacity: 0.52;
}

.chat-battle-theme-image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background-position: center !important;
  background-size: cover !important;
}

.chat-battle-theme-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 56%, rgba(20, 14, 10, 0.52));
  content: "";
}

.chat-battle-theme-image em {
  position: absolute;
  right: 7px;
  bottom: 6px;
  z-index: 1;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.chat-battle-theme strong,
.chat-battle-theme small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 540px) {
  .chat-battle-showdown-stage,
  .chat-battle-contender {
    min-height: 164px;
  }

  .chat-battle-showdown {
    border-radius: 20px;
  }

  .chat-battle-showdown-header,
  .chat-battle-showdown-footer {
    padding: 9px 10px;
  }

  .chat-battle-versus {
    width: 44px;
    height: 44px;
    border-width: 3px;
    font-size: 13px;
  }

  .chat-battle-showdown-footer small {
    max-width: 52%;
  }
}

.chat-battle-theme small {
  color: var(--muted);
  font-size: 10px;
}

.chat-media-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.media-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  width: 72px;
  height: 64px;
  overflow: hidden;
  border-radius: 12px;
}

.media-preview span {
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  background: linear-gradient(135deg, var(--blue), #7b61ff);
}

.media-preview span:first-child {
  min-height: 42px;
  background: linear-gradient(135deg, var(--accent), #ffbd59);
}

.media-preview span:last-child {
  color: var(--blue);
  font-size: 9px;
  background: #fff;
}

.media-preview.is-animated span:first-child {
  background: linear-gradient(135deg, #7b61ff, var(--blue));
}

.media-preview.is-video span:first-child {
  background: linear-gradient(135deg, var(--ink), #7b61ff);
}

.media-preview.has-preview {
  display: block;
  background: #111;
}

.media-preview.has-preview img,
.media-preview.has-preview video {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.chat-media-card.has-visual-preview .media-preview {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 0;
}

.media-upload-progress {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.16);
}

.media-upload-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #7b61ff);
}

.media-upload-error {
  color: var(--danger) !important;
  font-weight: 800;
}

.media-upload-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.media-upload-actions .product-action {
  min-height: 34px;
  padding: 7px 12px;
}

.media-upload-detail {
  font-size: 12px;
}

.chat-media-card .product-action {
  width: auto;
  margin-top: 8px;
  margin-right: 6px;
}

.chat-media-picker {
  padding: 14px;
  border: 1px dashed rgba(79, 140, 255, 0.38);
  border-radius: 18px;
  background: #f5f9ff;
}

.chat-media-picker p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.media-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.media-type-button {
  display: grid;
  gap: 5px;
  justify-items: center;
  padding: 11px 6px;
  border: 1px solid rgba(79, 140, 255, 0.22);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
}

.media-type-button strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 32px;
  border-radius: 11px;
  color: #fff;
  font-size: 12px;
  background: linear-gradient(135deg, var(--blue), #7b61ff);
}

.media-type-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.meetup-card {
  padding: 11px;
  border: 1px solid rgba(35, 178, 109, 0.24);
  border-radius: 18px;
  background: #effbf5;
}

.meetup-card h4 {
  margin: 0 0 4px;
}

.meetup-card p,
.meetup-card li {
  color: var(--muted);
  line-height: 1.5;
}

.meetup-status {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 9px 0;
  padding: 8px 9px;
  border-radius: 14px;
  color: var(--muted);
  background: #fff;
}

.meetup-status strong {
  color: var(--gold);
}

.meetup-status.is-ready strong {
  color: var(--good);
}

.meetup-checklist {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.meetup-details {
  border-top: 1px solid rgba(35, 178, 109, 0.18);
  padding-top: 8px;
}

.meetup-details summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.meetup-details summary::-webkit-details-marker {
  display: none;
}

.meetup-details summary::after {
  color: var(--good);
  content: "+";
}

.meetup-details[open] summary::after {
  content: "−";
}

.meetup-details summary > strong {
  margin-left: auto;
  color: var(--good);
}

.meetup-check-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(35, 178, 109, 0.18);
  border-radius: 14px;
  color: var(--ink);
  text-align: left;
  background: #fff;
}

.meetup-check-item span {
  color: var(--muted);
  line-height: 1.4;
}

.meetup-check-item strong {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--gold);
  font-size: 11px;
  background: #fff7e4;
}

.meetup-check-item.is-done {
  border-color: rgba(35, 178, 109, 0.34);
  background: #f8fffb;
}

.meetup-check-item.is-done strong {
  color: var(--good);
  background: #e8f8ef;
}

.id-add-row {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 10px;
}

.text-input,
.search-input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.small-primary-button,
.primary-button,
.product-action {
  border: 0;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
  background: var(--accent);
}

.small-primary-button {
  padding: 0 12px;
}

.primary-button {
  width: 100%;
  margin-top: 14px;
  padding: 14px 18px;
  box-shadow: 0 12px 24px rgba(255, 107, 74, 0.26);
}

.inline-result {
  margin-top: 10px;
  color: var(--muted);
  background: #fffaf6;
}

.matches-section-tabs,
.shop-mode-tabs,
.lineage-species-tabs {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 4px;
  margin: 4px 0 14px;
  padding: 4px;
  overflow: visible;
  border: 1px solid rgba(50, 32, 22, 0.06);
  border-radius: 16px;
  background: rgba(239, 229, 221, 0.72);
}

.matches-section-tabs .shop-mode,
.shop-mode-tabs .shop-mode,
.lineage-species-tabs .species-tab {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matches-section-tabs .shop-mode.is-active,
.shop-mode-tabs .shop-mode.is-active,
.lineage-species-tabs .species-tab.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 12px rgba(50, 32, 22, 0.09);
}

.shop-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.product-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  padding: 14px;
}

.shop-grid.is-hidden,
.product-card.is-hidden,
.merchant-panel.is-hidden {
  display: none;
}

.product-meta,
.plaza-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-meta span,
.plaza-meta span,
.commercial-label {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f8f1eb;
}

.commercial-label {
  color: var(--blue);
  background: #eaf2ff;
}

.product-art {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  overflow: hidden;
  border-radius: 22px;
  color: var(--accent);
  font-weight: 950;
  background: linear-gradient(135deg, #fff0d6, #e2f0ff);
}

.product-art.has-image {
  color: transparent;
  background: #f6f0ea;
}

.product-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .product-art {
  width: 108px;
  height: 108px;
  border-radius: 20px;
}

.product-card h3 {
  margin-bottom: 4px;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

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

.product-card .shop-product-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-product-actions .product-action {
  min-height: 44px;
  white-space: normal;
}

.product-action {
  padding: 10px 8px;
  font-size: 13px;
}

.product-action.secondary {
  color: var(--accent);
  border: 1px solid rgba(255, 107, 74, 0.28);
  background: var(--accent-soft);
}

.product-action.danger {
  color: var(--danger);
  border: 1px solid rgba(239, 77, 90, 0.24);
  background: #fff0f2;
}

.plaza-hub {
  position: sticky;
  top: calc(68px + env(safe-area-inset-top));
  z-index: 12;
  display: grid;
  gap: 7px;
  padding: 10px;
  margin: 4px 0 10px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 107, 74, 0.1), transparent 10rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 246, 0.94));
  box-shadow: 0 10px 24px rgba(50, 32, 22, 0.08);
  backdrop-filter: blur(18px);
}

.plaza-hub-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.plaza-other-pets-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid #edc9ad;
  border-radius: 15px;
  background: #fff1e3;
}

.plaza-other-pets-copy { min-width: 0; }
.plaza-other-pets-copy strong { display: block; color: #583b28; font-size: 14px; }
.plaza-other-pets-copy small { display: block; margin-top: 3px; color: #73563f; font-size: 11px; line-height: 1.4; }
.plaza-other-pets-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 91px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #c8b49f;
  border-radius: 999px;
  background: #fffaf5;
  color: #594a3f;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.plaza-other-pets-track { display: inline-flex; align-items: center; width: 34px; height: 20px; padding: 3px; border-radius: 999px; background: #9d9288; }
.plaza-other-pets-track > span { width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.plaza-other-pets-switch[aria-checked="true"] { border-color: #34664e; color: #234d39; background: #e9f4ec; }
.plaza-other-pets-switch[aria-checked="true"] .plaza-other-pets-track { justify-content: flex-end; background: #34664e; }

.plaza-search {
  position: relative;
  display: grid;
  gap: 6px;
}

.plaza-search .search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.search-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.plaza-search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(50, 32, 22, 0.08);
  border-radius: 999px;
  background: #f7f3ef;
}

.plaza-search-box span {
  color: var(--muted);
  font-weight: 900;
}

.plaza-search-box .search-input {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.plaza-compose-button {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 38px;
  padding-inline: 12px;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(255, 107, 74, 0.18);
}

.plaza-compose-button .ui-icon {
  width: 17px;
  height: 17px;
}

.plaza-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
}

.plaza-search-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.plaza-filter-row::-webkit-scrollbar,
.plaza-search-chips::-webkit-scrollbar {
  display: none;
}

.plaza-filter-row .filter-chip {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plaza-search-chips .filter-chip {
  flex: 0 0 auto;
}

.plaza-filter-row .plaza-lineage-channel {
  margin-left: 0;
  border-color: rgba(79, 140, 255, 0.2);
  color: #356fc8;
  background: #eef5ff;
}

.plaza-filter-row .plaza-lineage-channel.is-active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.plaza-hub.is-lineage-channel {
  padding-block: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.plaza-search-chips {
  flex-wrap: nowrap;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: max-height 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.plaza-hub:has(#plazaSearchInput:focus) .plaza-search-chips,
.plaza-hub:has(.plaza-search-chips:focus-within) .plaza-search-chips {
  max-height: 34px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.plaza-hub:has(.plaza-search-assist.is-open) .plaza-search-chips {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
}

.plaza-filter-row .filter-chip,
.plaza-search-chips .filter-chip {
  min-height: 30px;
  padding: 6px 11px;
  font-size: 12px;
  background: #faf7f3;
}

.plaza-search-assist {
  display: grid;
  gap: 7px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: max-height 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.plaza-search-assist.is-open {
  max-height: 132px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.plaza-search-assist.is-slim {
  max-height: 38px;
}

.plaza-search-current,
.plaza-search-assist-header {
  display: flex;
  gap: 8px;
  align-items: center;
}

.plaza-search-current {
  justify-content: space-between;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 107, 74, 0.16);
  border-radius: 16px;
  color: var(--muted);
  background: #fff8f3;
}

.plaza-search-current span,
.plaza-search-assist-header span {
  font-size: 12px;
  font-weight: 950;
}

.plaza-search-current strong {
  color: var(--accent);
  font-size: 13px;
}

.plaza-search-current button,
.plaza-search-assist-header button {
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font-size: 12px;
  font-weight: 950;
}

.plaza-search-assist-header {
  justify-content: flex-start;
  color: var(--muted);
}

.plaza-search-assist-header em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.plaza-search-suggestions {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.plaza-search-suggestions::-webkit-scrollbar {
  display: none;
}

.plaza-search-suggestions .filter-chip {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 11px;
  font-size: 12px;
  background: #fff;
}

.plaza-compose-overlay {
  position: fixed;
  inset: 0;
  z-index: 86;
}

body.is-plaza-compose-open,
body.is-pet-create-open {
  overflow: hidden;
}

.plaza-compose-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: rgba(12, 8, 7, 0.46);
  backdrop-filter: blur(10px);
}

.plaza-compose-sheet {
  position: absolute;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(720px, calc(100vw - 32px));
  max-height: min(90vh, 820px);
  max-height: min(90svh, 820px);
  overflow: hidden;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(22, 13, 9, 0.36);
  transform: translateX(-50%);
}

.plaza-compose-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(22, 13, 9, 0.12);
  font-size: 20px;
  font-weight: 900;
}

.plaza-compose-close-label {
  display: none;
}

.plaza-compose-panel {
  display: grid;
  gap: 14px;
  max-height: min(90vh, 820px);
  max-height: min(90svh, 820px);
  overflow-y: auto;
  padding: 14px 16px 18px;
}

.plaza-compose-header {
  display: grid;
  gap: 4px;
  padding-right: 42px;
}

.plaza-compose-header .sheet-handle {
  justify-self: center;
  margin-bottom: 4px;
}

.plaza-compose-header h3,
.plaza-compose-header p {
  margin: 0;
}

.plaza-compose-header h3 {
  font-size: 24px;
}

.plaza-compose-header p {
  color: var(--muted);
  line-height: 1.45;
}

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

.plaza-composer-primary-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 0.42fr);
  gap: 10px;
}

.plaza-pet-identity,
.plaza-author-pet {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plaza-pet-identity {
  padding: 12px;
  border: 1px solid rgba(255, 107, 74, 0.16);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #fff4ed);
}

.plaza-pet-identity > div {
  min-width: 0;
}

.plaza-pet-identity span,
.plaza-author-pet span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plaza-pet-identity strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 14px;
}

.plaza-pet-identity p {
  margin: 3px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.plaza-identity-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--muted);
  background: #faf7f3;
  line-height: 1.45;
}

.plaza-identity-options {
  display: flex;
  gap: 8px;
  min-height: 46px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.plaza-identity-options::-webkit-scrollbar {
  display: none;
}

.plaza-identity-chip {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px 6px 6px;
  border: 1px solid rgba(50, 32, 22, 0.08);
  border-radius: 999px;
  color: var(--text);
  background: #faf7f3;
  font-weight: 900;
}

.plaza-identity-chip.is-active {
  color: var(--accent);
  border-color: rgba(255, 107, 74, 0.35);
  background: #fff0ea;
  box-shadow: 0 10px 24px rgba(255, 107, 74, 0.12);
}

.plaza-pet-avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.plaza-identity-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 12px;
}

.plaza-composer-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.plaza-composer-form textarea {
  min-height: 98px;
  resize: vertical;
}

.plaza-composer-form .profile-media-actions {
  grid-template-columns: repeat(3, 1fr);
}

.plaza-composer-media {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(50, 32, 22, 0.08);
  border-radius: 20px;
  background: #faf9f7;
}

.plaza-composer-media-header {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.plaza-composer-media-header h4,
.plaza-composer-media-header p {
  margin: 0;
}

.plaza-composer-media-header h4 {
  color: var(--ink);
  font-size: 15px;
}

.plaza-composer-media-header span,
.plaza-composer-media-header p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.plaza-composer-media-header p {
  max-width: 220px;
  line-height: 1.4;
  text-align: right;
}

.plaza-composer-media-actions .product-action {
  min-height: 38px;
  border-style: dashed;
  background: #fff;
}

.plaza-media-list,
.plaza-post-media {
  display: grid;
  gap: 10px;
}

.plaza-media-list > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.plaza-media-draft {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(79, 140, 255, 0.2);
  border-radius: 18px;
  background: #f5f9ff;
}

.plaza-media-draft.is-cover {
  border-color: rgba(255, 107, 74, 0.32);
  background: #fff7f2;
}

.plaza-media-draft-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.plaza-media-cover-badge {
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 10px;
  font-weight: 950;
}

.plaza-media-draft .media-preview {
  width: 92px;
  height: 82px;
}

.plaza-media-draft .media-preview.has-preview {
  position: relative;
}

.plaza-media-draft .media-preview.has-preview span {
  position: absolute;
  left: 7px;
  bottom: 7px;
  display: inline-grid;
  min-height: 0;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(15, 12, 11, 0.58);
  backdrop-filter: blur(10px);
}

.plaza-media-draft p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.plaza-media-remove {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--danger);
  background: #fff0f2;
  font-size: 18px;
  font-weight: 950;
}

.plaza-media-order-actions {
  display: grid;
  gap: 5px;
}

.plaza-media-order-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 14px;
  font-weight: 950;
}

.plaza-media-order-actions button:disabled {
  opacity: 0.28;
}

.plaza-media-order-actions .plaza-media-remove {
  width: 30px;
  height: 30px;
  color: var(--danger);
  background: #fff0f2;
}

.plaza-composer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pet-create-sheet {
  width: min(700px, calc(100vw - 24px));
}

.pet-create-panel {
  gap: 12px;
}

.pet-create-account-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid rgba(79, 140, 255, 0.16);
  border-radius: 18px;
  background: #f5f9ff;
}

.pet-create-account-summary span,
.pet-create-account-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.pet-create-account-summary strong {
  grid-row: 2;
  color: var(--text);
}

.pet-create-account-summary small {
  grid-row: 1 / span 2;
  grid-column: 2;
  text-align: right;
}

.pet-create-media-picker {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(255, 107, 74, 0.16);
  border-radius: 20px;
  background: #fff8f3;
}

.pet-create-media-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.pet-create-media-heading strong {
  color: var(--text);
}

.pet-create-media-heading p,
.pet-create-media-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.pet-create-media-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--accent);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.pet-create-media-count.is-ready {
  color: #14734b;
  background: #e9fff4;
}

.pet-create-media-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  align-items: start;
}

.pet-create-media-card,
.pet-create-media-slot {
  min-width: 0;
}

.pet-create-media-card {
  display: grid;
  gap: 5px;
}

.pet-create-media-visual,
.pet-create-media-slot {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
}

.pet-create-media-visual {
  border: 2px solid transparent;
  background: #eee7e2;
}

.pet-create-media-card.is-cover .pet-create-media-visual {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(255, 107, 74, 0.16);
}

.pet-create-media-visual img,
.pet-create-media-visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pet-create-media-type,
.pet-create-media-visual small {
  position: absolute;
  z-index: 2;
  top: 7px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(20, 14, 11, 0.68);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.pet-create-media-type {
  left: 7px;
}

.pet-create-media-visual small {
  right: 7px;
}

.pet-create-media-card-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.pet-create-media-card-actions button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: #6f615a;
  background: #fff;
  font-size: 14px;
  font-weight: 900;
}

.pet-create-media-card-actions button:disabled {
  opacity: 0.35;
}

.pet-create-media-card-actions .is-remove {
  color: var(--danger);
  background: #fff0f2;
}

.pet-create-media-slot {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px dashed rgba(255, 107, 74, 0.42);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
  font-size: 25px;
  font-weight: 850;
}

.pet-create-media-slot small {
  position: absolute;
  right: 7px;
  bottom: 6px;
  color: var(--muted);
  font-size: 9px;
}

.pet-create-media-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pet-create-media-toolbar .product-action {
  min-height: 34px;
  padding: 6px 10px;
}

@media (min-width: 900px) {
  .plaza-composer.plaza-compose-sheet {
    top: 50%;
    bottom: auto;
    width: min(1080px, calc(100vw - 40px));
    max-height: min(94vh, 900px);
    max-height: min(94svh, 900px);
    transform: translate(-50%, -50%);
  }

  .plaza-composer .plaza-compose-panel {
    grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.5fr);
    align-items: start;
    padding: 20px 22px 24px;
  }

  .plaza-composer .plaza-compose-header {
    grid-column: 1 / -1;
  }

  .plaza-composer .plaza-pet-identity {
    grid-column: 1;
    grid-row: 2;
  }

  .plaza-composer .plaza-identity-options,
  .plaza-composer .plaza-identity-note {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
  }

  .plaza-composer .plaza-composer-form {
    grid-column: 2;
    grid-row: 2 / span 3;
  }

  .pet-create-sheet {
    top: 50%;
    bottom: auto;
    width: min(980px, calc(100vw - 40px));
    max-height: min(94vh, 900px);
    max-height: min(94svh, 900px);
    transform: translate(-50%, -50%);
  }

  .pet-create-panel {
    max-height: min(94vh, 900px);
    max-height: min(94svh, 900px);
    padding: 22px 26px 26px;
  }

  .pet-create-media-grid {
    grid-template-columns: repeat(5, minmax(110px, 1fr));
  }
}

.pet-create-form {
  display: grid;
  gap: 11px;
}

.pet-create-quick-note {
  display: flex;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(35, 178, 109, 0.18);
  border-radius: 15px;
  color: #246b4a;
  background: #effbf5;
  font-size: 12px;
}

.pet-create-quick-note span {
  color: #4f7563;
  line-height: 1.45;
  text-align: right;
}

.pet-create-optional {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.pet-create-optional > summary {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  cursor: pointer;
  list-style: none;
}

.pet-create-optional > summary::-webkit-details-marker {
  display: none;
}

.pet-create-optional > summary span:first-child {
  display: grid;
  gap: 2px;
}

.pet-create-optional > summary small {
  color: var(--muted);
  font-weight: 700;
}

.pet-create-optional > summary span:last-child {
  color: var(--muted);
  font-size: 20px;
  transition: transform 160ms ease;
}

.pet-create-optional[open] > summary span:last-child {
  transform: rotate(180deg);
}

.pet-create-optional-body {
  display: grid;
  gap: 11px;
  padding: 0 12px 13px;
}

.pet-create-breed-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pet-create-breed-shortcuts button {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 107, 74, 0.22);
  border-radius: 999px;
  color: var(--accent-deep);
  background: #fff7f3;
  font-size: 11px;
  font-weight: 850;
}

.pet-create-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.pet-create-primary-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 0.72fr);
  gap: 10px;
}

.pet-create-form textarea {
  min-height: 82px;
  resize: vertical;
}

.pet-create-review-note {
  padding: 10px 12px;
  border-radius: 16px;
  color: #75562b;
  background: #fff7df;
}

.pet-create-complete-panel {
  align-content: center;
  min-height: min(620px, calc(100svh - 120px));
  text-align: center;
}

.pet-create-complete-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 6px;
  border-radius: 50%;
  color: #fff;
  background: var(--good);
  box-shadow: 0 14px 30px rgba(35, 178, 109, 0.24);
  font-size: 30px;
  font-weight: 900;
}

.pet-create-complete-panel > h3,
.pet-create-complete-panel > p {
  margin-right: auto;
  margin-left: auto;
}

.pet-create-complete-panel > p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.6;
}

.pet-create-next-actions {
  display: grid;
  gap: 9px;
  width: min(100%, 420px);
  margin: 12px auto;
}

.pet-create-next-actions > button {
  min-height: 48px;
}

.pet-create-other-disabled,
.pet-create-electronic-note {
  padding: 10px 12px;
  border-radius: 16px;
}

.pet-create-other-disabled {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: #705a4e;
  background: #f6f2ef;
}

.pet-create-other-disabled p,
.pet-create-electronic-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.pet-create-other-disabled .product-action {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 10px;
}

.pet-create-electronic-note {
  color: #4f5aa4;
  background: #f0f2ff;
}

.pet-create-electronic-note strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.profile-electronic-note {
  grid-column: 1 / -1;
}

.pet-create-review-note strong {
  display: block;
  font-size: 12px;
}

.pet-create-review-note p,
.pet-create-error {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.pet-create-error {
  padding: 9px 11px;
  border-radius: 14px;
  color: var(--danger);
  font-weight: 850;
  background: #fff0f2;
}

.plaza-post-media {
  margin: 12px 0;
}

.plaza-card {
  overflow: hidden;
  padding: 0;
}

.plaza-card-body {
  padding: 16px;
}

.plaza-author-pet {
  margin: 8px 0 10px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.plaza-author-pet .plaza-pet-avatar {
  width: 28px;
  height: 28px;
  border-radius: 11px;
}

.plaza-cover {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 142px;
  color: #fff;
  background: linear-gradient(135deg, #ffbd59, #4f8cff);
}

.plaza-cover.is-adoption {
  background: linear-gradient(135deg, #23b26d, #8bd4a8);
}

.plaza-cover.is-event {
  background: linear-gradient(135deg, #ff6b4a, #ffbd59);
}

.plaza-cover.is-merchant {
  background: linear-gradient(135deg, #4f8cff, #9dbdff);
}

.plaza-cover.has-media {
  background: #f4e7dc;
}

.plaza-cover img,
.plaza-cover video {
  width: 100%;
  height: 172px;
  object-fit: cover;
}

.plaza-cover-placeholder {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 20px;
  text-align: center;
}

.plaza-cover-placeholder strong {
  font-size: 34px;
  letter-spacing: 0.04em;
}

.plaza-cover-placeholder span {
  font-size: 13px;
  font-weight: 900;
  opacity: 0.88;
}

.plaza-cover-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(33, 25, 22, 0.46);
  backdrop-filter: blur(12px);
}

.plaza-card h3 {
  margin-bottom: 6px;
}

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

.plaza-pagination {
  margin-top: 12px;
}

.plaza-pagination-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: #fff;
  overflow: hidden;
}

.plaza-pagination-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #f2ece7;
}

.plaza-pagination-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffbd59, #ff6b4a);
  transition: width 180ms ease;
}

.plaza-pagination-status {
  font-size: 12px;
  font-weight: 900;
}

.plaza-pagination-card .product-action {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.plaza-loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 107, 74, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: plaza-spin 700ms linear infinite;
}

.plaza-feed-skeleton {
  display: grid;
  gap: 9px;
  padding: 10px;
  border-radius: 22px;
  background: #fff;
  pointer-events: none;
}

.plaza-skeleton-media,
.plaza-skeleton-line {
  display: block;
  border-radius: 12px;
  background: linear-gradient(100deg, #f1ece7 20%, #faf7f4 38%, #f1ece7 56%);
  background-size: 220% 100%;
  animation: plaza-shimmer 1.1s ease-in-out infinite;
}

.plaza-skeleton-media {
  aspect-ratio: 4 / 5;
}

.plaza-skeleton-line {
  height: 10px;
}

.plaza-skeleton-line.is-title {
  width: 88%;
  height: 14px;
}

.plaza-skeleton-line.is-short {
  width: 58%;
}

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

@keyframes plaza-shimmer {
  to { background-position-x: -220%; }
}

.plaza-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.plaza-actions button,
.merchant-step {
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-weight: 800;
  background: #fff;
}

.plaza-actions button {
  padding: 9px 12px;
}

#view-plaza .plaza-feed {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: 68vh;
  overflow: visible;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding: 4px 4px 14px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 189, 89, 0.16), transparent 16rem),
    linear-gradient(180deg, rgba(255, 250, 246, 0.92), rgba(248, 243, 238, 0.92));
}

#view-plaza .plaza-feed::-webkit-scrollbar {
  width: 0;
}

.plaza-feed-card {
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(50, 32, 22, 0.08);
  border-radius: 22px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 12px 30px rgba(50, 32, 22, 0.09);
  transform: translateZ(0);
}

.plaza-battle-post {
  border-color: rgba(239, 71, 111, 0.2);
  background: linear-gradient(180deg, #fff, #fff8f4);
}

.plaza-battle-post-header,
.plaza-battle-post-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
}

.plaza-battle-post-header > div {
  display: grid;
  gap: 2px;
}

.plaza-battle-post-header span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plaza-battle-post-header strong {
  font-size: 16px;
}

.plaza-battle-post-header small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.plaza-battle-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #eee5dd;
}

.plaza-battle-entry {
  min-width: 0;
}

.plaza-battle-photo {
  position: relative;
  min-height: 280px;
  background-color: #eee5dd !important;
  background-position: center !important;
  background-size: cover !important;
}

.plaza-battle-photo::after {
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(24, 15, 12, 0.72));
  content: "";
}

.plaza-battle-photo > span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 1;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  text-overflow: ellipsis;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.34);
  white-space: nowrap;
}

.plaza-battle-entry.is-responder .plaza-battle-photo > span {
  text-align: right;
}

.plaza-battle-winner {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #6c3600;
  background: #ffd56a;
  box-shadow: 0 5px 14px rgba(81, 49, 5, 0.2);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.plaza-battle-versus {
  position: absolute;
  top: 44%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 4px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ff7a55, #ef476f);
  box-shadow: 0 9px 24px rgba(153, 47, 62, 0.34);
  font-size: 15px;
  font-style: italic;
  transform: translate(-50%, -50%) rotate(-7deg);
}

.plaza-battle-vote-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 9px;
  border: 0;
  border-top: 1px solid rgba(50, 32, 22, 0.08);
  color: var(--ink);
  background: #fff;
}

.plaza-battle-entry + .plaza-battle-entry .plaza-battle-vote-button {
  border-left: 1px solid rgba(50, 32, 22, 0.08);
}

.plaza-battle-vote-button strong {
  color: var(--accent);
  font-size: 18px;
}

.plaza-battle-vote-button span {
  font-size: 11px;
  font-weight: 900;
}

.plaza-battle-entry.is-selected .plaza-battle-vote-button {
  color: #fff;
  background: linear-gradient(135deg, #ff7a55, #ef476f);
}

.plaza-battle-entry.is-selected .plaza-battle-vote-button strong {
  color: #fff;
}

.plaza-battle-vote-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.plaza-battle-post-footer {
  min-height: 52px;
}

.plaza-battle-post-footer > strong {
  color: var(--accent);
  font-size: 12px;
}

.plaza-battle-post-footer > div {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

@media (max-width: 520px) {
  .plaza-battle-photo {
    min-height: 220px;
  }

  .plaza-battle-versus {
    width: 46px;
    height: 46px;
  }

  .plaza-battle-vote-button {
    min-height: 62px;
    flex-direction: column;
    gap: 1px;
  }
}

@media (min-width: 721px) {
  #view-plaza .plaza-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.plaza-feed-ad {
  border-color: rgba(255, 112, 72, 0.25);
  background: #fffaf7;
}

.plaza-google-ad {
  position: relative;
  min-height: 168px;
  padding: 30px 12px 12px;
  border-style: dashed;
  border-color: rgba(76, 87, 99, 0.22);
  background: rgba(255, 255, 255, 0.96);
}

.plaza-google-ad[hidden],
.plaza-google-ad.is-unfilled {
  display: none;
}

.plaza-google-ad-disclosure {
  position: absolute;
  top: 9px;
  left: 10px;
  padding: 3px 7px;
  border: 1px solid rgba(54, 64, 74, 0.2);
  border-radius: 5px;
  color: #59636d;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.plaza-google-ad-unit {
  display: block;
  min-height: 120px;
}

.plaza-google-ad-test {
  display: grid;
  min-height: 126px;
  padding: 18px;
  place-content: center;
  text-align: center;
  border-radius: 16px;
  color: #59636d;
  background:
    repeating-linear-gradient(-45deg, rgba(87, 99, 112, 0.05) 0 10px, transparent 10px 20px),
    #f5f7f9;
}

.plaza-google-ad-test strong {
  color: #2f3740;
  font-size: 13px;
}

.plaza-google-ad-test p,
.plaza-google-ad-fallback {
  margin: 6px 0 0;
  font-size: 10px;
  line-height: 1.45;
}

.plaza-ad-media {
  position: relative;
  min-height: 156px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(145deg, #ffb15d, #ff7048);
}

.plaza-ad-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plaza-ad-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #fff;
  font-size: 42px;
  font-weight: 950;
  background: linear-gradient(145deg, var(--ad-accent), #30231e);
}

.plaza-ad-disclosure {
  left: 10px;
  right: auto;
}

.plaza-ad-copy {
  border-top: 3px solid #ff7048;
}

.plaza-ad-privacy {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.plaza-ad-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.plaza-ad-actions .product-action {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
}

.plaza-feed-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.plaza-feed-media-slide > .plaza-feed-open {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.plaza-feed-open:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.92);
  outline-offset: -6px;
}

.plaza-feed-media-shell {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.plaza-feed-media-track {
  display: flex;
  width: 100%;
  transform: translate3d(calc(var(--plaza-media-position, 0%) + var(--plaza-drag-offset, 0px)), 0, 0);
  transition: transform 320ms cubic-bezier(0.22, 0.72, 0.2, 1);
  will-change: transform;
}

.plaza-feed-media-shell.is-dragging .plaza-feed-media-track {
  transition: none;
}

.plaza-feed-media-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
}

.plaza-feed-media-slide[aria-hidden="true"] {
  pointer-events: none;
}

.plaza-media-playback-control {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 12, 11, 0.68);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 950;
  transform: translate(-50%, -50%);
}

.plaza-feed-media-slide.is-media-loading > .plaza-media-playback-control {
  opacity: 0;
  pointer-events: none;
}

.plaza-feed-media-slide.is-media-ready > .plaza-media-playback-control {
  top: auto;
  bottom: 10px;
  left: auto;
  right: 10px;
  min-height: 44px;
  padding: 6px 9px;
  transform: none;
}

.plaza-feed-media-slide.is-media-autoplay-blocked > .plaza-media-playback-control,
.plaza-feed-media-slide.is-media-error > .plaza-media-playback-control,
.plaza-detail-media-item.is-media-autoplay-blocked > .plaza-media-playback-control,
.plaza-detail-media-item.is-media-error > .plaza-media-playback-control {
  top: calc(50% + 42px);
}

.plaza-detail-media-item > .plaza-media-playback-control {
  display: none;
}

.plaza-detail-media-item.is-media-autoplay-blocked > .plaza-media-playback-control,
.plaza-detail-media-item.is-media-error > .plaza-media-playback-control {
  display: inline-flex;
}

.plaza-feed-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 156px;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #ffbd59, #4f8cff);
}

.plaza-feed-card:nth-child(3n + 2) .plaza-feed-media {
  aspect-ratio: 1 / 1;
}

.plaza-feed-card:nth-child(4n) .plaza-feed-media {
  aspect-ratio: 3 / 4;
}

.plaza-feed-media.is-adoption {
  background: linear-gradient(135deg, #23b26d, #8bd4a8);
}

.plaza-feed-media.is-event {
  background: linear-gradient(135deg, #ff6b4a, #ffbd59);
}

.plaza-feed-media.is-merchant {
  background: linear-gradient(135deg, #4f8cff, #9dbdff);
}

.plaza-feed-media img,
.plaza-feed-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plaza-feed-media video {
  background: #100c0b;
}

.plaza-feed-media.is-media-next {
  animation: plaza-media-next 180ms ease-out;
}

.plaza-feed-media.is-media-previous {
  animation: plaza-media-previous 180ms ease-out;
}

.plaza-feed-media.is-boundary-previous {
  animation: plaza-media-boundary-previous 190ms ease-out;
}

.plaza-feed-media.is-boundary-next {
  animation: plaza-media-boundary-next 190ms ease-out;
}

@keyframes plaza-media-next {
  from { opacity: 0.74; transform: translateX(3%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes plaza-media-previous {
  from { opacity: 0.74; transform: translateX(-3%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes plaza-media-boundary-previous {
  50% { transform: translateX(6px); }
}

@keyframes plaza-media-boundary-next {
  50% { transform: translateX(-6px); }
}

.plaza-feed-media.has-media.is-playing::after {
  content: "PLAY";
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: rgba(15, 12, 11, 0.46);
  backdrop-filter: blur(14px);
}

.plaza-feed-copy {
  display: grid;
  gap: 7px;
  padding: 10px 11px 11px;
}

.plaza-feed-meta,
.plaza-feed-copy .plaza-author-pet span,
.plaza-feed-copy .plaza-author-pet small,
.plaza-feed-copy p {
  color: var(--muted);
}

.plaza-feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  min-height: 18px;
  font-size: 11px;
  font-weight: 900;
}

.plaza-recommendation-reason {
  padding: 4px 7px;
  border-radius: 999px;
  color: #a54f21;
  background: #fff1df;
}

.plaza-feed-title {
  padding: 0;
  border: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.28;
  text-align: left;
  background: transparent;
}

.plaza-feed-summary {
  margin: 0;
  font-size: 13px;
  line-height: 1.42;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.plaza-feed-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: hidden;
}

.plaza-feed-tags span {
  flex: 0 0 auto;
  padding: 4px 7px;
  font-size: 11px;
}

.plaza-feed-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.plaza-feed-media-count,
.plaza-feed-media-badge {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.plaza-feed-media-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #fff;
  background: rgba(15, 12, 11, 0.46);
  backdrop-filter: blur(14px);
}

.plaza-feed-media-stack {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 12, 11, 0.5);
  backdrop-filter: blur(14px);
  font-size: 10px;
  font-weight: 950;
}

.plaza-feed-media-progress {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 48%;
  transform: translateX(-50%);
}

.plaza-feed-media-progress button {
  position: relative;
  width: 15px;
  height: 24px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.plaza-feed-media-progress button::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  content: "";
  transform: translate(-50%, -50%);
  transition: width 180ms ease, border-radius 180ms ease, background 180ms ease;
}

.plaza-feed-media-progress button.is-active::after {
  width: 13px;
  border-radius: 999px;
  background: #fff;
}

.plaza-feed-media-arrow,
.plaza-detail-media-arrow {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 12, 11, 0.42);
  box-shadow: 0 8px 20px rgba(15, 12, 11, 0.18);
  backdrop-filter: blur(12px);
  font-size: 25px;
  font-weight: 900;
}

.plaza-feed-media-arrow {
  top: 50%;
  transform: translateY(-50%);
}

.plaza-feed-media-arrow.previous,
.plaza-detail-media-arrow.previous {
  left: 8px;
}

.plaza-feed-media-arrow.next,
.plaza-detail-media-arrow.next {
  right: 8px;
}

.plaza-feed-media-arrow:disabled,
.plaza-detail-media-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

.plaza-feed-placeholder {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.plaza-feed-placeholder strong {
  color: #fff;
  font-size: 42px;
  letter-spacing: 0.08em;
}

.plaza-feed-placeholder span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 900;
}

.plaza-feed-avatar {
  width: 50px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.plaza-feed-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px 8px;
  align-items: center;
  padding-top: 2px;
}

.plaza-feed-footer .plaza-author-pet {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
}

.plaza-feed-footer .plaza-author-pet span {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plaza-feed-footer .plaza-author-pet small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.plaza-feed-actions,
.plaza-feed-tools {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 6px;
  align-items: center;
  min-width: 0;
  grid-column: 1;
}

.plaza-feed-action {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid rgba(50, 32, 22, 0.08);
  border-radius: 999px;
  color: var(--muted);
  background: #faf7f3;
}

.ui-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.plaza-feed-action strong {
  color: var(--text);
  font-size: 11px;
}

.plaza-feed-tools {
  gap: 5px;
  padding-top: 6px;
  border-top: 1px solid rgba(50, 32, 22, 0.06);
}

.plaza-feed-tool {
  display: inline-grid;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(50, 32, 22, 0.08);
  border-radius: 999px;
  color: var(--muted);
  background: #faf7f3;
}

.plaza-feed-tool.is-danger {
  color: #9f2f4b;
}

.plaza-feed-tool.is-admin {
  color: #386fca;
}

.plaza-feed-tool:disabled {
  cursor: wait;
  opacity: 0.72;
}

.plaza-feed-action.is-danger {
  color: var(--danger);
  background: #fff0f2;
}

.plaza-feed-action.is-admin {
  color: #386fca;
  background: #eef5ff;
}

.plaza-feed-action.is-like.is-active {
  color: #fff;
  background: linear-gradient(135deg, #ff6b8d, #ff6b4a);
}

.plaza-feed-action.is-save.is-active,
.plaza-detail-action.is-save.is-active,
.plaza-mobile-action.is-save.is-active {
  color: #386fca;
  background: #eef5ff;
}

.plaza-feed-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.plaza-interaction-overlay {
  position: fixed;
  inset: 0;
  z-index: 84;
}

.plaza-author-overlay {
  position: fixed;
  inset: 0;
  z-index: 88;
}

body.is-plaza-author-open {
  overflow: hidden;
}

.plaza-author-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: rgba(12, 8, 7, 0.5);
  backdrop-filter: blur(10px);
}

.plaza-author-sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(560px, calc(100vw - 24px));
  max-height: min(90vh, 800px);
  max-height: min(90svh, 800px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(22, 13, 9, 0.36);
  transform: translate(-50%, -50%);
}

.plaza-author-close {
  position: sticky;
  top: 10px;
  left: 10px;
  z-index: 4;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 38px;
  margin: 10px 0 -48px 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(22, 13, 9, 0.12);
  backdrop-filter: blur(14px);
  font-weight: 900;
}

.plaza-author-profile {
  display: grid;
  gap: 14px;
  padding: 62px 18px 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 107, 74, 0.12), transparent 15rem),
    #fff;
}

.plaza-author-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.plaza-author-profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  box-shadow: 0 14px 30px rgba(22, 13, 9, 0.14);
}

.plaza-author-hero h3,
.plaza-author-hero p,
.plaza-author-posts-header h4,
.plaza-author-post-list > p {
  margin: 0;
}

.plaza-author-hero h3 {
  margin-top: 2px;
  font-size: 24px;
}

.plaza-author-hero > div > p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.plaza-author-relation {
  display: inline-flex;
  margin-top: 7px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--accent);
  background: #fff0ea;
  font-size: 11px;
  font-weight: 950;
}

.plaza-author-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.plaza-author-stats > div {
  display: grid;
  gap: 2px;
  padding: 11px 12px;
  border-radius: 16px;
  background: #faf7f3;
}

.plaza-author-stats strong {
  font-size: 20px;
}

.plaza-author-stats span,
.plaza-follow-identity {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.plaza-author-bio {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.plaza-author-actions {
  display: flex;
  gap: 8px;
}

.plaza-author-actions > button {
  flex: 1 1 0;
  min-height: 42px;
  border-radius: 999px;
}

.plaza-follow-button.is-following {
  color: var(--text);
  background: #f1eeeb;
  box-shadow: none;
}

.plaza-follow-identity {
  margin: -6px 0 0;
  text-align: center;
}

.plaza-author-posts {
  display: grid;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid rgba(50, 32, 22, 0.08);
}

.plaza-author-posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.plaza-author-posts-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.plaza-author-post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.plaza-author-post-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(50, 32, 22, 0.08);
  border-radius: 16px;
  color: var(--text);
  background: #fff;
  text-align: left;
}

.plaza-author-post-card img,
.plaza-author-post-placeholder {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  color: #fff;
  background: linear-gradient(135deg, #ffbd59, #4f8cff);
  font-size: 11px;
  font-weight: 950;
}

.plaza-author-post-card span:last-child {
  min-width: 0;
}

.plaza-author-post-card strong,
.plaza-author-post-card small {
  display: block;
}

.plaza-author-post-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.35;
}

.plaza-author-post-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

body.is-plaza-interaction-open {
  overflow: hidden;
}

.plaza-interaction-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: rgba(12, 8, 7, 0.46);
  backdrop-filter: blur(10px);
}

.plaza-interaction-sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(860px, calc(100vw - 24px));
  max-height: min(92vh, 820px);
  max-height: min(92svh, 820px);
  overflow: hidden;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(22, 13, 9, 0.36);
  transform: translate(-50%, -50%);
}

.plaza-interaction-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(22, 13, 9, 0.12);
  font-size: 20px;
  font-weight: 900;
}

.plaza-close-mobile,
.plaza-interaction-close-label {
  display: none;
}

.plaza-close-desktop {
  line-height: 1;
}

.plaza-interaction-panel {
  display: grid;
  gap: 14px;
  max-height: min(92vh, 820px);
  max-height: min(92svh, 820px);
  overflow-y: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  background: #fff;
}

.plaza-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  min-height: min(72vh, 680px);
  min-height: min(72svh, 680px);
}

.plaza-detail-media-column {
  min-width: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 189, 89, 0.18), transparent 14rem),
    linear-gradient(180deg, #18100d, #2b1d16);
}

.plaza-detail-media-stage {
  position: relative;
  height: 100%;
}

.plaza-detail-media-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  height: 100%;
  min-height: min(72vh, 680px);
  min-height: min(72svh, 680px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.plaza-detail-media-rail:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.84);
  outline-offset: -5px;
}

.plaza-detail-media-rail::-webkit-scrollbar {
  display: none;
}

.plaza-detail-media-item {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  height: 100%;
  min-height: min(72vh, 680px);
  min-height: min(72svh, 680px);
  margin: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  background: #15100f;
}

.plaza-detail-media-item.is-placeholder .plaza-detail-placeholder {
  height: 100%;
  min-height: 100%;
}

.plaza-detail-media-item img,
.plaza-detail-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plaza-detail-media-item figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  pointer-events: none;
}

.plaza-detail-media-item figcaption span {
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 12, 11, 0.52);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 950;
}

.plaza-detail-media-pagination {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 12, 11, 0.56);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 950;
  pointer-events: none;
}

.plaza-detail-media-progress {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 58%;
  transform: translateX(-50%);
}

.plaza-detail-media-progress button {
  position: relative;
  width: 18px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.plaza-detail-media-progress button::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.34);
  content: "";
  transform: translate(-50%, -50%);
  transition: width 180ms ease, border-radius 180ms ease, background 180ms ease;
}

.plaza-detail-media-progress button.is-active::after {
  width: 15px;
  border-radius: 999px;
  background: #fff;
}

.plaza-detail-media-arrow {
  top: 50%;
  width: 40px;
  height: 58px;
  transform: translateY(-50%);
}

.plaza-detail-placeholder {
  display: grid;
  gap: 8px;
  place-content: center;
  justify-items: center;
  width: 100%;
  min-height: min(72vh, 680px);
  min-height: min(72svh, 680px);
  color: #fff;
  background: linear-gradient(135deg, #ffbd59, #4f8cff);
}

.plaza-detail-placeholder.is-adoption {
  background: linear-gradient(135deg, #23b26d, #8bd4a8);
}

.plaza-detail-placeholder.is-event {
  background: linear-gradient(135deg, #ff6b4a, #ffbd59);
}

.plaza-detail-placeholder.is-merchant {
  background: linear-gradient(135deg, #4f8cff, #9dbdff);
}

.plaza-detail-placeholder strong {
  font-size: 54px;
  letter-spacing: 0.08em;
}

.plaza-detail-placeholder span {
  font-weight: 950;
}

.plaza-detail-copy {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 107, 74, 0.08), transparent 12rem),
    #fff;
}

.plaza-detail-author {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding-right: 42px;
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.plaza-detail-avatar {
  width: 42px;
  height: 42px;
  border-radius: 16px;
}

.plaza-detail-author strong,
.plaza-detail-author span {
  display: block;
}

.plaza-detail-author strong {
  color: var(--ink);
  font-size: 14px;
}

.plaza-detail-author span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plaza-detail-meta,
.plaza-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.plaza-detail-meta span:not(.commercial-label):not(.status-pill):not(.sync-pill) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.plaza-detail-copy h3,
.plaza-detail-body,
.plaza-detail-comments-header h4,
.plaza-detail-comments-header p {
  margin: 0;
}

.plaza-detail-copy h3 {
  font-size: 22px;
  line-height: 1.2;
}

.plaza-detail-body {
  color: var(--text);
  line-height: 1.62;
  white-space: pre-wrap;
}

.plaza-detail-action {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(50, 32, 22, 0.08);
  border-radius: 999px;
  color: var(--muted);
  background: #faf7f3;
}

.plaza-detail-action .ui-icon,
.plaza-mobile-action .ui-icon {
  width: 16px;
  height: 16px;
}

.plaza-detail-action span,
.plaza-detail-action strong {
  font-size: 12px;
  font-weight: 950;
}

.plaza-detail-action strong {
  color: var(--text);
}

.plaza-detail-action.is-like.is-active {
  color: #fff;
  background: linear-gradient(135deg, #ff6b8d, #ff6b4a);
}

.plaza-detail-action.is-danger {
  color: var(--danger);
  background: #fff0f2;
}

.plaza-detail-action.is-admin {
  color: #386fca;
  background: #eef5ff;
}

.plaza-detail-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.plaza-detail-comments {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.plaza-detail-comments-header {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(50, 32, 22, 0.08);
}

.plaza-detail-comments-header h4 {
  font-size: 24px;
  line-height: 1;
}

.plaza-detail-comments-header > p {
  max-width: 220px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.plaza-interaction-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding-right: 42px;
}

.plaza-interaction-header h3 {
  margin: 0;
}

.plaza-interaction-header p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.plaza-comment-list {
  display: grid;
  gap: 0;
  overflow: visible;
  border: 1px solid rgba(50, 32, 22, 0.07);
  border-radius: 18px;
  background: rgba(255, 250, 246, 0.72);
}

.plaza-comment-list.is-expanded {
  max-height: min(32vh, 320px);
  max-height: min(32svh, 320px);
  overflow-y: auto;
  padding-right: 3px;
}

.plaza-comment-list.is-preview {
  max-height: none;
}

.plaza-comment-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(50, 32, 22, 0.06);
  background: transparent;
}

.plaza-comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.plaza-comment-avatar-button,
.plaza-comment-author {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.plaza-comment-avatar-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.plaza-comment-author {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.plaza-comment-avatar-button:focus-visible,
.plaza-comment-author:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.plaza-comment-content {
  min-width: 0;
}

.plaza-comment-author-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: baseline;
}

.plaza-comment-author-line > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.plaza-comment-row:last-of-type {
  border-bottom: 0;
}

.plaza-comment-row strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
}

.plaza-author-profile-loading {
  min-height: 260px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.plaza-author-loading-mark,
.chat-pending-state > span {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 107, 74, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: app-boot-spin 760ms linear infinite;
}

.plaza-comment-row p,
.plaza-comment-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.plaza-comment-tools {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.plaza-comment-report {
  border: 0;
  padding: 0;
  color: #9f2f4b;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.plaza-comments-toggle {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-top: 1px solid rgba(50, 32, 22, 0.06);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 950;
}

.plaza-comment-status {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 189, 89, 0.26);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.plaza-comment-status.is-error {
  border-color: rgba(255, 79, 119, 0.28);
  color: #9f2f4b;
  background: rgba(255, 79, 119, 0.08);
}

.plaza-comment-status.is-success {
  border-color: rgba(50, 179, 122, 0.24);
  color: #207849;
  background: rgba(50, 179, 122, 0.1);
}

.plaza-comment-pagination {
  display: grid;
  place-items: center;
  padding: 2px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.plaza-comment-pagination .secondary-button {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
}

.plaza-report-panel {
  border: 0;
  border-radius: 24px;
}

.plaza-report-context {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(239, 77, 90, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.plaza-report-context span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.plaza-report-context strong {
  color: var(--ink);
}

.plaza-report-post-button {
  justify-self: start;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
}

.plaza-comment-form {
  position: sticky;
  bottom: -18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), #fff 30%);
}

.plaza-comment-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.plaza-comment-composer-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.plaza-comment-form textarea {
  width: 100%;
  resize: none;
  min-height: 44px;
  max-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  font: inherit;
}

.plaza-comment-form .primary-button {
  min-height: 44px;
  padding-inline: 14px;
  border-radius: 16px;
}

.plaza-detail-bottom-actions {
  display: none;
}

.plaza-mobile-action {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 5px 8px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}

.plaza-mobile-action strong {
  color: var(--text);
  font-size: 11px;
}

.plaza-mobile-action.is-like.is-active,
.plaza-mobile-action.is-like.is-active strong {
  color: #ff4f72;
}

.plaza-empty-card {
  min-height: 240px;
  display: grid;
  place-items: center;
}

.plaza-empty-state {
  display: grid;
  gap: 10px;
  justify-items: center;
  max-width: 320px;
  margin-inline: auto;
  text-align: center;
}

.plaza-empty-state h3,
.plaza-empty-state p {
  margin: 0;
}

.plaza-empty-state p {
  color: var(--muted);
  line-height: 1.5;
}

.plaza-empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: var(--accent);
  background: #fff0ea;
  font-size: 22px;
  font-weight: 950;
}

@media (max-width: 720px) {
  body.is-chat-overlay-open .matches-layout.is-chat-open .chat-workspace {
    top: var(--app-visual-viewport-top, 0px);
    right: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: var(--app-visual-viewport-height, 100svh);
    max-height: var(--app-visual-viewport-height, 100svh);
    transform: none;
  }

  .chat-detail-topbar {
    grid-template-columns: 34px 44px minmax(0, 1fr) auto;
  }

  .chat-detail-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .chat-detail-avatar-button {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .chat-header-tools {
    grid-column: auto;
    justify-content: flex-end;
    padding-left: 0;
  }

  .matches-layout.is-chat-open .chat-composer {
    grid-template-columns: 44px minmax(0, 1fr) 64px;
    gap: 8px;
    padding: 8px;
  }

  .matches-layout.is-chat-open .chat-preview {
    scroll-padding-bottom: 12px;
  }

  .chat-message-action {
    min-height: 38px;
    padding: 9px 12px;
  }

  .plaza-hub {
    top: calc(68px + env(safe-area-inset-top));
    gap: 6px;
    padding: 9px;
    border-radius: 20px;
  }

  .plaza-hub-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
  }

  .plaza-compose-button {
    min-width: 58px;
    min-height: 36px;
    width: auto;
    padding-inline: 10px;
  }

  .plaza-search-box {
    min-height: 36px;
  }

  .plaza-filter-row .filter-chip,
  .plaza-search-chips .filter-chip {
    min-height: 28px;
    padding: 5px 10px;
  }

  .plaza-search-assist.is-open {
    max-height: 116px;
  }

  .plaza-search-assist.is-slim {
    max-height: 36px;
  }

  .plaza-search-current {
    min-height: 30px;
    padding: 5px 8px;
  }

  .plaza-compose-sheet {
    inset: auto 0 auto 0;
    top: var(--app-visual-viewport-top, 0px);
    width: 100%;
    height: var(--app-visual-viewport-height, 100vh);
    max-height: var(--app-visual-viewport-height, 100vh);
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  .plaza-compose-close {
    top: max(10px, env(safe-area-inset-top));
    right: auto;
    left: max(12px, env(safe-area-inset-left));
    display: inline-flex;
    width: auto;
    min-width: 52px;
    padding-inline: 10px;
    border-radius: 999px;
    font-size: 13px;
  }

  .plaza-compose-close-icon {
    display: none;
  }

  .plaza-compose-close-label {
    display: inline;
  }

  .plaza-interaction-sheet {
    inset: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  .plaza-author-sheet {
    inset: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }

  .plaza-author-close {
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    margin-top: max(10px, env(safe-area-inset-top));
  }

  .plaza-author-profile {
    min-height: 100%;
    padding: 64px 14px max(18px, env(safe-area-inset-bottom));
  }

  .plaza-author-profile-avatar {
    width: 78px;
    height: 78px;
    border-radius: 24px;
  }

  .plaza-author-hero h3 {
    font-size: 22px;
  }

  .plaza-author-post-list {
    grid-template-columns: 1fr;
  }

  .plaza-interaction-panel {
    height: 100%;
    max-height: none;
  }

  .plaza-interaction-close {
    top: max(12px, env(safe-area-inset-top));
    right: auto;
    left: max(12px, env(safe-area-inset-left));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: auto;
    min-width: 64px;
    height: 38px;
    padding: 0 13px 0 10px;
    font-size: 14px;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
  }

  .plaza-interaction-close .plaza-close-desktop {
    display: none;
  }

  .plaza-interaction-close .plaza-close-mobile,
  .plaza-interaction-close .plaza-interaction-close-label {
    display: inline-flex;
  }

  .plaza-interaction-close .plaza-close-mobile {
    font-size: 18px;
    line-height: 1;
  }

  .plaza-detail-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .plaza-detail-media-column,
  .plaza-detail-media-stage {
    min-height: min(38vh, 360px);
    min-height: min(38svh, 360px);
  }

  .plaza-detail-media-rail,
  .plaza-detail-media-item,
  .plaza-detail-placeholder {
    min-height: min(38vh, 360px);
    min-height: min(38svh, 360px);
  }

  .plaza-detail-media-pagination {
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
  }

  .plaza-detail-media-item img,
  .plaza-detail-media-item video {
    aspect-ratio: 4 / 5;
  }

  .plaza-detail-copy {
    position: relative;
    z-index: 1;
    margin-top: -18px;
    padding: 14px 14px 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 28px rgba(22, 13, 9, 0.12);
  }

  .plaza-detail-author {
    padding-right: 0;
  }

  .plaza-detail-copy h3 {
    font-size: 20px;
  }

  .plaza-detail-comments-header {
    align-items: start;
  }

  .plaza-detail-comments-header > p {
    max-width: 170px;
  }

  .plaza-comment-list.is-expanded {
    max-height: min(32vh, 280px);
    max-height: min(32svh, 280px);
  }

  .plaza-comment-list {
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .plaza-comment-row {
    padding: 12px 0;
  }

  .plaza-detail-action.is-like,
  .plaza-detail-action.is-comment,
  .plaza-detail-action.is-share {
    display: none;
  }

  .plaza-comment-form {
    z-index: 4;
    bottom: 0;
    grid-template-columns: minmax(126px, 1fr) auto;
    gap: 4px;
    margin: 4px -14px 0;
    padding: 8px 10px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(50, 32, 22, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 24px rgba(22, 13, 9, 0.08);
    backdrop-filter: blur(18px);
  }

  .plaza-comment-composer {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
  }

  .plaza-comment-composer-avatar {
    display: none;
  }

  .plaza-comment-form textarea {
    min-height: 38px;
    max-height: 72px;
    padding: 9px 11px;
    border: 0;
    border-radius: 999px;
    background: #f6f4f2;
  }

  .plaza-comment-form .primary-button {
    min-height: 38px;
    padding-inline: 10px;
    border-radius: 999px;
  }

  .plaza-detail-bottom-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    align-items: center;
  }

  .plaza-mobile-action {
    min-width: 0;
    padding-inline: 4px;
  }

  .plaza-mobile-action span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .plaza-compose-panel {
    height: 100%;
    max-height: none;
    gap: 10px;
    padding: max(12px, env(safe-area-inset-top)) 12px 0;
    overscroll-behavior: contain;
  }

  .plaza-compose-header {
    min-height: 40px;
    place-content: center;
    padding: 0 68px;
    text-align: center;
  }

  .plaza-compose-header .sheet-handle,
  .plaza-compose-header .eyebrow,
  .plaza-compose-header > p:last-child {
    display: none;
  }

  .plaza-compose-header h3 {
    font-size: 18px;
  }

  .plaza-pet-identity {
    padding: 8px 10px;
    border: 0;
    border-radius: 16px;
  }

  .plaza-pet-identity p,
  .plaza-identity-note {
    display: none;
  }

  .plaza-composer-form {
    gap: 10px;
  }

  .pet-create-form {
    gap: 9px;
  }

  .pet-create-primary-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .pet-create-form textarea {
    min-height: 76px;
  }

  .pet-create-account-summary {
    padding: 9px 11px;
    border: 0;
    border-radius: 15px;
  }

  .pet-create-media-picker {
    gap: 9px;
    padding: 10px;
    border-radius: 17px;
  }

  .pet-create-media-heading p {
    max-width: 280px;
    font-size: 11px;
  }

  .pet-create-media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .pet-create-media-visual,
  .pet-create-media-slot {
    border-radius: 13px;
  }

  .pet-create-media-card-actions button {
    min-height: 30px;
  }

  .pet-create-media-toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pet-create-media-toolbar .product-action {
    padding-inline: 5px;
    font-size: 10px;
  }

  .pet-create-media-note {
    font-size: 11px;
  }

  .pet-create-review-note {
    padding: 9px 11px;
  }

  .plaza-composer-primary-fields {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.42fr);
    gap: 8px;
  }

  .plaza-composer-form textarea {
    min-height: 116px;
  }

  .plaza-composer-media {
    padding: 10px;
    border-radius: 18px;
  }

  .plaza-composer-media-header {
    align-items: center;
  }

  .plaza-composer-media-header p {
    max-width: 180px;
  }

  .plaza-composer-media-actions .product-action {
    min-height: 36px;
    padding: 7px 5px;
    font-size: 11px;
  }

  .plaza-media-draft {
    grid-template-columns: 78px 1fr auto;
    gap: 9px;
    padding: 10px;
  }

  .plaza-media-draft .media-preview {
    width: 78px;
    height: 72px;
  }

  .plaza-media-draft > div:nth-child(2) > p:not(.media-upload-detail):not(.media-upload-error) {
    display: none;
  }

  .plaza-composer-actions {
    position: sticky;
    z-index: 4;
    bottom: 0;
    grid-template-columns: 1fr;
    margin: 2px -12px 0;
    padding: 9px 12px max(9px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(50, 32, 22, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 24px rgba(22, 13, 9, 0.08);
    backdrop-filter: blur(18px);
  }

  .plaza-composer-actions .primary-button {
    min-height: 44px;
    border-radius: 999px;
  }

  .plaza-composer-actions [data-close-plaza-compose] {
    display: none;
  }

  .pet-create-actions [data-close-pet-create] {
    display: none;
  }

  #view-plaza .plaza-feed {
    column-gap: 10px;
    min-height: 68vh;
    max-height: none;
    margin-inline: -2px;
    border-radius: 22px;
  }

  .plaza-feed-card {
    margin-bottom: 10px;
    border-radius: 18px;
  }

  .plaza-feed-media {
    min-height: 132px;
  }

  .plaza-feed-copy {
    padding: 10px;
  }

  .plaza-feed-action {
    min-height: 28px;
    padding: 5px 8px;
  }
}

.merchant-panel {
  background:
    radial-gradient(circle at 100% 0%, rgba(79, 140, 255, 0.16), transparent 12rem),
    #fff;
}

.merchant-hero p {
  color: var(--muted);
  line-height: 1.6;
}

.merchant-step {
  padding: 13px;
}

.merchant-step strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}

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

.merchant-status,
.merchant-settlement {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.merchant-status h4,
.merchant-settlement h4 {
  margin: 0 0 10px;
}

.merchant-status p {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.status-pill {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--blue);
  font-weight: 900;
  background: #eaf2ff;
}

.status-pill.is-approved {
  color: var(--good);
  background: #e8f8ef;
}

.status-pill.is-rejected {
  color: var(--danger);
  background: #fff0f2;
}

.settlement-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
}

.settlement-grid span {
  color: var(--muted);
}

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

.merchant-dashboard-grid div,
.merchant-order-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #faf8f4;
}

.merchant-dashboard-grid span,
.merchant-order-row p {
  color: var(--muted);
}

.merchant-dashboard-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.merchant-order-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.merchant-order-row p {
  margin: 4px 0 0;
}

.lineage-primary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.lineage-primary-bar .lineage-species-tabs {
  width: min(360px, 100%);
  margin: 0;
}

.lineage-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(50, 32, 22, 0.08);
  border-radius: 14px;
  background: #f2ebe5;
}

.lineage-mode-button {
  min-height: 38px;
  padding: 7px 13px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.lineage-mode-button.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 12px rgba(50, 32, 22, 0.09);
}

.lineage-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 107, 74, 0.16);
  border-radius: 20px;
  background: linear-gradient(135deg, #fff7f1, #f6f8ff);
}

.lineage-overview > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.lineage-overview-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #ff9b68);
  box-shadow: 0 8px 18px rgba(255, 107, 74, 0.22);
  font-weight: 950;
}

.lineage-overview strong,
.lineage-overview small {
  display: block;
}

.lineage-overview small,
.lineage-overview p {
  color: var(--muted);
}

.lineage-overview p {
  max-width: 46%;
  margin: 0;
  text-align: right;
}

.lineage-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.lineage-search-shell {
  position: relative;
  z-index: 24;
}

.lineage-search-results {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  max-height: min(390px, 55vh);
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 46px rgba(50, 32, 22, 0.18);
  backdrop-filter: blur(18px);
}

.lineage-search-results[hidden] {
  display: none;
}

.lineage-search-results > p {
  margin: 4px 8px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lineage-search-results button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 9px 10px;
  border: 0;
  border-radius: 13px;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.lineage-search-results button:hover,
.lineage-search-results button:focus-visible {
  background: #fff4ec;
}

.lineage-search-results strong,
.lineage-search-results small {
  display: block;
}

.lineage-search-results small,
.lineage-search-results em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.lineage-search-results em {
  max-width: 220px;
  text-align: right;
}

.plaza-lineage-panel {
  min-height: calc(100svh - 210px);
  padding-top: 2px;
}

.lineage-tool-groups,
.lineage-view-controls {
  display: flex;
  gap: 6px;
}

.lineage-tool-groups {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lineage-view-button {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.zoom-controls {
  display: flex;
  gap: 6px;
}

.tool-button {
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
}

.lineage-context-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.lineage-breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  color: var(--muted);
  scrollbar-width: none;
  white-space: nowrap;
}

.lineage-breadcrumb::-webkit-scrollbar {
  display: none;
}

.lineage-breadcrumb > span {
  font-size: 11px;
  font-weight: 900;
}

.lineage-breadcrumb button {
  padding: 6px 9px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: #f5f0ec;
  font-size: 12px;
  font-weight: 800;
}

.lineage-breadcrumb button[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

.lineage-return-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.lineage-return-button:disabled {
  cursor: default;
  opacity: 0.4;
}

.lineage-note {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.lineage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 4px 0 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.lineage-legend[hidden] {
  display: none;
}

.lineage-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lineage-legend i {
  width: 9px;
  height: 9px;
  border: 2px solid #cfb9aa;
  border-radius: 50%;
  background: #fff;
}

.lineage-legend i.is-current {
  border-color: var(--blue);
  background: var(--blue);
}

.lineage-legend i.is-path {
  border-color: #f2a94a;
  background: #fff2d9;
}

.lineage-legend i.is-child {
  border-color: #57a77a;
  background: #e7f8ed;
}

.lineage-workspace {
  position: relative;
}

.lineage-branch-list {
  display: grid;
  gap: 7px;
  max-height: min(64vh, 760px);
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #faf7f4;
  overscroll-behavior: contain;
}

.lineage-branch-list[hidden] {
  display: none;
}

.lineage-list-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: calc(100% - min(calc(var(--lineage-depth) * 20px), 140px));
  min-height: 64px;
  margin-left: min(calc(var(--lineage-depth) * 20px), 140px);
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 17px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  box-shadow: 0 5px 14px rgba(50, 32, 22, 0.04);
}

.lineage-list-row:hover,
.lineage-list-row:focus-visible {
  border-color: rgba(255, 107, 74, 0.26);
  background: #fffaf6;
}

.lineage-list-row.is-path {
  border-color: rgba(242, 169, 74, 0.35);
  background: #fffaf0;
}

.lineage-list-row.is-selected {
  border-color: rgba(79, 140, 255, 0.45);
  background: #f2f7ff;
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
}

.lineage-list-row > img,
.lineage-list-symbol,
.lineage-list-media {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #ffe0bd, #b8d6ff);
}

.lineage-list-media {
  position: relative;
  display: block;
  overflow: hidden;
}

.lineage-list-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.lineage-list-media.is-collage img:first-child {
  right: auto;
  width: 64%;
}

.lineage-list-media.is-collage img:nth-child(2),
.lineage-list-media.is-collage img:nth-child(3) {
  left: auto;
  width: 38%;
  height: 50%;
  border-left: 1px solid rgba(255, 255, 255, 0.92);
}

.lineage-list-media.is-collage img:nth-child(2) {
  bottom: auto;
}

.lineage-list-media.is-collage img:nth-child(3) {
  top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.92);
}

.lineage-list-symbol {
  position: relative;
}

.lineage-list-symbol::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 12px;
  height: 12px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: var(--accent);
  content: "";
  transform: translate(-50%, -50%);
}

.lineage-list-symbol[data-lineage-type="ancestor"] {
  background: linear-gradient(135deg, #d8c2ae, #8b6f5a);
}

.lineage-list-symbol[data-lineage-type="landrace"] {
  background: linear-gradient(135deg, #b9e8d0, #5da883);
}

.lineage-list-symbol[data-lineage-type="breed_group"] {
  background: linear-gradient(135deg, #c7d8ff, #6c8eea);
}

.lineage-list-copy {
  min-width: 0;
}

.lineage-list-copy strong,
.lineage-list-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineage-list-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.lineage-child-count {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  background: #f4efea;
  font-size: 11px;
  font-weight: 900;
}

.lineage-list-empty {
  margin: 0;
  padding: 34px 16px;
  color: var(--muted);
  text-align: center;
}

.lineage-graph-panel {
  position: relative;
}

.lineage-graph-panel[hidden] {
  display: none;
}

.lineage-canvas-viewport {
  height: 58vh;
  height: 58svh;
  min-height: 470px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(rgba(80, 54, 37, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 54, 37, 0.05) 1px, transparent 1px),
    #fffaf6;
  background-size: 36px 36px;
  cursor: grab;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}

.lineage-canvas-viewport.is-panning {
  cursor: grabbing;
}

.lineage-canvas-stage {
  position: relative;
  width: 1500px;
  height: 1800px;
}

.lineage-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 1500px;
  height: 1800px;
  transform-origin: 0 0;
}

.lineage-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.lineage-link {
  fill: none;
  stroke: #d9bfae;
  stroke-width: 3;
  stroke-linecap: round;
  transition: opacity 160ms ease, stroke 160ms ease, stroke-width 160ms ease;
}

.lineage-link.is-path {
  stroke: #e6a23c;
  stroke-width: 4;
}

.lineage-link.is-child {
  stroke: #57a77a;
  stroke-width: 4;
}

.lineage-link.is-muted {
  opacity: 0.18;
}

.tree-node {
  position: absolute;
  width: 210px;
  height: 86px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(50, 32, 22, 0.1);
  transition: opacity 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tree-node button {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}

.tree-node strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tree-node small {
  margin-top: 4px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-node.is-highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.14);
}

.tree-node.is-selected {
  border-color: var(--blue);
  background: #f5f9ff;
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.16), 0 12px 28px rgba(50, 32, 22, 0.1);
}

.tree-node.is-path {
  border-color: #e6a23c;
  background: #fffaf0;
}

.tree-node.is-child {
  border-color: #57a77a;
  background: #f1fbf5;
}

.tree-node.is-muted {
  opacity: 0.36;
}

.tree-node.is-muted:hover,
.tree-node.is-muted:focus-within {
  opacity: 0.82;
}

.lineage-minimap {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 6;
  width: 180px;
  padding: 7px;
  border: 1px solid rgba(50, 32, 22, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(50, 32, 22, 0.14);
  backdrop-filter: blur(12px);
}

.lineage-minimap-map {
  position: relative;
  height: 104px;
  overflow: hidden;
  border-radius: 10px;
  background:
    linear-gradient(rgba(80, 54, 37, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 54, 37, 0.05) 1px, transparent 1px),
    #fffaf6;
  background-size: 12px 12px;
}

.lineage-minimap-map button {
  position: absolute;
  z-index: 2;
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #b69a88;
  transform: translate(-50%, -50%);
}

.lineage-minimap-map button.is-selected {
  width: 10px;
  height: 10px;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2);
}

.lineage-minimap-viewport {
  position: absolute;
  z-index: 1;
  min-width: 10px;
  min-height: 10px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: rgba(255, 107, 74, 0.08);
  pointer-events: none;
}

.breed-thumb {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffe0bd, #b8d6ff);
  object-fit: cover;
  object-position: center 35%;
}

.lineage-node-media {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffe0bd, #b8d6ff);
}

.lineage-node-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.lineage-node-media.is-collage img:first-child {
  right: auto;
  width: 64%;
}

.lineage-node-media.is-collage img:nth-child(2),
.lineage-node-media.is-collage img:nth-child(3) {
  left: auto;
  width: 38%;
  height: 50%;
  border-left: 1px solid rgba(255, 255, 255, 0.92);
}

.lineage-node-media.is-collage img:nth-child(2) {
  bottom: auto;
}

.lineage-node-media.is-collage img:nth-child(3) {
  top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.92);
}

.lineage-node-symbol[data-lineage-type="ancestor"] {
  background: linear-gradient(135deg, #d8c2ae, #8b6f5a);
}

.lineage-node-symbol[data-lineage-type="landrace"] {
  background: linear-gradient(135deg, #b9e8d0, #5da883);
}

.tree-node small,
.breed-detail small {
  display: block;
  color: var(--muted);
}

.breed-detail img {
  width: 100%;
  border-radius: 20px;
  background: #fff;
}

.breed-photo {
  margin: 0 0 14px;
}

.breed-photo img {
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f2efeb;
}

.breed-photo figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.breed-photo figcaption a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lineage-detail-path {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 12px;
  border-radius: 15px;
  background: #f7f2ee;
}

.lineage-detail-path span,
.lineage-detail-path small {
  color: var(--muted);
  line-height: 1.5;
}

.lineage-link-button {
  margin: 14px 0 18px;
}

.lineage-products {
  display: grid;
  gap: 10px;
}

.lineage-product-card {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffaf6;
}

.lineage-product-card .product-art {
  width: 66px;
  height: 66px;
  border-radius: 18px;
}

.lineage-product-card h4 {
  margin: 0 0 4px;
}

.lineage-product-card p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.lineage-product-card .product-action {
  width: 100%;
  margin-top: 10px;
}

.lineage-product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.lineage-product-actions .product-action {
  margin-top: 10px;
}

.product-action:disabled {
  cursor: default;
  opacity: 0.58;
}

.profile-lineage-state {
  display: grid;
  gap: 12px;
}

.profile-lineage-action {
  width: 100%;
  margin-top: 0;
}

.profile-section-tabs {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid rgba(234, 219, 208, 0.88);
  border-radius: 18px;
  background: rgba(255, 250, 246, 0.9);
  box-shadow: 0 8px 22px rgba(50, 32, 22, 0.07);
  backdrop-filter: blur(16px);
}

.profile-section-tab {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.profile-section-tab.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 14px rgba(50, 32, 22, 0.08);
}

.profile-section-tab:disabled {
  opacity: 0.4;
}

.profile-tab-panel {
  display: grid;
  gap: 14px;
  scroll-margin-top: 68px;
}

.profile-tab-panel[hidden] {
  display: none;
}

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

.profile-completion-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.profile-completion-heading h3,
.profile-completion-card > p {
  margin: 0;
}

.profile-completion-heading strong {
  color: var(--accent);
  font-size: 18px;
}

.profile-completion-card {
  display: grid;
  gap: 11px;
}

.profile-completion-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-completion-missing button {
  appearance: none;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #6f5746;
  background: #f7efe9;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease, transform 140ms ease;
}

.profile-completion-missing button:hover,
.profile-completion-missing button:focus-visible {
  border-color: rgba(255, 107, 78, 0.42);
  color: var(--accent);
  background: #fff7f3;
  outline: none;
  transform: translateY(-1px);
}

.profile-completion-action {
  justify-self: start;
}

.profile-panel-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.profile-panel-heading h3,
.profile-panel-heading p {
  margin: 0;
}

.profile-panel-note {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #f7f1ec;
  font-size: 10px;
  font-weight: 900;
}

.profile-editor,
.profile-media {
  display: grid;
  gap: 12px;
}

.profile-form-grid {
  display: grid;
  gap: 10px;
}

.profile-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.profile-form-grid textarea {
  min-height: 96px;
  resize: vertical;
}

.profile-location-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: stretch;
}

.profile-location-input-row .product-action {
  min-height: 44px;
  padding-inline: 12px;
  white-space: nowrap;
}

.profile-location-field > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.45;
}

.profile-form-grid label.is-profile-guided,
.profile-media-toolbar.is-profile-guided {
  border-radius: 14px;
  animation: profile-guidance-pulse 900ms ease-out 2;
}

@keyframes profile-guidance-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 78, 0.38); }
  45% { box-shadow: 0 0 0 8px rgba(255, 107, 78, 0.12); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 78, 0); }
}

@media (max-width: 480px) {
  .profile-location-input-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 720px) {
  .profile-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-form-grid .profile-form-wide,
  .profile-form-grid > div {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  #languageButton {
    display: inline-grid;
    min-width: 44px;
    padding-inline: 8px;
    font-size: 11px;
  }

  .email-verification-status,
  .experience-location-control {
    grid-template-columns: minmax(0, 1fr);
  }

  .email-verification-banner {
    grid-template-columns: minmax(0, 1fr);
  }

  .email-verification-banner-mark {
    display: none;
  }

  .email-verification-banner-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .email-verification-mark {
    display: none;
  }

  .experience-location-control > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.quick-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-tag-row .filter-chip {
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 900;
}

.profile-media > p,
.profile-media-list > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-media-actions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.profile-media-actions::-webkit-scrollbar {
  display: none;
}

.profile-media-actions .product-action {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 11px;
}

.profile-media-toolbar {
  display: grid;
  gap: 10px;
}

.profile-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  overflow: hidden;
  border-radius: 18px;
  background: #f2ebe6;
}

.profile-gallery-item {
  position: relative;
  overflow: hidden;
  background-size: cover !important;
  background-position: center !important;
}

.profile-gallery-item::before {
  display: block;
  padding-top: 100%;
  content: "";
}

.profile-gallery-select {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.profile-gallery-item.is-selected {
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--accent);
}

.profile-gallery-select:focus-visible {
  z-index: 2;
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.profile-gallery-item > span,
.profile-gallery-item > small,
.profile-gallery-select > span,
.profile-gallery-select > small {
  position: absolute;
  z-index: 1;
  padding: 4px 6px;
  border-radius: 999px;
  color: #fff;
  font-size: 8px;
  font-weight: 950;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
}

.profile-gallery-item > span {
  left: 6px;
  bottom: 6px;
}

.profile-gallery-item > small,
.profile-gallery-count {
  top: 6px;
  right: 6px;
}

.profile-gallery-live {
  top: 6px;
  left: 6px;
}

.profile-gallery-review {
  left: 6px;
  bottom: 36px;
  max-width: calc(100% - 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-gallery-management {
  position: absolute;
  z-index: 4;
  right: 5px;
  bottom: 5px;
  left: 5px;
  display: flex;
  gap: 3px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.profile-gallery-item.is-selected .profile-gallery-management,
.profile-gallery-item:focus-within .profile-gallery-management,
.profile-gallery-item:hover .profile-gallery-management,
.profile-gallery-management.is-confirming {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.profile-gallery-management button,
.profile-gallery-cover-badge {
  display: inline-grid;
  min-width: 25px;
  min-height: 25px;
  place-items: center;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  background: rgba(23, 18, 16, 0.72);
  box-shadow: 0 4px 12px rgba(23, 18, 16, 0.2);
  backdrop-filter: blur(10px);
}

.profile-gallery-management button {
  cursor: pointer;
}

.profile-gallery-management button:hover:not(:disabled),
.profile-gallery-management button:focus-visible {
  background: rgba(255, 91, 110, 0.92);
}

.profile-gallery-management button.is-danger:hover:not(:disabled),
.profile-gallery-management button.is-danger:focus-visible {
  background: #c93043;
}

.profile-gallery-management button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.profile-gallery-cover-badge {
  flex: 1 1 auto;
  justify-content: start;
  color: #fff4d8;
}

.profile-gallery-management.is-confirming {
  inset: 4px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 8px;
  border-radius: 12px;
  color: #fff;
  text-align: center;
  background: rgba(37, 27, 25, 0.88);
  backdrop-filter: blur(12px);
}

.profile-gallery-management.is-confirming strong {
  font-size: 11px;
}

.profile-gallery-management.is-confirming > div {
  display: flex;
  gap: 5px;
}

.profile-gallery-item.is-busy::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  animation: profile-media-saving 900ms linear infinite;
}

@keyframes profile-media-saving {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@media (max-width: 640px) {
  .profile-media-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .profile-media-actions .product-action {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 8px;
    border-radius: 13px;
    line-height: 1.25;
    white-space: normal;
  }

  .profile-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .profile-gallery-management {
    inset: 4px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    align-content: end;
    padding-top: 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, transparent, rgba(23, 18, 16, 0.46));
  }

  .profile-gallery-management button,
  .profile-gallery-cover-badge {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 5px;
    border-radius: 9px;
    font-size: 10px;
  }

  .profile-gallery-management.is-confirming {
    inset: 3px;
    display: grid;
    grid-template-columns: 1fr;
    padding: 7px;
    background: rgba(37, 27, 25, 0.9);
  }

  .profile-gallery-management.is-confirming strong {
    max-width: 100%;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .profile-gallery-management.is-confirming > div {
    width: 100%;
  }

  .profile-gallery-management.is-confirming > div button {
    flex: 1 1 0;
  }

  .profile-gallery-review {
    bottom: 6px;
  }
}

.profile-gallery-item > .live-media-control {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  min-height: 26px;
  padding: 5px 7px;
  font-size: 9px;
}

.profile-upload-queue {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.profile-upload-queue summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.profile-upload-queue .profile-media-list {
  margin-top: 10px;
}

.profile-media-list {
  display: grid;
  gap: 10px;
}

.profile-media-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(79, 140, 255, 0.2);
  border-radius: 18px;
  background: #f5f9ff;
}

.profile-media-card p {
  margin: 4px 0 8px;
  color: var(--muted);
  line-height: 1.45;
}

.profile-memory-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(235, 165, 31, 0.2);
  border-radius: 20px;
  background: #fff9ea;
}

.profile-memory-panel h4 {
  margin: 0;
}

.profile-memory-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.profile-memory-list {
  display: grid;
  gap: 8px;
}

.profile-memory-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
}

.profile-memory-date {
  padding: 5px 8px;
  border-radius: 999px;
  color: #785314;
  font-size: 12px;
  font-weight: 900;
  background: #fff1c6;
}

.profile-wishlist {
  display: grid;
  gap: 10px;
}

.profile-lineage-state > p,
.profile-lineage-card p,
.profile-wishlist > p,
.wishlist-item p {
  color: var(--muted);
  line-height: 1.55;
}

.profile-lineage-card,
.wishlist-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffaf6;
}

.profile-lineage-card img {
  width: 74px;
  height: 74px;
  border-radius: 18px;
  object-fit: cover;
  background: #fff;
}

.profile-lineage-card h4,
.profile-lineage-state h4,
.wishlist-item h4 {
  margin: 0 0 4px;
}

.wishlist-item .product-art {
  width: 74px;
  height: 74px;
  border-radius: 18px;
}

.wishlist-item .product-action {
  width: 100%;
  margin-top: 8px;
}

.pet-profile-card {
  padding: 0;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 18px 42px rgba(50, 32, 22, 0.12);
}

.profile-pet-cover {
  position: relative;
  min-height: 260px;
  padding: 16px;
  overflow: hidden;
  color: #fff;
  background: var(--profile-photo);
  background-size: cover !important;
  background-position: center !important;
  touch-action: pan-y;
}

.profile-pet-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.04) 54%, rgba(0, 0, 0, 0.66));
  pointer-events: none;
}

.profile-pet-cover .discovery-media-progress {
  top: 54px;
}

.profile-pet-cover .discovery-media-navigation {
  inset: 58px 8px 58px;
}

.profile-pet-cover-label,
.profile-pet-cover-copy {
  position: absolute;
  z-index: 1;
}

.profile-pet-cover-label {
  top: 14px;
  left: 14px;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

.profile-pet-live-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-pet-media-count {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(10px);
  font-size: 10px;
  font-weight: 950;
}

.profile-pet-cover-copy {
  left: 18px;
  right: 76px;
  bottom: 16px;
  display: grid;
  gap: 3px;
}

.profile-pet-cover-copy span {
  font-size: 12px;
  font-weight: 800;
}

.profile-pet-cover-copy strong {
  font-size: 32px;
  line-height: 1;
}

.profile-pet-cover > .live-media-control {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.profile-pet-body {
  display: grid;
  gap: 12px;
  padding: 17px;
}

.profile-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.profile-status-stack {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.pet-profile-card .sync-pill {
  background: rgba(255, 255, 255, 0.9);
}

.profile-sync-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-weight: 800;
}

.profile-audit-pill {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  background: rgba(255, 255, 255, 0.24);
}

.profile-audit-pill.pending {
  color: #3c2a12;
  background: #ffe6a8;
}

.profile-audit-pill.draft {
  color: #4f4742;
  background: #eee9e5;
}

.profile-audit-pill.rejected {
  color: #fff;
  background: var(--danger);
}

.profile-audit-pill.approved {
  color: #fff;
  background: var(--good);
}

.profile-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 12px;
}

.profile-editor-actions > button {
  min-height: 44px;
}

.profile-publish-state {
  flex: 1 1 240px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.pet-portrait {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  margin-bottom: 16px;
  border-radius: 34px;
  color: #fff;
  font-size: 48px;
  font-weight: 950;
  background-position: center !important;
  background-size: cover !important;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 34%, #f4c89d 35% 56%, transparent 57%),
    linear-gradient(145deg, #f9e0bc, #d49d74);
}

.progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #f2e3d8;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #ffbd59);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.34);
}

.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 90;
  width: min(100%, 430px);
  max-height: min(84vh, 720px);
  max-height: min(84svh, 720px);
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 28px 28px 0 0;
  background: #fff;
  box-shadow: 0 -20px 56px rgba(50, 32, 22, 0.24);
  transform: translateX(-50%);
}

.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: #e2d1c5;
}

.sheet-header {
  position: sticky;
  top: -10px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 6px 0 10px;
  background: #fff;
}

.sheet-close {
  padding: 9px 12px;
}

.sheet-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option-card.is-selected {
  color: var(--accent);
  border-color: rgba(255, 107, 74, 0.3);
  background: var(--accent-soft);
}

@media (max-width: 720px) {
  .discovery-detail-card {
    inset: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100vh;
    height: 100svh;
    max-height: none;
    overflow: hidden auto;
    border-radius: 0;
    transform: none;
  }

  .discovery-detail-topbar {
    min-height: calc(58px + env(safe-area-inset-top));
    padding-top: max(10px, env(safe-area-inset-top));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
  }

  .discovery-detail-hero {
    min-height: min(54vh, 520px);
    min-height: min(54svh, 520px);
  }

  .discovery-detail-body {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .lineage-controls {
    grid-template-columns: 1fr;
  }

  .lineage-primary-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .lineage-primary-bar .lineage-species-tabs,
  .lineage-mode-switch {
    width: 100%;
  }

  .lineage-mode-button {
    min-height: 44px;
  }

  .lineage-overview {
    align-items: flex-start;
    padding: 12px;
  }

  .lineage-overview p {
    display: none;
  }

  .lineage-overview-mark {
    width: 40px;
    height: 40px;
  }

  .lineage-tool-groups {
    justify-content: space-between;
  }

  .lineage-view-controls,
  .zoom-controls {
    flex: 0 0 auto;
  }

  .lineage-view-button {
    min-width: 0;
    padding-inline: 9px;
  }

  .lineage-context-bar {
    align-items: flex-start;
  }

  .lineage-breadcrumb {
    min-height: 44px;
  }

  .lineage-return-button {
    min-height: 44px;
  }

  .lineage-note {
    padding: 0 2px;
    font-size: 11px;
  }

  .lineage-branch-list {
    max-height: none;
    overflow: visible;
    padding: 6px;
  }

  .lineage-list-row {
    width: calc(100% - min(calc(var(--lineage-depth) * 10px), 50px));
    min-height: 64px;
    margin-left: min(calc(var(--lineage-depth) * 10px), 50px);
  }

  .lineage-list-row img,
  .lineage-list-symbol {
    width: 44px;
    height: 44px;
  }

  .lineage-canvas-viewport {
    height: 65svh;
    min-height: 540px;
    border-radius: 18px;
  }

  .lineage-minimap {
    right: 9px;
    bottom: 9px;
    width: 138px;
    padding: 5px;
  }

  .lineage-minimap-map {
    height: 78px;
  }

  .lineage-search-results {
    position: fixed;
    top: max(86px, calc(env(safe-area-inset-top) + 72px));
    right: 12px;
    left: 12px;
    max-height: min(58svh, 460px);
  }

  .lineage-search-results button {
    min-height: 58px;
  }

  .lineage-search-results em {
    display: none;
  }

  .profile-user-header {
    padding: 15px;
  }

  .profile-user-row {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: start;
  }

  .profile-user-identity h2,
  .profile-user-identity > p:last-child {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .profile-account-shortcut {
    grid-column: 2;
    justify-self: start;
  }

  .profile-user-avatar {
    width: 58px;
    height: 58px;
  }

  .profile-pet-cover {
    min-height: 240px;
  }
}

@media (max-width: 720px) {
  .app-header .icon-button:not(#languageButton) {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
  }

  :where(
    .app-header .icon-button,
    .bottom-tabs .nav-tab,
    .matches-tool-button,
    .plaza-feed-action,
    .plaza-feed-tool,
    .chat-header-call,
    .chat-header-more,
    .chat-settings-icon
  ) .ui-icon,
  .chat-header-call svg,
  .chat-header-more svg {
    width: 20px;
    height: 20px;
  }

  .matches-tool-button,
  .chat-header-call,
  .chat-header-more {
    width: 44px;
    height: 44px;
  }

  .plaza-feed-actions,
  .plaza-feed-tools {
    gap: 4px;
  }

  .plaza-feed-action,
  .plaza-feed-tool {
    min-width: 40px;
    width: auto;
    height: 40px;
    min-height: 40px;
  }

  .plaza-feed-tool {
    width: 40px;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (pointer: coarse) {
  body {
    padding: 0;
  }

  .app-shell {
    width: 100%;
    min-height: 100svh;
    margin: 0;
    box-shadow: none;
  }

  .app-header,
  .app-shell.is-discover .app-header {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    min-height: calc(52px + env(safe-area-inset-top));
    padding: calc(4px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 4px max(12px, env(safe-area-inset-left));
  }

  .app-shell:not(.is-discover) .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-header-copy h1 {
    font-size: 19px;
  }

  .app-header .icon-button:not(#languageButton),
  .matches-tool-button,
  .chat-header-call,
  .chat-header-more {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
  }

  :where(
    .app-header .icon-button,
    .bottom-tabs .nav-tab,
    .matches-tool-button,
    .plaza-feed-action,
    .plaza-feed-tool,
    .chat-header-call,
    .chat-header-more
  ) .ui-icon,
  .chat-header-call svg,
  .chat-header-more svg {
    width: 20px;
    height: 20px;
  }

  .main {
    min-height: calc(100svh - 52px);
    padding: 0 max(12px, env(safe-area-inset-right)) calc(58px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  #view-discover.is-active {
    display: grid;
    grid-template-columns: minmax(118px, 1fr) minmax(260px, 430px) 52px;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 8px 12px;
    height: calc(100svh - 110px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-height: 220px;
  }

  .bottom-tabs {
    width: 100%;
    padding: 4px max(12px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .nav-tab {
    grid-template-rows: 22px;
    min-height: 42px;
    padding: 3px;
  }

  .nav-tab > span:not(.ui-icon) {
    display: none;
  }

  .match-toolbar,
  .other-pet-category-toolbar {
    grid-column: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    align-content: start;
    flex-wrap: wrap;
  }

  .discovery-controls {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin: 0;
    padding: 0;
  }

  .other-pet-category-toolbar {
    grid-row: 3;
    align-self: start;
    max-height: 100%;
    overflow-y: auto;
  }

  .discovery-location-card {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: 1fr;
    align-self: start;
    margin: 0;
    padding: 9px 10px;
  }

  .filter-chip.discovery-more-entry { justify-self: end; }

  .discovery-location-card-actions {
    flex-wrap: wrap;
  }

  .discovery-location-card-actions button {
    flex: 1 1 auto;
  }

  .card-stage {
    grid-column: 2;
    grid-row: 1 / -1;
    width: 100%;
    height: 100%;
    min-height: 220px;
    max-height: none;
    margin: 0;
  }

  .pet-card-content {
    max-height: 76%;
    padding: 14px 16px;
  }

  .pet-card h3 {
    font-size: 29px;
  }

  .pet-bio,
  .gesture-hint {
    display: none;
  }

  .swipe-actions {
    position: static;
    grid-column: 3;
    grid-row: 1 / -1;
    align-self: center;
    z-index: 1;
    grid-template-columns: 52px;
    gap: 8px;
    padding: 0;
    transform: none;
  }

  .round-button.pass,
  .round-button.like,
  .round-button.save {
    width: 52px;
    height: 52px;
  }

  .round-button .ui-icon,
  .round-button.save .ui-icon {
    width: 24px;
    height: 24px;
  }

  .guest-plaza-hero {
    padding: 16px 18px;
  }

  .guest-plaza-hero h2 {
    font-size: 25px;
  }

  .matches-layout.is-chat-open .chat-workspace {
    inset: 0;
    width: 100%;
    padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    transform: none;
  }

  .matches-layout.is-chat-open .chat-detail-card {
    gap: 4px;
    padding: 6px 8px;
  }

  .chat-detail-avatar-button,
  .chat-detail-avatar {
    width: 40px;
    height: 40px;
  }

  .chat-composer {
    margin-top: 6px;
  }

  .auth-gate,
  .pet-create-overlay,
  .plaza-compose-overlay,
  .plaza-interaction-overlay,
  .friend-profile-overlay,
  .chat-action-overlay {
    height: 100svh;
  }

  .auth-gate-card,
  .pet-create-sheet,
  .plaza-compose-sheet,
  .plaza-interaction-sheet,
  .friend-profile-sheet,
  .chat-action-sheet,
  .matches-management-sheet {
    max-height: 100svh;
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  .discovery-media-visual.is-live,
  .profile-pet-cover.is-live,
  .profile-gallery-item.is-live,
  .discovery-detail-hero.is-live {
    animation: none;
  }

  .discovery-media-track,
  .plaza-feed-media-track {
    transition: none;
  }
}

html.app-reduced-motion {
  scroll-behavior: auto;
}

html.app-reduced-motion *,
html.app-reduced-motion *::before,
html.app-reduced-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-delay: 0ms !important;
  transition-duration: 0.01ms !important;
}

html.app-reduced-motion .discovery-media-track,
html.app-reduced-motion .plaza-feed-media-track {
  transition: none !important;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :where(
    .discovery-media-slide,
    .pet-card,
    .discovery-detail-hero,
    .profile-pet-cover,
    .profile-gallery-item,
    .plaza-feed-media-slide,
    .plaza-feed-media-shell,
    .plaza-detail-media-item
  ) .media-playback-control {
    opacity: 0;
    pointer-events: none;
  }

  :where(
    .discovery-media-slide,
    .pet-card,
    .discovery-detail-hero,
    .profile-pet-cover,
    .profile-gallery-item,
    .plaza-feed-media-slide,
    .plaza-feed-media-shell,
    .plaza-detail-media-item
  ).is-media-autoplay-blocked .media-playback-control,
  :where(
    .discovery-media-slide,
    .pet-card,
    .discovery-detail-hero,
    .profile-pet-cover,
    .profile-gallery-item,
    .plaza-feed-media-slide,
    .plaza-feed-media-shell,
    .plaza-detail-media-item
  ).is-media-error .media-playback-control {
    opacity: 1;
    pointer-events: auto;
  }

  .plaza-feed-media-arrow:not(:disabled) {
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .plaza-feed-media-shell:hover .plaza-feed-media-arrow:not(:disabled),
  .plaza-feed-media-shell:focus-within .plaza-feed-media-arrow:not(:disabled) {
    opacity: 1;
    pointer-events: auto;
  }
}

html.app-reduced-motion :where(
  .discovery-media-slide,
  .pet-card,
  .discovery-detail-hero,
  .profile-pet-cover,
  .profile-gallery-item,
  .plaza-feed-media-slide,
  .plaza-feed-media-shell,
  .plaza-detail-media-item
) .media-playback-control {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 900px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100vh - 48px);
    min-height: calc(100svh - 48px);
    border-radius: 38px;
  }

  .bottom-tabs {
    bottom: 24px;
    border-radius: 0 0 38px 38px;
  }

  .bottom-sheet {
    bottom: 24px;
    border-radius: 28px;
  }

  .matches-layout.is-chat-open .chat-workspace {
    top: 24px;
    bottom: 24px;
    width: min(calc(100% - 48px), 1180px);
    padding: 18px 24px;
    border-radius: 38px;
    box-shadow: var(--shadow);
  }

  .matches-layout.is-chat-open .chat-panel {
    width: 100%;
    max-width: 1132px;
    margin: 0 auto;
  }

  .matches-layout.is-chat-open .chat-message-row {
    --chat-bubble-max: min(72%, 560px);
  }

  .plaza-interaction-sheet {
    width: min(1120px, calc(100vw - 64px));
    max-height: min(94vh, 880px);
    max-height: min(94svh, 880px);
  }

  .plaza-interaction-panel {
    max-height: min(94vh, 880px);
    max-height: min(94svh, 880px);
  }

  .plaza-detail-layout,
  .plaza-detail-media-rail {
    min-height: min(78vh, 760px);
    min-height: min(78svh, 760px);
  }

  .friend-profile-sheet {
    width: min(800px, calc(100vw - 64px));
  }

  .chat-action-sheet {
    width: min(660px, calc(100vw - 64px));
  }

  .matches-management-sheet {
    bottom: 24px;
    border-radius: 28px;
  }

  body.is-desktop-shell-session {
    padding-bottom: 48px;
  }

  body.is-desktop-shell-session .app-shell {
    width: min(calc(100% - 48px), 1180px);
    overflow: visible;
  }

  body.is-desktop-shell-session .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 76px;
    padding: 14px 28px;
    border-bottom: 1px solid rgba(234, 219, 208, 0.72);
    border-radius: 38px 38px 0 0;
  }

  body.is-desktop-shell-session .app-shell.is-discover .app-header {
    grid-template-columns: 58px minmax(0, 1fr) auto;
  }

  body.is-desktop-shell-session .app-header-copy h1 {
    font-size: 25px;
    letter-spacing: -0.035em;
  }

  body.is-guest-session .guest-auth-actions {
    gap: 9px;
  }

  body.is-guest-session .guest-auth-button {
    min-height: 42px;
    padding: 0 17px;
    font-size: 12px;
  }

  body.is-desktop-shell-session .main {
    min-height: calc(100vh - 124px);
    min-height: calc(100svh - 124px);
    padding: 18px 24px 64px 210px;
  }

  body.is-desktop-shell-session .network-experience-banner,
  body.is-desktop-shell-session .email-verification-banner {
    margin-right: 24px;
    margin-left: 210px;
  }

  body.is-desktop-shell-session .bottom-tabs {
    top: var(--desktop-shell-rail-top, 118px);
    bottom: auto;
    left: max(40px, calc(50% - 574px));
    grid-template-columns: 1fr;
    gap: 4px;
    width: 166px;
    padding: 8px;
    border: 1px solid rgba(234, 219, 208, 0.82);
    border-radius: 24px;
    box-shadow: 0 18px 46px rgba(50, 32, 22, 0.1);
    transform: none;
  }

  body.is-desktop-shell-session .bottom-tabs .nav-tab {
    grid-template-columns: 22px minmax(0, 1fr);
    grid-template-rows: 1fr;
    column-gap: 12px;
    place-items: center start;
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 16px;
    font-size: 12px;
    text-align: left;
  }

  body.is-desktop-shell-session .bottom-tabs .nav-tab .ui-icon {
    width: 21px;
    height: 21px;
  }

  body.is-desktop-shell-session .bottom-tabs .nav-tab span {
    min-width: 0;
    line-height: 1.15;
    white-space: nowrap;
  }

  body.is-desktop-shell-session .bottom-tabs .nav-tab:hover:not(.is-active) {
    color: var(--ink);
    background: rgba(255, 245, 239, 0.72);
  }

  body.is-guest-session .guest-plaza-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 0;
    padding: 30px 36px;
    border-radius: 30px;
  }

  body.is-guest-session .guest-plaza-hero h2 {
    max-width: 620px;
    font-size: clamp(38px, 4.1vw, 56px);
  }

  body.is-guest-session .guest-plaza-hero p:not(.eyebrow),
  body.is-guest-session .guest-plaza-hero small {
    max-width: 640px;
    font-size: 14px;
  }

  body.is-guest-session .guest-plaza-hero-actions {
    display: block;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 107, 74, 0.14);
  }

  body.is-guest-session .guest-plaza-hero-actions small {
    text-align: left;
  }

  body.is-desktop-shell-session #view-plaza .plaza-feed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 8px;
  }

  body.is-desktop-shell-session .plaza-feed-card {
    margin-bottom: 0;
  }
}

@media (max-width: 720px) {
  .other-pet-onboarding-sheet {
    top: var(--app-visual-viewport-top, 0);
    left: 0;
    width: 100%;
    height: var(--app-visual-viewport-height, 100svh);
    max-height: none;
    padding: max(18px, env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    transform: none;
  }

  .other-pet-category-grid {
    grid-template-columns: 1fr;
  }

  .other-pet-category-option {
    min-height: 72px;
  }

  .other-pet-onboarding-actions {
    position: sticky;
    bottom: calc(-20px - env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: 1fr;
    margin: 0 -16px;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(255, 253, 250, 0), #fffdfa 16%);
  }

  .other-pet-onboarding-actions .primary-button {
    order: -1;
  }

  .other-pet-account-footer {
    align-items: center;
  }
}

body.is-chat-call-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.chat-header-call {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
}

.chat-header-call svg {
  width: 20px;
  height: 20px;
}

.chat-call-chooser {
  background: linear-gradient(145deg, #fff8f4, #eef5ff);
}

.chat-call-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chat-call-choice {
  display: grid;
  gap: 6px;
  justify-items: start;
  min-height: 138px;
  padding: 16px;
  border: 1px solid rgba(79, 140, 255, 0.18);
  border-radius: 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  text-align: left;
  box-shadow: 0 14px 30px rgba(50, 32, 22, 0.08);
}

.chat-call-choice > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #fff;
  background: var(--blue);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.chat-call-choice:nth-child(2) > span {
  background: linear-gradient(135deg, var(--accent), #ff947d);
}

.chat-call-choice strong {
  font-size: 15px;
}

.chat-call-choice small,
.chat-call-permission-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.chat-call-choice:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.chat-call-permission-note {
  margin: 0;
  padding: 0 4px;
}

.chat-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(15, 12, 18, 0.76);
  backdrop-filter: blur(18px);
}

.chat-call-surface {
  position: relative;
  isolation: isolate;
  width: min(100vw, 430px);
  height: var(--app-visual-viewport-height, 100vh);
  height: var(--app-visual-viewport-height, 100svh);
  max-height: 100vh;
  max-height: 100svh;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 50% 30%, rgba(104, 111, 176, 0.54), transparent 34%),
    linear-gradient(165deg, #2e2741 0%, #171420 54%, #0d0b11 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.46);
}

.chat-call-media,
.chat-call-remote-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.chat-call-media {
  z-index: -1;
  overflow: hidden;
}

.chat-call-media::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 7, 11, 0.52), transparent 28%, transparent 58%, rgba(8, 7, 11, 0.72));
}

.chat-call-remote-video {
  border: 0;
  background: #111;
  object-fit: cover;
}

.chat-call-audio-hero {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 84px 24px 180px;
  text-align: center;
  transition: opacity 180ms ease;
}

.chat-call-audio-hero h2,
.chat-call-audio-hero p {
  margin: 0;
}

.chat-call-audio-hero h2 {
  max-width: 300px;
  font-size: clamp(24px, 7vw, 32px);
  line-height: 1.15;
}

.chat-call-audio-hero p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 850;
}

.chat-call-avatar {
  width: 112px;
  height: 112px;
  margin-bottom: 8px;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 38px;
  background: linear-gradient(135deg, #ffb68f, #819fff);
  background-position: center !important;
  background-size: cover !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.chat-call-avatar.is-placeholder {
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.chat-call-surface[data-call-type="video"][data-call-status="connected"] .chat-call-audio-hero {
  opacity: 0;
}

.chat-call-local-video {
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(154px + env(safe-area-inset-bottom));
  z-index: 2;
  width: 104px;
  height: 148px;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 22px;
  background: #211d29;
  object-fit: cover;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  transform: scaleX(-1);
}

.chat-call-topbar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 4;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: calc(68px + env(safe-area-inset-top));
  padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
}

.chat-call-topbar > div {
  display: grid;
  min-width: 0;
}

.chat-call-topbar span,
.chat-call-topbar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-call-topbar span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 850;
}

.chat-call-topbar strong {
  font-size: 14px;
}

.chat-call-topbar button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 900;
}

.chat-call-status {
  position: absolute;
  top: calc(68px + env(safe-area-inset-top));
  right: 16px;
  left: 16px;
  z-index: 3;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  text-align: center;
}

.chat-call-status strong,
.chat-call-status time {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10, 8, 13, 0.34);
  backdrop-filter: blur(12px);
}

.chat-call-status time {
  min-width: 58px;
  font-variant-numeric: tabular-nums;
}

.chat-call-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(132px + env(safe-area-inset-bottom));
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
}

.chat-call-control {
  display: grid;
  gap: 7px;
  justify-items: center;
  width: 68px;
  padding: 0;
  border: 0;
  color: #fff;
  background: transparent;
}

.chat-call-control > span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(18px);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
}

.chat-call-control small {
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.chat-call-control.is-decline > span {
  background: var(--danger);
  font-size: 24px;
}

.chat-call-control.is-accept > span,
.chat-call-control.is-primary > span {
  background: var(--good);
  font-size: 22px;
}

.chat-call-return-pill {
  position: fixed;
  top: max(10px, calc(var(--app-visual-viewport-top, 0px) + env(safe-area-inset-top)));
  left: 50%;
  z-index: 121;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: min(406px, calc(100vw - 24px));
  min-height: 52px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  color: #fff;
  background: rgba(27, 24, 35, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
  text-align: left;
}

.chat-call-return-pill strong {
  color: #8ff0bc;
  font-size: 12px;
}

.chat-call-return-pill span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .chat-call-overlay {
    padding: 24px;
  }

  .chat-call-surface {
    height: calc(100vh - 48px);
    height: calc(100svh - 48px);
    border-radius: 38px;
  }

  .chat-call-return-pill {
    top: 34px;
  }
}

@media (max-width: 390px) {
  .chat-call-controls {
    gap: 10px;
  }

  .chat-call-choice-grid {
    grid-template-columns: 1fr;
  }

  .chat-call-choice {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 92px;
  }

  .chat-call-choice small {
    grid-column: 2;
  }
}

/* Focused chat UI and per-conversation appearance. */
.matches-layout.is-chat-open .chat-workspace {
  --chat-surface-opacity: 0.92;
  --chat-bubble-opacity: 0.96;
  --chat-wallpaper: linear-gradient(180deg, #fffaf7, #f8f2ec);
  background: var(--chat-wallpaper);
  transition: background 180ms ease;
}

.matches-layout.is-chat-open .chat-workspace[data-chat-background="warm"] {
  --chat-wallpaper:
    radial-gradient(circle at 12% 12%, rgba(255, 184, 135, 0.42), transparent 38%),
    linear-gradient(155deg, #fff7ee, #f6e6d8);
}

.matches-layout.is-chat-open .chat-workspace[data-chat-background="sky"] {
  --chat-wallpaper:
    radial-gradient(circle at 84% 8%, rgba(255, 255, 255, 0.86), transparent 28%),
    linear-gradient(155deg, #eaf6ff, #dce9fb);
}

.matches-layout.is-chat-open .chat-workspace[data-chat-background="night"] {
  --chat-wallpaper:
    radial-gradient(circle at 76% 12%, rgba(122, 151, 222, 0.34), transparent 28%),
    linear-gradient(160deg, #273044, #151b2a);
}

.matches-layout.is-chat-open .chat-workspace[data-chat-background="transparent"] {
  --chat-wallpaper: transparent;
}

.matches-layout.is-chat-open .chat-preview {
  gap: 8px;
  padding-right: 2px;
}

.matches-layout.is-chat-open .chat-detail-card {
  gap: 7px;
  padding: 9px 10px;
  border-color: rgb(234 219 208 / 72%);
  border-radius: 18px;
  background: rgb(255 250 247 / var(--chat-surface-opacity));
  box-shadow: 0 8px 22px rgba(50, 32, 22, 0.07);
}

.chat-detail-topbar {
  grid-template-columns: 34px 44px minmax(0, 1fr) auto;
  gap: 8px;
}

.chat-detail-back {
  width: 34px;
  height: 34px;
  border: 0;
  background: rgb(255 255 255 / 72%);
}

.chat-detail-avatar,
.chat-detail-avatar-button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.chat-detail-main h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.chat-detail-subline {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chat-detail-pet-meta,
.chat-detail-subline .chat-pet-context {
  position: relative;
  min-width: 0;
  padding-left: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-detail-pet-meta::before,
.chat-detail-subline .chat-pet-context::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #c2afa4;
  content: "";
  transform: translateY(-50%);
}

.chat-detail-subline .presence-badge {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-detail-subline .presence-badge.is-online {
  color: #16875b;
}

.chat-header-tools {
  flex-wrap: nowrap;
  gap: 5px;
}

.chat-header-call,
.chat-header-more {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: rgb(255 255 255 / 76%);
}

.chat-header-call {
  color: var(--accent);
}

.chat-header-call svg,
.chat-header-more svg {
  width: 19px;
  height: 19px;
}

.chat-header-more svg {
  fill: currentColor;
}

.chat-sync-alert {
  min-width: 0;
  padding: 2px 6px;
  border: 0;
  border-radius: 999px;
  color: var(--accent);
  background: rgb(255 240 234 / 84%);
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-detail-subline .chat-pet-context {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  flex: 0 1 auto;
  color: #8a6f61;
  background: transparent;
}

.chat-sync-alert {
  flex: 0 0 auto;
  color: #8a5a10;
  background: #fff1c6;
}

.matches-layout.is-chat-open .chat-composer {
  background: rgb(255 250 246 / var(--chat-surface-opacity));
}

.matches-layout.is-chat-open .chat-message-row.is-incoming .chat-bubble {
  background: rgb(255 250 246 / var(--chat-bubble-opacity));
  backdrop-filter: blur(10px);
}

.matches-layout.is-chat-open .chat-message-row.is-me .chat-bubble:not(.is-failed) {
  background: rgb(79 140 255 / var(--chat-bubble-opacity));
  backdrop-filter: blur(10px);
}

.chat-settings-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.chat-settings-action {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid rgba(234, 219, 208, 0.72);
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.chat-settings-action:last-child {
  border-bottom: 0;
}

.chat-settings-action > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-settings-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 950;
}

.chat-settings-icon .ui-icon {
  width: 17px;
  height: 17px;
}

.chat-action-grid .product-action {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
}

.chat-action-grid .product-action .ui-icon {
  width: 16px;
  height: 16px;
}

.chat-settings-action .sync-pill {
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-settings-section {
  display: grid;
  gap: 8px;
}

.chat-settings-section .chat-action-grid,
.chat-compose-tool-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chat-danger-zone {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.chat-danger-zone summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.chat-danger-zone .chat-action-grid {
  margin-top: 10px;
}

.chat-background-panel {
  background: linear-gradient(145deg, #fff, #f2f7ff);
}

.chat-background-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.chat-background-preset {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.chat-background-preset.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.chat-background-preset strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-background-swatch {
  display: block;
  aspect-ratio: 4 / 5;
  border: 1px solid rgba(50, 32, 22, 0.1);
  border-radius: 10px;
  background: linear-gradient(155deg, #fffaf7, #f8f2ec);
}

.chat-background-swatch.is-warm {
  background: linear-gradient(155deg, #ffd8bc, #f4e2d3);
}

.chat-background-swatch.is-sky {
  background: linear-gradient(155deg, #eaf6ff, #bfd5f2);
}

.chat-background-swatch.is-night {
  background: linear-gradient(155deg, #56627e, #171d2c);
}

.chat-background-swatch.is-transparent {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #d9d9d9 25%, transparent 25%),
    linear-gradient(-45deg, #d9d9d9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d9d9d9 75%),
    linear-gradient(-45deg, transparent 75%, #d9d9d9 75%);
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
  background-size: 10px 10px;
}

.chat-opacity-control {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.chat-opacity-control > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.chat-opacity-control output {
  color: var(--accent);
}

.chat-opacity-control input {
  width: 100%;
  accent-color: var(--accent);
}
.header-account-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 3px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 107, 74, 0.28);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(50, 32, 22, 0.12);
}

.header-account-button[hidden] {
  display: none;
}

.header-account-button:hover,
.header-account-button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 8px 20px rgba(50, 32, 22, 0.14);
}

.header-account-button > span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: inherit;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(145deg, var(--accent), #f8a06e);
  background-position: center;
  background-size: cover;
}

.header-account-button > span.has-photo {
  color: transparent;
}

.shop-discovery-tools {
  margin-bottom: 14px;
}

.shop-discovery-tools[hidden] {
  display: none;
}

.shop-search-box {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(50, 32, 22, 0.06);
}

.shop-search-box:focus-within {
  border-color: rgba(255, 107, 74, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.shop-search-box svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.shop-search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.shop-search-box button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-soft);
}

.shop-search-box button[hidden] {
  display: none;
}

.shop-category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(54px, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.shop-category-grid::-webkit-scrollbar {
  display: none;
}

.shop-category {
  display: grid;
  gap: 6px;
  min-width: 54px;
  padding: 0;
  place-items: center;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.shop-category > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(50, 32, 22, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(50, 32, 22, 0.07);
}

.shop-category svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.shop-category strong {
  overflow: hidden;
  max-width: 64px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-category.is-active {
  color: var(--accent);
}

.shop-category.is-active > span {
  border-color: rgba(255, 107, 74, 0.32);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(255, 107, 74, 0.08);
}

.shop-results-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.shop-results-heading strong {
  font-size: 17px;
}

.shop-results-heading span {
  color: var(--muted);
  font-size: 12px;
}

.shop-empty-state {
  display: grid;
  gap: 8px;
  min-height: 190px;
  padding: 28px;
  place-items: center;
  align-content: center;
  border: 1px dashed var(--line);
  border-radius: 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.shop-empty-state p {
  color: var(--muted);
}

@media (min-width: 900px) {
  .shop-category-grid {
    grid-template-columns: repeat(6, minmax(72px, 1fr));
  }

  .shop-category > span {
    width: 54px;
    height: 54px;
    border-radius: 18px;
  }
}
/* Account recovery, device sessions, friend search, and profile readiness */
.auth-password-visibility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 68px;
}

.auth-password-control .text-input {
  padding-inline-end: 88px;
}

.auth-password-eye {
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.auth-password-eye svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.auth-login-assistance {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.auth-login-assistance button,
.release-account-id button {
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.auth-login-assistance button:hover,
.release-account-id button:hover {
  text-decoration: underline;
}

.auth-reset-status {
  display: grid;
  gap: 12px;
  padding: 22px;
  margin-top: 24px;
  border: 1px solid #eadfd7;
  border-radius: 20px;
  background: #fffaf6;
}

.auth-reset-status p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-reset-status .small-primary-button {
  justify-self: start;
}

.auth-password-reset-form > .product-action {
  width: 100%;
}

.auth-success {
  padding: 10px 12px;
  border: 1px solid rgba(32, 139, 98, 0.22);
  border-radius: 12px;
  color: #176b4d;
  background: rgba(32, 139, 98, 0.08);
  font-size: 12px;
  font-weight: 750;
}

.release-account-id {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 9px;
  align-items: center;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.release-account-id code {
  padding: 3px 7px;
  border-radius: 8px;
  color: var(--ink);
  background: #f4eee8;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.release-session-management {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.68);
}

.release-session-management div {
  min-width: 0;
}

.release-session-management strong,
.release-session-management p {
  display: block;
  margin: 0;
}

.release-session-management p {
  max-width: 520px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.release-session-management .product-action {
  flex: 0 0 auto;
}

.account-data-controls {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(107, 87, 73, 0.12);
}

.account-data-export {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.account-data-export div {
  min-width: 0;
}

.account-data-export strong,
.account-data-export p {
  display: block;
  margin: 0;
}

.account-data-export p,
.account-deletion-content > p {
  max-width: 620px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.account-data-error {
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

.account-deletion-panel {
  border: 1px solid rgba(239, 77, 90, 0.18);
  border-radius: 16px;
  background: rgba(255, 246, 247, 0.72);
  overflow: hidden;
}

.account-deletion-panel summary {
  padding: 12px 14px;
  color: var(--danger);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.account-deletion-content {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(239, 77, 90, 0.12);
}

.account-deletion-content > strong {
  display: block;
  padding-top: 12px;
  font-size: 13px;
}

.account-deletion-content form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.account-deletion-confirm {
  margin: 0;
}

.account-deletion-content .product-action.danger {
  justify-self: start;
}

.account-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 2px 2px 0;
  font-size: 11px;
  font-weight: 800;
}

.account-legal-links a {
  color: var(--muted);
  text-underline-offset: 2px;
}

.friend-search-results {
  margin-top: 14px;
}

.friend-search-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.friend-search-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.friend-search-avatar {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background-position: center;
  background-size: cover;
}

.friend-search-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.friend-search-copy strong,
.friend-search-copy span,
.friend-search-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-search-copy strong {
  font-size: 13px;
}

.friend-search-copy span,
.friend-search-copy small {
  color: var(--muted);
  font-size: 10px;
}

.friend-search-card .product-action {
  min-width: 68px;
  max-width: 150px;
  white-space: normal;
}

body.is-profile-readiness-open {
  overflow: hidden;
}

.profile-readiness-overlay {
  position: fixed;
  inset: 0;
  z-index: 88;
}

.profile-readiness-backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: rgba(25, 17, 14, 0.48);
  backdrop-filter: blur(8px);
  animation: profile-readiness-fade 160ms ease-out both;
}

.profile-readiness-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(440px, calc(100vw - 28px));
  padding: 23px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: #fffaf6;
  box-shadow: 0 24px 70px rgba(28, 18, 13, 0.3);
  transform: translate(-50%, -50%);
  animation: profile-readiness-card-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.profile-readiness-heading {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.profile-readiness-heading h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.12;
}

.profile-readiness-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 8px 20px rgba(41, 28, 22, 0.13);
}

.profile-readiness-copy {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.profile-readiness-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.profile-readiness-status span {
  padding: 7px 9px;
  border: 1px solid #eadfd7;
  border-radius: 999px;
  color: #654d43;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}

.profile-readiness-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

@keyframes profile-readiness-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes profile-readiness-card-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(0.97); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 640px) {
  .release-session-management {
    align-items: stretch;
    flex-direction: column;
  }

  .release-session-management .product-action {
    width: 100%;
  }

  .account-data-export {
    align-items: stretch;
    flex-direction: column;
  }

  .account-data-export .product-action,
  .account-deletion-content .product-action.danger {
    width: 100%;
  }

  .friend-search-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .friend-search-avatar {
    width: 44px;
    height: 44px;
  }

  .friend-search-card .product-action {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .profile-readiness-card {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto;
    padding: 21px 18px;
    border-radius: 28px;
    transform: none;
    animation-name: profile-readiness-sheet-in;
  }

  .profile-readiness-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .profile-readiness-actions > button {
    min-height: 44px;
  }
}

@keyframes profile-readiness-sheet-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .profile-readiness-backdrop,
  .profile-readiness-card {
    animation: none;
  }
}

.header-contact-button {
  min-width: 44px !important;
  width: 44px;
  padding: 0 !important;
  border-radius: 50%;
  font-size: 18px;
}

.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 22px;
}

.contact-overlay[hidden] {
  display: none;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(31, 25, 23, 0.52);
  backdrop-filter: blur(8px);
}

.contact-sheet {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(820px, calc(var(--app-visual-viewport-height, 100vh) - 44px));
  padding: 28px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 30px;
  background: #fffaf5;
  box-shadow: 0 34px 100px rgba(31, 25, 23, 0.3);
}

.contact-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.contact-header > div {
  min-width: 0;
}

.contact-header h2,
.contact-success h2 {
  margin-top: 4px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.05;
}

.contact-header p:last-child,
.contact-success > p:not(.eyebrow) {
  max-width: 590px;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.contact-close {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  background: #fff;
}

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

.contact-type-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.contact-type-card:hover,
.contact-type-card:focus-visible {
  border-color: rgba(255, 107, 74, 0.48);
  box-shadow: 0 16px 34px rgba(255, 107, 74, 0.12);
  transform: translateY(-2px);
}

.contact-type-card > span,
.contact-success-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  font-size: 14px;
  font-style: normal;
  font-weight: 950;
  background: linear-gradient(145deg, var(--accent), #ff9b6a);
}

.contact-type-card strong {
  align-self: end;
  font-size: 17px;
}

.contact-type-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.contact-back-button {
  padding: 0;
  margin-top: 18px;
  border: 0;
  color: var(--accent);
  font-weight: 900;
  background: transparent;
}

.contact-form {
  display: grid;
  gap: 15px;
  margin-top: 18px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  background: #fff;
}

.contact-form input {
  min-height: 48px;
  padding: 0 14px;
}

.contact-form textarea {
  min-height: 150px;
  padding: 13px 14px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(255, 107, 74, 0.14);
}

.contact-diagnostics {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  color: #67534c;
  font-size: 12px;
  line-height: 1.5;
  background: #fff0e8;
}

.contact-diagnostics span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-weight: 950;
  background: var(--accent);
}

.contact-error {
  padding: 11px 13px;
  border-radius: 14px;
  color: #9d2e26;
  font-size: 13px;
  font-weight: 800;
  background: #fff0ee;
}

.contact-success {
  display: grid;
  justify-items: start;
  padding: 16px 6px 6px;
  text-align: left;
}

.contact-success .eyebrow {
  margin-top: 20px;
}

.contact-success code {
  padding: 10px 13px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  background: #fff;
}

body.is-contact-open {
  overflow: hidden;
}

.account-contact-card .profile-preference-row {
  align-items: center;
}

.profile-preference-mark.is-contact {
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #ff9b6a);
}

@media (max-width: 640px) {
  .contact-overlay {
    place-items: end stretch;
    padding: 0;
  }

  .contact-sheet {
    width: 100%;
    max-height: calc(var(--app-visual-viewport-height, 100vh) - 10px);
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
    border-radius: 28px 28px 0 0;
  }

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

  .contact-type-card {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 0;
  }

  .contact-type-card strong,
  .contact-type-card small {
    grid-column: 2;
  }

  .contact-type-card strong {
    align-self: end;
  }

  .contact-type-card > span {
    grid-row: 1 / span 2;
  }

  .account-contact-card .profile-preference-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .account-contact-card .product-action {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-type-card {
    transition: none;
  }
}

@media (max-width: 720px) {
  @supports (content-visibility: auto) {
    #shopGrid > .product-card:nth-child(n + 5) {
      content-visibility: auto;
      contain-intrinsic-block-size: auto 360px;
    }
  }
}

/* Dialog layout: centered work surfaces on larger screens, bottom sheets on phones. */
@media (min-width: 721px) {
  .friend-profile-sheet,
  .chat-action-sheet,
  .matches-management-sheet,
  .bottom-sheet {
    top: 50%;
    bottom: auto;
    max-height: min(820px, calc(100svh - 64px));
    border-radius: 30px;
    box-shadow: 0 28px 80px rgba(22, 13, 9, 0.3);
    transform: translate(-50%, -50%);
  }

  .friend-profile-sheet {
    width: min(800px, calc(100vw - 64px));
    padding: 16px;
  }

  .chat-action-sheet,
  .matches-management-sheet,
  .bottom-sheet {
    width: min(600px, calc(100vw - 64px));
  }

  .chat-action-sheet {
    max-height: min(720px, calc(100svh - 64px));
    padding: 16px;
  }

  .matches-management-sheet,
  .bottom-sheet {
    padding: 14px 20px 22px;
  }

  .plaza-compose-sheet {
    top: 50%;
    bottom: auto;
    max-height: min(880px, calc(100svh - 64px));
    transform: translate(-50%, -50%);
  }
}

@media (min-width: 900px) {
  .plaza-composer.plaza-compose-sheet {
    width: min(1080px, calc(100vw - 64px));
    max-height: min(900px, calc(100svh - 64px));
  }

  .pet-create-sheet {
    width: min(980px, calc(100vw - 64px));
    max-height: min(900px, calc(100svh - 64px));
  }
}

@media (max-width: 720px) {
  .friend-profile-sheet,
  .chat-action-sheet,
  .matches-management-sheet,
  .bottom-sheet {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: 28px 28px 0 0;
    transform: none;
  }

  .friend-profile-sheet {
    max-height: calc(var(--app-visual-viewport-height, 100svh) - 8px);
    padding: 12px 12px calc(14px + env(safe-area-inset-bottom));
  }

  .chat-action-sheet,
  .matches-management-sheet,
  .bottom-sheet {
    max-height: min(78svh, calc(var(--app-visual-viewport-height, 100svh) - 8px));
    padding: 12px 16px calc(18px + env(safe-area-inset-bottom));
  }
}

/* Keep the fixed chat shell authoritative over earlier responsive layers. */
.matches-layout.is-chat-open .chat-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.matches-layout.is-chat-open .chat-shell-content .chat-detail-card {
  position: static;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.matches-layout.is-chat-open .chat-shell-content .chat-detail-topbar {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

@media (max-width: 720px) {
  .matches-layout.is-chat-open .chat-workspace {
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
  }

  .matches-layout.is-chat-open .chat-shell-content .chat-detail-topbar {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .matches-layout.is-chat-open .chat-detail-pet-meta {
    display: none;
  }
}

@media (max-width: 390px) {
  .matches-layout.is-chat-open .chat-detail-subline .chat-pet-context {
    display: none;
  }
}
