#cs-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 26px;
  z-index: 200;
  display: flex;
  align-items: stretch;
}
#cs-topbar-logo {
  flex-shrink: 0;
  width: 161px;
  background: #BDC9CD;
  display: flex;
  align-items: center;
}
#cs-topbar-logo img { display: block; width: 161px; height: 26px; }
#cs-topbar-bar {
  flex: 1;
  background: #000;
  display: flex;
  align-items: center;
  padding: 0 16px;
}
#cs-topbar-bar a { color:#ccc; font-family:Arial,sans-serif; font-size:12px; text-decoration:none; margin-right:16px; }
#cs-topbar-bar a:hover { color:#fff; }
#cs-topbar-login { margin-left:auto; display:flex; align-items:center; gap:10px; }
#cs-topbar-login a { color:#ccc; font-size:12px; font-family:Arial,sans-serif; text-decoration:none; margin-right:0; }
#cs-topbar-login a.join { background:#8e2d5a; color:#fff; padding:3px 10px; border-radius:3px; font-weight:600; }
#cs-topbar-login a.join:hover { background:#a8356c; }

.cs-sidenav {
  position: fixed;
  top: 26px;
  left: 0;
  width: 161px;
  height: calc(100vh - 26px);
  background: #fff;
  border-right: 1px solid #e1d8e6;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.cs-sidenav::-webkit-scrollbar { display: none; }
.cs-sidenav table { width: 161px; }
.cs-sidenav .iconbox { width:80px; height:80px; display:inline-block; overflow:hidden; }
.cs-sidenav .iconbox img { width:100%; height:100%; display:block; }
.fadein3 img { opacity:1; transition:.1s ease; }
.fadein3 img:hover { opacity:.80; transition:.1s ease; }
.scan { animation:pulse 4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{filter:brightness(1)} 50%{filter:brightness(1.15)} }

.cs-rightnav {
  position: fixed;
  top: 26px;
  right: 0;
  width: 340px;
  height: calc(100vh - 26px);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
  background: #fff;
  scrollbar-width: none;
}
.cs-rightnav::-webkit-scrollbar { display: none; }

.cs-main {
  margin-top: 26px;
  margin-left: 161px;
  padding: 8px 12px;
  padding-right: 360px;
  padding-left: 3px;
  min-height: 100vh;
  width: calc(100vw - 161px);
  box-sizing: border-box;
}

.cs-outer { position: relative; }

#cs-browse-grid { width: 100%; }
.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.cs-card { background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 1px 4px rgba(0,0,0,.12); content-visibility:auto; contain-intrinsic-size:0 380px; }
.cs-card:hover { box-shadow:0 4px 12px rgba(0,0,0,.18); }
.cs-card a { display:block; text-decoration:none; color:inherit; }
.cs-card-wrap { position:relative; cursor:default; touch-action: manipulation; }
.cs-card-img { width:100%; aspect-ratio:1/1; object-fit:cover; display:block; background:#e8e8e8; }
.cs-card-img.error { background:#ddd url("https://www.collarspace.com/images/nophoto.gif") center/60px no-repeat; }
.cs-card-info { padding:10px 12px 12px; }
.cs-card-name { font-weight:600; font-size:14px; color:#777; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:3px; }
.cs-card-meta { font-size:11px; color:#888; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:2px; }
.cs-card-desc { font-size:12px; color:#666; line-height:1.6; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.cs-card-meta2:empty { display:none; }
.cs-meta-mobile { display:none; }
#cs-sentinel { height:40px; margin:10px 0; }
#cs-loading { text-align:center; padding:16px; font-size:13px; color:#999; display:none; }

body { overflow-x: hidden; }

.cs-swipe-badge {
  bottom:6px;
  left:0;
  right:0;
  text-align:center;
  font-size:11px;
  color:#aaa;
  text-shadow:0 1px 3px rgba(0,0,0,0.2);
  pointer-events:none;
  margin-bottom:1px;
  margin-top:-9px;
}

/* ── Card buttons ── */
.cs-card-btns {
  display:flex;
  gap:6px;
  padding:8px 12px 10px;
}
.cs-card-btn {
  flex:1;
  padding:5px 4px;
  font-size:11px;
  font-weight:600;
  border:none;
  border-radius:6px;
  cursor:pointer;
  background:#f0ebe8;
  color:#555;
  text-align:center;
}
.cs-card-btn:hover { background:#e0d8d4; }
.cs-card-btn.profile { background:#8e2d5a; color:#fff; }
.cs-card-btn.profile:hover { background:#a8356c; }

/* ── Modal ── */
#cs-modal {
  display:none;
  position:fixed;
  top:0;left:0;right:0;bottom:0;
  background:rgba(0,0,0,.6);
  z-index:2000;
  align-items:center;
  justify-content:center;
  -webkit-transform:translateZ(0);
  transform:translateZ(0);
}
#cs-modal.active { display:flex; }
#cs-modal-box {
  background:#fff;
  border-radius:12px;
  width: 80%;
  max-width: 80%;
  max-height: 92vh;
  display:flex;
  flex-direction:column;
  -webkit-transform:translateZ(0);
  transform:translateZ(0);
}
#cs-modal-header {
  padding:14px 16px 0;
  flex-shrink:0;
}
#cs-modal-title { font-size:17px; font-weight:700; color:#222; margin-bottom:2px; }
#cs-modal-subtitle { font-size:12px; color:#888; margin-bottom:10px; }
#cs-modal-tabs {
  display:flex;
  border-bottom:1px solid #e0d8d4;
  margin:0 -0px;
}
.cs-modal-tab {
  flex:1;
  padding:8px 4px;
  text-align:center;
  font-size:13px;
  font-weight:600;
  color:#888;
  cursor:pointer;
  border-bottom:2px solid transparent;
  margin-bottom:-1px;
}
.cs-modal-tab.active { color:#8e2d5a; border-bottom-color:#8e2d5a; }
.cs-modal-tab.disabled { color:#ccc; cursor:default; }
#cs-modal-body {
  padding:14px 16px;
  overflow-y:auto;
  flex:1;
  -webkit-overflow-scrolling:touch;
  font-size:14px;
  color:#333;
  line-height:1.6;
  white-space:pre-wrap;
}
#cs-modal-close {
  float:right;
  font-size:22px;
  color:#aaa;
  cursor:pointer;
  line-height:1;
  margin-top:-2px;
}
#cs-modal-profile-link {
  display:block;
  margin-top:14px;
  padding:8px 18px;
  background:#8e2d5a;
  color:#fff;
  border-radius:4px;
  text-decoration:none;
  font-weight:600;
  text-align:center;
}

#cs-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: #000;
  z-index: 200;
  align-items: center;
  justify-content: space-around;
  gap: 40px;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
#cs-mobile-bar a.login,
#cs-mobile-bar a.join {
  color: #fff;
  font-family: Arial,sans-serif;
  font-size: 26px;
  font-weight: 600;
  text-decoration: none;
  padding: 22px 36px;
  border-radius: 4px;
  display: inline-block;
}
#cs-mobile-bar a.login { background: #555; }
#cs-mobile-bar a.join { background: #8e2d5a; }

@media (max-width:1024px) {
  .cs-sidenav { display:none; }
  .cs-rightnav { display:none !important; }
  .cs-main { margin-left:0; width:100vw; padding-right:12px; }
  #cs-mobile-bar { display:flex; }
  .cs-card-name { font-size:24px; }
  .cs-card-meta { font-size:22px; }
  .cs-card-desc { font-size:22px; }
  .cs-swipe-badge { font-size:20px !important; padding:4px 10px !important; }
  .cs-card-btn { font-size:16px; padding:10px 4px; }
  #cs-modal-title { font-size:22px; }
  #cs-modal-subtitle { font-size:16px; }
  .cs-modal-tab { font-size:18px; padding:12px 4px; }
  #cs-modal-body { font-size:18px; }
  .cs-meta-desktop { display:none; }
  .cs-meta-mobile { display:block; font-size:22px; }
  .cs-card-meta2 { display:block; font-size:22px; }
}

.cs-modal-trigger {
  background: none;
  border: none;
  padding: 0 0 0 3px;
  cursor: pointer;
  font-size: 18px;
  color: #aaa;
  line-height: 1;
  flex-shrink: 0;
  font-weight: 300;
}
.cs-modal-trigger:hover { color: #333; }

#cs-modal-photo-viewer {
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  width:100%;
  height:100%;
}
#cs-modal-photo-img {
  display:block;
  max-width:100%;
  max-height: calc(92vh - 200px);
  object-fit:contain;
  border-radius: 8px;
  user-select:none;
  -webkit-user-drag:none;
}
#cs-modal-photo-img.error {
  display:none;
}
#cs-modal-photo-nav {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  margin-top:10px;
  flex-shrink:0;
}
.cs-photo-arrow {
  background:none;
  border:none;
  font-size:28px;
  color:#8e2d5a;
  cursor:pointer;
  padding:4px 10px;
  line-height:1;
  opacity:.7;
  transition:opacity .15s;
  -webkit-tap-highlight-color:transparent;
}
.cs-photo-arrow:hover { opacity:1; }
.cs-photo-arrow:disabled { opacity:.2; cursor:default; }
#cs-modal-photo-counter {
  font-size:13px;
  color:#999;
  min-width:48px;
  text-align:center;
}
@media (max-width:1024px) {
  .cs-photo-arrow { font-size:40px; padding:8px 16px; }
  #cs-modal-photo-counter { font-size:20px; }
}

