/* Learn page styles */
/* 原有样式保持不变，只添加新的选择框样式 */
.species-filter-container {
  min-width: 120px;
}
.species-filter-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
  appearance: auto;
}
.species-filter-select:focus {
  border-color: #3f51b5;
  box-shadow: 0 0 0 2px rgba(63,81,181,0.1);
}
:root {
  --mdui-shape-corner-extra-small: 0.25rem;
  --mdui-shape-corner-small: 0.5rem;
  --mdui-shape-corner-medium: 0.75rem;
  --mdui-shape-corner-large: 0.75rem;
  --mdui-shape-corner-extra-large: 1rem;
}
/* 其他原有样式保持不变 */
html,body {
  overflow: scroll;
}
html::-webkit-scrollbar,body::-webkit-scrollbar {
  height: 0px;
}
body {
  margin: 0;
  scrollbar-color: #999 rgb(236,230,240);
  overflow: hidden;
}
/* 翻页按钮 */
.page-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 20%;
  background: rgba(152,146,146,0.45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200000;
  font-size: 25px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.page-btn.left {
  left: 12px;
}
.page-btn.right {
  right: 12px;
}
.page-btn:hover {
  background: rgba(107,106,106,0.6);
}
:root {
  --learn-card-width: min(1600px,calc(100vw - 112px));
  --mdui-color-surface-container-highest-light: rgba(0,0,0,0);
  font-size: 18px;
  --mdui-shape-corner-extra-small: 0.3rem;
  --mdui-color-surface: rgba(0,0,0,0);
  --mdui-color-scrim: 255,255,255,0.95;
}
/* 自定义输入选择框样式 */
.input-select-container {
  position: relative;
  flex: 1;
  min-width: 150px;
  width: 100%;
}
.input-select-wrapper {
  position: relative;
  width: 100%;
}
.input-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}
.input-select:focus {
  border-color: #3f51b5;
  box-shadow: 0 0 0 2px rgba(63,81,181,0.1);
}
.input-select.disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.family-genera-section{
  margin-top: 20px;
}

.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
  margin-top: 4px;
  display: none;
}
.suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
}
.suggestion-item:last-child {
  border-bottom: none;
}
.suggestion-item:hover {
  background-color: #f5f5f5;
}
.suggestion-item.active {
  background-color: #e3f2fd;
  color: #3f51b5;
}
.suggestion-item .highlight {
  color: #3f51b5;
  font-weight: 600;
}
.clear-button {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.clear-button:hover {
  color: #666;
}
.dropdown-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}
.no-suggestions {
  padding: 10px 12px;
  color: #999;
  text-align: center;
  font-style: italic;
}
.loading-suggestions {
  padding: 10px 12px;
  color: #999;
  text-align: center;
}
.loading-suggestions::after {
  content: "正在加载...";
  animation: loading-dots 1.5s infinite;
}
#room-learn-box {
  box-sizing: border-box;
  width: var(--learn-card-width);
  max-width: none;
  height: calc(100vh - 24px);
  height: calc(100dvh - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: clamp(20px,2.5vw,40px);
  overflow-y: auto;
  overflow-x: hidden;
  text-align: left;
  border-radius: 18px;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}
#room-learn-box img {
  display: block;
  width: 100%;
  max-width: 100%;
}
#room-learn-overlay {
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  padding: 12px 0;
  background: #f5f7fa;
}
#btn-left {
  position: absolute;
  left: max(6px,calc((100vw - var(--learn-card-width)) / 2 - 52px));
}
#btn-right {
  position: absolute;
  right: max(6px,calc((100vw - var(--learn-card-width)) / 2 - 52px));
}
/* 学习界面顶部进度条 */
#learning-progress-container {
  margin-top: 20px;
  margin-right: 20px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.9);
  border-radius: 20px;
  padding: 8px 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 200001;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.1);
}
#learning-progress-text {
  font-size: 14px;
  color: #3f51b5;
  font-weight: 500;
  white-space: nowrap;
}
#learning-progress-bar-container {
  flex: 1;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}
#learning-progress-bar {
  height: 100%;
  background: linear-gradient(90deg,#4caf50,#66CDAA);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}
/* 练习按钮 */
#practice-btn-container {
  margin-top: 20px;
  margin-right: 20px;
  margin-bottom: 20px;
  z-index: 200001;
}
#practice-btn {
  background: #63cdb0;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(63,81,181,0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
