/* =========================================================
   NEWS記事詳細：左サイドバー（他記事一覧）＋その場切り替え 2026-10-16
   single-nvs.php 専用。1200px 以上は左サイドバー、未満は下のバー＋下から出る一覧。
   色はサイト共通の 白／#141414／#f5f5f5 と文字用のグレーだけ。
   ========================================================= */

.nvs-aside,
.nvs-bar,
.nvs-pn,
.nvs-sub {
  font-family: inherit;
  color: #141414;
}
.nvs-aside *,
.nvs-bar *,
.nvs-pn *,
.nvs-sub * {
  box-sizing: border-box;
}
.nvs-aside [hidden],
.nvs-aside[hidden] {
  display: none !important;
}
/* サイト共通CSSに svg を引き伸ばす指定があるため、アイコンの大きさを固定する */
.nvs-aside svg,
.nvs-bar svg,
.nvs-sub svg {
  flex: none;
  width: 16px !important;
  height: 16px !important;
}
.nvs-aside .nvs-close svg {
  width: 20px !important;
  height: 20px !important;
}
.nvs-aside .nvs-all svg {
  width: 14px !important;
  height: 14px !important;
}
/* body の overflow-x:hidden があると左サイドバーの sticky が効かないため、同じ見た目の clip に替える（非対応ブラウザは従来どおり hidden のまま） */
body.nvs-on {
  overflow-x: clip;
  overflow-y: visible;
}

/* ---------- 一覧の見出し・タブ・検索 ---------- */
.nvs-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.nvs-head__en {
  display: block;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .24em;
  color: #767676;
}
.nvs-head__ja {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .04em;
}
.nvs-count {
  font-size: 12px;
  color: #767676;
}
.nvs-tabs {
  display: flex;
  gap: 8px;
}
.nvs-tab {
  flex: 1 1 0;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: #f5f5f5;
  color: #333;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color .15s, color .15s;
}
.nvs-tab span {
  font-size: 11px;
  font-weight: 500;
  opacity: .75;
}
.nvs-tab.is-active {
  background: #141414;
  color: #fff;
}
.nvs-search-wrap {
  position: relative;
  display: block;
  margin: 0;
}
.nvs-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #767676;
  pointer-events: none;
}
.nvs-search {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 14px 0 40px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: #141414;
  font: inherit;
  font-size: 13px;
  -webkit-appearance: none;
  appearance: none;
}
.nvs-search:focus {
  border-color: #141414;
  outline: none;
}

/* ---------- 記事リスト ---------- */
.nvs-list {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 0 8px;
  border-top: 1px solid #141414;
  border-bottom: 1px solid #e5e5e5;
  scrollbar-width: thin;
  scrollbar-color: #c8c8c8 transparent;
}
.nvs-month {
  margin: 0;
  padding: 18px 12px 6px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .14em;
  color: #767676;
}
.nvs-group ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nvs-group li {
  margin: 0;
  padding: 0;
  list-style: none;
}
.nvs-group li::before {
  content: none;
}
.nvs-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #141414;
  text-decoration: none;
  transition: background-color .15s;
}
.nvs-item:hover {
  background: #f5f5f5;
  color: #141414;
  opacity: 1;
}
.nvs-item.is-current,
.nvs-item.is-current:hover {
  background: #141414;
  color: #fff;
}
.nvs-thumb {
  flex: 0 0 76px;
  display: block;
  width: 76px;
  height: 44px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 3px;
  background: #f5f5f5;
}
.nvs-thumb picture,
.nvs-thumb img {
  display: block;
  width: 100%;
  height: 100%;
}
.nvs-thumb img {
  object-fit: cover;
}
.nvs-txt {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nvs-date {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .04em;
  color: #767676;
}
.nvs-item.is-current .nvs-date {
  color: #bdbdbd;
}
.nvs-ttl {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}
.nvs-item.is-current .nvs-ttl {
  font-weight: 700;
}
.nvs-empty {
  margin: 0;
  padding: 32px 12px;
  font-size: 13px;
  color: #767676;
  text-align: center;
}
.nvs-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 500;
  color: #141414;
  text-decoration: none;
}
.nvs-all:hover {
  color: #141414;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- 新しい記事／古い記事 ---------- */
.nvs-pn {
  order: 10; /* スマホでは記事内が order で並べ替えられる（タイトル1・画像2・タグ3・本文4）ので、本文の後ろに置く */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 96px 0 0;
  padding-top: 24px;
  border-top: 1px solid #141414;
}
.nvs-pn__link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  color: #141414;
  text-align: left;
  text-decoration: none;
  transition: border-color .15s;
}
.nvs-pn__link--older {
  align-items: flex-end;
  text-align: right;
}
.nvs-pn__link[href]:hover {
  border-color: #141414;
  color: #141414;
  opacity: 1;
}
.nvs-pn__link.is-empty {
  opacity: .35;
  cursor: default;
}
.nvs-pn__label {
  font-size: 12px;
  letter-spacing: .1em;
  color: #767676;
}
.nvs-pn__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

