:root {
  --bg: #f2f4f6;
  --bg-light:#f6fbfe;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #71717A;
  --disable: #A1A1AA;
  --border: #E4E4E7;
  --brand: #15A675;
  --brand-light: #d8f2e8;
  --brand-hover: #0f8f62;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg-light);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

body.modal-locked {
  overflow: hidden;
}

.top-zone {
  background:
    radial-gradient(circle at 14% -20%, #cbf5ea 8%, transparent 50%),
    radial-gradient(circle at 100% 0%, #d2e5ff 0%, transparent 40%),
    var(--bg);
  box-shadow: inset 0 -8px 40px #ffffff;
}

.topbar {
  position: relative;
  z-index: 50;
  padding: 0 24px;
}

.safe-wrap {
  width: 100%;
  max-width: 1248px;
  margin-left: auto;
  margin-right: auto;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.logo {
  display: block;
  height: 32px;
  width: auto;
  cursor: pointer;
}

.logo-context-menu,
.library-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: flex;
  width: 240px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(24, 24, 27, 0.16);
  padding: 6px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 90;
}

.library-dropdown-menu {
  width: 180px;
}

.logo-context-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.top-link-wrapper {
  position: relative;
}

.top-links .top-link-trigger {
  padding-right: 16px;
}

.top-links .top-link-trigger::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.4px solid var(--disable);
  border-bottom: 1.4px solid var(--disable);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.top-link-trigger:hover::after {
  border-color: var(--brand);
  transform: translateY(-20%) rotate(-135deg);
}

.top-link-dropdown:hover .library-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.top-link-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 8px;
}

.logo-context-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  line-height: 24px;
  text-transform: none;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.logo-context-item:hover {
  background: var(--bg);
}

.logo-context-icon {
  width: 16px;
  height: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-context-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.logo-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.4);
  color: var(--text);
  transition: border 0.2s ease, background 0.2s ease, transform 0.3s ease;
  cursor: pointer;
  transform: translateY(0px);
}

.logo-button:hover {
  background: rgba(255, 255, 255, 0.8);
}

.logo-button[aria-expanded="true"] {
  border-color: var(--disable);
}

.logo-button svg {
  width: 16px;
  height: 16px;
  fill: var(--text);
}

.logo-matrix-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 328px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(24, 24, 27, 0.16);
  border: 1px solid var(--border);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 90;
}

.logo-matrix-popover.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.logo-matrix-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.logo-matrix-item {
  text-decoration: none;
  color: var(--text);
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--bg);
  padding: 12px 16px 16px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0px;
  transition: border 0.2s ease, background 0.2s ease;
}

.logo-matrix-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.logo-matrix-item span {
  width: 100%;
  font-size: 13px;
  line-height: 22px;
  text-align: center;
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.logo-matrix-item span[data-name][data-desc] {
  position: relative;
  overflow-y: hidden;
  color: transparent;
}

.logo-matrix-item span[data-name][data-desc]::before,
.logo-matrix-item span[data-name][data-desc]::after {
  position: absolute;
  left: 50%;
  top: 0;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  color: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo-matrix-item span[data-name][data-desc]::before {
  content: attr(data-name);
  transform: translate(-50%, 0);
  opacity: 1;
}

.logo-matrix-item span[data-name][data-desc]::after {
  content: attr(data-desc);
  transform: translate(-50%, 100%);
  opacity: 0;
}

.logo-matrix-item:hover span[data-name][data-desc]::before {
  transform: translate(-50%, -100%);
  opacity: 0;
}

.logo-matrix-item:hover span[data-name][data-desc]::after {
  transform: translate(-50%, 0);
  opacity: 1;
}

.logo-matrix-item:hover {
  border: 1px solid var(--disable);
  background: var(--surface);
}

.version-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
  font-weight: 600;
  color: #90f9d5;
  background: var(--text);
}

.top-links {
  display: flex;
  gap: 24px;
}

.top-link-item {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
}

.github-link {
    padding: 2px;
}

.top-link-item:hover .top-links-text,
.top-link-item:hover .top-links-icon {
  color: var(--brand);
}

.top-links-text {
  color: var(--text);
  font-size: 14px;
  line-height: 24px;
  transition: color 0.2s ease;
}

.top-links-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  font-size: 0;
  color: var(--text);
  transition: color 0.2s ease;
}

.top-links-icon svg {
  width: 16px;
  height: 16px;
}

.github-link-icon, .github-link-icon svg {
  width: 20px;
  height: 20px;
}

.github-link .top-links-text {
  display: none;
}

.mobile-menu-trigger {
  display: none;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
}

.mobile-menu-trigger svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.mobile-menu-trigger:hover {
  border: 1px solid var(--disable);
  background: var(--surface);
}

.mobile-menu-trigger:hover .icon-close {
  transform: rotate(90deg);
}

.mobile-menu-trigger .icon-close {
  display: none;
}

.topbar.mobile-menu-open .mobile-menu-trigger .icon-menu {
  display: none;
}

