/* ==========================================================================
   Digginglog Hanabi — 3D Night Sky Stage, Flare Borders & Reading Fuse
   ========================================================================== */

.dl-hero {
  position: relative;
  min-height: clamp(460px, 64vh, 620px);
  display: flex;
  align-items: flex-end;
  padding: 56px 0 44px;
  background: radial-gradient(ellipse at 50% 100%, #10131b 0%, #07080b 65%, #040507 100%);
  overflow: hidden;
  border-bottom: 1px solid var(--dl-border);
}

:root[data-theme="paper"] .dl-hero {
  /* Hero night pavilion preserves hanabi contrast even in paper reading mode */
  background: radial-gradient(ellipse at 50% 100%, #171411 0%, #090a0e 70%);
  color: #f5f1e8;
}

#dl-hanabi-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  cursor: crosshair;
}

.dl-hero-river-glow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 8, 11, 0) 0%, rgba(16, 19, 28, 0.72) 56%, var(--dl-sky) 100%);
}

.dl-hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 22% 76%, rgba(7, 8, 11, 0.72) 0%, rgba(7, 8, 11, 0.22) 48%, rgba(7, 8, 11, 0.14) 100%);
}

.dl-hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dl-hero-copy {
  max-width: 720px;
}

.dl-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 184, 48, 0.12);
  border: 1px solid rgba(255, 224, 166, 0.28);
  color: #ffe596;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.dl-hero-title {
  margin: 0 0 12px;
  font-family: var(--dl-font-serif);
  font-size: clamp(1.95rem, 4.1vw, 3.15rem);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.025em;
  color: #fffbf2;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.85);
}

.dl-hero-desc {
  margin: 0;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  line-height: 1.7;
  color: #cbc4b6;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
}

.dl-hero-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dl-hub-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dl-hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(14, 16, 21, 0.84);
  border: 1px solid rgba(255, 224, 166, 0.18);
  color: #ece6d9;
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.dl-hub-pill:hover,
.dl-hub-pill.is-selected {
  transform: translateY(-2px);
  color: #fffdf8;
  border-color: var(--cat-color, #ffb830);
  background: rgba(24, 27, 36, 0.94);
  box-shadow: 0 0 22px color-mix(in srgb, var(--cat-color, #ffb830) 35%, transparent);
}

.dl-hub-pill .dl-hub-spark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat-color, #ffb830);
  box-shadow: 0 0 10px var(--cat-color, #ffb830);
}

.dl-stage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dl-stage-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(14, 16, 21, 0.84);
  border: 1px solid rgba(255, 224, 166, 0.2);
  color: #e2dbcd;
  font-size: 0.8rem;
  font-weight: 600;
}

.dl-stage-btn:hover {
  border-color: #ffb830;
  color: #fff6dc;
  box-shadow: 0 0 16px rgba(255, 184, 48, 0.3);
}

.dl-stage-btn[aria-pressed="true"] {
  border-color: #ffb830;
  color: #ffb830;
}

/* ---------- Card Specular Border Flare (Dark Quiet -> Hover Ignition) ---------- */
.dl-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    280px circle at var(--mx, 50%) var(--my, 50%),
    var(--cat-color, var(--dl-accent)) 0%,
    rgba(255, 224, 166, 0.22) 32%,
    transparent 72%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 2;
}

.dl-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    320px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--cat-color, var(--dl-accent)) 12%, transparent) 0%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 1;
}

.dl-card:hover {
  border-color: color-mix(in srgb, var(--cat-color, var(--dl-accent)) 55%, transparent);
  box-shadow: var(--dl-shadow-hover);
}

.dl-card:hover::before,
.dl-card:hover::after {
  opacity: 1;
}

/* ---------- Reading Fuse Progress Bar (Single Post Only) ---------- */
.dl-reading-fuse-track {
  position: fixed;
  top: var(--dl-header-h);
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 495;
  pointer-events: none;
}

#dl-reading-fuse {
  position: relative;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b45309 0%, #ffb830 78%, #fff6dc 100%);
  box-shadow: 0 0 10px rgba(255, 184, 48, 0.65);
  transition: width 0.08s linear;
}

#dl-reading-fuse::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #fff8e1;
  box-shadow: 0 0 12px 3px rgba(255, 184, 48, 0.9);
}

/* Static mode & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .dl-card,
  .dl-card-media img {
    transition: none !important;
    transform: none !important;
  }
}

:root[data-hanabi-static="1"] .dl-card {
  transform: none !important;
}