#practice-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(63,81,181,0.4);
  background: #66CDAA;
}
#practice-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(63,81,181,0.3);
}
#practice-btn .btn-icon {
  font-size: 18px;
}
#learning-tool-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  position: sticky;
  top: calc(-1 * clamp(20px,2.5vw,40px));
  z-index: 20;
  margin: calc(-1 * clamp(20px,2.5vw,40px)) calc(-1 * clamp(20px,2.5vw,40px)) 22px;
  padding: 12px clamp(20px,2.5vw,40px);
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid #edf0f5;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.learning-species-switcher {
  position: relative;
  margin-right: auto;
}
.learning-species-switch-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #dfe3ef;
  border-radius: 12px;
  background: #f7f8fc;
  color: #344054;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.learning-species-switch-button:hover {
  color: #3f51b5;
  border-color: #aeb8e6;
  background: #f1f3ff;
}
.learning-label-compact {
  display: none;
}
.learning-scope-toggle {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid #dfe3ef;
  border-radius: 12px;
  background: #fff;
  color: #475467;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.learning-scope-toggle.common {
  border-color: #a8dfc8;
  background: #eaf8f2;
  color: #16845b;
}
.learning-scope-toggle:hover {
  border-color: #aeb8e6;
  color: #3f51b5;
}
.learning-species-menu {
  position: absolute;
  top: calc(100%+8px);
  left: 0;
  width: min(390px,calc(100vw - 40px));
  max-height: min(70dvh,580px);
  padding: 12px;
  overflow: hidden;
  border: 1px solid #e3e7ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(30,41,59,0.18);
}
.learning-species-menu[hidden] {
  display: none;
}
.learning-species-search {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.learning-species-search input {
  min-width: 0;
  flex: 1;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d8deea;
  border-radius: 9px;
  outline: none;
  font: inherit;
  font-size: 14px;
}
.learning-species-search input:focus {
  border-color: #3f51b5;
  box-shadow: 0 0 0 3px rgba(63,81,181,0.12);
}
.learning-species-search button {
  flex: 0 0 auto;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: #3f51b5;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}
.learning-species-menu-hint {
  margin: 0 2px 8px;
  color: #87909f;
  font-size: 12px;
}
.learning-species-list {
  max-height: min(52dvh,420px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.learning-species-item {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #344054;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.learning-species-item[hidden] {
  display: none;
}
.learning-species-item:hover,.learning-species-item.active {
  background: #eef1ff;
  color: #3f51b5;
}
.learning-species-item .latin-name {
  color: #8a93a3;
  font-size: 12px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.learning-species-primary {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.learning-common-badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e7f7ef;
  color: #16845b;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  line-height: 1.5;
}
.learning-card-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.learning-card-title {
  margin: 0 0 4px;
  color: #202938;
  font-size: clamp(28px,3vw,44px);
}
.learning-card-latin {
  margin: 0 0 10px;
  color: #667085;
  font-size: clamp(18px,1.8vw,26px);
  font-style: italic;
  font-weight: 500;
}
.learning-card-meta {
  color: #667085;
  font-size: 14px;
  margin: 10px 0;
}
.learning-card-description {
  max-width: 1000px;
  color: #344054;
  line-height: 1.75;
}
.learning-card-summary {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  grid-template-areas: "identity tabs" "content content";
  align-items: end;
  column-gap: clamp(28px,5vw,80px);
  row-gap: 12px;
  width: 100%;
}
.learning-card-identity {
  grid-area: identity;
  min-width: 0;
}
.learning-info-card {
  display: contents;
}
.learning-info-tabs {
  grid-area: tabs;
  justify-self: end;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #f7f8fa;
}
.learning-info-tab {
  min-height: 36px;
  padding: 7px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #667085;
  font: inherit;
  font-weight: 400;
  cursor: pointer;
  transition: background-color .18s ease,color .18s ease,box-shadow .18s ease;
}
.learning-info-tab:hover:not(:disabled) {
  color: #2f8f75;
}
.learning-info-tab.active {
  background: #63cdb0;
  color: #fff;
  box-shadow: 0 2px 8px rgba(47,143,117,0.18);
}
.learning-info-tab:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.learning-info-panel {
  grid-area: content;
  margin-top: 0;
}
.learning-info-panel[hidden] {
  display: none;
}
.learning-flora-description p {
  margin: 0 0 10px;
  text-align: justify;
}
.learning-flora-description p:last-child {
  margin-bottom: 0;
}
.learning-flora-source {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eaecf0;
  color: #667085;
  font-size: 13px;
}
.learning-flora-source a {
  flex: 0 0 auto;
  color: #2f8f75;
  font-weight: 600;
  text-decoration: none;
}
.learning-flora-source a:hover {
  text-decoration: underline;
}
.learning-image-grid {
  --learning-featured-image-height: clamp(300px,38vw,540px);
  --learning-small-image-height: clamp(145px,16vw,245px);
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  align-items: stretch;
  gap: clamp(10px,1.4vw,18px);
  width: 100%;
  margin-top: 22px;
}
.learning-image-slot {
  width: 100%;
  height: var(--learning-small-image-height);
  min-height: var(--learning-small-image-height);
  max-height: var(--learning-small-image-height);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15,23,42,0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.learning-image-slot.featured {
  grid-column: 1 / -1;
  height: var(--learning-featured-image-height);
  min-height: var(--learning-featured-image-height);
  max-height: var(--learning-featured-image-height);
}
.learning-image-grid img {
  width: 100% !important;
  height: 100% !important;
  min-height: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  cursor: zoom-in;
}
.learning-image-retry {
  border: 0;
  background: transparent;
  color: #667085;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.learning-image-retry:hover {
  color: #3f51b5;
}
.learning-route-loading {
  min-height: calc(100dvh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #667085;
}
.learn-ssr-content {
  color: #344054;
  text-align: left;
}
.learn-ssr-breadcrumb {
  margin-bottom: 22px;
  color: #667085;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.learn-ssr-breadcrumb a {
  color: #3f51b5;
  text-decoration: none;
}
.learn-ssr-header {
  margin-bottom: 24px;
}
.learn-ssr-header > p:first-child {
  margin: 0 0 7px;
  color: #2f8f75;
  font-size: 13px;
  font-weight: 600;
}
.learn-ssr-header h1 {
  margin: 0;
  color: #202938;
  font-size: clamp(28px,3.2vw,42px);
  line-height: 1.25;
}
.learn-ssr-latin {
  margin: 8px 0 0;
  color: #667085;
  font-size: clamp(18px,2vw,25px);
}
.learn-ssr-summary,.learn-ssr-children {
  margin-bottom: 24px;
  padding: clamp(18px,2.4vw,28px);
  border: 1px solid #e6e9ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15,23,42,.05);
}
.learn-ssr-summary h2,.learn-ssr-children h2 {
  margin: 0 0 14px;
  color: #202938;
  font-size: 22px;
}
.learn-ssr-summary p,.learn-ssr-children > p {
  margin: 0 0 11px;
  line-height: 1.8;
}
.learn-ssr-source {
  margin-top: 15px !important;
}
.learn-ssr-source a {
  color: #3f51b5;
}
.learn-ssr-children ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: 10px;
}
.learn-ssr-children li {
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #e3e7ef;
  border-radius: 10px;
  background: #fafbfc;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.learn-ssr-children li a {
  color: #344054;
  font-weight: 500;
  text-decoration: none;
}
.learn-ssr-children li span {
  overflow: hidden;
  color: #87909f;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.learn-ssr-note {
  color: #667085;
  font-size: 13px;
}
.learning-route-loading-mask {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 200100;
  transform: translate(-50%,-50%);
  min-width: 132px;
  padding: 18px 22px;
  border: 1px solid rgba(99,205,176,0.32);
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 14px 36px rgba(15,23,42,0.16);
  color: #475467;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.learn-route-pending > :not(.learning-route-loading-mask) {
  pointer-events: none;
}
.learn-image-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 300000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 52px 28px 28px;
  background: rgba(14,18,28,0.88);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: zoom-out;
  touch-action: pinch-zoom;
}
.learn-image-preview-overlay.active {
  display: flex;
}
.learn-image-preview-overlay img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(94vw,1800px);
  max-height: calc(100dvh - 80px);
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.4);
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
}
.learn-image-preview-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  color: #fff;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.learn-image-preview-close:focus,.learn-image-preview-close:focus-visible {
  outline: none;
  box-shadow: none;
}
.learn-image-preview-close:hover {
  background: rgba(255,255,255,0.24);
}
/* 移动端优化 */
@media (max-width:768px),(min-width:769px) and (max-width:1024px) and (orientation:portrait) and (pointer:coarse) {
  .input-select {
    font-size: 16px;
    padding: 12px 14px;
  }
  .suggestion-item {
    padding: 12px 14px;
    font-size: 16px;
  }
  .species-filter-select {
    font-size: 16px;
    padding: 12px 14px;
  }
  #learning-progress-container {
    margin: 0 !important;
    padding: 7px 10px;
    min-width: 96px;
    gap: 7px;
    flex: 0 0 auto;
  }
  #learning-progress-text {
    font-size: 13px;
  }
  #learning-progress-bar-container {
    display: block;
    min-width: 42px;
    height: 6px;
  }
  #practice-btn-container {
    margin: 0 !important;
    margin-left: auto !important;
    flex: 0 0 auto;
  }
  #practice-btn {
    min-height: 40px;
    padding: 0 10px;
    gap: 4px;
    border-radius: 16px;
    font-size: 13px;
    box-shadow: 0 2px 7px rgba(63,81,181,0.22);
  }
  #practice-btn .btn-icon {
    font-size: 16px;
  }
  #room-learn-overlay {
    padding: 0;
  }
  #room-learn-box {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    padding: 18px 18px 84px;
    border-radius: 0;
    scrollbar-gutter: auto;
  }
  #learning-tool-bar {
    top: -18px;
    margin: -18px -18px 18px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 9px 12px;
  }
  .learning-species-switcher {
    flex: 0 0 auto;
    margin-right: 0;
  }
  .learning-species-switch-button,.learning-scope-toggle {
    min-height: 40px;
    padding: 0 9px;
    gap: 4px;
    font-size: 13px;
  }
  .learning-species-switch-button .material-icons,.learning-scope-toggle .material-icons {
    font-size: 19px;
  }
  .learning-label-full {
    display: none;
  }
  .learning-label-compact {
    display: inline;
  }
  .learning-species-menu {
    position: fixed;
    top: 66px;
    left: 12px;
    right: 12px;
    width: auto;
  }
  .learning-image-grid {
    --learning-featured-image-height: clamp(250px,56vw,380px);
    --learning-small-image-height: clamp(105px,26vw,160px);
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .learning-image-slot {
    height: var(--learning-small-image-height);
    min-height: var(--learning-small-image-height);
    max-height: var(--learning-small-image-height);
  }
  .learning-image-slot.featured {
    height: var(--learning-featured-image-height);
    min-height: var(--learning-featured-image-height);
    max-height: var(--learning-featured-image-height);
  }
  .learning-image-grid img {
    height: 100% !important;
    min-height: 100%;
    max-height: 100%;
  }
  .learning-card-summary {
    display: block;
  }
  .learning-info-card {
    display: block;
    margin-top: 12px;
  }
  .learning-info-tabs {
    display: flex;
    width: 100%;
  }
  .learning-info-tab {
    flex: 1;
    padding-inline: 10px;
  }
  .learning-info-panel {
    margin-top: 12px;
  }
  .learning-flora-source {
    display: block;
  }
  .learning-flora-source a {
    display: inline-block;
    margin-top: 6px;
  }
  #btn-left,#btn-right {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
}
@keyframes loading-dots {
  0%,20% {
    content: "正在加载";
  }
  40% {
    content: "正在加载.";
  }
  60% {
    content: "正在加载..";
  }
  80% {
    content: "正在加载...";
  }
}
/* 物种筛选选择框样式 */
.species-filter-container {
  flex: 0 0 auto;
  width: 100%;
  position: relative;
}
.species-filter-wrapper {
  position: relative;
  width: 100%;
}
.species-filter-select {
  width: 100%;
  padding: 11px 40px 11px 16px;
  font-size: 16px;
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI','Microsoft YaHei',sans-serif;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fff;
  color: #333;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  box-sizing: border-box;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.species-filter-select:hover {
  border-color: #3f51b5;
  background-color: #f8f9fa;
  box-shadow: 0 2px 6px rgba(63,81,181,0.1);
}
.species-filter-select:focus {
  border-color: #3f51b5;
  box-shadow: 0 0 0 2px rgba(63,81,181,0.15),0 2px 8px rgba(63,81,181,0.1);
  background-color: #fff;
}
.species-filter-select option {
  padding: 12px 16px;
  font-size: 15px;
  color: #333;
  background-color: #fff;
}
.species-filter-select option:hover {
  background-color: #f0f2f5;
}
.species-filter-select option:checked {
  background-color: #e8f0fe;
  color: #3f51b5;
  font-weight: 500;
}
/* 选择框标签（可选，如果需要添加标签的话） */
.species-filter-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #5f6368;
  transition: color 0.2s ease;
}
.species-filter-select:focus+.species-filter-label {
  color: #3f51b5;
}
#room-new-box>div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
#family-input,.input-select,.species-filter-select,#btn-random {
  height: 44px;
  box-sizing: border-box;
}
#btn-random {
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  border: 1px solid #e0e0e0;
  background-color: #fff;
  color: #3f51b5;
}
#btn-random:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(63,81,181,0.1);
}
/* 选择框聚焦时的平滑过渡 */
.species-filter-select,#family-input,.input-select {
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}
/* 整体布局优化：当一行放不下时自动换行 */
@media (max-width:1024px) {
  #room-new-box>div:first-child {
    gap: 8px;
  }
  .species-filter-container {
    min-width: 180px;
  }
}
/* Direct taxon navigation */
.taxon-direct-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.taxon-direct-search input {
  min-width: 0;
  flex: 1;
  height: 46px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid #d8deea;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: 15px;
}
.taxon-direct-search input:focus {
  border-color: #3f51b5;
  box-shadow: 0 0 0 3px rgba(63,81,181,.12);
}
.taxon-direct-search button {
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #3f51b5;
  color: #fff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.taxon-direct-search button .material-icons {
  font-size: 20px;
}
.taxon-direct-search-hint {
  margin: 8px 2px 14px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}
