/* =========================================================
   DANANG2NITE — PHASE 64-5B
   PC HOME / EXPLORE D2N + CATEGORY SECTION HEADER ONLY
   Screenshot-driven convergence pass.
   Article cards themselves are intentionally untouched.
   ========================================================= */

@media (min-width:821px){
  body.page-home .d2n-category-deck{
    position:relative;
    margin-top:10px!important;
    padding:20px 0 27px!important;
    border-top:1px solid rgba(217,185,110,.10)!important;
    border-bottom:1px solid rgba(255,255,255,.075)!important;
  }

  body.page-home .d2n-category-deck::before{
    content:"";
    position:absolute;
    inset:-1px 0 auto;
    width:112px;
    height:1px;
    background:linear-gradient(90deg,var(--gold-soft),rgba(230,37,114,.72),transparent);
    opacity:.9;
    pointer-events:none;
  }

  body.page-home .d2n-category-deck__intro{
    min-height:24px;
    margin-bottom:14px!important;
    align-items:center;
  }

  body.page-home .d2n-category-deck__intro .eyebrow{
    display:inline-flex;
    align-items:center;
    gap:10px;
    color:#ebcf83!important;
    font-size:9px!important;
    font-weight:900;
    letter-spacing:1.7px!important;
  }

  body.page-home .d2n-category-deck__intro .eyebrow::before{
    content:"";
    width:22px;
    height:1px;
    background:linear-gradient(90deg,var(--gold-soft),rgba(217,185,110,.18));
  }

  body.page-home .d2n-category-deck__intro>strong{
    color:#6f6863!important;
    font-size:7.5px!important;
    font-weight:850;
    letter-spacing:2.6px!important;
  }

  body.page-home .d2n-category-deck__rail{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:10px!important;
  }

  body.page-home .d2n-category-chip{
    min-height:88px!important;
    padding:12px 10px 12px 11px!important;
    grid-template-columns:29px minmax(0,1fr) 25px!important;
    gap:7px!important;
    border-radius:15px!important;
    border-color:rgba(255,255,255,.09)!important;
    background:
      linear-gradient(145deg,rgba(255,255,255,.028),rgba(255,255,255,.004) 60%),
      radial-gradient(circle at 0 50%,rgba(230,37,114,.055),transparent 48%),
      #0c0b0e!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.018);
  }

  body.page-home .d2n-category-chip::before{
    width:2px!important;
    opacity:.50!important;
    background:linear-gradient(to bottom,transparent 12%,var(--pink) 50%,transparent 88%)!important;
  }

  body.page-home .d2n-category-chip>span{
    width:29px;
    height:29px;
    display:grid;
    place-items:center;
    border:1px solid rgba(230,37,114,.20);
    border-radius:50%;
    color:#ff4b8c!important;
    background:rgba(230,37,114,.045);
    font-size:8px!important;
    font-weight:950!important;
    letter-spacing:.3px!important;
  }

  body.page-home .d2n-category-chip>strong{
    color:#eee8e0!important;
    font-size:11.5px!important;
    font-weight:800!important;
    line-height:1.22!important;
    letter-spacing:-.08px!important;
    min-width:0;
    overflow:visible;
    text-overflow:clip;
    white-space:normal;
    overflow-wrap:break-word;
  }

  body.page-home .d2n-category-chip>i{
    width:25px!important;
    height:25px!important;
    border-color:rgba(217,185,110,.15)!important;
    color:#a69a83!important;
    background:rgba(217,185,110,.018);
    font-size:9px!important;
  }

  body.page-home .d2n-category-chip.has-stories{
    border-color:rgba(230,37,114,.20)!important;
  }

  body.page-home .d2n-category-chip:hover{
    transform:translateY(-2px)!important;
    border-color:rgba(217,185,110,.32)!important;
    background:
      linear-gradient(145deg,rgba(217,185,110,.055),rgba(255,255,255,.006) 58%),
      radial-gradient(circle at 0 50%,rgba(230,37,114,.10),transparent 50%),
      #0d0c0f!important;
    box-shadow:0 14px 34px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.025)!important;
  }

  body.page-home .d2n-category-chip:hover>i{
    color:#f0d38a!important;
    border-color:rgba(217,185,110,.34)!important;
  }

  /* Make empty categories look intentionally quieter, not disabled/broken. */
  body.page-home .d2n-category-chip.is-empty{
    opacity:.72!important;
  }

  @media (max-width:1220px) and (min-width:821px){
    body.page-home .d2n-category-deck__rail{
      grid-template-columns:repeat(3,minmax(0,1fr))!important;
    }
    body.page-home .d2n-category-chip{
      min-height:64px!important;
    }
  }

  /* ---------- CATEGORY FEED TRANSITION ---------- */
  body.page-home .d2n-category-feed{
    position:relative;
    padding-top:0!important;
    border-top:0;
    background:
      radial-gradient(circle at 8% 0,rgba(230,37,114,.035),transparent 24%),
      linear-gradient(180deg,rgba(79,14,42,.075),transparent 170px);
  }

  body.page-home .d2n-category-feed::before{
    height:420px!important;
    opacity:.72;
  }

  body.page-home .d2n-category-section{
    padding-block:38px 40px!important;
    border-bottom-color:rgba(255,255,255,.065)!important;
  }

  body.page-home .d2n-category-section:first-child{
    padding-top:34px!important;
  }

  body.page-home .d2n-category-section__head{
    min-height:64px;
    margin-bottom:18px!important;
    align-items:flex-end!important;
    gap:24px!important;
  }

  body.page-home .d2n-category-section__identity{
    gap:14px!important;
    align-items:flex-end!important;
  }

  body.page-home .d2n-category-section__number{
    min-width:52px!important;
    font-size:39px!important;
    line-height:.82!important;
    letter-spacing:-2px!important;
    -webkit-text-stroke:1px rgba(230,37,114,.68)!important;
    text-shadow:0 0 22px rgba(230,37,114,.10)!important;
  }

  body.page-home .d2n-category-section__identity>div{
    padding-bottom:1px;
  }

  body.page-home .d2n-category-section__identity .eyebrow{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:#bda361!important;
    font-size:7.5px!important;
    font-weight:900!important;
    letter-spacing:1.45px!important;
  }

  body.page-home .d2n-category-section__identity .eyebrow::before{
    content:"";
    width:23px;
    height:1px;
    background:linear-gradient(90deg,var(--gold-soft),rgba(217,185,110,.18));
  }

  body.page-home .d2n-category-section__head h2{
    margin-top:6px!important;
    color:#f7f1e9!important;
    font-size:34px!important;
    line-height:1!important;
    letter-spacing:-.9px!important;
  }

  body.page-home .d2n-category-section__more{
    min-height:38px!important;
    padding:0 14px!important;
    gap:8px!important;
    margin-bottom:3px;
    border-color:rgba(255,255,255,.10)!important;
    color:#b5ada5!important;
    background:rgba(255,255,255,.012)!important;
    font-size:7.5px!important;
    letter-spacing:.85px!important;
  }

  body.page-home .d2n-category-section__more:hover{
    color:#f6e6c0!important;
    border-color:rgba(217,185,110,.34)!important;
    background:rgba(217,185,110,.045)!important;
  }

  /* Locale-safe display metrics. */
  html[lang^="zh"] body.page-home .d2n-category-chip>strong,
  html[lang="ja"] body.page-home .d2n-category-chip>strong,
  html[lang="ko"] body.page-home .d2n-category-chip>strong{
    font-size:11px!important;
    font-weight:800!important;
    letter-spacing:-.15px!important;
  }

  html[lang="ru"] body.page-home .d2n-category-chip>strong{
    font-size:10px!important;
    letter-spacing:-.12px!important;
  }

  html[lang="th"] body.page-home .d2n-category-chip>strong,
  html[lang="hi"] body.page-home .d2n-category-chip>strong,
  html[lang="ar"] body.page-home .d2n-category-chip>strong{
    font-size:10.5px!important;
    line-height:1.28!important;
    letter-spacing:0!important;
  }

  html[lang^="zh"] body.page-home .d2n-category-section__head h2,
  html[lang="ja"] body.page-home .d2n-category-section__head h2,
  html[lang="ko"] body.page-home .d2n-category-section__head h2{
    font-size:32px!important;
    line-height:1.05!important;
    letter-spacing:-.7px!important;
  }

  html[lang="th"] body.page-home .d2n-category-section__head h2,
  html[lang="hi"] body.page-home .d2n-category-section__head h2,
  html[lang="ar"] body.page-home .d2n-category-section__head h2{
    font-size:31px!important;
    line-height:1.12!important;
    letter-spacing:0!important;
  }

  html[dir="rtl"] body.page-home .d2n-category-deck::before{
    inset-inline-start:auto;
    inset-inline-end:0;
    transform:scaleX(-1);
  }

  html[dir="rtl"] body.page-home .d2n-category-chip::before{
    inset-inline-start:auto!important;
    inset-inline-end:0!important;
  }
}

/* Medium PC: retain six visible categories without forcing text collision. */
@media (min-width:821px) and (max-width:1220px){
  body.page-home .d2n-category-deck__rail{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  body.page-home .d2n-category-chip{
    min-height:66px!important;
  }

  body.page-home .d2n-category-section__head h2{
    font-size:31px!important;
  }
}
