:root {
  --cg-sky: #00c6ff;
  --cg-yellow: #ffff00;
  --cg-sand: #f2c46b;
  --cg-terracotta: #d35232;
  --cg-link: #0000a0;
  --cg-link-hover: #b52f1b;
  --cg-ink: #171717;
  --cg-dark: #29211b;
  --cg-paper: #fff8df;
  --cg-cream: #ffe9b0;
  --cg-soft: #fff3d1;
  --cg-grey: #554332;
  --cg-border: #b8472c;

  --cg-font: Arial, Helvetica, sans-serif;
  --cg-font-decorative: "Courier New", monospace;
}

::selection {
  background: var(--cg-terracotta);
  color: var(--cg-paper);
}

::-moz-selection {
  background: var(--cg-terracotta);
  color: var(--cg-paper);
}


/* =========================================================
   2. RESET & BASE PAGE STYLES
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;

  color: var(--cg-ink);
  font-family: var(--cg-font);
  font-size: 16px;
  line-height: 1.5;

  background-color: var(--cg-sky);
  background-image: url("images/newbeachbak3.gif");
  background-repeat: repeat;
  background-attachment: fixed;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

p {
  line-height: 1.55;
}

strong,
b {
  font-weight: 700;
}


/* =========================================================
   3. LINKS & KEYBOARD ACCESSIBILITY
   ========================================================= */

a {
  color: var(--cg-link);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;

  transition: color .12s, background-color .12s;
}

a:hover {
  color: var(--cg-link-hover);
  background-color: #fff3a5;
}

a:focus-visible {
  outline: 3px solid var(--cg-ink);
  outline-offset: 3px;
}


/* =========================================================
   4. MAIN PAGE WIDTH
   ========================================================= */

.animal-page {
  width: min(calc(100% - 24px), 1080px);
  margin: 0 auto 32px;
}


/* =========================================================
   5. HEADER
   Transparent to reveal the original beach background.
   ========================================================= */

.animal-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  margin:
    0
    calc((min(100vw, 1080px) - min(100vw - 24px, 1080px)) / -2)
    20px;

  padding: 18px max(18px, calc((100% - 1040px) / 2)) 16px;
  min-height: 138px;

  background: transparent;
  border: 0;
  box-shadow: none;
}

.animal-header-inner {
  position: relative;
  z-index: 3;

  min-height: 96px;
  padding: 0;

  background: transparent;
  border: 0;
  box-shadow: none;

  text-align: left;
}

.animal-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.animal-title h1 {
  margin: 0;

  color: var(--cg-yellow);
  font-family: var(--cg-font);
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0;

  text-shadow: 1px 1px 0 rgba(0, 75, 110, .45);
}

.animal-sparkle {
  color: var(--cg-yellow);
  font-size: 20px;
}

.animal-subtitle {
  position: relative;
  z-index: 3;

  margin: 5px 0 0;

  color: var(--cg-yellow);
  font-family: var(--cg-font);
  font-size: clamp(14px, 2vw, 18px);
  font-style: italic;
  font-weight: 700;

  text-shadow: 1px 1px 0 rgba(0, 75, 110, .45);
}


/* Decorative header GIFs */

.cg-header-crab,
.cg-header-umbrella {
  position: absolute;
  z-index: 2;

  display: block;
  object-fit: contain;
  pointer-events: none;
}

.cg-header-crab {
  width: 76px;
  height: 66px;

  right: clamp(100px, 18vw, 210px);
  bottom: 8px;
}

.cg-header-umbrella {
  width: 126px;
  height: 114px;

  right: clamp(8px, 3vw, 28px);
  top: 0;
}


/* Terracotta strip */

.animal-header::after {
  content: "";

  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;

  height: 10px;
  background: var(--cg-terracotta);
}


/* =========================================================
   6. MAIN CONTENT & SIDEBAR LAYOUT
   ========================================================= */

.animal-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: start;
}

.animal-window {
  min-width: 0;
  overflow: hidden;

  background: rgba(255, 224, 145, .50);
  border: 0;
  box-shadow: none;
}


