/* bika.rest — 绯夜暖樱官方主题 */
:root {
  --br-night: #160810;
  --br-plum: #2a1020;
  --br-wine: #3d1828;
  --br-rose: #ff4d7a;
  --br-rose-lit: #ff8fab;
  --br-peach: #ffb8a8;
  --br-gold: #e8b86d;
  --br-cream: #fff5f0;
  --br-text: #fce8ef;
  --br-muted: #c9a8b4;
  --br-line: rgba(255, 77, 122, 0.22);
  --br-glass: rgba(42, 16, 32, 0.88);
  --br-nav-h: 56px;
  --br-radius: 16px;
  --br-shadow: 0 16px 48px rgba(0, 0, 0, 0.42);
  --br-serif: "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --br-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--br-sans);
  background: var(--br-night);
  color: var(--br-text);
  line-height: 1.88;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 10% -5%, rgba(255, 77, 122, 0.2), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 15%, rgba(232, 184, 109, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 35% at 50% 110%, rgba(255, 143, 171, 0.08), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    -12deg,
    transparent,
    transparent 80px,
    rgba(255, 77, 122, 0.015) 80px,
    rgba(255, 77, 122, 0.015) 81px
  );
  pointer-events: none;
  z-index: 0;
}

a { color: var(--br-rose-lit); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--br-gold); }

img { max-width: 100%; height: auto; display: block; }

.br-shell { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; padding: 0 18px 72px; }

/* Header */
.br-topbar {
  position: sticky;
  top: 0;
  z-index: 220;
  background: rgba(22, 8, 16, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--br-line);
}

.br-topbar-row {
  max-width: 960px;
  margin: 0 auto;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: var(--br-nav-h);
}

.br-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--br-cream);
  font-family: var(--br-serif);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: 0.04em;
}

.br-logo img {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid rgba(255, 143, 171, 0.35);
  box-shadow: 0 4px 14px rgba(255, 77, 122, 0.35);
}

.br-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.br-menu-toggle i {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--br-rose);
  border-radius: 2px;
}

.br-nav {
  position: fixed;
  top: var(--br-nav-h);
  left: 0;
  right: 0;
  background: rgba(22, 8, 16, 0.98);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--br-line);
  padding: 14px 18px 20px;
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.28s, opacity 0.28s;
  z-index: 210;
}

.br-nav.is-open { transform: translateY(0); opacity: 1; }

.br-nav ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.br-nav a {
  display: block;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--br-muted);
  font-size: 0.94rem;
}

.br-nav a:hover, .br-nav a.is-on {
  background: rgba(255, 77, 122, 0.14);
  color: var(--br-rose-lit);
}

.br-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: linear-gradient(120deg, var(--br-rose), #ff6b4a);
  color: #fff !important;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 6px 22px rgba(255, 77, 122, 0.38);
  white-space: nowrap;
}

.br-cta:hover { color: #fff !important; filter: brightness(1.06); }

/* Ads */
.br-ads-float {
  position: fixed;
  top: var(--br-nav-h);
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(22, 8, 16, 0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--br-line);
  padding: 8px 12px;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 0.28s, opacity 0.28s;
  pointer-events: none;
}

.br-ads-float.is-show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#ads, #ads-sticky {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin: 0;
}

#ads > div, #ads-sticky > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(25% - 4px);
  box-sizing: border-box;
}

#ads img, #ads-sticky img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 143, 171, 0.25);
  transition: transform 0.18s;
}

#ads a, #ads-sticky a { display: inline-block; border-radius: 14px; }
#ads img:hover, #ads-sticky img:hover { transform: translateY(-3px) scale(1.04); }

#ads figcaption, #ads-sticky figcaption,
#ads .caption, #ads-sticky .caption {
  height: 14px;
  font-size: 10px;
  color: var(--br-muted);
  text-align: center;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.br-ads-slot { padding: 14px 0 6px; }

/* Hero */
.br-hero {
  padding: 32px 0 24px;
  position: relative;
}

.br-hero-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232, 184, 109, 0.4);
  background: rgba(232, 184, 109, 0.08);
  color: var(--br-gold);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.br-hero h1 {
  font-family: var(--br-serif);
  font-size: clamp(1.55rem, 5vw, 2.15rem);
  line-height: 1.35;
  color: var(--br-cream);
  margin-bottom: 16px;
}

.br-hero-lead {
  font-size: 1rem;
  color: var(--br-muted);
  max-width: 680px;
  margin-bottom: 22px;
}

.br-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.br-cta-ghost {
  display: inline-flex;
  padding: 8px 18px;
  border: 1px solid var(--br-line);
  border-radius: 999px;
  color: var(--br-rose-lit) !important;
  font-size: 0.84rem;
  font-weight: 500;
}

