/* Blog index — mobile-first layout for 红娘手札 */

.blog-page {
  --blog-rose: #be123c;
  --blog-rose-soft: #fff1f2;
  --blog-rose-border: rgba(244, 63, 94, 0.22);
  --blog-text: #0f172a;
  --blog-text-brand: #881337;
  --blog-text-muted: #475569;
  --blog-text-quiet: #64748b;
  --blog-surface: #ffffff;
  --blog-page-bg: #f5f5f7;
  --blog-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(190, 24, 93, 0.05);
  --blog-card-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
  --blog-card-shadow-hover: 0 16px 36px -12px rgba(190, 24, 93, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.85) inset;

  position: relative;
  overflow: hidden;
  padding-block: 1rem 2.25rem;
  color: var(--blog-text);
  color-scheme: light;
  background: var(--blog-page-bg);
}

@media (min-width: 640px) {
  .blog-page {
    padding-block: 1.5rem 2.75rem;
  }
}

@media (min-width: 1024px) {
  .blog-page {
    padding-block: 2rem 3.25rem;
  }
}

.blog-page__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255, 241, 242, 0.95), transparent 58%),
    radial-gradient(ellipse 55% 40% at 100% 12%, rgba(255, 228, 230, 0.4), transparent),
    linear-gradient(180deg, #fff7f8 0%, #f5f5f7 42%, #f1f5f9 100%);
}

.blog-page__container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .blog-page__container {
    padding-inline: 1.5rem;
  }
}

/* Breadcrumb */
.blog-breadcrumb {
  margin-bottom: 0.75rem;
}

.blog-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blog-text-muted);
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-breadcrumb a {
  color: var(--blog-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.blog-breadcrumb a:hover,
.blog-breadcrumb a:focus-visible {
  color: var(--blog-rose);
  outline: none;
}

.blog-breadcrumb [aria-current="page"] {
  color: var(--blog-text);
}

.blog-breadcrumb__sep {
  color: #cbd5e1;
}

/* Hero */
.blog-hero {
  border-radius: 1rem;
  border: 1px solid var(--blog-rose-border);
  background: var(--blog-surface);
  box-shadow: var(--blog-shadow);
  padding: 1rem;
}

@media (min-width: 640px) {
  .blog-hero {
    padding: 1.25rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .blog-hero {
    padding: 1.5rem 2rem;
    border-radius: 1.125rem;
  }
}

.blog-hero__top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .blog-hero__top {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.blog-hero__title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.blog-hero__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(225, 29, 72, 0.12);
}

@media (min-width: 640px) {
  .blog-hero__icon {
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
    border-radius: 0.875rem;
  }
}

.blog-hero__title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  min-width: 0;
}

.blog-hero__title {
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--blog-text-brand);
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .blog-hero__title {
    font-size: 1.875rem;
  }
}

@media (min-width: 1024px) {
  .blog-hero__title {
    font-size: 2.25rem;
  }
}

.blog-hero__accent {
  height: 3px;
  width: 2.5rem;
  margin-top: 0.4rem;
  background: linear-gradient(90deg, var(--blog-rose), rgba(244, 63, 94, 0.15));
  border-radius: 2px;
}

.blog-hero__subtitle {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--blog-text-muted);
  line-height: 1.45;
}

@media (min-width: 640px) {
  .blog-hero__subtitle {
    margin-top: 0.5rem;
    font-size: 1rem;
  }
}

.blog-hero__count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding-inline: 0.625rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid rgba(251, 113, 133, 0.2);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--blog-rose);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
  .blog-hero__count {
    min-width: 2.75rem;
    height: 2.75rem;
    font-size: 1.25rem;
  }
}

.blog-hero__search-wrap {
  width: 100%;
}

@media (min-width: 1024px) {
  .blog-hero__search-wrap {
    width: min(100%, 22rem);
    flex-shrink: 0;
  }
}

.blog-search {
  position: relative;
}

.blog-search__icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.125rem;
  height: 1.125rem;
  color: #9ca3af;
  pointer-events: none;
}

.blog-search__input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem 0.625rem 2.5rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #0f172a;
  font-size: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.blog-search__input::placeholder {
  color: #94a3b8;
}

.blog-search__input:focus {
  outline: none;
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15);
}

/* Category pills */
.blog-categories {
  margin-top: 0.875rem;
}

.blog-categories__scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, #000 92%, transparent 100%);
}

.blog-categories__scroll::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .blog-categories__scroll {
    flex-wrap: wrap;
    overflow: visible;
    mask-image: none;
  }
}

