:root {
  /* Warm red system — matches 开大户 hero */
  --bg: #faf6f4;
  --surface: #ffffff;
  --ink: #2a1a1a;
  --muted: #7a6464;
  --line: #eadfdf;
  --brand: #d32f2f;
  --brand-dark: #b71c1c;
  --brand-soft: #fdecea;
  --hero-1: #c62828;
  --hero-2: #e53935;
  --hero-3: #ef5350;
  --accent: #e65100;
  --accent-2: #d32f2f;
  --tag-platform: #fff4e0;
  --tag-platform-ink: #9a5b00;
  --tag-gender: #fde8e8;
  --tag-gender-ink: #a31919;
  --cream: #fff8f5;
  --shadow: 0 10px 28px rgba(120, 40, 40, 0.08);
  --radius: 18px;
  --font: "DM Sans", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1000px 420px at 8% -8%, rgba(229, 57, 53, 0.10), transparent 55%),
    radial-gradient(800px 360px at 100% 0%, rgba(230, 81, 0, 0.07), transparent 50%),
    var(--bg);
  min-height: 100dvh;
  overscroll-behavior-y: contain;
  touch-action: manipulation;
}

.hero {
  background: linear-gradient(105deg, var(--hero-1) 0%, var(--hero-2) 45%, var(--hero-3) 100%);
  color: #fff;
  padding: 2.4rem 1.25rem 2rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% 40%;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 65%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.brand-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 0;
}
.brand-row h1 {
  margin: 0;
  font-size: clamp(2.8rem, 10vw, 4.8rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  line-height: 1.1;
  text-align: center;
}
.verified {
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(0.35rem, -50%);
  pointer-events: none;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
  position: absolute;
  left: 100%;
  top: 0.15rem;
  margin-left: 2rem;
}
.live-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #69f0ae;
  box-shadow: 0 0 0 0 rgba(105, 240, 174, 0.7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.subtitle {
  margin: 0.85rem 0 0;
  opacity: 0.95;
  font-size: 0.95rem;
  max-width: min(46rem, 100%);
  width: 100%;
  line-height: 1.7;
  color: #fff;
  text-align: center;
  text-wrap: pretty;
}

.ticker {
  display: flex;
  justify-content: center;
  background: #8e1f1f;
  color: #ffe9e9;
  min-height: 42px;
  padding: 0.55rem 1.25rem;
}
/* Same centering axis as hero title/subtitle above */
.ticker-inner {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ticker-text {
  white-space: normal;
  text-align: center;
  font-size: 0.86rem;
  line-height: 1.45;
  font-weight: 500;
  margin: 0 auto;
}

.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.filters { display: grid; gap: 0.85rem; }
.filter-row {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
}
.filter-label {
  padding-top: 0.55rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}
.pills-sm { justify-content: flex-start; }
.pill {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  min-height: 40px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.pill:hover { transform: translateY(-1px); border-color: var(--brand); }
.pill:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.pill.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(211, 47, 47, 0.28);
}
.pills-sm .pill { padding: 0.35rem 0.8rem; font-size: 0.84rem; min-height: 36px; }

.search-wrap {
  position: relative;
  margin-top: 0.2rem;
}
.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  box-shadow: var(--shadow);
}
.search-wrap input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.region-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.region-stats span {
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.card {
  --card-purple: #7c5cff;
  --card-purple-deep: #6546f0;
  --card-lavender: #ece7ff;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: none;
  box-shadow: 0 8px 24px rgba(40, 30, 60, 0.08);
  display: flex;
  flex-direction: column;
  min-width: 0;
  animation: rise 0.35s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Fixed outer frame; image shrinks to fit fully inside (no crop, no card stretch) */
.card-cover {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  aspect-ratio: 16 / 11;
  background: #ececec;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  pointer-events: none;
  background: #ececec;
}
.card-cover:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
.card-cover::after {
  content: "";
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M15.5 14h-.8l-.3-.3A6.5 6.5 0 1 0 14 15.5l.3.3v.8l5 5 1.5-1.5-5-5zm-6 0A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z'/%3E%3C/svg%3E") center/0.85rem no-repeat;
  opacity: 0.9;
  pointer-events: none;
}

.card-body {
  padding: 0.7rem 0.65rem 0.75rem;
  display: grid;
  gap: 0.5rem;
  background: #fff;
}

.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.code-box {
  background: var(--card-lavender);
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-weight: 700;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: #4a3d8a;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  max-width: 55%;
}
.code-box:focus-visible {
  outline: 2px solid var(--card-purple);
  outline-offset: 2px;
}
.copy-btn {
  border: none;
  background: var(--card-purple);
  color: #fff;
  border-radius: 10px;
  padding: 0 0.65rem;
  min-height: 34px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: background 0.15s;
  flex: 0 0 auto;
}
.copy-btn:hover { background: var(--card-purple-deep); }
.copy-btn:focus-visible {
  outline: 2px solid var(--card-purple-deep);
  outline-offset: 2px;
}
.copy-label { display: inline; }

.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag-platform { background: #ffe08a; color: #3d3200; }
.tag-gender { background: #d7ecff; color: #1f5f8a; }

.jump-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0.55rem 0.6rem;
  min-height: 38px;
  background: #111;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s, filter 0.15s, background 0.15s;
  min-width: 0;
}
.ig-icon { flex: 0 0 auto; }
.jump-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.jump-btn:hover { transform: translateY(-1px); background: #000; filter: none; }
.jump-btn:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}
.jump-btn.disabled {
  pointer-events: none;
  opacity: 0.45;
  filter: grayscale(0.4);
}

.location {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #8a8a8a;
  font-size: 0.74rem;
  min-width: 0;
}
.location svg { flex: 0 0 auto; color: #9a9a9a; }
.location span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty, .end-hint {
  text-align: center;
  color: var(--muted);
  margin: 2rem 0;
}
.hidden { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(20px);
  background: #3d1515;
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(80, 20, 20, 0.25);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 8, 8, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3.2rem 0.75rem 1rem;
  padding-top: calc(3.2rem + env(safe-area-inset-top, 0px));
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  cursor: zoom-out;
  animation: fadeIn 0.18s ease;
}
.lightbox.hidden { display: none !important; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.lightbox-stage {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  overscroll-behavior: contain;
  cursor: zoom-out;
  -webkit-overflow-scrolling: touch;
}
.lightbox-image {
  /* Default: fit whole image into screen (smaller so tall/large pics are fully visible) */
  max-width: min(720px, 92vw);
  max-height: min(68dvh, 68vh);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  cursor: default;
  background: #111;
  transform-origin: center center;
  transition: transform 0.15s ease;
}
.lightbox-toolbar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  cursor: default;
}
.lightbox-toolbar button {
  min-width: 40px;
  min-height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0.7rem;
}
.lightbox-toolbar button:hover { background: rgba(255, 255, 255, 0.26); }
#lightboxZoomLabel {
  min-width: 3.4rem;
  text-align: center;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
}
.lightbox-close {
  position: absolute;
  top: calc(0.75rem + env(safe-area-inset-top, 0px));
  right: 0.75rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }

body.lightbox-open { overflow: hidden; }

/* Mobile-first density: 2 columns, compact cards */
@media (max-width: 720px) {
  .hero { padding: 1.5rem 0.9rem 1.25rem; }
  .subtitle { font-size: 0.86rem; }
  .main { padding: 0.9rem 0.65rem 2.5rem; }

  .filter-row {
    grid-template-columns: 3.6rem minmax(0, 1fr);
    gap: 0.35rem;
  }
  .filter-label {
    padding-top: 0.45rem;
    font-size: 0.74rem;
  }

  .pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.4rem;
    padding-bottom: 0.15rem;
    margin: 0 -0.15rem;
    padding-inline: 0.15rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .pills::-webkit-scrollbar { display: none; }
  .pill {
    padding: 0.4rem 0.8rem;
    min-height: 36px;
    font-size: 0.84rem;
  }

  .search-wrap input {
    min-height: 44px;
    padding: 0.7rem 0.9rem 0.7rem 2.6rem;
    font-size: 16px; /* avoid iOS zoom on focus */
  }

  .region-stats {
    gap: 0.4rem;
    margin: 0.75rem 0 0.2rem;
    font-size: 0.78rem;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .card { border-radius: 14px; }
  .card-cover { aspect-ratio: 16 / 11; }

  .card-body {
    padding: 0.55rem 0.5rem 0.6rem;
    gap: 0.42rem;
  }

  .code-box {
    font-size: 0.74rem;
    padding: 0.28rem 0.55rem;
    min-height: 30px;
  }
  .copy-btn {
    min-height: 30px;
    padding: 0 0.5rem;
    font-size: 0.72rem;
    border-radius: 8px;
  }
  .copy-label { display: inline; }

  .tag { font-size: 0.66rem; padding: 0.14rem 0.4rem; }
  .jump-btn {
    font-size: 0.7rem;
    padding: 0.45rem 0.4rem;
    min-height: 34px;
  }
  .ig-icon { width: 13px; height: 13px; }
  .location { font-size: 0.66rem; }

  .toast {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 2rem);
    font-size: 0.84rem;
  }
}

@media (min-width: 721px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
  }
  .card { border-radius: 18px; }
  .card-cover { aspect-ratio: 16 / 10; }

  .card-body {
    padding: 0.85rem 0.8rem 0.9rem;
    gap: 0.6rem;
  }
  .code-box {
    font-size: 0.9rem;
    padding: 0.4rem 0.85rem;
    min-height: 36px;
  }
  .copy-btn {
    padding: 0 0.85rem;
    min-height: 36px;
    font-size: 0.86rem;
    border-radius: 10px;
  }
  .tag { font-size: 0.78rem; padding: 0.22rem 0.55rem; }
  .jump-btn {
    font-size: 0.9rem;
    padding: 0.7rem 0.9rem;
    min-height: 44px;
  }
  .ig-icon { width: 16px; height: 16px; }
  .location { font-size: 0.84rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-text,
  .card,
  .pill,
  .jump-btn,
  .toast,
  .lightbox,
  .lightbox-image {
    animation: none !important;
    transition: none !important;
  }
}
