:root {
  --ink: #1c2526;
  --muted: #667375;
  --line: #d9e1df;
  --panel: #ffffff;
  --bg: #f4f7f6;
  --field: #ffffff;
  --button-bg: #f7faf9;
  --button-bg-hover: #f0f4f3;
  --topbar: rgba(255, 255, 255, .94);
  --graph-bg: #fbfdfc;
  --tooltip-bg: #102426;
  --accent: #006d77;
  --accent-2: #c8553d;
  --danger: #b42318;
  --warn: #a15c00;
}

body[data-theme="dark"] {
  --ink: #edf4f2;
  --muted: #c4d1cf;
  --line: #4a615d;
  --panel: #172724;
  --bg: #071211;
  --field: #0b1917;
  --button-bg: #0f1f1c;
  --button-bg-hover: #142824;
  --topbar: rgba(18, 28, 26, .94);
  --graph-bg: #101a18;
  --tooltip-bg: #edf4f2;
  --accent: #5ec2c9;
  --accent-2: #f0a48f;
  --danger: #ffb4ab;
  --warn: #ffd28a;
}

body[data-design="modern"] {
  --ink: #263a31;
  --muted: #637267;
  --line: #d8d3c8;
  --panel: #fffdf8;
  --bg: #f6f2ea;
  --field: #fffaf2;
  --button-bg: rgba(255, 255, 255, .72);
  --button-bg-hover: #f0eadf;
  --topbar: rgba(246, 242, 234, .90);
  --graph-bg: #fffdf8;
  --tooltip-bg: #263a31;
  --accent: #455b49;
  --accent-2: #9b7357;
  --danger: #9f2f24;
  --warn: #8a5a00;
}

body[data-theme="dark"][data-design="modern"] {
  --ink: #edf4f2;
  --muted: #b9c8bf;
  --line: #33443b;
  --panel: #15231f;
  --bg: #081311;
  --field: #0f1b18;
  --button-bg: #1c2c26;
  --button-bg-hover: #26382f;
  --topbar: rgba(14, 25, 22, .92);
  --graph-bg: #101c18;
  --tooltip-bg: #edf4f2;
  --accent: #7fb397;
  --accent-2: #d3a17e;
  --danger: #ffb4ab;
  --warn: #ffd28a;
}

body[data-design="modern"] .topbar {
  min-height: 76px;
  box-shadow: 0 12px 34px rgba(33, 47, 39, .08);
}

body[data-design="modern"] .brand {
  color: var(--ink);
}

body[data-design="modern"] .mark {
  border-radius: 11px;
  background: var(--accent);
}

body[data-design="modern"] .panel,
body[data-design="modern"] .hero-band,
body[data-design="modern"] .stat-card,
body[data-design="modern"] .public-photo-card,
body[data-design="modern"] .gallery-litter-card,
body[data-design="modern"] .gallery-puppy-card {
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(33, 47, 39, .10);
}

body[data-theme="dark"][data-design="modern"] .panel,
body[data-theme="dark"][data-design="modern"] .hero-band,
body[data-theme="dark"][data-design="modern"] .stat-card,
body[data-theme="dark"][data-design="modern"] .public-photo-card,
body[data-theme="dark"][data-design="modern"] .gallery-litter-card,
body[data-theme="dark"][data-design="modern"] .gallery-puppy-card {
  box-shadow: 0 18px 45px rgba(0, 0, 0, .32);
}

body[data-design="modern"] .page-title h1,
body[data-design="modern"] .hero-band h1 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

body[data-design="modern"] .nav-link,
body[data-design="modern"] .button,
body[data-design="modern"] button {
  border-radius: var(--managed-button-radius, 999px);
}

body[data-design="modern"] input,
body[data-design="modern"] select,
body[data-design="modern"] textarea {
  border-radius: 12px;
}