.blog-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.blog-pill--active {
  background: #fff1f2;
  color: #be123c;
  box-shadow: inset 0 0 0 1px rgba(225, 29, 72, 0.18);
}

.blog-pill--inactive {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.blog-pill--inactive:hover,
.blog-pill--inactive:focus-visible {
  background: #f8fafc;
  transform: translateY(-1px);
}

.blog-pill__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

/* Main layout */
.blog-layout {
  margin-top: 1.125rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.125rem;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .blog-layout {
    margin-top: 1.75rem;
    grid-template-columns: minmax(0, 1fr) 18.5rem;
    gap: 1.5rem;
    align-items: start;
  }
}

.blog-main {
  order: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.blog-highlights {
  order: 2;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .blog-main {
    order: 1;
  }

  .blog-highlights {
    order: 2;
  }
}

/* Post grid */
.blog-post-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.875rem;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 640px) {
  .blog-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 1280px) {
  .blog-post-grid {
    gap: 1.125rem;
  }
}

.blog-post-card-wrap {
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.blog-staff-edit {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.blog-staff-edit:hover,
.blog-staff-edit:focus-visible {
  background: #fef3c7;
  outline: 2px solid rgba(180, 83, 9, 0.35);
  outline-offset: 1px;
}

.blog-staff-shortcode {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid rgba(244, 63, 94, 0.3);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.blog-staff-shortcode:hover,
.blog-staff-shortcode:focus-visible {
  background: #ffe4e6;
  outline: 2px solid rgba(190, 18, 60, 0.35);
  outline-offset: 1px;
}

.blog-staff-shortcode.is-copied {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

.blog-staff-shortcode--inline {
  position: static;
  min-height: 2.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
}

/* Blog cards */
.blog-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 0.875rem;
  border: 1px solid rgba(244, 63, 94, 0.14);
  background: #fff;
  box-shadow: var(--blog-card-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.blog-card:hover,
.blog-card:focus-within {
  box-shadow: var(--blog-card-shadow-hover);
  transform: translateY(-2px);
}

.blog-card__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.blog-card__link:focus-visible {
  outline: 2px solid #f43f5e;
  outline-offset: 2px;
}

.blog-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #fff1f2;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .blog-card__media {
    aspect-ratio: 16 / 9;
  }
}

.blog-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.blog-card__media img[data-fallback="true"] {
  display: none;
}

.blog-card:hover .blog-card__media img {
  transform: scale(1.04);
}

.blog-card__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 42%),
    linear-gradient(145deg, #fff1f2 0%, #ffe4e6 48%, #fdf2f8 100%);
  color: #be123c;
  font-size: 1.75rem;
  line-height: 1;
}

.blog-card__placeholder-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #9f1239;
  opacity: 0.78;
}

.blog-card__placeholder.hidden {
  display: none;
}

.blog-card__media:has(img[data-fallback="true"]) .blog-card__placeholder {
  display: flex;
}

@media (min-width: 640px) {
  .blog-card__placeholder {
    font-size: 2.25rem;
    gap: 0.45rem;
  }

  .blog-card__placeholder-label {
    font-size: 0.8125rem;
  }
}

.blog-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.875rem 1rem 1rem;
  min-width: 0;
  min-height: 0;
}

@media (min-width: 640px) {
  .blog-card__body {
    padding: 1rem 1.125rem 1.125rem;
  }
}

.blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: var(--blog-text-quiet);
}

.blog-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.blog-card__meta svg,
.blog-card__meta-icon {
  width: 0.875rem !important;
  height: 0.875rem !important;
  min-width: 0.875rem;
  min-height: 0.875rem;
  max-width: 0.875rem;
  max-height: 0.875rem;
  flex-shrink: 0;
  display: inline-block;
}

.blog-card__title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: anywhere;
  transition: color 0.15s ease;
}

@media (min-width: 640px) {
  .blog-card__title {
    font-size: 1.0625rem;
  }
}

.blog-card:hover .blog-card__title {
  color: #be123c;
}

.blog-card__excerpt {
  flex: 1;
  min-height: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__excerpt img,
.blog-card__excerpt svg,
.blog-card__excerpt video,
.blog-card__excerpt iframe {
  display: none !important;
}

.blog-card__excerpt p,
.blog-card__excerpt div {
  display: inline;
  margin: 0;
}

@media (min-width: 640px) {
  .blog-card__excerpt {
    font-size: 0.875rem;
  }
}

.blog-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

.blog-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: #fff1f2;
  color: #be123c;
  box-shadow: inset 0 0 0 1px rgba(225, 29, 72, 0.12);
}

/* Empty state */
.blog-empty {
  grid-column: 1 / -1;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 2rem 1.25rem;
  text-align: center;
  box-shadow: var(--blog-shadow);
}

