/* Preserve the original desktop design; adapt only screens narrower than its 864px layout. */
@media (max-width: 879px) {
/* Shared responsive layout. The original brand colors and content are retained. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; padding: 12px; font-size: 14px; }
#container, #container_admin {
  display: grid;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  background: #ffffcc;
  grid-template-columns: 172px minmax(0, 1fr) 172px;
  grid-template-areas: "header header header" "menu menu menu" "breeder content owner" "footer footer footer";
  align-items: start;
}
#container_admin {
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-areas: "header header" "menu menu" "adminnav admincontent" "footer footer";
}
#header { grid-area: header; display: flex; width: 100%; height: auto; }
#header > a { display: block; flex: 0 0 23.058824%; min-width: 0; }
#header img { display: block; float: none; width: 100%; height: auto; }
#flash_header { flex: 1 1 0; min-width: 0; float: none; width: auto; height: auto; background: none; }
#menu {
  grid-area: menu; display: flex; flex-wrap: wrap; align-items: center;
  gap: 0 6px; width: 100%; height: auto; min-height: 44px;
  margin: 0; padding: 4px 8px; background: #806f41; position: relative; z-index: 10;
}
#menu ul { list-style: none; margin: 0; padding: 0; line-height: 1.4; }
#menu > #nav { display: flex; flex: 1 1 600px; flex-wrap: wrap; order: 1; gap: 0 2px; }
#menu > ul.login { display: flex; order: 2; float: none; margin-left: auto; }
#menu li { float: none; margin: 0; padding: 0; position: relative; }
#menu #nav > li { display: flex; align-items: center; }
#menu li > a { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 9px; font-size: 14px; color: #fff5de; }
#menu a:hover { color: #fff; border: 0; text-decoration: underline; }
#menu ul li ul, #menu ul li:hover ul, #menu ul li.sfhover ul {
  display: none; position: absolute; top: 100%; left: 0; min-width: 210px;
  max-width: min(280px, 90vw); padding: 6px; background: #806f41;
  box-shadow: 0 3px 8px #0003; z-index: 20;
}
#menu #nav > li[data-open="true"] > ul { display: block; }
#menu ul li ul li { display: block; margin: 0; }
#menu ul li ul li a { display: block; width: 100%; white-space: normal; background: #ffffcc; color: #553b16; padding: 9px; }
#menu .nav-toggle { min-width: 32px; min-height: 38px; padding: 4px; border: 0; color: #fff5de; background: transparent; cursor: pointer; font: inherit; }
#menu a:focus-visible, #menu button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #2769ae; outline-offset: 2px; }
#menu a:focus-visible, #menu button:focus-visible { outline-color: #fff; }
a.btn { display: flex; align-items: center; justify-content: center; width: 142px; max-width: 100%; height: 43px; padding: 5px; line-height: 1.2; background-size: 100% 100%; }
a.btn:hover { font-size: 12px; }
#breeder_col { grid-area: breeder; }
#owner_col { grid-area: owner; }
#content { grid-area: content; }
#left_col { grid-area: adminnav; }
#content_admin { grid-area: admincontent; }
#breeder_col, #owner_col, #content, #content_admin, #left_col {
  float: none; min-width: 0; width: auto; max-width: 100%; margin: 0; padding: 16px;
}
#breeder_col, #owner_col { padding: 16px 10px; }
#left_col { margin: 12px 0 12px 12px; }
#content, #content_admin { overflow-wrap: anywhere; }
#content > :first-child, #content_admin > :first-child { margin-top: 0; }
#content img, #content_admin img, #breeder_col img, #owner_col img, #content input[type="image"] { max-width: 100%; height: auto; }
#content font, #content_admin font { font-size: inherit; }
#content table, #content_admin table { max-width: 100%; }
#content_admin table.tablesorter { display: block; overflow-x: auto; }
#footer { grid-area: footer; clear: none; width: 100%; background: #c39243; }
#content .jcarousel-container-horizontal { width: 100%; max-width: 100%; }
#content .jcarousel-clip-horizontal { width: 100%; }
#content .slider-images-css { height: 87px; width: 90%; object-fit: contain; }
form.change { font-size: 14px; line-height: 1.5; }
form.change fieldset { min-width: 0; margin: 12px 0; }
form.change label { font-size: 14px; }
form.change input, form.change select, form.change textarea { max-width: 100%; font: inherit; }
form.change input[type="submit"], form.change button { min-height: 36px; padding: 5px 12px; cursor: pointer; }
form.change textarea { width: min(100%, 360px); }
p.new { gap: 4px; flex-wrap: wrap; min-height: 36px; }
.skip-link { position: absolute; top: -100px; left: 12px; z-index: 100; padding: 12px; background: #fff; color: #222; }
.skip-link:focus { top: 12px; }
@media (max-width: 800px) {
  body { padding: 8px; font-size: 16px; }
  #container, #container_admin {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "header" "menu" "content" "breeder" "owner" "footer";
  }
  #container_admin { grid-template-areas: "header" "menu" "admincontent" "adminnav" "footer"; }
  #content, #content_admin, #breeder_col, #owner_col, #left_col { padding: 16px; margin: 0; }
  #menu { padding: 4px; }
  #menu > #nav { flex-basis: 100%; }
  #menu > ul.login { margin: 4px 0 0; width: 100%; border-top: 1px solid #a79568; }
  #menu li > a, #menu .nav-toggle { min-height: 42px; }
  #menu #nav > li { position: static; }
  #menu #nav > li > ul { left: 4px; right: 4px; top: 100%; width: auto; max-width: none; }
  #content h3.title, #content_admin h3.title { font-size: 20px; }
  form.change label, form.change label.long { float: none; display: block; width: auto; margin: 10px 0 2px; text-align: left; font-size: 16px; }
  form.change input:not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="hidden"]), form.change select, form.change textarea { width: 100%; font-size: 16px; }
  form.change fieldset { padding: 10px; }
  form.change input[type="submit"] { min-height: 42px; }
  .g-recaptcha { max-width: 100%; }
}

/* Keep old inline layout widths inside the available screen. */
#content iframe, #content_admin iframe { max-width:100%; }
#content h1, #content h2, #content h3, #content_admin h1, #content_admin h2, #content_admin h3 { max-width:100%; }
#content fieldset, #content_admin fieldset { min-width:0; }
.responsive-table { width:100%; max-width:100%; overflow-x:auto; }
#content .responsive-table table, #content_admin .responsive-table table { max-width:none; }
#mycarousel li { overflow-wrap:anywhere; }
.ad-placeholder { display:flex; align-items:center; justify-content:center; height:87px; padding:8px; background:#efe6cb; color:#553b16; }
@media(max-width:800px) {
 #content table:not(.tablesorter), #content_admin table:not(.tablesorter) { width:100%; }
 #content td, #content_admin td { overflow-wrap:anywhere; }
 #content .left, #content .right { float:none; max-width:100%; }
 #left_col ul { padding-left:18px; }
 #content form, #content_admin form { max-width:100%; }
 #content fieldset input, #content_admin fieldset input { max-width:100%; }
}
@media(max-width:380px) {
 .g-recaptcha { transform:scale(.75); transform-origin:left top; }
}

}
@media (min-width: 880px) {
 #menu .nav-toggle { display:none; }
 #menu li:focus-within > ul { display:block; z-index:20; }
}
.responsive-table { max-width:100%; overflow-x:auto; }
.ad-placeholder { display:flex; align-items:center; justify-content:center; min-height:87px; background:#efe6cb; color:#553b16; }

/* Keep the original dimensions and artwork without the old float collisions. */
@media (min-width:880px) {
 #container { display:grid; grid-template-columns:172px 505px 172px; grid-template-areas:"header header header" "menu menu menu" "breeder content owner" "footer footer footer"; align-items:start; }
 #container_admin { display:grid; grid-template-columns:200px 664px; grid-template-areas:"header header" "menu menu" "adminnav admincontent" "footer footer"; align-items:start; }
 #header { grid-area:header; display:flex; }
 #header > a { display:block; flex:0 0 196px; }
 #flash_header { float:none; }
 #menu { grid-area:menu; display:flex; align-items:flex-start; position:relative; z-index:10; }
 #menu > #nav { display:flex; flex:1; order:1; }
 #menu > ul.login { display:flex; order:2; float:none; }
 #menu li { float:none; padding:0 8px; white-space:nowrap; }
 #menu ul li ul li { padding:0; }
 #breeder_col { grid-area:breeder; }
 #owner_col { grid-area:owner; }
 #content { grid-area:content; }
 #left_col { grid-area:adminnav; }
 #content_admin { grid-area:admincontent; max-width:634px; min-width:0; }
 #footer { grid-area:footer; clear:none; }
 #content, #content_admin, #breeder_col, #owner_col, #left_col { float:none; }
}
