 
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --text: #1e293b;
  --text-2: #64748b;
  --line: #e5e9f0;
  --card: #ffffff;
  --bg: #f5f7fb;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .05);
}
* { box-sizing: border-box; }
 
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background: radial-gradient(1200px 520px at 50% -180px, #e8effd 0%, var(--bg) 62%) no-repeat, var(--bg);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }

 
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px;
}
.brand { display: inline-flex; align-items: center; font-size: 15px; font-weight: 700; color: var(--text-2); }
.brand:hover { color: var(--brand); }
 
.brand img { height: 32px; width: auto; max-width: 210px; object-fit: contain; display: block; }
.user-area { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.user-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: 13.5px; color: var(--text);
}
.avatar {
  width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.link-btn {
  border: 0; background: transparent; color: var(--brand); cursor: pointer;
  font: inherit; font-size: 13.5px; padding: 5px 7px; border-radius: 8px;
}
.link-btn:hover { background: #e8effd; }
.link-btn.muted { color: var(--text-2); }

 
.theme-btn {
  border: 0; background: transparent; cursor: pointer; width: 30px; height: 30px;
  border-radius: 999px; display: grid; place-items: center;
  font-size: 15px; line-height: 1; color: var(--text-2);
  transition: background .14s ease;
}
.theme-btn:hover { background: #e8effd; }

 
a.user-chip { transition: border-color .15s, color .15s; }
a.user-chip:hover { border-color: var(--brand); color: var(--brand); }
.user-chip .role-mini {
  font-size: 11px; line-height: 16px; color: var(--text-2);
  background: #f1f5f9; border: 1px solid var(--line); border-radius: 999px;
  padding: 0 6px; margin-left: 1px; white-space: nowrap;
}

 
.user-area .auth-pill {
  border-radius: 999px; padding: 6px 16px; font-weight: 600; font-size: 13.5px;
  line-height: 1.4; border: 1px solid transparent;
}
.user-area .auth-pill.primary { background: var(--brand); color: #fff; }
.user-area .auth-pill.primary:hover { background: var(--brand-dark); }
.user-area .auth-pill.soft { background: #e8effd; color: var(--brand); border-color: #d3e2fb; }
.user-area .auth-pill.soft:hover { background: #dbe7fc; }

 
 
.stage { flex: 0 0 auto; text-align: center; padding: 16px 16px 26px; }
.logo {
  margin: 0 0 6px; font-size: 52px; line-height: 1.15; letter-spacing: 2px;
  background: linear-gradient(120deg, var(--brand), #7c3aed);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.slogan { margin: 0 0 18px; color: var(--text-2); font-size: 14px; }

 
.searchbar {
  display: flex; align-items: stretch; gap: 0;
  width: 100%; max-width: 880px; margin: 0 auto;
  background: #fff; border: 2px solid var(--brand); border-radius: 999px;
  box-shadow: 0 8px 26px rgba(37, 99, 235, .13);
  position: relative; overflow: visible;
}
.engine { position: relative; flex: 0 0 auto; }
 
.kw-box { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.engine-btn {
  height: 100%; border: 0; background: transparent; cursor: pointer;
  padding: 0 12px 0 22px; font: inherit; font-size: 15px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px; border-radius: 999px 0 0 999px;
}
.engine-btn:hover { background: #f1f5fd; }
.caret { font-size: 11px; color: var(--text-2); }
.engine-menu {
  position: absolute; top: calc(100% + 8px); left: 6px; z-index: 30;
  margin: 0; padding: 6px; list-style: none; min-width: 132px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); display: none;
}
.engine-menu.open { display: block; }
.engine-menu li {
  padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 700; text-align: left;
}
.engine-menu li:hover { background: #f1f5fd; color: var(--brand); }
.engine-menu li[aria-selected="true"] { background: #e8effd; color: var(--brand); font-weight: 600; }

#kw {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; padding: 18px 10px;
  font: inherit; font-size: 17px; background: transparent; color: var(--text);
}
#kw::placeholder { font-weight: 700; color: #94a3b8; }
.go {
  flex: 0 0 auto; border: 0; cursor: pointer; margin: 5px; padding: 0 34px;
  border-radius: 999px; background: var(--brand); color: #fff; font: inherit; font-size: 16px; font-weight: 600;
}
.go:hover { background: var(--brand-dark); }

 
.search-wrap { position: relative; width: 100%; max-width: 880px; margin: 0 auto; }
.sug {
  position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 6px; text-align: left;
  max-height: min(60vh, 420px); overflow-y: auto;
}
.sug-head {
  padding: 8px 12px 4px; font-size: 11.5px; font-weight: 700;
  color: var(--text-2); letter-spacing: .04em;
}
 
.sug-head.has-act { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sug-clear {
  flex: 0 0 auto; font: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: 0;
  color: var(--text-2); background: transparent; border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 9px; cursor: pointer; line-height: 1.5;
}
.sug-clear:hover { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.sug-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--text);
}
.sug-item:hover, .sug-item.on { background: #eef3fd; }
.sug-ico {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; background: #f1f5f9;
  display: grid; place-items: center; font-size: 13px; overflow: hidden;
}
.sug-ico img { width: 100%; height: 100%; object-fit: cover; }
.sug-nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-cat {
  font-style: normal; font-size: 11.5px; color: var(--text-2); margin-left: 8px;
  background: #f1f5f9; border-radius: 999px; padding: 1px 7px;
}
.sug kbd {
  flex: 0 0 auto; font: inherit; font-size: 11px; color: var(--text-2);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; background: #f8fafc;
}
 
.sugi-box { align-items: flex-start; }
.sugi-box .sug-ico { margin-top: 1px; }
.sug-box-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sug-box-t1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.sug-box-t1 b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-box-meta { flex: 0 0 auto; font-style: normal; font-size: 11.5px; color: var(--text-2); }
.sug-box-t2 { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugi-box .sug-cat { flex: 0 0 auto; margin-left: 8px; align-self: center; }
 
@media (max-width: 560px) { .sugi-box .sug-cat { display: none; } }
@media (max-width: 640px) { .sug { max-height: 55vh; } }

 
.favs { padding: 4px 16px 10px; max-width: 1080px; width: 100%; margin: 0 auto; }
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); font-weight: 600; margin: 0 0 10px; }
 

 
 
.cats { flex: 1 1 auto; width: 100%; max-width: 1080px; margin: 0 auto; padding: 12px 16px 34px; }
.cat-block { margin-bottom: 22px; }
 
.cat-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 10px; }
.cat-mode {
  font-size: 12px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft, #e8effd); border: 1px solid #c6d8fb; border-radius: 999px;
  padding: 3px 11px; cursor: pointer; user-select: none; white-space: nowrap;
  transition: background .14s ease;
}
.cat-mode:hover { background: #dbe7fc; }
 
.cat-filter {
  flex: 0 1 260px; min-width: 0; font: inherit; font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px;
  background: #fff; color: var(--text); outline: none;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.cat-filter:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(59, 130, 246, .12); }
.cat-filter::placeholder { color: #94a3b8; }
@media (max-width: 640px) { .cat-filter { flex-basis: 170px; } }
 
.cat-wrap { display: flex; gap: 18px; align-items: flex-start; }
.cat-side {
  flex: 0 0 176px; position: sticky; top: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.cat-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--text);
  transition: background .15s ease, border-color .15s ease;
}
.cat-item:hover { background: #eef3fd; }
.cat-item.on { background: #fff; border-color: var(--line); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); color: var(--brand); }
.cat-item .ico { font-size: 16px; flex: 0 0 auto; }
.cat-item .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-item .count {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 400; color: var(--text-2);
  background: #f1f5f9; border-radius: 999px; padding: 1px 7px;
}
.cat-item.on .count { color: var(--brand); background: #e8effc; }
.cat-main { flex: 1 1 auto; min-width: 0; }
 
@media (max-width: 900px) {
  .cat-wrap { flex-direction: column; gap: 12px; }
   
  .cat-side { position: static; flex: 0 0 auto; flex-direction: row; flex-wrap: wrap; gap: 6px; padding-bottom: 0; }
  .cat-item { flex: 0 0 auto; }
}
.cat-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-size: 15px; font-weight: 700; color: var(--text);
}
.cat-head .ico { font-size: 17px; }
.cat-head .count { font-size: 12px; color: var(--text-2); font-weight: 400; }
 
.grid {
  display: grid; gap: 9px;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));    
}
.card {
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  overflow: hidden;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c7d7f7; }
.card .ico {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; background: #eef3fd;
  display: grid; place-items: center; font-size: 16px; overflow: hidden;
}
.card .ico img { width: 100%; height: 100%; object-fit: cover; }
.card .meta { min-width: 0; flex: 1 1 auto; padding-right: 15px; }    
.card .name, .card .desc { display: block; }
.card .name {
  font-weight: 600; font-size: 13.5px; line-height: 19px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card .desc {
  font-size: 12px; line-height: 17px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
 
.star {
  position: absolute; bottom: 2px; right: 2px; width: 24px; height: 24px;
  border-radius: 7px; background: transparent; cursor: pointer; font-size: 14px;
  color: #b9c5d6; opacity: .6; transition: opacity .13s ease, color .13s ease, background .13s ease;
  display: grid; place-items: center; line-height: 1;
}
.card:hover .star { opacity: 1; color: #94a3b8; }
.star:hover { background: #fff7e6; color: #f59e0b; opacity: 1; }
.star.on { opacity: 1; color: #f59e0b; }
.loading, .empty { text-align: center; color: var(--text-2); padding: 40px 0; font-size: 14px; }

 
.foot { flex: 0 0 auto; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px 40px; }
.foot-inner {
  border-top: 1px solid var(--line); margin-top: 20px; padding-top: 24px;
  color: var(--text-2); font-size: 12.5px; line-height: 2;
}
.foot-inner.center { text-align: center; }
.foot-inner.three { display: flex; gap: 14px; align-items: flex-start; }
.foot-inner.three .fc { min-width: 0; }
.foot-inner.three .fc.left { flex: 1 1 0; text-align: left; overflow: hidden; }
.foot-inner.three .fc.mid { flex: 2 1 0; text-align: center; }
.foot-inner.three .fc.right { flex: 1 1 0; text-align: right; overflow: hidden; }
.foot .flinks { display: grid; grid-template-columns: repeat(3, auto); gap: 0 14px; }
.foot a { color: var(--brand); }
.foot a:hover { text-decoration: underline; }
.foot .sep2 { margin: 0 8px; color: #cbd5e1; }
.foot .legal { margin-top: 6px; white-space: pre-line; opacity: .9; }

 
.mask {
  position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.dialog {
  width: 100%; max-width: 390px; background: #fff; border-radius: 16px;
  padding: 24px 22px; box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}
.dialog h3 { margin: 0 0 4px; font-size: 19px; }
.dialog .sub { margin: 0 0 16px; color: var(--text-2); font-size: 13px; }
.dialog .field { margin-bottom: 13px; }
.dialog label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 5px; }
.dialog input {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 15px; outline: 0; background: #fbfcfe;
}
.dialog input:focus { border-color: var(--brand); background: #fff; }
.dialog .actions { display: flex; gap: 10px; margin-top: 18px; }
.btn {
  flex: 1 1 auto; padding: 10px 16px; border: 0; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: 14.5px; font-weight: 600; background: var(--brand); color: #fff;
}
.btn:hover { background: var(--brand-dark); }
.btn.ghost { background: #eef1f6; color: var(--text); font-weight: 500; }
.btn.ghost:hover { background: #e3e8f0; }
.err { color: #dc2626; font-size: 13px; min-height: 18px; margin-top: 2px; }
 
.err:empty, #au-user-tip:empty { display: none; }
.switch-line { text-align: center; margin-top: 12px; font-size: 13.5px; color: var(--text-2); }
 
.hint { color: var(--text-2); font-size: 12.5px; line-height: 1.6; }
.switch-line a { color: var(--brand); cursor: pointer; }
.switch-line .sep { margin: 0 7px; color: #cbd5e1; }

 
.toast {
  position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%);
  background: rgba(15, 23, 42, .9); color: #fff; padding: 9px 20px; border-radius: 999px;
  font-size: 13.5px; z-index: 90; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

 
@media (max-width: 640px) {
  .topbar { padding: 12px 14px; }
  .stage { padding: 10px 14px 16px; }
  .logo { font-size: 36px; }
  .slogan { margin-bottom: 14px; }
  .user-area .auth-pill { padding: 5px 13px; font-size: 13px; }
  .searchbar { border-radius: 14px; flex-wrap: wrap; }
  .engine-btn { padding: 15px 6px 15px 14px; font-size: 14px; }
  #kw { padding: 15px 8px; font-size: 16px; }
  .go { margin: 5px; padding: 0 22px; border-radius: 10px; font-size: 15px; }
  .cats, .favs { padding-left: 14px; padding-right: 14px; }
   
  .grid { grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 8px; }
  .card { padding: 10px 11px; }
  .card .ico { width: 28px; height: 28px; font-size: 15px; }
  .star { opacity: 1; }
  .mask { padding: 12px; align-items: flex-start; overflow-y: auto; }
  .dialog { padding: 20px 16px; }
  .dialog .actions { flex-wrap: wrap; }
  .cat-head { font-size: 14px; }
   
  .foot { padding-left: 14px; padding-right: 14px; }
  .foot-inner.three { flex-direction: column; gap: 0; }
  .foot-inner.three .fc { width: 100%; flex: 0 0 auto; text-align: center !important; overflow: visible; }
  .foot .flinks { justify-content: center !important; }
}

 
.home-ad {
  position: fixed; top: 50%; transform: translateY(-50%); width: 208px; height: 356px;
  border-radius: 16px; overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,.16);
  border: 1px solid var(--line); background: #fff; display: none; z-index: 5;
}
.home-ad.left { left: 20px; }
.home-ad.right { right: 20px; }
.home-ad img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .8s ease; }
.home-ad img.on { opacity: 1; }
.home-ad .ad-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex;
  justify-content: center; gap: 6px; z-index: 2; }
 
.home-ad .ad-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 26px 10px 9px; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.42) 55%, rgba(0,0,0,0));
  color: #fff; font-size: 12.5px; line-height: 1.45; font-weight: 600; text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.home-ad .ad-cap span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word; }
.home-ad.has-cap .ad-dots { bottom: 42px; }  
.home-ad .ad-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55);
  box-shadow: 0 0 3px rgba(0,0,0,.35); transition: background .3s; }
.home-ad .ad-dots i.on { background: #fff; }
 
.home-ad img { pointer-events: none; }
.home-ad img.on { pointer-events: auto; }
 
@media (min-width: 1560px) and (min-height: 640px) {
  .home-ad.has-img { display: block; }
}

 
.pw-wrap { position: relative; }
.pw-wrap > input, .dialog .pw-wrap > input, .field .pw-wrap > input { padding-right: 44px; }
.pw-eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1;
  padding: 7px 9px; border-radius: 8px; color: #94a3b8;
}
.pw-eye:hover { color: var(--brand); background: #f1f5f9; }

 
 
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
 
.prof-banner {
  max-width: 940px; margin: 0 auto 18px; padding: 14px 18px; border-radius: 14px;
  background: #fff7e6; border: 1px solid #f0dcae; color: #92600b;
  font-size: 13.5px; line-height: 1.7; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.prof-banner .grow { flex: 1 1 260px; min-width: 0; }
.prof-banner .btn { flex: 0 0 auto; background: #d97706; }
.prof-banner .btn:hover { background: #b45309; }

 
.prof-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.prof-av {
  flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-size: 28px; font-weight: 700;
}
.prof-av img { width: 100%; height: 100%; object-fit: cover; }
.prof-head .who { min-width: 0; flex: 1 1 auto; }
.prof-head .who .nm { font-size: 17px; font-weight: 700; }
.prof-head .who .sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.prof-av-ops { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.prof-av-ops .mini { padding: 7px 12px; font-size: 13px; }

 
.prof-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.panel .ro, .prof-info .ro { font-size: 14.5px; color: var(--text); padding: 9px 12px;
  background: #f1f5f9; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 640px) {
  .prof-info { grid-template-columns: 1fr; }
  .prof-head { gap: 12px; }
  .prof-av { width: 60px; height: 60px; font-size: 23px; }
}

 
.cat-head { display: flex; align-items: center; gap: 8px; }
.cat-head .cat-add {
  margin-left: 2px; font-size: 12px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft, #e8effd); border: 1px solid #c6d8fb; border-radius: 999px;
  padding: 2px 10px; cursor: pointer; user-select: none; transition: background .14s ease;
}
.cat-head .cat-add:hover { background: #dbe7fc; }
.card.mine-card { border-style: dashed; border-color: #f0b45c; background: #fffdf7; }
.mine-tag {
  position: absolute; top: 3px; right: 30px;  
  font-size: 10.5px; font-weight: 700; color: #92600b; line-height: 1.5;
  background: #fdf3dd; border: 1px solid #f0dcae; border-radius: 999px; padding: 0 7px;
}
.mine-del {
  position: absolute; top: 4px; right: 6px; width: 18px; height: 18px; line-height: 16px;
  text-align: center; border-radius: 50%; font-size: 13px; color: #b91c1c;
  background: #fdecec; border: 1px solid #f5c6c6; cursor: pointer;
  opacity: 0; transition: opacity .12s ease; z-index: 2;
}
.card:hover .mine-del { opacity: 1; }
.mine-del:hover { background: #fad4d4; }

 
 
.sec-title .cat-key, .cat-head .cat-key {
  margin-left: 2px; font-size: 12px; font-weight: 700; color: #92400e;
  background: #fdf3dd; border: 1px solid #f0dcae; border-radius: 999px;
  padding: 2px 10px; cursor: pointer; user-select: none; transition: background .14s ease; white-space: nowrap;
}
.sec-title .cat-key:hover, .cat-head .cat-key:hover { background: #fbe9c4; }
.sec-title .cat-key.on, .cat-head .cat-key.on { background: #fde68a; border-color: #eab308; color: #713f12; }
.card.key-card { border-color: #eab308; background: #fffdf3; }
.key-tag {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700; color: #713f12;
  background: #fef3c7; border: 1px solid #eab308;
  border-radius: 999px; padding: 2px 7px;
}

 
.card.mine-card[draggable="true"] { cursor: grab; }
.card.mine-card[draggable="true"]:active { cursor: grabbing; }
 
.card.mine-card.dragging {
  opacity: .5; transform: scale(.96); cursor: grabbing;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .18); border-style: solid;
}
 
body.dragging-mine, body.dragging-mine * { user-select: none !important; }
html[data-theme="dark"] .card.mine-card.dragging { box-shadow: 0 10px 24px rgba(0, 0, 0, .55); }

 
html[data-theme="dark"] {
  --text: #e6edf7;
  --text-2: #93a4bd;
  --line: #22303f;
  --card: #121c29;
  --bg: #0a1018;
  --shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 10px 30px rgba(0, 0, 0, .4);
}
html[data-theme="dark"] body {
  background: radial-gradient(1200px 520px at 50% -180px, #16233a 0%, var(--bg) 62%) no-repeat, var(--bg);
}
html[data-theme="dark"] .theme-btn:hover,
html[data-theme="dark"] .link-btn:hover { background: #1b2740; }
html[data-theme="dark"] .user-chip { background: #16202e; }
html[data-theme="dark"] .user-chip .role-mini { background: #1a2537; }
html[data-theme="dark"] .user-area .auth-pill.soft { background: #16233a; border-color: #24395a; }
html[data-theme="dark"] .user-area .auth-pill.soft:hover { background: #1b2b47; }
html[data-theme="dark"] .searchbar { background: #101a26; box-shadow: 0 8px 26px rgba(0, 0, 0, .45); }
html[data-theme="dark"] .engine-btn:hover { background: #182437; }
html[data-theme="dark"] .engine-menu { background: #121c29; }
html[data-theme="dark"] .engine-menu li:hover { background: #182437; }
html[data-theme="dark"] .engine-menu li[aria-selected="true"] { background: #1a2a44; }
html[data-theme="dark"] #kw::placeholder { color: #64748b; }
html[data-theme="dark"] .sug-item:hover,
html[data-theme="dark"] .sug-item.on { background: #182437; }
html[data-theme="dark"] .sug-ico,
html[data-theme="dark"] .sug-cat { background: #1a2537; }
html[data-theme="dark"] .sug kbd { background: #16202e; }
html[data-theme="dark"] .cat-filter { background: #121c29; }
html[data-theme="dark"] .cat-mode,
html[data-theme="dark"] .cat-head .cat-add { background: #16233a; border-color: #24395a; }
html[data-theme="dark"] .cat-mode:hover,
html[data-theme="dark"] .cat-head .cat-add:hover { background: #1b2b47; }
html[data-theme="dark"] .cat-item:hover { background: #16202e; }
html[data-theme="dark"] .cat-item.on { background: var(--card); }
html[data-theme="dark"] .cat-item .count { background: #1a2537; }
html[data-theme="dark"] .cat-item.on .count { background: #1a2a44; color: #93c5fd; }
html[data-theme="dark"] .card .ico { background: #1a2537; }
html[data-theme="dark"] .card:hover { border-color: #2f4a75; }
html[data-theme="dark"] .star { color: #5b6b82; }
html[data-theme="dark"] .star:hover { background: #2a2113; }
html[data-theme="dark"] .card.mine-card { background: #1a160e; border-color: #7c5a20; }
html[data-theme="dark"] .card.key-card { background: #1a1707; }
html[data-theme="dark"] .mine-tag { background: #2a2113; border-color: #7c5a20; color: #e0b062; }
html[data-theme="dark"] .mine-del { background: #3a1a1a; border-color: #7c2d2d; }
html[data-theme="dark"] .dialog { background: #121c29; }
html[data-theme="dark"] .dialog input { background: #0e1723; color: var(--text); border-color: #22303f; }
html[data-theme="dark"] .dialog input:focus { background: #101c2b; }
html[data-theme="dark"] .btn.ghost { background: #1b2534; }
html[data-theme="dark"] .btn.ghost:hover { background: #233045; }
html[data-theme="dark"] .pw-eye:hover { background: #1a2537; }
html[data-theme="dark"] .foot .sep2,
html[data-theme="dark"] .switch-line .sep { color: #334155; }
html[data-theme="dark"] .home-ad { background: #121c29; }
html[data-theme="dark"] .panel .ro,
html[data-theme="dark"] .prof-info .ro { background: #16202e; }
html[data-theme="dark"] .prof-banner { background: #2a2113; border-color: #7c5a20; color: #e0b062; }

 
.notice { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.notice-in {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
}
.notice-in .n-ico { flex: 0 0 auto; font-size: 14px; }
.notice-in .n-tx { flex: 1 1 auto; min-width: 0; }
.notice-in .n-link { flex: 0 0 auto; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.notice-in .n-x {
  flex: 0 0 auto; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 17px; line-height: 1; color: inherit; opacity: .55;
  padding: 2px 6px; border-radius: 8px;
}
.notice-in .n-x:hover { opacity: 1; background: rgba(15, 23, 42, .06); }
.notice.warn .notice-in { background: #fff7e6; border-color: #f0dcae; color: #92600b; }
.notice.success .notice-in { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
html[data-theme="dark"] .notice-in { background: #13233b; border-color: #1f3a5c; color: #93c5fd; }
html[data-theme="dark"] .notice.warn .notice-in { background: #2a2113; border-color: #7c5a20; color: #e0b062; }
html[data-theme="dark"] .notice.success .notice-in { background: #0f2a20; border-color: #1e5a41; color: #6ee7b7; }

 
@media (max-width: 640px) {
  .stage {
    position: sticky; top: 0; z-index: 25;
    padding-top: 8px; padding-bottom: 10px;
  }
   
  .stage.compact {
    padding-top: 6px; padding-bottom: 8px;
    background: rgba(245, 247, 251, .94);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--line), 0 8px 18px -14px rgba(15, 23, 42, .5);
  }
  .stage.compact .logo, .stage.compact .slogan { display: none; }
  html[data-theme="dark"] .stage.compact { background: rgba(10, 16, 24, .94); }

   
   
  .cat-wrap { gap: 10px; align-items: stretch; }
  .cat-side, .cat-main { width: 100%; max-width: 100%; }
  .cat-side {
    flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; overflow-y: hidden;
    gap: 8px; padding: 2px 0 8px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .cat-side::-webkit-scrollbar { display: none; }
  .cat-item {
    flex: 0 0 auto; padding: 7px 12px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--line);
    font-size: 13px; scroll-snap-align: center;
  }
  .cat-item .ico { font-size: 14px; }
  .cat-item .count { padding: 0 6px; }
  .cat-item.on,
  html[data-theme="dark"] .cat-item.on {
    background: var(--brand); border-color: var(--brand); color: #fff;
    box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .45);
  }
  .cat-item.on .count,
  html[data-theme="dark"] .cat-item.on .count { background: rgba(255, 255, 255, .22); color: #fff; }
  html[data-theme="dark"] .cat-item { background: #16202e; }

  .notice { padding: 0 14px; }
  .notice-in { font-size: 12.5px; padding: 8px 10px; }
}