.topbar.mobile-menu-open .mobile-menu-trigger .icon-close {
  display: block;
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.hero {
  position: relative;
  margin: 0 auto;
  padding: 48px 24px 100px;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
}

.hero-content {
  position: relative;
  z-index: 2;
  flex: 1 1 0;
  min-width: 0;
}

.hero-tag-area {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--surface);
  padding: 3px 16px 3px 3px;
  border-radius: 999px;
  width: fit-content;
  box-shadow: 0 8px 24px rgba(24, 24, 27, 0.08);
  max-width: calc(100% - 24px);
}

.hero-tag-text {
  font-size: 14px;
  line-height: 1;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-content h1 {
  margin: 24px 0 12px 0;
  font-size: 40px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.hero-content p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 24px;
}

/*svg动画版*/

/* .hero-illustration {
  position: relative;
  z-index: 2;
  flex: 0 0 482px;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
}

.hero-illustration svg {
  width: 242px;
  position: absolute;
  z-index: -1;
}

.hero-illustration img {
  display: block;
  width: 482px;
}

.hero-illustration-fill {
  fill: var(--brand);
  fill-opacity: 0;
}

.hero-illustration-stroke {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
} */

.hero-illustration {
  position: relative;
  z-index: 2;
  flex: 0 0 482px;
  width: 482px;
  height: 242px;
  overflow: visible;
}

.hero-illustration-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* 粒子动画 iframe：撑大到 640×360 并居中溢出容器，给粒子扩散留出超出 482×242 的空间；
   构图静止尺寸由 qingicon-hero.html 内的 FIELD 锁定，不随 iframe 放大而变大 */
.hero-illustration-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 640px;
  height: 360px;
  transform: translate(-50%, -50%);
  display: block;
  border: 0;
  z-index: 1;
}

.library {
  margin: 0 auto;
  margin-top: -32px;
  padding: 0 24px;
  position: relative;
  z-index: 5;
}

.toolbar {
  position: sticky;
  width: 100%;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-start;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  border: none;
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface);
  box-shadow: 0 8px 40px rgba(24, 24, 27, 0.08);
}

.toolbar-left {
  width: 100%;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  gap: 8px;
}

.control span {
  white-space: nowrap;
}

.advanced-tools {
  position: relative;
}

.advanced-tools-trigger {
  border: 1px solid transparent;
  padding: 9px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border 0.2s ease, background 0.2s ease;
}

.advanced-tools-trigger:hover {
  border-color: var(--disable);
}

.advanced-tools.open .advanced-tools-trigger {
  border-color: var(--brand);
  background: var(--surface);
}

.advanced-tools-trigger svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.advanced-tools-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(24, 24, 27, 0.16);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(0, -4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 80;
}

.advanced-tools.open .advanced-tools-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(0, 0);
}

.advanced-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.advanced-option:hover {
  background: var(--bg);
}

.advanced-option > span:last-child {
  font-size: 14px;
  line-height: 24px;
  color: var(--text);
}

.advanced-option-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.advanced-help-btn {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--disable);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.16s ease;
}

.advanced-help-btn:hover {
  color: var(--brand);
}

.advanced-help-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.advanced-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.optical-size-switch {
  position: relative;
  width: 24px;
  height: 14px;
  border-radius: 999px;
  background: var(--disable);
  display: inline-flex;
  align-items: center;
  transition: background 0.2s ease;
}

.optical-size-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.advanced-option.disabled .optical-size-switch input {
  cursor: not-allowed;
}

.optical-size-knob {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(2px);
  transition: transform 0.2s ease;
  pointer-events: none;
}

.optical-size-switch input:checked + .optical-size-knob {
  transform: translateX(12px);
}

.optical-size-switch:has(input:checked) {
  background: var(--brand);
}

.advanced-option.disabled .optical-size-switch {
  background: var(--disable);
}

.advanced-option.disabled .optical-size-knob {
  transform: translateX(2px) !important;
}

.search-bar {
  width: 100%;
  position: relative;
}

