:root {
  --green: #19a974;
  --blue: #3979e8;
  --blue-dark: #2f66c9;
  --border: #e8eaed;
  --muted: #8a929e;
  --bg: #eef1f6;
  --card: #ffffff;
  --shadow: 0 8px 30px rgba(31, 45, 61, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 50% -200px, #dfe9ff 0%, rgba(223, 233, 255, 0) 70%),
    var(--bg);
  color: #2b2f36;
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1180px;
  margin: auto;
  padding: 0 24px 32px;
}

/* 顶栏 */
.top {
  position: relative;
  display: block;
  min-height: 64px;
}

.brand {
  position: absolute;
  left: 0;
  bottom: 8px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: 48px;
  text-decoration: none;
}

.brand img {
  height: 40px;
  width: auto;
  display: block;
}

.top-center {
  min-width: 0;
  padding: 8px 0;
}

.top-meta {
  display: contents;
}

.top-row {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  width: 100%;
  min-height: 48px;
}

.top-tools {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  justify-content: space-between;
  align-content: flex-end;
  column-gap: 16px;
  row-gap: 2px;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  box-sizing: border-box;
}

.top-tool {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  padding: 0;
  border-radius: 6px;
}

.top-tool svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  display: block;
}

.top-tool:hover {
  color: var(--blue);
  text-decoration: underline;
}

.account {
  position: static;
  transform: none;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  align-self: flex-end;
  min-height: 48px;
  white-space: nowrap;
  gap: 10px;
}

.search-align {
  display: grid;
  grid-template-columns: 180px minmax(0, 720px);
  column-gap: 12px;
  align-items: center;
  max-width: 912px;
  width: 100%;
  margin: 0 auto;
}

.top .search-align {
  align-items: end;
}

.weather,
.calendar {
  display: flex;
  align-items: flex-end;
  align-self: flex-end;
  min-height: 48px;
  text-decoration: none;
  color: #555;
  padding: 0 10px;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
  box-sizing: border-box;
}

.top-row > .weather {
  padding-left: 0;
}

.calendar {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding-left: 4px;
}

.weather:hover,
.calendar:hover {
  background: #eaf1ff;
  color: var(--blue);
  text-decoration: underline;
}

.weather-icon {
  width: 36px;
  height: 36px;
  margin-right: 8px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.weather-icon svg {
  width: 36px;
  height: 36px;
  display: block;
}

.weather-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.weather-today-line {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 1.4em;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}

.weather-today-label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.weather-roll {
  display: block;
  height: 1.4em;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
}

.weather-roll-track {
  display: flex;
  flex-direction: column;
  transition: transform 0.45s ease;
  will-change: transform;
}

.weather-roll-item {
  display: block;
  height: 1.4em;
  line-height: 1.4;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather strong,
.calendar strong,
.weather small,
.calendar small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}

.account > a,
.account-box a {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.account > a:hover,
.account-box a:hover {
  color: var(--blue);
}

/* 按钮 */
.btn {
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 14px;
  transition: transform 0.06s ease, box-shadow 0.2s, background 0.2s, opacity 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(90deg, var(--blue), var(--blue-dark));
  color: #fff;
  box-shadow: 0 6px 16px rgba(57, 121, 232, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 8px 22px rgba(57, 121, 232, 0.38);
}

.btn-ghost {
  background: #eef2f8;
  color: #55606f;
}

.btn-ghost:hover {
  background: #e3e9f2;
}

.btn-green {
  background: linear-gradient(90deg, #23b981, var(--green));
  color: #fff;
  box-shadow: 0 6px 16px rgba(25, 169, 116, 0.28);
}

.account-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 48px;
  padding: 0;
}

.account-user {
  display: flex;
  align-items: center;
  gap: 6px;
}

.account-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
}

.account-box strong,
.account-box a {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}

.account-box a {
  text-decoration: none;
  cursor: pointer;
}

.account-box a:hover {
  color: var(--blue);
}

/* 搜索 */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 912px;
  width: 100%;
  margin: 30px auto 26px;
}

.search-wrap.search-align {
  display: flex;
  grid-template-columns: none;
  align-items: center;
}

.search-wrap > a,
.engine-logo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 124px;
  width: 124px;
  height: 40px;
  line-height: 0;
}

.search-engine-logo {
  display: block;
  max-width: 124px;
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: pointer;
}