/* Sections */
.br-block {
  margin-top: 40px;
  padding-top: 8px;
}

.br-block-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--br-rose);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.br-block h2 {
  font-family: var(--br-serif);
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  color: var(--br-cream);
  margin-bottom: 18px;
  line-height: 1.4;
}

.br-prose p {
  margin-bottom: 1.1em;
  color: var(--br-text);
  font-size: 0.97rem;
}

.br-prose p:last-child { margin-bottom: 0; }

/* 3:7 layout */
.br-split {
  display: grid;
  gap: 22px;
  align-items: start;
}

.br-split-img { order: 1; }

.br-split-body { order: 2; }

.br-figure {
  border-radius: var(--br-radius);
  overflow: hidden;
  border: 1px solid var(--br-line);
  background: var(--br-plum);
  box-shadow: var(--br-shadow);
}

.br-figure img { width: 100%; }

.br-figure figcaption {
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--br-muted);
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--br-line);
}

/* Cards */
.br-cards {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.br-card {
  padding: 18px 20px;
  border-radius: var(--br-radius);
  background: linear-gradient(145deg, rgba(61, 24, 40, 0.7), rgba(42, 16, 32, 0.5));
  border: 1px solid var(--br-line);
}

.br-card h3 {
  font-family: var(--br-serif);
  font-size: 1.02rem;
  color: var(--br-peach);
  margin-bottom: 8px;
}

.br-card p {
  font-size: 0.9rem;
  color: var(--br-muted);
  line-height: 1.75;
}

.br-card-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

/* Ribbon accent block */
.br-ribbon {
  margin-top: 40px;
  padding: 24px 22px;
  border-radius: var(--br-radius);
  background: linear-gradient(135deg, rgba(255, 77, 122, 0.12), rgba(232, 184, 109, 0.06));
  border: 1px solid var(--br-line);
  position: relative;
  overflow: hidden;
}

.br-ribbon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--br-rose), var(--br-gold));
}

/* Breadcrumb */
.br-crumb {
  padding: 14px 0 6px;
  font-size: 0.84rem;
  color: var(--br-muted);
}

.br-crumb a { color: var(--br-rose-lit); }

.br-page-title {
  padding: 10px 0 24px;
  border-bottom: 1px solid var(--br-line);
  margin-bottom: 28px;
}

.br-page-title h1 {
  font-family: var(--br-serif);
  font-size: clamp(1.4rem, 4.5vw, 1.85rem);
  color: var(--br-cream);
}

/* Footer */
.br-footer {
  margin-top: 56px;
  padding: 28px 0 20px;
  border-top: 1px solid var(--br-line);
  text-align: center;
}

.br-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-bottom: 14px;
}

.br-footer nav a { font-size: 0.88rem; color: var(--br-muted); }
.br-footer nav a:hover { color: var(--br-rose-lit); }

.br-footer p {
  font-size: 0.8rem;
  color: rgba(201, 168, 180, 0.65);
}

/* Error pages */
.br-error {
  text-align: center;
  padding: 48px 0 32px;
}

.br-error code {
  display: block;
  font-family: var(--br-serif);
  font-size: 4rem;
  color: var(--br-rose);
  margin-bottom: 12px;
}

.br-error h1 {
  font-family: var(--br-serif);
  font-size: 1.4rem;
  color: var(--br-cream);
  margin-bottom: 12px;
}

.br-error p { color: var(--br-muted); margin-bottom: 22px; }

/* Desktop */
@media (min-width: 768px) {
  .br-menu-toggle { display: none; }

  .br-nav {
    position: static;
    transform: none;
    opacity: 1;
    background: none;
    border: none;
    padding: 0;
    backdrop-filter: none;
  }

  .br-nav ul {
    flex-direction: row;
    gap: 2px;
  }

  .br-nav a { padding: 8px 12px; font-size: 0.88rem; }

  .br-split {
    grid-template-columns: 3fr 7fr;
    gap: 28px;
  }

  .br-split.reverse .br-split-img { order: 2; }
  .br-split.reverse .br-split-body { order: 1; }

  .br-card-grid { grid-template-columns: repeat(2, 1fr); }
  .br-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }

  #ads > div, #ads-sticky > div {
    width: calc(12.5% - 4px);
  }

  #ads img, #ads-sticky img {
    width: 62px;
    height: 62px;
  }
}

@media (min-width: 900px) {
  .br-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
  }

  .br-hero-visual {
    width: 200px;
    justify-self: end;
  }

  .br-hero-visual img {
    border-radius: 24px;
    box-shadow: var(--br-shadow);
    border: 1px solid var(--br-line);
  }
}
