/* ==========================================================================
   Annotated Checklist of the Birds of Japan — Interactive UI Styles
   ========================================================================== */

.cl-wrapper {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
}

/* Hero / Intro Header */
.cl-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px 26px;
  margin-bottom: 18px;
}

.cl-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.cl-title {
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.3px;
  margin: 0 0 4px 0 !important;
  line-height: 1.25 !important;
}

.cl-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  margin: 0;
}

.cl-stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cl-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.cl-stat-pill strong {
  color: #0284c7;
  font-weight: 700;
}

.cl-intro-text {
  font-size: 14.5px;
  line-height: 1.7;
  color: #475569;
  margin: 0;
}

.cl-intro-text p {
  margin: 0 0 10px 0 !important;
  padding: 0 !important;
  font-size: 14.5px !important;
  line-height: 1.7 !important;
}

.cl-intro-text p:last-child {
  margin-bottom: 0 !important;
}

.cl-intro-text a {
  color: #0284c7;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Collapsible Key, Pronunciation & Regions Map Card */
.cl-key-details {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.cl-key-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  transition: background 0.15s ease;
}

.cl-key-summary::-webkit-details-marker {
  display: none;
}

.cl-key-summary:hover {
  background: #f1f5f9;
}

.cl-key-summary-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cl-key-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #e0f2fe;
  color: #0284c7;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.cl-key-toggle-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0284c7;
  background: #e0f2fe;
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.cl-key-details[open] .cl-key-chevron {
  transform: rotate(180deg);
}

.cl-key-chevron {
  display: inline-block;
  font-size: 10px;
  transition: transform 0.2s ease;
}

.cl-key-body {
  padding: 20px;
  border-top: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cl-key-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #475569;
  margin: 0 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.cl-key-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-bottom: 16px;
}

.cl-key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #334155;
}

.cl-key-row .cl-ann {
  min-width: 34px;
  justify-content: center;
  flex-shrink: 0;
}

.cl-pronunciation-note {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
}

.cl-regions-box {
  grid-column: 1 / -1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}

.cl-map-link {
  display: block;
  text-align: center;
}

.cl-map-img {
  max-width: 240px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 4px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.cl-region-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.cl-region-btn {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 11px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.45;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cl-region-btn:hover {
  border-color: #38bdf8;
  background: #f0f9ff;
}

.cl-region-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Sticky Search & Navigation Toolbar */
.cl-toolbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 6px 20px -4px rgba(15, 23, 42, 0.1);
}

.cl-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cl-search-box {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.cl-search-icon {
  position: absolute;
  left: 13px;
  color: #64748b;
  font-size: 15px;
  pointer-events: none;
}

#cl-search-input {
  width: 100%;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px !important;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  padding: 10px 38px 10px 38px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

#cl-search-input:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

#cl-search-clear {
  position: absolute;
  right: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

#cl-search-clear.visible {
  display: inline-flex;
}

#cl-search-clear:hover {
  background: #cbd5e1;
  color: #0f172a;
}