.blog-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 9999px;
  background: #fff1f2;
  font-size: 1.5rem;
}

.blog-empty__title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.blog-empty__text {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

/* Staff quick create */
.blog-staff-panel {
  margin-bottom: 1rem;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 1rem;
  box-shadow: var(--blog-shadow);
}

@media (min-width: 640px) {
  .blog-staff-panel {
    padding: 1.25rem 1.5rem;
  }
}

.blog-staff-panel summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-weight: 800;
  color: #0f172a;
}

.blog-staff-panel summary::-webkit-details-marker {
  display: none;
}

.blog-staff-panel[open] summary {
  margin-bottom: 1rem;
}

/* Highlights */
.blog-highlights {
  min-width: 0;
  max-width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--blog-rose-border);
  background: #ffffff;
  padding: 1rem;
  box-shadow: var(--blog-shadow);
}

@media (min-width: 1024px) {
  .blog-highlights {
    position: sticky;
    top: 5.5rem;
    padding: 1.125rem;
  }
}

.blog-highlights__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.blog-highlights__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  font-size: 0.875rem;
}

.blog-highlights__title {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #0f172a;
}

@media (min-width: 640px) {
  .blog-highlights__title {
    font-size: 1.0625rem;
  }
}

.blog-highlights__grid {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.blog-highlights__grid::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .blog-highlights__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }
}

.blog-highlight-card {
  display: block;
  min-width: 14.5rem;
  flex-shrink: 0;
  scroll-snap-align: start;
  border-radius: 0.875rem;
  border: 1px solid rgba(244, 63, 94, 0.1);
  background: #fff;
  padding: 0.875rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 1024px) {
  .blog-highlight-card {
    min-width: 0;
  }
}

.blog-highlight-card:hover,
.blog-highlight-card:focus-visible {
  box-shadow: 0 8px 20px rgba(190, 24, 93, 0.1);
  transform: translateY(-1px);
  border-color: rgba(244, 63, 94, 0.22);
  outline: none;
}

.blog-highlight-card__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.blog-highlight-card__teaser {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-highlight-card__date {
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #be123c;
}

/* Pagination */
.blog-pagination {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.blog-pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.blog-pagination__btn--nav {
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.blog-pagination__btn--nav:hover:not([aria-disabled="true"]) {
  background: #f8fafc;
}

.blog-pagination__btn--nav[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.blog-pagination__btn--current {
  background: #e11d48;
  color: #fff;
  border: 1px solid #e11d48;
}

.blog-pagination__status {
  width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Mobile polish */
@media (max-width: 639px) {
  .blog-page #floating-nav {
    display: none !important;
  }
}

/* Blog detail page */
.blog-detail-page {
  position: relative;
  overflow: hidden;
  padding-block: 1rem 2.25rem;
}

@media (min-width: 640px) {
  .blog-detail-page {
    padding-block: 1.5rem 2.75rem;
  }
}

@media (min-width: 1024px) {
  .blog-detail-page {
    padding-block: 2rem 3.25rem;
  }
}

.blog-detail__container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .blog-detail__container {
    padding-inline: 1.5rem;
  }
}

.blog-detail__breadcrumb {
  margin-bottom: 0.875rem;
}

.blog-detail__breadcrumb a {
  color: #be123c;
  text-decoration: none;
}

.blog-detail__breadcrumb a:hover,
.blog-detail__breadcrumb a:focus-visible {
  color: #9f1239;
}

.blog-detail__breadcrumb li[aria-current="page"] {
  color: #0f172a;
  font-weight: 700;
}

.blog-detail__panel {
  margin-top: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(244, 63, 94, 0.18);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--blog-shadow);
  padding: 1rem;
}

@media (min-width: 640px) {
  .blog-detail__panel {
    margin-top: 1.25rem;
    padding: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .blog-detail__panel {
    padding: 1.75rem 2rem;
    border-radius: 1.125rem;
  }
}

.blog-detail__header-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .blog-detail__header-row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }
}

.blog-detail__title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .blog-detail__title {
    font-size: 2rem;
  }
}

@media (min-width: 1024px) {
  .blog-detail__title {
    font-size: 2.375rem;
  }
}

.blog-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.blog-detail__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  border: 1px solid rgba(244, 63, 94, 0.28);
  background: #fff1f2;
  color: #881337;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.blog-detail__action-btn:hover,
.blog-detail__action-btn:focus-visible {
  background: #ffe4e6;
  border-color: rgba(225, 29, 72, 0.35);
  outline: none;
}

