.everhowl-print-cards {
  --eh-panel: rgba(216, 222, 232, 0.7);
  --eh-card: rgba(243, 245, 248, 0.88);
  --eh-mist: #d8dee8;
  --eh-ash: #a9afb6;
  --eh-charcoal: #312821;
  --eh-muted: #5d646c;
  --eh-green: #1e7a34;
  --eh-green-dark: #145c26;
  --eh-cta: #2db35c;
  --eh-cta-dark: #239545;
  --eh-border: rgba(49, 40, 33, 0.16);
  background: var(--eh-panel);
  border: 1px solid var(--eh-border);
  border-radius: 24px;
  box-shadow: 0 12px 34px rgba(49, 40, 33, 0.12);
  box-sizing: border-box;
  color: var(--eh-charcoal);
  font-family: Nunito, Arial, sans-serif;
  line-height: 1.55;
  margin: 1.5rem auto;
  max-width: 1060px;
  padding: clamp(18px, 3vw, 30px);
}

.everhowl-print-cards *,
.everhowl-print-cards *::before,
.everhowl-print-cards *::after {
  box-sizing: border-box;
}

.everhowl-print-cards h2.everhowl-print-cards__title {
  color: var(--eh-charcoal);
  font-family: Fredoka, Nunito, Arial, sans-serif;
  font-size: clamp(1.7rem, 4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 6px;
}

.everhowl-print-cards__sub {
  color: var(--eh-muted);
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0 0 18px;
}

/* ----- How it works dropdown (v1.6.27) ----- */
.everhowl-print-cards__how {
  margin: 0 0 18px;
}

.everhowl-print-cards__how-summary {
  background: var(--eh-ash);
  border-radius: 10px;
  color: #1c1f24;
  cursor: pointer;
  font-family: Fredoka, Nunito, Arial, sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  list-style: none;
  padding: 12px 40px 12px 16px;
  position: relative;
}

.everhowl-print-cards__how-summary::-webkit-details-marker {
  display: none;
}

.everhowl-print-cards__how-summary::after {
  border-bottom: 2px solid #1c1f24;
  border-right: 2px solid #1c1f24;
  content: '';
  height: 9px;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-70%) rotate(45deg);
  width: 9px;
}

.everhowl-print-cards__how[open] .everhowl-print-cards__how-summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.everhowl-print-cards__how-summary:hover,
.everhowl-print-cards__how[open] .everhowl-print-cards__how-summary {
  box-shadow: 0 3px 12px rgba(57, 255, 20, 0.45);
}

.everhowl-print-cards__how-p {
  color: var(--eh-muted);
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 14px 0 0;
}

/* ----- Buttons ----- */
.everhowl-print-cards__btn {
  background: var(--eh-ash);
  border: 1px solid rgba(49, 40, 33, 0.28);
  border-radius: 10px;
  color: var(--eh-charcoal);
  cursor: pointer;
  font-family: Fredoka, Nunito, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 11px 18px;
}

.everhowl-print-cards__btn--print {
  background: var(--eh-cta);
  border-color: var(--eh-cta);
  color: #fff;
}

.everhowl-print-cards__btn:hover {
  box-shadow: 0 3px 12px rgba(57, 255, 20, 0.45);
  transform: translateY(-1px);
}

/* ----- Controls ----- */
.everhowl-print-cards__controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
  margin-bottom: 6px;
}

.everhowl-print-cards__qwrap {
  display: flex;
  flex: 1 1 260px;
  position: relative;
}

.everhowl-print-cards__input {
  background: var(--eh-card);
  border: 1px solid var(--eh-border);
  border-radius: 10px;
  color: var(--eh-charcoal);
  flex: 1;
  font-family: Nunito, Arial, sans-serif;
  font-size: 1.02rem;
  outline: none;
  padding: 12px 42px 12px 14px;
  width: 100%;
}

.everhowl-print-cards__input:focus {
  border-color: var(--eh-green);
  outline: 2px solid rgba(30, 122, 52, 0.25);
  outline-offset: 0;
}