.taxon-overview-toolbar {
  position: sticky;
  top: calc(-1 * clamp(20px, 2.5vw, 40px));
  z-index: 20;
  margin: calc(-1 * clamp(20px, 2.5vw, 40px)) calc(-1 * clamp(20px, 2.5vw, 40px)) 28px;
  padding: 13px clamp(20px, 2.5vw, 40px);
  border-bottom: 1px solid #edf0f5;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.taxon-overview-back {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #dfe3ef;
  border-radius: 10px;
  color: #344054;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.taxon-overview-back .material-icons {
  font-size: 19px;
}
.taxon-overview-rank {
  color: #667085;
  font-size: 14px;
}
.taxon-overview-header {
  margin-bottom: 26px;
}
.taxon-overview-header h1 {
  margin: 0;
  color: #202938;
  font-size: clamp(28px, 3.2vw, 42px);
}
.taxon-overview-header p {
  margin: 7px 0 0;
  color: #667085;
  font-size: clamp(18px, 2vw, 26px);
  font-style: italic;
}
.taxon-overview-description,
.taxon-overview-key,
.family-genera-section,
.genus-overview {
  margin-bottom: 28px;
  padding: clamp(18px, 2.4vw, 30px);
  border: 1px solid #e6e9ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}
.taxon-overview-description h2,
.taxon-overview-key h2,
.family-genera-heading h2 {
  margin: 0 0 16px;
  color: #202938;
  font-size: 22px;
}
.family-genera-heading {
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.family-genera-heading h2 {
  margin-bottom: 0;
}
.family-genera-heading span {
  color: #87909f;
  font-size: 14px;
}
.family-genera-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.family-genus-card {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid #e1e5ec;
  border-radius: 12px;
  color: #344054;
  text-decoration: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 10px;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}
.family-genus-card:hover {
  border-color: #8ed5c1;
  background: #f0faf7;
  transform: translateY(-1px);
}
.family-genus-name {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.family-genus-latin {
  overflow: hidden;
  color: #87909f;
  font-size: 12px;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.family-genus-card .material-icons {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: #2f8f75;
  font-size: 18px;
}
.taxon-overview-empty {
  margin: 0;
  color: #87909f;
}
.genus-overview {
  margin-top: 24px;
}
.genus-overview-title {
  margin: -6px;
  padding: 6px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.genus-overview-title::-webkit-details-marker {
  display: none;
}
.genus-overview-title span {
  color: #2f8f75;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.genus-overview-title h2 {
  margin: 4px 0 0;
  color: #202938;
  font-size: 24px;
}
.genus-overview-title p {
  margin: 4px 0 0;
  color: #667085;
  font-style: italic;
}
.genus-overview-expand {
  flex: 0 0 auto;
  color: #667085;
  transition: transform 0.2s ease;
}
.genus-overview[open] .genus-overview-expand {
  transform: rotate(180deg);
}
.genus-overview-content {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #eaecf0;
}
.identification-key-table {
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  scroll-behavior: smooth;
}
.identification-key-row {
  padding: 11px 13px;
  border-bottom: 1px solid #eaecf0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(84px, 150px);
  align-items: start;
  gap: 12px;
  color: #344054;
  font-size: 14px;
  line-height: 1.65;
  scroll-margin-top: 92px;
}
.identification-key-row-highlight {
  animation: identification-key-anchor-highlight 1.4s ease;
}
@keyframes identification-key-anchor-highlight {
  0%,100% {
    background: inherit;
  }
  22%,72% {
    background: #e8f8f3;
  }
}
.identification-key-row:last-child {
  border-bottom: 0;
}
.identification-key-row:nth-child(even) {
  background: #fafbfc;
}
.identification-key-lead {
  color: #2f8f75;
  font-weight: 600;
}
.identification-key-target {
  text-align: right;
}
.identification-key-target a {
  color: #3f51b5;
  font-weight: 500;
  text-decoration: none;
}
.identification-key-target a:hover {
  text-decoration: underline;
}
.identification-key-step-link {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.identification-key-step-link:hover {
  text-decoration: none !important;
}
.identification-key-heading {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.identification-key-heading h2 {
  margin-bottom: 0;
}
.identification-key-interactive-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #8ed5c1;
  border-radius: 10px;
  background: #effaf7;
  color: #237b65;
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.identification-key-interactive-button:hover {
  border-color: #63cdb0;
  background: #e3f7f1;
}
.identification-key-interactive-button .material-icons {
  font-size: 18px;
}
.identification-key-collapsible {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #eaecf0;
}
.identification-key-collapsible > summary {
  padding: 9px 11px;
  border-radius: 9px;
  background: #f7f8fa;
  color: #344054;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
}
.identification-key-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.identification-key-collapsible > summary::-webkit-details-marker {
  display: none;
}
.identification-key-collapsible > summary .identification-key-expand {
  color: #667085;
  transition: transform 0.2s ease;
}
.identification-key-collapsible[open] > summary .identification-key-expand {
  transform: rotate(180deg);
}
.identification-key-collapsible > .identification-key-table {
  margin-top: 12px;
}
.interactive-key-overlay {
  position: fixed;
  inset: 0;
  z-index: 310000;
  padding: 24px;
  background: rgba(15,23,42,0.56);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.interactive-key-overlay.active {
  display: flex;
}
.interactive-key-dialog {
  width: min(760px,100%);
  max-height: min(780px,calc(100dvh - 48px));
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15,23,42,0.3);
  display: flex;
  flex-direction: column;
}
.interactive-key-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid #eaecf0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.interactive-key-header > div > span {
  color: #2f8f75;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
}
.interactive-key-header h2 {
  margin: 4px 0 0;
  color: #202938;
  font-size: 24px;
}
.interactive-key-close {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f4f7;
  color: #475467;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.interactive-key-body {
  min-height: 230px;
  padding: 24px;
  overflow-y: auto;
}
.interactive-key-progress {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.interactive-key-progress span,.interactive-key-eyebrow {
  margin: 0;
  color: #2f8f75;
  font-size: 13px;
  font-weight: 600;
}
.interactive-key-progress strong {
  color: #344054;
  font-size: 18px;
}
.interactive-key-options {
  display: grid;
  gap: 13px;
}
.interactive-key-option {
  width: 100%;
  padding: 17px;
  border: 1px solid #dfe3ea;
  border-radius: 14px;
  background: #fff;
  color: #344054;
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) 24px;
  align-items: center;
  gap: 13px;
  transition: border-color .18s ease,background-color .18s ease,transform .18s ease;
}
.interactive-key-option:hover,.interactive-key-option:focus-visible {
  border-color: #63cdb0;
  outline: none;
  background: #f2fbf8;
  transform: translateY(-1px);
}
.interactive-key-option-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e7f7f2;
  color: #237b65;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.interactive-key-option-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.interactive-key-option-content strong {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
}
.interactive-key-option-content small {
  color: #667085;
  font-size: 13px;
}
.interactive-key-history {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eaecf0;
}
.interactive-key-history summary {
  color: #667085;
  font-size: 13px;
  cursor: pointer;
}
.interactive-key-history ol {
  margin: 12px 0 0;
  padding-left: 22px;
  color: #475467;
  font-size: 13px;
}
.interactive-key-history li {
  margin-bottom: 8px;
  line-height: 1.6;
}
.interactive-key-history li span {
  margin-right: 8px;
  color: #2f8f75;
  font-weight: 600;
}
.interactive-key-result {
  padding: 12px 4px 6px;
  text-align: center;
}
.interactive-key-result-icon {
  color: #39aa85;
  font-size: 52px;
}
.interactive-key-result h3 {
  margin: 7px 0 10px;
  color: #202938;
  font-size: 28px;
}
.interactive-key-result > p:not(.interactive-key-eyebrow) {
  margin: 0 auto;
  max-width: 620px;
  color: #475467;
  line-height: 1.75;
}
.interactive-key-result-link {
  width: fit-content;
  min-height: 42px;
  margin: 20px auto 0;
  padding: 0 16px;
  border-radius: 10px;
  background: #63cdb0;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.interactive-key-result-link .material-icons {
  font-size: 18px;
}
.interactive-key-footer {
  padding: 14px 22px;
  border-top: 1px solid #eaecf0;
  background: #fafbfc;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  font-size: 15px;
}
.interactive-key-footer button {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 9px;
  font: inherit;
  cursor: pointer;
}
.interactive-key-secondary {
  border: 1px solid #d7dce5;
  background: #fff;
  color: #475467;
  font-size: 15px;
}
.interactive-key-secondary:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.interactive-key-primary {
  border: 0;
  background: #63cdb0;
  color: #fff;
  font-size: 15px;
}
.learning-direct-taxonomy {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475467;
  font-size: 14px;
}
.learning-taxonomy-heading {
  color: #344054;
  font-weight: 500;
  white-space: nowrap;
}
.learning-taxonomy-item {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #e1e5ec;
  border-radius: 10px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.learning-taxonomy-label {
  color: #87909f;
  font-size: 12px;
}
.learning-taxonomy-link {
  color: #2f8f75;
  text-decoration: none;
}
.learning-taxonomy-link:hover {
  border-color: #8ed5c1;
  background: #f0faf7;
}
.learning-taxonomy-link .material-icons {
  font-size: 16px;
}
@media (max-width:768px),(min-width:769px) and (max-width:1024px) and (orientation:portrait) and (pointer:coarse) {
  #learning-tool-bar.taxonomy-toolbar {
    flex-wrap: wrap;
  }
  .taxonomy-toolbar .learning-direct-taxonomy {
    order: 5;
    flex: 1 0 100%;
    width: 100%;
    gap: 6px;
    padding-top: 1px;
  }
  .taxonomy-toolbar .learning-taxonomy-item {
    min-height: 34px;
    padding: 0 9px;
    font-size: 13px;
  }
  .taxon-direct-search input,.taxon-direct-search button {
    height: 44px;
  }
  .taxon-direct-search button {
    padding: 0 13px;
  }
  .taxon-direct-search-hint {
    font-size: 12px;
  }
  .taxon-overview-toolbar {
    top: -18px;
    margin: -18px -18px 22px;
    padding: 9px 12px;
  }
  .taxon-overview-header {
    margin-bottom: 20px;
  }
  .taxon-overview-description,
  .taxon-overview-key,
  .family-genera-section,
  .genus-overview {
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 13px;
  }
  .family-genera-grid {
    grid-template-columns: 1fr;
  }
  .identification-key-row {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 7px 9px;
    padding: 10px;
    font-size: 13px;
  }
  .identification-key-target {
    grid-column: 2;
    text-align: left;
  }
  .identification-key-heading {
    align-items: center;
  }
  .identification-key-interactive-button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }
  .identification-key-collapsible > summary {
    gap: 10px;
  }
  .identification-key-summary-actions {
    gap: 5px;
  }
  .interactive-key-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .interactive-key-dialog {
    width: 100%;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
  }
  .interactive-key-header {
    padding: 17px 18px 14px;
  }
  .interactive-key-header h2 {
    font-size: 21px;
  }
  .interactive-key-body {
    min-height: 240px;
    padding: 18px;
  }
  .interactive-key-option {
    padding: 14px 12px;
    grid-template-columns: 30px minmax(0,1fr) 20px;
    gap: 10px;
  }
  .interactive-key-option-number {
    width: 29px;
    height: 29px;
  }
  .interactive-key-footer {
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  }
  .interactive-key-footer button {
    min-width: 0;
    flex: 1;
    padding: 0 9px;
  }
}
