/* ================================================================
   5. POST TITLE (CLS Stabilized) — Cleaned
================================================================ */
.post-title{
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 30px !important;
  padding: 4px !important;
  margin: 4px 0 !important;
  contain: layout;
  box-sizing: border-box;
}

.post-title.font-title h3.h5 a{
  font-size: 15px !important;
  font-weight: 700;
  margin: 4px 0;
  padding: 1px;
  line-height: 1.3;
}

.post-title::before{
  content: "";
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.page-item-detail:hover .post-title a{
  color: #ffb6b6 !important;
}

/* ================================================================
   ARCHIVE PAGE — CHAPTER LIST (3D ELEVATED) — CLAMP + CHEAP FOLD
================================================================ */
.list-chapter{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-chapter .chapter-item{
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Left side: allow flex shrink so ellipsis works */
.list-chapter .chapter.font-meta{
  flex: 1 1 auto;
  min-width: 0;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Right side: keep tight */
.list-chapter .post-on.font-meta{
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Views */
.list-chapter .post-on .views{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 11px/1 system-ui, -apple-system, sans-serif;
  color: rgba(255,255,255,0.7);
}

/* Ink & Paper button */
.list-chapter .chapter.font-meta .btn-link{
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 6px !important;  /* keep nice left padding */

  width: 100%;
  min-width: 0;

  padding: 6px 10px;
  min-height: 30px;

  background-color: #c5c5c5 !important;
  color: #1a1a1a !important;

  border: 2px solid #1a1a1a !important;
  border-radius: 8px;
  box-shadow: 2px 2px 0 0 #1b1b1b;

  font: 700 11px/1 system-ui, -apple-system, sans-serif !important;
 text-transform: none !important;
  text-decoration: none !important;

  /* clamp */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  transition: transform 160ms ease,
              box-shadow 160ms ease,
              background-color 160ms ease;
}



/* Page fold effect — CHEAP (transform-only) */
.list-chapter .chapter.font-meta .btn-link::after{
  content: "";
  position: absolute;
  top: 0;
  left: 0;

  width: 14px;
  height: 14px;

  background: linear-gradient(135deg,
    #1a1a1a 0%,
    #1a1a1a 50%,
    #e8e8e0 50%,
    #f5f5f0 60%
  );

  border-radius: 0 0 6px 0;
  box-shadow: 2px 2px 3px rgba(0,0,0,0.35);

  transform: scale(0);
  transform-origin: top left;
  opacity: 0;

  transition: transform 160ms ease, opacity 160ms ease;
  pointer-events: none;
}

/* Hover — lift + fold appears */
@media (hover:hover){
  .list-chapter .chapter.font-meta .btn-link:hover{
    transform: translate(-1px, -1px);
    background-color: #fff !important;
    box-shadow: 3px 3px 0 0 #1a1a1a;
  }

  .list-chapter .chapter.font-meta .btn-link:hover::after{
    transform: scale(1);
    opacity: 1;
  }
}

/* Active — press */
.list-chapter .chapter.font-meta .btn-link:active{
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 #1a1a1a;
}

/* Focus */
.list-chapter .chapter.font-meta .btn-link:focus-visible{
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .list-chapter .chapter.font-meta .btn-link,
  .list-chapter .chapter.font-meta .btn-link::after{
    transition: none !important;
  }

  .list-chapter .chapter.font-meta .btn-link::after{
    transform: scale(1);
    opacity: 0.45;
  }
}

/* ================================================================
   RESPONSIVE — TABLET (<= 780px)
   Keep clamp stable: avoid big gaps + avoid min-width forcing overflow
================================================================ */
@media (max-width: 780px){
  .list-chapter .chapter-item{ gap: 12px; }

  .list-chapter .chapter.font-meta .btn-link{
    padding: 8px 10px;
    font-size: 13px !important;
  }
}

/* ================================================================
   RESPONSIVE — MOBILE (<= 480px)
================================================================ */
@media (max-width: 480px){
  .list-chapter .chapter-item{ gap: 10px; }

  .list-chapter .chapter.font-meta .btn-link{
    padding: 8px 10px;
    font-size: 13px !important;
  }
}

/* ================================================================
   SMALL MOBILE (<= 380px)
   Only adjust typography/icon; do NOT increase gaps
================================================================ */
@media (max-width: 380px){
  .post-title.font-title h3.h5 a{
    font-size: 18px !important;
    margin: 2px 0;
    line-height: 1.35;
  }

  .post-title::before{
    width: 24px;
    height: 24px;
    margin-right: 10px;
  }

  .list-chapter .chapter.font-meta .btn-link{
    font-size: 13px !important;
  }

  .list-chapter .chapter.font-meta .btn-link::before{
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
  }
}