/* =========================================================
   7. WINDOW TITLE BAR
   ========================================================= */

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  min-height: 36px;
  padding: 7px 12px;

  background: var(--cg-terracotta);
  color: #fff;

  font: 700 14px/1.3 var(--cg-font);
}

.window-buttons {
  flex: 0 0 auto;
  letter-spacing: 2px;
  font-size: 13px;
}


/* =========================================================
   8. SCROLLING CONTENT PANEL
   ========================================================= */

.window-content {
  min-width: 0;
  max-height: 620px;

  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;

  padding: clamp(14px, 2.5vw, 26px);

  background: rgba(255, 220, 128, .18);

  scrollbar-width: auto;
  scrollbar-color: var(--cg-terracotta) var(--cg-cream);
}

.window-content::-webkit-scrollbar {
  width: 12px;
}

.window-content::-webkit-scrollbar-track {
  background: var(--cg-cream);
}

.window-content::-webkit-scrollbar-thumb {
  background: var(--cg-terracotta);
  border: 2px solid var(--cg-cream);
  border-radius: 0;
}

.window-content::-webkit-scrollbar-thumb:hover {
  background: #a63822;
}


/* =========================================================
   9. CONTENT SECTIONS & HEADINGS
   ========================================================= */

.breed-section {
  width: 100%;
  min-width: 0;
}

.breed-section h2 {
  margin: 0;

  color: #78311f;
  font: 700 clamp(19px, 2.5vw, 24px)/1.3 var(--cg-font);

  text-align: left;
  text-transform: none;
}

.breed-section h2 span {
  color: var(--cg-terracotta);
}

.divider {
  height: 10px;
  margin: 10px 0 20px;

  border: 0;
  background: var(--cg-terracotta);
}


/* =========================================================
   10. BREED DIRECTORY
   ========================================================= */

#breedlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 8px;

  width: 100%;
  min-width: 0;
}

#breedlist .breed-link {
  position: relative;

  display: flex;
  align-items: center;
  gap: 5px;

  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;

  background: var(--cg-paper);
  border: 1px solid rgba(184, 71, 44, .65);
  border-left: 4px solid var(--cg-terracotta);

  color: #782b19;
  font: 700 14px/1.4 var(--cg-font);
  text-align: left;
  text-decoration: none;

  overflow-wrap: anywhere;

  transition:
    background-color .15s ease,
    color .15s ease,
    border-color .15s ease;
}

#breedlist .breed-link::before {
  content: "» ";
  flex: 0 0 auto;
  color: var(--cg-terracotta);
}

#breedlist .breed-link:hover {
  background: var(--cg-cream);
  border-color: var(--cg-terracotta);
  color: #782b19;
}

#breedlist .breed-link.is-active {
  background: var(--cg-terracotta);
  border-color: #a63822;
  color: var(--cg-paper);
  box-shadow: 2px 2px 0 rgba(120, 43, 25, .12);
}

#breedlist .breed-link.is-active::before {
  color: var(--cg-paper);
}

#breedlist .breed-link:focus-visible {
  z-index: 1;
  outline: 3px solid var(--cg-ink);
  outline-offset: 2px;
}


/* =========================================================
   11. PET VIEWER SECTION
   ========================================================= */

#content {
  display: block;
  width: 100%;
  min-width: 0;

  margin-top: 24px;
  padding-top: 18px;

  border-top: 8px solid var(--cg-terracotta);
}

#content h1 {
  margin: 0 0 18px;

  color: #78311f;
  font: 700 clamp(20px, 3vw, 26px)/1.3 var(--cg-font);

  text-align: left;
  text-transform: none;
}

#content.pet-content {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 8px solid var(--cg-terracotta);
}


/* =========================================================
   12. SELECTED BREED HEADER
   ========================================================= */

