:root {
  /* Tokens (style-guide.md 基準) */
  --color-bg: #F5F0E8;
  --color-text: #1A1A1A;
  --color-accent: #C53D43;
  --color-border: #D0C8B8;

  --font-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --transition-speed: 220ms;

  --thumbnail-width: 120px;
  --thumbnail-height: 80px;
}

* {
  box-sizing: border-box;
}

.np-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 20px;
}

.np-section {
  padding-block: 72px;
}

.np-main {
  min-height: 100vh;
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.01em;
  position: relative;
}

.np-main > * {
  position: relative;
}

.np-main a {
  color: inherit;
  text-decoration-color: rgba(26, 26, 26, 0.35);
  text-underline-offset: 0.18em;
}

.np-main a:hover {
  text-decoration-color: rgba(197, 61, 67, 0.65);
}

.np-page-head {
  margin-bottom: 26px;
}

.np-seal {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(197, 61, 67, 0.75);
  position: relative;
  background:
    linear-gradient(135deg, rgba(197, 61, 67, 0.10), transparent 65%),
    radial-gradient(circle at 30% 25%, rgba(197, 61, 67, 0.22), transparent 55%);
  transform: rotate(-6deg);
  flex: none;
}

.np-seal::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(197, 61, 67, 0.45);
}

.np-seal::after {
  content: "紡";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 12px;
  color: rgba(197, 61, 67, 0.82);
  letter-spacing: 0.02em;
}

.np-page-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.2;
}

.np-page-lead {
  margin: 10px 0 0;
  color: rgba(26, 26, 26, 0.72);
  max-width: 62ch;
}

.np-page-rule {
  margin-top: 18px;
  border-top: 1px solid var(--color-border);
}

.np-tabs {
  margin-top: 26px;
}

.np-tablist-wrap {
  border-bottom: 1px solid var(--color-border);
}

.np-tablist {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 22px;
  padding-bottom: 10px;
}

.np-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  font: inherit;
  font-weight: 500;
  color: rgba(26, 26, 26, 0.62);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.np-tab:hover {
  color: rgba(26, 26, 26, 0.92);
}

.np-tab:focus-visible {
  outline: 2px solid rgba(197, 61, 67, 0.35);
  outline-offset: 4px;
  border-radius: 6px;
}

.np-tab.is-active {
  color: rgba(26, 26, 26, 0.98);
  font-weight: 700;
  border-bottom: 3px solid var(--color-accent);
  margin-bottom: -11px;
  padding-bottom: 18px;
}

.np-panels {
  padding-top: 18px;
}

.np-panel {
  opacity: 1;
  transform: none;
}

.np-panel.is-active {
  opacity: 1;
  transform: none;
}

.np-panel-title {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 18px;
  color: rgba(26, 26, 26, 0.92);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.np-list {
  border-top: 1px solid var(--color-border);
}

.np-item {
  border-bottom: 1px solid var(--color-border);
}

.np-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 10px;
  text-decoration: none;
  background: transparent;
  transition: background 200ms ease, color 200ms ease;
}

.np-item-link:hover {
  background: rgba(255, 255, 255, 0.42);
}

.np-item-link:focus-visible {
  outline: 2px solid rgba(197, 61, 67, 0.35);
  outline-offset: 4px;
  border-radius: 10px;
}

.np-item-date {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  color: rgba(26, 26, 26, 0.56);
  font-size: 13px;
}

.np-item-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.np-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding-inline: 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(26, 26, 26, 0.92);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(197, 61, 67, 0.3);
}

.np-item-title {
  color: rgba(26, 26, 26, 0.92);
  transition: color 300ms ease;
}

.np-item-link:hover .np-item-title {
  color: var(--color-accent);
}

.np-ellipsis-1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-item-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

/* お知らせ：デスクトップではタイトルとNEWを完全に中央揃え */
.np-list--text .np-item-title-row {
  align-items: center;
}

.np-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: #c23b22; /* match .brand-mark stamp color */
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.04em;
  flex: none;
}

.np-ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Media list (ニュース) */
.np-item--media .np-item-link {
  align-items: stretch;
  min-width: 0;
}

.np-item--media .np-item-title-row {
  min-width: 0;
  align-items: center;
}

/* ニュース一覧：タイトルは1行で …（横スクロール防止） */
.np-item--media .np-item-title {
  min-width: 0;
  flex: 1;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 既存の2行clamp指定をニュース一覧では無効化 */
.np-item--media .np-item-title.np-ellipsis-2 {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

/* メタ行が詰まると横にはみ出すので、ニュース一覧では折り返し可 */
.np-item--media .np-item-meta {
  flex-wrap: wrap;
  white-space: normal;
  min-width: 0;
}

.np-thumb {
  margin: 0;
  width: var(--thumbnail-width);
  min-width: var(--thumbnail-width);
  height: var(--thumbnail-height);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(208, 200, 184, 0.9);
  background: rgba(255, 255, 255, 0.5);
}

.np-thumb-img {
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(197, 61, 67, 0.14), rgba(184, 134, 11, 0.12)),
    radial-gradient(80px 60px at 20% 30%, rgba(255, 255, 255, 0.65), transparent 60%),
    radial-gradient(80px 60px at 80% 70%, rgba(255, 255, 255, 0.45), transparent 60%);
  transform: scale(1);
  transition: transform 300ms ease;
  will-change: transform;
}

.np-item-link:hover .np-thumb-img {
  transform: scale(1.03);
}

.np-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 1px;
}