.blog-detail__action-btn--staff {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.blog-detail__meta {
  margin-top: 0.625rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.blog-detail__tags {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-detail__tag {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  border: 1px solid rgba(225, 29, 72, 0.2);
  background: #fff1f2;
  color: #9f1239;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.blog-detail__cover-wrap {
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .blog-detail__cover-wrap {
    margin-top: 1.25rem;
  }
}

.blog-detail__cover {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(244, 63, 94, 0.16);
  background: #f8fafc;
}

.blog-detail__cover-img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-detail__content {
  margin-top: 1.25rem;
  color: #334155;
}

.blog-detail__content h1,
.blog-detail__content h2,
.blog-detail__content h3,
.blog-detail__content h4,
.blog-detail__content h5,
.blog-detail__content h6 {
  color: #0f172a;
  line-height: 1.3;
}

.blog-detail__content p,
.blog-detail__content li,
.blog-detail__content blockquote {
  color: #334155;
  line-height: 1.75;
}

.blog-detail__content a {
  color: #be123c;
}

.blog-detail__section-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

@media (min-width: 640px) {
  .blog-detail__section-title {
    font-size: 1.25rem;
  }
}

.blog-detail__comment-form {
  margin-top: 0.875rem;
  display: grid;
  gap: 0.75rem;
}

.blog-detail__comment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .blog-detail__comment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.blog-detail__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #334155;
}

.blog-detail__input {
  width: 100%;
  min-height: 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid #dbe2ea;
  background: #fff;
  color: #0f172a;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
}

.blog-detail__input:focus {
  outline: none;
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.14);
}

.blog-detail__helper {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  color: #64748b;
}

.blog-detail__submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #e11d48;
  background: #e11d48;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.blog-detail__submit-btn:hover,
.blog-detail__submit-btn:focus-visible {
  background: #be123c;
  border-color: #be123c;
  outline: none;
}

.blog-detail__comments {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.blog-detail__comment-card {
  border-radius: 0.875rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.875rem;
}

.blog-detail__comment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.blog-detail__comment-author {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
}

.blog-detail__comment-time {
  white-space: nowrap;
  font-size: 0.75rem;
  color: #64748b;
}

.blog-detail__comment-body {
  margin-top: 0.5rem;
  color: #334155;
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 0.9375rem;
}

.blog-detail__related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-detail__related-body {
  margin-top: 0.875rem;
  color: #64748b;
  font-size: 0.875rem;
}

.blog-detail__related-list {
  display: grid;
  gap: 0.625rem;
}

.blog-detail__related-card {
  display: block;
  border-radius: 0.875rem;
  border: 1px solid rgba(244, 63, 94, 0.14);
  background: #fff;
  padding: 0.75rem 0.875rem;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-detail__related-card:hover,
.blog-detail__related-card:focus-visible {
  border-color: rgba(225, 29, 72, 0.28);
  box-shadow: 0 8px 20px rgba(190, 24, 93, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.blog-detail__related-title {
  color: #0f172a;
  font-weight: 700;
  line-height: 1.4;
}

.blog-detail__related-excerpt {
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.8125rem;
  line-height: 1.5;
}

@media (max-width: 639px) {
  .blog-detail-page #floating-nav {
    display: none !important;
  }
}

/* Contrast lock — forced-light under OS dark mode */
@media (prefers-color-scheme: dark) {
  .blog-page,
  .blog-detail-page {
    color-scheme: light;
    --blog-text: #0f172a;
    --blog-text-brand: #881337;
    --blog-text-muted: #475569;
    --blog-text-quiet: #64748b;
    --blog-surface: #ffffff;
    --blog-page-bg: #f5f5f7;
    color: #0f172a;
    background: #f5f5f7;
  }

  .blog-page a:link,
  .blog-page a:visited,
  .blog-detail-page a:link,
  .blog-detail-page a:visited {
    color: #be123c;
  }

  .blog-hero,
  .blog-card,
  .blog-highlights,
  .blog-empty,
  .blog-staff-panel,
  .blog-detail__panel,
  .blog-search__input {
    background: #ffffff !important;
    color: #0f172a;
  }

  .blog-card__title,
  .blog-highlights__title,
  .blog-empty__title,
  .blog-hero__title {
    color: #0f172a;
  }

  .blog-hero__title {
    color: #881337;
  }

  .blog-card__excerpt,
  .blog-card__meta,
  .blog-hero__subtitle,
  .blog-empty__text {
    color: #475569;
  }

  .blog-pill--inactive {
    background: #ffffff;
    color: #334155;
    border-color: #e2e8f0;
  }

  .blog-staff-shortcode,
  .blog-staff-edit {
    backdrop-filter: none;
  }
}