.pet-viewer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  min-width: 0;
  margin: 0 0 20px;
  padding: 12px 14px;

  background: var(--cg-terracotta);
  border: 3px double #fff0ce;
  outline: 1px solid #a63822;
  outline-offset: -5px;

  box-shadow: 3px 3px 0 rgba(120, 43, 25, .13);

  color: var(--cg-paper);
}

.pet-viewer-heading-text {
  min-width: 0;
}

.pet-viewer-eyebrow {
  display: block;
  margin-bottom: 4px;

  color: #fff0ce;
  font: 700 10px/1.4 var(--cg-font);
  letter-spacing: 1.2px;

  overflow-wrap: anywhere;
}

.pet-viewer-heading h1 {
  margin: 0 !important;

  color: var(--cg-paper) !important;
  font: 700 clamp(21px, 3vw, 27px)/1.2 var(--cg-font) !important;

  text-align: left !important;
  overflow-wrap: anywhere;
}

.pet-viewer-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  min-height: 32px;
  padding: 6px 9px;

  background: var(--cg-cream);
  border: 1px solid #a63822;

  color: #782b19;
  font: 700 12px/1.3 var(--cg-font);
  white-space: nowrap;
}


/* =========================================================
   13. PET GALLERY
   Flexible wrapping lets each card accommodate its image.
   ========================================================= */

.pet-gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;

  width: 100%;
  min-width: 0;
}


/* =========================================================
   14. VINTAGE PETZ COLLECTOR CARDS
   The image determines the natural card width.
   Text must not force the card to become wider.
   ========================================================= */

.pet-card {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: stretch;

  /*
   * Use the image as the natural width reference.
   * The card may shrink to fit the gallery, but long
   * breeder credits must wrap inside the card.
   */
  flex: 0 1 auto;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  align-self: flex-start;

  padding: 5px;
  overflow: hidden;

  background:
    repeating-linear-gradient(
      0deg,
      rgba(120, 85, 45, .025) 0,
      rgba(120, 85, 45, .025) 1px,
      transparent 1px,
      transparent 4px
    ),
    var(--cg-paper);

  border: 3px double var(--cg-terracotta);
  outline: 1px solid rgba(120, 43, 25, .25);
  outline-offset: -2px;

  box-shadow:
    3px 3px 0 rgba(120, 43, 25, .12),
    inset 0 0 0 1px rgba(255, 255, 255, .65);

  text-align: center;

  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}


/* Ornamental corners */

.pet-card::before,
.pet-card::after {
  position: absolute;
  z-index: 2;

  width: 12px;
  height: 12px;

  color: var(--cg-terracotta);
  font: 12px/1 var(--cg-font);

  pointer-events: none;
}

.pet-card::before {
  content: "✿";
  top: 5px;
  left: 6px;
}

.pet-card::after {
  content: "✿";
  right: 6px;
  bottom: 5px;
}

.pet-card:hover {
  border-color: #a63822;

  box-shadow:
    4px 4px 0 rgba(120, 43, 25, .2),
    inset 0 0 0 1px rgba(255, 255, 255, .8);

  transform: translateY(-3px);
}


/* =========================================================
   15. PET IMAGE FRAME
   Preserve natural image dimensions whenever possible.
   ========================================================= */

.pet-card-image {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  /*
   * The frame uses its image's intrinsic dimensions.
   * It cannot grow wider than the available card width.
   */
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  min-height: 0;

  align-self: center;
  flex: 0 0 auto;

  padding: 12px;

  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(255, 255, 255, .45),
      transparent 70%
    ),
    var(--cg-cream);

  border: 1px solid rgba(184, 71, 44, .65);
  outline: 1px dotted rgba(120, 43, 25, .45);
  outline-offset: -5px;
}

.pet-card-image img {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: none;

  object-fit: contain;
  object-position: center;

  margin: 0 auto;
  flex: 0 1 auto;
}


/* Decorative sparkle detail */

.pet-card-image::after {
  content: "✧  ♡  ✧";

  position: absolute;
  right: 8px;
  bottom: 5px;

  color: rgba(120, 43, 25, .65);
  font: 11px/1 var(--cg-font);
  letter-spacing: 2px;

  pointer-events: none;
}


