/* ToonTap v05r9 — calm, content-first visual refinement, 2026-09-03. */

/* Keep sparse pages anchored to the viewport without changing their content. */
body.tt-v05r8{min-height:100vh;display:flex;flex-direction:column}
.tt-v05r8 .tt-header{flex:0 0 auto}
.tt-v05r8 .tt-wrap{width:100%;flex:1 0 auto}
.tt-v05r8 .tt-footer{flex:0 0 auto;margin-top:auto}

/* A contextual list search replaces the duplicate global search affordance. */
.tt-v05r8.tt-has-page-search .tt-header-search-toggle{display:none!important}
.tt-v05r8.tt-has-page-search .tt-header-search-panel{display:none!important}

/* Let detail artwork use its natural width while retaining responsive limits. */
.tt-v05r8 .tt-view-content{background:var(--tt-bg2)!important}
.tt-v05r8 .tt-file-images img,
.tt-v05r8 .tt-content-body img{display:block;width:auto!important;height:auto!important;max-width:100%!important;margin-left:auto;margin-right:auto}

/* Reduce the visual weight of secondary detail controls. */
.tt-v05r8 .tt-view-action-strip,
.tt-v05r8 .tt-view-nav-row{padding:12px 14px!important;margin-bottom:12px!important;border-radius:14px!important}
.tt-v05r8 .tt-related-grid .tt-post-card__title a{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.tt-v05r8 .tt-related-grid .tt-chip-row .tt-chip:nth-child(n+3){display:none!important}

@media(max-width:760px){
  /* Preserve all four view modes; only tighten the thumbnail-mode proportions. */
  .tt-v05r8 .tt-post-grid[data-view=thumb] .tt-post-card{grid-template-columns:104px minmax(0,1fr)!important;min-height:112px!important}
  .tt-v05r8 .tt-post-grid[data-view=thumb] .tt-post-card__title{font-size:14px!important;line-height:1.4!important}
  .tt-v05r8 .tt-post-grid[data-view=thumb] .tt-chip-row .tt-chip:nth-child(n+3){display:none!important}

  /* Keep tag include/exclude actions on one readable row. */
  .tt-v05r8 .tt-tag-row{grid-template-columns:minmax(0,1fr) auto auto!important;gap:6px!important;min-height:44px;padding:7px 8px}
  .tt-v05r8 .tt-tag-row__name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tt-v05r8 .tt-tag-row__count{white-space:nowrap}
  .tt-v05r8 .tt-tag-row__actions{grid-column:auto!important;gap:4px}
  .tt-v05r8 .tt-tag-row__actions button{min-height:30px;padding:5px 7px;font-size:12px}

  /* The floating utility stays clear of footer links and phone safe areas. */
  .tt-v05r8 .tt-wrap{padding-bottom:88px!important}
  .tt-v05r8 .tt-footer{padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
  .tt-v05r8 .tt-floating-nav{right:10px!important;bottom:calc(10px + env(safe-area-inset-bottom))!important}

  .tt-v05r8 .tt-view-action-strip,
  .tt-v05r8 .tt-view-nav-row{padding:8px!important;border-radius:12px!important}
}

@media(max-width:360px){
  .tt-v05r8 .tt-tag-row{grid-template-columns:minmax(0,1fr) auto!important}
  .tt-v05r8 .tt-tag-row__count{display:none}
}
