.nv-nav-heading { font-weight: 700; margin: 0 0 .65em; color: #75495b; }
.nv-discovery { margin: .5em 0 1.4em; padding: 12px; background: #fbf7fa; border: 1px solid #ead9e2; border-radius: 8px; font-size: 14px; }
.nv-discovery-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; line-height: 1.4; }
.nv-discovery-head > span { font-weight: 700; color: #75495b; }
.nv-discovery .nv-discovery-more { flex-shrink: 0; display: inline-flex; align-items: center; min-height: 32px; font-size: 12px; color: #75495b; text-decoration: underline; }
.nv-discovery-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.nv-discovery-links a { display: flex; align-items: center; justify-content: center; height: 44px; min-height: 44px; padding: 2px 8px; overflow: hidden; border: 1px solid #ead9e2; border-radius: 6px; text-decoration: none; background: #fff; color: #75495b; text-align: center; line-height: 1.35; overflow-wrap: anywhere; box-sizing: border-box; }
.nv-discovery-links a:hover { background: #f6edf2; }
.nv-discovery a:focus-visible { outline: 2px solid #75495b; outline-offset: 2px; }
@media (max-width: 600px) {
  .nv-discovery-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nv-discovery-links a:nth-child(n+3) { display: none; }
}
.nv-tag-hub-bridge .nv-discovery-links { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.nv-tag-hub-bridge .nv-discovery-links a { height: auto; min-height: 44px; padding: 8px 12px; font-weight: 700; }
@media (max-width: 600px) {
  .nv-tag-hub-bridge .nv-discovery-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nv-tag-hub-bridge .nv-discovery-links a:nth-child(n+3),
  .nv-tag-hub-bridge .nv-discovery-links a:only-child { display: flex; grid-column: 1 / -1; }
}
.nv-ranking-entry { margin: 1em 0 1.6em; }
.nv-ranking-group + .nv-ranking-group { margin-top: 1.2em; }
.nv-ranking-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7em; list-style: none !important; padding: 0 !important; margin: 0 !important; }
.nv-ranking-links li { border: 1px solid #ead9e2; border-radius: 6px; background: #fff; padding: .8em; margin: 0; }
.nv-ranking-links a { display: block; font-size: .94em; font-weight: 700; text-decoration: none; }
.nv-ranking-links small { display: block; color: #666; font-size: 12px; margin-top: .4em; }
.novelove-button-container > a { max-width: 100%; box-sizing: border-box; }
.nv-rec-block .nv-rec-curation { border-color: #e9b8cd; background: #fff9fb; }
@media (max-width: 600px) {
  .nv-ranking-links { grid-template-columns: 1fr; gap: .45em; }
  .nv-ranking-links li { padding: .6em .75em; }
  .nv-ranking-links small { margin-top: .2em; }
}
@media (max-width: 1023px) {
  #navi .navi-in > ul.menu-top.menu-mobile > li { width: 33.333333%; flex: 0 0 33.333333%; box-sizing: border-box; }
  #navi .navi-in > ul.menu-top.menu-mobile > li > .sub-menu > li { width: 100%; }
  .mobile-footer-menu-buttons > .nv-mobile-nav-item { flex: 1; min-width: 0; }
  .mobile-footer-menu-buttons > li > a[data-nv-placement] { display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; min-height: 48px; padding: 9px 3px; font-size: 12px; font-weight: 700; text-decoration: none; color: #75495b; }
}

/* Mobile/tablet search has one entry point. Desktop sidebar remains fully expanded. */
#nv-search-dialog { width: min(620px, calc(100% - 16px)); max-width: none; max-height: calc(100dvh - 24px); margin: auto auto 8px; padding: 0; border: 1px solid #ead9e2; border-radius: 14px; color: #333; background: #fff; box-sizing: border-box; }
#nv-search-dialog:not([open]) { display: none; }
#nv-search-dialog[open] { display: flex; flex-direction: column; }
#nv-search-dialog::backdrop { background: rgba(30, 24, 28, .45); }
.nv-search-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #eee; flex-shrink: 0; }
#nv-search-title { margin: 0; padding: 0; border: 0; background: none; font-size: 18px; line-height: 1.4; }
.nv-search-head button { min-height: 44px; padding: 8px 14px; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #444; font: inherit; font-size: 14px; cursor: pointer; }
.nv-search-context { margin: 0; padding: 8px 16px 0; color: #75495b; font-size: 13px; flex-shrink: 0; }
.nv-search-keyword { display: flex; align-items: flex-end; gap: 8px; padding: 10px 16px; margin: 0; flex-shrink: 0; border-bottom: 1px solid #eee; }
.nv-search-keyword label { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; }
.nv-search-keyword input { width: 100%; min-height: 44px; padding: 8px; font-size: 16px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 6px; }
.nv-search-keyword button { min-height: 44px; padding: 8px 14px; border: 1px solid #ddd; border-radius: 6px; background: #f7f4f6; color: #75495b; font-size: 14px; cursor: pointer; }
html.nv-search-ready .search-filter-section { display: none !important; }
#nv-search-dialog .search-filter-section { display: flex !important; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
#nv-search-dialog .filter-toggle-btn { display: none; }
#nv-search-dialog .filter-body { display: block !important; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0 16px 8px; }
#nv-search-dialog .filter-body > .filter-group:first-child { margin-top: 12px !important; }
#nv-search-dialog .filter-title { font-size: 14px !important; }
#nv-search-dialog .btn-tag { min-height: 40px; padding: 10px 12px; box-sizing: border-box; text-decoration: none; }
#nv-search-dialog .nv-ctab { min-height: 40px; }
#nv-search-dialog .filter-actions { flex-shrink: 0; margin: 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #eee; }
#nv-search-dialog .filter-actions button { min-height: 44px; }
#nv-search-dialog button:focus-visible, #nv-search-dialog a:focus-visible { outline: 2px solid #75495b; outline-offset: 2px; }
@media (max-width: 1023px) {
  html.nv-search-ready .pc-sidebar-filter, html.nv-search-ready #sidebar .widget_search { display: none !important; }
}

/* Scope replaces the former context line; existing filter chip dimensions/gaps stay unchanged. */
.nv-search-scope { display: flex; gap: 6px; padding: 3px 16px 0; flex-shrink: 0; }
.nv-search-scope button { min-width: 0; height: 32px; padding: 4px 12px; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #666; font: inherit; font-size: 13px; line-height: 1.2; cursor: pointer; }
.nv-search-scope button[aria-pressed="true"] { border-color: #b08499; background: #f7eef3; color: #75495b; font-weight: 700; }
.nv-search-scope + .nv-search-keyword { padding-top: 8px; padding-bottom: 8px; }
#nv-search-dialog .filter-group { margin-bottom: 10px; }

/* Inline guide at the point where readers choose a store. */
.nv-store-heading { display: flex; align-items: baseline; justify-content: flex-start; flex-wrap: wrap; gap: 0 10px; }
.nv-store-heading > span { flex-shrink: 0; }
.nv-store-heading .nv-store-guide-link { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 0; box-sizing: border-box; font-size: 12px; font-weight: 400; line-height: 1.5; color: #75495b; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.nv-store-heading .nv-store-guide-link:hover { color: #a3446e; }
.nv-store-heading .nv-store-guide-link:focus-visible { outline: 2px solid #75495b; outline-offset: 2px; }