/* =========================================================
   16. PET CARD DETAILS
   Prevent the details' text from setting the card's
   intrinsic width. The details fill the width established
   by the image instead of widening the card.
   ========================================================= */

.pet-card-details {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;

  /*
   * Key sizing fix: keep the details' contents from
   * contributing their min-content width to the parent.
   */
  contain: inline-size;

  flex: 0 0 auto;

  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 8px;

  margin-top: 5px;
  padding: 12px 9px 14px;

  background: rgba(255, 248, 223, .72);
  border: 1px solid rgba(184, 71, 44, .25);
}


/* Pet name */

.pet-card .pet-name {
  position: relative;

  width: 100%;
  min-width: 0;
  max-width: 100%;

  margin: 0;
  padding: 0 0 9px;

  color: #782b19;
  font: 700 16px/1.35 var(--cg-font);
  text-align: center;

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;

  border-bottom: 1px dotted rgba(184, 71, 44, .65);
}

.pet-card .pet-name::after {
  content: "❧";

  position: absolute;
  bottom: -8px;
  left: 50%;

  padding: 0 5px;

  background: var(--cg-paper);
  color: var(--cg-terracotta);
  font: 14px/1 var(--cg-font);

  transform: translateX(-50%);
}


/* Gender badges */

.pet-gender {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  max-width: 100%;
  min-width: 0;

  margin-top: 0;
  padding: 4px 8px;

  background: var(--cg-cream);
  border: 1px solid rgba(184, 71, 44, .55);
  border-radius: 2px;

  color: var(--cg-dark);
  font: 700 12px/1.4 var(--cg-font);

  white-space: normal;
  overflow-wrap: anywhere;
}

.pet-gender.gender-female {
  background: #f5e2df;
  border-color: #bd8b8c;
  color: #783b52;
}

.pet-gender.gender-male {
  background: #e3e9e6;
  border-color: #8ba49c;
  color: #354f65;
}


/* =========================================================
   17. BRED HERE / ADOPTED LABELS
   ========================================================= */

.pet-origin {
  display: inline-block;

  width: fit-content;
  max-width: 100%;
  min-width: 0;

  margin-top: 6px;
  padding: 4px 9px;

  font-family: inherit;
  font-size: .85rem;
  line-height: 1.3;
  letter-spacing: .03em;
  text-align: center;

  border: 1px solid;
  border-radius: 3px;

  box-shadow: 1px 2px 0 rgba(38, 51, 38, .12);

  white-space: normal;
  overflow-wrap: anywhere;
}

.pet-origin.origin-bred {
  color: #34452b;
  background: #e2e9d2;
  border-color: #849968;
}

.pet-origin.origin-adopted {
  color: #66513b;
  background: #f0e5d2;
  border-color: #b49a73;
}


/* =========================================================
   18. BREEDER CREDITS
   Long breeder@prefix names wrap within the card.
   ========================================================= */