.cl-results-count {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cl-mobile-controls-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f1f5f9;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.cl-mobile-controls-btn.active {
  background: #e0f2fe;
  border-color: #38bdf8;
  color: #0369a1;
}

.cl-controls-drawer {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cl-nav-selects {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.cl-select {
  width: 100%;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  outline: none;
}

.cl-select:focus {
  border-color: #0284c7;
  background: #ffffff;
}

.cl-collapse-all-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cl-collapse-all-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* Filter Chips Row */
.cl-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.cl-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.cl-chip:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.cl-chip.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.cl-chip-count {
  font-size: 11.5px;
  opacity: 0.85;
}

/* Empty Search State */
.cl-empty-state {
  display: none;
  text-align: center;
  padding: 44px 20px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  margin: 16px 0;
}

.cl-empty-state.visible {
  display: block;
}

.cl-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.cl-empty-sub {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 14px;
}

.cl-reset-btn {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.cl-reset-btn:hover {
  background: #0369a1;
}

/* Order Sections */
.cl-order {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  scroll-margin-top: 140px;
}

.cl-order.hidden-by-filter {
  display: none !important;
}

.cl-order-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #1e293b;
  color: #ffffff;
  border: none;
  padding: 13px 18px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cl-order-header:hover {
  background: #334155;
}

.cl-order-title-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.cl-order-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.7px;
  color: #f8fafc;
}

.cl-order-en {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

.cl-order-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cl-order-count {
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 3px 9px;
  border-radius: 999px;
}

.cl-order-chevron {
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.cl-order.collapsed .cl-order-chevron {
  transform: rotate(-90deg);
}

.cl-order.collapsed .cl-order-body {
  display: none;
}

/* Family Groups */
.cl-family {
  border-bottom: 1px solid #e2e8f0;
  scroll-margin-top: 140px;
}

.cl-family:last-child {
  border-bottom: none;
}

.cl-family.hidden-by-filter {
  display: none !important;
}

.cl-family-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  background: #f1f5f9;
  padding: 9px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.cl-family-titles {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.cl-family-en {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
}

.cl-family-sci {
  font-size: 13.5px;
  font-style: italic;
  font-weight: 600;
  color: #475569;
}

.cl-family-jp {
  font-size: 13px;
  font-weight: 500;
  color: #0369a1;
  background: #e0f2fe;
  padding: 1px 8px;
  border-radius: 6px;
}

.cl-family-count {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

/* Species Rows */
.cl-species-list,
#wsite-content .cl-species-list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.cl-species,
#wsite-content .cl-species {
  margin: 0 !important;
  padding: 12px 18px !important;
  border-bottom: 1px solid #f1f5f9;
  list-style: none !important;
  background-image: none !important;
  transition: background 0.12s ease;
  scroll-margin-top: 150px;
}

.cl-species:last-child {
  border-bottom: none;
}

.cl-species:hover {
  background: #f8fafc;
}

.cl-species.hidden-by-filter {
  display: none !important;
}

.cl-species-grid {
  display: grid;
  grid-template-columns: minmax(240px, 2.1fr) minmax(135px, 1fr) minmax(240px, 2fr);
  gap: 14px;
  align-items: baseline;
}

.cl-sp-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cl-sp-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.cl-sp-en {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.cl-species.is-extinct .cl-sp-en {
  color: #475569;
}

.cl-sp-sci-line {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.45;
}

.cl-sp-sci {
  font-style: italic;
}

.cl-sp-ssp {
  font-size: 12.5px;
  color: #64748b;
}

.cl-sp-jp {
  font-size: 14px;
  font-weight: 600;
  color: #0369a1;
  line-height: 1.4;
}

.cl-sp-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 6px;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.5;
}

.cl-sp-status a {
  color: #0284c7;
  text-decoration: underline;
}

/* ==========================================================================
   Color-Coded Annotation Boxes (.cl-ann & .cl-clause)
   ========================================================================== */
.cl-clause {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 4px;
}

.cl-clause-extinct {
  opacity: 0.85;
  border-style: dashed;
}

.cl-ann {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  padding: 2px 5.5px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: help;
  user-select: none;
  transition: transform 0.1s ease, box-shadow 0.12s ease;
}

.cl-ann:hover,
.cl-ann:focus {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.14);
}

/* Abundance / Frequency */
.cl-ann-c {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.cl-ann-f {
  background: #ccfbf1;
  color: #115e59;
  border-color: #5eead4;
}

.cl-ann-u {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

.cl-ann-r {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}

.cl-ann-acc {
  background: #ffe4e6;
  color: #be123c;
  border-color: #fda4af;
}

/* Modifiers & Origin Flags */
.cl-ann-i {
  background: #eef2ff;
  color: #4338ca;
  border-color: #a5b4fc;
}

.cl-ann-F {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #d8b4fe;
}

.cl-ann-E {
  background: #bbf7d0;
  color: #14532d;
  border-color: #4ade80;
}

.cl-ann-X {
  background: #ffe4e6;
  color: #9f1239;
  border-color: #fda4af;
}

.cl-ann-U {
  background: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
}

.cl-ann-q {
  background: #fef9c3;
  color: #854d0e;
  border-color: #fde047;
}

/* Seasonality */
.cl-ann-P {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

.cl-ann-S {
  background: #fef08a;
  color: #854d0e;
  border-color: #facc15;
}

.cl-ann-W {
  background: #cffafe;
  color: #155e75;
  border-color: #67e8f9;
}

.cl-ann-M {
  background: #ecfccb;
  color: #3f6212;
  border-color: #bef264;
}

/* Biogeographic Region Codes (1–6) */
.cl-ann-reg {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
  font-weight: 700;
}

.cl-comma {
  font-size: 12px;
  color: #64748b;
  padding: 0 1px;
}

.cl-sep {
  color: #94a3b8;
  font-weight: 700;
  margin: 0 1px;
}

.cl-status-note {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}

/* Top-Line Species Category Badges */
.cl-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 5px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  cursor: help;
}

.cl-badge-endemic {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.cl-badge-extinct {
  background: #ffe4e6;
  color: #9f1239;
  border: 1px solid #fda4af;
}

.cl-badge-unaccepted {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.cl-badge-feral {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #c4b5fd;
}

.cl-badge-note {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}

.cl-badge-note:hover {
  background: #bae6fd;
}

/* Instant Floating Tooltip Popover */
.cl-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 290px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 11px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.45);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.cl-tooltip.visible {
  opacity: 1;
  visibility: visible;
}

.cl-tooltip strong {
  color: #38bdf8;
  font-weight: 700;
}

/* Inline Expandable Footnote Box inside Species Row */
.cl-inline-note {
  display: none;
  margin: 8px 0 2px 0;
  padding: 10px 14px;
  background: #f0f9ff;
  border-left: 3px solid #0284c7;
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #1e293b;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cl-inline-note.open {
  display: block;
}

.cl-inline-note a {
  color: #0284c7;
  text-decoration: underline;
}

/* Footnotes Section at Bottom */
.cl-footnotes-section {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 22px 24px;
  margin-top: 24px;
  scroll-margin-top: 140px;
}

.cl-footnotes-title {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 14px 0 !important;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.cl-footnote-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cl-footnote-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #334155;
  overflow-wrap: break-word;
  word-break: break-word;
  scroll-margin-top: 150px;
}

.cl-footnote-card:target {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.cl-fn-num {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  background: #0284c7;
  color: #ffffff;
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 6px;
}

.cl-fn-back {
  display: inline-block;
  margin-left: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0284c7;
  white-space: nowrap;
}

.cl-committee-box {
  margin-top: 18px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  color: #334155;
}

/* Floating Back-to-Top Button */
.cl-back-to-top {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 10px 16px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.cl-back-to-top.visible {
  display: inline-flex;
}

.cl-back-to-top:hover {
  background: #0284c7;
  border-color: #0284c7;
  transform: translateY(-2px);
}

/* ==========================================================================
   Tablet & Mobile Responsive Overrides
   ========================================================================== */
@media screen and (max-width: 900px) {
  .cl-nav-selects {
    grid-template-columns: 1fr 1fr;
  }

  .cl-species-grid {
    grid-template-columns: 1.6fr 0.9fr 1.5fr;
  }
}

@media screen and (max-width: 768px) {
  .cl-hero {
    padding: 18px 16px;
    margin-bottom: 14px;
  }

  .cl-title {
    font-size: 20px !important;
  }

  .cl-subtitle {
    font-size: 13.5px;
  }

  .cl-intro-text,
  .cl-intro-text p {
    font-size: 15px !important;
    line-height: 1.65 !important;
  }

  .cl-key-summary {
    padding: 13px 14px;
    font-size: 14.5px;
  }

  .cl-key-toggle-hint .cl-hint-text {
    display: none;
  }

  .cl-key-body {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 16px;
  }

  .cl-regions-box {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 14px;
  }

  .cl-map-img {
    max-width: 220px;
    margin: 0 auto;
  }

  /* Compact Sticky Search Bar on Mobile */
  .cl-toolbar {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 14px;
  }

  .cl-search-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .cl-search-box {
    flex: 1 1 100%;
  }

  #cl-search-input {
    padding: 10px 36px 10px 36px;
    font-size: 16px !important;
  }

  .cl-results-count {
    flex: 1 1 auto;
    padding: 8px 10px;
    font-size: 12.5px;
    text-align: center;
  }

  .cl-mobile-controls-btn {
    display: inline-flex;
    flex: 1 1 auto;
  }

  .cl-controls-drawer {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
  }

  .cl-toolbar.drawer-open .cl-controls-drawer {
    display: flex;
  }

  .cl-nav-selects {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cl-select {
    font-size: 16px !important;
    padding: 9px 10px;
  }

  .cl-collapse-all-btn {
    padding: 10px 12px;
    font-size: 14px;
    text-align: center;
  }

  .cl-chip {
    font-size: 13px;
    padding: 7px 13px;
  }

  /* Order & Family Mobile Spacing */
  .cl-order {
    scroll-margin-top: 120px;
  }

  .cl-order-header {
    padding: 12px 14px;
  }

  .cl-order-name {
    font-size: 15px;
  }

  .cl-family {
    scroll-margin-top: 120px;
  }

  .cl-family-header {
    padding: 9px 14px;
  }

  .cl-family-en {
    font-size: 15px;
  }

  /* Mobile Species Stacked Card Layout (clean single-column without checkbox) */
  .cl-species {
    padding: 13px 14px !important;
  }

  .cl-species-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .cl-sp-en {
    font-size: 16.5px;
  }

  .cl-sp-sci-line {
    font-size: 14px;
    margin-top: 1px;
  }

  .cl-sp-jp {
    font-size: 14.5px;
    margin-top: 1px;
  }

  .cl-sp-status {
    margin-top: 5px;
    padding-top: 4px;
  }

  .cl-ann {
    font-size: 12.5px;
    padding: 3px 6.5px;
  }

  .cl-inline-note {
    margin: 8px 0 2px 0;
    font-size: 14px;
  }

  .cl-footnotes-section {
    padding: 16px 14px;
  }

  .cl-footnote-card {
    font-size: 14.5px;
  }

  .cl-back-to-top {
    right: 14px;
    bottom: 16px;
    padding: 10px 14px;
  }
}