.search-icon {
  position: absolute;
  width: 16px;
  height: 16px;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-icon svg {
  fill: var(--disable);
  transition: fill 0.2s ease;
}

.select-icon {
  position: absolute;
  width: 16px;
  height: 16px;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}

.select-icon svg {
  fill: var(--disable);
}

.search-clear {
  position: absolute;
  width: 16px;
  height: 16px;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.search-clear.visible {
  opacity: 1;
  pointer-events: auto;
}

.search-clear svg {
  fill: var(--disable);
  transition: fill 0.2s ease;
}

.search-clear:hover svg {
  fill: var(--text);
  transition: fill 0.2s ease;
}

.control input,
.select-trigger {
  border-radius: 6px;
  padding: 5px 36px;
  background: none;
  color: var(--text);
  font-size: 14px;
  line-height: 24px;
}

.custom-select {
  position: relative;
}

.select-trigger {
  width: 100%;
  text-align: left;
  cursor: pointer;
  position: relative;
  padding-right: 24px;
  padding-left: 34px;
  font-size: 14px;
  line-height: 24px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  background-color: var(--bg);
}

.select-trigger:hover {
  border-color: var(--disable);
  transition: all 0.2s ease;
}

.select-trigger::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.4px solid var(--disable);
  border-bottom: 1.4px solid var(--disable);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.custom-select.open .select-trigger {
  border-color: var(--brand);
  background-color: var(--surface);
}

.custom-select.open .select-trigger::after {
  transform: translateY(-30%) rotate(-135deg);
  transition: transform 0.2s ease;
}

.sketch-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 5px 12px;
}

.sketch-trigger::after {
  display: none;
}

.sketch-trigger-label {
  font-size: 14px;
  line-height: 24px;
  color: var(--text);
  white-space: nowrap;
}

.sketch-trigger.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sketch-trigger.disabled .optical-size-switch {
  background: var(--disable);
}

.sketch-trigger.disabled .optical-size-knob {
  transform: translateX(2px) !important;
}

.sketch-trigger.disabled .optical-size-switch input {
  cursor: not-allowed;
}

/* >>> SKETCH_STYLE_FEATURE (hover tooltip；删功能时整段删除) BEGIN */
.sketch-trigger[data-tooltip] {
  position: relative;
}

/* 复用 ::after，但必须完全重置 .select-trigger::after 的下拉箭头几何属性
   （width/height:6px、right:12px、top:50%、border-*），否则气泡被压成 6px 窄条、文字溢出 */
.sketch-trigger[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  display: block;
  position: absolute;
  left: 50%;
  right: auto;
  bottom: auto;
  top: calc(100% + 8px);
  width: auto;
  height: auto;
  border: none;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-size: 14px;
  line-height: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  transition: none;
  z-index: 60;
  box-shadow: 0 8px 16px rgba(24, 24, 27, 0.16);
}
/* <<< SKETCH_STYLE_FEATURE END */

.select-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(24, 24, 27, 0.16);
  z-index: 80;
  --menu-shift-x: 0;
  transform: translateX(var(--menu-shift-x)) translateY(-6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  overflow: hidden;
}

.select-menu {
  position: relative;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
  padding: 6px;
  overflow: auto;
  max-height: 328px;
  /*防止滚动外传到body*/
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.custom-select.open .select-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(var(--menu-shift-x)) translateY(0);
}

#categoryFilter .select-popover,
#strokeWidth .select-popover,
#iconSize .select-popover {
  min-width: calc(100% + 14px);
  left: 50%;
  right: auto;
  --menu-shift-x: -50%;
}

#categoryFilter {
  min-width: 160px;
}

#strokeWidth,
#iconSize {
  min-width: 128px;
}

.select-option {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 6px 12px 6px 34px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  line-height: 24px;
  transition: all 0.2s ease;
}

.select-option-label {
  min-width: 0;
}

.select-option-count {
  color: var(--disable);
  font-size: 12px;
  line-height: 20px;
}

.select-option::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  font-size: 0;
  transform: translateY(-50%);
  opacity: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(21,166,117,1)'%3E%3Cpath d='M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z'%3E%3C/path%3E%3C/svg%3E");
}

.select-option:hover {
  background: var(--bg);
  transition: all 0.2s ease;
}

.select-option.active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 500;
}

.select-option.active::before {
  opacity: 1;
}

.custom-select.disabled .select-trigger {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg);
}

.control input[type="search"] {
  width: 100%;
  background-color: var(--bg);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  color: var(--text);
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.control input[type="search"]::placeholder {
  color: var(--disable);
}

.control input[type="search"]:hover {
  border: 1px solid var(--disable);
  transition: all 0.2s ease;
}

.control input[type="search"]:focus {
  border: 1px solid var(--brand);
  outline: none;
  background-color: #ffffff;
}

.search-bar:focus-within .search-icon svg {
  fill: var(--brand);
  transition: fill 0.2s ease;
}

.control input[type="color"] {
  width: 36px;
  height: 36px;
  padding: 10px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  background-color: var(--bg);
}

/* WebKit/Blink: Chrome/Safari/Edge */
#colorPicker::-webkit-color-swatch-wrapper {
  padding: 0;
}
#colorPicker::-webkit-color-swatch {
  border: none;
  border-radius: 999px;
}

/* Firefox */
#colorPicker::-moz-color-swatch {
  border: none;
  border-radius: 999px;
}

.control input[type="color"]:hover {
  border: 1px solid var(--disable);
  transition: all 0.2s ease;
}

.control input[type="color"]:focus {
  border: 1px solid var(--brand);
  background-color: var(--surface);
}

.pill-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  background-color: var(--bg);
  padding: 4px;
}

.pill-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 4px;
  padding: 1px 12px;
  font-size: 14px;
  line-height: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-tab:hover {
  background: var(--surface);
  transition: all 0.2s ease;
}

.pill-tab.active {
  background: var(--brand);
  color: #fff;
}

/* >>> FILL_TOGGLE_FEATURE (v1 临时填充开关；删功能时整段删除) BEGIN */
/* v1（FILL_ENABLED=false）：Fill 按钮禁用态 + Coming soon tooltip */
.pill-tab.disabled {
  cursor: not-allowed;
}

.pill-tab.disabled > span {
  opacity: 0.5;
}

.pill-tab.disabled:hover {
  background: transparent;
}

.pill-tab[data-tooltip] {
  position: relative;
}

.pill-tab[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-size: 14px;
  line-height: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 60;
  box-shadow: 0 8px 16px rgba(24, 24, 27, 0.16);
}
/* <<< FILL_TOGGLE_FEATURE END */