.pet-card .pet-breeder {
  display: block;

  /*
   * Do not give long breeder names an unlimited width.
   * Keep all text inside the image-sized details panel.
   */
  width: 100%;
  min-width: 0;
  max-width: 100%;

  margin: 0;
  padding-top: 8px;

  border-top: 1px dotted rgba(184, 71, 44, .45);

  color: var(--cg-grey);
  font: italic 13px/1.5 var(--cg-font);

  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.pet-card .pet-breeder a {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.pet-breeder-label {
  font-weight: 700;
}

.pet-breeder-name {
  min-width: 0;
  max-width: 100%;
  font-weight: 400;
  overflow-wrap: anywhere;
}


/* =========================================================
   19. EMPTY COLLECTION MESSAGE
   ========================================================= */

.pet-viewer-empty {
  width: 100%;
  margin: 0;
  padding: 18px;

  background: var(--cg-paper);
  border: 2px dashed var(--cg-terracotta);

  color: var(--cg-grey);
  font: italic 15px/1.6 var(--cg-font);
  text-align: center;
}


/* =========================================================
   20. SIDEBAR NAVIGATION
   ========================================================= */

.animal-sidebox {
  min-width: 0;

  background: rgba(255, 248, 223, .96);
  border: 2px solid var(--cg-terracotta);
  box-shadow: none;
}

.sidebox-title {
  padding: 9px 10px;

  background: var(--cg-terracotta);
  color: #fff;

  font: 700 14px/1.3 var(--cg-font);
  text-align: left;
}

.sidebox-content {
  min-width: 0;
  padding: 14px;
  border-top: 0;
}

.sidebox-content p {
  margin: 0 0 12px;
  line-height: 1.5;
}

.sidebox-content a {
  overflow-wrap: anywhere;
}

.sidebox-content p a::before {
  content: "» ";
  color: var(--cg-terracotta);
}

.sidebox-content p a:hover {
  color: #782b19;
  background: #ffe49a;
}


/* Sidebar resource lists */

.sidebox-content ul,
.sidebox-content ol {
  margin: 8px 0 12px;
  padding: 8px 8px 8px 26px;

  font: 13px/1.5 var(--cg-font);
}

.sidebox-content ul {
  list-style: disc;
}

.sidebox-content ul li,
.sidebox-content ol li {
  padding: 3px 4px;
}

.sidebox-content ul li::before {
  content: none;
}

.sidebox-content li a {
  color: var(--cg-link);
  font-weight: 700;
  text-decoration: underline;
}

.sidebox-content li a:hover {
  color: var(--cg-link-hover);
  background: #fff3a5;
}


/* =========================================================
   21. STATUS INDICATOR
   ========================================================= */

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  margin-top: 5px;
  padding: 5px 8px;

  background: var(--cg-paper);
  border: 1px solid var(--cg-terracotta);

  color: #782b19;
  font: 700 12px/1.3 var(--cg-font);
}

.status-dot {
  display: inline-block;
  flex: 0 0 auto;

  width: 8px;
  height: 8px;

  background: #228b22;
  border: 1px solid #145414;
  border-radius: 50%;
}


/* =========================================================
   22. GENERAL CONTENT LISTS
   ========================================================= */

.window-content ul,
.window-content ol {
  margin: 12px 0 18px;
  padding: 10px 12px 10px 32px;

  background: rgba(255, 248, 223, .78);
  border: 1px solid rgba(211, 82, 50, .65);

  font: 15px/1.6 var(--cg-font);
}

.window-content ul {
  list-style: disc;
}

.window-content ol {
  list-style: decimal;
}

.window-content ul li,
.window-content ol li {
  padding: 2px 4px;
  color: var(--cg-dark);
}

.window-content ul li::before {
  content: none;
}

.window-content li:hover {
  background: rgba(255, 255, 255, .5);
  color: var(--cg-dark);
}

.window-content li a {
  color: var(--cg-link);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.window-content li a:hover {
  color: var(--cg-link-hover);
  background: #fff3a5;
}

.window-content ol li::marker {
  color: var(--cg-terracotta);
  font-weight: 700;
}


/* =========================================================
   23. REUSABLE WELCOME BOX
   ========================================================= */

.welcome-box {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 24px;
  padding: 12px 14px;

  background: var(--cg-paper);
  border: 2px dotted var(--cg-terracotta);
}

.welcome-star {
  flex: 0 0 auto;

  color: var(--cg-terracotta);
  font-size: 25px;
  line-height: 1;
}

.welcome-box strong {
  color: #78311f;
  font-size: 16px;
}

.welcome-box p {
  margin: 4px 0 0;
  font: 14px/1.5 var(--cg-font);
}


/* =========================================================
   24. COMPACT PETZ LISTS
   ========================================================= */

.petz-list-compact {
  margin: 0 !important;
  padding: 4px !important;

  background: transparent !important;
  border: 0 !important;
}

.petz-list-compact li {
  padding: 5px 6px 5px 22px !important;
  border-bottom: 1px dotted #dca28e;
}

.petz-list-compact li:last-child {
  border-bottom: 0;
}

.petz-list-heading {
  margin-top: 8px;
  padding: 5px 7px;

  background: var(--cg-terracotta);
  color: #fff;

  font: 700 12px/1.4 var(--cg-font);
  text-transform: uppercase;
}

.tiny-text {
  font: 13px/1.5 var(--cg-font);
}


/* =========================================================
   25. OVERWRITING FILE LIBRARY
   ========================================================= */

.overwrite-library {
  width: 100%;
  min-width: 0;
}

.overwrite-library .overwrite-intro {
  margin: 0 0 24px;

  color: var(--cg-dark);
  font-size: 15px;
  line-height: 1.7;
}


/* Library groups */

.overwrite-library .overwrite-group {
  margin: 0 0 30px;
}

.overwrite-library .overwrite-group:last-of-type {
  margin-bottom: 20px;
}

.overwrite-library .overwrite-group-heading {
  display: flex;
  align-items: center;
  gap: 12px;

  margin: 0 0 14px;
  padding: 10px 12px;

  background: var(--cg-terracotta);
  color: #fff;

  border: 2px solid #a63822;
  box-shadow: 3px 3px 0 rgba(120, 43, 25, .16);
}

.overwrite-library .overwrite-heading-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;

  width: 34px;
  height: 34px;

  background: var(--cg-cream);
  color: #782b19;
  border: 1px solid #a63822;

  font-size: 22px;
  line-height: 1;
}

.overwrite-library .overwrite-group-heading h3 {
  margin: 0;

  color: #fff;
  font: 700 19px/1.3 var(--cg-font);
  text-align: left;
}

.overwrite-library .overwrite-group-heading p {
  margin: 3px 0 0;

  color: var(--cg-paper);
  font: 14px/1.4 var(--cg-font);
}


/* Creator card grid */

.overwrite-library .overwrite-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;

  width: 100%;
  min-width: 0;
}


