:root {
  --pink: #ff4080;
  --pink-soft: #ff6b9d;
  --pink-pale: #fff0f5;
  --pink-border: #ffd0e0;
  --bg: #ffffff;
  --card: #ffffff;
  --line: #f0e4ea;
  --text: #222222;
  --muted: #8a7a82;
  --accent: #ff4080;
  --accent2: #ff6b9d;
  --danger: #e11d48;
  --shadow: 0 4px 18px rgba(255, 64, 128, 0.08);
  --radius: 14px;
  --pad: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --max: 1100px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; background: var(--pink-pale); }
.brand-logo,
.ad-banner-img,
.lightbox img { background: transparent !important; }

.page-wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

.ad-banner {
  width: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--pink-border);
}
.ad-banner-top {
  background: var(--bg);
}
.ad-banner-inner {
  margin: 14px 0 4px;
  border: 1px solid var(--pink-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.ad-banner-link {
  position: relative;
  display: block;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  text-decoration: none;
  color: #fff;
  background: transparent;
}
.ad-banner-tag {
  position: absolute;
  top: 6px;
  left: 8px;
  z-index: 1;
  font-size: 10px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,.45);
  color: rgba(255,255,255,.85);
  letter-spacing: .04em;
  pointer-events: none;
}
.ad-banner-img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
  vertical-align: top;
}
.ad-banner-top .ad-banner-img {
  background: var(--bg);
}
.ad-banner-inner .ad-banner-img {
  max-height: none;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--bg);
}
.ad-banner-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px 12px 48px;
  background:
    linear-gradient(105deg, #ff4080 0%, #ff6b9d 42%, #c2185b 100%);
  box-sizing: border-box;
}
.ad-banner-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.35;
}
.ad-banner-cta {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 650;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  color: var(--pink);
  white-space: nowrap;
}
.ad-banner-inner .ad-banner-link {
  max-width: none;
}
.ad-banner-inner .ad-banner-fallback {
  min-height: 72px;
  border-radius: 0;
}

.brand {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: transparent !important;
  flex: 0 0 auto;
}
.brand-name {
  font-size: 18px;
  font-weight: 750;
  color: var(--pink);
  letter-spacing: .02em;
  line-height: 1.2;
}
.detail-topbar {
  background: #fff;
  border-bottom: 1px solid var(--pink-border);
  padding: 8px var(--pad);
}
.detail-topbar .brand { margin: 0; }
.detail-topbar .brand-logo { width: 32px; height: 32px; border-radius: 8px; background: transparent !important; }
.detail-topbar .brand-name { font-size: 15px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--pink-border);
  padding: 10px var(--pad) 8px;
}
.topbar h1,
.topbar .brand {
  margin: 0 0 8px;
}
.search-row { display: flex; gap: 8px; }
.search-row input {
  flex: 1;
  border: 1px solid var(--pink-border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 15px;
  outline: none;
}
.search-row input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,64,128,.12); }
.search-row button, .btn {
  border: 0;
  background: var(--pink);
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 8px var(--pad) 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--pink-pale);
  border: 1px solid var(--pink-border);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.chip.active {
  color: #fff;
  background: var(--pink);
  border-color: var(--pink);
}
.subchips { padding-top: 0; }