.search-engine {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  height: 54px;
  padding: 5px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.engine-opt {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 100%;
  padding: 0 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);
  user-select: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.engine-opt input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.engine-opt:hover {
  color: var(--blue);
}

.engine-opt:has(input:focus-visible) {
  outline: 2px solid rgba(57, 121, 232, 0.35);
  outline-offset: 1px;
}

.engine-opt:has(input:checked) {
  background: linear-gradient(90deg, var(--blue), var(--blue-dark));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(57, 121, 232, 0.22);
}

.engine-opt:has(input:checked):hover {
  color: #fff;
}

.search {
  display: flex;
  flex: 1;
  align-items: stretch;
  align-self: center;
  min-width: 0;
  max-width: 720px;
  height: 54px;
  border: 0;
  box-shadow: var(--shadow);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.search input {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0 20px 0 20px;
  font-size: 16px;
  outline: 0;
  background: transparent;
}

.search input:focus {
  outline: 0;
  box-shadow: none;
}

.search input::placeholder {
  color: transparent;
}

.search-field {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  display: block;
}

.search-placeholder {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  color: #b0b6bf;
  font-size: 16px;
  line-height: 1.2;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 40px);
}

.search-field:has(input:not(:placeholder-shown)) .search-placeholder {
  display: none;
}

.search button {
  width: 120px;
  border: 0;
  background: linear-gradient(90deg, var(--blue), var(--blue-dark));
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

/* 面板 */
.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  overflow: hidden;
  position: relative;
}

.panel-fav .panel-toolbar {
  position: absolute;
  top: 2px;
  right: 4px;
  z-index: 2;
  display: flex;
  align-items: center;
}

.gear-btn {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #d5dbe3;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
}

.gear-btn:hover {
  background: #f3f6fb;
  color: #98a2b3;
}

.gear-btn.active {
  background: #eaf1ff;
  color: var(--blue);
}

/* 常用站点网格 */
.sitegrid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  padding: 14px 28px 18px 20px;
  gap: 10px;
}

.site {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.18s, border-color 0.18s, transform 0.06s;
}

.site:hover {
  background: #f3f7ff;
  border-color: #dbe6ff;
  color: var(--blue);
}

.site .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint,
.empty {
  padding: 0 22px 16px;
  color: var(--muted);
}

.empty {
  padding: 22px;
  text-align: center;
}

/* 分类站点 */
.category {
  display: grid;
  grid-template-columns: 28px 72px minmax(0, 1fr);
  border-bottom: 1px solid #f2f3f5;
  padding: 14px 22px;
  align-items: center;
  transition: background 0.15s, opacity 0.15s;
}

.category:last-child {
  border-bottom: 0;
}

.category-hidden {
  display: none;
}

.category.dragging {
  opacity: 0.45;
}

.category.drag-over {
  background: #f3f7ff;
}

.drag-handle {
  color: #c0c7d2;
  cursor: grab;
  user-select: none;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -2px;
}

.drag-handle:active {
  cursor: grabbing;
}

.category-title {
  margin: 0;
  color: var(--green);
  font-size: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.category-sites {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: center;
  column-gap: 10px;
  min-width: 0;
}

.category-sites a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  color: #4a5158;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: color 0.18s;
}

.category-sites a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-sites .ico-wrap {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

.site .ico-wrap {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 6px;
}

.ico-wrap {
  position: relative;
  flex: 0 0 auto;
  background: #e8edf3;
  overflow: hidden;
}

.ico-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  display: block;
}

.ico-wrap img.is-ok {
  opacity: 1;
}

.ico-wrap img.is-fail {
  display: none;
}

.category-sites a:hover {
  color: var(--blue);
}

.collapse-toggle {
  display: block;
  width: calc(100% - 44px);
  margin: 0 22px 16px;
  padding: 10px 0;
  border: 1px dashed #d7dde8;
  border-radius: 10px;
  background: #fafbfc;
  color: #667085;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.collapse-toggle:hover {
  background: #f0f4fa;
  color: var(--blue);
  border-color: #c8d9ff;
}

.panel-hot[hidden] {
  display: none;
}

.hot-tabs {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 10px 22px 0;
}

.hot-tab {
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.hot-tab:hover {
  color: var(--blue);
}

.hot-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.hot-updated {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1;
}

.hot-refresh-ico {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  opacity: 0.85;
}

.hot-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
  column-gap: 36px;
  row-gap: 0;
  padding: 10px 22px 14px;
}

.hot-item {
  display: flex;
  align-items: center;
  height: 32px;
  min-height: 32px;
  overflow: hidden;
  color: #3d4450;
  text-decoration: none;
  gap: 8px;
  line-height: 32px;
}

.hot-item:hover .hot-title {
  color: var(--blue);
}

.hot-rank {
  width: 22px;
  flex: 0 0 auto;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #9aa3af;
}

.hot-item:nth-child(-n+3) .hot-rank,
.hot-item.top .hot-rank {
  color: #f33;
}