/* 切り替え中は本文を少し薄く */
.nvs-loading #nvs-main {
  opacity: .45;
  transition: opacity .12s;
}

/* ---------- PC：左サイドバー ---------- */
@media (min-width: 1200px) {
  .nvs-layout {
    display: flex;
    align-items: flex-start;
    gap: 56px;
  }
  .nvs-aside {
    order: -1;
    flex: 0 0 300px;
    width: 300px;
    position: sticky;
    top: 104px; /* スクロール時に固定されるヘッダー（約80px）の下 */
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .p-magazine .nvs-layout .l-wrapper3.mainContentdetail.nvs-main {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .nvs-list {
    max-height: calc(100vh - 380px);
    min-height: 240px;
  }
  .nvs-sheet-head,
  .nvs-sub,
  .nvs-bar,
  .nvs-backdrop {
    display: none !important;
  }
}

/* ---------- スマホ・タブレット：下のバー＋下から出る一覧 ---------- */
@media (max-width: 1199px) {
  .nvs-aside {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: min(82vh, 680px);
    padding: 0 16px;
    border-radius: 16px 16px 0 0;
    background: #fff;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, .12);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
  }
  .nvs-sheet-open .nvs-aside {
    transform: none;
    visibility: visible;
    transition: transform .28s ease;
  }
  .nvs-head,
  .nvs-all {
    display: none;
  }
  .nvs-sheet-head__handle {
    display: block;
    width: 40px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 2px;
    background: #ccc;
  }
  .nvs-sheet-head__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-right: -8px;
  }
  .nvs-sheet-head__title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .04em;
  }
  .nvs-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #141414;
    cursor: pointer;
  }
  .nvs-list {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 -8px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .nvs-month {
    padding-left: 8px;
  }
  .nvs-item {
    padding: 10px 8px;
  }
  .nvs-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(20, 20, 20, .45);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility 0s linear .2s;
  }
  .nvs-sheet-open .nvs-backdrop {
    opacity: 1;
    visibility: visible;
    transition: opacity .2s;
  }
  html.nvs-sheet-open,
  html.nvs-sheet-open body {
    overflow: hidden;
  }

  /* 記事の上の「NEWS 1 / 128 ｜ 記事一覧」 */
  .nvs-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    margin: 0 0 24px;
    padding: 0 4px 0 16px;
    background: #f5f5f5;
  }
  .nvs-sub__label {
    font-size: 12px;
    color: #555;
    letter-spacing: .06em;
  }
  .nvs-sub__label b {
    margin-right: 10px;
    font-weight: 700;
    color: #141414;
    letter-spacing: .16em;
  }
  .nvs-sub__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: #141414;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }

  /* 画面下に固定のバー */
  .nvs-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #e5e5e5;
    background: #fff;
  }
  .nvs-bar__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #141414;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
  }
  .nvs-bar__btn:hover {
    color: #141414;
    opacity: 1;
  }
  .nvs-bar__btn.is-empty {
    opacity: .35;
    cursor: default;
  }
  .nvs-bar__list {
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    font-weight: 700;
    gap: 6px;
  }
  body.nvs-on {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
  body.is-drawerActive .nvs-bar {
    display: none;
  }

  .nvs-pn {
    gap: 10px;
    margin-top: 64px;
  }
  .nvs-pn__link {
    min-height: 88px;
    padding: 12px;
  }
  .nvs-pn__title {
    font-size: 13px;
  }
}