.icon-grid {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-state {
  width: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state-image {
  width: 400px;
  height: auto;
  display: block;
}

.empty-state-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 24px;
}

.category-title {
  margin: 24px 0 4px 4px;
  font-size: 18px;
  line-height: 32px;
  color: var(--text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: capitalize;
}

.category-count {
  border-radius: 6px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  padding: 4px 6px;
}

.category-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.icon-item {
  position: relative;
  z-index: 0;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #ffffff;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.icon-item::before {
  --dot-color: rgba(255,255,255,0);
  --dot-size: 4px;
  content: "";
  position: absolute;
  inset: calc(var(--dot-size) * -.5);
  pointer-events: none;
  background-image: radial-gradient(var(--dot-color) 50%, transparent 50%), radial-gradient(var(--dot-color) 50%, transparent 50%), radial-gradient(var(--dot-color) 50%, transparent 50%), radial-gradient(var(--dot-color) 50%, transparent 50%);
  background-size: var(--dot-size) var(--dot-size), var(--dot-size) var(--dot-size), var(--dot-size) var(--dot-size), var(--dot-size) var(--dot-size);
  background-position: 0 0, 0 100%, 100% 0, 100% 100%;
  background-repeat: no-repeat;
  transition: all .3s ease;
}

.icon-item:hover::before {
  --dot-color: var(--disable);
  inset: calc(var(--dot-size) * 2);
}

.icon-item svg {
  flex: 0 0 auto;
  max-width: none;
  max-height: none;
}

.icon-item:hover {
  z-index: 5;
  transform: none;
  border: 1px solid var(--disable);
}

.icon-item.active {
  border: 1px solid var(--brand);
  background: none;
}

.icon-item.active::before {
  --dot-color: var(--brand);
  inset: calc(var(--dot-size) * 1.5);
}

.icon-tooltip {
  position: fixed;
  font-size: 12px;
  line-height: 100%;
  background: var(--text);
  color: #fff;
  border-radius: 4px;
  padding: 6px 8px;
  opacity: 0;
  pointer-events: none;
  max-width: min(240px, calc(100vw - 32px));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 30;
  box-shadow: 0 8px 16px rgba(24, 24, 27, 0.16);
}

.icon-tooltip.visible {
  opacity: 1;
}

@media (hover: none), (pointer: coarse) {
  .icon-tooltip {
    display: none;
  }

  .top-link-item:hover,
  .top-link-item:hover .top-links-text,
  .top-link-item:hover .top-links-icon {
    color: var(--text);
  }

  .top-link-item:hover .top-links-icon {
    background-color: var(--bg);
  }
}

.detail-panel {
  position: fixed;
  left: 50%;
  width: min(1200px, calc(100% - 48px));
  bottom: 0px;
  z-index: 40;
  border-radius: 12px 12px 0 0;
  background: var(--surface);
  border: none;
  box-shadow: 0 0 80px rgba(24, 24, 27, 0.16);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, calc(100% + 48px));
  transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.detail-panel.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.about-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.about-modal.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.about-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 24, 27, 0.4);
}

.about-modal-dialog {
  position: relative;
  width: min(640px, calc(100% - 48px));
  max-height: min(80vh, 720px);
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(24, 24, 27, 0.24);
  display: flex;
  flex-direction: column;
}

.about-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.about-modal-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 32px;
}

.about-modal-head .close-detail-btn {
  position: static;
}

.modal-dots-wrapper {
  position: absolute;
  width: calc(100% - 64px);
  height: 240px;
  overflow: hidden;
  top: 0;
  pointer-events: none;
}

.modal-dot {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at center, var(--disable) 1px, transparent 1px);
  background-size: 8px 8px;
  mask-image: radial-gradient(at center, var(--surface), transparent 72%);
  -webkit-mask-image: radial-gradient(at center, var(--surface), transparent 72%);
  mask-mode: match-source;
  -webkit-mask-mode: match-source;
  top: -125px;
  left: 0;
}

.about-modal-content,
.feature-guide-content,
.license-content,
.support-content,
.request-content {
  min-height: 0;
  overflow: auto;
}

.about-modal-desc {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 24px;
}

.about-modal-desc-sec {
  color: var(--muted);
  font-style: italic;
}

.about-modal-divider {
  background-color: var(--bg);
  width: 100%;
  height: 1px;
  margin: 24px 0;
}

.about-author {
  width: 100%;
  margin: 32px 0;
  padding-top: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--bg);
}

.about-author::before,
.about-author::after {
  content: "";
  position: absolute;
  top: 48px;
  left: 50%;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border);
  transform: translateX(-50%) scale(1);
  opacity: 0;
  pointer-events: none;
  animation: about-ripple 3s ease-out infinite;
}

.about-author::after {
  animation-delay: 1.5s;
}

.about-author img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.about-author span {
  font-size: 16px;
  line-height: 28px;
  font-weight: 500;
  color: var(--text);
}

@keyframes about-ripple {
  0% {
    transform: translateX(-50%) scale(1);
    opacity: 0.4;
  }

  100% {
    transform: translateX(-50%) scale(2);
    opacity: 0;
  }
}

