/* ===== 顶会论文主图 ===== */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #141a2a;
  --ink-soft: #5b6478;
  --line: #e6e9f2;
  --iclr: #4f46e5;
  --icml: #0d9488;
  --neurips: #e11d48;
  --cvpr: #f97316;
  --acl: #2563eb;
  --aaai: #7c3aed;
  --accent: #4f46e5;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(28, 35, 51, .05), 0 8px 24px -12px rgba(28, 35, 51, .18);
  --shadow-hover: 0 2px 4px rgba(28, 35, 51, .06), 0 20px 44px -16px rgba(28, 35, 51, .28);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Hero (scrolls away) ---------- */
.hero {
  background:
    radial-gradient(1100px 300px at 10% -140px, rgba(79, 70, 229, .14), transparent 60%),
    radial-gradient(900px 260px at 90% -150px, rgba(225, 29, 72, .10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f6f7fb 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1320px; margin: 0 auto; padding: 11px 28px 9px; }
.hero-top { display: flex; align-items: center; gap: 18px; justify-content: space-between; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, #4f46e5, #0d9488 55%, #e11d48);
  display: grid; place-items: center;
  box-shadow: 0 6px 18px -6px rgba(79, 70, 229, .55);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.92); display: inline-block; margin: 0 1.5px; }
h1 { margin: 0; font-size: 20px; letter-spacing: .2px; font-weight: 800; }
.tagline { margin: 1px 0 0; font-size: 12px; color: var(--ink-soft); }
.vn { font-weight: 700; padding: 0 1px; }
.vn.iclr { color: var(--iclr); } .vn.icml { color: var(--icml); }
.vn.neurips { color: var(--neurips); } .vn.cvpr { color: var(--cvpr); }
.vn.acl { color: var(--acl); } .vn.aaai { color: var(--aaai); }

.hero-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; color: var(--ink-soft);
  box-shadow: 0 1px 2px rgba(28,35,51,.05);
}
.stat-pill b { color: var(--ink); font-size: 13.5px; font-weight: 800; }
.stat-pill.best { background: linear-gradient(135deg, #fee2e2, #fff1f2); border-color: #fecdd3; }
.stat-pill.best b, .stat-pill.best { color: #be123c; }
.stat-pill.best .dot-ic { font-style: normal; font-size: 11px; }
.stat-pill.oral { background: linear-gradient(135deg, #fef3c7, #fef9e7); border-color: #fde68a; color: #92610a; }
.stat-pill.oral b { color: #92610a; }
.stat-pill.spotlight { background: linear-gradient(135deg, #eef2f7, #f8fafc); border-color: #dbe3ee; color: #475569; }
.stat-pill.spotlight b { color: #475569; }

.intro { margin: 7px 0 0; font-size: 12.5px; color: var(--ink-soft); max-width: 1120px; line-height: 1.55; }
.intro b { color: var(--ink); font-weight: 700; }
.intro .t-k { color: #92610a; }
.hl-num {
  font-size: 16px; font-weight: 800; color: var(--accent);
  background: rgba(79, 70, 229, .09); border-radius: 6px; padding: 1px 7px; margin-right: 2px;
}

/* ---------- Sticky control bar ---------- */
.stickbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(1.25) blur(10px);
  -webkit-backdrop-filter: saturate(1.25) blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px -14px rgba(28, 35, 51, .35);
}
.stickbar-inner { max-width: 1320px; margin: 0 auto; padding: 7px 28px 7px; display: flex; flex-direction: column; gap: 5px; }
.stick-row { display: flex; align-items: center; gap: 14px; }
.search-box {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 11px; color: #8a93a8;
}
.search-box:focus-within { border-color: rgba(79, 70, 229, .55); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.search-box input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 8px 0; font-size: 13.5px; color: var(--ink); min-width: 0;
}
.clear-btn { border: 0; background: #eef0f7; color: #6b7488; width: 20px; height: 20px; border-radius: 50%; font-size: 14px; line-height: 1; cursor: pointer; flex-shrink: 0; }
.clear-btn:hover { background: #e2e5ef; color: var(--ink); }
.result-count { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.result-count b { color: var(--ink); font-size: 13.5px; }
.sort-wrap { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #98a0b3; white-space: nowrap; }
.sort-wrap select {
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 12.5px;
  background: var(--surface); color: var(--ink); cursor: pointer;
}

.filter-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.filter-label {
  font-size: 11px; color: #98a0b3; flex-shrink: 0; letter-spacing: .4px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 90px; padding: 3px 0; border-radius: 999px; white-space: nowrap;
}
.filter-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.fl-venue   { color: #4f46e5; background: rgba(79, 70, 229, .10); }
.fl-year    { color: #0d9488; background: rgba(13, 148, 136, .10); }
.fl-tier    { color: #b45309; background: rgba(217, 119, 6, .13); }
.fl-pattern { color: #7c3aed; background: rgba(124, 58, 237, .10); }
.filter-label.sep { margin-left: 18px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  padding: 3px 11px; border-radius: 999px; font-size: 12px; cursor: pointer;
  transition: all .15s ease; user-select: none; line-height: 1.5;
}
.chip:hover { border-color: #c6ccdd; color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.active[data-venue="all"] { background: #4f46e5; border-color: #4f46e5; }
.chip.active[data-venue="iclr"] { background: var(--iclr); border-color: var(--iclr); }
.chip.active[data-venue="icml"] { background: var(--icml); border-color: var(--icml); }
.chip.active[data-venue="neurips"] { background: var(--neurips); border-color: var(--neurips); }
.chip.active[data-venue="cvpr"] { background: var(--cvpr); border-color: var(--cvpr); }
.chip.active[data-venue="acl"] { background: var(--acl); border-color: var(--acl); }
.chip.active[data-venue="aaai"] { background: var(--aaai); border-color: var(--aaai); }
#year-chips .chip.active { background: #0d9488; border-color: #0d9488; }
#pattern-chips .chip.active { background: #7c3aed; border-color: #7c3aed; }
#tier-chips .chip.active[data-tier="all"] { background: linear-gradient(135deg, #d97706, #b45309); border-color: #d97706; }
.chip.active[data-tier="best"] { background: #e11d48; border-color: #e11d48; }
.chip.active[data-tier="oral"] { background: linear-gradient(135deg, #d97706, #ca8a04); border-color: #d97706; }
.chip.active[data-tier="spotlight"] { background: linear-gradient(135deg, #64748b, #94a3b8); border-color: #64748b; }
.chip .n { opacity: .65; font-size: 10.5px; margin-left: 3px; }

/* ---------- Gallery ---------- */
.container { max-width: 1320px; margin: 0 auto; padding: 14px 28px 60px; }
.masonry { column-count: 4; column-gap: 18px; }
@media (max-width: 1180px) { .masonry { column-count: 3; } }
@media (max-width: 860px)  { .masonry { column-count: 2; } }
@media (max-width: 540px)  { .masonry { column-count: 1; } .hero-inner { padding: 13px 16px 10px; } .stickbar-inner { padding: 8px 16px 7px; } .container { padding: 14px 16px 40px; } .filter-label { width: auto; padding: 3px 10px; } .filter-label.sep { margin-left: 0; } }

.card {
  break-inside: avoid; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: block;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #d6dbe9; }

/* image slot: reserved aspect ratio + shimmer while loading */
.img-slot {
  position: relative; width: 100%;
  background:
    linear-gradient(100deg, #eef1f7 30%, #f7f9fc 45%, #eef1f7 60%);
  background-size: 220% 100%;
  animation: tc-shimmer 1.5s linear infinite;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
@keyframes tc-shimmer { to { background-position: -120% 0; } }
.card-img {
  width: 100%; display: block; position: absolute; inset: 0;
  opacity: 0; transition: opacity .35s ease;
}
.card-img.loaded { opacity: 1; }
.img-slot.loaded { animation: none; background: #fff; }
.img-slot.img-failed { animation: none; background: #f3f4f8; }
.img-failed::after {
  content: "Image unavailable · 点击重试"; position: absolute; inset: 0;
  display: grid; place-items: center; font-size: 12px; color: #98a0b3;
}

/* acceptance-tier corner ribbon */
.ribbon {
  position: absolute; top: 9px; left: 9px; z-index: 2;
  font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 3.5px 9px; border-radius: 999px; color: #fff;
  box-shadow: 0 3px 10px -2px rgba(20,24,40,.35);
  backdrop-filter: blur(2px);
}
.ribbon.rb-best { background: linear-gradient(135deg, #e11d48, #be123c); box-shadow: 0 3px 12px -2px rgba(225,29,72,.55); }
.ribbon.rb-honor { background: rgba(255,255,255,.94); color: #be123c; border: 1.5px solid #fb7185; }
.ribbon.rb-oral { background: linear-gradient(135deg, #eab308, #c8860a); box-shadow: 0 3px 12px -2px rgba(202,138,10,.5); }
.ribbon.rb-spotlight { background: linear-gradient(135deg, #94a3b8, #64748b); }
.card.is-award { border-color: #fda4af; }
.card.is-award:hover { border-color: #fb7185; }
.card.is-oral { border-color: #fde68a; }
.card.is-oral:hover { border-color: #fbbf24; }

.badge.tier-badge { text-transform: uppercase; letter-spacing: .5px; }
.badge.rb-best { background: linear-gradient(135deg, #e11d48, #be123c); }
.badge.rb-honor { background: #fff1f2; color: #be123c; border: 1px solid #fb7185; }
.badge.rb-oral { background: linear-gradient(135deg, #eab308, #c8860a); }
.badge.rb-spotlight { background: linear-gradient(135deg, #94a3b8, #64748b); }
.card-body { padding: 12px 14px 13px; }
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 7px; }
.badge {
  font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  padding: 2.5px 9px; border-radius: 999px; color: #fff;
}
.badge.iclr { background: var(--iclr); }
.badge.icml { background: var(--icml); }
.badge.neurips { background: var(--neurips); }
.badge.cvpr { background: var(--cvpr); }
.badge.acl { background: var(--acl); }
.badge.aaai { background: var(--aaai); }
.badge.year { background: #eef0f7; color: #59617a; text-transform: none; letter-spacing: 0; }
.badge.pattern { background: #fff4e6; color: #b45309; text-transform: none; letter-spacing: .3px; font-weight: 600; }
.card-title { margin: 0; font-size: 13.5px; line-height: 1.45; font-weight: 600; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-authors { margin: 6px 0 0; font-size: 11.5px; color: #8a93a8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-link { margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.card:hover .card-link { text-decoration: underline; }

.empty-state { text-align: center; padding: 90px 20px; color: var(--ink-soft); }
.empty-emoji { font-size: 42px; margin-bottom: 10px; }
.ghost-btn, .primary-btn {
  display: inline-block; border-radius: 10px; padding: 9px 18px; font-size: 13.5px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600;
}
.ghost-btn:hover { border-color: #c6ccdd; text-decoration: none; }
.primary-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary-btn:hover { text-decoration: none; filter: brightness(1.07); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 20px; }
.footer-inner { max-width: 1320px; margin: 0 auto; padding: 30px 28px 40px; display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; }
.site-footer h3 { font-size: 14px; margin: 0 0 10px; }
.site-footer p { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 10px; }
.pattern-legend { list-style: none; padding: 0; margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.pattern-legend li { padding: 2.5px 0; }
.pattern-legend b { color: var(--ink); font-family: ui-monospace, Consolas, monospace; }
.repo-note code { background: #f1f3f9; border-radius: 5px; padding: 1px 6px; font-size: 11.5px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 30px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(20, 24, 36, .66); backdrop-filter: blur(3px); }
.lightbox-dialog {
  position: relative; background: #fff; border-radius: 18px;
  width: min(1080px, calc(100vw - 48px));
  height: min(680px, calc(100vh - 48px));
  min-width: 0; min-height: 0;
  overflow: hidden; box-shadow: 0 40px 90px -20px rgba(0,0,0,.5);
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.lightbox-close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: #333; font-size: 20px; line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.lightbox-img-wrap {
  position: relative;
  background: #fbfbfd;
  border-right: 1px solid var(--line);
  min-height: 0; min-width: 0; overflow: hidden;
}
.lightbox-img-wrap img {
  position: absolute; inset: 18px;
  width: calc(100% - 36px); height: calc(100% - 36px);
  min-width: 0; min-height: 0;
  object-fit: contain; border-radius: 8px;
}
.lightbox-meta {
  padding: 26px 24px; display: flex; flex-direction: column; gap: 12px;
  min-height: 0; overflow: auto;
}
.lb-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.lightbox-meta h2 { margin: 0; font-size: 17px; line-height: 1.4; }
.lb-authors { margin: 0; font-size: 13px; color: var(--ink-soft); }
.lb-desc {
  margin: 4px 0 0; padding: 10px 12px; border-radius: 10px;
  background: #f5f6fa; color: var(--ink); font-size: 13px; line-height: 1.6;
}
.lb-actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; padding-top: 14px; align-items: center; }
.lb-actions button { font-family: inherit; appearance: none; }
.export-menu { position: relative; }
.export-menu .ghost-btn::after {
  content: "";
  display: inline-block;
  margin-left: 7px;
  border: 4px solid transparent;
  border-top: 4px solid currentColor;
  border-bottom: 0;
  vertical-align: 2px;
}
.export-pop {
  position: absolute;
  z-index: 4;
  left: 0;
  bottom: calc(100% + 6px);
  min-width: 148px;
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 32px -16px rgba(20, 24, 60, .38);
}
.export-pop::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 8px;
}
.export-menu:hover .export-pop,
.export-menu:focus-within .export-pop,
.export-menu.is-open .export-pop { display: flex; }
.export-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.export-item:hover,
.export-item:focus-visible { background: #f3f5fa; outline: none; }
@media (max-width: 860px) {
  .lightbox { padding: 12px; }
  .lightbox-dialog {
    width: calc(100vw - 24px);
    height: min(680px, calc(100vh - 24px));
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1.15fr) minmax(168px, 0.85fr);
  }
  .lightbox-img-wrap { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ===== infinite scroll + lightbox nav (v2) ===== */
.sentinel { text-align: center; padding: 28px 0 8px; color: var(--muted, #7a8196); font-size: 14px; }
.spinner {
  display: inline-block; width: 15px; height: 15px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid #d7dbec; border-top-color: #5b6ee1; border-radius: 50%;
  animation: tc-spin .8s linear infinite;
}
@keyframes tc-spin { to { transform: rotate(360deg); } }
.end-hint { text-align: center; padding: 22px 0 40px; color: #9aa1b5; font-size: 13px; letter-spacing: .04em; }
.lightbox-nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 1001;
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.92); color: #23294a; font-size: 30px; line-height: 1;
  box-shadow: 0 6px 22px rgba(20,24,60,.28);
}
.lightbox-nav:hover { background: #fff; }
.lightbox-nav.prev { left: 18px; }
.lightbox-nav.next { right: 18px; }

/* ===== Full-bleed image search ===== */
body {
  background: #09090b;
  color: #f5f5f5;
}
.stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: #09090b;
}
.tile {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: #141418;
  overflow: hidden;
  cursor: zoom-in;
  border-radius: 2px;
  transition: left .52s cubic-bezier(.22,1,.36,1), top .52s cubic-bezier(.22,1,.36,1),
    width .52s cubic-bezier(.22,1,.36,1), height .52s cubic-bezier(.22,1,.36,1),
    opacity .38s ease, transform .52s cubic-bezier(.22,1,.36,1);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.tile.entering { opacity: 0; transform: scale(.78); }
.tile.leaving { opacity: 0; transform: scale(.72); pointer-events: none; }
.tile:hover { z-index: 2; transform: scale(1.025); }
.tile.entering:hover, .tile.leaving:hover { transform: scale(.78); }

.search-dock {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.search-stack {
  position: relative;
  width: min(640px, calc(100vw - 24px));
  pointer-events: none;
}
.search-pill, .search-panel { pointer-events: auto; }
.search-pill {
  position: relative;
  width: min(520px, 100%);
  margin: 0 auto;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #111;
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  box-shadow:
    0 18px 50px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.9);
}
.search-pill input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111;
  font-size: 17px;
  font-weight: 500;
  padding: 0;
}
.search-pill input::placeholder { color: rgba(17,17,17,.42); }
.search-pill .clear-btn {
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,.08);
  color: #333;
}
.search-orb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(from 140deg, #67e8f9, #818cf8, #e879f9, #fde68a, #67e8f9);
  box-shadow: 0 0 16px rgba(129,140,248,.75), inset 0 0 8px rgba(255,255,255,.45);
}
.search-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 12px);
  width: auto;
  max-height: min(42vh, 380px);
  overflow: auto;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: rgba(18,18,22,.78);
  color: #f5f5f5;
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  translate: 0 -6px;
  transition: opacity .2s ease, translate .2s ease;
}
.search-dock.open .search-panel {
  opacity: 1;
  pointer-events: auto;
  translate: 0 0;
}
.panel-stats, .panel-hint, .result-count {
  margin: 0 0 8px;
  font-size: 12px;
  color: rgba(255,255,255,.62);
}
.panel-stats b, .result-count b { color: #fff; }
.search-panel .filter-row { margin-bottom: 6px; }
.search-panel .filter-label {
  width: 64px;
  background: transparent;
  color: rgba(255,255,255,.55);
  justify-content: flex-start;
}
.search-panel .chip {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
}
.search-panel .chip:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.search-panel .chip.active { background: #f5f5f5; border-color: #f5f5f5; color: #111; }
.search-panel .sort-wrap { color: rgba(255,255,255,.55); }
.search-panel .sort-wrap select {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-color: rgba(255,255,255,.14);
}
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.search-panel .ghost-btn {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.2);
  padding: 6px 12px;
}
.panel-hint { margin: 8px 0 0; }
.search-panel { max-height: max(300px, calc(50vh - 56px)); }
.panel-tabs {
  position: sticky;
  top: -14px;
  z-index: 1;
  display: flex;
  gap: 4px;
  margin: 0 -14px 10px;
  padding: 6px 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(18,18,22,.96);
}
.panel-tab {
  position: relative;
  flex-shrink: 0;
  padding: 7px 12px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(255,255,255,.6);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.panel-tab:hover { color: #fff; }
.panel-tab.active { color: #fff; border-bottom-color: #fff; }
.tab-dot {
  position: absolute;
  top: 6px;
  right: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #818cf8;
}
.tab-dot[hidden] { display: none; }
.tab-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding-bottom: 2px;
}
.tab-tools .sort-wrap[hidden] { display: none; }
.search-panel .tab-tools select {
  appearance: none;
  -webkit-appearance: none;
  height: 28px;
  padding: 0 20px 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-opacity='.6' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 6px center;
  color: rgba(255,255,255,.7);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.search-panel .tab-tools select:hover { background-color: rgba(255,255,255,.08); color: #fff; }
.search-panel .tab-tools select option { color: #111; }
.text-btn {
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,.7);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.text-btn:hover:not(:disabled) { background: rgba(255,255,255,.08); color: #fff; }
.text-btn:disabled { color: rgba(255,255,255,.28); cursor: default; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.tab-pane[hidden] { display: none; }
.pane-note { margin: 0 0 10px; font-size: 12px; color: rgba(255,255,255,.55); }
.result-count[hidden] { display: none; }
.search-panel .filter-label { width: 72px; flex-shrink: 0; }
.search-panel .filter-label::before { display: none; }
.search-panel .filter-row { align-items: flex-start; flex-wrap: nowrap; }
.search-panel .filter-row .filter-label { padding-top: 6px; }
.search-panel .filter-row .chips { flex: 1; min-width: 0; }
.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: -1px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35);
}
.sw-red { background: #ef4444; } .sw-orange { background: #f97316; } .sw-yellow { background: #facc15; }
.sw-green { background: #22c55e; } .sw-blue { background: #3b82f6; } .sw-purple { background: #a855f7; }
.sw-pink { background: #ec4899; } .sw-brown { background: #92400e; } .sw-gray { background: #9ca3af; }
.sw-black { background: #111; }
@media (max-width: 540px) {
  .panel-tab { padding: 7px 8px 9px; }
  .tab-tools { gap: 0; }
  .search-panel .tab-tools select, .text-btn { padding-left: 6px; }
  .search-panel .filter-row { flex-direction: column; gap: 6px; margin-bottom: 12px; }
  .search-panel .filter-row .filter-label { width: auto; padding: 0; }
  .search-panel .filter-row .chips { width: 100%; }
}
.empty-state {
  position: fixed;
  left: 50%;
  top: calc(50% + 48px);
  transform: translateX(-50%);
  z-index: 35;
  color: rgba(255,255,255,.78);
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
  pointer-events: none;
}
.notice {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.notice-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(20,20,24,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255,255,255,.86);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.notice-btn:hover, .notice-btn[aria-expanded="true"] { background: #f5f5f5; color: #111; }
.notice-pop {
  width: min(380px, calc(100vw - 32px));
  max-height: min(60vh, 420px);
  overflow: auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(12,12,14,.94);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.notice-pop[hidden] { display: none; }
.notice-pop h3 { margin: 0 0 8px; font-size: 14px; color: #fff; }
.notice-pop p { margin: 0; font-size: 12.5px; line-height: 1.7; color: rgba(255,255,255,.72); }
.notice-pop a { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
}