/* 瀑布流两列 */
.waterfall {
  padding: 10px var(--pad) 8px;
  column-count: 2;
  column-gap: 10px;
}
.wf-card {
  break-inside: avoid;
  display: block;
  margin: 0 0 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.wf-card img {
  width: 100%;
  height: auto;
  vertical-align: top;
  background: var(--pink-pale);
}
.wf-card .title {
  padding: 8px 10px 10px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty, .error, .loading {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
}
.error { color: var(--danger); }
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px var(--pad) 12px;
  max-width: var(--max);
  margin: 0 auto;
}
.pager a, .pager span {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--pink-pale);
  border: 1px solid var(--pink-border);
  color: var(--muted);
  font-size: 13px;
}
.pager a { color: var(--pink); font-weight: 600; }
.pager .cur { color: var(--pink); background: #fff; }

/* site footer */
.site-footer {
  margin-top: 12px;
  padding: 18px var(--pad) calc(22px + var(--safe-b));
  border-top: 1px solid var(--pink-border);
  background: var(--pink-pale);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}
.site-footer a {
  color: var(--pink);
  font-weight: 700;
  text-decoration: underline;
}

/* detail */
.detail-hero {
  position: relative;
  background: var(--pink-pale);
  max-width: var(--max);
  margin: 0 auto;
}
.detail-hero img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: var(--pink-pale);
}
.back-btn {
  position: absolute; left: 12px; top: 12px;
  background: rgba(255,64,128,.9);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  border: 0;
  z-index: 2;
}
.detail-main {
  padding: var(--pad);
  padding-bottom: 8px;
  max-width: var(--max);
  margin: 0 auto;
}
.detail-title {
  font-size: 20px;
  font-weight: 750;
  margin: 0 0 4px;
  color: var(--text);
}
.detail-sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}
.score-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 14px;
}
.pill {
  background: var(--pink-pale);
  border: 1px solid var(--pink-border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted);
}
.pill strong { color: var(--pink); font-weight: 700; }
.section { margin-top: 18px; }
.section h2 {
  font-size: 15px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.section h2::before {
  content: "";
  width: 3px; height: 14px;
  border-radius: 2px;
  background: var(--pink);
}
.info-table {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.info-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--muted); }
.info-row .v { color: var(--text); word-break: break-word; }
.process-list, .release-list { display: grid; gap: 8px; }
.process-item, .release-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}
.process-item .t { color: var(--pink); font-weight: 600; }
.process-item .s { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* 横向图册 */
.pic-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}
.pic-scroll::-webkit-scrollbar { height: 4px; }
.pic-scroll::-webkit-scrollbar-thumb { background: var(--pink-border); border-radius: 4px; }
.pic-item {
  flex: 0 0 auto;
  width: 120px;
  height: 160px;
  padding: 0;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  scroll-snap-align: start;
  background: var(--pink-pale);
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  font: inherit;
  color: inherit;
  text-align: left;
}
.pic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}

.comment-tabs {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.comment-tabs button {
  border: 1px solid var(--pink-border);
  background: var(--pink-pale);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.comment-tabs button.active {
  color: #fff;
  background: var(--pink);
  border-color: var(--pink);
}
.comment-list { display: grid; gap: 10px; }
.comment {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.comment img {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.comment .u { font-size: 13px; font-weight: 650; color: var(--pink); }
.comment .c { font-size: 13px; margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.comment .tm { color: var(--muted); font-size: 11px; margin-top: 6px; }
.load-more {
  width: 100%;
  margin-top: 10px;
  border: 1px dashed var(--pink-border);
  background: var(--pink-pale);
  color: var(--pink);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
}
.ext-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--pink);
  font-size: 13px;
  font-weight: 600;
}

/* 大图预览（新版 pv） */
html.pv-lock,
body.pv-lock {
  overflow: hidden !important;
  touch-action: none;
}
.pv {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 99999;
  background: rgba(0,0,0,.94);
  display: none;
}
.pv.on,
.pv:not([hidden]) {
  display: block;
}
.pv[hidden] {
  display: none !important;
}
.pv-stage {
  position: absolute;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
}
.pv-img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 96vw !important;
  max-height: calc(100vh - 110px) !important;
  object-fit: contain !important;
  background: transparent !important;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.pv-loading {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.75);
  font-size: 12px;
  background: rgba(0,0,0,.35);
  padding: 4px 10px;
  border-radius: 999px;
}
.pv-close,
.pv-btn {
  position: absolute;
  z-index: 3;
  border: 0;
  background: rgba(255,64,128,.95);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pv-close { top: 42px; right: 12px; font-size: 26px; }
.pv-prev { left: 10px; top: 50%; margin-top: -22px; }
.pv-next { right: 10px; top: 50%; margin-top: -22px; }
.pv-bar {
  position: absolute;
  left: 0; right: 0; bottom: 14px;
  text-align: center;
  color: #fff;
  font-size: 14px;
  letter-spacing: .04em;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* 旧 lightbox 样式保留兜底，实际已不用 */
.lightbox { display: none !important; }

/* PC 适配 */
@media (min-width: 768px) {
  :root { --pad: 20px; }
  .waterfall {
    column-count: 3;
    column-gap: 14px;
    padding: 16px var(--pad);
  }
  .wf-card .title { font-size: 14px; padding: 10px 12px 12px; }
  .pic-item { width: 150px; height: 200px; }
  .detail-title { font-size: 24px; }
  .topbar h1 { font-size: 20px; }
  .chips { flex-wrap: wrap; overflow: visible; }
}
@media (min-width: 1100px) {
  .waterfall { column-count: 4; }
  .page-wrap, .detail-main, .detail-hero, .pager, .topbar-inner {
    max-width: var(--max);
  }
  .topbar-inner {
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
  }
}
