@charset "utf-8";
/* ==========================================================================
   components.css — 头部小件、搜索区、名站导航、分类目录、广告位
   ========================================================================== */

/* --- 日历 ---------------------------------------------------------------- */
.calendar {
  float: left;
  display: inline;
  width: 130px;
  margin-top: 18px;
  overflow: hidden;
}

.calendar ul { width: 105px; }

.calendar li {
  display: inline;
  float: left;
  width: 105px;
  list-style: none;
}

.calendar .date a { color: #777; }
.calendar .lcal { padding: 10px 0 0 3px; }
.calendar .lcal a { color: #777; }

/* --- 天气（内嵌本地 iframe 页） ------------------------------------------ */
.weather {
  float: left;
  display: inline;
  width: 418px;
  height: 62px;
  margin: 12px 0 0 4px;
  overflow: hidden;
  background: url(../img/spirit.png) 0 -64px no-repeat;
}

.weather iframe {
  display: block;
  width: 418px;
  height: 70px;
  border: 0;
}

/* --- 邮箱快捷登录 -------------------------------------------------------- */
.mailbox {
  float: left;
  display: inline;
  width: 185px;
  height: 62px;
  margin-top: 7px;
  padding: 10px 20px 0;
  overflow: hidden;
  background: url(../img/spirit.png) 0 -64px no-repeat;
}

.mailbox .notice {
  display: block;
  width: 170px;
  margin-left: 4px;
  padding-left: 19px;
  overflow: hidden;
  white-space: nowrap;
  color: #555;
  background: url(../img/spirit.png) 0 -153px no-repeat;
}

.mailbox .notice a { color: #3d3d3d; }

.mailbox form {
  position: relative;
  width: 185px;
}

.mailbox .e-mail {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 999;
  width: 170px;
  margin-top: 5px;
  padding: 3px;
  background: transparent;
  border: 1px solid transparent;
}

.mailbox .e-mail.is-active {
  background: #f6fbff;
  border-color: #c3c3c3;
}

.mailbox .mail-row { position: relative; height: 22px; }

.mailbox .mail-user {
  float: left;
  width: 82px;
  height: 16px;
  line-height: 16px;
  padding: 2px 0 2px 4px;
  border: 1px solid #c3c3c3;
  font-size: 14px;
}

.mailbox .mail-domain {
  float: left;
  display: inline-block;
  width: 81px;
  height: 20px;
  border: 1px solid #c3c3c3;
  border-left: 0;
  /* rep.png 仅 2px 宽，必须横向平铺才能形成灰度填充 */
  background: url(../img/rep.png) 0 -79px;
}

.mailbox .mail-domain span {
  display: block;
  height: 20px;
  line-height: 20px;
  padding: 0 15px 0 1px;
  color: #000;
  cursor: pointer;
  /* 下拉箭头取自 spirit.png（对应原站 .bg 类） */
  background: url(../img/spirit.png) right -184px no-repeat;
}

.mailbox .mail-pass {
  display: none;
  float: left;
  width: 110px;
  height: 16px;
  line-height: 16px;
  padding: 2px 0 2px 4px;
  border: 1px solid #c3c3c3;
  font-size: 14px;
}

.mailbox .mail-login {
  display: none;
  position: relative;
  height: 22px;
  padding-top: 5px;
  overflow: hidden;
}

.mailbox .mail-submit {
  display: inline-block;
  width: 53px;
  height: 20px;
  line-height: 20px;
  vertical-align: top;
  border: 1px solid #c3c3c3;
  border-left: 0;
}

.mailbox .mail-submit input {
  width: 53px;
  height: 20px;
  line-height: 20px;
  padding-bottom: 2px;
  overflow: hidden;
  cursor: pointer;
  background: url(../img/rep.png) 0 -79px;
}

.mailbox .mail-hint {
  position: absolute;
  top: 4px;
  left: 8px;
  color: #b2b2b2;
  pointer-events: none;
}

.mailbox .mail-hint--pass { top: 6px; }

/* 邮箱下拉列表 */
.mailbox .mail-list {
  display: none;
  position: absolute;
  top: 22px;
  left: 3px;
  z-index: 1000;
  width: 170px;
  padding: 2px 0;
  background: #fff;
  border: 1px solid #c3c3c3;
}

.mailbox .mail-list li {
  padding: 2px 8px;
  line-height: 20px;
  cursor: pointer;
  list-style: none;
}

.mailbox .mail-list li:hover { background: #f0f6fd; }
.mailbox .mail-list li.is-label { color: #999; cursor: default; background: none; }
.mailbox .mail-list a { display: block; }

/* --- 搜索区 -------------------------------------------------------------- */
.search {
  position: relative;
  z-index: 9;
  width: 1198px;
}

/* 半透明磨砂底：撑满 .search，高度由 .search__row 决定，不用重复写死 */
.search__frost {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  background: #fff;
  opacity: .45;
}

/* 表单行：搜索框在磨砂底上水平、垂直居中（115px = 删掉标签/热搜/链接前的原高） */
.search__row {
  position: relative;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 115px;
}

/* 表单主体：固定 755px 宽，由父级 flex 居中 */
.search__form {
  width: 755px;
}

/* --- 胶囊搜索框：数值一比一取自 hao123 .searchForm ----------------------
   原站声明：border:1.5px solid transparent; border-radius:15px;
   background:linear-gradient(#fff,#fff) padding-box,
              linear-gradient(160deg,#3377fe,#4c6fff,#8370ff,#ba59ff) border-box;
   高度按渲染补偿：1.5px 边框在 1x 屏会被舍入成 1px（高 DPI 下才是 1.5px），
   所以总高取 51 而不是 52 —— 内容区恒为 49，按钮 44 居中后四周留白都是 2.5px。 */
#searchForm {
  position: relative;
  z-index: 12;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  width: 755px;
  height: 51px;
  border: 1.5px solid transparent;
  border-radius: 15px;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(160deg, #3377fe, #4c6fff, #8370ff, #ba59ff) border-box;
}

/* 引擎下拉 */
.engine {
  position: relative;
  display: flex;
  flex: 0 0 auto;
}

.engine__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  min-width: 64px;
  padding: 0 12px 0 14px;
  border: 0;
  border-right: 1px solid #e7edf7;
  background: transparent;
  color: #7990ad;
  cursor: pointer;
}

.engine__symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  overflow: hidden;
  border-radius: 5px;
}

.engine__symbol img {
  display: block;
  width: 22px;
  height: 22px;
  border: 0;
}

/* 无品牌图标的引擎用「首字彩色块」占位 */
.engine__symbol--mark {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

.engine__chevron {
  margin-left: auto;
  color: #7990ad;
  font-size: 15px;
  line-height: 1;
  transform: translateY(-1px);
}

.engine__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  width: 188px;
  padding: 7px;
  border: 1px solid #e6ebf2;
  border-radius: 13px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 16px 38px rgba(10, 35, 63, .18);
  color: #182b43;
  text-align: left;
}

.engine__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.engine__option:hover,
.engine__option.is-current { background: #edf4ff; }

.engine__option .check {
  margin-left: auto;
  color: #2e6ff2;
  font-weight: 800;
}

/* 输入区 */
.search__field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 33px 0 44px;
  border: 0;
  background: transparent;
  color: #333;
  caret-color: #333;
  font: 16px/44px "Microsoft YaHei", Tahoma, Geneva, sans-serif;
}

.search__clear {
  position: absolute;
  top: 50%;
  left: 9px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8b9cb2;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.search__clear:hover {
  background: rgba(21, 52, 95, .09);
  color: #3b5678;
}

/* 提交按钮：一比一取自 hao123 .submitWrapper .submitInput
   （108×44、圆角 12、136deg 四段渐变、2.5px 内距贴边） */
.search__submit {
  flex: 0 0 auto;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 44px;
  margin: 0 2.5px 0 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(136deg, #286aff, #4e6ef2, #7274f9, #9f66ff);
  color: #fff;
  font: 400 17px/1 "Microsoft YaHei", Tahoma, Geneva, sans-serif;
  cursor: pointer;
}

.search__submit:hover {
  background: linear-gradient(rgba(0, 0, 0, .09), rgba(0, 0, 0, .09)),
              linear-gradient(136deg, #286aff, #4e6ef2, #7274f9, #9f66ff);
}

/* --- 下拉面板：热门推荐 / 搜索记录 / 站内联想 ---------------------------- */
.search__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  box-sizing: border-box;
  max-height: min(436px, calc(100vh - 230px));
  overflow-y: auto;
  padding: 6px 0;
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(9, 30, 58, .18);
  color: #1b2e47;
  text-align: left;
  animation: search-panel-in .14s ease;
}

@keyframes search-panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.search__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px 3px;
}

.search__title {
  color: #a9b6c7;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
}

.search__tool {
  padding: 3px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9aa8bb;
  font-size: 12px;
  cursor: pointer;
}

.search__tool:hover {
  background: #f0f6ff;
  color: #2e6ff2;
}

.search__list {
  margin: 2px 8px 0;
  padding: 0;
  list-style: none;
}

.search__item {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  color: #2c3f59;
  font-size: 14px;
  cursor: pointer;
}

.search__item:hover {
  background: #f3f7fe;
  color: #1749c2;
}

/* 键盘上下键选中的联想项 */
.search__item.is-active {
  background: #e8f0fd;
  color: #1749c2;
}

.search__text {
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search__item-url {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #9aa8bb;
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 热门推荐：两列网格 + 前三名彩色序号 */
.search__hot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  column-gap: 14px;
}

.search__index {
  flex: 0 0 auto;
  width: 15px;
  color: #b6c1d1;
  font-size: 12px;
  font-weight: 800;
  font-style: italic;
}

.search__index.rank-1 { color: #ff4d2e; }
.search__index.rank-2 { color: #ff8a70; }
.search__index.rank-3 { color: #f7b32b; }

.search__badge {
  flex: 0 0 auto;
  height: 16px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
}

.search__badge.is-new  { background: linear-gradient(135deg, #07a15b, #59d39b); }
.search__badge.is-hot  { background: linear-gradient(135deg, #ff5f19, #ffa066); }
.search__badge.is-rise { background: linear-gradient(135deg, #2d6ff2, #6ea5ff); }

/* 搜索记录：胶囊标签 + 悬停删除 */
.search__history-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  max-height: 72px;
  margin: 0 6px 2px;
  padding: 6px 6px 0;
  overflow: hidden;
}

.search__history-item {
  position: relative;
  height: 29px;
  padding: 5px 11px;
  border: 1px solid #e8eef6;
  border-radius: 999px;
  background: #f2f6fb;
  color: #3a4f6b;
  font-size: 13px;
  line-height: 17px;
  cursor: pointer;
}

.search__history-item:hover {
  border-color: #c9ddfb;
  background: #e9f2ff;
  color: #1749c2;
}

.search__history-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eaf0f8;
  color: #6e8098;
  cursor: pointer;
  opacity: 0;
}

.search__history-item:hover .search__history-remove { opacity: 1; }

.search__history-remove:hover {
  background: #dde7f3;
  color: #3d5a7d;
}

.search__history-remove::before,
.search__history-remove::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  margin: -1px 0 0 -5px;
  border-radius: 1px;
  background: currentColor;
}

.search__history-remove::before { transform: rotate(45deg); }
.search__history-remove::after  { transform: rotate(-45deg); }

/* --- 名站导航 ------------------------------------------------------------ */
/* 高度跟内容走。原站写死 272px + overflow:hidden，装不下的站点静默裁掉；
   行高 30→34 后改到 300，但三行 47 个站点实际需要 331px，
   第三行最后 5 个（阿里巴巴 / 澎湃新闻 / 快递·申述 / 在线闹钟 / 东方财富）
   一直藏在裁切线外。访客排序后把站点堆到某一行，被裁的就是一整排 ——
   看不见的站点等于不存在，排序功能也就失效了，所以改成自适应。
   代价：名站区 300 → 331，整页 1236 → 1267（+31，已确认接受）。 */
.famous {
  position: relative;
  width: 1198px;
  height: auto;
  min-height: 300px;
  background: #fff;
  border: 1px solid var(--skin-famous-border);
}

.famous__inner {
  height: auto;
  min-height: 300px;
  overflow: visible;
}

/* 三行都是 float 子元素，撑不开父容器；不清浮动的话 height:auto 一样塌陷 */
.famous__row::after {
  display: block;
  clear: both;
  content: '';
}

.famous__head {
  position: relative;
  height: 32px;
  margin: 5px 20px 0;
  border-bottom: 1px solid #ccc;
}

.famous__tabs {
  position: absolute;
  top: 0;
  left: 5px;
}

.famous__tabs li {
  float: left;
  display: inline;
  height: 31px;
  margin-right: 20px;
  padding: 0 3px;
  line-height: 31px;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}

.famous__tabs li.is-active {
  color: var(--skin-tab);
  border-bottom: 2px solid var(--skin-tab);
}

.famous__panel { padding-bottom: 7px; }

/* 三行站点的间距差异（原站由 bb / 各 UL 的 padding 决定） */
.famous__row {
  margin: 0 6px;
  padding: 6px 0 0 30px;
}

.famous__row--dashed {
  padding-top: 0;
  padding-bottom: 6px;
  border-bottom: 1px dashed #c6c6c6;
}

.famous__row li {
  position: relative;
  float: left;
  display: inline;
  width: 16.6%;
  height: 38px;
  overflow: hidden;
  line-height: 38px;
  text-align: left;
  list-style: none;
}

.famous__row li a {
  font-size: 15px;
  line-height: 38px;
  color: #3d3d3d;
}

/* 自定义入口 */
.famous__custom {
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 21px;
  cursor: pointer;
  background: url(../img/bg5.png) no-repeat 0 0;
}

/* 自定义引导气泡 */
.famous__tip {
  position: absolute;
  top: 5px;
  right: 20px;
  z-index: 12;
  width: 131px;
  height: 53px;
  background: url(../img/tip3.png) no-repeat 0 0;
}

.famous__tip .tip-close {
  position: absolute;
  top: 34px;
  left: 2px;
  width: 18px;
  height: 14px;
  cursor: pointer;
}

.famous__tip.is-hidden { display: none; }

/* --- 分类目录 ------------------------------------------------------------ */
.box-hot {
  width: 1200px;
  height: 10px;
  line-height: 10px;
  text-align: center;
}

.catalog {
  width: 1198px;
  background: #fff;
  border: 1px solid #dbdbdb;
}

.catalog__list {
  padding: 7px 0;
  background: #fff;
}

.catalog__list > li {
  height: 38px;
  line-height: 38px;
  overflow: hidden;
  list-style: none;
}

.catalog__title {
  float: left;
  display: inline;
  width: 88px;
  height: 38px;
  padding-left: 35px;
  font-size: 15px;
  font-weight: 700;
  line-height: 38px;
}

.catalog__title a {
  color: #1a72c1;
  font-weight: 400;
}

.catalog__more {
  float: right;
  display: inline;
  height: 38px;
  line-height: 38px;
}

.catalog__more a {
  padding: 0 15px 0 0;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 12px;
  color: #828282;
}

.catalog__item {
  display: inline-block;
  width: 145px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.catalog__item a {
  font-size: 15px;
  line-height: 38px;
  color: #3d3d3d;
}

/* 悬停高亮整行（原站 li.hover，此处用 CSS 实现） */
.catalog__list > li:hover { background: #f4f4f4; }

/* --- 站点链接的图标 ------------------------------------------------------ */
/* 名站：20×20 图标，27px 缩进。分类区不给图标，链接从格子左缘起排。 */
.fm-ico {
  padding-left: 27px;
  background-image: var(--ico);
  background-repeat: no-repeat;
  background-position: 1px center;
  background-size: 20px 20px;
}

/* 热搜小红点 */
.dot-ico {
  padding-left: 7px;
  background: url(../img/dian.png) no-repeat 1px center;
}

/* --- 底部横幅广告 -------------------------------------------------------- */
.promo-banner {
  width: 1200px;
  margin-top: 10px;
  overflow: hidden;
  background: #fff;
}

.promo-banner a { display: inline; }
.promo-banner img { border: 0; }

/* ==========================================================================
   自定义网址编辑态 / 登录弹窗
   ========================================================================== */

/* --- 自定义提示条（对应原站 .best-zd / #best-zdtop） -------------------- */
.famous__zd {
  display: none;
  position: absolute;
  top: 35px;
  left: 1px;
  z-index: 98;
  width: 1176px;
  height: 90px;
  padding: 6px 10px;
  background: #fff;
  border-bottom: 2px solid #ddd;
  opacity: .92;
  font-size: 14px;
  line-height: 30px;
  text-align: left;
}

.famous__zd.is-open { display: block; }

.famous__zd p { text-indent: 15px; }

.famous__zd a {
  color: red;
  text-decoration: underline;
  cursor: pointer;
}

/* 名站条目上的 [编辑]（对应原站 a.mybests-n） */
.famous__row li a.mybests-n {
  position: absolute;
  top: 0;
  right: 5px;
  display: block;
  width: 34px;
  font-size: 12px;
  line-height: 30px;
  color: #ccc;
  background: #fff;
}

.famous__row li a.mybests-n:hover { color: #f00; }

/* --- 登录弹窗（对应原站 layer.open 的 iframe 层） ------------------------ */
.layer-shade {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 19891014;
  background: #000;
  opacity: .2;
}

.layer-box {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 19891015;
  width: 430px;
  height: 580px;
  margin: -290px 0 0 -215px;
  overflow: hidden;
  background: #fff;
  border-radius: 2px;
  box-shadow: 1px 1px 8px rgba(0, 0, 0, .3);
}

.layer-box__bar {
  position: relative;
  height: 42px;
  background: #f8f8f8;
  border-bottom: 1px solid #eee;
}

.layer-box__title {
  display: block;
  height: 42px;
  padding: 0 80px 0 15px;
  overflow: hidden;
  font-size: 14px;
  line-height: 42px;
  color: #333;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 关闭按钮：两条 45° 细线拼成 × */
.layer-box__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  opacity: .7;
}

.layer-box__close:hover { opacity: 1; }

.layer-box__close::before,
.layer-box__close::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 14px;
  width: 14px;
  height: 1px;
  background: #666;
}

.layer-box__close::before { -webkit-transform: rotate(45deg); transform: rotate(45deg); }
.layer-box__close::after  { -webkit-transform: rotate(-45deg); transform: rotate(-45deg); }

.layer-box__body {
  height: 537px;
  overflow: hidden;
}

.layer-box__body iframe {
  display: block;
  width: 430px;
  height: 537px;
  border: 0;
}

/* 弹窗打开时锁定页面滚动 */
.is-locked { overflow: hidden; }

/* ==========================================================================
   后端接入后新增的组件样式
   登录表单、自定义网址面板、搜索联想。
   ========================================================================== */

/* --- 登录弹窗内的表单（原站这里是 iframe 弹远端登录页） ------------------ */
.login-form { padding: 4px 2px 2px; }
.login-form__field {
  display: block; margin-bottom: 14px;
}
.login-form__field > span {
  display: block; margin-bottom: 6px;
  font-size: 13px; color: #646a73;
}
.login-form__field input {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid #e5e6eb; border-radius: 4px;
  font-size: 14px; outline: none; background: #fff;
}
.login-form__field input:focus { border-color: #2f6fed; }
.login-form__msg {
  min-height: 20px; margin-bottom: 8px;
  font-size: 13px; color: #646a73;
}
.login-form__msg.is-error { color: #dc2626; }
.login-form__submit {
  width: 100%; height: 40px; border: 0; border-radius: 4px;
  background: #2f6fed; color: #fff; font-size: 15px; cursor: pointer;
}
.login-form__submit:disabled { background: #9db8e8; cursor: default; }
.login-form__tip {
  margin: 12px 0 0; font-size: 12px; color: #8a9099; line-height: 1.6;
}

/* --- 微信扫码登录：弹窗内常态 / 扫码态切换 ------------------------------- */
.login-wx__entry { margin-top: 14px; }
.login-wx__sep {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; font-size: 12px; color: #8a9099;
}
.login-wx__sep::before,
.login-wx__sep::after {
  content: ""; flex: 1; height: 1px; background: #e5e6eb;
}
.login-wx__btn {
  width: 100%; height: 40px; border: 1px solid #d7e8c8; border-radius: 4px;
  background: #f3f9ec; color: #2f6b1c; font-size: 14px; cursor: pointer;
}
.login-wx__btn:hover { background: #eaf4de; }
.login-wx { padding: 14px 2px 2px; text-align: center; }
.login-wx__qr {
  width: 300px; height: 400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #e5e6eb; border-radius: 4px; background: #fff;
  font-size: 13px; color: #8a9099;
}
.login-wx__qr iframe { display: block; width: 300px; height: 400px; border: 0; }
.login-wx__open {
  display: block; margin-top: 8px;
  font-size: 12px; color: #2f6fed;
}
.login-wx__tip { margin: 12px 0 0; font-size: 13px; color: #333; }
.login-wx__hint { margin: 4px 0 0; font-size: 12px; color: #8a9099; }
.login-wx__back {
  margin-top: 12px; border: 0; background: none;
  color: #2f6fed; font-size: 13px; cursor: pointer;
}

/* --- 自定义网址面板 ---------------------------------------------------- */
.custom-panel { padding: 4px 2px; }
.custom-panel__title {
  margin: 0 0 10px; font-size: 14px; color: #1f2329; font-weight: 500;
}
.custom-panel__list {
  margin: 0 0 14px; padding: 0; list-style: none;
  max-height: 220px; overflow-y: auto;
}
.custom-panel__list li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px dashed #eef0f3;
  font-size: 13px;
}
.custom-panel__list li a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-panel__del { flex: none !important; color: #dc2626; font-size: 12px; }
.custom-panel__form { display: flex; gap: 6px; }
.custom-panel__form input {
  flex: 1; min-width: 0; height: 34px; padding: 0 10px;
  border: 1px solid #e5e6eb; border-radius: 4px;
  font-size: 13px; outline: none;
}
.custom-panel__form input:focus { border-color: #2f6fed; }
.custom-panel__form button {
  flex: none; height: 34px; padding: 0 16px;
  border: 0; border-radius: 4px; background: #2f6fed;
  color: #fff; font-size: 13px; cursor: pointer;
}
.custom-panel__form button:disabled { background: #9db8e8; cursor: default; }
.custom-panel__msg { min-height: 18px; margin-top: 8px; font-size: 12px; color: #646a73; }
.custom-panel__msg.is-error { color: #dc2626; }


/* --- 名站导航：访客自定义（点齿轮进入编辑态） ------------------------------ */
/* 访客各自一份，存在 localStorage['fu365_famous']，逻辑见 famous-layout.js。
   有存档时 <head> 会先给 <html> 加 famous-pending 遮住名站区，重排完再摘掉，
   避免看到重排前的原始顺序；3 秒兜底在 head.eta 里。只遮名站，分类目录不受影响。 */
html.famous-pending .famous__panel { visibility: hidden; }

.famous.is-editing {
  background: #f7fbff;
  box-shadow: inset 0 0 0 1px #9dcbf3, 0 0 0 4px rgba(70, 145, 213, .1);
}
.famous.is-editing .famous__tip,
.famous.is-editing .famous__custom { display: none; }

/* 工具条 */
.famous-toolbar {
  position: absolute;
  top: 3px;
  right: 0;
  display: none;
  align-items: center;
  height: 26px;
  font-size: 12px;
  line-height: 1;
}
.famous.is-editing .famous-toolbar { display: flex; }

.famous-toolbar__dot {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #2b6cf6;
}
.famous-toolbar__hint {
  display: flex;
  align-items: center;
  color: #5a7794;
}
/* 提示里的笔和格子里的笔用同一段 SVG，朝向才不会一正一反 */
.famous-toolbar__hint svg {
  width: 13px;
  height: 13px;
  margin: 0 3px;
  color: #2b6cf6;
}
.famous-sep {
  width: 1px;
  height: 14px;
  margin: 0 12px;
  background: #d3e0ee;
}

/* 按钮 */
.famous-btn {
  height: 26px;
  margin-left: 6px;
  padding: 0 11px;
  border: 1px solid #cbd9e8;
  border-radius: 5px;
  background: #fff;
  color: #5a6b80;
  font-family: inherit;
  font-size: 12px;
  line-height: 24px;
  cursor: pointer;
}
.famous-btn:hover {
  border-color: #8fb2db;
  color: #2b6cf6;
}
.famous-btn--primary {
  border-color: #2b6cf6;
  background: #2b6cf6;
  color: #fff;
}
.famous-btn--primary:hover {
  border-color: #1a5ae0;
  background: #1a5ae0;
  color: #fff;
}
/* 有未保存的改动时在「保存」上点一颗亮点，不然拖完看不出还要手动保存 */
.famous-btn--primary.is-dirty::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 5px;
  border-radius: 50%;
  background: #ffd76a;
  vertical-align: middle;
}
.famous-btn--danger {
  border-color: #f0d3d3;
  color: #d23c3c;
}
.famous-btn--danger:hover {
  border-color: #e8b4b4;
  background: #fdf3f3;
  color: #c22f2f;
}
.famous-btn[disabled] {
  opacity: .5;
  cursor: default;
}

/* 编辑态的格子。限定 li[data-fid]：末尾的「添加」格不是网址，
   不该有抓手光标、hover 高亮，也不该被当成可拖动对象。 */
.famous.is-editing .famous__row li[data-fid] {
  border-radius: 5px;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}
.famous.is-editing .famous__row li[data-fid]:hover { background: #e7f1ff; }

/* 被拎起来的那格：内容淡到 22%、留一个虚线空位，让人看清这块空着。
   outline 不占位，不会把定高的格子撑大。 */
.famous.is-editing .famous__row li.is-dragging {
  background: #f2f7fe;
  outline: 1px dashed #b9cee8;
  outline-offset: -2px;
}
.famous.is-editing .famous__row li.is-dragging > a { opacity: .22; }

/* 松手落位时目标格闪一下，给动作一个明确的终点 */
.famous.is-editing .famous__row li.is-landed { animation: famous-land .36s ease-out; }
@keyframes famous-land {
  0% { background: #cfe2fb; }
  100% { background: transparent; }
}
body.famous-pulling,
body.famous-pulling * { cursor: grabbing !important; }

/* 笔：22×22 热区够手指点，图形 15px；vertical-align middle + top:-3px
   是实测对齐的结果，笔中心与文字中心相差不到 0.5px */
.famous-pen {
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #b7c5d6;
  cursor: pointer;
}
.famous.is-editing .famous-pen {
  position: relative;
  top: -3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  vertical-align: middle;
}
.famous-pen:hover {
  background: #d7e7fd;
  color: #2b6cf6;
}
.famous-pen svg {
  display: block;
  width: 15px;
  height: 15px;
}

/* 落点提示线：拖动时只有它在动，格子全部冻结（D 方案：松手才落位）。
   z-index 必须高于跟手的影子，否则卡片正好压住落点，线就白画了。 */
.famous-line {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9550;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #2b6cf6;
  box-shadow: 0 0 0 3px rgba(43, 108, 246, .16);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s, transform .12s ease-out;
  will-change: transform;
}
.famous-line.is-on { opacity: 1; }

/* 拖动时跟手的影子 */
.famous-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  max-width: 230px;
  height: 32px;
  padding: 0 12px 0 8px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(20, 40, 70, .24);
  pointer-events: none;
  will-change: transform;
}
.famous-ghost__ico {
  flex: none;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  border-radius: 4px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}
.famous-ghost__name {
  overflow: hidden;
  color: #22344a;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 编辑弹窗 */
.famous-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(22, 38, 58, .34);
}
.famous-mask.is-open { display: flex; }

.famous-modal {
  width: 460px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 35, 60, .22);
}
.famous-modal__head {
  position: relative;
  padding: 16px 20px 8px;
}
.famous-modal__head h3 {
  color: #1f2f42;
  font-size: 15px;
  font-weight: 500;
}
.famous-modal__x {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: #9aabbd;
  font-family: inherit;
  font-size: 20px;
  line-height: 24px;
  cursor: pointer;
}
.famous-modal__x:hover {
  background: #eef3f9;
  color: #34465c;
}
.famous-modal__body { padding: 14px 20px 6px; }

/* 名称 / 网址 / 图标三行统一横排：标签固定 52px 在左，控件 flex 撑满右侧。
   图标行是「预览框 + 两个按钮」的复合控件，同一套规则也适用。 */
.famous-field {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.famous-field__label {
  flex: none;
  width: 52px;
  margin-right: 10px;
  color: #5a6b80;
  font-size: 12px;
}
.famous-input {
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d7e2ef;
  border-radius: 6px;
  background: #fbfdff;
  color: #22344a;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.famous-input:focus {
  border-color: #6aa2ea;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(70, 145, 213, .12);
}

/* 图标那行：预览 + 两个操作并排，避免竖排把弹窗撑高 */
.famous-ico {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
}
.famous-ico__box {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-right: 12px;
  border: 1px solid #e3ecf6;
  border-radius: 10px;
  background-color: #f7fafd;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 26px 26px;
  color: #fff;
  font-size: 18px;
  line-height: 1;
}
.famous-ico__ops {
  display: flex;
  align-items: center;
}
.famous-ico__ops .famous-btn { margin: 0 8px 0 0; }
.famous-ico__ops .famous-btn:last-child {
  margin-right: 0;
  border-color: transparent;
  color: #8fa1b5;
}
.famous-ico__ops .famous-btn:last-child:hover { color: #2b6cf6; }

/* 第二个网址：默认只露一个「+ 添加」入口，点开才是两行输入。
   这里刻意不放任何图标控件 —— 图标只属于主网址。 */
.famous-sub {
  margin: 2px 0 10px;
  padding-top: 10px;
  border-top: 1px solid #eef3f9;
}
.famous-sub__add {
  padding: 0;
  border: 0;
  background: none;
  color: #2b6cf6;
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.famous-sub__add:hover { text-decoration: underline; }
.famous-sub__note {
  margin-left: 8px;
  color: #9aabbd;
  font-size: 11.5px;
}
.famous-sub__head {
  display: flex;
  align-items: center;
  height: 22px;
  margin: 0 0 8px 62px;
  color: #5a6b80;
  font-size: 12px;
  font-weight: 600;
}
.famous-sub__remove {
  margin-left: auto;
  padding: 0;
  border: 0;
  background: none;
  color: #9aabbd;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}
.famous-sub__remove:hover { color: #d23c3c; }
.famous-sub__body .famous-field { margin-bottom: 8px; }

.famous-tip {
  margin: 2px 0 8px;
  color: #93a4b8;
  font-size: 12px;
  line-height: 1.5;
}
.famous-tip.is-error { color: #d23c3c; }
.famous-tip.is-ok { color: #2f8f5b; }

.famous-modal__foot {
  display: flex;
  align-items: center;
  padding: 12px 20px 16px;
  border-top: 1px solid #eef3f9;
}
.famous-flex { flex: 1; }

/* 底部提示条 */
.famous-toast {
  position: fixed;
  bottom: 34px;
  left: 50%;
  z-index: 9500;
  display: none;
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(28, 44, 64, .92);
  color: #fff;
  font-size: 13px;
  transform: translateX(-50%);
}
.famous-toast.is-on { display: block; }

/* 两个区末尾各一格「添加」。图标区那格只在编辑态出现；文字区那格
   （--entry）在非编辑态也常驻，占住「360安全中心」下方原本空着的格子，
   点它进编辑态，和右上角齿轮一样。按钮宽度跟内容走（约 63px）。 */
/* 选择器要带上 li：基础态 .famous__row li{display:inline} 是 (0,1,1)，
   光写 .famous-add{display:none} 会被它压过去。 */
.famous__row li.famous-add { display: none; }
.famous__row li.famous-add.famous-add--entry {
  display: flex;
  align-items: center;
}
.famous.is-editing .famous__row li.famous-add {
  display: flex;
  align-items: center;
}
.famous-add__btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 11px;
  border: 1px dashed #b9cee8;
  border-radius: 13px;
  background: #f7fbff;
  color: #6b8ab5;
  font: 12.5px/1 "PingFang SC", "Microsoft YaHei", sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.famous-add__btn:hover {
  border-color: #2b6cf6;
  background: #eaf2ff;
  color: #2b6cf6;
}
.famous-add__plus { font-size: 14px; line-height: 1; }
