/* 爆款对标：沿用暗夜玫瑰设计系统，不增加底部导航项。 */

.home-feature-benchmark {
  grid-column: 1 / -1;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  min-height: 4.7rem;
  border-color: rgba(236, 103, 154, .28);
  background:
    radial-gradient(circle at 90% 10%, rgba(223, 55, 122, .14), transparent 9rem),
    linear-gradient(150deg, rgba(36, 20, 30, .98), rgba(17, 13, 18, .98));
}

.benchmark-feature-icon,
.tool-benchmark-entry-icon {
  display: grid !important;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid rgba(236, 103, 154, .25);
  border-radius: .75rem;
  background: rgba(114, 30, 66, .28);
}

.benchmark-feature-icon svg,
.tool-benchmark-entry-icon svg { width: 1.45rem; height: 1.45rem; color: var(--rose-300); }

.home-feature-badge {
  display: inline-flex !important;
  min-height: 1.75rem;
  align-items: center;
  padding: .3rem .55rem;
  border: 1px solid rgba(236, 103, 154, .2);
  border-radius: 999px;
  background: rgba(108, 29, 62, .26);
  color: var(--rose-300);
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}

.tool-benchmark-entry {
  display: grid;
  width: 100%;
  min-height: 4.25rem;
  grid-template-columns: 2.35rem minmax(0, 1fr) 1rem;
  align-items: center;
  gap: .75rem;
  margin-top: .7rem;
  padding: .7rem .8rem;
  border: 1px solid rgba(236, 103, 154, .2);
  border-radius: var(--radius-md);
  background: rgba(38, 23, 33, .72);
  color: var(--text);
  text-align: left;
}

.tool-benchmark-entry > span:nth-child(2) { display: grid; min-width: 0; gap: .12rem; }
.tool-benchmark-entry strong { font-size: .9rem; }
.tool-benchmark-entry small { overflow: hidden; color: var(--subtle); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.tool-benchmark-entry .home-chevron { width: 1rem; color: var(--subtle); }

.benchmark-view {
  min-width: 0;
  padding-top: .85rem;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 1.5rem) !important;
}

.benchmark-page-head {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
}