/* -- Filter bar -- */
#cs-filter-bar {
  position: fixed;
  top: 26px;
  left: 161px;
  right: 340px;
  height: auto;
  min-height: 38px;
  background: #fff;
  border-bottom: 1px solid #e1d8e6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  z-index: 150;
  box-sizing: border-box;
}
#cs-filter-bar select,
#cs-filter-bar input {
  height: 26px;
  border: 1px solid #d0c8d4;
  border-radius: 13px;
  padding: 0 8px;
  font-size: 12px;
  font-family: Arial,sans-serif;
  color: #555;
  background: #faf8fb;
  outline: none;
  box-sizing: border-box;
}
#cs-filter-bar select:focus,
#cs-filter-bar input:focus { border-color: #8e2d5a; }
#csf-sex    { width: 90px; }
#csf-ori    { width: 106px; }
#csf-agemin { width: 46px; text-align: center; }
#csf-agemax { width: 46px; text-align: center; }
#csf-height { width: 90px; }
#csf-weightmax { width: 90px; }
#csf-state  { width: 130px; }
#csf-country { width: 120px; }
#csf-clear { height: 26px; box-sizing: border-box; font-size: 12px; border-radius: 13px; padding: 0 10px; }
.csf-sep { color: #bbb; font-size: 11px; flex-shrink: 0; }
.csf-btngroup {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  vertical-align: middle;
  padding: 3px;
  border: 1px solid #e1d8e6;
  border-radius: 15px;
  background: #fbfafc;
}.csf-btngroup button,
.csf-togglebtn {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  font-family: Arial,sans-serif;
  color: #555;
  background: #faf8fb;
  border: 1px solid #d0c8d4;
  border-radius: 13px;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  box-sizing: border-box;
}
.csf-togglebtn.active {
  background: #8e2d5a;
  border-color: #8e2d5a;
  color: #fff;
}
.csf-btngroup button:hover { background: #f0e8ee; }
.csf-btngroup button.active {
  background: #8e2d5a;
  border-color: #8e2d5a;
  color: #fff;
}
.csf-togglebtn { display: inline-flex; align-items: center; gap: 4px; user-select: none; }
.csf-togglebtn:has(input:checked) {
  background: #8e2d5a;
  border-color: #8e2d5a;
  color: #fff;
}
.csf-rowbreak { flex-basis: 100%; height: 0; }  
.cs-main-with-filter { margin-top: 125px !important; }
@media (max-width:1024px) {
  #cs-filter-bar {
    left: 0;
    right: 0;
    top: 26px;
    height: auto;
    min-height: 44px;
    flex-wrap: wrap;
    padding: 8px;
    gap: 5px;
  }
  #cs-filter-bar select,
  #cs-filter-bar input {
    height: 34px;
    font-size: 16px;
    border-radius: 17px;
    padding: 0 10px;
  }
  .csf-btngroup button,
  .csf-togglebtn,
  #csf-clear {
    height: 34px;
    line-height: 32px;
    font-size: 13px;
    border-radius: 17px;
    padding: 0 12px;
  }
  #csf-sex    { width: 120px; }
  #csf-ori    { width: 130px; }
  #csf-agemin { width: 58px; }
  #csf-agemax { width: 58px; }
  #csf-state  { width: 150px; }
  #csf-height  { width: 120px; }
  #csf-country { width: 140px; }
  .cs-main-with-filter { margin-top: 140px !important; }