/* pi-cac.lol — Strip Rail visual system (unique per-site design) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=ZCOOL+XiaoWei&display=swap');

:root {
  --ink: #141821;
  --ink-soft: #2a3140;
  --coral: #ff4f7b;
  --coral-deep: #e0305c;
  --sunset: #ff8a5c;
  --mint: #3dcea8;
  --sky: #5b9fff;
  --paper: #f3f6fb;
  --panel: #ffffff;
  --line: rgba(20, 24, 33, 0.08);
  --glow: rgba(255, 79, 123, 0.22);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 58px;
  --max: 1080px;
  --font-display: 'ZCOOL XiaoWei', 'Noto Sans SC', serif;
  --font-body: 'Noto Sans SC', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(255, 79, 123, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 8%, rgba(61, 206, 168, 0.1), transparent 50%),
    linear-gradient(180deg, #eef2f8 0%, var(--paper) 28%, #f7f9fc 100%);
  line-height: 1.85;
  font-size: 16px;
  overflow-x: hidden;
  padding-top: calc(var(--header-h) + var(--sticky-ads-h, 0px));
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--coral-deep);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--sunset);
}

/* —— Header —— */
.rail-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.rail-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px var(--glow);
}

.rail-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rail-nav a {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
}

.rail-nav a:hover,
.rail-nav a.is-on {
  color: var(--coral-deep);
  background: rgba(255, 79, 123, 0.08);
}

.rail-menu-btn {
  display: none;
  border: none;
  background: transparent;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
}

.rail-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 5px auto;
  border-radius: 2px;
  transition: 0.25s var(--ease);
}

/* sticky download strip */
.rail-sticky-ads {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  padding: 8px 10px 6px;
}

.rail-sticky-ads.is-show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.rail-ads-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 6px;
  max-width: var(--max);
  margin: 0 auto;
}

.rail-ads-grid > div {
  width: calc(25% - 6px);
  max-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 900px) {
  .rail-ads-grid > div {
    width: calc(12.5% - 6px);
  }
}

.rail-ads-grid img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(20, 24, 33, 0.12);
  transition: transform 0.2s var(--ease);
}

.rail-ads-grid a:hover img {
  transform: translateY(-3px) scale(1.04);
}

.rail-ads-grid .caption {
  margin-top: 4px;
  font-size: 10px;
  color: #667;
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* top promo ads (always visible on designated pages) */
.rail-promo {
  background: linear-gradient(135deg, rgba(255, 79, 123, 0.06), rgba(61, 206, 168, 0.06));
  border-bottom: 1px solid var(--line);
  padding: 14px 12px 10px;
}

.rail-promo .rail-ads-grid > div {
  width: calc(25% - 8px);
  max-width: 80px;
}

@media (min-width: 900px) {
  .rail-promo .rail-ads-grid > div {
    width: calc(12.5% - 8px);
  }
}

/* layout shell */
.rail-shell {
  width: min(100% - 28px, var(--max));
  margin: 0 auto;
}

.rail-crumb {
  padding: 18px 0 8px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.rail-crumb a {
  color: var(--ink-soft);
}

.rail-crumb span {
  opacity: 0.45;
  margin: 0 6px;
}

/* —— Hero: diagonal comic filmstrip —— */
.rail-hero {
  position: relative;
  margin: 12px auto 28px;
  width: min(100% - 20px, var(--max));
  min-height: min(58vh, 520px);
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(125deg, #1a2030 0%, #2d1830 48%, #1c2a3a 100%);
  color: #fff;
  display: grid;
  align-items: center;
  isolation: isolate;
}

.rail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 48px,
      rgba(255, 255, 255, 0.03) 48px,
      rgba(255, 255, 255, 0.03) 50px
    );
  z-index: 0;
  animation: rail-drift 28s linear infinite;
}

.rail-hero::after {
  content: '';
  position: absolute;
  width: 180%;
  height: 55%;
  left: -20%;
  bottom: -18%;
  background: radial-gradient(ellipse at center, rgba(255, 79, 123, 0.45), transparent 65%);
  z-index: 0;
  animation: rail-pulse 6s ease-in-out infinite;
}

@keyframes rail-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50px); }
}