.everhowl-print-cards__clearq {
  background: var(--eh-charcoal);
  border: 0;
  border-radius: 50%;
  color: var(--eh-mist);
  cursor: pointer;
  display: none;
  font-size: 18px;
  height: 30px;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
}

/* ----- A-Z letter bar ----- */
.everhowl-print-cards__az {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 2px;
}

.everhowl-print-cards__az-btn {
  background: var(--eh-ash);
  border: 1px solid rgba(49, 40, 33, 0.28);
  border-radius: 9px;
  color: #1f1b18;
  cursor: pointer;
  flex: 1 1 38px;
  font-family: Fredoka, Nunito, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  height: 38px;
  padding: 0;
  width: 38px;
}

.everhowl-print-cards__az-btn--on {
  background: var(--eh-charcoal);
  border-color: var(--eh-charcoal);
  color: var(--eh-mist);
}

.everhowl-print-cards__az-btn:disabled {
  background: rgba(169, 175, 182, 0.45);
  cursor: default;
}

/* ----- Search / letter results ----- */
.everhowl-print-cards__results {
  background: var(--eh-card);
  border: 1px solid var(--eh-border);
  border-radius: 10px;
  display: none;
  margin: 8px 0 4px;
  max-height: 342px;
  overflow: hidden;
  overflow-y: auto;
}

.everhowl-print-cards__resrow {
  align-items: stretch;
  border-bottom: 1px solid var(--eh-border);
  display: flex;
}

.everhowl-print-cards__resrow:last-child {
  border-bottom: 0;
}

.everhowl-print-cards__res {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--eh-charcoal);
  cursor: pointer;
  display: flex;
  flex: 1 1 auto;
  font-family: Fredoka, Nunito, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  gap: 12px;
  padding: 8px 12px;
  text-align: left;
  width: 100%;
}

.everhowl-print-cards__res img {
  border-radius: 6px;
  height: 40px;
  object-fit: cover;
  width: 52px;
}

.everhowl-print-cards__res-add {
  color: var(--eh-green);
  font-weight: 600;
  margin-left: auto;
}

.everhowl-print-cards__res-growth {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--eh-border);
  color: var(--eh-green);
  cursor: pointer;
  flex: none;
  font-family: Fredoka, Nunito, Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 12px;
}

.everhowl-print-cards__count {
  color: var(--eh-muted);
  font-size: 0.94rem;
  margin: 10px 2px 14px;
}

.everhowl-print-cards__empty {
  background: #fff;
  border: 2px dashed var(--eh-border);
  border-radius: 12px;
  color: #555;
  font-size: 1.02rem;
  padding: 34px 20px;
  text-align: center;
}

/* ----- The sheet and the cards (the original's paper design) ----- */
.everhowl-print-cards__sheet {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}

.everhowl-print-cards__card {
  background: #fff;
  border: 2px solid #16181d;
  border-radius: 12px;
  color: #16181d;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.everhowl-print-cards__card-photo {
  background: #101010;
  height: 190px;
  position: relative;
}

.everhowl-print-cards__card-img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.everhowl-print-cards__card-img--contain {
  object-fit: contain;
}

.everhowl-print-cards__card-img--art {
  background: #eef0f2;
  object-fit: contain;
}

.everhowl-print-cards__card-x {
  background: #16181d;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  height: 30px;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 30px;
}

.everhowl-print-cards__card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px 10px;
}

.everhowl-print-cards h3.everhowl-print-cards__card-name {
  color: #101216;
  font-family: Fredoka, Nunito, Arial, sans-serif;
  font-size: 23px;
  line-height: 1.12;
  margin: 0;
}

.everhowl-print-cards__card-name a {
  color: inherit;
  text-decoration: none;
}

.everhowl-print-cards__card-splat {
  border: 1.5px solid #1e9e4a;
  border-radius: 999px;
  color: #14632f;
  display: inline-block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  margin: 1px 0 7px;
  padding: 2px 9px;
}