.about-modal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
  gap: 12px;
}

.about-card {
  margin: 0;
  text-decoration: none;
  font: inherit;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--bg);
  padding: 24px 12px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  transition: background 0.2s ease, border 0.2s ease;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.8) inset;
}

.about-card-icon {
  width: 24px;
  height: 24px;
  color: var(--brand);
  position: relative;
}

.about-card-icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: currentColor;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.about-card:hover {
  border: 1px solid var(--disable);
  background: var(--surface);
}

.about-card-icon .icon-hover {
  opacity: 0;
  transform: translateY(2px);
}

.about-card:hover .about-card-icon .icon-default {
  opacity: 0;
  transform: translateY(-2px);
}

.about-card:hover .about-card-icon .icon-hover {
  opacity: 1;
  transform: translateY(0);
}

.about-card.copied .about-card-icon .icon-default {
  opacity: 1;
  transform: translateY(0);
}

.about-card.copied .about-card-icon .icon-hover {
  opacity: 0;
  transform: translateY(2px);
}

.about-card p {
  margin: 0;
  font-size: 14px;
  line-height: 24px;
  font-weight: 500;
  color: var(--text);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.about-card.is-switching .about-card-icon,
.about-card.is-switching p {
  opacity: 0;
  transform: translateY(2px);
}

.feature-guide-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.feature-guide-section {
  margin: 0;
  padding: 0;
}

.feature-guide-section h4 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 28px;
  color: var(--text);
}

.feature-guide-title-icon {
  width: 20px;
  height: 20px;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feature-guide-title-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.feature-guide-section p {
  margin: 8px 0 24px 0;
  font-size: 14px;
  line-height: 24px;
  color: var(--muted);
}

.feature-guide-section img {
  display: block;
  width: 100%;
  height: auto;
}

.license-modal-dialog {
  display: flex;
  flex-direction: column;
}

.license-meta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.license-meta-card {
  margin: 0;
  border-radius: 8px;
  background: var(--bg);
  padding: 28px 12px 24px 12px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.8) inset;
}

.license-meta-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--brand);
  position: relative;
}

.license-meta-icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: currentColor;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.license-meta-icon .icon-hover {
  opacity: 0;
  transform: translateY(2px);
}

.license-meta-link:hover .license-meta-icon .icon-default {
  opacity: 0;
  transform: translateY(-2px);
}

.license-meta-link:hover .license-meta-icon .icon-hover {
  opacity: 1;
  transform: translateY(0);
}

.license-meta-card p {
  margin: 0;
  font-weight: 500;
  word-break: break-word;
}

.license-meta-link {
  text-decoration: none;
  transition: background 0.2s ease, border 0.2s ease;
}

.license-meta-link:hover {
  border: 1px solid var(--disable);
  background: var(--surface);
}

.license-detail-list {
  padding-left: 20px;
}

.license-detail-item {
  margin-bottom: 16px;
  padding-left: 4px;
}

.license-detail-title {
  font-size: 14px;
  line-height: 24px;
  font-weight: 500;
  color: var(--text);
}

.license-detail-desc {
  font-size: 14px;
  line-height: 24px;
  color: var(--muted);
  margin: 8px 0 16px 0;
}

.license-detail-desc a {
  color: var(--brand);
  font-weight: 500;
  transition: color 0.3s ease;
}

.license-detail-desc a:hover {
  color: var(--brand-hover);
  transition: color 0.3s ease;
}

.license-content p {
  font-size: 14px;
  line-height: 24px;
  color: var(--text);
}

.support-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 32px;
}

.support-coffee {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.8) inset;
}

.support-coffee-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 24px;
  font-weight: 500;
}

.support-coffee-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand);
  background-color: #fff;
  border-radius: 100%;
  box-shadow: 0 8px 24px rgba(24, 24, 27, 0.08);
}

.support-coffee-icon svg {
  width: 20px;
  height: 20px;
}

.support-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.support-alipay-icon {
  color: #1677FF;
}

.support-wechatpay-icon {
  color: #00C257;
}

.support-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.support-coffee-btn {
  min-width: 96px;
  padding: 6px 16px;
  border-radius: 6px;
  background: var(--brand);
  color: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  line-height: 24px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.support-coffee-btn:hover {
  background: var(--brand-hover);
}

.support-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.support-qr-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease;
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.8) inset;
}

.support-qr-default,
.support-qr-card img {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.support-qr-default {
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 24px;
  font-weight: 500;
}

.support-qr-card img {
  width: 100%;
  height: 100%;
  padding: 24px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(6px);
}

.support-qr-card:hover,
.support-qr-card:focus-visible {
  border-color: var(--disable);
  background: var(--surface);
}

.support-qr-card:hover .support-qr-default,
.support-qr-card:focus-visible .support-qr-default {
  opacity: 0;
  transform: translateY(-6px);
}

.support-qr-card:hover img,
.support-qr-card:focus-visible img {
  opacity: 1;
  transform: translateY(0);
}

.request-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.request-card {
  min-height: 180px;
}

.request-qr-card {
  position: relative;
  margin: 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease;
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.8) inset;
}

.request-github-icon {
  color: #000000;
}