.hot-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-label {
  flex: 0 0 auto;
  font-size: 11px;
  color: #f33;
  background: #fff1f0;
  border-radius: 4px;
  padding: 0 4px;
  line-height: 16px;
  height: 16px;
}

.hot-value {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 16px 24px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  border-top: 1px solid #e6eaf0;
  background: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 4px;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 2px 0 4px;
  font-size: 13px;
}

.footer-links-label {
  color: #98a2b3;
  flex: 0 0 auto;
}

.footer-links-label::after {
  content: "：";
}

.footer-nav a,
.footer-links a,
.site-footer a {
  color: #667085;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-links a:hover,
.site-footer a:hover {
  color: var(--blue);
}

.footer-copy a {
  margin-left: 12px;
}

.footer-desc {
  margin: 2px 0 0;
  font-size: 12px;
  color: #98a2b3;
}

/* 自定义悬浮提示 */
.ui-tooltip {
  position: fixed;
  z-index: 4000;
  left: 0;
  top: 0;
  max-width: min(240px, calc(100vw - 16px));
  padding: 7px 11px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  color: #3d4450;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: normal;
  text-align: center;
  border: 1px solid #dbe4f2;
  box-shadow:
    0 4px 14px rgba(31, 45, 61, 0.1),
    0 1px 2px rgba(57, 121, 232, 0.06);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.ui-tooltip.is-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ui-tooltip[data-placement="bottom"].is-show {
  transform: translateY(0) scale(1);
}

.ui-tooltip[data-placement="bottom"] {
  transform: translateY(-4px) scale(0.98);
}

.ui-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #fff;
  border: 1px solid #dbe4f2;
  transform: translateX(-50%) rotate(45deg);
}

.ui-tooltip[data-placement="top"]::after {
  bottom: -5px;
  border-top: 0;
  border-left: 0;
  background: #f7f9fc;
}

.ui-tooltip[data-placement="bottom"]::after {
  top: -5px;
  border-bottom: 0;
  border-right: 0;
  background: #fff;
}

.subpage-head {
  position: relative;
  height: 72px;
}

.about-layout {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  min-height: 460px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 12px;
}

.about-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 12px;
  background: #f6f8fc;
  border-right: 1px solid var(--border);
}

.about-tab {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #4a5158;
  padding: 11px 14px;
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.about-tab:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--blue);
}

.about-tab.active {
  background: #fff;
  color: var(--blue);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(31, 45, 61, 0.06);
}

.about-panels {
  padding: 28px 32px 32px;
  min-width: 0;
}

.about-panel h1 {
  margin: 0 0 18px;
  font-size: 22px;
  color: #1f3a8a;
}

.about-panel h2 {
  margin: 28px 0 12px;
  font-size: 18px;
  color: #1f3a8a;
}

.about-panel p {
  margin: 0 0 12px;
  color: #4a5158;
}

.about-panel a {
  color: var(--blue);
  text-decoration: none;
}

.about-panel a:hover {
  text-decoration: underline;
}

.about-legal {
  max-height: min(70vh, 640px);
  overflow-y: auto;
  padding-right: 8px;
}

.about-legal .legal-meta {
  margin-top: -8px;
  color: var(--muted);
  font-size: 13px;
}

.about-legal ul {
  margin: 0 0 12px;
  padding-left: 1.4em;
  color: #4a5158;
}

.about-legal li {
  margin: 0 0 6px;
}

.subpage-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px 32px;
  margin-bottom: 12px;
}

.subpage-card h1 {
  margin: 0 0 18px;
  font-size: 22px;
  color: #1f3a8a;
}

.subpage-card h2 {
  margin: 28px 0 12px;
  font-size: 18px;
  color: #1f3a8a;
}

.subpage-card p {
  margin: 0 0 12px;
  color: #4a5158;
}

.feedback-form .field textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  resize: vertical;
  outline: 0;
}

.feedback-form .field textarea:focus,
.feedback-form .field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(57, 121, 232, 0.12);
}

.feedback-form .field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  outline: 0;
}

.feedback-tip {
  margin: 12px 0 0;
  min-height: 22px;
  color: var(--green);
}

.feedback-tip.error {
  color: #d14343;
}

.qr-box {
  width: 280px;
  max-width: 100%;
  margin: 8px auto 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  background: #fff;
}

.qr-box .qr-title {
  color: #667085;
  font-size: 13px;
  margin-bottom: 12px;
}

.qr-box .qr-img {
  width: 180px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.qr-box .qr-caption {
  margin-top: 12px;
  color: #667085;
  font-size: 13px;
}

.contact-line {
  color: #0f766e;
  font-weight: 600;
}

.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}