.everhowl-print-cards__card-splat--growth {
  border-color: #c47b4a;
  color: #8a5427;
}

/* ----- Growth-chart cards: the chart is the whole card art ----- */
.everhowl-print-cards__card-img--growth {
  background: #eef0f2;
  object-fit: contain;
}

.everhowl-print-cards__card-body--growth {
  gap: 4px;
}

.everhowl-print-cards__card-origin {
  align-items: center;
  color: #4a5058;
  display: flex;
  font-size: 13.5px;
  gap: 7px;
}

.everhowl-print-cards__card-origin img {
  border: 1px solid #ccc;
  border-radius: 3px;
  height: auto;
  object-fit: contain;
  width: 38px;
}

.everhowl-print-cards__card-clubs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.everhowl-print-cards__card-club {
  border-radius: 20px;
  color: #121212;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 3px 8px;
}

.everhowl-print-cards__card-noclub {
  color: #7a828c;
  font-size: 12px;
}

/* Meters in two columns (v1.6.22): the thirteen meters split across
   two side-by-side columns — seven rows instead of thirteen — with
   each meter's label and value on one line and its bar beneath. */
.everhowl-print-cards__card-meters {
  column-gap: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 2px;
  row-gap: 6px;
}

.everhowl-print-cards__meter {
  align-items: baseline;
  column-gap: 8px;
  display: grid;
  font-size: 12px;
  grid-template-columns: 1fr auto;
  row-gap: 2px;
}

.everhowl-print-cards__meter-label {
  color: #2a2e35;
  font-weight: 700;
  grid-column: 1;
  grid-row: 1;
  line-height: 1.2;
  white-space: nowrap;
}

.everhowl-print-cards__meter-bar {
  display: flex;
  gap: 2.5px;
  grid-column: 1 / -1;
  grid-row: 2;
}

.everhowl-print-cards__meter-seg {
  background: #e3e6ea;
  border-radius: 3px;
  flex: 1;
  height: 9px;
}

.everhowl-print-cards__meter-seg--on {
  background: #1e7a34;
}