.request-wechat-icon {
  color: #2aae67;
}

.request-discord-icon {
  color: #5865f2;
}

.request-qr-default,
.request-qr-card img {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.request-qr-default {
  flex-direction: column;
  gap: 8px;
}

.request-qr-default p {
  margin: 0;
  font-size: 14px;
  line-height: 24px;
  font-weight: 500;
  color: var(--text);
}

.request-qr-card img {
  width: 100%;
  height: 100%;
  padding: 20px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(6px);
}

.request-qr-card:hover,
.request-qr-card:focus-visible {
  border-color: var(--disable);
  background: var(--surface);
}

.request-qr-card:hover .request-qr-default,
.request-qr-card:focus-visible .request-qr-default {
  opacity: 0;
  transform: translateY(-6px);
}

.request-qr-card:hover img,
.request-qr-card:focus-visible img {
  opacity: 1;
  transform: translateY(0);
}

.detail-main h2 {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  cursor: pointer;
  color: var(--text);
}

.detail-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-main {
  width: 100%;
  min-width: 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-direction: row;
  justify-content: flex-start;
}

.detail-info {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 12px;
  overflow: hidden;
}

.copy-name-mark {
  width: 16px;
  height: 16px;
  color: var(--disable);
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-name-row:hover .copy-name-mark {
  color: var(--brand);
}

.copy-name-mark svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.copy-name-mark .check-shape {
  display: none;
}

.copy-name-mark.copied {
  opacity: 1;
  color: var(--brand);
}

.copy-name-mark.copied .copy-shape {
  display: none;
}

.copy-name-mark.copied .check-shape {
  display: inline;
}

.detail-preview {
  position: relative;
  width: 164px;
  height: 164px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: -32px;
  border: 4px solid #fff;
  box-shadow: 0 8px 40px rgba(24, 24, 27, 0.16);
  background-color: var(--surface);
  background-image:
    linear-gradient(45deg, #e8edf5 25%, transparent 25%),
    linear-gradient(-45deg, #e8edf5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8edf5 75%),
    linear-gradient(-45deg, transparent 75%, #e8edf5 75%);
  background-size: 16px 16px;
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
}

.preview-copy-mark {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  color: var(--disable);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, color 0.18s ease;
}

.preview-copy-mark svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.preview-copy-mark .check-shape {
  display: none;
}

.detail-preview:hover .preview-copy-mark,
.detail-preview:focus-within .preview-copy-mark {
  opacity: 0.7;
}

.detail-preview.copied .preview-copy-mark {
  opacity: 1;
  color: var(--brand);
}

.detail-preview.copied .preview-copy-mark .copy-shape {
  display: none;
}

.detail-preview.copied .preview-copy-mark .check-shape {
  display: inline;
}

.detail-preview svg {
  flex: 0 0 auto;
}

.close-detail-btn {
  position: absolute;
  right: 16px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: var(--bg);
  border-radius: 6px;
  padding: 7px;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease;
}

.close-detail-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.close-detail-btn:hover {
  background: var(--surface);
  border: 1px solid var(--disable);
  transition: background 0.2s ease, border 0.2s ease;
}

.close-detail-btn:hover .close-detail-icon {
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

.close-detail-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.tags {
  display: flex;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  gap: 6px;
  max-height: 26px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  align-self: stretch;
}

.tags::-webkit-scrollbar {
  display: none;
}

.tag {
  background: var(--bg-light);
  color: var(--muted);
  border-radius: 3px;
  font-size: 13px;
  line-height: 14px;
  padding: 5px 8px;
  flex: 0 0 auto;
}

.detail-actions {
  display: flex;
  justify-content: flex-start;
  flex-direction: row;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.detail-actions button {
  width: 112px;
  border: 1px solid transparent;
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  padding: 5px 16px 5px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  line-height: 24px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.detail-btn-icon {
  width: 16px;
  height: 16px;
  fill: var(--text);
  font-size: 0;
}

.detail-btn-divider {
  width: 1px;
  height: 16px;
  background-color: var(--border);
  margin: 10px 4px;
}

.detail-actions button:not(:disabled):hover {
  background: var(--surface);
  border: 1px solid var(--disable);
  transition: all 0.2s ease;
}

#copySvgBtn {
  background: var(--brand);
  color: #ffffff;
  border: 1px solid transparent;
}

#copySvgBtn:not(:disabled):hover {
  background: var(--brand-hover);
}

.detail-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.detail-actions button .detail-btn-icon,
.detail-actions button span:last-child {
  transition:
    opacity .18s ease,
    transform .18s ease;
}

.detail-actions button.is-switching .detail-btn-icon,
.detail-actions button.is-switching span:last-child {
  opacity: 0;
  transform: translateY(2px);
}

/*用于懒加载图标*/
.icon-placeholder {
  width: var(--preview-size, 48px);
  height: var(--preview-size, 48px);
  border-radius: 0;
  background: var(--border);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: var(--text);
  color: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity .2s ease,
    transform .2s ease,
    visibility .2s ease;
  z-index: 39;
  box-shadow: 0 8px 40px rgba(24, 24, 27, 0.64);
}

.back-to-top svg {
  width: 16px;
  height: 16px;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-2px);
}

.footer {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 24px;
  padding: 64px 24px 24px;
}

.footer-logo-wrap {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  aspect-ratio: 15 / 2;
  height: auto;
  overflow: hidden;
  pointer-events: auto;
  border-bottom: 1px dashed var(--disable);
  z-index: 0;
}

.footer-logo-canvas {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
  will-change: transform;
  z-index: 1;
}

.footer-logo {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  display: block;
}

.footer-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy {
  margin: 0;
  color: var(--disable);
  font-size: 13px;
  line-height: 22px;
}

.footer-copy a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-copy a:hover {
  color: var(--brand);
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.footer-links a {
  color: var(--muted);
  font-size: 13px;
  line-height: 22px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--brand);
}

/* ===== Collection / collection feature (global, not media-scoped) ===== */

.collection-trigger {
  position: relative;
  border: 1px solid transparent;
  padding: 9px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border 0.2s ease, background 0.2s ease;
}

.collection-trigger:hover {
  border-color: var(--disable);
}

.collection-trigger svg {
  width: 16px;
  height: 16px;
}

.collection-count {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 20px;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 0 0 1px var(--surface);
}

.collection-trigger.empty .collection-count {
  display: none;
}

.icon-collect-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: var(--bg);
  color: var(--text);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  transition: border 0.2s ease, background 0.2s ease;
}

.icon-collect-btn:hover {
  background: var(--surface);
  border: 1px solid var(--disable);
}

.icon-collect-btn svg {
  width: 16px;
  height: 16px;
}

.icon-item:hover .icon-collect-btn,
.icon-item:focus-within .icon-collect-btn,
.icon-item.selected .icon-collect-btn {
  display: flex;
}

.icon-collect-plus,
.icon-collect-minus {
  display: inline-flex;
}

.icon-collect-minus {
  display: none;
}

.icon-item.selected .icon-collect-btn .icon-collect-plus {
  display: none;
}

.icon-item.selected .icon-collect-btn .icon-collect-minus {
  display: inline-flex;
}

.collection-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.collection-grid {
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
}

.collection-title-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  min-width: 24px;
  background: var(--brand);
  color: var(--surface);
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
  vertical-align: 2px;
}

.collection-card {
  cursor: default;
}

.collection-card.selected .icon-collect-btn {
  display: none;
}

.collection-card:hover .icon-collect-btn,
.collection-card:focus-within .icon-collect-btn {
  display: flex;
}

.collection-grid.is-empty::before {
  content: "";
  display: block;
  grid-row: 1;
  grid-column: 1;
  aspect-ratio: 1 / 1;
}

.collection-empty {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 24px;
  text-align: center;
  padding: 0;
}

.collection-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.collection-clear {
  appearance: none;
  border: 1px solid transparent;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 24px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.collection-clear:hover {
  background: var(--surface);
  border-color: var(--disable);
}

.collection-clear:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.collection-clear:disabled:hover {
  background: var(--bg);
  border-color: transparent;
}

.collection-download-wrap {
  position: relative;
  margin-left: auto;
}

.collection-download {
  display: inline-flex;
  align-items: stretch;
  border-radius: 6px;
  border: 1px solid transparent;
  background: var(--brand);
  color: var(--surface);
  font-size: 14px;
  line-height: 24px;
  overflow: hidden;
  transition: background 0.2s ease, border 0.2s ease;
}

.collection-download-main,
.collection-download-arrow {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--surface);
  font-size: 14px;
  line-height: 24px;
  font-weight: 500;
  padding: 5px 16px 5px 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.collection-download-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.collection-download-icon {
  display: inline-flex;
  align-items: center;
}

.collection-download-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.collection-download-main:hover:not(:disabled) {
  background: var(--brand-hover);
}

.collection-download-arrow {
  position: relative;
  width: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.collection-download-arrow:hover:not(:disabled) {
  background: var(--brand-hover);
}

.collection-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.collection-chevron svg {
  width: 16px;
  height: 16px;
}

.collection-chevron .collection-chevron-up {
  display: none;
}

.collection-download-wrap.open .collection-chevron .collection-chevron-down {
  display: none;
}

.collection-download-wrap.open .collection-chevron .collection-chevron-up {
  display: block;
}

.collection-download-main:disabled,
.collection-download-arrow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.collection-download-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 140px;
  background: var(--surface);
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(24, 24, 27, 0.16);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(0, 4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 90;
  overflow: hidden;
}

.collection-download-wrap.open .collection-download-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(0, 0);
}

.collection-download-menu {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: none;
  padding: 6px;
}

.collection-download-option {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 6px 12px 6px 34px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  line-height: 24px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.collection-download-option::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  font-size: 0;
  transform: translateY(-50%);
  opacity: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(21,166,117,1)'%3E%3Cpath d='M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z'%3E%3C/path%3E%3C/svg%3E");
}

.collection-download-option:hover {
  background: var(--bg);
  transition: all 0.2s ease;
}

.collection-download-option.is-active {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 500;
}

.collection-download-option.is-active::before {
  opacity: 1;
}

@media (max-width: 1024px) {
  .toolbar {
    flex-direction: column;
  }

  .toolbar-right {
    width: 100%;
  }

  .toolbar-right .icon-size-stroke {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .top-links {
    display: flex;
    position: fixed;
    top: 0px;
    left: 0px;
    right: 0px;
    overflow: auto;
    padding: 64px 24px 40px 24px;
    border-radius: 0 0 12px 12px;
    background: var(--surface);
    box-shadow: 0 20px 40px rgba(24, 24, 27, 0.16);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    transform: translateY(-80px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.1s ease-out;
  }

  .top-link-item {
    position: relative;
    padding: 20px 0;
    border-radius: 0;
    border-bottom: 1px solid var(--bg);
    transition: color 0.2s ease;
    opacity: 0;
    transform: translateX(-16px);
    gap: 12px;
  }

  .top-links-icon {
    width: 32px;
    height: 32px;
    background-color: var(--bg);
    border-radius: 6px;
    transition: background 0.2s ease;
  }

  .top-links-icon svg {
    width: 18px;
    height: 18px;
  }

  .top-link-item:hover {
    color: var(--text);
  }

  .top-link-item:hover .top-links-text,
  .top-link-item:hover .top-links-icon {
    color: var(--text);
  }

  .top-link-item:hover .top-links-icon {
    background-color: var(--bg);
  }

  .top-links-text {
    font-size: 16px;
  }

  .github-link .top-links-text {
    display: inline;
  }

  .top-link-dropdown {
    display: block;
  }

  .top-links .top-link-trigger {
    padding-right: 20px;
  }

  .top-link-trigger:hover::after {
    border-color: var(--disable);
    transform: translateY(-65%) rotate(45deg);
  }

  .library-dropdown-menu {
    position: static;
    width: 100%;
    left: 0;
    right: 0;
    top: auto;
    max-height: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none;
    transition: max-height 0.22s ease, padding 0.22s ease, opacity 0.16s ease, visibility 0.16s ease;
  }

  .top-link-dropdown:not(.open) .library-dropdown-menu {
    max-height: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .top-link-dropdown.open .library-dropdown-menu {
    max-height: 240px;
    padding: 16px 0 0 24px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    gap: 8px;
  }

  .top-link-dropdown.open .top-link-trigger::after {
    border-color: var(--brand);
    transform: translateY(-30%) rotate(-135deg);
  }

  .top-link-dropdown.open .top-link-trigger .top-links-text,
  .top-link-dropdown.open .top-link-trigger .top-links-icon {
    color: var(--brand);
  }

  .top-links .library-dropdown-menu .logo-context-item {
    padding: 12px 16px;
    border-bottom: 0;
    opacity: 1;
    transform: none;
  }

  .mobile-menu-trigger {
    display: inline-flex;
    position: relative;
    z-index: 999;
  }

  .topbar.mobile-menu-open .top-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    z-index: 998;
    transition-delay: 0s, 0s, 0s;
  }

  .topbar.mobile-menu-open .top-link-item {
    animation: mobileNavItemIn 0.28s ease forwards;
  }

  @keyframes mobileNavItemIn {
    from {
      opacity: 0;
      transform: translateX(-16px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .topbar.mobile-menu-open .top-links > .top-link-wrapper:nth-child(1) .top-link-item { animation-delay: 0.04s; }
  .topbar.mobile-menu-open .top-links > .top-link-wrapper:nth-child(2) .top-link-item { animation-delay: 0.08s; }
  .topbar.mobile-menu-open .top-links > .top-link-wrapper:nth-child(3) .top-link-item { animation-delay: 0.12s; }
  .topbar.mobile-menu-open .top-links > .top-link-wrapper:nth-child(4) .top-link-item { animation-delay: 0.16s; }
  .topbar.mobile-menu-open .top-links > .top-link-wrapper:nth-child(5) .top-link-item { animation-delay: 0.20s; }
  .topbar.mobile-menu-open .top-links > .top-link-wrapper:nth-child(6) .top-link-item { animation-delay: 0.24s; }

  .topbar.mobile-menu-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s, 0s;
  }

  .topbar.mobile-menu-open .brand {
    z-index: 999;
  }

  .topbar.mobile-menu-open .logo-button {
    transform: translateY(-80px);
  }

  .hero-illustration {
    display: none;
  }

  .mobile-nav-overlay {
    z-index: 997;
  }

  body.mobile-menu-locked {
    overflow: hidden;
  }

  .footer-meta {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .detail-panel {
    left: 50%;
    width: 100%;
    padding: 40px 24px;
  }

  .detail-main {
    flex-direction: column;
    align-items: center;
  }

  .detail-preview {
    margin-top: -64px;
  }

  .detail-info {
    align-items: center;
  }

  .detail-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .detail-btn-divider {
    display: none;
  }

}

@media (max-width: 680px) {
  .category-bar {
    width: 100%;
  }

  .toolbar-right, .toolbar-left {
    flex-wrap: wrap;
  }

  .toolbar-right {
    justify-content: flex-start;
  }

  .advanced-tools-popover {
    left: 0;
  }

  .support-coffee {
    align-items: stretch;
    flex-direction: column;
  }

  .support-coffee-btn {
    width: 100%;
  }
}