.np-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Pagination (UIのみ) */
.np-pagination {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.np-page-btn,
.np-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  text-decoration: none;
  font-size: 13px;
  transition: background 300ms ease, border-color 300ms ease, color 300ms ease;
}

.np-page-btn {
  position: relative;
  font-size: 0;
}

.np-page-btn[data-page="prev"]::before,
.np-page-btn[data-page="next"]::before {
  font-size: 20px;
  line-height: 0;
  color: rgba(26, 26, 26, 0.92);
  font-family: var(--font-serif);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: translateY(-1px);
}

.np-page-btn[data-page="prev"]::before {
  content: "‹";
}

.np-page-btn[data-page="next"]::before {
  content: "›";
}

/* 小さな“和”のディテール：内側の細い輪（控えめ） */
.np-page-btn::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  border: 1px solid rgba(208, 200, 184, 0.85);
  pointer-events: none;
}

.np-page-btn:hover,
.np-page-num:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(197, 61, 67, 0.35);
  color: rgba(26, 26, 26, 0.95);
}

.np-page-btn:focus-visible,
.np-page-num:focus-visible {
  outline: 2px solid rgba(197, 61, 67, 0.35);
  outline-offset: 4px;
}

.np-page-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.np-page-num.is-current {
  background: rgba(197, 61, 67, 0.12);
  border-color: rgba(197, 61, 67, 0.35);
  color: rgba(26, 26, 26, 0.98);
  font-weight: 700;
}

.np-page-ellipsis {
  color: rgba(26, 26, 26, 0.55);
}

/* Breakpoint: 768px 이하 */
@media (max-width: 768px) {
  .np-section {
    padding-block: 46px;
  }

  .np-tablist {
    gap: 0;
  }

  .np-tab {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
  }

  .np-item-link {
    padding: 14px 8px;
  }

  /* お知らせ：日付を上へ（縦並び） */
  .np-list--text .np-item-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 8px;
    align-items: start;
  }

  /* お知らせ：タイトル行が横にはみ出さないように */
  .np-list--text .np-item-title-row {
    width: 100%;
    min-width: 0;
    display: contents;
  }

  /* お知らせ（モバイル）：meta 左 / NEW 右、タイトルは下段 */
  .np-list--text .np-item-meta {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .np-list--text .np-new {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }

  .np-list--text .np-item-title {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
  }

  /* お知らせ：モバイルは2行まで表示して…（NEWは除外） */
  .np-list--text .np-item-title.np-ellipsis-1 {
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
  }

  .np-list--text .np-item-date {
    min-width: auto;
    font-size: 12px;
  }

  .np-list--text .np-badge {
    margin-top: -2px;
  }

  /* ニュース：サムネ縮小 */
  :root {
    --thumbnail-width: 80px;
    --thumbnail-height: 56px;
  }

  /* ニュース：モバイル/ミニタブレットは2行clamp（NEWは除外） */
  .np-item--media .np-item-title-row {
    min-width: 0;
    align-items: flex-start;
  }

  /* ニュース：サムネと本文の縦位置を上揃え */
  .np-item--media .np-item-link {
    align-items: flex-start;
  }

  /* ニュース（モバイル）：タイトル -> メタ の順に配置 */
  .np-item--media .np-item-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 8px;
  }

  .np-item--media .np-item-title-row {
    display: contents;
  }

  .np-item--media .np-item-meta {
    grid-column: 1;
    grid-row: 2;
    font-size: 12px;
    gap: 8px;
  }

  .np-item--media .np-item-title {
    grid-column: 1 / -1;
    grid-row: 1;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
  }

  .np-item--media .np-new {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: center;
  }

  /* デスクトップ用に無効化していた2行clampをモバイルでは復活させる */
  .np-item--media .np-item-title.np-ellipsis-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  /* ページネーション簡略 */
  .np-page-ellipsis {
    display: none;
  }

  /* お知らせ/ニュース：モバイルは 1,2,3 のみ表示（ダミー） */
  .np-page-numbers .np-page-num:not([data-page="1"]):not([data-page="2"]):not([data-page="3"]) {
    display: none;
  }

  .np-pagination {
    gap: 6px;
  }

  .np-page-btn {
    width: 34px;
    height: 34px;
    font-size: 0; /* hide visible label; keep icon from ::before */
  }

  .np-page-num {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .np-page-btn::after {
    inset: 4px;
  }
}

/* Breakpoint: 600px 이하（모바일/미니 타블렛） */
@media (max-width: 600px) {
  .np-item--media .np-item-title {
    font-size: 13px;
    letter-spacing: 0.005em;
  }
}