body.website,
.website-preview-shell {
  --site-ink: #263a31;
  --site-muted: #637267;
  --site-sage: #455b49;
  --site-sage-2: #6d7d69;
  --site-cream: #f6f2ea;
  --site-stone: #e8e3d9;
  --site-white: #ffffff;
  --site-shadow: 0 18px 45px rgba(33, 47, 39, .14);
  --site-radius: 18px;
  --website-hero-start: #fbfaf6;
  --website-hero-end: #d7cfbd;
  --website-button-bg: #455b49;
  --website-button-text: #ffffff;
  --advert-card-bg: #ffffff;
  --advert-card-border: #d8d3c8;
  --advert-badge-bg: #455b49;
  --advert-badge-text: #ffffff;
  color: var(--site-ink);
  background: var(--site-cream);
}
body.website[data-theme="dark"] {
  --site-ink: #edf4f2;
  --site-muted: #b9c8bf;
  --site-sage: #7fb397;
  --site-sage-2: #5f8772;
  --site-cream: #081311;
  --site-stone: #33443b;
  --site-white: #15231f;
  --site-shadow: 0 18px 45px rgba(0, 0, 0, .34);
}
.website-header {
  min-height: 82px;
  padding: 0 clamp(18px, 6vw, 86px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: color-mix(in srgb, var(--site-cream) 88%, transparent);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(38, 58, 49, .12);
}
.website-brand {
  font-size: 1.35rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--site-ink);
  text-decoration: none;
}
.website-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
  background: var(--site-sage);
  color: #fff;
  font-size: .8rem;
}
.website-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  font-weight: 800;
}
.website-nav a {
  color: var(--site-ink);
  text-decoration: none;
}
.website-nav a:hover { color: var(--site-sage); text-decoration: none; }
.website-hero {
  min-height: 630px;
  padding: clamp(54px, 7vw, 100px) clamp(24px, 8vw, 118px);
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(320px, 430px);
  align-items: center;
  justify-content: center;
  gap: clamp(34px, 6vw, 96px);
  background:
    radial-gradient(circle at 78% 45%, rgba(165, 145, 112, .25), transparent 30%),
    linear-gradient(105deg, var(--website-hero-start, #fbfaf6) 0%, color-mix(in srgb, var(--website-hero-start, #fbfaf6) 45%, var(--website-hero-end, #d7cfbd) 55%) 52%, var(--website-hero-end, #d7cfbd) 100%);
  overflow: hidden;
}
body.website[data-theme="dark"] .website-hero {
  background:
    radial-gradient(circle at 78% 45%, rgba(127, 179, 151, .16), transparent 30%),
    linear-gradient(105deg, #0b1512 0%, #17251f 58%, #25352d 100%);
}
.website-hero-copy { max-width: 710px; }
.website-eyebrow {
  margin: 0 0 .8rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 900;
  color: var(--site-sage);
  font-size: .78rem;
}
.website h1,
.website h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}
.website h1 {
  font-size: calc(clamp(2.55rem, 5.1vw, 4.65rem) * var(--content-text-scale, 1));
  line-height: .98;
  margin: .15em 0;
}
.website h2 {
  font-size: calc(clamp(1.65rem, 2.55vw, 2.55rem) * var(--content-text-scale, 1));
  line-height: 1.04;
  margin: .2em 0;
}
.website-hero-copy p {
  font-size: calc(1.05rem * var(--content-text-scale, 1));
  line-height: 1.65;
  max-width: 650px;
}
.website-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.website-btn {
  border: 1px solid var(--site-sage);
  padding: .9rem 1.45rem;
  border-radius: var(--managed-button-radius, 999px);
  text-decoration: none;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--site-ink);
}
.website-primary { background: var(--website-button-bg, var(--site-sage)); color: var(--website-button-text, #fff); border-color: var(--website-button-bg, var(--site-sage)); }
.website-ghost { background: color-mix(in srgb, var(--site-white) 72%, transparent); }
.website-full { width: 100%; }
.website-hero-card {
  justify-self: center;
  width: min(430px, 100%);
  min-height: 430px;
  padding: 2rem;
  display: grid;
  place-items: center;
  text-align: center;
  background: color-mix(in srgb, var(--site-white) 76%, transparent);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 28px;
  box-shadow: var(--site-shadow);
}
.website-hero-card img {
  width: min(300px, 82%);
  aspect-ratio: 1;
  object-fit: contain;
}
.website-hero-card strong {
  display: block;
  margin-top: 1rem;
  font-size: 1.45rem;
}
.website-hero-card span { color: var(--site-muted); }
.website-features {
  background: var(--site-white);
  padding: 3rem clamp(22px, 6vw, 86px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid rgba(38, 58, 49, .10);
  border-bottom: 1px solid rgba(38, 58, 49, .10);
}
.website-features article {
  text-align: center;
  padding: 1rem 1.5rem;
  border-right: 1px solid var(--site-stone);
}
.website-features article:last-child { border-right: 0; }
.website-features span {
  display: inline-flex;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--site-sage) 12%, transparent);
  color: var(--site-sage);
  font-size: .78rem;
  font-weight: 900;
}
.website-features h3 { margin: .75rem 0 .35rem; }
.website-features p {
  margin: 0;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--site-muted);
}
.website-split {
  padding: 4rem clamp(24px, 8vw, 118px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(28px, 6vw, 82px);
  align-items: center;
  background: linear-gradient(90deg, #d7dbc9, #edf0e6);
}
body.website[data-theme="dark"] .website-split {
  background: linear-gradient(90deg, #13211d, #1e3028);
}
.website-featured-brand,
.website-featured-litter-band {
  padding: 3.5rem clamp(24px, 8vw, 118px);
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  background: var(--site-white);
  border-top: 1px solid rgba(38, 58, 49, .08);
}
.website-featured-brand-media,
.website-featured-litter-media {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--site-shadow);
  background: var(--site-stone);
}
.website-featured-brand-media img,
.website-featured-litter-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.website-featured-brand-copy p,
.website-featured-litter-copy p {
  color: var(--site-muted);
  line-height: 1.65;
}
.website-featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.2rem;
  margin: 1.2rem 0 1.6rem;
  color: var(--site-muted);
}
.website-featured-meta strong {
  color: var(--site-ink);
  margin-right: .35rem;
}
.website-featured-litter-band {
  background: linear-gradient(105deg, color-mix(in srgb, var(--site-white) 88%, var(--site-cream) 12%) 0%, var(--site-white) 100%);
}
.website-preview-brand {
  padding: 24px;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 18px;
}
.website-split p { color: var(--site-muted); line-height: 1.65; font-size: 1.08rem; }
.website-checks {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}
.website-checks li {
  margin: .9rem 0;
  font-weight: 800;
}
.website-checks li:before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: .7rem;
  border-radius: 50%;
  background: var(--site-white);
  color: var(--site-sage);
}
.website-login-card {
  background: color-mix(in srgb, var(--site-white) 88%, transparent);
  box-shadow: var(--site-shadow);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--site-radius);
  padding: 2rem;
}
.website-login-card p { text-align: center; }
.website-login-card h2 { text-align: center; }
.website-login-card .website-btn + .website-btn { margin-top: .8rem; }
.website-litters {
  padding: 4rem clamp(22px, 7vw, 100px) 5rem;
  background: #fbfaf6;
}
body.website[data-theme="dark"] .website-litters { background: #0b1512; }
.website-center { text-align: center; }
.website-litters h2,
.website-section-intro { text-align: center; }
.website-section-intro {
  color: var(--site-muted);
  font-size: 1.1rem;
}
.website-litter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.website-litter-card {
  position: relative;
  background: var(--site-white);
  border-radius: var(--site-radius);
  overflow: hidden;
  box-shadow: var(--site-shadow);
  border: 1px solid rgba(38, 58, 49, .10);
}
.marketplace-card {
  background: var(--advert-card-bg, var(--site-white));
  border-color: var(--advert-card-border, rgba(38, 58, 49, .10));
}
.website-litter-card a { color: inherit; text-decoration: none; }
.website-litter-img,
.website-litter-card .public-placeholder {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--site-stone);
}
.website-litter-card .public-placeholder {
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 900;
}
.website-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--site-sage);
  color: #fff;
  border-radius: 999px;
  padding: .35rem .75rem;
  font-weight: 900;
  font-size: .78rem;
}
.marketplace-card .website-badge {
  background: var(--advert-badge-bg, var(--site-sage));
  color: var(--advert-badge-text, #fff);
}
.website-card-body { padding: 1.35rem; }
.website-card-body h3 {
  font-size: 1.35rem;
  margin: .15rem 0 .35rem;
}
.website-card-body p {
  margin: .4rem 0;
  color: var(--site-muted);
}
.website-breed {
  color: var(--site-sage) !important;
  font-weight: 900;
}
.website-card-body .website-btn { margin-top: 1rem; }
.website-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--site-muted);
  background: var(--site-white);
  border: 1px solid var(--site-stone);
  border-radius: var(--site-radius);
  padding: 2rem;
}
.website-footer {
  background: var(--site-sage);
  color: #fff;
  padding: 3rem clamp(22px, 7vw, 100px);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.website-footer p { margin: .45rem 0 0; color: rgba(255,255,255,.82); }
.website-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
}
.website-footer-links a {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.website-footer-links a:hover { text-decoration: underline; }
@media (max-width: 980px) {
  .website-hero,
  .website-split,
  .website-featured-brand,
  .website-featured-litter-band { grid-template-columns: 1fr; }
  .website-features,
  .website-litter-grid { grid-template-columns: 1fr; }
  .website-features article {
    border-right: 0;
    border-bottom: 1px solid var(--site-stone);
  }
  .website-features article:last-child { border-bottom: 0; }
}
@media (max-width: 720px) {
  .website-header { align-items: flex-start; flex-direction: column; padding-block: 14px; }
  .website-nav { justify-content: flex-start; }
  .website-nav a[href="#about"],
  .website-nav a[href="#features"] { display: none; }
  .website-hero { min-height: auto; }
  .website-hero-card { min-height: 300px; }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.link-button { border: 0; background: transparent; color: var(--accent); padding: 0; min-height: 0; font: inherit; font-weight: 800; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.ip-action { color: var(--accent); }
.ip-context-menu {
  position: absolute;
  z-index: 40;
  display: grid;
  gap: 4px;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
}
.ip-context-menu[hidden] { display: none; }
.ip-context-menu form { margin: 0; }
.ip-context-menu button { width: 100%; justify-content: flex-start; min-height: 34px; }
.note-context-menu { min-width: 280px; }
.editable-note { cursor: context-menu; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(14px, 3vw, 34px);
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.view-as-banner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: #fff3cd;
  color: #5f4700;
  border-bottom: 1px solid #e7cf77;
}
.view-as-banner form { margin: 0; }
body[data-theme="dark"] .view-as-banner {
  background: #3a300f;
  color: #ffe39a;
  border-bottom-color: #6f5b1c;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); }
.mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  letter-spacing: 0;
}
nav { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.nav-link, .button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--button-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}
.nav-link svg { fill: currentColor; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: var(--button-bg);
}
.badge.danger {
  border-color: #f4a7a0;
  color: var(--danger);
  background: #fff4f2;
}
.badge.verified {
  border-color: #7fb5ff;
  color: #155ec2;
  background: #edf5ff;
}
.ip-map {
  width: 100%;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
}
.ip-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ip-copy {
  min-width: 34px;
  min-height: 34px;
}
.ip-copy.copied {
  color: var(--accent);
  border-color: var(--accent);
}
.key-value th {
  width: 220px;
  text-align: left;
  color: var(--muted);
}
/* Slightly tinted buttons so they stand off the page in both themes */
.nav-link:not(.active):hover,
.button:not(.primary):hover,
button:not(.primary):hover {
  background: var(--button-bg-hover);
}
.theme-switch {
  gap: 8px;
  background: transparent;
  color: var(--accent);
  border-color: var(--line);
  padding: 6px 10px;
}
.switch-track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: var(--line);
  transition: background .18s ease;
}
.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform .18s ease;
}
.theme-switch[aria-pressed="true"] .switch-track { background: var(--accent); }
.theme-switch[aria-pressed="true"] .switch-thumb { transform: translateX(20px); }
.switch-label { min-width: 34px; font-weight: 800; }
.nav-link.active, .primary, button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.danger { color: var(--danger); border-color: #f2b8b5; }
.slim { min-height: 30px; padding: 5px 8px; font-size: 13px; }

.page { width: min(1180px, calc(100% - 28px)); margin: 24px auto 48px; }
.hero-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(18px, 4vw, 34px);
  border-radius: 8px;
  background: #fdfefe;
  border: 1px solid var(--line);
}
body[data-theme="dark"] .hero-band {
  background: #14201e;
}
.hero-band h1, .page-title h1 { margin: 0; font-size: calc(clamp(24px, 3.2vw, 36px) * var(--content-text-scale, 1)); line-height: 1.08; letter-spacing: 0; }
.eyebrow { margin: 0 0 8px; color: var(--accent-2); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.hero-band > .button,
.page-title > .button,
.page-title .button-row .button,
.page-title .button-row button { flex: 0 0 auto; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.stats a, .stats div, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.stats a { color: var(--ink); display: block; }
.stats a:hover { border-color: var(--accent); text-decoration: none; }
.stats div { color: var(--ink); }
.stats strong { display: block; font-size: 32px; color: var(--accent); }
.stats span, .muted { color: var(--muted); }
.grid { display: grid; gap: 16px; margin: 16px 0; }
.grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.panel h2 { margin: 0 0 14px; font-size: 20px; }
.panel > h2 { margin-bottom: 14px; }
.panel-toggle {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  position: relative;
}
.panel-toggle::before {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .16s ease;
}
.panel.is-collapsed .panel-toggle::before {
  transform: translateX(-2px) rotate(-45deg);
}
.panel.is-collapsed { max-height: none; overflow: visible; }
.panel.is-collapsed .panel-body { display: none; }
.panel-body {
  display: grid;
  gap: 12px;
  max-height: 760px;
  overflow: auto;
  min-width: 0;
}
.panel.detail .panel-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-heading h2 { margin: 0; }
.mother-graph { margin-bottom: 16px; }
.puppy-graph { margin-bottom: 16px; }
.stack { display: grid; gap: 12px; align-content: start; }
.inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; align-items: end; margin: 0 0 14px; }
.admin-inline { grid-template-columns: minmax(150px, 1fr) auto; margin: 0; min-width: 260px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.compact-form { margin-bottom: 16px; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.admin-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.design-preview-card {
  display: grid;
  gap: 14px;
  align-content: start;
}
.design-preview-note { margin: 0; }
.design-preview-system {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.design-preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--topbar);
}
.design-preview-fields { display: grid; gap: 10px; }
.website-preview-shell {
  border: 1px solid var(--site-stone);
  border-radius: var(--site-radius);
  overflow: hidden;
}
.website-preview-hero {
  min-height: auto;
  padding: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 24px;
}
.website-preview-hero.compact h1 {
  font-size: calc(clamp(2rem, 3.2vw, 3rem) * var(--content-text-scale, 1));
}
.preview-marketplace-card {
  max-width: 420px;
}
.puppy-title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
label { display: grid; gap: 6px; font-weight: 700; color: #354244; }
body[data-theme="dark"] label { color: #dce8e5; }
.slim-check { display: inline-flex; min-height: 30px; gap: 5px; font-size: 13px; }
input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--managed-field-border, #cbd7d5);
  border-radius: 6px;
  background: var(--managed-field-bg, var(--field));
  color: var(--ink);
  font: inherit;
}
select { border-color: var(--managed-dropdown-border, var(--managed-field-border, #cbd7d5)); }
input::placeholder, textarea::placeholder { color: #758482; opacity: 1; }
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  border-color: #b8cac6;
  color: #f4faf8;
  background: #071211;
}
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: #aebebb;
}
body[data-theme="dark"] th,
body[data-theme="dark"] .empty,
body[data-theme="dark"] .muted,
body[data-theme="dark"] .stats span {
  color: #c4d1cf;
}
textarea { min-height: 86px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; min-height: auto; }
.public-switch-form {
  margin: 0;
}
.public-switch-compact {
  margin-top: 10px;
}
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  cursor: pointer;
}
.toggle-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: var(--line);
  border: 1px solid var(--line);
  transition: background .18s ease, border-color .18s ease;
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  transition: transform .18s ease;
}
.toggle-switch input:checked + .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle-switch input:checked + .toggle-track .toggle-thumb {
  transform: translateX(26px);
}
.toggle-text {
  display: grid;
  gap: 2px;
  line-height: 1.2;
}
.toggle-text small {
  color: var(--muted);
  font-weight: 700;
}
.public-switch-compact .toggle-text small {
  font-size: 12px;
}
.availability-list {
  display: grid;
  gap: 10px;
}
.availability-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.availability-row > div:first-child {
  display: grid;
  gap: 2px;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 10px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 18px; }
.item-card { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.item-head { display: flex; align-items: center; gap: 10px; }
.thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: var(--field); }
.thumb.small { width: 38px; height: 38px; border-radius: 8px; }
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 10px;
}
.image-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  cursor: grab;
}
.image-card.dragging {
  opacity: .55;
  cursor: grabbing;
}
.drag-handle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.image-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 120px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.image-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-select {
  font-size: 12px;
}
.image-batch-form {
  justify-content: flex-end;
}
.item-card h3, .item-card p { margin: 0; }
.calendar-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.calendar-card { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
.calendar-card time { color: var(--muted); font-weight: 800; }
.calendar-card p { margin: 0; color: var(--muted); }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 8px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); font-weight: 800; font-size: 12px; }
.detail { display: grid; gap: 10px 22px; }
.detail p { margin: 0; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 9px; white-space: nowrap; }
.chip span { width: 18px; height: 18px; border: 1px solid #8b9698; border-radius: 50%; }
.color-list { display: grid; gap: 8px; padding: 0; list-style: none; }
.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.color-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  border-color: transparent;
  background: transparent;
  padding: 6px 0;
}
.color-pick:hover { color: var(--accent); }
.color-dot {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid #8b9698;
  border-radius: 50%;
}
.color-name { font-weight: 800; }
.color-status {
  color: var(--muted);
  font-weight: 700;
  margin-left: 4px;
}
.color-actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.inline-edit { display: flex; align-items: center; gap: 8px; margin: 0; }
.inline-edit input[type="color"] { width: 46px; min-width: 46px; padding: 4px; }
.inline-edit input[name="name"] { min-width: 120px; flex: 1; }
.icon-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
}
.icon-button svg { width: 19px; height: 19px; fill: currentColor; }
.modal {
  width: min(420px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}
.modal::backdrop { background: rgba(10, 18, 17, .58); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-section {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.modal-section h3 { margin: 0; }
.row-actions { display: inline-flex; align-items: center; gap: 8px; }
.row-actions .icon-button { width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 7px; }
.breed-list { display: grid; gap: 8px; max-height: 360px; overflow: auto; padding: 0; list-style: none; }
.breed-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.breed-row .admin-inline { flex: 1; }
.alerts { margin: 0 0 14px; padding-left: 20px; }
.alerts li { margin: 7px 0; }
.alerts .danger { color: var(--danger); border: 0; padding: 0; display: list-item; }
.alerts .warn { color: var(--warn); }

.graph-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-bottom: 10px; }
.graph-tools label { min-width: 150px; }
.graph-tools .graph-toggle { min-width: auto; align-self: end; min-height: 42px; }
.graph-shell { position: relative; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--graph-bg); }
svg[data-weight-graph] { display: block; width: 100%; height: auto; min-height: 280px; }
.tooltip {
  position: absolute;
  top: 12px !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  pointer-events: none;
  transform: translateX(-50%) !important;
  width: min(280px, calc(100% - 28px));
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--tooltip-bg);
  color: var(--bg);
  font-size: 13px;
  text-align: center;
  z-index: 3;
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: linear-gradient(140deg, #f4f7f6 0%, #ffffff 52%, #eef4f2 100%);
}
body[data-theme="dark"].login-body {
  background: linear-gradient(140deg, #0e1514 0%, #172321 58%, #111c1a 100%);
}
.login-panel {
  width: min(460px, 100%);
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.login-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.version-label { margin: -8px 0 14px; color: var(--muted); font-size: 12px; font-weight: 700; }
.login-brand { margin-bottom: 0; }
.login-panel h1 { font-size: 30px; line-height: 1.08; margin: 0 0 18px; letter-spacing: 0; }
.gallery-login-link { width: 100%; margin-top: 12px; }
.notice { padding: 10px; background: #fff4f2; border: 1px solid #ffd0ca; border-radius: 6px; color: var(--danger); }
.reset-confirmation {
  background: #e9f8ef;
  border-color: #9bd4af;
  color: #123f24;
  font-weight: 800;
}
body[data-theme="dark"] .reset-confirmation {
  background: #d8f5e0;
  border-color: #80c596;
  color: #0b2f18;
}
body[data-theme="dark"] .website-footer {
  background: #1d2c22;
  color: #f6f4ef;
}
body[data-theme="dark"] .website-footer p,
body[data-theme="dark"] .website-footer a {
  color: #f6f4ef;
}
.notice-banner {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid #e7cf77;
  background: #fff3cd;
  color: #5f4700;
  font-weight: 700;
}
.notice-banner a { color: #006d77; text-decoration: underline; }
.reset-link {
  margin-top: 10px;
  justify-self: start;
}

.public-topbar .brand span:last-child { font-size: 18px; }
.public-gallery .page-title h1 { margin-bottom: 0; }
.public-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-litter-card,
.gallery-puppy-card {
  display: grid;
  gap: 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.gallery-litter-card:hover,
.gallery-puppy-card:hover { text-decoration: none; border-color: var(--accent); }
.gallery-litter-card .public-thumb,
.gallery-litter-card .public-placeholder {
  width: 100%;
  aspect-ratio: 1.1 / 1;
}
.gallery-puppy-card .public-thumb,
.gallery-puppy-card .public-placeholder {
  width: 100%;
  aspect-ratio: 1 / .8;
}
.public-thumb,
.public-photo {
  display: block;
  width: 100%;
  object-fit: cover;
  background: var(--field);
}
.public-placeholder {
  display: grid;
  place-items: center;
  min-height: 180px;
  background: var(--button-bg);
  color: var(--accent);
  font-size: 40px;
  font-weight: 900;
}
.gallery-card-body,
.gallery-puppy-card > span {
  display: grid;
  gap: 4px;
  padding: 0 14px 14px;
}
.gallery-card-body strong,
.gallery-puppy-card strong { font-size: 22px; }
.public-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.public-photo-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.public-photo {
  aspect-ratio: 4 / 3;
}
.public-media-trigger {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  cursor: zoom-in;
}
.public-media-trigger:hover { background: transparent; }
.public-media-trigger video,
.public-media-trigger img {
  display: block;
  width: 100%;
  object-fit: cover;
}
.media-type-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(18, 42, 34, .86);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.public-gallery-modal {
  width: min(96vw, 1100px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: #fff;
  overflow: hidden;
}
.public-gallery-modal::backdrop {
  background: rgba(0, 0, 0, .72);
}
.gallery-preview-modal {
  width: min(94vw, 1100px);
  max-height: 88vh;
  overflow: auto;
}
.public-gallery-stage {
  display: grid;
  min-height: min(78vh, 720px);
  place-items: center;
  padding: 28px 58px 42px;
}
.public-gallery-stage img,
.public-gallery-stage video {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 6px;
}
.public-gallery-stage p {
  margin: 10px 0 0;
  color: #fff;
  font-weight: 800;
}
.public-gallery-close,
.public-gallery-prev,
.public-gallery-next {
  position: absolute;
  z-index: 2;
  background: rgba(255, 255, 255, .9);
  color: #10221c;
}
.public-gallery-close { top: 12px; right: 12px; }
.public-gallery-prev,
.public-gallery-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
}
.public-gallery-prev { left: 12px; }
.public-gallery-next { right: 12px; }
.breeder-public-profile {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: start;
}
.public-breeder-photo {
  width: 170px;
  height: 170px;
  min-height: 170px;
  border-radius: 8px;
  object-fit: cover;
}
.public-photo-meta {
  display: grid;
  gap: 4px;
  padding: 0 12px;
}
.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 12px;
}
.section-heading .share-row { padding: 0; justify-content: flex-end; }
.image-manage {
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.meta-fieldset {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
}
.meta-fieldset legend {
  padding: 0 5px;
  color: var(--muted);
  font-weight: 800;
}

.website .website-login-hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
}
.website .website-signin-card {
  align-self: center;
}
.website .website-signin-card form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}
.website .website-signin-card label {
  display: grid;
  gap: .4rem;
  margin: 0;
  text-align: left;
  color: var(--site-ink);
}
.website .website-signin-card input {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--site-stone);
  border-radius: 12px;
  background: var(--site-white);
  color: var(--site-ink);
  font: inherit;
}
.website button.website-btn,
.website a.website-btn {
  min-height: 44px;
  border: 1px solid var(--site-sage);
  padding: .9rem 1.45rem;
  border-radius: 999px;
  font-weight: 900;
}
.website button.website-primary,
.website a.website-primary {
  background: var(--site-sage);
  border-color: var(--site-sage);
  color: #fff;
}
.website .reset-link {
  margin-top: 1rem;
  color: var(--site-sage);
}
.website-version {
  margin: 1.2rem 0 0;
  color: var(--site-muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; }
  .hero-band, .page-title { align-items: flex-start; flex-direction: column; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .grid.two, .stats, .detail, .panel.detail .panel-body { grid-template-columns: 1fr; }
  .stats strong { font-size: 26px; }
  .page { width: min(100% - 18px, 1180px); margin-top: 12px; }
  .nav-link { min-height: 34px; padding: 6px 9px; }
  .puppy-title-actions { justify-content: flex-start; }
  .inline-edit { align-items: stretch; flex-direction: column; }
  .inline-edit input[name="name"] { min-width: 0; }
  .public-grid, .public-photo-grid { grid-template-columns: 1fr; }
  .breeder-public-profile { grid-template-columns: 1fr; }
  .section-heading .share-row { justify-content: flex-start; }
}