@keyframes rail-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

.rail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 36px 24px 32px;
  max-width: 640px;
}

.rail-hero-tag {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 14px;
  opacity: 1;
  animation: rail-rise 0.8s var(--ease) 0.15s both;
}

.rail-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5.5vw, 2.55rem);
  line-height: 1.35;
  font-weight: 400;
  margin-bottom: 16px;
  color: #fff;
  opacity: 1;
  animation: rail-rise 0.8s var(--ease) 0.3s both;
}

.rail-hero-inner > p:not(.rail-hero-tag) {
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 34em;
  opacity: 1;
  animation: rail-rise 0.8s var(--ease) 0.45s both;
}

@keyframes rail-rise {
  from { opacity: 0.35; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.rail-hero-orbit {
  position: absolute;
  right: -40px;
  top: 10%;
  width: min(52%, 420px);
  height: 70%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
  background:
    conic-gradient(from 120deg, transparent, rgba(255, 79, 123, 0.5), transparent 40%),
    radial-gradient(circle at 40% 40%, rgba(91, 159, 255, 0.35), transparent 60%);
  border-radius: 50%;
  filter: blur(2px);
  animation: rail-spin 18s linear infinite;
}

@keyframes rail-spin {
  to { transform: rotate(360deg); }
}

/* sections */
.rail-block {
  width: min(100% - 28px, var(--max));
  margin: 0 auto 42px;
}

.rail-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4.5vw, 2.05rem);
  line-height: 1.35;
  margin-bottom: 14px;
  color: var(--ink);
  position: relative;
  display: inline-block;
}

.rail-block h2::after {
  content: '';
  display: block;
  width: 48%;
  height: 4px;
  margin-top: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--coral), var(--sunset), transparent);
}

.rail-block h3 {
  font-size: 1.15rem;
  margin: 22px 0 10px;
  color: var(--ink-soft);
  font-weight: 700;
}

.rail-block p {
  margin-bottom: 1em;
  color: var(--ink-soft);
  text-align: justify;
}

.rail-lead {
  font-size: 1.05rem;
  color: var(--ink);
}

/* zigzag media rows */
.rail-zig {
  display: grid;
  gap: 22px;
  align-items: center;
  margin: 28px 0;
}

@media (min-width: 780px) {
  .rail-zig {
    grid-template-columns: 1fr 1.35fr;
  }
  .rail-zig.is-flip {
    grid-template-columns: 1.35fr 1fr;
  }
  .rail-zig.is-flip .rail-shot {
    order: 2;
  }
}

.rail-shot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 20px 50px rgba(20, 24, 33, 0.12),
    0 0 0 1px var(--line);
  background: var(--panel);
  transform: rotate(-1.2deg);
  transition: transform 0.4s var(--ease);
}

.rail-zig.is-flip .rail-shot {
  transform: rotate(1.2deg);
}

.rail-shot:hover {
  transform: rotate(0deg) scale(1.01);
}

.rail-shot img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  max-height: 460px;
}

.rail-shot::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

/* mosaic feature tiles (not generic cards) */
.rail-mosaic {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

@media (min-width: 700px) {
  .rail-mosaic {
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: auto auto;
  }
  .rail-tile:first-child {
    grid-row: span 2;
  }
}

.rail-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 20px;
  position: relative;
  overflow: hidden;
}

.rail-tile::before {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  right: -30px;
  top: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
}

.rail-tile h3 {
  margin-top: 0;
  position: relative;
}

.rail-tile p {
  position: relative;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.rail-tile.is-mint {
  background: linear-gradient(160deg, #ecfff8, #fff);
}

.rail-tile.is-sky {
  background: linear-gradient(160deg, #eef5ff, #fff);
}

.rail-tile.is-warm {
  background: linear-gradient(160deg, #fff1f4, #fff);
}

/* timeline rail */
.rail-timeline {
  position: relative;
  margin: 30px 0;
  padding-left: 22px;
}

.rail-timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--coral), var(--mint));
}

.rail-step {
  position: relative;
  margin-bottom: 22px;
  padding: 16px 18px;
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--line);
}