.friend-links a {
  color: var(--blue);
  text-decoration: none;
}

.friend-links a:hover {
  text-decoration: underline;
}

/* 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 20, 28, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal.show {
  display: flex;
}

.dialog {
  position: relative;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #98a2b3;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dialog-close:hover {
  background: #f3f6fb;
  color: #333;
}

.dialog.dialog-manage {
  width: 980px;
}

.dialog h3 {
  margin: 0 0 6px;
  padding-right: 28px;
  font-size: 20px;
}

.dialog .sub {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 13px;
}

.dialog-manage .sub {
  display: none;
}

.fav-manage-list {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px 14px;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: #f4f6f8;
}

.fav-manage-empty {
  grid-column: 1 / -1;
  padding: 22px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.fav-manage-item {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 5px 6px 5px 8px;
  border: 1px dashed #c8d0d8;
  border-radius: 3px;
  background: #fff;
  cursor: grab;
}

.fav-manage-item.dragging {
  opacity: 0.45;
}

.fav-manage-item.drag-over,
.fav-manage-item.is-editing {
  border-color: var(--green);
  background: #f3fbf6;
}

.fav-manage-item .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a929e;
  font-size: 13px;
  line-height: 1.3;
}

.fav-manage-actions {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
}

.fav-ico-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #b4bcc6;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fav-ico-btn:hover {
  color: var(--blue);
}

.fav-ico-btn.danger:hover {
  color: #e85d4c;
}

.dialog-manage #modalForm {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid #eceff3;
}

.dialog-manage #siteFields {
  flex: 0 0 auto;
  min-width: 0;
}

.fav-add-row {
  display: flex;
  flex-direction: column;
}

.dialog-manage .fav-add-row {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.fav-add-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #667085;
  white-space: nowrap;
}

.dialog-manage .fav-add-url {
  flex: 0 0 auto;
}

.dialog-manage .fav-add-field input {
  width: 132px;
  padding: 6px 10px;
  border: 1px solid var(--green);
  border-radius: 4px;
  font-size: 13px;
}

.dialog-manage .fav-add-url input {
  width: 280px;
}

.dialog-manage .dialog-actions {
  margin: 0;
  flex: 0 0 auto;
}

.dialog-manage #cancel {
  display: none;
}

.dialog-manage #submitBtn {
  background: var(--green);
  box-shadow: none;
  border-radius: 4px;
  padding: 6px 16px;
  font-size: 13px;
}

.dialog-manage #submitBtn:hover {
  box-shadow: none;
  filter: brightness(1.05);
}

.field {
  margin: 10px 0;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  outline: 0;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(57, 121, 232, 0.12);
}

.code-row {
  display: flex;
  gap: 10px;
}

.code-row input {
  flex: 1;
}

.code-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.code-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.switch-line {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.switch-line a {
  color: var(--blue);
  cursor: pointer;
  text-decoration: none;
}

.switch-sep {
  margin: 0 10px;
  color: #c5ccd6;
}
  font-weight: 600;
}

/* 响应式 */
@media (max-width: 900px) {
  .sitegrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .fav-manage-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page {
    padding: 0 14px 24px;
  }

  .top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    padding: 12px 0 8px;
  }

  .brand,
  .account {
    position: static;
    transform: none;
  }

  .top-center {
    width: 100%;
    order: 3;
    padding: 4px 0 0;
  }

  .brand img {
    height: 32px;
  }

  .search-align {
    grid-template-columns: 130px minmax(0, 1fr);
    column-gap: 10px;
  }

  .top-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    column-gap: 16px;
  }

  .top-row {
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: space-between;
  }

  .top-tools {
    width: auto;
    padding: 0;
    column-gap: 16px;
    justify-content: space-between;
  }

  .account {
    position: static;
    transform: none;
  }

  .hot-list {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-template-rows: none;
    gap: 0;
  }

  .search-wrap {
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .search-engine {
    height: 48px;
    padding: 4px;
    gap: 3px;
  }

  .engine-opt {
    min-width: 48px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 12px;
  }

  .engine-logo-slot {
    flex: 0 0 108px;
    width: 108px;
    height: 36px;
  }

  .search-engine-logo {
    max-width: 108px;
    max-height: 36px;
  }

  .search {
    height: 48px;
  }

  .search input {
    height: 100%;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .sitegrid,
  .fav-manage-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category {
    grid-template-columns: 24px 64px minmax(0, 1fr);
  }

  .category-sites {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 8px;
  }

  .about-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .about-tabs {
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    padding: 10px;
  }

  .about-tab {
    width: auto;
    white-space: nowrap;
  }

  .about-panels {
    padding: 22px 18px 24px;
  }
}