.everhowl-print-cards__meter-value {
  color: #101216;
  font-weight: 800;
  grid-column: 2;
  grid-row: 1;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.everhowl-print-cards__card-hook {
  color: #33373d;
  font-size: 13.5px;
  line-height: 1.4;
  margin: 3px 0 0;
}

.everhowl-print-cards__card-foot {
  border-top: 1.5px solid #16181d;
  color: #101216;
  display: flex;
  font-size: 11.5px;
  font-weight: 700;
  justify-content: space-between;
  letter-spacing: 0.5px;
  margin-top: auto;
  padding: 8px 14px;
}

.everhowl-print-cards__card-foot span:last-child {
  color: #1e7a34;
}

/* ----- About ----- */
.everhowl-print-cards__about {
  background: var(--eh-card);
  border: 1px solid var(--eh-border);
  border-radius: 12px;
  margin: 22px 0 0;
  padding: 20px 22px;
}

.everhowl-print-cards h2.everhowl-print-cards__about-title {
  color: var(--eh-charcoal);
  font-family: Fredoka, Nunito, Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 10px;
}

.everhowl-print-cards__about-p {
  color: var(--eh-muted);
  font-size: 0.97rem;
  line-height: 1.65;
  margin: 0 0 12px;
}

.everhowl-print-cards__about-p:last-child {
  margin: 0;
}

.everhowl-print-cards__error {
  color: var(--eh-green-dark);
  font-weight: 700;
  text-align: center;
}

.everhowl-print-cards__loading {
  color: var(--eh-muted);
  text-align: center;
}

/* ----- Screen-only fixes (the printed sheet keeps the original design) -----
   - Photo frames are structurally fixed at one 4:3 aspect so every card in
     a row aligns. v1.6.0 set aspect-ratio on the frame alone, but the img
     stayed in normal flow with height: 100% — a percentage height against
     an auto-height frame is unresolvable, so the img laid out at its
     intrinsic ratio and the frame's height followed the photo (aspect-ratio
     is only a preferred ratio; the in-flow content's min-content height
     wins), leaving contain/letterboxed and tall-portrait frames at
     different heights. The img is now absolutely positioned to fill the
     frame, so it contributes no content height at all and the frame's
     height comes solely from its aspect ratio, identically for every
     breed. The frame's dark #14161a background is the photo mat that shows
     around letterboxed (contain/art) photos. The renderer supplies each
     photo's fit via its cover/contain/art classes and its crop via its
     inline object-position, which this block does not touch.
   - Kennel-club medals on the CARD keep the original solid club colors
     on screen as well as in print (owner decision, 2026-11-17,
     v1.6.22): the renderer's inline per-club background stands, and the
     v1.6.17 silver-plate + glow override that used to live here is
     gone. Dog Profiles and Breed Finder chips keep the silver + glow
     treatment — only this card surface changed. Club identity colors
     are exempt from the glow rules by the owner's standing ruling.
   - Growth-chart frames run taller (3:4) than splat frames so the
     portrait timeline chart letterboxes as little as possible. */
@media screen {
  .everhowl-print-cards__card-photo {
    aspect-ratio: 4 / 3;
    background: #14161a;
    height: auto;
    overflow: hidden;
    position: relative;
  }

  .everhowl-print-cards__card-photo--growth {
    aspect-ratio: 3 / 4;
  }

  .everhowl-print-cards__card-img {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
  }
}

/* ----- Print: only the sheet prints (the original's isolation) ----- */
@media print {
  body * {
    visibility: hidden;
  }

  .everhowl-print-cards__sheet,
  .everhowl-print-cards__sheet * {
    visibility: visible;
  }

  .everhowl-print-cards__sheet {
    gap: 12px;
    grid-template-columns: 1fr 1fr;
    left: 0;
    padding: 0;
    position: absolute;
    top: 0;
    width: 100%;
  }

  .everhowl-print-cards__sheet * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .everhowl-print-cards__card {
    border-width: 1.5px;
    break-inside: avoid;
    flex-direction: row;
    height: 3.85in;
  }

  .everhowl-print-cards__card-x {
    display: none;
  }

  .everhowl-print-cards__card-photo {
    flex: none;
    height: auto;
    width: 37%;
  }

  .everhowl-print-cards__card-body {
    gap: 3px;
    padding: 8px 12px 32px;
  }

  .everhowl-print-cards h3.everhowl-print-cards__card-name {
    font-size: 21px;
  }

  /* The two-column meter layout carries into print (v1.6.22). */
  .everhowl-print-cards__card-meters {
    column-gap: 12px;
    grid-template-columns: 1fr 1fr;
    row-gap: 4px;
  }

  .everhowl-print-cards__meter {
    font-size: 11px;
    row-gap: 1px;
  }

  .everhowl-print-cards__meter-seg {
    height: 7px;
  }

  .everhowl-print-cards__card-hook {
    font-size: 11px;
    line-height: 1.3;
  }

  .everhowl-print-cards__card-foot {
    bottom: 0;
    left: 37%;
    position: absolute;
    right: 0;
  }

  /* Growth-chart cards print as a column: the chart gets the whole
     card width and the height the meters would have taken, contained
     whole (never cropped); name and footer stack under it. */
  .everhowl-print-cards__card--growth {
    flex-direction: column;
  }

  .everhowl-print-cards__card--growth .everhowl-print-cards__card-photo {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
  }

  .everhowl-print-cards__card--growth .everhowl-print-cards__card-img {
    height: 100%;
    object-fit: contain;
    width: 100%;
  }

  .everhowl-print-cards__card--growth .everhowl-print-cards__card-body {
    flex: none;
    padding: 8px 12px 4px;
  }

  .everhowl-print-cards__card--growth .everhowl-print-cards__card-foot {
    left: auto;
    position: static;
    right: auto;
  }

  @page {
    margin: 0.3in;
    size: landscape;
  }
}