.rail-step::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 22px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 79, 123, 0.2);
}

.rail-step h3 {
  margin-top: 0;
}

/* quote band */
.rail-band {
  margin: 36px auto;
  width: min(100% - 20px, var(--max));
  padding: 36px 28px;
  border-radius: 26px;
  background:
    linear-gradient(120deg, rgba(255, 79, 123, 0.95), rgba(255, 138, 92, 0.9));
  color: #fff;
  position: relative;
  overflow: hidden;
}

.rail-band::after {
  content: '哔咔';
  position: absolute;
  right: 18px;
  bottom: -18px;
  font-family: var(--font-display);
  font-size: 6rem;
  opacity: 0.12;
  pointer-events: none;
}

.rail-band p {
  position: relative;
  z-index: 1;
  font-size: 1.08rem;
  margin: 0;
  max-width: 40em;
}

/* text columns */
.rail-prose + .rail-prose {
  margin-top: 8px;
}

.rail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 8px;
}

.rail-chips span {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 79, 123, 0.08);
  color: var(--coral-deep);
  border: 1px solid rgba(255, 79, 123, 0.15);
}

/* gallery strip */
.rail-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 42%);
  gap: 14px;
  overflow-x: auto;
  padding: 8px 4px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.rail-gallery figure {
  scroll-snap-align: start;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(20, 24, 33, 0.1);
}

.rail-gallery img {
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  object-position: top;
}

.rail-gallery figcaption {
  padding: 10px 12px 12px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* link grid */
.rail-links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

@media (min-width: 640px) {
  .rail-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

.rail-links a {
  display: block;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-weight: 500;
}

.rail-links a:hover {
  border-color: rgba(255, 79, 123, 0.35);
  color: var(--coral-deep);
}

/* legal / subpages */
.rail-doc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 22px;
  margin-bottom: 48px;
  box-shadow: 0 10px 36px rgba(20, 24, 33, 0.05);
}

.rail-doc h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  margin-bottom: 16px;
}

.rail-doc h2 {
  font-size: 1.2rem;
  margin: 26px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--coral);
}

.rail-doc p,
.rail-doc li {
  color: var(--ink-soft);
  margin-bottom: 0.85em;
}

.rail-doc ul {
  padding-left: 1.2em;
  margin-bottom: 1em;
}

/* error pages */
.rail-error {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.rail-error strong {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 16vw, 6rem);
  background: linear-gradient(120deg, var(--coral), var(--sunset));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.rail-error h1 {
  margin: 12px 0;
  font-size: 1.4rem;
}

.rail-error a {
  margin-top: 18px;
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
}

.rail-error a:hover {
  color: #fff;
  background: var(--coral-deep);
}

/* footer */
.rail-foot {
  margin-top: 20px;
  padding: 36px 20px 48px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
}

.rail-foot-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

@media (min-width: 700px) {
  .rail-foot-inner {
    grid-template-columns: 1.4fr 1fr;
  }
}

.rail-foot a {
  color: rgba(255, 255, 255, 0.85);
}

.rail-foot a:hover {
  color: var(--mint);
}

.rail-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.rail-foot small {
  display: block;
  margin-top: 18px;
  font-size: 0.8rem;
  opacity: 0.65;
}

/* mobile nav */
@media (max-width: 760px) {
  .rail-menu-btn {
    display: block;
  }

  .rail-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    flex-direction: column;
    padding: 12px 16px 18px;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s var(--ease);
    z-index: 998;
  }

  .rail-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .rail-hero {
    min-height: min(52vh, 440px);
    align-items: center;
  }

  .rail-hero-orbit {
    opacity: 0.35;
    width: 70%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .rail-hero-tag,
  .rail-hero h1,
  .rail-hero-inner > p {
    opacity: 1 !important;
    transform: none !important;
  }
}