/* Creator cards */

.overwrite-library .overwrite-card {
  display: flex;
  flex-direction: column;

  min-width: 0;
  max-width: 100%;
  padding: 0;

  background: var(--cg-paper);
  border: 2px solid var(--cg-terracotta);

  box-shadow: 3px 3px 0 rgba(120, 43, 25, .12);

  transition:
    box-shadow .15s ease,
    border-color .15s ease;
}

.overwrite-library .overwrite-card:hover {
  border-color: #a63822;
  box-shadow: 4px 4px 0 rgba(120, 43, 25, .20);
}


/* Creator name bar */

.overwrite-library .overwrite-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  min-width: 0;
  padding: 12px 13px;

  background: var(--cg-cream);
  border-bottom: 2px solid var(--cg-terracotta);
}

.overwrite-library .overwrite-card-header > div {
  min-width: 0;
}

.overwrite-library .overwrite-card h4 {
  margin: 0;

  color: #782b19;
  font: 700 18px/1.3 var(--cg-font);

  overflow-wrap: anywhere;
  text-align: left;
}

.overwrite-library .overwrite-card h4 a {
  color: #782b19;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.overwrite-library .overwrite-card h4 a:hover {
  color: #b52f1b;
  background: #fff3a5;
}

.overwrite-library .overwrite-card h4 a:focus-visible {
  outline: 3px solid var(--cg-ink);
  outline-offset: 3px;
}

.overwrite-library .overwrite-count {
  margin: 4px 0 0;

  color: var(--cg-grey);
  font: 13px/1.4 var(--cg-font);
}

.overwrite-library .overwrite-card-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;

  width: 34px;
  height: 34px;

  background: var(--cg-paper);
  border: 1px solid rgba(184, 71, 44, .5);

  font-size: 19px;
  line-height: 1;
}


/* File name grid */

.overwrite-library .overwrite-files {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 6px;

  flex: 1;
  min-width: 0;

  margin: 0 !important;
  padding: 12px !important;

  background: transparent !important;
  border: 0 !important;
  list-style: none;
}