.benchmark-page-head h2 { margin-top: .15rem; font-size: 1.45rem; }
.benchmark-page-head .eyebrow { font-size: .7rem; }
.benchmark-back {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(201, 187, 195, .17);
  border-radius: .85rem;
  background: rgba(29, 23, 29, .86);
  color: var(--text-soft);
}
.benchmark-back svg { width: 1.2rem; height: 1.2rem; }
.benchmark-count {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  padding: .35rem .65rem;
  border: 1px solid rgba(243, 154, 188, .18);
  border-radius: 999px;
  background: rgba(71, 28, 49, .3);
  color: var(--rose-300);
  font-size: .75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.benchmark-intro {
  max-width: 36rem;
  margin: .85rem 0 1rem;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.65;
}

.benchmark-search {
  position: relative;
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: .6rem;
  padding: 0 .8rem;
  border: 1px solid rgba(201, 187, 195, .19);
  border-radius: .9rem;
  background: rgba(27, 21, 27, .92);
}
.benchmark-search:focus-within { border-color: var(--rose-400); box-shadow: 0 0 0 3px rgba(223, 55, 122, .11); }
.benchmark-search > svg { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; color: var(--subtle); }
.benchmark-search input {
  width: 100%;
  min-width: 0;
  height: 2.85rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
}
.benchmark-search input::-webkit-search-cancel-button { display: none; }
.benchmark-search button {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  margin-right: -.65rem;
  border: 0;
  background: transparent;
  color: var(--subtle);
  font-size: 1.45rem;
}
.benchmark-filter-button { display: inline-flex; min-height: 2.7rem; align-items: center; gap: .48rem; margin-top: .72rem; padding: .45rem .72rem; border: 1px solid rgba(201, 187, 195, .18); border-radius: .75rem; background: rgba(31, 21, 28, .68); color: var(--text-soft); font-size: .78rem; font-weight: 700; }
.benchmark-filter-button svg { width: 1rem; height: 1rem; color: var(--rose-300); }
.benchmark-filter-button span:last-child { margin-left: .1rem; color: var(--rose-300); font-size: .7rem; }
.benchmark-filter-dialog { width: min(100%, 31rem); }
.benchmark-track-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: 1rem 0; }
.benchmark-track-option { min-height: 2.75rem; padding: .45rem .6rem; border: 1px solid rgba(201, 187, 195, .18); border-radius: .7rem; background: rgba(31, 21, 28, .76); color: var(--text-soft); font-size: .8rem; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.benchmark-track-option.is-active { border-color: rgba(236, 103, 154, .6); background: rgba(103, 29, 65, .48); color: var(--rose-200); }

.benchmark-meta-row {
  display: flex;
  min-height: 2.6rem;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  color: var(--subtle);
  font-size: .72rem;
}
.benchmark-meta-row .text-action { min-height: 44px; padding-inline: .35rem; }

.benchmark-list { display: grid; gap: .75rem; min-width: 0; }
.benchmark-card {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 6.4rem minmax(0, 1fr);
  gap: .85rem;
  padding: .7rem;
  overflow: hidden;
  border: 1px solid rgba(201, 187, 195, .15);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 0 0, rgba(223, 55, 122, .08), transparent 9rem),
    rgba(21, 17, 22, .92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}
.benchmark-card-cover {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 5;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(236, 103, 154, .16);
  border-radius: .72rem;
  background: linear-gradient(145deg, #361724, #171117);
}
.benchmark-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.benchmark-cover-placeholder { display: grid; place-items: center; color: var(--rose-300); }
.benchmark-cover-placeholder svg { width: 2rem; height: 2rem; opacity: .75; }
.benchmark-card-body { display: grid; min-width: 0; align-content: start; gap: .5rem; }
.benchmark-card-kicker { color: var(--rose-300); font-size: .68rem; font-weight: 700; letter-spacing: .06em; }
.benchmark-card h3 {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: .98rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.benchmark-card-preview {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.benchmark-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin-top: auto; }
.benchmark-card-actions button {
  min-width: 0;
  min-height: 44px;
  padding: .45rem .25rem;
  border: 1px solid rgba(201, 187, 195, .16);
  border-radius: .7rem;
  background: rgba(31, 24, 30, .9);
  color: var(--text-soft);
  font-size: .72rem;
  font-weight: 700;
}
.benchmark-card-actions .benchmark-rewrite {
  border-color: rgba(236, 103, 154, .31);
  background: rgba(96, 27, 57, .32);
  color: var(--rose-300);
}
.benchmark-card-actions .benchmark-choose-copy { grid-column: 1 / -1; border-color: rgba(236, 103, 154, .31); background: rgba(96, 27, 57, .32); color: var(--rose-300); }
.benchmark-open {
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
}
.benchmark-card > *:not(.benchmark-open) { position: relative; z-index: 1; pointer-events: none; }
.benchmark-card-actions { pointer-events: auto !important; }
.benchmark-card-actions button { pointer-events: auto; }
.benchmark-card:has(.benchmark-open:focus-visible) { outline: 3px solid rgba(243, 154, 188, .4); outline-offset: 2px; }

.benchmark-empty {
  display: grid;
  min-height: 13rem;
  place-content: center;
  gap: .4rem;
  padding: 1.5rem;
  border: 1px dashed rgba(201, 187, 195, .18);
  border-radius: 1rem;
  color: var(--muted);
  text-align: center;
}
.benchmark-empty strong { color: var(--text-soft); }
.benchmark-empty p { font-size: .8rem; line-height: 1.6; }
.benchmark-skeleton { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); gap: .85rem; padding: .7rem; border: 1px solid rgba(201,187,195,.1); border-radius: 1rem; }
.benchmark-skeleton i { aspect-ratio: 4 / 5; border-radius: .72rem; background: #20191f; }
.benchmark-skeleton span { display: grid; align-content: center; gap: .65rem; }
.benchmark-skeleton b { display: block; width: 100%; height: .72rem; border-radius: 999px; background: #20191f; }
.benchmark-skeleton b:nth-child(2) { width: 78%; }
.benchmark-skeleton b:nth-child(3) { width: 48%; }

.benchmark-dialog { max-height: min(91dvh, 54rem); overflow: hidden; }
.benchmark-detail { display: grid; max-height: inherit; grid-template-rows: auto minmax(0, auto); overflow-y: auto; overscroll-behavior: contain; }
.benchmark-detail-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid rgba(201, 187, 195, .13);
  background: rgba(20, 15, 20, .96);
  backdrop-filter: blur(16px);
}
.benchmark-detail-bar > div { min-width: 0; }
.benchmark-detail-bar > div > span { display: block; margin-top: .12rem; overflow: hidden; color: var(--subtle); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.benchmark-detail-cover { display: grid; max-height: 43dvh; min-height: 11rem; place-items: center; overflow: hidden; background: #100c10; }
.benchmark-detail-cover img { width: 100%; max-height: 43dvh; object-fit: contain; }
.benchmark-detail-cover .benchmark-cover-placeholder svg { width: 3rem; height: 3rem; }
.benchmark-detail-section { padding: 1rem; border-top: 1px solid rgba(201, 187, 195, .1); }
.benchmark-detail-section h2 { margin-top: .45rem; font-size: 1.2rem; line-height: 1.5; }
.benchmark-detail-label { color: var(--rose-300); font-size: .72rem; font-weight: 750; letter-spacing: .08em; }
.benchmark-detail-copy,
.benchmark-detail-notes { margin-top: .55rem; color: var(--text-soft); font-size: .92rem; line-height: 1.78; white-space: pre-wrap; overflow-wrap: anywhere; }
.benchmark-notes-section { margin: 0 1rem 1rem; padding: .85rem; border: 1px solid rgba(236, 103, 154, .14); border-radius: .8rem; background: rgba(69, 28, 47, .22); }
.benchmark-topics-section { margin: 0 1rem 1rem; padding: .85rem; border: 1px solid rgba(201, 187, 195, .12); border-radius: .8rem; background: rgba(31, 21, 28, .48); }
.benchmark-detail-notes { color: var(--muted); font-size: .82rem; }
.benchmark-detail-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: .55rem;
  padding: .8rem max(1rem, env(safe-area-inset-right)) max(.8rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border-top: 1px solid rgba(201, 187, 195, .14);
  background: rgba(20, 15, 20, .96);
  backdrop-filter: blur(16px);
}
.benchmark-copy-status { grid-column: 1 / -1; margin: 0; color: var(--rose-200); font-size: .75rem; line-height: 1.45; text-align: center; }
.benchmark-detail-actions button.is-success { border-color: rgba(79, 209, 154, .55); color: #8ee8be; }
.benchmark-copy-options { display: flex; gap: .45rem; margin-top: .7rem; overflow-x: auto; padding-bottom: .1rem; scrollbar-width: none; }
.benchmark-copy-options::-webkit-scrollbar { display: none; }
.benchmark-copy-option { min-height: 2.25rem; flex: 0 0 auto; padding: .35rem .7rem; border: 1px solid rgba(201, 187, 195, .18); border-radius: 999px; background: rgba(31, 21, 28, .75); color: var(--muted); font-size: .73rem; font-weight: 700; }
.benchmark-copy-option.is-active { border-color: rgba(236, 103, 154, .58); background: rgba(103, 29, 65, .48); color: var(--rose-200); }
.benchmark-detail-actions button { min-height: 3rem; padding-inline: .6rem; font-size: .86rem; }
.benchmark-detail-actions svg { width: 1rem; height: 1rem; }

@media (hover: hover) {
  .benchmark-card:hover { border-color: rgba(236, 103, 154, .32); transform: translateY(-1px); }
  .tool-benchmark-entry:hover { border-color: rgba(236, 103, 154, .35); background: rgba(49, 26, 40, .82); }
}

@media (max-width: 22.5rem) {
  .home-feature-badge { display: none !important; }
  .home-feature-benchmark { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .benchmark-card { grid-template-columns: 5.75rem minmax(0, 1fr); gap: .7rem; }
  .benchmark-card-preview { -webkit-line-clamp: 1; }
  .benchmark-card-actions button { font-size: .68rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .benchmark-card { animation: benchmark-rise 280ms calc(var(--benchmark-order, 0) * 35ms) var(--ease-out-expo) both; transition: border-color 160ms ease, transform 160ms ease; }
  .benchmark-skeleton i,
  .benchmark-skeleton b { animation: benchmark-shimmer 1.4s ease-in-out infinite alternate; }
}

@media (prefers-reduced-motion: reduce) {
  .benchmark-card,
  .benchmark-skeleton i,
  .benchmark-skeleton b { animation: none !important; transition: none !important; }
}

@keyframes benchmark-rise {
  from { opacity: 0; transform: translateY(.45rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes benchmark-shimmer {
  from { background-color: #1c161c; }
  to { background-color: #2a2028; }
}