.overwrite-library .overwrite-files li {
  display: flex;
  align-items: flex-start;

  min-width: 0;
  margin: 0;
  padding: 7px 8px !important;

  background: rgba(255, 248, 223, .85);
  border: 1px solid rgba(184, 71, 44, .22);

  color: var(--cg-dark);
  font: 14px/1.45 var(--cg-font);

  overflow-wrap: anywhere;
  word-break: normal;

  transition:
    background-color .12s ease,
    border-color .12s ease;
}

.overwrite-library .overwrite-files li::before {
  content: none !important;
}

.overwrite-library .overwrite-files li:hover {
  background: #fff3c8;
  border-color: var(--cg-terracotta);
  color: var(--cg-dark);
}


/* Featured collections */

@media (min-width: 761px) {
  .overwrite-library .overwrite-card-featured {
    grid-column: span 2;
  }

  .overwrite-library .overwrite-card-featured .overwrite-files {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* Occasionally used section */

.overwrite-library .overwrite-group-occasional {
  margin-top: 8px;
  padding-top: 22px;

  border-top: 4px double var(--cg-terracotta);
}

.overwrite-library .overwrite-group-occasional .overwrite-group-heading {
  background: #783b28;
  border-color: #632c1d;
}

.overwrite-library .overwrite-group-occasional .overwrite-heading-icon {
  color: #783b28;
  border-color: #a63822;
}


/* Last updated */

.overwrite-library .overwrite-updated {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;

  margin-top: 24px;
  padding: 12px;

  background: var(--cg-cream);
  border: 1px dashed var(--cg-terracotta);

  color: #782b19;
  font: 14px/1.5 var(--cg-font);
  text-align: center;
}

.overwrite-library .overwrite-updated span {
  color: var(--cg-terracotta);
  font-size: 17px;
}


/* =========================================================
   26. FOOTER
   Desktop: align with the main content column.
   ========================================================= */

.animal-footer {
  width: calc(100% - 238px);
  min-width: 0;

  margin-top: 20px;
  padding: 14px;

  background: rgba(255, 248, 223, .94);
  border-top: 8px solid var(--cg-terracotta);

  color: #782b19;
  font: 13px/1.5 var(--cg-font);
  text-align: center;
}

.footer-stars {
  margin-top: 5px;
  color: var(--cg-terracotta);
  letter-spacing: 5px;
}

.footer-small {
  margin-top: 5px;
}


/* =========================================================
   27. TABLET LAYOUT
   ========================================================= */

@media (max-width: 900px) {
  .pet-gallery {
    gap: 13px;
  }

  .pet-card-image {
    padding: 10px;
  }
}


/* =========================================================
   28. TABLET & MOBILE LAYOUT
   ========================================================= */

@media (max-width: 760px) {
  .animal-page {
    width: min(calc(100% - 16px), 1080px);
    margin-bottom: 20px;
  }

  .animal-header {
    margin-left: -8px;
    margin-right: -8px;

    min-height: 128px;
    padding: 15px 14px 18px;
  }

  .animal-header-inner {
    min-height: 90px;
  }

  .animal-title h1 {
    max-width: calc(100vw - 150px);
    font-size: clamp(25px, 6vw, 36px);
  }

  .animal-subtitle {
    max-width: calc(100vw - 140px);
    font-size: 14px;
  }

  .cg-header-crab {
    width: 54px;
    height: 48px;
    right: 94px;
    bottom: 8px;
  }

  .cg-header-umbrella {
    width: 88px;
    height: 80px;
    right: 3px;
  }

  .animal-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .animal-sidebox {
    order: -1;
  }

  .sidebox-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 14px;
  }

  .sidebox-content p {
    margin: 0;
  }

  .status {
    margin-top: 0;
  }

  .window-content {
    padding: 14px;
    max-height: 65vh;
  }

  #breedlist {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .pet-gallery {
    gap: 10px;
  }

  .pet-card {
    max-width: 100%;
  }

  .pet-card-image {
    max-width: 100%;
  }

  .pet-card-image img {
    max-width: 100%;
    height: auto;
  }

  .animal-footer {
    width: 100%;
  }

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

  .overwrite-library .overwrite-card-featured {
    grid-column: 1 / -1;
  }

  .overwrite-library .overwrite-card-featured .overwrite-files {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overwrite-library .overwrite-card-header {
    padding: 10px;
  }

  .overwrite-library .overwrite-card h4 {
    font-size: 16px;
  }

  .overwrite-library .overwrite-files {
    grid-template-columns: 1fr;
    padding: 9px !important;
    gap: 5px;
  }

  .overwrite-library .overwrite-card-featured .overwrite-files {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overwrite-library .overwrite-files li {
    padding: 7px !important;
    font-size: 14px;
  }

  .overwrite-library .overwrite-group-heading h3 {
    font-size: 18px;
  }
}


/* =========================================================
   29. SMALL MOBILE SCREENS
   ========================================================= */

@media (max-width: 420px) {
  .animal-page {
    width: calc(100% - 12px);
  }

  .animal-header {
    margin-left: -6px;
    margin-right: -6px;

    min-height: 112px;
    padding: 12px 9px 16px;
  }

  .animal-title {
    gap: 5px;
  }

  .animal-title h1 {
    max-width: calc(100vw - 125px);
    font-size: 25px;
  }

  .animal-sparkle {
    font-size: 14px;
  }

  .animal-subtitle {
    max-width: calc(100vw - 120px);
    font-size: 12px;
  }

  .cg-header-crab {
    width: 43px;
    height: 39px;
    right: 75px;
    bottom: 8px;
  }

  .cg-header-umbrella {
    width: 70px;
    height: 64px;
  }

  .window-titlebar {
    align-items: flex-start;
    font-size: 12px;
  }

  .window-content {
    padding: 10px;
    max-height: 65vh;
  }

  #breedlist {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  #breedlist .breed-link {
    padding: 8px 5px;
    font-size: 12px;
  }

  .pet-gallery {
    gap: 8px;
  }

  .pet-card {
    padding: 4px;
  }

  .pet-card::before,
  .pet-card::after {
    font-size: 10px;
  }

  .pet-viewer-heading {
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
  }

  .pet-viewer-eyebrow {
    font-size: 9px;
    letter-spacing: .7px;
  }

  .pet-viewer-heading h1 {
    font-size: 21px !important;
  }

  .pet-viewer-count {
    padding: 5px 6px;
    font-size: 11px;
  }

  .pet-card-image {
    padding: 7px;
  }

  .pet-card-image::after {
    right: 5px;
    bottom: 4px;
    font-size: 9px;
  }

  .pet-card-details {
    gap: 7px;
    padding: 10px 5px 12px;
  }

  .pet-card .pet-name {
    font-size: 14px;
  }

  .pet-gender {
    padding: 4px 5px;
    font-size: 11px;
  }

  .pet-card .pet-breeder {
    font-size: 12px;
  }

  .overwrite-library .overwrite-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .overwrite-library .overwrite-card-featured {
    grid-column: auto;
  }

  .overwrite-library .overwrite-card-featured .overwrite-files {
    grid-template-columns: 1fr;
  }

  .overwrite-library .overwrite-card-header {
    padding: 11px 12px;
  }

  .overwrite-library .overwrite-card h4 {
    font-size: 17px;
  }

  .overwrite-library .overwrite-files {
    grid-template-columns: 1fr;
    padding: 10px !important;
  }

  .overwrite-library .overwrite-files li {
    padding: 8px !important;
    font-size: 15px;
  }

  .overwrite-library .overwrite-group-heading {
    padding: 9px;
    gap: 9px;
  }

  .overwrite-library .overwrite-group-heading p {
    font-size: 13px;
  }

  .overwrite-library .overwrite-updated {
    gap: 7px;
    font-size: 13px;
  }
}


/* =========================================================
   30. ACCESSIBILITY: REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .pet-card:hover {
    transform: none;
  }
}


/* =========================================================
   END OF CALAMINT GROVE STYLESHEET
   ========================================================= */